@searchcraft/javascript-sdk 0.2.7 → 0.2.8

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 (269) hide show
  1. package/dist/components/searchcraft-dash-icon.d.ts +11 -0
  2. package/dist/searchcraft-javascript-sdk/_commonjsHelpers-63cbe26c.js +34 -0
  3. package/dist/searchcraft-javascript-sdk/_commonjsHelpers-63cbe26c.js.map +1 -0
  4. package/dist/searchcraft-javascript-sdk/index-8211f330.js +3043 -0
  5. package/dist/searchcraft-javascript-sdk/index-8211f330.js.map +1 -0
  6. package/dist/{components/p-5cdc6210.js → searchcraft-javascript-sdk/index-d6567b9c.js} +10 -2
  7. package/dist/searchcraft-javascript-sdk/index-d6567b9c.js.map +1 -0
  8. package/dist/searchcraft-javascript-sdk/index.esm.js +14 -1
  9. package/dist/searchcraft-javascript-sdk/index.esm.js.map +1 -1
  10. package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js +127 -0
  11. package/dist/searchcraft-javascript-sdk/searchcraft-auto-search-form.entry.js.map +1 -0
  12. package/dist/{esm → searchcraft-javascript-sdk}/searchcraft-base-search-form.entry.js +6 -5
  13. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-form.entry.js.map +1 -0
  14. package/dist/{components/p-1b18e9fe.js → searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js} +11 -40
  15. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-result.entry.js.map +1 -0
  16. package/dist/{components/searchcraft-base-search-results.js → searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js} +12 -56
  17. package/dist/searchcraft-javascript-sdk/searchcraft-base-search-results.entry.js.map +1 -0
  18. package/dist/{esm → searchcraft-javascript-sdk}/searchcraft-button-icon.entry.js +1 -1
  19. package/dist/searchcraft-javascript-sdk/searchcraft-button-icon.entry.js.map +1 -0
  20. package/dist/{esm → searchcraft-javascript-sdk}/searchcraft-button.entry.js +5 -5
  21. package/dist/searchcraft-javascript-sdk/searchcraft-button.entry.js.map +1 -0
  22. package/dist/{collection/assets/searchcraft-check-icon.js → searchcraft-javascript-sdk/searchcraft-check-icon.entry.js} +11 -6
  23. package/dist/searchcraft-javascript-sdk/searchcraft-check-icon.entry.js.map +1 -0
  24. package/dist/{components/p-70722ab2.js → searchcraft-javascript-sdk/searchcraft-clear-icon-set.entry.js} +7 -24
  25. package/dist/searchcraft-javascript-sdk/searchcraft-clear-icon-set.entry.js.map +1 -0
  26. package/dist/searchcraft-javascript-sdk/searchcraft-clear-input-button.entry.js +30 -0
  27. package/dist/searchcraft-javascript-sdk/searchcraft-clear-input-button.entry.js.map +1 -0
  28. package/dist/searchcraft-javascript-sdk/searchcraft-dash-icon.entry.js +14 -0
  29. package/dist/searchcraft-javascript-sdk/searchcraft-dash-icon.entry.js.map +1 -0
  30. package/dist/searchcraft-javascript-sdk/searchcraft-error-message.entry.js +22 -0
  31. package/dist/searchcraft-javascript-sdk/searchcraft-error-message.entry.js.map +1 -0
  32. package/dist/searchcraft-javascript-sdk/searchcraft-filters-list.entry.js +120 -0
  33. package/dist/searchcraft-javascript-sdk/searchcraft-filters-list.entry.js.map +1 -0
  34. package/dist/{components/p-6237f03e.js → searchcraft-javascript-sdk/searchcraft-input-caption.entry.js} +10 -31
  35. package/dist/searchcraft-javascript-sdk/searchcraft-input-caption.entry.js.map +1 -0
  36. package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js +25 -0
  37. package/dist/searchcraft-javascript-sdk/searchcraft-input-icon.entry.js.map +1 -0
  38. package/dist/searchcraft-javascript-sdk/searchcraft-input-label.entry.js +29 -0
  39. package/dist/searchcraft-javascript-sdk/searchcraft-input-label.entry.js.map +1 -0
  40. package/dist/{components/p-643cfdcf.js → searchcraft-javascript-sdk/searchcraft-input.entry.js} +12 -83
  41. package/dist/searchcraft-javascript-sdk/searchcraft-input.entry.js.map +1 -0
  42. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +48 -1
  43. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  44. package/dist/{collection/components/searchcraft-results-info/searchcraft-results-info.js → searchcraft-javascript-sdk/searchcraft-results-info.entry.js} +16 -26
  45. package/dist/searchcraft-javascript-sdk/searchcraft-results-info.entry.js.map +1 -0
  46. package/dist/{components/p-a3bd1bc8.js → searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js} +7 -26
  47. package/dist/searchcraft-javascript-sdk/searchcraft-search-icon-set.entry.js.map +1 -0
  48. package/dist/{components/searchcraft-slider.js → searchcraft-javascript-sdk/searchcraft-slider.entry.js} +11 -36
  49. package/dist/searchcraft-javascript-sdk/searchcraft-slider.entry.js.map +1 -0
  50. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-dark.entry.js +17 -0
  51. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-dark.entry.js.map +1 -0
  52. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-light.entry.js +17 -0
  53. package/dist/searchcraft-javascript-sdk/searchcraft-spinner-light.entry.js.map +1 -0
  54. package/dist/{components/searchcraft-toggle-button.js → searchcraft-javascript-sdk/searchcraft-toggle-button.entry.js} +11 -33
  55. package/dist/searchcraft-javascript-sdk/searchcraft-toggle-button.entry.js.map +1 -0
  56. package/dist/searchcraft-javascript-sdk/shadow-css-423dab2c.js +334 -0
  57. package/dist/searchcraft-javascript-sdk/shadow-css-423dab2c.js.map +1 -0
  58. package/dist/searchcraft-javascript-sdk/store-08ee97f6.js +3073 -0
  59. package/dist/searchcraft-javascript-sdk/store-08ee97f6.js.map +1 -0
  60. package/dist/{components/p-2bda632c.js → searchcraft-javascript-sdk/utils-9f198636.js} +19 -8
  61. package/dist/searchcraft-javascript-sdk/utils-9f198636.js.map +1 -0
  62. package/dist/types/assets/searchcraft-dash-icon.d.ts +3 -0
  63. package/dist/types/components/searchcraft-filters-list/searchcraft-filters-list.d.ts +13 -5
  64. package/dist/types/components.d.ts +13 -0
  65. package/dist/types/utils/utils.d.ts +3 -0
  66. package/package.json +1 -1
  67. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  68. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  69. package/dist/cjs/index-5b0b9d4c.js +0 -84
  70. package/dist/cjs/index-5b0b9d4c.js.map +0 -1
  71. package/dist/cjs/index-6c5282a0.js +0 -1279
  72. package/dist/cjs/index-6c5282a0.js.map +0 -1
  73. package/dist/cjs/index.cjs.js +0 -17
  74. package/dist/cjs/index.cjs.js.map +0 -1
  75. package/dist/cjs/loader.cjs.js +0 -17
  76. package/dist/cjs/loader.cjs.js.map +0 -1
  77. package/dist/cjs/searchcraft-auto-search-form_18.cjs.entry.js +0 -821
  78. package/dist/cjs/searchcraft-auto-search-form_18.cjs.entry.js.map +0 -1
  79. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +0 -64
  80. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js.map +0 -1
  81. package/dist/cjs/searchcraft-button-icon.cjs.entry.js +0 -18
  82. package/dist/cjs/searchcraft-button-icon.cjs.entry.js.map +0 -1
  83. package/dist/cjs/searchcraft-button.cjs.entry.js +0 -37
  84. package/dist/cjs/searchcraft-button.cjs.entry.js.map +0 -1
  85. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +0 -27
  86. package/dist/cjs/searchcraft-javascript-sdk.cjs.js.map +0 -1
  87. package/dist/cjs/store-c44c58ab.js +0 -314
  88. package/dist/cjs/store-c44c58ab.js.map +0 -1
  89. package/dist/cjs/utils-2dc6115c.js +0 -84
  90. package/dist/cjs/utils-2dc6115c.js.map +0 -1
  91. package/dist/collection/assets/searchcraft-button-icons.js +0 -9
  92. package/dist/collection/assets/searchcraft-button-icons.js.map +0 -1
  93. package/dist/collection/assets/searchcraft-check-icon.js.map +0 -1
  94. package/dist/collection/assets/searchcraft-clear-icon-set.js +0 -45
  95. package/dist/collection/assets/searchcraft-clear-icon-set.js.map +0 -1
  96. package/dist/collection/assets/searchcraft-search-icon-set.js +0 -84
  97. package/dist/collection/assets/searchcraft-search-icon-set.js.map +0 -1
  98. package/dist/collection/collection-manifest.json +0 -32
  99. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +0 -365
  100. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +0 -1
  101. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.css +0 -15
  102. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js +0 -168
  103. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js.map +0 -1
  104. package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.module.css +0 -18
  105. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +0 -329
  106. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +0 -1
  107. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +0 -224
  108. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +0 -270
  109. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +0 -1
  110. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +0 -47
  111. package/dist/collection/components/searchcraft-button/searchcraft-button.js +0 -137
  112. package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +0 -1
  113. package/dist/collection/components/searchcraft-button/searchcraft-button.module.css +0 -82
  114. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js +0 -95
  115. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js.map +0 -1
  116. package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.module.css +0 -33
  117. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +0 -64
  118. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +0 -1
  119. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.module.css +0 -21
  120. package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js +0 -172
  121. package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js.map +0 -1
  122. package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.module.css +0 -83
  123. package/dist/collection/components/searchcraft-input/searchcraft-input.js +0 -352
  124. package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +0 -1
  125. package/dist/collection/components/searchcraft-input/searchcraft-input.module.css +0 -241
  126. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js +0 -122
  127. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js.map +0 -1
  128. package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.module.css +0 -79
  129. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js +0 -109
  130. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js.map +0 -1
  131. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.module.css +0 -17
  132. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +0 -76
  133. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +0 -1
  134. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.module.css +0 -21
  135. package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js.map +0 -1
  136. package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.module.css +0 -15
  137. package/dist/collection/components/searchcraft-slider/searchcraft-slider.js +0 -128
  138. package/dist/collection/components/searchcraft-slider/searchcraft-slider.js.map +0 -1
  139. package/dist/collection/components/searchcraft-slider/searchcraft-slider.module.css +0 -68
  140. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +0 -19
  141. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js.map +0 -1
  142. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.module.css +0 -35
  143. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +0 -19
  144. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js.map +0 -1
  145. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.module.css +0 -26
  146. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +0 -92
  147. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +0 -1
  148. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.module.css +0 -31
  149. package/dist/collection/index.js +0 -12
  150. package/dist/collection/index.js.map +0 -1
  151. package/dist/collection/provider/store.js +0 -96
  152. package/dist/collection/provider/store.js.map +0 -1
  153. package/dist/collection/utils/utils.js +0 -74
  154. package/dist/collection/utils/utils.js.map +0 -1
  155. package/dist/components/index.js +0 -60
  156. package/dist/components/index.js.map +0 -1
  157. package/dist/components/p-0eb562da.js +0 -67
  158. package/dist/components/p-0eb562da.js.map +0 -1
  159. package/dist/components/p-14f328f4.js +0 -40
  160. package/dist/components/p-14f328f4.js.map +0 -1
  161. package/dist/components/p-157e5b1a.js +0 -310
  162. package/dist/components/p-157e5b1a.js.map +0 -1
  163. package/dist/components/p-1b18e9fe.js.map +0 -1
  164. package/dist/components/p-2bda632c.js.map +0 -1
  165. package/dist/components/p-52b81ff4.js +0 -61
  166. package/dist/components/p-52b81ff4.js.map +0 -1
  167. package/dist/components/p-5cdc6210.js.map +0 -1
  168. package/dist/components/p-6237f03e.js.map +0 -1
  169. package/dist/components/p-643cfdcf.js.map +0 -1
  170. package/dist/components/p-70722ab2.js.map +0 -1
  171. package/dist/components/p-7498e493.js +0 -1113
  172. package/dist/components/p-7498e493.js.map +0 -1
  173. package/dist/components/p-8c38185e.js +0 -53
  174. package/dist/components/p-8c38185e.js.map +0 -1
  175. package/dist/components/p-9952c9ba.js +0 -33
  176. package/dist/components/p-9952c9ba.js.map +0 -1
  177. package/dist/components/p-a3bd1bc8.js.map +0 -1
  178. package/dist/components/p-ae84b899.js +0 -48
  179. package/dist/components/p-ae84b899.js.map +0 -1
  180. package/dist/components/p-bdf84774.js +0 -33
  181. package/dist/components/p-bdf84774.js.map +0 -1
  182. package/dist/components/p-d3187f5a.js +0 -29
  183. package/dist/components/p-d3187f5a.js.map +0 -1
  184. package/dist/components/searchcraft-auto-search-form.js +0 -207
  185. package/dist/components/searchcraft-auto-search-form.js.map +0 -1
  186. package/dist/components/searchcraft-base-search-form.js +0 -152
  187. package/dist/components/searchcraft-base-search-form.js.map +0 -1
  188. package/dist/components/searchcraft-base-search-result.js +0 -8
  189. package/dist/components/searchcraft-base-search-result.js.map +0 -1
  190. package/dist/components/searchcraft-base-search-results.js.map +0 -1
  191. package/dist/components/searchcraft-button-icon.js +0 -32
  192. package/dist/components/searchcraft-button-icon.js.map +0 -1
  193. package/dist/components/searchcraft-button.js +0 -8
  194. package/dist/components/searchcraft-button.js.map +0 -1
  195. package/dist/components/searchcraft-check-icon.js +0 -8
  196. package/dist/components/searchcraft-check-icon.js.map +0 -1
  197. package/dist/components/searchcraft-clear-icon-set.js +0 -8
  198. package/dist/components/searchcraft-clear-icon-set.js.map +0 -1
  199. package/dist/components/searchcraft-clear-input-button.js +0 -8
  200. package/dist/components/searchcraft-clear-input-button.js.map +0 -1
  201. package/dist/components/searchcraft-error-message.js +0 -8
  202. package/dist/components/searchcraft-error-message.js.map +0 -1
  203. package/dist/components/searchcraft-filters-list.js +0 -149
  204. package/dist/components/searchcraft-filters-list.js.map +0 -1
  205. package/dist/components/searchcraft-input-caption.js +0 -8
  206. package/dist/components/searchcraft-input-caption.js.map +0 -1
  207. package/dist/components/searchcraft-input-icon.js +0 -8
  208. package/dist/components/searchcraft-input-icon.js.map +0 -1
  209. package/dist/components/searchcraft-input-label.js +0 -8
  210. package/dist/components/searchcraft-input-label.js.map +0 -1
  211. package/dist/components/searchcraft-input.js +0 -8
  212. package/dist/components/searchcraft-input.js.map +0 -1
  213. package/dist/components/searchcraft-results-info.js +0 -63
  214. package/dist/components/searchcraft-results-info.js.map +0 -1
  215. package/dist/components/searchcraft-search-icon-set.js +0 -8
  216. package/dist/components/searchcraft-search-icon-set.js.map +0 -1
  217. package/dist/components/searchcraft-slider.js.map +0 -1
  218. package/dist/components/searchcraft-spinner-dark.js +0 -8
  219. package/dist/components/searchcraft-spinner-dark.js.map +0 -1
  220. package/dist/components/searchcraft-spinner-light.js +0 -8
  221. package/dist/components/searchcraft-spinner-light.js.map +0 -1
  222. package/dist/components/searchcraft-toggle-button.js.map +0 -1
  223. package/dist/esm/index-0ac5bb53.js +0 -1251
  224. package/dist/esm/index-0ac5bb53.js.map +0 -1
  225. package/dist/esm/index-72ac5051.js +0 -82
  226. package/dist/esm/index-72ac5051.js.map +0 -1
  227. package/dist/esm/index.js +0 -4
  228. package/dist/esm/index.js.map +0 -1
  229. package/dist/esm/loader.js +0 -13
  230. package/dist/esm/loader.js.map +0 -1
  231. package/dist/esm/searchcraft-auto-search-form_18.entry.js +0 -800
  232. package/dist/esm/searchcraft-auto-search-form_18.entry.js.map +0 -1
  233. package/dist/esm/searchcraft-base-search-form.entry.js.map +0 -1
  234. package/dist/esm/searchcraft-button-icon.entry.js.map +0 -1
  235. package/dist/esm/searchcraft-button.entry.js.map +0 -1
  236. package/dist/esm/searchcraft-javascript-sdk.js +0 -22
  237. package/dist/esm/searchcraft-javascript-sdk.js.map +0 -1
  238. package/dist/esm/store-9e0b0710.js +0 -310
  239. package/dist/esm/store-9e0b0710.js.map +0 -1
  240. package/dist/esm/utils-a3373179.js +0 -77
  241. package/dist/esm/utils-a3373179.js.map +0 -1
  242. package/dist/index.cjs.js +0 -1
  243. package/dist/index.js +0 -1
  244. package/dist/loader/cdn.js +0 -1
  245. package/dist/loader/index.cjs.js +0 -1
  246. package/dist/loader/index.d.ts +0 -24
  247. package/dist/loader/index.es2017.js +0 -1
  248. package/dist/loader/index.js +0 -2
  249. package/dist/loader/package.json +0 -11
  250. package/dist/searchcraft-javascript-sdk/p-0880cfbb.js +0 -3
  251. package/dist/searchcraft-javascript-sdk/p-0880cfbb.js.map +0 -1
  252. package/dist/searchcraft-javascript-sdk/p-2bda632c.js +0 -2
  253. package/dist/searchcraft-javascript-sdk/p-2bda632c.js.map +0 -1
  254. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js +0 -7
  255. package/dist/searchcraft-javascript-sdk/p-5cdc6210.js.map +0 -1
  256. package/dist/searchcraft-javascript-sdk/p-5ec960bd.entry.js +0 -2
  257. package/dist/searchcraft-javascript-sdk/p-5ec960bd.entry.js.map +0 -1
  258. package/dist/searchcraft-javascript-sdk/p-66f38e89.entry.js +0 -2
  259. package/dist/searchcraft-javascript-sdk/p-66f38e89.entry.js.map +0 -1
  260. package/dist/searchcraft-javascript-sdk/p-67cc5ccb.entry.js +0 -2
  261. package/dist/searchcraft-javascript-sdk/p-67cc5ccb.entry.js.map +0 -1
  262. package/dist/searchcraft-javascript-sdk/p-901fee50.js +0 -11
  263. package/dist/searchcraft-javascript-sdk/p-901fee50.js.map +0 -1
  264. package/dist/searchcraft-javascript-sdk/p-d9efd790.entry.js +0 -2
  265. package/dist/searchcraft-javascript-sdk/p-d9efd790.entry.js.map +0 -1
  266. package/dist/searchcraft-javascript-sdk/p-e1255160.js +0 -2
  267. package/dist/searchcraft-javascript-sdk/p-e1255160.js.map +0 -1
  268. /package/dist/{esm → searchcraft-javascript-sdk}/app-globals-0f993ce5.js +0 -0
  269. /package/dist/{esm → searchcraft-javascript-sdk}/app-globals-0f993ce5.js.map +0 -0
