@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,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-1ad98520.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-747aad85.js';
2
2
 
3
3
  const curaAlertCss = ":host{display:block;box-sizing:border-box}:host .conteiner{display:flex;box-sizing:border-box;padding:12px;gap:12px;flex-shrink:0;border:1px solid var(--color-base);border-radius:4px;background-color:var(--color-lighter)}:host .conteiner.floating{box-shadow:0px 4px 8px 0px rgba(38, 38, 38, 0.16)}:host .icon-left{margin-right:5px}:host .icon-right{margin-left:auto;cursor:pointer}:host .text{margin-top:3px}:host .actions{margin-top:5px}";
4
4
  const CuraAlertStyle0 = curaAlertCss;
@@ -49,7 +49,7 @@ const CuraAlert = class {
49
49
  return this.icon ? this.icon : iconMapping[this.type];
50
50
  }
51
51
  render() {
52
- 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 ?
52
+ 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 ?
53
53
  (h("cura-icon", { name: "close", size: 16, color: "error-dark", class: "icon-right", onClick: this.handleClose }))
54
54
  : '')));
55
55
  }
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-1ad98520.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-747aad85.js';
2
2
 
3
3
  const avatarSizes = {
4
4
  '80': { border: 2.5 },
@@ -50,7 +50,7 @@ const CuraAvatar = class {
50
50
  this.imageSrc = this.imageSrcDefault || `${this.assetsPath}/images/avatar/patient-default.svg`;
51
51
  }
52
52
  render() {
53
- 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() }))));
53
+ 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() }))));
54
54
  }
55
55
  get host() { return getElement(this); }
56
56
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-1ad98520.js';
1
+ import { r as registerInstance, h, H as Host } from './index-747aad85.js';
2
2
 
3
3
  const curaBadgeDistanceCss = ":host .container{display:flex;flex-direction:column;justify-content:center;align-items:center;width:calc(var(--base-spacing) * 8px);height:calc(var(--base-spacing) * 8px);border-radius:calc(var(--base-spacing) * 1px);background:var(--neutral-pale)}";
4
4
  const CuraBadgeDistanceStyle0 = curaBadgeDistanceCss;
@@ -0,0 +1,25 @@
1
+ import { r as registerInstance, h, H as Host } from './index-747aad85.js';
2
+
3
+ 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)}";
4
+ const CuraBadgeNumberStyle0 = curaBadgeNumberCss;
5
+
6
+ const CuraBadgeNumber = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.styles = {};
10
+ this.theme = window.CuraAPI.theme;
11
+ this.number = undefined;
12
+ this.color = undefined;
13
+ }
14
+ connectedCallback() {
15
+ this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(this.color) });
16
+ }
17
+ render() {
18
+ 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)))));
19
+ }
20
+ };
21
+ CuraBadgeNumber.style = CuraBadgeNumberStyle0;
22
+
23
+ export { CuraBadgeNumber as cura_badge_number };
24
+
25
+ //# sourceMappingURL=cura-badge-number.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"cura-badge-number.entry.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}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-1ad98520.js';
1
+ import { r as registerInstance, h, H as Host } from './index-747aad85.js';
2
2
  import { l as labelSizes } from './cura-button.definitions-617d3bad.js';
3
3
 
4
4
  const curaButtonOutlineCss = ":host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button::before,:host a::before{content:\"\";width:100%;height:100%;position:absolute;left:0px;top:0px;box-sizing:border-box;border:2px solid var(--color-dark-neutral-purewhite);border-radius:var(--border-radius)}:host button:not(.disabled):not(.isLoading):hover,:host a:not(.disabled):not(.isLoading):hover{background-color:var(--color-lighter-color-darker)}:host button:not(.disabled):not(.inverted):not(.isLoading):active,:host a:not(.disabled):not(.inverted):not(.isLoading):active{background-color:var(--color-light-color-darker)}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 10px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 2px);min-height:calc(var(--base-spacing) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.disabled::before,:host a.disabled::before{border-color:var(--neutral-dark)}:host button.icon-only,:host a.icon-only{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--base-spacing) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--base-spacing) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}";
