@rededor/cura 0.5.1 → 0.5.3

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 (375) hide show
  1. package/dist/assets/icons/iconset-default-list.ts +1 -1
  2. package/dist/assets/icons/iconset-default-tmp.svg +4 -0
  3. package/dist/assets/icons/iconset-default.svg +1 -1
  4. package/dist/cjs/{app-globals-0e3b7fc6.js → app-globals-2988084b.js} +5 -5
  5. package/dist/cjs/app-globals-2988084b.js.map +1 -0
  6. package/dist/cjs/cura-accordion_8.cjs.entry.js +445 -0
  7. package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
  8. package/dist/cjs/cura-alert.cjs.entry.js +67 -0
  9. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -0
  10. package/dist/cjs/cura-button-outline.cjs.entry.js +83 -0
  11. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -0
  12. package/dist/cjs/cura-button-select.cjs.entry.js +97 -0
  13. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -0
  14. package/dist/cjs/cura-button-transparent.cjs.entry.js +83 -0
  15. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -0
  16. package/dist/cjs/cura-checkbox.cjs.entry.js +144 -0
  17. package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -0
  18. package/dist/cjs/cura-display.cjs.entry.js +74 -0
  19. package/dist/cjs/cura-display.cjs.entry.js.map +1 -0
  20. package/dist/cjs/cura-forms.definitions-11be2ebd.js +20 -0
  21. package/dist/cjs/cura-forms.definitions-11be2ebd.js.map +1 -0
  22. package/dist/cjs/cura-icon.definitions-b73b0178.js +21 -0
  23. package/dist/cjs/cura-icon.definitions-b73b0178.js.map +1 -0
  24. package/dist/cjs/cura-icons-view.cjs.entry.js +36 -0
  25. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
  26. package/dist/cjs/cura-input-text.cjs.entry.js +3907 -0
  27. package/dist/cjs/cura-input-text.cjs.entry.js.map +1 -0
  28. package/dist/cjs/cura-label.cjs.entry.js +69 -0
  29. package/dist/cjs/cura-label.cjs.entry.js.map +1 -0
  30. package/dist/cjs/cura-radio.cjs.entry.js +114 -0
  31. package/dist/cjs/cura-radio.cjs.entry.js.map +1 -0
  32. package/dist/cjs/cura-switch.cjs.entry.js +89 -0
  33. package/dist/cjs/cura-switch.cjs.entry.js.map +1 -0
  34. package/dist/cjs/cura.cjs.js +3 -3
  35. package/dist/cjs/{index-404d93e9.js → index-7616f620.js} +35 -1
  36. package/dist/cjs/index-7616f620.js.map +1 -0
  37. package/dist/cjs/index.cjs.js +7 -0
  38. package/dist/cjs/index.cjs.js.map +1 -1
  39. package/dist/cjs/loader.cjs.js +3 -3
  40. package/dist/collection/api/cura-api.type.js.map +1 -1
  41. package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
  42. package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
  43. package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
  44. package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
  45. package/dist/collection/api/theme-presets/static.js +2 -2
  46. package/dist/collection/api/theme-presets/static.js.map +1 -1
  47. package/dist/collection/assets/icons/iconset-default-list.js +1 -1
  48. package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
  49. package/dist/collection/assets/icons/iconset-default-tmp.svg +4 -0
  50. package/dist/collection/assets/icons/iconset-default.svg +1 -1
  51. package/dist/collection/assets-raw/icons/default/swap.svg +3 -0
  52. package/dist/collection/collection-manifest.json +7 -0
  53. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
  54. package/dist/collection/components/buttons/cura-button/cura-button.css +4 -0
  55. package/dist/collection/components/buttons/cura-button/cura-button.stories.js +2 -2
  56. package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
  57. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +4 -0
  58. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +2 -2
  59. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
  60. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +139 -0
  61. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +263 -0
  62. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -0
  63. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +4 -0
  64. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +2 -2
  65. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
  66. package/dist/collection/components/cura-alert/cura-alert.css +30 -0
  67. package/dist/collection/components/cura-alert/cura-alert.js +167 -0
  68. package/dist/collection/components/cura-alert/cura-alert.js.map +1 -0
  69. package/dist/collection/components/cura-alert/cura-alert.stories.js +95 -0
  70. package/dist/collection/components/cura-alert/cura-alert.stories.js.map +1 -0
  71. package/dist/collection/components/cura-icon/cura-icon.definitions.js +15 -0
  72. package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -0
  73. package/dist/collection/components/cura-icon/cura-icon.js +9 -16
  74. package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
  75. package/dist/collection/components/cura-icon/cura-icon.stories.js +7 -6
  76. package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
  77. package/dist/collection/components/cura-icons-view/cura-icons-view.css +16 -17
  78. package/dist/collection/components/cura-icons-view/cura-icons-view.js +10 -3
  79. package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
  80. package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
  81. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +163 -0
  82. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +431 -0
  83. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -0
  84. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js +196 -0
  85. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js.map +1 -0
  86. package/dist/collection/components/forms/cura-forms.definitions.js +15 -0
  87. package/dist/collection/components/forms/cura-forms.definitions.js.map +1 -0
  88. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +326 -0
  89. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +655 -0
  90. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -0
  91. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +224 -0
  92. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -0
  93. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +46 -0
  94. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -0
  95. package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
  96. package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
  97. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
  98. package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
  99. package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
  100. package/dist/collection/components/forms/cura-radio/cura-radio.css +146 -0
  101. package/dist/collection/components/forms/cura-radio/cura-radio.js +365 -0
  102. package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -0
  103. package/dist/collection/components/forms/cura-radio/cura-radio.stories.js +175 -0
  104. package/dist/collection/components/forms/cura-radio/cura-radio.stories.js.map +1 -0
  105. package/dist/collection/components/forms/cura-switch/cura-switch.css +100 -0
  106. package/dist/collection/components/forms/cura-switch/cura-switch.js +266 -0
  107. package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -0
  108. package/dist/collection/components/forms/cura-switch/cura-switch.stories.js +137 -0
  109. package/dist/collection/components/forms/cura-switch/cura-switch.stories.js.map +1 -0
  110. package/dist/collection/components/text/cura-display/cura-display.css +21 -38
  111. package/dist/collection/components/text/cura-display/cura-display.js +80 -49
  112. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
  113. package/dist/collection/components/text/cura-display/cura-display.stories.js +78 -33
  114. package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
  115. package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
  116. package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
  117. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  118. package/dist/collection/components/text/cura-heading/cura-heading.stories.js +92 -36
  119. package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
  120. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
  121. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
  122. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  123. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +78 -46
  124. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
  125. package/dist/collection/index.js +3 -1
  126. package/dist/collection/index.js.map +1 -1
  127. package/dist/components/cura-accordion-item.js +1 -1
  128. package/dist/components/cura-accordion-item.js.map +1 -1
  129. package/dist/components/cura-alert.d.ts +11 -0
  130. package/dist/components/cura-alert.js +105 -0
  131. package/dist/components/cura-alert.js.map +1 -0
  132. package/dist/components/cura-button-select.d.ts +11 -0
  133. package/dist/components/cura-button-select.js +127 -0
  134. package/dist/components/cura-button-select.js.map +1 -0
  135. package/dist/components/cura-checkbox.d.ts +11 -0
  136. package/dist/components/cura-checkbox.js +192 -0
  137. package/dist/components/cura-checkbox.js.map +1 -0
  138. package/dist/components/cura-display.js +41 -35
  139. package/dist/components/cura-display.js.map +1 -1
  140. package/dist/components/cura-forms.definitions.js +18 -0
  141. package/dist/components/cura-forms.definitions.js.map +1 -0
  142. package/dist/components/cura-heading.js +1 -87
  143. package/dist/components/cura-heading.js.map +1 -1
  144. package/dist/components/cura-heading2.js +104 -0
  145. package/dist/components/cura-heading2.js.map +1 -0
  146. package/dist/components/cura-icon2.js +24 -17
  147. package/dist/components/cura-icon2.js.map +1 -1
  148. package/dist/components/cura-icons-view.js +31 -7
  149. package/dist/components/cura-icons-view.js.map +1 -1
  150. package/dist/components/cura-input-text.d.ts +11 -0
  151. package/dist/components/cura-input-text.js +3961 -0
  152. package/dist/components/cura-input-text.js.map +1 -0
  153. package/dist/components/cura-label.d.ts +11 -0
  154. package/dist/components/cura-label.js +8 -0
  155. package/dist/components/cura-label.js.map +1 -0
  156. package/dist/components/cura-label2.js +88 -0
  157. package/dist/components/cura-label2.js.map +1 -0
  158. package/dist/components/cura-page-template.js +1 -1
  159. package/dist/components/cura-page-template.js.map +1 -1
  160. package/dist/components/cura-paragraph.js +1 -80
  161. package/dist/components/cura-paragraph.js.map +1 -1
  162. package/dist/components/cura-paragraph2.js +86 -0
  163. package/dist/components/cura-paragraph2.js.map +1 -0
  164. package/dist/components/cura-radio.d.ts +11 -0
  165. package/dist/components/cura-radio.js +154 -0
  166. package/dist/components/cura-radio.js.map +1 -0
  167. package/dist/components/cura-switch.d.ts +11 -0
  168. package/dist/components/cura-switch.js +119 -0
  169. package/dist/components/cura-switch.js.map +1 -0
  170. package/dist/components/index.js +23 -5
  171. package/dist/components/index.js.map +1 -1
  172. package/dist/cura/cura.esm.js +1 -1
  173. package/dist/cura/cura.esm.js.map +1 -1
  174. package/dist/cura/cura.js +1 -1
  175. package/dist/cura/index.esm.js +1 -1
  176. package/dist/cura/index.esm.js.map +1 -1
  177. package/dist/cura/p-120926c5.system.js +2 -0
  178. package/dist/cura/p-120926c5.system.js.map +1 -0
  179. package/dist/cura/p-1228e771.entry.js +2 -0
  180. package/dist/cura/p-1228e771.entry.js.map +1 -0
  181. package/dist/cura/p-2d42ccf4.entry.js +2 -0
  182. package/dist/cura/p-2d42ccf4.entry.js.map +1 -0
  183. package/dist/cura/p-3688570d.js +2 -0
  184. package/dist/cura/p-3688570d.js.map +1 -0
  185. package/dist/cura/p-36a83bc7.system.js +3 -0
  186. package/dist/cura/p-36a83bc7.system.js.map +1 -0
  187. package/dist/cura/p-3f3355f3.system.entry.js +2 -0
  188. package/dist/cura/p-3f3355f3.system.entry.js.map +1 -0
  189. package/dist/cura/p-48426f60.system.js +2 -0
  190. package/dist/cura/p-48426f60.system.js.map +1 -0
  191. package/dist/cura/p-4df84c9e.entry.js +2 -0
  192. package/dist/cura/p-4df84c9e.entry.js.map +1 -0
  193. package/dist/cura/p-70cefaf8.entry.js +2 -0
  194. package/dist/cura/p-70cefaf8.entry.js.map +1 -0
  195. package/dist/cura/p-72a9ed55.entry.js +2 -0
  196. package/dist/cura/p-72a9ed55.entry.js.map +1 -0
  197. package/dist/cura/p-75b2e4d1.system.entry.js +2 -0
  198. package/dist/cura/p-75b2e4d1.system.entry.js.map +1 -0
  199. package/dist/cura/p-880917c1.entry.js +2 -0
  200. package/dist/cura/p-880917c1.entry.js.map +1 -0
  201. package/dist/cura/p-9471c93e.system.entry.js +2 -0
  202. package/dist/cura/p-9471c93e.system.entry.js.map +1 -0
  203. package/dist/cura/p-98014544.entry.js +2 -0
  204. package/dist/cura/p-98014544.entry.js.map +1 -0
  205. package/dist/cura/p-98352c92.system.entry.js +2 -0
  206. package/dist/cura/p-98352c92.system.entry.js.map +1 -0
  207. package/dist/cura/p-a32889a4.system.js +2 -0
  208. package/dist/cura/p-a32889a4.system.js.map +1 -0
  209. package/dist/cura/p-a6d20c12.system.entry.js +2 -0
  210. package/dist/cura/p-a6d20c12.system.entry.js.map +1 -0
  211. package/dist/cura/p-ab8c9a8f.system.entry.js +2 -0
  212. package/dist/cura/p-ab8c9a8f.system.entry.js.map +1 -0
  213. package/dist/cura/p-ad194144.entry.js +2 -0
  214. package/dist/cura/p-ad194144.entry.js.map +1 -0
  215. package/dist/cura/p-b0e13882.system.entry.js +2 -0
  216. package/dist/cura/p-b0e13882.system.entry.js.map +1 -0
  217. package/dist/cura/p-ba66d7be.js +3 -0
  218. package/dist/cura/{p-c0c00396.system.js.map → p-ba66d7be.js.map} +1 -1
  219. package/dist/cura/p-bb3f9d05.entry.js +2 -0
  220. package/dist/cura/p-bb3f9d05.entry.js.map +1 -0
  221. package/dist/cura/p-c791725b.js +2 -0
  222. package/dist/cura/p-c791725b.js.map +1 -0
  223. package/dist/cura/p-c9afb94f.entry.js +2 -0
  224. package/dist/cura/p-c9afb94f.entry.js.map +1 -0
  225. package/dist/cura/p-d3f9c888.system.js +2 -0
  226. package/dist/cura/p-d3f9c888.system.js.map +1 -0
  227. package/dist/cura/p-e5e259fd.system.entry.js +2 -0
  228. package/dist/cura/p-e5e259fd.system.entry.js.map +1 -0
  229. package/dist/cura/p-edeffbfc.entry.js +2 -0
  230. package/dist/cura/p-edeffbfc.entry.js.map +1 -0
  231. package/dist/cura/p-eea5ca70.system.entry.js +2 -0
  232. package/dist/cura/p-eea5ca70.system.entry.js.map +1 -0
  233. package/dist/cura/p-f6e61abf.system.entry.js +2 -0
  234. package/dist/cura/p-f6e61abf.system.entry.js.map +1 -0
  235. package/dist/cura/p-f89f2ecc.system.entry.js +2 -0
  236. package/dist/cura/p-f89f2ecc.system.entry.js.map +1 -0
  237. package/dist/cura/p-f8fffdc1.js +2 -0
  238. package/dist/cura/p-f8fffdc1.js.map +1 -0
  239. package/dist/cura/p-fc4ba4ce.system.js +2 -0
  240. package/dist/cura/p-fc4ba4ce.system.js.map +1 -0
  241. package/dist/cura/p-fef52079.entry.js +2 -0
  242. package/dist/cura/p-fef52079.entry.js.map +1 -0
  243. package/dist/cura/p-ffd41520.system.entry.js +2 -0
  244. package/dist/cura/p-ffd41520.system.entry.js.map +1 -0
  245. package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
  246. package/dist/esm/app-globals-29001758.js.map +1 -0
  247. package/dist/esm/cura-accordion_8.entry.js +434 -0
  248. package/dist/esm/cura-accordion_8.entry.js.map +1 -0
  249. package/dist/esm/cura-alert.entry.js +63 -0
  250. package/dist/esm/cura-alert.entry.js.map +1 -0
  251. package/dist/esm/cura-button-outline.entry.js +79 -0
  252. package/dist/esm/cura-button-outline.entry.js.map +1 -0
  253. package/dist/esm/cura-button-select.entry.js +93 -0
  254. package/dist/esm/cura-button-select.entry.js.map +1 -0
  255. package/dist/esm/cura-button-transparent.entry.js +79 -0
  256. package/dist/esm/cura-button-transparent.entry.js.map +1 -0
  257. package/dist/esm/cura-checkbox.entry.js +140 -0
  258. package/dist/esm/cura-checkbox.entry.js.map +1 -0
  259. package/dist/esm/cura-display.entry.js +70 -0
  260. package/dist/esm/cura-display.entry.js.map +1 -0
  261. package/dist/esm/cura-forms.definitions-0f774253.js +18 -0
  262. package/dist/esm/cura-forms.definitions-0f774253.js.map +1 -0
  263. package/dist/esm/cura-icon.definitions-a63d1862.js +18 -0
  264. package/dist/esm/cura-icon.definitions-a63d1862.js.map +1 -0
  265. package/dist/esm/cura-icons-view.entry.js +32 -0
  266. package/dist/esm/cura-icons-view.entry.js.map +1 -0
  267. package/dist/esm/cura-input-text.entry.js +3903 -0
  268. package/dist/esm/cura-input-text.entry.js.map +1 -0
  269. package/dist/esm/cura-label.entry.js +65 -0
  270. package/dist/esm/cura-label.entry.js.map +1 -0
  271. package/dist/esm/cura-radio.entry.js +110 -0
  272. package/dist/esm/cura-radio.entry.js.map +1 -0
  273. package/dist/esm/cura-switch.entry.js +85 -0
  274. package/dist/esm/cura-switch.entry.js.map +1 -0
  275. package/dist/esm/cura.js +4 -4
  276. package/dist/esm/{index-d99da69e.js → index-81f1a268.js} +35 -2
  277. package/dist/{esm-es5/index-d99da69e.js.map → esm/index-81f1a268.js.map} +1 -1
  278. package/dist/esm/index.js +4 -0
  279. package/dist/esm/index.js.map +1 -1
  280. package/dist/esm/loader.js +4 -4
  281. package/dist/esm-es5/app-globals-29001758.js +2 -0
  282. package/dist/esm-es5/app-globals-29001758.js.map +1 -0
  283. package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
  284. package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
  285. package/dist/esm-es5/cura-alert.entry.js +2 -0
  286. package/dist/esm-es5/cura-alert.entry.js.map +1 -0
  287. package/dist/esm-es5/cura-button-outline.entry.js +2 -0
  288. package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
  289. package/dist/esm-es5/cura-button-select.entry.js +2 -0
  290. package/dist/esm-es5/cura-button-select.entry.js.map +1 -0
  291. package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
  292. package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
  293. package/dist/esm-es5/cura-checkbox.entry.js +2 -0
  294. package/dist/esm-es5/cura-checkbox.entry.js.map +1 -0
  295. package/dist/esm-es5/cura-display.entry.js +2 -0
  296. package/dist/esm-es5/cura-display.entry.js.map +1 -0
  297. package/dist/esm-es5/cura-forms.definitions-0f774253.js +2 -0
  298. package/dist/esm-es5/cura-forms.definitions-0f774253.js.map +1 -0
  299. package/dist/esm-es5/cura-icon.definitions-a63d1862.js +2 -0
  300. package/dist/esm-es5/cura-icon.definitions-a63d1862.js.map +1 -0
  301. package/dist/esm-es5/cura-icons-view.entry.js +2 -0
  302. package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
  303. package/dist/esm-es5/cura-input-text.entry.js +2 -0
  304. package/dist/esm-es5/cura-input-text.entry.js.map +1 -0
  305. package/dist/esm-es5/cura-label.entry.js +2 -0
  306. package/dist/esm-es5/cura-label.entry.js.map +1 -0
  307. package/dist/esm-es5/cura-radio.entry.js +2 -0
  308. package/dist/esm-es5/cura-radio.entry.js.map +1 -0
  309. package/dist/esm-es5/cura-switch.entry.js +2 -0
  310. package/dist/esm-es5/cura-switch.entry.js.map +1 -0
  311. package/dist/esm-es5/cura.js +1 -1
  312. package/dist/esm-es5/cura.js.map +1 -1
  313. package/dist/esm-es5/index-81f1a268.js +3 -0
  314. package/dist/esm-es5/index-81f1a268.js.map +1 -0
  315. package/dist/esm-es5/index.js +1 -1
  316. package/dist/esm-es5/index.js.map +1 -1
  317. package/dist/esm-es5/loader.js +1 -1
  318. package/dist/esm-es5/loader.js.map +1 -1
  319. package/dist/types/api/cura-api.type.d.ts +1 -0
  320. package/dist/types/components/buttons/cura-button/cura-button.d.ts +1 -1
  321. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +51 -0
  322. package/dist/types/components/cura-alert/cura-alert.d.ts +16 -0
  323. package/dist/types/components/cura-alert/cura-alert.stories.d.ts +79 -0
  324. package/dist/types/components/cura-icon/cura-icon.d.ts +0 -42
  325. package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +47 -0
  326. package/dist/types/components/cura-icons-view/cura-icons-view.d.ts +2 -1
  327. package/dist/types/components/forms/cura-checkbox/cura-checkbox.d.ts +100 -0
  328. package/dist/types/components/forms/cura-checkbox/cura-checkbox.stories.d.ts +199 -0
  329. package/dist/types/components/forms/cura-forms.definitions.d.ts +14 -0
  330. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +138 -0
  331. package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +224 -0
  332. package/dist/types/components/forms/cura-input-text/mask-presets/input-mask-presets.d.ts +5 -0
  333. package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
  334. package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
  335. package/dist/types/components/forms/cura-radio/cura-radio.d.ts +81 -0
  336. package/dist/types/components/forms/cura-radio/cura-radio.stories.d.ts +180 -0
  337. package/dist/types/components/forms/cura-switch/cura-switch.d.ts +62 -0
  338. package/dist/types/components/forms/cura-switch/cura-switch.stories.d.ts +135 -0
  339. package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
  340. package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
  341. package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
  342. package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
  343. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
  344. package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
  345. package/dist/types/components.d.ts +741 -46
  346. package/dist/types/index.d.ts +9 -0
  347. package/package.json +5 -6
  348. package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
  349. package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
  350. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
  351. package/dist/cjs/index-404d93e9.js.map +0 -1
  352. package/dist/cura/p-319699df.entry.js +0 -2
  353. package/dist/cura/p-319699df.entry.js.map +0 -1
  354. package/dist/cura/p-46d20db3.js +0 -3
  355. package/dist/cura/p-46d20db3.js.map +0 -1
  356. package/dist/cura/p-50ea2036.system.js +0 -2
  357. package/dist/cura/p-50ea2036.system.js.map +0 -1
  358. package/dist/cura/p-5250cb43.system.js +0 -2
  359. package/dist/cura/p-5250cb43.system.js.map +0 -1
  360. package/dist/cura/p-5cc3c8bd.system.entry.js +0 -2
  361. package/dist/cura/p-5cc3c8bd.system.entry.js.map +0 -1
  362. package/dist/cura/p-788e035b.system.js +0 -2
  363. package/dist/cura/p-788e035b.system.js.map +0 -1
  364. package/dist/cura/p-c0c00396.system.js +0 -3
  365. package/dist/cura/p-d5c64a5f.js +0 -2
  366. package/dist/cura/p-d5c64a5f.js.map +0 -1
  367. package/dist/esm/app-globals-cc003eaf.js.map +0 -1
  368. package/dist/esm/cura-accordion_12.entry.js +0 -659
  369. package/dist/esm/cura-accordion_12.entry.js.map +0 -1
  370. package/dist/esm/index-d99da69e.js.map +0 -1
  371. package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
  372. package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
  373. package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
  374. package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
  375. package/dist/esm-es5/index-d99da69e.js +0 -3