@@ -1,10 +1,8 @@
1
- import { p as proxyCustomElement, H, h } from './p-7498e493.js';
1
+ import { r as registerInstance, h } from './index-8211f330.js';
2
2
 
3
- const SearchcraftClearIconSet = /*@__PURE__*/ proxyCustomElement(class SearchcraftClearIconSet extends H {
4
- constructor() {
5
- super();
6
- this.__registerHost();
7
- this.__attachShadow();
3
+ const SearchcraftClearIconSet = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
8
6
  this.type = 'clear-light';
9
7
  }
10
8
  render() {
@@ -21,23 +19,8 @@ const SearchcraftClearIconSet = /*@__PURE__*/ proxyCustomElement(class Searchcra
21
19
  return null;
22
20
  }
23
21
  }
24
- }, [1, "searchcraft-clear-icon-set", {
25
- "type": [1]
26
- }]);
27
- function defineCustomElement() {
28
- if (typeof customElements === "undefined") {
29
- return;
30
- }
31
- const components = ["searchcraft-clear-icon-set"];
32
- components.forEach(tagName => { switch (tagName) {
33
- case "searchcraft-clear-icon-set":
34
- if (!customElements.get(tagName)) {
35
- customElements.define(tagName, SearchcraftClearIconSet);
36
- }
37
- break;
38
- } });
39
- }
22
+ };
40
23
 