@@ -99,7 +99,7 @@ const CuraButtonOutline = class {
99
99
  render() {
100
100
  const symbolColor = this.getSymbolColor();
101
101
  const labelSize = labelSizes[this.size] || labelSizes["default"];
102
- 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 })))));
102
+ 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 })))));
103
103
  }
104
104
  static get formAssociated() { return true; }
105
105
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-button-outline.entry.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,w5GAAw5G,CAAC;AACt7G,gCAAe,oBAAoB;;MCQtB,iBAAiB;;;;;;;;;;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,eAAe,CAAC,CAAC;QACvF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACrF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACrF,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;Q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U,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":[],"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.entry.js","mappings":";;;AAAA,MAAM,oBAAoB,GAAG,w5GAAw5G,CAAC;AACt7G,gCAAe,oBAAoB;;MCQtB,iBAAiB;;;;;;;;;;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,C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;;;;;;;;;;;","names":[],"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}
@@ -1,51 +1,85 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-1ad98520.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-747aad85.js';
2
2
 
3
- const curaButtonSelectCss = ":host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:2px solid var(--primary-base)}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-lighter);border-color:var(--color-base)}:host button:focus,:host a:focus{border-color:var(--info-base) !important}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 10px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 2px);min-height:calc(var(--base-spacing) * 8px)}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative;gap:5px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-base);border-color:var(--color-darker)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--neutral-medium-primary-base)}";
3
+ const curaButtonSelectCss = ":host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:2px solid var(--color-border)}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-background-hover);border-color:var(--color-border-hover-pressed)}:host button:focus,:host a:focus{border-color:var(--color-border) !important}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 10px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 2px);min-height:calc(var(--base-spacing) * 8px)}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative;gap:12px;padding:12px 16px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-select);border-color:var(--color-select)}:host button.selected:not(.disabled):hover,:host a.selected:not(.disabled):hover{background-color:var(--color-border-hover-pressed);border-color:var(--color-border-hover-pressed)}:host button.selected:focus,:host a.selected:focus{border-color:var(--color-select-focus) !important}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--color-disable-select);border-color:var(--color-disable-select)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--color-border-disable-unselect)}";
4
4
  const CuraButtonSelectStyle0 = curaButtonSelectCss;
5
5
 
6
- const CuraButtonOutline = class {
6
+ const CuraButtonSelect = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.onclick = createEvent(this, "onclick", 7);
10
10
  this.theme = window.CuraAPI.theme;
11
- this.size = 'medium';
12
- this.disabled = false;
13
11
  this.selected = false;
14
- this.iconPosition = 'right';
15
- this.color = 'accent';
16
- this.background = 'light';
17
- this.fontcolor = 'dark';
12
+ this.iconName = undefined;
13
+ this.size = undefined;
14
+ this.counter = undefined;
15
+ this.disabled = undefined;
16
+ this.background = undefined;
17
+ this.color = undefined;
18
18
  this.hovered = false;
19
19
  this.styles = {};
20
20
  }
