@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,55 +1,90 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$4 } from './cura-badge-number2.js';
2
3
  import { d as defineCustomElement$3 } from './cura-icon2.js';
3
4
  import { d as defineCustomElement$2 } from './cura-label2.js';
4
5
 
5
- 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)}";
6
+ 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)}";
6
7
  const CuraButtonSelectStyle0 = curaButtonSelectCss;
7
8
 
8
- const CuraButtonOutline = /*@__PURE__*/ proxyCustomElement(class CuraButtonOutline extends HTMLElement {
9
+ const CuraButtonSelect$1 = /*@__PURE__*/ proxyCustomElement(class CuraButtonSelect extends HTMLElement {
9
10
  constructor() {
10
11
  super();
11
12
  this.__registerHost();
12
13
  this.__attachShadow();
13
14
  this.onclick = createEvent(this, "onclick", 7);
14
15
  this.theme = window.CuraAPI.theme;
15
- this.size = 'medium';
16
- this.disabled = false;
17
16
  this.selected = false;
18
- this.iconPosition = 'right';
19
- this.color = 'accent';
20
- this.background = 'light';
21
- this.fontcolor = 'dark';
17
+ this.iconName = undefined;
18
+ this.size = undefined;
19
+ this.counter = undefined;
20
+ this.disabled = undefined;
21
+ this.background = undefined;
22
+ this.color = undefined;
22
23
  this.hovered = false;
23
24
  this.styles = {};
24
25
  }
25
26
  setColors() {
26
27
  const colors = [
27
- { name: '--color-base', theme: `${this.color}-base` },
28
- { name: '--color-darker', theme: `${this.color}-darker` },
29
- { name: '--color-lighter', theme: `${this.color}-lighter` },
30
- { name: '--neutral-purewhite-black', theme: this.fontcolor === 'light' ? 'neutral-purewhite' : 'neutral-black' },
31
- { name: '--neutral-white-primary-darker', theme: this.background === 'light' ? 'neutral-white' : 'primary-darker' },
32
- { name: '--neutral-medium-primary-base', theme: this.background === 'light' ? 'neutral-medium' : 'primary-base' },
28
+ { name: '--color-border', thema: this.background === 'light' ? `${this.color}-darker` : 'neutral-white' },
29
+ { name: '--color-border-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-light` },
30
+ { name: '--color-background-hover', thema: this.background === 'light' ? `${this.color}-light` : `${this.color}-dark` },
31
+ { name: '--color-select', thema: this.background === 'light' ? `${this.color}-base` : 'neutral-white' },
32
+ { name: '--color-select-hover-pressed', thema: this.background === 'light' ? `${this.color}-dark` : `${this.color}-lighter` },
33
+ { name: '--color-select-focus', thema: this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter` },
34
+ { name: '--color-disable-select', thema: this.background === 'light' ? 'neutral-white' : 'neutral-black' },
35
+ { name: '--color-border-disable-unselect', thema: 'neutral-dark' },
36
+ { name: '--color-counter-disabled', thema: this.background === 'light' ? 'neutral-pale' : 'neutral-black' },
37
+ { name: '--color-counter', thema: !this.disabled && 'primary-lighter' }
33
38
  ];
34
- colors.forEach(color => {
35
- this.styles = Object.assign(Object.assign({}, this.styles), { [color.name]: this.theme.colors.getColor(color.theme) });
36
- });
39
+ colors.forEach(color => (this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.thema)));
40
+ this.styles = Object.assign({}, this.styles);
37
41
  }
38
- setStyles() {
39
- this.weights = this.theme.fonts.getWeights();
40
- this.styles['--base-spacing'] = this.theme.spacing.getSpacing();
41
- this.styles['--font-size'] = this.theme.fonts.getSize();
42
- this.styles['--font-family'] = this.theme.fonts.getFamily();
43
- this.styles['--font-weight-medium'] = this.weights.medium;
44
- this.styles['--neutral-purewhite'] = this.theme.colors.getColor("neutral-purewhite");
45
- this.styles['--neutral-black'] = this.theme.colors.getColor("neutral-black");
46
- this.styles['--primary-base'] = this.theme.colors.getColor("primary-base");
47
- this.styles['--info-base'] = this.theme.colors.getColor("info-base");
42
+ getClasses() {
43
+ const classes = {};
44
+ classes[`${this.size.toLowerCase()}`] = true;
45
+ classes['icon'] = true;
46
+ classes['disabled'] = this.disabled;
47
+ classes['selected'] = this.selected;
48
+ return classes;
48
49
  }
49
50
  connectedCallback() {
50
- this.setStyles();
51
51
  this.setColors();
52
52
  }
53
+ getLabelFontColor() {
54
+ if (this.disabled)
55
+ return 'neutral-dark';
56
+ if (this.background === 'dark') {
57
+ return this.selected ? 'neutral-black' : 'neutral-white';
58
+ }
59
+ if (this.background === 'light') {
60
+ return this.selected ? 'neutral-white' : 'neutral-black';
61
+ }
62
+ }
63
+ getColorCounter() {
64
+ if (this.background === 'dark' && this.disabled) {
65
+ return !this.selected ? 'neutral-black' : 'neutral-dark';
66
+ }
67
+ if (this.background === 'light' && this.disabled) {
68
+ return 'neutral-pale';
69
+ }
70
+ return `${this.color}-lighter`;
71
+ }
72
+ getColorBagdeNumber() {
73
+ if (this.background === 'dark' && this.disabled) {
74
+ return this.selected ? 'neutral-black' : 'neutral-dark';
75
+ }
76
+ if (this.background === 'light' && this.disabled) {
77
+ return 'neutral-medium';
78
+ }
79
+ return `${this.color}-darker`;
80
+ }
81
+ getIcon() {
82
+ const iconSize = this.size === 'large' ? 24 : this.size === 'medium' ? 20 : 16;
83
+ return h("cura-icon", { class: "button-icon", name: this.iconName, size: iconSize, color: this.getLabelFontColor() });
84
+ }
85
+ getCounter() {
86
+ return (h("cura-badge-number", { color: this.getColorCounter() }, h("cura-label", { color: this.getColorBagdeNumber() }, this.counter)));
87
+ }
53
88
  handleMouseEnter() {
54
89
  if (this.disabled)
55
90
  return;
@@ -58,68 +93,49 @@ const CuraButtonOutline = /*@__PURE__*/ proxyCustomElement(class CuraButtonOutli
58
93
  handleMouseLeave() {
59
94
  this.hovered = false;
60
95
  }
61
- assignColor() {
62
- if (!this.selected)
63
- return 'primary-base';
64
- const fontcolor = this.disabled
65
- ? (this.background === 'light' ? 'neutral-medium' : 'primary-base')
66
- : this.selected && this.fontcolor === "dark" ? 'neutral-black' : "neutral-purewhite";
67
- return fontcolor;
68
- }
69
- getIcon() {
70
- if (!this.selected)
71
- return;
72
- const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
73
- const iconName = this.hovered ? 'closeCircle' : 'checkCircle';
74
- return h("cura-icon", { class: "button-icon", name: iconName, size: iconSize, color: this.assignColor() });
75
- }
76
96
  handleClick(e) {
77
97
  if (this.disabled)
78
98
  e.preventDefault();
79
99
  this.selected = !this.selected;
80
100
  this.onclick.emit({ selected: this.selected });
81
101
  }
82
- getClasses() {
83
- const classes = {};
84
- classes[`${this.size.toLowerCase()}`] = true;
85
- classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
86
- classes['disabled'] = this.disabled;
87
- classes['selected'] = this.selected;
88
- return classes;
89
- }
90
102
  render() {
91
- 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' }))))));
103
+ 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))));
92
104
  }
105
+ get host() { return this; }
93
106
  static get watchers() { return {
94
- "background": ["setColors", "assignColor"],
95
- "color": ["setColors"],
96
- "fontcolor": ["setColors", "assignColor"]
107
+ "background": ["setColors"],
108
+ "color": ["setColors"]
97
109
  }; }
98
110
  static get style() { return CuraButtonSelectStyle0; }
99
111
  }, [1, "cura-button-select", {
112
+ "selected": [1540],
113
+ "iconName": [1537, "icon-name"],
100
114
  "size": [513],
115
+ "counter": [1544],
101
116
  "disabled": [516],
102
- "selected": [516],
103
- "iconPosition": [513, "icon-position"],
104
- "color": [1],
105
117
  "background": [1],
106
- "fontcolor": [1],
118
+ "color": [1],
107
119
  "hovered": [32],
108
120
  "styles": [32]
109
121
  }, undefined, {
110
- "background": ["setColors", "assignColor"],
111
- "color": ["setColors"],
112
- "fontcolor": ["setColors", "assignColor"]
122
+ "background": ["setColors"],
123
+ "color": ["setColors"]
113
124
  }]);
114
125
  function defineCustomElement$1() {
115
126
  if (typeof customElements === "undefined") {
116
127
  return;
117
128
  }
118
- const components = ["cura-button-select", "cura-icon", "cura-label"];
129
+ const components = ["cura-button-select", "cura-badge-number", "cura-icon", "cura-label"];
119
130
  components.forEach(tagName => { switch (tagName) {
120
131
  case "cura-button-select":
121
132
  if (!customElements.get(tagName)) {
122
- customElements.define(tagName, CuraButtonOutline);
133
+ customElements.define(tagName, CuraButtonSelect$1);
134
+ }
135
+ break;
136
+ case "cura-badge-number":
137
+ if (!customElements.get(tagName)) {
138
+ defineCustomElement$4();
123
139
  }
124
140
  break;
125
141
  case "cura-icon":
@@ -135,7 +151,7 @@ function defineCustomElement$1() {
135
151
  } });
136
152
  }
137
153
 
138
- const CuraButtonSelect = CuraButtonOutline;
154
+ const CuraButtonSelect = CuraButtonSelect$1;
139
155
  const defineCustomElement = defineCustomElement$1;
140
156
 
141
157
  export { CuraButtonSelect, defineCustomElement };
@@ -1 +1 @@
1
-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AAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACpC,OAAO,OAAO,CAAC;KAChB;IAID,MAAM;QACJ,QACE,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 </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,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACrB;IAED,gBAAgB;QACd,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;IAED,WAAW,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":["CuraButtonSelect"],"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}
@@ -87,7 +87,7 @@ const CuraButtonTransparent = /*@__PURE__*/ proxyCustomElement(class CuraButtonT
87
87
  render() {
88
88
  const symbolColor = this.getSymbolColor();
89
89
  const labelSize = labelSizes[this.size] || labelSizes["default"];
90
- 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 })))));
90
+ 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 })))));
91
91
  }
92
92
  static get formAssociated() { return true; }
93
93
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"cura-button-transparent2.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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AAgB,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 );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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}
@@ -99,7 +99,7 @@ const CuraButton$1 = /*@__PURE__*/ proxyCustomElement(class CuraButton extends H
99
99
  render() {
100
100
  const symbolColor = this.getSymbolColor();
101
101
  const labelSize = labelSizes[this.size] || labelSizes["default"];
102
- return (h(Host, { key: '33ee4706d79aae1ea11e804e59919f5e3afcf336' }, 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", { class: "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", { class: "label", size: labelSize, lineHeight: '118%', color: symbolColor }, h("slot", null))), h("cura-loader-circle", { size: this.size, color: symbolColor })))));
102
+ return (h(Host, { key: '69971f4a6e86d948b2eb7c3c6bbc0dd5da6826e5' }, 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", { class: "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", { class: "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.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,+sIAA+sI,CAAC;AACtuI,yBAAe,aAAa;;MCQfA,YAAU;;;;;;oBAO0C,QAAQ;oBAKT,OAAO;wBAKjC,KAAK;yBAIJ,KAAK;;uBASP,SAAS;4BAIc,MAAM;wBAI5B,KAAK;;sBASP,OAAO;qBAKzB,QAAQ;0BAKgC,OAAO;yBAKR,MAAM;yBAMK,MAAM;uBAMrC,KAAK;sBAEtB,EAAE;uBAED,KAAK;;IAKxB,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,CA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AAM,IAAI,CAAC,gBAAgB,EAAE,EAC3C,YAAY,EAAE,MAAM,IAAI,CAAC,gBAAgB,EAAE,IAC3C,YAAM,KAAK,EAAC,kBAAkB,IAC3B,IAAI,CAAC,OAAO,EAAE,EACf,kBAAY,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,IAAE,eAAa,CAAa,CACtG,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,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,IAAE,eAAa,CAAa,CACtG,EACP,0BAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,GAAuB,CACvE,CACV,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraButton"],"sources":["src/components/buttons/cura-button/cura-button.scss?tag=cura-button&encapsulation=shadow","src/components/buttons/cura-button/cura-button.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(--color-base-neutral-purewhite);\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 transparent;\n border-radius: var(--border-radius);\n }\n\n &:not(.disabled) {\n &:not(.isLoading)::before {\n border: 2px solid var(--color-base-color-light);\n }\n\n &:hover {\n background: var(--color-base-color-light);\n box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);\n }\n &:not(.isLoading):hover::before {\n border-color: var(--color-dark-color-base);\n }\n }\n\n &:not(.isLoading):not(.disabled):active {\n background-color: var(--color-dark-color-light);\n }\n &:not(.isLoading):not(.disabled):active::before {\n border-color: var(--color-dark-color-light);\n }\n }\n\n @include button-shadow-behavior();\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 background-color: var(--neutral-pale-neutral-black);\n }\n\n // FAB / Icon-only\n @include button-icon-only-behavior();\n\n // Loading State\n @include button-loading();\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',\n styleUrl: 'cura-button.scss',\n shadow: true,\n formAssociated: true\n})\nexport class CuraButton {\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() color = 'accent';\n\n /**\n * Set the background color to dark or light.\n */\n @Prop({ reflect: true }) background: 'dark' | 'light' = 'light';\n\n /**\n * Set the font color to dark or light.\n */\n @Prop({ reflect: true }) fontColor: 'dark' | 'light' = 'dark';\n\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\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\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 @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-base-neutral-purewhite', theme: `${this.background === 'light' ? `${this.color}-base` : 'neutral-pale'}` },\n { name: '--color-base-color-light', theme: `${this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter`}` },\n { name: '--color-dark-color-light', theme: `${this.background === 'light' ? `${this.color}-dark` : `${this.color}-light`}` },\n { name: '--color-dark-color-base', theme: `${this.background === 'light' ? `${this.color}-dark` : `${this.color}-base`}` },\n { name: '--neutral-pale-neutral-black', theme: `${this.background === 'light' ? 'neutral-pale' : 'neutral-black'}` },\n ]\n\n colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme));\n this.styles = { ...this.styles };\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\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\n return classes;\n }\n\n getIcon() {\n if (!this.iconName) return '';\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 getSymbolColor() {\n if (this.isLoading && this.fontColor === 'light' ? 'neutral-white' : 'neutral-black')\n return this.disabled\n ? 'neutral-dark'\n : this.fontColor === 'light'\n ? 'neutral-white'\n : 'neutral-black';\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 class=\"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 class=\"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.js","mappings":";;;;;;AAAA,MAAM,aAAa,GAAG,+sIAA+sI,CAAC;AACtuI,yBAAe,aAAa;;MCQfA,YAAU;;;;;;oBAO0C,QAAQ;oBAKT,OAAO;wBAKjC,KAAK;yBAIJ,KAAK;;uBASP,SAAS;4BAIc,MAAM;wBAI5B,KAAK;;sBASP,OAAO;qBAKzB,QAAQ;0BAKgC,OAAO;yBAKR,MAAM;yBAMK,MAAM;uBAMrC,KAAK;sBAEtB,EAAE;uBAED,KAAK;;IAKxB,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,aAAa,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QAClE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QACtE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QAC1D,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QAC7C,IAAI,CAAC,SAAS,EAAE,CAAC;KAClB;IAID,SAAS;QACP,MAAM,MAAM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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,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,MAAM,EAAC,KAAK,EAAE,WAAW,IAAE,eAAa,CAAa,CACtG,EACP,0BAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,GAAuB,CACvE,CACV,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraButton"],"sources":["src/components/buttons/cura-button/cura-button.scss?tag=cura-button&encapsulation=shadow","src/components/buttons/cura-button/cura-button.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(--color-base-neutral-purewhite);\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 transparent;\n border-radius: var(--border-radius);\n }\n\n &:not(.disabled) {\n &:not(.isLoading)::before {\n border: 2px solid var(--color-base-color-light);\n }\n\n &:hover {\n background: var(--color-base-color-light);\n box-shadow: 0px 4px 8px 0px rgba(38, 38, 38, 0.16);\n }\n &:not(.isLoading):hover::before {\n border-color: var(--color-dark-color-base);\n }\n }\n\n &:not(.isLoading):not(.disabled):active {\n background-color: var(--color-dark-color-light);\n }\n &:not(.isLoading):not(.disabled):active::before {\n border-color: var(--color-dark-color-light);\n }\n }\n\n @include button-shadow-behavior();\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 background-color: var(--neutral-pale-neutral-black);\n }\n\n // FAB / Icon-only\n @include button-icon-only-behavior();\n\n // Loading State\n @include button-loading();\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',\n styleUrl: 'cura-button.scss',\n shadow: true,\n formAssociated: true\n})\nexport class CuraButton {\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() color = 'accent';\n\n /**\n * Set the background color to dark or light.\n */\n @Prop({ reflect: true }) background: 'dark' | 'light' = 'light';\n\n /**\n * Set the font color to dark or light.\n */\n @Prop({ reflect: true }) fontColor: 'dark' | 'light' = 'dark';\n\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\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();\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 @Watch('background')\n @Watch('color')\n setColors() {\n const colors = [\n { name: '--color-base-neutral-purewhite', theme: `${this.background === 'light' ? `${this.color}-base` : 'neutral-pale'}` },\n { name: '--color-base-color-light', theme: `${this.background === 'light' ? `${this.color}-base` : `${this.color}-lighter`}` },\n { name: '--color-dark-color-light', theme: `${this.background === 'light' ? `${this.color}-dark` : `${this.color}-light`}` },\n { name: '--color-dark-color-base', theme: `${this.background === 'light' ? `${this.color}-dark` : `${this.color}-base`}` },\n { name: '--neutral-pale-neutral-black', theme: `${this.background === 'light' ? 'neutral-pale' : 'neutral-black'}` },\n ]\n\n colors.forEach(color => this.styles[color.name] = window.CuraAPI.theme.colors.getColor(color.theme));\n this.styles = { ...this.styles };\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\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\n return classes;\n }\n\n getIcon() {\n if (!this.iconName) return '';\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 getSymbolColor() {\n if (this.isLoading && this.fontColor === 'light' ? 'neutral-white' : 'neutral-black')\n return this.disabled\n ? 'neutral-dark'\n : this.fontColor === 'light'\n ? 'neutral-white'\n : 'neutral-black';\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 class=\"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 class=\"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}