@rededor/cura 1.7.0 → 1.8.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 (569) hide show
  1. package/dist/assets/assets/icons/iconset-default-list.ts +1 -1
  2. package/dist/assets/assets/icons/iconset-default-tmp.svg +26 -0
  3. package/dist/assets/assets/icons/iconset-default.svg +1 -1
  4. package/dist/cjs/cura-accordion_20.cjs.entry.js +485 -138
  5. package/dist/cjs/cura-accordion_20.cjs.entry.js.map +1 -1
  6. package/dist/cjs/cura-alert.cjs.entry.js +9 -12
  7. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  8. package/dist/cjs/cura-alert.entry.cjs.js.map +1 -0
  9. package/dist/cjs/cura-badge-counter.cjs.entry.js +16 -8
  10. package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cura-badge-counter.entry.cjs.js.map +1 -0
  12. package/dist/cjs/cura-badge-dot.cjs.entry.js +14 -5
  13. package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -1
  14. package/dist/cjs/cura-badge-dot.entry.cjs.js.map +1 -0
  15. package/dist/cjs/cura-badge-pill.cjs.entry.js +23 -7
  16. package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
  17. package/dist/cjs/cura-badge-pill.entry.cjs.js.map +1 -0
  18. package/dist/cjs/cura-button-outline.cjs.entry.js +46 -8
  19. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  20. package/dist/cjs/cura-button-outline.entry.cjs.js.map +1 -0
  21. package/dist/cjs/cura-button-select.cjs.entry.js +7 -12
  22. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  23. package/dist/cjs/cura-button-select.entry.cjs.js.map +1 -0
  24. package/dist/cjs/{cura-button.definitions-f036371c.js → cura-button.definitions-B3SK8MaV.js} +2 -1
  25. package/dist/cjs/cura-button.definitions-B3SK8MaV.js.map +1 -0
  26. package/dist/cjs/cura-calendar.cjs.entry.js +203 -94
  27. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  28. package/dist/cjs/cura-calendar.entry.cjs.js.map +1 -0
  29. package/dist/cjs/cura-card.cjs.entry.js +34 -6
  30. package/dist/cjs/cura-card.cjs.entry.js.map +1 -1
  31. package/dist/cjs/cura-card.entry.cjs.js.map +1 -0
  32. package/dist/cjs/cura-checkbox.cjs.entry.js +72 -20
  33. package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
  34. package/dist/cjs/cura-checkbox.entry.cjs.js.map +1 -0
  35. package/dist/cjs/cura-display.cjs.entry.js +25 -7
  36. package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
  37. package/dist/cjs/cura-display.entry.cjs.js.map +1 -0
  38. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +5 -6
  39. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js.map +1 -1
  40. package/dist/cjs/cura-dropdown-search-not-found.entry.cjs.js.map +1 -0
  41. package/dist/cjs/{cura-forms.definitions-c164f1b8.js → cura-forms.definitions-DVLuO67c.js} +2 -1
  42. package/dist/cjs/cura-forms.definitions-DVLuO67c.js.map +1 -0
  43. package/dist/cjs/{cura-icon.definitions-5223028b.js → cura-icon.definitions-DT0wF67y.js} +2 -1
  44. package/dist/cjs/cura-icon.definitions-DT0wF67y.js.map +1 -0
  45. package/dist/cjs/cura-icons-view.cjs.entry.js +7 -8
  46. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
  47. package/dist/cjs/cura-icons-view.entry.cjs.js.map +1 -0
  48. package/dist/cjs/cura-input-date.cjs.entry.js +32 -15
  49. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
  50. package/dist/cjs/cura-input-date.entry.cjs.js.map +1 -0
  51. package/dist/cjs/cura-loader-bar.cjs.entry.js +4 -5
  52. package/dist/cjs/cura-loader-bar.cjs.entry.js.map +1 -1
  53. package/dist/cjs/cura-loader-bar.entry.cjs.js.map +1 -0
  54. package/dist/cjs/cura-modal.cjs.entry.js +46 -15
  55. package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
  56. package/dist/cjs/cura-modal.entry.cjs.js.map +1 -0
  57. package/dist/cjs/cura-progress-bar.cura-stepper-item.entry.cjs.js.map +1 -0
  58. package/dist/cjs/cura-progress-bar_2.cjs.entry.js +25 -15
  59. package/dist/cjs/cura-progress-bar_2.cjs.entry.js.map +1 -1
  60. package/dist/cjs/cura-radio.cjs.entry.js +73 -21
  61. package/dist/cjs/cura-radio.cjs.entry.js.map +1 -1
  62. package/dist/cjs/cura-radio.entry.cjs.js.map +1 -0
  63. package/dist/cjs/cura-stepper.cjs.entry.js +23 -6
  64. package/dist/cjs/cura-stepper.cjs.entry.js.map +1 -1
  65. package/dist/cjs/cura-stepper.entry.cjs.js.map +1 -0
  66. package/dist/cjs/cura-switch.cjs.entry.js +61 -18
  67. package/dist/cjs/cura-switch.cjs.entry.js.map +1 -1
  68. package/dist/cjs/cura-switch.entry.cjs.js.map +1 -0
  69. package/dist/cjs/cura-tabs-button.cjs.entry.js +6 -9
  70. package/dist/cjs/cura-tabs-button.cjs.entry.js.map +1 -1
  71. package/dist/cjs/cura-tabs-button.entry.cjs.js.map +1 -0
  72. package/dist/cjs/cura-tabs-transparent.cjs.entry.js +6 -9
  73. package/dist/cjs/cura-tabs-transparent.cjs.entry.js.map +1 -1
  74. package/dist/cjs/cura-tabs-transparent.entry.cjs.js.map +1 -0
  75. package/dist/cjs/{cura-tabs.definitions-b8955ad4.js → cura-tabs.definitions-CGqqGE2e.js} +2 -1
  76. package/dist/cjs/cura-tabs.definitions-CGqqGE2e.js.map +1 -0
  77. package/dist/cjs/{cura-theme-module-09bb63a4.js → cura-theme-module-CJkmAxBA.js} +94 -9
  78. package/dist/cjs/cura-theme-module-CJkmAxBA.js.map +1 -0
  79. package/dist/cjs/cura-toast.cjs.entry.js +8 -11
  80. package/dist/cjs/cura-toast.cjs.entry.js.map +1 -1
  81. package/dist/cjs/cura-toast.entry.cjs.js.map +1 -0
  82. package/dist/cjs/cura-tooltip.cjs.entry.js +9 -11
  83. package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
  84. package/dist/cjs/cura-tooltip.entry.cjs.js.map +1 -0
  85. package/dist/cjs/cura.cjs.js +9 -10
  86. package/dist/cjs/cura.cjs.js.map +1 -1
  87. package/dist/cjs/{index-60783089.js → index-BK9MSAiE.js} +947 -289
  88. package/dist/cjs/index-BK9MSAiE.js.map +1 -0
  89. package/dist/cjs/{index-6dc29195.js → index-EyP6Zlkd.js} +2 -1
  90. package/dist/cjs/index-EyP6Zlkd.js.map +1 -0
  91. package/dist/cjs/index.cjs.js +2 -4
  92. package/dist/cjs/index.cjs.js.map +1 -1
  93. package/dist/cjs/loader.cjs.js +5 -8
  94. package/dist/cjs/loader.cjs.js.map +1 -1
  95. package/dist/collection/assets/icons/iconset-default-list.js +1 -1
  96. package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
  97. package/dist/collection/assets/icons/iconset-default-tmp.svg +26 -0
  98. package/dist/collection/assets/icons/iconset-default.svg +1 -1
  99. package/dist/collection/assets-raw/icons/default/bike.svg +3 -0
  100. package/dist/collection/assets-raw/icons/default/cart.svg +3 -0
  101. package/dist/collection/assets-raw/icons/default/coffee.svg +3 -0
  102. package/dist/collection/assets-raw/icons/default/id.svg +3 -0
  103. package/dist/collection/assets-raw/icons/default/image.svg +5 -0
  104. package/dist/collection/assets-raw/icons/default/store.svg +3 -0
  105. package/dist/collection/collection-manifest.json +1 -1
  106. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +57 -18
  107. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
  108. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +45 -9
  109. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
  110. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js +24 -7
  111. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.js.map +1 -1
  112. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +8 -4
  113. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js.map +1 -1
  114. package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js +19 -3
  115. package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.js.map +1 -1
  116. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js +40 -9
  117. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.js.map +1 -1
  118. package/dist/collection/components/buttons/cura-button/cura-button.js +86 -17
  119. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  120. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +86 -17
  121. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  122. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +25 -13
  123. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  124. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +81 -16
  125. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  126. package/dist/collection/components/cura-alert/cura-alert.js +19 -11
  127. package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
  128. package/dist/collection/components/cura-avatar/cura-avatar.js +48 -13
  129. package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -1
  130. package/dist/collection/components/cura-calendar/cura-calendar.js +196 -24
  131. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  132. package/dist/collection/components/cura-card/cura-card.js +48 -7
  133. package/dist/collection/components/cura-card/cura-card.js.map +1 -1
  134. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +31 -9
  135. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -1
  136. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +91 -28
  137. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  138. package/dist/collection/components/cura-icon/cura-icon.js +15 -6
  139. package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
  140. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  141. package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
  142. package/dist/collection/components/cura-modal/cura-modal.css +0 -1
  143. package/dist/collection/components/cura-modal/cura-modal.js +65 -17
  144. package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
  145. package/dist/collection/components/cura-page-template/cura-page-template.js +3 -1
  146. package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -1
  147. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +21 -8
  148. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js.map +1 -1
  149. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +26 -9
  150. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js.map +1 -1
  151. package/dist/collection/components/cura-stepper/cura-stepper.js +34 -6
  152. package/dist/collection/components/cura-stepper/cura-stepper.js.map +1 -1
  153. package/dist/collection/components/cura-toast/cura-toast.js +24 -12
  154. package/dist/collection/components/cura-toast/cura-toast.js.map +1 -1
  155. package/dist/collection/components/cura-tooltip/cura-tooltip.js +25 -12
  156. package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -1
  157. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +114 -29
  158. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -1
  159. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +1 -1
  160. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +74 -16
  161. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
  162. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +13 -0
  163. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
  164. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +132 -28
  165. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  166. package/dist/collection/components/forms/cura-label/cura-label.js +46 -9
  167. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
  168. package/dist/collection/components/forms/cura-radio/cura-radio.js +109 -28
  169. package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -1
  170. package/dist/collection/components/forms/cura-select/cura-select.js +114 -34
  171. package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
  172. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +13 -6
  173. package/dist/collection/components/forms/cura-select-options/cura-select-option.js.map +1 -1
  174. package/dist/collection/components/forms/cura-switch/cura-switch.js +85 -21
  175. package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -1
  176. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +6 -2
  177. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js.map +1 -1
  178. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +14 -4
  179. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -1
  180. package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +21 -9
  181. package/dist/collection/components/tabs/cura-tabs/cura-tabs.js.map +1 -1
  182. package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +21 -9
  183. package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js.map +1 -1
  184. package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +9 -3
  185. package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js.map +1 -1
  186. package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +21 -9
  187. package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js.map +1 -1
  188. package/dist/collection/components/text/cura-display/cura-display.js +39 -8
  189. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
  190. package/dist/collection/components/text/cura-heading/cura-heading.js +53 -10
  191. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  192. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +39 -8
  193. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  194. package/dist/components/cura-accordion-item.js +24 -6
  195. package/dist/components/cura-accordion-item.js.map +1 -1
  196. package/dist/components/cura-accordion.js +34 -13
  197. package/dist/components/cura-accordion.js.map +1 -1
  198. package/dist/components/cura-alert.js +12 -14
  199. package/dist/components/cura-alert.js.map +1 -1
  200. package/dist/components/cura-avatar.js +25 -8
  201. package/dist/components/cura-avatar.js.map +1 -1
  202. package/dist/components/cura-badge-counter.js +2 -1
  203. package/dist/components/cura-badge-distance.js +7 -7
  204. package/dist/components/cura-badge-distance.js.map +1 -1
  205. package/dist/components/cura-badge-dot.js +14 -4
  206. package/dist/components/cura-badge-dot.js.map +1 -1
  207. package/dist/components/cura-badge-pill.js +2 -1
  208. package/dist/components/cura-button-outline.js +49 -10
  209. package/dist/components/cura-button-outline.js.map +1 -1
  210. package/dist/components/cura-button-select.js +10 -14
  211. package/dist/components/cura-button-select.js.map +1 -1
  212. package/dist/components/cura-button-transparent.js +2 -1
  213. package/dist/components/cura-button.js +49 -10
  214. package/dist/components/cura-button.js.map +1 -1
  215. package/dist/components/cura-calendar.js +2 -1
  216. package/dist/components/cura-card.js +34 -5
  217. package/dist/components/cura-card.js.map +1 -1
  218. package/dist/components/cura-checkbox.js +75 -22
  219. package/dist/components/cura-checkbox.js.map +1 -1
  220. package/dist/components/cura-display.js +25 -6
  221. package/dist/components/cura-display.js.map +1 -1
  222. package/dist/components/cura-dropdown-search-category.js +5 -5
  223. package/dist/components/cura-dropdown-search-category.js.map +1 -1
  224. package/dist/components/cura-dropdown-search-not-found.js +6 -6
  225. package/dist/components/cura-dropdown-search-not-found.js.map +1 -1
  226. package/dist/components/cura-dropdown-search-option.js +22 -10
  227. package/dist/components/cura-dropdown-search-option.js.map +1 -1
  228. package/dist/components/cura-dropdown-search.js +66 -27
  229. package/dist/components/cura-dropdown-search.js.map +1 -1
  230. package/dist/components/cura-heading.js +2 -1
  231. package/dist/components/cura-icon.js +2 -1
  232. package/dist/components/cura-icons-view.js +9 -9
  233. package/dist/components/cura-icons-view.js.map +1 -1
  234. package/dist/components/cura-input-date.js +40 -21
  235. package/dist/components/cura-input-date.js.map +1 -1
  236. package/dist/components/cura-input-text.js +2 -1
  237. package/dist/components/cura-label.js +2 -1
  238. package/dist/components/cura-loader-bar.js +2 -1
  239. package/dist/components/cura-loader-circle.js +2 -1
  240. package/dist/components/cura-modal.js +50 -18
  241. package/dist/components/cura-modal.js.map +1 -1
  242. package/dist/components/cura-page-template.js +4 -4
  243. package/dist/components/cura-page-template.js.map +1 -1
  244. package/dist/components/cura-paragraph.js +2 -1
  245. package/dist/components/cura-progress-bar.js +2 -1
  246. package/dist/components/cura-radio.js +75 -22
  247. package/dist/components/cura-radio.js.map +1 -1
  248. package/dist/components/cura-select-option.js +2 -1
  249. package/dist/components/cura-select.js +2 -1
  250. package/dist/components/cura-stepper-item.js +2 -1
  251. package/dist/components/cura-stepper.js +30 -12
  252. package/dist/components/cura-stepper.js.map +1 -1
  253. package/dist/components/cura-switch.js +62 -18
  254. package/dist/components/cura-switch.js.map +1 -1
  255. package/dist/components/cura-tabs-button.js +9 -11
  256. package/dist/components/cura-tabs-button.js.map +1 -1
  257. package/dist/components/cura-tabs-group.js +5 -5
  258. package/dist/components/cura-tabs-group.js.map +1 -1
  259. package/dist/components/cura-tabs-transparent.js +8 -10
  260. package/dist/components/cura-tabs-transparent.js.map +1 -1
  261. package/dist/components/cura-tabs.js +8 -10
  262. package/dist/components/cura-tabs.js.map +1 -1
  263. package/dist/components/cura-toast.js +12 -14
  264. package/dist/components/cura-toast.js.map +1 -1
  265. package/dist/components/cura-tooltip.js +15 -16
  266. package/dist/components/cura-tooltip.js.map +1 -1
  267. package/dist/components/index.js +3 -547
  268. package/dist/components/index.js.map +1 -1
  269. package/dist/components/{cura-icon2.js → p-B5aO1chh.js} +5 -6
  270. package/dist/components/p-B5aO1chh.js.map +1 -0
  271. package/dist/components/{cura-heading2.js → p-BHEafDKD.js} +34 -7
  272. package/dist/components/p-BHEafDKD.js.map +1 -0
  273. package/dist/components/{cura-button-transparent2.js → p-BRDqwZ4N.js} +48 -11
  274. package/dist/components/p-BRDqwZ4N.js.map +1 -0
  275. package/dist/{esm/cura-button.definitions-617d3bad.js → components/p-BSI2FkNn.js} +2 -1
  276. package/dist/components/p-BSI2FkNn.js.map +1 -0
  277. package/dist/components/{cura-badge-counter2.js → p-C72aF-gL.js} +18 -9
  278. package/dist/components/p-C72aF-gL.js.map +1 -0
  279. package/dist/components/{cura-tabs.definitions.js → p-CHcd-uKK.js} +2 -1
  280. package/dist/components/p-CHcd-uKK.js.map +1 -0
  281. package/dist/components/p-D1cPOZpG.js +2617 -0
  282. package/dist/components/p-D1cPOZpG.js.map +1 -0
  283. package/dist/components/{cura-paragraph2.js → p-DI4g-ZH4.js} +26 -7
  284. package/dist/components/p-DI4g-ZH4.js.map +1 -0
  285. package/dist/components/{cura-label2.js → p-DR1RHrEX.js} +30 -7
  286. package/dist/components/p-DR1RHrEX.js.map +1 -0
  287. package/dist/components/{cura-stepper-item2.js → p-DaPc6Dxl.js} +23 -14
  288. package/dist/components/p-DaPc6Dxl.js.map +1 -0
  289. package/dist/components/{cura-forms.definitions.js → p-Dot54hbB.js} +2 -1
  290. package/dist/components/p-Dot54hbB.js.map +1 -0
  291. package/dist/components/{cura-select-option2.js → p-DpIu_Oxz.js} +8 -9
  292. package/dist/components/p-DpIu_Oxz.js.map +1 -0
  293. package/dist/components/{cura-loader-circle2.js → p-Dqm2sAwv.js} +13 -7
  294. package/dist/components/p-Dqm2sAwv.js.map +1 -0
  295. package/dist/components/{cura-progress-bar2.js → p-FTSrgi0q.js} +11 -8
  296. package/dist/components/p-FTSrgi0q.js.map +1 -0
  297. package/dist/components/{cura-loader-bar2.js → p-KIQMkSRF.js} +5 -5
  298. package/dist/components/p-KIQMkSRF.js.map +1 -0
  299. package/dist/components/{cura-badge-pill2.js → p-cOEGtL9C.js} +26 -9
  300. package/dist/components/p-cOEGtL9C.js.map +1 -0
  301. package/dist/components/{cura-calendar2.js → p-e-P5qR3J.js} +210 -100
  302. package/dist/components/p-e-P5qR3J.js.map +1 -0
  303. package/dist/components/{cura-select2.js → p-y6Cly9DJ.js} +87 -31
  304. package/dist/components/p-y6Cly9DJ.js.map +1 -0
  305. package/dist/components/{cura-input-text2.js → p-zz_zOPBZ.js} +75 -102
  306. package/dist/components/p-zz_zOPBZ.js.map +1 -0
  307. package/dist/cura/cura-alert.entry.esm.js.map +1 -0
  308. package/dist/cura/cura-badge-counter.entry.esm.js.map +1 -0
  309. package/dist/cura/cura-badge-dot.entry.esm.js.map +1 -0
  310. package/dist/cura/cura-badge-pill.entry.esm.js.map +1 -0
  311. package/dist/cura/cura-button-outline.entry.esm.js.map +1 -0
  312. package/dist/cura/cura-button-select.entry.esm.js.map +1 -0
  313. package/dist/cura/{p-12a4ae7e.entry.js.map → cura-calendar.entry.esm.js.map} +1 -1
  314. package/dist/cura/{p-53d68d72.entry.js.map → cura-card.entry.esm.js.map} +1 -1
  315. package/dist/cura/cura-checkbox.entry.esm.js.map +1 -0
  316. package/dist/cura/cura-display.entry.esm.js.map +1 -0
  317. package/dist/cura/cura-dropdown-search-not-found.entry.esm.js.map +1 -0
  318. package/dist/cura/cura-icons-view.entry.esm.js.map +1 -0
  319. package/dist/cura/cura-input-date.entry.esm.js.map +1 -0
  320. package/dist/cura/cura-loader-bar.entry.esm.js.map +1 -0
  321. package/dist/cura/{p-1ef21ae9.entry.js.map → cura-modal.entry.esm.js.map} +1 -1
  322. package/dist/cura/cura-progress-bar.cura-stepper-item.entry.esm.js.map +1 -0
  323. package/dist/cura/cura-radio.entry.esm.js.map +1 -0
  324. package/dist/cura/cura-stepper.entry.esm.js.map +1 -0
  325. package/dist/cura/cura-switch.entry.esm.js.map +1 -0
  326. package/dist/cura/cura-tabs-button.entry.esm.js.map +1 -0
  327. package/dist/cura/cura-tabs-transparent.entry.esm.js.map +1 -0
  328. package/dist/cura/cura-toast.entry.esm.js.map +1 -0
  329. package/dist/cura/cura-tooltip.entry.esm.js.map +1 -0
  330. package/dist/cura/cura.esm.js +1 -1
  331. package/dist/cura/cura.esm.js.map +1 -1
  332. package/dist/cura/index.esm.js +1 -1
  333. package/dist/cura/index.esm.js.map +1 -1
  334. package/dist/cura/loader.esm.js.map +1 -0
  335. package/dist/cura/p-077019da.entry.js +2 -0
  336. package/dist/cura/p-077019da.entry.js.map +1 -0
  337. package/dist/cura/p-07783235.entry.js +2 -0
  338. package/dist/cura/p-07783235.entry.js.map +1 -0
  339. package/dist/cura/p-090e297c.entry.js +2 -0
  340. package/dist/cura/p-090e297c.entry.js.map +1 -0
  341. package/dist/cura/p-16c0b52c.entry.js +2 -0
  342. package/dist/cura/p-16c0b52c.entry.js.map +1 -0
  343. package/dist/cura/p-2632183e.entry.js +2 -0
  344. package/dist/cura/p-2632183e.entry.js.map +1 -0
  345. package/dist/cura/p-32015dcc.entry.js +2 -0
  346. package/dist/cura/p-32015dcc.entry.js.map +1 -0
  347. package/dist/cura/p-32f94709.entry.js +2 -0
  348. package/dist/cura/p-32f94709.entry.js.map +1 -0
  349. package/dist/cura/p-3d6040e2.entry.js +2 -0
  350. package/dist/cura/p-3d6040e2.entry.js.map +1 -0
  351. package/dist/cura/p-4ac578a6.entry.js +2 -0
  352. package/dist/cura/p-4ac578a6.entry.js.map +1 -0
  353. package/dist/cura/p-4bde448e.entry.js +2 -0
  354. package/dist/cura/p-4bde448e.entry.js.map +1 -0
  355. package/dist/cura/p-6feba852.entry.js +2 -0
  356. package/dist/cura/p-6feba852.entry.js.map +1 -0
  357. package/dist/cura/p-7586fd07.entry.js +2 -0
  358. package/dist/cura/p-7586fd07.entry.js.map +1 -0
  359. package/dist/cura/p-76cbb798.entry.js +2 -0
  360. package/dist/cura/p-76cbb798.entry.js.map +1 -0
  361. package/dist/cura/p-7fd143aa.entry.js +2 -0
  362. package/dist/cura/p-7fd143aa.entry.js.map +1 -0
  363. package/dist/cura/p-8c83f259.entry.js +2 -0
  364. package/dist/cura/p-8c83f259.entry.js.map +1 -0
  365. package/dist/cura/p-95cd7918.entry.js +2 -0
  366. package/dist/cura/p-95cd7918.entry.js.map +1 -0
  367. package/dist/cura/{p-272c784a.js → p-964stZ3D.js} +1 -1
  368. package/dist/cura/p-964stZ3D.js.map +1 -0
  369. package/dist/cura/p-9ef5444e.entry.js +2 -0
  370. package/dist/cura/p-9ef5444e.entry.js.map +1 -0
  371. package/dist/cura/p-BPKQjAwN.js +2 -0
  372. package/dist/cura/p-BPKQjAwN.js.map +1 -0
  373. package/dist/cura/{p-53c18ed4.js → p-BSI2FkNn.js} +1 -1
  374. package/dist/cura/p-BSI2FkNn.js.map +1 -0
  375. package/dist/cura/{p-efcb32eb.js → p-CHcd-uKK.js} +1 -1
  376. package/dist/cura/p-CHcd-uKK.js.map +1 -0
  377. package/dist/cura/{p-f9b8f665.js → p-Dot54hbB.js} +1 -1
  378. package/dist/cura/p-Dot54hbB.js.map +1 -0
  379. package/dist/cura/p-PPMZr_VE.js +3 -0
  380. package/dist/cura/p-PPMZr_VE.js.map +1 -0
  381. package/dist/cura/p-c6f240f0.entry.js +2 -0
  382. package/dist/cura/p-c6f240f0.entry.js.map +1 -0
  383. package/dist/cura/p-ceb646df.entry.js +2 -0
  384. package/dist/cura/p-ceb646df.entry.js.map +1 -0
  385. package/dist/cura/p-d040f8b9.entry.js +2 -0
  386. package/dist/cura/p-d040f8b9.entry.js.map +1 -0
  387. package/dist/cura/p-deb0b764.entry.js +2 -0
  388. package/dist/cura/p-deb0b764.entry.js.map +1 -0
  389. package/dist/cura/p-df7cb250.entry.js +2 -0
  390. package/dist/cura/p-df7cb250.entry.js.map +1 -0
  391. package/dist/cura/p-f9af3a3b.entry.js +2 -0
  392. package/dist/cura/p-f9af3a3b.entry.js.map +1 -0
  393. package/dist/cura/p-fc3b57a8.entry.js +2 -0
  394. package/dist/cura/p-fc3b57a8.entry.js.map +1 -0
  395. package/dist/cura/{p-48f9289b.js → p-sjLA93YY.js} +1 -1
  396. package/dist/cura/p-sjLA93YY.js.map +1 -0
  397. package/dist/esm/cura-accordion_20.entry.js +484 -135
  398. package/dist/esm/cura-accordion_20.entry.js.map +1 -1
  399. package/dist/esm/cura-alert.entry.js +9 -10
  400. package/dist/esm/cura-alert.entry.js.map +1 -1
  401. package/dist/esm/cura-badge-counter.entry.js +16 -6
  402. package/dist/esm/cura-badge-counter.entry.js.map +1 -1
  403. package/dist/esm/cura-badge-dot.entry.js +14 -3
  404. package/dist/esm/cura-badge-dot.entry.js.map +1 -1
  405. package/dist/esm/cura-badge-pill.entry.js +23 -5
  406. package/dist/esm/cura-badge-pill.entry.js.map +1 -1
  407. package/dist/esm/cura-button-outline.entry.js +46 -6
  408. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  409. package/dist/esm/cura-button-select.entry.js +7 -10
  410. package/dist/esm/cura-button-select.entry.js.map +1 -1
  411. package/dist/{components/cura-button.definitions.js → esm/cura-button.definitions-BSI2FkNn.js} +2 -1
  412. package/dist/esm/cura-button.definitions-BSI2FkNn.js.map +1 -0
  413. package/dist/esm/cura-calendar.entry.js +203 -92
  414. package/dist/esm/cura-calendar.entry.js.map +1 -1
  415. package/dist/esm/cura-card.entry.js +34 -4
  416. package/dist/esm/cura-card.entry.js.map +1 -1
  417. package/dist/esm/cura-checkbox.entry.js +72 -18
  418. package/dist/esm/cura-checkbox.entry.js.map +1 -1
  419. package/dist/esm/cura-display.entry.js +25 -5
  420. package/dist/esm/cura-display.entry.js.map +1 -1
  421. package/dist/esm/cura-dropdown-search-not-found.entry.js +5 -4
  422. package/dist/esm/cura-dropdown-search-not-found.entry.js.map +1 -1
  423. package/dist/esm/{cura-forms.definitions-2f963167.js → cura-forms.definitions-Dot54hbB.js} +2 -1
  424. package/dist/esm/cura-forms.definitions-Dot54hbB.js.map +1 -0
  425. package/dist/esm/{cura-icon.definitions-a892c0e2.js → cura-icon.definitions-sjLA93YY.js} +2 -1
  426. package/dist/esm/cura-icon.definitions-sjLA93YY.js.map +1 -0
  427. package/dist/esm/cura-icons-view.entry.js +7 -6
  428. package/dist/esm/cura-icons-view.entry.js.map +1 -1
  429. package/dist/esm/cura-input-date.entry.js +32 -13
  430. package/dist/esm/cura-input-date.entry.js.map +1 -1
  431. package/dist/esm/cura-loader-bar.entry.js +4 -3
  432. package/dist/esm/cura-loader-bar.entry.js.map +1 -1
  433. package/dist/esm/cura-modal.entry.js +46 -13
  434. package/dist/esm/cura-modal.entry.js.map +1 -1
  435. package/dist/esm/cura-progress-bar.cura-stepper-item.entry.js.map +1 -0
  436. package/dist/esm/cura-progress-bar_2.entry.js +25 -13
  437. package/dist/esm/cura-progress-bar_2.entry.js.map +1 -1
  438. package/dist/esm/cura-radio.entry.js +73 -19
  439. package/dist/esm/cura-radio.entry.js.map +1 -1
  440. package/dist/esm/cura-stepper.entry.js +23 -4
  441. package/dist/esm/cura-stepper.entry.js.map +1 -1
  442. package/dist/esm/cura-switch.entry.js +61 -16
  443. package/dist/esm/cura-switch.entry.js.map +1 -1
  444. package/dist/esm/cura-tabs-button.entry.js +6 -7
  445. package/dist/esm/cura-tabs-button.entry.js.map +1 -1
  446. package/dist/esm/cura-tabs-transparent.entry.js +6 -7
  447. package/dist/esm/cura-tabs-transparent.entry.js.map +1 -1
  448. package/dist/esm/{cura-tabs.definitions-a017126e.js → cura-tabs.definitions-CHcd-uKK.js} +2 -1
  449. package/dist/esm/cura-tabs.definitions-CHcd-uKK.js.map +1 -0
  450. package/dist/esm/{cura-theme-module-bf286f68.js → cura-theme-module-BPKQjAwN.js} +88 -4
  451. package/dist/esm/cura-theme-module-BPKQjAwN.js.map +1 -0
  452. package/dist/esm/cura-toast.entry.js +8 -9
  453. package/dist/esm/cura-toast.entry.js.map +1 -1
  454. package/dist/esm/cura-tooltip.entry.js +9 -9
  455. package/dist/esm/cura-tooltip.entry.js.map +1 -1
  456. package/dist/esm/cura.js +7 -7
  457. package/dist/esm/cura.js.map +1 -1
  458. package/dist/esm/{index-fbee309a.js → index-964stZ3D.js} +2 -1
  459. package/dist/esm/index-964stZ3D.js.map +1 -0
  460. package/dist/esm/{index-21683715.js → index-OdKytJIH.js} +947 -270
  461. package/dist/esm/index-OdKytJIH.js.map +1 -0
  462. package/dist/esm/index.js +2 -2
  463. package/dist/esm/index.js.map +1 -1
  464. package/dist/esm/loader.js +5 -6
  465. package/dist/esm/loader.js.map +1 -1
  466. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +4 -0
  467. package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +14 -0
  468. package/dist/types/components.d.ts +718 -0
  469. package/dist/types/stencil-public-runtime.d.ts +25 -1
  470. package/package.json +13 -16
  471. package/dist/cjs/app-globals-6d5b51b6.js +0 -70
  472. package/dist/cjs/app-globals-6d5b51b6.js.map +0 -1
  473. package/dist/cjs/cura-button.definitions-f036371c.js.map +0 -1
  474. package/dist/cjs/cura-forms.definitions-c164f1b8.js.map +0 -1
  475. package/dist/cjs/cura-icon.definitions-5223028b.js.map +0 -1
  476. package/dist/cjs/cura-tabs.definitions-b8955ad4.js.map +0 -1
  477. package/dist/cjs/cura-theme-module-09bb63a4.js.map +0 -1
  478. package/dist/cjs/index-60783089.js.map +0 -1
  479. package/dist/cjs/index-6dc29195.js.map +0 -1
  480. package/dist/cjs/static-44199808.js +0 -90
  481. package/dist/cjs/static-44199808.js.map +0 -1
  482. package/dist/components/cura-badge-counter2.js.map +0 -1
  483. package/dist/components/cura-badge-pill2.js.map +0 -1
  484. package/dist/components/cura-button-transparent2.js.map +0 -1
  485. package/dist/components/cura-button.definitions.js.map +0 -1
  486. package/dist/components/cura-calendar2.js.map +0 -1
  487. package/dist/components/cura-forms.definitions.js.map +0 -1
  488. package/dist/components/cura-heading2.js.map +0 -1
  489. package/dist/components/cura-icon2.js.map +0 -1
  490. package/dist/components/cura-input-text2.js.map +0 -1
  491. package/dist/components/cura-label2.js.map +0 -1
  492. package/dist/components/cura-loader-bar2.js.map +0 -1
  493. package/dist/components/cura-loader-circle2.js.map +0 -1
  494. package/dist/components/cura-paragraph2.js.map +0 -1
  495. package/dist/components/cura-progress-bar2.js.map +0 -1
  496. package/dist/components/cura-select-option2.js.map +0 -1
  497. package/dist/components/cura-select2.js.map +0 -1
  498. package/dist/components/cura-stepper-item2.js.map +0 -1
  499. package/dist/components/cura-tabs.definitions.js.map +0 -1
  500. package/dist/cura/p-0aeaf57a.entry.js +0 -2
  501. package/dist/cura/p-0aeaf57a.entry.js.map +0 -1
  502. package/dist/cura/p-0b872499.entry.js +0 -2
  503. package/dist/cura/p-0b872499.entry.js.map +0 -1
  504. package/dist/cura/p-0ccde0ff.entry.js +0 -2
  505. package/dist/cura/p-0ccde0ff.entry.js.map +0 -1
  506. package/dist/cura/p-12a4ae7e.entry.js +0 -2
  507. package/dist/cura/p-137f003b.entry.js +0 -2
  508. package/dist/cura/p-137f003b.entry.js.map +0 -1
  509. package/dist/cura/p-197213c0.entry.js +0 -2
  510. package/dist/cura/p-197213c0.entry.js.map +0 -1
  511. package/dist/cura/p-1ef21ae9.entry.js +0 -2
  512. package/dist/cura/p-202dc01a.entry.js +0 -2
  513. package/dist/cura/p-202dc01a.entry.js.map +0 -1
  514. package/dist/cura/p-20b05d8f.entry.js +0 -2
  515. package/dist/cura/p-20b05d8f.entry.js.map +0 -1
  516. package/dist/cura/p-272c784a.js.map +0 -1
  517. package/dist/cura/p-2db4deb3.js +0 -2
  518. package/dist/cura/p-2db4deb3.js.map +0 -1
  519. package/dist/cura/p-48f9289b.js.map +0 -1
  520. package/dist/cura/p-4ee8efca.js +0 -3
  521. package/dist/cura/p-4ee8efca.js.map +0 -1
  522. package/dist/cura/p-53c18ed4.js.map +0 -1
  523. package/dist/cura/p-53d68d72.entry.js +0 -2
  524. package/dist/cura/p-5a43e745.entry.js +0 -2
  525. package/dist/cura/p-5a43e745.entry.js.map +0 -1
  526. package/dist/cura/p-5c6f9593.entry.js +0 -2
  527. package/dist/cura/p-5c6f9593.entry.js.map +0 -1
  528. package/dist/cura/p-633c13cd.entry.js +0 -2
  529. package/dist/cura/p-633c13cd.entry.js.map +0 -1
  530. package/dist/cura/p-6cbd49dd.js +0 -2
  531. package/dist/cura/p-6cbd49dd.js.map +0 -1
  532. package/dist/cura/p-7a68835f.entry.js +0 -2
  533. package/dist/cura/p-7a68835f.entry.js.map +0 -1
  534. package/dist/cura/p-7e10b146.entry.js +0 -2
  535. package/dist/cura/p-7e10b146.entry.js.map +0 -1
  536. package/dist/cura/p-7e2d1229.entry.js +0 -2
  537. package/dist/cura/p-7e2d1229.entry.js.map +0 -1
  538. package/dist/cura/p-8aade007.entry.js +0 -2
  539. package/dist/cura/p-8aade007.entry.js.map +0 -1
  540. package/dist/cura/p-9f460031.js +0 -2
  541. package/dist/cura/p-9f460031.js.map +0 -1
  542. package/dist/cura/p-ac0c90af.entry.js +0 -2
  543. package/dist/cura/p-ac0c90af.entry.js.map +0 -1
  544. package/dist/cura/p-b254bbe4.entry.js +0 -2
  545. package/dist/cura/p-b254bbe4.entry.js.map +0 -1
  546. package/dist/cura/p-b4ee956b.entry.js +0 -2
  547. package/dist/cura/p-b4ee956b.entry.js.map +0 -1
  548. package/dist/cura/p-b60a6aaa.entry.js +0 -2
  549. package/dist/cura/p-b60a6aaa.entry.js.map +0 -1
  550. package/dist/cura/p-b6ff8ac1.entry.js +0 -2
  551. package/dist/cura/p-b6ff8ac1.entry.js.map +0 -1
  552. package/dist/cura/p-d8e1e182.entry.js +0 -2
  553. package/dist/cura/p-d8e1e182.entry.js.map +0 -1
  554. package/dist/cura/p-d97719bc.entry.js +0 -2
  555. package/dist/cura/p-d97719bc.entry.js.map +0 -1
  556. package/dist/cura/p-efcb32eb.js.map +0 -1
  557. package/dist/cura/p-f9b8f665.js.map +0 -1
  558. package/dist/esm/app-globals-c2abb41c.js +0 -68
  559. package/dist/esm/app-globals-c2abb41c.js.map +0 -1
  560. package/dist/esm/cura-button.definitions-617d3bad.js.map +0 -1
  561. package/dist/esm/cura-forms.definitions-2f963167.js.map +0 -1
  562. package/dist/esm/cura-icon.definitions-a892c0e2.js.map +0 -1
  563. package/dist/esm/cura-tabs.definitions-a017126e.js.map +0 -1
  564. package/dist/esm/cura-theme-module-bf286f68.js.map +0 -1
  565. package/dist/esm/index-21683715.js.map +0 -1
  566. package/dist/esm/index-fbee309a.js.map +0 -1
  567. package/dist/esm/static-090f0088.js +0 -88
  568. package/dist/esm/static-090f0088.js.map +0 -1
  569. package/dist/loader/package.json +0 -11
