@rededor/cura 1.0.0 → 1.2.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 (332) hide show
  1. package/dist/assets/assets/cura-assets.zip +0 -0
  2. package/dist/assets/assets/fonts/Gotham/Gotham-Black.woff2 +0 -0
  3. package/dist/assets/assets/fonts/Gotham/Gotham-BlackItalic.woff2 +0 -0
  4. package/dist/assets/assets/fonts/Gotham/Gotham-Bold.woff2 +0 -0
  5. package/dist/assets/assets/fonts/Gotham/Gotham-BoldItalic.woff2 +0 -0
  6. package/dist/assets/assets/fonts/Gotham/Gotham-Book.woff2 +0 -0
  7. package/dist/assets/assets/fonts/Gotham/Gotham-BookItalic.woff2 +0 -0
  8. package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLight.woff2 +0 -0
  9. package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLightItalic.woff2 +0 -0
  10. package/dist/assets/assets/fonts/Gotham/Gotham-Light.woff2 +0 -0
  11. package/dist/assets/assets/fonts/Gotham/Gotham-LightItalic.woff2 +0 -0
  12. package/dist/assets/assets/fonts/Gotham/Gotham-Medium.woff2 +0 -0
  13. package/dist/assets/assets/fonts/Gotham/Gotham-MediumItalic.woff2 +0 -0
  14. package/dist/assets/assets/fonts/Gotham/Gotham-Thin.woff2 +0 -0
  15. package/dist/assets/assets/fonts/Gotham/Gotham-ThinItalic.woff2 +0 -0
  16. package/dist/assets/assets/fonts/Gotham/Gotham-Ultra.woff2 +0 -0
  17. package/dist/assets/assets/fonts/Gotham/Gotham-UltraItalic.woff2 +0 -0
  18. package/dist/assets/assets/fonts/Gotham/style.css +90 -0
  19. package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-Italic-VariableFont_wght.woff2 +0 -0
  20. package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-VariableFont_wght.woff2 +0 -0
  21. package/dist/assets/assets/fonts/HankenGrotesk/style-webfont.css +72 -0
  22. package/dist/assets/assets/fonts/HankenGrotesk/style.css +16 -0
  23. package/dist/assets/assets/fonts/Roboto/Roboto-Black.woff2 +0 -0
  24. package/dist/assets/assets/fonts/Roboto/Roboto-BlackItalic.woff2 +0 -0
  25. package/dist/assets/assets/fonts/Roboto/Roboto-Bold.woff2 +0 -0
  26. package/dist/assets/assets/fonts/Roboto/Roboto-BoldItalic.woff2 +0 -0
  27. package/dist/assets/assets/fonts/Roboto/Roboto-Italic.woff2 +0 -0
  28. package/dist/assets/assets/fonts/Roboto/Roboto-Light.woff2 +0 -0
  29. package/dist/assets/assets/fonts/Roboto/Roboto-LightItalic.woff2 +0 -0
  30. package/dist/assets/assets/fonts/Roboto/Roboto-Medium.woff2 +0 -0
  31. package/dist/assets/assets/fonts/Roboto/Roboto-MediumItalic.woff2 +0 -0
  32. package/dist/assets/assets/fonts/Roboto/Roboto-Regular.woff2 +0 -0
  33. package/dist/assets/assets/fonts/Roboto/Roboto-Thin.woff2 +0 -0
  34. package/dist/assets/assets/fonts/Roboto/Roboto-ThinItalic.woff2 +0 -0
  35. package/dist/assets/assets/fonts/Roboto/style-webfont.css +756 -0
  36. package/dist/assets/assets/fonts/Roboto/style.css +90 -0
  37. package/dist/assets/assets/images/avatar/doctor-default.svg +6 -7
  38. package/dist/assets/assets/images/avatar/doctor-default_old.svg +8 -0
  39. package/dist/assets/assets/images/avatar/dora-default.svg +3 -4
  40. package/dist/assets/assets/images/avatar/dora-default_old.svg +5 -0
  41. package/dist/assets/assets/images/avatar/patient-default.svg +16 -10
  42. package/dist/assets/assets/images/avatar/patient-default_old.svg +12 -0
  43. package/dist/assets/assets/images/avatar/unit-default.svg +7 -8
  44. package/dist/assets/assets/images/avatar/unit-default_old.svg +9 -0
  45. package/dist/cjs/{app-globals-b77d5b06.js → app-globals-4d07f363.js} +20 -4
  46. package/dist/cjs/app-globals-4d07f363.js.map +1 -0
  47. package/dist/cjs/cura-accordion_12.cjs.entry.js +24 -17
  48. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  49. package/dist/cjs/cura-alert.cjs.entry.js +2 -2
  50. package/dist/cjs/cura-avatar.cjs.entry.js +2 -2
  51. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  52. package/dist/cjs/cura-badge-number.cjs.entry.js +29 -0
  53. package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -0
  54. package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
  55. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  56. package/dist/cjs/cura-button-select.cjs.entry.js +69 -58
  57. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  58. package/dist/cjs/cura-button-transparent.cjs.entry.js +2 -2
  59. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -1
  60. package/dist/cjs/cura-calendar.cjs.entry.js +126 -235
  61. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/cura-card.cjs.entry.js +2 -2
  63. package/dist/cjs/cura-checkbox.cjs.entry.js +3 -3
  64. package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
  65. package/dist/cjs/cura-display.cjs.entry.js +2 -2
  66. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +2 -2
  67. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +3 -3
  68. package/dist/cjs/cura-dropdown-search.cjs.entry.js +33 -6
  69. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  70. package/dist/cjs/cura-icons-view.cjs.entry.js +4 -4
  71. package/dist/cjs/cura-input-date.cjs.entry.js +188 -0
  72. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -0
  73. package/dist/cjs/cura-loader-bar.cjs.entry.js +2 -2
  74. package/dist/cjs/cura-radio.cjs.entry.js +2 -2
  75. package/dist/cjs/cura-switch.cjs.entry.js +2 -2
  76. package/dist/cjs/cura-toast.cjs.entry.js +2 -2
  77. package/dist/cjs/cura.cjs.js +3 -3
  78. package/dist/cjs/index-6dc29195.js +126 -0
  79. package/dist/cjs/index-6dc29195.js.map +1 -0
  80. package/dist/cjs/{index-98e7ba54.js → index-e6d728ec.js} +70 -3
  81. package/dist/{esm/index-1ad98520.js.map → cjs/index-e6d728ec.js.map} +1 -1
  82. package/dist/cjs/loader.cjs.js +3 -3
  83. package/dist/collection/api/theme-presets/theme-default.js +3 -3
  84. package/dist/collection/api/theme-presets/theme-default.js.map +1 -1
  85. package/dist/collection/api/theme-presets/theme-legacy-default.js +16 -0
  86. package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -1
  87. package/dist/collection/assets/images/avatar/doctor-default.svg +6 -7
  88. package/dist/collection/assets/images/avatar/doctor-default_old.svg +8 -0
  89. package/dist/collection/assets/images/avatar/dora-default.svg +3 -4
  90. package/dist/collection/assets/images/avatar/dora-default_old.svg +5 -0
  91. package/dist/collection/assets/images/avatar/patient-default.svg +16 -10
  92. package/dist/collection/assets/images/avatar/patient-default_old.svg +12 -0
  93. package/dist/collection/assets/images/avatar/unit-default.svg +7 -8
  94. package/dist/collection/assets/images/avatar/unit-default_old.svg +9 -0
  95. package/dist/collection/collection-manifest.json +2 -0
  96. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +30 -0
  97. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +66 -0
  98. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -0
  99. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js +56 -0
  100. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +1 -0
  101. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  102. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  103. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  104. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  105. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +49 -21
  106. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +110 -113
  107. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  108. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +133 -0
  109. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -0
  110. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  111. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  112. package/dist/collection/components/cura-alert/cura-alert.js +1 -1
  113. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  114. package/dist/collection/components/cura-calendar/cura-calendar.css +15 -5
  115. package/dist/collection/components/cura-calendar/cura-calendar.js +139 -52
  116. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  117. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +33 -3
  118. package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
  119. package/dist/collection/components/cura-card/cura-card.js +1 -1
  120. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  121. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  122. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  123. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  124. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +13 -5
  125. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  126. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  127. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  128. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +1 -1
  129. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +49 -4
  130. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  131. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js +19 -6
  132. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js.map +1 -1
  133. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +79 -0
  134. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +424 -0
  135. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -0
  136. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +138 -0
  137. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -0
  138. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +5 -2
  139. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +41 -2
  140. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  141. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +73 -21
  142. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -1
  143. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +3 -0
  144. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -1
  145. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  146. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  147. package/dist/collection/components/forms/cura-select/cura-select.css +6 -2
  148. package/dist/collection/components/forms/cura-select/cura-select.js +23 -4
  149. package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
  150. package/dist/collection/components/forms/cura-select/cura-select.stories.js +11 -1
  151. package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -1
  152. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  153. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  154. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  155. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  156. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  157. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  158. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +3 -1
  159. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  160. package/dist/collection/stories/blocks/index.js +85 -0
  161. package/dist/components/cura-alert.js +1 -1
  162. package/dist/components/cura-avatar.js +1 -1
  163. package/dist/components/cura-badge-number.d.ts +11 -0
  164. package/dist/components/cura-badge-number.js +8 -0
  165. package/dist/components/cura-badge-number.js.map +1 -0
  166. package/dist/components/cura-badge-number2.js +49 -0
  167. package/dist/components/cura-badge-number2.js.map +1 -0
  168. package/dist/components/cura-button-outline.js +1 -1
  169. package/dist/components/cura-button-outline.js.map +1 -1
  170. package/dist/components/cura-button-select.js +81 -65
  171. package/dist/components/cura-button-select.js.map +1 -1
  172. package/dist/components/cura-button-transparent2.js +1 -1
  173. package/dist/components/cura-button-transparent2.js.map +1 -1
  174. package/dist/components/cura-button.js +1 -1
  175. package/dist/components/cura-button.js.map +1 -1
  176. package/dist/components/cura-calendar.js +1 -4065
  177. package/dist/components/cura-calendar.js.map +1 -1
  178. package/dist/components/cura-calendar2.js +4082 -0
  179. package/dist/components/cura-calendar2.js.map +1 -0
  180. package/dist/components/cura-card.js +1 -1
  181. package/dist/components/cura-checkbox.js +2 -2
  182. package/dist/components/cura-checkbox.js.map +1 -1
  183. package/dist/components/cura-display.js +1 -1
  184. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  185. package/dist/components/cura-dropdown-search-option.js +2 -2
  186. package/dist/components/cura-dropdown-search.js +33 -5
  187. package/dist/components/cura-dropdown-search.js.map +1 -1
  188. package/dist/components/cura-heading2.js +1 -1
  189. package/dist/components/cura-icon2.js +1 -1
  190. package/dist/components/cura-icons-view.js +3 -3
  191. package/dist/components/cura-input-date.d.ts +11 -0
  192. package/dist/components/cura-input-date.js +270 -0
  193. package/dist/components/cura-input-date.js.map +1 -0
  194. package/dist/components/cura-input-text2.js +10 -2
  195. package/dist/components/cura-input-text2.js.map +1 -1
  196. package/dist/components/cura-label2.js +1 -1
  197. package/dist/components/cura-loader-bar2.js +1 -1
  198. package/dist/components/cura-loader-circle2.js +1 -1
  199. package/dist/components/cura-page-template.js +1 -1
  200. package/dist/components/cura-paragraph2.js +2 -2
  201. package/dist/components/cura-paragraph2.js.map +1 -1
  202. package/dist/components/cura-radio.js +1 -1
  203. package/dist/components/cura-select-option2.js +1 -1
  204. package/dist/components/cura-select2.js +7 -5
  205. package/dist/components/cura-select2.js.map +1 -1
  206. package/dist/components/cura-switch.js +1 -1
  207. package/dist/components/cura-toast.js +1 -1
  208. package/dist/components/index.js +23 -3
  209. package/dist/components/index.js.map +1 -1
  210. package/dist/cura/cura.esm.js +1 -1
  211. package/dist/cura/cura.esm.js.map +1 -1
  212. package/dist/cura/p-0b7a7306.js +2 -0
  213. package/dist/cura/p-0b7a7306.js.map +1 -0
  214. package/dist/cura/{p-0d435e42.entry.js → p-116a1cd6.entry.js} +2 -2
  215. package/dist/cura/p-272c784a.js +2 -0
  216. package/dist/cura/p-272c784a.js.map +1 -0
  217. package/dist/cura/{p-4c7a2419.entry.js → p-2d267d23.entry.js} +2 -2
  218. package/dist/cura/{p-b301a1ef.entry.js → p-33772510.entry.js} +2 -2
  219. package/dist/cura/{p-b301a1ef.entry.js.map → p-33772510.entry.js.map} +1 -1
  220. package/dist/cura/{p-0a923806.entry.js → p-41c3d47d.entry.js} +2 -2
  221. package/dist/cura/{p-0a923806.entry.js.map → p-41c3d47d.entry.js.map} +1 -1
  222. package/dist/cura/p-44e3325a.entry.js +2 -0
  223. package/dist/cura/p-44e3325a.entry.js.map +1 -0
  224. package/dist/cura/p-4e14c01c.entry.js +2 -0
  225. package/dist/cura/p-563ba0cd.entry.js +2 -0
  226. package/dist/cura/p-563ba0cd.entry.js.map +1 -0
  227. package/dist/cura/{p-57b8b468.entry.js → p-8f3db0fe.entry.js} +2 -2
  228. package/dist/cura/{p-a00d2c68.entry.js → p-907b3d12.entry.js} +2 -2
  229. package/dist/cura/p-a2ae6bd2.entry.js +2 -0
  230. package/dist/cura/p-a2ae6bd2.entry.js.map +1 -0
  231. package/dist/cura/{p-6682619b.entry.js → p-b2d5db22.entry.js} +2 -2
  232. package/dist/cura/p-b43b69f3.entry.js +2 -0
  233. package/dist/cura/p-b43b69f3.entry.js.map +1 -0
  234. package/dist/cura/{p-599acc84.entry.js → p-be10b681.entry.js} +2 -2
  235. package/dist/cura/p-be10b681.entry.js.map +1 -0
  236. package/dist/cura/{p-a5cf0fd6.entry.js → p-c6508bd7.entry.js} +2 -2
  237. package/dist/cura/{p-2203e829.entry.js → p-dcd2e5bb.entry.js} +2 -2
  238. package/dist/cura/{p-84d8c67d.entry.js → p-e5023e34.entry.js} +2 -2
  239. package/dist/cura/p-e8bc6381.entry.js +2 -0
  240. package/dist/cura/p-e8bc6381.entry.js.map +1 -0
  241. package/dist/cura/p-ed97cf3c.entry.js +2 -0
  242. package/dist/cura/p-ed97cf3c.entry.js.map +1 -0
  243. package/dist/cura/{p-ad8a7e0f.entry.js → p-fcbf4311.entry.js} +2 -2
  244. package/dist/cura/{p-66c5cf5f.entry.js → p-fd083399.entry.js} +2 -2
  245. package/dist/cura/p-fd5ed6b0.js +3 -0
  246. package/dist/cura/p-fd5ed6b0.js.map +1 -0
  247. package/dist/cura/{p-f9433d24.entry.js → p-fdce91a7.entry.js} +2 -2
  248. package/dist/esm/{app-globals-488bf508.js → app-globals-6ca7103d.js} +20 -4
  249. package/dist/esm/app-globals-6ca7103d.js.map +1 -0
  250. package/dist/esm/cura-accordion_12.entry.js +24 -17
  251. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  252. package/dist/esm/cura-alert.entry.js +2 -2
  253. package/dist/esm/cura-avatar.entry.js +2 -2
  254. package/dist/esm/cura-badge-distance.entry.js +1 -1
  255. package/dist/esm/cura-badge-number.entry.js +25 -0
  256. package/dist/esm/cura-badge-number.entry.js.map +1 -0
  257. package/dist/esm/cura-button-outline.entry.js +2 -2
  258. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  259. package/dist/esm/cura-button-select.entry.js +69 -58
  260. package/dist/esm/cura-button-select.entry.js.map +1 -1
  261. package/dist/esm/cura-button-transparent.entry.js +2 -2
  262. package/dist/esm/cura-button-transparent.entry.js.map +1 -1
  263. package/dist/esm/cura-calendar.entry.js +58 -167
  264. package/dist/esm/cura-calendar.entry.js.map +1 -1
  265. package/dist/esm/cura-card.entry.js +2 -2
  266. package/dist/esm/cura-checkbox.entry.js +3 -3
  267. package/dist/esm/cura-checkbox.entry.js.map +1 -1
  268. package/dist/esm/cura-display.entry.js +2 -2
  269. package/dist/esm/cura-dropdown-search-option-title.entry.js +2 -2
  270. package/dist/esm/cura-dropdown-search-option.entry.js +3 -3
  271. package/dist/esm/cura-dropdown-search.entry.js +33 -6
  272. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  273. package/dist/esm/cura-icons-view.entry.js +4 -4
  274. package/dist/esm/cura-input-date.entry.js +184 -0
  275. package/dist/esm/cura-input-date.entry.js.map +1 -0
  276. package/dist/esm/cura-loader-bar.entry.js +2 -2
  277. package/dist/esm/cura-radio.entry.js +2 -2
  278. package/dist/esm/cura-switch.entry.js +2 -2
  279. package/dist/esm/cura-toast.entry.js +2 -2
  280. package/dist/esm/cura.js +4 -4
  281. package/dist/esm/{index-1ad98520.js → index-747aad85.js} +70 -3
  282. package/dist/esm/index-747aad85.js.map +1 -0
  283. package/dist/esm/index-fbee309a.js +120 -0
  284. package/dist/esm/index-fbee309a.js.map +1 -0
  285. package/dist/esm/loader.js +4 -4
  286. package/dist/types/api/theme-presets/theme-legacy-default.d.ts +3 -3
  287. package/dist/types/api/theme-presets/theme-presets.d.ts +3 -3
  288. package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +8 -0
  289. package/dist/types/components/badges/cura-badge-number/cura-badge-number.stories.d.ts +39 -0
  290. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +12 -34
  291. package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +105 -0
  292. package/dist/types/components/cura-calendar/cura-calendar.d.ts +53 -42
  293. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +33 -0
  294. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +9 -3
  295. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.stories.d.ts +14 -0
  296. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +92 -0
  297. package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +125 -0
  298. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +6 -0
  299. package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +15 -0
  300. package/dist/types/components/forms/cura-select/cura-select.d.ts +5 -0
  301. package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +11 -0
  302. package/dist/types/components.d.ts +180 -48
  303. package/package.json +5 -3
  304. package/dist/cjs/app-globals-b77d5b06.js.map +0 -1
  305. package/dist/cjs/index-98e7ba54.js.map +0 -1
  306. package/dist/cura/p-0dd837cf.entry.js +0 -2
  307. package/dist/cura/p-0dd837cf.entry.js.map +0 -1
  308. package/dist/cura/p-312791fb.js +0 -3
  309. package/dist/cura/p-312791fb.js.map +0 -1
  310. package/dist/cura/p-4ef24fbd.entry.js +0 -2
  311. package/dist/cura/p-4ef24fbd.entry.js.map +0 -1
  312. package/dist/cura/p-599acc84.entry.js.map +0 -1
  313. package/dist/cura/p-a6c3c0ea.js +0 -2
  314. package/dist/cura/p-a6c3c0ea.js.map +0 -1
  315. package/dist/cura/p-dc5d0c29.entry.js +0 -2
  316. package/dist/cura/p-dc5d0c29.entry.js.map +0 -1
  317. package/dist/cura/p-df5c3a86.entry.js +0 -2
  318. package/dist/cura/p-df5c3a86.entry.js.map +0 -1
  319. package/dist/cura/p-dfc65f66.entry.js +0 -2
  320. package/dist/esm/app-globals-488bf508.js.map +0 -1
  321. /package/dist/cura/{p-0d435e42.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
  322. /package/dist/cura/{p-4c7a2419.entry.js.map → p-2d267d23.entry.js.map} +0 -0
  323. /package/dist/cura/{p-dfc65f66.entry.js.map → p-4e14c01c.entry.js.map} +0 -0
  324. /package/dist/cura/{p-57b8b468.entry.js.map → p-8f3db0fe.entry.js.map} +0 -0
  325. /package/dist/cura/{p-a00d2c68.entry.js.map → p-907b3d12.entry.js.map} +0 -0
  326. /package/dist/cura/{p-6682619b.entry.js.map → p-b2d5db22.entry.js.map} +0 -0
  327. /package/dist/cura/{p-a5cf0fd6.entry.js.map → p-c6508bd7.entry.js.map} +0 -0
  328. /package/dist/cura/{p-2203e829.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
  329. /package/dist/cura/{p-84d8c67d.entry.js.map → p-e5023e34.entry.js.map} +0 -0
  330. /package/dist/cura/{p-ad8a7e0f.entry.js.map → p-fcbf4311.entry.js.map} +0 -0
  331. /package/dist/cura/{p-66c5cf5f.entry.js.map → p-fd083399.entry.js.map} +0 -0
  332. /package/dist/cura/{p-f9433d24.entry.js.map → p-fdce91a7.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"cura-select.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAgB,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtH,MAAM,OAAO,UAAU;;QAiHrB;;WAEG;QACH,WAAM,GAAG,EAAE,CAAC;QAEZ;;WAEG;QACH,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAmH7B;;;WAGG;QACH,oBAAe,GAAG,CAAC,SAA2B,EAAE,EAAE;YAChD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAC3B,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;oBACnC,IAAI,QAAQ,CAAC,aAAa,KAAK,UAAU;wBAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBACzE,CAAC;YACH,CAAC,CAAC,CAAC;QACL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,EAAE,EACR,OAAO,EAAC,SAAS,GACjB,CACE;gBACN,mEACE,KAAK,EAAC,aAAa,EACnB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;oBACxD,8DAAa,CACF;gBACZ,IAAI,CAAC,MAAM,IAAI,CACd,4DAAK,KAAK,EAAE;wBACV,MAAM,EAAE,IAAI;wBACZ,MAAM,EAAE,IAAI,CAAC,MAAM;qBACpB;oBACC,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h, Event, EventEmitter, AttachInternals, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select',\n styleUrl: 'cura-select.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSelect {\n /**\n * The label text for the select component.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) label: string = '';\n\n /**\n * Placeholder text for the input field.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n\n /**\n * Current value of the select component.\n * Reflects as an attribute in the DOM and is mutable.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Display mode of the select component.\n * Can be 'default' or 'transparent'.\n */\n @Prop({ reflect: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Size of the select component.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Status of the select component.\n * Can be 'success', 'error', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'success' | 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the select component is required.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Internal state: Whether the input is hovered.\n * Default: false\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused.\n * Default: false\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Whether the dropdown menu is open.\n * Default: false\n */\n @State() isOpen: boolean = false;\n\n /**\n * Internal state: Collection of options for the select component.\n */\n @State() options: NodeListOf<HTMLCuraSelectOptionElement>;\n\n\n @State() activeIndex = -1\n\n @Watch('activeIndex')\n updateOptionHighlights(newActiveINdex: number) {\n this.options.forEach((option, index) => (option as any).active = index === newActiveINdex);\n }\n\n @State() textInput = ''\n\n @Watch('textInput')\n /**\n * Filters the options based on the current input value.\n */\n filterOptions(newText) {\n if (!this.isOpen) {\n return\n }\n \n this.options.forEach(option => {\n const optionValue = option.textContent?.toLowerCase() || '';\n const isVisible = optionValue.includes(newText.toLocaleLowerCase())\n option.style.display = isVisible ? 'block' : 'none';\n });\n }\n\n /**\n * Reference to the host element of the component.\n */\n @Element() host: HTMLElement;\n\n /**\n * Event emitted when an option is selected.\n */\n @Event() selected: EventEmitter;\n\n /**\n * MutationObserver to watch changes in the component.\n */\n mutationObserver: MutationObserver;\n\n /**\n * Styles to be applied to the component.\n */\n styles = {};\n\n /**\n * Theme object containing font and color information.\n */\n theme = window.CuraAPI.theme;\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string; }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.textInput = state.value;\n this.updateSelectedOption();\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.textInput = '';\n this.clearSelectedAttributes()\n this.internals.setFormValue('');\n this.internals.setValidity({});\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 /**\n * Lifecycle method called before the component is rendered.\n * Initializes the options for the select component.\n */\n componentWillLoad() {\n this.initializeOptions();\n }\n /**\n * Lifecycle method called after the component is rendered.\n * Initializes select-related functionality.\n */\n componentDidLoad() {\n this.setupMutationObserver();\n }\n /**\n * Lifecycle method called when the component is connected to the DOM.\n * Applies styles based on the theme.\n */\n connectedCallback() {\n this.applyStyles();\n }\n /**\n * Lifecycle method called when the component is disconnected from the DOM.\n * Disconnects the MutationObserver if it exists.\n */\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n }\n\n initializeOptions() {\n this.options = this.host.querySelectorAll<HTMLCuraSelectOptionElement>('cura-select-option');\n this.options.forEach(option => {\n option.setAttribute('size', this.size);\n\n const isSelected = this.value === option.value\n option.setAttribute('selected', JSON.stringify(isSelected));\n\n if (isSelected) {\n this.value = option.value\n this.internals.setFormValue(option.value)\n }\n });\n\n this.textInput = Array.from(this.options).find(option => option.value === this.value)?.textContent || this.textInput\n }\n /**\n * Applies styles to the component based on the theme.\n */\n applyStyles() {\n const { fonts, colors } = this.theme;\n const fontWeights = fonts.getWeights();\n\n this.styles = {\n ...this.styles,\n '--font-weight-medium': fontWeights.medium,\n '--font-weight-bold': fontWeights.bold,\n '--font-weight-regular': fontWeights.regular,\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-size': fonts.getSize(),\n };\n\n const colorKeys = [\n 'primary-base', 'neutral-purewhite', 'neutral-white', 'neutral-black', 'neutral-medium', 'neutral-light',\n 'neutral-base', 'neutral-dark', 'success-dark', 'success-darker', 'success-lighter',\n 'error-lighter', 'error-dark', 'error-darker', 'error-base', 'info-base'\n ];\n\n colorKeys.forEach(key => {\n this.styles[`--${key}`] = colors.getColor(key);\n });\n }\n /**\n * Sets up a MutationObserver to watch for changes in the component.\n */\n setupMutationObserver() {\n this.mutationObserver = new MutationObserver(this.handleMutations);\n this.mutationObserver.observe(this.host, { attributes: true, subtree: true, attributeFilter: ['selected', 'value'] });\n }\n /**\n * Handles mutations observed by the MutationObserver.\n * Updates the selected option or filters options based on the mutation type.\n */\n handleMutations = (mutations: MutationRecord[]) => {\n mutations.forEach(mutation => {\n if (mutation.type === 'attributes') {\n if (mutation.attributeName === 'selected') this.updateSelectedOption();\n }\n });\n };\n /**\n * Handles the selection of an option.\n */\n onOptiselected = (event: Event) => {\n const selectedOption = event.target as HTMLElement;\n this.clearSelectedAttributes();\n selectedOption.setAttribute('selected', 'true');\n };\n\n @Watch('value') \n handleValueChange(newValue: string) {\n this.clearSelectedAttributes(); \n\n const selectedOption = this.host.querySelector(`cura-select-option[value=\"${newValue}\"]`); \n\n if(!selectedOption) {\n return\n }\n\n selectedOption.setAttribute('selected', 'true');\n }\n\n updateSelectedOption() {\n const selectedOptionElement = this.host.querySelector<HTMLCuraSelectOptionElement>('cura-select-option[selected]');\n\n if (!selectedOptionElement) {\n return\n }\n\n this.value = selectedOptionElement.value\n this.internals.setFormValue(this.value)\n\n if (this.textInput !== selectedOptionElement.textContent) {\n this.textInput = selectedOptionElement.textContent ;\n this.isOpen = false;\n this.selected.emit(selectedOptionElement.value);\n }\n }\n\n /**\n * Clears the 'selected' attribute from all options.\n */\n clearSelectedAttributes() {\n this.options.forEach(option => option.removeAttribute('selected'));\n }\n\n handleKeyNavigation = (event: KeyboardEvent) => {\n const { code: keyCode } = event\n \n if (!this.isOpen && keyCode === 'ArrowDown') {\n this.isOpen = true\n this.activeIndex = 0\n\n return\n }\n\n if (keyCode === 'ArrowDown') {\n event.preventDefault();\n this.updateActiveIndex(1);\n }\n\n if (keyCode === 'ArrowUp') {\n event.preventDefault();\n this.updateActiveIndex(-1);\n }\n\n if (keyCode === 'Enter' || keyCode === 'Space') {\n this.options[this.activeIndex]?.click();\n }\n\n if (keyCode === 'Escape') {\n this.isOpen = false\n }\n }\n\n updateActiveIndex(direction: number) {\n if (this.options.length === 0) return;\n this.activeIndex = (this.activeIndex + direction + this.options.length) % this.options.length;\n }\n\n handleInputChange = (e: Event) => {\n this.textInput = (e.target as HTMLInputElement).value;\n this.isOpen = this.textInput.length > 0;\n this.internals.setFormValue(this.textInput);\n };\n\n\n getClasses() {\n return {\n wrapper: true,\n label: !!this.label,\n disabled: this.disabled,\n transparent: this.mode === 'transparent',\n [this.size.toLowerCase()]: true,\n [this.status.toLowerCase()]: true,\n };\n }\n\n /**\n * Determines the color based on the item type and component state.\n */\n getColor(item: 'label' | 'text' | 'icon') {\n if (this.disabled) return 'neutral-medium';\n\n const isStatusDefault = this.status === 'default';\n const isHoveredOrFocused = this.isFocused || this.isHovered;\n\n if (item === 'label') {\n if (!isStatusDefault || isHoveredOrFocused) return 'neutral-black';\n return 'neutral-dark';\n }\n\n if (isHoveredOrFocused && isStatusDefault) return 'neutral-black';\n if (this.status === 'success') return 'success-dark';\n if (this.status === 'error') return 'error-dark';\n\n return 'neutral-dark';\n }\n\n /**\n * Renders the icon based on the component's status.\n */\n renderIcon() {\n if (this.status === 'default') return null;\n const icon = { success: 'checkCircle', error: 'alertCircle' }[this.status];\n return (\n <cura-icon\n class='feedback-icon'\n name={icon}\n iconset='default'\n size={this.size === 'large' ? 20 : 16}\n color={this.getColor('icon')}\n style={this.styles}\n />\n );\n }\n\n handleClick = (event: MouseEvent) => {\n if (this.disabled) return event.preventDefault();\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'CURA-SELECT-OPTION') return this.onOptiselected(event);\n this.isOpen = !this.isOpen;\n };\n\n\n render() {\n return (\n <Host style={this.styles}>\n <div\n class={this.getClasses()}\n onMouseEnter={() => (this.isHovered = true)}\n onMouseLeave={() => (this.isHovered = false)}\n onClick={this.handleClick}\n >\n {this.label && (\n <cura-label\n class='label'\n weight='bold'\n size={this.size === 'large' ? 'small' : 'xsmall'}\n color={this.getColor('label')}\n >\n {this.label} {this.required && <span class='required'>* </span>}\n </cura-label>\n )}\n\n <div class={{\n 'cura-input-field': true,\n 'open': this.isOpen\n }}>\n {this.renderIcon()}\n <input\n type=\"text\"\n autocomplete='off'\n onFocus={() => (this.isFocused = true)}\n onBlur={() => (this.isFocused = false)}\n onKeyDown={this.handleKeyNavigation}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}\n onInput={this.handleInputChange}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n value={this.textInput}\n />\n <cura-icon\n name={this.isOpen ? 'up' : 'down'}\n class=\"up-down-icon\"\n color={this.disabled ? 'neutral-dark' : 'primary-base'}\n size={16}\n iconset='default'\n />\n </div>\n <cura-label\n class=\"helper-text\"\n size='xsmall'\n color={this.getColor('text')}\n weight={this.mode === 'transparent' ? 'bold' : 'regular'} >\n <slot></slot>\n </cura-label>\n {this.isOpen && (\n <div class={{\n 'menu': true,\n 'open': this.isOpen\n }}>\n <slot name='option'></slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-select.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAgB,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtH,MAAM,OAAO,UAAU;;QAuHrB;;WAEG;QACH,WAAM,GAAG,EAAE,CAAC;QAEZ;;WAEG;QACH,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAmH7B;;;WAGG;QACH,oBAAe,GAAG,CAAC,SAA2B,EAAE,EAAE;YA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CAAC,QAAQ,EACvB,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAC3C;oBACF,kEACE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EACjC,KAAK,EAAC,cAAc,EACpB,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EACtD,IAAI,EAAE,EAAE,EACR,OAAO,EAAC,SAAS,GACjB,CACE;gBACN,mEACE,KAAK,EAAC,aAAa,EACnB,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;oBACxD,8DAAa,CACF;gBACZ,IAAI,CAAC,MAAM,IAAI,CACd,4DAAK,KAAK,EAAE;wBACV,MAAM,EAAE,IAAI;wBACZ,MAAM,EAAE,IAAI,CAAC,MAAM;qBACpB;oBACC,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h, Event, EventEmitter, AttachInternals, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select',\n styleUrl: 'cura-select.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSelect {\n /**\n * The label text for the select component.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) label: string = '';\n\n /**\n * Placeholder text for the input field.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n\n /**\n * Current value of the select component.\n * Reflects as an attribute in the DOM and is mutable.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Display mode of the select component.\n * Can be 'default' or 'transparent'.\n */\n @Prop({ reflect: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Size of the select component.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Status of the select component.\n * Can be 'success', 'error', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'success' | 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the select component is required.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Enable / Disable search at options by term.\n * Default: false\n */\n @Prop({ reflect: true}) searchBehavior: boolean = false;\n\n /**\n * Internal state: Whether the input is hovered.\n * Default: false\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused.\n * Default: false\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Whether the dropdown menu is open.\n * Default: false\n */\n @State() isOpen: boolean = false;\n\n /**\n * Internal state: Collection of options for the select component.\n */\n @State() options: NodeListOf<HTMLCuraSelectOptionElement>;\n\n\n @State() activeIndex = -1\n\n @Watch('activeIndex')\n updateOptionHighlights(newActiveINdex: number) {\n this.options.forEach((option, index) => (option as any).active = index === newActiveINdex);\n }\n\n @State() textInput = ''\n\n @Watch('textInput')\n /**\n * Filters the options based on the current input value.\n */\n filterOptions(newText) {\n if (!this.isOpen || !this.searchBehavior) {\n return\n }\n\n this.options.forEach(option => {\n const optionValue = option.textContent?.toLowerCase() || '';\n const isVisible = optionValue.includes(newText.toLocaleLowerCase())\n option.style.display = isVisible ? 'block' : 'none';\n });\n }\n\n /**\n * Reference to the host element of the component.\n */\n @Element() host: HTMLElement;\n\n /**\n * Event emitted when an option is selected.\n */\n @Event() selected: EventEmitter;\n\n /**\n * MutationObserver to watch changes in the component.\n */\n mutationObserver: MutationObserver;\n\n /**\n * Styles to be applied to the component.\n */\n styles = {};\n\n /**\n * Theme object containing font and color information.\n */\n theme = window.CuraAPI.theme;\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string; }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.textInput = state.value;\n this.updateSelectedOption();\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.textInput = '';\n this.clearSelectedAttributes()\n this.internals.setFormValue('');\n this.internals.setValidity({});\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 /**\n * Lifecycle method called before the component is rendered.\n * Initializes the options for the select component.\n */\n componentWillLoad() {\n this.initializeOptions();\n }\n /**\n * Lifecycle method called after the component is rendered.\n * Initializes select-related functionality.\n */\n componentDidLoad() {\n this.setupMutationObserver();\n }\n /**\n * Lifecycle method called when the component is connected to the DOM.\n * Applies styles based on the theme.\n */\n connectedCallback() {\n this.applyStyles();\n }\n /**\n * Lifecycle method called when the component is disconnected from the DOM.\n * Disconnects the MutationObserver if it exists.\n */\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n }\n\n initializeOptions() {\n this.options = this.host.querySelectorAll<HTMLCuraSelectOptionElement>('cura-select-option');\n this.options.forEach(option => {\n option.setAttribute('size', this.size);\n\n const isSelected = this.value === option.value\n option.setAttribute('selected', JSON.stringify(isSelected));\n\n if (isSelected) {\n this.value = option.value\n this.internals.setFormValue(option.value)\n }\n });\n\n this.textInput = Array.from(this.options).find(option => option.value === this.value)?.textContent || this.textInput\n }\n /**\n * Applies styles to the component based on the theme.\n */\n applyStyles() {\n const { fonts, colors } = this.theme;\n const fontWeights = fonts.getWeights();\n\n this.styles = {\n ...this.styles,\n '--font-weight-medium': fontWeights.medium,\n '--font-weight-bold': fontWeights.bold,\n '--font-weight-regular': fontWeights.regular,\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-size': fonts.getSize(),\n };\n\n const colorKeys = [\n 'primary-base', 'neutral-purewhite', 'neutral-white', 'neutral-black', 'neutral-medium', 'neutral-light',\n 'neutral-base', 'neutral-dark', 'success-dark', 'success-darker', 'success-lighter',\n 'error-lighter', 'error-dark', 'error-darker', 'error-base', 'info-base'\n ];\n\n colorKeys.forEach(key => {\n this.styles[`--${key}`] = colors.getColor(key);\n });\n }\n /**\n * Sets up a MutationObserver to watch for changes in the component.\n */\n setupMutationObserver() {\n this.mutationObserver = new MutationObserver(this.handleMutations);\n this.mutationObserver.observe(this.host, { attributes: true, subtree: true, attributeFilter: ['selected', 'value'] });\n }\n /**\n * Handles mutations observed by the MutationObserver.\n * Updates the selected option or filters options based on the mutation type.\n */\n handleMutations = (mutations: MutationRecord[]) => {\n mutations.forEach(mutation => {\n if (mutation.type === 'attributes') {\n if (mutation.attributeName === 'selected') this.updateSelectedOption();\n }\n });\n };\n /**\n * Handles the selection of an option.\n */\n onOptiselected = (event: Event) => {\n const selectedOption = event.target as HTMLElement;\n this.clearSelectedAttributes();\n selectedOption.setAttribute('selected', 'true');\n };\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.clearSelectedAttributes();\n\n const selectedOption = this.host.querySelector(`cura-select-option[value=\"${newValue}\"]`);\n\n if(!selectedOption) {\n return\n }\n\n selectedOption.setAttribute('selected', 'true');\n }\n\n updateSelectedOption() {\n const selectedOptionElement = this.host.querySelector<HTMLCuraSelectOptionElement>('cura-select-option[selected]');\n\n if (!selectedOptionElement) {\n return\n }\n\n this.value = selectedOptionElement.value\n this.internals.setFormValue(this.value)\n\n if (this.textInput !== selectedOptionElement.textContent) {\n this.textInput = selectedOptionElement.textContent ;\n this.isOpen = false;\n this.selected.emit(selectedOptionElement.value);\n }\n }\n\n /**\n * Clears the 'selected' attribute from all options.\n */\n clearSelectedAttributes() {\n this.options.forEach(option => option.removeAttribute('selected'));\n }\n\n handleKeyNavigation = (event: KeyboardEvent) => {\n const { code: keyCode } = event\n\n if (!this.isOpen && keyCode === 'ArrowDown') {\n this.isOpen = true\n this.activeIndex = 0\n\n return\n }\n\n if (keyCode === 'ArrowDown') {\n event.preventDefault();\n this.updateActiveIndex(1);\n }\n\n if (keyCode === 'ArrowUp') {\n event.preventDefault();\n this.updateActiveIndex(-1);\n }\n\n if (keyCode === 'Enter' || keyCode === 'Space') {\n this.options[this.activeIndex]?.click();\n }\n\n if (keyCode === 'Escape') {\n this.isOpen = false\n }\n }\n\n updateActiveIndex(direction: number) {\n if (this.options.length === 0) return;\n this.activeIndex = (this.activeIndex + direction + this.options.length) % this.options.length;\n }\n\n handleInputChange = (e: Event) => {\n this.textInput = (e.target as HTMLInputElement).value;\n this.isOpen = this.textInput.length > 0;\n this.internals.setFormValue(this.textInput);\n };\n\n\n getClasses() {\n return {\n wrapper: true,\n label: !!this.label,\n disabled: this.disabled,\n transparent: this.mode === 'transparent',\n [this.size.toLowerCase()]: true,\n [this.status.toLowerCase()]: true,\n };\n }\n\n /**\n * Determines the color based on the item type and component state.\n */\n getColor(item: 'label' | 'text' | 'icon') {\n if (this.disabled) return 'neutral-medium';\n\n const isStatusDefault = this.status === 'default';\n const isHoveredOrFocused = this.isFocused || this.isHovered;\n\n if (item === 'label') {\n if (!isStatusDefault || isHoveredOrFocused) return 'neutral-black';\n return 'neutral-dark';\n }\n\n if (isHoveredOrFocused && isStatusDefault) return 'neutral-black';\n if (this.status === 'success') return 'success-dark';\n if (this.status === 'error') return 'error-dark';\n\n return 'neutral-dark';\n }\n\n /**\n * Renders the icon based on the component's status.\n */\n renderIcon() {\n if (this.status === 'default') return null;\n const icon = { success: 'checkCircle', error: 'alertCircle' }[this.status];\n return (\n <cura-icon\n class='feedback-icon'\n name={icon}\n iconset='default'\n size={this.size === 'large' ? 20 : 16}\n color={this.getColor('icon')}\n style={this.styles}\n />\n );\n }\n\n handleClick = (event: MouseEvent) => {\n if (this.disabled) return event.preventDefault();\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'CURA-SELECT-OPTION') return this.onOptiselected(event);\n this.isOpen = !this.isOpen;\n };\n\n\n render() {\n return (\n <Host style={this.styles}>\n <div\n class={this.getClasses()}\n onMouseEnter={() => (this.isHovered = true)}\n onMouseLeave={() => (this.isHovered = false)}\n onClick={this.handleClick}\n >\n {this.label && (\n <cura-label\n class='label'\n weight='bold'\n size={this.size === 'large' ? 'small' : 'xsmall'}\n color={this.getColor('label')}\n >\n {this.label} {this.required && <span class='required'>* </span>}\n </cura-label>\n )}\n\n <div class={{\n 'cura-input-field': true,\n 'open': this.isOpen\n }}>\n {this.renderIcon()}\n <input\n type=\"text\"\n autocomplete='off'\n onFocus={() => (this.isFocused = true)}\n onBlur={() => (this.isFocused = false)}\n onKeyDown={this.handleKeyNavigation}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}\n onInput={this.handleInputChange}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n value={this.textInput}\n readonly={this.searchBehavior ? null : true}\n />\n <cura-icon\n name={this.isOpen ? 'up' : 'down'}\n class=\"up-down-icon\"\n color={this.disabled ? 'neutral-dark' : 'primary-base'}\n size={16}\n iconset='default'\n />\n </div>\n <cura-label\n class=\"helper-text\"\n size='xsmall'\n color={this.getColor('text')}\n weight={this.mode === 'transparent' ? 'bold' : 'regular'} >\n <slot></slot>\n </cura-label>\n {this.isOpen && (\n <div class={{\n 'menu': true,\n 'open': this.isOpen\n }}>\n <slot name='option'></slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -9,7 +9,8 @@ const renderCuraSelect = (args) => {
9
9
  size="${args.size}"` : ''}${args.status ? `
10
10
  status="${args.status}"` : ''}${args.disabled ? `
11
11
  disabled` : ''}${args.required ? `
12
- required` : ''}>
12
+ required` : ''}${args.searchBehavior ? `
13
+ search-behavior="${args.searchBehavior}"` : ''}>
13
14
  ${args.helperText}
14
15
  ${optionsMarkup}
15
16
  </cura-select>`;
@@ -96,6 +97,14 @@ export default {
96
97
  defaultValue: { summary: 'false' },
97
98
  },
98
99
  },
100
+ searchBehavior: {
101
+ control: 'boolean',
102
+ description: 'Habilita o modo de digitação e busca nas opções a partir do termo.',
103
+ table: {
104
+ category: 'states',
105
+ defaultValue: { summary: 'false' },
106
+ }
107
+ },
99
108
  helperText: {
100
109
  name: 'content',
101
110
  control: 'text',
@@ -138,6 +147,7 @@ export const CuraSelect = {
138
147
  status: 'default',
139
148
  disabled: false,
140
149
  required: false,
150
+ searchBehavior: false,
141
151
  helperText: 'Texto de ajuda'
142
152
  },
143
153
  };
@@ -1 +1 @@
1
- {"version":3,"file":"cura-select.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.stories.tsx"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,EAAE;IAChC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC9C,8BAA8B,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,uBAAuB,CACnF,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEX,MAAM,KAAK,GAAG,eAAe,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;WACjC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;iBAClC,IAAI,CAAC,WAAW,GAAG,CAAC,CA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E,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,gBAAgB;KAC7B;CACF,CAAC","sourcesContent":["const renderCuraSelect = (args) => {\n const optionsMarkup = args.options.map(option =>\n `<cura-select-option value=\"${option.value}\">${option.label}</cura-select-option>`\n ).join('');\n\n const block = `<cura-select${args.label ? `\n label=\"${args.label}\"` : ''}${args.placeholder ? `\n placeholder=\"${args.placeholder}\"` : ''}${args.defaultValue ? `\n default-value=\"${args.defaultValue}\"` : ''}${args.value ? `\n value=\"${args.value}\"` : ''}${args.mode ? `\n mode=\"${args.mode}\"` : ''}${args.size ? `\n size=\"${args.size}\"` : ''}${args.status ? `\n status=\"${args.status}\"` : ''}${args.disabled ? `\n disabled` : ''}${args.required ? `\n required` : ''}>\n ${args.helperText}\n ${optionsMarkup}\n</cura-select>`;\n\n return `<div style=\"height: 200px; padding: 20px;\">${block}</div>`;\n};\n\n\n\nexport default {\n title: 'Componentes/Forms/Select',\n component: 'cura-select',\n tags: ['autodocs'],\n render: (args) => renderCuraSelect(args),\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto do rótulo para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n placeholder: {\n control: 'text',\n description: 'Texto de espaço reservado para o campo de entrada.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n defaultValue: {\n control: 'text',\n description: 'Valor padrão para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n value: {\n control: 'text',\n description: 'Valor atual do componente select. Ao inicar a busca o mesmo se refere ao option relacionado',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n mode: {\n control: { type: 'inline-radio' },\n options: ['default', 'transparent'],\n description: \"Modo de exibição do componente select. Pode ser 'default' ou 'transparent'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: \"Tamanho do componente select. Pode ser 'small', 'medium' ou 'large'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'medium' },\n },\n },\n status: {\n control: { type: 'inline-radio' },\n options: ['default', 'success', 'error'],\n description: \"Status do componente select. Pode ser 'success', 'error' ou 'default'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Indica se o componente select está desabilitado.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n required: {\n control: 'boolean',\n description: 'Indica se o componente select é obrigatório.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n helperText: {\n name: 'content',\n control: 'text',\n description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',\n table: {\n category: 'Slots',\n defaultValue: { summary: '' },\n },\n },\n onselect: {\n description: 'Emite um evento via Listener quando um valor é selecionado. { value: string , selected: boolean }',\n table: {\n category: 'Evento',\n defaultValue: { summary: '' },\n },\n },\n options: {\n control: 'array',\n description: 'Lista de opções definido pela aplicação para cura-select-option.',\n table: {\n category: 'aplication',\n defaultValue: { summary: '[]' },\n },\n },\n },\n};\n\nexport const CuraSelect = {\n args: {\n options: [\n { value: '1', label: 'Opção 1' },\n { value: '2', label: 'Escolha 2' },\n { value: '3', label: 'Exemplo 3' },\n ],\n label: 'Escolha uma opção',\n placeholder: 'Selecione...',\n defaultValue: '',\n value: '',\n mode: 'default',\n size: 'medium',\n status: 'default',\n disabled: false,\n required: false,\n helperText: 'Texto de ajuda'\n },\n};\n"]}
1
+ {"version":3,"file":"cura-select.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.stories.tsx"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,EAAE;IAChC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAC9C,8BAA8B,MAAM,CAAC,K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EAAE;gBACL,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAChC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAChC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE;YAClC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE;SACnC;QACD,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,cAAc,EAAE,KAAK;QACrB,UAAU,EAAE,gBAAgB;KAC7B;CACF,CAAC","sourcesContent":["const renderCuraSelect = (args) => {\n const optionsMarkup = args.options.map(option =>\n `<cura-select-option value=\"${option.value}\">${option.label}</cura-select-option>`\n ).join('');\n\n const block = `<cura-select${args.label ? `\n label=\"${args.label}\"` : ''}${args.placeholder ? `\n placeholder=\"${args.placeholder}\"` : ''}${args.defaultValue ? `\n default-value=\"${args.defaultValue}\"` : ''}${args.value ? `\n value=\"${args.value}\"` : ''}${args.mode ? `\n mode=\"${args.mode}\"` : ''}${args.size ? `\n size=\"${args.size}\"` : ''}${args.status ? `\n status=\"${args.status}\"` : ''}${args.disabled ? `\n disabled` : ''}${args.required ? `\n required` : ''}${args.searchBehavior ? `\n search-behavior=\"${args.searchBehavior}\"` : ''}>\n ${args.helperText}\n ${optionsMarkup}\n</cura-select>`;\n\n return `<div style=\"height: 200px; padding: 20px;\">${block}</div>`;\n};\n\n\n\nexport default {\n title: 'Componentes/Forms/Select',\n component: 'cura-select',\n tags: ['autodocs'],\n render: (args) => renderCuraSelect(args),\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto do rótulo para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n placeholder: {\n control: 'text',\n description: 'Texto de espaço reservado para o campo de entrada.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n defaultValue: {\n control: 'text',\n description: 'Valor padrão para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n value: {\n control: 'text',\n description: 'Valor atual do componente select. Ao inicar a busca o mesmo se refere ao option relacionado',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n mode: {\n control: { type: 'inline-radio' },\n options: ['default', 'transparent'],\n description: \"Modo de exibição do componente select. Pode ser 'default' ou 'transparent'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: \"Tamanho do componente select. Pode ser 'small', 'medium' ou 'large'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'medium' },\n },\n },\n status: {\n control: { type: 'inline-radio' },\n options: ['default', 'success', 'error'],\n description: \"Status do componente select. Pode ser 'success', 'error' ou 'default'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Indica se o componente select está desabilitado.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n required: {\n control: 'boolean',\n description: 'Indica se o componente select é obrigatório.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n searchBehavior: {\n control: 'boolean',\n description: 'Habilita o modo de digitação e busca nas opções a partir do termo.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n }\n },\n helperText: {\n name: 'content',\n control: 'text',\n description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',\n table: {\n category: 'Slots',\n defaultValue: { summary: '' },\n },\n },\n onselect: {\n description: 'Emite um evento via Listener quando um valor é selecionado. { value: string , selected: boolean }',\n table: {\n category: 'Evento',\n defaultValue: { summary: '' },\n },\n },\n options: {\n control: 'array',\n description: 'Lista de opções definido pela aplicação para cura-select-option.',\n table: {\n category: 'aplication',\n defaultValue: { summary: '[]' },\n },\n },\n },\n};\n\nexport const CuraSelect = {\n args: {\n options: [\n { value: '1', label: 'Opção 1' },\n { value: '2', label: 'Escolha 2' },\n { value: '3', label: 'Exemplo 3' },\n ],\n label: 'Escolha uma opção',\n placeholder: 'Selecione...',\n defaultValue: '',\n value: '',\n mode: 'default',\n size: 'medium',\n status: 'default',\n disabled: false,\n required: false,\n searchBehavior: false,\n helperText: 'Texto de ajuda'\n },\n};\n"]}
@@ -33,7 +33,7 @@ export class CuraSelectOption {
33
33
  };
