block.json
1 year ago
controller.php
1 year ago
index-rtl.css
3 months ago
index.asset.php
3 months ago
index.css
3 months ago
index.js
1 year ago
view.php
9 months ago
view.php
65 lines
| 1 | <div |
| 2 | <?php echo wp_kses_data( |
| 3 | get_block_wrapper_attributes( |
| 4 | array( |
| 5 | 'class' => 'sc-input-group sc-input-group-sm', |
| 6 | ) |
| 7 | ) |
| 8 | ); ?> |
| 9 | data-wp-interactive='{ "namespace": "surecart/product-list" }' |
| 10 | > |
| 11 | <span class="sc-input-group-text"> |
| 12 | <?php |
| 13 | echo wp_kses( |
| 14 | SureCart::svg()->get( |
| 15 | 'search', |
| 16 | [ |
| 17 | 'width' => 16, |
| 18 | 'height' => 16, |
| 19 | 'class' => 'sc-icon', |
| 20 | ] |
| 21 | ), |
| 22 | sc_allowed_svg_html() |
| 23 | ) |
| 24 | ?> |
| 25 | </span> |
| 26 | |
| 27 | <input |
| 28 | class="sc-form-control" |
| 29 | type="search" |
| 30 | data-wp-on--input="actions.onSearchInput" |
| 31 | placeholder="<?php esc_attr_e( 'Search', 'surecart' ); ?>" |
| 32 | value="<?php echo esc_attr( $value ); ?>" |
| 33 | > |
| 34 | |
| 35 | <?php if ( ! empty( $value ) ) : ?> |
| 36 | <span class="sc-input-group-text" |
| 37 | role="button" |
| 38 | tabindex="0" |
| 39 | data-wp-bind--hidden="state.searching" |
| 40 | data-wp-on--click="actions.clearSearch" |
| 41 | data-wp-on--keydown="actions.clearSearch" |
| 42 | > |
| 43 | <?php |
| 44 | echo wp_kses( |
| 45 | SureCart::svg()->get( |
| 46 | 'x', |
| 47 | [ |
| 48 | 'width' => 16, |
| 49 | 'height' => 16, |
| 50 | 'class' => 'sc-icon', |
| 51 | 'aria-hidden' => true, |
| 52 | ] |
| 53 | ), |
| 54 | sc_allowed_svg_html() |
| 55 | ); |
| 56 | ?> |
| 57 | <div class="sc-screen-reader-text"><?php esc_html_e( 'Clear search', 'surecart' ); ?></div> |
| 58 | </span> |
| 59 | <?php endif; ?> |
| 60 | |
| 61 | <span class="sc-input-group-text" data-wp-bind--hidden="!state.searching" hidden> |
| 62 | <span class="sc-spinner" aria-hidden="true"></span> |
| 63 | </span> |
| 64 | </div> |
| 65 |