@@ -1,6 +1,79 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CuraSelect {
3
3
  constructor() {
4
+ /**
5
+ * The label text for the select component.
6
+ * Reflects as an attribute in the DOM.
7
+ */
8
+ this.label = '';
9
+ /**
10
+ * Placeholder text for the input field.
11
+ * Reflects as an attribute in the DOM.
12
+ */
13
+ this.placeholder = '';
14
+ /**
15
+ * Current value of the select component.
16
+ * Reflects as an attribute in the DOM and is mutable.
17
+ */
18
+ this.value = '';
19
+ /**
20
+ * Display mode of the select component.
21
+ * Can be 'default' or 'transparent'.
22
+ */
23
+ this.mode = 'default';
24
+ /**
25
+ * Size of the select component.
26
+ * Can be 'small', 'medium', or 'large'.
27
+ */
28
+ this.size = 'medium';
29
+ /**
30
+ * Status of the select component.
31
+ * Can be 'success', 'error', or 'default'.
32
+ */
33
+ this.status = 'default';
34
+ /**
35
+ * Whether the select component is disabled.
36
+ * Reflects as an attribute in the DOM.
37
+ */
38
+ this.disabled = false;
39
+ /**
40
+ * Whether the select component is required.
41
+ * Reflects as an attribute in the DOM.
42
+ */
43
+ this.required = false;
44
+ /**
45
+ * Enable / Disable search at options by term.
46
+ * Default: false
47
+ */
48
+ this.searchBehavior = false;
49
+ /**
50
+ * The search will be sensitive to accents.
51
+ * Default: true
52
+ */
53
+ this.caseSensitive = true;
54
+ /**
55
+ * CSS max-height property for dropdown item.
56
+ * Can also be used by css property --max-height.
57
+ * Default: 285px
58
+ */
59
+ this.maxHeight = '285px';
60
+ /**
61
+ * Internal state: Whether the input is hovered.
62
+ * Default: false
63
+ */
64
+ this.isHovered = false;
65
+ /**
66
+ * Internal state: Whether the input is focused.
67
+ * Default: false
68
+ */
69
+ this.isFocused = false;
70
+ /**
71
+ * Internal state: Whether the dropdown menu is open.
72
+ * Default: false
73
+ */
74
+ this.isOpen = false;
75
+ this.activeIndex = -1;
76
+ this.textInput = '';
4
77
  /**
5
78
  * Styles to be applied to the component.
6
79
  */
@@ -71,24 +144,6 @@ export class CuraSelect {
71
144
  this.isOpen = false;
72
145
  }
73
146
  };
74
- this.label = '';
75
- this.placeholder = '';
76
- this.value = '';
77
- this.mode = 'default';
78
- this.size = 'medium';
79
- this.iconName = undefined;
80
- this.status = 'default';
81
- this.disabled = false;
82
- this.required = false;
83
- this.searchBehavior = false;
84
- this.caseSensitive = true;
85
- this.maxHeight = '285px';
86
- this.isHovered = false;
87
- this.isFocused = false;
88
- this.isOpen = false;
89
- this.options = undefined;
90
- this.activeIndex = -1;
91
- this.textInput = '';
92
147
  }
