@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
@@ -2,6 +2,61 @@ import { h, Host } from "@stencil/core";
2
2
  import { formsSizes } from "../cura-forms.definitions";
3
3
  export class CuraSwitch {
4
4
  constructor() {
5
+ /**
6
+ * Indicates whether the switch is checked or not.
7
+ */
8
+ this.checked = false;
9
+ /**
10
+ * Indicates whether the switch is disabled or not.
11
+ */
12
+ this.disabled = false;
13
+ /**
14
+ * The label text to display next to the switch.
15
+ */
16
+ this.label = '';
17
+ /**
18
+ * Tab index for the switch element.
19
+ * Reflects as an HTML attribute.
20
+ */
21
+ this.ontabindex = 0;
22
+ /**
23
+ * Position of the label relative to the switch.
24
+ * Can be 'left' or 'right'.
25
+ */
26
+ this.position = 'left';
27
+ /**
28
+ * Size of the switch.
29
+ * Can be 'small', 'medium', or 'large'.
30
+ */
31
+ this.size = 'medium';
32
+ /**
33
+ * Background style of the switch.
34
+ * Can be 'dark' or 'light'.
35
+ */
36
+ this.background = 'light';
37
+ /**
38
+ * Accent color of the switch.
39
+ */
40
+ this.color = 'accent';
41
+ /**
42
+ * Controls how the label text should handle overflow.
43
+ * - `'none'`: No overflow handling; the label displays normally.
44
+ * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
45
+ * - `string`: Custom overflow handling mode.
46
+ *
47
+ * @default 'none'
48
+ */
49
+ this.overflowLabel = 'none';
50
+ /**
51
+ * Controls how the helper text should handle overflow.
52
+ * - `'none'`: No overflow handling; the label displays normally.
53
+ * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
54
+ * - `string`: Custom overflow handling mode.
55
+ *
56
+ * @default 'none'
57
+ */
58
+ this.overflowHelper = 'none';
59
+ this.styles = {};
5
60
  this.sizes = {
6
61
  large: { size: 64 },
7
62
  medium: { size: 48 },
@@ -15,17 +70,6 @@ export class CuraSwitch {
15
70
  this.internals.setFormValue(this.checked.toString());
16
71
  this.onchange.emit({ checked: this.checked });
17
72
  };
18
- this.checked = false;
19
- this.disabled = false;
20
- this.label = '';
21
- this.ontabindex = 0;
22
- this.position = 'left';
23
- this.size = 'medium';
24
- this.background = 'light';
25
- this.color = 'accent';
26
- this.overflowLabel = 'none';
27
- this.overflowHelper = 'none';
28
- this.styles = {};
29
73
  }
30
74
  sizeHandler() {
31
75
  this.styles = Object.assign(Object.assign({}, this.styles), { '--size-track': `${this.sizes[this.size].size}px`, '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
@@ -113,6 +157,7 @@ export class CuraSwitch {
113
157
  return {
114
158
  "checked": {
115
159
  "type": "boolean",
160
+ "attribute": "checked",
116
161
  "mutable": true,
117
162
  "complexType": {
118
163
  "original": "boolean",
@@ -125,12 +170,14 @@ export class CuraSwitch {
125
170
  "tags": [],
126
171
  "text": "Indicates whether the switch is checked or not."
127
172
  },
128
- "attribute": "checked",
173
+ "getter": false,
174
+ "setter": false,
129
175
  "reflect": true,
130
176
  "defaultValue": "false"
131
177
  },
132
178
  "disabled": {
133
179
  "type": "boolean",
180
+ "attribute": "disabled",
134
181
  "mutable": false,
135
182
  "complexType": {
136
183
  "original": "boolean",
@@ -143,12 +190,14 @@ export class CuraSwitch {
143
190
  "tags": [],
144
191
  "text": "Indicates whether the switch is disabled or not."
145
192
  },
146
- "attribute": "disabled",
193
+ "getter": false,
194
+ "setter": false,
147
195
  "reflect": true,
148
196
  "defaultValue": "false"
149
197
  },
150
198
  "label": {
151
199
  "type": "string",
200
+ "attribute": "label",
152
201
  "mutable": false,
153
202
  "complexType": {
154
203
  "original": "string",
@@ -161,12 +210,14 @@ export class CuraSwitch {
161
210
  "tags": [],
162
211
  "text": "The label text to display next to the switch."
163
212
  },
164
- "attribute": "label",
213
+ "getter": false,
214
+ "setter": false,
165
215
  "reflect": true,
166
216
  "defaultValue": "''"
167
217
  },
168
218
  "ontabindex": {
169
219
  "type": "number",
220
+ "attribute": "ontabindex",
170
221
  "mutable": false,
171
222
  "complexType": {
172
223
  "original": "number",
@@ -179,12 +230,14 @@ export class CuraSwitch {
179
230
  "tags": [],
180
231
  "text": "Tab index for the switch element.\nReflects as an HTML attribute."
181
232
  },
182
- "attribute": "ontabindex",
233
+ "getter": false,
234
+ "setter": false,
183
235
  "reflect": true,
184
236
  "defaultValue": "0"
185
237
  },
186
238
  "position": {
187
239
  "type": "string",
240
+ "attribute": "position",
188
241
  "mutable": false,
189
242
  "complexType": {
190
243
  "original": "'left' | 'right'",
@@ -197,12 +250,14 @@ export class CuraSwitch {
197
250
  "tags": [],
198
251
  "text": "Position of the label relative to the switch.\nCan be 'left' or 'right'."
199
252
  },
200
- "attribute": "position",
253
+ "getter": false,
254
+ "setter": false,
201
255
  "reflect": true,
202
256
  "defaultValue": "'left'"
203
257
  },
204
258
  "size": {
205
259
  "type": "string",
260
+ "attribute": "size",
206
261
  "mutable": false,
207
262
  "complexType": {
208
263
  "original": "'small' | 'medium' | 'large'",
@@ -215,12 +270,14 @@ export class CuraSwitch {
215
270
  "tags": [],
216
271
  "text": "Size of the switch.\nCan be 'small', 'medium', or 'large'."
217
272
  },
218
- "attribute": "size",
273
+ "getter": false,
274
+ "setter": false,
219
275
  "reflect": true,
220
276
  "defaultValue": "'medium'"
221
277
  },
222
278
  "background": {
223
279
  "type": "string",
280
+ "attribute": "background",
224
281
  "mutable": false,
225
282
  "complexType": {
226
283
  "original": "'dark' | 'light'",
@@ -233,12 +290,14 @@ export class CuraSwitch {
233
290
  "tags": [],
234
291
  "text": "Background style of the switch.\nCan be 'dark' or 'light'."
235
292
  },
236
- "attribute": "background",
293
+ "getter": false,
294
+ "setter": false,
237
295
  "reflect": false,
238
296
  "defaultValue": "'light'"
239
297
  },
240
298
  "color": {
241
299
  "type": "string",
300
+ "attribute": "color",
242
301
  "mutable": false,
243
302
  "complexType": {
244
303
  "original": "string",
@@ -251,12 +310,14 @@ export class CuraSwitch {
251
310
  "tags": [],
252
311
  "text": "Accent color of the switch."
253
312
  },
254
- "attribute": "color",
313
+ "getter": false,
314
+ "setter": false,
255
315
  "reflect": false,
256
316
  "defaultValue": "'accent'"
257
317
  },
258
318
  "overflowLabel": {
259
319
  "type": "string",
320
+ "attribute": "overflow-label",
260
321
  "mutable": false,
261
322
  "complexType": {
262
323
  "original": "'none' | 'single' | string",
@@ -272,12 +333,14 @@ export class CuraSwitch {
272
333
  }],
273
334
  "text": "Controls how the label text should handle overflow.\n- `'none'`: No overflow handling; the label displays normally.\n- `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n- `string`: Custom overflow handling mode."
274
335
  },
275
- "attribute": "overflow-label",
336
+ "getter": false,
337
+ "setter": false,
276
338
  "reflect": true,
277
339
  "defaultValue": "'none'"
278
340
  },
279
341
  "overflowHelper": {
280
342
  "type": "string",
343
+ "attribute": "overflow-helper",
281
344
  "mutable": false,
282
345
  "complexType": {
283
346
  "original": "'none' | 'single' | string",
@@ -293,7 +356,8 @@ export class CuraSwitch {
293
356
  }],
294
357
  "text": "Controls how the helper text should handle overflow.\n- `'none'`: No overflow handling; the label displays normally.\n- `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n- `string`: Custom overflow handling mode."
295
358
  },
296
- "attribute": "overflow-helper",
359
+ "getter": false,
360
+ "setter": false,
297
361
  "reflect": true,
298
362
  "defaultValue": "'none'"
299
363
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-switch.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-switch/cura-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,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AAC,CAAC,MAAM,EAAE,EAClE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS;wBAEf,8DAAa,CACF,CACT;gBAEN,4DAAK,KAAK,EAAC,SAAS;oBAClB,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE;wBAC5C,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAQ,CAC7E,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Event, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-switch',\n styleUrl: 'cura-switch.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSwitch {\n /**\n * Indicates whether the switch is checked or not.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Indicates whether the switch is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * The label text to display next to the switch.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Tab index for the switch element.\n * Reflects as an HTML attribute.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the switch.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Size of the switch.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background style of the switch.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Accent color of the switch.\n */\n @Prop() color = 'accent';\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowLabel: 'none' | 'single' | string = 'none';\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowHelper: 'none' | 'single' | string = 'none';\n\n @State() styles = {};\n\n @Event({ eventName: 'onchange', composed: true, cancelable: true, bubbles: true }) onchange: EventEmitter<{ checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 64 },\n medium: { size: 48 },\n small: { size: 40 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-track': `${this.sizes[this.size].size}px`,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--info-base', background: 'info-base' },\n { name: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--neutral-medium', background: 'neutral-medium' },\n { name: '--neutral-pale', background: 'neutral-pale' },\n { name: '--neutral-dark-base', background: `neutral-${this.isDarkbackground() ? 'dark' : 'base'}` },\n { name: '--neutral-darker-medium', background: `neutral-${this.isDarkbackground() ? 'darker' : 'medium'}` },\n { name: '--neutral-black-neutral-pale', background: `${this.isDarkbackground() ? 'neutral-black' : 'neutral-pale'}` },\n { name: '--neutral-black-neutral-base', background: `${this.isDarkbackground() ? 'neutral-dark' : 'neutral-base'}` },\n { name: '--color-base-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color?.opacity);\n });\n this.styles = { ...this.styles };\n }\n\n connectedCallback() {\n this.sizeHandler();\n this.setColors();\n }\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.checked = state.value === 'true';\n this.internals.setFormValue(this.checked.toString());\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.checked.toString());\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 toggleSwitch = () => {\n if (this.disabled) return null;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.checked.toString());\n this.onchange.emit({ checked: this.checked });\n };\n\n assignColor(colorDark: string, colorLight: string) {\n if (this.disabled) return this.isDarkbackground() ? 'neutral-dark' : 'neutral-dark';\n return this.isDarkbackground() ? colorDark : colorLight;\n }\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['position'] = this.position === 'right';\n\n return classes;\n }\n\n render() {\n return (\n <Host role=\"switch\" aria-checked={this.checked} aria-disabled={this.disabled}>\n <div class={this.getClasses()} style={this.styles} onClick={this.toggleSwitch}>\n <div class=\"info\">\n <cura-label\n textOverflow={this.overflowLabel}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n class=\"label\"\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n lineHeight=\"125%\"\n color={this.assignColor('neutral-white', 'neutral-black')}\n >\n {this.label}\n </cura-label>\n <cura-label\n textOverflow={this.overflowHelper}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n color={this.assignColor('primary-lighter', 'neutral-dark')}\n size=\"xsmall\"\n class=\"message\"\n >\n <slot></slot>\n </cura-label>\n </div>\n\n <div class=\"control\">\n <div class={`track ${this.size.toLowerCase()}`}>\n <div class={`thumb ${this.size.toLowerCase()}`} tabIndex={this.ontabindex}></div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-switch.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-switch/cura-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,MAAM,OAAO,UAAU;IANvB;QAOE;;WAEG;QACqC,YAAO,GAAY,KAAK,CAAC;QACjE;;WAEG;QACsB,aAAQ,GAAY,KAAK,CAAC;QACnD;;WAEG;QACsB,UAAK,GAAW,EAAE,CAAC;QAC5C;;;WAGG;QACsB,eAAU,GAAW,CAAC,CAAC;QAChD;;;WAGG;QACsB,aAAQ,GAAqB,MAAM,CAAC;QAC7D;;;WAGG;QACsB,SAAI,GAAiC,QAAQ,CAAC;QACvE;;;WAGG;QACK,eAAU,GAAqB,OAAO,CAAC;QAC/C;;WAEG;QACK,UAAK,GAAG,QAAQ,CAAC;QAEzB;;;;;;;WAOG;QACsB,kBAAa,GAA+B,MAAM,CAAC;QAE5E;;;;;;;WAOG;QACsB,mBAAc,GAA+B,MAAM,CAAC;QAEpE,WAAM,GAAG,EAAE,CAAC;QAMrB,UAAK,GAAG;Y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AE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAQ,CAC7E,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Event, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-switch',\n styleUrl: 'cura-switch.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSwitch {\n /**\n * Indicates whether the switch is checked or not.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Indicates whether the switch is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * The label text to display next to the switch.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Tab index for the switch element.\n * Reflects as an HTML attribute.\n */\n @Prop({ reflect: true }) ontabindex: number = 0;\n /**\n * Position of the label relative to the switch.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Size of the switch.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Background style of the switch.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Accent color of the switch.\n */\n @Prop() color = 'accent';\n\n /**\n * Controls how the label text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowLabel: 'none' | 'single' | string = 'none';\n\n /**\n * Controls how the helper text should handle overflow.\n * - `'none'`: No overflow handling; the label displays normally.\n * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.\n * - `string`: Custom overflow handling mode.\n *\n * @default 'none'\n */\n @Prop({ reflect: true }) overflowHelper: 'none' | 'single' | string = 'none';\n\n @State() styles = {};\n\n @Event({ eventName: 'onchange', composed: true, cancelable: true, bubbles: true }) onchange: EventEmitter<{ checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 64 },\n medium: { size: 48 },\n small: { size: 40 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-track': `${this.sizes[this.size].size}px`,\n '--size': `${formsSizes[this.size].size}px`,\n '--gap': `${formsSizes[this.size].gap}px`,\n };\n }\n\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--info-base', background: 'info-base' },\n { name: '--neutral-black-shadow', background: 'neutral-black', opacity: 0.16 },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--neutral-medium', background: 'neutral-medium' },\n { name: '--neutral-pale', background: 'neutral-pale' },\n { name: '--neutral-dark-base', background: `neutral-${this.isDarkbackground() ? 'dark' : 'base'}` },\n { name: '--neutral-darker-medium', background: `neutral-${this.isDarkbackground() ? 'darker' : 'medium'}` },\n { name: '--neutral-black-neutral-pale', background: `${this.isDarkbackground() ? 'neutral-black' : 'neutral-pale'}` },\n { name: '--neutral-black-neutral-base', background: `${this.isDarkbackground() ? 'neutral-dark' : 'neutral-base'}` },\n { name: '--color-base-light', background: `${this.color}-light` },\n { name: '--color-dark', background: `${this.color}-dark` },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color?.opacity);\n });\n this.styles = { ...this.styles };\n }\n\n connectedCallback() {\n this.sizeHandler();\n this.setColors();\n }\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.checked = state.value === 'true';\n this.internals.setFormValue(this.checked.toString());\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.checked.toString());\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 toggleSwitch = () => {\n if (this.disabled) return null;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.checked.toString());\n this.onchange.emit({ checked: this.checked });\n };\n\n assignColor(colorDark: string, colorLight: string) {\n if (this.disabled) return this.isDarkbackground() ? 'neutral-dark' : 'neutral-dark';\n return this.isDarkbackground() ? colorDark : colorLight;\n }\n\n getClasses() {\n const classes = {};\n classes['container'] = true;\n classes['checked'] = this.checked;\n classes['disabled'] = this.disabled;\n classes['position'] = this.position === 'right';\n\n return classes;\n }\n\n render() {\n return (\n <Host role=\"switch\" aria-checked={this.checked} aria-disabled={this.disabled}>\n <div class={this.getClasses()} style={this.styles} onClick={this.toggleSwitch}>\n <div class=\"info\">\n <cura-label\n textOverflow={this.overflowLabel}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n class=\"label\"\n weight=\"bold\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n lineHeight=\"125%\"\n color={this.assignColor('neutral-white', 'neutral-black')}\n >\n {this.label}\n </cura-label>\n <cura-label\n textOverflow={this.overflowHelper}\n style={{ textAlign: this.position === 'right' ? 'right' : 'left' }}\n color={this.assignColor('primary-lighter', 'neutral-dark')}\n size=\"xsmall\"\n class=\"message\"\n >\n <slot></slot>\n </cura-label>\n </div>\n\n <div class=\"control\">\n <div class={`track ${this.size.toLowerCase()}`}>\n <div class={`thumb ${this.size.toLowerCase()}`} tabIndex={this.ontabindex}></div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -40,6 +40,7 @@ export class CuraLoaderBar {
40
40
  return {
41
41
  "color": {
42
42
  "type": "string",
43
+ "attribute": "color",
43
44
  "mutable": false,
44
45
  "complexType": {
45
46
  "original": "string",
@@ -52,12 +53,14 @@ export class CuraLoaderBar {
52
53
  "tags": [],
53
54
  "text": ""
54
55
  },
55
- "attribute": "color",
56
+ "getter": false,
57
+ "setter": false,
56
58
  "reflect": false,
57
59
  "defaultValue": "'primary-base'"
58
60
  },
59
61
  "progress": {
60
62
  "type": "number",
63
+ "attribute": "progress",
61
64
  "mutable": false,
62
65
  "complexType": {
63
66
  "original": "number",
@@ -70,7 +73,8 @@ export class CuraLoaderBar {
70
73
  "tags": [],
71
74
  "text": ""
72
75
  },
73
- "attribute": "progress",
76
+ "getter": false,
77
+ "setter": false,
74
78
  "reflect": false,
75
79
  "defaultValue": "0"
76
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-loader-bar.js","sourceRoot":"","sources":["../../../../src/components/loaders/cura-loader-bar/cura-loader-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,aAAa;;qBAGR,cAAc;wBACX,CAAC;sBAEF,EAAE;;IAGpB,iBAAiB;QACf,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAGD,cAAc;QACZ,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,aAAa,mBACP,IAAI,CAAC,QAAQ,mBACb,CAAC,mBACD,GAAG;YAClB,4DAAK,EAAE,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM;gBAC5D,6DAAM,KAAK,EAAC,mBAAmB,GAAQ,CACnC,CACD,CACR,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,GAAG,CAAC,EAC3E,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GACjE,CAAA;IACH,CAAC;IAED,WAAW;QACT,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,aAAa,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,GACnC,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-loader-bar',\n styleUrl: 'cura-loader-bar.scss',\n shadow: true,\n})\nexport class CuraLoaderBar {\n @Element() host: HTMLElement;\n\n @Prop() color = 'primary-base';\n @Prop() progress = 0;\n\n @State() styles = {};\n\n @Watch('color')\n handleChangeColor() {\n this.setColor();\n }\n\n @Watch('progress')\n handleProgress() {\n this.setProgress();\n }\n\n connectedCallback() {\n this.setColor();\n this.setProgress();\n }\n\n render() {\n return (\n <Host role=\"progressbar\"\n aria-valuenow={this.progress}\n aria-valuemin={0}\n aria-valuemax={100}>\n <div id=\"progress-bar\" class=\"progress-bar\" style={this.styles}>\n <span class=\"progress-bar-fill\"></span>\n </div>\n </Host>\n );\n }\n\n setColor() {\n this.styles = {\n ...this.styles,\n '--neutral-base': window.CuraAPI.theme.colors.getColor(`neutral-base`, 0.2),\n '--color-base': window.CuraAPI.theme.colors.getColor(this.color),\n }\n }\n\n setProgress() {\n this.styles = {\n ...this.styles,\n '--bar-width': `${this.progress}%`,\n }\n }\n}\n"]}
1
+ {"version":3,"file":"cura-loader-bar.js","sourceRoot":"","sources":["../../../../src/components/loaders/cura-loader-bar/cura-loader-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,aAAa;IAL1B;QAQU,UAAK,GAAG,cAAc,CAAC;QACvB,aAAQ,GAAG,CAAC,CAAC;QAEZ,WAAM,GAAG,EAAE,CAAC;KA4CtB;IAzCC,iBAAiB;QACf,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAGD,cAAc;QACZ,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,aAAa,mBACP,IAAI,CAAC,QAAQ,mBACb,CAAC,mBACD,GAAG;YAClB,4DAAK,EAAE,EAAC,cAAc,EAAC,KAAK,EAAC,cAAc,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM;gBAC5D,6DAAM,KAAK,EAAC,mBAAmB,GAAQ,CACnC,CACD,CACR,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,GAAG,CAAC,EAC3E,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GACjE,CAAA;IACH,CAAC;IAED,WAAW;QACT,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,aAAa,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,GACnC,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-loader-bar',\n styleUrl: 'cura-loader-bar.scss',\n shadow: true,\n})\nexport class CuraLoaderBar {\n @Element() host: HTMLElement;\n\n @Prop() color = 'primary-base';\n @Prop() progress = 0;\n\n @State() styles = {};\n\n @Watch('color')\n handleChangeColor() {\n this.setColor();\n }\n\n @Watch('progress')\n handleProgress() {\n this.setProgress();\n }\n\n connectedCallback() {\n this.setColor();\n this.setProgress();\n }\n\n render() {\n return (\n <Host role=\"progressbar\"\n aria-valuenow={this.progress}\n aria-valuemin={0}\n aria-valuemax={100}>\n <div id=\"progress-bar\" class=\"progress-bar\" style={this.styles}>\n <span class=\"progress-bar-fill\"></span>\n </div>\n </Host>\n );\n }\n\n setColor() {\n this.styles = {\n ...this.styles,\n '--neutral-base': window.CuraAPI.theme.colors.getColor(`neutral-base`, 0.2),\n '--color-base': window.CuraAPI.theme.colors.getColor(this.color),\n }\n }\n\n setProgress() {\n this.styles = {\n ...this.styles,\n '--bar-width': `${this.progress}%`,\n }\n }\n}\n"]}
@@ -1,6 +1,14 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CuraLoaderCircle {
3
3
  constructor() {
4
+ /**
5
+ * Loader size. Values: small, medium or large.
6
+ */
7
+ this.size = 'medium';
8
+ /**
9
+ * One from color scheme. Default: neutral-white.
10
+ */
11
+ this.color = 'neutral-white';
4
12
  this.sizes = {
5
13
  xlarge: 32,
6
14
  large: 24,
@@ -9,8 +17,6 @@ export class CuraLoaderCircle {
9
17
  default: 16,
10
18
  };
11
19
  this.getPxSize = () => this.sizes[this.size] || this.sizes['default'];
12
- this.size = 'medium';
13
- this.color = 'neutral-white';
14
20
  }
15
21
  getStyles() {
16
22
  return {
@@ -37,6 +43,7 @@ export class CuraLoaderCircle {
37
43
  return {
38
44
  "size": {
39
45
  "type": "string",
46
+ "attribute": "size",
40
47
  "mutable": false,
41
48
  "complexType": {
42
49
  "original": "'small' | 'medium' | 'large' | 'xlarge'",
@@ -49,12 +56,14 @@ export class CuraLoaderCircle {
49
56
  "tags": [],
50
57
  "text": "Loader size. Values: small, medium or large."
51
58
  },
52
- "attribute": "size",
59
+ "getter": false,
60
+ "setter": false,
53
61
  "reflect": true,
54
62
  "defaultValue": "'medium'"
55
63
  },
56
64
  "color": {
57
65
  "type": "string",
66
+ "attribute": "color",
58
67
  "mutable": false,
59
68
  "complexType": {
60
69
  "original": "string",
@@ -67,7 +76,8 @@ export class CuraLoaderCircle {
67
76
  "tags": [],
68
77
  "text": "One from color scheme. Default: neutral-white."
69
78
  },
70
- "attribute": "color",
79
+ "getter": false,
80
+ "setter": false,
71
81
  "reflect": true,
72
82
  "defaultValue": "'neutral-white'"
73
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-loader-circle.js","sourceRoot":"","sources":["../../../../src/components/loaders/cura-loader-circle/cura-loader-circle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,gBAAgB;;QAW3B,UAAK,GAAG;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,EAAE;SACZ,CAAC;QAEF,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;oBAdM,QAAQ;qBAIhD,eAAe;;IAY9C,SAAS;QACP,OAAO;YACL,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI;YACjC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;SAC5D,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,EACvB,IAAI,EAAC,aAAa;YAClB,4DAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;gBACrE;oBACE,+DAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,MAAM,EAAC,iCAAiC,kBAAc,GAAG,GAAE;oBACvF,6DAAM,CAAC,EAAC,iHAAiH,kBAAc,GAAG,GAAE,CAC1I;gBACJ;oBACE,uEAAgB,EAAE,EAAC,2BAA2B,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,EAAC,aAAa,EAAC,gBAAgB;wBAClH,8DAAO;wBACP,6DAAM,MAAM,EAAC,GAAG,GAAE,CACH,CACZ,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'cura-loader-circle',\n styleUrl: 'cura-loader-circle.scss',\n shadow: true,\n})\nexport class CuraLoaderCircle {\n\n /**\n * Loader size. Values: small, medium or large.\n */\n @Prop({reflect: true}) size: 'small' | 'medium' | 'large' | 'xlarge' = 'medium';\n /**\n * One from color scheme. Default: neutral-white.\n */\n @Prop({reflect: true}) color = 'neutral-white';\n\n sizes = {\n xlarge: 32,\n large: 24,\n medium: 20,\n small: 16,\n default: 16,\n };\n\n getPxSize = () => this.sizes[this.size] || this.sizes['default'];\n\n getStyles() {\n return {\n '--size': `${this.getPxSize()}px`,\n '--color': window.CuraAPI.theme.colors.getColor(this.color)\n }\n }\n\n render() {\n return (\n <Host\n style={this.getStyles()}\n role=\"progressbar\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"url(#paint0_linear_13485_11488)\" stroke-width=\"2\"/>\n <path d=\"M1 8C1 4.13401 4.11877 1 7.96596 1C9.53445 1 10.9819 1.52093 12.1462 2.4C12.8959 2.96601 13.5282 3.68049 14 4.5\" stroke-width=\"2\"/>\n </g>\n <defs>\n <linearGradient id=\"paint0_linear_13485_11488\" x1=\"15.7\" y1=\"4.5\" x2=\"4.15\" y2=\"11.5\" gradientUnits=\"userSpaceOnUse\">\n <stop/>\n <stop offset=\"1\"/>\n </linearGradient>\n </defs>\n </svg>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"cura-loader-circle.js","sourceRoot":"","sources":["../../../../src/components/loaders/cura-loader-circle/cura-loader-circle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,gBAAgB;IAL7B;QAOE;;WAEG;QACoB,SAAI,GAA4C,QAAQ,CAAC;QAChF;;WAEG;QACoB,UAAK,GAAG,eAAe,CAAC;QAE/C,UAAK,GAAG;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,EAAE;SACZ,CAAC;QAEF,cAAS,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;KA8BlE;IA5BC,SAAS;QACP,OAAO;YACL,QAAQ,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI;YACjC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;SAC5D,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,EACvB,IAAI,EAAC,aAAa;YAClB,4DAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B;gBACrE;oBACE,+DAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,EAAC,MAAM,EAAC,iCAAiC,kBAAc,GAAG,GAAE;oBACvF,6DAAM,CAAC,EAAC,iHAAiH,kBAAc,GAAG,GAAE,CAC1I;gBACJ;oBACE,uEAAgB,EAAE,EAAC,2BAA2B,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,KAAK,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,EAAC,aAAa,EAAC,gBAAgB;wBAClH,8DAAO;wBACP,6DAAM,MAAM,EAAC,GAAG,GAAE,CACH,CACZ,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'cura-loader-circle',\n styleUrl: 'cura-loader-circle.scss',\n shadow: true,\n})\nexport class CuraLoaderCircle {\n\n /**\n * Loader size. Values: small, medium or large.\n */\n @Prop({reflect: true}) size: 'small' | 'medium' | 'large' | 'xlarge' = 'medium';\n /**\n * One from color scheme. Default: neutral-white.\n */\n @Prop({reflect: true}) color = 'neutral-white';\n\n sizes = {\n xlarge: 32,\n large: 24,\n medium: 20,\n small: 16,\n default: 16,\n };\n\n getPxSize = () => this.sizes[this.size] || this.sizes['default'];\n\n getStyles() {\n return {\n '--size': `${this.getPxSize()}px`,\n '--color': window.CuraAPI.theme.colors.getColor(this.color)\n }\n }\n\n render() {\n return (\n <Host\n style={this.getStyles()}\n role=\"progressbar\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g>\n <circle cx=\"8\" cy=\"8\" r=\"7\" stroke=\"url(#paint0_linear_13485_11488)\" stroke-width=\"2\"/>\n <path d=\"M1 8C1 4.13401 4.11877 1 7.96596 1C9.53445 1 10.9819 1.52093 12.1462 2.4C12.8959 2.96601 13.5282 3.68049 14 4.5\" stroke-width=\"2\"/>\n </g>\n <defs>\n <linearGradient id=\"paint0_linear_13485_11488\" x1=\"15.7\" y1=\"4.5\" x2=\"4.15\" y2=\"11.5\" gradientUnits=\"userSpaceOnUse\">\n <stop/>\n <stop offset=\"1\"/>\n </linearGradient>\n </defs>\n </svg>\n </Host>\n );\n }\n\n}\n"]}
@@ -2,8 +2,6 @@ import { h, Host } from "@stencil/core";
2
2
  import { labelSizes } from "../cura-tabs.definitions";
3
3
  export class CuraTabs {
4
4
  constructor() {
5
- this.name = undefined;
6
- this.iconName = undefined;
7
5
  this.selected = false;
8
6
  this.disabled = false;
9
7
  this.borderBottom = true;
@@ -105,6 +103,7 @@ export class CuraTabs {
105
103
  return {
106
104
  "name": {
107
105
  "type": "string",
106
+ "attribute": "name",
108
107
  "mutable": false,
109
108
  "complexType": {
110
109
  "original": "string",
@@ -117,11 +116,13 @@ export class CuraTabs {
117
116
  "tags": [],
118
117
  "text": ""
119
118
  },
120
- "attribute": "name",
119
+ "getter": false,
120
+ "setter": false,
121
121
  "reflect": true
122
122
  },
123
123
  "iconName": {
124
124
  "type": "string",
125
+ "attribute": "icon-name",
125
126
  "mutable": false,
126
127
  "complexType": {
127
128
  "original": "string",
@@ -134,11 +135,13 @@ export class CuraTabs {
134
135
  "tags": [],
135
136
  "text": ""
136
137
  },
137
- "attribute": "icon-name",
138
+ "getter": false,
139
+ "setter": false,
138
140
  "reflect": true
139
141
  },
140
142
  "selected": {
141
143
  "type": "boolean",
144
+ "attribute": "selected",
142
145
  "mutable": true,
143
146
  "complexType": {
144
147
  "original": "boolean",
@@ -151,12 +154,14 @@ export class CuraTabs {
151
154
  "tags": [],
152
155
  "text": ""
153
156
  },
154
- "attribute": "selected",
157
+ "getter": false,
158
+ "setter": false,
155
159
  "reflect": true,
156
160
  "defaultValue": "false"
157
161
  },
158
162
  "disabled": {
159
163
  "type": "boolean",
164
+ "attribute": "disabled",
160
165
  "mutable": true,
161
166
  "complexType": {
162
167
  "original": "boolean",
@@ -169,12 +174,14 @@ export class CuraTabs {
169
174
  "tags": [],
170
175
  "text": ""
171
176
  },
172
- "attribute": "disabled",
177
+ "getter": false,
178
+ "setter": false,
173
179
  "reflect": true,
174
180
  "defaultValue": "false"
175
181
  },
176
182
  "borderBottom": {
177
183
  "type": "boolean",
184
+ "attribute": "border-bottom",
178
185
  "mutable": true,
179
186
  "complexType": {
180
187
  "original": "boolean",
@@ -187,12 +194,14 @@ export class CuraTabs {
187
194
  "tags": [],
188
195
  "text": ""
189
196
  },
190
- "attribute": "border-bottom",
197
+ "getter": false,
198
+ "setter": false,
191
199
  "reflect": true,
192
200
  "defaultValue": "true"
193
201
  },
194
202
  "size": {
195
203
  "type": "string",
204
+ "attribute": "size",
196
205
  "mutable": false,
197
206
  "complexType": {
198
207
  "original": "'small' | 'medium' | 'large'",
@@ -205,12 +214,14 @@ export class CuraTabs {
205
214
  "tags": [],
206
215
  "text": ""
207
216
  },
208
- "attribute": "size",
217
+ "getter": false,
218
+ "setter": false,
209
219
  "reflect": true,
210
220
  "defaultValue": "'large'"
211
221
  },
212
222
  "colorMode": {
213
223
  "type": "string",
224
+ "attribute": "color-mode",
214
225
  "mutable": true,
215
226
  "complexType": {
216
227
  "original": "'dark' | 'light'",
@@ -223,7 +234,8 @@ export class CuraTabs {
223
234
  "tags": [],
224
235
  "text": ""
225
236
  },
226
- "attribute": "color-mode",
237
+ "getter": false,
238
+ "setter": false,
227
239
  "reflect": true,
228
240
  "defaultValue": "'light'"
229
241
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-tabs.js","sourceRoot":"","sources":["../../../../src/components/tabs/cura-tabs/cura-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAOtD,MAAM,OAAO,QAAQ;;;;wBAGyC,KAAK;wBACL,KAAK;4BACD,IAAI;oBACN,OAAO;yBACC,OAAO;uBAE1D,KAAK;sBACkB,EAAE;;IAK5C,SAAS;QACP,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,6BAA6B,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,EAAE;YAC/G,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,EAAE;YAClG;gBACE,IAAI,EAAE,gCAAgC;gBACtC,KAAK,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe;aACrE;YACD;gBACE,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;aAC/D;SACF,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC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AI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM;QACJ,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;QACjE,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC9C,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAE3B,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,QAAQ,kBAAe,IAAI,CAAC,QAAQ,mBAAiB,IAAI,CAAC,QAAQ;YAC3E,+DACE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC9C,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;gBAE7C,IAAI,CAAC,OAAO,EAAE;gBACf,mEAAY,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,EAAC,WAAW,EAAC,GAAG;oBAC5E,8DAAa,CACF,CACN,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { labelSizes } from '../cura-tabs.definitions';\n\n@Component({\n tag: 'cura-tabs',\n styleUrl: 'cura-tabs.scss',\n shadow: true,\n})\nexport class CuraTabs {\n @Prop({ reflect: true }) name: string;\n @Prop({ reflect: true }) iconName: string;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\n @Prop({ reflect: true, mutable: true }) borderBottom: boolean = true;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n @Prop({ reflect: true, mutable: true }) colorMode: 'dark' | 'light' = 'light';\n\n @State() hovered = false;\n @State() styles: Record<string, string> = {};\n\n @Event() tabSelect: EventEmitter<{ name: string }>;\n\n @Watch('colorMode')\n setColors() {\n const colors = [\n { name: '--background-color-selected', theme: this.colorMode === 'light' ? 'primary-base' : 'primary-lighter' },\n { name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-lighter' : null },\n {\n name: '--background-disabled-selected',\n theme: this.colorMode === 'light' ? 'neutral-pale' : 'neutral-black',\n },\n {\n name: '--border-bottom-color',\n theme: this.colorMode === 'light' ? 'neutral-base' : 'primary',\n },\n ];\n\n colors.forEach(c => {\n if (c.theme) this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);\n });\n\n this.styles = { ...this.styles };\n }\n\n computeContentColor(): string {\n if (this.disabled) return 'neutral-dark';\n\n if (this.colorMode === 'dark') {\n if (this.hovered && !this.selected) {\n return 'neutral-purewhite';\n }\n return this.selected ? 'neutral-black' : 'primary-lighter';\n }\n\n return this.selected ? 'neutral-purewhite' : 'primary-dark';\n }\n\n private updateDynamicStyles() {\n if (this.colorMode === 'dark' && this.hovered && !this.selected) {\n this.styles = {\n ...this.styles,\n '--border-bottom-color': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n };\n }\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n const iconColor = this.computeContentColor();\n\n return <cura-icon name={this.iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n getClasses() {\n return {\n [this.size]: true,\n [this.colorMode]: true,\n 'selected': this.selected,\n 'disabled': this.disabled,\n 'border-bottom': this.borderBottom,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'),\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this.selected = !this.selected;\n this.tabSelect.emit({ name: this.name });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n const labelColor = this.computeContentColor();\n this.updateDynamicStyles();\n\n return (\n <Host role=\"button\" aria-pressed={this.selected} aria-disabled={this.disabled}>\n <button\n class={this.getClasses()}\n style={this.styles}\n onClick={e => this.handleClick(e)}\n disabled={this.disabled}\n onMouseEnter={this.handleMouseEnter.bind(this)}\n onMouseLeave={this.handleMouseLeave.bind(this)}\n >\n {this.getIcon()}\n <cura-label size={labelSize} color={labelColor} lineHeight=\"0\" marginBlock=\"0\">\n <slot></slot>\n </cura-label>\n </button>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-tabs.js","sourceRoot":"","sources":["../../../../src/components/tabs/cura-tabs/cura-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAOtD,MAAM,OAAO,QAAQ;IALrB;QAQ0C,aAAQ,GAAY,KAAK,CAAC;QAC1B,aAAQ,GAAY,KAAK,CAAC;QAC1B,iBAAY,GAAY,IAAI,CAAC;QAC5C,SAAI,GAAiC,OAAO,CAAC;QAC9B,cA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W,CAAC,CAAC,CAAC,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC9C,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;gBAE7C,IAAI,CAAC,OAAO,EAAE;gBACf,mEAAY,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,EAAC,WAAW,EAAC,GAAG;oBAC5E,8DAAa,CACF,CACN,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { labelSizes } from '../cura-tabs.definitions';\n\n@Component({\n tag: 'cura-tabs',\n styleUrl: 'cura-tabs.scss',\n shadow: true,\n})\nexport class CuraTabs {\n @Prop({ reflect: true }) name: string;\n @Prop({ reflect: true }) iconName: string;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\n @Prop({ reflect: true, mutable: true }) borderBottom: boolean = true;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n @Prop({ reflect: true, mutable: true }) colorMode: 'dark' | 'light' = 'light';\n\n @State() hovered = false;\n @State() styles: Record<string, string> = {};\n\n @Event() tabSelect: EventEmitter<{ name: string }>;\n\n @Watch('colorMode')\n setColors() {\n const colors = [\n { name: '--background-color-selected', theme: this.colorMode === 'light' ? 'primary-base' : 'primary-lighter' },\n { name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-lighter' : null },\n {\n name: '--background-disabled-selected',\n theme: this.colorMode === 'light' ? 'neutral-pale' : 'neutral-black',\n },\n {\n name: '--border-bottom-color',\n theme: this.colorMode === 'light' ? 'neutral-base' : 'primary',\n },\n ];\n\n colors.forEach(c => {\n if (c.theme) this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);\n });\n\n this.styles = { ...this.styles };\n }\n\n computeContentColor(): string {\n if (this.disabled) return 'neutral-dark';\n\n if (this.colorMode === 'dark') {\n if (this.hovered && !this.selected) {\n return 'neutral-purewhite';\n }\n return this.selected ? 'neutral-black' : 'primary-lighter';\n }\n\n return this.selected ? 'neutral-purewhite' : 'primary-dark';\n }\n\n private updateDynamicStyles() {\n if (this.colorMode === 'dark' && this.hovered && !this.selected) {\n this.styles = {\n ...this.styles,\n '--border-bottom-color': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n };\n }\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n const iconColor = this.computeContentColor();\n\n return <cura-icon name={this.iconName} size={iconSize} color={iconColor}></cura-icon>;\n }\n\n getClasses() {\n return {\n [this.size]: true,\n [this.colorMode]: true,\n 'selected': this.selected,\n 'disabled': this.disabled,\n 'border-bottom': this.borderBottom,\n };\n }\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'),\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n handleClick(e: Event) {\n if (this.disabled) {\n e.preventDefault();\n return;\n }\n\n this.selected = !this.selected;\n this.tabSelect.emit({ name: this.name });\n }\n\n render() {\n const labelSize = labelSizes[this.size] || labelSizes['default'];\n const labelColor = this.computeContentColor();\n this.updateDynamicStyles();\n\n return (\n <Host role=\"button\" aria-pressed={this.selected} aria-disabled={this.disabled}>\n <button\n class={this.getClasses()}\n style={this.styles}\n onClick={e => this.handleClick(e)}\n disabled={this.disabled}\n onMouseEnter={this.handleMouseEnter.bind(this)}\n onMouseLeave={this.handleMouseLeave.bind(this)}\n >\n {this.getIcon()}\n <cura-label size={labelSize} color={labelColor} lineHeight=\"0\" marginBlock=\"0\">\n <slot></slot>\n </cura-label>\n </button>\n </Host>\n );\n }\n}\n"]}