@rededor/cura 1.5.0 → 1.6.0-alpha.0

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 (373) hide show
  1. package/dist/cjs/{app-globals-57c5b283.js → app-globals-5a7ddb39.js} +21 -2
  2. package/dist/cjs/app-globals-5a7ddb39.js.map +1 -0
  3. package/dist/cjs/{cura-accordion_12.cjs.entry.js → cura-accordion_18.cjs.entry.js} +689 -50
  4. package/dist/cjs/cura-accordion_18.cjs.entry.js.map +1 -0
  5. package/dist/cjs/cura-alert.cjs.entry.js +2 -2
  6. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/cura-badge-counter.cjs.entry.js +2 -2
  8. package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
  9. package/dist/cjs/cura-badge-dot.cjs.entry.js +2 -2
  10. package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cura-badge-pill.cjs.entry.js +2 -2
  12. package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
  13. package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
  14. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  15. package/dist/cjs/cura-button-select.cjs.entry.js +2 -2
  16. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  17. package/dist/cjs/cura-calendar.cjs.entry.js +1 -1
  18. package/dist/cjs/cura-card.cjs.entry.js +1 -1
  19. package/dist/cjs/cura-checkbox.cjs.entry.js +2 -2
  20. package/dist/cjs/cura-display.cjs.entry.js +2 -2
  21. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +28 -0
  22. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js.map +1 -0
  23. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +2 -2
  24. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +4 -4
  25. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js.map +1 -1
  26. package/dist/cjs/cura-dropdown-search.cjs.entry.js +3 -3
  27. package/dist/cjs/cura-icons-view.cjs.entry.js +2 -2
  28. package/dist/cjs/cura-input-date.cjs.entry.js +3 -3
  29. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
  30. package/dist/cjs/cura-loader-bar.cjs.entry.js +2 -2
  31. package/dist/cjs/cura-modal.cjs.entry.js +3 -3
  32. package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
  33. package/dist/cjs/cura-progress-bar_2.cjs.entry.js +3 -3
  34. package/dist/cjs/cura-radio.cjs.entry.js +2 -2
  35. package/dist/cjs/cura-stepper.cjs.entry.js +2 -2
  36. package/dist/cjs/cura-switch.cjs.entry.js +2 -2
  37. package/dist/cjs/{cura-theme-module-14544f5f.js → cura-theme-module-a100c643.js} +9 -78
  38. package/dist/cjs/cura-theme-module-a100c643.js.map +1 -0
  39. package/dist/cjs/cura-toast.cjs.entry.js +2 -2
  40. package/dist/cjs/cura-tooltip.cjs.entry.js +3 -3
  41. package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
  42. package/dist/cjs/cura.cjs.js +5 -4
  43. package/dist/cjs/cura.cjs.js.map +1 -1
  44. package/dist/cjs/{index-e6d728ec.js → index-12d54921.js} +19 -2
  45. package/dist/cjs/index-12d54921.js.map +1 -0
  46. package/dist/cjs/index.cjs.js +2 -1
  47. package/dist/cjs/index.cjs.js.map +1 -1
  48. package/dist/cjs/loader.cjs.js +5 -4
  49. package/dist/cjs/loader.cjs.js.map +1 -1
  50. package/dist/cjs/static-4e83652c.js +76 -0
  51. package/dist/cjs/static-4e83652c.js.map +1 -0
  52. package/dist/collection/api/cura-api.js +19 -0
  53. package/dist/collection/api/cura-api.js.map +1 -1
  54. package/dist/collection/api/cura-api.type.js.map +1 -1
  55. package/dist/collection/collection-manifest.json +4 -0
  56. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +2 -2
  57. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
  58. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +6 -6
  59. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.css +8 -8
  60. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.css +5 -5
  61. package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.css +4 -4
  62. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.css +6 -6
  63. package/dist/collection/components/buttons/cura-button/cura-button.css +15 -15
  64. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +15 -15
  65. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +12 -12
  66. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +15 -15
  67. package/dist/collection/components/cura-alert/cura-alert.css +5 -5
  68. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.css +61 -0
  69. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.js +28 -0
  70. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.js.map +1 -0
  71. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.stories.js +37 -0
  72. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.stories.js.map +1 -0
  73. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.css +138 -0
  74. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.js +592 -0
  75. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.js.map +1 -0
  76. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.js +278 -0
  77. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.js.map +1 -0
  78. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.css +62 -0
  79. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js +44 -0
  80. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js.map +1 -0
  81. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.stories.js +38 -0
  82. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.stories.js.map +1 -0
  83. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.css +121 -0
  84. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.js +183 -0
  85. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.js.map +1 -0
  86. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.stories.js +85 -0
  87. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.stories.js.map +1 -0
  88. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  89. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  90. package/dist/collection/components/cura-modal/cura-modal.css +11 -11
  91. package/dist/collection/components/cura-modal/cura-modal.js +1 -1
  92. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  93. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +1 -1
  94. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +1 -1
  95. package/dist/collection/components/cura-stepper/cura-stepper.js +1 -1
  96. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  97. package/dist/collection/components/cura-tooltip/cura-tooltip.css +12 -12
  98. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  99. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  100. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.css +5 -5
  101. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  102. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  103. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +2 -2
  104. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +3 -3
  105. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  106. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +4 -0
  107. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +65 -11
  108. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  109. package/dist/collection/components/forms/cura-label/cura-label.js +6 -5
  110. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
  111. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  112. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  113. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  114. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  115. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  116. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  117. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  118. package/dist/collection/components/text/cura-heading/cura-heading.css +7 -6
  119. package/dist/collection/components/text/cura-heading/cura-heading.js +4 -19
  120. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  121. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +7 -7
  122. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +6 -20
  123. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  124. package/dist/collection/utils/FixedElementScrollBehavior.js +54 -0
  125. package/dist/collection/utils/FixedElementScrollBehavior.js.map +1 -0
  126. package/dist/collection/utils/utils.js +38 -0
  127. package/dist/collection/utils/utils.js.map +1 -1
  128. package/dist/components/cura-accordion-item.js +1 -1
  129. package/dist/components/cura-accordion-item.js.map +1 -1
  130. package/dist/components/cura-accordion.js +2 -2
  131. package/dist/components/cura-accordion.js.map +1 -1
  132. package/dist/components/cura-alert.js +1 -1
  133. package/dist/components/cura-alert.js.map +1 -1
  134. package/dist/components/cura-badge-counter2.js +1 -1
  135. package/dist/components/cura-badge-counter2.js.map +1 -1
  136. package/dist/components/cura-badge-distance.js +1 -1
  137. package/dist/components/cura-badge-distance.js.map +1 -1
  138. package/dist/components/cura-badge-dot.js +1 -1
  139. package/dist/components/cura-badge-dot.js.map +1 -1
  140. package/dist/components/cura-badge-pill2.js +1 -1
  141. package/dist/components/cura-badge-pill2.js.map +1 -1
  142. package/dist/components/cura-button-outline.js +1 -1
  143. package/dist/components/cura-button-outline.js.map +1 -1
  144. package/dist/components/cura-button-select.js +1 -1
  145. package/dist/components/cura-button-select.js.map +1 -1
  146. package/dist/components/cura-button-transparent2.js +1 -1
  147. package/dist/components/cura-button-transparent2.js.map +1 -1
  148. package/dist/components/cura-button.js +1 -1
  149. package/dist/components/cura-button.js.map +1 -1
  150. package/dist/components/cura-checkbox.js +1 -1
  151. package/dist/components/cura-display.js +1 -1
  152. package/dist/components/cura-dropdown-search-category.d.ts +11 -0
  153. package/dist/components/cura-dropdown-search-category.js +49 -0
  154. package/dist/components/cura-dropdown-search-category.js.map +1 -0
  155. package/dist/components/cura-dropdown-search-new.d.ts +11 -0
  156. package/dist/components/cura-dropdown-search-new.js +406 -0
  157. package/dist/components/cura-dropdown-search-new.js.map +1 -0
  158. package/dist/components/cura-dropdown-search-not-found.d.ts +11 -0
  159. package/dist/components/cura-dropdown-search-not-found.js +48 -0
  160. package/dist/components/cura-dropdown-search-not-found.js.map +1 -0
  161. package/dist/components/cura-dropdown-search-option-new.d.ts +11 -0
  162. package/dist/components/cura-dropdown-search-option-new.js +81 -0
  163. package/dist/components/cura-dropdown-search-option-new.js.map +1 -0
  164. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  165. package/dist/components/cura-dropdown-search-option.js +3 -3
  166. package/dist/components/cura-dropdown-search-option.js.map +1 -1
  167. package/dist/components/cura-dropdown-search.js +2 -2
  168. package/dist/components/cura-heading2.js +4 -17
  169. package/dist/components/cura-heading2.js.map +1 -1
  170. package/dist/components/cura-icon2.js +1 -1
  171. package/dist/components/cura-icons-view.js +1 -1
  172. package/dist/components/cura-input-date.js +2 -2
  173. package/dist/components/cura-input-date.js.map +1 -1
  174. package/dist/components/cura-input-text2.js +132 -7
  175. package/dist/components/cura-input-text2.js.map +1 -1
  176. package/dist/components/cura-label2.js +6 -5
  177. package/dist/components/cura-label2.js.map +1 -1
  178. package/dist/components/cura-loader-bar2.js +1 -1
  179. package/dist/components/cura-loader-circle2.js +1 -1
  180. package/dist/components/cura-modal.js +2 -2
  181. package/dist/components/cura-modal.js.map +1 -1
  182. package/dist/components/cura-page-template.js +1 -1
  183. package/dist/components/cura-paragraph2.js +7 -19
  184. package/dist/components/cura-paragraph2.js.map +1 -1
  185. package/dist/components/cura-progress-bar2.js +1 -1
  186. package/dist/components/cura-radio.js +1 -1
  187. package/dist/components/cura-select-option2.js +1 -1
  188. package/dist/components/cura-select2.js +3 -3
  189. package/dist/components/cura-stepper-item2.js +1 -1
  190. package/dist/components/cura-stepper.js +1 -1
  191. package/dist/components/cura-switch.js +1 -1
  192. package/dist/components/cura-toast.js +1 -1
  193. package/dist/components/cura-tooltip.js +2 -2
  194. package/dist/components/cura-tooltip.js.map +1 -1
  195. package/dist/components/index.js +28 -71
  196. package/dist/components/index.js.map +1 -1
  197. package/dist/cura/cura.esm.js +1 -1
  198. package/dist/cura/cura.esm.js.map +1 -1
  199. package/dist/cura/index.esm.js +1 -1
  200. package/dist/cura/index.esm.js.map +1 -1
  201. package/dist/cura/p-02717e7d.entry.js +2 -0
  202. package/dist/cura/{p-629c34fe.entry.js.map → p-02717e7d.entry.js.map} +1 -1
  203. package/dist/cura/p-0a391c03.entry.js +2 -0
  204. package/dist/cura/{p-dbab7864.entry.js.map → p-0a391c03.entry.js.map} +1 -1
  205. package/dist/cura/p-18af52e4.entry.js +2 -0
  206. package/dist/cura/{p-4aefe237.entry.js.map → p-18af52e4.entry.js.map} +1 -1
  207. package/dist/cura/p-1b201271.js +2 -0
  208. package/dist/cura/p-1b201271.js.map +1 -0
  209. package/dist/cura/{p-3030774e.entry.js → p-24cd591e.entry.js} +2 -2
  210. package/dist/cura/p-24d9f1f4.entry.js +2 -0
  211. package/dist/cura/p-24d9f1f4.entry.js.map +1 -0
  212. package/dist/cura/{p-ec7876d3.entry.js → p-2afb14e9.entry.js} +2 -2
  213. package/dist/cura/{p-3c0931d3.entry.js → p-3576b633.entry.js} +2 -2
  214. package/dist/cura/p-46994182.entry.js +2 -0
  215. package/dist/cura/p-500f1256.entry.js +2 -0
  216. package/dist/cura/{p-545e8e55.entry.js.map → p-500f1256.entry.js.map} +1 -1
  217. package/dist/cura/{p-7f25f4dc.entry.js → p-5afb630e.entry.js} +2 -2
  218. package/dist/cura/{p-bd99ef4c.entry.js → p-6243742a.entry.js} +2 -2
  219. package/dist/cura/p-635c0f4d.entry.js +2 -0
  220. package/dist/cura/p-86d317f3.entry.js +2 -0
  221. package/dist/cura/p-86d317f3.entry.js.map +1 -0
  222. package/dist/cura/{p-ee8db3dc.entry.js → p-9214ee88.entry.js} +2 -2
  223. package/dist/cura/{p-70adcf7b.entry.js → p-9dd47ec6.entry.js} +2 -2
  224. package/dist/cura/p-af3ac476.js +3 -0
  225. package/dist/cura/p-af3ac476.js.map +1 -0
  226. package/dist/cura/{p-f30270f0.entry.js → p-b1d6ee8d.entry.js} +2 -2
  227. package/dist/cura/{p-bce10f9b.entry.js → p-bfaf9964.entry.js} +2 -2
  228. package/dist/cura/p-c0f445b5.entry.js +2 -0
  229. package/dist/cura/{p-8622c492.entry.js.map → p-c0f445b5.entry.js.map} +1 -1
  230. package/dist/cura/{p-d13e3295.entry.js → p-d227469a.entry.js} +2 -2
  231. package/dist/cura/p-d25142cd.entry.js +2 -0
  232. package/dist/cura/{p-529332d3.entry.js.map → p-d25142cd.entry.js.map} +1 -1
  233. package/dist/cura/p-d2da92d9.entry.js +2 -0
  234. package/dist/cura/{p-6b627841.entry.js.map → p-d2da92d9.entry.js.map} +1 -1
  235. package/dist/cura/p-daf9feac.js +2 -0
  236. package/dist/cura/p-daf9feac.js.map +1 -0
  237. package/dist/cura/p-e98a1ad2.entry.js +2 -0
  238. package/dist/cura/{p-b3e93e74.entry.js.map → p-e98a1ad2.entry.js.map} +1 -1
  239. package/dist/cura/p-ec4996c2.js +2 -0
  240. package/dist/cura/p-ec4996c2.js.map +1 -0
  241. package/dist/cura/p-ee7328a5.entry.js +2 -0
  242. package/dist/cura/{p-235ac0b4.entry.js.map → p-ee7328a5.entry.js.map} +1 -1
  243. package/dist/cura/{p-f96b0923.entry.js → p-f1098b41.entry.js} +2 -2
  244. package/dist/cura/p-fc9584dd.entry.js +2 -0
  245. package/dist/cura/{p-a4a1f6c6.entry.js.map → p-fc9584dd.entry.js.map} +1 -1
  246. package/dist/esm/{app-globals-036c3b80.js → app-globals-83a601d0.js} +21 -2
  247. package/dist/esm/app-globals-83a601d0.js.map +1 -0
  248. package/dist/esm/{cura-accordion_12.entry.js → cura-accordion_18.entry.js} +684 -51
  249. package/dist/esm/cura-accordion_18.entry.js.map +1 -0
  250. package/dist/esm/cura-alert.entry.js +2 -2
  251. package/dist/esm/cura-alert.entry.js.map +1 -1
  252. package/dist/esm/cura-badge-counter.entry.js +2 -2
  253. package/dist/esm/cura-badge-counter.entry.js.map +1 -1
  254. package/dist/esm/cura-badge-dot.entry.js +2 -2
  255. package/dist/esm/cura-badge-dot.entry.js.map +1 -1
  256. package/dist/esm/cura-badge-pill.entry.js +2 -2
  257. package/dist/esm/cura-badge-pill.entry.js.map +1 -1
  258. package/dist/esm/cura-button-outline.entry.js +2 -2
  259. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  260. package/dist/esm/cura-button-select.entry.js +2 -2
  261. package/dist/esm/cura-button-select.entry.js.map +1 -1
  262. package/dist/esm/cura-calendar.entry.js +1 -1
  263. package/dist/esm/cura-card.entry.js +1 -1
  264. package/dist/esm/cura-checkbox.entry.js +2 -2
  265. package/dist/esm/cura-display.entry.js +2 -2
  266. package/dist/esm/cura-dropdown-search-not-found.entry.js +24 -0
  267. package/dist/esm/cura-dropdown-search-not-found.entry.js.map +1 -0
  268. package/dist/esm/cura-dropdown-search-option-title.entry.js +2 -2
  269. package/dist/esm/cura-dropdown-search-option.entry.js +4 -4
  270. package/dist/esm/cura-dropdown-search-option.entry.js.map +1 -1
  271. package/dist/esm/cura-dropdown-search.entry.js +3 -3
  272. package/dist/esm/cura-icons-view.entry.js +2 -2
  273. package/dist/esm/cura-input-date.entry.js +3 -3
  274. package/dist/esm/cura-input-date.entry.js.map +1 -1
  275. package/dist/esm/cura-loader-bar.entry.js +2 -2
  276. package/dist/esm/cura-modal.entry.js +3 -3
  277. package/dist/esm/cura-modal.entry.js.map +1 -1
  278. package/dist/esm/cura-progress-bar_2.entry.js +3 -3
  279. package/dist/esm/cura-radio.entry.js +2 -2
  280. package/dist/esm/cura-stepper.entry.js +2 -2
  281. package/dist/esm/cura-switch.entry.js +2 -2
  282. package/dist/esm/{cura-theme-module-b23f8ac8.js → cura-theme-module-59e8e460.js} +3 -72
  283. package/dist/esm/cura-theme-module-59e8e460.js.map +1 -0
  284. package/dist/esm/cura-toast.entry.js +2 -2
  285. package/dist/esm/cura-tooltip.entry.js +3 -3
  286. package/dist/esm/cura-tooltip.entry.js.map +1 -1
  287. package/dist/esm/cura.js +6 -5
  288. package/dist/esm/cura.js.map +1 -1
  289. package/dist/esm/{index-747aad85.js → index-717b36df.js} +19 -2
  290. package/dist/esm/index-717b36df.js.map +1 -0
  291. package/dist/esm/index.js +2 -1
  292. package/dist/esm/index.js.map +1 -1
  293. package/dist/esm/loader.js +6 -5
  294. package/dist/esm/loader.js.map +1 -1
  295. package/dist/esm/static-061aa850.js +74 -0
  296. package/dist/esm/static-061aa850.js.map +1 -0
  297. package/dist/types/api/cura-api.d.ts +1 -0
  298. package/dist/types/api/cura-api.type.d.ts +1 -1
  299. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.d.ts +6 -0
  300. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.stories.d.ts +27 -0
  301. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-new.d.ts +127 -0
  302. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.d.ts +186 -0
  303. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.d.ts +6 -0
  304. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.stories.d.ts +27 -0
  305. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.d.ts +44 -0
  306. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.stories.d.ts +72 -0
  307. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +12 -4
  308. package/dist/types/components/forms/cura-label/cura-label.d.ts +1 -0
  309. package/dist/types/components/text/cura-heading/cura-heading.d.ts +2 -3
  310. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +2 -2
  311. package/dist/types/components.d.ts +264 -9
  312. package/dist/types/utils/FixedElementScrollBehavior.d.ts +12 -0
  313. package/dist/types/utils/utils.d.ts +5 -0
  314. package/package.json +2 -2
  315. package/dist/cjs/app-globals-57c5b283.js.map +0 -1
  316. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
  317. package/dist/cjs/cura-avatar.cjs.entry.js +0 -68
  318. package/dist/cjs/cura-avatar.cjs.entry.js.map +0 -1
  319. package/dist/cjs/cura-badge-distance.cjs.entry.js +0 -46
  320. package/dist/cjs/cura-badge-distance.cjs.entry.js.map +0 -1
  321. package/dist/cjs/cura-button-transparent.cjs.entry.js +0 -107
  322. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +0 -1
  323. package/dist/cjs/cura-theme-module-14544f5f.js.map +0 -1
  324. package/dist/cjs/index-e6d728ec.js.map +0 -1
  325. package/dist/cura/p-1051a947.js +0 -2
  326. package/dist/cura/p-1051a947.js.map +0 -1
  327. package/dist/cura/p-164ddb46.entry.js +0 -2
  328. package/dist/cura/p-164ddb46.entry.js.map +0 -1
  329. package/dist/cura/p-235ac0b4.entry.js +0 -2
  330. package/dist/cura/p-4aefe237.entry.js +0 -2
  331. package/dist/cura/p-529332d3.entry.js +0 -2
  332. package/dist/cura/p-545e8e55.entry.js +0 -2
  333. package/dist/cura/p-557b90c4.entry.js +0 -2
  334. package/dist/cura/p-57ad7c56.entry.js +0 -2
  335. package/dist/cura/p-57ad7c56.entry.js.map +0 -1
  336. package/dist/cura/p-629c34fe.entry.js +0 -2
  337. package/dist/cura/p-62a3056f.entry.js +0 -2
  338. package/dist/cura/p-62a3056f.entry.js.map +0 -1
  339. package/dist/cura/p-6624108e.entry.js +0 -2
  340. package/dist/cura/p-6b627841.entry.js +0 -2
  341. package/dist/cura/p-8622c492.entry.js +0 -2
  342. package/dist/cura/p-935eeb7b.entry.js +0 -2
  343. package/dist/cura/p-935eeb7b.entry.js.map +0 -1
  344. package/dist/cura/p-a4a1f6c6.entry.js +0 -2
  345. package/dist/cura/p-b3e93e74.entry.js +0 -2
  346. package/dist/cura/p-d21364b2.js +0 -2
  347. package/dist/cura/p-d21364b2.js.map +0 -1
  348. package/dist/cura/p-dbab7864.entry.js +0 -2
  349. package/dist/cura/p-fd5ed6b0.js +0 -3
  350. package/dist/cura/p-fd5ed6b0.js.map +0 -1
  351. package/dist/esm/app-globals-036c3b80.js.map +0 -1
  352. package/dist/esm/cura-accordion_12.entry.js.map +0 -1
  353. package/dist/esm/cura-avatar.entry.js +0 -64
  354. package/dist/esm/cura-avatar.entry.js.map +0 -1
  355. package/dist/esm/cura-badge-distance.entry.js +0 -42
  356. package/dist/esm/cura-badge-distance.entry.js.map +0 -1
  357. package/dist/esm/cura-button-transparent.entry.js +0 -103
  358. package/dist/esm/cura-button-transparent.entry.js.map +0 -1
  359. package/dist/esm/cura-theme-module-b23f8ac8.js.map +0 -1
  360. package/dist/esm/index-747aad85.js.map +0 -1
  361. /package/dist/cura/{p-3030774e.entry.js.map → p-24cd591e.entry.js.map} +0 -0
  362. /package/dist/cura/{p-ec7876d3.entry.js.map → p-2afb14e9.entry.js.map} +0 -0
  363. /package/dist/cura/{p-3c0931d3.entry.js.map → p-3576b633.entry.js.map} +0 -0
  364. /package/dist/cura/{p-6624108e.entry.js.map → p-46994182.entry.js.map} +0 -0
  365. /package/dist/cura/{p-7f25f4dc.entry.js.map → p-5afb630e.entry.js.map} +0 -0
  366. /package/dist/cura/{p-bd99ef4c.entry.js.map → p-6243742a.entry.js.map} +0 -0
  367. /package/dist/cura/{p-557b90c4.entry.js.map → p-635c0f4d.entry.js.map} +0 -0
  368. /package/dist/cura/{p-ee8db3dc.entry.js.map → p-9214ee88.entry.js.map} +0 -0
  369. /package/dist/cura/{p-70adcf7b.entry.js.map → p-9dd47ec6.entry.js.map} +0 -0
  370. /package/dist/cura/{p-f30270f0.entry.js.map → p-b1d6ee8d.entry.js.map} +0 -0
  371. /package/dist/cura/{p-bce10f9b.entry.js.map → p-bfaf9964.entry.js.map} +0 -0
  372. /package/dist/cura/{p-d13e3295.entry.js.map → p-d227469a.entry.js.map} +0 -0
  373. /package/dist/cura/{p-f96b0923.entry.js.map → p-f1098b41.entry.js.map} +0 -0