93
148
  updateOptionHighlights(newActiveINdex) {
94
149
  this.options.forEach((option, index) => (option.active = index === newActiveINdex));
@@ -150,13 +205,14 @@ export class CuraSelect {
150
205
  * Initializes the options for the select component.
151
206
  */
152
207
  componentWillLoad() {
153
- this.initializeOptions();
208
+ // this.initializeOptions();
154
209
  }
155
210
  /**
156
211
  * Lifecycle method called after the component is rendered.
157
212
  * Initializes select-related functionality.
158
213
  */
159
214
  componentDidLoad() {
215
+ this.initializeOptions();
160
216
  this.setupMutationObserver();
161
217
  this.addOutsideClickListener();
162
218
  }
@@ -305,13 +361,13 @@ export class CuraSelect {
305
361
  document.removeEventListener('click', this.handleClickOutside);
306
362
  }
307
363
  render() {
308
- return (h(Host, { key: 'e9217707e382cf64c4a1d93ed0b07b06fe75cf5b', style: this.styles, role: "combobox", "aria-label": this.label, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error') }, h("div", { key: 'cd4017145d95d80e0f2df6daaeb96d699d21028e', class: this.getClasses(), onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onClick: this.handleClick }, this.label && (h("cura-label", { key: 'b004e05ae6b7998e01ce335323e434a0e4cc5b10', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getColor('label') }, this.label, " ", this.required && h("span", { key: 'c8dc7ee9960208f7fd63803e3894d5c5ee225f84', class: "required" }, "* "))), h("div", { key: '6a4da3e7b43e297f58ccfaaa03dd8ae847bb40fe', class: {
364
+ return (h(Host, { key: '3aeecef0bff82a4b14c4dee8b222fdf6eb33b2f8', style: this.styles, role: "combobox", "aria-label": this.label, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error') }, h("div", { key: '00dd10ed04cd3bf0e848d9facc44db794e3580cf', class: this.getClasses(), onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onClick: this.handleClick }, this.label && (h("cura-label", { key: 'd0c7293af9ba728293f2b531c2cc0354ba6f9fa0', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getColor('label') }, this.label, " ", this.required && h("span", { key: '2d1e87303eab87280dc8668e390bd5aa696814d9', class: "required" }, "* "))), h("div", { key: 'd0e8464016796145e088f459532a37dfb1852f96', class: {
309
365
  'cura-input-field': true,
310
366
  'open': this.isOpen,
311
- } }, this.renderIcon(), h("input", { key: 'af593857db2f30b9cc58b4d3218a8f86d20b8431', type: "text", autocomplete: "off", onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyNavigation, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error'), onInput: this.handleInputChange, style: this.styles, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.textInput, readonly: this.searchBehavior ? null : true }), h("button", { key: 'e87bafd632d2c91cb1ef5cc9380d8cd6040f39f4', class: "up-down-button" }, h("cura-icon", { key: 'fa20c2690f5b37d9d9ad636389b0f774b4fa24c7', name: this.isOpen ? 'up' : 'down', class: "up-down-icon", color: this.disabled ? 'neutral-dark' : 'primary-base', size: 16, iconset: "default" }))), h("cura-label", { key: '8755ec21f14adefa9e4cbc24a49057b6199b1ff8', class: "helper-text", size: "xsmall", color: this.getColor('text'), weight: this.mode === 'transparent' ? 'bold' : 'regular' }, h("slot", { key: '78e4f029a3d191450c7b3bd8f1a32565bae3ee23' })), this.isOpen && (h("div", { key: '2ba5af7297dd23d088a7fca7f166522769293301', class: {
367
+ } }, this.renderIcon(), h("input", { key: '8110997e13827855169e58bfee9695a60bf4dbfa', type: "text", autocomplete: "off", onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyNavigation, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error'), onInput: this.handleInputChange, style: this.styles, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.textInput, readonly: this.searchBehavior ? null : true }), h("button", { key: '7b9b18aebd379b004c08f4bcdb4c72357f29c56c', class: "up-down-button" }, h("cura-icon", { key: '4e1fac2b43502e38db450e319e2283b97ed22fd7', name: this.isOpen ? 'up' : 'down', class: "up-down-icon", color: this.disabled ? 'neutral-dark' : 'primary-base', size: 16, iconset: "default" }))), h("cura-label", { key: '8e89021a023d6ff69a2adb2fe1b9052d1d813d06', class: "helper-text", size: "xsmall", color: this.getColor('text'), weight: this.mode === 'transparent' ? 'bold' : 'regular' }, h("slot", { key: 'a253ffc9f1f1ee84c9dcbc81dc3a650c5105c11e' })), this.isOpen && (h("div", { key: '938f552bebac510a7345c8e7b46d2ef911c19e12', class: {
312
368
  menu: true,
313
369
  open: this.isOpen,
314
- }, style: { '--max-height': this.maxHeight } }, h("slot", { key: '08e5cbbdd57b42e15d854e4c335f22833075d941', name: "option" }))))));
370
+ }, style: { '--max-height': this.maxHeight } }, h("slot", { key: '2d54c15bb8df7dfe33fac77cee7778c450946cf7', name: "option" }))))));
315
371
  }