41
- export { SearchcraftClearIconSet as S, defineCustomElement as d };
24
+ export { SearchcraftClearIconSet as searchcraft_clear_icon_set };
42
25
 
43
- //# sourceMappingURL=p-70722ab2.js.map
26
+ //# sourceMappingURL=searchcraft-clear-icon-set.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-clear-icon-set.entry.esm.js","mappings":";;MAMa,uBAAuB;;;oBAMhC,aAAa;;IAEf,MAAM;QACJ,QAAQ,IAAI,CAAC,IAAI;YACf,KAAK,aAAa;gBAChB,QACE,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,yCAA2C,EACjE,YACE,CAAC,EAAC,uIAAuI,EACzI,MAAM,EAAC,OAAO,kBACD,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ,KAAK,YAAY;gBACf,QACE,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,wCAA0C,EAChE,YACE,CAAC,EAAC,uIAAuI,EACzI,MAAM,EAAC,OAAO,kBACD,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ,KAAK,aAAa;gBAChB,QACE,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,yCAA2C,EACjE,YACE,CAAC,EAAC,uCAAuC,EACzC,MAAM,EAAC,SAAS,kBACH,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YACJ,KAAK,YAAY;gBACf,QACE,WACE,KAAK,EAAC,GAAG,EACT,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,qBAClB,YAAY,IAE5B,aAAO,EAAE,EAAC,YAAY,wCAA0C,EAChE,YACE,CAAC,EAAC,qBAAqB,EACvB,MAAM,EAAC,SAAS,kBACH,KAAK,oBACH,OAAO,qBACN,OAAO,GACvB,CACE,EACN;YAEJ;gBACE,OAAO,IAAI,CAAC;SACf;KACF;;;;;","names":[],"sources":["src/assets/searchcraft-clear-icon-set.tsx"],"sourcesContent":["import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-clear-icon-set',\n shadow: true,\n})\nexport class SearchcraftClearIconSet {\n /**\n * Type of the icon to display.\n * Options: 'clear-light', 'clear-dark', 'arrow-light', 'arrow-dark'\n */\n @Prop() type: 'clear-light' | 'clear-dark' | 'arrow-light' | 'arrow-dark' =\n 'clear-light';\n\n render() {\n switch (this.type) {\n case 'clear-light':\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Clear Input Icon Light</title>\n <path\n d='M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z'\n stroke='black'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'clear-dark':\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Clear Input Icon Dark</title>\n <path\n d='M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z'\n stroke='white'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'arrow-light':\n return (\n <svg\n width='20'\n height='21'\n viewBox='0 0 20 21'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Arrow Right Icon Light</title>\n <path\n d='M7.5 15.0444L12.5 10.0444L7.5 5.04443'\n stroke='#737373'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n case 'arrow-dark':\n return (\n <svg\n width='8'\n height='12'\n viewBox='0 0 8 12'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-labelledby='icon-title'\n >\n <title id='icon-title'>Searchcraft Arrow Right Icon Dark</title>\n <path\n d='M1.5 11L6.5 6L1.5 1'\n stroke='#BFBFBF'\n stroke-width='1.5'\n stroke-linecap='round'\n stroke-linejoin='round'\n />\n </svg>\n );\n\n default:\n return null;\n }\n }\n}\n"],"version":3}
@@ -0,0 +1,30 @@
1
+ import { r as registerInstance, a as createEvent, h } from './index-8211f330.js';
2
+ import { c as classNames } from './index-d6567b9c.js';
3
+ import './_commonjsHelpers-63cbe26c.js';
4
+
5
+ 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:0;top:50%;transform:translateY(-50%);width:20px}.inputClearButtonRTL{align-items:center;background:none;border:none;display:flex;height:20px;justify-content:center;left:0px;padding:0;position:absolute;top:50%;transform:translateY(-50%);width:20px}";
6
+
7
+ const SearchcraftClearInputButton = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.clearInput = createEvent(this, "clearInput", 7);
11
+ this.handleClearClick = (event) => {
12
+ event.preventDefault();
13
+ this.clearInput.emit();
14
+ };
15
+ this.isRequesting = false;
16
+ this.rightToLeftOrientation = false;
17
+ this.theme = 'light';
18
+ }
19
+ isLightTheme() {
20
+ return this.theme === 'light';
21
+ }
22
+ render() {
23
+ 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' }))));
24
+ }
25
+ };
26
+ SearchcraftClearInputButton.style = searchcraftClearInputButtonModuleCss;
27
+
28
+ export { SearchcraftClearInputButton as searchcraft_clear_input_button };
29
+
30
+ //# sourceMappingURL=searchcraft-clear-input-button.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-clear-input-button.entry.esm.js","mappings":";;;;AAAA,MAAM,oCAAoC,GAAG,+bAA+b;;MCe/d,2BAA2B;;;;QAY9B,qBAAgB,GAAG,CAAC,KAAiB;YAC3C,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;SACxB,CAAC;4BAdsB,KAAK;sCACI,KAAK;qBAIrB,OAAO;;IAEhB,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;KAC/B;IAOD,MAAM;QACJ,OAAO,IAAI,CAAC,sBAAsB,IAChC,cACE,KAAK,EAAE,UAAU,CAAC,qBAAqB,EAAE,4BAA4B,CAAC,EACtE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,IAAI,EAAC,QAAQ,IAEZ,IAAI,CAAC,YAAY,IAChB,IAAI,CAAC,YAAY,IACf,oCAA6B,KAE7B,mCAA4B,CAC7B,IACC,IAAI,CAAC,YAAY,IACnB,kCAA4B,IAAI,EAAC,aAAa,GAAG,KAEjD,kCAA4B,IAAI,EAAC,YAAY,GAAG,CACjD,CACM,KAET,cACE,KAAK,EAAE,UAAU,CAAC,qBAAqB,EAAE,4BAA4B,CAAC,EACtE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,IAAI,EAAC,QAAQ,IAEZ,IAAI,CAAC,YAAY,IAChB,IAAI,CAAC,YAAY,IACf,oCAA6B,KAE7B,mCAA4B,CAC7B,IACC,IAAI,CAAC,YAAY,IACnB,kCAA4B,IAAI,EAAC,aAAa,GAAG,KAEjD,kCAA4B,IAAI,EAAC,YAAY,GAAG,CACjD,CACM,CACV,CAAC;KACH;;;;;;","names":[],"sources":["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"],"sourcesContent":[":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: 0;\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: 0px;\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 @Event() clearInput: EventEmitter<void>;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n private handleClearClick = (event: MouseEvent) => {\n event.preventDefault();\n this.clearInput.emit();\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"],"version":3}
@@ -0,0 +1,14 @@
1
+ import { r as registerInstance, h } from './index-8211f330.js';
2
+
3
+ const SearchcraftDashIcon = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ }
7
+ render() {
8
+ return (h("svg", { key: '4d0c3ab69a973ec8b1d89f52082e4b98ce17e39d', width: '14', height: '3', viewBox: '0 0 14 3', fill: 'none' }, h("title", { key: '99a099dcd6a163ba5b8c1f5b80f9ebfde2152778' }, "Checkbox Dash"), h("line", { key: '49f030f69ff1d37139f868ffb94b5f24442dce37', x1: '1.5', y1: '1.5', x2: '12.5', y2: '1.5', stroke: 'white', "stroke-width": '3', "stroke-linecap": 'round' })));
9
+ }
10
+ };
11
+
12
+ export { SearchcraftDashIcon as searchcraft_dash_icon };
13
+
14
+ //# sourceMappingURL=searchcraft-dash-icon.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-dash-icon.entry.esm.js","mappings":";;MAMa,mBAAmB;;;;IAC9B,MAAM;QACJ,QACE,4DAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,GAAG,EAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,IACvD,gFAA4B,EAC5B,6DACE,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,KAAK,EACR,EAAE,EAAC,MAAM,EACT,EAAE,EAAC,KAAK,EACR,MAAM,EAAC,OAAO,kBACD,GAAG,oBACD,OAAO,GACtB,CACE,EACN;KACH;;;;;","names":[],"sources":["src/assets/searchcraft-dash-icon.tsx"],"sourcesContent":["import { Component, h } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-dash-icon',\n shadow: true,\n})\nexport class SearchcraftDashIcon {\n render() {\n return (\n <svg width='14' height='3' viewBox='0 0 14 3' fill='none'>\n <title>Checkbox Dash</title>\n <line\n x1='1.5'\n y1='1.5'\n x2='12.5'\n y2='1.5'\n stroke='white'\n stroke-width='3'\n stroke-linecap='round'\n />\n </svg>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,22 @@
1
+ import { r as registerInstance, h } from './index-8211f330.js';
2
+ import { c as classNames } from './index-d6567b9c.js';
3
+ import './_commonjsHelpers-63cbe26c.js';
4
+
5
+ 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}";
6
+
7
+ const SearchcraftErrorMessage = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.errorMessage = undefined;
11
+ this.theme = 'light';
12
+ }
13
+ render() {
14
+ const errorMessageStyle = this.theme === 'light' ? 'errorMessageLight' : 'errorMessageDark';
15
+ return (h("p", { key: '7c26f9a1b2589d57a81f7909c456e712d9b7fe79', class: classNames(errorMessageStyle) }, this.errorMessage || 'Search term is required.'));
16
+ }
17
+ };
18
+ SearchcraftErrorMessage.style = searchcraftErrorMessageModuleCss;
19
+
20
+ export { SearchcraftErrorMessage as searchcraft_error_message };
21
+
22
+ //# sourceMappingURL=searchcraft-error-message.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-error-message.entry.esm.js","mappings":";;;;AAAA,MAAM,gCAAgC,GAAG,6SAA6S;;MCQzU,uBAAuB;;;;qBASA,OAAO;;IAEzC,MAAM;QACJ,MAAM,iBAAiB,GACrB,IAAI,CAAC,KAAK,KAAK,OAAO,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;QAEpE,QACE,0DAAG,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IACpC,IAAI,CAAC,YAAY,IAAI,0BAA0B,CAC9C,EACJ;KACH;;;;;;","names":[],"sources":["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"],"sourcesContent":["@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin error-message-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-top: 4px;\n}\n\n.errorMessageLight {\n @include error-message-base;\n color: $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"],"version":3}
@@ -0,0 +1,120 @@
1
+ import { r as registerInstance, a as createEvent, h } from './index-8211f330.js';
2
+ import { u as useSearchcraftStore } from './store-08ee97f6.js';
3
+ import { b as flattenFacets } from './utils-9f198636.js';
4
+ import './_commonjsHelpers-63cbe26c.js';
5
+
6
+ const searchcraftFiltersListModuleCss = ".filtersList{width:100%}.checkboxLabel{align-items:center;color:#292929;display:flex;font-family:\"Source Sans Pro\";font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.checkboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:#EDEDED;border:1px solid #D9D9D9;cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.checkboxLabel input[type=checkbox]:checked{background-color:#000;position:relative}.checkboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.checkboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.remainingFilterListCheckbox{margin-left:16px}.childCheckboxLabel{align-items:center;color:#292929;display:flex;font-family:\"Source Sans Pro\";font-size:14px;font-weight:600;gap:12px;position:relative}.childCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:#EDEDED;border:1px solid #D9D9D9;cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px;-webkit-font-smoothing:antialiased}.childCheckboxLabel input[type=checkbox]:checked{background-color:#000;position:relative}.childCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.childCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.checkContainer{display:none;height:16px;width:16px;position:absolute;top:10px;left:7px}.dashContainer{display:none;height:3px;width:14px;position:absolute;top:5px;left:9px}.loading{align-items:center;display:flex;justify-content:center;margin:100px}";
7
+
8
+ const SearchcraftFiltersList = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.filtersUpdated = createEvent(this, "filtersUpdated", 7);
12
+ this.searchStore = useSearchcraftStore.getState();
13
+ this.autoSearchFormElement = null;
14
+ this.handleSearchRequest = () => {
15
+ this.selectedFilters = [];
16
+ this.searchStore.setSelectedFilters([]);
17
+ this.emitFiltersUpdate();
18
+ };
19
+ this.filters = [];
20
+ this.dynamicFilters = [];
21
+ this.selectedFilters = [];
22
+ this.query = '';
23
+ this.isRequesting = false;
24
+ this.resultsCount = 0;
25
+ }
26
+ connectedCallback() {
27
+ var _a;
28
+ const state = this.searchStore;
29
+ const facets = (_a = state.searchResults) === null || _a === void 0 ? void 0 : _a.data.facets;
30
+ if (facets) {
31
+ this.populateFiltersFromFacets(facets);
32
+ }
33
+ this.unsubscribe = useSearchcraftStore.subscribe((state) => {
34
+ var _a, _b, _c, _d, _e;
35
+ const query = (_a = state.query) === null || _a === void 0 ? void 0 : _a.trim();
36
+ const facets = (_b = state.searchResults) === null || _b === void 0 ? void 0 : _b.data.facets;
37
+ this.query = query || '';
38
+ this.isRequesting = state.isRequesting;
39
+ this.resultsCount = ((_e = (_d = (_c = state.searchResults) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.hits) === null || _e === void 0 ? void 0 : _e.length) || 0;
40
+ if (facets && this.selectedFilters.length === 0) {
41
+ this.populateFiltersFromFacets(facets);
42
+ }
43
+ });
44
+ this.autoSearchFormElement = document.querySelector('searchcraft-auto-search-form');
45
+ if (this.autoSearchFormElement) {
46
+ this.autoSearchFormElement.addEventListener('querySubmit', this.handleSearchRequest);
47
+ }
48
+ }
49
+ disconnectedCallback() {
50
+ if (this.unsubscribe) {
51
+ this.unsubscribe();
52
+ }
53
+ if (this.autoSearchFormElement) {
54
+ this.autoSearchFormElement.removeEventListener('querySubmit', this.handleSearchRequest);
55
+ }
56
+ }
57
+ populateFiltersFromFacets(facets) {
58
+ var _a;
59
+ const flattened = flattenFacets(((_a = facets[0]) === null || _a === void 0 ? void 0 : _a.section) || []);
60
+ this.dynamicFilters = flattened.map((filter) => ({
61
+ label: filter.label,
62
+ value: filter.value,
63
+ count: filter.count,
64
+ children: filter.children || [],
65
+ }));
66
+ }
67
+ handleCheckboxChange(value, isChecked, isParent = false) {
68
+ var _a;
69
+ if (isParent) {
70
+ const parentFilter = this.dynamicFilters.find((filter) => filter.value === value);
71
+ const childValues = ((_a = parentFilter === null || parentFilter === void 0 ? void 0 : parentFilter.children) === null || _a === void 0 ? void 0 : _a.map((child) => child.value)) || [];
72
+ if (!isChecked) {
73
+ // Remove children from selectedFilters when parent is unchecked
74
+ this.selectedFilters = this.selectedFilters.filter((filter) => filter !== value && !childValues.includes(filter));
75
+ }
76
+ else {
77
+ // Add parent filter to selectedFilters
78
+ this.selectedFilters = [...this.selectedFilters, value];
79
+ }
80
+ }
81
+ else {
82
+ // Update selectedFilters for child filters
83
+ this.selectedFilters = isChecked
84
+ ? [...this.selectedFilters, value]
85
+ : this.selectedFilters.filter((filter) => filter !== value);
86
+ }
87
+ this.emitFiltersUpdate();
88
+ }
89
+ emitFiltersUpdate() {
90
+ this.filtersUpdated.emit(this.selectedFilters);
91
+ this.searchStore.setSelectedFilters(this.selectedFilters);
92
+ this.searchStore.search();
93
+ }
94
+ formatLabel(label, count) {
95
+ return `${label.replace(/-/g, ' ').replace(/\b\w/g, (char) => char.toUpperCase())} (${count})`;
96
+ }
97
+ render() {
98
+ if (!this.query || this.resultsCount === 0) {
99
+ return null;
100
+ }
101
+ return (h("div", { class: 'filtersList' }, this.dynamicFilters.map((filter) => {
102
+ const isChildSelected = filter.children
103
+ ? filter.children.some((child) => this.selectedFilters.includes(child.value))
104
+ : false;
105
+ return (h("div", { key: filter.value, class: 'filterItem' }, h("label", { class: 'checkboxLabel' }, h("input", { type: 'checkbox', checked: this.selectedFilters.includes(filter.value), onChange: (event) => this.handleCheckboxChange(filter.value, event.target.checked, true) }), isChildSelected ? (h("div", { class: 'dashContainer' }, h("searchcraft-dash-icon", null))) : (h("div", { class: 'checkContainer' }, h("searchcraft-check-icon", null))), this.formatLabel(filter.label, filter.count)), filter.children && filter.children.length > 0 && (h("div", { class: 'childrenContainer' }, filter.children.map((child) => (h("label", { key: child.value, class: 'childCheckboxLabel', style: {
106
+ marginLeft: '20px',
107
+ display: this.selectedFilters.includes(filter.value)
108
+ ? 'flex'
109
+ : 'none',
110
+ } }, h("input", { type: 'checkbox', checked: this.selectedFilters.includes(child.value), onChange: (event) => this.handleCheckboxChange(child.value, event.target.checked) }), h("div", { class: 'checkContainer' }, h("searchcraft-check-icon", null)), this.formatLabel(child.label.includes('/')
111
+ ? child.label.split('/').pop() || child.label
112
+ : child.label, child.count))))))));
113
+ })));
114
+ }
115
+ };
116
+ SearchcraftFiltersList.style = searchcraftFiltersListModuleCss;
117
+
118
+ export { SearchcraftFiltersList as searchcraft_filters_list };
119
+
120
+ //# sourceMappingURL=searchcraft-filters-list.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-filters-list.entry.esm.js","mappings":";;;;;AAAA,MAAM,+BAA+B,GAAG,qjDAAqjD;;MCoBhlD,sBAAsB;;;;QAoBzB,gBAAW,GAAG,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QAC7C,0BAAqB,GAAuB,IAAI,CAAC;QA+CzD,wBAAmB,GAAG;YACpB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;YACxC,IAAI,CAAC,iBAAiB,EAAE,CAAC;SAC1B,CAAC;uBAvEyD,EAAE;8BAaxD,E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CAAC,KAAK,CACZ,CACK,CACT,CAAC,CACE,CACP,CACG,EACN;SACH,CAAC,CACE,EACN;KACH;;;;;;","names":[],"sources":["src/components/searchcraft-filters-list/searchcraft-filters-list.module.scss?tag=searchcraft-filters-list&encapsulation=shadow","src/components/searchcraft-filters-list/searchcraft-filters-list.tsx"],"sourcesContent":[".filtersList {\n width: 100%;\n}\n\n.checkboxLabel {\n align-items: center;\n color: #292929;\n display: flex;\n font-family: 'Source Sans Pro';\n font-size: 14px;\n font-weight: 600;\n gap: 14px;\n position: relative;\n -webkit-font-smoothing: antialiased;\n}\n\n.checkboxLabel input[type=\"checkbox\"] {\n align-items: center;\n appearance: none;\n background-color: #EDEDED;\n border: 1px solid #D9D9D9;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n width: 24px;\n}\n\n.checkboxLabel input[type=\"checkbox\"]:checked {\n background-color: #000;\n position: relative;\n}\n\n.checkboxLabel input[type=\"checkbox\"]:checked + .checkContainer {\n display: block;\n}\n\n.checkboxLabel input[type=\"checkbox\"]:checked + .dashContainer {\n display: block;\n}\n\n.remainingFilterListCheckbox {\n margin-left: 16px;\n}\n\n.childCheckboxLabel {\n align-items: center;\n color: #292929;\n display: flex;\n font-family: 'Source Sans Pro';\n font-size: 14px;\n font-weight: 600;\n gap: 12px;\n position: relative;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"] {\n align-items: center;\n appearance: none;\n background-color: #EDEDED;\n border: 1px solid #D9D9D9;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n position: relative;\n width: 24px;\n -webkit-font-smoothing: antialiased;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"]:checked {\n background-color: #000;\n position: relative;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"]:checked + .checkContainer {\n display: block;\n}\n\n.childCheckboxLabel input[type=\"checkbox\"]:checked + .dashContainer {\n display: block;\n}\n\n.checkContainer {\n display: none;\n height: 16px;\n width: 16px;\n position: absolute;\n top: 10px;\n left: 7px;\n}\n\n.dashContainer {\n display: none;\n height: 3px;\n width: 14px;\n position: absolute;\n top: 5px;\n left: 9px;\n}\n\n.loading {\n align-items: center;\n display: flex;\n justify-content: center;\n margin: 100px;\n}","import {\n Component,\n h,\n State,\n Prop,\n Event,\n type EventEmitter,\n} from '@stencil/core';\n\nimport type { Facets } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\n\nimport { flattenFacets } from '@utils/utils';\n\n@Component({\n tag: 'searchcraft-filters-list',\n styleUrl: 'searchcraft-filters-list.module.scss',\n shadow: true,\n})\nexport class SearchcraftFiltersList {\n @Prop() filters: Array<{ label: string; value: string }> = [];\n\n @Event() filtersUpdated: EventEmitter<string[]>;\n\n @State() dynamicFilters: Array<{\n label: string;\n value: string;\n count: number;\n children?: Array<{\n label: string;\n value: string;\n count: number;\n }>;\n }> = [];\n @State() selectedFilters: string[] = [];\n @State() query = '';\n @State() isRequesting = false;\n @State() resultsCount = 0;\n\n private searchStore = useSearchcraftStore.getState();\n private autoSearchFormElement: HTMLElement | null = null;\n unsubscribe: () => void;\n\n connectedCallback() {\n const state = this.searchStore;\n const facets = state.searchResults?.data.facets;\n\n if (facets) {\n this.populateFiltersFromFacets(facets);\n }\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n const query = state.query?.trim();\n const facets = state.searchResults?.data.facets;\n this.query = query || '';\n this.isRequesting = state.isRequesting;\n this.resultsCount = state.searchResults?.data?.hits?.length || 0;\n\n if (facets && this.selectedFilters.length === 0) {\n this.populateFiltersFromFacets(facets);\n }\n });\n\n this.autoSearchFormElement = document.querySelector(\n 'searchcraft-auto-search-form',\n );\n if (this.autoSearchFormElement) {\n this.autoSearchFormElement.addEventListener(\n 'querySubmit',\n this.handleSearchRequest,\n );\n }\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n\n if (this.autoSearchFormElement) {\n this.autoSearchFormElement.removeEventListener(\n 'querySubmit',\n this.handleSearchRequest,\n );\n }\n }\n\n handleSearchRequest = () => {\n this.selectedFilters = [];\n this.searchStore.setSelectedFilters([]);\n this.emitFiltersUpdate();\n };\n\n populateFiltersFromFacets(facets: Facets) {\n const flattened = flattenFacets(facets[0]?.section || []);\n this.dynamicFilters = flattened.map((filter) => ({\n label: filter.label,\n value: filter.value,\n count: filter.count,\n children: filter.children || [],\n }));\n }\n\n handleCheckboxChange(value: string, isChecked: boolean, isParent = false) {\n if (isParent) {\n const parentFilter = this.dynamicFilters.find(\n (filter) => filter.value === value,\n );\n const childValues =\n parentFilter?.children?.map((child) => child.value) || [];\n\n if (!isChecked) {\n // Remove children from selectedFilters when parent is unchecked\n this.selectedFilters = this.selectedFilters.filter(\n (filter) => filter !== value && !childValues.includes(filter),\n );\n } else {\n // Add parent filter to selectedFilters\n this.selectedFilters = [...this.selectedFilters, value];\n }\n } else {\n // Update selectedFilters for child filters\n this.selectedFilters = isChecked\n ? [...this.selectedFilters, value]\n : this.selectedFilters.filter((filter) => filter !== value);\n }\n this.emitFiltersUpdate();\n }\n\n emitFiltersUpdate() {\n this.filtersUpdated.emit(this.selectedFilters);\n this.searchStore.setSelectedFilters(this.selectedFilters);\n this.searchStore.search();\n }\n\n formatLabel(label: string, count: number): string {\n return `${label.replace(/-/g, ' ').replace(/\\b\\w/g, (char) => char.toUpperCase())} (${count})`;\n }\n\n render() {\n if (!this.query || this.resultsCount === 0) {\n return null;\n }\n return (\n <div class='filtersList'>\n {this.dynamicFilters.map((filter) => {\n const isChildSelected = filter.children\n ? filter.children.some((child) =>\n this.selectedFilters.includes(child.value),\n )\n : false;\n\n return (\n <div key={filter.value} class='filterItem'>\n <label class='checkboxLabel'>\n <input\n type='checkbox'\n checked={this.selectedFilters.includes(filter.value)}\n onChange={(event: Event) =>\n this.handleCheckboxChange(\n filter.value,\n (event.target as HTMLInputElement).checked,\n true,\n )\n }\n />\n {isChildSelected ? (\n <div class='dashContainer'>\n <searchcraft-dash-icon />\n </div>\n ) : (\n <div class='checkContainer'>\n <searchcraft-check-icon />\n </div>\n )}\n {this.formatLabel(filter.label, filter.count)}\n </label>\n {filter.children && filter.children.length > 0 && (\n <div class='childrenContainer'>\n {filter.children.map((child) => (\n <label\n key={child.value}\n class='childCheckboxLabel'\n style={{\n marginLeft: '20px',\n display: this.selectedFilters.includes(filter.value)\n ? 'flex'\n : 'none',\n }}\n >\n <input\n type='checkbox'\n checked={this.selectedFilters.includes(child.value)}\n onChange={(event: Event) =>\n this.handleCheckboxChange(\n child.value,\n (event.target as HTMLInputElement).checked,\n )\n }\n />\n <div class='checkContainer'>\n <searchcraft-check-icon />\n </div>\n {this.formatLabel(\n child.label.includes('/')\n ? child.label.split('/').pop() || child.label\n : child.label,\n child.count,\n )}\n </label>\n ))}\n </div>\n )}\n </div>\n );\n })}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,14 +1,12 @@
1
- import { p as proxyCustomElement, H, h } from './p-7498e493.js';
2
- import { c as classNames } from './p-5cdc6210.js';
1
+ import { r as registerInstance, h } from './index-8211f330.js';
2
+ import { c as classNames } from './index-d6567b9c.js';
3
+ import './_commonjsHelpers-63cbe26c.js';
3
4
 
