@searchcraft/javascript-sdk 0.1.2 → 0.1.3

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 (235) hide show
  1. package/dist/searchcraft-javascript-sdk/_commonjsHelpers-63cbe26c.js +34 -0
  2. package/dist/searchcraft-javascript-sdk/_commonjsHelpers-63cbe26c.js.map +1 -0
  3. package/dist/searchcraft-javascript-sdk/index-be6bffea.js +3043 -0
  4. package/dist/searchcraft-javascript-sdk/index-be6bffea.js.map +1 -0
  5. package/dist/{esm/index-72ac5051.js → searchcraft-javascript-sdk/index-d6567b9c.js} +10 -2
  6. package/dist/searchcraft-javascript-sdk/index-d6567b9c.js.map +1 -0
  7. package/dist/searchcraft-javascript-sdk/index.esm.js +14 -1
  8. package/dist/searchcraft-javascript-sdk/index.esm.js.map +1 -1
  9. package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js +93 -0
  10. package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js.map +1 -0
  11. package/dist/{esm → searchcraft-javascript-sdk}/searchcraft-base-search-form.entry.js +4 -4
  12. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-form.entry.js.map +1 -0
  13. package/dist/{components/p-1912bbbd.js → searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js} +22 -47
  14. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js.map +1 -0
  15. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js +57 -0
  16. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js.map +1 -0
  17. package/dist/{esm → searchcraft-javascript-sdk}/searchcraft-button-icon.entry.js +1 -1
  18. package/dist/searchcraft-javascript-sdk/searchcraft-button-icon.entry.js.map +1 -0
  19. package/dist/{esm → searchcraft-javascript-sdk}/searchcraft-button.entry.js +5 -5
  20. package/dist/searchcraft-javascript-sdk/searchcraft-button.entry.js.map +1 -0
  21. package/dist/{components/p-d446eda4.js → searchcraft-javascript-sdk/searchcraft-clear-icon-set.entry.js} +7 -25
  22. package/dist/searchcraft-javascript-sdk/searchcraft-clear-icon-set.entry.js.map +1 -0
  23. package/dist/searchcraft-javascript-sdk/searchcraft-clear-input-button.entry.js +31 -0
  24. package/dist/searchcraft-javascript-sdk/searchcraft-clear-input-button.entry.js.map +1 -0
  25. package/dist/searchcraft-javascript-sdk/searchcraft-error-message.entry.js +22 -0
  26. package/dist/searchcraft-javascript-sdk/searchcraft-error-message.entry.js.map +1 -0
  27. package/dist/{components/p-cb75ba7a.js → searchcraft-javascript-sdk/searchcraft-input-caption.entry.js} +10 -32
  28. package/dist/searchcraft-javascript-sdk/searchcraft-input-caption.entry.js.map +1 -0
  29. package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js +23 -0
  30. package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js.map +1 -0
  31. package/dist/searchcraft-javascript-sdk/searchcraft-input-label.entry.js +30 -0
  32. package/dist/searchcraft-javascript-sdk/searchcraft-input-label.entry.js.map +1 -0
  33. package/dist/{components/p-1bd04bac.js → searchcraft-javascript-sdk/searchcraft-input.entry.js} +11 -80
  34. package/dist/searchcraft-javascript-sdk/searchcraft-input.entry.js.map +1 -0
  35. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +48 -1
  36. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  37. package/dist/{components/p-d0edf961.js → searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js} +7 -25
  38. package/dist/searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js.map +1 -0
  39. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-dark.entry.js +17 -0
  40. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-dark.entry.js.map +1 -0
  41. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-light.entry.js +17 -0
  42. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-light.entry.js.map +1 -0
  43. package/dist/searchcraft-javascript-sdk/shadow-css-423dab2c.js +334 -0
  44. package/dist/searchcraft-javascript-sdk/shadow-css-423dab2c.js.map +1 -0
  45. package/dist/searchcraft-javascript-sdk/store-b50263a1.js +3008 -0
  46. package/dist/searchcraft-javascript-sdk/store-b50263a1.js.map +1 -0
  47. package/dist/{esm/utils-02b18bb5.js → searchcraft-javascript-sdk/utils-7bff0c78.js} +11 -7
  48. package/dist/searchcraft-javascript-sdk/utils-7bff0c78.js.map +1 -0
  49. package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +2 -1
  50. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +1 -2
  51. package/dist/types/components.d.ts +6 -4
  52. package/dist/types/utils/utils.d.ts +1 -5
  53. package/package.json +1 -1
  54. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  55. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  56. package/dist/cjs/index-5b0b9d4c.js +0 -84
  57. package/dist/cjs/index-5b0b9d4c.js.map +0 -1
  58. package/dist/cjs/index-e7e9ab69.js +0 -1271
  59. package/dist/cjs/index-e7e9ab69.js.map +0 -1
  60. package/dist/cjs/index.cjs.js +0 -16
  61. package/dist/cjs/index.cjs.js.map +0 -1
  62. package/dist/cjs/loader.cjs.js +0 -17
  63. package/dist/cjs/loader.cjs.js.map +0 -1
  64. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js +0 -460
  65. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js.map +0 -1
  66. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +0 -64
  67. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js.map +0 -1
  68. package/dist/cjs/searchcraft-button-icon.cjs.entry.js +0 -18
  69. package/dist/cjs/searchcraft-button-icon.cjs.entry.js.map +0 -1
  70. package/dist/cjs/searchcraft-button.cjs.entry.js +0 -37
  71. package/dist/cjs/searchcraft-button.cjs.entry.js.map +0 -1
  72. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +0 -27
  73. package/dist/cjs/searchcraft-javascript-sdk.cjs.js.map +0 -1
  74. package/dist/cjs/store-ab3978ce.js +0 -251
  75. package/dist/cjs/store-ab3978ce.js.map +0 -1
  76. package/dist/cjs/utils-57b6c18f.js +0 -48
  77. package/dist/cjs/utils-57b6c18f.js.map +0 -1
  78. package/dist/collection/assets/searchcraft-button-icons.js +0 -9
  79. package/dist/collection/assets/searchcraft-button-icons.js.map +0 -1
  80. package/dist/collection/assets/searchcraft-clear-icon-set.js +0 -45
  81. package/dist/collection/assets/searchcraft-clear-icon-set.js.map +0 -1
  82. package/dist/collection/assets/searchcraft-search-icon-set.js +0 -45
  83. package/dist/collection/assets/searchcraft-search-icon-set.js.map +0 -1
  84. package/dist/collection/collection-manifest.json +0 -27
  85. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +0 -294
  86. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +0 -1
  87. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.css +0 -19
  88. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js +0 -168
  89. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js.map +0 -1
  90. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.module.css +0 -14
  91. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +0 -302
  92. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +0 -1
  93. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +0 -210
  94. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +0 -123
  95. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +0 -1
  96. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +0 -20
  97. package/dist/collection/components/searchcraft-button/searchcraft-button.js +0 -137
  98. package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +0 -1
  99. package/dist/collection/components/searchcraft-button/searchcraft-button.module.css +0 -82
  100. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js +0 -96
  101. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js.map +0 -1
  102. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.module.css +0 -33
  103. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +0 -64
  104. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +0 -1
  105. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.module.css +0 -21
  106. package/dist/collection/components/searchcraft-input/searchcraft-input.js +0 -276
  107. package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +0 -1
  108. package/dist/collection/components/searchcraft-input/searchcraft-input.module.css +0 -241
  109. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js +0 -122
  110. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js.map +0 -1
  111. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.module.css +0 -79
  112. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js +0 -71
  113. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js.map +0 -1
  114. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.module.css +0 -21
  115. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +0 -77
  116. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +0 -1
  117. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.module.css +0 -21
  118. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +0 -19
  119. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js.map +0 -1
  120. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.module.css +0 -35
  121. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +0 -19
  122. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js.map +0 -1
  123. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.module.css +0 -26
  124. package/dist/collection/index.js +0 -14
  125. package/dist/collection/index.js.map +0 -1
  126. package/dist/collection/provider/store.js +0 -68
  127. package/dist/collection/provider/store.js.map +0 -1
  128. package/dist/collection/utils/utils.js +0 -41
  129. package/dist/collection/utils/utils.js.map +0 -1
  130. package/dist/components/index.js +0 -5
  131. package/dist/components/index.js.map +0 -1
  132. package/dist/components/p-066c8210.js +0 -1106
  133. package/dist/components/p-066c8210.js.map +0 -1
  134. package/dist/components/p-1912bbbd.js.map +0 -1
  135. package/dist/components/p-1bd04bac.js.map +0 -1
  136. package/dist/components/p-36c95064.js +0 -247
  137. package/dist/components/p-36c95064.js.map +0 -1
  138. package/dist/components/p-5cdc6210.js +0 -82
  139. package/dist/components/p-5cdc6210.js.map +0 -1
  140. package/dist/components/p-5e3152c4.js +0 -44
  141. package/dist/components/p-5e3152c4.js.map +0 -1
  142. package/dist/components/p-63035c6a.js +0 -50
  143. package/dist/components/p-63035c6a.js.map +0 -1
  144. package/dist/components/p-6f2a72d3.js +0 -41
  145. package/dist/components/p-6f2a72d3.js.map +0 -1
  146. package/dist/components/p-8d9551ce.js +0 -34
  147. package/dist/components/p-8d9551ce.js.map +0 -1
  148. package/dist/components/p-b1ff2296.js +0 -69
  149. package/dist/components/p-b1ff2296.js.map +0 -1
  150. package/dist/components/p-c3838435.js +0 -62
  151. package/dist/components/p-c3838435.js.map +0 -1
  152. package/dist/components/p-cb75ba7a.js.map +0 -1
  153. package/dist/components/p-d0edf961.js.map +0 -1
  154. package/dist/components/p-d446eda4.js.map +0 -1
  155. package/dist/components/p-d54bca75.js +0 -50
  156. package/dist/components/p-d54bca75.js.map +0 -1
  157. package/dist/components/p-d6616aa5.js +0 -34
  158. package/dist/components/p-d6616aa5.js.map +0 -1
  159. package/dist/components/searchcraft-auto-search-form.js +0 -185
  160. package/dist/components/searchcraft-auto-search-form.js.map +0 -1
  161. package/dist/components/searchcraft-base-search-form.js +0 -153
  162. package/dist/components/searchcraft-base-search-form.js.map +0 -1
  163. package/dist/components/searchcraft-base-search-result.js +0 -8
  164. package/dist/components/searchcraft-base-search-result.js.map +0 -1
  165. package/dist/components/searchcraft-base-search-results.js +0 -111
  166. package/dist/components/searchcraft-base-search-results.js.map +0 -1
  167. package/dist/components/searchcraft-button-icon.js +0 -33
  168. package/dist/components/searchcraft-button-icon.js.map +0 -1
  169. package/dist/components/searchcraft-button.js +0 -8
  170. package/dist/components/searchcraft-button.js.map +0 -1
  171. package/dist/components/searchcraft-clear-icon-set.js +0 -8
  172. package/dist/components/searchcraft-clear-icon-set.js.map +0 -1
  173. package/dist/components/searchcraft-clear-input-button.js +0 -8
  174. package/dist/components/searchcraft-clear-input-button.js.map +0 -1
  175. package/dist/components/searchcraft-error-message.js +0 -8
  176. package/dist/components/searchcraft-error-message.js.map +0 -1
  177. package/dist/components/searchcraft-input-caption.js +0 -8
  178. package/dist/components/searchcraft-input-caption.js.map +0 -1
  179. package/dist/components/searchcraft-input-icon.js +0 -8
  180. package/dist/components/searchcraft-input-icon.js.map +0 -1
  181. package/dist/components/searchcraft-input-label.js +0 -8
  182. package/dist/components/searchcraft-input-label.js.map +0 -1
  183. package/dist/components/searchcraft-input.js +0 -8
  184. package/dist/components/searchcraft-input.js.map +0 -1
  185. package/dist/components/searchcraft-search-icon-set.js +0 -8
  186. package/dist/components/searchcraft-search-icon-set.js.map +0 -1
  187. package/dist/components/searchcraft-spinner-dark.js +0 -8
  188. package/dist/components/searchcraft-spinner-dark.js.map +0 -1
  189. package/dist/components/searchcraft-spinner-light.js +0 -8
  190. package/dist/components/searchcraft-spinner-light.js.map +0 -1
  191. package/dist/esm/index-72ac5051.js.map +0 -1
  192. package/dist/esm/index-eace3343.js +0 -1242
  193. package/dist/esm/index-eace3343.js.map +0 -1
  194. package/dist/esm/index.js +0 -4
  195. package/dist/esm/index.js.map +0 -1
  196. package/dist/esm/loader.js +0 -13
  197. package/dist/esm/loader.js.map +0 -1
  198. package/dist/esm/searchcraft-auto-search-form_13.entry.js +0 -444
  199. package/dist/esm/searchcraft-auto-search-form_13.entry.js.map +0 -1
  200. package/dist/esm/searchcraft-base-search-form.entry.js.map +0 -1
  201. package/dist/esm/searchcraft-button-icon.entry.js.map +0 -1
  202. package/dist/esm/searchcraft-button.entry.js.map +0 -1
  203. package/dist/esm/searchcraft-javascript-sdk.js +0 -22
  204. package/dist/esm/searchcraft-javascript-sdk.js.map +0 -1
  205. package/dist/esm/store-e55b12aa.js +0 -247
  206. package/dist/esm/store-e55b12aa.js.map +0 -1
  207. package/dist/esm/utils-02b18bb5.js.map +0 -1
  208. package/dist/index.cjs.js +0 -1
  209. package/dist/index.js +0 -1
  210. package/dist/loader/cdn.js +0 -1
  211. package/dist/loader/index.cjs.js +0 -1
  212. package/dist/loader/index.d.ts +0 -24
  213. package/dist/loader/index.es2017.js +0 -1
  214. package/dist/loader/index.js +0 -2
  215. package/dist/loader/package.json +0 -11
  216. package/dist/searchcraft-javascript-sdk/p-0ba9029b.js +0 -3
  217. package/dist/searchcraft-javascript-sdk/p-0ba9029b.js.map +0 -1
  218. package/dist/searchcraft-javascript-sdk/p-36c95064.js +0 -11
  219. package/dist/searchcraft-javascript-sdk/p-36c95064.js.map +0 -1
  220. package/dist/searchcraft-javascript-sdk/p-437c6ef9.entry.js +0 -2
  221. package/dist/searchcraft-javascript-sdk/p-437c6ef9.entry.js.map +0 -1
  222. package/dist/searchcraft-javascript-sdk/p-562e923d.entry.js +0 -2
  223. package/dist/searchcraft-javascript-sdk/p-562e923d.entry.js.map +0 -1
  224. package/dist/searchcraft-javascript-sdk/p-5959cd6a.entry.js +0 -2
  225. package/dist/searchcraft-javascript-sdk/p-5959cd6a.entry.js.map +0 -1
  226. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js +0 -7
  227. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js.map +0 -1
  228. package/dist/searchcraft-javascript-sdk/p-5e3152c4.js +0 -2
  229. package/dist/searchcraft-javascript-sdk/p-5e3152c4.js.map +0 -1
  230. package/dist/searchcraft-javascript-sdk/p-e1255160.js +0 -2
  231. package/dist/searchcraft-javascript-sdk/p-e1255160.js.map +0 -1
  232. package/dist/searchcraft-javascript-sdk/p-eb632a89.entry.js +0 -2
  233. package/dist/searchcraft-javascript-sdk/p-eb632a89.entry.js.map +0 -1
  234. /package/dist/{esm → searchcraft-javascript-sdk}/app-globals-0f993ce5.js +0 -0
  235. /package/dist/{esm → searchcraft-javascript-sdk}/app-globals-0f993ce5.js.map +0 -0
