@rededor/cura 1.2.0 → 1.3.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 (257) hide show
  1. package/dist/cjs/{app-globals-4d07f363.js → app-globals-f33ceef8.js} +32 -1
  2. package/dist/cjs/app-globals-f33ceef8.js.map +1 -0
  3. package/dist/cjs/cura-accordion_12.cjs.entry.js +39 -38
  4. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura-alert.cjs.entry.js +3 -2
  6. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/cura-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  9. package/dist/cjs/cura-badge-number.cjs.entry.js +2 -2
  10. package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
  12. package/dist/cjs/cura-button-select.cjs.entry.js +17 -9
  13. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
  15. package/dist/cjs/cura-calendar.cjs.entry.js +2 -2
  16. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/cura-card.cjs.entry.js +1 -1
  18. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  19. package/dist/cjs/cura-display.cjs.entry.js +1 -1
  20. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +1 -1
  21. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +2 -2
  22. package/dist/cjs/cura-dropdown-search.cjs.entry.js +21 -11
  23. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  24. package/dist/cjs/cura-icons-view.cjs.entry.js +3 -3
  25. package/dist/cjs/cura-input-date.cjs.entry.js +45 -45
  26. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -1
  27. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  29. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  30. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  31. package/dist/cjs/cura-tooltip.cjs.entry.js +232 -0
  32. package/dist/cjs/cura-tooltip.cjs.entry.js.map +1 -0
  33. package/dist/cjs/cura.cjs.js +2 -2
  34. package/dist/cjs/loader.cjs.js +2 -2
  35. package/dist/collection/api/theme-presets/theme-presets.js +2 -0
  36. package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
  37. package/dist/collection/api/theme-presets/theme-richet.js +32 -0
  38. package/dist/collection/api/theme-presets/theme-richet.js.map +1 -0
  39. package/dist/collection/collection-manifest.json +1 -0
  40. package/dist/collection/components/accordion/cura-accordion/cura-accordion.css +0 -6
  41. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +41 -43
  42. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
  43. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +54 -36
  44. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
  45. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +61 -60
  46. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +41 -23
  47. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
  48. package/dist/collection/components/badges/cura-badge-distance/cura-badge-distance.js +1 -1
  49. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +0 -2
  50. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +1 -1
  51. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -1
  52. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  53. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  54. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +36 -2
  55. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +39 -11
  56. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  57. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +18 -7
  58. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -1
  59. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  60. package/dist/collection/components/cura-alert/cura-alert.css +25 -11
  61. package/dist/collection/components/cura-alert/cura-alert.js +2 -1
  62. package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
  63. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  64. package/dist/collection/components/cura-calendar/cura-calendar.css +1 -0
  65. package/dist/collection/components/cura-calendar/cura-calendar.js +1 -1
  66. package/dist/collection/components/cura-card/cura-card.js +1 -1
  67. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  68. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  69. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  70. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  71. package/dist/collection/components/cura-tooltip/cura-tooltip.css +159 -0
  72. package/dist/collection/components/cura-tooltip/cura-tooltip.js +397 -0
  73. package/dist/collection/components/cura-tooltip/cura-tooltip.js.map +1 -0
  74. package/dist/collection/components/cura-tooltip/cura-tooltip.stories.js +137 -0
  75. package/dist/collection/components/cura-tooltip/cura-tooltip.stories.js.map +1 -0
  76. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  77. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  78. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  79. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +1 -1
  80. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +20 -10
  81. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  82. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +15 -0
  83. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +69 -68
  84. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -1
  85. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +29 -10
  86. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -1
  87. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
  88. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  89. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  90. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  91. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  92. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  93. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  94. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  95. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  96. package/dist/collection/components/text/cura-heading/cura-heading.css +5 -1
  97. package/dist/collection/components/text/cura-heading/cura-heading.js +7 -6
  98. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  99. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  100. package/dist/components/cura-accordion-item.js +19 -12
  101. package/dist/components/cura-accordion-item.js.map +1 -1
  102. package/dist/components/cura-accordion.js +14 -15
  103. package/dist/components/cura-accordion.js.map +1 -1
  104. package/dist/components/cura-alert.js +3 -2
  105. package/dist/components/cura-alert.js.map +1 -1
  106. package/dist/components/cura-avatar.js +1 -1
  107. package/dist/components/cura-badge-distance.js +1 -1
  108. package/dist/components/cura-badge-number2.js +2 -2
  109. package/dist/components/cura-badge-number2.js.map +1 -1
  110. package/dist/components/cura-button-outline.js +1 -1
  111. package/dist/components/cura-button-select.js +18 -9
  112. package/dist/components/cura-button-select.js.map +1 -1
  113. package/dist/components/cura-button-transparent2.js +1 -1
  114. package/dist/components/cura-button.js +1 -1
  115. package/dist/components/cura-calendar2.js +2 -2
  116. package/dist/components/cura-calendar2.js.map +1 -1
  117. package/dist/components/cura-card.js +1 -1
  118. package/dist/components/cura-checkbox.js +1 -1
  119. package/dist/components/cura-display.js +1 -1
  120. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  121. package/dist/components/cura-dropdown-search-option.js +2 -2
  122. package/dist/components/cura-dropdown-search.js +21 -11
  123. package/dist/components/cura-dropdown-search.js.map +1 -1
  124. package/dist/components/cura-heading2.js +8 -7
  125. package/dist/components/cura-heading2.js.map +1 -1
  126. package/dist/components/cura-icon2.js +1 -1
  127. package/dist/components/cura-icons-view.js +3 -3
  128. package/dist/components/cura-input-date.js +54 -57
  129. package/dist/components/cura-input-date.js.map +1 -1
  130. package/dist/components/cura-label2.js +1 -1
  131. package/dist/components/cura-loader-bar2.js +1 -1
  132. package/dist/components/cura-loader-circle2.js +1 -1
  133. package/dist/components/cura-page-template.js +1 -1
  134. package/dist/components/cura-paragraph2.js +1 -1
  135. package/dist/components/cura-radio.js +1 -1
  136. package/dist/components/cura-select-option2.js +1 -1
  137. package/dist/components/cura-select2.js +3 -3
  138. package/dist/components/cura-switch.js +1 -1
  139. package/dist/components/cura-toast.js +1 -1
  140. package/dist/components/cura-tooltip.d.ts +11 -0
  141. package/dist/components/cura-tooltip.js +291 -0
  142. package/dist/components/cura-tooltip.js.map +1 -0
  143. package/dist/components/index.js +33 -0
  144. package/dist/components/index.js.map +1 -1
  145. package/dist/cura/cura.esm.js +1 -1
  146. package/dist/cura/cura.esm.js.map +1 -1
  147. package/dist/cura/{p-116a1cd6.entry.js → p-01e301d4.entry.js} +2 -2
  148. package/dist/cura/{p-c6508bd7.entry.js → p-022b22b6.entry.js} +2 -2
  149. package/dist/cura/p-0308cf6b.entry.js +2 -0
  150. package/dist/cura/p-0308cf6b.entry.js.map +1 -0
  151. package/dist/cura/p-22e921d9.entry.js +2 -0
  152. package/dist/cura/p-22e921d9.entry.js.map +1 -0
  153. package/dist/cura/p-2b9eadc7.entry.js +2 -0
  154. package/dist/cura/p-2b9eadc7.entry.js.map +1 -0
  155. package/dist/cura/{p-b2d5db22.entry.js → p-2c0f5497.entry.js} +2 -2
  156. package/dist/cura/p-5bb8302c.entry.js +2 -0
  157. package/dist/cura/p-5bb8302c.entry.js.map +1 -0
  158. package/dist/cura/{p-fcbf4311.entry.js → p-639c1b67.entry.js} +2 -2
  159. package/dist/cura/{p-2956f120.entry.js → p-7853ab16.entry.js} +2 -2
  160. package/dist/cura/{p-2956f120.entry.js.map → p-7853ab16.entry.js.map} +1 -1
  161. package/dist/cura/{p-41c3d47d.entry.js → p-81c66f2b.entry.js} +2 -2
  162. package/dist/cura/p-82b99090.js +2 -0
  163. package/dist/cura/p-82b99090.js.map +1 -0
  164. package/dist/cura/p-93525d68.entry.js +2 -0
  165. package/dist/cura/p-93525d68.entry.js.map +1 -0
  166. package/dist/cura/p-9991f7db.entry.js +2 -0
  167. package/dist/cura/p-9e3d26fe.entry.js +2 -0
  168. package/dist/cura/p-9e3d26fe.entry.js.map +1 -0
  169. package/dist/cura/{p-dcd2e5bb.entry.js → p-a7ecea4a.entry.js} +2 -2
  170. package/dist/cura/{p-33772510.entry.js → p-b0451cb3.entry.js} +2 -2
  171. package/dist/cura/{p-8f3db0fe.entry.js → p-b883e098.entry.js} +2 -2
  172. package/dist/cura/{p-907b3d12.entry.js → p-bfb5e9e1.entry.js} +2 -2
  173. package/dist/cura/{p-e5023e34.entry.js → p-c444e692.entry.js} +2 -2
  174. package/dist/cura/{p-fdce91a7.entry.js → p-d635501a.entry.js} +2 -2
  175. package/dist/cura/{p-fd083399.entry.js → p-df851816.entry.js} +2 -2
  176. package/dist/cura/{p-44e3325a.entry.js → p-e3d3bc3d.entry.js} +2 -2
  177. package/dist/cura/p-eda28278.entry.js +2 -0
  178. package/dist/cura/p-eda28278.entry.js.map +1 -0
  179. package/dist/esm/{app-globals-6ca7103d.js → app-globals-e54ee4c3.js} +32 -1
  180. package/dist/esm/app-globals-e54ee4c3.js.map +1 -0
  181. package/dist/esm/cura-accordion_12.entry.js +39 -38
  182. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  183. package/dist/esm/cura-alert.entry.js +3 -2
  184. package/dist/esm/cura-alert.entry.js.map +1 -1
  185. package/dist/esm/cura-avatar.entry.js +1 -1
  186. package/dist/esm/cura-badge-distance.entry.js +1 -1
  187. package/dist/esm/cura-badge-number.entry.js +2 -2
  188. package/dist/esm/cura-badge-number.entry.js.map +1 -1
  189. package/dist/esm/cura-button-outline.entry.js +1 -1
  190. package/dist/esm/cura-button-select.entry.js +17 -9
  191. package/dist/esm/cura-button-select.entry.js.map +1 -1
  192. package/dist/esm/cura-button-transparent.entry.js +1 -1
  193. package/dist/esm/cura-calendar.entry.js +2 -2
  194. package/dist/esm/cura-calendar.entry.js.map +1 -1
  195. package/dist/esm/cura-card.entry.js +1 -1
  196. package/dist/esm/cura-checkbox.entry.js +1 -1
  197. package/dist/esm/cura-display.entry.js +1 -1
  198. package/dist/esm/cura-dropdown-search-option-title.entry.js +1 -1
  199. package/dist/esm/cura-dropdown-search-option.entry.js +2 -2
  200. package/dist/esm/cura-dropdown-search.entry.js +21 -11
  201. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  202. package/dist/esm/cura-icons-view.entry.js +3 -3
  203. package/dist/esm/cura-input-date.entry.js +45 -45
  204. package/dist/esm/cura-input-date.entry.js.map +1 -1
  205. package/dist/esm/cura-loader-bar.entry.js +1 -1
  206. package/dist/esm/cura-radio.entry.js +1 -1
  207. package/dist/esm/cura-switch.entry.js +1 -1
  208. package/dist/esm/cura-toast.entry.js +1 -1
  209. package/dist/esm/cura-tooltip.entry.js +228 -0
  210. package/dist/esm/cura-tooltip.entry.js.map +1 -0
  211. package/dist/esm/cura.js +2 -2
  212. package/dist/esm/loader.js +2 -2
  213. package/dist/types/api/theme-presets/theme-presets.d.ts +43 -0
  214. package/dist/types/api/theme-presets/theme-richet.d.ts +43 -0
  215. package/dist/types/components/accordion/cura-accordion/cura-accordion.d.ts +7 -3
  216. package/dist/types/components/accordion/cura-accordion/cura-accordion.stories.d.ts +38 -16
  217. package/dist/types/components/accordion/cura-accordion-item/cura-accordion-item.d.ts +8 -3
  218. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +2 -0
  219. package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +14 -0
  220. package/dist/types/components/cura-tooltip/cura-tooltip.d.ts +25 -0
  221. package/dist/types/components/cura-tooltip/cura-tooltip.stories.d.ts +119 -0
  222. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +1 -0
  223. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +19 -19
  224. package/dist/types/components/text/cura-heading/cura-heading.d.ts +1 -0
  225. package/dist/types/components.d.ts +75 -10
  226. package/package.json +2 -2
  227. package/dist/cjs/app-globals-4d07f363.js.map +0 -1
  228. package/dist/cura/p-0b7a7306.js +0 -2
  229. package/dist/cura/p-0b7a7306.js.map +0 -1
  230. package/dist/cura/p-2d267d23.entry.js +0 -2
  231. package/dist/cura/p-2d267d23.entry.js.map +0 -1
  232. package/dist/cura/p-4e14c01c.entry.js +0 -2
  233. package/dist/cura/p-b43b69f3.entry.js +0 -2
  234. package/dist/cura/p-b43b69f3.entry.js.map +0 -1
  235. package/dist/cura/p-be10b681.entry.js +0 -2
  236. package/dist/cura/p-be10b681.entry.js.map +0 -1
  237. package/dist/cura/p-cda24a1e.entry.js +0 -2
  238. package/dist/cura/p-cda24a1e.entry.js.map +0 -1
  239. package/dist/cura/p-e8bc6381.entry.js +0 -2
  240. package/dist/cura/p-e8bc6381.entry.js.map +0 -1
  241. package/dist/cura/p-ed97cf3c.entry.js +0 -2
  242. package/dist/cura/p-ed97cf3c.entry.js.map +0 -1
  243. package/dist/esm/app-globals-6ca7103d.js.map +0 -1
  244. /package/dist/cura/{p-116a1cd6.entry.js.map → p-01e301d4.entry.js.map} +0 -0
  245. /package/dist/cura/{p-c6508bd7.entry.js.map → p-022b22b6.entry.js.map} +0 -0
  246. /package/dist/cura/{p-b2d5db22.entry.js.map → p-2c0f5497.entry.js.map} +0 -0
  247. /package/dist/cura/{p-fcbf4311.entry.js.map → p-639c1b67.entry.js.map} +0 -0
  248. /package/dist/cura/{p-41c3d47d.entry.js.map → p-81c66f2b.entry.js.map} +0 -0
  249. /package/dist/cura/{p-4e14c01c.entry.js.map → p-9991f7db.entry.js.map} +0 -0
  250. /package/dist/cura/{p-dcd2e5bb.entry.js.map → p-a7ecea4a.entry.js.map} +0 -0
  251. /package/dist/cura/{p-33772510.entry.js.map → p-b0451cb3.entry.js.map} +0 -0
  252. /package/dist/cura/{p-8f3db0fe.entry.js.map → p-b883e098.entry.js.map} +0 -0
  253. /package/dist/cura/{p-907b3d12.entry.js.map → p-bfb5e9e1.entry.js.map} +0 -0
  254. /package/dist/cura/{p-e5023e34.entry.js.map → p-c444e692.entry.js.map} +0 -0
  255. /package/dist/cura/{p-fdce91a7.entry.js.map → p-d635501a.entry.js.map} +0 -0
  256. /package/dist/cura/{p-fd083399.entry.js.map → p-df851816.entry.js.map} +0 -0
  257. /package/dist/cura/{p-44e3325a.entry.js.map → p-e3d3bc3d.entry.js.map} +0 -0