21
21
  setColors() {
22
22
  const colors = [
23
- { name: '--color-base', theme: `${this.color}-base` },
24
- { name: '--color-darker', theme: `${this.color}-darker` },
25
- { name: '--color-lighter', theme: `${this.color}-lighter` },
26
- { name: '--neutral-purewhite-black', theme: this.fontcolor === 'light' ? 'neutral-purewhite' : 'neutral-black' },
27
- { name: '--neutral-white-primary-darker', theme: this.background === 'light' ? 'neutral-white' : 'primary-darker' },
28
- { name: '--neutral-medium-primary-base', theme: this.background === 'light' ? 'neutral-medium' : 'primary-base' },
23
+ { name: '--color-border', thema: this.background === 'light' ? `${this.color}-darker` : 'neutral-white' },
24
+ { name: '--color-border-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-light` },
25
+ { name: '--color-background-hover', thema: this.background === 'light' ? `${this.color}-light` : `${this.color}-dark` },
26
+ { name: '--color-select', thema: this.background === 'light' ? `${this.color}-base` : 'neutral-white' },
27
+ { name: '--color-select-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-lighter` },
28
+ { name: '--color-select-focus', thema: this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter` },
29
+ { name: '--color-disable-select', thema: this.background === 'light' ? 'neutral-white' : 'neutral-black' },
30
+ { name: '--color-border-disable-unselect', thema: 'neutral-dark' },
31
+ { name: '--color-counter-disabled', thema: this.background === 'light' ? 'neutral-pale' : 'neutral-black' },
32
+ { name: '--color-counter', thema: !this.disabled && 'primary-lighter' }
29
33
  ];
30
- colors.forEach(color => {
31
- this.styles = Object.assign(Object.assign({}, this.styles), { [color.name]: this.theme.colors.getColor(color.theme) });
32
- });
34
+ colors.forEach(color => (this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.thema)));
35
+ this.styles = Object.assign({}, this.styles);
33
36
  }
34
- setStyles() {
35
- this.weights = this.theme.fonts.getWeights();
36
- this.styles['--base-spacing'] = this.theme.spacing.getSpacing();
37
- this.styles['--font-size'] = this.theme.fonts.getSize();
38
- this.styles['--font-family'] = this.theme.fonts.getFamily();
39
- this.styles['--font-weight-medium'] = this.weights.medium;
40
- this.styles['--neutral-purewhite'] = this.theme.colors.getColor("neutral-purewhite");
41
- this.styles['--neutral-black'] = this.theme.colors.getColor("neutral-black");
42
- this.styles['--primary-base'] = this.theme.colors.getColor("primary-base");
43
- this.styles['--info-base'] = this.theme.colors.getColor("info-base");
37
+ getClasses() {
38
+ const classes = {};
39
+ classes[`${this.size.toLowerCase()}`] = true;
40
+ classes['icon'] = true;
41
+ classes['disabled'] = this.disabled;
42
+ classes['selected'] = this.selected;
43
+ return classes;
44
44
  }
45
45
  connectedCallback() {
46
- this.setStyles();
47
46
  this.setColors();
48
47
  }
48
+ getLabelFontColor() {
49
+ if (this.disabled)
50
+ return 'neutral-dark';
51
+ if (this.background === 'dark') {
52
+ return this.selected ? 'neutral-black' : 'neutral-white';
53
+ }
54
+ if (this.background === 'light') {
55
+ return this.selected ? 'neutral-white' : 'neutral-black';
56
+ }
57
+ }
58
+ getColorCounter() {
59
+ if (this.background === 'dark' && this.disabled) {
60
+ return !this.selected ? 'neutral-black' : 'neutral-dark';
61
+ }
62
+ if (this.background === 'light' && this.disabled) {
63
+ return 'neutral-pale';
64
+ }
65
+ return `${this.color}-lighter`;
66
+ }
67
+ getColorBagdeNumber() {
68
+ if (this.background === 'dark' && this.disabled) {
69
+ return this.selected ? 'neutral-black' : 'neutral-dark';
70
+ }
71
+ if (this.background === 'light' && this.disabled) {
72
+ return 'neutral-medium';
73
+ }
74
+ return `${this.color}-darker`;
75
+ }
76
+ getIcon() {
77
+ const iconSize = this.size === 'large' ? 24 : this.size === 'medium' ? 20 : 16;
78
+ return h("cura-icon", { class: "button-icon", name: this.iconName, size: iconSize, color: this.getLabelFontColor() });
79
+ }
80
+ getCounter() {
81
+ return (h("cura-badge-number", { color: this.getColorCounter() }, h("cura-label", { color: this.getColorBagdeNumber() }, this.counter)));
82
+ }
49
83
  handleMouseEnter() {
50
84
  if (this.disabled)
51
85
  return;
@@ -54,46 +88,23 @@ const CuraButtonOutline = class {
54
88
  handleMouseLeave() {
55
89
  this.hovered = false;
56
90
  }
57
- assignColor() {
58
- if (!this.selected)
59
- return 'primary-base';
60
- const fontcolor = this.disabled
61
- ? (this.background === 'light' ? 'neutral-medium' : 'primary-base')
62
- : this.selected && this.fontcolor === "dark" ? 'neutral-black' : "neutral-purewhite";
63
- return fontcolor;
64
- }
65
- getIcon() {
66
- if (!this.selected)
67
- return;
68
- const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
69
- const iconName = this.hovered ? 'closeCircle' : 'checkCircle';
70
- return h("cura-icon", { class: "button-icon", name: iconName, size: iconSize, color: this.assignColor() });
71
- }
72
91
  handleClick(e) {
73
92
  if (this.disabled)
74
93
  e.preventDefault();
75
94
  this.selected = !this.selected;
76
95
  this.onclick.emit({ selected: this.selected });
77
96
  }
78
- getClasses() {
79
- const classes = {};
80
- classes[`${this.size.toLowerCase()}`] = true;
81
- classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
82
- classes['disabled'] = this.disabled;
83
- classes['selected'] = this.selected;
84
- return classes;
85
- }
86
97
  render() {
87
- return (h(Host, { key: 'bbd95db4048d0bb3d4c17927da18136402bf91dd' }, h("button", { key: 'ae27bbadadf7597d4e6aaa406cbeee3dc47921cd', class: this.getClasses(), style: this.styles, disabled: this.disabled, onClick: (e) => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("div", { key: '6cdcdb3c908673c3babad6fd35cedc38ff358b61', class: "button-container" }, this.getIcon(), h("cura-label", { key: 'c058fedf71ac3c33a5711fba7be80dacd6ee8467', class: "label", lineHeight: '0%', color: this.assignColor() }, h("slot", { key: '5976c1f58c3d5bba77cf6cde7acc31fb49fcd25d' }))))));
98
+ return (h(Host, { key: '5b612b060b0a7b40ede004322995f0e410da8759' }, h("button", { key: '616ae769e76d647a3806daf33376ca88eb75da5d', class: this.getClasses(), style: this.styles, disabled: this.disabled, onClick: e => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("div", { key: 'ef0a6f7ed31c7c2b4eb0f74e3713c0cc99b79080', class: "button-container" }, this.iconName ? this.getIcon() : null, h("cura-label", { key: '0366f6538cc0ccf76c072de862fe60d87fccb937', class: "label", lineHeight: "0%", color: this.getLabelFontColor(), weight: 'regular' }, h("slot", { key: '72a72cc3a128223e7f41212005caff8aefbf1454' })), this.counter ? this.getCounter() : null))));
88
99
  }
100
+ get host() { return getElement(this); }
89
101
  static get watchers() { return {
90
- "background": ["setColors", "assignColor"],
91
- "color": ["setColors"],
92
- "fontcolor": ["setColors", "assignColor"]
102
+ "background": ["setColors"],
103
+ "color": ["setColors"]
93
104
  }; }
94
105
  };
95
- CuraButtonOutline.style = CuraButtonSelectStyle0;
106
+ CuraButtonSelect.style = CuraButtonSelectStyle0;
96
107
 
97
- export { CuraButtonOutline as cura_button_select };
108
+ export { CuraButtonSelect as cura_button_select };
98
109
 
99
110
  //# sourceMappingURL=cura-button-select.entry.js.map
@@ -1 +1 @@
1
- {"file":"cura-button-select.entry.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,y3DAAy3D,CAAC;AACt5D,+BAAe,mBAAm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,EAAC,IAAI,uDACH,+DAAQ,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAC9B,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,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,IAC3C,4DAAK,KAAK,EAAC,kBAAkB,IAC1B,IAAI,CAAC,OAAO,EAAE,EACf,mEAAY,KAAK,EAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAAE,8DAAa,CAAa,CAC3F,CACC,CACJ,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/buttons/cura-button-select/cura-button-select.scss?tag=cura-button-select&encapsulation=shadow","src/components/buttons/cura-button-select/cura-button-select.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: var(--neutral-purewhite);\n box-sizing: border-box;\n border: 2px solid var(--primary-base);\n\n &:not(.disabled):hover {\n background-color: var(--color-lighter);\n border-color: var(--color-base);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n @include button-sizes();\n\n @include button-label();\n\n // Children Elements\n @include button-container() {\n gap: 5px;\n }\n\n @mixin button-icon() {\n margin: 0;\n }\n\n // selected state\n @include button-selected() {\n background-color: var(--color-base);\n border-color: var(--color-darker);\n\n }\n\n // Disabled state\n @include button-disabled() {\n background-color: var(--neutral-white-primary-darker);\n border-color: var(--neutral-medium-primary-base);\n\n }\n\n }\n}\n// ver as cores do label button\n","import { Component, Host, h, Prop, Watch, State, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cura-button-select',\n styleUrl: 'cura-button-select.scss',\n shadow: true,\n})\n\nexport class CuraButtonOutline {\n /**\n * Button size: small | medium (default) | large = medium\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Disabled state. Boolean.\n */\n @Prop({ reflect: true }) disabled = false;\n /**\n * selected state. Boolean.\n */\n @Prop({ reflect: true }) selected = false;\n /**\n * Icon position: left (default) | right.\n */\n @Prop({ reflect: true }) iconPosition: 'left' | 'right' = 'right';\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n /**\n * Set the font color to dark or light.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * fontcolor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() fontcolor: 'dark' | 'light' = 'dark';\n /**\n * hovered state. Boolean.\n */\n @State() hovered = false;\n\n @State() styles = {};\n\n @Event({ eventName: \"onclick\" }) onclick: EventEmitter<{ selected: boolean; }>;\n\n theme = window.CuraAPI.theme\n\n weights;\n\n @Watch('background')\n @Watch('color')\n @Watch('fontcolor')\n setColors() {\n const colors = [\n { name: '--color-base', theme: `${this.color}-base` },\n { name: '--color-darker', theme: `${this.color}-darker` },\n { name: '--color-lighter', theme: `${this.color}-lighter` },\n { name: '--neutral-purewhite-black', theme: this.fontcolor === 'light' ? 'neutral-purewhite' : 'neutral-black' },\n { name: '--neutral-white-primary-darker', theme: this.background === 'light' ? 'neutral-white' : 'primary-darker' },\n { name: '--neutral-medium-primary-base', theme: this.background === 'light' ? 'neutral-medium' : 'primary-base' },\n ];\n\n colors.forEach(color => {\n this.styles = {\n ...this.styles,\n [color.name]: this.theme.colors.getColor(color.theme)\n };\n });\n }\n\n setStyles() {\n this.weights = this.theme.fonts.getWeights();\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.styles['--font-size'] = this.theme.fonts.getSize();\n this.styles['--font-family'] = this.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--neutral-purewhite'] = this.theme.colors.getColor(\"neutral-purewhite\");\n this.styles['--neutral-black'] = this.theme.colors.getColor(\"neutral-black\");\n this.styles['--primary-base'] = this.theme.colors.getColor(\"primary-base\");\n this.styles['--info-base'] = this.theme.colors.getColor(\"info-base\");\n }\n\n connectedCallback() {\n this.setStyles()\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Watch('background')\n @Watch('fontcolor')\n assignColor() {\n if (!this.selected) return 'primary-base'\n\n const fontcolor =\n this.disabled\n ? (this.background === 'light' ? 'neutral-medium' : 'primary-base')\n : this.selected && this.fontcolor === \"dark\" ? 'neutral-black' : \"neutral-purewhite\";\n\n return fontcolor\n }\n\n getIcon() {\n if (!this.selected) return;\n\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const iconName = this.hovered ? 'closeCircle' : 'checkCircle';\n\n return <cura-icon class=\"button-icon\" name={iconName} size={iconSize} color={this.assignColor()}></cura-icon>;\n }\n\n\n handleClick(e: Event) {\n if (this.disabled) e.preventDefault();\n this.selected = !this.selected;\n this.onclick.emit({ selected: this.selected });\n }\n\n\n getClasses() {\n const classes = {};\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n classes['selected'] = this.selected;\n return classes;\n }\n\n\n\n render() {\n return (\n <Host>\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled}\n onClick={(e) => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}>\n <div class=\"button-container\">\n {this.getIcon()}\n <cura-label class=\"label\" lineHeight='0%' color={this.assignColor()}><slot></slot></cura-label>\n </div>\n </button>\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"cura-button-select.entry.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,m1EAAm1E,CAAC;AACh3E,+BAAe,mBAAmB;;MCMrB,gBAA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W,CAAC,CAAQ;QAClB,IAAI,IAAI,CAAC,QAAQ;YAAE,CAAC,CAAC,cAAc,EAAE,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;KAChD;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,+DACE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAC3C,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,IAE3C,4DAAK,KAAK,EAAC,kBAAkB,IAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,EACtC,mEAAY,KAAK,EAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAC,SAAS,IACzF,8DAAa,CACF,EACZ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,CACpC,CACC,CACJ,EACP;KACH;;;;;;;;;;;","names":[],"sources":["src/components/buttons/cura-button-select/cura-button-select.scss?tag=cura-button-select&encapsulation=shadow","src/components/buttons/cura-button-select/cura-button-select.tsx"],"sourcesContent":["@import '../../../scss/mixins/buttons.scss';\n\n:host {\n @include button-host();\n\n button,\n a {\n @include button-element() {\n background-color: var(--neutral-purewhite);\n box-sizing: border-box;\n border: 2px solid var(--color-border);\n\n &:not(.disabled):hover {\n background-color: var(--color-background-hover);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-border) !important;\n }\n }\n\n @include button-sizes();\n\n @include button-label();\n\n // Children Elements\n @include button-container() {\n gap: 12px;\n padding: 12px 16px;\n }\n\n @mixin button-icon() {\n margin: 10px;\n }\n\n // selected state\n @include button-selected() {\n background-color: var(--color-select);\n border-color: var(--color-select);\n\n &:not(.disabled):hover {\n background-color: var(--color-border-hover-pressed);\n border-color: var(--color-border-hover-pressed);\n }\n\n &:focus {\n border-color: var(--color-select-focus) !important;\n }\n\n &.disabled{\n background-color: var(--color-disable-select);\n border-color: var(--color-disable-select);\n }\n }\n\n // Disabled state\n @include button-disabled() {\n background-color: var(--neutral-white-primary-darker);\n border-color: var(--color-border-disable-unselect);\n }\n }\n\n\n}\n","import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-button-select',\n styleUrl: 'cura-button-select.scss',\n shadow: true,\n})\nexport class CuraButtonSelect {\n @Element() host: HTMLElement;\n\n @Prop({ reflect: true, mutable: true }) selected = false;\n @Prop({ reflect: true, mutable: true }) iconName: string;\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large';\n @Prop({ reflect: true, mutable: true }) counter: string | number | null;\n @Prop({ reflect: true }) disabled: boolean;\n @Prop() background: 'dark' | 'light';\n @Prop() color: string;\n\n @State() hovered = false;\n @State() styles = {};\n\n @Event({ eventName: 'onclick' }) onclick: EventEmitter<{ selected: boolean }>;\n\n theme = window.CuraAPI.theme;\n\n weights;\n\n @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-border', thema: this.background === 'light' ? `${this.color}-darker` : 'neutral-white' },\n { name: '--color-border-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-light` },\n { name: '--color-background-hover', thema: this.background === 'light' ? `${this.color}-light` : `${this.color}-dark` },\n { name: '--color-select', thema: this.background === 'light' ? `${this.color}-base` : 'neutral-white' },\n { name: '--color-select-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-lighter` },\n { name: '--color-select-focus', thema: this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter` },\n { name: '--color-disable-select', thema: this.background === 'light' ? 'neutral-white' : 'neutral-black' },\n { name: '--color-border-disable-unselect', thema: 'neutral-dark' },\n { name: '--color-counter-disabled', thema: this.background === 'light' ? 'neutral-pale' : 'neutral-black' },\n { name: '--color-counter', thema: !this.disabled && 'primary-lighter' }\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\n getClasses() {\n const classes = {};\n classes[`${this.size.toLowerCase()}`] = true;\n classes['icon'] = true;\n classes['disabled'] = this.disabled;\n classes['selected'] = this.selected;\n return classes;\n }\n\n connectedCallback() {\n this.setColors();\n }\n\n getLabelFontColor() {\n if (this.disabled) return 'neutral-dark';\n\n if (this.background === 'dark') {\n return this.selected ? 'neutral-black' : 'neutral-white'\n }\n if (this.background === 'light') {\n return this.selected ? 'neutral-white' : 'neutral-black'\n }\n\n }\n\n getColorCounter() {\n if (this.background === 'dark' && this.disabled) {\n return !this.selected ? 'neutral-black' : 'neutral-dark'\n }\n\n if (this.background === 'light' && this.disabled) {\n return 'neutral-pale'\n }\n return `${this.color}-lighter`\n }\n\n getColorBagdeNumber() {\n\n if (this.background === 'dark' && this.disabled) {\n return this.selected ? 'neutral-black' : 'neutral-dark'\n }\n\n if (this.background === 'light' && this.disabled) {\n return 'neutral-medium'\n }\n\n return `${this.color}-darker`\n }\n\n getIcon() {\n const iconSize = this.size === 'large' ? 24 : this.size === 'medium' ? 20 : 16;\n\n return <cura-icon class=\"button-icon\" name={this.iconName} size={iconSize} color={this.getLabelFontColor()} />;\n }\n\n getCounter() {\n return (\n <cura-badge-number color={this.getColorCounter()}>\n <cura-label color={this.getColorBagdeNumber()}>{this.counter}</cura-label>\n </cura-badge-number>\n );\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 handleClick(e: Event) {\n if (this.disabled) e.preventDefault();\n this.selected = !this.selected;\n this.onclick.emit({ selected: this.selected });\n }\n\n render() {\n return (\n <Host>\n <button\n class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled}\n onClick={e => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n >\n <div class=\"button-container\">\n {this.iconName ? this.getIcon() : null}\n <cura-label class=\"label\" lineHeight=\"0%\" color={this.getLabelFontColor()} weight='regular'>\n <slot></slot>\n </cura-label>\n {this.counter ? this.getCounter() : null}\n </div>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, H as Host } from './index-1ad98520.js';
1
+ import { r as registerInstance, h, H as Host } from './index-747aad85.js';
2
2
  import { l as labelSizes } from './cura-button.definitions-617d3bad.js';
3
3
 
4
4
  const curaButtonTransparentCss = ":host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;border:none}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 10px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 2px);min-height:calc(var(--base-spacing) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, \"left\")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.icon-only,:host a.icon-only{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--base-spacing) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--base-spacing) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}";
@@ -88,7 +88,7 @@ const CuraButtonTransparent = class {
88
88
  render() {
89
89
  const symbolColor = this.getSymbolColor();
90
90
  const labelSize = labelSizes[this.size] || labelSizes["default"];
91
- return (h(Host, { key: 'a149c7f0dd3a413c563f891c9298d66cde905f5e' }, 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 })))));
91
+ return (h(Host, { key: 'd7bfd59d8a84d299a3d59dfd2d7b48ca6a9f56ee' }, 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 })))));
92
92
  }
