@rededor/cura 1.5.0 → 1.6.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/dist/cjs/{app-globals-57c5b283.js → app-globals-5a7ddb39.js} +21 -2
  2. package/dist/cjs/app-globals-5a7ddb39.js.map +1 -0
  3. package/dist/cjs/{cura-accordion_12.cjs.entry.js → cura-accordion_18.cjs.entry.js} +689 -50
  4. package/dist/cjs/cura-accordion_18.cjs.entry.js.map +1 -0
  5. package/dist/cjs/cura-alert.cjs.entry.js +2 -2
  6. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/cura-badge-counter.cjs.entry.js +2 -2
  8. package/dist/cjs/cura-badge-counter.cjs.entry.js.map +1 -1
  9. package/dist/cjs/cura-badge-dot.cjs.entry.js +2 -2
  10. package/dist/cjs/cura-badge-dot.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cura-badge-pill.cjs.entry.js +2 -2
  12. package/dist/cjs/cura-badge-pill.cjs.entry.js.map +1 -1
  13. package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
  14. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  15. package/dist/cjs/cura-button-select.cjs.entry.js +2 -2
  16. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  17. package/dist/cjs/cura-calendar.cjs.entry.js +1 -1
  18. package/dist/cjs/cura-card.cjs.entry.js +1 -1
  19. package/dist/cjs/cura-checkbox.cjs.entry.js +2 -2
  20. package/dist/cjs/cura-display.cjs.entry.js +2 -2
  21. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +28 -0
  22. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js.map +1 -0
  23. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +2 -2
  24. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +4 -4
  25. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js.map +1 -1
  26. package/dist/cjs/cura-dropdown-search.cjs.entry.js +3 -3
  27. package/dist/cjs/cura-icons-view.cjs.entry.js +2 -2
  28. package/dist/cjs/cura-input-date.cjs.entry.js +3 -3
  29. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
  30. package/dist/cjs/cura-loader-bar.cjs.entry.js +2 -2
  31. package/dist/cjs/cura-modal.cjs.entry.js +3 -3
  32. package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
  33. package/dist/cjs/cura-progress-bar_2.cjs.entry.js +3 -3
  34. package/dist/cjs/cura-radio.cjs.entry.js +2 -2
  35. package/dist/cjs/cura-stepper.cjs.entry.js +2 -2
  36. package/dist/cjs/cura-switch.cjs.entry.js +2 -2
  37. package/dist/cjs/{cura-theme-module-14544f5f.js → cura-theme-module-a100c643.js} +9 -78
  38. package/dist/cjs/cura-theme-module-a100c643.js.map +1 -0
  39. package/dist/cjs/cura-toast.cjs.entry.js +2 -2
  40. package/dist/cjs/cura-tooltip.cjs.entry.js +3 -3
  41. package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -1
  42. package/dist/cjs/cura.cjs.js +5 -4
  43. package/dist/cjs/cura.cjs.js.map +1 -1
  44. package/dist/cjs/{index-e6d728ec.js → index-12d54921.js} +19 -2
  45. package/dist/cjs/index-12d54921.js.map +1 -0
  46. package/dist/cjs/index.cjs.js +2 -1
  47. package/dist/cjs/index.cjs.js.map +1 -1
  48. package/dist/cjs/loader.cjs.js +5 -4
  49. package/dist/cjs/loader.cjs.js.map +1 -1
  50. package/dist/cjs/static-4e83652c.js +76 -0
  51. package/dist/cjs/static-4e83652c.js.map +1 -0
  52. package/dist/collection/api/cura-api.js +19 -0
  53. package/dist/collection/api/cura-api.js.map +1 -1
  54. package/dist/collection/api/cura-api.type.js.map +1 -1
  55. package/dist/collection/collection-manifest.json +4 -0
  56. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +2 -2
  57. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
  58. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +6 -6
  59. package/dist/collection/components/badges/cura-badge-counter/cura-badge-counter.css +8 -8
  60. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.css +5 -5
  61. package/dist/collection/components/badges/cura-badge-dot/cura-badge-dot.css +4 -4
  62. package/dist/collection/components/badges/cura-badge-pill/cura-badge-pill.css +6 -6
  63. package/dist/collection/components/buttons/cura-button/cura-button.css +15 -15
  64. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +15 -15
  65. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +12 -12
  66. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +15 -15
  67. package/dist/collection/components/cura-alert/cura-alert.css +5 -5
  68. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.css +61 -0
  69. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.js +28 -0
  70. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.js.map +1 -0
  71. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.stories.js +37 -0
  72. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.stories.js.map +1 -0
  73. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.css +138 -0
  74. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.js +592 -0
  75. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.js.map +1 -0
  76. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.js +278 -0
  77. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.js.map +1 -0
  78. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.css +62 -0
  79. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js +44 -0
  80. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js.map +1 -0
  81. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.stories.js +38 -0
  82. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.stories.js.map +1 -0
  83. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.css +121 -0
  84. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.js +183 -0
  85. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.js.map +1 -0
  86. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.stories.js +85 -0
  87. package/dist/collection/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.stories.js.map +1 -0
  88. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  89. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  90. package/dist/collection/components/cura-modal/cura-modal.css +11 -11
  91. package/dist/collection/components/cura-modal/cura-modal.js +1 -1
  92. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  93. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +1 -1
  94. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +1 -1
  95. package/dist/collection/components/cura-stepper/cura-stepper.js +1 -1
  96. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  97. package/dist/collection/components/cura-tooltip/cura-tooltip.css +12 -12
  98. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  99. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  100. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.css +5 -5
  101. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  102. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  103. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +2 -2
  104. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +3 -3
  105. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  106. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +4 -0
  107. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +65 -11
  108. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  109. package/dist/collection/components/forms/cura-label/cura-label.js +6 -5
  110. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
  111. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  112. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  113. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  114. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  115. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  116. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  117. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  118. package/dist/collection/components/text/cura-heading/cura-heading.css +7 -6
  119. package/dist/collection/components/text/cura-heading/cura-heading.js +4 -19
  120. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  121. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +7 -7
  122. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +6 -20
  123. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  124. package/dist/collection/utils/FixedElementScrollBehavior.js +54 -0
  125. package/dist/collection/utils/FixedElementScrollBehavior.js.map +1 -0
  126. package/dist/collection/utils/utils.js +38 -0
  127. package/dist/collection/utils/utils.js.map +1 -1
  128. package/dist/components/cura-accordion-item.js +1 -1
  129. package/dist/components/cura-accordion-item.js.map +1 -1
  130. package/dist/components/cura-accordion.js +2 -2
  131. package/dist/components/cura-accordion.js.map +1 -1
  132. package/dist/components/cura-alert.js +1 -1
  133. package/dist/components/cura-alert.js.map +1 -1
  134. package/dist/components/cura-badge-counter2.js +1 -1
  135. package/dist/components/cura-badge-counter2.js.map +1 -1
  136. package/dist/components/cura-badge-distance.js +1 -1
  137. package/dist/components/cura-badge-distance.js.map +1 -1
  138. package/dist/components/cura-badge-dot.js +1 -1
  139. package/dist/components/cura-badge-dot.js.map +1 -1
  140. package/dist/components/cura-badge-pill2.js +1 -1
  141. package/dist/components/cura-badge-pill2.js.map +1 -1
  142. package/dist/components/cura-button-outline.js +1 -1
  143. package/dist/components/cura-button-outline.js.map +1 -1
  144. package/dist/components/cura-button-select.js +1 -1
  145. package/dist/components/cura-button-select.js.map +1 -1
  146. package/dist/components/cura-button-transparent2.js +1 -1
  147. package/dist/components/cura-button-transparent2.js.map +1 -1
  148. package/dist/components/cura-button.js +1 -1
  149. package/dist/components/cura-button.js.map +1 -1
  150. package/dist/components/cura-checkbox.js +1 -1
  151. package/dist/components/cura-display.js +1 -1
  152. package/dist/components/cura-dropdown-search-category.d.ts +11 -0
  153. package/dist/components/cura-dropdown-search-category.js +49 -0
  154. package/dist/components/cura-dropdown-search-category.js.map +1 -0
  155. package/dist/components/cura-dropdown-search-new.d.ts +11 -0
  156. package/dist/components/cura-dropdown-search-new.js +406 -0
  157. package/dist/components/cura-dropdown-search-new.js.map +1 -0
  158. package/dist/components/cura-dropdown-search-not-found.d.ts +11 -0
  159. package/dist/components/cura-dropdown-search-not-found.js +48 -0
  160. package/dist/components/cura-dropdown-search-not-found.js.map +1 -0
  161. package/dist/components/cura-dropdown-search-option-new.d.ts +11 -0
  162. package/dist/components/cura-dropdown-search-option-new.js +81 -0
  163. package/dist/components/cura-dropdown-search-option-new.js.map +1 -0
  164. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  165. package/dist/components/cura-dropdown-search-option.js +3 -3
  166. package/dist/components/cura-dropdown-search-option.js.map +1 -1
  167. package/dist/components/cura-dropdown-search.js +2 -2
  168. package/dist/components/cura-heading2.js +4 -17
  169. package/dist/components/cura-heading2.js.map +1 -1
  170. package/dist/components/cura-icon2.js +1 -1
  171. package/dist/components/cura-icons-view.js +1 -1
  172. package/dist/components/cura-input-date.js +2 -2
  173. package/dist/components/cura-input-date.js.map +1 -1
  174. package/dist/components/cura-input-text2.js +132 -7
  175. package/dist/components/cura-input-text2.js.map +1 -1
  176. package/dist/components/cura-label2.js +6 -5
  177. package/dist/components/cura-label2.js.map +1 -1
  178. package/dist/components/cura-loader-bar2.js +1 -1
  179. package/dist/components/cura-loader-circle2.js +1 -1
  180. package/dist/components/cura-modal.js +2 -2
  181. package/dist/components/cura-modal.js.map +1 -1
  182. package/dist/components/cura-page-template.js +1 -1
  183. package/dist/components/cura-paragraph2.js +7 -19
  184. package/dist/components/cura-paragraph2.js.map +1 -1
  185. package/dist/components/cura-progress-bar2.js +1 -1
  186. package/dist/components/cura-radio.js +1 -1
  187. package/dist/components/cura-select-option2.js +1 -1
  188. package/dist/components/cura-select2.js +3 -3
  189. package/dist/components/cura-stepper-item2.js +1 -1
  190. package/dist/components/cura-stepper.js +1 -1
  191. package/dist/components/cura-switch.js +1 -1
  192. package/dist/components/cura-toast.js +1 -1
  193. package/dist/components/cura-tooltip.js +2 -2
  194. package/dist/components/cura-tooltip.js.map +1 -1
  195. package/dist/components/index.js +28 -71
  196. package/dist/components/index.js.map +1 -1
  197. package/dist/cura/cura.esm.js +1 -1
  198. package/dist/cura/cura.esm.js.map +1 -1
  199. package/dist/cura/index.esm.js +1 -1
  200. package/dist/cura/index.esm.js.map +1 -1
  201. package/dist/cura/p-02717e7d.entry.js +2 -0
  202. package/dist/cura/{p-629c34fe.entry.js.map → p-02717e7d.entry.js.map} +1 -1
  203. package/dist/cura/p-0a391c03.entry.js +2 -0
  204. package/dist/cura/{p-dbab7864.entry.js.map → p-0a391c03.entry.js.map} +1 -1
  205. package/dist/cura/p-18af52e4.entry.js +2 -0
  206. package/dist/cura/{p-4aefe237.entry.js.map → p-18af52e4.entry.js.map} +1 -1
  207. package/dist/cura/p-1b201271.js +2 -0
  208. package/dist/cura/p-1b201271.js.map +1 -0
  209. package/dist/cura/{p-3030774e.entry.js → p-24cd591e.entry.js} +2 -2
  210. package/dist/cura/p-24d9f1f4.entry.js +2 -0
  211. package/dist/cura/p-24d9f1f4.entry.js.map +1 -0
  212. package/dist/cura/{p-ec7876d3.entry.js → p-2afb14e9.entry.js} +2 -2
  213. package/dist/cura/{p-3c0931d3.entry.js → p-3576b633.entry.js} +2 -2
  214. package/dist/cura/p-46994182.entry.js +2 -0
  215. package/dist/cura/p-500f1256.entry.js +2 -0
  216. package/dist/cura/{p-545e8e55.entry.js.map → p-500f1256.entry.js.map} +1 -1
  217. package/dist/cura/{p-7f25f4dc.entry.js → p-5afb630e.entry.js} +2 -2
  218. package/dist/cura/{p-bd99ef4c.entry.js → p-6243742a.entry.js} +2 -2
  219. package/dist/cura/p-635c0f4d.entry.js +2 -0
  220. package/dist/cura/p-86d317f3.entry.js +2 -0
  221. package/dist/cura/p-86d317f3.entry.js.map +1 -0
  222. package/dist/cura/{p-ee8db3dc.entry.js → p-9214ee88.entry.js} +2 -2
  223. package/dist/cura/{p-70adcf7b.entry.js → p-9dd47ec6.entry.js} +2 -2
  224. package/dist/cura/p-af3ac476.js +3 -0
  225. package/dist/cura/p-af3ac476.js.map +1 -0
  226. package/dist/cura/{p-f30270f0.entry.js → p-b1d6ee8d.entry.js} +2 -2
  227. package/dist/cura/{p-bce10f9b.entry.js → p-bfaf9964.entry.js} +2 -2
  228. package/dist/cura/p-c0f445b5.entry.js +2 -0
  229. package/dist/cura/{p-8622c492.entry.js.map → p-c0f445b5.entry.js.map} +1 -1
  230. package/dist/cura/{p-d13e3295.entry.js → p-d227469a.entry.js} +2 -2
  231. package/dist/cura/p-d25142cd.entry.js +2 -0
  232. package/dist/cura/{p-529332d3.entry.js.map → p-d25142cd.entry.js.map} +1 -1
  233. package/dist/cura/p-d2da92d9.entry.js +2 -0
  234. package/dist/cura/{p-6b627841.entry.js.map → p-d2da92d9.entry.js.map} +1 -1
  235. package/dist/cura/p-daf9feac.js +2 -0
  236. package/dist/cura/p-daf9feac.js.map +1 -0
  237. package/dist/cura/p-e98a1ad2.entry.js +2 -0
  238. package/dist/cura/{p-b3e93e74.entry.js.map → p-e98a1ad2.entry.js.map} +1 -1
  239. package/dist/cura/p-ec4996c2.js +2 -0
  240. package/dist/cura/p-ec4996c2.js.map +1 -0
  241. package/dist/cura/p-ee7328a5.entry.js +2 -0
  242. package/dist/cura/{p-235ac0b4.entry.js.map → p-ee7328a5.entry.js.map} +1 -1
  243. package/dist/cura/{p-f96b0923.entry.js → p-f1098b41.entry.js} +2 -2
  244. package/dist/cura/p-fc9584dd.entry.js +2 -0
  245. package/dist/cura/{p-a4a1f6c6.entry.js.map → p-fc9584dd.entry.js.map} +1 -1
  246. package/dist/esm/{app-globals-036c3b80.js → app-globals-83a601d0.js} +21 -2
  247. package/dist/esm/app-globals-83a601d0.js.map +1 -0
  248. package/dist/esm/{cura-accordion_12.entry.js → cura-accordion_18.entry.js} +684 -51
  249. package/dist/esm/cura-accordion_18.entry.js.map +1 -0
  250. package/dist/esm/cura-alert.entry.js +2 -2
  251. package/dist/esm/cura-alert.entry.js.map +1 -1
  252. package/dist/esm/cura-badge-counter.entry.js +2 -2
  253. package/dist/esm/cura-badge-counter.entry.js.map +1 -1
  254. package/dist/esm/cura-badge-dot.entry.js +2 -2
  255. package/dist/esm/cura-badge-dot.entry.js.map +1 -1
  256. package/dist/esm/cura-badge-pill.entry.js +2 -2
  257. package/dist/esm/cura-badge-pill.entry.js.map +1 -1
  258. package/dist/esm/cura-button-outline.entry.js +2 -2
  259. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  260. package/dist/esm/cura-button-select.entry.js +2 -2
  261. package/dist/esm/cura-button-select.entry.js.map +1 -1
  262. package/dist/esm/cura-calendar.entry.js +1 -1
  263. package/dist/esm/cura-card.entry.js +1 -1
  264. package/dist/esm/cura-checkbox.entry.js +2 -2
  265. package/dist/esm/cura-display.entry.js +2 -2
  266. package/dist/esm/cura-dropdown-search-not-found.entry.js +24 -0
  267. package/dist/esm/cura-dropdown-search-not-found.entry.js.map +1 -0
  268. package/dist/esm/cura-dropdown-search-option-title.entry.js +2 -2
  269. package/dist/esm/cura-dropdown-search-option.entry.js +4 -4
  270. package/dist/esm/cura-dropdown-search-option.entry.js.map +1 -1
  271. package/dist/esm/cura-dropdown-search.entry.js +3 -3
  272. package/dist/esm/cura-icons-view.entry.js +2 -2
  273. package/dist/esm/cura-input-date.entry.js +3 -3
  274. package/dist/esm/cura-input-date.entry.js.map +1 -1
  275. package/dist/esm/cura-loader-bar.entry.js +2 -2
  276. package/dist/esm/cura-modal.entry.js +3 -3
  277. package/dist/esm/cura-modal.entry.js.map +1 -1
  278. package/dist/esm/cura-progress-bar_2.entry.js +3 -3
  279. package/dist/esm/cura-radio.entry.js +2 -2
  280. package/dist/esm/cura-stepper.entry.js +2 -2
  281. package/dist/esm/cura-switch.entry.js +2 -2
  282. package/dist/esm/{cura-theme-module-b23f8ac8.js → cura-theme-module-59e8e460.js} +3 -72
  283. package/dist/esm/cura-theme-module-59e8e460.js.map +1 -0
  284. package/dist/esm/cura-toast.entry.js +2 -2
  285. package/dist/esm/cura-tooltip.entry.js +3 -3
  286. package/dist/esm/cura-tooltip.entry.js.map +1 -1
  287. package/dist/esm/cura.js +6 -5
  288. package/dist/esm/cura.js.map +1 -1
  289. package/dist/esm/{index-747aad85.js → index-717b36df.js} +19 -2
  290. package/dist/esm/index-717b36df.js.map +1 -0
  291. package/dist/esm/index.js +2 -1
  292. package/dist/esm/index.js.map +1 -1
  293. package/dist/esm/loader.js +6 -5
  294. package/dist/esm/loader.js.map +1 -1
  295. package/dist/esm/static-061aa850.js +74 -0
  296. package/dist/esm/static-061aa850.js.map +1 -0
  297. package/dist/types/api/cura-api.d.ts +1 -0
  298. package/dist/types/api/cura-api.type.d.ts +1 -1
  299. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.d.ts +6 -0
  300. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-category/cura-dropdown-search-category.stories.d.ts +27 -0
  301. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-new.d.ts +127 -0
  302. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-new.stories.d.ts +186 -0
  303. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.d.ts +6 -0
  304. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-not-found/cura-dropdown-search-not-found.stories.d.ts +27 -0
  305. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.d.ts +44 -0
  306. package/dist/types/components/cura-dropdown-search-new/cura-dropdown-search-option-new/cura-dropdown-search-option-new.stories.d.ts +72 -0
  307. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +12 -4
  308. package/dist/types/components/forms/cura-label/cura-label.d.ts +1 -0
  309. package/dist/types/components/text/cura-heading/cura-heading.d.ts +2 -3
  310. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +2 -2
  311. package/dist/types/components.d.ts +264 -9
  312. package/dist/types/utils/FixedElementScrollBehavior.d.ts +12 -0
  313. package/dist/types/utils/utils.d.ts +5 -0
  314. package/package.json +2 -2
  315. package/dist/cjs/app-globals-57c5b283.js.map +0 -1
  316. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
  317. package/dist/cjs/cura-avatar.cjs.entry.js +0 -68
  318. package/dist/cjs/cura-avatar.cjs.entry.js.map +0 -1
  319. package/dist/cjs/cura-badge-distance.cjs.entry.js +0 -46
  320. package/dist/cjs/cura-badge-distance.cjs.entry.js.map +0 -1
  321. package/dist/cjs/cura-button-transparent.cjs.entry.js +0 -107
  322. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +0 -1
  323. package/dist/cjs/cura-theme-module-14544f5f.js.map +0 -1
  324. package/dist/cjs/index-e6d728ec.js.map +0 -1
  325. package/dist/cura/p-1051a947.js +0 -2
  326. package/dist/cura/p-1051a947.js.map +0 -1
  327. package/dist/cura/p-164ddb46.entry.js +0 -2
  328. package/dist/cura/p-164ddb46.entry.js.map +0 -1
  329. package/dist/cura/p-235ac0b4.entry.js +0 -2
  330. package/dist/cura/p-4aefe237.entry.js +0 -2
  331. package/dist/cura/p-529332d3.entry.js +0 -2
  332. package/dist/cura/p-545e8e55.entry.js +0 -2
  333. package/dist/cura/p-557b90c4.entry.js +0 -2
  334. package/dist/cura/p-57ad7c56.entry.js +0 -2
  335. package/dist/cura/p-57ad7c56.entry.js.map +0 -1
  336. package/dist/cura/p-629c34fe.entry.js +0 -2
  337. package/dist/cura/p-62a3056f.entry.js +0 -2
  338. package/dist/cura/p-62a3056f.entry.js.map +0 -1
  339. package/dist/cura/p-6624108e.entry.js +0 -2
  340. package/dist/cura/p-6b627841.entry.js +0 -2
  341. package/dist/cura/p-8622c492.entry.js +0 -2
  342. package/dist/cura/p-935eeb7b.entry.js +0 -2
  343. package/dist/cura/p-935eeb7b.entry.js.map +0 -1
  344. package/dist/cura/p-a4a1f6c6.entry.js +0 -2
  345. package/dist/cura/p-b3e93e74.entry.js +0 -2
  346. package/dist/cura/p-d21364b2.js +0 -2
  347. package/dist/cura/p-d21364b2.js.map +0 -1
  348. package/dist/cura/p-dbab7864.entry.js +0 -2
  349. package/dist/cura/p-fd5ed6b0.js +0 -3
  350. package/dist/cura/p-fd5ed6b0.js.map +0 -1
  351. package/dist/esm/app-globals-036c3b80.js.map +0 -1
  352. package/dist/esm/cura-accordion_12.entry.js.map +0 -1
  353. package/dist/esm/cura-avatar.entry.js +0 -64
  354. package/dist/esm/cura-avatar.entry.js.map +0 -1
  355. package/dist/esm/cura-badge-distance.entry.js +0 -42
  356. package/dist/esm/cura-badge-distance.entry.js.map +0 -1
  357. package/dist/esm/cura-button-transparent.entry.js +0 -103
  358. package/dist/esm/cura-button-transparent.entry.js.map +0 -1
  359. package/dist/esm/cura-theme-module-b23f8ac8.js.map +0 -1
  360. package/dist/esm/index-747aad85.js.map +0 -1
  361. /package/dist/cura/{p-3030774e.entry.js.map → p-24cd591e.entry.js.map} +0 -0
  362. /package/dist/cura/{p-ec7876d3.entry.js.map → p-2afb14e9.entry.js.map} +0 -0
  363. /package/dist/cura/{p-3c0931d3.entry.js.map → p-3576b633.entry.js.map} +0 -0
  364. /package/dist/cura/{p-6624108e.entry.js.map → p-46994182.entry.js.map} +0 -0
  365. /package/dist/cura/{p-7f25f4dc.entry.js.map → p-5afb630e.entry.js.map} +0 -0
  366. /package/dist/cura/{p-bd99ef4c.entry.js.map → p-6243742a.entry.js.map} +0 -0
  367. /package/dist/cura/{p-557b90c4.entry.js.map → p-635c0f4d.entry.js.map} +0 -0
  368. /package/dist/cura/{p-ee8db3dc.entry.js.map → p-9214ee88.entry.js.map} +0 -0
  369. /package/dist/cura/{p-70adcf7b.entry.js.map → p-9dd47ec6.entry.js.map} +0 -0
  370. /package/dist/cura/{p-f30270f0.entry.js.map → p-b1d6ee8d.entry.js.map} +0 -0
  371. /package/dist/cura/{p-bce10f9b.entry.js.map → p-bfaf9964.entry.js.map} +0 -0
  372. /package/dist/cura/{p-d13e3295.entry.js.map → p-d227469a.entry.js.map} +0 -0
  373. /package/dist/cura/{p-f96b0923.entry.js.map → p-f1098b41.entry.js.map} +0 -0