@@ -2,21 +2,16 @@ import { Host, h } from "@stencil/core";
2
2
  export class CuraAccordionItem {
3
3
  constructor() {
4
4
  this.label = '';
5
- this.iconSize = 32;
5
+ this.iconSize = 20;
6
+ this.labelIcon = '';
6
7
  this.openIcon = 'down';
7
8
  this.closeIcon = 'up';
8
9
  this.iconColor = '';
9
- this.iconActiveColor = '';
10
10
  this.colorMode = 'dark';
11
+ this.level = 3;
11
12
  this.opened = false;
12
13
  this.styles = {};
13
14
  }
14
- getIconColor() {
15
- const inverted = this.colorMode === 'light';
16
- const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;
17
- const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;
18
- return this.opened ? iconActiveColor : iconColor;
19
- }
20
15
  getClasses() {
21
16
  const classes = {};
22
17
  classes['accordion-item'] = true;
@@ -27,8 +22,13 @@ export class CuraAccordionItem {
27
22
  accordionItemClick(_) {
28
23
  this.opened = !this.opened;
29
24
  }
25
+ renderIcon() {
26
+ if (!this.labelIcon)
27
+ return '';
28
+ return h("cura-icon", { name: this.labelIcon, size: this.iconSize, color: "neutral-black" });
29
+ }
30
30
  render() {
31
- return (h(Host, { key: '8d46e9fd7c698c049a9020375cd77b5ebb9d38fd', slot: "accordion-item" }, h("div", { key: 'fdc11f228f3051f2452b0beb56e232de836fa382', class: this.getClasses(), style: this.styles }, h("div", { key: '7507b6c72d3433550b1590530c8070fe07431389', class: "label", onClick: e => this.accordionItemClick(e) }, h("div", { key: '8f6d6deb3fc2e864ac81abb744c5d4a32ad6b974', class: "label-container" }, h("span", { key: '7b1a4e96fa8c3dfdfffa7890c17ed8afacf3032f' }, this.label), h("cura-icon", { key: '0f9c6f9dc664ad96a7b02c084700fd8f75fbc677', name: this.opened ? this.closeIcon : this.openIcon, size: this.iconSize, color: this.getIconColor() }))), h("div", { key: 'fb1860aa74170ff18edc03b8171356cd1a1fd271', class: 'content' }, h("div", { key: '4d3c9252658e9c30521353579f0b3ef9bc8a3087', class: "content-wrapper" }, h("slot", { key: '067f12a534860a5942d01d5945d1e4d272e5a541' }))))));
31
+ return (h(Host, { key: '3dd53ab4a597b1726045ec4d3ed066c6c30050d0', slot: "accordion-item" }, h("div", { key: '209291c7c9b587ac546e8b9e40b7d94a11a2489e', class: this.getClasses(), style: this.styles }, h("div", { key: '9c2de1103c7f30bc9d2cb0a86fc660c98b94be84', class: "label", onClick: e => this.accordionItemClick(e) }, h("div", { key: '052a8be2c00edf3907e49970120d9b65937ab031', class: "label-container" }, h("div", { key: 'da543cdbcb0c0d5f691c3d2fcabfbfc9ec46f506', class: "label-content" }, this.renderIcon(), h("cura-heading", { key: 'f587de080f2c1779ffacf0b557827c24edf5e1ee', size: "small", level: this.level, weight: 'bold', "margin-block": "0", color: "neutral-black" }, this.label)), h("cura-icon", { key: '611b48e32dfd7056a563aab56401feb3c8febee2', name: this.opened ? this.closeIcon : this.openIcon, size: this.iconSize, color: "neutral-black" }))), h("div", { key: 'e1d5e606f3e9415570a2a5c2ba3d96264d430bd0', class: 'content' }, h("div", { key: '62b76ef21093a4d051120e2502936049a186c36a', class: "content-wrapper" }, h("slot", { key: '646b3d0163edf473c1a2e824f251f4db85b2fc18' }))))));
32
32
  }
33
33
  static get is() { return "cura-accordion-item"; }
34
34
  static get encapsulation() { return "shadow"; }
@@ -78,9 +78,9 @@ export class CuraAccordionItem {
78
78
  },
79
79
  "attribute": "icon-size",
80
80
  "reflect": true,
81
- "defaultValue": "32"
81
+ "defaultValue": "20"
82
82
  },
83
- "openIcon": {
83
+ "labelIcon": {
84
84
  "type": "string",
85
85
  "mutable": false,
86
86
  "complexType": {
@@ -94,11 +94,11 @@ export class CuraAccordionItem {
94
94
  "tags": [],
95
95
  "text": ""
96
96
  },
97
- "attribute": "open-icon",
97
+ "attribute": "label-icon",
98
98
  "reflect": true,
99
- "defaultValue": "'down'"
99
+ "defaultValue": "''"
100
100
  },
101
- "closeIcon": {
101
+ "openIcon": {
102
102
  "type": "string",
103
103
  "mutable": false,
104
104
  "complexType": {
@@ -112,11 +112,11 @@ export class CuraAccordionItem {
112
112
  "tags": [],
113
113
  "text": ""
114
114
  },
115
- "attribute": "close-icon",
115
+ "attribute": "open-icon",
116
116
  "reflect": true,
117
- "defaultValue": "'up'"
117
+ "defaultValue": "'down'"
118
118
  },
119
- "iconColor": {
119
+ "closeIcon": {
120
120
  "type": "string",
121
121
  "mutable": false,
122
122
  "complexType": {
@@ -128,13 +128,13 @@ export class CuraAccordionItem {
128
128
  "optional": false,
129
129
  "docs": {
130
130
  "tags": [],
131
- "text": "Color scheme base color\n(By default, the icon will use the same color of 'color' and 'activeColor')"
131
+ "text": ""
132
132
  },
133
- "attribute": "icon-color",
133
+ "attribute": "close-icon",
134
134
  "reflect": true,
135
- "defaultValue": "''"
135
+ "defaultValue": "'up'"
136
136
  },
137
- "iconActiveColor": {
137
+ "iconColor": {
138
138
  "type": "string",
139
139
  "mutable": false,
140
140
  "complexType": {
@@ -146,9 +146,9 @@ export class CuraAccordionItem {
146
146
  "optional": false,
147
147
  "docs": {
148
148
  "tags": [],
149
- "text": ""
149
+ "text": "Color scheme base color\n(By default, the icon will use the same color of 'color')"
150
150
  },
151
- "attribute": "icon-active-color",
151
+ "attribute": "icon-color",
152
152
  "reflect": true,
153
153
  "defaultValue": "''"
154
154
  },
@@ -170,6 +170,24 @@ export class CuraAccordionItem {
170
170
  "reflect": false,
171
171
  "defaultValue": "'dark'"
172
172
  },
173
+ "level": {
174
+ "type": "number",
175
+ "mutable": false,
176
+ "complexType": {
177
+ "original": "1 | 2 | 3 | 4 | 5 | 6",
178
+ "resolved": "1 | 2 | 3 | 4 | 5 | 6",
179
+ "references": {}
180
+ },
181
+ "required": false,
182
+ "optional": false,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": "Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...\nValues: 1 to 6 (3 default)."
186
+ },
187
+ "attribute": "level",
188
+ "reflect": true,
189
+ "defaultValue": "3"
190
+ },
173
191
  "opened": {
174
192
  "type": "boolean",
175
193
  "mutable": true,
@@ -1 +1 @@
1
- {"version":3,"file":"cura-accordion-item.js","sourceRoot":"","sources":["../../../../src/components/accordion/cura-accordion-item/cura-accordion-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAG,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOjE,MAAM,OAAO,iBAAiB;;qBAKW,EAAE;wBAMP,EAAE;wBACF,MAAM;yBACL,IAAI;yBAMJ,EAAE;+BACI,EAAE;yBAKL,MAAM;sBAEc,KAAK;sBAE7C,EAAE;;IAEpB,YAAY;QACV,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO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AE,GAAc,CACxH,CACF;gBACN,4DAAK,KAAK,EAAC,SAAS;oBAClB,4DAAK,KAAK,EAAC,iBAAiB;wBAC1B,8DAAa,CACT,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-accordion-item',\n styleUrl: 'cura-accordion-item.scss',\n shadow: true,\n})\nexport class CuraAccordionItem {\n\n /**\n * Text label for accordion item\n */\n @Prop({reflect: true}) label: string = '';\n\n /** ***Properties below are inherited from the cura-accordion*** */\n /**\n * Accordion items icons\n */\n @Prop({reflect: true}) iconSize = 32;\n @Prop({reflect: true}) openIcon = 'down';\n @Prop({reflect: true}) closeIcon = 'up';\n\n /**\n * Color scheme base color\n * (By default, the icon will use the same color of 'color' and 'activeColor')\n */\n @Prop({reflect: true}) iconColor = '';\n @Prop({reflect: true}) iconActiveColor = '';\n\n /**\n * Set the color mode to dark or light\n */\n @Prop() colorMode: 'dark' | 'light' = 'dark';\n\n @Prop({ reflect: true, mutable: true }) opened: boolean = false;\n\n @State() styles = {};\n\n getIconColor() {\n const inverted = this.colorMode === 'light';\n const iconColor = inverted ? 'neutral-lighter' : `${this.iconColor}-base`;\n const iconActiveColor = inverted ? 'neutral-purewhite' : `${this.iconActiveColor}-base`;\n return this.opened ? iconActiveColor : iconColor;\n }\n\n getClasses() {\n const classes = {};\n classes['accordion-item'] = true;\n classes['active'] = this.opened;\n classes['inverted'] = this.colorMode === 'light';\n return classes;\n }\n\n accordionItemClick(_: Event) {\n this.opened = !this.opened;\n }\n\n render() {\n return (\n <Host slot=\"accordion-item\">\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"label\" onClick={e => this.accordionItemClick(e)}>\n <div class=\"label-container\">\n <span>{this.label}</span>\n <cura-icon name={this.opened ? this.closeIcon : this.openIcon} size={this.iconSize} color={this.getIconColor()}></cura-icon>\n </div>\n </div>\n <div class='content'>\n <div class=\"content-wrapper\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"cura-accordion-item.js","sourceRoot":"","sources":["../../../../src/components/accordion/cura-accordion-item/cura-accordion-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAG,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOjE,MAAM,OAAO,iBAAiB;;qBAKW,EAAE;wBAMP,EAAE;yBACD,EAAE;wBACH,MAAM;yBACL,IAAI;yBAMJ,EAAE;yBAKC,MAAM;qBAMU,CAAC;sBAEC,KAAK;sBAE3C,EAAE;;IAEpB,UAAU;QACR,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;QACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAChC,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;QACjD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,kBAAkB,CAAC,CAAQ;QACzB,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,UAAU;QACR,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO,EAAE,CAAC;QAC/B,OAAO,iBAAW,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,eAAe,GAAc,CAAC;IACpG,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,gBAAgB;YACzB,4DAAK,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM;gBAC/C,4DAAK,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC;oBACzD,4DAAK,KAAK,EAAC,iBAAiB;wBAC1B,4DAAK,KAAK,EAAC,eAAe;4BACvB,IAAI,CAAC,UAAU,EAAE;4BAClB,qEAAc,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAC,MAAM,kBAAc,GAAG,EAAC,KAAK,EAAC,eAAe,IAC/F,IAAI,CAAC,KAAK,CACE,CACX;wBACN,kEAAW,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,eAAe,GAAc,CACpH,CACF;gBACN,4DAAK,KAAK,EAAC,SAAS;oBAClB,4DAAK,KAAK,EAAC,iBAAiB;wBAC1B,8DAAa,CACT,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, State, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-accordion-item',\n styleUrl: 'cura-accordion-item.scss',\n shadow: true,\n})\nexport class CuraAccordionItem {\n\n /**\n * Text label for accordion item\n */\n @Prop({reflect: true}) label: string = '';\n\n /** ***Properties below are inherited from the cura-accordion*** */\n /**\n * Accordion items icons\n */\n @Prop({reflect: true}) iconSize = 20;\n @Prop({reflect: true}) labelIcon = '';\n @Prop({reflect: true}) openIcon = 'down';\n @Prop({reflect: true}) closeIcon = 'up';\n\n /**\n * Color scheme base color\n * (By default, the icon will use the same color of 'color')\n */\n @Prop({reflect: true}) iconColor = '';\n\n /**\n * Set the color mode to dark or light\n */\n @Prop() colorMode: 'dark' | 'light' = 'dark';\n\n /**\n * Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ...\n * Values: 1 to 6 (3 default).\n */\n @Prop({reflect: true}) level: 1 | 2 | 3 | 4 | 5 | 6 = 3;\n\n @Prop({reflect: true, mutable: true}) opened: boolean = false;\n\n @State() styles = {};\n\n getClasses() {\n const classes = {};\n classes['accordion-item'] = true;\n classes['active'] = this.opened;\n classes['inverted'] = this.colorMode === 'light';\n return classes;\n }\n\n accordionItemClick(_: Event) {\n this.opened = !this.opened;\n }\n\n renderIcon() {\n if (!this.labelIcon) return '';\n return <cura-icon name={this.labelIcon} size={this.iconSize} color={\"neutral-black\"}></cura-icon>;\n }\n\n render() {\n return (\n <Host slot=\"accordion-item\">\n <div class={this.getClasses()} style={this.styles}>\n <div class=\"label\" onClick={e => this.accordionItemClick(e)}>\n <div class=\"label-container\">\n <div class=\"label-content\">\n {this.renderIcon()}\n <cura-heading size=\"small\" level={this.level} weight='bold' margin-block=\"0\" color=\"neutral-black\">\n {this.label}\n </cura-heading>\n </div>\n <cura-icon name={this.opened ? this.closeIcon : this.openIcon} size={this.iconSize} color={\"neutral-black\"}></cura-icon>\n </div>\n </div>\n <div class='content'>\n <div class=\"content-wrapper\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"]}
@@ -18,7 +18,7 @@ export class CuraDistance {
18
18
  this.formatDistance();
19
19
  }
20
20
  render() {
21
- return (h(Host, { key: 'afc9605f43777e15c026ee00b0ca3fc18b648489' }, h("div", { key: '5e970213baad148605f9fcd0e0f0307f32a99375', class: "container", style: this.styles }, h("cura-label", { key: 'd56a580850734dedf9d7e72c0dce45d05be26119', size: 'xsmall', weight: 'bold', color: 'neutral-black' }, this.displayDistance, this.isThousandRounded ? 'K' : ''), h("cura-label", { key: 'e0ec3d1a6919b3931d807f75054b5d861e6015b3', size: 'xsmall', weight: 'bold', color: 'neutral-dark' }, this.label))));
21
+ return (h(Host, { key: '7027189b17f2ad1759f9d43bc5dbc9cbb1fe47cc' }, h("div", { key: 'bc57ac9c32c0651469d4bd6ee75d0f97408fde34', class: "container", style: this.styles }, h("cura-label", { key: '913db081273caf2e7d46d92b22e1988cf28ddeb3', size: 'xsmall', weight: 'bold', color: 'neutral-black' }, this.displayDistance, this.isThousandRounded ? 'K' : ''), h("cura-label", { key: '4c327bd9d55466bb2d9c614d9aa0420e42da23ce', size: 'xsmall', weight: 'bold', color: 'neutral-dark' }, this.label))));
22
22
  }
23
23
  setCssProperties() {
24
24
  this.styles = {
@@ -21,10 +21,8 @@
21
21
  width: 20px;
22
22
  height: 20px;
23
23
  min-width: 16px;
24
- padding: 4px;
25
24
  justify-content: center;
26
25
  align-items: center;
27
- gap: 4px;
28
26
  border-radius: 500px;
29
27
  background: var(--background-color);
30
28
  }
@@ -10,7 +10,7 @@ export class CuraBadgeNumber {
10
10
  this.styles = Object.assign(Object.assign({}, this.styles), { '--background-color': this.theme.colors.getColor(this.color) });
11
11
  }
12
12
  render() {
13
- 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)))));
13
+ return (h(Host, { key: 'a20934b4bec43ab7024e1bc4ad7537ff0d54b937' }, h("div", { key: 'a3fc8332932a117db4be61092050c3df3e4142bc', class: "container", style: this.styles }, h("cura-label", { key: 'ff53c0645348be0d392728778e3486c353243af5' }, h("slot", { key: 'f0774cc8f8ad07287b68bb3c59bf22cd4fc69755' }, this.number)))));
14
14
  }
15
15
  static get is() { return "cura-badge-number"; }
16
16
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-badge-number.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-number/cura-badge-number.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAG,CAAC,EAAE,MAAM,eAAe,CAAC;AAO1D,MAAM,OAAO,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;IACH,CAAC;IAGD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM;gBACvC;oBACE,+DAAO,IAAI,CAAC,MAAM,CAAQ,CACf,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
1
+ {"version":3,"file":"cura-badge-number.js","sourceRoot":"","sources":["../../../../src/components/badges/cura-badge-number/cura-badge-number.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,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;IACH,CAAC;IAGD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,WAAW,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM;gBACvC;oBACE,+DAAO,IAAI,CAAC,MAAM,CAAQ,CACf,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
@@ -88,7 +88,7 @@ export class CuraButton {
88
88
  render() {
89
89
  const symbolColor = this.getSymbolColor();
90
90
  const labelSize = labelSizes[this.size] || labelSizes["default"];
91
- 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 })))));
91
+ return (h(Host, { key: '2831f74cc53bbadcaf1648c759090204cf3c20ea' }, 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 })))));
92
92
  }
93
93
  static get is() { return "cura-button"; }
94
94
  static get encapsulation() { return "shadow"; }
@@ -87,7 +87,7 @@ export class CuraButtonOutline {
87
87
  render() {
88
88
  const symbolColor = this.getSymbolColor();
89
89
  const labelSize = labelSizes[this.size] || labelSizes["default"];
90
- 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 })))));
90
+ return (h(Host, { key: '5adde27bc83165040d4279e4835646e13b08a412' }, 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 is() { return "cura-button-outline"; }
93
93
  static get encapsulation() { return "shadow"; }
@@ -95,12 +95,24 @@
95
95
  position: relative;
96
96
  background-color: var(--neutral-purewhite);
97
97
  box-sizing: border-box;
98
- border: 2px solid var(--color-border);
98
+ border: none;
99
99
  }
100
100
  :host button:focus,
101
101
  :host a:focus {
102
102
  outline: 2px solid #6EA8FF;
103
103
  }
104
+ :host button::before,
105
+ :host a::before {
106
+ content: "";
107
+ width: 100%;
108
+ height: 100%;
109
+ position: absolute;
110
+ left: 0px;
111
+ top: 0px;
112
+ box-sizing: border-box;
113
+ border: 2px solid var(--color-border);
114
+ border-radius: var(--border-radius);
115
+ }
104
116
  :host button:not(.disabled):hover,
105
117
  :host a:not(.disabled):hover {
106
118
  background-color: var(--color-background-hover);
@@ -137,7 +149,11 @@
137
149
  opacity: 1;
138
150
  transition: opacity 0.2s linear;
139
151
  position: relative;
140
- gap: 10px;
152
+ flex-direction: row !important;
153
+ }
154
+ :host button .button-container .badge-number,
155
+ :host a .button-container .badge-number {
156
+ margin-left: 10px;
141
157
  }
142
158
  :host button.icon-right .button-container,
143
159
  :host a.icon-right .button-container {
@@ -147,6 +163,24 @@
147
163
  :host a.justify .button-container {
148
164
  width: 100%;
149
165
  }
166
+ :host button.icon-left cura-icon,
167
+ :host a.icon-left cura-icon {
168
+ margin-right: calc(var(--base-spacing) * 3px);
169
+ }
170
+ :host button.icon-right cura-icon,
171
+ :host a.icon-right cura-icon {
172
+ margin-left: calc(var(--base-spacing) * 3px);
173
+ }
174
+ :host button.medium.icon-left cura-icon, :host button.small.icon-left cura-icon,
175
+ :host a.medium.icon-left cura-icon,
176
+ :host a.small.icon-left cura-icon {
177
+ margin-right: calc(var(--base-spacing) * 2px);
178
+ }
179
+ :host button.medium.icon-right cura-icon, :host button.small.icon-right cura-icon,
180
+ :host a.medium.icon-right cura-icon,
181
+ :host a.small.icon-right cura-icon {
182
+ margin-left: calc(var(--base-spacing) * 2px);
183
+ }
150
184
  :host button.selected,
151
185
  :host a.selected {
152
186
  cursor: pointer;
@@ -5,11 +5,12 @@ export class CuraButtonSelect {
5
5
  this.theme = window.CuraAPI.theme;
6
6
  this.selected = false;
7
7
  this.iconName = undefined;
8
- this.size = undefined;
8
+ this.size = 'medium';
9
9
  this.counter = undefined;
10
10
  this.disabled = undefined;
11
- this.background = undefined;
12
- this.color = undefined;
11
+ this.background = 'light';
12
+ this.color = 'primary';
13
+ this.iconPosition = undefined;
13
14
  this.hovered = false;
14
15
  this.styles = {};
15
16
  }
@@ -33,7 +34,7 @@ export class CuraButtonSelect {
33
34
  var _a;
34
35
  const classes = {};
35
36
  classes[`${(_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`] = true;
36
- classes['icon'] = true;
37
+ classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
37
38
  classes['disabled'] = this.disabled;
38
39
  classes['selected'] = this.selected;
39
40
  return classes;
@@ -75,11 +76,18 @@ export class CuraButtonSelect {
75
76
  return `${this.color}-darker`;
76
77
  }
77
78
  getIcon() {
78
- const iconSize = this.size === 'large' ? 24 : this.size === 'medium' ? 20 : 16;
79
- return h("cura-icon", { class: "button-icon", name: this.iconName, size: iconSize, color: this.getLabelFontColor() });
79
+ const iconSize = this.size === 'large' ? 20 : 16;
80
+ if (this.iconPosition === 'right') {
81
+ return;
82
+ }
83
+ return h("cura-icon", { name: this.iconName, size: iconSize, color: this.getLabelFontColor() });
80
84
  }
81
85
  getCounter() {
82
- return (h("cura-badge-number", { color: this.getColorCounter() }, h("cura-label", { color: this.getColorBagdeNumber() }, this.counter)));
86
+ return (h("cura-badge-number", { color: this.getColorCounter(), class: "badge-number" }, h("cura-label", { color: this.getColorBagdeNumber(), size: "small" }, this.counter)));
87
+ }
88
+ getCheckIconRight() {
89
+ const iconSize = this.size === 'large' ? 20 : 16;
90
+ return h("cura-icon", { name: "check", size: iconSize, color: this.getLabelFontColor() });
83
91
  }
84
92
  handleMouseEnter() {
85
93
  if (this.disabled)
@@ -97,7 +105,7 @@ export class CuraButtonSelect {
97
105
  }
98
106
  render() {
99
107
  const labelSize = labelSizes[this.size] || labelSizes['default'];
100
- return (h(Host, { key: '368f94693c0ce8ec2d95a9eb258fd6e411ade7a5' }, h("button", { key: 'ddc421e819342b29772d763b0a62f98a4aca37c0', class: this.getClasses(), style: this.styles, disabled: this.disabled, onClick: e => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("div", { key: '70bb7a295f1fb8984aabc432edf6e8e3f464daf1', class: "button-container" }, this.iconName ? this.getIcon() : null, h("cura-label", { key: '281bbb73ff59a231f2daef9bac9a49b46f3c55df', class: "label", size: labelSize, lineHeight: "0%", color: this.getLabelFontColor(), weight: "regular" }, h("slot", { key: 'ef955647ac927fea6bb1dc686720031260fc5212' })), this.counter ? this.getCounter() : null))));
108
+ return (h(Host, { key: '8b766a3e23c2af13a47d113884047d19717702f2' }, h("button", { key: '90b57f260baa61de7c73e09965e190cd13eb62e1', class: this.getClasses(), style: this.styles, disabled: this.disabled, onClick: e => this.handleClick(e), onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave() }, h("div", { key: 'f318438fa59f43846ce5043e4ee290faf3cf05d4', class: "button-container" }, this.iconName ? this.getIcon() : null, h("cura-label", { key: '2d069740c62b32dd3aa0fd74bdafb951d8deb73b', class: "label", size: labelSize, lineHeight: "0%", color: this.getLabelFontColor(), weight: "regular" }, h("slot", { key: 'e71e072d1dd91bbbafa939181cc22ba7b7c6189e' })), this.counter ? this.getCounter() : null, this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null))));
101
109
  }
102
110
  static get is() { return "cura-button-select"; }
103
111
  static get encapsulation() { return "shadow"; }
@@ -163,7 +171,8 @@ export class CuraButtonSelect {
163
171
  "text": ""
164
172
  },
165
173
  "attribute": "size",
166
- "reflect": true
174
+ "reflect": true,
175
+ "defaultValue": "'medium'"
167
176
  },
168
177
  "counter": {
169
178
  "type": "any",
@@ -214,7 +223,8 @@ export class CuraButtonSelect {
214
223
  "text": ""
215
224
  },
216
225
  "attribute": "background",
217
- "reflect": false
226
+ "reflect": false,
227
+ "defaultValue": "'light'"
218
228
  },
219
229
  "color": {
220
230
  "type": "string",
@@ -231,7 +241,25 @@ export class CuraButtonSelect {
231
241
  "text": ""
232
242
  },
233
243
  "attribute": "color",
234
- "reflect": false
244
+ "reflect": false,
245
+ "defaultValue": "'primary'"
246
+ },
247
+ "iconPosition": {
248
+ "type": "string",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "'left' | 'right'",
252
+ "resolved": "\"left\" | \"right\"",
253
+ "references": {}
254
+ },
255
+ "required": false,
256
+ "optional": false,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": ""
260
+ },
261
+ "attribute": "icon-position",
262
+ "reflect": true
235
263
  }
236
264
  };
237
265
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-button-select.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-select/cura-button-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAOxD,MAAM,OAAO,gBAAgB;;QAgB3B,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;wBAbsB,KAAK;;;;;;;uBAQrC,KAAK;sBACN,EAAE;;IAUpB,SAAS;QACP,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,EAAE;YACzG,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,QAAQ,EAAE;YAC3H,EAAE,IAAI,EAAE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B,EAAE;gBAE3C,4DAAK,KAAK,EAAC,kBAAkB;oBAC1B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI;oBACtC,mEAAY,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAC,IAAI,EAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAC,SAAS;wBAC1G,8DAAa,CACF;oBACZ,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CACpC,CACC,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\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 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.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.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 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 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 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 const labelSize = labelSizes[this.size] || labelSizes['default'];\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\" size={labelSize} 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"]}
1
+ {"version":3,"file":"cura-button-select.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-select/cura-button-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAOxD,MAAM,OAAO,gBAAgB;;QAiB3B,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,K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I,CAAC,YAAY,KAAK,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,CAC7E,CACC,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { labelSizes } from '../cura-button.definitions';\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' = 'medium';\n @Prop({ reflect: true, mutable: true }) counter: string | number | null;\n @Prop({ reflect: true }) disabled: boolean;\n @Prop() background: 'dark' | 'light' = 'light';\n @Prop() color: string = 'primary';\n @Prop({ reflect: true }) iconPosition: 'left' | 'right';\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 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 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.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 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 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' ? 20 : 16;\n if (this.iconPosition === 'right') {\n return;\n }\n\n return <cura-icon name={this.iconName} size={iconSize} color={this.getLabelFontColor()} />;\n }\n\n getCounter() {\n return (\n <cura-badge-number color={this.getColorCounter()} class=\"badge-number\">\n <cura-label color={this.getColorBagdeNumber()} size=\"small\">\n {this.counter}\n </cura-label>\n </cura-badge-number>\n );\n }\n\n getCheckIconRight() {\n const iconSize = this.size === 'large' ? 20 : 16;\n return <cura-icon name=\"check\" size={iconSize} color={this.getLabelFontColor()}></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 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 const labelSize = labelSizes[this.size] || labelSizes['default'];\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\" size={labelSize} lineHeight=\"0%\" color={this.getLabelFontColor()} weight=\"regular\">\n <slot></slot>\n </cura-label>\n {this.counter ? this.getCounter() : null}\n {this.iconPosition === 'right' && this.selected ? this.getCheckIconRight() : null}\n </div>\n </button>\n </Host>\n );\n }\n}\n"]}
@@ -38,6 +38,7 @@ const renderCuraButtonSelect = (label, args) => {
38
38
  ? `
39
39
  color="${args.color}"`
40
40
  : ''}