93
93
  static get formAssociated() { return true; }
94
94
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-button-transparent.entry.js","mappings":";;;AAAA,MAAM,wBAAwB,GAAG,8wFAA8wF,CAAC;AAChzF,oCAAe,wBAAwB;;MCQ1B,qBAAqB;;;;;;;;;;oBAO+B,QAAQ;oBAKT,OAAO;wBAKjC,KAAK;yBAIJ,KAAK;;uBASP,SAAS;4BAIc,MAAM;wBAI5B,KAAK;;sBASP,OAAO;qBAKR,SAAS;yBAMa,MAAM;yBAKK,MAAM;uBAMrC,KAAK;uBAErB,KAAK;sBAEN,EAAE;;IAIpB,iBAAiB;QACf,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OA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AAQ,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":[],"sources":["src/components/buttons/cura-button-transparent/cura-button-transparent.scss?tag=cura-button-transparent&encapsulation=shadow","src/components/buttons/cura-button-transparent/cura-button-transparent.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 border: none;\n }\n\n @include button-sizes();\n\n // Children Elements\n @include button-container();\n @include button-label();\n @include button-icon();\n\n // Disabled state\n @include button-disabled();\n\n // FAB / Icon-only\n @include button-icon-only-behavior();\n\n // Loading State\n @include button-loading();\n\n }\n}\n","import { Component, Host, h, Prop, State, Watch, AttachInternals } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\n\n@Component({\n tag: 'cura-button-transparent',\n styleUrl: 'cura-button-transparent.scss',\n shadow: true,\n formAssociated: true\n})\nexport class CuraButtonTransparent {\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 /**\n * Color base from color scheme. Default: accent.\n */\n @Prop({ reflect: true }) color = 'primary';\n\n /**\n * Set the font color to dark or light.\n * Default: dark.\n */\n @Prop({ reflect: true }) 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() hovered = false;\n\n @State() styles = {};\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 }\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\n getIcon() {\n if (!this.iconName) return null;\n const iconSize = this.size === 'large' ? 20 : 16;\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={this.getSymbolColor()}></cura-icon>;\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 if (this.hovered && !this.isLoading) return this.fontColor === 'light' ? `${this.color}-light` : `${this.color}-darker`;\n return this.fontColor === 'light' ? 'neutral-white' : `${this.color}-dark`;\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-transparent.entry.js","mappings":";;;AAAA,MAAM,wBAAwB,GAAG,8wFAA8wF,CAAC;AAChzF,oCAAe,wBAAwB;;MCQ1B,qBAAqB;;;;;;;;;;oBAO+B,QAAQ;oBAKT,OAAO;wBAKjC,KAAK;yBAIJ,KAAK;;uBASP,SAAS;4BAIc,MAAM;wBAI5B,KAAK;;sBASP,OAAO;qBAKR,SAAS;yBAMa,MAAM;yBAKK,MAAM;uBAMrC,KAAK;uBAErB,KAAK;sBAEN,EAAE;;IAIpB,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,eAAe,CAAC,CAAC;QACvF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACrF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QACrF,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QAClE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,C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E,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,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":[],"sources":["src/components/buttons/cura-button-transparent/cura-button-transparent.scss?tag=cura-button-transparent&encapsulation=shadow","src/components/buttons/cura-button-transparent/cura-button-transparent.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 border: none;\n }\n\n @include button-sizes();\n\n // Children Elements\n @include button-container();\n @include button-label();\n @include button-icon();\n\n // Disabled state\n @include button-disabled();\n\n // FAB / Icon-only\n @include button-icon-only-behavior();\n\n // Loading State\n @include button-loading();\n\n }\n}\n","import { Component, Host, h, Prop, State, Watch, AttachInternals } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\n\n@Component({\n tag: 'cura-button-transparent',\n styleUrl: 'cura-button-transparent.scss',\n shadow: true,\n formAssociated: true\n})\nexport class CuraButtonTransparent {\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 /**\n * Color base from color scheme. Default: accent.\n */\n @Prop({ reflect: true }) color = 'primary';\n\n /**\n * Set the font color to dark or light.\n * Default: dark.\n */\n @Prop({ reflect: true }) 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() hovered = false;\n\n @State() styles = {};\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 }\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\n getIcon() {\n if (!this.iconName) return null;\n const iconSize = this.size === 'large' ? 20 : 16;\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={this.getSymbolColor()}></cura-icon>;\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 if (this.hovered && !this.isLoading) return this.fontColor === 'light' ? `${this.color}-light` : `${this.color}-darker`;\n return this.fontColor === 'light' ? 'neutral-white' : `${this.color}-dark`;\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}