@@ -36,12 +36,12 @@ export class CuraDropdownSearchOption {
36
36
  }
37
37
  }
38
38
  render() {
39
- return (h(Host, { key: '515f662d5fb08cd77e7ad24de425ec34497e5e6e', slot: "dropdown-search-option" }, h("div", { key: '8decccf2416ae3ea135bba38845da2a63c9cfdce', style: this.styles, class: {
39
+ return (h(Host, { key: '81c4404d784d2038823d84bf2b4beef53a874644', slot: "dropdown-search-option" }, h("div", { key: '476757ab00466607c2ab01a2b5a82da4c45087af', style: this.styles, class: {
40
40
  "option-container": true,
41
41
  hovered: this.selectable ? this.hovered : false,
42
42
  selected: this.selected,
43
43
  disabled: !this.selectable
44
- } }, h("div", { key: '8c3cce88d40c764ae87cf8c54e3fb9fe9651f62d', class: "content-container" }, h("div", { key: '1c674ff6a3721c42e034b994bf903d8608100cb8', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, h("slot", { key: '7a6545a242da0774b74a403b2dc26ce378d146fd', name: "image" }), h("cura-heading", { key: '860fede2f20748b5e15ddf3222cd0c6ce3ff1f8c', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, h("slot", { key: 'e9a7610e2d561cb399d58c44f98fb9ea0e6cf5c6' }))), h("slot", { key: 'c784f7cddd4d5e246126ef43ab08e82db51fc2be', name: "action" })))));
44
+ } }, h("div", { key: '2a35edbe88ed99587972e0e657250867cb6ba814', class: "content-container" }, h("div", { key: '5bb136c9c5386d6c40985a86bc7e2e85c239110e', class: "option-info", onClick: (e) => this.handleOptionClick(e) }, h("slot", { key: 'f5ad44434728cb3879819f6016fcf9927354c05f', name: "image" }), h("cura-heading", { key: '43fa2a1c1a206f6bd1b0f52f5bc536cbb98bbe56', size: "xsmall", lineHeight: "16px", marginBlock: "0px", weight: "bold", color: "neutral-black" }, h("slot", { key: '197963392c5cef12d29dfbe312f4359b950de9f3' }))), h("slot", { key: '146144af1e1a5d1a18eb2aceaa71b749a4c61ba6', name: "action" })))));
45
45
  }
46
46
  static get is() { return "cura-dropdown-search-option"; }
47
47
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class CuraDropdownSearchOptionTitle {
3
3
  render() {
4
- return (h(Host, { key: 'b378a877e6a90727e3216c284c2a064992f2dfc9', slot: "dropdown-search-option" }, h("cura-label", { key: 'e2d457a7d42bcacae09012322b19a54e44fb109f', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, h("slot", { key: 'e889fa1839988a0f138e14ad15b0e250100ba38c' }))));
4
+ return (h(Host, { key: '4782e0381a903b7b71851e7ccee12ef94a3343ab', slot: "dropdown-search-option" }, h("cura-label", { key: '4f287507290fc374eef609a3c18e1fc9ba970ae7', color: "neutral-dark", size: "xsmall", lineHeight: "16px", marginBlock: "0" }, h("slot", { key: 'a5d129e76e15613b8983acd2034808803cbf1f38' }))));
5
5
  }
6
6
  static get is() { return "cura-dropdown-search-option-title"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -258,9 +258,9 @@ export class CuraDropdownSearch {
258
258
  }
259
259
  render() {
260
260
  const isMobileDropdown = this.isMobile && this.isDropdownOpen;
261
- return (h(Host, { key: '29caf35386c324e85a5b68caa280193e8f1a3aae', style: this.hostCSSProperties(), class: "dropdown-overlay" }, h("div", { key: '879dc628c89920323a97f5b29aeadf6e774615ef', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, h("div", { key: '31c2df66c5311abedfd1661fb9d8b135dde4ea8a', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (h("cura-button-transparent", { key: '418fa19788b7dd8374d4c9c78837ad89c9f11f9e', fontColor: "dark", onClick: () => this.handleGoBack(), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), h("cura-input-text", { key: '78dfa84f63f4a5a3b72f94e589b9c362d8e78e19', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: isMobileDropdown ? 'transparent' : 'default', required: this.required, hideErrorIcon: this.status === 'error', iconName: this.iconName || 'search', value: this.value, status: this.status, onValueChange: e => this.onValueChange(e.target.value), onInput: e => this.handleInputChange(e), onFocus: () => this.handleOnFocus(), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
261
+ return (h(Host, { key: '8e47b4652a5f7143b9f9d8704105624debd5ab86', style: this.hostCSSProperties(), class: "dropdown-overlay" }, h("div", { key: 'a5c9a6878be61268fb2a6fe5f42c3811aaa25e92', class: `dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`, style: this.styles }, h("div", { key: 'c10d5a2793e7961370f63b124eb8538c0fe161a2', class: this.getClasses() }, this.isMobile && this.isDropdownOpen && (h("cura-button-transparent", { key: 'a5d8233857277aa56c7d4d8048c8d8199635f117', fontColor: "dark", onClick: () => this.handleGoBack(), iconName: "arrowLeft", size: "medium", iconOnly: true, color: "primary" })), h("cura-input-text", { key: '1f780e794a2e42fa4771f9f6f5cb04f44d5d17d3', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: isMobileDropdown ? 'transparent' : 'default', required: this.required, hideErrorIcon: this.status === 'error', iconName: this.iconName || 'search', value: this.value, status: this.status, onValueChange: e => this.onValueChange(e.target.value), onInput: e => this.handleInputChange(e), onFocus: () => this.handleOnFocus(), onClick: () => (window.innerWidth < 768 ? (this.isMobile = true) : null), onBlur: () => {
262
262
  this.handleOnBlur();
263
- }, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, h("slot", { key: 'e7f13fc467083f08b4666f4323b8734fb734fe1c', name: "helperText" }))), h("div", { key: '9a39a16c1dfefd6481593ce062036e19cd1b65fa', id: "dropdown-search-list", class: this.getDropdownClasses() }, h("slot", { key: '36af7eb7212ea066af0edb68b5e12bf9f931fae1', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
263
+ }, placeholder: this.placeholder, size: this.size, onKeyDown: this.handleKeyDown }, h("slot", { key: '87882a490816c64d8780ce4a02b975034e111473', name: "helperText" }))), h("div", { key: 'b0120ab7c2db1a5dcc071e4b79f9aac7d50ae998', id: "dropdown-search-list", class: this.getDropdownClasses() }, h("slot", { key: 'b780c4b317c6aa557a6be5fe3d4c957d943b92c8', name: "dropdown-search-option", onSlotchange: this.handleSlotChange })))));
264
264
  }
265
265
  static get is() { return "cura-dropdown-search"; }
266
266
  static get encapsulation() { return "shadow"; }
@@ -43,8 +43,8 @@
43
43
  */
44
44
  /**
45
45
  * Global Spacing Definitions.
46
- * Required CSS Properties:
47
- * --base-spacing
46
+ * Required CSS Properties from Cura:
47
+ * --cura-spacing-base
48
48
  */
49
49
  /* None: 0px */
50
50
  /* Tiny default: 4px */
@@ -69,7 +69,7 @@
69
69
  position: relative;
70
70
  }
71
71
  .container .calendar {
72
- padding: 0px calc(var(--base-spacing) * 3px);
72
+ padding: 0px calc(var(--cura-spacing-base) * 3px);
73
73
  margin-top: -8px;
74
74
  border-radius: 0px 0px 4px 4px;
75
75
  border-top: 0px;
@@ -162,7 +162,7 @@ export class CuraInputDate {
162
162
  }
163
163
  }
164
164
  render() {
165
- return (h(Host, { key: '1395108764c1957abb9371b82ab983d076aaf61e' }, h("div", { key: 'e3134a1cfbf6f07b83f148b3e1b9c699e273a098', class: "container", style: this.styles }, h("cura-input-text", { key: '507ce8cedd5a169832579ae3ea313d3b3d6813d2', label: this.label, name: this.name, status: this.status, value: this.value, onFocus: () => this.showCalendar(), size: this.size, "icon-name": this.iconName, placeholder: this.dateSettings.placeholder, "mask-preset": this.dateSettings.mask, "enable-selection-mode": true, onKeyUp: event => this.handleInputDates(event), autocomplete: "off", onValueChange: event => this.handleChangeDates(event) }, this.renderCalendarOrHelperText()))));
165
+ return (h(Host, { key: '6561926408fe00e541e6e7932a448f5a46cb5909' }, h("div", { key: '23e9db15f773d76e01c1dd0d7b71d6765a9a6c26', class: "container", style: this.styles }, h("cura-input-text", { key: '040e257cfaf01fbf0bd087d3abf0d159e7d1ac7a', label: this.label, name: this.name, status: this.status, value: this.value, onFocus: () => this.showCalendar(), size: this.size, "icon-name": this.iconName, placeholder: this.dateSettings.placeholder, "mask-preset": this.dateSettings.mask, "enable-selection-mode": true, onKeyUp: event => this.handleInputDates(event), autocomplete: "off", onValueChange: event => this.handleChangeDates(event) }, this.renderCalendarOrHelperText()))));
166
166
  }
167
167
  static get is() { return "cura-input-date"; }
168
168
  static get encapsulation() { return "shadow"; }
@@ -522,6 +522,10 @@
522
522
  }
523
523
  .cura-input-group.transparent.transparent cura-label {
524
524
  margin-bottom: 4px;
525
+ --color-body: var(--neutral-dark) !important;
526
+ }
527
+ .cura-input-group.transparent.transparent.error cura-label {
528
+ --color-body: var(--neutral-black) !important;
525
529
  }
526
530
  .cura-input-group.transparent.transparent .cura-input-field {
527
531
  width: 100%;
@@ -1,6 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import IMask from "imask";
3
3
  import { maskOptions } from "./mask-presets/input-mask-presets";
4
+ import { checkMobile, checkIOS, fakeInputIOSHack } from "../../../utils/utils";
4
5
  export class CuraInputText {
5
6
  constructor() {
6
7
  this.mode = 'default';
@@ -30,6 +31,17 @@ export class CuraInputText {
30
31
  this.hideErrorIcon = false;
31
32
  this.autocomplete = 'on';
32
33
  }
34
+ async setFocus() {
35
+ // IOS needs large timeout value to work
36
+ const timeoutMs = checkMobile() && checkIOS() ? 1000 : 200;
37
+ // IOS fake input hack
38
+ let fakeInput = fakeInputIOSHack(this.host);
39
+ setTimeout(() => {
40
+ this.inputRef.focus();
41
+ if (fakeInput)
42
+ fakeInput.remove();
43
+ }, timeoutMs);
44
+ }
33
45
  /**
34
46
  * Callback to restore the switch state from the form.
35
47
  */
@@ -78,6 +90,7 @@ export class CuraInputText {
78
90
  this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
79
91
  this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();
80
92
  this.weights = window.CuraAPI.theme.fonts.getWeights();
93
+ this.breakpoints = window.CuraAPI.theme.breakpoints.get();
81
94
  this.styles['--font-weight-medium'] = this.weights.medium;
82
95
  this.styles['--font-weight-bold'] = this.weights.bold;
83
96
  this.styles['--font-weight-regular'] = this.weights.regular;
@@ -132,7 +145,6 @@ export class CuraInputText {
132
145
  const isSuccess = this.status === 'success';
133
146
  const isDefault = this.status === 'default';
134
147
  const helperTextSize = this.size === 'large' ? 'small' : 'xsmall';
135
- const helperTextWeight = this.mode === 'transparent' ? 'bold' : 'regular';
136
148
  const colorText = (() => {
137
149
  if (this.disabled)
138
150
  return 'neutral-medium';
@@ -142,7 +154,7 @@ export class CuraInputText {
142
154
  return 'neutral-black';
143
155
  return 'neutral-dark';
144
156
  })();
145
- return (h("div", { style: this.styles, class: "helper-text" }, isDefault && (h("cura-label", { size: helperTextSize, lineHeight: "xsmall", color: colorText, weight: helperTextWeight }, h("slot", null))), isError && (h("cura-label", { size: helperTextSize, lineHeight: "xsmall", color: "error-dark", weight: helperTextWeight }, h("slot", null))), isSuccess && (h("cura-label", { size: helperTextSize, lineHeight: "xsmall", color: "success-dark", weight: helperTextWeight }, h("slot", null)))));
157
+ return (h("div", { style: this.styles, class: "helper-text", part: "cura-input-text-helper" }, isDefault && (h("cura-label", { size: helperTextSize, lineHeight: "xsmall", color: colorText }, h("slot", null))), isError && this.mode === "default" && (h("cura-label", { size: helperTextSize, lineHeight: "xsmall", color: "error-dark" }, h("slot", null))), isError && this.mode === "transparent" && (h("cura-label", { size: helperTextSize, lineHeight: "xsmall", color: "neutral-black" }, h("slot", null))), isSuccess && (h("cura-label", { size: helperTextSize, lineHeight: "xsmall", color: "success-dark" }, h("slot", null)))));
146
158
  }
147
159
  handleMouseEnter() {
148
160
  this.isHovered = true;
@@ -166,7 +178,9 @@ export class CuraInputText {
166
178
  this.value = '';
167
179
  this.inputRef.value = '';
168
180
  this.valueChange.emit(this.value);
181
+ this.inputClear.emit(this.value);
169
182
  this.handleMaskUpdate();
183
+ this.setFocus();
170
184
  }
171
185
  handleInputFocus() {
172
186
  this.handleMaskUpdate();
@@ -288,7 +302,7 @@ export class CuraInputText {
288
302
  e.preventDefault();
289
303
  }
290
304
  render() {
291
- return (h(Host, { key: '0aebf7d545af0e2eec1f542e5545ef34d0356e33' }, h("div", { key: '22e428a2706273d1613e39f860a721a73cab6d03', style: this.styles, onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), class: Object.assign({ 'cura-input-group': true }, this.getClasses()) }, h("div", { key: '8ef0bc3f5bf3427abdbd247a8c78b722eaaca541', class: "input-wrapper" }, this.label && (h("cura-label", { key: '4aef20d0c2880ed38c1821e2690829a31fe7fea8', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getLabelColor() }, this.label, " ", this.required && h("span", { key: 'a3bb15165ae1ffedae59a32a1e299c9a36ad9b2c', class: "required" }, "* "))), h("div", { key: '0b12a41f21a4c26273390dd15f362a5baccb0f2d', class: "cura-input-field", part: "cura-input-field", style: this.styles }, this.renderIcon(), h("input", { key: 'da03ef422267592fa3c732cb553e16fd1209bdf0', name: this.name ? this.name : '', type: this.type, onKeyDown: event => this.handleKeyDown(event), onBlur: this.handleInputBlur.bind(this), onFocus: this.handleInputFocus.bind(this), onInput: event => this.handleInputChange(event), class: this.getClasses(), style: this.styles, placeholder: this.placeholder, disabled: this.disabled || this.isLoading, required: this.required, readonly: this.readOnly, maxlength: this.maxlength, value: this.value !== undefined && this.value !== null ? this.value : '', inputmode: this.maskPreset ? 'tel' : this.inputMode, ref: ref => (this.inputRef = ref), autocomplete: this.autocomplete }), !!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (h("cura-icon", { key: '7d46e420487a37b6fa90d93b25ba8d84d9197e43', size: this.size === 'large' || this.mode === 'transparent' ? 20 : 16, color: "primary-base", name: "closeCircle", iconset: "default", class: "clear-button", onClick: () => this.handleClearInput() })), this.isLoading && h("cura-loader-circle", { key: '2ecef2f802b1807f214a9ca72099b690189898fd', size: this.size === 'large' ? 'medium' : 'small', color: "primary-base" })), this.renderHelperText()))));
305
+ return (h(Host, { key: '6c14493558642a993e4fa541b2a932e6cf9308a1' }, h("div", { key: '0084cfcd8ba41736f0cd2ca56a5183b1921c9c52', style: this.styles, onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), class: Object.assign({ 'cura-input-group': true }, this.getClasses()) }, h("div", { key: '27998cb277338c329ee0c4afefd7dbf2a7621990', class: "input-wrapper" }, this.label && (h("cura-label", { key: '2f57bdcff2b1bdbfcfb9bd01faedec5f372dfe5d', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getLabelColor() }, this.label, " ", this.required && h("span", { key: 'da05203184e4772fd25853407640de241382f050', class: "required" }, "* "))), h("div", { key: '03cbae962e628e3ea3bb7ba0d8cfd0f89f37b758', class: "cura-input-field", part: "cura-input-field", style: this.styles }, this.renderIcon(), h("input", { key: 'e89fdaf2fc20169474afc960b320d64fcc8579bd', name: this.name ? this.name : '', type: this.type, onKeyDown: event => this.handleKeyDown(event), onBlur: this.handleInputBlur.bind(this), onFocus: this.handleInputFocus.bind(this), onInput: event => this.handleInputChange(event), class: this.getClasses(), style: this.styles, placeholder: this.placeholder, disabled: this.disabled || this.isLoading, required: this.required, readonly: this.readOnly, maxlength: this.maxlength, value: this.value !== undefined && this.value !== null ? this.value : '', inputmode: this.maskPreset ? 'tel' : this.inputMode, ref: ref => (this.inputRef = ref), autocomplete: this.autocomplete }), !!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (h("cura-icon", { key: 'ea541b239b97920ab02fd88aafec39169c20c5a0', size: this.size === 'large' || this.mode === 'transparent' ? 20 : 16, color: "primary-base", name: "closeCircle", iconset: "default", class: "clear-button", onClick: () => this.handleClearInput() })), this.isLoading && h("cura-loader-circle", { key: 'ecb67fbc7e3796009f30bd16b0a1c2ce82052666', size: this.size === 'large' ? 'medium' : 'small', color: "primary-base" })), this.renderHelperText()))));
292
306
  }
293
307
  static get is() { return "cura-input-text"; }
294
308
  static get encapsulation() { return "shadow"; }
@@ -309,8 +323,8 @@ export class CuraInputText {
309
323
  "type": "string",
310
324
  "mutable": true,
311
325
  "complexType": {
312
- "original": "'default' | 'transparent'",
313
- "resolved": "\"default\" | \"transparent\"",
326
+ "original": "'default' | 'transparent' | string",
327
+ "resolved": "string",
314
328
  "references": {}
315
329
  },
316
330
  "required": false,
@@ -327,8 +341,8 @@ export class CuraInputText {
327
341
  "type": "string",
328
342
  "mutable": true,
329
343
  "complexType": {
330
- "original": "'error' | 'success' | 'default'",
331
- "resolved": "\"default\" | \"error\" | \"success\"",
344
+ "original": "'error' | 'success' | 'default' | string",
345
+ "resolved": "string",
332
346
  "references": {}
333
347
  },
334
348
  "required": false,
@@ -345,8 +359,8 @@ export class CuraInputText {
345
359
  "type": "string",
346
360
  "mutable": true,
347
361
  "complexType": {
348
- "original": "'small' | 'medium' | 'large'",
349
- "resolved": "\"large\" | \"medium\" | \"small\"",
362
+ "original": "'small' | 'medium' | 'large' | string",
363
+ "resolved": "string",
350
364
  "references": {}
351
365
  },
352
366
  "required": false,
@@ -458,13 +472,13 @@ export class CuraInputText {
458
472
  "references": {}
459
473
  },
460
474
  "required": false,
461
- "optional": true,
475
+ "optional": false,
462
476
  "docs": {
463
477
  "tags": [],
464
478
  "text": "Value of the input field"
465
479
  },
466
480
  "attribute": "value",
467
- "reflect": false,
481
+ "reflect": true,
468
482
  "defaultValue": "''"
469
483
  },
470
484
  "iconName": {
@@ -757,8 +771,48 @@ export class CuraInputText {
757
771
  "resolved": "number | string",
758
772
  "references": {}
759
773
  }
774
+ }, {
775
+ "method": "inputClear",
776
+ "name": "inputClear",
777
+ "bubbles": true,
778
+ "cancelable": true,
779
+ "composed": true,
780
+ "docs": {
781
+ "tags": [{
782
+ "name": "type",
783
+ "text": "{EventEmitter<string | number>}"
784
+ }],
785
+ "text": "Emitted when the clear button is clicked"
786
+ },
787
+ "complexType": {
788
+ "original": "string | number",
789
+ "resolved": "number | string",
790
+ "references": {}
791
+ }
760
792
  }];
761
793
  }
794
+ static get methods() {
795
+ return {
796
+ "setFocus": {
797
+ "complexType": {
798
+ "signature": "() => Promise<void>",
799
+ "parameters": [],
800
+ "references": {
801
+ "Promise": {
802
+ "location": "global",
803
+ "id": "global::Promise"
804
+ }
805
+ },
806
+ "return": "Promise<void>"
807
+ },
808
+ "docs": {
809
+ "text": "",
810
+ "tags": []
811
+ }
812
+ }
813
+ };
814
+ }
815
+ static get elementRef() { return "host"; }
762
816
  static get watchers() {
763
817
  return [{
764
818
  "propName": "styles",
@@ -1 +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,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,WAAW,EAAkB,MAAM,mCAAmC,CAAC;AAQhF,MAAM,OAAO,aAAa;;oBAIkD,SAAS;sBAMD,SAAS;oBAKd,QAAQ;oBAK7C,MAAM;yBAKD,MAAM;qBAKT,EAAE;oBAKH,EAAE;2BAKY,IAAI;qBAKR,EAAE;wBAKO,EAAE;;wBAUhB,KAAK;wBAKL,KAAK;;mCAWoB,KAAK;;;;wBAsB9B,KAAK;yBAKW,KAAK;yBAKrC,KAAK;yBAKL,KAAK;sBAKU,EAAE;yBAKe,IAAI;6BAKjC,KAAK;4BAKW,IAAI;;IAkBrD;;OAEG;IACH,wBAAwB,CAAC,KAAwB;QAC/C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,IAA2B;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,QAAiB;QACpC,IAA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AC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EACpE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,aAAa,EAClB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,GACtC,CACH;wBACA,IAAI,CAAC,SAAS,IAAI,2EAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,EAAC,cAAc,GAAsB,CAC/H;oBACL,IAAI,CAAC,gBAAgB,EAAE,CACpB,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter, AttachInternals } from '@stencil/core';\nimport IMask, { FactoryArg, InputMask } 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 formAssociated: 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: string = 'text';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) inputMode: string = 'text';\n\n /**\n * Label text for the input\n */\n @Prop({ reflect: true }) label?: string = '';\n\n /**\n * Name text for the input\n */\n @Prop({ reflect: true }) name?: string = '';\n\n /**\n * Placeholder text for the input\n */\n @Prop({ reflect: true }) placeholder?: string | null = null;\n\n /**\n * Value of the input field\n */\n @Prop({ mutable: true }) value?: string | number = '';\n\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 * Controls whether the selection functionality is active\n */\n @Prop({ reflect: true, mutable: true }) enableSelectionMode: boolean = false;\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?: 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?: any | 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 * Removes the alertCircle icon when necessary(as used in CuraDropdownSearch)\n */\n @Prop() hideErrorIcon: boolean = false;\n\n /**\n * Defines whether the input should have autocomplete\n */\n @Prop({ reflect: true }) autocomplete?: string = 'on';\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 @AttachInternals() internals: ElementInternals;\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 /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.value = state.value;\n this.applyValueToMask();\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.handleClearInput();\n this.internals.setValidity({});\n this.internals.setFormValue('');\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n @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 [this.status]: true,\n transparent: this.mode === 'transparent',\n selection: this.enableSelectionMode,\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 // Used when input is rendered in cura-dropdown-search with error status\n if (this.status === 'error' && this.hideErrorIcon) {\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\n renderHelperText() {\n const isError = this.status === 'error';\n const isSuccess = this.status === 'success';\n const isDefault = this.status === 'default';\n const helperTextSize = this.size === 'large' ? 'small' : 'xsmall';\n const helperTextWeight = this.mode === 'transparent' ? 'bold' : 'regular';\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} lineHeight=\"xsmall\" 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} lineHeight=\"xsmall\" color=\"success-dark\" weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n </div>\n );\n }\n\n handleMouseEnter() {\n this.isHovered = true;\n }\n handleMouseLeave() {\n this.isHovered = false;\n }\n\n componentDidLoad() {\n this.initializeMask();\n }\n\n disconnectedCallback() {\n this.destroyMask();\n }\n\n handleMaskUpdate() {\n if (this.maskedInput) {\n this.maskedInput.updateValue();\n }\n }\n\n handleClearInput() {\n this.handleMaskUpdate();\n\n this.value = '';\n this.inputRef.value = '';\n this.valueChange.emit(this.value);\n this.handleMaskUpdate();\n }\n\n handleInputFocus() {\n this.handleMaskUpdate();\n this.isFocused = true;\n }\n\n handleInputBlur() {\n this.handleMaskUpdate();\n setTimeout(() => {\n this.isFocused = false;\n }, 150);\n }\n\n shouldDisplayMask() {\n return this.maskPreset || this.maskRegex || this.maskAdvanced;\n }\n\n @Watch('maskPreset')\n @Watch('maskRegex')\n @Watch('maskAdvanced')\n initializeMask() {\n if (this.shouldDisplayMask()) {\n if (this.maskedInput) {\n this.destroyMask();\n }\n if (this.maskPreset) {\n this.initializePresetMask();\n } else if (this.maskRegex) {\n this.initializeRegexMask();\n } else if (this.maskAdvanced) {\n this.initializeAdvancedMask();\n }\n this.applyValueToMask();\n } else {\n this.clearMaskValue();\n }\n }\n\n initializeRegexMask() {\n const cleanedRegexString = this.maskRegex.replace(/^\\/|\\/[gimsuy]*$/g, '');\n const flags = (this.maskRegex.match(/\\/[gimsuy]*$/g) || [''])[0].slice(1);\n this.maskedInput = IMask(this.inputRef, { mask: new RegExp(cleanedRegexString, flags) });\n }\n\n initializePresetMask() {\n const options = maskOptions[this.maskPreset];\n\n if (options) {\n this.maskedInput = IMask(this.inputRef, options);\n } else {\n console.error(`Mask preset \"${this.maskPreset}\" not found.`);\n }\n }\n\n initializeAdvancedMask() {\n if (!this.inputRef) return;\n\n try {\n const config = typeof this.maskAdvanced === 'string' ? JSON.parse(this.maskAdvanced) : this.maskAdvanced;\n this.maskedInput = IMask(this.inputRef, config);\n } catch (error) {\n console.error('Error defining maskAdvanced:', error);\n }\n }\n\n applyValueToMask() {\n if (this.maskedInput) {\n if (this.maskedInput.mask === Date || this.maskedInput.mask === Number) {\n this.maskedInput.typedValue = this.value;\n } else {\n this.value = this.maskedInput.value;\n }\n this.handleMaskUpdate();\n }\n }\n\n clearMaskValue() {\n this.inputRef.value = this.value as string;\n }\n\n destroyMask() {\n if (this.maskedInput) {\n this.maskedInput.destroy();\n this.maskedInput = undefined;\n }\n }\n\n handleInputChange(event: any) {\n const inputValue = event.target.value;\n\n this.valueChange.emit(inputValue);\n\n if (this.type === 'number') {\n this.handleNumberInputChange(inputValue);\n } else {\n this.handleTextInputChange(inputValue);\n }\n this.internals.setFormValue(this.value as string);\n }\n\n handleNumberInputChange(inputValue: string) {\n const numericValue = parseFloat(inputValue);\n if (!isNaN(numericValue)) {\n this.value = numericValue;\n } else {\n console.error('Invalid numeric input:', inputValue);\n }\n }\n\n handleTextInputChange(inputValue: string) {\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 }\n this.value = this.maskedInput.value;\n } else {\n this.value = inputValue;\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number') {\n this.handleBlockInvalidNumber(event);\n }\n }\n\n handleBlockInvalidNumber(e: KeyboardEvent) {\n if (['e', 'E', '+', '-'].includes(e.key)) e.preventDefault();\n }\n render() {\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\" part=\"cura-input-field\" style={this.styles}>\n {this.renderIcon()}\n <input\n name={this.name ? this.name : ''}\n type={this.type}\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 !== undefined && this.value !== null ? this.value : ''}\n inputmode={this.maskPreset ? 'tel' : this.inputMode}\n ref={ref => (this.inputRef = ref)}\n autocomplete={this.autocomplete}\n />\n {!!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (\n <cura-icon\n size={this.size === 'large' || this.mode === 'transparent' ? 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"]}
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,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC9H,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,WAAW,EAAkB,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,WAAW,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter, AttachInternals, Method, Element } from '@stencil/core';\nimport IMask, { FactoryArg, InputMask } from 'imask';\nimport { maskOptions, MaskOptionsMap } from './mask-presets/input-mask-presets';\nimport { checkMobile, checkIOS, fakeInputIOSHack } from '../../../utils/utils';\nexport type MaskPreset = keyof MaskOptionsMap;\n@Component({\n tag: 'cura-input-text',\n styleUrl: 'cura-input-text.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraInputText {\n @Element() host: HTMLElement;\n /**\n * Mode of the input: 'default' or 'transparent' (default: 'default')\n */\n @Prop({ reflect: true, mutable: true }) mode: 'default' | 'transparent' | string = 'default';\n\n /**\n * Indicates input status(default: default)\n */\n\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' | string = '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' | string = 'medium';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) type: string = 'text';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) inputMode: string = 'text';\n\n /**\n * Label text for the input\n */\n @Prop({ reflect: true }) label?: string = '';\n\n /**\n * Name text for the input\n */\n @Prop({ reflect: true }) name?: string = '';\n\n /**\n * Placeholder text for the input\n */\n @Prop({ reflect: true }) placeholder?: string | null = null;\n\n /**\n * Value of the input field\n */\n @Prop({ reflect: true, mutable: true }) value: string | number = '';\n\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 * Controls whether the selection functionality is active\n */\n @Prop({ reflect: true, mutable: true }) enableSelectionMode: boolean = false;\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?: 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?: any | 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 * Removes the alertCircle icon when necessary(as used in CuraDropdownSearch)\n */\n @Prop() hideErrorIcon: boolean = false;\n\n /**\n * Defines whether the input should have autocomplete\n */\n @Prop({ reflect: true }) autocomplete?: string = 'on';\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 /**\n * Emitted when the clear button is clicked\n * @type {EventEmitter<string | number>}\n */\n @Event() inputClear: EventEmitter<string | number>;\n\n @AttachInternals() internals: ElementInternals;\n\n inputRef!: HTMLInputElement;\n\n @Method()\n async setFocus() {\n // IOS needs large timeout value to work\n const timeoutMs = checkMobile() && checkIOS() ? 1000 : 200;\n // IOS fake input hack\n let fakeInput = fakeInputIOSHack(this.host);\n setTimeout(() => {\n this.inputRef.focus();\n if (fakeInput) fakeInput.remove();\n }, timeoutMs);\n }\n\n /**\n * Instance of InputMask is returned when IMask constructor is called.\n */\n maskedInput: InputMask<FactoryArg>;\n weights: { [key: string]: string };\n breakpoints: any;\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.value = state.value;\n this.applyValueToMask();\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.handleClearInput();\n this.internals.setValidity({});\n this.internals.setFormValue('');\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n @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.breakpoints = window.CuraAPI.theme.breakpoints.get();\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 [this.status]: true,\n transparent: this.mode === 'transparent',\n selection: this.enableSelectionMode,\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 // Used when input is rendered in cura-dropdown-search with error status\n if (this.status === 'error' && this.hideErrorIcon) {\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\n renderHelperText() {\n const isError = this.status === 'error';\n const isSuccess = this.status === 'success';\n const isDefault = this.status === 'default';\n const helperTextSize = this.size === 'large' ? 'small' : 'xsmall';\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\" part=\"cura-input-text-helper\">\n {isDefault && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color={colorText}>\n <slot></slot>\n </cura-label>\n )}\n {isError && this.mode === \"default\" && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color=\"error-dark\">\n <slot></slot>\n </cura-label>\n )}\n {isError && this.mode === \"transparent\" && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color=\"neutral-black\">\n <slot></slot>\n </cura-label>\n )}\n {isSuccess && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color=\"success-dark\">\n <slot></slot>\n </cura-label>\n )}\n </div>\n );\n }\n\n handleMouseEnter() {\n this.isHovered = true;\n }\n handleMouseLeave() {\n this.isHovered = false;\n }\n\n componentDidLoad() {\n this.initializeMask();\n }\n\n disconnectedCallback() {\n this.destroyMask();\n }\n\n handleMaskUpdate() {\n if (this.maskedInput) {\n this.maskedInput.updateValue();\n }\n }\n\n handleClearInput() {\n this.handleMaskUpdate();\n this.value = '';\n this.inputRef.value = '';\n this.valueChange.emit(this.value);\n this.inputClear.emit(this.value);\n this.handleMaskUpdate();\n this.setFocus();\n }\n\n handleInputFocus() {\n this.handleMaskUpdate();\n this.isFocused = true;\n }\n\n handleInputBlur() {\n this.handleMaskUpdate();\n setTimeout(() => {\n this.isFocused = false;\n }, 150);\n }\n\n shouldDisplayMask() {\n return this.maskPreset || this.maskRegex || this.maskAdvanced;\n }\n\n @Watch('maskPreset')\n @Watch('maskRegex')\n @Watch('maskAdvanced')\n initializeMask() {\n if (this.shouldDisplayMask()) {\n if (this.maskedInput) {\n this.destroyMask();\n }\n if (this.maskPreset) {\n this.initializePresetMask();\n } else if (this.maskRegex) {\n this.initializeRegexMask();\n } else if (this.maskAdvanced) {\n this.initializeAdvancedMask();\n }\n this.applyValueToMask();\n } else {\n this.clearMaskValue();\n }\n }\n\n initializeRegexMask() {\n const cleanedRegexString = this.maskRegex.replace(/^\\/|\\/[gimsuy]*$/g, '');\n const flags = (this.maskRegex.match(/\\/[gimsuy]*$/g) || [''])[0].slice(1);\n this.maskedInput = IMask(this.inputRef, { mask: new RegExp(cleanedRegexString, flags) });\n }\n\n initializePresetMask() {\n const options = maskOptions[this.maskPreset];\n\n if (options) {\n this.maskedInput = IMask(this.inputRef, options);\n } else {\n console.error(`Mask preset \"${this.maskPreset}\" not found.`);\n }\n }\n\n initializeAdvancedMask() {\n if (!this.inputRef) return;\n\n try {\n const config = typeof this.maskAdvanced === 'string' ? JSON.parse(this.maskAdvanced) : this.maskAdvanced;\n this.maskedInput = IMask(this.inputRef, config);\n } catch (error) {\n console.error('Error defining maskAdvanced:', error);\n }\n }\n\n applyValueToMask() {\n if (this.maskedInput) {\n if (this.maskedInput.mask === Date || this.maskedInput.mask === Number) {\n this.maskedInput.typedValue = this.value;\n } else {\n this.value = this.maskedInput.value;\n }\n this.handleMaskUpdate();\n }\n }\n\n clearMaskValue() {\n this.inputRef.value = this.value as string;\n }\n\n destroyMask() {\n if (this.maskedInput) {\n this.maskedInput.destroy();\n this.maskedInput = undefined;\n }\n }\n\n handleInputChange(event: any) {\n const inputValue = event.target.value;\n\n this.valueChange.emit(inputValue);\n\n if (this.type === 'number') {\n this.handleNumberInputChange(inputValue);\n } else {\n this.handleTextInputChange(inputValue);\n }\n this.internals.setFormValue(this.value as string);\n }\n\n handleNumberInputChange(inputValue: string) {\n const numericValue = parseFloat(inputValue);\n if (!isNaN(numericValue)) {\n this.value = numericValue;\n } else {\n console.error('Invalid numeric input:', inputValue);\n }\n }\n\n handleTextInputChange(inputValue: string) {\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 }\n this.value = this.maskedInput.value;\n } else {\n this.value = inputValue;\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number') {\n this.handleBlockInvalidNumber(event);\n }\n }\n\n handleBlockInvalidNumber(e: KeyboardEvent) {\n if (['e', 'E', '+', '-'].includes(e.key)) e.preventDefault();\n }\n\n render() {\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\" part=\"cura-input-field\" style={this.styles}>\n {this.renderIcon()}\n <input\n name={this.name ? this.name : ''}\n type={this.type}\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 !== undefined && this.value !== null ? this.value : ''}\n inputmode={this.maskPreset ? 'tel' : this.inputMode}\n ref={ref => (this.inputRef = ref)}\n autocomplete={this.autocomplete}\n />\n {!!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (\n <cura-icon\n size={this.size === 'large' || this.mode === 'transparent' ? 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"]}
@@ -33,20 +33,21 @@ export class CuraLabel {
33
33
  };
34
34
  }
35
35
  setColors() {
36
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--color-link': this.theme.colors.getColor(`${this.spotColor}`) });
37
+ }
38
+ hostCSSProperties() {
36
39
  const fontColor = this.color
37
40
  ? this.theme.colors.getColor(this.color)
38
41
  : 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
42
  return {
43
43
  '--margin-block': this.marginBlock,
44
44
  '--font-size-base': this.fontSizeBase,
45
- '--line-height': this.lineHeight
45
+ '--line-height': this.lineHeight,
46
+ '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),
46
47
  };
47
48
  }
48
49
  render() {
49
- return (h(Host, { key: '0155daf05e29fca75db8d8b8b103a4d3b60c1bc9', style: this.hostCSSProperties() }, h("p", { key: 'cd63e97738f18f2842e3f6e3a0d086dd0c240651', style: this.styles, class: this.getClasses() }, h("slot", { key: 'e20da850c970c10f03f832d59db1050f2329c856' }))));
50
+ return (h(Host, { key: '185d6a679086dfc3fc2e1bb2b8e55759e7a68506', style: this.hostCSSProperties() }, h("p", { key: 'c5514dcec410d3f2b9b1c0a0cb7ee182b4d082ec', style: this.styles, class: this.getClasses() }, h("slot", { key: '6dde4081303f411728cf3c8769252d9565859b67' }))));
50
51
  }
51
52
  static get is() { return "cura-label"; }
52
53
  static get encapsulation() { return "shadow"; }
@@ -1 +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;;QAsDpB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;oBAhDmD,QAAQ;sBAMpC,SAAS;yBAM1B,aAAa;;2BAiBX,GAAG;0BAMJ,MAAM;sBAYxB,EAAE;;IA1BpB,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IA2BD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,UAAU;QACR,MAAM,SAAS,GAAG,EAAE,CAAC;QACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;QAC1C,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;QACxD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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' | string = '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"]}
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;;QAsDpB,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;oBAhDmD,QAAQ;sBAMpC,SAAS;yBAM1B,aAAa;;2BAiBX,GAAG;0BAMJ,MAAM;sBAYxB,EAAE;;IA1BpB,iBAAiB;QACf,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IA2BD,iBAAiB;QACf,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,UAAU;QACR,MAAM,SAAS,GAAG,EAAE,CAAC;QACrB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC;QAC1C,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,IAAI,CAAC;QACxD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,CAAC,YAAY,GAAG,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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' | string = '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 this.styles = {\n ...this.styles,\n '--color-link': this.theme.colors.getColor(`${this.spotColor}`)\n };\n }\n\n hostCSSProperties() {\n const fontColor = this.color\n ? this.theme.colors.getColor(this.color)\n : this.theme.fonts.getColor();\n return {\n '--margin-block': this.marginBlock,\n '--font-size-base': this.fontSizeBase,\n '--line-height': this.lineHeight,\n '--color-body': fontColor || this.theme.colors.getColor('neutral-darker'),\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"]}
@@ -120,7 +120,7 @@ export class CuraRadio {
120
120
  return statusColors[this.status][type];
121
121
  }
122
122
  render() {
123
- return (h(Host, { key: 'eecc279b05da57162acf41d62bac48a00cc9d985' }, h("div", { key: '279b6922349bf02b7e65065bcb98b9c824073516', class: this.getClasses(), style: this.styles }, h("div", { key: 'a6a2de8f8d7e6efbca3aee079255451e448903a2', class: "info" }, h("div", { key: '6d2733ca86d087031e1ec4fdea26d5906f695479', class: "label-wrapper" }, h("cura-label", { key: '2c0c878411bb846ff7bcf24c385895f1d86b3022', class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: '07abc53858276dc6429381a0c658c562e1d05933', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: 'ab5c0451842242ee584f2d3b430b803498190118', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: '3673a0a1ecc7f9dfa6975bdddaf708ed8ad1b72d' }))), h("input", { key: 'db602c601168ada1a5a375d3ef122d4f315fa256', 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 }))));
123
+ return (h(Host, { key: 'fa38dc0c23638cc267d9d52c2796d6a079439484' }, h("div", { key: 'cbe3fe10a7bc3fe0bd7a6ef73fbbadfbc7334e2c', class: this.getClasses(), style: this.styles }, h("div", { key: '0649b867ec06c0069c655cffbe109f8d258509c2', class: "info" }, h("div", { key: '7f8bfc46f21677cf661418f7b9c380fadddf1860', class: "label-wrapper" }, h("cura-label", { key: 'a259c61bb7adc503dbeea4329c22aa37e9e8996a', class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: '0ffdc2c6f69f7ada640439a603c1b91125a3c332', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: 'ae59fe9a1a05a9e69e257986f91f609bd03b66b9', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: '524b6e086ff9ea32d8db78a78e354992b0d844d8' }))), h("input", { key: '0d0b4e915da4691f319ae340d54032fdcce90405', 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 }))));
124
124
  }
125
125
  static get is() { return "cura-radio"; }
126
126
  static get encapsulation() { return "shadow"; }
@@ -290,13 +290,13 @@ export class CuraSelect {
290
290
  return h("cura-icon", { class: "feedback-icon", name: icon, iconset: "default", size: this.size === 'large' ? 20 : 16, color: this.getColor('icon'), style: this.styles });
291
291
  }
292
292
  render() {
293
- return (h(Host, { key: 'c4d3b518ddf6b9498e3a038b42d96cc36ea5b9af', style: this.styles }, h("div", { key: 'b469ec6460df4faa9dbf33ae46efd25b16e8dede', class: this.getClasses(), onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onClick: this.handleClick }, this.label && (h("cura-label", { key: 'b1e96f454e136f74a34d3fe2ad915a76b8892383', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getColor('label') }, this.label, " ", this.required && h("span", { key: 'f6df4c9fd66179b157545354c9d7bce3a1965383', class: "required" }, "* "))), h("div", { key: '3c99013ba59cbc7520fcd9e54e4911be88e257e8', class: {
293
+ return (h(Host, { key: '38228fe7771c15276afbc2322617f808b098a93c', style: this.styles }, h("div", { key: '03bce7f977543eb2cf03e2c6cebc82a2bbd27d11', class: this.getClasses(), onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onClick: this.handleClick }, this.label && (h("cura-label", { key: '653fa837432fce57c96d7335dd5558a49c7c89ee', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getColor('label') }, this.label, " ", this.required && h("span", { key: 'a5a30e27dc5da4b5b58e5aa7ddce9eca4f2087e3', class: "required" }, "* "))), h("div", { key: 'bed979aede3272b64b73a09bc6fc0d011ccd4519', class: {
294
294
  'cura-input-field': true,
295
295
  'open': this.isOpen,
296
- } }, this.renderIcon(), h("input", { key: '5c4cca3aa11ca5a43679551ef0db5d3b4a2672c1', type: "text", autocomplete: "off", onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyNavigation, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error'), onInput: this.handleInputChange, style: this.styles, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.textInput, readonly: this.searchBehavior ? null : true }), h("button", { key: '0e4ae1fc33090cb1c2a5f6616302262093c709f3', class: "up-down-button" }, h("cura-icon", { key: '7aa46c48d670725d6010e00ff74772dd76f04358', name: this.isOpen ? 'up' : 'down', class: "up-down-icon", color: this.disabled ? 'neutral-dark' : 'primary-base', size: 16, iconset: "default" }))), h("cura-label", { key: 'b37bbce2d092b368509778cb39e830fbfba40107', class: "helper-text", size: "xsmall", color: this.getColor('text'), weight: this.mode === 'transparent' ? 'bold' : 'regular' }, h("slot", { key: 'b8090f03acc7d34e75088cdd8b7f375b2be21aaf' })), this.isOpen && (h("div", { key: '4d279e833a3c4311972b11c259d616b7480fc5b5', class: {
296
+ } }, this.renderIcon(), h("input", { key: '87bf279f2b649d46201b8bed68bacef35cdbc885', type: "text", autocomplete: "off", onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyNavigation, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error'), onInput: this.handleInputChange, style: this.styles, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.textInput, readonly: this.searchBehavior ? null : true }), h("button", { key: '9801d6b98926af53c553fa980dd15004c4276e89', class: "up-down-button" }, h("cura-icon", { key: '573e9f48cb5f8f42ce7e866c92266bd60b10e0c0', name: this.isOpen ? 'up' : 'down', class: "up-down-icon", color: this.disabled ? 'neutral-dark' : 'primary-base', size: 16, iconset: "default" }))), h("cura-label", { key: '43c75e852af717b868070c38f160c30aea3961d9', class: "helper-text", size: "xsmall", color: this.getColor('text'), weight: this.mode === 'transparent' ? 'bold' : 'regular' }, h("slot", { key: '3e0252e13b20b0909cab47efbe0532eaa6a32b69' })), this.isOpen && (h("div", { key: 'b628c4161e555ea8277728cf021b5ad789e5df0c', class: {
297
297
  menu: true,
298
298
  open: this.isOpen,
299
- } }, h("slot", { key: '0c20c0bbfb9ed727825bb6cc7e06ab671350d37b', name: "option" }))))));
299
+ } }, h("slot", { key: '7aefc066eee503e408aacf4a542834968fc7433b', name: "option" }))))));
300
300
  }
301
301
  static get is() { return "cura-select"; }
302
302
  static get encapsulation() { return "shadow"; }
@@ -33,7 +33,7 @@ export class CuraSelectOption {
33
33
  };
34
34
  }
35
35
  render() {
36
- return (h(Host, { key: '7633d57e0ab5ba265c31e53dde513bdb0bc934e8', slot: "option" }, h("div", { key: 'aa301dd963ffde79251ad79428934609ba70d713', class: this.getClasses(), style: this.styles }, h("cura-label", { key: '2a55fc05a9bb9a47a4a4b191e85ce5fdb6c7d5cf', color: `${this.selected ? 'primary-base' : 'neutral-black'}`, size: this.getSize('label'), "margin-block": "0" }, h("slot", { key: '4f28e0d1142cf847174f72614470b89ac3495197' })), this.selected && h("cura-icon", { key: '189b1b8877e68648f5282281df144ead39b64441', name: 'check', size: this.getSize('icon'), color: "primary-base" }))));
36
+ return (h(Host, { key: '2e26a1c7816b58feffe9086588d0a3dcb4526fd1', slot: "option" }, h("div", { key: 'cfdad50aec30db07e9d5dc15f77ed542f6fcd9b0', class: this.getClasses(), style: this.styles }, h("cura-label", { key: 'a53291891ba265b0d7c9828792597fcce7cc2c90', color: `${this.selected ? 'primary-base' : 'neutral-black'}`, size: this.getSize('label'), "margin-block": "0" }, h("slot", { key: 'eca7922d5bd4ebf929907ec9e630aee96250c818' })), this.selected && h("cura-icon", { key: 'c3bdf4f0ac3b71b2932c050467a65bc44fc76670', name: 'check', size: this.getSize('icon'), color: "primary-base" }))));
37
37
  }
38
38
  static get is() { return "cura-select-option"; }
39
39
  static get encapsulation() { return "shadow"; }
@@ -92,7 +92,7 @@ export class CuraSwitch {
92
92
  return classes;
93
93
  }
94
94
  render() {
95
- return (h(Host, { key: '11257c8df21e4d88ef7a1e26b72f8c53fd316edd' }, h("div", { key: '358b9bf587443350fd092abb179b2207064c9278', class: this.getClasses(), style: this.styles }, h("div", { key: 'acc517d68a7fde4a83653a7fadbdb337e6175498', class: "info" }, h("cura-label", { key: 'dede214a31292a72e8f55adb50060628a1a101c0', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, class: "label", weight: "bold", size: this.size === 'large' ? 'medium' : 'xsmall', lineHeight: "125%", color: this.assignColor('neutral-white', 'neutral-black') }, this.label), h("cura-label", { key: 'a96960a7e898e8f9d7151c468d18e52860d589d1', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, h("slot", { key: 'de46f003bf8046e3742d831cc45d22471e19c0a4' }))), h("div", { key: 'ae0c72cd68ed42fec1338d6ded49d7b535157476', onClick: this.toggleSwitch, class: "control" }, h("div", { key: '3aa0e60235071541289ea6a430966094a2753520', class: `track ${this.size.toLowerCase()}` }, h("div", { key: '419866ba2b46a394428f83e6824ebb315e6671a1', class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
95
+ return (h(Host, { key: '4ea77f70fe3fe34aac7b8ec7a177ded8c5050e8c' }, h("div", { key: '25b0da8f4b11a43dd2ac27a4fbbd652b7bed17a4', class: this.getClasses(), style: this.styles }, h("div", { key: '6edfaafe8986d4978328a8b31165598d3c7d79aa', class: "info" }, h("cura-label", { key: '24403a30f3d345353371aa2c2639052f86ba3a92', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, class: "label", weight: "bold", size: this.size === 'large' ? 'medium' : 'xsmall', lineHeight: "125%", color: this.assignColor('neutral-white', 'neutral-black') }, this.label), h("cura-label", { key: '2d1ef3fd6634cbb96603d413c702bb2787512a1c', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, h("slot", { key: '889dc39d9a6ced5c0873affe6249d7b7e7e54747' }))), h("div", { key: 'c4a524cb4a30cb9b7e9f1aa0302c796cda620c1e', onClick: this.toggleSwitch, class: "control" }, h("div", { key: '5715b16aeb18b50721739504690586455210f392', class: `track ${this.size.toLowerCase()}` }, h("div", { key: 'a83c9ab52f707844eefb86f59f1ed520a44586f1', class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
96
96
  }
97
97
  static get is() { return "cura-switch"; }
98
98
  static get encapsulation() { return "shadow"; }
@@ -16,7 +16,7 @@ export class CuraLoaderBar {
16
16
  this.setProgress();
17
17
  }
18
18
  render() {
19
- return (h(Host, { key: '4dc7ef7b17bfb408fa7ff9a74509637bb9045353' }, h("div", { key: 'cd2654377f0b45c5b6fa6aa57940f5d81cfd0cce', id: "progress-bar", class: "progress-bar", style: this.styles }, h("span", { key: '5d7b4a058162b840f167adb81843403f6c488c4e', class: "progress-bar-fill" }))));
19
+ return (h(Host, { key: '282ee3653b83cbf7e34920c62ee6a00d22add8d0' }, h("div", { key: '2a5c70d038d6b362ac9d24e60de2ccb68221f7e3', id: "progress-bar", class: "progress-bar", style: this.styles }, h("span", { key: 'b10c55dda03fe7c92cf1aec1432a6338c04f2e3d', class: "progress-bar-fill" }))));
20
20
  }
21
21
  setColor() {
22
22
  this.styles = Object.assign(Object.assign({}, this.styles), { '--neutral-base': window.CuraAPI.theme.colors.getColor(`neutral-base`, 0.2), '--color-base': window.CuraAPI.theme.colors.getColor(this.color) });
@@ -19,7 +19,7 @@ export class CuraLoaderCircle {
19
19
  };
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '627023f3e413d6a28e802eaf011f0ca39ccc17d9', style: this.getStyles() }, h("svg", { key: '1f7dab1ef6e82d81ffacf336660c508c039e7430', viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: '4baeff0f8c83335be93cd067dbed2cfa5d0be88a' }, h("circle", { key: '7929b1120288af1f17976a69463bf8965f2e4fae', cx: "8", cy: "8", r: "7", stroke: "url(#paint0_linear_13485_11488)", "stroke-width": "2" }), h("path", { key: '832582680715bedebca8f025d141d40785832a86', d: "M1 8C1 4.13401 4.11877 1 7.96596 1C9.53445 1 10.9819 1.52093 12.1462 2.4C12.8959 2.96601 13.5282 3.68049 14 4.5", "stroke-width": "2" })), h("defs", { key: 'ad393945da8c664faed05c17ed1c51cae3a02edb' }, h("linearGradient", { key: 'bf42d208d369c60bbdad5adf81c4c61144ad34eb', id: "paint0_linear_13485_11488", x1: "15.7", y1: "4.5", x2: "4.15", y2: "11.5", gradientUnits: "userSpaceOnUse" }, h("stop", { key: '445c119c6cebcfb057826ebd090b883aa479a8cd' }), h("stop", { key: '47555985163574e69556490d1d09c6283d31845c', offset: "1" }))))));
22
+ return (h(Host, { key: '269527f065adf8cd35d6bbe6109e117f26c5e02c', style: this.getStyles() }, h("svg", { key: '4541cd3ee1003f93e7ea83e6cbdc9effcd5ef61b', viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: '64939f37a9dd55e9431cd0848f561f346f43be87' }, h("circle", { key: 'a7202aa4be9776b2f035dab40922a346d7284f19', cx: "8", cy: "8", r: "7", stroke: "url(#paint0_linear_13485_11488)", "stroke-width": "2" }), h("path", { key: '490f083e9fe14ca62a8f8b530973d981098f2cef', d: "M1 8C1 4.13401 4.11877 1 7.96596 1C9.53445 1 10.9819 1.52093 12.1462 2.4C12.8959 2.96601 13.5282 3.68049 14 4.5", "stroke-width": "2" })), h("defs", { key: '94af0657b89a161ac617957b0ae24d53872b1139' }, h("linearGradient", { key: '29406a4830366edc3a945be2c31096eebaa70e48', id: "paint0_linear_13485_11488", x1: "15.7", y1: "4.5", x2: "4.15", y2: "11.5", gradientUnits: "userSpaceOnUse" }, h("stop", { key: '356c8c0347b272e6cee5c47191b2381d08346b66' }), h("stop", { key: '02fa4f0ed3d994ca274bc9175da6f3e7a4246b2d', offset: "1" }))))));
23
23
  }
24
24
  static get is() { return "cura-loader-circle"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -60,7 +60,7 @@ export class CuraDisplay {
60
60
  return tags[`${this.level}`] || tags['default'];
61
61
  }
62
62
  render() {
63
- return (h(Host, { key: '01876449797c600a4fa37c9b4addd80855e6fc83', style: this.hostCSSProperties() }, this.getHeadingTag()));
63
+ return (h(Host, { key: '7e0a43f434bce1797cebbe4d6d2565e64d64bab7', style: this.hostCSSProperties() }, this.getHeadingTag()));
64
64
  }
65
65
  static get is() { return "cura-display"; }
66
66
  static get encapsulation() { return "shadow"; }