@searchcraft/javascript-sdk 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/README.md +59 -55
  2. package/dist/cjs/{index-b3b77ea2.js → index-a81df4f0.js} +258 -239
  3. package/dist/cjs/index-a81df4f0.js.map +1 -0
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/searchcraft-base-search-result.cjs.entry.js +91 -48
  7. package/dist/cjs/searchcraft-base-search-result.cjs.entry.js.map +1 -1
  8. package/dist/cjs/searchcraft-base-search-results.cjs.entry.js +74 -37
  9. package/dist/cjs/searchcraft-base-search-results.cjs.entry.js.map +1 -1
  10. package/dist/cjs/searchcraft-button_3.cjs.entry.js +37 -27
  11. package/dist/cjs/searchcraft-button_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js +141 -117
  13. package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js.map +1 -1
  14. package/dist/cjs/searchcraft-filter-panel.cjs.entry.js +11 -13
  15. package/dist/cjs/searchcraft-filter-panel.cjs.entry.js.map +1 -1
  16. package/dist/cjs/searchcraft-input-form_2.cjs.entry.js +128 -82
  17. package/dist/cjs/searchcraft-input-form_2.cjs.entry.js.map +1 -1
  18. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +3 -3
  19. package/dist/cjs/searchcraft-javascript-sdk.cjs.js.map +1 -1
  20. package/dist/cjs/searchcraft-popover-button.cjs.entry.js +3 -7
  21. package/dist/cjs/searchcraft-popover-button.cjs.entry.js.map +1 -1
  22. package/dist/cjs/searchcraft-popover-form.cjs.entry.js +81 -68
  23. package/dist/cjs/searchcraft-popover-form.cjs.entry.js.map +1 -1
  24. package/dist/cjs/searchcraft-popover-list-item.cjs.entry.js +29 -12
  25. package/dist/cjs/searchcraft-popover-list-item.cjs.entry.js.map +1 -1
  26. package/dist/cjs/searchcraft-results-info.cjs.entry.js +9 -13
  27. package/dist/cjs/searchcraft-results-info.cjs.entry.js.map +1 -1
  28. package/dist/cjs/searchcraft-theme.cjs.entry.js +38 -0
  29. package/dist/cjs/searchcraft-theme.cjs.entry.js.map +1 -0
  30. package/dist/cjs/{store-d7ebcf7a.js → store-f6ba3dfb.js} +633 -107
  31. package/dist/cjs/store-f6ba3dfb.js.map +1 -0
  32. package/dist/collection/collection-manifest.json +2 -1
  33. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +134 -66
  34. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -1
  35. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +100 -49
  36. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
  37. package/dist/collection/components/searchcraft-button/searchcraft-button.js +35 -23
  38. package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +1 -1
  39. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +8 -15
  40. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +1 -1
  41. package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js +61 -59
  42. package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js.map +1 -1
  43. package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js +11 -19
  44. package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js.map +1 -1
  45. package/dist/collection/components/searchcraft-input-form/searchcraft-input-form.js +126 -76
  46. package/dist/collection/components/searchcraft-input-form/searchcraft-input-form.js.map +1 -1
  47. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +14 -18
  48. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +1 -1
  49. package/dist/collection/components/searchcraft-popover-button/searchcraft-popover-button.js +1 -11
  50. package/dist/collection/components/searchcraft-popover-button/searchcraft-popover-button.js.map +1 -1
  51. package/dist/collection/components/searchcraft-popover-form/searchcraft-popover-form.js +93 -77
  52. package/dist/collection/components/searchcraft-popover-form/searchcraft-popover-form.js.map +1 -1
  53. package/dist/collection/components/searchcraft-popover-list-item/searchcraft-popover-list-item.js +47 -25
  54. package/dist/collection/components/searchcraft-popover-list-item/searchcraft-popover-list-item.js.map +1 -1
  55. package/dist/collection/components/searchcraft-popover-list-view/searchcraft-popover-list-view.js +23 -25
  56. package/dist/collection/components/searchcraft-popover-list-view/searchcraft-popover-list-view.js.map +1 -1
  57. package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js +7 -19
  58. package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js.map +1 -1
  59. package/dist/collection/components/searchcraft-slider/searchcraft-slider.js +65 -55
  60. package/dist/collection/components/searchcraft-slider/searchcraft-slider.js.map +1 -1
  61. package/dist/collection/components/searchcraft-theme/searchcraft-theme.js +27 -0
  62. package/dist/collection/components/searchcraft-theme/searchcraft-theme.js.map +1 -0
  63. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +27 -26
  64. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +1 -1
  65. package/dist/collection/index.js.map +1 -1
  66. package/dist/collection/provider/store.js +25 -9
  67. package/dist/collection/provider/store.js.map +1 -1
  68. package/dist/collection/utils/facets.js +5 -3
  69. package/dist/collection/utils/facets.js.map +1 -1
  70. package/dist/components/index.js +4 -2
  71. package/dist/components/index.js.map +1 -1
  72. package/dist/components/p-0ef4ab33.js +66 -0
  73. package/dist/components/p-0ef4ab33.js.map +1 -0
  74. package/dist/components/p-1234974c.js +72 -0
  75. package/dist/components/p-1234974c.js.map +1 -0
  76. package/dist/components/p-4b92ae26.js +109 -0
  77. package/dist/components/p-4b92ae26.js.map +1 -0
  78. package/dist/components/{p-85765b81.js → p-506cdac1.js} +18 -16
  79. package/dist/components/p-506cdac1.js.map +1 -0
  80. package/dist/components/p-521fe971.js +60 -0
  81. package/dist/components/p-521fe971.js.map +1 -0
  82. package/dist/components/{p-e4846fa2.js → p-5365011f.js} +215 -231
  83. package/dist/components/p-5365011f.js.map +1 -0
  84. package/dist/components/p-54998882.js +285 -0
  85. package/dist/components/p-54998882.js.map +1 -0
  86. package/dist/components/{p-d6a88eed.js → p-936e2ed4.js} +633 -107
  87. package/dist/components/p-936e2ed4.js.map +1 -0
  88. package/dist/components/p-a75ef832.js +34 -0
  89. package/dist/components/p-a75ef832.js.map +1 -0
  90. package/dist/components/p-b4a8fcbe.js +144 -0
  91. package/dist/components/p-b4a8fcbe.js.map +1 -0
  92. package/dist/components/p-ca881e5c.js +37 -0
  93. package/dist/components/p-ca881e5c.js.map +1 -0
  94. package/dist/components/p-d95bc2a0.js +284 -0
  95. package/dist/components/p-d95bc2a0.js.map +1 -0
  96. package/dist/components/searchcraft-base-search-result.js +1 -1
  97. package/dist/components/searchcraft-base-search-results.js +76 -39
  98. package/dist/components/searchcraft-base-search-results.js.map +1 -1
  99. package/dist/components/searchcraft-button.js +1 -1
  100. package/dist/components/searchcraft-error-message.js +1 -1
  101. package/dist/components/searchcraft-facet-list.js +1 -1
  102. package/dist/components/searchcraft-filter-panel.js +14 -16
  103. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  104. package/dist/components/searchcraft-input-form.js +1 -1
  105. package/dist/components/searchcraft-input-label.js +1 -1
  106. package/dist/components/searchcraft-popover-button.js +3 -7
  107. package/dist/components/searchcraft-popover-button.js.map +1 -1
  108. package/dist/components/searchcraft-popover-form.js +87 -74
  109. package/dist/components/searchcraft-popover-form.js.map +1 -1
  110. package/dist/components/searchcraft-popover-list-item.js +1 -1
  111. package/dist/components/searchcraft-popover-list-view.js +1 -1
  112. package/dist/components/searchcraft-results-info.js +9 -13
  113. package/dist/components/searchcraft-results-info.js.map +1 -1
  114. package/dist/components/searchcraft-slider.js +1 -1
  115. package/dist/components/searchcraft-theme.d.ts +11 -0
  116. package/dist/components/searchcraft-theme.js +51 -0
  117. package/dist/components/searchcraft-theme.js.map +1 -0
  118. package/dist/components/searchcraft-toggle-button.js +1 -1
  119. package/dist/esm/{index-11551663.js → index-3608c57d.js} +258 -239
  120. package/dist/esm/index-3608c57d.js.map +1 -0
  121. package/dist/esm/index.js +1 -1
  122. package/dist/esm/loader.js +3 -3
  123. package/dist/esm/searchcraft-base-search-result.entry.js +91 -48
  124. package/dist/esm/searchcraft-base-search-result.entry.js.map +1 -1
  125. package/dist/esm/searchcraft-base-search-results.entry.js +74 -37
  126. package/dist/esm/searchcraft-base-search-results.entry.js.map +1 -1
  127. package/dist/esm/searchcraft-button_3.entry.js +37 -27
  128. package/dist/esm/searchcraft-button_3.entry.js.map +1 -1
  129. package/dist/esm/searchcraft-facet-list_3.entry.js +141 -117
  130. package/dist/esm/searchcraft-facet-list_3.entry.js.map +1 -1
  131. package/dist/esm/searchcraft-filter-panel.entry.js +11 -13
  132. package/dist/esm/searchcraft-filter-panel.entry.js.map +1 -1
  133. package/dist/esm/searchcraft-input-form_2.entry.js +128 -82
  134. package/dist/esm/searchcraft-input-form_2.entry.js.map +1 -1
  135. package/dist/esm/searchcraft-javascript-sdk.js +4 -4
  136. package/dist/esm/searchcraft-javascript-sdk.js.map +1 -1
  137. package/dist/esm/searchcraft-popover-button.entry.js +3 -7
  138. package/dist/esm/searchcraft-popover-button.entry.js.map +1 -1
  139. package/dist/esm/searchcraft-popover-form.entry.js +81 -68
  140. package/dist/esm/searchcraft-popover-form.entry.js.map +1 -1
  141. package/dist/esm/searchcraft-popover-list-item.entry.js +29 -12
  142. package/dist/esm/searchcraft-popover-list-item.entry.js.map +1 -1
  143. package/dist/esm/searchcraft-results-info.entry.js +9 -13
  144. package/dist/esm/searchcraft-results-info.entry.js.map +1 -1
  145. package/dist/esm/searchcraft-theme.entry.js +34 -0
  146. package/dist/esm/searchcraft-theme.entry.js.map +1 -0
  147. package/dist/esm/{store-1058f7b0.js → store-aa071d9c.js} +633 -107
  148. package/dist/esm/store-aa071d9c.js.map +1 -0
  149. package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
  150. package/dist/searchcraft-javascript-sdk/p-26f5263d.entry.js +2 -0
  151. package/dist/searchcraft-javascript-sdk/p-26f5263d.entry.js.map +1 -0
  152. package/dist/searchcraft-javascript-sdk/p-2ff7eb35.entry.js +2 -0
  153. package/dist/searchcraft-javascript-sdk/p-2ff7eb35.entry.js.map +1 -0
  154. package/dist/searchcraft-javascript-sdk/p-36f0532e.entry.js +2 -0
  155. package/dist/searchcraft-javascript-sdk/p-36f0532e.entry.js.map +1 -0
  156. package/dist/searchcraft-javascript-sdk/p-41b6bc5d.entry.js +2 -0
  157. package/dist/searchcraft-javascript-sdk/p-41b6bc5d.entry.js.map +1 -0
  158. package/dist/searchcraft-javascript-sdk/p-57eddb07.entry.js +2 -0
  159. package/dist/searchcraft-javascript-sdk/p-57eddb07.entry.js.map +1 -0
  160. package/dist/searchcraft-javascript-sdk/p-5d6fbee0.entry.js +2 -0
  161. package/dist/searchcraft-javascript-sdk/p-5d6fbee0.entry.js.map +1 -0
  162. package/dist/searchcraft-javascript-sdk/p-64c5a1d2.entry.js +2 -0
  163. package/dist/searchcraft-javascript-sdk/p-64c5a1d2.entry.js.map +1 -0
  164. package/dist/searchcraft-javascript-sdk/p-7e13c128.js +3 -0
  165. package/dist/searchcraft-javascript-sdk/p-7e13c128.js.map +1 -0
  166. package/dist/searchcraft-javascript-sdk/p-8b0a60b3.entry.js +2 -0
  167. package/dist/searchcraft-javascript-sdk/p-8b0a60b3.entry.js.map +1 -0
  168. package/dist/searchcraft-javascript-sdk/p-936e2ed4.js +11 -0
  169. package/dist/searchcraft-javascript-sdk/p-936e2ed4.js.map +1 -0
  170. package/dist/searchcraft-javascript-sdk/p-c7df8be6.entry.js +2 -0
  171. package/dist/searchcraft-javascript-sdk/p-c7df8be6.entry.js.map +1 -0
  172. package/dist/searchcraft-javascript-sdk/p-eb6058e8.entry.js +2 -0
  173. package/dist/searchcraft-javascript-sdk/p-eb6058e8.entry.js.map +1 -0
  174. package/dist/searchcraft-javascript-sdk/p-faaa4394.entry.js +2 -0
  175. package/dist/searchcraft-javascript-sdk/p-faaa4394.entry.js.map +1 -0
  176. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
  177. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  178. package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +1 -0
  179. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +2 -1
  180. package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +1 -0
  181. package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +1 -0
  182. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +2 -1
  183. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +1 -0
  184. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +7 -10
  185. package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +2 -1
  186. package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +1 -0
  187. package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +2 -1
  188. package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +2 -0
  189. package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +1 -0
  190. package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +1 -0
  191. package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +2 -1
  192. package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +5 -0
  193. package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +2 -1
  194. package/dist/types/components.d.ts +17 -4
  195. package/dist/types/index.d.ts +2 -1
  196. package/dist/types/provider/store.d.ts +1 -0
  197. package/dist/types/types/_shared.types.d.ts +1 -0
  198. package/dist/types/types/index.d.ts +1 -0
  199. package/dist/types/types/raw.d.ts +4 -0
  200. package/dist/types/types/searchcraft-base-search-results.types.d.ts +1 -0
  201. package/dist/types/types/searchcraft-filter-panel.types.d.ts +1 -0
  202. package/dist/types/types/searchcraft-popover-form.types.d.ts +1 -0
  203. package/dist/types/utils/facets.d.ts +1 -0
  204. package/dist/types/utils/index.d.ts +1 -0
  205. package/dist/types/utils/styles.d.ts +1 -0
  206. package/dist/types/utils/units.d.ts +1 -0
  207. package/package.json +6 -4
  208. package/dist/cjs/index-b3b77ea2.js.map +0 -1
  209. package/dist/cjs/store-d7ebcf7a.js.map +0 -1
  210. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +0 -227
  211. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +0 -179
  212. package/dist/collection/components/searchcraft-button/searchcraft-button.module.css +0 -174
  213. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.module.css +0 -158
  214. package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.module.css +0 -266
  215. package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.module.css +0 -168
  216. package/dist/collection/components/searchcraft-input-form/searchcraft-input-form.module.css +0 -293
  217. package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.module.css +0 -159
  218. package/dist/collection/components/searchcraft-popover-button/searchcraft-popover-button.module.css +0 -0
  219. package/dist/collection/components/searchcraft-popover-form/searchcraft-popover-form.module.css +0 -322
  220. package/dist/collection/components/searchcraft-popover-list-item/searchcraft-popover-list-item.module.css +0 -209
  221. package/dist/collection/components/searchcraft-popover-list-view/searchcraft-popover-list-view.module.css +0 -0
  222. package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.module.css +0 -169
  223. package/dist/collection/components/searchcraft-slider/searchcraft-slider.module.css +0 -231
  224. package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.module.css +0 -207
  225. package/dist/components/p-02a16e53.js +0 -240
  226. package/dist/components/p-02a16e53.js.map +0 -1
  227. package/dist/components/p-04c46179.js +0 -101
  228. package/dist/components/p-04c46179.js.map +0 -1
  229. package/dist/components/p-0e38a723.js +0 -99
  230. package/dist/components/p-0e38a723.js.map +0 -1
  231. package/dist/components/p-4c45ef80.js +0 -67
  232. package/dist/components/p-4c45ef80.js.map +0 -1
  233. package/dist/components/p-85765b81.js.map +0 -1
  234. package/dist/components/p-953f4238.js +0 -35
  235. package/dist/components/p-953f4238.js.map +0 -1
  236. package/dist/components/p-a248ad69.js +0 -276
  237. package/dist/components/p-a248ad69.js.map +0 -1
  238. package/dist/components/p-a9bd1872.js +0 -38
  239. package/dist/components/p-a9bd1872.js.map +0 -1
  240. package/dist/components/p-cf4ced92.js +0 -49
  241. package/dist/components/p-cf4ced92.js.map +0 -1
  242. package/dist/components/p-d6a88eed.js.map +0 -1
  243. package/dist/components/p-e4846fa2.js.map +0 -1
  244. package/dist/components/p-f9d778b3.js +0 -48
  245. package/dist/components/p-f9d778b3.js.map +0 -1
  246. package/dist/esm/index-11551663.js.map +0 -1
  247. package/dist/esm/store-1058f7b0.js.map +0 -1
  248. package/dist/searchcraft-javascript-sdk/p-4580e8a4.entry.js +0 -2
  249. package/dist/searchcraft-javascript-sdk/p-4580e8a4.entry.js.map +0 -1
  250. package/dist/searchcraft-javascript-sdk/p-7049b93d.entry.js +0 -2
  251. package/dist/searchcraft-javascript-sdk/p-7049b93d.entry.js.map +0 -1
  252. package/dist/searchcraft-javascript-sdk/p-8e539d62.entry.js +0 -2
  253. package/dist/searchcraft-javascript-sdk/p-8e539d62.entry.js.map +0 -1
  254. package/dist/searchcraft-javascript-sdk/p-98640a6a.entry.js +0 -2
  255. package/dist/searchcraft-javascript-sdk/p-98640a6a.entry.js.map +0 -1
  256. package/dist/searchcraft-javascript-sdk/p-9d0f5c89.entry.js +0 -2
  257. package/dist/searchcraft-javascript-sdk/p-9d0f5c89.entry.js.map +0 -1
  258. package/dist/searchcraft-javascript-sdk/p-b8bd53ce.entry.js +0 -2
  259. package/dist/searchcraft-javascript-sdk/p-b8bd53ce.entry.js.map +0 -1
  260. package/dist/searchcraft-javascript-sdk/p-c27a3673.entry.js +0 -2
  261. package/dist/searchcraft-javascript-sdk/p-c27a3673.entry.js.map +0 -1
  262. package/dist/searchcraft-javascript-sdk/p-cd852b84.entry.js +0 -2
  263. package/dist/searchcraft-javascript-sdk/p-cd852b84.entry.js.map +0 -1
  264. package/dist/searchcraft-javascript-sdk/p-d6a88eed.js +0 -11
  265. package/dist/searchcraft-javascript-sdk/p-d6a88eed.js.map +0 -1
  266. package/dist/searchcraft-javascript-sdk/p-e042deb9.entry.js +0 -2
  267. package/dist/searchcraft-javascript-sdk/p-e042deb9.entry.js.map +0 -1
  268. package/dist/searchcraft-javascript-sdk/p-e0be53df.js +0 -3
  269. package/dist/searchcraft-javascript-sdk/p-e0be53df.js.map +0 -1
  270. package/dist/searchcraft-javascript-sdk/p-efab9f3c.entry.js +0 -2
  271. package/dist/searchcraft-javascript-sdk/p-efab9f3c.entry.js.map +0 -1