4
5
  const searchcraftInputCaptionModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.inputCaptionLightLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#404040}.inputCaptionDarkLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#E6E6E6}.inputCaptionErrorLightLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000}.inputCaptionErrorDarkLTR{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3}.inputCaptionLightRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#404040;text-align:right}.inputCaptionDarkRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#E6E6E6;text-align:right}.inputCaptionErrorLightRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#990000;text-align:right}.inputCaptionErrorDarkRTL{font-family:var(--font-stack);font-size:12px;font-weight:400;line-height:16px;margin-top:4px;color:#FFB3B3;text-align:right}";
5
- const SearchcraftInputCaptionStyle0 = searchcraftInputCaptionModuleCss;
6
6
 
7
- const SearchcraftInputCaption = /*@__PURE__*/ proxyCustomElement(class SearchcraftInputCaption extends H {
8
- constructor() {
9
- super();
10
- this.__registerHost();
11
- this.__attachShadow();
7
+ const SearchcraftInputCaption = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
12
10
  this.error = undefined;
13
11
  this.inputCaptionClassName = '';
14
12
  this.inputCaptionValue = 'Enter Search';
@@ -33,28 +31,9 @@ const SearchcraftInputCaption = /*@__PURE__*/ proxyCustomElement(class Searchcra
33
31
  ? 'inputCaptionLightLTR'
34
32
  : 'inputCaptionDarkLTR', this.inputCaptionClassName, '.searchcraft-input-caption') }, this.inputCaptionValue));