41
+ ${args.iconPosition ? `icon-position="${args.iconPosition}"` : ''}
41
42
  >
42
43
  ${label}
43
44
  </cura-button-select>
@@ -79,8 +80,8 @@ export default {
79
80
  description: 'Tamanhos disponíveis.',
80
81
  table: {
81
82
  category: 'Properties',
82
- defaultValue: { summary: 'large' }
83
- }
83
+ defaultValue: { summary: 'large' },
84
+ },
84
85
  },
85
86
  color: {
86
87
  control: { type: 'select' },
@@ -88,16 +89,16 @@ export default {
88
89
  description: 'Cor fundamental do Design System sem profundidade (ex: primary).',
89
90
  table: {
90
91
  category: 'Properties',
91
- }
92
+ },
92
93
  },
93
94
  iconName: {
94
95
  control: { type: 'select' },
95
96
  options: ['', ...iconNames],
96
97
  description: 'Nome do ícone a ser utilizado no iconset.',
97
98
  table: {
98
- category: 'Icons'
99
+ category: 'Icons',
99
100
  },
100
- name: 'icon-name'
101
+ name: 'icon-name',
101
102
  },
102
103
  background: {
103
104
  control: { type: 'inline-radio' },
@@ -105,7 +106,7 @@ export default {
105
106
  description: 'Define cor clara ou escura do componente.',
106
107
  table: {
107
108
  category: 'Properties',
108
- defaultValue: { summary: 'light' }
109
+ defaultValue: { summary: 'light' },
109
110
  },
110
111
  },
111
112
  counter: {
@@ -116,6 +117,15 @@ export default {
116
117
  defaultValue: { summary: 1 },
117
118
  },
118
119
  },
120
+ iconPosition: {
121
+ control: { type: 'inline-radio' },
122
+ options: ['left', 'right'],
123
+ description: 'Define a posição do ícone. Apenas o ícone <b>check</b> é permitido a direita.',
124
+ table: {
125
+ category: 'Icons',
126
+ defaultValue: { summary: 'left' },
127
+ },
128
+ },
119
129
  },