34
34
  }
35
35
  render() {
36
- return (h(Host, { key: '5feb573684784f2cf70876ccc1bb673b853d69b4', slot: "option" }, h("div", { key: '03c65c64facc97c887c19f2226dfc5f1830004e1', class: this.getClasses(), style: this.styles }, h("cura-label", { key: '79f32d2bcc3ec42c8adb581fb8c4151920d55111', color: `${this.selected ? 'primary-base' : 'neutral-black'}`, size: this.getSize('label'), "margin-block": "0" }, h("slot", { key: '0df731f7223fac86e58676597c052caadd1d2858' })), this.selected && h("cura-icon", { key: '28d4f9561a60bf9ecfeca44e4835b46ffee28ec1', name: 'check', size: this.getSize('icon'), color: "primary-base" }))));
36
+ return (h(Host, { key: '9c6496e905c81df28315112ab5f12ff114c127dd', slot: "option" }, h("div", { key: '4e8fc83e9fc9f8ac7ecbb17887ed98c6ebc86457', class: this.getClasses(), style: this.styles }, h("cura-label", { key: '818b5dae2fd6f2a907de9077e88999ae264df7e1', color: `${this.selected ? 'primary-base' : 'neutral-black'}`, size: this.getSize('label'), "margin-block": "0" }, h("slot", { key: '1f295646eda004443b66005544ee514ce9e095d8' })), this.selected && h("cura-icon", { key: 'db126766232531ea18e28f10b77176e21268db1b', 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: 'a18d2e4516e63c9dc080fabb97ded6cb145f096f' }, h("div", { key: 'e6cfb0bada406eef4b6dc400eae2cc8e15ff209b', class: this.getClasses(), style: this.styles }, h("div", { key: '520489765d61a4c96079cc51395c9a7038c1ec12', class: "info" }, h("cura-label", { key: '3b064a7794c262d62e4d8e04475ca20d87febc7b', 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: 'b94ac8cf1fd1e3ba0dce269b677636f09bc97597', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, h("slot", { key: '437f81a5bde1395d97c346928191c8ab0ce7219d' }))), h("div", { key: '3e36e82138a69c5f829f54ec82af0646fdea4fbb', onClick: this.toggleSwitch, class: "control" }, h("div", { key: '7068b0664ebb020037d63df565e5c835b7a4fa46', class: `track ${this.size.toLowerCase()}` }, h("div", { key: '6ce66dfe5d06bdfdb625b38b0e0adb20df7db130', class: `thumb ${this.size.toLowerCase()}`, tabIndex: this.ontabindex }))))));
95
+ return (h(Host, { key: '6bbc037348270c69bfac13e7466c6fd19f4dc427' }, h("div", { key: '11ada01c69ff91815ba1b1f76a6e6b448e88a361', class: this.getClasses(), style: this.styles }, h("div", { key: '34992d3d6fbf3ca7782fa4502e297d508656c34c', class: "info" }, h("cura-label", { key: '0e6a178f1f74526962d588b1fad3024920bcf815', 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: '33e7c6d7aaabd9007b0a41fb966b41b0fd947bc8', style: { textAlign: this.position === 'right' ? 'right' : 'left' }, color: this.assignColor('primary-lighter', 'neutral-dark'), size: "xsmall", class: "message" }, h("slot", { key: '66dd525702f7d53c8167cfd2aa25552d1bd79837' }))), h("div", { key: 'a3828f2e511a7e23ad5d0e04319637e1aa256c96', onClick: this.toggleSwitch, class: "control" }, h("div", { key: 'afc664ab5563591ef201eee1ca0d33a48075ad04', class: `track ${this.size.toLowerCase()}` }, h("div", { key: 'e6b7f3b67e78421283426ce1c7679cbbf8f77f5e', 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: 'e8c5cf2c47e5b8a1a3e0ea758df9a5183b94afbe' }, h("div", { key: '4375509425a0f7f8a86ded54c792f04d8b34d004', id: "progress-bar", class: "progress-bar", style: this.styles }, h("span", { key: '2d78b8f09726918cb01ef2ba775cf061f8b1fbab', class: "progress-bar-fill" }))));
19
+ return (h(Host, { key: 'c98e1e2e370b5fadc87eb960d030324e36acd250' }, h("div", { key: '39dac6c361361e840305e15d6bf4ff09cfa3380e', id: "progress-bar", class: "progress-bar", style: this.styles }, h("span", { key: 'b501bd4846993c62a246a5891b9650faaca89c32', 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: '4c3a12d61a3b686438ece6752160337ca8cacf18', style: this.getStyles() }, h("svg", { key: 'bf8d817e7624419514e8f918ade94024c0d6bcb9', viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: '69885675868e25d75e9b0a461cb6563ba32a317a' }, h("circle", { key: 'a1b20469b5bb76d101cfbba683f99689b2a8b8ed', cx: "8", cy: "8", r: "7", stroke: "url(#paint0_linear_13485_11488)", "stroke-width": "2" }), h("path", { key: 'c74b6313eff3374f711ace4c638fa0e671325f12', 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: '5f5861e8cdf8f192cd3312c345b0c3f2afeeb0c2' }, h("linearGradient", { key: '98826d4d31d454e8d013349003bc89c3b82118bd', id: "paint0_linear_13485_11488", x1: "15.7", y1: "4.5", x2: "4.15", y2: "11.5", gradientUnits: "userSpaceOnUse" }, h("stop", { key: 'c0e582f71ef1a6870d0f77047198f58bf18987f6' }), h("stop", { key: '3f120a0b8e9c86388f084d34e4bda9f8c5893702', offset: "1" }))))));
22
+ return (h(Host, { key: '2697e72f8af894a6bea7092d3f56de4855788ea1', style: this.getStyles() }, h("svg", { key: 'ef5ae4cb6f02d80a79be4d066714e5d658d48a31', viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { key: '476fb5af3fdd8f4002de31ac2282dfe0c3e94a0f' }, h("circle", { key: '937db497c08019f64fb38974ace4262c6bc29ebb', cx: "8", cy: "8", r: "7", stroke: "url(#paint0_linear_13485_11488)", "stroke-width": "2" }), h("path", { key: 'ee611cdaa0b77ba3ef3c4ef61580e5e176b650cf', 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: '86fe212f1d47f69c403e82360464fe2e344947cd' }, h("linearGradient", { key: '73399f5eda1ca0fb206bf5322417431add8cfec6', id: "paint0_linear_13485_11488", x1: "15.7", y1: "4.5", x2: "4.15", y2: "11.5", gradientUnits: "userSpaceOnUse" }, h("stop", { key: 'bb9f60898d5b63dd7841e2cd94137280a553176b' }), h("stop", { key: '1e1dda3b14f7c5c5cfef85dd39a43eb71048171e', 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: 'ffd8e58f9bf50038554591ec2b191e0488ae0500', style: this.hostCSSProperties() }, this.getHeadingTag()));
63
+ return (h(Host, { key: 'b7f2ed980b7cedd3c9fbd60f14bf8785bb5c26cb', style: this.hostCSSProperties() }, this.getHeadingTag()));
64
64
  }
65
65
  static get is() { return "cura-display"; }
66
66
  static get encapsulation() { return "shadow"; }
@@ -61,7 +61,7 @@ export class CuraHeading {
61
61
  return tags[`${this.level}`] || tags['default'];
62
62
  }
63
63
  render() {
64
- return (h(Host, { key: '6e3a1f6786d9c1f9c0abb1b54ced47d2c6e8a90d', style: this.hostCSSProperties() }, this.getHeadingTag()));
64
+ return (h(Host, { key: 'd16fc33c4b20770439fd4d48f4eb099564668b1e', style: this.hostCSSProperties() }, this.getHeadingTag()));
65
65
  }
66
66
  static get is() { return "cura-heading"; }
67
67
  static get encapsulation() { return "shadow"; }
@@ -97,7 +97,9 @@
97
97
  :host ::slotted(b), :host ::slotted(strong) {
98
98
  font-weight: var(--font-weight-bold);
99
99
  }
100
- :host ::slotted(a) {
100
+ :host ::slotted(a),
101
+ :host ::slotted(span a),
102
+ :host ::slotted(a:-webkit-any-link), :host p a {
101
103
  font-weight: var(--font-weight-medium);
102
104
  color: var(--color-link);
103
105
  text-underline-offset: 10%;
@@ -45,7 +45,7 @@ export class CuraParagraph {
45
45
  };
46
46
  }
47
47
  render() {
48
- return (h(Host, { key: '0942f1f6c23f0662a604f065ab7347546ed457cf', style: this.hostCSSProperties() }, h("p", { key: '3a16f232c2bd783695a2229eb3181463b28a95fa', style: this.styles, class: this.setsizeClass() }, h("slot", { key: 'c03154a42f5a30f8114ff86b8a62a3f1093d7c73' }))));
48
+ return (h(Host, { key: '88f0638f1da31a7410e90bfd9fabc5e47036fbb4', style: this.hostCSSProperties() }, h("p", { key: 'e6c76e6a066ed9ca9f843ceff95c07472fd32824', style: this.styles, class: this.setsizeClass() }, h("slot", { key: 'e6266e05137adb1efc9a2acabab323a507cca9a9' }))));
49
49
  }
50
50
  static get is() { return "cura-paragraph"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,85 @@
1
+ import { useOf } from "@storybook/blocks";
2
+ import { CuraHeading, CuraParagraph, CuraAlert } from "../../../../component-lib-react/dist/index.js";
3
+ import { Source, Unstyled } from '@storybook/blocks';
4
+ import Markdown from 'react-markdown';
5
+ import rehypeRaw from 'rehype-raw';
6
+
7
+ const MarkdownSbUnstyled = {
8
+ p(props) {
9
+ const {children} = props;
10
+ return <span>{children}</span>
11
+ }
12
+ }
13
+
14
+
15
+ export const Block = ({options}, key) => {
16
+ switch(options.type) {
17
+ case 'subtitle': {
18
+ return (
19
+ <Unstyled>
20
+ <CuraHeading size="small" level="2" weight="bold" key={key}>{options.content}</CuraHeading>
21
+ </Unstyled>
22
+ )
23
+ }
24
+ case 'text': {
25
+ return (
26
+ <Unstyled>
27
+ <CuraParagraph key={key}>
28
+ <Markdown rehypePlugins={[rehypeRaw]} components={MarkdownSbUnstyled}>{ options.content }</Markdown>
29
+ </CuraParagraph>
30
+ </Unstyled>
31
+ )
32
+ }
33
+ case 'alert': {
34
+ return (
35
+ <Unstyled>
36
+ <CuraAlert key={key} closeable="false" floating="false" label={options.title} type={options.mode} style={{maxWidth: "640px", marginBlock: "2rem"}}>
37
+ <Markdown rehypePlugins={[rehypeRaw]} components={MarkdownSbUnstyled}>{ options.content }</Markdown>
38
+ </CuraAlert>
39
+ </Unstyled>
40
+ )
41
+ }
42
+ case 'code': {
43
+ return (
44
+ <Source language={options.lang} code={options.content} key={key}/>
45
+ )
46
+ }
47
+ case 'list': {
48
+ const listItems = options.items.map((item, i) => {
49
+ return (
50
+ <li key={`${key}-${i}`}>
51
+ <Markdown rehypePlugins={[rehypeRaw]} components={MarkdownSbUnstyled}>{ item }</Markdown>
52
+ </li>
53
+ )
54
+ });
55
+ return options.listType === 'ol'
56
+ ? ( <ol key={key}>{ listItems }</ol> )
57
+ : ( <ul key={key}>{ listItems }</ul> );
58
+ }
59
+ }
60
+ console.log(options);
61
+ }
62
+
63
+ export const Sections = (docsJson) => {
64
+ const resolveOf = useOf(docsJson.sections || 'component', ['component']);
65
+ const sections = resolveOf.component;
66
+ return (
67
+ sections.map(section => {
68
+ return (
69
+ <section key={section.id} id={section.id}>
70
+ <Unstyled>
71
+ <CuraHeading size="large" weight="bold">{section.title}</CuraHeading>
72
+ </Unstyled>
73
+ {
74
+ section.blocks.map((block, i) => {
75
+ const key = `${section.id}${i}`;
76
+ return (
77
+ <Block options={block} key={key}/>
78
+ )
79
+ })
80
+ }
81
+ </section>
82
+ )
83
+ })
84
+ );
85
+ }
@@ -54,7 +54,7 @@ const CuraAlert$1 = /*@__PURE__*/ proxyCustomElement(class CuraAlert extends HTM
54
54
  return this.icon ? this.icon : iconMapping[this.type];
55
55
  }
56
56
  render() {
57
- return (h(Host, { key: 'b7b63129f2d0c1d2f8b451a7f795befc9e085238' }, h("div", { key: 'b8450a11d65f0bbb3c9f688fccbb38efc7bf223c', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: '9a5dc4295f7c40362a86f77fe805127590812f15', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), h("div", { key: '6bbe4799d3f73df0cda2e94da2d71cdc1bfc855a', class: "content" }, h("cura-label", { key: '8b761ec2804bb5633893af8ed91f5de268bbf029', class: "title", size: "small", color: "neutral-darker", weight: "bold" }, this.label), h("cura-paragraph", { key: '4e7e7726758c26f1f397e8efc84d5eba1c88b428', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: 'f589c6fb9016b43b3557492a3ef1b4ede4a807a6' })), h("div", { key: 'b212e9255855b96d5c069dd7544675386f00b372', class: "actions" }, h("slot", { key: '174dfcc7dfc4ff3e29185843e010dddae75463f5', name: "actions" }))), this.closeable ?
57
+ return (h(Host, { key: 'c5398d59da323dee68eed1cb7c27841df0e12d14' }, h("div", { key: 'd9bb0ab7a2106e710a113513e6eeb1297b9bd205', class: this.getClasses(), style: this.styles }, h("cura-icon", { key: '54665c81a59cbca3686abc6f5e388da32e2211ed', name: this.getNameIcon(), class: "icon-left", size: 16, color: `${this.type}-dark` }), h("div", { key: '466f9f4aed5096658de1e19521cefe2915b095af', class: "content" }, h("cura-label", { key: '6b3d9cd0352b5d5254305baa5a71a1b1782f637f', class: "title", size: "small", color: "neutral-darker", weight: "bold" }, this.label), h("cura-paragraph", { key: '5dbad5e65d88b59a81b7df97154071a607d73900', class: "text", color: `${this.type}-darker`, size: "xsmall", marginBlock: "0", lineHeight: "133.33%" }, h("slot", { key: 'cb75d38c35d34a7bee4e187c640a1269bad192b0' })), h("div", { key: 'a6930bb463601a2ba429b23fad61847e8dee01f3', class: "actions" }, h("slot", { key: '7f4fc8b08a870f578d0b241df00650ebf3db83e0', name: "actions" }))), this.closeable ?
58
58
  (h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
59
59
  : '')));
60
60
  }
@@ -52,7 +52,7 @@ const CuraAvatar$1 = /*@__PURE__*/ proxyCustomElement(class CuraAvatar extends H
52
52
  this.imageSrc = this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`;
53
53
  }
54
54
  render() {
55
- return (h(Host, { key: 'fc8fbe9cdcab86398c83a55d006badb870ee959a', style: this.hostCSSProperties(), role: "img" }, h("div", { key: '6a107805cd770b98e74f7b0475c9896f59e51832', class: this.getClasses(), style: this.styles }, h("img", { key: '4bd7991bd32b0aa6f87d0725303960b0b4c3b0b9', src: this.imageSrc || this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`, onError: () => this.onSrcError() }))));
55
+ return (h(Host, { key: '2760534555a0483e7e30c5f3009ec0cf68d0973b', style: this.hostCSSProperties(), role: "img" }, h("div", { key: '3daf6dd066983dc63525c38b7da498147c0bf387', class: this.getClasses(), style: this.styles }, h("img", { key: 'a5f4de7983722fc3f750404fa985c312590b5e98', src: this.imageSrc || this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`, onError: () => this.onSrcError() }))));
56
56
  }
57
57
  get host() { return this; }
58
58
  static get watchers() { return {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface CuraBadgeNumber extends Components.CuraBadgeNumber, HTMLElement {}
4
+ export const CuraBadgeNumber: {
5
+ prototype: CuraBadgeNumber;
6
+ new (): CuraBadgeNumber;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,8 @@
1
+ import { C as CuraBadgeNumber$1, d as defineCustomElement$1 } from './cura-badge-number2.js';
2
+
3
+ const CuraBadgeNumber = CuraBadgeNumber$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { CuraBadgeNumber, defineCustomElement };
7
+
8
+ //# sourceMappingURL=cura-badge-number.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-badge-number.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,49 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$1 } from './cura-label2.js';
3
+
4
+ const curaBadgeNumberCss = ":host .container{display:flex;width:20px;height:20px;min-width:16px;padding:4px;justify-content:center;align-items:center;gap:4px;border-radius:500px;background:var(--background-color)}";
5
+ const CuraBadgeNumberStyle0 = curaBadgeNumberCss;
6
+
7
+ const CuraBadgeNumber = /*@__PURE__*/ proxyCustomElement(class CuraBadgeNumber extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ this.__attachShadow();
12
+ this.styles = {};
13
+ this.theme = window.CuraAPI.theme;
14
+ this.number = undefined;
15
+ this.color = undefined;
16
+ }
17
+ connectedCallback() {
18
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(this.color) });
19
+ }
20
+ render() {
21
+ return (h(Host, { key: 'ba26c547e809b1a03edb15ddc562b760ddb002d3' }, h("div", { key: '46dac81c75727004adf3ace19afe8be87950bf4a', class: "container", style: this.styles }, h("cura-label", { key: 'a914d1a332c709c1e61269c2d0b7a82cf3a6e7fa' }, h("slot", { key: '17b996446d288b77126ea2c0ca23b0c77018dbe5' }, this.number)))));
22
+ }
23
+ static get style() { return CuraBadgeNumberStyle0; }
24
+ }, [1, "cura-badge-number", {
25
+ "number": [514],
26
+ "color": [513]
27
+ }]);
28
+ function defineCustomElement() {
29
+ if (typeof customElements === "undefined") {
30
+ return;
31
+ }
32
+ const components = ["cura-badge-number", "cura-label"];
33
+ components.forEach(tagName => { switch (tagName) {
34
+ case "cura-badge-number":
35
+ if (!customElements.get(tagName)) {
36
+ customElements.define(tagName, CuraBadgeNumber);
37
+ }
38
+ break;
39
+ case "cura-label":
40
+ if (!customElements.get(tagName)) {
41
+ defineCustomElement$1();
42
+ }
43
+ break;
44
+ } });
45
+ }
46
+
47
+ export { CuraBadgeNumber as C, defineCustomElement as d };
48
+
49
+ //# sourceMappingURL=cura-badge-number2.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-badge-number2.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,2LAA2L,CAAC;AACvN,8BAAe,kBAAkB;;MCMpB,eAAe;;;;;QAI1B,WAAM,GAAG,EAAE,CAAC;QAEZ,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;;;;IAE7B,iBAAiB;QACf,IAAI,CAAC,MAAM,mCACN,IAAI,CAAC,MAAM,KACd,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAC7D,CAAA;KACF;IAGD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,4DAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,IACvC,qEACE,+DAAO,IAAI,CAAC,MAAM,CAAQ,CACf,CACT,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/badges/cura-badge-number/cura-badge-number.scss?tag=cura-badge-number&encapsulation=shadow","src/components/badges/cura-badge-number/cura-badge-number.tsx"],"sourcesContent":["@import \"../../../scss/mixins/spacing.scss\";\n\n:host {\n .container{\n display: flex;\n width: 20px;\n height: 20px;\n min-width: 16px;\n padding: 4px;\n justify-content: center;\n align-items: center;\n gap: 4px;\n border-radius: 500px;\n background: var(--background-color);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-badge-number',\n styleUrl: 'cura-badge-number.scss',\n shadow: true,\n})\nexport class CuraBadgeNumber {\n\n @Prop({ reflect: true }) number: number | null\n @Prop({ reflect: true}) color: string \n styles = {};\n\n theme = window.CuraAPI.theme;\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--background-color': this.theme.colors.getColor(this.color),\n }\n }\n\n\n render() {\n return (\n <Host>\n <div class=\"container\" style={this.styles}>\n <cura-label>\n <slot>{this.number}</slot>\n </cura-label>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -98,7 +98,7 @@ const CuraButtonOutline$1 = /*@__PURE__*/ proxyCustomElement(class CuraButtonOut
98
98
  render() {
99
99
  const symbolColor = this.getSymbolColor();
100
100
  const labelSize = labelSizes[this.size] || labelSizes["default"];
101
- return (h(Host, { key: '69e82dd1a26ea932f27f11ad5da295810ed3db1e' }, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '118%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor }))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), type: this.type }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '118%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor })))));
101
+ return (h(Host, { key: '3ce0297b4cfd44f8baffbcd78de14a02d15ba307' }, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor }))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), type: this.type }, h("span", { class: "button-container" }, this.getIcon(), h("cura-label", { size: labelSize, lineHeight: '105%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor })))));
102
102
  }
103
103
  static get formAssociated() { return true; }
104
104
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-button-outline.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,w5GAAw5G,CAAC;AACt7G,gCAAe,oBAAoB;;MCQtBA,mBAAiB;;;;;;oBAOmC,QAAQ;oBAKT,OAAO;wBAKjC,KAAK;yBAIJ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,IAC3B,IAAI,CAAC,OAAO,EAAE,EACf,kBAAY,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,IAAE,eAAa,CAAa,CACxF,EACP,0BAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,GAAuB,CACvE,CACV,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraButtonOutline"],"sources":["src/components/buttons/cura-button-outline/cura-button-outline.scss?tag=cura-button-outline&encapsulation=shadow","src/components/buttons/cura-button-outline/cura-button-outline.tsx"],"sourcesContent":["@import \"../../../scss/mixins/buttons.scss\";\n\n:host {\n @include button-host();\n\n button, a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n &::before {\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 2px solid var(--color-dark-neutral-purewhite);\n border-radius: var(--border-radius);\n }\n\n &:not(.disabled):not(.isLoading):hover {\n background-color: var(--color-lighter-color-darker);\n }\n\n &:not(.disabled):not(.inverted):not(.isLoading):active {\n background-color: var(--color-light-color-darker);\n }\n\n };\n\n @include button-sizes();\n\n // Children Elements\n @include button-container();\n @include button-label();\n\n\n @include button-icon();\n\n // Disabled state\n @include button-disabled() {\n &::before {\n border-color: var(--neutral-dark);\n }\n };\n\n // FAB / Icon-only\n @include button-icon-only-behavior();\n\n // Loading State\n @include button-loading();\n\n }\n\n}\n","import { Component, Host, h, Prop, Watch, State, AttachInternals } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\n\n@Component({\n tag: 'cura-button-outline',\n styleUrl: 'cura-button-outline.scss',\n shadow: true,\n formAssociated: true\n})\nexport class CuraButtonOutline {\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Button type: button (default) | submit | reset\n */\n @Prop({ reflect: true }) type: 'button' | 'reset' | 'submit' = 'button';\n\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n\n /**\n * Disabled state. Boolean.\n */\n @Prop({ reflect: true }) disabled = false;\n /**\n * Loading state. Boolean.\n */\n @Prop({ reflect: true }) isLoading = false;\n\n /**\n * Name of the icon to be used from iconset.\n */\n @Prop({ reflect: true }) iconName: string;\n /**\n * Custom iconset if needed.\n */\n @Prop({ reflect: true }) iconset = 'default';\n /**\n * Icon position: left (default) | right.\n */\n @Prop({ reflect: true }) iconPosition: 'left' | 'right' = 'left';\n /**\n * Set button to FAB/icon only.\n */\n @Prop({ reflect: true }) iconOnly = false;\n\n /**\n * Property href switch button to link.\n */\n @Prop({ reflect: true }) href: string;\n /**\n * Set target if link.\n */\n @Prop({ reflect: true }) target = \"_self\";\n /**\n * Color base from color scheme. Default: primary.\n */\n @Prop() color = 'primary';\n /**\n * Set the font background to dark or light.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n\n /**\n * Set the font color to dark or light.\n */\n @Prop() fontColor: 'dark' | 'light' = 'dark';\n /**\n * Set text aligment for the button label.\n * Vales: left (default) | center | right.\n */\n @Prop({ reflect: true }) textAlign: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Justify icons and label inside the button.\n * Vales: false (default) | true.\n */\n @Prop({ reflect: true }) justify = false;\n\n @State() styles = {};\n\n @State() hovered = false;\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\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['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--text-align'] = this.textAlign;\n this.setColors();\n }\n\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes[`icon-only`] = this.iconOnly;\n classes['disabled'] = this.disabled;\n classes['isLoading'] = this.isLoading;\n classes['justify'] = this.justify;\n return classes;\n }\n\n @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-dark-neutral-purewhite', thema: `${this.background === 'light' ? `${this.color}-dark` : 'neutral-purewhite'}` },\n { name: '--color-lighter-color-darker', thema: `${this.background === 'light' ? `${this.color}-lighter` : `${this.color}-darker`}` },\n { name: '--color-light-color-darker', thema: `${this.background === 'light' ? `${this.color}-light` : `${this.color}-lighter`}` },\n { name: '--neutral-dark', thema: 'neutral-dark' },\n ]\n\n colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.thema));\n this.styles = { ...this.styles };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={this.getSymbolColor()}></cura-icon>;\n }\n\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Watch('fontColor')\n @Watch('color')\n getSymbolColor() {\n if (this.disabled) return 'neutral-dark';\n return this.fontColor === 'light' ? 'neutral-purewhite' : `${this.color}-darker`;\n }\n\n handleClick(e: Event) {\n if (this.disabled || this.isLoading) {\n e.preventDefault();\n return;\n }\n if (!this.href) {\n if (this.type === 'submit' && this.internals.form) this.internals.form.submit();\n if (this.type === 'reset' && this.internals.form) this.internals.form.reset();\n }\n }\n\n render() {\n const symbolColor = this.getSymbolColor();\n const labelSize = labelSizes[this.size] || labelSizes[\"default\"];\n return (\n <Host>\n {this.href ? (\n <a href={this.disabled ? '' : this.href}\n target={this.target}\n class={this.getClasses()}\n style={this.styles}\n onClick={(e) => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}>\n <span class=\"button-container\">\n {this.getIcon()}\n <cura-label size={labelSize} lineHeight='118%' color={symbolColor}><slot></slot></cura-label>\n </span>\n <cura-loader-circle size={this.size} color={symbolColor}></cura-loader-circle>\n </a>\n ) : (\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled || null}\n onClick={(e) => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n type={this.type}>\n <span class=\"button-container\">\n {this.getIcon()}\n <cura-label size={labelSize} lineHeight='118%' color={symbolColor}><slot></slot></cura-label>\n </span>\n <cura-loader-circle size={this.size} color={symbolColor}></cura-loader-circle>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"cura-button-outline.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,w5GAAw5G,CAAC;AACt7G,gCAAe,oBAAoB;;MCQtBA,mBAAiB;;;;;;oBAOmC,QAAQ;oBAKT,OAAO;wBAKjC,KAAK;yBAIJ,KAAK;;uBASP,SAAS;4BAIc,MAAM;wBAI5B,KAAK;;sBASP,OAAO;qBAIzB,SAAS;0BAIc,OAAO;yBAKR,MAAM;yBAKsB,MAAM;uBAMrC,KAAK;sBAEtB,EAAE;uBAED,KAAK;;IAIxB,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QACvD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAC1E,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,eA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nC,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAC3C,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,IAC3C,YAAM,KAAK,EAAC,kBAAkB,IAC3B,IAAI,CAAC,OAAO,EAAE,EACf,kBAAY,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,IAAE,eAAa,CAAa,CACxF,EACP,0BAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,GAAuB,CAC5E,KAEJ,cAAQ,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAC9B,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,EAC/B,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACnC,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAC3C,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAC3C,IAAI,EAAE,IAAI,CAAC,IAAI,IACf,YAAM,KAAK,EAAC,kBAAkB,IAC3B,IAAI,CAAC,OAAO,EAAE,EACf,kBAAY,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,IAAE,eAAa,CAAa,CACxF,EACP,0BAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,GAAuB,CACvE,CACV,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraButtonOutline"],"sources":["src/components/buttons/cura-button-outline/cura-button-outline.scss?tag=cura-button-outline&encapsulation=shadow","src/components/buttons/cura-button-outline/cura-button-outline.tsx"],"sourcesContent":["@import \"../../../scss/mixins/buttons.scss\";\n\n:host {\n @include button-host();\n\n button, a {\n @include button-element() {\n background-color: transparent;\n box-sizing: border-box;\n border: none;\n\n &::before {\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0px;\n top: 0px;\n box-sizing: border-box;\n border: 2px solid var(--color-dark-neutral-purewhite);\n border-radius: var(--border-radius);\n }\n\n &:not(.disabled):not(.isLoading):hover {\n background-color: var(--color-lighter-color-darker);\n }\n\n &:not(.disabled):not(.inverted):not(.isLoading):active {\n background-color: var(--color-light-color-darker);\n }\n\n };\n\n @include button-sizes();\n\n // Children Elements\n @include button-container();\n @include button-label();\n\n\n @include button-icon();\n\n // Disabled state\n @include button-disabled() {\n &::before {\n border-color: var(--neutral-dark);\n }\n };\n\n // FAB / Icon-only\n @include button-icon-only-behavior();\n\n // Loading State\n @include button-loading();\n\n }\n\n}\n","import { Component, Host, h, Prop, Watch, State, AttachInternals } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\n\n@Component({\n tag: 'cura-button-outline',\n styleUrl: 'cura-button-outline.scss',\n shadow: true,\n formAssociated: true\n})\nexport class CuraButtonOutline {\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Button type: button (default) | submit | reset\n */\n @Prop({ reflect: true }) type: 'button' | 'reset' | 'submit' = 'button';\n\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'large';\n\n /**\n * Disabled state. Boolean.\n */\n @Prop({ reflect: true }) disabled = false;\n /**\n * Loading state. Boolean.\n */\n @Prop({ reflect: true }) isLoading = false;\n\n /**\n * Name of the icon to be used from iconset.\n */\n @Prop({ reflect: true }) iconName: string;\n /**\n * Custom iconset if needed.\n */\n @Prop({ reflect: true }) iconset = 'default';\n /**\n * Icon position: left (default) | right.\n */\n @Prop({ reflect: true }) iconPosition: 'left' | 'right' = 'left';\n /**\n * Set button to FAB/icon only.\n */\n @Prop({ reflect: true }) iconOnly = false;\n\n /**\n * Property href switch button to link.\n */\n @Prop({ reflect: true }) href: string;\n /**\n * Set target if link.\n */\n @Prop({ reflect: true }) target = \"_self\";\n /**\n * Color base from color scheme. Default: primary.\n */\n @Prop() color = 'primary';\n /**\n * Set the font background to dark or light.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n\n /**\n * Set the font color to dark or light.\n */\n @Prop() fontColor: 'dark' | 'light' = 'dark';\n /**\n * Set text aligment for the button label.\n * Vales: left (default) | center | right.\n */\n @Prop({ reflect: true }) textAlign: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Justify icons and label inside the button.\n * Vales: false (default) | true.\n */\n @Prop({ reflect: true }) justify = false;\n\n @State() styles = {};\n\n @State() hovered = false;\n\n weights;\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\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['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--text-align'] = this.textAlign;\n this.setColors();\n }\n\n\n getClasses() {\n const classes = {};\n classes[`${this.size?.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes[`icon-only`] = this.iconOnly;\n classes['disabled'] = this.disabled;\n classes['isLoading'] = this.isLoading;\n classes['justify'] = this.justify;\n return classes;\n }\n\n @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-dark-neutral-purewhite', thema: `${this.background === 'light' ? `${this.color}-dark` : 'neutral-purewhite'}` },\n { name: '--color-lighter-color-darker', thema: `${this.background === 'light' ? `${this.color}-lighter` : `${this.color}-darker`}` },\n { name: '--color-light-color-darker', thema: `${this.background === 'light' ? `${this.color}-light` : `${this.color}-lighter`}` },\n { name: '--neutral-dark', thema: 'neutral-dark' },\n ]\n\n colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.thema));\n this.styles = { ...this.styles };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'large' ? 20 : 16;\n\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={this.getSymbolColor()}></cura-icon>;\n }\n\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Watch('fontColor')\n @Watch('color')\n getSymbolColor() {\n if (this.disabled) return 'neutral-dark';\n return this.fontColor === 'light' ? 'neutral-purewhite' : `${this.color}-darker`;\n }\n\n handleClick(e: Event) {\n if (this.disabled || this.isLoading) {\n e.preventDefault();\n return;\n }\n if (!this.href) {\n if (this.type === 'submit' && this.internals.form) this.internals.form.submit();\n if (this.type === 'reset' && this.internals.form) this.internals.form.reset();\n }\n }\n\n render() {\n const symbolColor = this.getSymbolColor();\n const labelSize = labelSizes[this.size] || labelSizes[\"default\"];\n return (\n <Host>\n {this.href ? (\n <a href={this.disabled ? '' : this.href}\n target={this.target}\n class={this.getClasses()}\n style={this.styles}\n onClick={(e) => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}>\n <span class=\"button-container\">\n {this.getIcon()}\n <cura-label size={labelSize} lineHeight='105%' color={symbolColor}><slot></slot></cura-label>\n </span>\n <cura-loader-circle size={this.size} color={symbolColor}></cura-loader-circle>\n </a>\n ) : (\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled || null}\n onClick={(e) => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n type={this.type}>\n <span class=\"button-container\">\n {this.getIcon()}\n <cura-label size={labelSize} lineHeight='105%' color={symbolColor}><slot></slot></cura-label>\n </span>\n <cura-loader-circle size={this.size} color={symbolColor}></cura-loader-circle>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"],"version":3}