@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 @@
1
+ {"version":3,"file":"cura-input-text.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-input-text/cura-input-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,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AsB,CAC/H;UACL,IAAI,CAAC,gBAAgB,EAAE,CACpB,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter } from '@stencil/core';\nimport IMask, { FactoryArg, InputMask, MaskedRegExp } from 'imask';\nimport { maskOptions, MaskOptionsMap } from './mask-presets/input-mask-presets';\nexport type MaskPreset = keyof MaskOptionsMap;\n@Component({\n tag: 'cura-input-text',\n styleUrl: 'cura-input-text.scss',\n shadow: true,\n})\nexport class CuraInputText {\n /**\n * Mode of the input: 'default' or 'transparent' (default: 'default')\n */\n @Prop({ reflect: true, mutable: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Indicates input status(default: default)\n */\n\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n\n /**\n * Size of the input mode default: 'small', 'medium', or 'large' (default: 'medium')\n */\n @Prop({ reflect: true, mutable: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) type: 'text' | 'number' = 'text';\n\n /**\n * Label text for the input\n */\n @Prop({ reflect: true }) label: string = '';\n\n /**\n * Placeholder text for the input\n */\n @Prop({ reflect: true }) placeholder?: string | null = null;\n /**\n * Value of the input field\n */\n @Prop({ mutable: true }) value: string | number;\n /**\n * Whether to display a cura icon (default: null)\n */\n @Prop({ reflect: true, mutable: true }) iconName?: string = '';\n\n /**\n * Helper text displayed below the input\n */\n @Prop({ reflect: true, mutable: true }) helperText?: string;\n\n /**\n * Whether the input is disabled (default: false)\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Whether the input is required (default: false)\n */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /**\n * Mask preset for input formatting: 'cpf', 'cnpj', 'phone', 'date', etc. Uses IMask library.\n * @see: https://imask.js.org/\n */\n @Prop() maskPreset?: MaskPreset;\n\n /**\n * Regular expression for custom input masking. Uses IMask library.\n * @see: https://imask.js.org/\n */\n @Prop({ reflect: true, mutable: true }) maskRegex?: MaskedRegExp['mask'] | string | null;\n\n /**\n * Advanced mask object to be used with IMask library\n * @see: https://imask.js.org/\n */\n @Prop({ reflect: true, mutable: true }) maskAdvanced?: FactoryArg | string | null;\n\n /**\n * Maximum length of the input value (default: undefined)\n */\n @Prop({ reflect: true, mutable: true }) maxlength?: number | undefined;\n\n /**\n * Whether the input is read-only (default: false)\n */\n @Prop({ reflect: true}) readOnly?: boolean = false;\n\n /**\n * Whether the input is in loading state (default: false)\n */\n @Prop({ reflect: true, mutable: true }) isLoading?: boolean = false;\n\n /**\n * Internal state: Whether the input is hovered (default: false)\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused (default: false)\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Styles object for dynamic styling\n */\n @State() styles: { [key: string]: string } = {};\n\n /**\n * Icon button name for the clear button (default: 'closeCircle')\n */\n @Prop({ reflect: true, mutable: true }) clearIcon?: boolean = true;\n\n /**\n * Emitted when the value of the input changes\n * @type {EventEmitter<string | number>}\n */\n @Event() valueChange: EventEmitter<string | number>;\n\n inputRef!: HTMLInputElement;\n\n /**\n * Instance of InputMask is returned when IMask constructor is called.\n */\n maskedInput: InputMask<FactoryArg>;\n weights: { [key: string]: string };\n\n @Watch('styles')\n connectedCallback() {\n this.styles['--primary-base'] = window.CuraAPI.theme.colors.getColor(`primary-base`);\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.styles['--neutral-medium'] = window.CuraAPI.theme.colors.getColor(`neutral-medium`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--success-dark'] = window.CuraAPI.theme.colors.getColor(`success-dark`);\n this.styles['--success-darker'] = window.CuraAPI.theme.colors.getColor(`success-darker`);\n this.styles['--success-lighter'] = window.CuraAPI.theme.colors.getColor(`success-lighter`);\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor(`error-lighter`);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor(`error-dark`);\n this.styles['--error-darker'] = window.CuraAPI.theme.colors.getColor(`error-darker`);\n this.styles['--error-base'] = window.CuraAPI.theme.colors.getColor(`error-base`);\n this.styles['--info-base'] = window.CuraAPI.theme.colors.getColor(`info-base`);\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--font-weight-bold'] = this.weights.bold;\n this.styles['--font-weight-regular'] = this.weights.regular;\n }\n\n @Watch('size')\n getClasses() {\n return {\n [this.size.toLowerCase()]: this.mode === 'default',\n disabled: this.disabled,\n isLoading: this.isLoading,\n isFocused: this.isFocused && !this.disabled && !this.readOnly && !this.isLoading,\n isHovered: this.isHovered,\n isSuccess: this.status === 'success',\n isError: this.status === 'error',\n transparent: this.mode === 'transparent',\n };\n }\n\n getLabelColor() {\n if (!!this.disabled) {\n return 'neutral-medium';\n } else if (this.isLoading && this.mode === 'transparent' && !this.isHovered) {\n return 'neutral-dark';\n } else if (((this.isFocused || this.isHovered || this.status === 'success' || this.status === 'error') && !this.readOnly) || this.isHovered) {\n return 'neutral-black';\n } else {\n return 'neutral-dark';\n }\n }\n\n @Watch('status')\n @Watch('mode')\n renderIcon() {\n if ((!this.iconName && this.status === 'default') || (this.mode === 'transparent' && this.isLoading) || (this.mode === 'transparent' && this.status === 'default')) {\n return;\n }\n\n const iconSizeDefaultMode = this.size === 'large' ? 20 : 16;\n const baseIconSize = this.mode === 'transparent' ? 20 : iconSizeDefaultMode;\n\n const iconMap: { [key: string]: { name: string; color: string } } = {\n loading: { name: this.iconName, color: 'primary-base' },\n success: { name: 'checkCircle', color: 'success-dark' },\n error: { name: 'alertCircle', color: 'error-dark' },\n default: { name: this.iconName, color: 'neutral-dark' },\n };\n\n const iconConfig = iconMap[this.isLoading ? 'loading' : this.status || 'default'];\n\n return (\n <div class='feedback-icon' style={this.styles}>\n <cura-icon name={iconConfig.name} iconset='default' size={baseIconSize} color={iconConfig.color} />\n </div>\n );\n }\n renderHelperText() {\n const isError = this.status === 'error';\n const isSuccess = this.status === 'success';\n const isDefault = this.status === 'default';\n\n const helperTextSize = this.size === 'large' ? 'small' : 'xsmall';\n const helperTextWeight = this.mode === 'transparent' ? 'bold' : 'regular';\n\n const colorText = (() => {\n if (this.disabled) return 'neutral-medium';\n if (this.isLoading) return 'primary-base';\n if (this.isFocused || this.isHovered) return 'neutral-black';\n return 'neutral-dark';\n })();\n\n return (\n <div style={this.styles} class='helper-text'>\n {isDefault && (\n <cura-label size={helperTextSize} color={colorText} weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n {isError && (\n <cura-label size={helperTextSize} lineHeight='xsmall' color='error-dark' weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n {isSuccess && (\n <cura-label size={helperTextSize} color='success-dark' weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n </div>\n );\n }\n\n componentDidLoad() {\n this.initializeMask();\n }\n\n handleMouseEnter() {\n this.isHovered = true;\n }\n handleMouseLeave() {\n this.isHovered = false;\n }\n handleMaskUpdate() {\n if (!!this.maskedInput) {\n this.maskedInput.updateValue();\n }\n }\n handleClearInput() {\n this.handleMaskUpdate();\n\n this.value = '';\n this.inputRef.value = '';\n this.handleMaskUpdate();\n }\n handleInputFocus() {\n this.handleMaskUpdate();\n this.isFocused = true;\n }\n handleInputBlur() {\n this.handleMaskUpdate();\n setTimeout(() => {\n this.isFocused = false;\n }, 150);\n }\n @Watch('maskPreset')\n handleMaskPresetChange() {\n this.initializeMask();\n }\n\n @Watch('maskRegex')\n handleMaskRegexChange() {\n this.initializeMask();\n }\n\n @Watch('maskAdvanced')\n handlemaskAdvancedChange() {\n this.initializeMask();\n }\n\n @Watch('value')\n handleValueChange(newValue: string) {\n if (this.maskedInput && this.maskedInput.value !== newValue) {\n this.maskedInput.value = newValue;\n }\n }\n\n initializeMask() {\n if (this.maskedInput) {\n this.maskedInput.destroy();\n }\n \n if (!!this.maskRegex) {\n if (typeof this.maskRegex === 'string') {\n const cleanedRegexString = (this.maskRegex as string).replace(/^\\/|\\/[gimsuy]*$/g, '');\n\n const flags = ((this.maskRegex as string).match(/\\/[gimsuy]*$/g) || [''])[0].slice(1);\n this.maskedInput = IMask(this.inputRef, { mask: new RegExp(cleanedRegexString, flags) });\n this.handleMaskUpdate();\n } else {\n this.maskedInput = IMask(this.inputRef, { mask: this.maskRegex });\n this.handleMaskUpdate();\n }\n } else if (!!this.maskPreset) {\n const options = maskOptions[this.maskPreset];\n\n if (!options) {\n console.error(`Mask preset \"${this.maskPreset}\" not found.`);\n return;\n }\n\n this.maskedInput = IMask(this.inputRef, options);\n\n if (options === Date) {\n if (this.value) {\n this.maskedInput.typedValue = this.value;\n }\n } else if (options === Number) {\n if (this.value) {\n this.maskedInput.typedValue = this.value;\n }\n } else {\n this.maskedInput.value = this.value as string || '';\n }\n } else if (!!this.maskAdvanced) {\n try {\n if (this.maskAdvanced.constructor === Object) {\n this.maskedInput = IMask(\n this.inputRef, this.maskAdvanced,\n );\n }else if(typeof this.maskAdvanced === 'string' ){\n this.maskedInput = IMask(\n this.inputRef, JSON.parse(this.maskAdvanced),\n );\n }\n } catch (error) {\n console.error('Erro ao definir a maskAdvanced:', error);\n }\n }\n this.handleMaskUpdate();\n }\n\n handleInputChange(event: any) {\n const inputValue = (event.target as HTMLInputElement).value;\n if(this.type === 'number'){\n const numericValue = parseFloat(inputValue);\n if (!isNaN(numericValue)) {\n this.value = numericValue;\n this.valueChange.emit(numericValue);\n \n \n } else {\n console.error('Invalid input:', inputValue);\n }\n } \n\n if (this.maskedInput) {\n if (this.maskedInput.mask instanceof Date || this.maskedInput.mask === Number) {\n this.maskedInput.typedValue = inputValue;\n this.value = this.maskedInput.typedValue;\n } else {\n this.maskedInput.value = inputValue;\n this.value = this.maskedInput.value;\n }\n }\n\n this.value = inputValue;\n this.valueChange.emit(this.value);\n }\n handleKeyDown(event: KeyboardEvent) {\n this.handleMaskUpdate();\n this.type === 'number' ? this.handleBlockInvalidNumber(event) : undefined;\n }\n handleBlockInvalidNumber(e: KeyboardEvent) {\n return ['e', 'E', '+', '-'].includes(e.key) && e.preventDefault();\n }\n render() {\n \n return (\n <Host>\n <div\n style={this.styles}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n class={{\n 'cura-input-group': true,\n ...this.getClasses(),\n }}\n >\n <div class='input-wrapper'>\n {this.label && (\n <cura-label class='label' weight='bold' size={this.size === 'large' ? 'small' : 'xsmall'} color={this.getLabelColor()}>\n {this.label} {this.required && <span class='required'>* </span>}\n </cura-label>\n )}\n <div class='cura-input-field' style={this.styles}>\n {this.renderIcon()}\n <input\n type={this.type}\n autocomplete='off'\n aria-autocomplete='none'\n aria-required={this.required ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-invalid={this.status === 'error' ? 'true' : 'false'}\n aria-readonly={this.readOnly ? 'true' : 'false'}\n onKeyDown={event => this.handleKeyDown(event)}\n onBlur={this.handleInputBlur.bind(this)}\n onFocus={this.handleInputFocus.bind(this)}\n onInput={event => this.handleInputChange(event)}\n class={this.getClasses()}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled || this.isLoading}\n required={this.required}\n readonly={this.readOnly}\n maxlength={this.maxlength}\n value={this.value}\n ref={ref => (this.inputRef = ref)}\n />\n {!!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (\n <cura-icon\n size={this.size === 'large' ? 20 : 16}\n color='primary-base'\n name='closeCircle'\n iconset='default'\n class='clear-button'\n onClick={() => this.handleClearInput()}\n />\n )}\n {this.isLoading && <cura-loader-circle size={this.size === 'large' ? 'medium' : 'small'} color='primary-base'></cura-loader-circle>}\n </div>\n {this.renderHelperText()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,224 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s)
4
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import iconNames from '../../../assets/icons/iconset-default-list';
14
+ import { maskOptions } from './mask-presets/input-mask-presets';
15
+ const renderCuraInputText = (helperText, args) => {
16
+ const block = `<cura-input-text ${args.mode && args.mode !== 'default' ? `
17
+ mode="${args.mode}" ` : ''}${args.status && args.status !== 'default' ? `
18
+ status="${args.status}" ` : ''}${args.size && args.size !== 'medium' ? `
19
+ size="${args.size}" ` : ''}${args.type && args.type !== 'text' ? `
20
+ type="${args.type}" ` : ''}${args.maskPreset ? `
21
+ mask-preset="${args.maskPreset}" ` : ''}${args.maskRegex ? `
22
+ mask-regex="${args.maskRegex}" ` : ''}${args.maskAdvanced ? `
23
+ mask-advanced=${JSON.stringify(args.maskAdvanced)} ` : ''}${args.placeholder ? `
24
+ placeholder="${args.placeholder}" ` : ''}${args.value ? `
25
+ value="${args.value}" ` : ''}${args.label ? `
26
+ label="${args.label}"` : ''} ${args.iconName ? `
27
+ icon-name="${args.iconName}"` : ''}${args.clearIcon !== true ? `
28
+ clear-icon="${args.clearIcon}"` : ''}${args.disabled ? `
29
+ disabled="${args.disabled}"` : ''}${args.required ? `
30
+ required="${args.required}"` : ''}${args.isLoading ? `
31
+ is-loading="${args.isLoading}"` : ''}${args.maxlength ? `
32
+ maxlength="${args.maxlength}"` : ''}${args.readOnly ? `
33
+ read-only="${args.readOnly}"` : ''}>
34
+ ${helperText ? `${helperText}` : ''}
35
+ </cura-input-text>
36
+ `;
37
+ return `${block}`;
38
+ };
39
+ export default {
40
+ title: 'Componentes/Forms/InputText',
41
+ tags: ['autodocs'],
42
+ render: (_a) => {
43
+ var { helperText } = _a, args = __rest(_a, ["helperText"]);
44
+ return renderCuraInputText(helperText, args);
45
+ },
46
+ argTypes: {
47
+ mode: {
48
+ control: { type: 'inline-radio' },
49
+ options: ['default', 'transparent'],
50
+ description: 'Modo de exibição do input.',
51
+ table: {
52
+ category: 'Properties',
53
+ defaultValue: { summary: 'default' },
54
+ },
55
+ },
56
+ status: {
57
+ control: { type: 'inline-radio' },
58
+ options: ['default', 'success', 'error'],
59
+ description: 'Status do input.',
60
+ table: {
61
+ category: 'State',
62
+ defaultValue: { summary: 'default' },
63
+ },
64
+ },
65
+ size: {
66
+ control: { type: 'inline-radio' },
67
+ options: ['small', 'medium', 'large'],
68
+ description: 'Tamanho do input.',
69
+ table: {
70
+ category: 'Properties',
71
+ defaultValue: { summary: 'medium' },
72
+ },
73
+ },
74
+ type: {
75
+ control: { type: 'inline-radio' },
76
+ options: ['text', 'number', 'password'],
77
+ description: 'Tipo do input.',
78
+ table: {
79
+ category: 'Properties',
80
+ defaultValue: { summary: 'text' },
81
+ },
82
+ },
83
+ label: {
84
+ control: 'text',
85
+ description: 'Texto da label do input.',
86
+ required: false,
87
+ table: {
88
+ category: 'Properties',
89
+ },
90
+ },
91
+ placeholder: {
92
+ control: 'text',
93
+ description: 'Texto de placeholder do input.',
94
+ required: false,
95
+ table: {
96
+ category: 'Properties',
97
+ },
98
+ },
99
+ helperText: {
100
+ control: 'text',
101
+ description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',
102
+ table: {
103
+ category: 'Slots',
104
+ },
105
+ },
106
+ value: {
107
+ control: 'text',
108
+ description: 'Valor do campo de input. Tipo string para type=text e number para type=number',
109
+ table: {
110
+ category: 'Properties',
111
+ },
112
+ },
113
+ maskPreset: {
114
+ control: { type: 'select' },
115
+ options: ['', ...Object.keys(maskOptions)],
116
+ description: 'Opção de máscara para formatação do input de texto',
117
+ required: false,
118
+ table: {
119
+ category: 'Mask',
120
+ },
121
+ },
122
+ maskRegex: {
123
+ control: 'text',
124
+ description: 'Expressão regular para máscara de input de texto. <br/> Ex.: <code>"/^\\d+$/g"</code> ou <code>/^[0-6]+$/</code>',
125
+ required: false,
126
+ table: {
127
+ category: 'Mask',
128
+ },
129
+ },
130
+ maskAdvanced: {
131
+ control: { type: 'object' },
132
+ description: 'Objeto para configuração da máscara de input de texto customizada seguindo a estrutura do IMask.Masked da lib <a href="https://imask.js.org/">IMask.js</a>. <br/> Ex.:<code>{ "mask": "000.000.000-00", "placeholderChar": "_"}</code>',
133
+ required: false,
134
+ table: {
135
+ category: 'Mask',
136
+ defaultValue: { summary: JSON },
137
+ },
138
+ },
139
+ required: {
140
+ control: 'boolean',
141
+ description: 'Se o input é obrigatório.',
142
+ table: {
143
+ category: 'Properties',
144
+ defaultValue: { summary: false },
145
+ },
146
+ },
147
+ maxlength: {
148
+ control: 'number',
149
+ description: 'Comprimento máximo do valor do input.',
150
+ required: false,
151
+ table: {
152
+ category: 'Properties',
153
+ defaultValue: { summary: null },
154
+ },
155
+ },
156
+ clearIcon: {
157
+ control: 'boolean',
158
+ description: 'Ícone para limpar campo de input.',
159
+ table: {
160
+ category: 'Icons',
161
+ defaultValue: { summary: true },
162
+ },
163
+ },
164
+ iconName: {
165
+ control: { type: 'select' },
166
+ options: ['', ...iconNames],
167
+ description: 'Nome do ícone de feedback. Usado no mode="default"',
168
+ required: false,
169
+ table: {
170
+ category: 'Icons',
171
+ defaultValue: { summary: '' },
172
+ },
173
+ },
174
+ disabled: {
175
+ control: 'boolean',
176
+ description: 'Se o input está desabilitado.',
177
+ table: {
178
+ category: 'State',
179
+ defaultValue: { summary: false },
180
+ },
181
+ },
182
+ readOnly: {
183
+ control: 'boolean',
184
+ description: 'Se o input é somente leitura.',
185
+ category: 'State',
186
+ required: false,
187
+ table: {
188
+ category: 'State',
189
+ defaultValue: { summary: false },
190
+ },
191
+ },
192
+ isLoading: {
193
+ control: 'boolean',
194
+ description: 'Se o input está em estado de carregamento.',
195
+ table: {
196
+ category: 'State',
197
+ defaultValue: { summary: false },
198
+ },
199
+ },
200
+ },
201
+ };
202
+ export const InputText = {
203
+ args: {
204
+ mode: 'default',
205
+ status: 'default',
206
+ size: 'medium',
207
+ type: 'text',
208
+ label: 'Label text',
209
+ placeholder: 'Placeholder',
210
+ value: '',
211
+ iconName: 'secure',
212
+ clearIcon: true,
213
+ helperText: 'Helper/Validation txt.',
214
+ maskPreset: undefined,
215
+ maskRegex: undefined,
216
+ maskAdvanced: null,
217
+ disabled: false,
218
+ required: false,
219
+ isLoading: false,
220
+ readOnly: false,
221
+ maxlength: null,
222
+ },
223
+ };
224
+ //# sourceMappingURL=cura-input-text.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cura-input-text.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-input-text/cura-input-text.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAE,IAAS,EAAE,EAAE;EAC5D,MAAM,KAAK,GAAG,oBAAoB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC;UACjE,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;YAC9D,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;UAC/D,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;UACzD,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;iBAChC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;gBAC7C,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;kBAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;iBAChE,IAAI,CAAC,WAAW,IAAI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EAAE,SAAS;IACjB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,YAAY;IACnB,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,wBAAwB;IACpC,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,SAAS;IACpB,YAAY,EAAE,IAAI;IAClB,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,IAAI;GAChB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\nimport { maskOptions } from './mask-presets/input-mask-presets';\n\nconst renderCuraInputText = (helperText: string, args: any) => {\n const block = `<cura-input-text ${args.mode && args.mode !== 'default' ? `\n mode=\"${args.mode}\" ` : ''}${args.status && args.status !== 'default' ? `\n status=\"${args.status}\" ` : ''}${args.size && args.size !== 'medium' ? `\n size=\"${args.size}\" ` : ''}${args.type && args.type !== 'text' ? `\n type=\"${args.type}\" ` : ''}${args.maskPreset ? `\n mask-preset=\"${args.maskPreset}\" ` : ''}${args.maskRegex ? `\n mask-regex=\"${args.maskRegex}\" ` : ''}${args.maskAdvanced ? `\n mask-advanced=${JSON.stringify(args.maskAdvanced)} ` : ''}${args.placeholder ? `\n placeholder=\"${args.placeholder}\" ` : ''}${args.value ? `\n value=\"${args.value}\" ` : ''}${args.label ? `\n label=\"${args.label}\"` : ''} ${args.iconName ? `\n icon-name=\"${args.iconName}\"` : ''}${args.clearIcon !== true ? `\n clear-icon=\"${args.clearIcon}\"` : ''}${args.disabled ? `\n disabled=\"${args.disabled}\"` : ''}${args.required ? `\n required=\"${args.required}\"` : ''}${args.isLoading ? `\n is-loading=\"${args.isLoading}\"` : ''}${args.maxlength ? `\n maxlength=\"${args.maxlength}\"` : '' }${args.readOnly ? `\n read-only=\"${args.readOnly}\"` : ''}>\n ${helperText ? `${helperText}` : '' }\n</cura-input-text>\n`;\n return `${block}`;\n};\n\nexport default {\n title: 'Componentes/Forms/InputText',\n tags: ['autodocs'],\n\n render: ({ helperText, ...args }) => {\n return renderCuraInputText(helperText, args);\n },\n argTypes: {\n mode: {\n control: { type: 'inline-radio' },\n options: ['default', 'transparent'],\n description: 'Modo de exibição do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'default' },\n },\n },\n status: {\n control: { type: 'inline-radio' },\n options: ['default', 'success', 'error'],\n description: 'Status do input.',\n table: {\n category: 'State',\n defaultValue: { summary: 'default' },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanho do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium' },\n },\n },\n type: {\n control: { type: 'inline-radio' },\n options: ['text', 'number', 'password'],\n description: 'Tipo do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'text' },\n },\n },\n label: {\n control: 'text',\n description: 'Texto da label do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n placeholder: {\n control: 'text',\n description: 'Texto de placeholder do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n helperText: {\n control: 'text',\n description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',\n table: {\n category: 'Slots',\n },\n },\n value: {\n control: 'text',\n description: 'Valor do campo de input. Tipo string para type=text e number para type=number',\n table: {\n category: 'Properties',\n\n },\n },\n maskPreset: {\n control: { type: 'select' },\n options: ['', ...Object.keys(maskOptions)],\n description: 'Opção de máscara para formatação do input de texto',\n required: false,\n table: {\n category: 'Mask',\n },\n },\n maskRegex: {\n control: 'text',\n description: 'Expressão regular para máscara de input de texto. <br/> Ex.: <code>\"/^\\\\d+$/g\"</code> ou <code>/^[0-6]+$/</code>',\n required: false,\n table: {\n category: 'Mask',\n },\n },\n maskAdvanced: {\n control: {type: 'object'},\n description:\n 'Objeto para configuração da máscara de input de texto customizada seguindo a estrutura do IMask.Masked da lib <a href=\"https://imask.js.org/\">IMask.js</a>. <br/> Ex.:<code>{ \"mask\": \"000.000.000-00\", \"placeholderChar\": \"_\"}</code>',\n required: false,\n table: {\n category: 'Mask',\n defaultValue: { summary: JSON },\n },\n },\n required: {\n control: 'boolean',\n description: 'Se o input é obrigatório.',\n table: {\n category: 'Properties',\n defaultValue: { summary: false },\n },\n },\n maxlength: {\n control: 'number',\n description: 'Comprimento máximo do valor do input.',\n required: false,\n table: {\n category: 'Properties',\n defaultValue: { summary: null },\n },\n },\n clearIcon: {\n control: 'boolean',\n\n description: 'Ícone para limpar campo de input.',\n table: {\n category: 'Icons',\n defaultValue: { summary: true },\n },\n },\n iconName: {\n control: { type: 'select' },\n options: ['', ...iconNames],\n description: 'Nome do ícone de feedback. Usado no mode=\"default\"',\n required: false,\n table: {\n category: 'Icons',\n defaultValue: { summary: '' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Se o input está desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n readOnly: {\n control: 'boolean',\n description: 'Se o input é somente leitura.',\n category: 'State',\n required: false,\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n isLoading: {\n control: 'boolean',\n description: 'Se o input está em estado de carregamento.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n },\n};\n\nexport const InputText = {\n args: {\n mode: 'default',\n status: 'default',\n size: 'medium',\n type: 'text',\n label: 'Label text',\n placeholder: 'Placeholder',\n value: '',\n iconName: 'secure',\n clearIcon: true,\n helperText: 'Helper/Validation txt.',\n maskPreset: undefined,\n maskRegex: undefined,\n maskAdvanced: null,\n disabled: false,\n required: false,\n isLoading: false,\n readOnly: false,\n maxlength: null,\n },\n};\n"]}
@@ -0,0 +1,46 @@
1
+ export const maskOptions = {
2
+ cpf_cnpj: {
3
+ mask: [{ mask: '000.000.000-00' }, { mask: '00.000.000/0000-00' }],
4
+ placeholderChar: '_',
5
+ },
6
+ cpf: {
7
+ mask: '000.000.000-00',
8
+ placeholderChar: '_',
9
+ },
10
+ cnpj: {
11
+ mask: '00.000.000/0000-00',
12
+ placeholderChar: '_',
13
+ },
14
+ phone: {
15
+ mask: '(00) 00000-0000',
16
+ blocks: {
17
+ '(00)': {
18
+ mask: '(00)',
19
+ maxLength: 2,
20
+ placeholderChar: '',
21
+ },
22
+ '00000': {
23
+ mask: '00000',
24
+ maxLength: 5,
25
+ placeholderChar: '_',
26
+ },
27
+ '-': {
28
+ mask: '-',
29
+ },
30
+ '0000': {
31
+ mask: '0000',
32
+ maxLength: 4,
33
+ placeholderChar: '_',
34
+ },
35
+ },
36
+ placeholderChar: '_',
37
+ },
38
+ date: {
39
+ mask: Date,
40
+ min: new Date(1900, 0, 1),
41
+ max: new Date(2099, 11, 31),
42
+ lazy: false,
43
+ placeholderChar: '_',
44
+ },
45
+ };
46
+ //# sourceMappingURL=input-mask-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-mask-presets.js","sourceRoot":"","sources":["../../../../../src/components/forms/cura-input-text/mask-presets/input-mask-presets.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,WAAW,GAAmB;EACzC,QAAQ,EAAE;IACR,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAClE,eAAe,EAAE,GAAG;GACrB;EACD,GAAG,EAAE;IACH,IAAI,EAAE,gBAAgB;IACtB,eAAe,EAAE,GAAG;GACrB;EACD,IAAI,EAAE;IACJ,IAAI,EAAE,oBAAoB;IAC1B,eAAe,EAAE,GAAG;GACrB;EAED,KAAK,EAAE;IACL,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE;MACN,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,CAAC;QACZ,eAAe,EAAE,EAAE;OACpB;MACD,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,CAAC;QACZ,eAAe,EAAE,GAAG;OACrB;MACD,GAAG,EAAE;QACH,IAAI,EAAE,GAAG;OACV;MACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,CAAC;QACZ,eAAe,EAAE,GAAG;OACrB;KACF;IACD,eAAe,EAAE,GAAG;GACrB;EACD,IAAI,EAAE;IACJ,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IACzB,GAAG,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC;IAC3B,IAAI,EAAE,KAAK;IACX,eAAe,EAAE,GAAG;GACrB;CACF,CAAC","sourcesContent":["import { FactoryArg } from 'imask/esm/index';\n\nexport type MaskOptionsMap = {\n [key: string]: FactoryArg;\n};\n\nexport const maskOptions: MaskOptionsMap = {\n cpf_cnpj: {\n mask: [{ mask: '000.000.000-00' }, { mask: '00.000.000/0000-00' }],\n placeholderChar: '_',\n },\n cpf: {\n mask: '000.000.000-00',\n placeholderChar: '_',\n },\n cnpj: {\n mask: '00.000.000/0000-00',\n placeholderChar: '_',\n },\n\n phone: {\n mask: '(00) 00000-0000',\n blocks: {\n '(00)': {\n mask: '(00)',\n maxLength: 2,\n placeholderChar: '',\n },\n '00000': {\n mask: '00000',\n maxLength: 5,\n placeholderChar: '_',\n },\n '-': {\n mask: '-',\n },\n '0000': {\n mask: '0000',\n maxLength: 4,\n placeholderChar: '_',\n },\n },\n placeholderChar: '_',\n },\n date: {\n mask: Date,\n min: new Date(1900, 0, 1),\n max: new Date(2099, 11, 31),\n lazy: false,\n placeholderChar: '_',\n },\n};\n"]}
@@ -0,0 +1,70 @@
1
+ /* Breakpoints variables */
2
+ /**
3
+ * Responsive media for mobile (small) only.
4
+ * Use: @include mobile-only() { ... }
5
+ */
6
+ /**
7
+ * Responsive media for medium only.
8
+ * Use: @include medium-only() { ... }
9
+ */
10
+ /**
11
+ * Responsive media for large only.
12
+ * Use: @include large-only() { ... }
13
+ */
14
+ /**
15
+ * Responsive media for xlarge only.
16
+ * Use: @include xlarge-only() { ... }
17
+ */
18
+ /**
19
+ * Responsive media for medium to large.
20
+ * Use: @include medium-large() { ... }
21
+ */
22
+ /**
23
+ * Responsive media for large and up.
24
+ * Use: @include large-up() { ... }
25
+ */
26
+ :host {
27
+ display: block;
28
+ font-size: var(--font-size-base);
29
+ }
30
+ :host p {
31
+ font-family: var(--font-family);
32
+ font-size: 1.143em;
33
+ font-weight: var(--font-weight-medium);
34
+ color: var(--color-body);
35
+ line-height: var(--line-height);
36
+ margin-block: var(--margin-block);
37
+ letter-spacing: 0.32px;
38
+ }
39
+ :host p.bold-weight, :host p ::slotted(b), :host p ::slotted(strong), :host p ::slotted(u) {
40
+ font-weight: var(--font-weight-bold);
41
+ }
42
+ :host p.large {
43
+ font-size: 1.357em;
44
+ line-height: calc(var(--line-height) - 4%);
45
+ letter-spacing: 0px;
46
+ }
47
+ :host p.small {
48
+ font-size: 1em;
49
+ line-height: calc(var(--line-height) - 4%);
50
+ letter-spacing: 0.56px;
51
+ }
52
+ :host p.xsmall {
53
+ font-size: 0.857em;
54
+ line-height: calc(var(--line-height) - 17%);
55
+ letter-spacing: 0.72px;
56
+ }
57
+ :host ::slotted(a) {
58
+ font-weight: var(--font-weight-bold);
59
+ color: var(--color-link);
60
+ text-underline-offset: 10%;
61
+ }
62
+ :host ::slotted(u) {
63
+ text-underline-offset: 10%;
64
+ }
65
+ :host ::slotted(abbr) {
66
+ color: var(--color-link);
67
+ text-decoration: underline dashed 1px var(--color-link);
68
+ text-underline-offset: 10%;
69
+ cursor: default;
70
+ }
@@ -0,0 +1,190 @@
1
+ import { Host, h } from '@stencil/core';
2
+ export class CuraLabel {
3
+ constructor() {
4
+ this.theme = window.CuraAPI.theme;
5
+ this.size = 'medium';
6
+ this.weight = 'regular';
7
+ this.spotColor = 'accent-dark';
8
+ this.color = undefined;
9
+ this.marginBlock = '0';
10
+ this.lineHeight = '125%';
11
+ this.styles = {};
12
+ }
13
+ handleChangeColor() {
14
+ this.setColors();
15
+ }
16
+ connectedCallback() {
17
+ this.setFontProperties();
18
+ this.setColors();
19
+ }
20
+ getClasses() {
21
+ const sizeclass = {};
22
+ sizeclass[this.size.toLowerCase()] = true;
23
+ sizeclass[`${this.weight.toLowerCase()}-weight`] = true;
24
+ return sizeclass;
25
+ }
26
+ setFontProperties() {
27
+ this.weights = this.theme.fonts.getWeights();
28
+ this.fontSizeBase = this.theme.fonts.getSize();
29
+ this.styles = {
30
+ '--font-family': this.theme.fonts.getFamily('body'),
31
+ '--font-weight-medium': this.weights.medium,
32
+ '--font-weight-bold': this.weights.bold
33
+ };
34
+ }
35
+ setColors() {
36
+ const fontColor = this.color
37
+ ? this.theme.colors.getColor(this.color)
38
+ : this.theme.fonts.getColor();
39
+ 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}`) });
40
+ }
41
+ hostCSSProperties() {
42
+ return {
43
+ '--margin-block': this.marginBlock,
44
+ '--font-size-base': this.fontSizeBase,
45
+ '--line-height': this.lineHeight
46
+ };
47
+ }
48
+ render() {
49
+ return (h(Host, { style: this.hostCSSProperties() }, h("p", { style: this.styles, class: this.getClasses() }, h("slot", null))));
50
+ }
51
+ static get is() { return "cura-label"; }
52
+ static get encapsulation() { return "shadow"; }
53
+ static get originalStyleUrls() {
54
+ return {
55
+ "$": ["cura-label.scss"]
56
+ };
57
+ }
58
+ static get styleUrls() {
59
+ return {
60
+ "$": ["cura-label.css"]
61
+ };
62
+ }
63
+ static get properties() {
64
+ return {
65
+ "size": {
66
+ "type": "string",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "'medium' | 'large' | 'small' | 'xsmall'",
70
+ "resolved": "\"large\" | \"medium\" | \"small\" | \"xsmall\"",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": false,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": "Set size of body text.\nValues: medium (default) | large | small | xsmall."
78
+ },
79
+ "attribute": "size",
80
+ "reflect": true,
81
+ "defaultValue": "'medium'"
82
+ },
83
+ "weight": {
84
+ "type": "string",
85
+ "mutable": false,
86
+ "complexType": {
87
+ "original": "'regular' | 'bold'",
88
+ "resolved": "\"bold\" | \"regular\"",
89
+ "references": {}
90
+ },
91
+ "required": false,
92
+ "optional": false,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": "Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well.\nValues: regular (default) | bold."
96
+ },
97
+ "attribute": "weight",
98
+ "reflect": true,
99
+ "defaultValue": "'regular'"
100
+ },
101
+ "spotColor": {
102
+ "type": "string",
103
+ "mutable": false,
104
+ "complexType": {
105
+ "original": "string",
106
+ "resolved": "string",
107
+ "references": {}
108
+ },
109
+ "required": false,
110
+ "optional": false,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": "Apply design system color to interactive elements like <a> and <abbr> inside the text.\nValues: Color from design system scheme. Default to 'accent-dark'."
114
+ },
115
+ "attribute": "spot-color",
116
+ "reflect": true,
117
+ "defaultValue": "'accent-dark'"
118
+ },
119
+ "color": {
120
+ "type": "string",
121
+ "mutable": false,
122
+ "complexType": {
123
+ "original": "string",
124
+ "resolved": "string",
125
+ "references": {}
126
+ },
127
+ "required": false,
128
+ "optional": false,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": "Text color.\nValues: Color from design system scheme. Default to the font color from the theme."
132
+ },
133
+ "attribute": "color",
134
+ "reflect": false
135
+ },
136
+ "marginBlock": {
137
+ "type": "string",
138
+ "mutable": false,
139
+ "complexType": {
140
+ "original": "string",
141
+ "resolved": "string",
142
+ "references": {}
143
+ },
144
+ "required": false,
145
+ "optional": false,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": "CSS margin-block property values.\nDefault to 1.25em"
149
+ },
150
+ "attribute": "margin-block",
151
+ "reflect": true,
152
+ "defaultValue": "'0'"
153
+ },
154
+ "lineHeight": {
155
+ "type": "string",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "string",
159
+ "resolved": "string",
160
+ "references": {}
161
+ },
162
+ "required": false,
163
+ "optional": false,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": "CSS line-height property values.\nDefault to 140%"
167
+ },
168
+ "attribute": "line-height",
169
+ "reflect": true,
170
+ "defaultValue": "'125%'"
171
+ }
172
+ };
173
+ }
174
+ static get states() {
175
+ return {
176
+ "styles": {}
177
+ };
178
+ }
179
+ static get elementRef() { return "host"; }
180
+ static get watchers() {
181
+ return [{
182
+ "propName": "color",
183
+ "methodName": "handleChangeColor"
184
+ }, {
185
+ "propName": "spotColor",
186
+ "methodName": "handleChangeColor"
187
+ }];
188
+ }
189
+ }
190
+ //# sourceMappingURL=cura-label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cura-label.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-label/cura-label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOhF,MAAM,OAAO,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;EACnB,CAAC;EA2BD,iBAAiB;IACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACzB,IAAI,CAAC,SAAS,EAAE,CAAC;EACnB,CAAC;EAED,UAAU;IACR,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;IA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C,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE;MACnC,SAAG,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE;QAC7C,eAAa,CACX,CACC,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["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"]}