35
33
  }
36
- static get style() { return SearchcraftInputCaptionStyle0; }
37
- }, [1, "searchcraft-input-caption", {
38
- "error": [4],
39
- "inputCaptionClassName": [1, "input-caption-class-name"],
40
- "inputCaptionValue": [1, "input-caption-value"],
41
- "rightToLeftOrientation": [4, "right-to-left-orientation"],
42
- "theme": [32]
43
- }]);
44
- function defineCustomElement() {
45
- if (typeof customElements === "undefined") {
46
- return;
47
- }
48
- const components = ["searchcraft-input-caption"];
49
- components.forEach(tagName => { switch (tagName) {
50
- case "searchcraft-input-caption":
51
- if (!customElements.get(tagName)) {
52
- customElements.define(tagName, SearchcraftInputCaption);
53
- }
54
- break;
55
- } });
56
- }
34
+ };
35
+ SearchcraftInputCaption.style = searchcraftInputCaptionModuleCss;
57
36
 
58
- export { SearchcraftInputCaption as S, defineCustomElement as d };
37
+ export { SearchcraftInputCaption as searchcraft_input_caption };
59
38
 
60
- //# sourceMappingURL=p-6237f03e.js.map
39
+ //# sourceMappingURL=searchcraft-input-caption.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-input-caption.entry.esm.js","mappings":";;;;AAAA,MAAM,gCAAgC,GAAG,8oCAA8oC;;MCQ1qC,uBAAuB;;;;qCAED,EAAE;iCACP,cAAc;sCACT,KAAK;qBACrB,OAAO;;IAEhB,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;KAC/B;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,sBAAsB,IAChC,SACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,KAAK;kBACN,IAAI,CAAC,YAAY;sBACf,2BAA2B;sBAC3B,0BAA0B;kBAC5B,IAAI,CAAC,YAAY;sBACf,sBAAsB;sBACtB,qBAAqB,EAC3B,IAAI,CAAC,qBAAqB,EAC1B,4BAA4B,CAC7B,IAEA,IAAI,CAAC,iBAAiB,CACrB,KAEJ,SACE,KAAK,EAAE,UAAU,CACf,IAAI,CAAC,KAAK;kBACN,IAAI,CAAC,YAAY;sBACf,2BAA2B;sBAC3B,0BAA0B;kBAC5B,IAAI,CAAC,YAAY;sBACf,sBAAsB;sBACtB,qBAAqB,EAC3B,IAAI,CAAC,qBAAqB,EAC1B,4BAA4B,CAC7B,IAEA,IAAI,CAAC,iBAAiB,CACrB,CACL,CAAC;KACH;;;;;;","names":[],"sources":["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"],"sourcesContent":["@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-caption-base {\n font-family: var(--font-stack);\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n margin-top: 4px;\n}\n\n@mixin input-caption-base-light {\n @include input-caption-base;\n color: $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"],"version":3}
@@ -0,0 +1,25 @@
1
+ import { r as registerInstance, h } from './index-8211f330.js';
2
+
3
+ const searchcraftInputIconModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.inputIconLTR{left:15px;position:absolute;top:50%;transform:translateY(-50%)}.inputIconRTL{position:absolute;right:15px;top:50%;transform:translateY(-50%)}";
4
+
5
+ const SearchcraftInputIcon = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.error = undefined;
9
+ this.height = 20;
10
+ this.rightToLeftOrientation = false;
11
+ this.width = 20;
12
+ this.theme = 'light';
13
+ }
14
+ isLightTheme() {
15
+ return this.theme === 'light';
16
+ }
17
+ render() {
18
+ return this.error ? (h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme() ? (h("searchcraft-search-icon-set", { height: this.height, type: 'error-light', width: this.width })) : (h("searchcraft-search-icon-set", { height: this.height, type: 'error-dark', width: this.width })))) : (h("div", { class: this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR' }, this.isLightTheme() ? (h("searchcraft-search-icon-set", { height: this.height, type: 'search-light', width: this.width })) : (h("searchcraft-search-icon-set", { height: this.height, type: 'search-dark', width: this.width }))));
19
+ }
20
+ };
21
+ SearchcraftInputIcon.style = searchcraftInputIconModuleCss;
22
+
23
+ export { SearchcraftInputIcon as searchcraft_input_icon };
24
+
25
+ //# sourceMappingURL=searchcraft-input-icon.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-input-icon.entry.esm.js","mappings":";;AAAA,MAAM,6BAA6B,GAAG,6MAA6M;;MCOtO,oBAAoB;;;;sBAEd,EAAE;sCACc,KAAK;qBACtB,EAAE;qBAED,OAAO;;IAEhB,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;KAC/B;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,IACf,WACE,KAAK,EAAE,IAAI,CAAC,sBAAsB,GAAG,cAAc,GAAG,cAAc,IAEnE,IAAI,CAAC,YAAY,EAAE,IAClB,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,KAEF,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,YAAY,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CACG,KAEN,WACE,KAAK,EAAE,IAAI,CAAC,sBAAsB,GAAG,cAAc,GAAG,cAAc,IAEnE,IAAI,CAAC,YAAY,EAAE,IAClB,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,KAEF,mCACE,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,aAAa,EAClB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CACG,CACP,CAAC;KACH;;;;;;","names":[],"sources":["src/components/searchcraft-input-icon/searchcraft-input-icon.module.scss?tag=searchcraft-input-icon&encapsulation=shadow","src/components/searchcraft-input-icon/searchcraft-input-icon.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.inputIconLTR {\n left: 15px;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.inputIconRTL {\n position: absolute;\n right: 15px;\n top: 50%;\n transform: translateY(-50%);\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() height = 20;\n @Prop() rightToLeftOrientation = false;\n @Prop() width = 20;\n\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n return this.error ? (\n <div\n class={this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR'}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='error-dark'\n width={this.width}\n />\n )}\n </div>\n ) : (\n <div\n class={this.rightToLeftOrientation ? 'inputIconRTL' : 'inputIconLTR'}\n >\n {this.isLightTheme() ? (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-light'\n width={this.width}\n />\n ) : (\n <searchcraft-search-icon-set\n height={this.height}\n type='search-dark'\n width={this.width}\n />\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,29 @@
1
+ import { r as registerInstance, h } from './index-8211f330.js';
2
+ import { c as classNames } from './index-d6567b9c.js';
3
+ import './_commonjsHelpers-63cbe26c.js';
4
+
5
+ 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}";
6
+
7
+ const SearchcraftInputLabel = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.inputLabelClassName = '';
11
+ this.label = undefined;
12
+ this.theme = 'light';
13
+ }
14
+ isLightTheme() {
15
+ return this.theme === 'light';
16
+ }
17
+ render() {
18
+ if (!this.label) {
19
+ return null;
20
+ }
21
+ const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';
22
+ return (h("label", { class: classNames(labelStyle, this.inputLabelClassName), htmlFor: 'searchcraft-input-id' }, this.label));
23
+ }
24
+ };
25
+ SearchcraftInputLabel.style = searchcraftInputLabelModuleCss;
26
+
27
+ export { SearchcraftInputLabel as searchcraft_input_label };
28
+
29
+ //# sourceMappingURL=searchcraft-input-label.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-input-label.entry.esm.js","mappings":";;;;AAAA,MAAM,8BAA8B,GAAG,4RAA4R;;MCQtT,qBAAqB;;;mCACD,EAAE;;qBAEhB,OAAO;;IAEhB,YAAY;QAClB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;KAC/B;IAED,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,GAAG,YAAY,GAAG,WAAW,CAAC;QACpE,QACE,aACE,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,CAAC,EACvD,OAAO,EAAC,sBAAsB,IAE7B,IAAI,CAAC,KAAK,CACL,EACR;KACH;;;;;;","names":[],"sources":["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"],"sourcesContent":["@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;\n @State() theme = 'light';\n\n private isLightTheme() {\n return this.theme === 'light';\n }\n\n render() {\n if (!this.label) {\n return null;\n }\n const labelStyle = this.isLightTheme() ? 'labelLight' : 'labelDark';\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"],"version":3}
@@ -1,22 +1,13 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment } from './p-7498e493.js';
2
- import { c as classNames } from './p-5cdc6210.js';
3
- import { p as parseCustomStyles } from './p-2bda632c.js';
4
- import { d as defineCustomElement$7 } from './p-70722ab2.js';
5
- import { d as defineCustomElement$6 } from './p-0eb562da.js';
6
- import { d as defineCustomElement$5 } from './p-6237f03e.js';
7
- import { d as defineCustomElement$4 } from './p-8c38185e.js';
8
- import { d as defineCustomElement$3 } from './p-a3bd1bc8.js';
9
- import { d as defineCustomElement$2 } from './p-9952c9ba.js';
10
- import { d as defineCustomElement$1 } from './p-bdf84774.js';
1
+ import { r as registerInstance, a as createEvent, h, F as Fragment } from './index-8211f330.js';
2
+ import { c as classNames } from './index-d6567b9c.js';
3
+ import { p as parseCustomStyles } from './utils-9f198636.js';
4
+ import './_commonjsHelpers-63cbe26c.js';
11
5
 
