@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,13 +1,13 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-21683715.js';
2
- import { f as formsSizes } from './cura-forms.definitions-2f963167.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-OdKytJIH.js';
2
+ import { f as formsSizes } from './cura-forms.definitions-Dot54hbB.js';
3
+ import './cura-theme-module-BPKQjAwN.js';
3
4
 
4
5
  const curaRadioCss = "@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0;}:host .container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);cursor:pointer}:host .position.container{flex-direction:row}:host .position .label-wrapper{justify-content:end}:host .position .message{text-align:right}:host .position .label{order:1}:host .label.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;min-width:0;max-width:100%}:host .info{display:flex;flex-direction:column;overflow:hidden}:host .label-wrapper{display:flex;justify-content:start;align-items:center;gap:5px}:host .control{width:fit-content;cursor:pointer;position:relative}:host .radio{margin:0;appearance:none;-webkit-appearance:none;-moz-appearance:none;border-radius:50%;border:2px solid var(--primary-base-neutral-medium);background:var(--neutral-purewhite);box-sizing:border-box;transition:border-color 0.3s;position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);flex:0 0 var(--size)}:host .radio::after{content:\"\";background:var(--color-base-light);border-radius:50%;opacity:0;transition:opacity 0.3s;width:var(--size-after);height:var(--size-after)}:host .radio:focus{border-color:var(--info-base) !important}:host .success .radio{border-color:var(--success-base);background:var(--success-lighter)}:host .success .radio:hover{border-color:var(--success-base) !important}:host .success.checked .radio{border-color:var(--success-base)}:host .success.checked .radio::after{background:var(--success-base)}:host .success.checked .radio:hover{background:var(--success-lighter) !important;border-color:var(--success-base) !important}:host .success.checked .radio:hover::after{background:var(--success-base) !important}:host .error .radio{border-color:var(--error-base);background:var(--error-lighter)}:host .error .radio:hover{border-color:var(--error-base) !important}:host .error.checked .radio{border-color:var(--error-base)}:host .error.checked .radio::after{background:var(--error-base)}:host .error.checked .radio:hover{background:var(--error-lighter) !important;border-color:var(--error-base) !important}:host .error.checked .radio:hover::after{background:var(--error-base) !important}:host .checked .radio::after{opacity:1;background:var(--color-base)}:host .checked .radio{border-color:var(--color-dark)}:host .checked .radio:hover{border-color:var(--color-light) !important}:host .checked .radio:hover::after{background:var(--color-light)}:host .disabled .radio{background:var(--primary-base-neutral-white);border-color:var(--primary-darker-neutral-base);cursor:not-allowed}:host .disabled .radio::after{background:var(--neutral-lighter)}:host .disabled.checked .radio{border-color:var(--primary-base-neutral-base) !important;background:var(--primary-darker-neutral-white) !important}:host .disabled.checked .radio::after{background:var(--primary-base-neutral-base) !important}:host :not(.disabled):not(.checked) .radio:hover{border-color:var(--primary-base-neutral-dark)}";
5
- const CuraRadioStyle0 = curaRadioCss;
6
6
 
7
7
  const CuraRadio = class {
8
8
  constructor(hostRef) {
9
9
  registerInstance(this, hostRef);
10
- this.onchange = createEvent(this, "onchange", 7);
10
+ this.onchange = createEvent(this, "onchange");
11
11
  if (hostRef.$hostElement$["s-ei"]) {
12
12
  this.internals = hostRef.$hostElement$["s-ei"];
13
13
  }
@@ -15,34 +15,87 @@ const CuraRadio = class {
15
15
  this.internals = hostRef.$hostElement$.attachInternals();
16
16
  hostRef.$hostElement$["s-ei"] = this.internals;
17
17
  }
18
- this.sizes = {
19
- large: { size: 20 },
20
- medium: { size: 14 },
21
- small: { size: 10 },
22
- };
23
- this.isDarkbackground = () => this.background === 'dark';
24
- this.handleClick = () => {
25
- if (this.disabled)
26
- return;
27
- this.checked = !this.checked;
28
- this.internals.setFormValue(this.value);
29
- this.onchange.emit({ value: this.value, checked: this.checked });
30
- };
18
+ /**
19
+ * Reflects the checked state of the radio button.
20
+ * Mutable property allowing state change.
21
+ */
31
22
  this.checked = false;
23
+ /**
24
+ * Status of the radio button.
25
+ * Can be 'error', 'success', or 'default'.
26
+ */
32
27
  this.status = 'default';
28
+ /**
29
+ * Reflects the disabled state of the radio button.
30
+ */
33
31
  this.disabled = false;
32
+ /**
33
+ * Reflects the required state of the radio button.
34
+ */
34
35
  this.required = false;
36
+ /**
37
+ * Text label associated with the radio button.
38
+ */
35
39
  this.label = '';
36
- this.ontabindex = undefined;
40
+ /**
41
+ * Position of the label relative to the radio button.
42
+ * Can be 'left' or 'right'.
43
+ */
37
44
  this.position = 'left';
45
+ /**
46
+ * Value associated with the radio button.
47
+ */
38
48
  this.value = '';
49
+ /**
50
+ * Name attribute of the radio button.
51
+ */
39
52
  this.name = '';
53
+ /**
54
+ * Background theme of the radio button.
55
+ * Can be 'dark' or 'light'.
56
+ */
40
57
  this.background = 'light';
58
+ /**
59
+ * Size of the radio button.
60
+ * Can be 'small', 'medium', or 'large'.
61
+ */
41
62
  this.size = 'medium';
63
+ /**
64
+ * Color theme of the radio button.
65
+ */
42
66
  this.color = 'accent';
67
+ /**
68
+ * Controls how the label text should handle overflow.
69
+ * - `'none'`: No overflow handling; the label displays normally.
70
+ * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
71
+ * - `string`: Custom overflow handling mode.
72
+ *
73
+ * @default 'none'
74
+ */
43
75
  this.overflowLabel = 'none';
76
+ /**
77
+ * Controls how the helper text should handle overflow.
78
+ * - `'none'`: No overflow handling; the label displays normally.
79
+ * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
80
+ * - `string`: Custom overflow handling mode.
81
+ *
82
+ * @default 'none'
83
+ */
44
84
  this.overflowHelper = 'none';
45
85
  this.styles = {};
86
+ this.sizes = {
87
+ large: { size: 20 },
88
+ medium: { size: 14 },
89
+ small: { size: 10 },
90
+ };
91
+ this.isDarkbackground = () => this.background === 'dark';
92
+ this.handleClick = () => {
93
+ if (this.disabled)
94
+ return;
95
+ this.checked = !this.checked;
96
+ this.internals.setFormValue(this.value);
97
+ this.onchange.emit({ value: this.value, checked: this.checked });
98
+ };
46
99
  }
47
100
  sizeHandler() {
48
101
  this.styles = Object.assign(Object.assign({}, this.styles), { '--size-after': `${this.sizes[this.size].size}px`, '--size': `${formsSizes[this.size].size}px`, '--gap': `${formsSizes[this.size].gap}px` });
@@ -145,8 +198,9 @@ const CuraRadio = class {
145
198
  "background": ["setColors", "assignColor"]
146
199
  }; }
147
200
  };
148
- CuraRadio.style = CuraRadioStyle0;
201
+ CuraRadio.style = curaRadioCss;
149
202
 
150
203
  export { CuraRadio as cura_radio };
204
+ //# sourceMappingURL=cura-radio.entry.js.map
151
205
 
152
206
  //# sourceMappingURL=cura-radio.entry.js.map
