@searchcraft/javascript-sdk 0.1.3 → 0.1.4

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.
Files changed (230) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +7 -0
  2. package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
  3. package/dist/cjs/index-5b0b9d4c.js +84 -0
  4. package/dist/cjs/index-5b0b9d4c.js.map +1 -0
  5. package/dist/cjs/index-e7bd239c.js +1270 -0
  6. package/dist/cjs/index-e7bd239c.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +17 -0
  8. package/dist/cjs/index.cjs.js.map +1 -0
  9. package/dist/cjs/loader.cjs.js +17 -0
  10. package/dist/cjs/loader.cjs.js.map +1 -0
  11. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js +458 -0
  12. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js.map +1 -0
  13. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +64 -0
  14. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js.map +1 -0
  15. package/dist/cjs/searchcraft-button-icon.cjs.entry.js +18 -0
  16. package/dist/cjs/searchcraft-button-icon.cjs.entry.js.map +1 -0
  17. package/dist/cjs/searchcraft-button.cjs.entry.js +37 -0
  18. package/dist/cjs/searchcraft-button.cjs.entry.js.map +1 -0
  19. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +27 -0
  20. package/dist/cjs/searchcraft-javascript-sdk.cjs.js.map +1 -0
  21. package/dist/cjs/store-ab3978ce.js +251 -0
  22. package/dist/cjs/store-ab3978ce.js.map +1 -0
  23. package/dist/cjs/utils-39791159.js +53 -0
  24. package/dist/cjs/utils-39791159.js.map +1 -0
  25. package/dist/collection/assets/searchcraft-button-icons.js +9 -0
  26. package/dist/collection/assets/searchcraft-button-icons.js.map +1 -0
  27. package/dist/collection/assets/searchcraft-clear-icon-set.js +45 -0
  28. package/dist/collection/assets/searchcraft-clear-icon-set.js.map +1 -0
  29. package/dist/collection/assets/searchcraft-search-icon-set.js +45 -0
  30. package/dist/collection/assets/searchcraft-search-icon-set.js.map +1 -0
  31. package/dist/collection/collection-manifest.json +27 -0
  32. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +294 -0
  33. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -0
  34. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.css +19 -0
  35. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js +168 -0
  36. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js.map +1 -0
  37. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.module.css +14 -0
  38. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +309 -0
  39. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -0
  40. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +210 -0
  41. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +111 -0
  42. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -0
  43. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +20 -0
  44. package/dist/collection/components/searchcraft-button/searchcraft-button.js +137 -0
  45. package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +1 -0
  46. package/dist/collection/components/searchcraft-button/searchcraft-button.module.css +82 -0
  47. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js +96 -0
  48. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js.map +1 -0
  49. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.module.css +33 -0
  50. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +64 -0
  51. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +1 -0
  52. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.module.css +21 -0
  53. package/dist/collection/components/searchcraft-input/searchcraft-input.js +276 -0
  54. package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +1 -0
  55. package/dist/collection/components/searchcraft-input/searchcraft-input.module.css +241 -0
  56. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js +122 -0
  57. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js.map +1 -0
  58. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.module.css +79 -0
  59. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js +71 -0
  60. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js.map +1 -0
  61. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.module.css +21 -0
  62. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +77 -0
  63. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +1 -0
  64. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.module.css +21 -0
  65. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +19 -0
  66. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js.map +1 -0
  67. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.module.css +35 -0
  68. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +19 -0
  69. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js.map +1 -0
  70. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.module.css +26 -0
  71. package/dist/collection/index.js +14 -0
  72. package/dist/collection/index.js.map +1 -0
  73. package/dist/collection/provider/store.js +68 -0
  74. package/dist/collection/provider/store.js.map +1 -0
  75. package/dist/collection/utils/utils.js +45 -0
  76. package/dist/collection/utils/utils.js.map +1 -0
  77. package/dist/components/index.js +5 -0
  78. package/dist/components/index.js.map +1 -0
  79. package/dist/{searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js → components/p-04e7305e.js} +25 -7
  80. package/dist/components/p-04e7305e.js.map +1 -0
  81. package/dist/components/p-0c25e95d.js +41 -0
  82. package/dist/components/p-0c25e95d.js.map +1 -0
  83. package/dist/{searchcraft-javascript-sdk/searchcraft-clear-icon-set.entry.js → components/p-155f7a59.js} +25 -7
  84. package/dist/components/p-155f7a59.js.map +1 -0
  85. package/dist/components/p-16a533e3.js +34 -0
  86. package/dist/components/p-16a533e3.js.map +1 -0
  87. package/dist/components/p-17c94ac1.js +48 -0
  88. package/dist/components/p-17c94ac1.js.map +1 -0
  89. package/dist/{searchcraft-javascript-sdk/searchcraft-input-caption.entry.js → components/p-199065b5.js} +32 -10
  90. package/dist/components/p-199065b5.js.map +1 -0
  91. package/dist/components/p-2cc8c074.js +69 -0
  92. package/dist/components/p-2cc8c074.js.map +1 -0
  93. package/dist/components/p-36c95064.js +247 -0
  94. package/dist/components/p-36c95064.js.map +1 -0
  95. package/dist/{searchcraft-javascript-sdk/searchcraft-input.entry.js → components/p-4244171c.js} +80 -11
  96. package/dist/components/p-4244171c.js.map +1 -0
  97. package/dist/{searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js → components/p-4f201f41.js} +37 -8
  98. package/dist/components/p-4f201f41.js.map +1 -0
  99. package/dist/{searchcraft-javascript-sdk/index-d6567b9c.js → components/p-5cdc6210.js} +2 -10
  100. package/dist/components/p-5cdc6210.js.map +1 -0
  101. package/dist/components/p-9283a3c2.js +50 -0
  102. package/dist/components/p-9283a3c2.js.map +1 -0
  103. package/dist/components/p-a7ab9d65.js +50 -0
  104. package/dist/components/p-a7ab9d65.js.map +1 -0
  105. package/dist/components/p-c69651f6.js +1106 -0
  106. package/dist/components/p-c69651f6.js.map +1 -0
  107. package/dist/components/p-e8e40447.js +34 -0
  108. package/dist/components/p-e8e40447.js.map +1 -0
  109. package/dist/components/p-f83f2b59.js +62 -0
  110. package/dist/components/p-f83f2b59.js.map +1 -0
  111. package/dist/components/searchcraft-auto-search-form.js +185 -0
  112. package/dist/components/searchcraft-auto-search-form.js.map +1 -0
  113. package/dist/components/searchcraft-base-search-form.js +153 -0
  114. package/dist/components/searchcraft-base-search-form.js.map +1 -0
  115. package/dist/components/searchcraft-base-search-result.js +8 -0
  116. package/dist/components/searchcraft-base-search-result.js.map +1 -0
  117. package/dist/{searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js → components/searchcraft-base-search-results.js} +47 -11
  118. package/dist/components/searchcraft-base-search-results.js.map +1 -0
  119. package/dist/components/searchcraft-button-icon.js +33 -0
  120. package/dist/components/searchcraft-button-icon.js.map +1 -0
  121. package/dist/components/searchcraft-button.js +8 -0
  122. package/dist/components/searchcraft-button.js.map +1 -0
  123. package/dist/components/searchcraft-clear-icon-set.js +8 -0
  124. package/dist/components/searchcraft-clear-icon-set.js.map +1 -0
  125. package/dist/components/searchcraft-clear-input-button.js +8 -0
  126. package/dist/components/searchcraft-clear-input-button.js.map +1 -0
  127. package/dist/components/searchcraft-error-message.js +8 -0
  128. package/dist/components/searchcraft-error-message.js.map +1 -0
  129. package/dist/components/searchcraft-input-caption.js +8 -0
  130. package/dist/components/searchcraft-input-caption.js.map +1 -0
  131. package/dist/components/searchcraft-input-icon.js +8 -0
  132. package/dist/components/searchcraft-input-icon.js.map +1 -0
  133. package/dist/components/searchcraft-input-label.js +8 -0
  134. package/dist/components/searchcraft-input-label.js.map +1 -0
  135. package/dist/components/searchcraft-input.js +8 -0
  136. package/dist/components/searchcraft-input.js.map +1 -0
  137. package/dist/components/searchcraft-search-icon-set.js +8 -0
  138. package/dist/components/searchcraft-search-icon-set.js.map +1 -0
  139. package/dist/components/searchcraft-spinner-dark.js +8 -0
  140. package/dist/components/searchcraft-spinner-dark.js.map +1 -0
  141. package/dist/components/searchcraft-spinner-light.js +8 -0
  142. package/dist/components/searchcraft-spinner-light.js.map +1 -0
  143. package/dist/esm/index-0d9f850d.js +1242 -0
  144. package/dist/esm/index-0d9f850d.js.map +1 -0
  145. package/dist/esm/index-72ac5051.js +82 -0
  146. package/dist/esm/index-72ac5051.js.map +1 -0
  147. package/dist/esm/index.js +4 -0
  148. package/dist/esm/index.js.map +1 -0
  149. package/dist/esm/loader.js +13 -0
  150. package/dist/esm/loader.js.map +1 -0
  151. package/dist/esm/searchcraft-auto-search-form_13.entry.js +442 -0
  152. package/dist/esm/searchcraft-auto-search-form_13.entry.js.map +1 -0
  153. package/dist/{searchcraft-javascript-sdk → esm}/searchcraft-base-search-form.entry.js +4 -4
  154. package/dist/esm/searchcraft-base-search-form.entry.js.map +1 -0
  155. package/dist/{searchcraft-javascript-sdk → esm}/searchcraft-button-icon.entry.js +1 -1
  156. package/dist/esm/searchcraft-button-icon.entry.js.map +1 -0
  157. package/dist/{searchcraft-javascript-sdk → esm}/searchcraft-button.entry.js +4 -4
  158. package/dist/esm/searchcraft-button.entry.js.map +1 -0
  159. package/dist/esm/searchcraft-javascript-sdk.js +22 -0
  160. package/dist/esm/searchcraft-javascript-sdk.js.map +1 -0
  161. package/dist/esm/store-e55b12aa.js +247 -0
  162. package/dist/esm/store-e55b12aa.js.map +1 -0
  163. package/dist/index.cjs.js +1 -0
  164. package/dist/index.js +1 -0
  165. package/dist/loader/cdn.js +1 -0
  166. package/dist/loader/index.cjs.js +1 -0
  167. package/dist/loader/index.d.ts +24 -0
  168. package/dist/loader/index.es2017.js +1 -0
  169. package/dist/loader/index.js +2 -0
  170. package/dist/loader/package.json +11 -0
  171. package/dist/searchcraft-javascript-sdk/index.esm.js +1 -14
  172. package/dist/searchcraft-javascript-sdk/index.esm.js.map +1 -1
  173. package/dist/searchcraft-javascript-sdk/p-04e2f067.entry.js +2 -0
  174. package/dist/searchcraft-javascript-sdk/p-04e2f067.entry.js.map +1 -0
  175. package/dist/searchcraft-javascript-sdk/p-09af71e8.entry.js +2 -0
  176. package/dist/searchcraft-javascript-sdk/p-09af71e8.entry.js.map +1 -0
  177. package/dist/searchcraft-javascript-sdk/p-17c94ac1.js +2 -0
  178. package/dist/searchcraft-javascript-sdk/p-17c94ac1.js.map +1 -0
  179. package/dist/searchcraft-javascript-sdk/p-329c3f66.js +3 -0
  180. package/dist/searchcraft-javascript-sdk/p-329c3f66.js.map +1 -0
  181. package/dist/searchcraft-javascript-sdk/p-36c95064.js +11 -0
  182. package/dist/searchcraft-javascript-sdk/p-36c95064.js.map +1 -0
  183. package/dist/searchcraft-javascript-sdk/p-40791ead.entry.js +2 -0
  184. package/dist/searchcraft-javascript-sdk/p-40791ead.entry.js.map +1 -0
  185. package/dist/searchcraft-javascript-sdk/p-4d18a44a.entry.js +2 -0
  186. package/dist/searchcraft-javascript-sdk/p-4d18a44a.entry.js.map +1 -0
  187. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js +7 -0
  188. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js.map +1 -0
  189. package/dist/searchcraft-javascript-sdk/p-e1255160.js +2 -0
  190. package/dist/searchcraft-javascript-sdk/p-e1255160.js.map +1 -0
  191. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -48
  192. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  193. package/dist/types/index.d.ts +1 -1
  194. package/package.json +1 -1
  195. package/dist/searchcraft-javascript-sdk/_commonjsHelpers-63cbe26c.js +0 -34
  196. package/dist/searchcraft-javascript-sdk/_commonjsHelpers-63cbe26c.js.map +0 -1
  197. package/dist/searchcraft-javascript-sdk/index-be6bffea.js +0 -3043
  198. package/dist/searchcraft-javascript-sdk/index-be6bffea.js.map +0 -1
  199. package/dist/searchcraft-javascript-sdk/index-d6567b9c.js.map +0 -1
  200. package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js +0 -93
  201. package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js.map +0 -1
  202. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-form.entry.js.map +0 -1
  203. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js.map +0 -1
  204. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js.map +0 -1
  205. package/dist/searchcraft-javascript-sdk/searchcraft-button-icon.entry.js.map +0 -1
  206. package/dist/searchcraft-javascript-sdk/searchcraft-button.entry.js.map +0 -1
  207. package/dist/searchcraft-javascript-sdk/searchcraft-clear-icon-set.entry.js.map +0 -1
  208. package/dist/searchcraft-javascript-sdk/searchcraft-clear-input-button.entry.js +0 -31
  209. package/dist/searchcraft-javascript-sdk/searchcraft-clear-input-button.entry.js.map +0 -1
  210. package/dist/searchcraft-javascript-sdk/searchcraft-error-message.entry.js +0 -22
  211. package/dist/searchcraft-javascript-sdk/searchcraft-error-message.entry.js.map +0 -1
  212. package/dist/searchcraft-javascript-sdk/searchcraft-input-caption.entry.js.map +0 -1
  213. package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js +0 -23
  214. package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js.map +0 -1
  215. package/dist/searchcraft-javascript-sdk/searchcraft-input-label.entry.js +0 -30
  216. package/dist/searchcraft-javascript-sdk/searchcraft-input-label.entry.js.map +0 -1
  217. package/dist/searchcraft-javascript-sdk/searchcraft-input.entry.js.map +0 -1
  218. package/dist/searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js.map +0 -1
  219. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-dark.entry.js +0 -17
  220. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-dark.entry.js.map +0 -1
  221. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-light.entry.js +0 -17
  222. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-light.entry.js.map +0 -1
  223. package/dist/searchcraft-javascript-sdk/shadow-css-423dab2c.js +0 -334
  224. package/dist/searchcraft-javascript-sdk/shadow-css-423dab2c.js.map +0 -1
  225. package/dist/searchcraft-javascript-sdk/store-b50263a1.js +0 -3008
  226. package/dist/searchcraft-javascript-sdk/store-b50263a1.js.map +0 -1
  227. /package/dist/{searchcraft-javascript-sdk → esm}/app-globals-0f993ce5.js +0 -0
  228. /package/dist/{searchcraft-javascript-sdk → esm}/app-globals-0f993ce5.js.map +0 -0
  229. /package/dist/{searchcraft-javascript-sdk → esm}/utils-7bff0c78.js +0 -0
  230. /package/dist/{searchcraft-javascript-sdk → esm}/utils-7bff0c78.js.map +0 -0