@@ -1,444 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement, F as Fragment } from './index-eace3343.js';
2
- import { u as useSearchcraftStore, g } from './store-e55b12aa.js';
3
- import { p as parseCustomStyles, a as parseSearchKeys, e as extractDynamicProperties } from './utils-02b18bb5.js';
4
- import { c as classNames } from './index-72ac5051.js';
5
-
6
- 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%}";
7
- const SearchcraftAutoSearchFormStyle0 = searchcraftAutoSearchFormModuleCss;
8
-
9
- const SearchcraftAutoSearchForm = class {
10
- constructor(hostRef) {
11
- registerInstance(this, hostRef);
12
- this.querySubmit = createEvent(this, "querySubmit", 7);
13
- this.debounceTimeout = null;
14
- this.debounceDelay = 300; // 300ms debounce delay
15
- this.searchStore = useSearchcraftStore.getState();
16
- this.handleInputChange = (event) => {
17
- this.query = event.detail;
18
- this.querySubmit.emit(this.query);
19
- // Clear the previous debounce timeout
20
- if (this.debounceTimeout) {
21
- clearTimeout(this.debounceTimeout);
22
- }
23
- // Set a new debounce timeout
24
- this.debounceTimeout = setTimeout(() => {
25
- console.log('Debounced search triggered');
26
- this.runSearch();
27
- }, this.debounceDelay);
28
- };
29
- this.handleClearInput = () => {
30
- this.query = '';
31
- console.log('Input cleared');
32
- if (typeof this.clearInput === 'function') {
33
- this.clearInput();
34
- }
35
- if (this.debounceTimeout) {
36
- clearTimeout(this.debounceTimeout);
37
- }
38
- this.error = false;
39
- this.searchResults = '';
40
- };
41
- this.runSearch = async () => {
42
- if (this.query.trim() === '') {
43
- this.error = true;
44
- this.searchResults = '';
45
- }
46
- else {
47
- this.error = false;
48
- this.searchStore.setQuery(this.query);
49
- try {
50
- await this.searchStore.search();
51
- this.searchResults = JSON.stringify(this.searchStore.searchResults);
52
- }
53
- catch (error) {
54
- this.error = true;
55
- }
56
- }
57
- };
58
- this.handleFormSubmit = async (event) => {
59
- event.preventDefault();
60
- await this.runSearch();
61
- };
62
- this.autoSearchFormClass = '';
63
- this.clearInput = () => { };
64
- this.config = {
65
- apiKey: '',
66
- endpointURL: '',
67
- index: [],
68
- };
69
- this.customStylesForInput = {};
70
- this.inputCaptionValue = '';
71
- this.labelForInput = '';
72
- this.placeholderValue = 'Search here';
73
- this.rightToLeftOrientation = false;
74
- this.searchContainerClass = '';
75
- this.error = false;
76
- this.query = '';
77
- this.searchResults = '';
78
- }
79
- componentDidLoad() {
80
- const searchcraft = new g(this.config);
81
- this.searchStore.initialize(searchcraft, true);
82
- console.log('Component initialized');
83
- }
84
- render() {
85
- const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';
86
- const parsedCustomStyles = parseCustomStyles(this.customStylesForInput);
87
- return (h("form", { key: '60978e813198af27c34232ebd1bda4ca4a6f5199', class: `${formClass}`, onSubmit: this.handleFormSubmit }, h("searchcraft-input-label", { key: '4418b675769d041c684f15afb2d9b919f765c133', label: this.labelForInput }), h("div", { key: '73581bf8fee7deee1bcf426f80493c78e92d8ada', class: 'searchContainer' }, 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 && (h("searchcraft-error-message", { key: '1637aff0dcac83d975d9d53545e7fee26c41aa7f', errorMessage: 'Please enter a search query.' }))));
88
- }
89
- };
90
- SearchcraftAutoSearchForm.style = SearchcraftAutoSearchFormStyle0;
91
-
92
- 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}";
93
- const SearchcraftBaseSearchResultStyle0 = searchcraftBaseSearchResultModuleCss;
94
-
95
- const SearchcraftBaseSearchResult = class {
96
- constructor(hostRef) {
97
- registerInstance(this, hostRef);
98
- this.buttonCallback = createEvent(this, "buttonCallback", 7);
99
- this.keyDownCallback = createEvent(this, "keyDownCallback", 7);
100
- this.resultCallback = createEvent(this, "resultCallback", 7);
101
- this.buttonCallback = () => { }; // Callback for button click
102
- this.keyDownCallback = () => { }; // Callback for key down event
103
- this.resultCallback = () => { }; // Callback for result container click
104
- this.handleButtonClick = () => {
105
- this.buttonCallback();
106
- };
107
- this.handleContainerClick = () => {
108
- if (this.isInteractive) {
109
- this.resultCallback();
110
- }
111
- };
112
- this.buttonText = '';
113
- this.imageDescription = '';
114
- this.imageSource = '';
115
- this.isInteractive = false;
116
- this.primaryContent = '';
117
- this.secondaryContent = '';
118
- this.tertiaryContent = '';
119
- this.headingText = '';
120
- this.subheadingText = '';
121
- this.themeMode = 'light';
122
- this.customStyles = {};
123
- }
124
- render() {
125
- const isLightTheme = this.themeMode === 'light';
126
- const containerStyle = Object.assign({}, this.customStyles);
127
- return (h("div", { key: '512b19a2637993cd71fe9b0ac1557106f8501cf2', class: this.isInteractive
128
- ? isLightTheme
129
- ? 'interactiveResultContainerLight'
130
- : 'interactiveResultContainerDark'
131
- : 'resultContainer', id: 'searchcraft-item', onClick: this.handleContainerClick, onKeyDown: this.keyDownCallback, style: containerStyle, tabindex: '0' }, this.isInteractive && (h("div", { key: '735b5c931e6bb209cb948d1a4834f689c836528c', class: 'interactiveIconLarge' }, isLightTheme ? (h("searchcraft-clear-icon-set", { type: 'arrow-light' })) : (h("searchcraft-clear-icon-set", { type: 'arrow-dark' })))), h("div", { key: 'd864f312cc779cb52f7f4529691f32b2460a38c1', class: 'imageContainer' }, h("img", { key: 'b705f3ebaa1c02e0a80c181c0cb9e6c5afd1b10c', alt: this.imageDescription, class: isLightTheme ? 'imageLight' : 'imageDark', src: this.imageSource })), h("div", { key: 'da90f1ba12456a8a25c5983e1061fba917632ebf', class: 'contentContainer' }, h("h2", { key: '27af1079e7b12025a96cc0ac890dc9a2516bfa4a', class: isLightTheme ? 'headingLight' : 'headingDark' }, this.headingText, this.isInteractive && (h("div", { key: 'da3f8e81bb039fb68b1afb8e3656ce04adc552ba', class: 'interactiveIconSmall' }, isLightTheme ? (h("searchcraft-clear-icon-set", { type: 'arrow-light' })) : (h("searchcraft-clear-icon-set", { type: 'arrow-dark' }))))), h("h3", { key: 'f62cd5e67cdf03286387061ed944504ac1b0e0d2', class: isLightTheme ? 'subheadingLight' : 'subheadingDark' }, this.subheadingText), h("p", { key: 'b8024831da3be09abfb758370e25b42a7d9e8517', class: isLightTheme ? 'primaryContentLight' : 'primaryContentDark' }, this.primaryContent), h("p", { key: 'b9a847323f17b8cda2c8de170c9308359f113cfd', class: isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark' }, this.secondaryContent), h("p", { key: 'cda9259099171541f59fcf6ab4524d4ba3d40f29', class: isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark' }, this.tertiaryContent), this.buttonText && (h("button", { key: 'f527dad1a614f3bf54d8ce724f374423013f8ca2', onClick: this.handleButtonClick, type: 'button' }, this.buttonText)))));
132
- }
133
- };
134
- SearchcraftBaseSearchResult.style = SearchcraftBaseSearchResultStyle0;
135
-
136
- 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}";
137
- const SearchcraftBaseSearchResultsStyle0 = searchcraftBaseSearchResultsModuleCss;
138
-
139
- const SearchcraftBaseSearchResults = class {
140
- constructor(hostRef) {
141
- registerInstance(this, hostRef);
142
- this.query = '';
143
- this.searchResults = null;
144
- this.searchKeys = '';
145
- this.customStylesForResults = {};
146
- }
147
- componentDidLoad() {
148
- // Initialize searchKeys if not provided
149
- if (!this.searchKeys || this.searchKeys.length === 0) {
150
- console.warn('No searchKeys provided; using empty keys array.');
151
- this.searchKeys = ''; // Ensure it's explicitly set as an empty array
152
- }
153
- // Subscribe to state changes
154
- this.unsubscribe = useSearchcraftStore.subscribe((state) => {
155
- this.searchResults = Object.assign({}, state.searchResults);
156
- this.query = state.query;
157
- });
158
- // Fetch initial state
159
- const { searchResults, query } = useSearchcraftStore.getState();
160
- this.searchResults = searchResults;
161
- this.query = query;
162
- }
163
- disconnectedCallback() {
164
- if (this.unsubscribe) {
165
- this.unsubscribe();
166
- }
167
- }
168
- render() {
169
- var _a, _b, _c, _d, _e, _f, _g;
170
- if (!((_a = this.searchResults) === null || _a === void 0 ? void 0 : _a.data)) {
171
- console.warn('No search results data available');
172
- return h("div", null, "No results to display.");
173
- }
174
- const parsedSearchKeys = parseSearchKeys(this.searchKeys);
175
- const parsedCustomStyles = parseCustomStyles(this.customStylesForResults);
176
- return (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 :
177
- _d.map((document, index) => {
178
- const { doc: result } = document;
179
- const dynamicProperties = extractDynamicProperties(result, parsedSearchKeys);
180
- // Render the custom element if present, otherwise fallback to default
181
- const customElement = this.hostElement.querySelector('[slot="result-template"]');
182
- if (customElement) {
183
- // Clone the custom element and pass data to it
184
- const customElementClone = customElement.cloneNode(true);
185
- customElementClone.removeAttribute('slot'); // Remove the slot attribute
186
- customElementClone.setAttribute('data-result', JSON.stringify(result));
187
- return (h("div", { key: `${dynamicProperties.id}-${index}` }, customElementClone.outerHTML));
188
- }
189
- // Fallback to the default element
190
- return (h("searchcraft-base-search-result", { key: `${dynamicProperties.id}-${index}`, "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]], customStyles: parsedCustomStyles }));
191
- }), this.query.length > 0 &&
192
- ((_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 && (h("searchcraft-error-message", { "error-message": `No search results found for "${this.query}" query` })), h("slot", { name: 'result-template' })));
193
- }
194
- get hostElement() { return getElement(this); }
195
- };
196
- SearchcraftBaseSearchResults.style = SearchcraftBaseSearchResultsStyle0;
197
-
198
- const SearchcraftClearIconSet = class {
199
- constructor(hostRef) {
200
- registerInstance(this, hostRef);
201
- this.type = 'clear-light';
202
- }
203
- render() {
204
- switch (this.type) {
205
- case 'clear-light':
206
- return (h("svg", { width: '22', height: '22', viewBox: '0 0 22 22', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, h("title", { id: 'icon-title' }, "Searchcraft Clear Input Icon Light"), 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' })));
207
- case 'clear-dark':
208
- return (h("svg", { width: '22', height: '22', viewBox: '0 0 22 22', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, h("title", { id: 'icon-title' }, "Searchcraft Clear Input Icon Dark"), 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' })));
209
- case 'arrow-light':
210
- return (h("svg", { width: '20', height: '21', viewBox: '0 0 20 21', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, h("title", { id: 'icon-title' }, "Searchcraft Arrow Right Icon Light"), 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' })));
211
- case 'arrow-dark':
212
- return (h("svg", { width: '8', height: '12', viewBox: '0 0 8 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, h("title", { id: 'icon-title' }, "Searchcraft Arrow Right Icon Dark"), h("path", { d: 'M1.5 11L6.5 6L1.5 1', stroke: '#BFBFBF', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
213
- default:
214
- return null;
215
- }
216
- }
217
- };
218
-
219
- 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}";
220
- const SearchcraftClearInputButtonStyle0 = searchcraftClearInputButtonModuleCss;
221
-
222
- const SearchcraftClearInputButton = class {
223
- constructor(hostRef) {
224
- registerInstance(this, hostRef);
225
- this.clearInput = createEvent(this, "clearInput", 7);
226
- // Added a click handler to emit the event
227
- this.handleClearClick = (event) => {
228
- event.preventDefault(); // Prevent default if necessary
229
- this.clearInput.emit(); // Emit the event
230
- };
231
- this.isRequesting = false;
232
- this.rightToLeftOrientation = false;
233
- this.theme = 'light';
234
- }
235
- isLightTheme() {
236
- return this.theme === 'light';
237
- }
238
- render() {
239
- return this.rightToLeftOrientation ? (h("button", { class: classNames('inputClearButtonRTL', '.sc-clear-input-button-rtl'), onClick: this.handleClearClick, type: 'button' }, this.isRequesting ? (this.isLightTheme ? (h("searchcraft-spinner-light", null)) : (h("searchcraft-spinner-dark", null))) : this.isLightTheme ? (h("searchcraft-clear-icon-set", { type: 'clear-light' })) : (h("searchcraft-clear-icon-set", { type: 'clear-dark' })))) : (h("button", { class: classNames('inputClearButtonLTR', '.sc-clear-input-button-ltr'), onClick: this.handleClearClick, type: 'button' }, this.isRequesting ? (this.isLightTheme ? (h("searchcraft-spinner-light", null)) : (h("searchcraft-spinner-dark", null))) : this.isLightTheme ? (h("searchcraft-clear-icon-set", { type: 'clear-light' })) : (h("searchcraft-clear-icon-set", { type: 'clear-dark' }))));
240
- }
241
- };
242
- SearchcraftClearInputButton.style = SearchcraftClearInputButtonStyle0;
243
-
244
- 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}";
245
- const SearchcraftErrorMessageStyle0 = searchcraftErrorMessageModuleCss;
246
-
247
- const SearchcraftErrorMessage = class {
248
- constructor(hostRef) {
249
- registerInstance(this, hostRef);
250
- this.errorMessage = undefined;
251
- this.theme = 'light';
252
- }
253
- render() {
254
- const errorMessageStyle = this.theme === 'light' ? 'errorMessageLight' : 'errorMessageDark';
255
- return (h("p", { key: '4e0b94cb24f940e8c404fd752e6f02f977190043', class: classNames(errorMessageStyle) }, this.errorMessage || 'Search term is required.'));
256
- }
257
- };
258
- SearchcraftErrorMessage.style = SearchcraftErrorMessageStyle0;
259
-
260
- 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%}";
261
- const SearchcraftInputStyle0 = searchcraftInputModuleCss;
262
-
263
- const SearchcraftInput = class {
264
- constructor(hostRef) {
265
- registerInstance(this, hostRef);
266
- this.clearInput = createEvent(this, "clearInput", 7);
267
- this.searchInputChange = createEvent(this, "searchInputChange", 7);
268
- this.customStyles = {};
269
- this.error = false;
270
- this.formClassName = '';
271
- this.inputCaptionClassName = '';
272
- this.inputCaptionValue = '';
273
- this.inputClassName = '';
274
- this.placeholderValue = 'Enter Search';
275
- this.rightToLeftOrientation = false;
276
- this.query = '';
277
- this.theme = 'light';
278
- }
279
- get isLightTheme() {
280
- return this.theme === 'light';
281
- }
282
- handleInputChange(event) {
283
- const input = event.target;
284
- this.searchInputChange.emit(input.value);
285
- }
286
- handleClearInput() {
287
- if (this.clearInput) {
288
- this.clearInput.emit();
289
- }
290
- }
291
- render() {
292
- const containerClassName = this.rightToLeftOrientation
293
- ? 'inputContainerRTL'
294
- : 'inputContainerLTR';
295
- const inputClassName = classNames(this.error
296
- ? this.isLightTheme
297
- ? 'inputErrorLightRTL'
298
- : 'inputErrorDarkRTL'
299
- : this.isLightTheme
300
- ? 'inputLightLTR'
301
- : 'inputDarkLTR', 'searchcraft-input');
302
- const validatedCustomStyles = parseCustomStyles(this.customStyles);
303
- const placeholderStyle = {
304
- fontSize: validatedCustomStyles.placeholderFontSize || '16px',
305
- };
306
- return (h("div", { key: '3a3fa1335552c53967d35219819024377e726d80', class: classNames(containerClassName, this.formClassName, 'searchcraft-input-form') }, this.rightToLeftOrientation ? (h(Fragment, null, h("input", { class: classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), h("style", null, `
307
- #searchcraft-input-id::placeholder {
308
- font-size: ${placeholderStyle.fontSize};
309
- }
310
- `), this.inputCaptionValue && (h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (h("searchcraft-clear-input-button", { onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation })), h("searchcraft-input-icon", { error: this.error, rightToLeftOrientation: this.rightToLeftOrientation }))) : (h("div", { class: 'inputWrapper' }, h("searchcraft-input-icon", { error: this.error, rightToLeftOrientation: this.rightToLeftOrientation }), h("input", { class: classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), h("style", null, `
311
- #searchcraft-input-id::placeholder {
312
- font-size: ${placeholderStyle.fontSize};
313
- }
314
- `), this.inputCaptionValue && (h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (h("searchcraft-clear-input-button", { onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation }))))));
315
- }
316
- };
317
- SearchcraftInput.style = SearchcraftInputStyle0;
318
-
319
- 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}";
320
- const SearchcraftInputCaptionStyle0 = searchcraftInputCaptionModuleCss;
321
-
322
- const SearchcraftInputCaption = class {
323
- constructor(hostRef) {
324
- registerInstance(this, hostRef);
325
- this.error = undefined;
326
- this.inputCaptionClassName = '';
327
- this.inputCaptionValue = 'Enter Search';
328
- this.rightToLeftOrientation = false;
329
- this.theme = 'light';
330
- }
331
- isLightTheme() {
332
- return this.theme === 'light';
333
- }
334
- render() {
335
- return this.rightToLeftOrientation ? (h("p", { class: classNames(this.error
336
- ? this.isLightTheme
337
- ? 'inputCaptionErrorLightRTL'
338
- : 'inputCaptionErrorDarkRTL'
339
- : this.isLightTheme
340
- ? 'inputCaptionLightRTL'
341
- : 'inputCaptionDarkRTL', this.inputCaptionClassName, '.searchcraft-input-caption') }, this.inputCaptionValue)) : (h("p", { class: classNames(this.error
342
- ? this.isLightTheme
343
- ? 'inputCaptionErrorLightLTR'
344
- : 'inputCaptionErrorDarkLTR'
345
- : this.isLightTheme
346
- ? 'inputCaptionLightLTR'
347
- : 'inputCaptionDarkLTR', this.inputCaptionClassName, '.searchcraft-input-caption') }, this.inputCaptionValue));
348
- }
349
- };
350
- SearchcraftInputCaption.style = SearchcraftInputCaptionStyle0;
351
-
352
- 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}";
353
- const SearchcraftInputIconStyle0 = searchcraftInputIconModuleCss;
354
-
355
- const SearchcraftInputIcon = class {
356
- constructor(hostRef) {
357
- registerInstance(this, hostRef);
358
- this.error = undefined;
359
- this.rightToLeftOrientation = false;
360
- this.theme = 'light';
361
- }
362
- isLightTheme() {
363
- return this.theme === 'light';
364
- }
365
- render() {
366
- return this.error ? (h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme ? (h("searchcraft-search-icon-set", { type: 'error-light' })) : (h("searchcraft-search-icon-set", { type: 'error-dark' })))) : (h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme ? (h("searchcraft-search-icon-set", { type: 'search-light' })) : (h("searchcraft-search-icon-set", { type: 'search-dark' }))));
367
- }
368
- };
369
- SearchcraftInputIcon.style = SearchcraftInputIconStyle0;
370
-
371
- 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}";
372
- const SearchcraftInputLabelStyle0 = searchcraftInputLabelModuleCss;
373
-
374
- const SearchcraftInputLabel = class {
375
- constructor(hostRef) {
376
- registerInstance(this, hostRef);
377
- this.inputLabelClassName = '';
378
- this.label = undefined;
379
- this.theme = 'light';
380
- }
381
- isLightTheme() {
382
- return this.theme === 'light';
383
- }
384
- render() {
385
- // Render nothing if no label prop is provided
386
- if (!this.label) {
387
- return null;
388
- }
389
- const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';
390
- return (h("label", { class: classNames(labelStyle, this.inputLabelClassName), htmlFor: 'searchcraft-input-id' }, this.label));
391
- }
392
- };
393
- SearchcraftInputLabel.style = SearchcraftInputLabelStyle0;
394
-
395
- const SearchcraftSearchIconSet = class {
396
- constructor(hostRef) {
397
- registerInstance(this, hostRef);
398
- this.type = 'search-dark';
399
- }
400
- render() {
401
- switch (this.type) {
402
- case 'search-light':
403
- return (h("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, h("title", { id: 'searchcraft-title' }, "Searchcraft Search Icon Light"), 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' })));
404
- case 'search-dark':
405
- return (h("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, h("title", { id: 'searchcraft-title' }, "Searchcraft Search Icon Dark"), 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' })));
406
- case 'error-light':
407
- return (h("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, h("title", { id: 'searchcraft-title' }, "Searchcraft Error Search Icon Light"), 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' })));
408
- case 'error-dark':
409
- return (h("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, h("title", { id: 'searchcraft-title' }, "Searchcraft Error Search Icon Dark"), 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' })));
410
- default:
411
- return null;
412
- }
413
- }
414
- };
415
-
416
- 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)}}";
417
- const SearchcraftSpinnerDarkStyle0 = searchcraftSpinnerDarkModuleCss;
418
-
419
- const SearchcraftSpinnerDark = class {
420
- constructor(hostRef) {
421
- registerInstance(this, hostRef);
422
- }
423
- render() {
424
- return (h("div", { key: 'fc32dd86414502f1895b157d8aa28645a5391ff9', class: 'spinnerContainer' }, h("div", { key: '260233361f9ff5a17d05b92e41ec2fc13adc2dbf', class: 'spinnerDark' })));
425
- }
426
- };
427
- SearchcraftSpinnerDark.style = SearchcraftSpinnerDarkStyle0;
428
-
429
- 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)}}";
430
- const SearchcraftSpinnerLightStyle0 = searchcraftSpinnerLightModuleCss;
431
-
432
- const SearchcraftSpinnerLight = class {
433
- constructor(hostRef) {
434
- registerInstance(this, hostRef);
435
- }
436
- render() {
437
- return (h("div", { key: '0e0faa615a1548868153b07bb467ee85eabcdd09', class: 'spinnerContainer' }, h("div", { key: 'a9aac4d029d9072e01cc643da62f3338622f0ef0', class: 'spinnerLight' })));
438
- }
439
- };
440
- SearchcraftSpinnerLight.style = SearchcraftSpinnerLightStyle0;
441
-
442
- export { SearchcraftAutoSearchForm as searchcraft_auto_search_form, SearchcraftBaseSearchResult as searchcraft_base_search_result, SearchcraftBaseSearchResults as searchcraft_base_search_results, SearchcraftClearIconSet as searchcraft_clear_icon_set, SearchcraftClearInputButton as searchcraft_clear_input_button, SearchcraftErrorMessage as searchcraft_error_message, SearchcraftInput as searchcraft_input, SearchcraftInputCaption as searchcraft_input_caption, SearchcraftInputIcon as searchcraft_input_icon, SearchcraftInputLabel as searchcraft_input_label, SearchcraftSearchIconSet as searchcraft_search_icon_set, SearchcraftSpinnerDark as searchcraft_spinner_dark, SearchcraftSpinnerLight as searchcraft_spinner_light };
443
-
444
- //# sourceMappingURL=searchcraft-auto-search-form_13.entry.js.map
@@ -1 +0,0 @@
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-sp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AAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,mBAAmB,IAEnC,aAAO,EAAE,EAAC,mBAAmB,yCAErB,EACR,YACE,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,QACE,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,4DAAK,KAAK,EAAC,aAAa,GAAG,CACvB,EACN;KACH;;;;ACdH,MAAM,gCAAgC,GAAG,8aAA8a,CAAC;AACxd,sCAAe,gCAAgC;;MCMlC,uBAAuB;;;;IAClC,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,kBAAkB,IAC3B,4DAAK,KAAK,EAAC,cAAc,GAAG,CACxB,EACN;KACH;;;;;;","names":["SearchcraftCore"],"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: Record<string, string> = {}; // Custom styles passed from parent\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 render() {\n const isLightTheme = this.themeMode === 'light';\n const containerStyle = { ...this.customStyles };\n return (\n <div\n class={\n this.isInteractive\n ? isLightTheme\n ? 'interactiveResultContainerLight'\n : 'interactiveResultContainerDark'\n : 'resultContainer'\n }\n id='searchcraft-item'\n onClick={this.handleContainerClick}\n onKeyDown={this.keyDownCallback}\n style={containerStyle}\n tabindex='0'\n >\n {this.isInteractive && (\n <div class='interactiveIconLarge'>\n {isLightTheme ? (\n <searchcraft-clear-icon-set type='arrow-light' />\n ) : (\n <searchcraft-clear-icon-set type='arrow-dark' />\n )}\n </div>\n )}\n <div class='imageContainer'>\n <img\n alt={this.imageDescription}\n class={isLightTheme ? 'imageLight' : 'imageDark'}\n src={this.imageSource}\n />\n </div>\n <div class='contentContainer'>\n <h2 class={isLightTheme ? 'headingLight' : 'headingDark'}>\n {this.headingText}\n {this.isInteractive && (\n <div class='interactiveIconSmall'>\n {isLightTheme ? (\n <searchcraft-clear-icon-set type='arrow-light' />\n ) : (\n <searchcraft-clear-icon-set type='arrow-dark' />\n )}\n </div>\n )}\n </h2>\n <h3 class={isLightTheme ? 'subheadingLight' : 'subheadingDark'}>\n {this.subheadingText}\n </h3>\n <p\n class={isLightTheme ? 'primaryContentLight' : 'primaryContentDark'}\n >\n {this.primaryContent}\n </p>\n <p\n class={\n isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark'\n }\n >\n {this.secondaryContent}\n </p>\n <p\n class={\n isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark'\n }\n >\n {this.tertiaryContent}\n </p>\n {this.buttonText && (\n <button onClick={this.handleButtonClick} type='button'>\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, Element } from '@stencil/core';\nimport type { SearchcraftResponse } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\nimport {\n extractDynamicProperties,\n parseCustomStyles,\n parseSearchKeys,\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 /**\n * Custom styles to apply to search results.\n * Expected format: JSON string, e.g., '{\"borderRadius\": \"10px\", \"padding\": \"16px\"}'\n */\n @Prop() customStylesForResults: string | Record<string, string> = {};\n\n @Element() hostElement: HTMLElement; // Reference to the host element\n\n private unsubscribe: () => void;\n\n componentDidLoad() {\n // Initialize searchKeys if not provided\n if (!this.searchKeys || this.searchKeys.length === 0) {\n console.warn('No searchKeys provided; using empty keys array.');\n this.searchKeys = ''; // Ensure it's explicitly set as an empty array\n }\n\n // Subscribe to state changes\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.searchResults = { ...state.searchResults };\n this.query = state.query;\n });\n\n // Fetch initial state\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 parsedCustomStyles = parseCustomStyles(this.customStylesForResults);\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 // Render the custom element if present, otherwise fallback to default\n const customElement = this.hostElement.querySelector(\n '[slot=\"result-template\"]',\n );\n if (customElement) {\n // Clone the custom element and pass data to it\n const customElementClone = customElement.cloneNode(\n true,\n ) as HTMLElement;\n customElementClone.removeAttribute('slot'); // Remove the slot attribute\n customElementClone.setAttribute(\n 'data-result',\n JSON.stringify(result),\n );\n return (\n <div key={`${dynamicProperties.id}-${index}`}>\n {customElementClone.outerHTML}\n </div>\n );\n }\n // Fallback to the default element\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 customStyles={parsedCustomStyles}\n />\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\n {/* Slot for custom element */}\n <slot name='result-template' />\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}