@@ -1,231 +0,0 @@
1
- /** Appearance & Layout */
2
- :root {
3
- /**
4
- * Border radius of the input form element.
5
- */
6
- --sc-input-border-radius: 8px;
7
- /**
8
- * Icon size of the "magnifying glass" icon rendered in the input form.
9
- */
10
- --sc-input-search-icon-size: 20px;
11
- /**
12
- * Icon size of the `x` button rendered in the input form.
13
- */
14
- --sc-input-clear-icon-size: 20px;
15
- /**
16
- * Padding on the left side of the input form.
17
- */
18
- --sc-input-padding-left: 44px;
19
- /**
20
- * Padding on the right side of the input form.
21
- */
22
- --sc-input-padding-right: 44px;
23
- /**
24
- * Border radius applied to result images.
25
- */
26
- --sc-image-border-radius: 8px;
27
- /**
28
- * Border radius applied to popover form containers.
29
- */
30
- --sc-popover-form-border-radius: 8px;
31
- /**
32
- * Height of the list view/results container portion of the popover form.
33
- */
34
- --sc-popover-list-view-height: 400px;
35
- /**
36
- * Size of images of list view items in the popoer list view.
37
- */
38
- --sc-popover-list-item-image-size: 60px;
39
- /**
40
- * Horizontal padding of popover list items.
41
- */
42
- --sc-popover-list-item-padding-horizontal: 8px;
43
- /**
44
- * Vertical padding of popover list items.
45
- */
46
- --sc-popover-list-item-padding-vertical: 8px;
47
- /**
48
- * Maximum width of popover forms of type `modal`.
49
- */
50
- --sc-popover-modal-max-width: 570px;
51
- }
52
-
53
- :root {
54
- --sc-surface-disabled: #D9D9D9;
55
- --sc-surface-neutral-primary: #FFFFFF;
56
- --sc-surface-neutral-secondary: #F3F3F3;
57
- --sc-surface-neutral-light: #FFFFFF;
58
- --sc-surface-neutral-primary-hover: #FAFAFA;
59
- --sc-surface-neutral-primary-active: #F7F7F7;
60
- --sc-surface-neutral-secondary-hover: #EDEDED;
61
- --sc-surface-neutral-secondary-active: #E6E6E6;
62
- --sc-surface-brand-primary: #000000;
63
- --sc-surface-brand-secondary: #E6E6E6;
64
- --sc-surface-brand-primary-hover: #2E2E2E;
65
- --sc-surface-brand-primary-active: #292929;
66
- --sc-surface-brand-secondary-hover: #EBEBEB;
67
- --sc-surface-brand-secondary-active: #E0E0E0;
68
- --sc-surface-success-primary: #008000;
69
- --sc-surface-success-secondary: #CCFFCC;
70
- --sc-surface-success-primary-hover: #009900;
71
- --sc-surface-success-primary-active: #006600;
72
- --sc-surface-success-secondary-hover: #E6FFE6;
73
- --sc-surface-success-secondary-active: #E6FFE6;
74
- --sc-surface-caution-primary: #CC6600;
75
- --sc-surface-caution-secondary: #FFD9B3;
76
- --sc-surface-caution-primary-hover: #E57300;
77
- --sc-surface-caution-primary-active: #B25A00;
78
- --sc-surface-caution-secondary-hover: #FFE5CC;
79
- --sc-surface-caution-secondary-active: #FFCC99;
80
- --sc-surface-danger-primary: #CC0000;
81
- --sc-surface-danger-secondary: #FFCCCC;
82
- --sc-surface-danger-primary-hover: #E50000;
83
- --sc-surface-danger-primary-active: #B30000;
84
- --sc-surface-danger-secondary-hover: #FFE7E7;
85
- --sc-surface-danger-secondary-active: #FFB3B3;
86
- --sc-content-brand: #000000;
87
- --sc-content-success: #008000;
88
- --sc-content-caution: #994D00;
89
- --sc-content-danger: #990000;
90
- --sc-content-disabled: #737373;
91
- --sc-content-neutral-primary: #292929;
92
- --sc-content-neutral-secondary: #404040;
93
- --sc-content-brand-on-primary: #FFFFFF;
94
- --sc-content-success-on-primary: #FFFFFF;
95
- --sc-content-caution-on-primary: #FFFFFF;
96
- --sc-content-danger-on-primary: #FFFFFF;
97
- --sc-content-disabled-on-disabled: #737373;
98
- --sc-border-neutral: rgba(0,0,0, 0.1);
99
- --sc-border-brand: #000000;
100
- --sc-border-success: #008000;
101
- --sc-border-caution: #CC6600;
102
- --sc-border-danger: #CC0000;
103
- --sc-border-disabled: #737373;
104
- }
105
-
106
- :root {
107
- /** Typography */
108
- --sc-font-family: sans-serif;
109
- --sc-heading-1-font-size: 32px;
110
- --sc-heading-1-line-height: 36px;
111
- --sc-heading-1-font-weight: 700;
112
- --sc-heading-2-font-size: 29px;
113
- --sc-heading-2-line-height: 32px;
114
- --sc-heading-2-font-weight: 700;
115
- --sc-heading-3-font-size: 26px;
116
- --sc-heading-3-line-height: 28px;
117
- --sc-heading-3-font-weight: 700;
118
- --sc-heading-4-font-size: 23px;
119
- --sc-heading-4-line-height: 24px;
120
- --sc-heading-4-font-weight: 700;
121
- --sc-heading-5-font-size: 20px;
122
- --sc-heading-5-line-height: 24px;
123
- --sc-heading-5-font-weight: 700;
124
- --sc-heading-6-font-size: 10px;
125
- --sc-heading-6-line-height: 12px;
126
- --sc-heading-6-font-weight: 700;
127
- --sc-body-bold-font-size: 16px;
128
- --sc-body-bold-line-height: 20px;
129
- --sc-body-bold-font-weight: 700;
130
- --sc-body-font-size: 16px;
131
- --sc-body-line-height: 20px;
132
- --sc-body-font-weight:400;
133
- --sc-body-small-bold-font-size: 12px;
134
- --sc-body-small-bold-line-height: 16px;
135
- --sc-body-small-bold-font-weight: 700;
136
- --sc-body-small-font-size: 12px;
137
- --sc-body-small-line-height: 16px;
138
- --sc-body-small-font-weight: 400;
139
- }
140
-
141
- /**
142
- * Variables that need to be part of the preprocessor can go here.
143
- */
144
- :root {
145
- --sc-breakpoint-sm: 576px;
146
- --sc-breakpoint-md: 768px;
147
- --sc-breakpoint-lg: 992px;
148
- }
149
-
150
- .searchcraft-slider-container {
151
- align-items: center;
152
- display: flex;
153
- flex-direction: column;
154
- gap: 10px;
155
- width: 100%;
156
- }
157
-
158
- .searchcraft-slider-range-container {
159
- align-items: center;
160
- background-color: var(--sc-surface-disabled);
161
- border-radius: 999px;
162
- display: flex;
163
- position: relative;
164
- height: 4px;
165
- width: 100%;
166
- }
167
- .searchcraft-slider-range-container::-webkit-slider-runnable-track {
168
- pointer-events: none;
169
- }
170
- .searchcraft-slider-range-container .searchcraft-slider-active-range {
171
- background-color: var(--sc-surface-brand-primary);
172
- border-radius: 2px;
173
- height: 4px;
174
- position: absolute;
175
- top: 50%;
176
- transform: translateY(-50%);
177
- z-index: 0;
178
- }
179
- .searchcraft-slider-range-container .searchcraft-slider-active-range::-webkit-slider-runnable-track {
180
- pointer-events: none;
181
- }
182
- .searchcraft-slider-range-container .searchcraft-slider-active-range::-moz-range-track {
183
- pointer-events: none;
184
- }
185
- .searchcraft-slider-range-container .searchcraft-slider-input {
186
- appearance: none;
187
- background: transparent;
188
- border-radius: 2px;
189
- height: 4px;
190
- margin: 0;
191
- outline: none;
192
- pointer-events: none;
193
- position: absolute;
194
- width: 100%;
195
- -webkit-appearance: none;
196
- }
197
- .searchcraft-slider-range-container .searchcraft-slider-input::-webkit-slider-thumb {
198
- background-color: var(--sc-surface-neutral-light);
199
- border-radius: 50%;
200
- border: 2px solid var(--sc-border-neutral);
201
- cursor: pointer;
202
- height: 20px;
203
- pointer-events: all;
204
- width: 20px;
205
- -webkit-appearance: none;
206
- }
207
- .searchcraft-slider-range-container .searchcraft-slider-input::-moz-range-thumb {
208
- background-color: var(--sc-surface-neutral-light);
209
- border-radius: 50%;
210
- border: 2px solid var(--sc-border-neutral);
211
- cursor: pointer;
212
- height: 20px;
213
- pointer-events: all;
214
- width: 20px;
215
- }
216
-
217
- .searchcraft-slider-label-container {
218
- color: var(--sc-content-primary);
219
- display: flex;
220
- font-family: "Source Sans Pro", sans-serif;
221
- font-size: 15px;
222
- font-weight: 600;
223
- justify-content: space-between;
224
- margin-top: 10px;
225
- width: 100%;
226
- }
227
-
228
- .searchcraft-slider-label {
229
- min-width: 30px;
230
- text-align: center;
231
- }
@@ -1,207 +0,0 @@
1
- /** Appearance & Layout */
2
- :root {
3
- /**
4
- * Border radius of the input form element.
5
- */
6
- --sc-input-border-radius: 8px;
7
- /**
8
- * Icon size of the "magnifying glass" icon rendered in the input form.
9
- */
10
- --sc-input-search-icon-size: 20px;
11
- /**
12
- * Icon size of the `x` button rendered in the input form.
13
- */
14
- --sc-input-clear-icon-size: 20px;
15
- /**
16
- * Padding on the left side of the input form.
17
- */
18
- --sc-input-padding-left: 44px;
19
- /**
20
- * Padding on the right side of the input form.
21
- */
22
- --sc-input-padding-right: 44px;
23
- /**
24
- * Border radius applied to result images.
25
- */
26
- --sc-image-border-radius: 8px;
27
- /**
28
- * Border radius applied to popover form containers.
29
- */
30
- --sc-popover-form-border-radius: 8px;
31
- /**
32
- * Height of the list view/results container portion of the popover form.
33
- */
34
- --sc-popover-list-view-height: 400px;
35
- /**
36
- * Size of images of list view items in the popoer list view.
37
- */
38
- --sc-popover-list-item-image-size: 60px;
39
- /**
40
- * Horizontal padding of popover list items.
41
- */
42
- --sc-popover-list-item-padding-horizontal: 8px;
43
- /**
44
- * Vertical padding of popover list items.
45
- */
46
- --sc-popover-list-item-padding-vertical: 8px;
47
- /**
48
- * Maximum width of popover forms of type `modal`.
49
- */
50
- --sc-popover-modal-max-width: 570px;
51
- }
52
-
53
- :root {
54
- --sc-surface-disabled: #D9D9D9;
55
- --sc-surface-neutral-primary: #FFFFFF;
56
- --sc-surface-neutral-secondary: #F3F3F3;
57
- --sc-surface-neutral-light: #FFFFFF;
58
- --sc-surface-neutral-primary-hover: #FAFAFA;
59
- --sc-surface-neutral-primary-active: #F7F7F7;
60
- --sc-surface-neutral-secondary-hover: #EDEDED;
61
- --sc-surface-neutral-secondary-active: #E6E6E6;
62
- --sc-surface-brand-primary: #000000;
63
- --sc-surface-brand-secondary: #E6E6E6;
64
- --sc-surface-brand-primary-hover: #2E2E2E;
65
- --sc-surface-brand-primary-active: #292929;
66
- --sc-surface-brand-secondary-hover: #EBEBEB;
67
- --sc-surface-brand-secondary-active: #E0E0E0;
68
- --sc-surface-success-primary: #008000;
69
- --sc-surface-success-secondary: #CCFFCC;
70
- --sc-surface-success-primary-hover: #009900;
71
- --sc-surface-success-primary-active: #006600;
72
- --sc-surface-success-secondary-hover: #E6FFE6;
73
- --sc-surface-success-secondary-active: #E6FFE6;
74
- --sc-surface-caution-primary: #CC6600;
75
- --sc-surface-caution-secondary: #FFD9B3;
76
- --sc-surface-caution-primary-hover: #E57300;
77
- --sc-surface-caution-primary-active: #B25A00;
78
- --sc-surface-caution-secondary-hover: #FFE5CC;
79
- --sc-surface-caution-secondary-active: #FFCC99;
80
- --sc-surface-danger-primary: #CC0000;
81
- --sc-surface-danger-secondary: #FFCCCC;
82
- --sc-surface-danger-primary-hover: #E50000;
83
- --sc-surface-danger-primary-active: #B30000;
84
- --sc-surface-danger-secondary-hover: #FFE7E7;
85
- --sc-surface-danger-secondary-active: #FFB3B3;
86
- --sc-content-brand: #000000;
87
- --sc-content-success: #008000;
88
- --sc-content-caution: #994D00;
89
- --sc-content-danger: #990000;
90
- --sc-content-disabled: #737373;
91
- --sc-content-neutral-primary: #292929;
92
- --sc-content-neutral-secondary: #404040;
93
- --sc-content-brand-on-primary: #FFFFFF;
94
- --sc-content-success-on-primary: #FFFFFF;
95
- --sc-content-caution-on-primary: #FFFFFF;
96
- --sc-content-danger-on-primary: #FFFFFF;
97
- --sc-content-disabled-on-disabled: #737373;
98
- --sc-border-neutral: rgba(0,0,0, 0.1);
99
- --sc-border-brand: #000000;
100
- --sc-border-success: #008000;
101
- --sc-border-caution: #CC6600;
102
- --sc-border-danger: #CC0000;
103
- --sc-border-disabled: #737373;
104
- }
105
-
106
- :root {
107
- /** Typography */
108
- --sc-font-family: sans-serif;
109
- --sc-heading-1-font-size: 32px;
110
- --sc-heading-1-line-height: 36px;
111
- --sc-heading-1-font-weight: 700;
112
- --sc-heading-2-font-size: 29px;
113
- --sc-heading-2-line-height: 32px;
114
- --sc-heading-2-font-weight: 700;
115
- --sc-heading-3-font-size: 26px;
116
- --sc-heading-3-line-height: 28px;
117
- --sc-heading-3-font-weight: 700;
118
- --sc-heading-4-font-size: 23px;
119
- --sc-heading-4-line-height: 24px;
120
- --sc-heading-4-font-weight: 700;
121
- --sc-heading-5-font-size: 20px;
122
- --sc-heading-5-line-height: 24px;
123
- --sc-heading-5-font-weight: 700;
124
- --sc-heading-6-font-size: 10px;
125
- --sc-heading-6-line-height: 12px;
126
- --sc-heading-6-font-weight: 700;
127
- --sc-body-bold-font-size: 16px;
128
- --sc-body-bold-line-height: 20px;
129
- --sc-body-bold-font-weight: 700;
130
- --sc-body-font-size: 16px;
131
- --sc-body-line-height: 20px;
132
- --sc-body-font-weight:400;
133
- --sc-body-small-bold-font-size: 12px;
134
- --sc-body-small-bold-line-height: 16px;
135
- --sc-body-small-bold-font-weight: 700;
136
- --sc-body-small-font-size: 12px;
137
- --sc-body-small-line-height: 16px;
138
- --sc-body-small-font-weight: 400;
139
- }
140
-
141
- /**
142
- * Variables that need to be part of the preprocessor can go here.
143
- */
144
- :root {
145
- --sc-breakpoint-sm: 576px;
146
- --sc-breakpoint-md: 768px;
147
- --sc-breakpoint-lg: 992px;
148
- }
149
-
150
- .searchcraft-toggle-button-container {
151
- display: flex;
152
- justify-content: space-between;
153
- align-items: flex-start;
154
- gap: 10px;
155
- }
156
-
157
- .searchcraft-toggle-button-label {
158
- font-family: var(--sc-font-family);
159
- -webkit-font-smoothing: antialiased;
160
- font-size: var(--sc-body-font-size);
161
- font-weight: var(--sc-body-font-weight);
162
- line-height: var(--sc-body-line-height);
163
- margin: 0;
164
- color: var(--sc-content-neutral-primary);
165
- }
166
-
167
- .searchcraft-toggle-button-sub-label {
168
- font-family: var(--sc-font-family);
169
- -webkit-font-smoothing: antialiased;
170
- font-size: var(--sc-body-small-font-size);
171
- font-weight: var(--sc-body-small-font-weight);
172
- line-height: var(--sc-body-small-line-height);
173
- margin: 0;
174
- color: var(--sc-content-neutral-secondary);
175
- }
176
-
177
- .searchcraft-toggle-button-background {
178
- transition: background-color 0.2s;
179
- background: var(--sc-surface-disabled);
180
- border: none;
181
- border-radius: 16px;
182
- cursor: pointer;
183
- height: 26px;
184
- position: relative;
185
- width: 44px;
186
- flex-shrink: 0;
187
- }
188
-
189
- .searchcraft-toggle-button-background.active {
190
- background: var(--sc-surface-brand-primary);
191
- box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05);
192
- }
193
-
194
- .searchcraft-toggle-button-handle {
195
- background: var(--sc-surface-neutral-light);
196
- border-radius: 50%;
197
- height: 18px;
198
- left: 4px;
199
- position: absolute;
200
- top: calc(50% - 9px);
201
- transition: transform 0.3s ease;
202
- width: 18px;
203
- }
204
-
205
- .searchcraft-toggle-button-handle.active {
206
- transform: translateX(16px);
207
- }
@@ -1,240 +0,0 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h } from './p-e4846fa2.js';
2
- import { u as useSearchcraftStore, b as ae } from './p-d6a88eed.js';
3
- import { p as parseCustomStyles } from './p-d9551738.js';
4
- import { c as classNames } from './p-5cdc6210.js';
5
- import { d as defineCustomElement$3 } from './p-f9d778b3.js';
6
- import { d as defineCustomElement$2 } from './p-953f4238.js';
7
- import { d as defineCustomElement$1 } from './p-a9bd1872.js';
8
-
9
- const name = "@searchcraft/javascript-sdk";
10
- const version = "0.6.0";
11
- const description = "Searchcraft Javascript SDK";
12
- const author = "Searchcraft";
13
- const license = "Apache-2.0";
14
- const main = "dist/index.cjs.js";
15
- const module = "dist/index.js";
16
- const types = "dist/types/index.d.ts";
17
- const collection = "dist/collection/collection-manifest.json";
18
- const unpkg = "dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js";
19
- const exports = {
20
- ".": {
21
- "import": "./dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js",
22
- require: "./dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.cjs.js",
23
- types: "./dist/types/index.d.ts"
24
- },
25
- "./components": {
26
- "import": "./dist/components/index.js",
27
- types: "./dist/components/index.d.ts"
28
- },
29
- "./loader": {
30
- "import": "./dist/loader/index.js",
31
- require: "./dist/loader/index.cjs",
32
- types: "./dist/loader/index.d.ts"
33
- },
34
- "./dist/components/*": {
35
- "import": "./dist/components/*",
36
- types: "./dist/components/*"
37
- }
38
- };
39
- const repository = {
40
- type: "git",
41
- url: "https://bitbucket.org/madebychalk/searchcraft-javascript-sdks/"
42
- };
43
- const files = [
44
- "dist/"
45
- ];
46
- const scripts = {
47
- build: "stencil build",
48
- dev: "stencil build --dev --watch",
49
- test: "stencil test --spec --e2e",
50
- "test.watch": "stencil test --spec --e2e --watchAll",
51
- generate: "stencil generate"
52
- };
53
- const dependencies = {
54
- classnames: "^2.3.2"
55
- };
56
- const devDependencies = {
57
- "@searchcraft/core": "^0.6.0",
58
- "@searchcraft/javascript-sdk": "*",
59
- "@stencil/core": "^4.7.0",
60
- "@stencil/react-output-target": "^0.8.2",
61
- "@stencil/sass": "^3.0.12",
62
- "@types/node": "^16.18.11",
63
- zustand: "^5.0.1"
64
- };
65
- const packageJson = {
66
- name: name,
67
- "private": false,
68
- version: version,
69
- description: description,
70
- author: author,
71
- license: license,
72
- main: main,
73
- module: module,
74
- types: types,
75
- collection: collection,
76
- "collection:main": "dist/collection/index.js",
77
- unpkg: unpkg,
78
- exports: exports,
79
- repository: repository,
80
- files: files,
81
- scripts: scripts,
82
- dependencies: dependencies,
83
- devDependencies: devDependencies
84
- };
85
-
86
- const searchcraftInputFormModuleCss = ":root{--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px;--sc-popover-form-border-radius:8px;--sc-popover-list-view-height:400px;--sc-popover-list-item-image-size:60px;--sc-popover-list-item-padding-horizontal:8px;--sc-popover-list-item-padding-vertical:8px;--sc-popover-modal-max-width:570px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}:root{--sc-breakpoint-sm:576px;--sc-breakpoint-md:768px;--sc-breakpoint-lg:992px}.searchcraft-input-grid{display:grid;gap:4px 8px}.searchcraft-input-grid-buttonLeft{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-grid-buttonLeft .searchcraft-input-button-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-label-wrapper{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-error-wrapper{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonLeft .searchcraft-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-grid-buttonRight .searchcraft-input-button-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonRight .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-grid-buttonNone{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-grid-buttonNone .searchcraft-input-button-wrapper{display:none}.searchcraft-input-grid-buttonNone .searchcraft-input-label-wrapper{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-error-wrapper{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-grid-buttonNone .searchcraft-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-wrapper{position:relative;display:flex}.searchcraft-input{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-body-font-weight);line-height:var(--sc-body-line-height);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-border-radius);border:none;color:var(--sc-content-neutral-primary);outline:none;padding-left:var(--sc-input-padding-left);padding-right:var(--sc-input-padding-right);padding-top:12px;padding-bottom:12px;flex:1}.searchcraft-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input:focus{outline:var(--sc-border-brand) solid 2px}.searchcraft-input:focus::placeholder{opacity:0}.searchcraft-input.error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input.error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-search-icon-wrapper{align-items:center;justify-content:center;display:flex;position:absolute;pointer-events:none;bottom:0;left:0;top:0;width:var(--sc-input-padding-left)}.searchcraft-input-search-icon{pointer-events:none;width:var(--sc-input-search-icon-size);height:var(--sc-input-search-icon-size)}.searchcraft-input-clear-button{all:unset;align-items:center;justify-content:center;cursor:pointer;display:flex;position:absolute;border:none;outline:none;bottom:0;right:0;top:0;width:var(--sc-input-padding-right)}.searchcraft-input-clear-icon{width:var(--sc-input-clear-icon-size);height:var(--sc-input-clear-icon-size)}";
87
- const SearchcraftInputFormStyle0 = searchcraftInputFormModuleCss;
88
-
89
- const SearchcraftInput = /*@__PURE__*/ proxyCustomElement(class SearchcraftInput extends H {
90
- constructor() {
91
- super();
92
- this.__registerHost();
93
- this.inputCleared = createEvent(this, "inputCleared", 7);
94
- this.noResultsReceived = createEvent(this, "noResultsReceived", 7);
95
- this.inputFocus = createEvent(this, "inputFocus", 7);
96
- this.inputBlur = createEvent(this, "inputBlur", 7);
97
- this.inputInit = createEvent(this, "inputInit", 7);
98
- this.querySubmit = createEvent(this, "querySubmit", 7);
99
- this.searchStore = useSearchcraftStore.getState();
100
- this.handleOnInput = (event) => {
101
- const input = event.target;
102
- this.inputValue = input.value;
103
- if (input.value.trim() === '') {
104
- this.inputCleared.emit();
105
- this.searchTerm = '';
106
- this.searchStore.setQuery('');
107
- this.searchStore.setSearchResults(null);
108
- return;
109
- }
110
- if (!this.autoSearch) {
111
- return;
112
- }
113
- this.performSearch(input.value);
114
- };
115
- this.performSearch = async (value) => {
116
- if (value === useSearchcraftStore.getState().query) {
117
- return;
118
- }
119
- this.searchTerm = value.trim();
120
- this.error = false;
121
- this.searchStore.setQuery(this.searchTerm);
122
- this.querySubmit.emit(this.searchTerm);
123
- try {
124
- await this.searchStore.search();
125
- }
126
- catch (error) {
127
- this.error = true;
128
- this.inputCleared.emit();
129
- }
130
- };
131
- this.handleClearInput = () => {
132
- this.inputValue = '';
133
- this.searchTerm = '';
134
- this.searchStore.setQuery('');
135
- this.searchStore.setSearchResults(null);
136
- this.error = false;
137
- if (this.inputCleared) {
138
- this.inputCleared.emit();
139
- }
140
- };
141
- this.handleFormSubmit = async (event) => {
142
- event.preventDefault();
143
- await this.performSearch(this.searchTerm);
144
- };
145
- this.config = undefined;
146
- this.autoSearch = true;
147
- this.buttonPlacement = 'none';
148
- this.buttonLabel = undefined;
149
- this.inputLabel = undefined;
150
- this.customStyles = {};
151
- this.placeholderValue = 'Enter Search';
152
- this.searchTerm = '';
153
- this.inputValue = this.searchTerm;
154
- this.error = false;
155
- this.isSearchcraftInitialized = false;
156
- }
157
- init() {
158
- if (this.config && !this.isSearchcraftInitialized) {
159
- const searchcraft = new ae(this.config, {
160
- sdkName: packageJson.name,
161
- sdkVersion: packageJson.version,
162
- });
163
- this.searchStore.initialize(searchcraft, true);
164
- this.isSearchcraftInitialized = true;
165
- this.inputInit.emit();
166
- }
167
- }
168
- componentDidLoad() {
169
- this.init();
170
- }
171
- onConfigChange() {
172
- this.init();
173
- }
174
- render() {
175
- const validatedCustomStyles = parseCustomStyles(this.customStyles);
176
- const isShowingClearButton = this.inputValue.length > 0;
177
- const inputGridClassNames = classNames('searchcraft-input-grid', {
178
- 'searchcraft-input-grid-buttonLeft': this.buttonPlacement === 'left',
179
- 'searchcraft-input-grid-buttonRight': this.buttonPlacement === 'right',
180
- 'searchcraft-input-grid-buttonNone': this.buttonPlacement === 'none',
181
- });
182
- const shouldHaveVerticalGap = this.inputLabel || this.error;
183
- const inputGridStyles = {
184
- gap: shouldHaveVerticalGap ? '4px 8px' : '0px 8px',
185
- };
186
- return (h("form", { key: 'd257962d56a583e66bdf8b55786d5dfbae231965', class: 'searchcraft-input-form', onSubmit: this.handleFormSubmit }, h("div", { key: 'd9a8467a4d76433bc473941bd4583d991ae38040', class: inputGridClassNames, style: inputGridStyles }, h("div", { key: 'a94eacc99593ed6a30006532c51cdd38c692c93f', class: 'searchcraft-input-button-wrapper' }, h("searchcraft-button", { key: '43de9d2cd538bbdf2a2bbc9f5165bfb969943831', onButtonClick: this.handleFormSubmit, label: this.buttonLabel })), this.inputLabel && (h("div", { key: 'b3554f81577d4526023d8b67de6837386789e9f3', class: 'searchcraft-input-label-wrapper' }, h("searchcraft-input-label", { key: '5cda67f38d0914dfe7e1ea71bee60b69524e9d5c', label: this.inputLabel }))), this.error && (h("div", { key: '22b82da9420159ebaf00fe3bb790d6b07341a79e', class: 'searchcraft-input-error-wrapper' }, h("searchcraft-error-message", { key: '2cc5c322408b976a7043ef9640c812036468435d', errorMessage: 'Something went wrong.' }))), h("div", { key: 'f2741bd0d20604327fa4661c3213e48df7a58249', class: 'searchcraft-input-wrapper' }, h("input", { key: '692822c6a38001ba4c71289b6b7fba13767742b5', autoComplete: 'off', class: 'searchcraft-input', onFocus: () => this.inputFocus.emit(), onBlur: () => this.inputBlur.emit(), onInput: (event) => {
187
- this.handleOnInput(event);
188
- }, placeholder: this.placeholderValue, style: validatedCustomStyles, type: 'text', value: this.inputValue }), h("div", { key: '58af613c048e7c072e4a976f71ea1bd7b3632a62', class: 'searchcraft-input-search-icon-wrapper' }, h("svg", { key: 'e6cf67405b45703ca7ddaf46a59adbf5ff926f0e', class: 'searchcraft-input-search-icon', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'searchcraft-title' }, h("title", { key: 'fa510c85900d9a716076ba79866f5bbe4f1a20ed', id: 'searchcraft-title' }, "Searchcraft Search Icon Light"), h("path", { key: 'ac9d166c19e6644adcbc00fe665e17fcf5449b73', 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' }))), isShowingClearButton && (h("button", { key: '992cf037b6b75200c64c21809915b5ce6f970f5c', type: 'button', class: 'searchcraft-input-clear-button', onClick: this.handleClearInput }, h("svg", { key: 'f09a5f2c1007cc11d89b2df06ec189d923bc634f', class: 'searchcraft-input-clear-icon', viewBox: '0 0 22 22', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-labelledby": 'icon-title' }, h("title", { key: '92bd5162ae636aaf6c8051959ff16cd26ee98660', id: 'icon-title' }, "Searchcraft Clear Input Icon Light"), h("path", { key: '9b5a8a4113a3162035d48895f0facf6f6045f266', 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' }))))))));
189
- }
190
- static get watchers() { return {
191
- "config": ["onConfigChange"]
192
- }; }
193
- static get style() { return SearchcraftInputFormStyle0; }
194
- }, [0, "searchcraft-input-form", {
195
- "config": [16],
196
- "autoSearch": [4, "auto-search"],
197
- "buttonPlacement": [1, "button-placement"],
198
- "buttonLabel": [1, "button-label"],
199
- "inputLabel": [1, "input-label"],
200
- "customStyles": [1, "custom-styles"],
201
- "placeholderValue": [1, "placeholder-value"],
202
- "searchTerm": [1, "search-term"],
203
- "inputValue": [32],
204
- "error": [32],
205
- "isSearchcraftInitialized": [32]
206
- }, undefined, {
207
- "config": ["onConfigChange"]
208
- }]);
209
- function defineCustomElement() {
210
- if (typeof customElements === "undefined") {
211
- return;
212
- }
213
- const components = ["searchcraft-input-form", "searchcraft-button", "searchcraft-error-message", "searchcraft-input-label"];
214
- components.forEach(tagName => { switch (tagName) {
215
- case "searchcraft-input-form":
216
- if (!customElements.get(tagName)) {
217
- customElements.define(tagName, SearchcraftInput);
218
- }
219
- break;
220
- case "searchcraft-button":
221
- if (!customElements.get(tagName)) {
222
- defineCustomElement$3();
223
- }
224
- break;
225
- case "searchcraft-error-message":
226
- if (!customElements.get(tagName)) {
227
- defineCustomElement$2();
228
- }
229
- break;
230
- case "searchcraft-input-label":
231
- if (!customElements.get(tagName)) {
232
- defineCustomElement$1();
233
- }
234
- break;
235
- } });
236
- }
237
-
238
- export { SearchcraftInput as S, defineCustomElement as d };
239
-
240
- //# sourceMappingURL=p-02a16e53.js.map