120
130
  };
121
131
  export const Button = {
@@ -127,7 +137,8 @@ export const Button = {
127
137
  disabled: false,
128
138
  background: 'light',
129
139
  color: 'primary',
130
- label: "Button"
140
+ label: 'Button',
141
+ iconPosition: 'left',
131
142
  },
132
143
  };
133
144
  //# sourceMappingURL=cura-button-select.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-button-select.stories.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-select/cura-button-select.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,IAAS,EAAE,EAAE;IACxD,MAAM,KAAK,GAAG,uBAAuB,IAAI,CAAC,QAAQ;QAC9C,CAAC,CAAC;oBACU,IAAI,CAAC,Q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5D,KAAK,EAAE;gBACH,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;aAC/B;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,IAAI,EAAE;QACF,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,QAAQ;KAClB;CACJ,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\n\nconst renderCuraButtonSelect = (label: string, args: any) => {\n const block = `<cura-button-select ${args.selected\n ? `\n selected=\"${args.selected}\"`\n : ''\n }${args.disabled\n ? `\n disabled=\"${args.disabled}\"`\n : ''\n }\n ${args.iconName\n ? `\n icon-name=\"${args.iconName}\"`\n : ''\n }${args.size\n ? `\n size=\"${args.size}\"`\n : ''\n }\n ${args.counter\n ? `\n counter=\"${args.counter}\"`\n : ''\n }\n ${args.background\n ? `\n background=\"${args.background}\"`\n : ''\n }\n ${args.color\n ? `\n color=\"${args.color}\"`\n : ''\n }\n >\n ${label}\n </cura-button-select>\n `;\n return `${block}`;\n};\n\nexport default {\n title: 'Componentes/Buttons/Button Select',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n return renderCuraButtonSelect(label, args);\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',\n name: 'Label',\n },\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n selected: {\n control: 'boolean',\n description: 'Estado selecionado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'large' }\n }\n },\n color: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n }\n },\n iconName: {\n control: { type: 'select' },\n options: ['', ...iconNames],\n description: 'Nome do ícone a ser utilizado no iconset.',\n table: {\n category: 'Icons'\n },\n name: 'icon-name'\n },\n background: {\n control: { type: 'inline-radio' },\n options: ['dark', 'light'],\n description: 'Define cor clara ou escura do componente.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'light' }\n },\n },\n counter: {\n control: 'number',\n description: 'Define o número a ser exibido pelo componente',\n table: {\n category: 'Properties',\n defaultValue: { summary: 1 },\n },\n },\n },\n};\n\nexport const Button = {\n args: {\n selected: false,\n iconName: 'calendar',\n size: 'medium',\n counter: 1,\n disabled: false,\n background: 'light',\n color: 'primary',\n label: \"Button\"\n },\n};\n"]}