@@ -0,0 +1,592 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { checkMobile, checkIOS } from "../../utils/utils";
3
+ import { FixedElementScrollBehavior } from "../../utils/FixedElementScrollBehavior";
4
+ export class CuraDropdownSearchNew {
5
+ constructor() {
6
+ this.resizeTimeoutMs = 66;
7
+ this.focusTimeoutMs = 300;
8
+ this.blurTimeoutMs = 300;
9
+ this.highlightedIndex = -1;
10
+ this.dropdownSelectableItems = [];
11
+ this.handleSlotChange = () => { this.getSlotElements(); };
12
+ this.handleWindowResize = () => {
13
+ if (this.resizeTimeout)
14
+ clearTimeout(this.resizeTimeout);
15
+ this.resizeTimeout = setTimeout(() => {
16
+ this.isMobile = checkMobile();
17
+ this.setZoomHeight();
18
+ }, this.resizeTimeoutMs);
19
+ };
20
+ this.handleFocus = () => {
21
+ if (this.focusTimeout)
22
+ clearTimeout(this.focusTimeout);
23
+ this.focusTimeout = setTimeout(() => {
24
+ this.isOnFocus = true;
25
+ this.clearHighlight();
26
+ if (this.isMobile && !this.zoomState)
27
+ this.enterZoom();
28
+ if (this.zoomState)
29
+ this.setZoomHeight();
30
+ setTimeout(() => {
31
+ var _a;
32
+ (_a = this.selectedOptionElement) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'instant', block: 'nearest', inline: 'nearest' });
33
+ }, 10);
34
+ }, this.focusTimeoutMs);
35
+ };
36
+ this.handleBlur = () => {
37
+ if (this.blurTimeout)
38
+ clearTimeout(this.blurTimeout);
39
+ this.blurTimeout = setTimeout(() => {
40
+ if (this.zoomState) {
41
+ const delay = checkIOS ? 500 : 100;
42
+ setTimeout(() => this.setZoomHeight(), delay);
43
+ }
44
+ this.isOnFocus = false;
45
+ }, this.blurTimeoutMs);
46
+ };
47
+ this.handleFocusout = () => {
48
+ if (this.zoomState)
49
+ this.setZoomHeight();
50
+ };
51
+ this.handleBackClick = () => { this.exitZoom(); };
52
+ this.handleOptionActionClick = (ev) => {
53
+ this.getInputElement().setFocus();
54
+ this._preventEvent(ev);
55
+ };
56
+ this.handleInputClear = (ev) => {
57
+ this.setValue('');
58
+ this.clearSelectedOptions();
59
+ this._preventEvent(ev);
60
+ };
61
+ this.handleSelectOption = (ev) => {
62
+ this._selectOption(ev.detail);
63
+ this._preventEvent(ev);
64
+ };
65
+ this.handleInputValueChange = (ev) => {
66
+ this.setValue(ev.detail);
67
+ if (this.selectedOptionElement && ev.detail !== this.selectedOptionElement.value) {
68
+ this.clearSelectedOptions();
69
+ }
70
+ this._preventEvent(ev);
71
+ };
72
+ this.handleDropdownMouseOver = () => {
73
+ if (this.highlightedElement || this.highlightedIndex >= 0)
74
+ this.clearHighlight();
75
+ };
76
+ this.handleKeyDown = (ev) => {
77
+ if (ev.key === 'ArrowDown')
78
+ this.moveHighlight('next');
79
+ if (ev.key === 'ArrowUp')
80
+ this.moveHighlight('prev');
81
+ if (ev.key === 'Enter')
82
+ this.selectHighlight();
83
+ };
84
+ this.getInputElement = () => { var _a; return (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('cura-input-text'); };
85
+ this._preventEvent = (ev) => {
86
+ ev.preventDefault();
87
+ ev.stopPropagation();
88
+ };
89
+ this.name = undefined;
90
+ this.size = 'large';
91
+ this.status = 'default';
92
+ this.disabled = false;
93
+ this.required = false;
94
+ this.placeholder = '';
95
+ this.label = '';
96
+ this.icon = 'search';
97
+ this.maxheight = '400px';
98
+ this.value = '';
99
+ this.searchdelay = 400;
100
+ this.searchminchars = 3;
101
+ this.styles = {};
102
+ this.zoomState = false;
103
+ this.isOnFocus = false;
104
+ this.dropdownItems = [];
105
+ }
106
+ handleMaxHeightChange(newValue, oldValue) {
107
+ if (newValue !== oldValue)
108
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--max-height': newValue });
109
+ }
110
+ /**
111
+ * Set focus to input field.
112
+ */
113
+ async setFocus() {
114
+ this.getInputElement().setFocus();
115
+ }
116
+ /**
117
+ * Select by optionid property of a selectable option component.
118
+ */
119
+ async selectOption(optionid) {
120
+ this._selectOption(optionid);
121
+ }
122
+ connectedCallback() {
123
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
124
+ this.breakpoints = window.CuraAPI.theme.breakpoints.get();
125
+ this.styles['--info'] = window.CuraAPI.theme.colors.getColor('info-base');
126
+ this.styles['--purewhite'] = window.CuraAPI.theme.colors.getColor('neutral-purewhite');
127
+ this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor('neutral-light');
128
+ this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor('neutral-dark');
129
+ this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);
130
+ this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor('error-dark');
131
+ this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor('error-lighter');
132
+ this.styles['--primary'] = window.CuraAPI.theme.colors.getColor('primary');
133
+ this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
134
+ this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
135
+ this.styles['--font-weight-medium'] = this.weights.medium;
136
+ this.handleMaxHeightChange(this.maxheight, '');
137
+ window === null || window === void 0 ? void 0 : window.addEventListener('resize', this.handleWindowResize);
138
+ window === null || window === void 0 ? void 0 : window.addEventListener('orientationchange', this.handleWindowResize);
139
+ this.isMobile = checkMobile();
140
+ }
141
+ componentDidLoad() {
142
+ var _a;
143
+ this.dropdownElement = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.dropdown-container');
144
+ this.host.addEventListener('actionclick', this.handleOptionActionClick);
145
+ this.host.addEventListener('selectoption', this.handleSelectOption);
146
+ this.scrollBehavior = new FixedElementScrollBehavior(this.host, this.dropdownElement);
147
+ setTimeout(() => this.getSlotElements(), 10);
148
+ }
149
+ disconnectedCallback() {
150
+ window === null || window === void 0 ? void 0 : window.removeEventListener('resize', this.handleWindowResize);
151
+ window === null || window === void 0 ? void 0 : window.removeEventListener('orientationchange', this.handleWindowResize);
152
+ }
153
+ moveHighlight(direction) {
154
+ if (!this.dropdownSelectableItems.length)
155
+ return;
156
+ let position = direction === 'next' ? this.highlightedIndex + 1 : this.highlightedIndex - 1;
157
+ if (position < 0) {
158
+ this.clearHighlight();
159
+ return;
160
+ }
161
+ if (position > this.dropdownSelectableItems.length - 1)
162
+ position = this.dropdownSelectableItems.length - 1;
163
+ if (this.highlightedElement)
164
+ this.highlightedElement.highlighted = false;
165
+ this.highlightedIndex = position;
166
+ this.highlightedElement = this.dropdownSelectableItems[position];
167
+ if (this.highlightedElement.selected) {
168
+ this.moveHighlight(direction);
169
+ return;
170
+ }
171
+ this.highlightedElement.highlighted = true;
172
+ this.highlightedElement.scrollIntoView({ behavior: 'instant', block: 'nearest', inline: 'nearest' });
173
+ }
174
+ clearHighlight() {
175
+ if (this.highlightedElement) {
176
+ this.highlightedElement.highlighted = false;
177
+ this.highlightedElement = null;
178
+ }
179
+ this.highlightedIndex = -1;
180
+ }
181
+ selectHighlight() {
182
+ if (this.highlightedElement) {
183
+ this._selectOption(this.highlightedElement.optionid);
184
+ this.clearHighlight();
185
+ this.getInputElement().blur();
186
+ }
187
+ }
188
+ setValue(value) {
189
+ if (this.value !== value) {
190
+ this.value = value;
191
+ if (this.valueTimeout)
192
+ clearTimeout(this.valueTimeout);
193
+ this.valueTimeout = setTimeout(() => {
194
+ this.termchange.emit(this.value === '' || this.value.length < this.searchminchars ? '' : this.value);
195
+ }, this.searchdelay || 300);
196
+ }
197
+ }
198
+ _selectOption(optionid) {
199
+ if (!optionid) {
200
+ this.clearSelectedOptions();
201
+ this.setValue('');
202
+ return;
203
+ }
204
+ const optionElement = this.dropdownSelectableItems.find(option => option.optionid === optionid);
205
+ if (optionElement && !optionElement.selected) {
206
+ this.clearSelectedOptions();
207
+ this.selectedOptionElement = optionElement;
208
+ this.selectedOptionElement.selected = true;
209
+ this.setValue(this.selectedOptionElement.value);
210
+ this.optionselect.emit(this.selectedOptionElement.optionid);
211
+ if (this.zoomState)
212
+ setTimeout(() => this.exitZoom(), this.blurTimeoutMs);
213
+ }
214
+ }
215
+ clearSelectedOptions() {
216
+ this.dropdownSelectableItems.forEach(option => {
217
+ if (option.selected)
218
+ option.selected = false;
219
+ });
220
+ this.selectedOptionElement = null;
221
+ }
222
+ getSlotElements() {
223
+ const elements = [];
224
+ const selectable = [];
225
+ let hasNotFound = false;
226
+ if (this.dropdownElement) {
227
+ this.dropdownElement
228
+ .querySelector('slot')
229
+ .assignedElements()
230
+ .forEach(item => {
231
+ elements.push(item);
232
+ if (item.localName === 'cura-dropdown-search-option-new' && item["selectable"])
233
+ selectable.push(item);
234
+ if (item.localName === 'cura-dropdown-search-not-found')
235
+ hasNotFound = true;
236
+ });
237
+ }
238
+ this.dropdownSelectableItems = selectable;
239
+ this.dropdownItems = elements;
240
+ if (hasNotFound)
241
+ this.status = 'error';
242
+ }
243
+ enterZoom() {
244
+ this.scrollBehavior.disableScroll();
245
+ this.setZoomHeight();
246
+ this.zoomState = true;
247
+ }
248
+ exitZoom() {
249
+ this.scrollBehavior.enableScroll();
250
+ this.setZoomHeight();
251
+ this.zoomState = false;
252
+ }
253
+ setZoomHeight() {
254
+ var _a;
255
+ const h = window ? `${((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight}px` : '100vh';
256
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--height': h });
257
+ }
258
+ getClasses() {
259
+ return {
260
+ "component-container": true,
261
+ "mobile": this.isMobile,
262
+ "zoom": this.zoomState,
263
+ "dropdown-visible": this.isOnFocus && (this.dropdownItems.length > 0 && !this.zoomState),
264
+ "error": this.status === 'error'
265
+ };
266
+ }
267
+ render() {
268
+ return (h(Host, { key: '2fddf33d55ce7fd0e9648270012a462827fed62b' }, h("div", { key: 'c45c76906309db7a3bd9789bc87bebeef5fdfdb0', class: this.getClasses(), style: this.styles }, h("div", { key: 'be29c3debdb21abcdf90dd2446dfef2de8f1f5f6', class: "component-controls" }, this.isMobile && this.zoomState ? (h("cura-button-transparent", { fontColor: "dark", onClick: () => this.handleBackClick(), iconName: "arrowLeft", size: "large", iconOnly: true, color: "primary", id: "button-back" })) : '', h("cura-input-text", { key: 'a27635ad3101a80d7116c3d6a605d37577b45893', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: this.zoomState ? 'transparent' : 'default', required: this.required, iconName: this.icon || 'search', value: this.value, status: this.status, onValueChange: (ev) => this.handleInputValueChange(ev), onInput: (ev) => this._preventEvent(ev), onFocus: () => this.handleFocus(), onClick: (ev) => this._preventEvent(ev), onBlur: () => this.handleBlur(), onFocusout: () => this.handleFocusout(), onInputClear: (ev) => this.handleInputClear(ev), placeholder: this.placeholder, size: this.size, onKeyDown: (ev) => this.handleKeyDown(ev) }, h("slot", { key: 'b96c64c5f5b01a487c6fc190e19af136576eb45f', name: "helperText" }))), h("div", { key: '249a0fd49fd854c7b69565194a06b27781b93b9b', class: "dropdown-container", onMouseOver: () => this.handleDropdownMouseOver() }, h("slot", { key: '9e2e0ea5eaaade2a22956383baab4d8fc84d35a2', onSlotchange: () => this.handleSlotChange() })))));
269
+ }
270
+ static get is() { return "cura-dropdown-search-new"; }
271
+ static get encapsulation() { return "shadow"; }
272
+ static get originalStyleUrls() {
273
+ return {
274
+ "$": ["cura-dropdown-search-new.scss"]
275
+ };
276
+ }
277
+ static get styleUrls() {
278
+ return {
279
+ "$": ["cura-dropdown-search-new.css"]
280
+ };
281
+ }
282
+ static get properties() {
283
+ return {
284
+ "name": {
285
+ "type": "string",
286
+ "mutable": false,
287
+ "complexType": {
288
+ "original": "string",
289
+ "resolved": "string",
290
+ "references": {}
291
+ },
292
+ "required": true,
293
+ "optional": false,
294
+ "docs": {
295
+ "tags": [],
296
+ "text": "Name of the field.\nRequired."
297
+ },
298
+ "attribute": "name",
299
+ "reflect": true
300
+ },
301
+ "size": {
302
+ "type": "string",
303
+ "mutable": false,
304
+ "complexType": {
305
+ "original": "'small' | 'medium' | 'large' | string",
306
+ "resolved": "string",
307
+ "references": {}
308
+ },
309
+ "required": false,
310
+ "optional": false,
311
+ "docs": {
312
+ "tags": [],
313
+ "text": "Size of the dropdown search component\nValues: 'small', 'medium' or 'large' (default)."
314
+ },
315
+ "attribute": "size",
316
+ "reflect": true,
317
+ "defaultValue": "'large'"
318
+ },
319
+ "status": {
320
+ "type": "string",
321
+ "mutable": true,
322
+ "complexType": {
323
+ "original": "'error' | 'default' | string",
324
+ "resolved": "string",
325
+ "references": {}
326
+ },
327
+ "required": false,
328
+ "optional": false,
329
+ "docs": {
330
+ "tags": [],
331
+ "text": "Define component status.\nValues: 'error' or 'default'."
332
+ },
333
+ "attribute": "status",
334
+ "reflect": true,
335
+ "defaultValue": "'default'"
336
+ },
337
+ "disabled": {
338
+ "type": "boolean",
339
+ "mutable": false,
340
+ "complexType": {
341
+ "original": "boolean",
342
+ "resolved": "boolean",
343
+ "references": {}
344
+ },
345
+ "required": false,
346
+ "optional": false,
347
+ "docs": {
348
+ "tags": [],
349
+ "text": "Disabled state. Default: false."
350
+ },
351
+ "attribute": "disabled",
352
+ "reflect": true,
353
+ "defaultValue": "false"
354
+ },
355
+ "required": {
356
+ "type": "boolean",
357
+ "mutable": false,
358
+ "complexType": {
359
+ "original": "boolean",
360
+ "resolved": "boolean",
361
+ "references": {}
362
+ },
363
+ "required": false,
364
+ "optional": false,
365
+ "docs": {
366
+ "tags": [],
367
+ "text": "Field is required. Default: false."
368
+ },
369
+ "attribute": "required",
370
+ "reflect": true,
371
+ "defaultValue": "false"
372
+ },
373
+ "placeholder": {
374
+ "type": "string",
375
+ "mutable": false,
376
+ "complexType": {
377
+ "original": "string",
378
+ "resolved": "string",
379
+ "references": {}
380
+ },
381
+ "required": false,
382
+ "optional": false,
383
+ "docs": {
384
+ "tags": [],
385
+ "text": "The placeholder text."
386
+ },
387
+ "attribute": "placeholder",
388
+ "reflect": true,
389
+ "defaultValue": "''"
390
+ },
391
+ "label": {
392
+ "type": "string",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "string",
396
+ "resolved": "string",
397
+ "references": {}
398
+ },
399
+ "required": false,
400
+ "optional": false,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": "The label."
404
+ },
405
+ "attribute": "label",
406
+ "reflect": true,
407
+ "defaultValue": "''"
408
+ },
409
+ "icon": {
410
+ "type": "string",
411
+ "mutable": false,
412
+ "complexType": {
413
+ "original": "string",
414
+ "resolved": "string",
415
+ "references": {}
416
+ },
417
+ "required": false,
418
+ "optional": false,
419
+ "docs": {
420
+ "tags": [],
421
+ "text": "Custom icon name. Default: search."
422
+ },
423
+ "attribute": "icon",
424
+ "reflect": true,
425
+ "defaultValue": "'search'"
426
+ },
427
+ "maxheight": {
428
+ "type": "string",
429
+ "mutable": false,
430
+ "complexType": {
431
+ "original": "string",
432
+ "resolved": "string",
433
+ "references": {}
434
+ },
435
+ "required": false,
436
+ "optional": false,
437
+ "docs": {
438
+ "tags": [],
439
+ "text": "CSS max-height property for dropdown item.\nCan also be used by css property --max-height.\nDefault: 400px"
440
+ },
441
+ "attribute": "maxheight",
442
+ "reflect": false,
443
+ "defaultValue": "'400px'"
444
+ },
445
+ "value": {
446
+ "type": "string",
447
+ "mutable": true,
448
+ "complexType": {
449
+ "original": "string",
450
+ "resolved": "string",
451
+ "references": {}
452
+ },
453
+ "required": false,
454
+ "optional": false,
455
+ "docs": {
456
+ "tags": [],
457
+ "text": "Readonly property value.\nRepresents the term on the search input field."
458
+ },
459
+ "attribute": "value",
460
+ "reflect": false,
461
+ "defaultValue": "''"
462
+ },
463
+ "searchdelay": {
464
+ "type": "number",
465
+ "mutable": false,
466
+ "complexType": {
467
+ "original": "number",
468
+ "resolved": "number",
469
+ "references": {}
470
+ },
471
+ "required": false,
472
+ "optional": false,
473
+ "docs": {
474
+ "tags": [],
475
+ "text": "Delay in milliseconds to dispatch search events.\nDefault: 400"
476
+ },
477
+ "attribute": "searchdelay",
478
+ "reflect": true,
479
+ "defaultValue": "400"
480
+ },
481
+ "searchminchars": {
482
+ "type": "number",
483
+ "mutable": false,
484
+ "complexType": {
485
+ "original": "number",
486
+ "resolved": "number",
487
+ "references": {}
488
+ },
489
+ "required": false,
490
+ "optional": false,
491
+ "docs": {
492
+ "tags": [],
493
+ "text": "Min chars to dispatch search events.\nDefault: 3"
494
+ },
495
+ "attribute": "searchminchars",
496
+ "reflect": true,
497
+ "defaultValue": "3"
498
+ }
499
+ };
500
+ }
501
+ static get states() {
502
+ return {
503
+ "styles": {},
504
+ "zoomState": {},
505
+ "isOnFocus": {},
506
+ "dropdownItems": {}
507
+ };
508
+ }
509
+ static get events() {
510
+ return [{
511
+ "method": "termchange",
512
+ "name": "termchange",
513
+ "bubbles": true,
514
+ "cancelable": true,
515
+ "composed": true,
516
+ "docs": {
517
+ "tags": [],
518
+ "text": ""
519
+ },
520
+ "complexType": {
521
+ "original": "string",
522
+ "resolved": "string",
523
+ "references": {}
524
+ }
525
+ }, {
526
+ "method": "optionselect",
527
+ "name": "optionselect",
528
+ "bubbles": true,
529
+ "cancelable": true,
530
+ "composed": true,
531
+ "docs": {
532
+ "tags": [],
533
+ "text": ""
534
+ },
535
+ "complexType": {
536
+ "original": "string",
537
+ "resolved": "string",
538
+ "references": {}
539
+ }
540
+ }];
541
+ }
542
+ static get methods() {
543
+ return {
544
+ "setFocus": {
545
+ "complexType": {
546
+ "signature": "() => Promise<void>",
547
+ "parameters": [],
548
+ "references": {
549
+ "Promise": {
550
+ "location": "global",
551
+ "id": "global::Promise"
552
+ }
553
+ },
554
+ "return": "Promise<void>"
555
+ },
556
+ "docs": {
557
+ "text": "Set focus to input field.",
558
+ "tags": []
559
+ }
560
+ },
561
+ "selectOption": {
562
+ "complexType": {
563
+ "signature": "(optionid: string) => Promise<void>",
564
+ "parameters": [{
565
+ "name": "optionid",
566
+ "type": "string",
567
+ "docs": ""
568
+ }],
569
+ "references": {
570
+ "Promise": {
571
+ "location": "global",
572
+ "id": "global::Promise"
573
+ }
574
+ },
575
+ "return": "Promise<void>"
576
+ },
577
+ "docs": {
578
+ "text": "Select by optionid property of a selectable option component.",
579
+ "tags": []
580
+ }
581
+ }
582
+ };
583
+ }
584
+ static get elementRef() { return "host"; }
585
+ static get watchers() {
586
+ return [{
587
+ "propName": "maxheight",
588
+ "methodName": "handleMaxHeightChange"
589
+ }];
590
+ }
591
+ }
592
+ //# sourceMappingURL=cura-dropdown-search-new.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cura-dropdown-search-new.js","sourceRoot":"","sources":["../../../src/components/cura-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BAAuB,EAAE;oBAChF,6DAAM,YAAY,EAAG,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,GAAU,CACxD,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, State, Watch, Method, Event, EventEmitter } from '@stencil/core';\nimport { checkMobile, checkIOS } from '../../utils/utils';\nimport { FixedElementScrollBehavior } from '../../utils/FixedElementScrollBehavior';\n\n@Component({\n tag: 'cura-dropdown-search-new',\n styleUrl: 'cura-dropdown-search-new.scss',\n shadow: true,\n})\nexport class CuraDropdownSearchNew {\n @Element() host: HTMLElement;\n /**\n * Name of the field.\n * Required.\n */\n @Prop({ reflect: true }) name!: string;\n /**\n * Size of the dropdown search component\n * Values: 'small', 'medium' or 'large' (default).\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' | string = 'large';\n /**\n * Define component status.\n * Values: 'error' or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'default' | string = 'default';\n /**\n * Disabled state. Default: false.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Field is required. Default: false.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * The placeholder text.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n /**\n * The label.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Custom icon name. Default: search.\n */\n @Prop({ reflect: true }) icon: string = 'search';\n /**\n * CSS max-height property for dropdown item.\n * Can also be used by css property --max-height.\n * Default: 400px\n */\n @Prop() maxheight: string = '400px';\n @Watch('maxheight')\n handleMaxHeightChange(newValue: string, oldValue: string) {\n if( newValue !== oldValue) this.styles = { ...this.styles, '--max-height': newValue };\n }\n /**\n * Readonly property value.\n * Represents the term on the search input field.\n */\n @Prop({ mutable: true }) value: string = '';\n /**\n * Delay in milliseconds to dispatch search events.\n * Default: 400\n */\n @Prop({ reflect: true }) searchdelay: number = 400;\n /**\n * Min chars to dispatch search events.\n * Default: 3\n */\n @Prop({ reflect: true }) searchminchars: number = 3;\n\n /**\n * Set focus to input field.\n */\n @Method()\n async setFocus() {\n this.getInputElement().setFocus();\n }\n /**\n * Select by optionid property of a selectable option component.\n */\n @Method()\n async selectOption(optionid: string) {\n this._selectOption(optionid);\n }\n\n @Event() termchange: EventEmitter<string>;\n @Event() optionselect: EventEmitter<string>;\n\n @State() styles = {};\n @State() zoomState = false;\n @State() isOnFocus: boolean = false;\n\n scrollBehavior: FixedElementScrollBehavior;\n\n weights: any;\n breakpoints: any;\n isMobile: boolean;\n\n resizeTimeout: any;\n resizeTimeoutMs = 66;\n focusTimeout: any;\n focusTimeoutMs = 300;\n blurTimeout: any;\n blurTimeoutMs = 300;\n valueTimeout: any;\n\n dropdownElement: HTMLDivElement;\n selectedOptionElement: any;\n highlightedElement: any;\n highlightedIndex: number = -1;\n @State() dropdownItems = [];\n dropdownSelectableItems = [];\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.breakpoints = window.CuraAPI.theme.breakpoints.get();\n this.styles['--info'] = window.CuraAPI.theme.colors.getColor('info-base');\n this.styles['--purewhite'] = window.CuraAPI.theme.colors.getColor('neutral-purewhite');\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor('neutral-light');\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor('neutral-dark');\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor('error-dark');\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor('error-lighter');\n this.styles['--primary'] = window.CuraAPI.theme.colors.getColor('primary');\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.handleMaxHeightChange(this.maxheight, '');\n window?.addEventListener('resize', this.handleWindowResize);\n window?.addEventListener('orientationchange', this.handleWindowResize);\n this.isMobile = checkMobile();\n }\n\n componentDidLoad() {\n this.dropdownElement = this.host.shadowRoot?.querySelector('.dropdown-container');\n this.host.addEventListener('actionclick', this.handleOptionActionClick);\n this.host.addEventListener('selectoption', this.handleSelectOption);\n this.scrollBehavior = new FixedElementScrollBehavior(this.host, this.dropdownElement);\n setTimeout(() => this.getSlotElements(), 10);\n }\n\n disconnectedCallback() {\n window?.removeEventListener('resize', this.handleWindowResize);\n window?.removeEventListener('orientationchange', this.handleWindowResize);\n }\n\n handleSlotChange = () => { this.getSlotElements(); }\n\n handleWindowResize = () => {\n if (this.resizeTimeout) clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.isMobile = checkMobile();\n this.setZoomHeight();\n }, this.resizeTimeoutMs);\n }\n\n handleFocus = () => {\n if (this.focusTimeout) clearTimeout(this.focusTimeout);\n this.focusTimeout = setTimeout(() => {\n this.isOnFocus = true;\n this.clearHighlight();\n if (this.isMobile && !this.zoomState) this.enterZoom();\n if (this.zoomState) this.setZoomHeight();\n setTimeout(() => {\n this.selectedOptionElement?.scrollIntoView({behavior: 'instant', block: 'nearest', inline: 'nearest'});\n }, 10);\n }, this.focusTimeoutMs);\n }\n\n handleBlur = () => {\n if (this.blurTimeout) clearTimeout(this.blurTimeout);\n this.blurTimeout = setTimeout(() => {\n if (this.zoomState) {\n const delay = checkIOS ? 500 : 100;\n setTimeout(() => this.setZoomHeight(), delay);\n }\n this.isOnFocus = false;\n }, this.blurTimeoutMs);\n }\n\n handleFocusout = () => {\n if( this.zoomState ) this.setZoomHeight();\n }\n\n handleBackClick = () => { this.exitZoom(); }\n\n handleOptionActionClick = (ev: CustomEvent) => {\n this.getInputElement().setFocus();\n this._preventEvent(ev);\n }\n\n handleInputClear = (ev: CustomEvent) => {\n this.setValue('');\n this.clearSelectedOptions();\n this._preventEvent(ev);\n }\n\n handleSelectOption = (ev: CustomEvent) => {\n this._selectOption(ev.detail);\n this._preventEvent(ev);\n }\n\n handleInputValueChange = (ev: CustomEvent) => {\n this.setValue(ev.detail);\n if( this.selectedOptionElement && ev.detail !== this.selectedOptionElement.value) {\n this.clearSelectedOptions();\n }\n this._preventEvent(ev);\n }\n\n handleDropdownMouseOver = () => {\n if( this.highlightedElement || this.highlightedIndex >= 0 ) this.clearHighlight();\n }\n\n handleKeyDown = (ev: KeyboardEvent) => {\n if( ev.key === 'ArrowDown' ) this.moveHighlight('next');\n if( ev.key === 'ArrowUp' ) this.moveHighlight('prev');\n if( ev.key === 'Enter' ) this.selectHighlight();\n }\n\n moveHighlight(direction: 'next' | 'prev') {\n if (!this.dropdownSelectableItems.length) return;\n let position = direction === 'next' ? this.highlightedIndex + 1 : this.highlightedIndex - 1;\n if( position < 0) {\n this.clearHighlight();\n return;\n }\n if( position > this.dropdownSelectableItems.length - 1 ) position = this.dropdownSelectableItems.length - 1;\n if( this.highlightedElement ) this.highlightedElement.highlighted = false;\n this.highlightedIndex = position;\n this.highlightedElement = this.dropdownSelectableItems[position];\n if( this.highlightedElement.selected ) {\n this.moveHighlight(direction);\n return;\n }\n this.highlightedElement.highlighted = true;\n this.highlightedElement.scrollIntoView({behavior: 'instant', block: 'nearest', inline: 'nearest' });\n }\n\n clearHighlight() {\n if( this.highlightedElement ) {\n this.highlightedElement.highlighted = false;\n this.highlightedElement = null;\n }\n this.highlightedIndex = -1;\n }\n\n selectHighlight() {\n if( this.highlightedElement ) {\n this._selectOption(this.highlightedElement.optionid);\n this.clearHighlight();\n this.getInputElement().blur();\n }\n }\n\n setValue(value: string) {\n if (this.value !== value) {\n this.value = value;\n if( this.valueTimeout) clearTimeout(this.valueTimeout);\n this.valueTimeout = setTimeout(() => {\n this.termchange.emit(this.value === '' || this.value.length < this.searchminchars ? '' : this.value);\n }, this.searchdelay || 300);\n }\n }\n\n _selectOption(optionid: string) {\n if (!optionid) {\n this.clearSelectedOptions();\n this.setValue('');\n return;\n }\n const optionElement = this.dropdownSelectableItems.find(option => option.optionid === optionid);\n if( optionElement && !optionElement.selected ) {\n this.clearSelectedOptions();\n this.selectedOptionElement = optionElement;\n this.selectedOptionElement.selected = true;\n this.setValue(this.selectedOptionElement.value);\n this.optionselect.emit(this.selectedOptionElement.optionid);\n if (this.zoomState) setTimeout(() => this.exitZoom(), this.blurTimeoutMs);\n }\n }\n\n clearSelectedOptions() {\n this.dropdownSelectableItems.forEach(option => {\n if( option.selected ) option.selected = false;\n });\n this.selectedOptionElement = null;\n }\n\n getSlotElements() {\n const elements = [];\n const selectable = [];\n let hasNotFound = false;\n if( this.dropdownElement ) {\n this.dropdownElement\n .querySelector('slot')\n .assignedElements()\n .forEach(item => {\n elements.push(item);\n if( item.localName === 'cura-dropdown-search-option-new' && item[\"selectable\"] ) selectable.push(item);\n if( item.localName === 'cura-dropdown-search-not-found' ) hasNotFound = true;\n });\n }\n this.dropdownSelectableItems = selectable;\n this.dropdownItems = elements;\n if( hasNotFound ) this.status = 'error';\n }\n\n\n enterZoom() {\n this.scrollBehavior.disableScroll();\n this.setZoomHeight();\n this.zoomState = true;\n }\n\n exitZoom() {\n this.scrollBehavior.enableScroll();\n this.setZoomHeight();\n this.zoomState = false;\n }\n\n getInputElement = () => this.host.shadowRoot?.querySelector('cura-input-text');\n\n setZoomHeight() {\n const h = window ? `${window.visualViewport?.height || window.innerHeight}px` : '100vh';\n this.styles = { ...this.styles, '--height': h };\n }\n\n getClasses() {\n return {\n \"component-container\": true,\n \"mobile\": this.isMobile,\n \"zoom\": this.zoomState,\n \"dropdown-visible\": this.isOnFocus && (this.dropdownItems.length > 0 && !this.zoomState),\n \"error\": this.status === 'error'\n }\n }\n\n _preventEvent = (ev: Event) => {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"component-controls\">\n { this.isMobile && this.zoomState ? (\n <cura-button-transparent\n fontColor=\"dark\"\n onClick={ () => this.handleBackClick() }\n iconName=\"arrowLeft\"\n size=\"large\"\n iconOnly\n color=\"primary\"\n id=\"button-back\">\n </cura-button-transparent>\n ) : '' }\n <cura-input-text\n disabled={ this.disabled }\n label={ this.label }\n part=\"cura-input-field\"\n mode={ this.zoomState ? 'transparent' : 'default' }\n required={ this.required }\n iconName={ this.icon || 'search' }\n value={ this.value }\n status={ this.status }\n onValueChange={ (ev) => this.handleInputValueChange(ev) }\n onInput={ (ev) => this._preventEvent(ev) }\n onFocus={ () => this.handleFocus() }\n onClick={ (ev) => this._preventEvent(ev) }\n onBlur={ () => this.handleBlur() }\n onFocusout={ () => this.handleFocusout() }\n onInputClear={ (ev) => this.handleInputClear(ev) }\n placeholder={ this.placeholder }\n size={ this.size }\n onKeyDown={ (ev) => this.handleKeyDown(ev) }\n >\n <slot name=\"helperText\"></slot>\n </cura-input-text>\n </div>\n <div class=\"dropdown-container\" onMouseOver={ () => this.handleDropdownMouseOver() }>\n <slot onSlotchange={ () => this.handleSlotChange() }></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}