12
6
  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%}";
13
- const SearchcraftInputStyle0 = searchcraftInputModuleCss;
14
7
 
15
- const SearchcraftInput = /*@__PURE__*/ proxyCustomElement(class SearchcraftInput extends H {
16
- constructor() {
17
- super();
18
- this.__registerHost();
19
- this.__attachShadow();
8
+ const SearchcraftInput = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
20
11
  this.clearInput = createEvent(this, "clearInput", 7);
21
12
  this.searchInputChange = createEvent(this, "searchInputChange", 7);
22
13
  this.inputKeyUp = createEvent(this, "inputKeyUp", 7);
@@ -65,7 +56,7 @@ const SearchcraftInput = /*@__PURE__*/ proxyCustomElement(class SearchcraftInput
65
56
  const placeholderStyle = {
66
57
  fontSize: validatedCustomStyles.placeholderFontSize || '16px',
67
58
  };
68
- return (h("div", { key: '3c655e3572de20f333b75f85e45cc957ac0bc006', class: classNames(containerClassName, this.formClassName, 'searchcraft-input-form') }, this.rightToLeftOrientation ? (h(Fragment, null, h("input", { autoComplete: 'off', class: classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), onKeyUp: this.handleInputKeyUp.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), h("style", null, `
59
+ return (h("div", { key: '0eea589d7f78b4ae830b1950ab193f9c72797625', class: classNames(containerClassName, this.formClassName, 'searchcraft-input-form') }, this.rightToLeftOrientation ? (h(Fragment, null, h("input", { autoComplete: 'off', class: classNames(inputClassName, 'searchcraft-input'), id: 'searchcraft-input-id', onChange: this.handleInputChange.bind(this), onKeyUp: this.handleInputKeyUp.bind(this), placeholder: this.placeholderValue, type: 'text', value: this.query, style: validatedCustomStyles }), h("style", null, `
69
60
  #searchcraft-input-id::placeholder {
70
61
  font-size: ${placeholderStyle.fontSize};
71
62
  }
@@ -75,71 +66,9 @@ const SearchcraftInput = /*@__PURE__*/ proxyCustomElement(class SearchcraftInput
75
66
  }
76
67
  `), this.inputCaptionValue && (h("searchcraft-input-caption", { inputCaptionClassName: this.inputCaptionClassName, inputCaptionValue: this.inputCaptionValue, rightToLeftOrientation: this.rightToLeftOrientation })), this.query.length > 0 && (h("searchcraft-clear-input-button", { isRequesting: this.isRequesting, onClearInput: this.handleClearInput, rightToLeftOrientation: this.rightToLeftOrientation }))))));
77
68
  }
78
- static get style() { return SearchcraftInputStyle0; }
79
- }, [1, "searchcraft-input", {
80
- "customStyles": [1, "custom-styles"],
81
- "error": [4],
82
- "formClassName": [1, "form-class-name"],
83
- "inputCaptionClassName": [1, "input-caption-class-name"],
84
- "inputCaptionValue": [1, "input-caption-value"],
85
- "inputClassName": [1, "input-class-name"],
86
- "inputIconHeight": [2, "input-icon-height"],
87
- "inputIconWidth": [2, "input-icon-width"],
88
- "isRequesting": [4, "is-requesting"],
89
- "placeholderValue": [1, "placeholder-value"],
90
- "rightToLeftOrientation": [4, "right-to-left-orientation"],
91
- "query": [1],
92
- "theme": [32]
93
- }]);
94
- function defineCustomElement() {
95
- if (typeof customElements === "undefined") {
96
- return;
97
- }
98
- const components = ["searchcraft-input", "searchcraft-clear-icon-set", "searchcraft-clear-input-button", "searchcraft-input-caption", "searchcraft-input-icon", "searchcraft-search-icon-set", "searchcraft-spinner-dark", "searchcraft-spinner-light"];
99
- components.forEach(tagName => { switch (tagName) {
100
- case "searchcraft-input":
101
- if (!customElements.get(tagName)) {
102
- customElements.define(tagName, SearchcraftInput);
103
- }
104
- break;
105
- case "searchcraft-clear-icon-set":
106
- if (!customElements.get(tagName)) {
107
- defineCustomElement$7();
108
- }
109
- break;
110
- case "searchcraft-clear-input-button":
111
- if (!customElements.get(tagName)) {
112
- defineCustomElement$6();
113
- }
114
- break;
115
- case "searchcraft-input-caption":
116
- if (!customElements.get(tagName)) {
117
- defineCustomElement$5();
118
- }
119
- break;
120
- case "searchcraft-input-icon":
121
- if (!customElements.get(tagName)) {
122
- defineCustomElement$4();
123
- }
124
- break;
125
- case "searchcraft-search-icon-set":
126
- if (!customElements.get(tagName)) {
127
- defineCustomElement$3();
128
- }
129
- break;
130
- case "searchcraft-spinner-dark":
131
- if (!customElements.get(tagName)) {
132
- defineCustomElement$2();
133
- }
134
- break;
135
- case "searchcraft-spinner-light":
136
- if (!customElements.get(tagName)) {
137
- defineCustomElement$1();
138
- }
139
- break;
140
- } });
141
- }
69
+ };
70
+ SearchcraftInput.style = searchcraftInputModuleCss;
142
71
 
143
- export { SearchcraftInput as S, defineCustomElement as d };
72
+ export { SearchcraftInput as searchcraft_input };
144
73
 
145
- //# sourceMappingURL=p-643cfdcf.js.map
74
+ //# sourceMappingURL=searchcraft-input.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"searchcraft-input.entry.esm.js","mappings":";;;;;AAAA,MAAM,yBAAyB,GAAG,2sHAA2sH;;MCuBhuH,gBAAgB;;;;;;4BAC6B,EAAE;qBAC1C,KAAK;6BACG,EAAE;qCACM,EAAE;iCACN,EAAE;8BACL,EAAE;+BACD,EAAE;8BACH,EAAE;4BACJ,KAAK;gCACD,cAAc;sCACR,KAAK;qBACtB,EAAE;qBAMD,OAAO;;IAExB,IAAY,YAAY;QACtB,OAAO,IAAI,CAAC,KAAK,KAAK,OAAO,CAAC;KAC/B;IAED,iBAAiB,CAAC,KAAY;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC1C;IAED,gBAAgB,CAAC,KAAoB;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;QAC/C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACnC;IAED,g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B,sCACE,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,GACnD,CACH,CACQ,CACZ,CACG,EACN;KACH;;;;;;","names":[],"sources":["src/components/searchcraft-input/searchcraft-input.module.scss?tag=searchcraft-input&encapsulation=shadow","src/components/searchcraft-input/searchcraft-input.tsx"],"sourcesContent":["@import '../../utils/theme';\n\n:root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n@mixin input-container-base {\n position: relative;\n width: 100%;\n}\n\n@mixin input-base {\n border: none;\n border-radius: 8px;\n font-family: var(--font-stack);\n outline: none;\n padding-bottom: 15px;\n padding-top: 15px;\n 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() inputIconHeight = 20;\n @Prop() inputIconWidth = 20;\n @Prop() isRequesting = false;\n @Prop() placeholderValue = 'Enter Search';\n @Prop() rightToLeftOrientation = false;\n @Prop() query = '';\n\n @Event() clearInput: EventEmitter<void>;\n @Event() searchInputChange: EventEmitter<string>;\n @Event() inputKeyUp: EventEmitter<string>;\n\n @State() theme = 'light';\n\n private get isLightTheme() {\n return this.theme === 'light';\n }\n\n handleInputChange(event: Event) {\n const input = event.target as HTMLInputElement;\n this.searchInputChange.emit(input.value);\n }\n\n handleInputKeyUp(event: KeyboardEvent) {\n const input = event.target as HTMLInputElement;\n this.inputKeyUp.emit(input.value);\n }\n\n handleClearInput() {\n if (this.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 autoComplete='off'\n class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.bind(this)}\n onKeyUp={this.handleInputKeyUp.bind(this)}\n placeholder={this.placeholderValue}\n type='text'\n value={this.query}\n style={validatedCustomStyles}\n />\n <style>\n {`\n #searchcraft-input-id::placeholder {\n font-size: ${placeholderStyle.fontSize};\n }\n `}\n </style>\n {this.inputCaptionValue && (\n <searchcraft-input-caption\n inputCaptionClassName={this.inputCaptionClassName}\n inputCaptionValue={this.inputCaptionValue}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n {this.query.length > 0 && (\n <searchcraft-clear-input-button\n isRequesting={this.isRequesting}\n onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n <searchcraft-input-icon\n error={this.error}\n height={this.inputIconHeight}\n rightToLeftOrientation={this.rightToLeftOrientation}\n width={this.inputIconWidth}\n />\n </Fragment>\n ) : (\n <Fragment>\n <searchcraft-input-icon\n error={this.error}\n height={this.inputIconHeight}\n rightToLeftOrientation={this.rightToLeftOrientation}\n width={this.inputIconWidth}\n />\n <input\n autoComplete='off'\n class={classNames(inputClassName, 'searchcraft-input')}\n id='searchcraft-input-id'\n onChange={this.handleInputChange.bind(this)}\n onKeyUp={this.handleInputKeyUp.bind(this)}\n placeholder={this.placeholderValue}\n type='text'\n value={this.query}\n style={validatedCustomStyles}\n />\n <style>\n {`\n #searchcraft-input-id::placeholder {\n font-size: ${placeholderStyle.fontSize};\n }\n `}\n </style>\n {this.inputCaptionValue && (\n <searchcraft-input-caption\n inputCaptionClassName={this.inputCaptionClassName}\n inputCaptionValue={this.inputCaptionValue}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n {this.query.length > 0 && (\n <searchcraft-clear-input-button\n isRequesting={this.isRequesting}\n onClearInput={this.handleClearInput}\n rightToLeftOrientation={this.rightToLeftOrientation}\n />\n )}\n </Fragment>\n )}\n </div>\n );\n }\n}\n"],"version":3}