1
+ {"version":3,"file":"cura-button-select.stories.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button-select/cura-button-select.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,IAAS,EAAE,EAAE;IAC1D,MAAM,KAAK,GAAG,uBACZ,IAAI,CAAC,QAAQ;QACX,CAAC,CAAC;oBACY,IAAI,CAAC,QAAQ,GAAG;QAC9B,CAAC,CAAC,EACN,GACE,IAAI,CAAC,QAAQ;QACX,CAAC,CAAC;oBACY,IAAI,CAAC,QAAQ,GAAG;QAC9B,CAAC,CAAC,EACN;IAEE,IAAI,CAAC,QAAQ;QACX,CAAC,CAAC;qBACa,IAAI,CAAC,QAAQ,GAAG;QAC/B,CAAC,CAAC,EACN,GACE,IAAI,CAAC,IAAI;QACP,CAAC,CAAC;gBACQ,IAAI,CAAC,IAAI,GAAG;QACtB,CAAC,C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W,EAAE,+EAA+E;YAC5F,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;aAClC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,QAAQ;QACf,YAAY,EAAE,MAAM;KACrB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\n\nconst renderCuraButtonSelect = (label: string, args: any) => {\n const block = `<cura-button-select ${\n args.selected\n ? `\n selected=\"${args.selected}\"`\n : ''\n }${\n args.disabled\n ? `\n disabled=\"${args.disabled}\"`\n : ''\n }\n ${\n args.iconName\n ? `\n icon-name=\"${args.iconName}\"`\n : ''\n }${\n args.size\n ? `\n size=\"${args.size}\"`\n : ''\n }\n ${\n args.counter\n ? `\n counter=\"${args.counter}\"`\n : ''\n }\n ${\n args.background\n ? `\n background=\"${args.background}\"`\n : ''\n }\n ${\n args.color\n ? `\n color=\"${args.color}\"`\n : ''\n }\n ${args.iconPosition ? `icon-position=\"${args.iconPosition}\"` : ''}\n >\n ${label}\n </cura-button-select>\n `;\n return `${block}`;\n};\n\nexport default {\n title: 'Componentes/Buttons/Button Select',\n tags: ['autodocs'],\n render: ({ label, ...args }) => {\n return renderCuraButtonSelect(label, args);\n },\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto puro com ou sem quebra de linha dentro do componente. Não é propriedade HTML.',\n name: 'Label',\n },\n disabled: {\n control: 'boolean',\n description: 'Estado desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n selected: {\n control: 'boolean',\n description: 'Estado selecionado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanhos disponíveis.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'large' },\n },\n },\n color: {\n control: { type: 'select' },\n options: ['primary', 'secondary', 'accent', 'info', 'success', 'error', 'warning', 'neutral'],\n description: 'Cor fundamental do Design System sem profundidade (ex: primary).',\n table: {\n category: 'Properties',\n },\n },\n iconName: {\n control: { type: 'select' },\n options: ['', ...iconNames],\n description: 'Nome do ícone a ser utilizado no iconset.',\n table: {\n category: 'Icons',\n },\n name: 'icon-name',\n },\n background: {\n control: { type: 'inline-radio' },\n options: ['dark', 'light'],\n description: 'Define cor clara ou escura do componente.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'light' },\n },\n },\n counter: {\n control: 'number',\n description: 'Define o número a ser exibido pelo componente',\n table: {\n category: 'Properties',\n defaultValue: { summary: 1 },\n },\n },\n iconPosition: {\n control: { type: 'inline-radio' },\n options: ['left', 'right'],\n description: 'Define a posição do ícone. Apenas o ícone <b>check</b> é permitido a direita.',\n table: {\n category: 'Icons',\n defaultValue: { summary: 'left' },\n },\n },\n },\n};\n\nexport const Button = {\n args: {\n selected: false,\n iconName: 'calendar',\n size: 'medium',\n counter: 1,\n disabled: false,\n background: 'light',\n color: 'primary',\n label: 'Button',\n iconPosition: 'left',\n },\n};\n"]}
@@ -76,7 +76,7 @@ export class CuraButtonTransparent {
76
76
  render() {
77
77
  const symbolColor = this.getSymbolColor();
78
78
  const labelSize = labelSizes[this.size] || labelSizes["default"];
79
- 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 })))));
79
+ return (h(Host, { key: '60ab1e67798d35b9bb391ad491e4a9e6f3bc123f' }, 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 })))));
80
80
  }
81
81
  static get is() { return "cura-button-transparent"; }
82
82
  static get encapsulation() { return "shadow"; }