@searchcraft/javascript-sdk 0.1.0 → 0.1.2

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 (332) hide show
  1. package/dist/cjs/index-5b0b9d4c.js +84 -0
  2. package/dist/cjs/index-5b0b9d4c.js.map +1 -0
  3. package/dist/cjs/{index-0c2339c7.js → index-e7e9ab69.js} +50 -5
  4. package/dist/cjs/index-e7e9ab69.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +5 -1
  6. package/dist/cjs/index.cjs.js.map +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js +460 -0
  9. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js.map +1 -0
  10. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +64 -0
  11. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js.map +1 -0
  12. package/dist/cjs/searchcraft-button-icon.cjs.entry.js +18 -0
  13. package/dist/cjs/searchcraft-button-icon.cjs.entry.js.map +1 -0
  14. package/dist/cjs/searchcraft-button.cjs.entry.js +37 -0
  15. package/dist/cjs/searchcraft-button.cjs.entry.js.map +1 -0
  16. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +2 -2
  17. package/dist/cjs/{store-6c259dd0.js → store-ab3978ce.js} +2 -2
  18. package/dist/cjs/{store-6c259dd0.js.map → store-ab3978ce.js.map} +1 -1
  19. package/dist/cjs/utils-57b6c18f.js +48 -0
  20. package/dist/cjs/utils-57b6c18f.js.map +1 -0
  21. package/dist/collection/assets/searchcraft-button-icons.js +9 -0
  22. package/dist/collection/assets/searchcraft-button-icons.js.map +1 -0
  23. package/dist/collection/assets/searchcraft-clear-icon-set.js +45 -0
  24. package/dist/collection/assets/searchcraft-clear-icon-set.js.map +1 -0
  25. package/dist/collection/assets/searchcraft-search-icon-set.js +45 -0
  26. package/dist/collection/assets/searchcraft-search-icon-set.js.map +1 -0
  27. package/dist/collection/collection-manifest.json +16 -13
  28. package/dist/collection/components/{sc-auto-search-form/sc-auto-search-form.js → searchcraft-auto-search-form/searchcraft-auto-search-form.js} +58 -39
  29. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -0
  30. package/dist/collection/components/{sc-auto-search-form/sc-auto-search-form.module.css → searchcraft-auto-search-form/searchcraft-auto-search-form.module.css} +3 -0
  31. package/dist/collection/components/{sc-base-search-form/sc-base-search-form.js → searchcraft-base-search-form/searchcraft-base-search-form.js} +6 -6
  32. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js.map +1 -0
  33. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +302 -0
  34. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -0
  35. package/dist/collection/components/{sc-base-search-result/sc-base-search-result.module.css → searchcraft-base-search-result/searchcraft-base-search-result.module.css} +42 -2
  36. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +123 -0
  37. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -0
  38. package/dist/collection/components/{sc-button/sc-button.js → searchcraft-button/searchcraft-button.js} +6 -6
  39. package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +1 -0
  40. package/dist/collection/components/{sc-clear-input-button/sc-clear-input-button.js → searchcraft-clear-input-button/searchcraft-clear-input-button.js} +6 -9
  41. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js.map +1 -0
  42. package/dist/collection/components/{sc-clear-input-button/sc-clear-input-button.module.css → searchcraft-clear-input-button/searchcraft-clear-input-button.module.css} +4 -2
  43. package/dist/collection/components/{sc-error-message/sc-error-message.js → searchcraft-error-message/searchcraft-error-message.js} +6 -6
  44. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +1 -0
  45. package/dist/collection/components/{sc-input/sc-input.js → searchcraft-input/searchcraft-input.js} +51 -26
  46. package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +1 -0
  47. package/dist/collection/components/{sc-input/sc-input.module.css → searchcraft-input/searchcraft-input.module.css} +17 -0
  48. package/dist/collection/components/{sc-input-caption/sc-input-caption.js → searchcraft-input-caption/searchcraft-input-caption.js} +5 -5
  49. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js.map +1 -0
  50. package/dist/collection/components/{sc-input-icon/sc-input-icon.js → searchcraft-input-icon/searchcraft-input-icon.js} +6 -7
  51. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js.map +1 -0
  52. package/dist/collection/components/{sc-input-icon/sc-input-icon.module.css → searchcraft-input-icon/searchcraft-input-icon.module.css} +6 -4
  53. package/dist/collection/components/{sc-input-label/sc-input-label.js → searchcraft-input-label/searchcraft-input-label.js} +14 -11
  54. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +1 -0
  55. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +19 -0
  56. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js.map +1 -0
  57. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +19 -0
  58. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js.map +1 -0
  59. package/dist/collection/index.js +3 -1
  60. package/dist/collection/index.js.map +1 -1
  61. package/dist/collection/provider/store.js.map +1 -1
  62. package/dist/collection/utils/utils.js +40 -0
  63. package/dist/collection/utils/utils.js.map +1 -1
  64. package/dist/components/index.js +3 -2
  65. package/dist/components/index.js.map +1 -1
  66. package/dist/components/{p-a912a224.js → p-066c8210.js} +49 -5
  67. package/dist/components/p-066c8210.js.map +1 -0
  68. package/dist/components/p-1912bbbd.js +83 -0
  69. package/dist/components/p-1912bbbd.js.map +1 -0
  70. package/dist/components/p-1bd04bac.js +135 -0
  71. package/dist/components/p-1bd04bac.js.map +1 -0
  72. package/dist/{esm/store-2370857c.js → components/p-36c95064.js} +2 -2
  73. package/dist/components/{p-6f0eaec6.js.map → p-36c95064.js.map} +1 -1
  74. package/dist/components/p-5e3152c4.js +44 -0
  75. package/dist/components/p-5e3152c4.js.map +1 -0
  76. package/dist/components/p-63035c6a.js +50 -0
  77. package/dist/components/p-63035c6a.js.map +1 -0
  78. package/dist/components/p-6f2a72d3.js +41 -0
  79. package/dist/components/p-6f2a72d3.js.map +1 -0
  80. package/dist/components/p-8d9551ce.js +34 -0
  81. package/dist/components/p-8d9551ce.js.map +1 -0
  82. package/dist/components/p-b1ff2296.js +69 -0
  83. package/dist/components/p-b1ff2296.js.map +1 -0
  84. package/dist/components/p-c3838435.js +62 -0
  85. package/dist/components/p-c3838435.js.map +1 -0
  86. package/dist/components/p-cb75ba7a.js +61 -0
  87. package/dist/components/p-cb75ba7a.js.map +1 -0
  88. package/dist/components/p-d0edf961.js +44 -0
  89. package/dist/components/p-d0edf961.js.map +1 -0
  90. package/dist/components/p-d446eda4.js +44 -0
  91. package/dist/components/p-d446eda4.js.map +1 -0
  92. package/dist/components/p-d54bca75.js +50 -0
  93. package/dist/components/p-d54bca75.js.map +1 -0
  94. package/dist/components/p-d6616aa5.js +34 -0
  95. package/dist/components/p-d6616aa5.js.map +1 -0
  96. package/dist/components/searchcraft-auto-search-form.d.ts +11 -0
  97. package/dist/components/searchcraft-auto-search-form.js +185 -0
  98. package/dist/components/searchcraft-auto-search-form.js.map +1 -0
  99. package/dist/components/searchcraft-base-search-form.d.ts +11 -0
  100. package/dist/components/searchcraft-base-search-form.js +153 -0
  101. package/dist/components/searchcraft-base-search-form.js.map +1 -0
  102. package/dist/components/searchcraft-base-search-result.d.ts +11 -0
  103. package/dist/components/searchcraft-base-search-result.js +8 -0
  104. package/dist/components/searchcraft-base-search-result.js.map +1 -0
  105. package/dist/components/searchcraft-base-search-results.d.ts +11 -0
  106. package/dist/components/searchcraft-base-search-results.js +111 -0
  107. package/dist/components/searchcraft-base-search-results.js.map +1 -0
  108. package/dist/components/searchcraft-button-icon.d.ts +11 -0
  109. package/dist/components/searchcraft-button-icon.js +33 -0
  110. package/dist/components/searchcraft-button-icon.js.map +1 -0
  111. package/dist/components/{sc-base-search-form.d.ts → searchcraft-button.d.ts} +4 -4
  112. package/dist/components/searchcraft-button.js +8 -0
  113. package/dist/components/searchcraft-button.js.map +1 -0
  114. package/dist/components/searchcraft-clear-icon-set.d.ts +11 -0
  115. package/dist/components/searchcraft-clear-icon-set.js +8 -0
  116. package/dist/components/searchcraft-clear-icon-set.js.map +1 -0
  117. package/dist/components/searchcraft-clear-input-button.d.ts +11 -0
  118. package/dist/components/searchcraft-clear-input-button.js +8 -0
  119. package/dist/components/searchcraft-clear-input-button.js.map +1 -0
  120. package/dist/components/searchcraft-error-message.d.ts +11 -0
  121. package/dist/components/searchcraft-error-message.js +8 -0
  122. package/dist/components/searchcraft-error-message.js.map +1 -0
  123. package/dist/components/searchcraft-input-caption.d.ts +11 -0
  124. package/dist/components/searchcraft-input-caption.js +8 -0
  125. package/dist/components/searchcraft-input-caption.js.map +1 -0
  126. package/dist/components/searchcraft-input-icon.d.ts +11 -0
  127. package/dist/components/searchcraft-input-icon.js +8 -0
  128. package/dist/components/searchcraft-input-icon.js.map +1 -0
  129. package/dist/components/searchcraft-input-label.d.ts +11 -0
  130. package/dist/components/searchcraft-input-label.js +8 -0
  131. package/dist/components/searchcraft-input-label.js.map +1 -0
  132. package/dist/components/{sc-auto-search-form.d.ts → searchcraft-input.d.ts} +4 -4
  133. package/dist/components/searchcraft-input.js +8 -0
  134. package/dist/components/searchcraft-input.js.map +1 -0
  135. package/dist/components/searchcraft-search-icon-set.d.ts +11 -0
  136. package/dist/components/searchcraft-search-icon-set.js +8 -0
  137. package/dist/components/searchcraft-search-icon-set.js.map +1 -0
  138. package/dist/components/searchcraft-spinner-dark.d.ts +11 -0
  139. package/dist/components/searchcraft-spinner-dark.js +8 -0
  140. package/dist/components/searchcraft-spinner-dark.js.map +1 -0
  141. package/dist/components/searchcraft-spinner-light.d.ts +11 -0
  142. package/dist/components/searchcraft-spinner-light.js +8 -0
  143. package/dist/components/searchcraft-spinner-light.js.map +1 -0
  144. package/dist/esm/index-72ac5051.js +82 -0
  145. package/dist/esm/index-72ac5051.js.map +1 -0
  146. package/dist/esm/{index-c97f8c28.js → index-eace3343.js} +50 -6
  147. package/dist/esm/index-eace3343.js.map +1 -0
  148. package/dist/esm/index.js +2 -1
  149. package/dist/esm/index.js.map +1 -1
  150. package/dist/esm/loader.js +3 -3
  151. package/dist/esm/searchcraft-auto-search-form_13.entry.js +444 -0
  152. package/dist/esm/searchcraft-auto-search-form_13.entry.js.map +1 -0
  153. package/dist/esm/searchcraft-base-search-form.entry.js +60 -0
  154. package/dist/esm/searchcraft-base-search-form.entry.js.map +1 -0
  155. package/dist/esm/searchcraft-button-icon.entry.js +14 -0
  156. package/dist/esm/searchcraft-button-icon.entry.js.map +1 -0
  157. package/dist/esm/searchcraft-button.entry.js +33 -0
  158. package/dist/esm/searchcraft-button.entry.js.map +1 -0
  159. package/dist/esm/searchcraft-javascript-sdk.js +3 -3
  160. package/dist/{components/p-6f0eaec6.js → esm/store-e55b12aa.js} +2 -2
  161. package/dist/esm/{store-2370857c.js.map → store-e55b12aa.js.map} +1 -1
  162. package/dist/esm/utils-02b18bb5.js +44 -0
  163. package/dist/esm/utils-02b18bb5.js.map +1 -0
  164. package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
  165. package/dist/searchcraft-javascript-sdk/p-0ba9029b.js +3 -0
  166. package/dist/searchcraft-javascript-sdk/p-0ba9029b.js.map +1 -0
  167. package/dist/searchcraft-javascript-sdk/{p-6f0eaec6.js → p-36c95064.js} +1 -1
  168. package/dist/searchcraft-javascript-sdk/p-36c95064.js.map +1 -0
  169. package/dist/searchcraft-javascript-sdk/p-437c6ef9.entry.js +2 -0
  170. package/dist/searchcraft-javascript-sdk/p-437c6ef9.entry.js.map +1 -0
  171. package/dist/searchcraft-javascript-sdk/p-562e923d.entry.js +2 -0
  172. package/dist/searchcraft-javascript-sdk/p-562e923d.entry.js.map +1 -0
  173. package/dist/searchcraft-javascript-sdk/p-5959cd6a.entry.js +2 -0
  174. package/dist/searchcraft-javascript-sdk/p-5959cd6a.entry.js.map +1 -0
  175. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js +7 -0
  176. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js.map +1 -0
  177. package/dist/searchcraft-javascript-sdk/p-5e3152c4.js +2 -0
  178. package/dist/searchcraft-javascript-sdk/p-5e3152c4.js.map +1 -0
  179. package/dist/searchcraft-javascript-sdk/p-eb632a89.entry.js +2 -0
  180. package/dist/searchcraft-javascript-sdk/p-eb632a89.entry.js.map +1 -0
  181. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
  182. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  183. package/dist/types/assets/searchcraft-button-icons.d.ts +3 -0
  184. package/dist/types/assets/searchcraft-clear-icon-set.d.ts +8 -0
  185. package/dist/types/assets/searchcraft-search-icon-set.d.ts +8 -0
  186. package/dist/types/components/{sc-auto-search-form/sc-auto-search-form.d.ts → searchcraft-auto-search-form/searchcraft-auto-search-form.d.ts} +4 -18
  187. package/dist/types/components/{sc-base-search-form/sc-base-search-form.d.ts → searchcraft-base-search-form/searchcraft-base-search-form.d.ts} +2 -2
  188. package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +19 -0
  189. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +20 -0
  190. package/dist/types/components/{sc-button/sc-button.d.ts → searchcraft-button/searchcraft-button.d.ts} +1 -1
  191. package/dist/types/components/{sc-clear-input-button/sc-clear-input-button.d.ts → searchcraft-clear-input-button/searchcraft-clear-input-button.d.ts} +1 -1
  192. package/dist/types/components/{sc-error-message/sc-error-message.d.ts → searchcraft-error-message/searchcraft-error-message.d.ts} +1 -1
  193. package/dist/types/components/{sc-input/sc-input.d.ts → searchcraft-input/searchcraft-input.d.ts} +4 -3
  194. package/dist/types/components/{sc-input-caption/sc-input-caption.d.ts → searchcraft-input-caption/searchcraft-input-caption.d.ts} +1 -1
  195. package/dist/types/components/{sc-input-icon/sc-input-icon.d.ts → searchcraft-input-icon/searchcraft-input-icon.d.ts} +1 -1
  196. package/dist/types/components/{sc-input-label/sc-input-label.d.ts → searchcraft-input-label/searchcraft-input-label.d.ts} +2 -2
  197. package/dist/types/components/searchcraft-spinner-dark/searchcraft-spinner-dark.d.ts +3 -0
  198. package/dist/types/components/searchcraft-spinner-light/searchcraft-spinner-light.d.ts +3 -0
  199. package/dist/types/components.d.ts +269 -177
  200. package/dist/types/index.d.ts +1 -0
  201. package/dist/types/provider/store.d.ts +3 -3
  202. package/dist/types/utils/utils.d.ts +8 -0
  203. package/package.json +1 -1
  204. package/dist/cjs/index-0c2339c7.js.map +0 -1
  205. package/dist/cjs/sc-auto-search-form.cjs.entry.js +0 -101
  206. package/dist/cjs/sc-auto-search-form.cjs.entry.js.map +0 -1
  207. package/dist/cjs/sc-base-search-form_11.cjs.entry.js +0 -471
  208. package/dist/cjs/sc-base-search-form_11.cjs.entry.js.map +0 -1
  209. package/dist/cjs/sc-spinner-light-a3bfc8e6.js +0 -20
  210. package/dist/cjs/sc-spinner-light-a3bfc8e6.js.map +0 -1
  211. package/dist/cjs/sc-spinner-light.cjs.entry.js +0 -12
  212. package/dist/cjs/sc-spinner-light.cjs.entry.js.map +0 -1
  213. package/dist/collection/assets/ButtonIcons.js +0 -3
  214. package/dist/collection/assets/ButtonIcons.js.map +0 -1
  215. package/dist/collection/assets/ClearInputIcon.js +0 -6
  216. package/dist/collection/assets/ClearInputIcon.js.map +0 -1
  217. package/dist/collection/assets/SearchIcons.js +0 -6
  218. package/dist/collection/assets/SearchIcons.js.map +0 -1
  219. package/dist/collection/components/sc-auto-search-form/sc-auto-search-form.js.map +0 -1
  220. package/dist/collection/components/sc-base-search-form/sc-base-search-form.js.map +0 -1
  221. package/dist/collection/components/sc-base-search-result/sc-base-search-result.js +0 -242
  222. package/dist/collection/components/sc-base-search-result/sc-base-search-result.js.map +0 -1
  223. package/dist/collection/components/sc-base-search-results/sc-base-search-results.js +0 -58
  224. package/dist/collection/components/sc-base-search-results/sc-base-search-results.js.map +0 -1
  225. package/dist/collection/components/sc-button/sc-button.js.map +0 -1
  226. package/dist/collection/components/sc-clear-input-button/sc-clear-input-button.js.map +0 -1
  227. package/dist/collection/components/sc-error-message/sc-error-message.js.map +0 -1
  228. package/dist/collection/components/sc-input/sc-input.js.map +0 -1
  229. package/dist/collection/components/sc-input-caption/sc-input-caption.js.map +0 -1
  230. package/dist/collection/components/sc-input-icon/sc-input-icon.js.map +0 -1
  231. package/dist/collection/components/sc-input-label/sc-input-label.js.map +0 -1
  232. package/dist/collection/components/sc-spinner-dark/sc-spinner-dark.js +0 -19
  233. package/dist/collection/components/sc-spinner-dark/sc-spinner-dark.js.map +0 -1
  234. package/dist/collection/components/sc-spinner-light/sc-spinner-light.js +0 -19
  235. package/dist/collection/components/sc-spinner-light/sc-spinner-light.js.map +0 -1
  236. package/dist/components/p-074239f9.js +0 -34
  237. package/dist/components/p-074239f9.js.map +0 -1
  238. package/dist/components/p-184d9504.js +0 -61
  239. package/dist/components/p-184d9504.js.map +0 -1
  240. package/dist/components/p-23bdbb1f.js +0 -58
  241. package/dist/components/p-23bdbb1f.js.map +0 -1
  242. package/dist/components/p-255a89f7.js +0 -62
  243. package/dist/components/p-255a89f7.js.map +0 -1
  244. package/dist/components/p-5410e357.js +0 -108
  245. package/dist/components/p-5410e357.js.map +0 -1
  246. package/dist/components/p-5b7b903a.js +0 -71
  247. package/dist/components/p-5b7b903a.js.map +0 -1
  248. package/dist/components/p-75be555b.js +0 -54
  249. package/dist/components/p-75be555b.js.map +0 -1
  250. package/dist/components/p-79564f07.js +0 -41
  251. package/dist/components/p-79564f07.js.map +0 -1
  252. package/dist/components/p-a912a224.js.map +0 -1
  253. package/dist/components/p-b05f23e3.js +0 -18
  254. package/dist/components/p-b05f23e3.js.map +0 -1
  255. package/dist/components/p-c47cb37f.js +0 -46
  256. package/dist/components/p-c47cb37f.js.map +0 -1
  257. package/dist/components/p-c54fdecb.js +0 -164
  258. package/dist/components/p-c54fdecb.js.map +0 -1
  259. package/dist/components/p-dfb43eea.js +0 -34
  260. package/dist/components/p-dfb43eea.js.map +0 -1
  261. package/dist/components/sc-auto-search-form.js +0 -152
  262. package/dist/components/sc-auto-search-form.js.map +0 -1
  263. package/dist/components/sc-base-search-form.js +0 -135
  264. package/dist/components/sc-base-search-form.js.map +0 -1
  265. package/dist/components/sc-base-search-result.d.ts +0 -11
  266. package/dist/components/sc-base-search-result.js +0 -8
  267. package/dist/components/sc-base-search-result.js.map +0 -1
  268. package/dist/components/sc-base-search-results.d.ts +0 -11
  269. package/dist/components/sc-base-search-results.js +0 -83
  270. package/dist/components/sc-base-search-results.js.map +0 -1
  271. package/dist/components/sc-button.d.ts +0 -11
  272. package/dist/components/sc-button.js +0 -8
  273. package/dist/components/sc-button.js.map +0 -1
  274. package/dist/components/sc-clear-input-button.d.ts +0 -11
  275. package/dist/components/sc-clear-input-button.js +0 -8
  276. package/dist/components/sc-clear-input-button.js.map +0 -1
  277. package/dist/components/sc-error-message.d.ts +0 -11
  278. package/dist/components/sc-error-message.js +0 -8
  279. package/dist/components/sc-error-message.js.map +0 -1
  280. package/dist/components/sc-input-caption.d.ts +0 -11
  281. package/dist/components/sc-input-caption.js +0 -8
  282. package/dist/components/sc-input-caption.js.map +0 -1
  283. package/dist/components/sc-input-icon.d.ts +0 -11
  284. package/dist/components/sc-input-icon.js +0 -8
  285. package/dist/components/sc-input-icon.js.map +0 -1
  286. package/dist/components/sc-input-label.d.ts +0 -11
  287. package/dist/components/sc-input-label.js +0 -8
  288. package/dist/components/sc-input-label.js.map +0 -1
  289. package/dist/components/sc-input.d.ts +0 -11
  290. package/dist/components/sc-input.js +0 -8
  291. package/dist/components/sc-input.js.map +0 -1
  292. package/dist/components/sc-spinner-dark.d.ts +0 -11
  293. package/dist/components/sc-spinner-dark.js +0 -8
  294. package/dist/components/sc-spinner-dark.js.map +0 -1
  295. package/dist/components/sc-spinner-light.d.ts +0 -11
  296. package/dist/components/sc-spinner-light.js +0 -8
  297. package/dist/components/sc-spinner-light.js.map +0 -1
  298. package/dist/esm/index-c97f8c28.js.map +0 -1
  299. package/dist/esm/sc-auto-search-form.entry.js +0 -97
  300. package/dist/esm/sc-auto-search-form.entry.js.map +0 -1
  301. package/dist/esm/sc-base-search-form_11.entry.js +0 -457
  302. package/dist/esm/sc-base-search-form_11.entry.js.map +0 -1
  303. package/dist/esm/sc-spinner-light-cdb79a33.js +0 -18
  304. package/dist/esm/sc-spinner-light-cdb79a33.js.map +0 -1
  305. package/dist/esm/sc-spinner-light.entry.js +0 -4
  306. package/dist/esm/sc-spinner-light.entry.js.map +0 -1
  307. package/dist/searchcraft-javascript-sdk/p-6f0eaec6.js.map +0 -1
  308. package/dist/searchcraft-javascript-sdk/p-8e9ba2cf.js +0 -3
  309. package/dist/searchcraft-javascript-sdk/p-8e9ba2cf.js.map +0 -1
  310. package/dist/searchcraft-javascript-sdk/p-94c68cce.js +0 -2
  311. package/dist/searchcraft-javascript-sdk/p-94c68cce.js.map +0 -1
  312. package/dist/searchcraft-javascript-sdk/p-9545c59a.entry.js +0 -7
  313. package/dist/searchcraft-javascript-sdk/p-9545c59a.entry.js.map +0 -1
  314. package/dist/searchcraft-javascript-sdk/p-c632f66c.entry.js +0 -2
  315. package/dist/searchcraft-javascript-sdk/p-c632f66c.entry.js.map +0 -1
  316. package/dist/searchcraft-javascript-sdk/p-f7dbb9a8.entry.js +0 -2
  317. package/dist/searchcraft-javascript-sdk/p-f7dbb9a8.entry.js.map +0 -1
  318. package/dist/types/assets/ButtonIcons.d.ts +0 -1
  319. package/dist/types/assets/ClearInputIcon.d.ts +0 -4
  320. package/dist/types/assets/SearchIcons.d.ts +0 -4
  321. package/dist/types/components/sc-base-search-result/sc-base-search-result.d.ts +0 -16
  322. package/dist/types/components/sc-base-search-results/sc-base-search-results.d.ts +0 -9
  323. package/dist/types/components/sc-spinner-dark/sc-spinner-dark.d.ts +0 -3
  324. package/dist/types/components/sc-spinner-light/sc-spinner-light.d.ts +0 -3
  325. /package/dist/collection/components/{sc-base-search-form/sc-base-search-form.module.css → searchcraft-base-search-form/searchcraft-base-search-form.module.css} +0 -0
  326. /package/dist/collection/components/{sc-base-search-results/sc-base-search-results.module.css → searchcraft-base-search-results/searchcraft-base-search-results.module.css} +0 -0
  327. /package/dist/collection/components/{sc-button/sc-button.module.css → searchcraft-button/searchcraft-button.module.css} +0 -0
  328. /package/dist/collection/components/{sc-error-message/sc-error-message.module.css → searchcraft-error-message/searchcraft-error-message.module.css} +0 -0
  329. /package/dist/collection/components/{sc-input-caption/sc-input-caption.module.css → searchcraft-input-caption/searchcraft-input-caption.module.css} +0 -0
  330. /package/dist/collection/components/{sc-input-label/sc-input-label.module.css → searchcraft-input-label/searchcraft-input-label.module.css} +0 -0
  331. /package/dist/collection/components/{sc-spinner-dark/sc-spinner-dark.module.css → searchcraft-spinner-dark/searchcraft-spinner-dark.module.css} +0 -0
  332. /package/dist/collection/components/{sc-spinner-light/sc-spinner-light.module.css → searchcraft-spinner-light/searchcraft-spinner-light.module.css} +0 -0