@@ -1 +1 @@
1
- {"file":"cura-radio.entry.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,0hGAA0hG,CAAC;AAChjG,wBAAe,YAAY;;MCQd,SAAS;;;;;;;;;;;QAmFpB,UAAK,GAAG;YACN,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YACnB,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;YACpB,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;SACpB,CAAC;QAEF,qBAAgB,GAAG,MAAM,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;QAgFpD,gBAAW,GAAG;YACZ,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAA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,GAAG,EAAE,EAAE,EAC9E,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,QAAQ,GAAG,QAAQ,EACjD,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAE/B,IAAI,CAAC,KAAK,CACA,EACZ,IAAI,CAAC,QAAQ,KACZ,uEAAgB,UAAU,EAAC,IAAI,EAAC,WAAW,EAAC,GAAG,EAAC,KAAK,EAAC,YAAY,SAC9D,GAAG,CACU,CAClB,CACG,EACN,mEAAY,YAAY,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,IAC9G,8DAAa,CACF,CACT,EACN,8DACE,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,EAC/C,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,GACrB,CACE,CACD,EACP;KACH;;;;;;;;;;;;;","names":[],"sources":["src/components/forms/cura-radio/cura-radio.scss?tag=cura-radio&encapsulation=shadow","src/components/forms/cura-radio/cura-radio.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n\n .container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n }\n\n .position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n }\n\n .label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n }\n\n .info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n .label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n }\n\n .control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n }\n\n .radio {\n margin: 0;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n border-radius: 50%;\n border: 2px solid var(--primary-base-neutral-medium);\n background: var(--neutral-purewhite);\n box-sizing: border-box;\n transition: border-color 0.3s;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n\n &::after {\n content: '';\n background: var(--color-base-light);\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.3s;\n width: var(--size-after);\n height: var(--size-after);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n /* Estado Success */\n .success .radio {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n }\n\n .success.checked .radio {\n border-color: var(--success-base);\n\n &::after {\n background: var(--success-base);\n }\n\n &:hover {\n background: var(--success-lighter) !important;\n border-color: var(--success-base) !important;\n\n &::after {\n background: var(--success-base) !important;\n }\n }\n }\n\n /* Estado Error */\n .error .radio {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n }\n\n .error.checked .radio {\n border-color: var(--error-base);\n\n &::after {\n background: var(--error-base);\n }\n\n &:hover {\n background: var(--error-lighter) !important;\n border-color: var(--error-base) !important;\n\n &::after {\n background: var(--error-base) !important;\n }\n }\n }\n\n /* Estado checked */\n .checked .radio::after {\n opacity: 1;\n background: var(--color-base);\n }\n\n .checked .radio {\n border-color: var(--color-dark);\n }\n\n .checked .radio:hover {\n border-color: var(--color-light) !important;\n }\n\n .checked .radio:hover::after {\n background: var(--color-light);\n }\n\n /* Estado disabled */\n .disabled .radio {\n background: var(--primary-base-neutral-white);\n border-color: var(--primary-darker-neutral-base);\n cursor: not-allowed;\n }\n\n .disabled .radio::after {\n background: var(--neutral-lighter);\n }\n\n .disabled.checked .radio {\n border-color: var(--primary-base-neutral-base) !important;\n background: var(--primary-darker-neutral-white) !important;\n }\n\n .disabled.checked .radio::after {\n background: var(--primary-base-neutral-base) !important;\n }\n\n /* Estado hover para não disabled e não checked */\n :not(.disabled):not(.checked) .radio:hover {\n border-color: var(--primary-base-neutral-dark);\n }\n}\n","import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-radio',\n styleUrl: 'cura-radio.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraRadio {\n /**\n * Reflects the checked state of the radio button.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Status of the radio button.\n * Can be 'error', 'success', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n /**\n * Reflects the disabled state of the radio button.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the radio button.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the radio button.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Specifies the tabindex of the radio button.\n */\n @Prop({ reflect: true }) ontabindex: number;\n /**\n * Position of the label relative to the radio button.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the radio button.\n */\n @Prop({ reflect: true }) value: string = '';\n /**\n * Name attribute of the radio button.\n */\n @Prop({ reflect: true }) name: string = '';\n /**\n * Background theme of the radio button.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Size of the radio button.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Color theme of the radio button.\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 @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string; checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 20 },\n medium: { size: 14 },\n small: { size: 10 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-after': `${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: '--color-light', background: `${this.color}-light` },\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--error-base', background: 'error-base' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },\n { name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },\n { name: '--primary-darker-neutral-base', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-base' },\n { name: '--primary-base-neutral-base', background: this.isDarkbackground() ? 'primary-base' : 'neutral-base' },\n { name: '--primary-base-neutral-dark', background: this.isDarkbackground() ? 'primary-base' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-dark', background: this.isDarkbackground() ? 'success-base' : 'success-dark' },\n { name: '--error-base-dark', background: this.isDarkbackground() ? 'error-base' : 'error-dark' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\n });\n this.styles = { ...this.styles };\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; checked: boolean }) {\n this.value = state.value;\n this.checked = state.checked;\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.value = '';\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.value);\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 connectedCallback() {\n this.sizeHandler();\n this.setColors();\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.value);\n this.onchange.emit({ value: this.value, checked: this.checked });\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 classes[this.status] = true;\n\n return classes;\n }\n\n @Watch('background')\n assignColor(type: 'label' | 'message') {\n if (this.disabled) return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';\n\n const statusColors = {\n success: {\n label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkbackground() ? 'success-base' : 'success-dark',\n },\n error: {\n label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkbackground() ? 'error-base' : 'error-dark',\n },\n default: {\n label: this.isDarkbackground() ? 'neutral-white' : 'neutral-black',\n message: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark',\n },\n };\n\n return statusColors[this.status][type];\n }\n\n render() {\n return (\n <Host role=\"radio\" aria-checked={this.checked} aria-disabled={this.disabled} aria-required={this.required} aria-invalid={this.status === 'error'}>\n <div class={this.getClasses()} style={this.styles} onClick={this.handleClick}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n textOverflow={this.overflowLabel}\n class={`label${this.overflowLabel === 'single' ? ' textoverflow-single' : ''}`}\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}\n >\n {this.label}\n </cura-label>\n {this.required && (\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\">\n *{' '}\n </cura-paragraph>\n )}\n </div>\n <cura-label textOverflow={this.overflowHelper} color={this.assignColor('message')} size=\"xsmall\" class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <input\n type=\"radio\"\n class={`radio ${this.size.toLocaleLowerCase()}`}\n name={this.name}\n value={this.value}\n required={this.required}\n tabIndex={this.ontabindex}\n disabled={this.disabled}\n checked={this.checked}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"version":3,"file":"cura-radio.entry.js","sources":["src/components/forms/cura-radio/cura-radio.scss?tag=cura-radio&encapsulation=shadow","src/components/forms/cura-radio/cura-radio.tsx"],"sourcesContent":["@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n\n .container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n\n cursor: pointer;\n }\n\n .position {\n &.container {\n flex-direction: row;\n }\n\n .label-wrapper {\n justify-content: end;\n }\n\n .message {\n text-align: right;\n }\n\n .label {\n order: 1;\n }\n }\n\n .label.textoverflow-single {\n @include truncate-single();\n min-width: 0;\n max-width: 100%;\n }\n\n .info {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n .label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n }\n\n .control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n }\n\n .radio {\n margin: 0;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n border-radius: 50%;\n border: 2px solid var(--primary-base-neutral-medium);\n background: var(--neutral-purewhite);\n box-sizing: border-box;\n transition: border-color 0.3s;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n width: var(--size);\n height: var(--size);\n flex: 0 0 var(--size);\n\n &::after {\n content: '';\n background: var(--color-base-light);\n border-radius: 50%;\n opacity: 0;\n transition: opacity 0.3s;\n width: var(--size-after);\n height: var(--size-after);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n /* Estado Success */\n .success .radio {\n border-color: var(--success-base);\n background: var(--success-lighter);\n\n &:hover {\n border-color: var(--success-base) !important;\n }\n }\n\n .success.checked .radio {\n border-color: var(--success-base);\n\n &::after {\n background: var(--success-base);\n }\n\n &:hover {\n background: var(--success-lighter) !important;\n border-color: var(--success-base) !important;\n\n &::after {\n background: var(--success-base) !important;\n }\n }\n }\n\n /* Estado Error */\n .error .radio {\n border-color: var(--error-base);\n background: var(--error-lighter);\n\n &:hover {\n border-color: var(--error-base) !important;\n }\n }\n\n .error.checked .radio {\n border-color: var(--error-base);\n\n &::after {\n background: var(--error-base);\n }\n\n &:hover {\n background: var(--error-lighter) !important;\n border-color: var(--error-base) !important;\n\n &::after {\n background: var(--error-base) !important;\n }\n }\n }\n\n /* Estado checked */\n .checked .radio::after {\n opacity: 1;\n background: var(--color-base);\n }\n\n .checked .radio {\n border-color: var(--color-dark);\n }\n\n .checked .radio:hover {\n border-color: var(--color-light) !important;\n }\n\n .checked .radio:hover::after {\n background: var(--color-light);\n }\n\n /* Estado disabled */\n .disabled .radio {\n background: var(--primary-base-neutral-white);\n border-color: var(--primary-darker-neutral-base);\n cursor: not-allowed;\n }\n\n .disabled .radio::after {\n background: var(--neutral-lighter);\n }\n\n .disabled.checked .radio {\n border-color: var(--primary-base-neutral-base) !important;\n background: var(--primary-darker-neutral-white) !important;\n }\n\n .disabled.checked .radio::after {\n background: var(--primary-base-neutral-base) !important;\n }\n\n /* Estado hover para não disabled e não checked */\n :not(.disabled):not(.checked) .radio:hover {\n border-color: var(--primary-base-neutral-dark);\n }\n}\n","import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State, AttachInternals } from '@stencil/core';\nimport { formsSizes } from '../cura-forms.definitions';\n\n@Component({\n tag: 'cura-radio',\n styleUrl: 'cura-radio.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraRadio {\n /**\n * Reflects the checked state of the radio button.\n * Mutable property allowing state change.\n */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n /**\n * Status of the radio button.\n * Can be 'error', 'success', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n /**\n * Reflects the disabled state of the radio button.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Reflects the required state of the radio button.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * Text label associated with the radio button.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Specifies the tabindex of the radio button.\n */\n @Prop({ reflect: true }) ontabindex: number;\n /**\n * Position of the label relative to the radio button.\n * Can be 'left' or 'right'.\n */\n @Prop({ reflect: true }) position: 'left' | 'right' = 'left';\n /**\n * Value associated with the radio button.\n */\n @Prop({ reflect: true }) value: string = '';\n /**\n * Name attribute of the radio button.\n */\n @Prop({ reflect: true }) name: string = '';\n /**\n * Background theme of the radio button.\n * Can be 'dark' or 'light'.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * Size of the radio button.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Color theme of the radio button.\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 @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string; checked: boolean }>;\n\n @AttachInternals() internals: ElementInternals;\n\n sizes = {\n large: { size: 20 },\n medium: { size: 14 },\n small: { size: 10 },\n };\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles = {\n ...this.styles,\n '--size-after': `${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: '--color-light', background: `${this.color}-light` },\n { name: '--color-base', background: `${this.color}-base` },\n { name: '--color-dark', background: `${this.color}-dark` },\n { name: '--neutral-purewhite', background: 'neutral-purewhite' },\n { name: '--success-lighter', background: 'success-lighter' },\n { name: '--success-base', background: 'success-base' },\n { name: '--error-lighter', background: 'error-lighter' },\n { name: '--error-base', background: 'error-base' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },\n { name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },\n { name: '--primary-darker-neutral-base', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-base' },\n { name: '--primary-base-neutral-base', background: this.isDarkbackground() ? 'primary-base' : 'neutral-base' },\n { name: '--primary-base-neutral-dark', background: this.isDarkbackground() ? 'primary-base' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--success-base-dark', background: this.isDarkbackground() ? 'success-base' : 'success-dark' },\n { name: '--error-base-dark', background: this.isDarkbackground() ? 'error-base' : 'error-dark' },\n ];\n\n colors.forEach(color => {\n this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background);\n });\n this.styles = { ...this.styles };\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; checked: boolean }) {\n this.value = state.value;\n this.checked = state.checked;\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.value = '';\n this.checked = false;\n this.internals.setValidity({});\n this.internals.setFormValue(this.value);\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 connectedCallback() {\n this.sizeHandler();\n this.setColors();\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.checked = !this.checked;\n this.internals.setFormValue(this.value);\n this.onchange.emit({ value: this.value, checked: this.checked });\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 classes[this.status] = true;\n\n return classes;\n }\n\n @Watch('background')\n assignColor(type: 'label' | 'message') {\n if (this.disabled) return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';\n\n const statusColors = {\n success: {\n label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',\n message: this.isDarkbackground() ? 'success-base' : 'success-dark',\n },\n error: {\n label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',\n message: this.isDarkbackground() ? 'error-base' : 'error-dark',\n },\n default: {\n label: this.isDarkbackground() ? 'neutral-white' : 'neutral-black',\n message: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark',\n },\n };\n\n return statusColors[this.status][type];\n }\n\n render() {\n return (\n <Host role=\"radio\" aria-checked={this.checked} aria-disabled={this.disabled} aria-required={this.required} aria-invalid={this.status === 'error'}>\n <div class={this.getClasses()} style={this.styles} onClick={this.handleClick}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n textOverflow={this.overflowLabel}\n class={`label${this.overflowLabel === 'single' ? ' textoverflow-single' : ''}`}\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}\n >\n {this.label}\n </cura-label>\n {this.required && (\n <cura-paragraph lineHeight=\"0%\" marginBlock=\"0\" color=\"error-base\">\n *{' '}\n </cura-paragraph>\n )}\n </div>\n <cura-label textOverflow={this.overflowHelper} color={this.assignColor('message')} size=\"xsmall\" class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n <input\n type=\"radio\"\n class={`radio ${this.size.toLocaleLowerCase()}`}\n name={this.name}\n value={this.value}\n required={this.required}\n tabIndex={this.ontabindex}\n disabled={this.disabled}\n checked={this.checked}\n />\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;AAAA,MAAM,YAAY,GAAG,0hGAA0hG;;MCSliG,SAAS,GAAA,MAAA;AANtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;;;;;AAOE;;;AAGG;AACqC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAChE;;;AAGG;AACqC,QAAA,IAAM,CAAA,MAAA,GAAoC,SAAS;AAC3F;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAClD;;AAEG;AACsB,QAAA,IAAQ,CAAA,Q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,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,CAAA,CACE,CACD;;;;;;;;;;;;;;"}
@@ -1,17 +1,35 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-21683715.js';
1
+ import { r as registerInstance, h, H as Host, a as getElement } from './index-OdKytJIH.js';
2
+ import './cura-theme-module-BPKQjAwN.js';
2
3
 
3
4
  const curaStepperCss = ":host{display:block;box-sizing:border-box;width:100%}cura-heading{--margin-block:0 !important}.container{display:flex}.compact{display:flex;padding:0px;justify-content:space-between;align-items:center}.compact .heading{text-align:right}.stepper-list{gap:4px;display:flex;flex-shrink:0;align-items:center;padding:0;flex:1;width:100%;justify-content:space-between}.step{display:flex;align-items:center;flex-direction:row;flex:1;gap:4px}.step .wrapper{flex:1;position:relative}.step .divider{background-color:var(--neutral-light);height:2px;flex:1;transition:all 1s}.step .animation{position:absolute;top:0;left:0;right:0;width:var(--progress-width)}.step .done{background-color:var(--success-light)}.step .stop{background-color:var(--error-light)}.step .active{background-color:var(--info-light)}.last{flex:0}";
4
- const CuraStepperStyle0 = curaStepperCss;
5
5
 
6
6
  const CuraStepper = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
- this.activeStepIndex = undefined;
9
+ /**
10
+ * Indicates if a step has encountered an error
11
+ * If `true`, the current step will be marked as 'stop'
12
+ */
10
13
  this.errorInCurrentStep = false;
14
+ /**
15
+ * Whether to display the title (default: false)
16
+ */
11
17
  this.displayHeading = false;
18
+ /**
19
+ * Allows you to set the appearance of the component (default: default)
20
+ */
12
21
  this.variant = 'default';
22
+ /**
23
+ * List of steps in the stepper.
24
+ */
13
25
  this.steps = [];
14
26
  this.styles = {};
27
+ /**
28
+ * Array of steps in the stepper.
29
+ *
30
+ * @type {Date[]}
31
+ * @default []
32
+ */
15
33
  this.stepList = [];
16
34
  }
17
35
  connectedCallback() {
@@ -112,8 +130,9 @@ const CuraStepper = class {
112
130
  }
113
131
  get host() { return getElement(this); }
114
132
  };
115
- CuraStepper.style = CuraStepperStyle0;
133
+ CuraStepper.style = curaStepperCss;
116
134
 
117
135
  export { CuraStepper as cura_stepper };
136
+ //# sourceMappingURL=cura-stepper.entry.js.map
118
137
 
119
138
  //# sourceMappingURL=cura-stepper.entry.js.map
@@ -1 +1 @@
1
- {"file":"cura-stepper.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,yyBAAyyB,CAAC;AACj0B,0BAAe,cAAc;;MCOhB,WAAW;;;;kCAUiC,KAAK;8BAKT,KAAK;uBAKE,SAAS;qBAKlC,EAAE;sBAMjB,EAAE;wBAQQ,EAAE;;IAE9B,iBAAiB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;QAEvB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QACxD,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QAEnC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;KACpE;IAED,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO;QAC5C,OAAO;YACL,gBAAgB,EAAE,OAAO,CAAC,UAAU,EAAE;YACtC,qBAAqB,EAAE,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YAC3D,mBAAmB,EAAE,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YACvD,gBAAgB,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC;YACjD,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;YACnD,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;YACnD,cAAc,EAAE,MAAM,CAAC,QAA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AAC,KAAK,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,GAAsB,EACvI,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,KACnC,WAAK,KAAK,EAAC,SAAS,IAClB,WAAK,KAAK,EAAC,SAAS,GAAG,EACvB,WAAK,KAAK,EAAE,WAAW,UAAU,YAAY,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,aAAa,EAAE,GAAI,CAC3F,CACP,CACG,EACN;KACH;IACD,aAAa;QACX,QACE,WAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IACvC,WAAK,KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAO,CACtG,EACN;KACH;IAED,MAAM;QACJ,OAAO,EAAC,IAAI,uDAAE,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAQ,CAAC;KACvG;;;;;;;","names":[],"sources":["src/components/cura-stepper/cura-stepper.scss?tag=cura-stepper&encapsulation=shadow","src/components/cura-stepper/cura-stepper.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n width: 100%;\n}\n\ncura-heading { \n --margin-block: 0 !important;\n}\n\n.container {\n display: flex;\n}\n\n.compact {\n display: flex;\n padding: 0px;\n justify-content: space-between;\n align-items: center;\n\n .heading{\n text-align: right;\n }\n}\n\n.stepper-list {\n gap: 4px;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n padding: 0;\n flex: 1;\n width: 100%;\n justify-content: space-between;\n}\n\n.step{\n display: flex;\n align-items: center;\n flex-direction: row;\n flex: 1;\n gap: 4px;\n\n .wrapper {\n flex: 1;\n position: relative;\n }\n\n .divider{\n background-color: var(--neutral-light);\n height: 2px;\n flex: 1;\n\n transition: all 1s;\n }\n\n .animation {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n width: var(--progress-width);\n }\n\n .done{\n background-color: var(--success-light);\n }\n\n .stop{\n background-color: var(--error-light);\n }\n\n .active{\n background-color: var(--info-light);\n }\n}\n\n.last{\n flex: 0;\n}\n","import { Component, Host, State, h, Element, Prop } from '@stencil/core';\nimport { Step } from './stepper.type';\n\n@Component({\n tag: 'cura-stepper',\n styleUrl: 'cura-stepper.scss',\n shadow: true,\n})\nexport class CuraStepper {\n /**\n * The current active step index\n */\n @Prop({ reflect: true }) activeStepIndex: number;\n\n /**\n * Indicates if a step has encountered an error\n * If `true`, the current step will be marked as 'stop'\n */\n @Prop({ reflect: true }) errorInCurrentStep: boolean = false;\n\n /**\n * Whether to display the title (default: false)\n */\n @Prop({ reflect: true }) displayHeading: boolean = false;\n\n /**\n * Allows you to set the appearance of the component (default: default)\n */\n @Prop({ reflect: true }) variant: 'compact' | 'default' = 'default';\n\n /**\n * List of steps in the stepper.\n */\n @Prop() steps: Step[] | string = [];\n /**\n * Reference to the host element.\n */\n @Element() host: HTMLElement;\n\n @State() styles = {};\n\n /**\n * Array of steps in the stepper.\n *\n * @type {Date[]}\n * @default []\n */\n @State() stepList: Step[] = [];\n\n connectedCallback() {\n this.initializeSteps();\n\n const { fonts, colors, spacing } = window.CuraAPI.theme;\n const weights = fonts.getWeights();\n\n this.styles = this.generateStyles(colors, fonts, spacing, weights);\n }\n\n generateStyles(colors, fonts, spacing, weights) {\n return {\n '--base-spacing': spacing.getSpacing(),\n '--neutral-purewhite': colors.getColor('neutral-purewhite'),\n '--neutral-lighter': colors.getColor('neutral-lighter'),\n '--neutral-base': colors.getColor('neutral-base'),\n '--neutral-light': colors.getColor('neutral-light'),\n '--success-light': colors.getColor('success-light'),\n '--info-light': colors.getColor('info-light'),\n '--error-light': colors.getColor('error-light'),\n '--font-size': fonts.getSize(),\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-weight-regular': weights.regular,\n };\n }\n\n initializeSteps() {\n if (typeof this.steps === 'string') {\n this.stepList = JSON.parse(this.steps || '[]');\n } else {\n this.stepList = this.steps;\n }\n }\n\n getStepStatus(step: number): 'done' | 'stop' | 'active' | 'default' {\n if (this.activeStepIndex === step && this.errorInCurrentStep) return 'stop';\n if (this.activeStepIndex === step && this.stepList.length !== step) return 'active';\n if (this.activeStepIndex >= step) return 'done';\n\n return 'default';\n }\n\n getProgressStyles() {\n const progressStyles = {\n default: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'info-darker',\n nextStepTextColor: 'info-dark',\n },\n firstStep: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'neutral-dark',\n nextStepTextColor: 'neutral-medium',\n },\n completed: {\n progressColor: 'var(--success-light)',\n activeStepTextColor: 'success-darker',\n nextStepTextColor: 'success-dark',\n },\n error: {\n progressColor: 'var(--error-light)',\n activeStepTextColor: 'error-darker',\n nextStepTextColor: 'error-dark',\n },\n };\n\n if (this.errorInCurrentStep) {\n return progressStyles.error;\n }\n\n if (this.activeStepIndex === 0) {\n return progressStyles.firstStep;\n }\n\n if (this.activeStepIndex === this.stepList.length) {\n return progressStyles.completed;\n }\n\n return progressStyles.default;\n }\n\n renderCompactStepper() {\n const title = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex].title : this.stepList[this.activeStepIndex - 1].title;\n const subtitle = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex + 1].title : this.stepList[this.activeStepIndex]?.title;\n const completed = this.activeStepIndex === this.stepList.length;\n const inProgress = !(completed || this.errorInCurrentStep);\n const { progressColor, activeStepTextColor, nextStepTextColor } = this.getProgressStyles();\n\n // Representa a porcentagem de progresso (step atual / quantidade de steps;)\n const progress = (this.activeStepIndex * 100) / this.stepList.length;\n\n return (\n <div class=\"container compact\" style={this.styles}>\n <cura-progress-bar progress={progress} progressColor={progressColor} active={this.activeStepIndex !== 0}>\n {!inProgress ? (\n <cura-icon name={this.errorInCurrentStep ? 'alertCircle' : 'checkCircle'} color={this.errorInCurrentStep ? 'error-dark' : 'success-dark'} size=\"16\"></cura-icon>\n ) : (\n <cura-heading color=\"neutral-dark\" size=\"xsmall\">\n {this.activeStepIndex}/{this.stepList.length}\n </cura-heading>\n )}\n </cura-progress-bar>\n {this.displayHeading && (\n <div class=\"heading\">\n <cura-heading size=\"small\" weight=\"bold\" color={activeStepTextColor}>\n {title}\n </cura-heading>\n {!completed && (\n <cura-heading size=\"xsmall\" weight=\"regular\" color={nextStepTextColor}>\n Próximo: {subtitle}\n </cura-heading>\n )}\n </div>\n )}\n </div>\n );\n }\n\n renderStep(step: Step, stepIndex: number) {\n const stepStatus = this.getStepStatus(stepIndex + 1);\n const lastStep = stepIndex === this.stepList.length - 1;\n const progressWidth = stepStatus !== 'default' ? '100%' : '0';\n\n return (\n <div class={`step ${lastStep ? 'last' : ''}`} key={step.title}>\n <cura-stepper-item heading={step.title} label={step.label} displayHeading={this.displayHeading} status={stepStatus}></cura-stepper-item>\n {stepIndex < this.stepList.length - 1 && (\n <div class=\"wrapper\">\n <div class=\"divider\" />\n <div class={`divider ${stepStatus} animation`} style={{ '--progress-width': progressWidth }} />\n </div>\n )}\n </div>\n );\n }\n renderStepper() {\n return (\n <div class=\"container\" style={this.styles}>\n <div class=\"stepper-list\">{this.stepList.map((step, stepIndex) => this.renderStep(step, stepIndex))}</div>\n </div>\n );\n }\n\n render() {\n return <Host>{this.variant === 'default' ? this.renderStepper() : this.renderCompactStepper()}</Host>;\n }\n}\n"],"version":3}
1
+ {"version":3,"file":"cura-stepper.entry.js","sources":["src/components/cura-stepper/cura-stepper.scss?tag=cura-stepper&encapsulation=shadow","src/components/cura-stepper/cura-stepper.tsx"],"sourcesContent":[":host {\n display: block;\n box-sizing: border-box;\n width: 100%;\n}\n\ncura-heading { \n --margin-block: 0 !important;\n}\n\n.container {\n display: flex;\n}\n\n.compact {\n display: flex;\n padding: 0px;\n justify-content: space-between;\n align-items: center;\n\n .heading{\n text-align: right;\n }\n}\n\n.stepper-list {\n gap: 4px;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n padding: 0;\n flex: 1;\n width: 100%;\n justify-content: space-between;\n}\n\n.step{\n display: flex;\n align-items: center;\n flex-direction: row;\n flex: 1;\n gap: 4px;\n\n .wrapper {\n flex: 1;\n position: relative;\n }\n\n .divider{\n background-color: var(--neutral-light);\n height: 2px;\n flex: 1;\n\n transition: all 1s;\n }\n\n .animation {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n width: var(--progress-width);\n }\n\n .done{\n background-color: var(--success-light);\n }\n\n .stop{\n background-color: var(--error-light);\n }\n\n .active{\n background-color: var(--info-light);\n }\n}\n\n.last{\n flex: 0;\n}\n","import { Component, Host, State, h, Element, Prop } from '@stencil/core';\nimport { Step } from './stepper.type';\n\n@Component({\n tag: 'cura-stepper',\n styleUrl: 'cura-stepper.scss',\n shadow: true,\n})\nexport class CuraStepper {\n /**\n * The current active step index\n */\n @Prop({ reflect: true }) activeStepIndex: number;\n\n /**\n * Indicates if a step has encountered an error\n * If `true`, the current step will be marked as 'stop'\n */\n @Prop({ reflect: true }) errorInCurrentStep: boolean = false;\n\n /**\n * Whether to display the title (default: false)\n */\n @Prop({ reflect: true }) displayHeading: boolean = false;\n\n /**\n * Allows you to set the appearance of the component (default: default)\n */\n @Prop({ reflect: true }) variant: 'compact' | 'default' = 'default';\n\n /**\n * List of steps in the stepper.\n */\n @Prop() steps: Step[] | string = [];\n /**\n * Reference to the host element.\n */\n @Element() host: HTMLElement;\n\n @State() styles = {};\n\n /**\n * Array of steps in the stepper.\n *\n * @type {Date[]}\n * @default []\n */\n @State() stepList: Step[] = [];\n\n connectedCallback() {\n this.initializeSteps();\n\n const { fonts, colors, spacing } = window.CuraAPI.theme;\n const weights = fonts.getWeights();\n\n this.styles = this.generateStyles(colors, fonts, spacing, weights);\n }\n\n generateStyles(colors, fonts, spacing, weights) {\n return {\n '--base-spacing': spacing.getSpacing(),\n '--neutral-purewhite': colors.getColor('neutral-purewhite'),\n '--neutral-lighter': colors.getColor('neutral-lighter'),\n '--neutral-base': colors.getColor('neutral-base'),\n '--neutral-light': colors.getColor('neutral-light'),\n '--success-light': colors.getColor('success-light'),\n '--info-light': colors.getColor('info-light'),\n '--error-light': colors.getColor('error-light'),\n '--font-size': fonts.getSize(),\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-weight-regular': weights.regular,\n };\n }\n\n initializeSteps() {\n if (typeof this.steps === 'string') {\n this.stepList = JSON.parse(this.steps || '[]');\n } else {\n this.stepList = this.steps;\n }\n }\n\n getStepStatus(step: number): 'done' | 'stop' | 'active' | 'default' {\n if (this.activeStepIndex === step && this.errorInCurrentStep) return 'stop';\n if (this.activeStepIndex === step && this.stepList.length !== step) return 'active';\n if (this.activeStepIndex >= step) return 'done';\n\n return 'default';\n }\n\n getProgressStyles() {\n const progressStyles = {\n default: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'info-darker',\n nextStepTextColor: 'info-dark',\n },\n firstStep: {\n progressColor: 'var(--info-light)',\n activeStepTextColor: 'neutral-dark',\n nextStepTextColor: 'neutral-medium',\n },\n completed: {\n progressColor: 'var(--success-light)',\n activeStepTextColor: 'success-darker',\n nextStepTextColor: 'success-dark',\n },\n error: {\n progressColor: 'var(--error-light)',\n activeStepTextColor: 'error-darker',\n nextStepTextColor: 'error-dark',\n },\n };\n\n if (this.errorInCurrentStep) {\n return progressStyles.error;\n }\n\n if (this.activeStepIndex === 0) {\n return progressStyles.firstStep;\n }\n\n if (this.activeStepIndex === this.stepList.length) {\n return progressStyles.completed;\n }\n\n return progressStyles.default;\n }\n\n renderCompactStepper() {\n const title = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex].title : this.stepList[this.activeStepIndex - 1].title;\n const subtitle = this.activeStepIndex === 0 ? this.stepList[this.activeStepIndex + 1].title : this.stepList[this.activeStepIndex]?.title;\n const completed = this.activeStepIndex === this.stepList.length;\n const inProgress = !(completed || this.errorInCurrentStep);\n const { progressColor, activeStepTextColor, nextStepTextColor } = this.getProgressStyles();\n\n // Representa a porcentagem de progresso (step atual / quantidade de steps;)\n const progress = (this.activeStepIndex * 100) / this.stepList.length;\n\n return (\n <div class=\"container compact\" style={this.styles}>\n <cura-progress-bar progress={progress} progressColor={progressColor} active={this.activeStepIndex !== 0}>\n {!inProgress ? (\n <cura-icon name={this.errorInCurrentStep ? 'alertCircle' : 'checkCircle'} color={this.errorInCurrentStep ? 'error-dark' : 'success-dark'} size=\"16\"></cura-icon>\n ) : (\n <cura-heading color=\"neutral-dark\" size=\"xsmall\">\n {this.activeStepIndex}/{this.stepList.length}\n </cura-heading>\n )}\n </cura-progress-bar>\n {this.displayHeading && (\n <div class=\"heading\">\n <cura-heading size=\"small\" weight=\"bold\" color={activeStepTextColor}>\n {title}\n </cura-heading>\n {!completed && (\n <cura-heading size=\"xsmall\" weight=\"regular\" color={nextStepTextColor}>\n Próximo: {subtitle}\n </cura-heading>\n )}\n </div>\n )}\n </div>\n );\n }\n\n renderStep(step: Step, stepIndex: number) {\n const stepStatus = this.getStepStatus(stepIndex + 1);\n const lastStep = stepIndex === this.stepList.length - 1;\n const progressWidth = stepStatus !== 'default' ? '100%' : '0';\n\n return (\n <div class={`step ${lastStep ? 'last' : ''}`} key={step.title}>\n <cura-stepper-item heading={step.title} label={step.label} displayHeading={this.displayHeading} status={stepStatus}></cura-stepper-item>\n {stepIndex < this.stepList.length - 1 && (\n <div class=\"wrapper\">\n <div class=\"divider\" />\n <div class={`divider ${stepStatus} animation`} style={{ '--progress-width': progressWidth }} />\n </div>\n )}\n </div>\n );\n }\n renderStepper() {\n return (\n <div class=\"container\" style={this.styles}>\n <div class=\"stepper-list\">{this.stepList.map((step, stepIndex) => this.renderStep(step, stepIndex))}</div>\n </div>\n );\n }\n\n render() {\n return <Host>{this.variant === 'default' ? this.renderStepper() : this.renderCompactStepper()}</Host>;\n }\n}\n"],"names":[],"mappings":";;;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AA;AACJ,QAAA,OAAO,CAAA,CAAC,IAAI,EAAE,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAQ;;;;;;;;"}
@@ -1,13 +1,13 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-21683715.js';
2
- import { f as formsSizes } from './cura-forms.definitions-2f963167.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-OdKytJIH.js';
2
+ import { f as formsSizes } from './cura-forms.definitions-Dot54hbB.js';
3
+ import './cura-theme-module-BPKQjAwN.js';
3
4
 
4
5
  const curaSwitchCss = "@charset \"UTF-8\";:host{display:block;box-sizing:border-box;min-width:0}.container{display:flex;align-items:center;flex-direction:row-reverse;justify-content:start;gap:var(--gap);text-align:left;cursor:pointer}.position{flex-direction:row}.info{overflow:hidden}.label,.message{text-align:left}.control{width:fit-content}.track{background:var(--neutral-dark-base);border-radius:16px;transition:background-color 0.3s;align-items:flex-start;flex-shrink:0;box-sizing:border-box;width:var(--size-track);height:var(--size);position:relative}.thumb{background:var(--neutral-purewhite);border:2px solid var(--neutral-darker-medium);border-radius:50%;position:absolute;transition:transform 0.3s, outline 0.3s;display:inline-block;cursor:pointer;user-select:none;box-sizing:border-box;width:var(--size);height:var(--size);top:50%;transform:translateY(-50%)}.checked .thumb{border-color:var(--color-dark);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));background:var(--neutral-purewhite);transform:translateX(var(--size)) translateY(-50%)}.checked .thumb:hover{background:var(--neutral-pale) !important;border-color:var(--neutral-darker-medium) !important}.checked .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}.checked .track{background:var(--color-base-light)}.disabled .track{background:var(--neutral-black-neutral-pale)}.disabled .thumb{background:var(--neutral-black-neutral-base) !important;border-color:var(--neutral-black-neutral-pale) !important;cursor:not-allowed}.disabled.checked .track{background:var(--neutral-black-neutral-pale)}.container.disabled .thumb:focus{outline:none !important;border-color:var(--neutral-black-neutral-pale) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled):not(.checked) .thumb:active{border-color:var(--color-dark);background:var(--neutral-pale)}:not(.disabled) .thumb:focus{outline:2px solid var(--info-base) !important;border:2px solid var(--neutral-darker-medium);z-index:1}:not(.disabled) .checked .thumb:focus{outline:2px solid var(--info-base) !important;border-color:var(--color-dark)}";
5
- const CuraSwitchStyle0 = curaSwitchCss;
6
6
 
7
7
  const CuraSwitch = class {
8
8
  constructor(hostRef) {
9
9
  registerInstance(this, hostRef);
10
- this.onchange = createEvent(this, "onchange", 7);
10
+ this.onchange = createEvent(this, "onchange");
11
11
  if (hostRef.$hostElement$["s-ei"]) {
12
12
  this.internals = hostRef.$hostElement$["s-ei"];
13
13
  }
@@ -15,6 +15,61 @@ const CuraSwitch = class {
15
15
  this.internals = hostRef.$hostElement$.attachInternals();
16
16
  hostRef.$hostElement$["s-ei"] = this.internals;
17
17
  }
18
+ /**
19
+ * Indicates whether the switch is checked or not.
20
+ */
21
+ this.checked = false;
22
+ /**
23
+ * Indicates whether the switch is disabled or not.
24
+ */
25
+ this.disabled = false;
26
+ /**
27
+ * The label text to display next to the switch.
28
+ */
29
+ this.label = '';
30
+ /**
31
+ * Tab index for the switch element.
32
+ * Reflects as an HTML attribute.
33
+ */
34
+ this.ontabindex = 0;
35
+ /**
36
+ * Position of the label relative to the switch.
37
+ * Can be 'left' or 'right'.
38
+ */
39
+ this.position = 'left';
40
+ /**
41
+ * Size of the switch.
42
+ * Can be 'small', 'medium', or 'large'.
43
+ */
44
+ this.size = 'medium';
45
+ /**
46
+ * Background style of the switch.
47
+ * Can be 'dark' or 'light'.
48
+ */
49
+ this.background = 'light';
50
+ /**
51
+ * Accent color of the switch.
52
+ */
53
+ this.color = 'accent';
54
+ /**
55
+ * Controls how the label text should handle overflow.
56
+ * - `'none'`: No overflow handling; the label displays normally.
57
+ * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
58
+ * - `string`: Custom overflow handling mode.
59
+ *
60
+ * @default 'none'
61
+ */
62
+ this.overflowLabel = 'none';
63
+ /**
64
+ * Controls how the helper text should handle overflow.
65
+ * - `'none'`: No overflow handling; the label displays normally.
66
+ * - `'single'`: The label will be truncated with an ellipsis if it overflows a single line.
67
+ * - `string`: Custom overflow handling mode.
68
+ *
69
+ * @default 'none'
70
+ */
71
+ this.overflowHelper = 'none';
72
+ this.styles = {};
18
73
  this.sizes = {
19
74
  large: { size: 64 },
20
75
  medium: { size: 48 },
@@ -28,17 +83,6 @@ const CuraSwitch = class {
28
83
  this.internals.setFormValue(this.checked.toString());
29
84
  this.onchange.emit({ checked: this.checked });
30
85
  };
31
- this.checked = false;
32
- this.disabled = false;
33
- this.label = '';
34
- this.ontabindex = 0;
35
- this.position = 'left';
36
- this.size = 'medium';
37
- this.background = 'light';
38
- this.color = 'accent';
39
- this.overflowLabel = 'none';
40
- this.overflowHelper = 'none';
41
- this.styles = {};
42
86
  }
43
87
  sizeHandler() {
44
88
  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` });
@@ -116,8 +160,9 @@ const CuraSwitch = class {
116
160
  "background": ["setColors"]
117
161
  }; }
118
162
  };
119
- CuraSwitch.style = CuraSwitchStyle0;
163
+ CuraSwitch.style = curaSwitchCss;
120
164
 
121
165
  export { CuraSwitch as cura_switch };
166
+ //# sourceMappingURL=cura-switch.entry.js.map
122
167
 
123
168
  //# sourceMappingURL=cura-switch.entry.js.map
@@ -1 +1 @@
1
- {"file":"cura-switch.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,0nEAA0nE,CAAC;AACjpE,yBAAe,aAAa;;MCQf,UAAU;;;;;;;;;;;QAgErB,UAAK,GAAG;YACN,KAAK,EAAE,EAAE,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AAC,QAAQ,IAC1E,4DAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,IAC3E,4DAAK,KAAK,EAAC,MAAM,IACf,mEACE,YAAY,EAAE,IAAI,CAAC,aAAa,EAChC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,OAAO,GAAG,MAAM,EAAE,EAClE,KAAK,EAAC,OAAO,EACb,MAAM,EAAC,MAAM,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,QAAQ,GAAG,QAAQ,EACjD,UAAU,EAAC,MAAM,EACjB,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,IAExD,IAAI,CAAC,KAAK,CACA,EACb,mEACE,YAAY,EAAE,IAAI,CAAC,cAAc,EACjC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,KAAK,OAAO,GAAG,OAAO,GAAG,MAAM,EAAE,EAClE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,IAEf,8DAAa,CACF,CACT,EAEN,4DAAK,KAAK,EAAC,SAAS,IAClB,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAC5C,4DAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAQ,CAC7E,CACF,CACF,CACD,EACP;KACH;;;;;;;;;;;;","names":[],"sources":["src/components/forms/cura-switch/cura-switch.scss?tag=cura-switch&encapsulation=shadow","src/components/forms/cura-switch/cura-switch.tsx"],"sourcesContent":["@import '../../../../src/scss/mixins/shadows.scss';\n@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n}\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n text-align: left;\n\n cursor: pointer;\n}\n\n.position {\n flex-direction: row;\n}\n\n.info {\n overflow: hidden;\n}\n\n.label,\n.message {\n text-align: left;\n}\n\n.control {\n width: fit-content;\n}\n\n/* Estilos para o controle de switch */\n.track {\n background: var(--neutral-dark-base);\n border-radius: 16px;\n transition: background-color 0.3s;\n align-items: flex-start;\n flex-shrink: 0;\n box-sizing: border-box;\n width: var(--size-track);\n height: var(--size);\n position: relative;\n}\n\n.thumb {\n background: var(--neutral-purewhite);\n border: 2px solid var(--neutral-darker-medium);\n border-radius: 50%;\n\n position: absolute;\n transition: transform 0.3s, outline 0.3s;\n display: inline-block;\n cursor: pointer;\n user-select: none;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* Estado \"checked\" */\n.checked .thumb {\n border-color: var(--color-dark);\n @include shadow-level3(--neutral-black-shadow);\n background: var(--neutral-purewhite);\n transform: translateX(var(--size)) translateY(-50%);\n}\n\n.checked .thumb:hover {\n background: var(--neutral-pale) !important;\n border-color: var(--neutral-darker-medium) !important;\n}\n\n.checked .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n.checked .track {\n background: var(--color-base-light);\n}\n\n/* Estado \"disabled\" */\n.disabled .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.disabled .thumb {\n background: var(--neutral-black-neutral-base) !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n cursor: not-allowed;\n}\n\n.disabled.checked .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.container.disabled .thumb:focus {\n outline: none !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n}\n\n/* Estado hover para não disabled e não checked */\n:not(.disabled):not(.checked) .thumb:hover {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n:not(.disabled):not(.checked) .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n/* Estado hover para não disabled */\n:not(.disabled) .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border: 2px solid var(--neutral-darker-medium);\n z-index: 1;\n}\n\n:not(.disabled) .checked .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border-color: var(--color-dark);\n}\n","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"],"version":3}
1
+ {"version":3,"file":"cura-switch.entry.js","sources":["src/components/forms/cura-switch/cura-switch.scss?tag=cura-switch&encapsulation=shadow","src/components/forms/cura-switch/cura-switch.tsx"],"sourcesContent":["@import '../../../../src/scss/mixins/shadows.scss';\n@import '../../../scss/mixins/text.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n\n min-width: 0;\n}\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n justify-content: start;\n gap: var(--gap);\n text-align: left;\n\n cursor: pointer;\n}\n\n.position {\n flex-direction: row;\n}\n\n.info {\n overflow: hidden;\n}\n\n.label,\n.message {\n text-align: left;\n}\n\n.control {\n width: fit-content;\n}\n\n/* Estilos para o controle de switch */\n.track {\n background: var(--neutral-dark-base);\n border-radius: 16px;\n transition: background-color 0.3s;\n align-items: flex-start;\n flex-shrink: 0;\n box-sizing: border-box;\n width: var(--size-track);\n height: var(--size);\n position: relative;\n}\n\n.thumb {\n background: var(--neutral-purewhite);\n border: 2px solid var(--neutral-darker-medium);\n border-radius: 50%;\n\n position: absolute;\n transition: transform 0.3s, outline 0.3s;\n display: inline-block;\n cursor: pointer;\n user-select: none;\n box-sizing: border-box;\n width: var(--size);\n height: var(--size);\n top: 50%;\n transform: translateY(-50%);\n}\n\n/* Estado \"checked\" */\n.checked .thumb {\n border-color: var(--color-dark);\n @include shadow-level3(--neutral-black-shadow);\n background: var(--neutral-purewhite);\n transform: translateX(var(--size)) translateY(-50%);\n}\n\n.checked .thumb:hover {\n background: var(--neutral-pale) !important;\n border-color: var(--neutral-darker-medium) !important;\n}\n\n.checked .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n.checked .track {\n background: var(--color-base-light);\n}\n\n/* Estado \"disabled\" */\n.disabled .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.disabled .thumb {\n background: var(--neutral-black-neutral-base) !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n cursor: not-allowed;\n}\n\n.disabled.checked .track {\n background: var(--neutral-black-neutral-pale);\n}\n\n.container.disabled .thumb:focus {\n outline: none !important;\n border-color: var(--neutral-black-neutral-pale) !important;\n}\n\n/* Estado hover para não disabled e não checked */\n:not(.disabled):not(.checked) .thumb:hover {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n:not(.disabled):not(.checked) .thumb:active {\n border-color: var(--color-dark);\n background: var(--neutral-pale);\n}\n\n/* Estado hover para não disabled */\n:not(.disabled) .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border: 2px solid var(--neutral-darker-medium);\n z-index: 1;\n}\n\n:not(.disabled) .checked .thumb:focus {\n outline: 2px solid var(--info-base) !important;\n border-color: var(--color-dark);\n}\n","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()}`} tabInd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,CAAC,IAAI,CAAC,WAAW,EAAE,CAAE,CAAA,EAAA,EAC5C,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAAA,MAAA,EAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAA,CAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAA,CAAQ,CAC7E,CACF,CACF,CACD;;;;;;;;;;;;;"}
@@ -1,15 +1,13 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-21683715.js';
2
- import { l as labelSizes } from './cura-tabs.definitions-a017126e.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-OdKytJIH.js';
2
+ import { l as labelSizes } from './cura-tabs.definitions-CHcd-uKK.js';
3
+ import './cura-theme-module-BPKQjAwN.js';
3
4
 
4
5
  const curaTabsButtonCss = ":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;display:flex;align-items:center;justify-content:center;min-width:120px;width:fit-content;border:2px solid var(--border-color);border-radius:4px}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.selected),:host a:not(.selected){border:2px solid var(--border-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border-color:var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button cura-badge-counter,:host a cura-badge-counter{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{border-color:transparent;background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.disabled:not(.selected),:host a.disabled:not(.selected){border-color:var(--neutral-dark)}";
5
- const CuraTabsButtonStyle0 = curaTabsButtonCss;
6
6
 
7
7
  const CuraTabs = class {
8
8
  constructor(hostRef) {
9
9
  registerInstance(this, hostRef);
10
- this.tabSelect = createEvent(this, "tabSelect", 7);
11
- this.name = undefined;
12
- this.iconName = undefined;
10
+ this.tabSelect = createEvent(this, "tabSelect");
13
11
  this.counter = 1;
14
12
  this.selected = false;
15
13
  this.disabled = false;
@@ -95,8 +93,9 @@ const CuraTabs = class {
95
93
  "colorMode": ["setColors"]
96
94
  }; }
97
95
  };
98
- CuraTabs.style = CuraTabsButtonStyle0;
96
+ CuraTabs.style = curaTabsButtonCss;
99
97
 
100
98
  export { CuraTabs as cura_tabs_button };
99
+ //# sourceMappingURL=cura-tabs-button.entry.js.map
101
100
 
102
101
  //# sourceMappingURL=cura-tabs-button.entry.js.map
@@ -1 +1 @@
1
- {"file":"cura-tabs-button.entry.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,m8DAAm8D,CAAC;AAC99D,6BAAe,iBAAiB;;MCOnB,QAAQ;;;;;;uBAGwC,CAAC;wBACA,KAAK;wBACL,KAAK;oBACH,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,GAAG,cAAc,GAAG,eAAe,EAAE;YAC7G,EAAE,IAAI,EAAE,0BAA0B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CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;KAC1C;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;QAE9C,QACE,EAAC,IAAI,qDAAC,IAAI,EAAC,QAAQ,kBAAe,IAAI,CAAC,QAAQ,mBAAiB,IAAI,CAAC,QAAQ,IAC3E,+DACE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,CAAC,IAAI,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,IAE7C,IAAI,CAAC,OAAO,EAAE,EACf,mEAAY,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAC,GAAG,EAAC,WAAW,EAAC,GAAG,IAC5E,8DAAa,CACF,EACZ,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAC/B,CACJ,EACP;KACH;;;;;;;;;","names":[],"sources":["src/components/tabs/cura-tabs-button/cura-tabs-button.scss?tag=cura-tabs-button&encapsulation=shadow","src/components/tabs/cura-tabs-button/cura-tabs-button.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n@import '../../../scss/mixins/buttons.scss';\n\n$button-sizes: (\n small: $spacing-mini $spacing-mini,\n medium: $spacing-xxxs $spacing-xxxs,\n large: $spacing-xxxs $spacing-xxs,\n);\n\n:host {\n button,\n a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-width: 120px;\n width: fit-content;\n\n border: 2px solid var(--border-color);\n border-radius: 4px;\n\n &:not(.selected) {\n border: 2px solid var(--border-color);\n }\n\n &:not(.disabled, .selected):hover {\n background-color: var(--background-color-hover);\n\n &.dark {\n border-color: var(--neutral-purewhite);\n }\n }\n\n @each $size, $padding in $button-sizes {\n &.#{$size} {\n padding: $padding;\n }\n }\n\n &:focus {\n border-color: var(--primary-light);\n }\n\n cura-icon {\n margin-right: #{$spacing-mini};\n }\n\n cura-badge-counter {\n margin-left: #{$spacing-mini};\n }\n\n @include button-selected() {\n background-color: var(--background-color-selected);\n\n &.disabled {\n border-color: transparent;\n background-color: var(--background-disabled-selected);\n }\n }\n\n &.disabled {\n &:not(.selected) {\n border-color: var(--neutral-dark);\n }\n\n cursor: not-allowed;\n }\n }\n }\n}\n","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-button',\n styleUrl: 'cura-tabs-button.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 }) counter?: number = 1;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\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-light' },\n { name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-light' : null },\n {\n name: '--background-disabled-selected',\n theme: this.colorMode === 'light' ? 'neutral-white' : 'neutral-black',\n },\n {\n name: '--border-color',\n theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light',\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 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 };\n }\n\n getCounter() {\n return <cura-badge-counter number={this.counter} color=\"primary\" disabled={this.disabled} class=\"badge-number\"></cura-badge-counter>;\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 '--neutral-dark': window.CuraAPI.theme.colors.getColor('neutral-dark'),\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\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 {this.counter > 0 && this.getCounter()}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"version":3,"file":"cura-tabs-button.entry.js","sources":["src/components/tabs/cura-tabs-button/cura-tabs-button.scss?tag=cura-tabs-button&encapsulation=shadow","src/components/tabs/cura-tabs-button/cura-tabs-button.tsx"],"sourcesContent":["@import '../../../scss/mixins/spacing.scss';\n@import '../../../scss/mixins/buttons.scss';\n\n$button-sizes: (\n small: $spacing-mini $spacing-mini,\n medium: $spacing-xxxs $spacing-xxxs,\n large: $spacing-xxxs $spacing-xxs,\n);\n\n:host {\n button,\n a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-width: 120px;\n width: fit-content;\n\n border: 2px solid var(--border-color);\n border-radius: 4px;\n\n &:not(.selected) {\n border: 2px solid var(--border-color);\n }\n\n &:not(.disabled, .selected):hover {\n background-color: var(--background-color-hover);\n\n &.dark {\n border-color: var(--neutral-purewhite);\n }\n }\n\n @each $size, $padding in $button-sizes {\n &.#{$size} {\n padding: $padding;\n }\n }\n\n &:focus {\n border-color: var(--primary-light);\n }\n\n cura-icon {\n margin-right: #{$spacing-mini};\n }\n\n cura-badge-counter {\n margin-left: #{$spacing-mini};\n }\n\n @include button-selected() {\n background-color: var(--background-color-selected);\n\n &.disabled {\n border-color: transparent;\n background-color: var(--background-disabled-selected);\n }\n }\n\n &.disabled {\n &:not(.selected) {\n border-color: var(--neutral-dark);\n }\n\n cursor: not-allowed;\n }\n }\n }\n}\n","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-button',\n styleUrl: 'cura-tabs-button.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 }) counter?: number = 1;\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n @Prop({ reflect: true, mutable: true }) disabled: boolean = false;\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-light' },\n { name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-light' : null },\n {\n name: '--background-disabled-selected',\n theme: this.colorMode === 'light' ? 'neutral-white' : 'neutral-black',\n },\n {\n name: '--border-color',\n theme: this.colorMode === 'light' ? 'primary-base' : 'primary-light',\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 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 };\n }\n\n getCounter() {\n return <cura-badge-counter number={this.counter} color=\"primary\" disabled={this.disabled} class=\"badge-number\"></cura-badge-counter>;\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 '--neutral-dark': window.CuraAPI.theme.colors.getColor('neutral-dark'),\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\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 {this.counter > 0 && this.getCounter()}\n </button>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;AAAA,MAAM,iBAAiB,GAAG,m8DAAm8D;;MCQh9D,QAAQ,GAAA,MAAA;AALrB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAQ0C,QAAA,IAAO,CAAA,OAAA,GAAY,CAAC;AACpB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACzB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AACxC,QAAA,IAAI,CAAA,IAAA,GAAiC,OAAO;AAC7B,QAAA,IAAS,CAAA,SAAA,GAAqB,OAAO;AAEpE,QAAA,IAAO,CAAA,OAAA,GAA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