@@ -0,0 +1,65 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-81f1a268.js';
2
+
3
+ const curaLabelCss = ":host{display:block;font-size:var(--font-size-base)}:host p{font-family:var(--font-family);font-size:1.143em;font-weight:var(--font-weight-medium);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0.32px}:host p.bold-weight,:host p ::slotted(b),:host p ::slotted(strong),:host p ::slotted(u){font-weight:var(--font-weight-bold)}:host p.large{font-size:1.357em;line-height:calc(var(--line-height) - 4%);letter-spacing:0px}:host p.small{font-size:1em;line-height:calc(var(--line-height) - 4%);letter-spacing:0.56px}:host p.xsmall{font-size:0.857em;line-height:calc(var(--line-height) - 17%);letter-spacing:0.72px}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%}:host ::slotted(u){text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
4
+
5
+ const CuraLabel = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.theme = window.CuraAPI.theme;
9
+ this.size = 'medium';
10
+ this.weight = 'regular';
11
+ this.spotColor = 'accent-dark';
12
+ this.color = undefined;
13
+ this.marginBlock = '0';
14
+ this.lineHeight = '125%';
15
+ this.styles = {};
16
+ }
17
+ handleChangeColor() {
18
+ this.setColors();
19
+ }
20
+ connectedCallback() {
21
+ this.setFontProperties();
22
+ this.setColors();
23
+ }
24
+ getClasses() {
25
+ const sizeclass = {};
26
+ sizeclass[this.size.toLowerCase()] = true;
27
+ sizeclass[`${this.weight.toLowerCase()}-weight`] = true;
28
+ return sizeclass;
29
+ }
30
+ setFontProperties() {
31
+ this.weights = this.theme.fonts.getWeights();
32
+ this.fontSizeBase = this.theme.fonts.getSize();
33
+ this.styles = {
34
+ '--font-family': this.theme.fonts.getFamily('body'),
35
+ '--font-weight-medium': this.weights.medium,
36
+ '--font-weight-bold': this.weights.bold
37
+ };
38
+ }
39
+ setColors() {
40
+ const fontColor = this.color
41
+ ? this.theme.colors.getColor(this.color)
42
+ : this.theme.fonts.getColor();
43
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'), '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
44
+ }
45
+ hostCSSProperties() {
46
+ return {
47
+ '--margin-block': this.marginBlock,
48
+ '--font-size-base': this.fontSizeBase,
49
+ '--line-height': this.lineHeight
50
+ };
51
+ }
52
+ render() {
53
+ return (h(Host, { style: this.hostCSSProperties() }, h("p", { style: this.styles, class: this.getClasses() }, h("slot", null))));
54
+ }
55
+ get host() { return getElement(this); }
56
+ static get watchers() { return {
57
+ "color": ["handleChangeColor"],
58
+ "spotColor": ["handleChangeColor"]
59
+ }; }
60
+ };
61
+ CuraLabel.style = curaLabelCss;
62
+
63
+ export { CuraLabel as cura_label };
64
+
65
+ //# sourceMappingURL=cura-label.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-label.entry.js","mappings":";;AAAA,MAAM,YAAY,GAAG,6/BAA6/B;;MCOrgC,SAAS;;;IAsDpB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;gBAhD0C,QAAQ;kBAM3B,SAAS;qBAM1B,aAAa;;uBAiBX,GAAG;sBAMJ,MAAM;kBAYxB,EAAE;;EA1BpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EA2BD,iBAAiB;IACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;GAClB;EAED,UAAU;IACR,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;IACxD,OAAO,SAAS,CAAC;GAClB;EAED,iBAAiB;IACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;IAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC/C,IAAI,CAAC,MAAM,GAAG;MACZ,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;MACnD,sBAAsB,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;MAC3C,oBAAoB,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;KACxC,CAAC;GACH;EAED,SAAS;IACP,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;QACxB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAChC,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,cAAc,EAAE,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACzE,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,GAChE,CAAC;GACH;EAED,iBAAiB;IACf,OAAO;MACL,gBAAgB,EAAE,IAAI,CAAC,WAAW;MAClC,kBAAkB,EAAE,IAAI,CAAC,YAAY;MACrC,eAAe,EAAE,IAAI,CAAC,UAAU;KACjC,CAAC;GACH;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,IACnC,SAAG,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAC7C,eAAa,CACX,CACC,EACP;GACH;;;;;;;;;;;","names":[],"sources":["./src/components/forms/cura-label/cura-label.scss?tag=cura-label&encapsulation=shadow","./src/components/forms/cura-label/cura-label.tsx"],"sourcesContent":["@import '../../../scss/mixins/responsive.scss';\n\n:host {\n display: block;\n font-size: var(--font-size-base);\n\n p {\n font-family: var(--font-family);\n font-size: 1.143em;\n font-weight: var(--font-weight-medium);\n color: var(--color-body);\n line-height: var(--line-height);\n margin-block: var(--margin-block);\n letter-spacing: 0.32px;\n\n &.bold-weight, ::slotted(b), ::slotted(strong), ::slotted(u) {\n font-weight: var(--font-weight-bold);\n }\n\n &.large {\n font-size: 1.357em;\n line-height: calc(var(--line-height) - 4%);\n letter-spacing: 0px;\n }\n\n &.small {\n font-size: 1em;\n line-height: calc(var(--line-height) - 4%);\n letter-spacing: 0.56px;\n }\n\n &.xsmall {\n font-size: 0.857em;\n line-height: calc(var(--line-height) - 17%);\n letter-spacing: 0.72px;\n }\n }\n\n ::slotted(a) {\n font-weight: var(--font-weight-bold);\n color: var(--color-link);\n text-underline-offset: 10%;\n }\n\n ::slotted(u) {\n text-underline-offset: 10%;\n }\n\n ::slotted(abbr) {\n color: var(--color-link);\n text-decoration: underline dashed 1px var(--color-link);\n text-underline-offset: 10%;\n cursor: default;\n }\n\n}\n\n","import { Component, Host, Prop, h, Element, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-label',\n styleUrl: 'cura-label.scss',\n shadow: true,\n})\nexport class CuraLabel {\n\n /**\n * Set size of body text.\n * Values: medium (default) | large | small | xsmall.\n */\n @Prop({reflect: true}) size: 'medium' | 'large' | 'small' | 'xsmall' = 'medium';\n\n /**\n * Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well.\n * Values: regular (default) | bold.\n */\n @Prop({reflect: true}) weight: 'regular' | 'bold' = 'regular';\n\n /**\n * Apply design system color to interactive elements like <a> and <abbr> inside the text.\n * Values: Color from design system scheme. Default to 'accent-dark'.\n */\n @Prop({reflect: true}) spotColor = 'accent-dark';\n\n /**\n * Text color.\n * Values: Color from design system scheme. Default to the font color from the theme.\n */\n @Prop() color: string;\n @Watch('color')\n @Watch('spotColor')\n handleChangeColor() {\n this.setColors();\n }\n\n /**\n * CSS margin-block property values.\n * Default to 1.25em\n */\n @Prop({reflect: true}) marginBlock = '0';\n\n /**\n * CSS line-height property values.\n * Default to 140%\n */\n @Prop({reflect: true}) lineHeight = '125%';\n\n /**\n * Host element <cura-label>\n */\n @Element() host: HTMLElement;\n\n /**\n * Internal Props\n */\n weights: any;\n fontSizeBase: string;\n @State() styles = {};\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.setFontProperties();\n this.setColors();\n }\n\n getClasses() {\n const sizeclass = {};\n sizeclass[this.size.toLowerCase()] = true;\n sizeclass[`${this.weight.toLowerCase()}-weight`] = true;\n return sizeclass;\n }\n\n setFontProperties() {\n this.weights = this.theme.fonts.getWeights();\n this.fontSizeBase = this.theme.fonts.getSize();\n this.styles = {\n '--font-family': this.theme.fonts.getFamily('body'),\n '--font-weight-medium': this.weights.medium,\n '--font-weight-bold': this.weights.bold\n };\n }\n\n setColors() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n this.styles = {\n ...this.styles,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n hostCSSProperties() {\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight\n };\n }\n\n render() {\n return (\n <Host style={this.hostCSSProperties()}>\n <p style={this.styles} class={this.getClasses()}>\n <slot></slot>\n </p>\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -0,0 +1,110 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-81f1a268.js';
2
+ import { f as formsSizes } from './cura-forms.definitions-0f774253.js';
3
+
4
+ const curaRadioCss = "@charset \"UTF-8\";:host{display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-box-sizing:border-box;box-sizing:border-box;}:host .container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row-reverse;flex-direction:row-reverse;gap:var(--gap)}:host .position.container{-ms-flex-direction:row;flex-direction:row}:host .position .label-wrapper{-ms-flex-pack:end;justify-content:end}:host .position .message{text-align:right}:host .position .label{-ms-flex-order:1;order:1}:host .info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .label-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center;gap:5px}:host .control{width:-webkit-fit-content;width:-moz-fit-content;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);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:border-color 0.3s;transition:border-color 0.3s;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;width:var(--size);height:var(--size);-ms-flex:0 0 var(--size);flex:0 0 var(--size)}:host .radio::after{content:\"\";background:var(--color-base-light);border-radius:50%;opacity:0;-webkit-transition:opacity 0.3s;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
+
6
+ const CuraRadio = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.onchange = createEvent(this, "onchange", 7);
10
+ this.sizes = {
11
+ "large": { size: 20 },
12
+ "medium": { size: 14 },
13
+ "small": { size: 10 },
14
+ };
15
+ this.isDarkbackground = () => this.background === 'dark';
16
+ this.handleClick = () => {
17
+ if (this.disabled)
18
+ return;
19
+ this.checked = !this.checked;
20
+ this.onchange.emit({ value: this.value, checked: this.checked });
21
+ };
22
+ this.checked = false;
23
+ this.status = 'default';
24
+ this.disabled = false;
25
+ this.required = false;
26
+ this.label = '';
27
+ this.ontabindex = undefined;
28
+ this.position = 'left';
29
+ this.value = '';
30
+ this.name = '';
31
+ this.background = 'light';
32
+ this.size = 'medium';
33
+ this.color = 'accent';
34
+ this.styles = {};
35
+ }
36
+ sizeHandler() {
37
+ this.styles['--size-after'] = `${this.sizes[this.size].size}px`;
38
+ this.styles['--size'] = `${formsSizes[this.size].size}px`;
39
+ this.styles['--gap'] = `${formsSizes[this.size].gap}px`;
40
+ }
41
+ setColors() {
42
+ const colors = [
43
+ { name: '--info-base', background: 'info-base' },
44
+ { name: '--color-light', background: `${this.color}-light` },
45
+ { name: '--color-base', background: `${this.color}-base` },
46
+ { name: '--color-dark', background: `${this.color}-dark` },
47
+ { name: '--neutral-purewhite', background: 'neutral-purewhite' },
48
+ { name: '--success-lighter', background: 'success-lighter' },
49
+ { name: '--success-base', background: 'success-base' },
50
+ { name: '--error-lighter', background: 'error-lighter' },
51
+ { name: '--error-base', background: 'error-base' },
52
+ { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },
53
+ { name: '--primary-base-neutral-white', background: this.isDarkbackground() ? 'primary-base' : 'neutral-white' },
54
+ { name: '--primary-darker-neutral-white', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-white' },
55
+ { name: '--primary-darker-neutral-base', background: this.isDarkbackground() ? 'primary-darker' : 'neutral-base' },
56
+ { name: '--primary-base-neutral-base', background: this.isDarkbackground() ? 'primary-base' : 'neutral-base' },
57
+ { name: '--primary-base-neutral-dark', background: this.isDarkbackground() ? 'primary-base' : 'neutral-dark' },
58
+ { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },
59
+ { name: '--success-base-dark', background: this.isDarkbackground() ? 'success-base' : 'success-dark' },
60
+ { name: '--error-base-dark', background: this.isDarkbackground() ? 'error-base' : 'error-dark' },
61
+ ];
62
+ colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background));
63
+ }
64
+ connectedCallback() {
65
+ this.sizeHandler();
66
+ this.setColors();
67
+ }
68
+ getClasses() {
69
+ const classes = {};
70
+ classes['container'] = true;
71
+ classes['checked'] = this.checked;
72
+ classes['disabled'] = this.disabled;
73
+ classes['position'] = this.position === 'right';
74
+ classes[this.status] = true;
75
+ return classes;
76
+ }
77
+ assignColor(type) {
78
+ if (this.disabled)
79
+ return this.isDarkbackground() ? 'primary-darker' : 'neutral-medium';
80
+ const statusColors = {
81
+ success: {
82
+ label: this.isDarkbackground() ? 'success-lighter' : 'success-darker',
83
+ message: this.isDarkbackground() ? 'success-base' : 'success-dark'
84
+ },
85
+ error: {
86
+ label: this.isDarkbackground() ? 'error-lighter' : 'neutral-darker',
87
+ message: this.isDarkbackground() ? 'error-base' : 'error-dark'
88
+ },
89
+ default: {
90
+ label: this.isDarkbackground() ? 'neutral-white' : 'neutral-black',
91
+ message: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark'
92
+ }
93
+ };
94
+ return statusColors[this.status][type];
95
+ }
96
+ render() {
97
+ return (h(Host, null, h("div", { class: this.getClasses(), style: this.styles }, h("div", { class: "info" }, h("div", { class: "label-wrapper" }, h("cura-label", { class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", null))), h("input", { type: "radio", class: `radio ${this.size.toLocaleLowerCase()}`, name: this.name, value: this.value, required: this.required, tabIndex: this.ontabindex, disabled: this.disabled, checked: this.checked, onClick: this.handleClick }))));
98
+ }
99
+ get host() { return getElement(this); }
100
+ static get watchers() { return {
101
+ "size": ["sizeHandler"],
102
+ "color": ["setColors"],
103
+ "background": ["setColors", "assignColor"]
104
+ }; }
105
+ };
106
+ CuraRadio.style = curaRadioCss;
107
+
108
+ export { CuraRadio as cura_radio };
109
+
110
+ //# sourceMappingURL=cura-radio.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-radio.entry.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,i5GAAi5G;;MCQz5G,SAAS;;;;IA6DpB,UAAK,GAAG;MACN,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;MACrB,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;MACtB,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;KACtB,CAAC;IAGF,qBAAgB,GAAG,MAAM,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;IA2CpD,gBAAW,GAAG;MACZ,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO;MAE1B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;MAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;KAClE,CAAC;mBA/GyD,KAAK;kBAKkB,SAAS;o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C,WAAK,KAAK,EAAC,MAAM,IACf,WAAK,KAAK,EAAC,eAAe,IACxB,kBACE,KAAK,EAAC,OAAO,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,QAAQ,GAAG,QAAQ,EACjD,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAC/B,IAAI,CAAC,KAAK,CACA,EACZ,IAAI,CAAC,QAAQ,IAAI,sBAAgB,UAAU,EAAC,IAAI,EAAC,WAAW,EAAC,GAAG,EAAC,KAAK,EAAC,YAAY,SAAqB,CACrG,EACN,kBACE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAClC,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,IACf,eAAa,CACF,CACT,EACN,aACE,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,EACrB,OAAO,EAAE,IAAI,CAAC,WAAW,GACzB,CACE,CACD,EACP;GACH;;;;;;;;;;;;","names":[],"sources":["./src/components/forms/cura-radio/cura-radio.scss?tag=cura-radio&encapsulation=shadow","./src/components/forms/cura-radio/cura-radio.tsx"],"sourcesContent":["\n\n:host {\n display: block;\n width: fit-content;\n box-sizing: border-box;\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n gap: var(--gap);\n}\n\n.position {\n\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\n.info {\n display: flex;\n flex-direction: column;\n}\n\n.label-wrapper {\n display: flex;\n justify-content: start;\n align-items: center;\n gap: 5px;\n}\n\n\n.control {\n width: fit-content;\n cursor: pointer;\n position: relative;\n}\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\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\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\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\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\n}\n","import { Component, Prop, Event, Element, h, Host, Watch, EventEmitter, State } 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})\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 @State() styles = {}\n\n @Element() host: HTMLElement;\n\n @Event() onchange: EventEmitter<{ value: string, checked: boolean }>;\n\n sizes = {\n \"large\": { size: 20 },\n \"medium\": { size: 14 },\n \"small\": { size: 10 },\n };\n\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles['--size-after'] = `${this.sizes[this.size].size}px`\n this.styles['--size'] = `${formsSizes[this.size].size}px`\n this.styles['--gap'] = `${formsSizes[this.size].gap}px`\n }\n\n\n @Watch('color')\n @Watch('background')\n setColors() {\n\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 => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background))\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.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>\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"info\">\n <div class=\"label-wrapper\">\n <cura-label\n class=\"label\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n color={this.assignColor('label')}>\n {this.label}\n </cura-label>\n {this.required && <cura-paragraph lineHeight='0%' marginBlock='0' color=\"error-base\" >* </cura-paragraph>}\n </div>\n <cura-label\n color={this.assignColor('message')}\n size=\"xsmall\"\n 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 onClick={this.handleClick}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -0,0 +1,85 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-81f1a268.js';
2
+ import { f as formsSizes } from './cura-forms.definitions-0f774253.js';
3
+
4
+ const curaSwitchCss = "@charset \"UTF-8\";:host{display:block;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-box-sizing:border-box;box-sizing:border-box}.container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row-reverse;flex-direction:row-reverse;gap:var(--gap)}.position.container{-ms-flex-direction:row;flex-direction:row}.position .label{text-align:right}.position .message{text-align:right}.control{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.track{background:var(--neutral-base-black-40);border-radius:16px;-webkit-transition:background-color 0.3s;transition:background-color 0.3s;-ms-flex-align:start;align-items:flex-start;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--size-track);height:var(--size)}.thumb{background-color:var(--neutral-white-purewhite);border:2px solid var(--neutral-medium);border-radius:50%;position:absolute;-webkit-transition:outline 0.3s, -webkit-transform 0.3s;transition:outline 0.3s, -webkit-transform 0.3s;transition:transform 0.3s, outline 0.3s;transition:transform 0.3s, outline 0.3s, -webkit-transform 0.3s;display:inline-block;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--size);height:var(--size)}.checked .thumb{border-color:var(--color-dark-light);background:var(--color-lighter);-webkit-transform:translateX(var(--size));transform:translateX(var(--size))}.checked .thumb:hover{background:var(--neutral-white-purewhite) !important}.checked .track{background:var(--color-base-lighter-50)}.disabled .track{background:var(--primary-base-neutral-black-20)}.disabled .thumb{background:var(--neutral-lighter) !important;border-color:var(--primary-dark-neutral-base);cursor:not-allowed}.disabled.checked .track{background:var(--primary-base-neutral-black-20)}.disabled .thumb:hover{background:var(--neutral-lighter) !important;border-color:var(--primary-dark-neutral-base) !important}:not(.disabled):not(.checked) .thumb:hover{border-color:var(--color-dark-light);background:var(--color-lighter)}:not(.disabled) .thumb:focus{border-color:var(--info-base) !important;z-index:1}";
5
+
6
+ const CuraSwitch = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.onchange = createEvent(this, "onchange", 7);
10
+ this.sizes = {
11
+ "large": { size: 64 },
12
+ "medium": { size: 48 },
13
+ "small": { size: 40 },
14
+ };
15
+ this.isDarkbackground = () => this.background === 'dark';
16
+ this.toggleSwitch = () => {
17
+ if (this.disabled)
18
+ return null;
19
+ this.checked = !this.checked;
20
+ this.onchange.emit({ checked: this.checked });
21
+ };
22
+ this.checked = false;
23
+ this.disabled = false;
24
+ this.label = '';
25
+ this.ontabindex = 0;
26
+ this.position = 'left';
27
+ this.size = 'medium';
28
+ this.background = 'light';
29
+ this.color = 'accent';
30
+ this.styles = {};
31
+ }
32
+ sizeHandler() {
33
+ this.styles['--size-track'] = `${this.sizes[this.size].size}px`;
34
+ this.styles['--size'] = `${formsSizes[this.size].size}px`;
35
+ this.styles['--gap'] = `${formsSizes[this.size].gap}px`;
36
+ }
37
+ setColors() {
38
+ const colors = [
39
+ { name: '--info-base', background: 'info-base' },
40
+ { name: '--neutral-medium', background: 'neutral-medium' },
41
+ { name: '--color-lighter', background: `${this.color}-lighter` },
42
+ { name: '--color-base-lighter-50', background: `${this.color}-${this.isDarkbackground() ? 'base' : 'lighter'}`, opacity: 0.5 },
43
+ { name: '--color-base-light', background: `${this.color}-${this.isDarkbackground() ? 'base' : 'light'}` },
44
+ { name: '--color-dark-light', background: `${this.color}-${this.isDarkbackground() ? 'dark' : 'light'}` },
45
+ { name: '--primary-lighter-neutral-dark', background: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark' },
46
+ { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },
47
+ { name: '--neutral-white-purewhite', background: `neutral-${this.isDarkbackground() ? 'white' : 'purewhite'}` },
48
+ { name: '--primary-base-neutral-black-20', background: `${this.isDarkbackground() ? 'primary-base' : 'neutral-black'}`, opacity: 0.2 },
49
+ { name: '--neutral-base-black-40', background: `neutral-${this.isDarkbackground() ? 'base' : 'black'}`, opacity: 0.4 },
50
+ { name: '--primary-dark-neutral-base', background: `${this.isDarkbackground() ? 'primary-dark' : 'neutral-base'}` },
51
+ { name: '--neutral-lighter', background: `${this.isDarkbackground() ? 'primary-base' : 'neutral-lighter'}` },
52
+ ];
53
+ colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color === null || color === void 0 ? void 0 : color.opacity));
54
+ }
55
+ connectedCallback() {
56
+ this.sizeHandler();
57
+ this.setColors();
58
+ }
59
+ assignColor(colorDark, colorLight) {
60
+ if (this.disabled)
61
+ return this.isDarkbackground() ? 'primary-base' : 'neutral-medium';
62
+ return this.isDarkbackground() ? colorDark : colorLight;
63
+ }
64
+ getClasses() {
65
+ const classes = {};
66
+ classes['container'] = true;
67
+ classes['checked'] = this.checked;
68
+ classes['disabled'] = this.disabled;
69
+ classes['position'] = this.position === 'right';
70
+ return classes;
71
+ }
72
+ render() {
73
+ return (h(Host, null, h("div", { class: this.getClasses(), style: this.styles }, h("div", { class: "info" }, h("cura-label", { class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', lineHeight: "125%", color: this.assignColor('neutral-white', 'neutral-black') }, this.label), h("cura-label", { color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, h("slot", null))), h("div", { onClick: this.toggleSwitch, class: "control" }, h("div", { class: `track ${this.size.toLowerCase()}` }, h("div", { class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
74
+ }
75
+ static get watchers() { return {
76
+ "size": ["sizeHandler"],
77
+ "color": ["setColors"],
78
+ "background": ["setColors"]
79
+ }; }
80
+ };
81
+ CuraSwitch.style = curaSwitchCss;
82
+
83
+ export { CuraSwitch as cura_switch };
84
+
85
+ //# sourceMappingURL=cura-switch.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-switch.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,qtEAAqtE;;MCS9tE,UAAU;;;;IA0CrB,UAAK,GAAG;MACN,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;MACrB,QAAQ,EAAE,EAAE,IAA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IACxD,IAAI,CAAC,KAAK,CACA,EACb,kBACE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,SAAS,IACf,eAAa,CACF,CACT,EAEN,WAAK,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,EAAC,SAAS,IAC9C,WAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAC5C,WAAK,KAAK,EAAE,SAAS,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,GAAQ,CAC7E,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;","names":[],"sources":["./src/components/forms/cura-switch/cura-switch.scss?tag=cura-switch&encapsulation=shadow","./src/components/forms/cura-switch/cura-switch.tsx"],"sourcesContent":[":host {\n display: block;\n width: fit-content;\n box-sizing: border-box;\n}\n\n.container {\n display: flex;\n align-items: center;\n flex-direction: row-reverse;\n gap: var(--gap);\n}\n\n.position {\n\n &.container {\n flex-direction: row;\n }\n\n .label {\n text-align: right;\n }\n\n .message {\n text-align: right;\n }\n}\n\n.control {\n width: fit-content;\n}\n\n/* Estilos para o controle de switch */\n.track {\n background: var(--neutral-base-black-40);\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}\n\n.thumb {\n background-color: var(--neutral-white-purewhite);\n border: 2px solid var(--neutral-medium);\n border-radius: 50%;\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}\n\n/* Estado \"checked\" */\n.checked .thumb {\n border-color: var(--color-dark-light);\n background: var(--color-lighter);\n transform: translateX(var(--size));\n}\n\n.checked .thumb:hover {\n background: var(--neutral-white-purewhite) !important;\n}\n\n.checked .track {\n background: var(--color-base-lighter-50);\n}\n\n/* Estado \"disabled\" */\n\n.disabled .track {\n background: var(--primary-base-neutral-black-20);\n\n}\n\n.disabled .thumb {\n background: var(--neutral-lighter) !important;\n border-color: var(--primary-dark-neutral-base);\n cursor: not-allowed;\n\n}\n\n.disabled.checked .track {\n background: var(--primary-base-neutral-black-20);\n}\n\n.disabled .thumb:hover {\n background: var(--neutral-lighter) !important;\n border-color: var(--primary-dark-neutral-base) !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-light);\n background: var(--color-lighter);\n}\n\n/* Estado hover para não disabled */\n:not(.disabled) .thumb:focus {\n border-color: var(--info-base) !important;\n z-index: 1;\n}\n","import { Component, Prop, Event, h, Host, Watch, EventEmitter, State } 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})\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 @State() styles = {};\n\n @Event({ eventName: 'onchange', composed: true, cancelable: true, bubbles: true }) onchange: EventEmitter<{ checked: boolean }>;\n\n sizes = {\n \"large\": { size: 64 },\n \"medium\": { size: 48 },\n \"small\": { size: 40 },\n };\n\n\n isDarkbackground = () => this.background === 'dark';\n\n @Watch('size')\n sizeHandler() {\n this.styles['--size-track'] = `${this.sizes[this.size].size}px`\n this.styles['--size'] = `${formsSizes[this.size].size}px`\n this.styles['--gap'] = `${formsSizes[this.size].gap}px`\n }\n\n @Watch('color')\n @Watch('background')\n setColors() {\n const colors = [\n { name: '--info-base', background: 'info-base' },\n { name: '--neutral-medium', background: 'neutral-medium' },\n { name: '--color-lighter', background: `${this.color}-lighter` },\n { name: '--color-base-lighter-50', background: `${this.color}-${this.isDarkbackground() ? 'base' : 'lighter'}`, opacity: 0.5 },\n { name: '--color-base-light', background: `${this.color}-${this.isDarkbackground() ? 'base' : 'light'}` },\n { name: '--color-dark-light', background: `${this.color}-${this.isDarkbackground() ? 'dark' : 'light'}` },\n { name: '--primary-lighter-neutral-dark', background: this.isDarkbackground() ? 'primary-lighter' : 'neutral-dark' },\n { name: '--primary-base-neutral-medium', background: this.isDarkbackground() ? 'primary-base' : 'neutral-medium' },\n { name: '--neutral-white-purewhite', background: `neutral-${this.isDarkbackground() ? 'white' : 'purewhite'}` },\n { name: '--primary-base-neutral-black-20', background: `${this.isDarkbackground() ? 'primary-base' : 'neutral-black'}`, opacity: 0.2 },\n { name: '--neutral-base-black-40', background: `neutral-${this.isDarkbackground() ? 'base' : 'black'}`, opacity: 0.4 },\n { name: '--primary-dark-neutral-base', background: `${this.isDarkbackground() ? 'primary-dark' : 'neutral-base'}` },\n { name: '--neutral-lighter', background: `${this.isDarkbackground() ? 'primary-base' : 'neutral-lighter'}` },\n ];\n\n colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.background, color?.opacity));\n }\n\n connectedCallback() {\n this.sizeHandler()\n this.setColors();\n }\n\n toggleSwitch = () => {\n if (this.disabled) return null;\n\n this.checked = !this.checked;\n this.onchange.emit({ checked: this.checked })\n };\n\n assignColor(colorDark: string, colorLight: string) {\n if (this.disabled) return this.isDarkbackground() ? 'primary-base' : 'neutral-medium';\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\n render() {\n return (\n <Host>\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"info\">\n <cura-label class=\"label\"\n size={this.size === 'large' ? 'medium' : 'xsmall'}\n lineHeight=\"125%\"\n color={this.assignColor('neutral-white', 'neutral-black')}>\n {this.label}\n </cura-label>\n <cura-label\n color={this.assignColor('primary-lighter', 'neutral-dark')}\n size=\"xsmall\"\n class=\"message\">\n <slot></slot>\n </cura-label>\n </div>\n\n <div onClick={this.toggleSwitch} 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}
package/dist/esm/cura.js CHANGED
@@ -1,6 +1,6 @@
1
- import { p as plt, w as win, a as promiseResolve, b as bootstrapLazy } from './index-d99da69e.js';
2
- export { s as setNonce } from './index-d99da69e.js';
3
- import { g as globalScripts } from './app-globals-cc003eaf.js';
1
+ import { p as plt, w as win, a as promiseResolve, b as bootstrapLazy } from './index-81f1a268.js';
2
+ export { s as setNonce } from './index-81f1a268.js';
3
+ import { g as globalScripts } from './app-globals-29001758.js';
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com
@@ -25,7 +25,7 @@ const patchBrowser = () => {
25
25
 
26
26
  patchBrowser().then(options => {
27
27
  globalScripts();
28
- return bootstrapLazy([["cura-accordion_12",[[1,"cura-button",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-button-outline",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-button-transparent",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"colorMode":[1,"color-mode"],"opened":[1540],"styles":[32]}],[1,"cura-icons-view",{"selected":[32]}],[1,"cura-accordion",{"color":[513],"activeColor":[513,"active-color"],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"behavior":[513],"styles":[32]}],[1,"cura-display",{"level":[514],"size":[513],"inverted":[516],"spotColor":[513,"spot-color"]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"inverted":[516],"spotColor":[513,"spot-color"]}],[1,"cura-page-template",{"contentwidth":[513]}],[1,"cura-paragraph",{"size":[513],"inverted":[516],"spotColor":[513,"spot-color"],"color":[8],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]]], options);
28
+ return bootstrapLazy([["cura-accordion_8",[[1,"cura-button",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}],[1,"cura-accordion-item",{"label":[513],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"colorMode":[1,"color-mode"],"opened":[1540],"styles":[32]}],[1,"cura-accordion",{"color":[513],"activeColor":[513,"active-color"],"colorMode":[513,"color-mode"],"iconSize":[514,"icon-size"],"openIcon":[513,"open-icon"],"closeIcon":[513,"close-icon"],"iconColor":[513,"icon-color"],"iconActiveColor":[513,"icon-active-color"],"behavior":[513],"styles":[32]}],[1,"cura-page-template",{"contentwidth":[513]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-loader-circle",{"size":[513],"color":[513]}],[1,"cura-paragraph",{"size":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}],[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]],["cura-icons-view",[[1,"cura-icons-view",{"selected":[32]}]]],["cura-alert",[[1,"cura-alert",{"type":[1],"floating":[516],"label":[513],"closeable":[516],"styles":[32]}]]],["cura-checkbox",[[1,"cura-checkbox",{"checked":[1540],"indeterminate":[1540],"status":[1537],"disabled":[516],"required":[516],"label":[513],"ontabindex":[514],"position":[513],"value":[513],"name":[513],"size":[513],"background":[1],"iconColor":[1,"icon-color"],"color":[1],"styles":[32]}]]],["cura-input-text",[[1,"cura-input-text",{"mode":[1537],"status":[1537],"size":[1537],"type":[513],"label":[513],"placeholder":[513],"value":[1032],"iconName":[1537,"icon-name"],"helperText":[1537,"helper-text"],"disabled":[516],"required":[516],"maskPreset":[8,"mask-preset"],"maskRegex":[1537,"mask-regex"],"maskAdvanced":[1537,"mask-advanced"],"maxlength":[1538],"readOnly":[516,"read-only"],"isLoading":[1540,"is-loading"],"clearIcon":[1540,"clear-icon"],"isHovered":[32],"isFocused":[32],"styles":[32]}]]],["cura-button-outline",[[1,"cura-button-outline",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-button-transparent",[[1,"cura-button-transparent",{"size":[513],"disabled":[516],"isLoading":[516,"is-loading"],"iconName":[513,"icon-name"],"iconset":[513],"iconPosition":[513,"icon-position"],"iconOnly":[516,"icon-only"],"href":[513],"target":[513],"color":[1],"fontColor":[513,"font-color"],"textAlign":[513,"text-align"],"styles":[32]}]]],["cura-radio",[[1,"cura-radio",{"checked":[1540],"status":[1537],"disabled":[516],"required":[516],"label":[513],"ontabindex":[514],"position":[513],"value":[513],"name":[513],"background":[1],"size":[1],"color":[1],"styles":[32]}]]],["cura-button-select",[[1,"cura-button-select",{"size":[513],"disabled":[516],"selected":[516],"iconPosition":[513,"icon-position"],"color":[1],"background":[1],"fontcolor":[1],"hovered":[32],"styles":[32]}]]],["cura-switch",[[1,"cura-switch",{"checked":[1540],"disabled":[516],"label":[513],"ontabindex":[514],"position":[513],"size":[513],"background":[1],"color":[1],"styles":[32]}]]],["cura-display",[[1,"cura-display",{"level":[514],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]],["cura-label",[[1,"cura-label",{"size":[513],"weight":[513],"spotColor":[513,"spot-color"],"color":[1],"marginBlock":[513,"margin-block"],"lineHeight":[513,"line-height"],"styles":[32]}]]]], options);
29
29
  });
30
30
 
31
31
  //# sourceMappingURL=cura.js.map
@@ -427,6 +427,19 @@ const parsePropertyValue = (propValue, propType) => {
427
427
  return propValue;
428
428
  };
429
429
  const getElement = (ref) => (getHostRef(ref).$hostElement$ );
430
+ const createEvent = (ref, name, flags) => {
431
+ const elm = getElement(ref);
432
+ return {
433
+ emit: (detail) => {
434
+ return emitEvent(elm, name, {
435
+ bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
436
+ composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
437
+ cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
438
+ detail,
439
+ });
440
+ },
441
+ };
442
+ };
430
443
  /**
431
444
  * Helper function to create & dispatch a custom Event on a provided target
432
445
  * @param elm the target of the Event
@@ -581,6 +594,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
581
594
  }
582
595
  }
583
596
  }
597
+ else if (memberName === 'ref') {
598
+ // minifier will clean this up
599
+ if (newValue) {
600
+ newValue(elm);
601
+ }
602
+ }
584
603
  else if ((!isProp ) &&
585
604
  memberName[0] === 'o' &&
586
605
  memberName[1] === 'n') {
@@ -876,6 +895,7 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
876
895
  const vnode = vnodes[index];
877
896
  if (vnode) {
878
897
  const elm = vnode.$elm$;
898
+ nullifyVNodeRefs(vnode);
879
899
  if (elm) {
880
900
  {
881
901
  // we're removing this element
@@ -1334,6 +1354,19 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1334
1354
  }
1335
1355
  return slotNameAttr === '';
1336
1356
  };
1357
+ /**
1358
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
1359
+ * calling them with `null`. This signals that the DOM element corresponding to
1360
+ * the VDom node has been removed from the DOM.
1361
+ *
1362
+ * @param vNode a virtual DOM node
1363
+ */
1364
+ const nullifyVNodeRefs = (vNode) => {
1365
+ {
1366
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1367
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1368
+ }
1369
+ };
1337
1370
  /**
1338
1371
  * The main entry point for Stencil's virtual DOM-based rendering engine
1339
1372
  *
@@ -2211,6 +2244,6 @@ const flush = () => {
2211
2244
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2212
2245
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2213
2246
 
2214
- export { CSS as C, Host as H, promiseResolve as a, bootstrapLazy as b, getElement as g, h, plt as p, registerInstance as r, setNonce as s, win as w };
2247
+ export { CSS as C, Host as H, promiseResolve as a, bootstrapLazy as b, createEvent as c, getElement as g, h, plt as p, registerInstance as r, setNonce as s, win as w };
2215
2248
 
2216
- //# sourceMappingURL=index-d99da69e.js.map
2249
+ //# sourceMappingURL=index-81f1a268.js.map