@@ -0,0 +1,460 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-e7e9ab69.js');
6
+ const store = require('./store-ab3978ce.js');
7
+ const utils = require('./utils-57b6c18f.js');
8
+ const index$1 = require('./index-5b0b9d4c.js');
9
+
10
+ const searchcraftAutoSearchFormModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.formLTR{text-align:left;width:100%}.formRTL{text-align:right;width:100%}.searchContainer{align-items:center;display:flex;width:100%}";
11
+ const SearchcraftAutoSearchFormStyle0 = searchcraftAutoSearchFormModuleCss;
12
+
13
+ const SearchcraftAutoSearchForm = class {
14
+ constructor(hostRef) {
15
+ index.registerInstance(this, hostRef);
16
+ this.querySubmit = index.createEvent(this, "querySubmit", 7);
17
+ this.debounceTimeout = null;
18
+ this.debounceDelay = 300; // 300ms debounce delay
19
+ this.searchStore = store.useSearchcraftStore.getState();
20
+ this.handleInputChange = (event) => {
21
+ this.query = event.detail;
22
+ this.querySubmit.emit(this.query);
23
+ // Clear the previous debounce timeout
24
+ if (this.debounceTimeout) {
25
+ clearTimeout(this.debounceTimeout);
26
+ }
27
+ // Set a new debounce timeout
28
+ this.debounceTimeout = setTimeout(() => {
29
+ console.log('Debounced search triggered');
30
+ this.runSearch();
31
+ }, this.debounceDelay);
32
+ };
33
+ this.handleClearInput = () => {
34
+ this.query = '';
35
+ console.log('Input cleared');
36
+ if (typeof this.clearInput === 'function') {
37
+ this.clearInput();
38
+ }
39
+ if (this.debounceTimeout) {
40
+ clearTimeout(this.debounceTimeout);
41
+ }
42
+ this.error = false;
43
+ this.searchResults = '';
44
+ };
45
+ this.runSearch = async () => {
46
+ if (this.query.trim() === '') {
47
+ this.error = true;
48
+ this.searchResults = '';
49
+ }
50
+ else {
51
+ this.error = false;
52
+ this.searchStore.setQuery(this.query);
53
+ try {
54
+ await this.searchStore.search();
55
+ this.searchResults = JSON.stringify(this.searchStore.searchResults);
56
+ }
57
+ catch (error) {
58
+ this.error = true;
59
+ }
60
+ }
61
+ };
62
+ this.handleFormSubmit = async (event) => {
63
+ event.preventDefault();
64
+ await this.runSearch();
65
+ };
66
+ this.autoSearchFormClass = '';
67
+ this.clearInput = () => { };
68
+ this.config = {
69
+ apiKey: '',
70
+ endpointURL: '',
71
+ index: [],
72
+ };
73
+ this.customStylesForInput = {};
74
+ this.inputCaptionValue = '';
75
+ this.labelForInput = '';
76
+ this.placeholderValue = 'Search here';
77
+ this.rightToLeftOrientation = false;
78
+ this.searchContainerClass = '';
79
+ this.error = false;
80
+ this.query = '';
81
+ this.searchResults = '';
82
+ }
83
+ componentDidLoad() {
84
+ const searchcraft = new store.g(this.config);
85
+ this.searchStore.initialize(searchcraft, true);
86
+ console.log('Component initialized');
87
+ }
88
+ render() {
89
+ const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';
90
+ const parsedCustomStyles = utils.parseCustomStyles(this.customStylesForInput);
91
+ return (index.h("form", { key: '60978e813198af27c34232ebd1bda4ca4a6f5199', class: `${formClass}`, onSubmit: this.handleFormSubmit }, index.h("searchcraft-input-label", { key: '4418b675769d041c684f15afb2d9b919f765c133', label: this.labelForInput }), index.h("div", { key: '73581bf8fee7deee1bcf426f80493c78e92d8ada', class: 'searchContainer' }, index.h("searchcraft-input", { key: '6e90612f4fc8c773c9f98f5fcfffb303909d3c6f', customStyles: parsedCustomStyles, "input-caption-value": this.inputCaptionValue, onClearInput: this.handleClearInput, onSearchInputChange: this.handleInputChange, "placeholder-value": this.placeholderValue, query: this.query, "right-to-left-orientation": this.rightToLeftOrientation })), this.error && (index.h("searchcraft-error-message", { key: '1637aff0dcac83d975d9d53545e7fee26c41aa7f', errorMessage: 'Please enter a search query.' }))));
92
+ }
93
+ };
94
+ SearchcraftAutoSearchForm.style = SearchcraftAutoSearchFormStyle0;
95
+
96
+ const searchcraftBaseSearchResultModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.interactiveResultContainerLight{background-color:#FAFAFA;align-items:flex-start;border-radius:16px;display:flex;position:relative;flex-direction:column;gap:16px;padding:8px}@media (min-width: 600px){.interactiveResultContainerLight{flex-direction:row}}.interactiveResultContainerDark{background-color:#2E2E2E;align-items:flex-start;border-radius:16px;display:flex;position:relative;flex-direction:column;gap:16px;padding:8px}@media (min-width: 600px){.interactiveResultContainerDark{flex-direction:row}}.resultContainer{align-items:flex-start;display:flex;flex-direction:column;gap:16px}@media (min-width: 600px){.resultContainer{flex-direction:row}}.interactiveIconLarge{display:inline-block;position:absolute;right:5px;top:8px}@media (max-width: 600px){.interactiveIconLarge{display:none}}.interactiveIconSmall{position:absolute;right:5px;top:-2px;display:inline-block}@media (min-width: 600px){.interactiveIconSmall{display:none}}.imageContainer{max-height:540px;max-width:100%}@media (min-width: 600px){.imageContainer{max-height:100%;max-width:50%}}.contentContainer{max-height:100%;max-width:100%}@media (min-width: 600px){.contentContainer{max-width:50%}}.imageLight{aspect-ratio:2/1;border-radius:8px;max-height:100%;max-width:100%;border:1px solid #D9D9D9}.imageDark{aspect-ratio:2/1;border-radius:8px;max-height:100%;max-width:100%;border:1px solid #333}.headingLight{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0px;position:relative;color:#292929}.headingDark{font-family:var(--font-stack);font-size:16px;font-weight:700;line-height:20px;margin-bottom:4px;margin-top:0px;position:relative;color:#FFF}.subheadingLight{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;color:#737373}.subheadingDark{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-bottom:4px;margin-top:0px;color:#BFBFBF}.primaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.primaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}.secondaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.secondaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}.tertiaryContentLight{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#404040}.tertiaryContentDark{font-family:var(--font-stack);font-size:16px;font-weight:400;line-height:20px;margin-bottom:4px;margin-top:0px;color:#E6E6E6}";
97
+ const SearchcraftBaseSearchResultStyle0 = searchcraftBaseSearchResultModuleCss;
98
+
99
+ const SearchcraftBaseSearchResult = class {
100
+ constructor(hostRef) {
101
+ index.registerInstance(this, hostRef);
102
+ this.buttonCallback = index.createEvent(this, "buttonCallback", 7);
103
+ this.keyDownCallback = index.createEvent(this, "keyDownCallback", 7);
104
+ this.resultCallback = index.createEvent(this, "resultCallback", 7);
105
+ this.buttonCallback = () => { }; // Callback for button click
106
+ this.keyDownCallback = () => { }; // Callback for key down event
107
+ this.resultCallback = () => { }; // Callback for result container click
108
+ this.handleButtonClick = () => {
109
+ this.buttonCallback();
110
+ };
111
+ this.handleContainerClick = () => {
112
+ if (this.isInteractive) {
113
+ this.resultCallback();
114
+ }
115
+ };
116
+ this.buttonText = '';
117
+ this.imageDescription = '';
118
+ this.imageSource = '';
119
+ this.isInteractive = false;
120
+ this.primaryContent = '';
121
+ this.secondaryContent = '';
122
+ this.tertiaryContent = '';
123
+ this.headingText = '';
124
+ this.subheadingText = '';
125
+ this.themeMode = 'light';
126
+ this.customStyles = {};
127
+ }
128
+ render() {
129
+ const isLightTheme = this.themeMode === 'light';
130
+ const containerStyle = Object.assign({}, this.customStyles);
131
+ return (index.h("div", { key: '512b19a2637993cd71fe9b0ac1557106f8501cf2', class: this.isInteractive
132
+ ? isLightTheme
133
+ ? 'interactiveResultContainerLight'
134
+ : 'interactiveResultContainerDark'
135
+ : 'resultContainer', id: 'searchcraft-item', onClick: this.handleContainerClick, onKeyDown: this.keyDownCallback, style: containerStyle, tabindex: '0' }, this.isInteractive && (index.h("div", { key: '735b5c931e6bb209cb948d1a4834f689c836528c', class: 'interactiveIconLarge' }, isLightTheme ? (index.h("searchcraft-clear-icon-set", { type: 'arrow-light' })) : (index.h("searchcraft-clear-icon-set", { type: 'arrow-dark' })))), index.h("div", { key: 'd864f312cc779cb52f7f4529691f32b2460a38c1', class: 'imageContainer' }, index.h("img", { key: 'b705f3ebaa1c02e0a80c181c0cb9e6c5afd1b10c', alt: this.imageDescription, class: isLightTheme ? 'imageLight' : 'imageDark', src: this.imageSource })), index.h("div", { key: 'da90f1ba12456a8a25c5983e1061fba917632ebf', class: 'contentContainer' }, index.h("h2", { key: '27af1079e7b12025a96cc0ac890dc9a2516bfa4a', class: isLightTheme ? 'headingLight' : 'headingDark' }, this.headingText, this.isInteractive && (index.h("div", { key: 'da3f8e81bb039fb68b1afb8e3656ce04adc552ba', class: 'interactiveIconSmall' }, isLightTheme ? (index.h("searchcraft-clear-icon-set", { type: 'arrow-light' })) : (index.h("searchcraft-clear-icon-set", { type: 'arrow-dark' }))))), index.h("h3", { key: 'f62cd5e67cdf03286387061ed944504ac1b0e0d2', class: isLightTheme ? 'subheadingLight' : 'subheadingDark' }, this.subheadingText), index.h("p", { key: 'b8024831da3be09abfb758370e25b42a7d9e8517', class: isLightTheme ? 'primaryContentLight' : 'primaryContentDark' }, this.primaryContent), index.h("p", { key: 'b9a847323f17b8cda2c8de170c9308359f113cfd', class: isLightTheme ? 'secondaryContentLight' : 'secondaryContentDark' }, this.secondaryContent), index.h("p", { key: 'cda9259099171541f59fcf6ab4524d4ba3d40f29', class: isLightTheme ? 'tertiaryContentLight' : 'tertiaryContentDark' }, this.tertiaryContent), this.buttonText && (index.h("button", { key: 'f527dad1a614f3bf54d8ce724f374423013f8ca2', onClick: this.handleButtonClick, type: 'button' }, this.buttonText)))));
136
+ }
137
+ };
138
+ SearchcraftBaseSearchResult.style = SearchcraftBaseSearchResultStyle0;
139
+
140
+ 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}";
141
+ const SearchcraftBaseSearchResultsStyle0 = searchcraftBaseSearchResultsModuleCss;
142
+
143
+ const SearchcraftBaseSearchResults = class {
144
+ constructor(hostRef) {
145
+ index.registerInstance(this, hostRef);
146
+ this.query = '';
147
+ this.searchResults = null;
148
+ this.searchKeys = '';
149
+ this.customStylesForResults = {};
150
+ }
151
+ componentDidLoad() {
152
+ // Initialize searchKeys if not provided
153
+ if (!this.searchKeys || this.searchKeys.length === 0) {
154
+ console.warn('No searchKeys provided; using empty keys array.');
155
+ this.searchKeys = ''; // Ensure it's explicitly set as an empty array
156
+ }
157
+ // Subscribe to state changes
158
+ this.unsubscribe = store.useSearchcraftStore.subscribe((state) => {
159
+ this.searchResults = Object.assign({}, state.searchResults);
160
+ this.query = state.query;
161
+ });
162
+ // Fetch initial state
163
+ const { searchResults, query } = store.useSearchcraftStore.getState();
164
+ this.searchResults = searchResults;
165
+ this.query = query;
166
+ }
167
+ disconnectedCallback() {
168
+ if (this.unsubscribe) {
169
+ this.unsubscribe();
170
+ }
171
+ }
172
+ render() {
173
+ var _a, _b, _c, _d, _e, _f, _g;
174
+ if (!((_a = this.searchResults) === null || _a === void 0 ? void 0 : _a.data)) {
175
+ console.warn('No search results data available');
176
+ return index.h("div", null, "No results to display.");
177
+ }
178
+ const parsedSearchKeys = utils.parseSearchKeys(this.searchKeys);
179
+ const parsedCustomStyles = utils.parseCustomStyles(this.customStylesForResults);
180
+ return (index.h("div", { class: 'resultsContainer' }, (_d = (_c = (_b = this.searchResults) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.hits) === null || _d === void 0 ? void 0 :
181
+ _d.map((document, index$1) => {
182
+ const { doc: result } = document;
183
+ const dynamicProperties = utils.extractDynamicProperties(result, parsedSearchKeys);
184
+ // Render the custom element if present, otherwise fallback to default
185
+ const customElement = this.hostElement.querySelector('[slot="result-template"]');
186
+ if (customElement) {
187
+ // Clone the custom element and pass data to it
188
+ const customElementClone = customElement.cloneNode(true);
189
+ customElementClone.removeAttribute('slot'); // Remove the slot attribute
190
+ customElementClone.setAttribute('data-result', JSON.stringify(result));
191
+ return (index.h("div", { key: `${dynamicProperties.id}-${index$1}` }, customElementClone.outerHTML));
192
+ }
193
+ // Fallback to the default element
194
+ return (index.h("searchcraft-base-search-result", { key: `${dynamicProperties.id}-${index$1}`, "button-callback": () => console.log('button callback'), "result-callback": () => console.log('interactive element'), "keydown-callback": () => console.log('keydown'), "is-interactive": true, "heading-text": dynamicProperties[parsedSearchKeys[0]], "subheading-text": dynamicProperties[parsedSearchKeys[1]], "primary-content": dynamicProperties[parsedSearchKeys[2]], "secondary-content": dynamicProperties[parsedSearchKeys[3]], "tertiary-content": dynamicProperties[parsedSearchKeys[4]], "image-source": dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]], customStyles: parsedCustomStyles }));
195
+ }), this.query.length > 0 &&
196
+ ((_g = (_f = (_e = this.searchResults) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.hits) === null || _g === void 0 ? void 0 : _g.length) === 0 && (index.h("searchcraft-error-message", { "error-message": `No search results found for "${this.query}" query` })), index.h("slot", { name: 'result-template' })));
197
+ }
198
+ get hostElement() { return index.getElement(this); }
199
+ };
200
+ SearchcraftBaseSearchResults.style = SearchcraftBaseSearchResultsStyle0;
201
+
202
+ const SearchcraftClearIconSet = class {
203
+ constructor(hostRef) {
204
+ index.registerInstance(this, hostRef);
205
+ this.type = 'clear-light';
206
+ }
207
+ render() {
208
+ switch (this.type) {
209
+ case 'clear-light':
210
+ return (index.h("svg", { width: '22', height: '22', viewBox: '0 0 22 22', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Clear Input Icon Light"), index.h("path", { d: 'M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z', stroke: 'black', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
211
+ case 'clear-dark':
212
+ return (index.h("svg", { width: '22', height: '22', viewBox: '0 0 22 22', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Clear Input Icon Dark"), index.h("path", { d: 'M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z', stroke: 'white', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
213
+ case 'arrow-light':
214
+ return (index.h("svg", { width: '20', height: '21', viewBox: '0 0 20 21', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Arrow Right Icon Light"), index.h("path", { d: 'M7.5 15.0444L12.5 10.0444L7.5 5.04443', stroke: '#737373', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
215
+ case 'arrow-dark':
216
+ return (index.h("svg", { width: '8', height: '12', viewBox: '0 0 8 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, index.h("title", { id: 'icon-title' }, "Searchcraft Arrow Right Icon Dark"), index.h("path", { d: 'M1.5 11L6.5 6L1.5 1', stroke: '#BFBFBF', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
217
+ default:
218
+ return null;
219
+ }
220
+ }
221
+ };
222
+
223
+ 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}";
224
+ const SearchcraftClearInputButtonStyle0 = searchcraftClearInputButtonModuleCss;
225
+
226
+ const SearchcraftClearInputButton = class {
227
+ constructor(hostRef) {
228
+ index.registerInstance(this, hostRef);
229
+ this.clearInput = index.createEvent(this, "clearInput", 7);
230
+ // Added a click handler to emit the event
231
+ this.handleClearClick = (event) => {
232
+ event.preventDefault(); // Prevent default if necessary
233
+ this.clearInput.emit(); // Emit the event
234
+ };
235
+ this.isRequesting = false;
236
+ this.rightToLeftOrientation = false;
237
+ this.theme = 'light';
238
+ }
239
+ isLightTheme() {
240
+ return this.theme === 'light';
241
+ }
242
+ render() {
243
+ return this.rightToLeftOrientation ? (index.h("button", { class: index$1.classNames('inputClearButtonRTL', '.sc-clear-input-button-rtl'), onClick: this.handleClearClick, type: 'button' }, this.isRequesting ? (this.isLightTheme ? (index.h("searchcraft-spinner-light", null)) : (index.h("searchcraft-spinner-dark", null))) : this.isLightTheme ? (index.h("searchcraft-clear-icon-set", { type: 'clear-light' })) : (index.h("searchcraft-clear-icon-set", { type: 'clear-dark' })))) : (index.h("button", { class: index$1.classNames('inputClearButtonLTR', '.sc-clear-input-button-ltr'), onClick: this.handleClearClick, type: 'button' }, this.isRequesting ? (this.isLightTheme ? (index.h("searchcraft-spinner-light", null)) : (index.h("searchcraft-spinner-dark", null))) : this.isLightTheme ? (index.h("searchcraft-clear-icon-set", { type: 'clear-light' })) : (index.h("searchcraft-clear-icon-set", { type: 'clear-dark' }))));
244
+ }
245
+ };
246
+ SearchcraftClearInputButton.style = SearchcraftClearInputButtonStyle0;
247
+
248
+ 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}";
249
+ const SearchcraftErrorMessageStyle0 = searchcraftErrorMessageModuleCss;
250
+
251
+ const SearchcraftErrorMessage = class {
252
+ constructor(hostRef) {
253
+ index.registerInstance(this, hostRef);
254
+ this.errorMessage = undefined;
255
+ this.theme = 'light';
256
+ }
257
+ render() {
258
+ const errorMessageStyle = this.theme === 'light' ? 'errorMessageLight' : 'errorMessageDark';
259
+ return (index.h("p", { key: '4e0b94cb24f940e8c404fd752e6f02f977190043', class: index$1.classNames(errorMessageStyle) }, this.errorMessage || 'Search term is required.'));
260
+ }
261
+ };
262
+ SearchcraftErrorMessage.style = SearchcraftErrorMessageStyle0;
263
+
264
+ 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%}";
265
+ const SearchcraftInputStyle0 = searchcraftInputModuleCss;
266
+
267
+ const SearchcraftInput = class {
268
+ constructor(hostRef) {
269
+ index.registerInstance(this, hostRef);
270
+ this.clearInput = index.createEvent(this, "clearInput", 7);
271
+ this.searchInputChange = index.createEvent(this, "searchInputChange", 7);
272
+ this.customStyles = {};
273
+ this.error = false;
274
+ this.formClassName = '';
275
+ this.inputCaptionClassName = '';
276
+ this.inputCaptionValue = '';
277
+ this.inputClassName = '';
278
+ this.placeholderValue = 'Enter Search';
279
+ this.rightToLeftOrientation = false;
280
+ this.query = '';
281
+ this.theme = 'light';
282
+ }
283
+ get isLightTheme() {
284
+ return this.theme === 'light';
285
+ }
286
+ handleInputChange(event) {
287
+ const input = event.target;
288
+ this.searchInputChange.emit(input.value);
289
+ }
290
+ handleClearInput() {
291
+ if (this.clearInput) {
292
+ this.clearInput.emit();
293
+ }
294
+ }
295
+ render() {
296
+ const containerClassName = this.rightToLeftOrientation
297
+ ? 'inputContainerRTL'
298
+ : 'inputContainerLTR';
299
+ const inputClassName = index$1.classNames(this.error
300
+ ? this.isLightTheme
301
+ ? 'inputErrorLightRTL'
302
+ : 'inputErrorDarkRTL'
303
+ : this.isLightTheme
304
+ ? 'inputLightLTR'
305
+ : 'inputDarkLTR', 'searchcraft-input');
306
+ const validatedCustomStyles = utils.parseCustomStyles(this.customStyles);
307
+ const placeholderStyle = {
308
+ fontSize: validatedCustomStyles.placeholderFontSize || '16px',
309
+ };
310
+ return (index.h("div", { key: '3a3fa1335552c53967d35219819024377e726d80', class: index$1.classNames(containerClassName, this.formClassName, 'searchcraft-input-form') }, this.rightToLeftOrientation ? (index.h(index.Fragment, null, index.h("input", { class: index$1.classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), index.h("style", null, `
311
+ #searchcraft-input-id::placeholder {
312
+ font-size: ${placeholderStyle.fontSize};
313
+ }
314
+ `), this.inputCaptionValue && (index.h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (index.h("searchcraft-clear-input-button", { onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation })), index.h("searchcraft-input-icon", { error: this.error, rightToLeftOrientation: this.rightToLeftOrientation }))) : (index.h("div", { class: 'inputWrapper' }, index.h("searchcraft-input-icon", { error: this.error, rightToLeftOrientation: this.rightToLeftOrientation }), index.h("input", { class: index$1.classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), index.h("style", null, `
315
+ #searchcraft-input-id::placeholder {
316
+ font-size: ${placeholderStyle.fontSize};
317
+ }
318
+ `), this.inputCaptionValue && (index.h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (index.h("searchcraft-clear-input-button", { onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation }))))));
319
+ }
320
+ };
321
+ SearchcraftInput.style = SearchcraftInputStyle0;
322
+
323
+ 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}";
324
+ const SearchcraftInputCaptionStyle0 = searchcraftInputCaptionModuleCss;
325
+
326
+ const SearchcraftInputCaption = class {
327
+ constructor(hostRef) {
328
+ index.registerInstance(this, hostRef);
329
+ this.error = undefined;
330
+ this.inputCaptionClassName = '';
331
+ this.inputCaptionValue = 'Enter Search';
332
+ this.rightToLeftOrientation = false;
333
+ this.theme = 'light';
334
+ }
335
+ isLightTheme() {
336
+ return this.theme === 'light';
337
+ }
338
+ render() {
339
+ return this.rightToLeftOrientation ? (index.h("p", { class: index$1.classNames(this.error
340
+ ? this.isLightTheme
341
+ ? 'inputCaptionErrorLightRTL'
342
+ : 'inputCaptionErrorDarkRTL'
343
+ : this.isLightTheme
344
+ ? 'inputCaptionLightRTL'
345
+ : 'inputCaptionDarkRTL', this.inputCaptionClassName, '.searchcraft-input-caption') }, this.inputCaptionValue)) : (index.h("p", { class: index$1.classNames(this.error
346
+ ? this.isLightTheme
347
+ ? 'inputCaptionErrorLightLTR'
348
+ : 'inputCaptionErrorDarkLTR'
349
+ : this.isLightTheme
350
+ ? 'inputCaptionLightLTR'
351
+ : 'inputCaptionDarkLTR', this.inputCaptionClassName, '.searchcraft-input-caption') }, this.inputCaptionValue));
352
+ }
353
+ };
354
+ SearchcraftInputCaption.style = SearchcraftInputCaptionStyle0;
355
+
356
+ 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}";
357
+ const SearchcraftInputIconStyle0 = searchcraftInputIconModuleCss;
358
+
359
+ const SearchcraftInputIcon = class {
360
+ constructor(hostRef) {
361
+ index.registerInstance(this, hostRef);
362
+ this.error = undefined;
363
+ this.rightToLeftOrientation = false;
364
+ this.theme = 'light';
365
+ }
366
+ isLightTheme() {
367
+ return this.theme === 'light';
368
+ }
369
+ render() {
370
+ return this.error ? (index.h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme ? (index.h("searchcraft-search-icon-set", { type: 'error-light' })) : (index.h("searchcraft-search-icon-set", { type: 'error-dark' })))) : (index.h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme ? (index.h("searchcraft-search-icon-set", { type: 'search-light' })) : (index.h("searchcraft-search-icon-set", { type: 'search-dark' }))));
371
+ }
372
+ };
373
+ SearchcraftInputIcon.style = SearchcraftInputIconStyle0;
374
+
375
+ 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}";
376
+ const SearchcraftInputLabelStyle0 = searchcraftInputLabelModuleCss;
377
+
378
+ const SearchcraftInputLabel = class {
379
+ constructor(hostRef) {
380
+ index.registerInstance(this, hostRef);
381
+ this.inputLabelClassName = '';
382
+ this.label = undefined;
383
+ this.theme = 'light';
384
+ }
385
+ isLightTheme() {
386
+ return this.theme === 'light';
387
+ }
388
+ render() {
389
+ // Render nothing if no label prop is provided
390
+ if (!this.label) {
391
+ return null;
392
+ }
393
+ const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';
394
+ return (index.h("label", { class: index$1.classNames(labelStyle, this.inputLabelClassName), htmlFor: 'searchcraft-input-id' }, this.label));
395
+ }
396
+ };
397
+ SearchcraftInputLabel.style = SearchcraftInputLabelStyle0;
398
+
399
+ const SearchcraftSearchIconSet = class {
400
+ constructor(hostRef) {
401
+ index.registerInstance(this, hostRef);
402
+ this.type = 'search-dark';
403
+ }
404
+ render() {
405
+ switch (this.type) {
406
+ case 'search-light':
407
+ return (index.h("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Search Icon Light"), index.h("path", { d: 'M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z', stroke: '#404040', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
408
+ case 'search-dark':
409
+ return (index.h("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Search Icon Dark"), index.h("path", { d: 'M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z', stroke: '#E6E6E6', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
410
+ case 'error-light':
411
+ return (index.h("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Error Search Icon Light"), index.h("path", { d: 'M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z', stroke: '#737373', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
412
+ case 'error-dark':
413
+ return (index.h("svg", { width: '18', height: '18', viewBox: '0 0 18 18', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, index.h("title", { id: 'searchcraft-title' }, "Searchcraft Error Search Icon Dark"), index.h("path", { d: 'M16.5 16.5L12.875 12.875M14.8333 8.16667C14.8333 11.8486 11.8486 14.8333 8.16667 14.8333C4.48477 14.8333 1.5 11.8486 1.5 8.16667C1.5 4.48477 4.48477 1.5 8.16667 1.5C11.8486 1.5 14.8333 4.48477 14.8333 8.16667Z', stroke: '#BFBFBF', "stroke-width": '1.5', "stroke-linecap": 'round', "stroke-linejoin": 'round' })));
414
+ default:
415
+ return null;
416
+ }
417
+ }
418
+ };
419
+
420
+ 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)}}";
421
+ const SearchcraftSpinnerDarkStyle0 = searchcraftSpinnerDarkModuleCss;
422
+
423
+ const SearchcraftSpinnerDark = class {
424
+ constructor(hostRef) {
425
+ index.registerInstance(this, hostRef);
426
+ }
427
+ render() {
428
+ return (index.h("div", { key: 'fc32dd86414502f1895b157d8aa28645a5391ff9', class: 'spinnerContainer' }, index.h("div", { key: '260233361f9ff5a17d05b92e41ec2fc13adc2dbf', class: 'spinnerDark' })));
429
+ }
430
+ };
431
+ SearchcraftSpinnerDark.style = SearchcraftSpinnerDarkStyle0;
432
+
433
+ 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)}}";
434
+ const SearchcraftSpinnerLightStyle0 = searchcraftSpinnerLightModuleCss;
435
+
436
+ const SearchcraftSpinnerLight = class {
437
+ constructor(hostRef) {
438
+ index.registerInstance(this, hostRef);
439
+ }
440
+ render() {
441
+ return (index.h("div", { key: '0e0faa615a1548868153b07bb467ee85eabcdd09', class: 'spinnerContainer' }, index.h("div", { key: 'a9aac4d029d9072e01cc643da62f3338622f0ef0', class: 'spinnerLight' })));
442
+ }
443
+ };
444
+ SearchcraftSpinnerLight.style = SearchcraftSpinnerLightStyle0;
445
+
446
+ exports.searchcraft_auto_search_form = SearchcraftAutoSearchForm;
447
+ exports.searchcraft_base_search_result = SearchcraftBaseSearchResult;
448
+ exports.searchcraft_base_search_results = SearchcraftBaseSearchResults;
449
+ exports.searchcraft_clear_icon_set = SearchcraftClearIconSet;
450
+ exports.searchcraft_clear_input_button = SearchcraftClearInputButton;
451
+ exports.searchcraft_error_message = SearchcraftErrorMessage;
452
+ exports.searchcraft_input = SearchcraftInput;
453
+ exports.searchcraft_input_caption = SearchcraftInputCaption;
454
+ exports.searchcraft_input_icon = SearchcraftInputIcon;
455
+ exports.searchcraft_input_label = SearchcraftInputLabel;
456
+ exports.searchcraft_search_icon_set = SearchcraftSearchIconSet;
457
+ exports.searchcraft_spinner_dark = SearchcraftSpinnerDark;
458
+ exports.searchcraft_spinner_light = SearchcraftSpinnerLight;
459
+
460
+ //# sourceMappingURL=searchcraft-auto-search-form_13.cjs.entry.js.map