316
372
  static get is() { return "cura-select"; }
317
373
  static get encapsulation() { return "shadow"; }
@@ -330,6 +386,7 @@ export class CuraSelect {
330
386
  return {
331
387
  "label": {
332
388
  "type": "string",
389
+ "attribute": "label",
333
390
  "mutable": false,
334
391
  "complexType": {
335
392
  "original": "string",
@@ -342,12 +399,14 @@ export class CuraSelect {
342
399
  "tags": [],
343
400
  "text": "The label text for the select component.\nReflects as an attribute in the DOM."
344
401
  },
345
- "attribute": "label",
402
+ "getter": false,
403
+ "setter": false,
346
404
  "reflect": true,
347
405
  "defaultValue": "''"
348
406
  },
349
407
  "placeholder": {
350
408
  "type": "string",
409
+ "attribute": "placeholder",
351
410
  "mutable": false,
352
411
  "complexType": {
353
412
  "original": "string",
@@ -360,12 +419,14 @@ export class CuraSelect {
360
419
  "tags": [],
361
420
  "text": "Placeholder text for the input field.\nReflects as an attribute in the DOM."
362
421
  },
363
- "attribute": "placeholder",
422
+ "getter": false,
423
+ "setter": false,
364
424
  "reflect": true,
365
425
  "defaultValue": "''"
366
426
  },
367
427
  "value": {
368
428
  "type": "string",
429
+ "attribute": "value",
369
430
  "mutable": true,
370
431
  "complexType": {
371
432
  "original": "string",
@@ -378,12 +439,14 @@ export class CuraSelect {
378
439
  "tags": [],
379
440
  "text": "Current value of the select component.\nReflects as an attribute in the DOM and is mutable."
380
441
  },
381
- "attribute": "value",
442
+ "getter": false,
443
+ "setter": false,
382
444
  "reflect": true,
383
445
  "defaultValue": "''"
384
446
  },
385
447
  "mode": {
386
448
  "type": "string",
449
+ "attribute": "mode",
387
450
  "mutable": false,
388
451
  "complexType": {
389
452
  "original": "'default' | 'transparent'",
@@ -396,12 +459,14 @@ export class CuraSelect {
396
459
  "tags": [],
397
460
  "text": "Display mode of the select component.\nCan be 'default' or 'transparent'."
398
461
  },
399
- "attribute": "mode",
462
+ "getter": false,
463
+ "setter": false,
400
464
  "reflect": true,
401
465
  "defaultValue": "'default'"
402
466
  },
403
467
  "size": {
404
468
  "type": "string",
469
+ "attribute": "size",
405
470
  "mutable": false,
406
471
  "complexType": {
407
472
  "original": "'small' | 'medium' | 'large'",
@@ -414,12 +479,14 @@ export class CuraSelect {
414
479
  "tags": [],
415
480
  "text": "Size of the select component.\nCan be 'small', 'medium', or 'large'."
416
481
  },
417
- "attribute": "size",
482
+ "getter": false,
483
+ "setter": false,
418
484
  "reflect": true,
419
485
  "defaultValue": "'medium'"
420
486
  },
421
487
  "iconName": {
422
488
  "type": "string",
489
+ "attribute": "icon-name",
423
490
  "mutable": false,
424
491
  "complexType": {
425
492
  "original": "string",
@@ -432,11 +499,13 @@ export class CuraSelect {
432
499
  "tags": [],
433
500
  "text": ""
434
501
  },
435
- "attribute": "icon-name",
502
+ "getter": false,
503
+ "setter": false,
436
504
  "reflect": false
437
505
  },
438
506
  "status": {
439
507
  "type": "string",
508
+ "attribute": "status",
440
509
  "mutable": true,
441
510
  "complexType": {
442
511
  "original": "'success' | 'error' | 'default'",
@@ -449,12 +518,14 @@ export class CuraSelect {
449
518
  "tags": [],
450
519
  "text": "Status of the select component.\nCan be 'success', 'error', or 'default'."
451
520
  },
452
- "attribute": "status",
521
+ "getter": false,
522
+ "setter": false,
453
523
  "reflect": true,
454
524
  "defaultValue": "'default'"
455
525
  },
456
526
  "disabled": {
457
527
  "type": "boolean",
528
+ "attribute": "disabled",
458
529
  "mutable": false,
459
530
  "complexType": {
460
531
  "original": "boolean",
@@ -467,12 +538,14 @@ export class CuraSelect {
467
538
  "tags": [],
468
539
  "text": "Whether the select component is disabled.\nReflects as an attribute in the DOM."
469
540
  },
470
- "attribute": "disabled",
541
+ "getter": false,
542
+ "setter": false,
471
543
  "reflect": true,
472
544
  "defaultValue": "false"
473
545
  },
474
546
  "required": {
475
547
  "type": "boolean",
548
+ "attribute": "required",
476
549
  "mutable": false,
477
550
  "complexType": {
478
551
  "original": "boolean",
@@ -485,12 +558,14 @@ export class CuraSelect {
485
558
  "tags": [],
486
559
  "text": "Whether the select component is required.\nReflects as an attribute in the DOM."
487
560
  },
488
- "attribute": "required",
561
+ "getter": false,
562
+ "setter": false,
489
563
  "reflect": true,
490
564
  "defaultValue": "false"
491
565
  },
492
566
  "searchBehavior": {
493
567
  "type": "boolean",
568
+ "attribute": "search-behavior",
494
569
  "mutable": false,
495
570
  "complexType": {
496
571
  "original": "boolean",
@@ -503,12 +578,14 @@ export class CuraSelect {
503
578
  "tags": [],
504
579
  "text": "Enable / Disable search at options by term.\nDefault: false"
505
580
  },
506
- "attribute": "search-behavior",
581
+ "getter": false,
582
+ "setter": false,
507
583
  "reflect": true,
508
584
  "defaultValue": "false"
509
585
  },
510
586
  "caseSensitive": {
511
587
  "type": "boolean",
588
+ "attribute": "case-sensitive",
512
589
  "mutable": false,
513
590
  "complexType": {
514
591
  "original": "boolean",
@@ -521,12 +598,14 @@ export class CuraSelect {
521
598
  "tags": [],
522
599
  "text": "The search will be sensitive to accents.\nDefault: true"
523
600
  },
524
- "attribute": "case-sensitive",
601
+ "getter": false,
602
+ "setter": false,
525
603
  "reflect": true,
526
604
  "defaultValue": "true"
527
605
  },
528
606
  "maxHeight": {
529
607
  "type": "string",
608
+ "attribute": "max-height",
530
609
  "mutable": false,
531
610
  "complexType": {
532
611
  "original": "string",
@@ -539,7 +618,8 @@ export class CuraSelect {
539
618
  "tags": [],
540
619
  "text": "CSS max-height property for dropdown item.\nCan also be used by css property --max-height.\nDefault: 285px"
541
620
  },
542
- "attribute": "max-height",
621
+ "getter": false,
622
+ "setter": false,
543
623
  "reflect": true,
544
624
  "defaultValue": "'285px'"
545
625
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-select.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAgB,eAAe,EAAE,KAAK,EAAE,MAAM,e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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h, Event, EventEmitter, AttachInternals, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select',\n styleUrl: 'cura-select.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSelect {\n /**\n * The label text for the select component.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) label: string = '';\n\n /**\n * Placeholder text for the input field.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n\n /**\n * Current value of the select component.\n * Reflects as an attribute in the DOM and is mutable.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Display mode of the select component.\n * Can be 'default' or 'transparent'.\n */\n @Prop({ reflect: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Size of the select component.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n @Prop() iconName?: string;\n\n /**\n * Status of the select component.\n * Can be 'success', 'error', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'success' | 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the select component is required.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Enable / Disable search at options by term.\n * Default: false\n */\n @Prop({ reflect: true }) searchBehavior: boolean = false;\n\n /**\n * The search will be sensitive to accents.\n * Default: true\n */\n @Prop({ reflect: true }) caseSensitive: boolean = true;\n\n /**\n * CSS max-height property for dropdown item.\n * Can also be used by css property --max-height.\n * Default: 285px\n */\n @Prop({ reflect: true }) maxHeight: string = '285px';\n\n /**\n * Internal state: Whether the input is hovered.\n * Default: false\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused.\n * Default: false\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Whether the dropdown menu is open.\n * Default: false\n */\n @State() isOpen: boolean = false;\n\n /**\n * Internal state: Collection of options for the select component.\n */\n @State() options: NodeListOf<HTMLCuraSelectOptionElement>;\n\n @State() activeIndex = -1;\n\n @Watch('activeIndex')\n updateOptionHighlights(newActiveINdex: number) {\n this.options.forEach((option, index) => ((option as any).active = index === newActiveINdex));\n }\n\n @State() textInput = '';\n\n @Watch('textInput')\n /**\n * Filters the options based on the current input value.\n */\n filterOptions(newText) {\n this.searchTermInput.emit(newText);\n\n if (!this.isOpen || !this.searchBehavior) {\n return;\n }\n\n const removeAccents = (str: string) => {\n return str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n };\n\n let searchTerm = newText;\n if (!this.caseSensitive) {\n searchTerm = removeAccents(searchTerm).toLocaleLowerCase();\n }\n\n this.options.forEach(option => {\n let optionValue = option.textContent || '';\n if (!this.caseSensitive) {\n optionValue = removeAccents(optionValue?.toLowerCase());\n }\n const isVisible = optionValue.includes(searchTerm);\n option.style.display = isVisible ? 'block' : 'none';\n });\n }\n\n /**\n * Reference to the host element of the component.\n */\n @Element() host: HTMLElement;\n\n /**\n * Event emitted when an option is selected.\n */\n @Event() selected: EventEmitter;\n\n /**\n * Event emitted when an option is searched.\n */\n @Event() searchTermInput: EventEmitter;\n\n /**\n * MutationObserver to watch changes in the component.\n */\n mutationObserver: MutationObserver;\n\n /**\n * Styles to be applied to the component.\n */\n styles = {};\n\n /**\n * Theme object containing font and color information.\n */\n theme = window.CuraAPI.theme;\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.textInput = state.value;\n this.updateSelectedOption();\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.textInput = '';\n this.clearSelectedAttributes();\n this.internals.setFormValue('');\n this.internals.setValidity({});\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Lifecycle method called before the component is rendered.\n * Initializes the options for the select component.\n */\n componentWillLoad() {\n this.initializeOptions();\n }\n /**\n * Lifecycle method called after the component is rendered.\n * Initializes select-related functionality.\n */\n componentDidLoad() {\n this.setupMutationObserver();\n this.addOutsideClickListener();\n }\n /**\n * Lifecycle method called when the component is connected to the DOM.\n * Applies styles based on the theme.\n */\n connectedCallback() {\n this.applyStyles();\n }\n /**\n * Lifecycle method called when the component is disconnected from the DOM.\n * Disconnects the MutationObserver if it exists.\n */\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.removeOutsideClickListener();\n }\n\n initializeOptions() {\n this.options = this.host.querySelectorAll<HTMLCuraSelectOptionElement>('cura-select-option');\n this.options.forEach(option => {\n option.setAttribute('size', this.size);\n\n const isSelected = this.value === option.value;\n option.setAttribute('selected', JSON.stringify(isSelected));\n\n if (isSelected) {\n this.value = option.value;\n this.internals.setFormValue(option.value);\n }\n });\n\n this.textInput = Array.from(this.options).find(option => option.value === this.value)?.textContent || this.textInput;\n }\n /**\n * Applies styles to the component based on the theme.\n */\n applyStyles() {\n const { fonts, colors } = this.theme;\n const fontWeights = fonts.getWeights();\n\n this.styles = {\n ...this.styles,\n '--font-weight-medium': fontWeights.medium,\n '--font-weight-bold': fontWeights.bold,\n '--font-weight-regular': fontWeights.regular,\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-size': fonts.getSize(),\n };\n\n const colorKeys = [\n 'primary-base',\n 'neutral-purewhite',\n 'neutral-white',\n 'neutral-black',\n 'neutral-medium',\n 'neutral-light',\n 'neutral-base',\n 'neutral-dark',\n 'success-dark',\n 'success-darker',\n 'success-lighter',\n 'error-lighter',\n 'error-dark',\n 'error-darker',\n 'error-base',\n 'info-base',\n ];\n\n colorKeys.forEach(key => {\n this.styles[`--${key}`] = colors.getColor(key);\n });\n }\n /**\n * Sets up a MutationObserver to watch for changes in the component.\n */\n setupMutationObserver() {\n this.mutationObserver = new MutationObserver(this.handleMutations);\n this.mutationObserver.observe(this.host, { attributes: true, subtree: true, attributeFilter: ['selected', 'value'] });\n }\n /**\n * Handles mutations observed by the MutationObserver.\n * Updates the selected option or filters options based on the mutation type.\n */\n handleMutations = (mutations: MutationRecord[]) => {\n mutations.forEach(mutation => {\n if (mutation.type === 'attributes') {\n if (mutation.attributeName === 'selected') this.updateSelectedOption();\n }\n });\n };\n /**\n * Handles the selection of an option.\n */\n onOptiselected = (event: Event) => {\n const selectedOption = event.target as HTMLElement;\n this.clearSelectedAttributes();\n selectedOption.setAttribute('selected', 'true');\n };\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.clearSelectedAttributes();\n\n const selectedOption = this.host.querySelector(`cura-select-option[value=\"${newValue}\"]`);\n\n if (!selectedOption) {\n return;\n }\n\n selectedOption.setAttribute('selected', 'true');\n }\n\n updateSelectedOption() {\n const selectedOptionElement = this.host.querySelector<HTMLCuraSelectOptionElement>('cura-select-option[selected]');\n\n if (!selectedOptionElement) {\n return;\n }\n\n this.value = selectedOptionElement.value;\n this.internals.setFormValue(this.value);\n\n if (this.textInput !== selectedOptionElement.textContent) {\n this.textInput = selectedOptionElement.textContent;\n this.isOpen = false;\n this.selected.emit(selectedOptionElement.value);\n }\n }\n\n /**\n * Clears the 'selected' attribute from all options.\n */\n clearSelectedAttributes() {\n this.options.forEach(option => option.removeAttribute('selected'));\n }\n\n handleKeyNavigation = (event: KeyboardEvent) => {\n const { code: keyCode } = event;\n\n if (!this.isOpen && keyCode === 'ArrowDown') {\n this.isOpen = true;\n this.activeIndex = 0;\n\n return;\n }\n\n if (keyCode === 'ArrowDown') {\n event.preventDefault();\n this.updateActiveIndex(1);\n }\n\n if (keyCode === 'ArrowUp') {\n event.preventDefault();\n this.updateActiveIndex(-1);\n }\n\n if (keyCode === 'Enter' || keyCode === 'Space') {\n this.options[this.activeIndex]?.click();\n }\n\n if (keyCode === 'Escape') {\n this.isOpen = false;\n }\n };\n\n updateActiveIndex(direction: number) {\n if (this.options.length === 0) return;\n this.activeIndex = (this.activeIndex + direction + this.options.length) % this.options.length;\n }\n\n handleInputChange = (e: Event) => {\n this.textInput = (e.target as HTMLInputElement).value;\n this.isOpen = this.textInput.length > 0;\n this.internals.setFormValue(this.textInput);\n };\n\n getClasses() {\n return {\n wrapper: true,\n label: !!this.label,\n disabled: this.disabled,\n transparent: this.mode === 'transparent',\n [this.size.toLowerCase()]: true,\n [this.status.toLowerCase()]: true,\n };\n }\n\n /**\n * Determines the color based on the item type and component state.\n */\n getColor(item: 'label' | 'text' | 'icon') {\n if (this.disabled) return 'neutral-medium';\n\n const isStatusDefault = this.status === 'default';\n const isHoveredOrFocused = this.isFocused || this.isHovered;\n\n if (item === 'label') {\n if (!isStatusDefault || isHoveredOrFocused) return 'neutral-black';\n return 'neutral-dark';\n }\n\n if (isHoveredOrFocused && isStatusDefault) return 'neutral-black';\n if (this.status === 'success') return 'success-dark';\n if (this.status === 'error') return 'error-dark';\n\n return 'neutral-dark';\n }\n\n /**\n * Renders the icon based on the component's status.\n */\n renderIcon() {\n if (this.status === 'default' && !this.iconName) return null;\n const icon = { default: this.iconName, success: 'checkCircle', error: 'alertCircle' }[this.status];\n return <cura-icon class=\"feedback-icon\" name={icon} iconset=\"default\" size={this.size === 'large' ? 20 : 16} color={this.getColor('icon')} style={this.styles} />;\n }\n\n handleClick = (event: MouseEvent) => {\n if (this.disabled) return event.preventDefault();\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'CURA-SELECT-OPTION') return this.onOptiselected(event);\n this.isOpen = !this.isOpen;\n };\n\n handleClickOutside = (event: MouseEvent) => {\n const clickedOutside = !this.host.contains(event.target as Node);\n if (clickedOutside) {\n this.isOpen = false;\n }\n };\n\n private addOutsideClickListener() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n private removeOutsideClickListener() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n render() {\n return (\n <Host style={this.styles}\n role=\"combobox\"\n aria-label={this.label}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}>\n <div class={this.getClasses()} onMouseEnter={() => (this.isHovered = true)} onMouseLeave={() => (this.isHovered = false)} onClick={this.handleClick}>\n {this.label && (\n <cura-label class=\"label\" weight=\"bold\" size={this.size === 'large' ? 'small' : 'xsmall'} color={this.getColor('label')}>\n {this.label} {this.required && <span class=\"required\">* </span>}\n </cura-label>\n )}\n\n <div\n class={{\n 'cura-input-field': true,\n 'open': this.isOpen,\n }}\n >\n {this.renderIcon()}\n <input\n type=\"text\"\n autocomplete=\"off\"\n onFocus={() => (this.isFocused = true)}\n onBlur={() => (this.isFocused = false)}\n onKeyDown={this.handleKeyNavigation}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}\n onInput={this.handleInputChange}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n value={this.textInput}\n readonly={this.searchBehavior ? null : true}\n />\n <button class=\"up-down-button\">\n <cura-icon name={this.isOpen ? 'up' : 'down'} class=\"up-down-icon\" color={this.disabled ? 'neutral-dark' : 'primary-base'} size={16} iconset=\"default\" />\n </button>\n </div>\n <cura-label class=\"helper-text\" size=\"xsmall\" color={this.getColor('text')} weight={this.mode === 'transparent' ? 'bold' : 'regular'}>\n <slot></slot>\n </cura-label>\n {this.isOpen && (\n <div\n class={{\n menu: true,\n open: this.isOpen,\n }}\n style={{ '--max-height': this.maxHeight }}\n >\n <slot name=\"option\"></slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-select.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAgB,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtH,MAAM,OAAO,UAAU;IANvB;QAOE;;;WAGG;QACsB,UAAK,GAAW,EAAE,CAAC;QAE5C;;;WAGG;QACsB,gBAAW,GAAW,EAAE,CAAC;QAElD;;;WAGG;QACqC,UAAK,GAAW,EAAE,CAAC;QAE3D;;;WAGG;QACsB,SAAI,GAA8B,SAAS,CAAC;QAErE;;;WAGG;QACsB,SAAI,GAAiC,QAAQ,CAAC;QAIvE;;;WAGG;QACqC,WAAM,GAAoC,SAAS,CAAC;QAE5F;;;WAGG;QACsB,aAAQ,GAAY,KAAK,CAAC;QAEnD;;;WAGG;QACsB,aAAQ,GAAY,KAAK,CAAC;QAEnD;;;WAGG;QACsB,mBAAc,GAAY,KAAK,CAAC;QAEzD;;;WAGG;QACsB,kBAAa,GAAY,IAAI,CAAC;QAEtD;;;;WAIG;QACsB,cAAS,GAAW,OAAO,CAAC;QAEtD;;;WAGG;QACM,cAAS,GAAY,KAAK,CAAC;QAEpC;;;WAGG;QACM,cAAS,GAAY,KAAK,CAAC;QAEpC;;;WAGG;QACM,WAAM,GAAY,KAAK,CAAC;QAOxB,gBAAW,GAAG,CAAC,CAAC,CAAC;QAOjB,cAAS,GAAG,EAAE,CAAC;QAoDxB;;WAEG;QACH,WAAM,GAAG,EAAE,CAAC;QAEZ;;WAEG;QACH,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAmI7B;;;WAG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Content":["import { Component, Element, Host, Prop, State, h, Event, EventEmitter, AttachInternals, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select',\n styleUrl: 'cura-select.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSelect {\n /**\n * The label text for the select component.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) label: string = '';\n\n /**\n * Placeholder text for the input field.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n\n /**\n * Current value of the select component.\n * Reflects as an attribute in the DOM and is mutable.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Display mode of the select component.\n * Can be 'default' or 'transparent'.\n */\n @Prop({ reflect: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Size of the select component.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n @Prop() iconName?: string;\n\n /**\n * Status of the select component.\n * Can be 'success', 'error', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'success' | 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the select component is required.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Enable / Disable search at options by term.\n * Default: false\n */\n @Prop({ reflect: true }) searchBehavior: boolean = false;\n\n /**\n * The search will be sensitive to accents.\n * Default: true\n */\n @Prop({ reflect: true }) caseSensitive: boolean = true;\n\n /**\n * CSS max-height property for dropdown item.\n * Can also be used by css property --max-height.\n * Default: 285px\n */\n @Prop({ reflect: true }) maxHeight: string = '285px';\n\n /**\n * Internal state: Whether the input is hovered.\n * Default: false\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused.\n * Default: false\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Whether the dropdown menu is open.\n * Default: false\n */\n @State() isOpen: boolean = false;\n\n /**\n * Internal state: Collection of options for the select component.\n */\n @State() options: NodeListOf<HTMLCuraSelectOptionElement>;\n\n @State() activeIndex = -1;\n\n @Watch('activeIndex')\n updateOptionHighlights(newActiveINdex: number) {\n this.options.forEach((option, index) => ((option as any).active = index === newActiveINdex));\n }\n\n @State() textInput = '';\n\n @Watch('textInput')\n /**\n * Filters the options based on the current input value.\n */\n filterOptions(newText) {\n this.searchTermInput.emit(newText);\n\n if (!this.isOpen || !this.searchBehavior) {\n return;\n }\n\n const removeAccents = (str: string) => {\n return str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n };\n\n let searchTerm = newText;\n if (!this.caseSensitive) {\n searchTerm = removeAccents(searchTerm).toLocaleLowerCase();\n }\n\n this.options.forEach(option => {\n let optionValue = option.textContent || '';\n if (!this.caseSensitive) {\n optionValue = removeAccents(optionValue?.toLowerCase());\n }\n const isVisible = optionValue.includes(searchTerm);\n option.style.display = isVisible ? 'block' : 'none';\n });\n }\n\n /**\n * Reference to the host element of the component.\n */\n @Element() host: HTMLElement;\n\n /**\n * Event emitted when an option is selected.\n */\n @Event() selected: EventEmitter;\n\n /**\n * Event emitted when an option is searched.\n */\n @Event() searchTermInput: EventEmitter;\n\n /**\n * MutationObserver to watch changes in the component.\n */\n mutationObserver: MutationObserver;\n\n /**\n * Styles to be applied to the component.\n */\n styles = {};\n\n /**\n * Theme object containing font and color information.\n */\n theme = window.CuraAPI.theme;\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.textInput = state.value;\n this.updateSelectedOption();\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.textInput = '';\n this.clearSelectedAttributes();\n this.internals.setFormValue('');\n this.internals.setValidity({});\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Lifecycle method called before the component is rendered.\n * Initializes the options for the select component.\n */\n componentWillLoad() {\n // this.initializeOptions();\n }\n /**\n * Lifecycle method called after the component is rendered.\n * Initializes select-related functionality.\n */\n componentDidLoad() {\n this.initializeOptions();\n this.setupMutationObserver();\n this.addOutsideClickListener();\n }\n /**\n * Lifecycle method called when the component is connected to the DOM.\n * Applies styles based on the theme.\n */\n connectedCallback() {\n this.applyStyles();\n }\n /**\n * Lifecycle method called when the component is disconnected from the DOM.\n * Disconnects the MutationObserver if it exists.\n */\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.removeOutsideClickListener();\n }\n\n initializeOptions() {\n this.options = this.host.querySelectorAll<HTMLCuraSelectOptionElement>('cura-select-option');\n this.options.forEach(option => {\n option.setAttribute('size', this.size);\n\n const isSelected = this.value === option.value;\n option.setAttribute('selected', JSON.stringify(isSelected));\n\n if (isSelected) {\n this.value = option.value;\n this.internals.setFormValue(option.value);\n }\n });\n\n this.textInput = Array.from(this.options).find(option => option.value === this.value)?.textContent || this.textInput;\n }\n /**\n * Applies styles to the component based on the theme.\n */\n applyStyles() {\n const { fonts, colors } = this.theme;\n const fontWeights = fonts.getWeights();\n\n this.styles = {\n ...this.styles,\n '--font-weight-medium': fontWeights.medium,\n '--font-weight-bold': fontWeights.bold,\n '--font-weight-regular': fontWeights.regular,\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-size': fonts.getSize(),\n };\n\n const colorKeys = [\n 'primary-base',\n 'neutral-purewhite',\n 'neutral-white',\n 'neutral-black',\n 'neutral-medium',\n 'neutral-light',\n 'neutral-base',\n 'neutral-dark',\n 'success-dark',\n 'success-darker',\n 'success-lighter',\n 'error-lighter',\n 'error-dark',\n 'error-darker',\n 'error-base',\n 'info-base',\n ];\n\n colorKeys.forEach(key => {\n this.styles[`--${key}`] = colors.getColor(key);\n });\n }\n /**\n * Sets up a MutationObserver to watch for changes in the component.\n */\n setupMutationObserver() {\n this.mutationObserver = new MutationObserver(this.handleMutations);\n this.mutationObserver.observe(this.host, { attributes: true, subtree: true, attributeFilter: ['selected', 'value'] });\n }\n /**\n * Handles mutations observed by the MutationObserver.\n * Updates the selected option or filters options based on the mutation type.\n */\n handleMutations = (mutations: MutationRecord[]) => {\n mutations.forEach(mutation => {\n if (mutation.type === 'attributes') {\n if (mutation.attributeName === 'selected') this.updateSelectedOption();\n }\n });\n };\n /**\n * Handles the selection of an option.\n */\n onOptiselected = (event: Event) => {\n const selectedOption = event.target as HTMLElement;\n this.clearSelectedAttributes();\n selectedOption.setAttribute('selected', 'true');\n };\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.clearSelectedAttributes();\n\n const selectedOption = this.host.querySelector(`cura-select-option[value=\"${newValue}\"]`);\n\n if (!selectedOption) {\n return;\n }\n\n selectedOption.setAttribute('selected', 'true');\n }\n\n updateSelectedOption() {\n const selectedOptionElement = this.host.querySelector<HTMLCuraSelectOptionElement>('cura-select-option[selected]');\n\n if (!selectedOptionElement) {\n return;\n }\n\n this.value = selectedOptionElement.value;\n this.internals.setFormValue(this.value);\n\n if (this.textInput !== selectedOptionElement.textContent) {\n this.textInput = selectedOptionElement.textContent;\n this.isOpen = false;\n this.selected.emit(selectedOptionElement.value);\n }\n }\n\n /**\n * Clears the 'selected' attribute from all options.\n */\n clearSelectedAttributes() {\n this.options.forEach(option => option.removeAttribute('selected'));\n }\n\n handleKeyNavigation = (event: KeyboardEvent) => {\n const { code: keyCode } = event;\n\n if (!this.isOpen && keyCode === 'ArrowDown') {\n this.isOpen = true;\n this.activeIndex = 0;\n\n return;\n }\n\n if (keyCode === 'ArrowDown') {\n event.preventDefault();\n this.updateActiveIndex(1);\n }\n\n if (keyCode === 'ArrowUp') {\n event.preventDefault();\n this.updateActiveIndex(-1);\n }\n\n if (keyCode === 'Enter' || keyCode === 'Space') {\n this.options[this.activeIndex]?.click();\n }\n\n if (keyCode === 'Escape') {\n this.isOpen = false;\n }\n };\n\n updateActiveIndex(direction: number) {\n if (this.options.length === 0) return;\n this.activeIndex = (this.activeIndex + direction + this.options.length) % this.options.length;\n }\n\n handleInputChange = (e: Event) => {\n this.textInput = (e.target as HTMLInputElement).value;\n this.isOpen = this.textInput.length > 0;\n this.internals.setFormValue(this.textInput);\n };\n\n getClasses() {\n return {\n wrapper: true,\n label: !!this.label,\n disabled: this.disabled,\n transparent: this.mode === 'transparent',\n [this.size.toLowerCase()]: true,\n [this.status.toLowerCase()]: true,\n };\n }\n\n /**\n * Determines the color based on the item type and component state.\n */\n getColor(item: 'label' | 'text' | 'icon') {\n if (this.disabled) return 'neutral-medium';\n\n const isStatusDefault = this.status === 'default';\n const isHoveredOrFocused = this.isFocused || this.isHovered;\n\n if (item === 'label') {\n if (!isStatusDefault || isHoveredOrFocused) return 'neutral-black';\n return 'neutral-dark';\n }\n\n if (isHoveredOrFocused && isStatusDefault) return 'neutral-black';\n if (this.status === 'success') return 'success-dark';\n if (this.status === 'error') return 'error-dark';\n\n return 'neutral-dark';\n }\n\n /**\n * Renders the icon based on the component's status.\n */\n renderIcon() {\n if (this.status === 'default' && !this.iconName) return null;\n const icon = { default: this.iconName, success: 'checkCircle', error: 'alertCircle' }[this.status];\n return <cura-icon class=\"feedback-icon\" name={icon} iconset=\"default\" size={this.size === 'large' ? 20 : 16} color={this.getColor('icon')} style={this.styles} />;\n }\n\n handleClick = (event: MouseEvent) => {\n if (this.disabled) return event.preventDefault();\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'CURA-SELECT-OPTION') return this.onOptiselected(event);\n this.isOpen = !this.isOpen;\n };\n\n handleClickOutside = (event: MouseEvent) => {\n const clickedOutside = !this.host.contains(event.target as Node);\n if (clickedOutside) {\n this.isOpen = false;\n }\n };\n\n private addOutsideClickListener() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n private removeOutsideClickListener() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n render() {\n return (\n <Host style={this.styles}\n role=\"combobox\"\n aria-label={this.label}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}>\n <div class={this.getClasses()} onMouseEnter={() => (this.isHovered = true)} onMouseLeave={() => (this.isHovered = false)} onClick={this.handleClick}>\n {this.label && (\n <cura-label class=\"label\" weight=\"bold\" size={this.size === 'large' ? 'small' : 'xsmall'} color={this.getColor('label')}>\n {this.label} {this.required && <span class=\"required\">* </span>}\n </cura-label>\n )}\n\n <div\n class={{\n 'cura-input-field': true,\n 'open': this.isOpen,\n }}\n >\n {this.renderIcon()}\n <input\n type=\"text\"\n autocomplete=\"off\"\n onFocus={() => (this.isFocused = true)}\n onBlur={() => (this.isFocused = false)}\n onKeyDown={this.handleKeyNavigation}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}\n onInput={this.handleInputChange}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n value={this.textInput}\n readonly={this.searchBehavior ? null : true}\n />\n <button class=\"up-down-button\">\n <cura-icon name={this.isOpen ? 'up' : 'down'} class=\"up-down-icon\" color={this.disabled ? 'neutral-dark' : 'primary-base'} size={16} iconset=\"default\" />\n </button>\n </div>\n <cura-label class=\"helper-text\" size=\"xsmall\" color={this.getColor('text')} weight={this.mode === 'transparent' ? 'bold' : 'regular'}>\n <slot></slot>\n </cura-label>\n {this.isOpen && (\n <div\n class={{\n menu: true,\n open: this.isOpen,\n }}\n style={{ '--max-height': this.maxHeight }}\n >\n <slot name=\"option\"></slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1,12 +1,11 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  export class CuraSelectOption {
3
3
  constructor() {
4
- this.theme = window.CuraAPI.theme;
5
- this.value = undefined;
6
4
  this.selected = false;
7
5
  this.active = false;
8
6
  this.size = 'small';
9
7
  this.styles = {};
8
+ this.theme = window.CuraAPI.theme;
10
9
  }
11
10
  connectedCallback() {
12
11
  const colors = [
@@ -51,6 +50,7 @@ export class CuraSelectOption {
51
50
  return {
52
51
  "value": {
53
52
  "type": "string",
53
+ "attribute": "value",
54
54
  "mutable": false,
55
55
  "complexType": {
56
56
  "original": "string",
@@ -63,11 +63,13 @@ export class CuraSelectOption {
63
63
  "tags": [],
64
64
  "text": ""
65
65
  },
66
- "attribute": "value",
66
+ "getter": false,
67
+ "setter": false,
67
68
  "reflect": true
68
69
  },
69
70
  "selected": {
70
71
  "type": "boolean",
72
+ "attribute": "selected",
71
73
  "mutable": false,
72
74
  "complexType": {
73
75
  "original": "boolean",
@@ -80,12 +82,14 @@ export class CuraSelectOption {
80
82
  "tags": [],
81
83
  "text": ""
82
84
  },
83
- "attribute": "selected",
85
+ "getter": false,
86
+ "setter": false,
84
87
  "reflect": true,
85
88
  "defaultValue": "false"
86
89
  },
87
90
  "active": {
88
91
  "type": "boolean",
92
+ "attribute": "active",
89
93
  "mutable": false,
90
94
  "complexType": {
91
95
  "original": "boolean",
@@ -98,12 +102,14 @@ export class CuraSelectOption {
98
102
  "tags": [],
99
103
  "text": ""
100
104
  },
101
- "attribute": "active",
105
+ "getter": false,
106
+ "setter": false,
102
107
  "reflect": true,
103
108
  "defaultValue": "false"
104
109
  },
105
110
  "size": {
106
111
  "type": "string",
112
+ "attribute": "size",
107
113
  "mutable": false,
108
114
  "complexType": {
109
115
  "original": "'xsmall' | 'small' | 'medium' | 'large'",
@@ -116,7 +122,8 @@ export class CuraSelectOption {
116
122
  "tags": [],
117
123
  "text": ""
118
124
  },
119
- "attribute": "size",
125
+ "getter": false,
126
+ "setter": false,
120
127
  "reflect": false,
121
128
  "defaultValue": "'small'"
122
129
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-select-option.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select-options/cura-select-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,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CAAC;IACjD,CAAC;IAED,UAAU;QACR,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,IAAI,CAAC,QAAQ;YACzB,QAAQ,EAAC,IAAI,CAAC,MAAM;SACrB,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,mBAAgB,IAAI,CAAC,QAAQ;YAC5D,4DAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM;gBAC/C,mEAAY,KAAK,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAe,GAAG;oBACrH,8DAAa,CACF;gBACZ,IAAI,CAAC,QAAQ,IAAI,kEAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,EAAC,cAAc,GAAa,CACnG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, State, Element, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select-option',\n styleUrl: 'cura-select-option.scss',\n shadow: true,\n})\nexport class CuraSelectOption {\n @Prop({ reflect: true }) value: string;\n @Prop({ reflect: true }) selected: boolean = false;\n @Prop({ reflect: true }) active: boolean = false;\n @Prop() size: 'xsmall' | 'small' | 'medium' | 'large' = 'small'\n @State() styles = {};\n @Element() host: HTMLElement;\n\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n const colors = [\n { name: '--primary-lighter-50', theme: 'primary-lighter', opacity: 0.5 },\n { name: '--primary-light', theme: 'primary-light' },\n { name: '--neutral-light', theme: 'neutral-light' },\n { name: '--neutral-purewhite', theme: 'neutral-purewhite' },\n ];\n\n colors.forEach(color => this.styles = { ...this.styles, [color.name]: this.theme.colors.getColor(color.theme, color?.opacity) });\n }\n\n @Watch('size')\n getSize(element: string) {\n const sizeMap = {\n large: element === 'label' ? 'medium' : 20,\n medium: element === 'label' ? 'small' : 16,\n small: element === 'label' ? 'xsmall' : 'micro',\n };\n\n return sizeMap[this.size] || sizeMap['medium'];\n }\n\n getClasses() {\n return {\n 'item': true,\n 'selected': this.selected,\n 'active':this.active\n };\n }\n\n render() {\n return (\n <Host slot=\"option\" role=\"option\" aria-selected={this.selected}>\n <div class={this.getClasses()} style={this.styles}>\n <cura-label color={`${this.selected ? 'primary-base' : 'neutral-black'}`} size={this.getSize('label')} margin-block=\"0\">\n <slot></slot>\n </cura-label>\n {this.selected && <cura-icon name='check' size={this.getSize('icon')} color=\"primary-base\"></cura-icon>}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-select-option.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select-options/cura-select-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,gBAAgB;IAL7B;QAO2B,aAAQ,GAAY,KAAK,CAAC;QAC1B,WAAM,GAAY,KAAK,CAAC;QACzC,SAAI,GAA4C,OAAO,CAAA;QACtD,WAAM,GAAG,EAAE,CAAC;QAGrB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;KA4C9B;IA1CC,iBAAiB;QACf,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE;YACxE,EAAE,IAAI,EAAE,iBAAiB,E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C,mEAAY,KAAK,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAe,GAAG;oBACrH,8DAAa,CACF;gBACZ,IAAI,CAAC,QAAQ,IAAI,kEAAW,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,EAAC,cAAc,GAAa,CACnG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, State, Element, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select-option',\n styleUrl: 'cura-select-option.scss',\n shadow: true,\n})\nexport class CuraSelectOption {\n @Prop({ reflect: true }) value: string;\n @Prop({ reflect: true }) selected: boolean = false;\n @Prop({ reflect: true }) active: boolean = false;\n @Prop() size: 'xsmall' | 'small' | 'medium' | 'large' = 'small'\n @State() styles = {};\n @Element() host: HTMLElement;\n\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n const colors = [\n { name: '--primary-lighter-50', theme: 'primary-lighter', opacity: 0.5 },\n { name: '--primary-light', theme: 'primary-light' },\n { name: '--neutral-light', theme: 'neutral-light' },\n { name: '--neutral-purewhite', theme: 'neutral-purewhite' },\n ];\n\n colors.forEach(color => this.styles = { ...this.styles, [color.name]: this.theme.colors.getColor(color.theme, color?.opacity) });\n }\n\n @Watch('size')\n getSize(element: string) {\n const sizeMap = {\n large: element === 'label' ? 'medium' : 20,\n medium: element === 'label' ? 'small' : 16,\n small: element === 'label' ? 'xsmall' : 'micro',\n };\n\n return sizeMap[this.size] || sizeMap['medium'];\n }\n\n getClasses() {\n return {\n 'item': true,\n 'selected': this.selected,\n 'active':this.active\n };\n }\n\n render() {\n return (\n <Host slot=\"option\" role=\"option\" aria-selected={this.selected}>\n <div class={this.getClasses()} style={this.styles}>\n <cura-label color={`${this.selected ? 'primary-base' : 'neutral-black'}`} size={this.getSize('label')} margin-block=\"0\">\n <slot></slot>\n </cura-label>\n {this.selected && <cura-icon name='check' size={this.getSize('icon')} color=\"primary-base\"></cura-icon>}\n </div>\n </Host>\n );\n }\n}\n"]}