@@ -0,0 +1,458 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-e7bd239c.js');
6
+ const store = require('./store-ab3978ce.js');
7
+ const utils = require('./utils-39791159.js');
8
+ const index$1 = require('./index-5b0b9d4c.js');
9
+
10
+ const searchcraftAutoSearchFormModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.formLTR{text-align:left;width:100%}.formRTL{text-align:right;width:100%}.searchContainer{align-items:center;display:flex;width:100%}";
11
+ const SearchcraftAutoSearchFormStyle0 = searchcraftAutoSearchFormModuleCss;
12
+
13
+ const SearchcraftAutoSearchForm = class {
14
+ constructor(hostRef) {
15
+ index.registerInstance(this, hostRef);
16
+ this.querySubmit = index.createEvent(this, "querySubmit", 7);
17
+ this.debounceTimeout = null;
18
+ this.debounceDelay = 300; // 300ms debounce delay
19
+ this.searchStore = store.useSearchcraftStore.getState();
20
+ this.handleInputChange = (event) => {
21
+ this.query = event.detail;
22
+ this.querySubmit.emit(this.query);
23
+ // Clear the previous debounce timeout
24
+ if (this.debounceTimeout) {
25
+ clearTimeout(this.debounceTimeout);
26
+ }
27
+ // Set a new debounce timeout
28
+ this.debounceTimeout = setTimeout(() => {
29
+ console.log('Debounced search triggered');
30
+ this.runSearch();
31
+ }, this.debounceDelay);
32
+ };
33
+ this.handleClearInput = () => {
34
+ this.query = '';
35
+ console.log('Input cleared');
36
+ if (typeof this.clearInput === 'function') {
37
+ this.clearInput();
38
+ }
39
+ if (this.debounceTimeout) {
40
+ clearTimeout(this.debounceTimeout);
41
+ }
42
+ this.error = false;
43
+ this.searchResults = '';
44
+ };
45
+ this.runSearch = async () => {
46
+ if (this.query.trim() === '') {
47
+ this.error = true;
48
+ this.searchResults = '';
49
+ }
50
+ else {
51
+ this.error = false;
52
+ this.searchStore.setQuery(this.query);
53
+ try {
54
+ await this.searchStore.search();
55
+ this.searchResults = JSON.stringify(this.searchStore.searchResults);
56
+ }
57
+ catch (error) {
58
+ this.error = true;
59
+ }
60
+ }
61
+ };
62
+ this.handleFormSubmit = async (event) => {
63
+ event.preventDefault();
64
+ await this.runSearch();
65
+ };
66
+ this.autoSearchFormClass = '';
67
+ this.clearInput = () => { };
68
+ this.config = {
69
+ apiKey: '',
70
+ endpointURL: '',
71
+ index: [],
72
+ };
73
+ this.customStylesForInput = {};
74
+ this.inputCaptionValue = '';
75
+ this.labelForInput = '';
76
+ this.placeholderValue = 'Search here';
77
+ this.rightToLeftOrientation = false;
78
+ this.searchContainerClass = '';
79
+ this.error = false;
80
+ this.query = '';
81
+ this.searchResults = '';
82
+ }
83
+ componentDidLoad() {
84
+ const searchcraft = new store.g(this.config);
85
+ this.searchStore.initialize(searchcraft, true);
86
+ console.log('Component initialized');
87
+ }
88
+ render() {
89
+ const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';
90
+ const parsedCustomStyles = utils.parseCustomStyles(this.customStylesForInput);
91
+ return (index.h("form", { key: '60978e813198af27c34232ebd1bda4ca4a6f5199', class: `${formClass}`, onSubmit: this.handleFormSubmit }, index.h("searchcraft-input-label", { key: '4418b675769d041c684f15afb2d9b919f765c133', label: this.labelForInput }), index.h("div", { key: '73581bf8fee7deee1bcf426f80493c78e92d8ada', class: 'searchContainer' }, index.h("searchcraft-input", { key: '6e90612f4fc8c773c9f98f5fcfffb303909d3c6f', customStyles: parsedCustomStyles, "input-caption-value": this.inputCaptionValue, onClearInput: this.handleClearInput, onSearchInputChange: this.handleInputChange, "placeholder-value": this.placeholderValue, query: this.query, "right-to-left-orientation": this.rightToLeftOrientation })), this.error && (index.h("searchcraft-error-message", { key: '1637aff0dcac83d975d9d53545e7fee26c41aa7f', errorMessage: 'Please enter a search query.' }))));
92
+ }
93
+ };
94
+ SearchcraftAutoSearchForm.style = SearchcraftAutoSearchFormStyle0;
95
+
96
+ const searchcraftBaseSearchResultModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.interactiveResultContainerLight{background-color:#FAFAFA;align-items:flex-start;border-radius:16px;display:flex;position:relative;flex-direction:column;gap:16px;padding:8px}@media (min-width: 600px){.interactiveResultContainerLight{flex-direction:row}}.interactiveResultContainerDark{background-color:#2E2E2E;align-items:flex-start;border-radius:16px;display:flex;position:relative;flex-direction:column;gap:16px;padding:8px}@media (min-width: 600px){.interactiveResultContainerDark{flex-direction:row}}.resultContainer{align-items:flex-start;display:flex;flex-direction:column;gap:16px}@media (min-width: 600px){.resultContainer{flex-direction:row}}.interactiveIconLarge{display:inline-block;position:absolute;right:5px;top:8px}@media (max-width: 600px){.interactiveIconLarge{display:none}}.interactiveIconSmall{position:absolute;right:5px;top:-2px;display:inline-block}@media (min-width: 600px){.interactiveIconSmall{display:none}}.imageContainer{max-height:540px;max-width:100%}@media (min-width: 600px){.imageContainer{max-height:100%;max-width:50%}}.contentContainer{max-height:100%;max-width:100%}@media (min-width: 600px){.contentContainer{max-width:50%}}.imageLight{aspect-ratio:2/1;border-radius:8px;max-height:100%;max-width:100%;border:1px solid #D9D9D9}.imageDark{aspect-ratio:2/1;border-radius:8px;max-height:100%;max-width:100%;border:1px solid #333}.headingLight{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0px;position:relative;color:#292929}.headingDark{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0px;position:relative;color:#FFF}.subheadingLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;color:#737373}.subheadingDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;color:#BFBFBF}.primaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.primaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}.secondaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.secondaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}.tertiaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.tertiaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}";
97
+ const SearchcraftBaseSearchResultStyle0 = searchcraftBaseSearchResultModuleCss;
98
+
99
+ const SearchcraftBaseSearchResult = class {
100
+ constructor(hostRef) {
101
+ index.registerInstance(this, hostRef);
102
+ this.buttonCallback = index.createEvent(this, "buttonCallback", 7);
103
+ this.keyDownCallback = index.createEvent(this, "keyDownCallback", 7);
104
+ this.resultCallback = index.createEvent(this, "resultCallback", 7);
105
+ this.buttonCallback = () => { }; // Callback for button click
106
+ this.keyDownCallback = () => { }; // Callback for key down event
107
+ this.resultCallback = () => { }; // Callback for result container click
108
+ this.handleButtonClick = () => {
109
+ this.buttonCallback();
110
+ };
111
+ this.handleContainerClick = () => {
112
+ if (this.isInteractive) {
113
+ this.resultCallback();
114
+ }
115
+ };
116
+ this.buttonText = '';
117
+ this.imageDescription = '';
118
+ this.imageSource = '';
119
+ this.isInteractive = false;
120
+ this.primaryContent = '';
121
+ this.secondaryContent = '';
122
+ this.tertiaryContent = '';
123
+ this.headingText = '';
124
+ this.subheadingText = '';
125
+ this.themeMode = 'light';
126
+ this.customStyles = '{}';
127
+ }
128
+ // biome-ignore lint/suspicious/noExplicitAny: <explanation>
129
+ parseStyles() {
130
+ try {
131
+ return JSON.parse(this.customStyles);
132
+ }
133
+ catch (error) {
134
+ console.error('Error parsing custom styles:', error);
135
+ return {};
136
+ }
137
+ }
138
+ render() {
139
+ const isLightTheme = this.themeMode === 'light';
140
+ const styles = this.parseStyles();
141
+ return (index.h("div", { key: '096a8c89cb39b5dca0949b11981747b55c6f374f', class: this.isInteractive
142
+ ? isLightTheme
143
+ ? 'interactiveResultContainerLight'
144
+ : 'interactiveResultContainerDark'
145
+ : 'resultContainer', style: styles.container || {}, tabindex: '0', onClick: this.handleContainerClick, onKeyDown: this.keyDownCallback }, index.h("div", { key: '91eb80e1c2e68c148e12bd6046bcfbe190c2560f', class: 'imageContainer' }, index.h("img", { key: 'e83722c85e2b32d359c702f968cdb9e84aab5f04', alt: this.imageDescription, src: this.imageSource, style: styles.image || {}, class: isLightTheme ? 'imageLight' : 'imageDark' })), index.h("div", { key: '7450df6c0f77ccccd74d23d05e0b8bc4b3211189', class: 'contentContainer' }, index.h("h2", { key: '480ae0e87ecdcb2bc93551a2bc8288ad38472128', style: styles.heading || {}, class: isLightTheme ? 'headingLight' : 'headingDark' }, this.headingText), index.h("h3", { key: '67a6e12968a53bcb3e6cb96a020cdbf69d5b66b4', style: styles.subheading || {}, class: isLightTheme ? 'subheadingLight' : 'subheadingDark' }, this.subheadingText), index.h("p", { key: '9ebc20428528e0abafa5c31f13e32aeb23f95648', style: styles.primaryContent || {}, class: isLightTheme ? 'primaryContentLight' : 'primaryContentDark' }, this.primaryContent), index.h("p", { key: '6e2d3491d45056f1a9805477d003938c22d5119b', style: styles.secondaryContent || {}, class: isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark' }, this.secondaryContent), index.h("p", { key: 'f1eed685d08cfc64a01f350940bbdfc2722ab4a2', style: styles.tertiaryContent || {}, class: isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark' }, this.tertiaryContent), this.buttonText && (index.h("button", { key: 'c53407c532f7c70e898cf025e1279f2081a7fb74', onClick: this.handleButtonClick, style: styles.button || {}, type: 'button' }, this.buttonText)))));
146
+ }
147
+ };
148
+ SearchcraftBaseSearchResult.style = SearchcraftBaseSearchResultStyle0;
149
+
150
+ const searchcraftBaseSearchResultsModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.resultsContainer{display:flex;flex-direction:column;justify-content:center;margin:100px 20px}.resultsContainer>p{align-self:center}.resultsContainer>div{margin-bottom:20px}.resultsContainer>div img{height:300px;width:200px}";
151
+ const SearchcraftBaseSearchResultsStyle0 = searchcraftBaseSearchResultsModuleCss;
152
+
153
+ const SearchcraftBaseSearchResults = class {
154
+ constructor(hostRef) {
155
+ index.registerInstance(this, hostRef);
156
+ this.query = '';
157
+ this.searchResults = null;
158
+ this.searchKeys = '';
159
+ this.customStylesForResults = {};
160
+ }
161
+ componentDidLoad() {
162
+ if (!this.searchKeys || this.searchKeys.length === 0) {
163
+ console.warn('No searchKeys provided; using empty keys array.');
164
+ this.searchKeys = '';
165
+ }
166
+ this.unsubscribe = store.useSearchcraftStore.subscribe((state) => {
167
+ this.searchResults = Object.assign({}, state.searchResults);
168
+ this.query = state.query;
169
+ });
170
+ const { searchResults, query } = store.useSearchcraftStore.getState();
171
+ this.searchResults = searchResults;
172
+ this.query = query;
173
+ }
174
+ disconnectedCallback() {
175
+ if (this.unsubscribe) {
176
+ this.unsubscribe();
177
+ }
178
+ }
179
+ render() {
180
+ var _a, _b, _c, _d, _e, _f, _g;
181
+ if (!((_a = this.searchResults) === null || _a === void 0 ? void 0 : _a.data)) {
182
+ console.warn('No search results data available');
183
+ return index.h("div", null, "No results to display.");
184
+ }
185
+ const parsedSearchKeys = utils.parseSearchKeys(this.searchKeys);
186
+ const serializedStyles = typeof this.customStylesForResults === 'string'
187
+ ? this.customStylesForResults
188
+ : utils.serializeStyles(this.customStylesForResults);
189
+ return (index.h("div", { class: 'resultsContainer' }, (_d = (_c = (_b = this.searchResults) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.hits) === null || _d === void 0 ? void 0 :
190
+ _d.map((document, index$1) => {
191
+ const { doc: result } = document;
192
+ const dynamicProperties = utils.extractDynamicProperties(result, parsedSearchKeys);
193
+ return (index.h("searchcraft-base-search-result", { key: `${dynamicProperties.id}-${index$1}`, "button-callback": () => console.log('button callback'), "result-callback": () => console.log('interactive element'), "keydown-callback": () => console.log('keydown'), "is-interactive": true, "heading-text": dynamicProperties[parsedSearchKeys[0]], "subheading-text": dynamicProperties[parsedSearchKeys[1]], "primary-content": dynamicProperties[parsedSearchKeys[2]], "secondary-content": dynamicProperties[parsedSearchKeys[3]], "tertiary-content": dynamicProperties[parsedSearchKeys[4]], "image-source": dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]], "custom-styles": serializedStyles }));
194
+ }), this.query.length > 0 &&
195
+ ((_g = (_f = (_e = this.searchResults) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.hits) === null || _g === void 0 ? void 0 : _g.length) === 0 && (index.h("searchcraft-error-message", { "error-message": `No search results found for "${this.query}" query` }))));
196
+ }
197
+ };
198
+ SearchcraftBaseSearchResults.style = SearchcraftBaseSearchResultsStyle0;
199
+
200
+ const SearchcraftClearIconSet = class {
201
+ constructor(hostRef) {
202
+ index.registerInstance(this, hostRef);
203
+ this.type = 'clear-light';
204
+ }
205
+ render() {
206
+ switch (this.type) {
207
+ case 'clear-light':
208
+ return (index.h("svg", { width: '22', height: '22', viewBox: '0 0 22 22', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Clear Input Icon Light"), index.h("path", { 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', stroke: 'black', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
209
+ case 'clear-dark':
210
+ return (index.h("svg", { width: '22', height: '22', viewBox: '0 0 22 22', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Clear Input Icon Dark"), index.h("path", { 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', stroke: 'white', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
211
+ case 'arrow-light':
212
+ return (index.h("svg", { width: '20', height: '21', viewBox: '0 0 20 21', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Arrow Right Icon Light"), index.h("path", { d: 'M7.5 15.0444L12.5 10.0444L7.5 5.04443', stroke: '#737373', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
213
+ case 'arrow-dark':
214
+ return (index.h("svg", { width: '8', height: '12', viewBox: '0 0 8 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Arrow Right Icon Dark"), index.h("path", { d: 'M1.5 11L6.5 6L1.5 1', stroke: '#BFBFBF', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
215
+ default:
216
+ return null;
217
+ }
218
+ }
219
+ };
220
+
221
+ const searchcraftClearInputButtonModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.inputClearButtonLTR{align-items:center;background:none;border:none;display:flex;height:20px;justify-content:center;padding:0;position:absolute;right:25px;top:50%;transform:translateY(-50%);width:20px}.inputClearButtonRTL{align-items:center;background:none;border:none;display:flex;height:20px;justify-content:center;left:25px;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:20px}";
222
+ const SearchcraftClearInputButtonStyle0 = searchcraftClearInputButtonModuleCss;
223
+
224
+ const SearchcraftClearInputButton = class {
225
+ constructor(hostRef) {
226
+ index.registerInstance(this, hostRef);
227
+ this.clearInput = index.createEvent(this, "clearInput", 7);
228
+ // Added a click handler to emit the event
229
+ this.handleClearClick = (event) => {
230
+ event.preventDefault(); // Prevent default if necessary
231
+ this.clearInput.emit(); // Emit the event
232
+ };
233
+ this.isRequesting = false;
234
+ this.rightToLeftOrientation = false;
235
+ this.theme = 'light';
236
+ }
237
+ isLightTheme() {
238
+ return this.theme === 'light';
239
+ }
240
+ render() {
241
+ return this.rightToLeftOrientation ? (index.h("button", { class: index$1.classNames('inputClearButtonRTL', '.sc-clear-input-button-rtl'), onClick: this.handleClearClick, type: 'button' }, this.isRequesting ? (this.isLightTheme ? (index.h("searchcraft-spinner-light", null)) : (index.h("searchcraft-spinner-dark", null))) : this.isLightTheme ? (index.h("searchcraft-clear-icon-set", { type: 'clear-light' })) : (index.h("searchcraft-clear-icon-set", { type: 'clear-dark' })))) : (index.h("button", { class: index$1.classNames('inputClearButtonLTR', '.sc-clear-input-button-ltr'), onClick: this.handleClearClick, type: 'button' }, this.isRequesting ? (this.isLightTheme ? (index.h("searchcraft-spinner-light", null)) : (index.h("searchcraft-spinner-dark", null))) : this.isLightTheme ? (index.h("searchcraft-clear-icon-set", { type: 'clear-light' })) : (index.h("searchcraft-clear-icon-set", { type: 'clear-dark' }))));
242
+ }
243
+ };
244
+ SearchcraftClearInputButton.style = SearchcraftClearInputButtonStyle0;
245
+
246
+ 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}";
247
+ const SearchcraftErrorMessageStyle0 = searchcraftErrorMessageModuleCss;
248
+
249
+ const SearchcraftErrorMessage = class {
250
+ constructor(hostRef) {
251
+ index.registerInstance(this, hostRef);
252
+ this.errorMessage = undefined;
253
+ this.theme = 'light';
254
+ }
255
+ render() {
256
+ const errorMessageStyle = this.theme === 'light' ? 'errorMessageLight' : 'errorMessageDark';
257
+ return (index.h("p", { key: '544903d700810ed5d6efdefedab646cafed2376d', class: index$1.classNames(errorMessageStyle) }, this.errorMessage || 'Search term is required.'));
258
+ }
259
+ };
260
+ SearchcraftErrorMessage.style = SearchcraftErrorMessageStyle0;
261
+
262
+ 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;width:100%;background-color:#EDEDED;color:#292929;margin-right:8px;padding-left:36px;padding-right:16px}.inputLightLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputLightLTR::placeholder{color:#737373}.inputLightLTR:focus{outline:2px solid #000}.inputDarkLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;margin-right:8px;padding-left:36px;padding-right:16px}.inputDarkLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputDarkLTR::placeholder{color:#BFBFBF}.inputDarkLTR:focus{outline:2px solid #FFF}.inputErrorLightLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#EDEDED;color:#292929;outline:2px solid #c00;margin-right:8px;padding-left:36px;padding-right:16px}.inputErrorLightLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputErrorLightLTR::placeholder{color:#737373}.inputErrorLightLTR:focus{outline:2px solid #000}.inputErrorLightLTR:focus-visible{outline:2px solid #c00}.inputErrorDarkLTR{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;outline:2px solid #FFB3B3;margin-right:8px;padding-left:36px;padding-right:16px}.inputErrorDarkLTR::placeholder{font-family:var(--font-stack);font-size:16px}.inputErrorDarkLTR::placeholder{color:#BFBFBF}.inputErrorDarkLTR:focus{outline:2px solid #FFF}.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;width:100%;background-color:#EDEDED;color:#292929;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputLightRTL::placeholder{font-family:var(--font-stack);font-size:16px}.inputLightRTL::placeholder{color:#737373}.inputLightRTL:focus{outline:2px solid #000}.inputDarkRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputDarkRTL::placeholder{font-family:var(--font-stack);font-size:16px}.inputDarkRTL::placeholder{color:#BFBFBF}.inputDarkRTL:focus{outline:2px solid #FFF}.inputErrorLightRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#EDEDED;color:#292929;outline:2px solid #c00;margin-left:8px;padding-left:16px;padding-right:36px;text-align:right}.inputErrorLightRTL::placeholder{font-family:var(--font-stack);font-size:16px}.inputErrorLightRTL::placeholder{color:#737373}.inputErrorLightRTL:focus{outline:2px solid #000}.inputErrorLightRTL:focus-visible{outline:2px solid #c00}.inputErrorDarkRTL{border:none;border-radius:8px;font-family:var(--font-stack);outline:none;padding-bottom:15px;padding-top:15px;width:100%;background-color:#1A1A1A;color:#FFF;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}.inputErrorDarkRTL::placeholder{color:#BFBFBF}.inputErrorDarkRTL:focus{outline:2px solid #FFF}.inputErrorDarkRTL:focus-visible{outline:2px solid #FFB3B3}.inputWrapper{align-items:center;display:flex;position:relative;width:100%}";
263
+ const SearchcraftInputStyle0 = searchcraftInputModuleCss;
264
+
265
+ const SearchcraftInput = class {
266
+ constructor(hostRef) {
267
+ index.registerInstance(this, hostRef);
268
+ this.clearInput = index.createEvent(this, "clearInput", 7);
269
+ this.searchInputChange = index.createEvent(this, "searchInputChange", 7);
270
+ this.customStyles = {};
271
+ this.error = false;
272
+ this.formClassName = '';
273
+ this.inputCaptionClassName = '';
274
+ this.inputCaptionValue = '';
275
+ this.inputClassName = '';
276
+ this.placeholderValue = 'Enter Search';
277
+ this.rightToLeftOrientation = false;
278
+ this.query = '';
279
+ this.theme = 'light';
280
+ }
281
+ get isLightTheme() {
282
+ return this.theme === 'light';
283
+ }
284
+ handleInputChange(event) {
285
+ const input = event.target;
286
+ this.searchInputChange.emit(input.value);
287
+ }
288
+ handleClearInput() {
289
+ if (this.clearInput) {
290
+ this.clearInput.emit();
291
+ }
292
+ }
293
+ render() {
294
+ const containerClassName = this.rightToLeftOrientation
295
+ ? 'inputContainerRTL'
296
+ : 'inputContainerLTR';
297
+ const inputClassName = index$1.classNames(this.error
298
+ ? this.isLightTheme
299
+ ? 'inputErrorLightRTL'
300
+ : 'inputErrorDarkRTL'
301
+ : this.isLightTheme
302
+ ? 'inputLightLTR'
303
+ : 'inputDarkLTR', 'searchcraft-input');
304
+ const validatedCustomStyles = utils.parseCustomStyles(this.customStyles);
305
+ const placeholderStyle = {
306
+ fontSize: validatedCustomStyles.placeholderFontSize || '16px',
307
+ };
308
+ return (index.h("div", { key: '3a3fa1335552c53967d35219819024377e726d80', class: index$1.classNames(containerClassName, this.formClassName, 'searchcraft-input-form') }, this.rightToLeftOrientation ? (index.h(index.Fragment, null, index.h("input", { class: index$1.classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), index.h("style", null, `
309
+ #searchcraft-input-id::placeholder {
310
+ font-size: ${placeholderStyle.fontSize};
311
+ }
312
+ `), this.inputCaptionValue && (index.h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (index.h("searchcraft-clear-input-button", { onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation })), index.h("searchcraft-input-icon", { error: this.error, rightToLeftOrientation: this.rightToLeftOrientation }))) : (index.h("div", { class: 'inputWrapper' }, index.h("searchcraft-input-icon", { error: this.error, rightToLeftOrientation: this.rightToLeftOrientation }), index.h("input", { class: index$1.classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), index.h("style", null, `
313
+ #searchcraft-input-id::placeholder {
314
+ font-size: ${placeholderStyle.fontSize};
315
+ }
316
+ `), this.inputCaptionValue && (index.h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (index.h("searchcraft-clear-input-button", { onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation }))))));
317
+ }
318
+ };
319
+ SearchcraftInput.style = SearchcraftInputStyle0;
320
+
321
+ 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}";
322
+ const SearchcraftInputCaptionStyle0 = searchcraftInputCaptionModuleCss;
323
+
324
+ const SearchcraftInputCaption = class {
325
+ constructor(hostRef) {
326
+ index.registerInstance(this, hostRef);
327
+ this.error = undefined;
328
+ this.inputCaptionClassName = '';
329
+ this.inputCaptionValue = 'Enter Search';
330
+ this.rightToLeftOrientation = false;
331
+ this.theme = 'light';
332
+ }
333
+ isLightTheme() {
334
+ return this.theme === 'light';
335
+ }
336
+ render() {
337
+ return this.rightToLeftOrientation ? (index.h("p", { class: index$1.classNames(this.error
338
+ ? this.isLightTheme
339
+ ? 'inputCaptionErrorLightRTL'
340
+ : 'inputCaptionErrorDarkRTL'
341
+ : this.isLightTheme
342
+ ? 'inputCaptionLightRTL'
343
+ : 'inputCaptionDarkRTL', this.inputCaptionClassName, '.searchcraft-input-caption') }, this.inputCaptionValue)) : (index.h("p", { class: index$1.classNames(this.error
344
+ ? this.isLightTheme
345
+ ? 'inputCaptionErrorLightLTR'
346
+ : 'inputCaptionErrorDarkLTR'
347
+ : this.isLightTheme
348
+ ? 'inputCaptionLightLTR'
349
+ : 'inputCaptionDarkLTR', this.inputCaptionClassName, '.searchcraft-input-caption') }, this.inputCaptionValue));
350
+ }
351
+ };
352
+ SearchcraftInputCaption.style = SearchcraftInputCaptionStyle0;
353
+
354
+ const searchcraftInputIconModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.inputIconLTR{height:20px;left:15px;position:absolute;top:50%;transform:translateY(-50%);width:20px}.inputIconRTL{height:20px;position:absolute;right:15px;top:50%;transform:translateY(-50%);width:20px}";
355
+ const SearchcraftInputIconStyle0 = searchcraftInputIconModuleCss;
356
+
357
+ const SearchcraftInputIcon = class {
358
+ constructor(hostRef) {
359
+ index.registerInstance(this, hostRef);
360
+ this.error = undefined;
361
+ this.rightToLeftOrientation = false;
362
+ this.theme = 'light';
363
+ }
364
+ isLightTheme() {
365
+ return this.theme === 'light';
366
+ }
367
+ render() {
368
+ return this.error ? (index.h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme ? (index.h("searchcraft-search-icon-set", { type: 'error-light' })) : (index.h("searchcraft-search-icon-set", { type: 'error-dark' })))) : (index.h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme ? (index.h("searchcraft-search-icon-set", { type: 'search-light' })) : (index.h("searchcraft-search-icon-set", { type: 'search-dark' }))));
369
+ }
370
+ };
371
+ SearchcraftInputIcon.style = SearchcraftInputIconStyle0;
372
+
373
+ const searchcraftInputLabelModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.labelLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#292929}.labelDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFF}";
374
+ const SearchcraftInputLabelStyle0 = searchcraftInputLabelModuleCss;
375
+
376
+ const SearchcraftInputLabel = class {
377
+ constructor(hostRef) {
378
+ index.registerInstance(this, hostRef);
379
+ this.inputLabelClassName = '';
380
+ this.label = undefined;
381
+ this.theme = 'light';
382
+ }
383
+ isLightTheme() {
384
+ return this.theme === 'light';
385
+ }
386
+ render() {
387
+ // Render nothing if no label prop is provided
388
+ if (!this.label) {
389
+ return null;
390
+ }
391
+ const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';
392
+ return (index.h("label", { class: index$1.classNames(labelStyle, this.inputLabelClassName), htmlFor: 'searchcraft-input-id' }, this.label));
393
+ }
394
+ };
395
+ SearchcraftInputLabel.style = SearchcraftInputLabelStyle0;
396
+
397
+ const SearchcraftSearchIconSet = class {
398
+ constructor(hostRef) {
399
+ index.registerInstance(this, hostRef);
400
+ this.type = 'search-dark';
401
+ }
402
+ render() {
403
+ switch (this.type) {
404
+ case 'search-light':
405
+ return (index.h("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Search Icon Light"), index.h("path", { 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', stroke: '#404040', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
406
+ case 'search-dark':
407
+ return (index.h("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Search Icon Dark"), index.h("path", { 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', stroke: '#E6E6E6', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
408
+ case 'error-light':
409
+ return (index.h("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Error Search Icon Light"), index.h("path", { 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', stroke: '#737373', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
410
+ case 'error-dark':
411
+ return (index.h("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Error Search Icon Dark"), index.h("path", { 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', stroke: '#BFBFBF', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
412
+ default:
413
+ return null;
414
+ }
415
+ }
416
+ };
417
+
418
+ const searchcraftSpinnerDarkModuleCss = ".spinnerContainer{background-color:transparent;height:20px;width:20px}.spinnerDark{height:100%;width:100%;background:conic-gradient(#000 50%, #FFFFFF);clip-path:circle(50%);mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);animation:spinning 1s linear infinite}.spinnerLight{height:100%;width:100%;background:conic-gradient(#737373 50%, #FFFFFF);clip-path:circle(50%);mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);animation:spinning 1s linear infinite}@keyframes spinning{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}";
419
+ const SearchcraftSpinnerDarkStyle0 = searchcraftSpinnerDarkModuleCss;
420
+
421
+ const SearchcraftSpinnerDark = class {
422
+ constructor(hostRef) {
423
+ index.registerInstance(this, hostRef);
424
+ }
425
+ render() {
426
+ return (index.h("div", { key: '60b629930c2e2795236f6768b40c95ce9390e882', class: 'spinnerContainer' }, index.h("div", { key: 'bfef3329f2e81ecf6538738ac0213da6259dd1c3', class: 'spinnerDark' })));
427
+ }
428
+ };
429
+ SearchcraftSpinnerDark.style = SearchcraftSpinnerDarkStyle0;
430
+
431
+ const searchcraftSpinnerLightModuleCss = ".spinnerContainer{background-color:transparent;height:20px;width:20px}.spinnerLight{height:100%;width:100%;background:conic-gradient(#737373 50%, #FFFFFF);clip-path:circle(50%);mask-image:radial-gradient(circle at center, rgba(0, 0, 0, 0) 6.6666666667px, rgb(0, 0, 0) 6.6666666667px);animation:spinning 1s linear infinite}@keyframes spinning{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}";
432
+ const SearchcraftSpinnerLightStyle0 = searchcraftSpinnerLightModuleCss;
433
+
434
+ const SearchcraftSpinnerLight = class {
435
+ constructor(hostRef) {
436
+ index.registerInstance(this, hostRef);
437
+ }
438
+ render() {
439
+ return (index.h("div", { key: 'ad5224c97faf7e329d2a8904488c17dfd7414b9e', class: 'spinnerContainer' }, index.h("div", { key: '6336ce7737af65eedac46ee290b20291ce5b6096', class: 'spinnerLight' })));
440
+ }
441
+ };
442
+ SearchcraftSpinnerLight.style = SearchcraftSpinnerLightStyle0;
443
+
444
+ exports.searchcraft_auto_search_form = SearchcraftAutoSearchForm;
445
+ exports.searchcraft_base_search_result = SearchcraftBaseSearchResult;
446
+ exports.searchcraft_base_search_results = SearchcraftBaseSearchResults;
447
+ exports.searchcraft_clear_icon_set = SearchcraftClearIconSet;
448
+ exports.searchcraft_clear_input_button = SearchcraftClearInputButton;
449
+ exports.searchcraft_error_message = SearchcraftErrorMessage;
450
+ exports.searchcraft_input = SearchcraftInput;
451
+ exports.searchcraft_input_caption = SearchcraftInputCaption;
452
+ exports.searchcraft_input_icon = SearchcraftInputIcon;
453
+ exports.searchcraft_input_label = SearchcraftInputLabel;
454
+ exports.searchcraft_search_icon_set = SearchcraftSearchIconSet;
455
+ exports.searchcraft_spinner_dark = SearchcraftSpinnerDark;
456
+ exports.searchcraft_spinner_light = SearchcraftSpinnerLight;
457
+
458
+ //# sourceMappingURL=searchcraft-auto-search-form_13.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-auto-search-form.searchcraft-base-search-result.searchcraft-base-search-results.searchcraft-clear-icon-set.searchcraft-clear-input-button.searchcraft-error-message.searchcraft-input.searchcraft-input-caption.searchcraft-input-icon.searchcraft-input-label.searchcraft-search-icon-set.searchcraft-spinner-dark.searchcraft-spinner-light.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,kCAAkC,GAAG,uLAAuL,CAAC;AACnO,wCAAe,kCAAkC;;MCqBpC,yBAAyB;;;;QAqB5B,oBAAe,GAAyC,IAAI,CAAC;QAC7D,kBAAa,GAAG,GAAG,CAAC;QACpB,gBAAW,GAAGA,yBAAmB,CAAC,QAAQ,EAAE,CAAC;QAQrD,sBAAiB,GAAG,CAAC,KAAiC;YACpD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;YAGlC,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;aACpC;;YAGD,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC;gBAChC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;gBAC1C,IAAI,CAAC,SAAS,EAAE,CAAC;aAClB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;SACxB,CAAC;QAEF,qBAAgB,GAAG;YACjB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;YAE7B,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE;gBACzC,IAAI,CAAC,UAAU,EAAE,CAAC;aACnB;YAED,IAAI,IAAI,CAAC,eAAe,EAAE;gBACxB,YAAY,CAAC,IAAI,CAAC,eAAe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AAE,EAAC,mBAAmB,0CAErB,EACRA,kBACE,CAAC,EAAC,mNAAmN,EACrN,MAAM,EAAC,SAAS,kBACH,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ,KAAK,YAAY;gBACf,QACEA,iBACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,mBAAmB,IAEnCA,mBAAO,EAAE,EAAC,mBAAmB,yCAErB,EACRA,kBACE,CAAC,EAAC,mNAAmN,EACrN,MAAM,EAAC,SAAS,kBACH,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ;gBACE,OAAO,IAAI,CAAC;SACf;KACF;;;ACvGH,MAAM,+BAA+B,GAAG,sqBAAsqB,CAAC;AAC/sB,qCAAe,+BAA+B;;MCMjC,sBAAsB;;;;IACjC,MAAM;QACJ,QACEA,kEAAK,KAAK,EAAC,kBAAkB,IAC3BA,kEAAK,KAAK,EAAC,aAAa,GAAG,CACvB,EACN;KACH;;;;ACdH,MAAM,gCAAgC,GAAG,8aAA8a,CAAC;AACxd,sCAAe,gCAAgC;;MCMlC,uBAAuB;;;;IAClC,MAAM;QACJ,QACEA,kEAAK,KAAK,EAAC,kBAAkB,IAC3BA,kEAAK,KAAK,EAAC,cAAc,GAAG,CACxB,EACN;KACH;;;;;;;;;;;;;;;;;;","names":["useSearchcraftStore","SearchcraftCore","parseCustomStyles","h","parseSearchKeys","serializeStyles","index","extractDynamicProperties","classNames","Fragment"],"sources":["src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.scss?tag=searchcraft-auto-search-form&encapsulation=shadow","src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.tsx","src/components/searchcraft-base-search-result/searchcraft-base-search-result.module.scss?tag=searchcraft-base-search-result&encapsulation=shadow","src/components/searchcraft-base-search-result/searchcraft-base-search-result.tsx","src/components/searchcraft-base-search-results/searchcraft-base-search-results.module.scss?tag=searchcraft-base-search-results&encapsulation=shadow","src/components/searchcraft-base-search-results/searchcraft-base-search-results.tsx","src/assets/searchcraft-clear-icon-set.tsx","src/components/searchcraft-clear-input-button/searchcraft-clear-input-button.module.scss?tag=searchcraft-clear-input-button&encapsulation=shadow","src/components/searchcraft-clear-input-button/searchcraft-clear-input-button.tsx","src/components/searchcraft-error-message/searchcraft-error-message.module.scss?tag=searchcraft-error-message&encapsulation=shadow","src/components/searchcraft-error-message/searchcraft-error-message.tsx","src/components/searchcraft-input/searchcraft-input.module.scss?tag=searchcraft-input&encapsulation=shadow","src/components/searchcraft-input/searchcraft-input.tsx","src/components/searchcraft-input-caption/searchcraft-input-caption.module.scss?tag=searchcraft-input-caption&encapsulation=shadow","src/components/searchcraft-input-caption/searchcraft-input-caption.tsx","src/components/searchcraft-input-icon/searchcraft-input-icon.module.scss?tag=searchcraft-input-icon&encapsulation=shadow","src/components/searchcraft-input-icon/searchcraft-input-icon.tsx","src/components/searchcraft-input-label/searchcraft-input-label.module.scss?tag=searchcraft-input-label&encapsulation=shadow","src/components/searchcraft-input-label/searchcraft-input-label.tsx","src/assets/searchcraft-search-icon-set.tsx","src/components/searchcraft-spinner-dark/searchcraft-spinner-dark.module.scss?tag=searchcraft-spinner-dark&encapsulation=shadow","src/components/searchcraft-spinner-dark/searchcraft-spinner-dark.tsx","src/components/searchcraft-spinner-light/searchcraft-spinner-light.module.scss?tag=searchcraft-spinner-light&encapsulation=shadow","src/components/searchcraft-spinner-light/searchcraft-spinner-light.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.formLTR {\n text-align: left;\n width: 100%;\n}\n\n.formRTL {\n text-align: right;\n width: 100%;\n}\n\n.searchContainer {\n align-items: center;\n display: flex;\n width: 100%;\n}","import {\n Component,\n Prop,\n State,\n Event,\n type EventEmitter,\n h,\n} from '@stencil/core';\nimport {\n type CoreConfigSDK,\n CoreSDK as SearchcraftCore,\n} from '@searchcraft/core';\n\nimport type { ScInputCustomEvent } from '@components/searchcraft-input/searchcraft-input';\nimport { parseCustomStyles } from '@utils/utils';\nimport { useSearchcraftStore } from '@provider/store';\n\n@Component({\n tag: 'searchcraft-auto-search-form',\n styleUrl: 'searchcraft-auto-search-form.module.scss',\n shadow: true,\n})\nexport class SearchcraftAutoSearchForm {\n @Prop() autoSearchFormClass = '';\n @Prop() clearInput: () => void = () => {};\n @Prop() config: CoreConfigSDK = {\n apiKey: '',\n endpointURL: '',\n index: [],\n };\n @Prop() customStylesForInput: string | Record<string, string> = {};\n @Prop() inputCaptionValue = '';\n @Prop() labelForInput = '';\n @Prop() placeholderValue = 'Search here';\n @Prop() rightToLeftOrientation = false;\n @Prop() searchContainerClass = '';\n\n @Event() querySubmit: EventEmitter<string>;\n\n @State() error = false;\n @State() query = '';\n @State() searchResults = '';\n\n private debounceTimeout: ReturnType<typeof setTimeout> | null = null;\n private debounceDelay = 300; // 300ms debounce delay\n private searchStore = useSearchcraftStore.getState();\n\n componentDidLoad() {\n const searchcraft = new SearchcraftCore(this.config);\n this.searchStore.initialize(searchcraft, true);\n console.log('Component initialized');\n }\n\n handleInputChange = (event: ScInputCustomEvent<string>) => {\n this.query = event.detail;\n this.querySubmit.emit(this.query);\n\n // Clear the previous debounce timeout\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n // Set a new debounce timeout\n this.debounceTimeout = setTimeout(() => {\n console.log('Debounced search triggered');\n this.runSearch();\n }, this.debounceDelay);\n };\n\n handleClearInput = () => {\n this.query = '';\n console.log('Input cleared');\n\n if (typeof this.clearInput === 'function') {\n this.clearInput();\n }\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n this.error = false;\n this.searchResults = '';\n };\n\n private runSearch = async () => {\n if (this.query.trim() === '') {\n this.error = true;\n this.searchResults = '';\n } else {\n this.error = false;\n this.searchStore.setQuery(this.query);\n\n try {\n await this.searchStore.search();\n this.searchResults = JSON.stringify(this.searchStore.searchResults);\n } catch (error) {\n this.error = true;\n }\n }\n };\n\n handleFormSubmit = async (event: Event) => {\n event.preventDefault();\n await this.runSearch();\n };\n\n render() {\n const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';\n const parsedCustomStyles = parseCustomStyles(this.customStylesForInput);\n return (\n <form class={`${formClass}`} onSubmit={this.handleFormSubmit}>\n <searchcraft-input-label label={this.labelForInput} />\n <div class='searchContainer'>\n <searchcraft-input\n customStyles={parsedCustomStyles}\n input-caption-value={this.inputCaptionValue}\n onClearInput={this.handleClearInput}\n onSearchInputChange={this.handleInputChange}\n placeholder-value={this.placeholderValue}\n query={this.query}\n right-to-left-orientation={this.rightToLeftOrientation}\n />\n </div>\n {this.error && (\n <searchcraft-error-message errorMessage='Please enter a search query.' />\n )}\n </form>\n );\n }\n}\n","@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin interactive-result-container-base {\n align-items: flex-start;\n border-radius: 16px;\n display: flex;\n position: relative;\n flex-direction: column;\n gap: 16px;\n padding: 8px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n }\n}\n\n.interactiveResultContainerLight {\n background-color: $light-search-result-container-background;\n @include interactive-result-container-base;\n}\n\n.interactiveResultContainerDark {\n background-color: $dark-search-result-container-background;\n @include interactive-result-container-base;\n}\n\n.resultContainer {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n @media (min-width: 600px) {\n flex-direction: row;\n }\n}\n\n.interactiveIconLarge {\n display: inline-block;\n position: absolute;\n right: 5px;\n top: 8px;\n\n\n @media (max-width: 600px) {\n display: none;\n }\n}\n\n.interactiveIconSmall {\n position: absolute;\n right: 5px;\n top: -2px;\n display: inline-block;\n\n\n @media (min-width: 600px) {\n display: none;\n }\n}\n\n.imageContainer {\n max-height: 540px;\n max-width: 100%;\n\n @media (min-width: 600px) {\n max-height: 100%;\n max-width: 50%;\n }\n}\n\n.contentContainer {\n max-height: 100%;\n max-width: 100%;\n\n @media (min-width: 600px) {\n max-width: 50%;\n }\n}\n\n@mixin image-base {\n aspect-ratio: 2 / 1;\n border-radius: 8px;\n max-height: 100%;\n max-width: 100%;\n}\n\n.imageLight {\n @include image-base;\n border: 1px solid $light-search-result-image-border;\n}\n\n.imageDark {\n @include image-base;\n border: 1px solid $dark-search-result-image-border;\n}\n\n@mixin heading-base {\n font-family: var(--font-stack);\n font-size: 16px;\n font-weight: 700;\n line-height: 20px;\n margin-bottom: 4px;\n margin-top: 0px;\n position: relative;\n}\n\n.headingLight {\n @include heading-base;\n color: $light-search-result-heading-color;\n}\n\n.headingDark {\n @include heading-base;\n color: $dark-search-result-heading-color;\n}\n\n@mixin subheading-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-bottom: 4px;\n margin-top: 0px;\n}\n\n.subheadingLight {\n @include subheading-base;\n color: $light-search-result-subheading-color;\n}\n\n.subheadingDark {\n @include subheading-base;\n color: $dark-search-result-subheading-color\n}\n\n@mixin body-content-base {\n font-family: var(--font-stack);\n font-size: 16px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 4px;\n margin-top: 0px;\n}\n\n.primaryContentLight {\n @include body-content-base;\n color: $light-search-result-body-content-color;\n}\n\n.primaryContentDark {\n @include body-content-base;\n color: $dark-search-result-body-content-color;\n}\n\n.secondaryContentLight {\n @include body-content-base;\n color: $light-search-result-body-content-color;\n}\n\n.secondaryContentDark {\n @include body-content-base;\n color: $dark-search-result-body-content-color;\n}\n\n.tertiaryContentLight {\n @include body-content-base;\n color: $light-search-result-body-content-color;\n}\n\n.tertiaryContentDark {\n @include body-content-base;\n color: $dark-search-result-body-content-color;\n}","import { Component, Event, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-base-search-result',\n styleUrl: 'searchcraft-base-search-result.module.scss',\n shadow: true,\n})\nexport class SearchcraftBaseSearchResult {\n @Prop() buttonText = ''; // Label for the button\n @Prop() imageDescription = ''; // Alternative text for the image\n @Prop() imageSource = ''; // Source URL for the image\n @Prop() isInteractive = false; // Determines if the result is interactive\n @Prop() primaryContent = ''; // Primary body content\n @Prop() secondaryContent = ''; // Secondary body content\n @Prop() tertiaryContent = ''; // Tertiary body content\n @Prop() headingText = ''; // Text for the heading\n @Prop() subheadingText = ''; // Text for the subheading\n @Prop() themeMode: 'light' | 'dark' = 'light'; // Light or dark theme context\n @Prop() customStyles = '{}'; // New string prop for serialized styles.\n\n @Event() buttonCallback: () => void = () => {}; // Callback for button click\n @Event() keyDownCallback: () => void = () => {}; // Callback for key down event\n @Event() resultCallback: () => void = () => {}; // Callback for result container click\n\n private handleButtonClick = () => {\n this.buttonCallback();\n };\n\n private handleContainerClick = () => {\n if (this.isInteractive) {\n this.resultCallback();\n }\n };\n\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n private parseStyles(): Record<string, any> {\n try {\n return JSON.parse(this.customStyles);\n } catch (error) {\n console.error('Error parsing custom styles:', error);\n return {};\n }\n }\n\n render() {\n const isLightTheme = this.themeMode === 'light';\n const styles = this.parseStyles();\n\n return (\n <div\n class={\n this.isInteractive\n ? isLightTheme\n ? 'interactiveResultContainerLight'\n : 'interactiveResultContainerDark'\n : 'resultContainer'\n }\n style={styles.container || {}}\n tabindex='0'\n onClick={this.handleContainerClick}\n onKeyDown={this.keyDownCallback}\n >\n <div class='imageContainer'>\n <img\n alt={this.imageDescription}\n src={this.imageSource}\n style={styles.image || {}}\n class={isLightTheme ? 'imageLight' : 'imageDark'}\n />\n </div>\n <div class='contentContainer'>\n <h2\n style={styles.heading || {}}\n class={isLightTheme ? 'headingLight' : 'headingDark'}\n >\n {this.headingText}\n </h2>\n <h3\n style={styles.subheading || {}}\n class={isLightTheme ? 'subheadingLight' : 'subheadingDark'}\n >\n {this.subheadingText}\n </h3>\n <p\n style={styles.primaryContent || {}}\n class={isLightTheme ? 'primaryContentLight' : 'primaryContentDark'}\n >\n {this.primaryContent}\n </p>\n <p\n style={styles.secondaryContent || {}}\n class={\n isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark'\n }\n >\n {this.secondaryContent}\n </p>\n <p\n style={styles.tertiaryContent || {}}\n class={\n isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark'\n }\n >\n {this.tertiaryContent}\n </p>\n {this.buttonText && (\n <button\n onClick={this.handleButtonClick}\n style={styles.button || {}}\n type='button'\n >\n {this.buttonText}\n </button>\n )}\n </div>\n </div>\n );\n }\n}\n",":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.resultsContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin: 100px 20px;\n\n & > p {\n align-self: center;\n }\n\n & > div {\n margin-bottom: 20px;\n img {\n height: 300px;\n width: 200px;\n }\n }\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport type { SearchcraftResponse } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\nimport {\n extractDynamicProperties,\n parseSearchKeys,\n serializeStyles,\n} from '@utils/utils';\n\n@Component({\n tag: 'searchcraft-base-search-results',\n styleUrl: 'searchcraft-base-search-results.module.scss',\n shadow: true,\n})\nexport class SearchcraftBaseSearchResults {\n @State() query = '';\n @State() searchResults: SearchcraftResponse | null = null;\n\n /**\n * Array of keys to dynamically extract properties from each document.\n * Must be explicitly set by the parent component.\n */\n @Prop() searchKeys = '';\n /**\n * Custom styles to apply to search results.\n * Expected format: JSON string, e.g., '{\"borderRadius\": \"10px\", \"padding\": \"16px\"}'\n */\n @Prop() customStylesForResults:\n | string\n | Record<string, Record<string, string>> = {};\n\n private unsubscribe: () => void;\n\n componentDidLoad() {\n if (!this.searchKeys || this.searchKeys.length === 0) {\n console.warn('No searchKeys provided; using empty keys array.');\n this.searchKeys = '';\n }\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.searchResults = { ...state.searchResults };\n this.query = state.query;\n });\n\n const { searchResults, query } = useSearchcraftStore.getState();\n this.searchResults = searchResults;\n this.query = query;\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n render() {\n if (!this.searchResults?.data) {\n console.warn('No search results data available');\n return <div>No results to display.</div>;\n }\n\n const parsedSearchKeys = parseSearchKeys(this.searchKeys);\n const serializedStyles =\n typeof this.customStylesForResults === 'string'\n ? this.customStylesForResults\n : serializeStyles(this.customStylesForResults);\n\n return (\n <div class='resultsContainer'>\n {this.searchResults?.data?.hits?.map((document, index) => {\n const { doc: result } = document;\n const dynamicProperties = extractDynamicProperties(\n result,\n parsedSearchKeys,\n );\n\n return (\n <searchcraft-base-search-result\n key={`${dynamicProperties.id}-${index}`}\n button-callback={() => console.log('button callback')}\n result-callback={() => console.log('interactive element')}\n keydown-callback={() => console.log('keydown')}\n is-interactive={true}\n heading-text={dynamicProperties[parsedSearchKeys[0]]}\n subheading-text={dynamicProperties[parsedSearchKeys[1]]}\n primary-content={dynamicProperties[parsedSearchKeys[2]]}\n secondary-content={dynamicProperties[parsedSearchKeys[3]]}\n tertiary-content={dynamicProperties[parsedSearchKeys[4]]}\n image-source={\n dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]]\n }\n custom-styles={serializedStyles}\n />\n );\n })}\n {this.query.length > 0 &&\n this.searchResults?.data?.hits?.length === 0 && (\n <searchcraft-error-message\n error-message={`No search results found for \"${this.query}\" query`}\n />\n )}\n </div>\n );\n }\n}\n","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",":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.inputClearButtonLTR {\n align-items: center;\n background: none;\n border: none;\n display: flex;\n height: 20px;\n justify-content: center;\n padding: 0;\n position: absolute;\n right: 25px;\n top: 50%;\n transform: translateY(-50%);\n width: 20px;\n}\n\n.inputClearButtonRTL {\n align-items: center;\n background: none;\n border: none;\n display: flex;\n height: 20px;\n justify-content: center;\n left: 25px;\n padding: 0;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 20px;\n}","import {\n Component,\n Event,\n type EventEmitter,\n Prop,\n h,\n State,\n} from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-clear-input-button',\n styleUrl: 'searchcraft-clear-input-button.module.scss',\n shadow: true,\n})\nexport class SearchcraftClearInputButton {\n @Prop() isRequesting? = false;\n @Prop() rightToLeftOrientation = false;\n\n // Updated `clearInput` to an EventEmitter\n @Event() clearInput: EventEmitter<void>;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n // Added a click handler to emit the event\n private handleClearClick = (event: MouseEvent) => {\n event.preventDefault(); // Prevent default if necessary\n this.clearInput.emit(); // Emit the event\n };\n\n render() {\n return this.rightToLeftOrientation ? (\n <button\n class={classNames('inputClearButtonRTL', '.sc-clear-input-button-rtl')}\n onClick={this.handleClearClick}\n type='button'\n >\n {this.isRequesting ? (\n this.isLightTheme ? (\n <searchcraft-spinner-light />\n ) : (\n <searchcraft-spinner-dark />\n )\n ) : this.isLightTheme ? (\n <searchcraft-clear-icon-set type='clear-light' />\n ) : (\n <searchcraft-clear-icon-set type='clear-dark' />\n )}\n </button>\n ) : (\n <button\n class={classNames('inputClearButtonLTR', '.sc-clear-input-button-ltr')}\n onClick={this.handleClearClick}\n type='button'\n >\n {this.isRequesting ? (\n this.isLightTheme ? (\n <searchcraft-spinner-light />\n ) : (\n <searchcraft-spinner-dark />\n )\n ) : this.isLightTheme ? (\n <searchcraft-clear-icon-set type='clear-light' />\n ) : (\n <searchcraft-clear-icon-set type='clear-dark' />\n )}\n </button>\n );\n }\n}\n","@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: $light-input-caption-color-error;\n}\n\n.errorMessageDark {\n @include error-message-base;\n color: $dark-input-caption-color-error;\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: true,\n})\nexport class SearchcraftErrorMessage {\n /**\n * The error message to display. Defaults to a standard message if not provided.\n */\n @Prop() errorMessage?: string;\n\n /**\n * The theme, which determines the style (light or dark).\n */\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)}>\n {this.errorMessage || 'Search term is required.'}\n </p>\n );\n }\n}\n","@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 width: 100%;\n\n &::placeholder {\n font-family: var(--font-stack);\n font-size: 16px;\n }\n}\n\n@mixin input-base-light {\n @include input-base;\n background-color: $light-input-background-color;\n color: $light-input-label-color;\n\n &::placeholder {\n color: $light-input-placeholder-color;\n }\n\n &:focus {\n outline: 2px solid $light-input-outline-focus;\n }\n}\n\n@mixin input-base-dark {\n @include input-base;\n background-color: $dark-input-background-color;\n color: $dark-input-label-color;\n\n &::placeholder {\n color: $dark-input-placeholder-color;\n }\n\n &:focus {\n outline: 2px solid $dark-input-outline-focus;\n }\n}\n\n@mixin input-error-base-light {\n @include input-base-light;\n outline: 2px solid $light-input-error-outline;\n\n &:focus-visible {\n outline: 2px solid $light-input-error-outline,\n }\n}\n\n@mixin input-error-base-dark {\n @include input-base-dark;\n outline: 2px solid $dark-input-error-outline;\n\n &:focus-visible {\n outline: 2px solid $dark-input-error-outline;\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: true,\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() placeholderValue = 'Enter Search';\n @Prop() rightToLeftOrientation = false;\n @Prop() query = '';\n\n @Event() clearInput: EventEmitter<void>;\n @Event() searchInputChange: 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 handleClearInput() {\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 = classNames(\n this.error\n ? this.isLightTheme\n ? 'inputErrorLightRTL'\n : 'inputErrorDarkRTL'\n : this.isLightTheme\n ? 'inputLightLTR'\n : 'inputDarkLTR',\n 'searchcraft-input',\n );\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 class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.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 onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n <searchcraft-input-icon\n error={this.error}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n </Fragment>\n ) : (\n <div class='inputWrapper'>\n <searchcraft-input-icon\n error={this.error}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n <input\n class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.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 onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n </div>\n )}\n </div>\n );\n }\n}\n","@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: $light-input-caption-color;\n}\n\n@mixin input-caption-base-dark {\n @include input-caption-base;\n color: $dark-input-caption-color;\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: $light-input-caption-color-error;\n}\n\n.inputCaptionErrorDarkLTR {\n @include input-caption-base;\n color: $dark-input-caption-color-error;\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: $light-input-caption-color-error;\n text-align: right;\n}\n\n.inputCaptionErrorDarkRTL {\n @include input-caption-base;\n color: $dark-input-caption-color-error;\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: true,\n})\nexport class SearchcraftInputCaption {\n @Prop() error?: boolean;\n @Prop() inputCaptionClassName? = '';\n @Prop() inputCaptionValue = 'Enter Search';\n @Prop() rightToLeftOrientation = false;\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",":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.inputIconLTR {\n height: 20px;\n left: 15px;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 20px;\n}\n\n.inputIconRTL {\n height: 20px;\n position: absolute;\n right: 15px;\n top: 50%;\n transform: translateY(-50%);\n width: 20px;\n}","import { Component, Prop, h, State } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-input-icon',\n styleUrl: 'searchcraft-input-icon.module.scss',\n shadow: true,\n})\nexport class SearchcraftInputIcon {\n @Prop() error?: boolean;\n @Prop() rightToLeftOrientation = false;\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={this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR'}\n >\n {this.isLightTheme ? (\n <searchcraft-search-icon-set type='error-light' />\n ) : (\n <searchcraft-search-icon-set type='error-dark' />\n )}\n </div>\n ) : (\n <div\n class={this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR'}\n >\n {this.isLightTheme ? (\n <searchcraft-search-icon-set type='search-light' />\n ) : (\n <searchcraft-search-icon-set type='search-dark' />\n )}\n </div>\n );\n }\n}\n","@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-label-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.labelLight {\n @include input-label-base;\n color: $light-input-label-color;\n}\n\n.labelDark {\n @include input-label-base;\n color: $dark-input-label-color;\n}","import { Component, Prop, h, State } from '@stencil/core';\nimport classNames from 'classnames';\n\n@Component({\n tag: 'searchcraft-input-label',\n styleUrl: 'searchcraft-input-label.module.scss',\n shadow: true,\n})\nexport class SearchcraftInputLabel {\n @Prop() inputLabelClassName? = '';\n @Prop() label?: string; // Make label optional\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n // Render nothing if no label prop is provided\n if (!this.label) {\n return null;\n }\n\n const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';\n\n return (\n <label\n class={classNames(labelStyle, this.inputLabelClassName)}\n htmlFor='searchcraft-input-id'\n >\n {this.label}\n </label>\n );\n }\n}\n","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\n render() {\n switch (this.type) {\n case 'search-light':\n return (\n <svg\n width='20'\n height='20'\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='18'\n height='18'\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='20'\n height='20'\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='18'\n height='18'\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","$spinner-size: 20px;\n\n.spinnerContainer {\n background-color: transparent;\n height: $spinner-size;\n width: $spinner-size;\n}\n\n.spinnerDark {\n height: 100%;\n width: 100%;\n background: conic-gradient(#000 50%, #FFFFFF);\n clip-path: circle(50%);\n mask-image: radial-gradient(circle at center, rgba(0,0,0,0) calc($spinner-size/3), rgba(0,0,0,1) calc($spinner-size/3));\n animation: spinning 1s linear infinite;\n}\n\n.spinnerLight {\n height: 100%;\n width: 100%;\n background: conic-gradient(#737373 50%, #FFFFFF);\n clip-path: circle(50%);\n mask-image: radial-gradient(circle at center, rgba(0,0,0,0) calc($spinner-size/3), rgba(0,0,0,1) calc($spinner-size/3));\n animation: spinning 1s linear infinite;\n}\n\n@keyframes spinning {\n 0% { transform: rotate(0deg); }\n 50% {transform: rotate(180deg);}\n 100% { transform: rotate(360deg); }\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-spinner-dark',\n styleUrl: 'searchcraft-spinner-dark.module.scss',\n shadow: true,\n})\nexport class SearchcraftSpinnerDark {\n render() {\n return (\n <div class='spinnerContainer'>\n <div class='spinnerDark' />\n </div>\n );\n }\n}\n","$spinner-size: 20px;\n\n.spinnerContainer {\n background-color: transparent;\n height: $spinner-size;\n width: $spinner-size;\n}\n\n.spinnerLight {\n height: 100%;\n width: 100%;\n background: conic-gradient(#737373 50%, #FFFFFF);\n clip-path: circle(50%);\n mask-image: radial-gradient(circle at center, rgba(0,0,0,0) calc($spinner-size/3), rgba(0,0,0,1) calc($spinner-size/3));\n animation: spinning 1s linear infinite;\n}\n\n@keyframes spinning {\n 0% { transform: rotate(0deg); }\n 50% {transform: rotate(180deg);}\n 100% { transform: rotate(360deg); }\n}","import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-spinner-light',\n styleUrl: 'searchcraft-spinner-light.module.scss',\n shadow: true,\n})\nexport class SearchcraftSpinnerLight {\n render() {\n return (\n <div class='spinnerContainer'>\n <div class='spinnerLight' />\n </div>\n );\n }\n}\n"],"version":3}