@searchcraft/javascript-sdk 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +197 -0
- package/dist/cjs/{index-264ebadc.js → index-6916cc47.js} +30 -3
- package/dist/cjs/index-6916cc47.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-35d3b670.js → package-38f7e2c7.js} +3 -3
- package/dist/cjs/package-38f7e2c7.js.map +1 -0
- package/dist/cjs/searchcraft-auto-search-form.cjs.entry.js +143 -0
- package/dist/cjs/searchcraft-auto-search-form.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +8 -11
- package/dist/cjs/searchcraft-base-search-form.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-base-search-result.cjs.entry.js +74 -0
- package/dist/cjs/searchcraft-base-search-result.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-base-search-results.cjs.entry.js +109 -0
- package/dist/cjs/searchcraft-base-search-results.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-button-icon.cjs.entry.js +1 -1
- package/dist/cjs/searchcraft-button.cjs.entry.js +3 -8
- package/dist/cjs/searchcraft-button.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-check-icon_2.cjs.entry.js +28 -0
- package/dist/cjs/searchcraft-check-icon_2.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-clear-icon-set.cjs.entry.js +30 -0
- package/dist/cjs/searchcraft-clear-icon-set.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-error-message_3.cjs.entry.js +95 -0
- package/dist/cjs/searchcraft-error-message_3.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js +236 -0
- package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-filter-panel.cjs.entry.js +115 -0
- package/dist/cjs/searchcraft-filter-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-javascript-sdk.cjs.js +2 -2
- package/dist/cjs/searchcraft-results-info.cjs.entry.js +46 -0
- package/dist/cjs/searchcraft-results-info.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-search-icon-set.cjs.entry.js +33 -0
- package/dist/cjs/searchcraft-search-icon-set.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-spinner-dark.cjs.entry.js +3 -3
- package/dist/cjs/searchcraft-spinner-dark.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-spinner-light.cjs.entry.js +3 -3
- package/dist/cjs/searchcraft-spinner-light.cjs.entry.js.map +1 -1
- package/dist/{esm/store-b519dd0b.js → cjs/store-afa727af.js} +148 -208
- package/dist/cjs/store-afa727af.js.map +1 -0
- package/dist/cjs/utils-0f309f6d.js +226 -0
- package/dist/cjs/utils-0f309f6d.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -4
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +46 -95
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -1
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.css +98 -9
- package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js +31 -16
- package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.module.css +94 -8
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +125 -153
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +139 -206
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +121 -92
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +105 -23
- package/dist/collection/components/searchcraft-button/searchcraft-button.js +2 -8
- package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +1 -1
- package/dist/collection/components/searchcraft-button/searchcraft-button.module.css +107 -36
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +1 -22
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +1 -1
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.module.css +101 -15
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js +171 -0
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js.map +1 -0
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.module.css +216 -0
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js +148 -0
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js.map +1 -0
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.module.css +118 -0
- package/dist/collection/components/searchcraft-input/searchcraft-input.js +36 -125
- package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +1 -1
- package/dist/collection/components/searchcraft-input/searchcraft-input.module.css +158 -209
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +1 -12
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +1 -1
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.module.css +102 -14
- package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js +1 -2
- package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js.map +1 -1
- package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.module.css +103 -9
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js +93 -68
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js.map +1 -1
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.module.css +117 -18
- package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +1 -1
- package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.module.css +103 -4
- package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +1 -1
- package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.module.css +102 -3
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +62 -59
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +1 -1
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.module.css +135 -9
- package/dist/collection/index.js +2 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/provider/store.js +54 -34
- package/dist/collection/provider/store.js.map +1 -1
- package/dist/collection/types/index.js +3 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/collection/types/searchcraft-base-search-results.types.js +2 -0
- package/dist/collection/types/searchcraft-base-search-results.types.js.map +1 -0
- package/dist/collection/types/searchcraft-filter-panel.types.js +2 -0
- package/dist/collection/types/searchcraft-filter-panel.types.js.map +1 -0
- package/dist/collection/utils/utils.js +171 -35
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +7 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-bbf9973a.js → p-04d13314.js} +2 -2
- package/dist/components/{p-bbf9973a.js.map → p-04d13314.js.map} +1 -1
- package/dist/components/p-08e421ca.js +99 -0
- package/dist/components/p-08e421ca.js.map +1 -0
- package/dist/components/p-37f54c0b.js +54 -0
- package/dist/components/p-37f54c0b.js.map +1 -0
- package/dist/components/{p-727bfc38.js → p-3c181808.js} +135 -113
- package/dist/components/p-3c181808.js.map +1 -0
- package/dist/components/p-415f7b11.js +101 -0
- package/dist/components/p-415f7b11.js.map +1 -0
- package/dist/components/p-4353a2b8.js +155 -0
- package/dist/components/p-4353a2b8.js.map +1 -0
- package/dist/components/{p-b0c1fd63.js → p-4c89f065.js} +3 -3
- package/dist/components/p-4c89f065.js.map +1 -0
- package/dist/components/p-4fad3388.js +82 -0
- package/dist/components/p-4fad3388.js.map +1 -0
- package/dist/components/{p-6b353c3e.js → p-5639be85.js} +23 -3
- package/dist/components/p-5639be85.js.map +1 -0
- package/dist/components/p-9982883f.js +218 -0
- package/dist/components/p-9982883f.js.map +1 -0
- package/dist/components/p-9b9df0ca.js +67 -0
- package/dist/components/p-9b9df0ca.js.map +1 -0
- package/dist/components/p-9f2b8375.js +33 -0
- package/dist/components/p-9f2b8375.js.map +1 -0
- package/dist/components/p-ace4e6a0.js +35 -0
- package/dist/components/p-ace4e6a0.js.map +1 -0
- package/dist/components/p-c8bc1e4f.js +40 -0
- package/dist/components/p-c8bc1e4f.js.map +1 -0
- package/dist/components/{p-aad03c2a.js → p-de50441f.js} +2 -2
- package/dist/components/{p-aad03c2a.js.map → p-de50441f.js.map} +1 -1
- package/dist/components/searchcraft-auto-search-form.js +54 -82
- package/dist/components/searchcraft-auto-search-form.js.map +1 -1
- package/dist/components/searchcraft-base-search-form.js +20 -52
- package/dist/components/searchcraft-base-search-form.js.map +1 -1
- package/dist/components/searchcraft-base-search-result.js +1 -1
- package/dist/components/searchcraft-base-search-results.js +51 -52
- package/dist/components/searchcraft-base-search-results.js.map +1 -1
- package/dist/components/searchcraft-button-icon.js +1 -1
- package/dist/components/searchcraft-button.js +1 -1
- package/dist/components/searchcraft-check-icon.js +1 -1
- package/dist/components/searchcraft-clear-icon-set.js +39 -1
- package/dist/components/searchcraft-clear-icon-set.js.map +1 -1
- package/dist/components/searchcraft-dash-icon.js +1 -1
- package/dist/components/searchcraft-error-message.js +1 -1
- package/dist/components/searchcraft-facet-list.d.ts +11 -0
- package/dist/components/searchcraft-facet-list.js +8 -0
- package/dist/components/searchcraft-facet-list.js.map +1 -0
- package/dist/components/searchcraft-filter-panel.d.ts +11 -0
- package/dist/components/searchcraft-filter-panel.js +162 -0
- package/dist/components/searchcraft-filter-panel.js.map +1 -0
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/searchcraft-input.js +1 -1
- package/dist/components/searchcraft-results-info.js +5 -6
- package/dist/components/searchcraft-results-info.js.map +1 -1
- package/dist/components/searchcraft-search-icon-set.js +44 -1
- package/dist/components/searchcraft-search-icon-set.js.map +1 -1
- package/dist/components/searchcraft-slider.js +1 -104
- package/dist/components/searchcraft-slider.js.map +1 -1
- package/dist/components/searchcraft-spinner-dark.js +1 -1
- package/dist/components/searchcraft-spinner-light.js +3 -3
- package/dist/components/searchcraft-spinner-light.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -93
- package/dist/components/searchcraft-toggle-button.js.map +1 -1
- package/dist/esm/{index-d851fb46.js → index-921fe029.js} +30 -4
- package/dist/esm/index-921fe029.js.map +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{package-82baadd7.js → package-e62ac63a.js} +3 -3
- package/dist/esm/package-e62ac63a.js.map +1 -0
- package/dist/esm/searchcraft-auto-search-form.entry.js +139 -0
- package/dist/esm/searchcraft-auto-search-form.entry.js.map +1 -0
- package/dist/esm/searchcraft-base-search-form.entry.js +8 -11
- package/dist/esm/searchcraft-base-search-form.entry.js.map +1 -1
- package/dist/esm/searchcraft-base-search-result.entry.js +70 -0
- package/dist/esm/searchcraft-base-search-result.entry.js.map +1 -0
- package/dist/esm/searchcraft-base-search-results.entry.js +105 -0
- package/dist/esm/searchcraft-base-search-results.entry.js.map +1 -0
- package/dist/esm/searchcraft-button-icon.entry.js +1 -1
- package/dist/esm/searchcraft-button.entry.js +3 -8
- package/dist/esm/searchcraft-button.entry.js.map +1 -1
- package/dist/esm/searchcraft-check-icon_2.entry.js +23 -0
- package/dist/esm/searchcraft-check-icon_2.entry.js.map +1 -0
- package/dist/{components/p-62e6b69c.js → esm/searchcraft-clear-icon-set.entry.js} +7 -24
- package/dist/esm/searchcraft-clear-icon-set.entry.js.map +1 -0
- package/dist/esm/searchcraft-error-message_3.entry.js +89 -0
- package/dist/esm/searchcraft-error-message_3.entry.js.map +1 -0
- package/dist/esm/searchcraft-facet-list_3.entry.js +230 -0
- package/dist/esm/searchcraft-facet-list_3.entry.js.map +1 -0
- package/dist/esm/searchcraft-filter-panel.entry.js +111 -0
- package/dist/esm/searchcraft-filter-panel.entry.js.map +1 -0
- package/dist/esm/searchcraft-javascript-sdk.js +3 -3
- package/dist/esm/searchcraft-results-info.entry.js +42 -0
- package/dist/esm/searchcraft-results-info.entry.js.map +1 -0
- package/dist/{components/p-5a872bdf.js → esm/searchcraft-search-icon-set.entry.js} +7 -26
- package/dist/esm/searchcraft-search-icon-set.entry.js.map +1 -0
- package/dist/esm/searchcraft-spinner-dark.entry.js +3 -3
- package/dist/esm/searchcraft-spinner-dark.entry.js.map +1 -1
- package/dist/esm/searchcraft-spinner-light.entry.js +3 -3
- package/dist/esm/searchcraft-spinner-light.entry.js.map +1 -1
- package/dist/{cjs/store-e3bbdd49.js → esm/store-8d82e948.js} +145 -220
- package/dist/esm/store-8d82e948.js.map +1 -0
- package/dist/esm/utils-ee63b542.js +218 -0
- package/dist/esm/utils-ee63b542.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/p-15e0ce05.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-15e0ce05.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-2816782c.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-2816782c.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-3292e706.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-3292e706.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-4a2d1f44.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-4a2d1f44.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-4c89f065.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-80e3f29f.js +3 -0
- package/dist/searchcraft-javascript-sdk/p-80e3f29f.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-8a9b0762.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-8a9b0762.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-92d080a7.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-92d080a7.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-9982883f.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-9982883f.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-9f29b018.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-9f29b018.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-a148febe.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-a148febe.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-a2801518.js +11 -0
- package/dist/searchcraft-javascript-sdk/p-a2801518.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-bcc68b15.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-bcc68b15.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-c70b31ae.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-c70b31ae.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-cc614ce6.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-cc614ce6.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-d4a7d8bd.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-d4a7d8bd.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-e108dd2e.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-e108dd2e.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-99356c9a.entry.js → p-e8a96dca.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-efb41d6d.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-efb41d6d.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
- package/dist/types/components/searchcraft-auto-search-form/searchcraft-auto-search-form.d.ts +5 -5
- package/dist/types/components/searchcraft-base-search-form/searchcraft-base-search-form.d.ts +3 -2
- package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +16 -18
- package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +10 -6
- package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +0 -2
- package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +0 -1
- package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +24 -0
- package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +22 -0
- package/dist/types/components/searchcraft-input/searchcraft-input.d.ts +4 -10
- package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +0 -2
- package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +12 -15
- package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +8 -9
- package/dist/types/components.d.ts +127 -185
- package/dist/types/index.d.ts +2 -1
- package/dist/types/provider/store.d.ts +15 -14
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/searchcraft-base-search-results.types.d.ts +17 -0
- package/dist/types/types/searchcraft-filter-panel.types.d.ts +42 -0
- package/dist/types/utils/utils.d.ts +23 -15
- package/package.json +2 -2
- package/dist/cjs/index-264ebadc.js.map +0 -1
- package/dist/cjs/package-35d3b670.js.map +0 -1
- package/dist/cjs/searchcraft-auto-search-form_17.cjs.entry.js +0 -867
- package/dist/cjs/searchcraft-auto-search-form_17.cjs.entry.js.map +0 -1
- package/dist/cjs/store-e3bbdd49.js.map +0 -1
- package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js +0 -94
- package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js.map +0 -1
- package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.module.css +0 -33
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js +0 -168
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js.map +0 -1
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.module.css +0 -111
- package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js +0 -121
- package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js.map +0 -1
- package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.module.css +0 -79
- package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js +0 -109
- package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js.map +0 -1
- package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.module.css +0 -17
- package/dist/components/p-4f939ba2.js +0 -53
- package/dist/components/p-4f939ba2.js.map +0 -1
- package/dist/components/p-5015a359.js +0 -39
- package/dist/components/p-5015a359.js.map +0 -1
- package/dist/components/p-54848b4d.js +0 -136
- package/dist/components/p-54848b4d.js.map +0 -1
- package/dist/components/p-5a872bdf.js.map +0 -1
- package/dist/components/p-62c40862.js +0 -91
- package/dist/components/p-62c40862.js.map +0 -1
- package/dist/components/p-62e6b69c.js.map +0 -1
- package/dist/components/p-69ee3b9a.js +0 -59
- package/dist/components/p-69ee3b9a.js.map +0 -1
- package/dist/components/p-6b353c3e.js.map +0 -1
- package/dist/components/p-727bfc38.js.map +0 -1
- package/dist/components/p-7c280820.js +0 -33
- package/dist/components/p-7c280820.js.map +0 -1
- package/dist/components/p-7d385ffb.js +0 -60
- package/dist/components/p-7d385ffb.js.map +0 -1
- package/dist/components/p-8524c749.js +0 -54
- package/dist/components/p-8524c749.js.map +0 -1
- package/dist/components/p-b0c1fd63.js.map +0 -1
- package/dist/components/p-b38d171d.js +0 -47
- package/dist/components/p-b38d171d.js.map +0 -1
- package/dist/components/p-cd9a038a.js +0 -105
- package/dist/components/p-cd9a038a.js.map +0 -1
- package/dist/components/searchcraft-clear-input-button.d.ts +0 -11
- package/dist/components/searchcraft-clear-input-button.js +0 -8
- package/dist/components/searchcraft-clear-input-button.js.map +0 -1
- package/dist/components/searchcraft-filters-list.d.ts +0 -11
- package/dist/components/searchcraft-filters-list.js +0 -151
- package/dist/components/searchcraft-filters-list.js.map +0 -1
- package/dist/components/searchcraft-input-caption.d.ts +0 -11
- package/dist/components/searchcraft-input-caption.js +0 -8
- package/dist/components/searchcraft-input-caption.js.map +0 -1
- package/dist/components/searchcraft-input-icon.d.ts +0 -11
- package/dist/components/searchcraft-input-icon.js +0 -8
- package/dist/components/searchcraft-input-icon.js.map +0 -1
- package/dist/esm/index-d851fb46.js.map +0 -1
- package/dist/esm/package-82baadd7.js.map +0 -1
- package/dist/esm/searchcraft-auto-search-form_17.entry.js +0 -847
- package/dist/esm/searchcraft-auto-search-form_17.entry.js.map +0 -1
- package/dist/esm/store-b519dd0b.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-1f3ae7f3.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-1f3ae7f3.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-201cb2dc.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-201cb2dc.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-2c220368.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-2c220368.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-39c0ca33.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-39c0ca33.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-476829a4.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-476829a4.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-b0c1fd63.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-b42eaa55.js +0 -3
- package/dist/searchcraft-javascript-sdk/p-b42eaa55.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-d5f8dda2.js +0 -11
- package/dist/searchcraft-javascript-sdk/p-d5f8dda2.js.map +0 -1
- package/dist/types/components/searchcraft-clear-input-button/searchcraft-clear-input-button.d.ts +0 -10
- package/dist/types/components/searchcraft-filters-list/searchcraft-filters-list.d.ts +0 -34
- package/dist/types/components/searchcraft-input-caption/searchcraft-input-caption.d.ts +0 -9
- package/dist/types/components/searchcraft-input-icon/searchcraft-input-icon.d.ts +0 -9
- package/readme.md +0 -11
- /package/dist/searchcraft-javascript-sdk/{p-b0c1fd63.js.map → p-4c89f065.js.map} +0 -0
- /package/dist/searchcraft-javascript-sdk/{p-99356c9a.entry.js.map → p-e8a96dca.entry.js.map} +0 -0
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
export class SearchcraftInputIcon {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.error = undefined;
|
|
6
|
-
this.height = 20;
|
|
7
|
-
this.rightToLeftOrientation = false;
|
|
8
|
-
this.width = 20;
|
|
9
|
-
this.theme = 'light';
|
|
10
|
-
}
|
|
11
|
-
isLightTheme() {
|
|
12
|
-
return this.theme === 'light';
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return this.error ? (h("div", { class: classNames(this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR', 'searchcraft-input-icon-container') }, this.isLightTheme() ? (h("searchcraft-search-icon-set", { height: this.height, type: 'error-light', width: this.width })) : (h("searchcraft-search-icon-set", { height: this.height, type: 'error-dark', width: this.width })))) : (h("div", { class: classNames(this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR', 'searchcraft-input-icon-container') }, this.isLightTheme() ? (h("searchcraft-search-icon-set", { height: this.height, type: 'search-light', width: this.width })) : (h("searchcraft-search-icon-set", { height: this.height, type: 'search-dark', width: this.width }))));
|
|
16
|
-
}
|
|
17
|
-
static get is() { return "searchcraft-input-icon"; }
|
|
18
|
-
static get originalStyleUrls() {
|
|
19
|
-
return {
|
|
20
|
-
"$": ["searchcraft-input-icon.module.scss"]
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
static get styleUrls() {
|
|
24
|
-
return {
|
|
25
|
-
"$": ["searchcraft-input-icon.module.css"]
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
static get properties() {
|
|
29
|
-
return {
|
|
30
|
-
"error": {
|
|
31
|
-
"type": "boolean",
|
|
32
|
-
"mutable": false,
|
|
33
|
-
"complexType": {
|
|
34
|
-
"original": "boolean",
|
|
35
|
-
"resolved": "boolean",
|
|
36
|
-
"references": {}
|
|
37
|
-
},
|
|
38
|
-
"required": false,
|
|
39
|
-
"optional": true,
|
|
40
|
-
"docs": {
|
|
41
|
-
"tags": [],
|
|
42
|
-
"text": ""
|
|
43
|
-
},
|
|
44
|
-
"attribute": "error",
|
|
45
|
-
"reflect": false
|
|
46
|
-
},
|
|
47
|
-
"height": {
|
|
48
|
-
"type": "number",
|
|
49
|
-
"mutable": false,
|
|
50
|
-
"complexType": {
|
|
51
|
-
"original": "number",
|
|
52
|
-
"resolved": "number",
|
|
53
|
-
"references": {}
|
|
54
|
-
},
|
|
55
|
-
"required": false,
|
|
56
|
-
"optional": false,
|
|
57
|
-
"docs": {
|
|
58
|
-
"tags": [],
|
|
59
|
-
"text": ""
|
|
60
|
-
},
|
|
61
|
-
"attribute": "height",
|
|
62
|
-
"reflect": false,
|
|
63
|
-
"defaultValue": "20"
|
|
64
|
-
},
|
|
65
|
-
"rightToLeftOrientation": {
|
|
66
|
-
"type": "boolean",
|
|
67
|
-
"mutable": false,
|
|
68
|
-
"complexType": {
|
|
69
|
-
"original": "boolean",
|
|
70
|
-
"resolved": "boolean",
|
|
71
|
-
"references": {}
|
|
72
|
-
},
|
|
73
|
-
"required": false,
|
|
74
|
-
"optional": false,
|
|
75
|
-
"docs": {
|
|
76
|
-
"tags": [],
|
|
77
|
-
"text": ""
|
|
78
|
-
},
|
|
79
|
-
"attribute": "right-to-left-orientation",
|
|
80
|
-
"reflect": false,
|
|
81
|
-
"defaultValue": "false"
|
|
82
|
-
},
|
|
83
|
-
"width": {
|
|
84
|
-
"type": "number",
|
|
85
|
-
"mutable": false,
|
|
86
|
-
"complexType": {
|
|
87
|
-
"original": "number",
|
|
88
|
-
"resolved": "number",
|
|
89
|
-
"references": {}
|
|
90
|
-
},
|
|
91
|
-
"required": false,
|
|
92
|
-
"optional": false,
|
|
93
|
-
"docs": {
|
|
94
|
-
"tags": [],
|
|
95
|
-
"text": ""
|
|
96
|
-
},
|
|
97
|
-
"attribute": "width",
|
|
98
|
-
"reflect": false,
|
|
99
|
-
"defaultValue": "20"
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
static get states() {
|
|
104
|
-
return {
|
|
105
|
-
"theme": {}
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
//# sourceMappingURL=searchcraft-input-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"searchcraft-input-icon.js","sourceRoot":"","sources":["../../../../src/components/searchcraft-input-icon/searchcraft-input-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,UAAU,MAAM,YAAY,CAAC;AAOpC,MAAM,OAAO,oBAAoB;;;sBAEd,EAAE;sCACc,KAAK;qBACtB,EAAE;qBAED,OAAO;;IAEhB,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;IAChC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAClB,WACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAC7D,kCAAkC,CACnC,IAEA,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CACrB,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CAAC,CAAC,CAAC,CACF,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,YAAY,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CACG,CACP,CAAC,CAAC,CAAC,CACF,WACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAC7D,kCAAkC,CACnC,IAEA,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CACrB,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CAAC,CAAC,CAAC,CACF,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, State } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-input-icon',\n styleUrl: 'searchcraft-input-icon.module.scss',\n shadow: false,\n})\nexport class SearchcraftInputIcon {\n @Prop() error?: boolean;\n @Prop() height = 20;\n @Prop() rightToLeftOrientation = false;\n @Prop() width = 20;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n return this.error ? (\n <div\n class={classNames(\n this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR',\n 'searchcraft-input-icon-container',\n )}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-dark'\n width={this.width}\n />\n )}\n </div>\n ) : (\n <div\n class={classNames(\n this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR',\n 'searchcraft-input-icon-container',\n )}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-dark'\n width={this.width}\n />\n )}\n </div>\n );\n }\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--font-stack: Helvetica, Arial, sans-serif;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.inputIconLTR {
|
|
6
|
-
left: 15px;
|
|
7
|
-
position: absolute;
|
|
8
|
-
top: 52%;
|
|
9
|
-
transform: translateY(-50%);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.inputIconRTL {
|
|
13
|
-
position: absolute;
|
|
14
|
-
right: 15px;
|
|
15
|
-
top: 52%;
|
|
16
|
-
transform: translateY(-50%);
|
|
17
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, h } from './p-6b353c3e.js';
|
|
2
|
-
import { c as classNames } from './p-5cdc6210.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-5a872bdf.js';
|
|
4
|
-
|
|
5
|
-
const searchcraftInputIconModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.inputIconLTR{left:15px;position:absolute;top:52%;transform:translateY(-50%)}.inputIconRTL{position:absolute;right:15px;top:52%;transform:translateY(-50%)}";
|
|
6
|
-
const SearchcraftInputIconStyle0 = searchcraftInputIconModuleCss;
|
|
7
|
-
|
|
8
|
-
const SearchcraftInputIcon = /*@__PURE__*/ proxyCustomElement(class SearchcraftInputIcon extends H {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.__registerHost();
|
|
12
|
-
this.error = undefined;
|
|
13
|
-
this.height = 20;
|
|
14
|
-
this.rightToLeftOrientation = false;
|
|
15
|
-
this.width = 20;
|
|
16
|
-
this.theme = 'light';
|
|
17
|
-
}
|
|
18
|
-
isLightTheme() {
|
|
19
|
-
return this.theme === 'light';
|
|
20
|
-
}
|
|
21
|
-
render() {
|
|
22
|
-
return this.error ? (h("div", { class: classNames(this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR', 'searchcraft-input-icon-container') }, this.isLightTheme() ? (h("searchcraft-search-icon-set", { height: this.height, type: 'error-light', width: this.width })) : (h("searchcraft-search-icon-set", { height: this.height, type: 'error-dark', width: this.width })))) : (h("div", { class: classNames(this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR', 'searchcraft-input-icon-container') }, this.isLightTheme() ? (h("searchcraft-search-icon-set", { height: this.height, type: 'search-light', width: this.width })) : (h("searchcraft-search-icon-set", { height: this.height, type: 'search-dark', width: this.width }))));
|
|
23
|
-
}
|
|
24
|
-
static get style() { return SearchcraftInputIconStyle0; }
|
|
25
|
-
}, [0, "searchcraft-input-icon", {
|
|
26
|
-
"error": [4],
|
|
27
|
-
"height": [2],
|
|
28
|
-
"rightToLeftOrientation": [4, "right-to-left-orientation"],
|
|
29
|
-
"width": [2],
|
|
30
|
-
"theme": [32]
|
|
31
|
-
}]);
|
|
32
|
-
function defineCustomElement() {
|
|
33
|
-
if (typeof customElements === "undefined") {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const components = ["searchcraft-input-icon", "searchcraft-search-icon-set"];
|
|
37
|
-
components.forEach(tagName => { switch (tagName) {
|
|
38
|
-
case "searchcraft-input-icon":
|
|
39
|
-
if (!customElements.get(tagName)) {
|
|
40
|
-
customElements.define(tagName, SearchcraftInputIcon);
|
|
41
|
-
}
|
|
42
|
-
break;
|
|
43
|
-
case "searchcraft-search-icon-set":
|
|
44
|
-
if (!customElements.get(tagName)) {
|
|
45
|
-
defineCustomElement$1();
|
|
46
|
-
}
|
|
47
|
-
break;
|
|
48
|
-
} });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export { SearchcraftInputIcon as S, defineCustomElement as d };
|
|
52
|
-
|
|
53
|
-
//# sourceMappingURL=p-4f939ba2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-4f939ba2.js","mappings":";;;;AAAA,MAAM,6BAA6B,GAAG,6MAA6M,CAAC;AACpP,mCAAe,6BAA6B;;MCO/B,oBAAoB;;;;;sBAEd,EAAE;sCACc,KAAK;qBACtB,EAAE;qBAED,OAAO;;IAEhB,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;KAC/B;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,IACf,WACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,sBAAsB,GAAG,cAAc,GAAG,cAAc,EAC7D,kCAAkC,CACnC,IAEA,IAAI,CAAC,YAAY,EAAE,IAClB,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,KAEF,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,YAAY,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CACG,KAEN,WACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,sBAAsB,GAAG,cAAc,GAAG,cAAc,EAC7D,kCAAkC,CACnC,IAEA,IAAI,CAAC,YAAY,EAAE,IAClB,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,KAEF,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CACG,CACP,CAAC;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/searchcraft-input-icon/searchcraft-input-icon.module.scss?tag=searchcraft-input-icon","src/components/searchcraft-input-icon/searchcraft-input-icon.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.inputIconLTR {\n left: 15px;\n position: absolute;\n top: 52%;\n transform: translateY(-50%);\n}\n\n.inputIconRTL {\n position: absolute;\n right: 15px;\n top: 52%;\n transform: translateY(-50%);\n}","import { Component, Prop, h, State } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-input-icon',\n styleUrl: 'searchcraft-input-icon.module.scss',\n shadow: false,\n})\nexport class SearchcraftInputIcon {\n @Prop() error?: boolean;\n @Prop() height = 20;\n @Prop() rightToLeftOrientation = false;\n @Prop() width = 20;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n return this.error ? (\n <div\n class={classNames(\n this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR',\n 'searchcraft-input-icon-container',\n )}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-dark'\n width={this.width}\n />\n )}\n </div>\n ) : (\n <div\n class={classNames(\n this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR',\n 'searchcraft-input-icon-container',\n )}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-dark'\n width={this.width}\n />\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, h } from './p-6b353c3e.js';
|
|
2
|
-
import { c as classNames } from './p-5cdc6210.js';
|
|
3
|
-
|
|
4
|
-
const searchcraftErrorMessageModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.errorMessageLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000}.errorMessageDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3}";
|
|
5
|
-
const SearchcraftErrorMessageStyle0 = searchcraftErrorMessageModuleCss;
|
|
6
|
-
|
|
7
|
-
const SearchcraftErrorMessage = /*@__PURE__*/ proxyCustomElement(class SearchcraftErrorMessage extends H {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.errorMessage = undefined;
|
|
12
|
-
this.theme = 'light';
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const errorMessageStyle = this.theme === 'light' ? 'errorMessageLight' : 'errorMessageDark';
|
|
16
|
-
return (h("p", { key: '877438178c5fe951ff4cd184de7130e4e46739a1', class: classNames(errorMessageStyle, 'searchcraft-error-message') }, this.errorMessage || 'Search term is required.'));
|
|
17
|
-
}
|
|
18
|
-
static get style() { return SearchcraftErrorMessageStyle0; }
|
|
19
|
-
}, [0, "searchcraft-error-message", {
|
|
20
|
-
"errorMessage": [1, "error-message"],
|
|
21
|
-
"theme": [1]
|
|
22
|
-
}]);
|
|
23
|
-
function defineCustomElement() {
|
|
24
|
-
if (typeof customElements === "undefined") {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const components = ["searchcraft-error-message"];
|
|
28
|
-
components.forEach(tagName => { switch (tagName) {
|
|
29
|
-
case "searchcraft-error-message":
|
|
30
|
-
if (!customElements.get(tagName)) {
|
|
31
|
-
customElements.define(tagName, SearchcraftErrorMessage);
|
|
32
|
-
}
|
|
33
|
-
break;
|
|
34
|
-
} });
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export { SearchcraftErrorMessage as S, defineCustomElement as d };
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=p-5015a359.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-5015a359.js","mappings":";;;AAAA,MAAM,gCAAgC,GAAG,6SAA6S,CAAC;AACvV,sCAAe,gCAAgC;;MCOlC,uBAAuB;;;;;qBAEA,OAAO;;IAEzC,MAAM;QACJ,MAAM,iBAAiB,GACrB,IAAI,CAAC,KAAK,KAAK,OAAO,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;QAEpE,QACE,0DAAG,KAAK,EAAE,UAAU,CAAC,iBAAiB,EAAE,2BAA2B,CAAC,IACjE,IAAI,CAAC,YAAY,IAAI,0BAA0B,CAC9C,EACJ;KACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/searchcraft-error-message/searchcraft-error-message.module.scss?tag=searchcraft-error-message","src/components/searchcraft-error-message/searchcraft-error-message.tsx"],"sourcesContent":["@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin error-message-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-top: 4px;\n}\n\n.errorMessageLight {\n @include error-message-base;\n color: $content-danger;\n}\n\n.errorMessageDark {\n @include error-message-base;\n color: $surface-danger-secondary-active;\n}","import { Component, Prop, h } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-error-message',\n styleUrl: 'searchcraft-error-message.module.scss',\n shadow: false,\n})\nexport class SearchcraftErrorMessage {\n @Prop() errorMessage?: string;\n @Prop() theme: 'light' | 'dark' = 'light';\n\n render() {\n const errorMessageStyle =\n this.theme === 'light' ? 'errorMessageLight' : 'errorMessageDark';\n\n return (\n <p class={classNames(errorMessageStyle, 'searchcraft-error-message')}>\n {this.errorMessage || 'Search term is required.'}\n </p>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment } from './p-6b353c3e.js';
|
|
2
|
-
import { c as classNames } from './p-5cdc6210.js';
|
|
3
|
-
import { p as parseCustomStyles } from './p-62c40862.js';
|
|
4
|
-
import { d as defineCustomElement$5 } from './p-62e6b69c.js';
|
|
5
|
-
import { d as defineCustomElement$4 } from './p-8524c749.js';
|
|
6
|
-
import { d as defineCustomElement$3 } from './p-69ee3b9a.js';
|
|
7
|
-
import { d as defineCustomElement$2 } from './p-4f939ba2.js';
|
|
8
|
-
import { d as defineCustomElement$1 } from './p-5a872bdf.js';
|
|
9
|
-
|
|
10
|
-
const searchcraftInputModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.inputContainerLTR{position:relative;width:100%}.inputContainerRTL{position:relative;width:100%;margin-left:8px}.inputLightLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#F3F3F3;color:#292929;margin-right:8px;padding-left:36px;padding-right:16px}.inputLightLTR::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputLightLTR::placeholder{color:#737373}.inputLightLTR:focus{outline:2px solid #000000}.inputDarkLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#1A1A1A;color:#FFFFFF;margin-right:8px;padding-left:36px;padding-right:16px}.inputDarkLTR::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputDarkLTR::placeholder{color:#BFBFBF}.inputDarkLTR:focus{outline:2px solid #FFFFFF}.inputErrorLightLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#F3F3F3;color:#292929;outline:2px solid #CC0000;margin-right:8px;padding-left:36px;padding-right:16px}.inputErrorLightLTR::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputErrorLightLTR::placeholder{color:#737373}.inputErrorLightLTR:focus{outline:2px solid #000000}.inputErrorLightLTR:focus-visible{outline:2px solid #CC0000}.inputErrorDarkLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#1A1A1A;color:#FFFFFF;outline:2px solid #FFB3B3;margin-right:8px;padding-left:36px;padding-right:16px}.inputErrorDarkLTR::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputErrorDarkLTR::placeholder{color:#BFBFBF}.inputErrorDarkLTR:focus{outline:2px solid #FFFFFF}.inputErrorDarkLTR:focus-visible{outline:2px solid #FFB3B3}.inputLightRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#F3F3F3;color:#292929;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputLightRTL::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputLightRTL::placeholder{color:#737373}.inputLightRTL:focus{outline:2px solid #000000}.inputDarkRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#1A1A1A;color:#FFFFFF;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputDarkRTL::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputDarkRTL::placeholder{color:#BFBFBF}.inputDarkRTL:focus{outline:2px solid #FFFFFF}.inputErrorLightRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#F3F3F3;color:#292929;outline:2px solid #CC0000;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputErrorLightRTL::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputErrorLightRTL::placeholder{color:#737373}.inputErrorLightRTL:focus{outline:2px solid #000000}.inputErrorLightRTL:focus-visible{outline:2px solid #CC0000}.inputErrorDarkRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;background-color:#1A1A1A;color:#FFFFFF;outline:2px solid #FFB3B3;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputErrorDarkRTL::placeholder{font-family:var(--font-stack);font-size:16px;font-weight:400}.inputErrorDarkRTL::placeholder{color:#BFBFBF}.inputErrorDarkRTL:focus{outline:2px solid #FFFFFF}.inputErrorDarkRTL:focus-visible{outline:2px solid #FFB3B3}.inputWrapper{align-items:center;display:flex;position:relative;width:100%}";
|
|
11
|
-
const SearchcraftInputStyle0 = searchcraftInputModuleCss;
|
|
12
|
-
|
|
13
|
-
const SearchcraftInput = /*@__PURE__*/ proxyCustomElement(class SearchcraftInput extends H {
|
|
14
|
-
constructor() {
|
|
15
|
-
super();
|
|
16
|
-
this.__registerHost();
|
|
17
|
-
this.clearInput = createEvent(this, "clearInput", 7);
|
|
18
|
-
this.searchInputChange = createEvent(this, "searchInputChange", 7);
|
|
19
|
-
this.inputKeyUp = createEvent(this, "inputKeyUp", 7);
|
|
20
|
-
this.handleInputChange = (event) => {
|
|
21
|
-
const input = event.target;
|
|
22
|
-
this.searchInputChange.emit(input.value);
|
|
23
|
-
};
|
|
24
|
-
this.handleInputKeyUp = (event) => {
|
|
25
|
-
const input = event.target;
|
|
26
|
-
this.inputKeyUp.emit(input.value);
|
|
27
|
-
};
|
|
28
|
-
this.handleClearInput = () => {
|
|
29
|
-
if (this.query === '') {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
this.query = '';
|
|
33
|
-
if (this.clearInput) {
|
|
34
|
-
this.clearInput.emit();
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
this.customStyles = {};
|
|
38
|
-
this.error = false;
|
|
39
|
-
this.formClassName = '';
|
|
40
|
-
this.inputCaptionClassName = '';
|
|
41
|
-
this.inputCaptionValue = '';
|
|
42
|
-
this.inputClassName = '';
|
|
43
|
-
this.inputIconHeight = 20;
|
|
44
|
-
this.inputIconWidth = 20;
|
|
45
|
-
this.isRequesting = false;
|
|
46
|
-
this.placeholderValue = 'Enter Search';
|
|
47
|
-
this.rightToLeftOrientation = false;
|
|
48
|
-
this.query = '';
|
|
49
|
-
this.theme = 'light';
|
|
50
|
-
}
|
|
51
|
-
get isLightTheme() {
|
|
52
|
-
return this.theme === 'light';
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
const containerClassName = this.rightToLeftOrientation
|
|
56
|
-
? 'inputContainerRTL'
|
|
57
|
-
: 'inputContainerLTR';
|
|
58
|
-
const inputClassName = this.error
|
|
59
|
-
? this.isLightTheme
|
|
60
|
-
? 'inputErrorLightRTL'
|
|
61
|
-
: 'inputErrorDarkRTL'
|
|
62
|
-
: this.isLightTheme
|
|
63
|
-
? 'inputLightLTR'
|
|
64
|
-
: 'inputDarkLTR';
|
|
65
|
-
const validatedCustomStyles = parseCustomStyles(this.customStyles);
|
|
66
|
-
const placeholderStyle = {
|
|
67
|
-
fontSize: validatedCustomStyles.placeholderFontSize || '16px',
|
|
68
|
-
};
|
|
69
|
-
return (h("div", { key: '931c969802f73f4fa4d44ea591b506e5d1f9caf1', class: classNames(containerClassName, this.formClassName, 'searchcraft-input-form') }, this.rightToLeftOrientation ? (h(Fragment, null, h("input", { autoComplete: 'off', class: classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), onKeyUp: this.handleInputKeyUp.bind(this), placeholder: this.placeholderValue, style: validatedCustomStyles, type: 'text', value: this.query }), h("style", null, `
|
|
70
|
-
#searchcraft-input-id::placeholder {
|
|
71
|
-
font-size: ${placeholderStyle.fontSize};
|
|
72
|
-
}
|
|
73
|
-
`), this.inputCaptionValue && (h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (h("searchcraft-clear-input-button", { isRequesting: this.isRequesting, onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation })), h("searchcraft-input-icon", { error: this.error, height: this.inputIconHeight, rightToLeftOrientation: this.rightToLeftOrientation, width: this.inputIconWidth }))) : (h(Fragment, null, h("searchcraft-input-icon", { error: this.error, height: this.inputIconHeight, rightToLeftOrientation: this.rightToLeftOrientation, width: this.inputIconWidth }), h("input", { autoComplete: 'off', class: classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), onKeyUp: this.handleInputKeyUp.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), h("style", null, `
|
|
74
|
-
#searchcraft-input-id::placeholder {
|
|
75
|
-
font-size: ${placeholderStyle.fontSize};
|
|
76
|
-
}
|
|
77
|
-
`), this.inputCaptionValue && (h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (h("searchcraft-clear-input-button", { isRequesting: this.isRequesting, onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation }))))));
|
|
78
|
-
}
|
|
79
|
-
static get style() { return SearchcraftInputStyle0; }
|
|
80
|
-
}, [0, "searchcraft-input", {
|
|
81
|
-
"customStyles": [1, "custom-styles"],
|
|
82
|
-
"error": [4],
|
|
83
|
-
"formClassName": [1, "form-class-name"],
|
|
84
|
-
"inputCaptionClassName": [1, "input-caption-class-name"],
|
|
85
|
-
"inputCaptionValue": [1, "input-caption-value"],
|
|
86
|
-
"inputClassName": [1, "input-class-name"],
|
|
87
|
-
"inputIconHeight": [2, "input-icon-height"],
|
|
88
|
-
"inputIconWidth": [2, "input-icon-width"],
|
|
89
|
-
"isRequesting": [4, "is-requesting"],
|
|
90
|
-
"placeholderValue": [1, "placeholder-value"],
|
|
91
|
-
"rightToLeftOrientation": [4, "right-to-left-orientation"],
|
|
92
|
-
"query": [1],
|
|
93
|
-
"theme": [32]
|
|
94
|
-
}]);
|
|
95
|
-
function defineCustomElement() {
|
|
96
|
-
if (typeof customElements === "undefined") {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const components = ["searchcraft-input", "searchcraft-clear-icon-set", "searchcraft-clear-input-button", "searchcraft-input-caption", "searchcraft-input-icon", "searchcraft-search-icon-set"];
|
|
100
|
-
components.forEach(tagName => { switch (tagName) {
|
|
101
|
-
case "searchcraft-input":
|
|
102
|
-
if (!customElements.get(tagName)) {
|
|
103
|
-
customElements.define(tagName, SearchcraftInput);
|
|
104
|
-
}
|
|
105
|
-
break;
|
|
106
|
-
case "searchcraft-clear-icon-set":
|
|
107
|
-
if (!customElements.get(tagName)) {
|
|
108
|
-
defineCustomElement$5();
|
|
109
|
-
}
|
|
110
|
-
break;
|
|
111
|
-
case "searchcraft-clear-input-button":
|
|
112
|
-
if (!customElements.get(tagName)) {
|
|
113
|
-
defineCustomElement$4();
|
|
114
|
-
}
|
|
115
|
-
break;
|
|
116
|
-
case "searchcraft-input-caption":
|
|
117
|
-
if (!customElements.get(tagName)) {
|
|
118
|
-
defineCustomElement$3();
|
|
119
|
-
}
|
|
120
|
-
break;
|
|
121
|
-
case "searchcraft-input-icon":
|
|
122
|
-
if (!customElements.get(tagName)) {
|
|
123
|
-
defineCustomElement$2();
|
|
124
|
-
}
|
|
125
|
-
break;
|
|
126
|
-
case "searchcraft-search-icon-set":
|
|
127
|
-
if (!customElements.get(tagName)) {
|
|
128
|
-
defineCustomElement$1();
|
|
129
|
-
}
|
|
130
|
-
break;
|
|
131
|
-
} });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export { SearchcraftInput as S, defineCustomElement as d };
|
|
135
|
-
|
|
136
|
-
//# sourceMappingURL=p-54848b4d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-54848b4d.js","mappings":";;;;;;;;;AAAA,MAAM,yBAAyB,GAAG,myHAAmyH,CAAC;AACt0H,+BAAe,yBAAyB;;MCsB3B,gBAAgB;;;;;;;QAwB3B,sBAAiB,GAAG,CAAC,KAAY;YAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1C,CAAC;QAEF,qBAAgB,GAAG,CAAC,KAAoB;YACtC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,CAAC,UAAU,CAAC,IA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W,EAAE,IAAI,CAAC,gBAAgB,EAClC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,qBAAqB,GAC5B,EACF,iBACG;;+BAEgB,gBAAgB,CAAC,QAAQ;;eAEzC,CACK,EACP,IAAI,CAAC,iBAAiB,KACrB,iCACE,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,EACjD,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EACzC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,CACH,EACA,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,KACpB,sCACE,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,CACH,CACQ,CACZ,CACG,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/searchcraft-input/searchcraft-input.module.scss?tag=searchcraft-input","src/components/searchcraft-input/searchcraft-input.tsx"],"sourcesContent":["@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-container-base {\n position: relative;\n width: 100%;\n}\n\n@mixin input-base {\n border: none;\n border-radius: 8px;\n font-family: var(--font-stack);\n outline: none;\n padding-bottom: 15px;\n padding-top: 15px;\n\n &::placeholder {\n font-family: var(--font-stack);\n font-size: 16px;\n font-weight: 400;\n }\n}\n\n@mixin input-base-light {\n @include input-base;\n background-color: $surface-secondary;\n color: $content-primary;\n\n &::placeholder {\n color: $content-disabled;\n }\n\n &:focus {\n outline: 2px solid $surface-brand-primary;\n }\n}\n\n@mixin input-base-dark {\n @include input-base;\n background-color: $surface-middle-active;\n color: $content-on-brand-primary;\n\n &::placeholder {\n color: $content-disabled-secondary;\n }\n\n &:focus {\n outline: 2px solid $content-on-brand-primary;\n }\n}\n\n@mixin input-error-base-light {\n @include input-base-light;\n outline: 2px solid $border-danger;\n\n &:focus-visible {\n outline: 2px solid $border-danger;\n }\n}\n\n@mixin input-error-base-dark {\n @include input-base-dark;\n outline: 2px solid $surface-danger-secondary-active;\n\n &:focus-visible {\n outline: 2px solid $surface-danger-secondary-active;\n }\n}\n\n.inputContainerLTR {\n @include input-container-base;\n}\n\n.inputContainerRTL {\n @include input-container-base;\n margin-left: 8px;\n}\n\n@mixin align-LTR {\n margin-right: 8px;\n padding-left: 36px;\n padding-right: 16px;\n}\n\n.inputLightLTR {\n @include input-base-light;\n @include align-LTR;\n}\n\n.inputDarkLTR {\n @include input-base-dark;\n @include align-LTR;\n}\n\n.inputErrorLightLTR {\n @include input-error-base-light;\n @include align-LTR;\n}\n\n.inputErrorDarkLTR {\n @include input-error-base-dark;\n @include align-LTR;\n}\n\n@mixin align-RTL {\n margin-left: 8px;\n padding-left: 16px;\n padding-right: 36px;\n text-align: right;\n}\n\n.inputLightRTL {\n @include input-base-light;\n @include align-RTL;\n}\n\n.inputDarkRTL {\n @include input-base-dark;\n @include align-RTL;\n}\n\n.inputErrorLightRTL {\n @include input-error-base-light;\n @include align-RTL;\n}\n\n.inputErrorDarkRTL {\n @include input-error-base-dark;\n @include align-RTL;\n}\n\n.inputWrapper {\n align-items: center;\n display: flex;\n position: relative;\n width: 100%;\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Event,\n Fragment,\n type EventEmitter,\n} from '@stencil/core';\nimport classNames from 'classnames';\n\nimport { parseCustomStyles } from '@utils/utils';\n\nexport interface ScInputCustomEvent<T> extends CustomEvent<T> {\n detail: T;\n target: HTMLSearchcraftInputElement;\n}\n\n@Component({\n tag: 'searchcraft-input',\n styleUrl: 'searchcraft-input.module.scss',\n shadow: false,\n})\nexport class SearchcraftInput {\n @Prop() customStyles: string | Record<string, string> = {};\n @Prop() error = false;\n @Prop() formClassName = '';\n @Prop() inputCaptionClassName = '';\n @Prop() inputCaptionValue = '';\n @Prop() inputClassName = '';\n @Prop() inputIconHeight = 20;\n @Prop() inputIconWidth = 20;\n @Prop() isRequesting = false;\n @Prop() placeholderValue = 'Enter Search';\n @Prop() rightToLeftOrientation = false;\n @Prop() query = '';\n\n @Event() clearInput: EventEmitter<void>;\n @Event() searchInputChange: EventEmitter<string>;\n @Event() inputKeyUp: EventEmitter<string>;\n\n @State() theme = 'light';\n\n private get isLightTheme() {\n return this.theme === 'light';\n }\n\n handleInputChange = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.searchInputChange.emit(input.value);\n };\n\n handleInputKeyUp = (event: KeyboardEvent) => {\n const input = event.target as HTMLInputElement;\n this.inputKeyUp.emit(input.value);\n };\n\n handleClearInput = () => {\n if (this.query === '') {\n return;\n }\n this.query = '';\n if (this.clearInput) {\n this.clearInput.emit();\n }\n };\n\n render() {\n const containerClassName = this.rightToLeftOrientation\n ? 'inputContainerRTL'\n : 'inputContainerLTR';\n\n const inputClassName = this.error\n ? this.isLightTheme\n ? 'inputErrorLightRTL'\n : 'inputErrorDarkRTL'\n : this.isLightTheme\n ? 'inputLightLTR'\n : 'inputDarkLTR';\n\n const validatedCustomStyles = parseCustomStyles(this.customStyles);\n\n const placeholderStyle = {\n fontSize: validatedCustomStyles.placeholderFontSize || '16px',\n };\n return (\n <div\n class={classNames(\n containerClassName,\n this.formClassName,\n 'searchcraft-input-form',\n )}\n >\n {this.rightToLeftOrientation ? (\n <Fragment>\n <input\n autoComplete='off'\n class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.bind(this)}\n onKeyUp={this.handleInputKeyUp.bind(this)}\n placeholder={this.placeholderValue}\n style={validatedCustomStyles}\n type='text'\n value={this.query}\n />\n <style>\n {`\n #searchcraft-input-id::placeholder {\n font-size: ${placeholderStyle.fontSize};\n }\n `}\n </style>\n {this.inputCaptionValue && (\n <searchcraft-input-caption\n inputCaptionClassName={this.inputCaptionClassName}\n inputCaptionValue={this.inputCaptionValue}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n {this.query.length > 0 && (\n <searchcraft-clear-input-button\n isRequesting={this.isRequesting}\n onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n <searchcraft-input-icon\n error={this.error}\n height={this.inputIconHeight}\n rightToLeftOrientation={this.rightToLeftOrientation}\n width={this.inputIconWidth}\n />\n </Fragment>\n ) : (\n <Fragment>\n <searchcraft-input-icon\n error={this.error}\n height={this.inputIconHeight}\n rightToLeftOrientation={this.rightToLeftOrientation}\n width={this.inputIconWidth}\n />\n <input\n autoComplete='off'\n class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.bind(this)}\n onKeyUp={this.handleInputKeyUp.bind(this)}\n placeholder={this.placeholderValue}\n type='text'\n value={this.query}\n style={validatedCustomStyles}\n />\n <style>\n {`\n #searchcraft-input-id::placeholder {\n font-size: ${placeholderStyle.fontSize};\n }\n `}\n </style>\n {this.inputCaptionValue && (\n <searchcraft-input-caption\n inputCaptionClassName={this.inputCaptionClassName}\n inputCaptionValue={this.inputCaptionValue}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n {this.query.length > 0 && (\n <searchcraft-clear-input-button\n isRequesting={this.isRequesting}\n onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n </Fragment>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-5a872bdf.js","mappings":";;MAMa,wBAAwB;;;;;oBAMjC,aAAa;qBACC,EAAE;sBACD,EAAE;;IAEnB,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC/B,QAAQ,IAAI,CAAC,IAAI;YACf,KAAK,cAAc;gBACjB,QACE,WACE,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAC,WAAW,EACnB,IAAI,EA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set.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-search-icon-set',\n shadow: true,\n})\nexport class SearchcraftSearchIconSet {\n /**\n * Type of the icon to display.\n * Options: 'search-light', 'search-dark', 'error-light', 'error-dark'\n */\n @Prop() type: 'search-light' | 'search-dark' | 'error-light' | 'error-dark' =\n 'search-dark';\n @Prop() width = 20;\n @Prop() height = 20;\n\n render() {\n const { width, height } = this;\n switch (this.type) {\n case 'search-light':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 20 20'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>Searchcraft Search Icon Light</title>\n <path\n d='M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z'\n stroke='#404040'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'search-dark':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 18 18'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>Searchcraft Search Icon Dark</title>\n <path\n d='M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z'\n stroke='#E6E6E6'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'error-light':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 20 20'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>\n Searchcraft Error Search Icon Light\n </title>\n <path\n d='M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z'\n stroke='#737373'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'error-dark':\n return (\n <svg\n width={width}\n height={height}\n viewBox='0 0 18 18'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='searchcraft-title'\n >\n <title id='searchcraft-title'>\n Searchcraft Error Search Icon Dark\n </title>\n <path\n d='M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z'\n stroke='#BFBFBF'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n default:\n return null;\n }\n }\n}\n"],"version":3}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
function parseCustomStyles(styles) {
|
|
2
|
-
if (typeof styles === 'string') {
|
|
3
|
-
try {
|
|
4
|
-
return JSON.parse(styles);
|
|
5
|
-
}
|
|
6
|
-
catch (error) {
|
|
7
|
-
console.error('Invalid customStyles format:', styles);
|
|
8
|
-
return {};
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return styles || {};
|
|
12
|
-
}
|
|
13
|
-
function parseSearchKeys(documentAttributesForDisplay) {
|
|
14
|
-
try {
|
|
15
|
-
const parsedKeys = JSON.parse(documentAttributesForDisplay);
|
|
16
|
-
if (Array.isArray(parsedKeys) &&
|
|
17
|
-
parsedKeys.every((key) => typeof key === 'string')) {
|
|
18
|
-
return parsedKeys;
|
|
19
|
-
}
|
|
20
|
-
console.warn('searchKeys must be a JSON array of strings. Defaulting to an empty array.');
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
console.error('Failed to parse searchKeys:', error);
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function extractDynamicProperties(document, keys) {
|
|
29
|
-
const extractedProperties = {};
|
|
30
|
-
keys.forEach((key) => {
|
|
31
|
-
extractedProperties[key] = document[key] || '';
|
|
32
|
-
});
|
|
33
|
-
return extractedProperties;
|
|
34
|
-
}
|
|
35
|
-
function serializeStyles(styles) {
|
|
36
|
-
try {
|
|
37
|
-
return JSON.stringify(styles);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
console.error('Error serializing styles:', error);
|
|
41
|
-
return '{}';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function getFormattedTimeFromNow(timestamp) {
|
|
45
|
-
const now = new Date();
|
|
46
|
-
const inputTime = new Date(timestamp);
|
|
47
|
-
const diffInSeconds = Math.floor((now.getTime() - inputTime.getTime()) / 1000);
|
|
48
|
-
const minutes = Math.floor(diffInSeconds / 60);
|
|
49
|
-
const hours = Math.floor(minutes / 60);
|
|
50
|
-
const days = Math.floor(hours / 24);
|
|
51
|
-
const years = Math.floor(days / 365);
|
|
52
|
-
if (minutes < 60) {
|
|
53
|
-
return `${minutes}m ago`;
|
|
54
|
-
}
|
|
55
|
-
if (hours < 24) {
|
|
56
|
-
return `${hours}h ago`;
|
|
57
|
-
}
|
|
58
|
-
if (days < 365) {
|
|
59
|
-
return `${days}d ago`;
|
|
60
|
-
}
|
|
61
|
-
return `${years}y ago`;
|
|
62
|
-
}
|
|
63
|
-
function flattenFacets(sections) {
|
|
64
|
-
return sections.map((section) => {
|
|
65
|
-
const fullPath = section.path;
|
|
66
|
-
// Create the FacetCheckbox object
|
|
67
|
-
const facetCheckbox = {
|
|
68
|
-
label: fullPath.replace(/^\//, ''), // Format the label without leading slash
|
|
69
|
-
value: fullPath, // The full path as the value
|
|
70
|
-
count: section.count, // Count from the Section
|
|
71
|
-
children: flattenFacets(section.children || []), // Recursively flatten children
|
|
72
|
-
};
|
|
73
|
-
return facetCheckbox;
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function filterPaths(paths) {
|
|
77
|
-
return paths.filter((path) => {
|
|
78
|
-
const parts = path.split('/').filter(Boolean);
|
|
79
|
-
if (parts.length > 1) {
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
return !paths.some((otherPath) => otherPath.startsWith(`${path}/`) && otherPath !== path);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
function formatNumberWithCommas(number) {
|
|
86
|
-
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export { parseSearchKeys as a, formatNumberWithCommas as b, filterPaths as c, extractDynamicProperties as e, flattenFacets as f, getFormattedTimeFromNow as g, parseCustomStyles as p, serializeStyles as s };
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=p-62c40862.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-62c40862.js","mappings":"SAAgB,iBAAiB,CAC/B,MAAuC;IAEvC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,IAAI;YACF,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC3B;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;YACtD,OAAO,EAAE,CAAC;SACX;KACF;IACD,OAAO,MAAM,IAAI,EAAE,CAAC;AACtB,CAAC;SAEe,eAAe,CAC7B,4BAAoC;IAEpC,IAAI;QACF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAC5D,IACE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;YACzB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;KACH,CAAC,CAAC;AACL,CAAC;SAEe,sBAAsB,CAAC,MAAM;IAC3C,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;AACjE;;;;","names":[],"sources":["src/utils/utils.ts"],"sourcesContent":["export function parseCustomStyles(\n styles: string | Record<string, string>,\n): Record<string, string> {\n if (typeof styles === 'string') {\n try {\n return JSON.parse(styles);\n } catch (error) {\n console.error('Invalid customStyles format:', styles);\n return {};\n }\n }\n return styles || {};\n}\n\nexport function parseSearchKeys(\n documentAttributesForDisplay: string,\n): string[] {\n try {\n const parsedKeys = JSON.parse(documentAttributesForDisplay);\n if (\n Array.isArray(parsedKeys) &&\n parsedKeys.every((key) => typeof key === 'string')\n ) {\n return parsedKeys;\n }\n console.warn(\n 'searchKeys must be a JSON array of strings. Defaulting to an empty array.',\n );\n return [];\n } catch (error) {\n console.error('Failed to parse searchKeys:', error);\n return [];\n }\n}\n\nexport function extractDynamicProperties(\n document: Record<string, string | number>,\n keys: string[],\n) {\n const extractedProperties: Record<string, string | number> = {};\n keys.forEach((key) => {\n extractedProperties[key] = document[key] || '';\n });\n return extractedProperties;\n}\n\nexport function serializeStyles(\n styles: Record<string, Record<string, string>>,\n): string {\n try {\n return JSON.stringify(styles);\n } catch (error) {\n console.error('Error serializing styles:', error);\n return '{}';\n }\n}\n\nexport function getFormattedTimeFromNow(timestamp: string): string {\n const now = new Date();\n const inputTime = new Date(timestamp);\n const diffInSeconds = Math.floor(\n (now.getTime() - inputTime.getTime()) / 1000,\n );\n\n const minutes = Math.floor(diffInSeconds / 60);\n const hours = Math.floor(minutes / 60);\n const days = Math.floor(hours / 24);\n const years = Math.floor(days / 365);\n\n if (minutes < 60) {\n return `${minutes}m ago`;\n }\n if (hours < 24) {\n return `${hours}h ago`;\n }\n if (days < 365) {\n return `${days}d ago`;\n }\n return `${years}y ago`;\n}\n\ntype Section = {\n count: number;\n path: string;\n children: Section[];\n};\n\ntype FacetCheckbox = {\n count: number;\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n children: any[];\n label: string;\n value: string;\n};\n\nexport function flattenFacets(sections: Section[]): FacetCheckbox[] {\n return sections.map((section) => {\n const fullPath = section.path;\n\n // Create the FacetCheckbox object\n const facetCheckbox: FacetCheckbox = {\n label: fullPath.replace(/^\\//, ''), // Format the label without leading slash\n value: fullPath, // The full path as the value\n count: section.count, // Count from the Section\n children: flattenFacets(section.children || []), // Recursively flatten children\n };\n\n return facetCheckbox;\n });\n}\n\nexport function filterPaths(paths) {\n return paths.filter((path) => {\n const parts = path.split('/').filter(Boolean);\n\n if (parts.length > 1) {\n return true;\n }\n\n return !paths.some(\n (otherPath) => otherPath.startsWith(`${path}/`) && otherPath !== path,\n );\n });\n}\n\nexport function formatNumberWithCommas(number) {\n return number.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-62e6b69c.js","mappings":";;MAMa,uBAAuB;;;;;oBAMhC,aAAa;;IAEf,MAAM;QACJ,QAAQ,IAAI,CAAC,IAAI;YACf,KAAK,aAAa;gBAChB,QACE,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,yCAA2C,EACjE,YACE,CAAC,EAAC,uIAAuI,EACzI,MAAM,EAAC,OAAO,kBACD,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ,KAAK,YAAY;gBACf,QACE,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,wCAA0C,EAChE,YACE,CAAC,EAAC,uIAAuI,EACzI,MAAM,EAAC,OAAO,kBACD,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ,KAAK,aAAa;gBAChB,QACE,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,yCAA2C,EACjE,YACE,CAAC,EAAC,uCAAuC,EACzC,MAAM,EAAC,SAAS,kBACH,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ,KAAK,YAAY;gBACf,QACE,WACE,KAAK,EAAC,GAAG,EACT,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,wCAA0C,EAChE,YACE,CAAC,EAAC,qBAAqB,EACvB,MAAM,EAAC,SAAS,kBACH,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YAEJ;gBACE,OAAO,IAAI,CAAC;SACf;KACF;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/assets/searchcraft-clear-icon-set.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-clear-icon-set',\n shadow: true,\n})\nexport class SearchcraftClearIconSet {\n /**\n * Type of the icon to display.\n * Options: 'clear-light', 'clear-dark', 'arrow-light', 'arrow-dark'\n */\n @Prop() type: 'clear-light' | 'clear-dark' | 'arrow-light' | 'arrow-dark' =\n 'clear-light';\n\n render() {\n switch (this.type) {\n case 'clear-light':\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Clear Input Icon Light</title>\n <path\n d='M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z'\n stroke='black'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'clear-dark':\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Clear Input Icon Dark</title>\n <path\n d='M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z'\n stroke='white'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'arrow-light':\n return (\n <svg\n width='20'\n height='21'\n viewBox='0 0 20 21'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Arrow Right Icon Light</title>\n <path\n d='M7.5 15.0444L12.5 10.0444L7.5 5.04443'\n stroke='#737373'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'arrow-dark':\n return (\n <svg\n width='8'\n height='12'\n viewBox='0 0 8 12'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Arrow Right Icon Dark</title>\n <path\n d='M1.5 11L6.5 6L1.5 1'\n stroke='#BFBFBF'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n\n default:\n return null;\n }\n }\n}\n"],"version":3}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, h } from './p-6b353c3e.js';
|
|
2
|
-
import { c as classNames } from './p-5cdc6210.js';
|
|
3
|
-
|
|
4
|
-
const searchcraftInputCaptionModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.inputCaptionLightLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#404040}.inputCaptionDarkLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#E6E6E6}.inputCaptionErrorLightLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000}.inputCaptionErrorDarkLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3}.inputCaptionLightRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#404040;text-align:right}.inputCaptionDarkRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#E6E6E6;text-align:right}.inputCaptionErrorLightRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000;text-align:right}.inputCaptionErrorDarkRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3;text-align:right}";
|
|
5
|
-
const SearchcraftInputCaptionStyle0 = searchcraftInputCaptionModuleCss;
|
|
6
|
-
|
|
7
|
-
const SearchcraftInputCaption = /*@__PURE__*/ proxyCustomElement(class SearchcraftInputCaption extends H {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.__registerHost();
|
|
11
|
-
this.error = undefined;
|
|
12
|
-
this.inputCaptionClassName = '';
|
|
13
|
-
this.inputCaptionValue = 'Enter Search';
|
|
14
|
-
this.rightToLeftOrientation = false;
|
|
15
|
-
this.theme = 'light';
|
|
16
|
-
}
|
|
17
|
-
isLightTheme() {
|
|
18
|
-
return this.theme === 'light';
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
return this.rightToLeftOrientation ? (h("p", { class: classNames(this.error
|
|
22
|
-
? this.isLightTheme
|
|
23
|
-
? 'inputCaptionErrorLightRTL'
|
|
24
|
-
: 'inputCaptionErrorDarkRTL'
|
|
25
|
-
: this.isLightTheme
|
|
26
|
-
? 'inputCaptionLightRTL'
|
|
27
|
-
: 'inputCaptionDarkRTL', this.inputCaptionClassName, 'searchcraft-input-caption') }, this.inputCaptionValue)) : (h("p", { class: classNames(this.error
|
|
28
|
-
? this.isLightTheme
|
|
29
|
-
? 'inputCaptionErrorLightLTR'
|
|
30
|
-
: 'inputCaptionErrorDarkLTR'
|
|
31
|
-
: this.isLightTheme
|
|
32
|
-
? 'inputCaptionLightLTR'
|
|
33
|
-
: 'inputCaptionDarkLTR', this.inputCaptionClassName, 'searchcraft-input-caption') }, this.inputCaptionValue));
|
|
34
|
-
}
|
|
35
|
-
static get style() { return SearchcraftInputCaptionStyle0; }
|
|
36
|
-
}, [0, "searchcraft-input-caption", {
|
|
37
|
-
"error": [4],
|
|
38
|
-
"inputCaptionClassName": [1, "input-caption-class-name"],
|
|
39
|
-
"inputCaptionValue": [1, "input-caption-value"],
|
|
40
|
-
"rightToLeftOrientation": [4, "right-to-left-orientation"],
|
|
41
|
-
"theme": [32]
|
|
42
|
-
}]);
|
|
43
|
-
function defineCustomElement() {
|
|
44
|
-
if (typeof customElements === "undefined") {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
const components = ["searchcraft-input-caption"];
|
|
48
|
-
components.forEach(tagName => { switch (tagName) {
|
|
49
|
-
case "searchcraft-input-caption":
|
|
50
|
-
if (!customElements.get(tagName)) {
|
|
51
|
-
customElements.define(tagName, SearchcraftInputCaption);
|
|
52
|
-
}
|
|
53
|
-
break;
|
|
54
|
-
} });
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { SearchcraftInputCaption as S, defineCustomElement as d };
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=p-69ee3b9a.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-69ee3b9a.js","mappings":";;;AAAA,MAAM,gCAAgC,GAAG,8oCAA8oC,CAAC;AACxrC,sCAAe,gCAAgC;;MCOlC,uBAAuB;;;;;qCAED,EAAE;iCACP,cAAc;sCACT,KAAK;qBAErB,OAAO;;IAEhB,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;KAC/B;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,sBAAsB,IAChC,SACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,KAAK;kBACN,IAAI,CAAC,YAAY;sBACf,2BAA2B;sBAC3B,0BAA0B;kBAC5B,IAAI,CAAC,YAAY;sBACf,sBAAsB;sBACtB,qBAAqB,EAC3B,IAAI,CAAC,qBAAqB,EAC1B,2BAA2B,CAC5B,IAEA,IAAI,CAAC,iBAAiB,CACrB,KAEJ,SACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,KAAK;kBACN,IAAI,CAAC,YAAY;sBACf,2BAA2B;sBAC3B,0BAA0B;kBAC5B,IAAI,CAAC,YAAY;sBACf,sBAAsB;sBACtB,qBAAqB,EAC3B,IAAI,CAAC,qBAAqB,EAC1B,2BAA2B,CAC5B,IAEA,IAAI,CAAC,iBAAiB,CACrB,CACL,CAAC;KACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/searchcraft-input-caption/searchcraft-input-caption.module.scss?tag=searchcraft-input-caption","src/components/searchcraft-input-caption/searchcraft-input-caption.tsx"],"sourcesContent":["@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-caption-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-top: 4px;\n}\n\n@mixin input-caption-base-light {\n @include input-caption-base;\n color: $content-secondary;\n}\n\n@mixin input-caption-base-dark {\n @include input-caption-base;\n color: $border-primary;\n}\n\n.inputCaptionLightLTR {\n @include input-caption-base-light;\n}\n\n.inputCaptionDarkLTR {\n @include input-caption-base-dark;\n}\n\n.inputCaptionErrorLightLTR {\n @include input-caption-base;\n color: $content-danger;\n}\n\n.inputCaptionErrorDarkLTR {\n @include input-caption-base;\n color: $surface-danger-secondary-active;\n}\n\n.inputCaptionLightRTL {\n @include input-caption-base-light;\n text-align: right;\n}\n\n.inputCaptionDarkRTL {\n @include input-caption-base-dark;\n text-align: right;\n}\n\n.inputCaptionErrorLightRTL {\n @include input-caption-base;\n color: $content-danger;\n text-align: right;\n}\n\n.inputCaptionErrorDarkRTL {\n @include input-caption-base;\n color: $surface-danger-secondary-active;\n text-align: right;\n}","import { Component, Prop, h, State } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-input-caption',\n styleUrl: 'searchcraft-input-caption.module.scss',\n shadow: false,\n})\nexport class SearchcraftInputCaption {\n @Prop() error?: boolean;\n @Prop() inputCaptionClassName? = '';\n @Prop() inputCaptionValue = 'Enter Search';\n @Prop() rightToLeftOrientation = false;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n return this.rightToLeftOrientation ? (\n <p\n class={classNames(\n this.error\n ? this.isLightTheme\n ? 'inputCaptionErrorLightRTL'\n : 'inputCaptionErrorDarkRTL'\n : this.isLightTheme\n ? 'inputCaptionLightRTL'\n : 'inputCaptionDarkRTL',\n this.inputCaptionClassName,\n 'searchcraft-input-caption',\n )}\n >\n {this.inputCaptionValue}\n </p>\n ) : (\n <p\n class={classNames(\n this.error\n ? this.isLightTheme\n ? 'inputCaptionErrorLightLTR'\n : 'inputCaptionErrorDarkLTR'\n : this.isLightTheme\n ? 'inputCaptionLightLTR'\n : 'inputCaptionDarkLTR',\n this.inputCaptionClassName,\n 'searchcraft-input-caption',\n )}\n >\n {this.inputCaptionValue}\n </p>\n );\n }\n}\n"],"version":3}
|