@rededor/cura 0.3.4-alpha.2 → 0.3.4

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 (62) hide show
  1. package/dist/cjs/cura-button_6.cjs.entry.js +17 -5
  2. package/dist/cjs/cura-button_6.cjs.entry.js.map +1 -1
  3. package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
  4. package/dist/cjs/cura.cjs.js +2 -2
  5. package/dist/cjs/{index-29633529.js → index-0e874533.js} +3 -247
  6. package/dist/cjs/index-0e874533.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/collection/components/buttons/cura-button/cura-button.css +103 -12
  9. package/dist/collection/components/buttons/cura-button/cura-button.js +42 -12
  10. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  11. package/dist/components/cura-button.js +17 -4
  12. package/dist/components/cura-button.js.map +1 -1
  13. package/dist/cura/cura.esm.js +1 -1
  14. package/dist/cura/cura.esm.js.map +1 -1
  15. package/dist/cura/cura.js +1 -1
  16. package/dist/cura/p-36c8b693.system.js +2 -0
  17. package/dist/cura/p-36c8b693.system.js.map +1 -0
  18. package/dist/cura/{p-958c8695.system.entry.js → p-825028d1.system.entry.js} +2 -2
  19. package/dist/cura/p-a84ae34f.system.js +3 -0
  20. package/dist/cura/p-a84ae34f.system.js.map +1 -0
  21. package/dist/cura/p-cbc91ac5.js +3 -0
  22. package/dist/cura/p-cbc91ac5.js.map +1 -0
  23. package/dist/cura/{p-4c60d085.entry.js → p-e32ae366.entry.js} +2 -2
  24. package/dist/cura/p-e5fd4452.system.entry.js +2 -0
  25. package/dist/cura/p-e5fd4452.system.entry.js.map +1 -0
  26. package/dist/cura/p-e7785610.entry.js +2 -0
  27. package/dist/cura/p-e7785610.entry.js.map +1 -0
  28. package/dist/esm/cura-button_6.entry.js +17 -5
  29. package/dist/esm/cura-button_6.entry.js.map +1 -1
  30. package/dist/esm/cura-icons-view.entry.js +1 -1
  31. package/dist/esm/cura.js +3 -3
  32. package/dist/esm/{index-e11775ce.js → index-92c824be.js} +3 -247
  33. package/dist/esm/index-92c824be.js.map +1 -0
  34. package/dist/esm/loader.js +3 -3
  35. package/dist/esm-es5/cura-button_6.entry.js +1 -1
  36. package/dist/esm-es5/cura-button_6.entry.js.map +1 -1
  37. package/dist/esm-es5/cura-icons-view.entry.js +1 -1
  38. package/dist/esm-es5/cura.js +1 -1
  39. package/dist/esm-es5/cura.js.map +1 -1
  40. package/dist/esm-es5/index-92c824be.js +3 -0
  41. package/dist/esm-es5/index-92c824be.js.map +1 -0
  42. package/dist/esm-es5/loader.js +1 -1
  43. package/dist/esm-es5/loader.js.map +1 -1
  44. package/dist/types/components/buttons/cura-button/cura-button.d.ts +10 -5
  45. package/dist/types/components.d.ts +18 -10
  46. package/package.json +2 -2
  47. package/dist/cjs/index-29633529.js.map +0 -1
  48. package/dist/cura/p-61953b75.system.js +0 -2
  49. package/dist/cura/p-61953b75.system.js.map +0 -1
  50. package/dist/cura/p-731abb13.entry.js +0 -2
  51. package/dist/cura/p-731abb13.entry.js.map +0 -1
  52. package/dist/cura/p-b5872ed0.system.entry.js +0 -2
  53. package/dist/cura/p-b5872ed0.system.entry.js.map +0 -1
  54. package/dist/cura/p-c30e14d5.system.js +0 -3
  55. package/dist/cura/p-c30e14d5.system.js.map +0 -1
  56. package/dist/cura/p-d5990392.js +0 -3
  57. package/dist/cura/p-d5990392.js.map +0 -1
  58. package/dist/esm/index-e11775ce.js.map +0 -1
  59. package/dist/esm-es5/index-e11775ce.js +0 -3
  60. package/dist/esm-es5/index-e11775ce.js.map +0 -1
  61. /package/dist/cura/{p-958c8695.system.entry.js.map → p-825028d1.system.entry.js.map} +0 -0
  62. /package/dist/cura/{p-4c60d085.entry.js.map → p-e32ae366.entry.js.map} +0 -0
@@ -3,6 +3,8 @@
3
3
  vertical-align: middle;
4
4
  }
5
5
  :host button, :host a {
6
+ --shadown-color: 38, 38, 38;
7
+ --shadow-opacity: 0.16;
6
8
  outline: none;
7
9
  box-shadow: none;
8
10
  box-sizing: border-box;
@@ -11,22 +13,24 @@
11
13
  display: flex;
12
14
  width: 100%;
13
15
  align-items: center;
14
- background-color: var(--color-base);
15
- border-width: 1px;
16
- border-color: var(--color-dark);
17
- border-style: solid;
18
16
  border-radius: 4px;
19
- transition: background-color 0.12s linear, box-shadow 0.12s linear, border-color 0.12s linear;
17
+ transition: background-color 0.1s linear, box-shadow 0.1s linear, border-color 0.1s linear;
18
+ font-size: var(--font-size);
20
19
  cursor: pointer;
21
20
  }
22
21
  :host button:hover, :host a:hover {
23
- background-color: var(--color-light);
24
- border-color: var(--color-base);
25
- box-shadow: 0 4px 8px 0 var(--neutral-light);
22
+ box-shadow: 0 4px 8px 0 RGBA(var(--shadown-color), var(--shadow-opacity));
23
+ }
24
+ :host button:active, :host a:active {
25
+ box-shadow: none;
26
26
  }
27
27
  :host button .label, :host a .label {
28
28
  flex: 1;
29
29
  color: var(--neutral-black);
30
+ font-family: var(--font-family);
31
+ font-weight: var(--font-weight-medium);
32
+ font-size: 1.43em;
33
+ line-height: 1.1em;
30
34
  }
31
35
  :host button.icon-left cura-icon, :host a.icon-left cura-icon {
32
36
  margin-right: calc(var(--base-spacing) * 3px);
@@ -42,14 +46,24 @@
42
46
  min-height: calc(var(--base-spacing) * 11px);
43
47
  }
44
48
  :host button.medium:hover, :host a.medium:hover {
45
- box-shadow: 0 3px 6px 0 var(--neutral-light);
49
+ box-shadow: 0 3px 6px 0 RGBA(var(--shadown-color), var(--shadow-opacity));
50
+ }
51
+ :host button.medium:active, :host a.medium:active {
52
+ box-shadow: none;
53
+ }
54
+ :host button.medium .label, :host a.medium .label {
55
+ font-size: 1.14em;
56
+ letter-spacing: 2%;
46
57
  }
47
58
  :host button.small, :host a.small {
48
59
  padding: calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);
49
60
  min-height: calc(var(--base-spacing) * 8px);
50
61
  }
51
62
  :host button.small:hover, :host a.small:hover {
52
- box-shadow: 0 2px 5px 0 var(--neutral-light);
63
+ box-shadow: 0 2px 5px 0 RGBA(var(--shadown-color), var(--shadow-opacity));
64
+ }
65
+ :host button.small:active, :host a.small:active {
66
+ box-shadow: none;
53
67
  }
54
68
  :host button.small.icon-left cura-icon, :host a.small.icon-left cura-icon {
55
69
  margin-right: calc(var(--base-spacing) * 2.5px);
@@ -57,14 +71,91 @@
57
71
  :host button.small.icon-right cura-icon, :host a.small.icon-right cura-icon {
58
72
  margin-left: calc(var(--base-spacing) * 2.5px);
59
73
  }
74
+ :host button.small .label, :host a.small .label {
75
+ font-size: 1em;
76
+ letter-spacing: 2%;
77
+ }
60
78
  :host button.disabled, :host a.disabled {
61
79
  cursor: not-allowed;
80
+ }
81
+ :host button.disabled:hover, :host a.disabled:hover {
82
+ box-shadow: none;
83
+ }
84
+ :host button.button-solid, :host a.button-solid {
85
+ background-color: var(--color-base);
86
+ border-width: 1px;
87
+ border-color: var(--color-dark);
88
+ border-style: solid;
89
+ }
90
+ :host button.button-solid:hover, :host a.button-solid:hover {
91
+ background-color: var(--color-light);
92
+ border-color: var(--color-base);
93
+ }
94
+ :host button.button-solid:active, :host a.button-solid:active {
95
+ background-color: var(--color-dark);
96
+ }
97
+ :host button.button-solid .label, :host a.button-solid .label {
98
+ color: var(--neutral-black);
99
+ }
100
+ :host button.button-solid .label.inverted, :host a.button-solid .label.inverted {
101
+ color: var(--neutral-white);
102
+ }
103
+ :host button.button-solid.disabled, :host a.button-solid.disabled {
62
104
  background-color: var(--neutral-light);
63
105
  border-color: var(--neutral-base);
64
106
  }
65
- :host button.disabled:hover, :host a.disabled:hover {
107
+ :host button.button-solid.disabled .label, :host button.button-solid.disabled .label.inverted, :host a.button-solid.disabled .label, :host a.button-solid.disabled .label.inverted {
108
+ color: var(--neutral-dark);
109
+ }
110
+ :host button.button-outline, :host a.button-outline {
111
+ background-color: transparent;
112
+ border-width: 2px;
113
+ border-color: var(--color-base);
114
+ border-style: solid;
115
+ }
116
+ :host button.button-outline:hover, :host a.button-outline:hover {
117
+ border-color: var(--color-light);
118
+ }
119
+ :host button.button-outline:not(.disabled):hover .label, :host a.button-outline:not(.disabled):hover .label {
120
+ color: var(--color-light);
121
+ }
122
+ :host button.button-outline:not(.disabled):hover cura-icon, :host a.button-outline:not(.disabled):hover cura-icon {
123
+ --color: var(--color-light) !important;
124
+ }
125
+ :host button.button-outline .label, :host a.button-outline .label {
126
+ color: var(--color-base);
127
+ }
128
+ :host button.button-outline .label.inverted, :host a.button-outline .label.inverted {
129
+ color: var(--neutral-white);
130
+ }
131
+ :host button.button-outline:not(.disabled):not(.inverted):active, :host a.button-outline:not(.disabled):not(.inverted):active {
132
+ border-color: var(--color-dark);
133
+ }
134
+ :host button.button-outline:not(.disabled):not(.inverted):active .label, :host a.button-outline:not(.disabled):not(.inverted):active .label {
135
+ color: var(--color-dark);
136
+ }
137
+ :host button.button-outline:not(.disabled):not(.inverted):active cura-icon, :host a.button-outline:not(.disabled):not(.inverted):active cura-icon {
138
+ --color: var(--color-dark) !important;
139
+ }
140
+ :host button.button-outline.inverted, :host a.button-outline.inverted {
141
+ border-color: var(--neutral-white);
142
+ }
143
+ :host button.button-outline.inverted:hover, :host a.button-outline.inverted:hover {
144
+ border-color: var(--color-light);
66
145
  box-shadow: none;
67
146
  }
68
- :host button.disabled .label, :host a.disabled .label {
147
+ :host button.button-outline.inverted:not(.disabled):active, :host a.button-outline.inverted:not(.disabled):active {
148
+ border-color: var(--neutral-white);
149
+ }
150
+ :host button.button-outline.inverted:not(.disabled):active .label, :host a.button-outline.inverted:not(.disabled):active .label {
151
+ color: var(--neutral-white);
152
+ }
153
+ :host button.button-outline.inverted:not(.disabled):active cura-icon, :host a.button-outline.inverted:not(.disabled):active cura-icon {
154
+ --color: var(--neutral-white) !important;
155
+ }
156
+ :host button.button-outline.disabled, :host a.button-outline.disabled {
157
+ border-color: var(--neutral-base);
158
+ }
159
+ :host button.button-outline.disabled .label, :host button.button-outline.disabled .label.inverted, :host a.button-outline.disabled .label, :host a.button-outline.disabled .label.inverted {
69
160
  color: var(--neutral-dark);
70
161
  }
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from '@stencil/core';
2
2
  export class CuraButton {
3
3
  constructor() {
4
- this.type = 'primary';
4
+ this.type = 'solid';
5
5
  this.size = 'large';
6
6
  this.disabled = false;
7
7
  this.isLoading = false;
@@ -11,18 +11,23 @@ export class CuraButton {
11
11
  this.href = undefined;
12
12
  this.target = "_self";
13
13
  this.color = 'accent';
14
+ this.fontColor = 'dark';
14
15
  this.styles = {};
15
16
  }
16
17
  handleChangeColor() {
17
18
  this.setColors();
18
19
  }
19
20
  connectedCallback() {
21
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
20
22
  this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
21
23
  this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);
22
24
  this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);
23
25
  this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);
24
26
  this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);
25
27
  this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);
28
+ this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
29
+ this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
30
+ this.styles['--font-weight-medium'] = this.weights.medium;
26
31
  this.setColors();
27
32
  }
28
33
  getClasses() {
@@ -30,6 +35,7 @@ export class CuraButton {
30
35
  classes[`button-${this.type.toLowerCase()}`] = true;
31
36
  classes[`${this.size.toLowerCase()}`] = true;
32
37
  classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
38
+ classes['inverted'] = this.fontColor === 'light';
33
39
  classes['disabled'] = this.disabled;
34
40
  return classes;
35
41
  }
@@ -40,11 +46,17 @@ export class CuraButton {
40
46
  if (!this.iconName)
41
47
  return '';
42
48
  const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
43
- const color = this.disabled ? 'neutral-dark' : `neutral-black`;
49
+ const color = this.disabled
50
+ ? 'neutral-dark'
51
+ : this.fontColor === 'light'
52
+ ? 'neutral-white'
53
+ : this.type === 'solid'
54
+ ? 'neutral-black'
55
+ : `${this.color}-base`;
44
56
  return h("cura-icon", { name: this.iconName, iconset: this.iconset, size: iconSize, color: color });
45
57
  }
46
58
  render() {
47
- return (h(Host, null, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles }, this.getIcon(), h("span", { class: "label" }, h("slot", null)))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null }, this.getIcon(), h("span", { class: "label" }, h("slot", null))))));
59
+ return (h(Host, null, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles }, this.getIcon(), h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, h("slot", null)))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null }, this.getIcon(), h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, h("slot", null))))));
48
60
  }
49
61
  static get is() { return "cura-button"; }
50
62
  static get encapsulation() { return "shadow"; }
@@ -64,26 +76,26 @@ export class CuraButton {
64
76
  "type": "string",
65
77
  "mutable": false,
66
78
  "complexType": {
67
- "original": "string",
68
- "resolved": "string",
79
+ "original": "'solid' | 'outline' | 'transparent' | 'icon'",
80
+ "resolved": "\"icon\" | \"outline\" | \"solid\" | \"transparent\"",
69
81
  "references": {}
70
82
  },
71
83
  "required": false,
72
84
  "optional": false,
73
85
  "docs": {
74
86
  "tags": [],
75
- "text": "Button type: primary (default) | outline | transparent | icon."
87
+ "text": "Button type: solid (default) | outline | transparent | icon."
76
88
  },
77
89
  "attribute": "type",
78
90
  "reflect": true,
79
- "defaultValue": "'primary'"
91
+ "defaultValue": "'solid'"
80
92
  },
81
93
  "size": {
82
94
  "type": "string",
83
95
  "mutable": false,
84
96
  "complexType": {
85
- "original": "string",
86
- "resolved": "string",
97
+ "original": "'small' | 'medium' | 'large'",
98
+ "resolved": "\"large\" | \"medium\" | \"small\"",
87
99
  "references": {}
88
100
  },
89
101
  "required": false,
@@ -171,8 +183,8 @@ export class CuraButton {
171
183
  "type": "string",
172
184
  "mutable": false,
173
185
  "complexType": {
174
- "original": "string",
175
- "resolved": "string",
186
+ "original": "'left' | 'right'",
187
+ "resolved": "\"left\" | \"right\"",
176
188
  "references": {}
177
189
  },
178
190
  "required": false,
@@ -232,11 +244,29 @@ export class CuraButton {
232
244
  "optional": false,
233
245
  "docs": {
234
246
  "tags": [],
235
- "text": "Color base from color scheme. Default: accent"
247
+ "text": "Color base from color scheme. Default: accent."
236
248
  },
237
249
  "attribute": "color",
238
250
  "reflect": false,
239
251
  "defaultValue": "'accent'"
252
+ },
253
+ "fontColor": {
254
+ "type": "string",
255
+ "mutable": false,
256
+ "complexType": {
257
+ "original": "'dark' | 'light'",
258
+ "resolved": "\"dark\" | \"light\"",
259
+ "references": {}
260
+ },
261
+ "required": false,
262
+ "optional": false,
263
+ "docs": {
264
+ "tags": [],
265
+ "text": "Set the font color to dark or light."
266
+ },
267
+ "attribute": "font-color",
268
+ "reflect": false,
269
+ "defaultValue": "'dark'"
240
270
  }
241
271
  };
242
272
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-button.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura-button/cura-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOvE,MAAM,OAAO,UAAU;;gBAKS,SAAS;gBAIT,OAAO;oBAKH,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIJ,MAAM;;kBAS3B,OAAO;iBAKR,QAAQ;kBAMN,EAAE;;EAJpB,iBAAiB;IACf,IAAI,CAAC,SAAS,EAAE,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AU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM;MACtG,IAAI,CAAC,OAAO,EAAE;MAChB,YAAM,KAAK,EAAC,OAAO;QAAC,eAAa,CAAO,CACtC,CACL,CAAC,CAAC,CAAC,CACF,cAAQ,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI;MACjF,IAAI,CAAC,OAAO,EAAE;MAChB,YAAM,KAAK,EAAC,OAAO;QAAC,eAAa,CAAO,CACjC,CACV,CACM,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-button',\n styleUrl: 'cura-button.scss',\n shadow: true,\n})\nexport class CuraButton {\n\n /**\n * Button type: primary (default) | outline | transparent | icon.\n */\n @Prop({reflect: true}) type = 'primary';\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({reflect: true}) size = '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';\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() target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n\n @State() styles = {};\n\n connectedCallback() {\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-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);\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['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.setColors();\n }\n \n getClasses() {\n const classes = {};\n classes[`button-${this.type.toLowerCase()}`] = true;\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.disabled ? 'neutral-dark' : `neutral-black`;\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href} target={this.target} class={this.getClasses()} style={this.styles}>\n { this.getIcon() }\n <span class=\"label\"><slot></slot></span>\n </a>\n ) : (\n <button class={this.getClasses()} style={this.styles} disabled={this.disabled || null}>\n { this.getIcon() }\n <span class=\"label\"><slot></slot></span>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"cura-button.js","sourceRoot":"","sources":["../../../../src/components/buttons/cura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CACF,cAAQ,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI;MACjF,IAAI,CAAC,OAAO,EAAE;MAChB,YAAM,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,EAAC;QAAE,eAAa,CAAO,CAC/E,CACV,CACM,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-button',\n styleUrl: 'cura-button.scss',\n shadow: true,\n})\nexport class CuraButton {\n\n /**\n * Button type: solid (default) | outline | transparent | icon.\n */\n @Prop({reflect: true}) type: 'solid' | 'outline' | 'transparent' | 'icon' = 'solid';\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 /**\n * Property href switch button to link.\n */\n @Prop({reflect: true}) href: string;\n /**\n * Set target if link.\n */\n @Prop() target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n /**\n * Set the font color to dark or light.\n */\n @Prop() fontColor: 'dark' | 'light' = 'dark';\n\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-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);\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['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\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 getClasses() {\n const classes = {};\n classes[`button-${this.type.toLowerCase()}`] = true;\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['inverted'] = this.fontColor === 'light';\n classes['disabled'] = this.disabled;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.disabled \n ? 'neutral-dark' \n : this.fontColor === 'light' \n ? 'neutral-white' \n : this.type === 'solid'\n ? 'neutral-black'\n : `${this.color}-base`;\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href} target={this.target} class={this.getClasses()} style={this.styles}>\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </a>\n ) : (\n <button class={this.getClasses()} style={this.styles} disabled={this.disabled || null}>\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"]}
@@ -1,14 +1,14 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$2 } from './cura-icon2.js';
3
3
 
4
- const curaButtonCss = ":host{display:inline-block;vertical-align:middle}:host button,:host a{outline:none;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center;background-color:var(--color-base);border-width:1px;border-color:var(--color-dark);border-style:solid;border-radius:4px;-webkit-transition:background-color 0.12s linear, border-color 0.12s linear, -webkit-box-shadow 0.12s linear;transition:background-color 0.12s linear, border-color 0.12s linear, -webkit-box-shadow 0.12s linear;transition:background-color 0.12s linear, box-shadow 0.12s linear, border-color 0.12s linear;transition:background-color 0.12s linear, box-shadow 0.12s linear, border-color 0.12s linear, -webkit-box-shadow 0.12s linear;cursor:pointer}:host button:hover,:host a:hover{background-color:var(--color-light);border-color:var(--color-base);-webkit-box-shadow:0 4px 8px 0 var(--neutral-light);box-shadow:0 4px 8px 0 var(--neutral-light)}:host button .label,:host a .label{-ms-flex:1;flex:1;color:var(--neutral-black)}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right,:host a.icon-right{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium:hover,:host a.medium:hover{-webkit-box-shadow:0 3px 6px 0 var(--neutral-light);box-shadow:0 3px 6px 0 var(--neutral-light)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px)}:host button.small:hover,:host a.small:hover{-webkit-box-shadow:0 2px 5px 0 var(--neutral-light);box-shadow:0 2px 5px 0 var(--neutral-light)}:host button.small.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.5px)}:host button.small.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.5px)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-light);border-color:var(--neutral-base)}:host button.disabled:hover,:host a.disabled:hover{-webkit-box-shadow:none;box-shadow:none}:host button.disabled .label,:host a.disabled .label{color:var(--neutral-dark)}";
4
+ const curaButtonCss = ":host{display:inline-block;vertical-align:middle}:host button,:host a{--shadown-color:38, 38, 38;--shadow-opacity:0.16;outline:none;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;padding:calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 13px);display:-ms-flexbox;display:flex;width:100%;-ms-flex-align:center;align-items:center;border-radius:4px;-webkit-transition:background-color 0.1s linear, border-color 0.1s linear, -webkit-box-shadow 0.1s linear;transition:background-color 0.1s linear, border-color 0.1s linear, -webkit-box-shadow 0.1s linear;transition:background-color 0.1s linear, box-shadow 0.1s linear, border-color 0.1s linear;transition:background-color 0.1s linear, box-shadow 0.1s linear, border-color 0.1s linear, -webkit-box-shadow 0.1s linear;font-size:var(--font-size);cursor:pointer}:host button:hover,:host a:hover{-webkit-box-shadow:0 4px 8px 0 RGBA(var(--shadown-color), var(--shadow-opacity));box-shadow:0 4px 8px 0 RGBA(var(--shadown-color), var(--shadow-opacity))}:host button:active,:host a:active{-webkit-box-shadow:none;box-shadow:none}:host button .label,:host a .label{-ms-flex:1;flex:1;color:var(--neutral-black);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:1.43em;line-height:1.1em}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 3px)}:host button.icon-right,:host a.icon-right{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 3px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium:hover,:host a.medium:hover{-webkit-box-shadow:0 3px 6px 0 RGBA(var(--shadown-color), var(--shadow-opacity));box-shadow:0 3px 6px 0 RGBA(var(--shadown-color), var(--shadow-opacity))}:host button.medium:active,:host a.medium:active{-webkit-box-shadow:none;box-shadow:none}:host button.medium .label,:host a.medium .label{font-size:1.14em;letter-spacing:2%}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 8px)}:host button.small:hover,:host a.small:hover{-webkit-box-shadow:0 2px 5px 0 RGBA(var(--shadown-color), var(--shadow-opacity));box-shadow:0 2px 5px 0 RGBA(var(--shadown-color), var(--shadow-opacity))}:host button.small:active,:host a.small:active{-webkit-box-shadow:none;box-shadow:none}:host button.small.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--base-spacing) * 2.5px)}:host button.small.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--base-spacing) * 2.5px)}:host button.small .label,:host a.small .label{font-size:1em;letter-spacing:2%}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.disabled:hover,:host a.disabled:hover{-webkit-box-shadow:none;box-shadow:none}:host button.button-solid,:host a.button-solid{background-color:var(--color-base);border-width:1px;border-color:var(--color-dark);border-style:solid}:host button.button-solid:hover,:host a.button-solid:hover{background-color:var(--color-light);border-color:var(--color-base)}:host button.button-solid:active,:host a.button-solid:active{background-color:var(--color-dark)}:host button.button-solid .label,:host a.button-solid .label{color:var(--neutral-black)}:host button.button-solid .label.inverted,:host a.button-solid .label.inverted{color:var(--neutral-white)}:host button.button-solid.disabled,:host a.button-solid.disabled{background-color:var(--neutral-light);border-color:var(--neutral-base)}:host button.button-solid.disabled .label,:host button.button-solid.disabled .label.inverted,:host a.button-solid.disabled .label,:host a.button-solid.disabled .label.inverted{color:var(--neutral-dark)}:host button.button-outline,:host a.button-outline{background-color:transparent;border-width:2px;border-color:var(--color-base);border-style:solid}:host button.button-outline:hover,:host a.button-outline:hover{border-color:var(--color-light)}:host button.button-outline:not(.disabled):hover .label,:host a.button-outline:not(.disabled):hover .label{color:var(--color-light)}:host button.button-outline:not(.disabled):hover cura-icon,:host a.button-outline:not(.disabled):hover cura-icon{--color:var(--color-light) !important}:host button.button-outline .label,:host a.button-outline .label{color:var(--color-base)}:host button.button-outline .label.inverted,:host a.button-outline .label.inverted{color:var(--neutral-white)}:host button.button-outline:not(.disabled):not(.inverted):active,:host a.button-outline:not(.disabled):not(.inverted):active{border-color:var(--color-dark)}:host button.button-outline:not(.disabled):not(.inverted):active .label,:host a.button-outline:not(.disabled):not(.inverted):active .label{color:var(--color-dark)}:host button.button-outline:not(.disabled):not(.inverted):active cura-icon,:host a.button-outline:not(.disabled):not(.inverted):active cura-icon{--color:var(--color-dark) !important}:host button.button-outline.inverted,:host a.button-outline.inverted{border-color:var(--neutral-white)}:host button.button-outline.inverted:hover,:host a.button-outline.inverted:hover{border-color:var(--color-light);-webkit-box-shadow:none;box-shadow:none}:host button.button-outline.inverted:not(.disabled):active,:host a.button-outline.inverted:not(.disabled):active{border-color:var(--neutral-white)}:host button.button-outline.inverted:not(.disabled):active .label,:host a.button-outline.inverted:not(.disabled):active .label{color:var(--neutral-white)}:host button.button-outline.inverted:not(.disabled):active cura-icon,:host a.button-outline.inverted:not(.disabled):active cura-icon{--color:var(--neutral-white) !important}:host button.button-outline.disabled,:host a.button-outline.disabled{border-color:var(--neutral-base)}:host button.button-outline.disabled .label,:host button.button-outline.disabled .label.inverted,:host a.button-outline.disabled .label,:host a.button-outline.disabled .label.inverted{color:var(--neutral-dark)}";
5
5
 
6
6
  const CuraButton$1 = /*@__PURE__*/ proxyCustomElement(class CuraButton extends HTMLElement {
7
7
  constructor() {
8
8
  super();
9
9
  this.__registerHost();
10
10
  this.__attachShadow();
11
- this.type = 'primary';
11
+ this.type = 'solid';
12
12
  this.size = 'large';
13
13
  this.disabled = false;
14
14
  this.isLoading = false;
@@ -18,18 +18,23 @@ const CuraButton$1 = /*@__PURE__*/ proxyCustomElement(class CuraButton extends H
18
18
  this.href = undefined;
19
19
  this.target = "_self";
20
20
  this.color = 'accent';
21
+ this.fontColor = 'dark';
21
22
  this.styles = {};
22
23
  }
23
24
  handleChangeColor() {
24
25
  this.setColors();
25
26
  }
26
27
  connectedCallback() {
28
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
27
29
  this.styles['--base-spacing'] = window.CuraAPI.theme.spacing.getSpacing();
28
30
  this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);
29
31
  this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);
30
32
  this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);
31
33
  this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);
32
34
  this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);
35
+ this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();
36
+ this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();
37
+ this.styles['--font-weight-medium'] = this.weights.medium;
33
38
  this.setColors();
34
39
  }
35
40
  getClasses() {
@@ -37,6 +42,7 @@ const CuraButton$1 = /*@__PURE__*/ proxyCustomElement(class CuraButton extends H
37
42
  classes[`button-${this.type.toLowerCase()}`] = true;
38
43
  classes[`${this.size.toLowerCase()}`] = true;
39
44
  classes[`icon-${this.iconPosition.toLowerCase()}`] = true;
45
+ classes['inverted'] = this.fontColor === 'light';
40
46
  classes['disabled'] = this.disabled;
41
47
  return classes;
42
48
  }
@@ -47,11 +53,17 @@ const CuraButton$1 = /*@__PURE__*/ proxyCustomElement(class CuraButton extends H
47
53
  if (!this.iconName)
48
54
  return '';
49
55
  const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;
50
- const color = this.disabled ? 'neutral-dark' : `neutral-black`;
56
+ const color = this.disabled
57
+ ? 'neutral-dark'
58
+ : this.fontColor === 'light'
59
+ ? 'neutral-white'
60
+ : this.type === 'solid'
61
+ ? 'neutral-black'
62
+ : `${this.color}-base`;
51
63
  return h("cura-icon", { name: this.iconName, iconset: this.iconset, size: iconSize, color: color });
52
64
  }
53
65
  render() {
54
- return (h(Host, null, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles }, this.getIcon(), h("span", { class: "label" }, h("slot", null)))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null }, this.getIcon(), h("span", { class: "label" }, h("slot", null))))));
66
+ return (h(Host, null, this.href ? (h("a", { href: this.disabled ? '' : this.href, target: this.target, class: this.getClasses(), style: this.styles }, this.getIcon(), h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, h("slot", null)))) : (h("button", { class: this.getClasses(), style: this.styles, disabled: this.disabled || null }, this.getIcon(), h("span", { class: { label: true, inverted: this.fontColor === 'light' } }, h("slot", null))))));
55
67
  }
56
68
  static get watchers() { return {
57
69
  "color": ["handleChangeColor"]
@@ -68,6 +80,7 @@ const CuraButton$1 = /*@__PURE__*/ proxyCustomElement(class CuraButton extends H
68
80
  "href": [513],
69
81
  "target": [1],
70
82
  "color": [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J,QACE,EAAC,IAAI,QACH,IAAI,CAAC,IAAI,IACT,SAAG,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IACtG,IAAI,CAAC,OAAO,EAAE,EAChB,YAAM,KAAK,EAAC,OAAO,IAAC,eAAa,CAAO,CACtC,KAEJ,cAAQ,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,IACjF,IAAI,CAAC,OAAO,EAAE,EAChB,YAAM,KAAK,EAAC,OAAO,IAAC,eAAa,CAAO,CACjC,CACV,CACM,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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":[":host {\n display: inline-block;\n vertical-align: middle;\n\n button, a {\n outline: none;\n box-shadow: none;\n box-sizing: border-box;\n padding: calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);\n min-height: calc(var(--base-spacing) * 13px);\n display: flex;\n width: 100%;\n align-items: center;\n background-color: var(--color-base);\n border-width: 1px;\n border-color: var(--color-dark);\n border-style: solid;\n border-radius: 4px;\n transition: background-color .12s linear, box-shadow .12s linear, border-color .12s linear;\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-light);\n border-color: var(--color-base);\n box-shadow: 0 4px 8px 0 var(--neutral-light);\n }\n\n .label { \n flex: 1;\n color: var(--neutral-black);\n }\n\n &.icon-left cura-icon {\n margin-right: calc(var(--base-spacing) * 3px);\n }\n\n &.icon-right {\n flex-direction: row-reverse;\n cura-icon {\n margin-left: calc(var(--base-spacing) * 3px);\n }\n }\n\n &.medium {\n padding: calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);\n min-height: calc(var(--base-spacing) * 11px);\n\n &:hover { box-shadow: 0 3px 6px 0 var(--neutral-light); }\n }\n\n &.small {\n padding: calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);\n min-height: calc(var(--base-spacing) * 8px);\n\n &:hover { box-shadow: 0 2px 5px 0 var(--neutral-light); }\n\n &.icon-left cura-icon { margin-right: calc(var(--base-spacing) * 2.5px); }\n\n &.icon-right cura-icon { margin-left: calc(var(--base-spacing) * 2.5px); }\n }\n\n &.disabled {\n cursor: not-allowed;\n background-color: var(--neutral-light);\n border-color: var(--neutral-base);\n \n &:hover { box-shadow: none; }\n\n .label { color: var(--neutral-dark); }\n\n }\n\n }\n}\n","import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-button',\n styleUrl: 'cura-button.scss',\n shadow: true,\n})\nexport class CuraButton {\n\n /**\n * Button type: primary (default) | outline | transparent | icon.\n */\n @Prop({reflect: true}) type = 'primary';\n /**\n * Button size: small | medium | large (default)\n */\n @Prop({reflect: true}) size = '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';\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() target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n\n @State() styles = {};\n\n connectedCallback() {\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-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);\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['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.setColors();\n }\n \n getClasses() {\n const classes = {};\n classes[`button-${this.type.toLowerCase()}`] = true;\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.disabled ? 'neutral-dark' : `neutral-black`;\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href} target={this.target} class={this.getClasses()} style={this.styles}>\n { this.getIcon() }\n <span class=\"label\"><slot></slot></span>\n </a>\n ) : (\n <button class={this.getClasses()} style={this.styles} disabled={this.disabled || null}>\n { this.getIcon() }\n <span class=\"label\"><slot></slot></span>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"],"version":3}
1
+ {"file":"cura-button.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,4nMAA4nM;;MCOroMA,YAAU;;;;;gBAKuD,OAAO;gBAIvB,OAAO;oBAKjC,KAAK;qBAIJ,KAAK;;mBASP,SAAS;wBAIc,MAAM;;kBAS7C,OAAO;iB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K,GAAG,IAAI,CAAC,QAAQ;QACvB,cAAc;QACd,IAAI,CAAC,SAAS,KAAK,OAAO;UACxB,eAAe;UACf,IAAI,CAAC,IAAI,KAAK,OAAO;YACnB,eAAe;YACf,GAAG,IAAI,CAAC,KAAK,OAAO,CAAC;IAC7B,OAAO,iBAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAc,CAAC;GAC1G;EAED,MAAM;IACJ,QACE,EAAC,IAAI,QACH,IAAI,CAAC,IAAI,IACT,SAAG,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,IACtG,IAAI,CAAC,OAAO,EAAE,EAChB,YAAM,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,EAAC,IAAE,eAAa,CAAO,CACpF,KAEJ,cAAQ,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,IACjF,IAAI,CAAC,OAAO,EAAE,EAChB,YAAM,KAAK,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO,EAAC,IAAE,eAAa,CAAO,CAC/E,CACV,CACM,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","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":[":host {\n display: inline-block;\n vertical-align: middle;\n\n button, a {\n --shadown-color: 38, 38, 38;\n --shadow-opacity: 0.16;\n\n outline: none;\n box-shadow: none;\n box-sizing: border-box;\n padding: calc(var(--base-spacing) * 3.5px) calc(var(--base-spacing) * 4px);\n min-height: calc(var(--base-spacing) * 13px);\n display: flex;\n width: 100%;\n align-items: center;\n border-radius: 4px;\n transition: background-color .1s linear, box-shadow .1s linear, border-color .1s linear;\n font-size: var(--font-size);\n cursor: pointer;\n\n &:hover { box-shadow: 0 4px 8px 0 RGBA(var(--shadown-color), var(--shadow-opacity)); }\n &:active { box-shadow: none; }\n\n .label { \n flex: 1;\n color: var(--neutral-black);\n font-family: var(--font-family);\n font-weight: var(--font-weight-medium);\n font-size: 1.43em;\n line-height: 1.1em;\n }\n\n &.icon-left cura-icon {\n margin-right: calc(var(--base-spacing) * 3px);\n }\n\n &.icon-right {\n flex-direction: row-reverse;\n cura-icon {\n margin-left: calc(var(--base-spacing) * 3px);\n }\n }\n\n // Sizes\n \n &.medium {\n padding: calc(var(--base-spacing) * 2.75px) calc(var(--base-spacing) * 4px);\n min-height: calc(var(--base-spacing) * 11px);\n\n &:hover { box-shadow: 0 3px 6px 0 RGBA(var(--shadown-color), var(--shadow-opacity)); }\n &:active { box-shadow: none; }\n\n .label { font-size: 1.14em; letter-spacing: 2%; }\n }\n\n &.small {\n padding: calc(var(--base-spacing) * 1.5px) calc(var(--base-spacing) * 3px);\n min-height: calc(var(--base-spacing) * 8px);\n\n &:hover { box-shadow: 0 2px 5px 0 RGBA(var(--shadown-color), var(--shadow-opacity)); }\n &:active { box-shadow: none; }\n\n &.icon-left cura-icon { margin-right: calc(var(--base-spacing) * 2.5px); }\n\n &.icon-right cura-icon { margin-left: calc(var(--base-spacing) * 2.5px); }\n\n .label { font-size: 1em; letter-spacing: 2%; }\n }\n\n // Disabled general\n\n &.disabled {\n cursor: not-allowed;\n &:hover { box-shadow: none; }\n }\n\n // Types\n\n &.button-solid {\n background-color: var(--color-base);\n border-width: 1px;\n border-color: var(--color-dark);\n border-style: solid;\n\n &:hover {\n background-color: var(--color-light);\n border-color: var(--color-base);\n }\n\n &:active { background-color: var(--color-dark); }\n\n .label { \n color: var(--neutral-black);\n &.inverted { color: var(--neutral-white); }\n }\n\n &.disabled {\n background-color: var(--neutral-light);\n border-color: var(--neutral-base);\n \n .label, .label.inverted { color: var(--neutral-dark); }\n }\n }\n\n &.button-outline {\n background-color: transparent;\n border-width: 2px;\n border-color: var(--color-base);\n border-style: solid;\n\n &:hover { border-color: var(--color-light); }\n\n &:not(.disabled):hover {\n .label { color: var(--color-light); }\n cura-icon { --color: var(--color-light) !important; }\n }\n\n .label { \n color: var(--color-base);\n &.inverted { color: var(--neutral-white); }\n }\n\n &:not(.disabled):not(.inverted):active { \n border-color: var(--color-dark);\n .label { color: var(--color-dark); }\n cura-icon { --color: var(--color-dark) !important; }\n }\n\n &.inverted {\n border-color: var(--neutral-white);\n &:hover { border-color: var(--color-light); box-shadow: none; }\n &:not(.disabled):active {\n border-color: var(--neutral-white);\n .label { color: var(--neutral-white); }\n cura-icon { --color: var(--neutral-white) !important; }\n }\n }\n\n &.disabled {\n border-color: var(--neutral-base);\n .label, .label.inverted { color: var(--neutral-dark); }\n }\n }\n\n }\n}\n","import { Component, Host, h, Prop, Watch, State } from '@stencil/core';\n\n@Component({\n tag: 'cura-button',\n styleUrl: 'cura-button.scss',\n shadow: true,\n})\nexport class CuraButton {\n\n /**\n * Button type: solid (default) | outline | transparent | icon.\n */\n @Prop({reflect: true}) type: 'solid' | 'outline' | 'transparent' | 'icon' = 'solid';\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 /**\n * Property href switch button to link.\n */\n @Prop({reflect: true}) href: string;\n /**\n * Set target if link.\n */\n @Prop() target = \"_self\";\n\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n @Watch('color')\n handleChangeColor() {\n this.setColors();\n }\n /**\n * Set the font color to dark or light.\n */\n @Prop() fontColor: 'dark' | 'light' = 'dark';\n\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-light'] = window.CuraAPI.theme.colors.getColor(`neutral-light`);\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['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\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 getClasses() {\n const classes = {};\n classes[`button-${this.type.toLowerCase()}`] = true;\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['inverted'] = this.fontColor === 'light';\n classes['disabled'] = this.disabled;\n return classes;\n }\n\n setColors() {\n this.styles = {\n ...this.styles,\n '--color-light': window.CuraAPI.theme.colors.getColor(`${this.color}-light`),\n '--color-base': window.CuraAPI.theme.colors.getColor(`${this.color}-base`),\n '--color-dark': window.CuraAPI.theme.colors.getColor(`${this.color}-dark`)\n };\n }\n\n getIcon() {\n if (!this.iconName) return '';\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const color = this.disabled \n ? 'neutral-dark' \n : this.fontColor === 'light' \n ? 'neutral-white' \n : this.type === 'solid'\n ? 'neutral-black'\n : `${this.color}-base`;\n return <cura-icon name={this.iconName} iconset={this.iconset} size={iconSize} color={color}></cura-icon>;\n }\n\n render() {\n return (\n <Host>\n { this.href ? (\n <a href={this.disabled ? '' : this.href} target={this.target} class={this.getClasses()} style={this.styles}>\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </a>\n ) : (\n <button class={this.getClasses()} style={this.styles} disabled={this.disabled || null}>\n { this.getIcon() }\n <span class={{label: true, inverted: this.fontColor === 'light'}}><slot></slot></span>\n </button>\n )}\n </Host>\n );\n }\n\n}\n"],"version":3}
@@ -1,2 +1,2 @@
1
- import{p as o,w as e,a as t,b as i}from"./p-d5990392.js";export{s as setNonce}from"./p-d5990392.js";import{g as a}from"./p-bac0b4ab.js";const r=()=>{{o.o=e.__cssshim}const s=import.meta.url;const i={};if(s!==""){i.resourcesUrl=new URL(".",s).href}return t(i)};r().then((o=>{a();return i([["p-731abb13",[[1,"cura-button",{type:[513],size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],href:[513],target:[1],color:[1],styles:[32]}],[1,"cura-display",{level:[514],size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-heading",{level:[514],size:[513],weight:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-page-template",{contentwidth:[513]}],[1,"cura-paragraph",{size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]],["p-4c60d085",[[1,"cura-icons-view",{selected:[32]}]]]],o)}));
1
+ import{p as o,w as e,a as t,b as a}from"./p-cbc91ac5.js";export{s as setNonce}from"./p-cbc91ac5.js";import{g as i}from"./p-bac0b4ab.js";const r=()=>{{o.o=e.__cssshim}const s=import.meta.url;const a={};if(s!==""){a.resourcesUrl=new URL(".",s).href}return t(a)};r().then((o=>{i();return a([["p-e7785610",[[1,"cura-button",{type:[513],size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],href:[513],target:[1],color:[1],fontColor:[1,"font-color"],styles:[32]}],[1,"cura-display",{level:[514],size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-heading",{level:[514],size:[513],weight:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-page-template",{contentwidth:[513]}],[1,"cura-paragraph",{size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]],["p-e32ae366",[[1,"cura-icons-view",{selected:[32]}]]]],o)}));
2
2
  //# sourceMappingURL=cura.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","plt","$cssShim$","win","__cssshim","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","type","size","disabled","isLoading","iconName","iconset","iconPosition","target","color","styles","level","inverted","spotColor","weight","contentwidth","name","selected"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"wIAmBA,MAAMA,EAAe,KAMK,CAGlBC,EAAIC,EAAYC,EAAIC,SAC5B,CAwBI,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BP,IAAeY,MAAKC,IAClBC,IACA,OAAOC,EAAc,iCAA8B,CAAAC,KAAS,MAAAC,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAZ,KAAA,MAAAa,OAAA,IAAAC,MAAA,IAAAC,OAAA,0BAAAC,MAAA,MAAAT,KAAA,MAAAU,SAAA,MAAAC,UAAA,wCAAAF,MAAA,MAAAT,KAAA,MAAAY,OAAA,MAAAF,SAAA,MAAAC,UAAA,8CAAAE,aAAA,6BAAAb,KAAA,MAAAU,SAAA,MAAAC,UAAA,qCAAAG,KAAA,MAAAP,MAAA,IAAAP,KAAA,IAAAI,QAAA,MAAAH,SAAA,6CAAAc,SAAA,UAAAnB,EAAA"}
1
+ {"version":3,"names":["patchBrowser","plt","$cssShim$","win","__cssshim","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","type","size","disabled","isLoading","iconName","iconset","iconPosition","target","color","fontColor","styles","level","inverted","spotColor","weight","contentwidth","name","selected"],"sources":["./node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"wIAmBA,MAAMA,EAAe,KAMK,CAGlBC,EAAIC,EAAYC,EAAIC,SAC5B,CAwBI,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAiB3E,GAAuBF,IAAe,GAAI,CACtCE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IAGrD,CAcI,OAAOC,EAAeJ,EAAK,ECrF/BP,IAAeY,MAAKC,IAClBC,IACA,OAAOC,EAAc,iCAA8B,CAAAC,KAAS,MAAAC,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAZ,KAAA,MAAAa,OAAA,IAAAC,MAAA,IAAAC,UAAA,iBAAAC,OAAA,0BAAAC,MAAA,MAAAV,KAAA,MAAAW,SAAA,MAAAC,UAAA,wCAAAF,MAAA,MAAAV,KAAA,MAAAa,OAAA,MAAAF,SAAA,MAAAC,UAAA,8CAAAE,aAAA,6BAAAd,KAAA,MAAAW,SAAA,MAAAC,UAAA,qCAAAG,KAAA,MAAAR,MAAA,IAAAP,KAAA,IAAAI,QAAA,MAAAH,SAAA,6CAAAe,SAAA,UAAApB,EAAA"}
package/dist/cura/cura.js CHANGED
@@ -117,7 +117,7 @@ var __assign=this&&this.__assign||function(){return __assign=Object.assign||func
117
117
  var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
118
118
  var start = function() {
119
119
  // if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
120
- var url = new URL('./p-61953b75.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
120
+ var url = new URL('./p-36c8b693.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
121
121
  System.import(url.href);
122
122
  };
123
123
 
@@ -0,0 +1,2 @@
1
+ System.register(["./p-a84ae34f.system.js","./p-4fc49972.system.js"],(function(e,o){"use strict";var t,s,r,i,n;return{setters:[function(o){t=o.p;s=o.w;r=o.a;i=o.b;e("setNonce",o.s)},function(e){n=e.g}],execute:function(){var e=function(){{t.$cssShim$=s.__cssshim}var e=o.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return r(i)};e().then((function(e){n();return i([["p-e5fd4452.system",[[1,"cura-button",{type:[513],size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],href:[513],target:[1],color:[1],fontColor:[1,"font-color"],styles:[32]}],[1,"cura-display",{level:[514],size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-heading",{level:[514],size:[513],weight:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-page-template",{contentwidth:[513]}],[1,"cura-paragraph",{size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]],["p-825028d1.system",[[1,"cura-icons-view",{selected:[32]}]]]],e)}))}}}));
2
+ //# sourceMappingURL=p-36c8b693.system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["patchBrowser","plt","$cssShim$","win","__cssshim","importMeta","module","meta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","globalScripts","bootstrapLazy","type","size","disabled","isLoading","iconName","iconset","iconPosition","target","color","fontColor","styles","level","inverted","spotColor","weight","contentwidth","name","selected"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"4NAmBA,IAAMA,EAAe,WAMK,CAGlBC,EAAIC,UAAYC,EAAIC,S,CAyBxB,IAAMC,EAAaC,EAAAC,KAAAC,IACnB,IAAMC,EAAqE,GAiB3E,GAAuBJ,IAAe,GAAI,CACtCI,EAAKC,aAAe,IAAIC,IAAI,IAAKN,GAAYO,I,CAiBjD,OAAOC,EAAeJ,EAC1B,ECtFAT,IAAec,MAAK,SAAAC,GAClBC,IACA,OAAOC,EAAc,wCAAuC,CAAAC,KAAA,MAAAC,KAAA,MAAAC,SAAA,MAAAC,UAAA,mBAAAC,SAAA,kBAAAC,QAAA,MAAAC,aAAA,sBAAAZ,KAAA,MAAAa,OAAA,IAAAC,MAAA,IAAAC,UAAA,iBAAAC,OAAA,0BAAAC,MAAA,MAAAV,KAAA,MAAAW,SAAA,MAAAC,UAAA,wCAAAF,MAAA,MAAAV,KAAA,MAAAa,OAAA,MAAAF,SAAA,MAAAC,UAAA,8CAAAE,aAAA,6BAAAd,KAAA,MAAAW,SAAA,MAAAC,UAAA,qCAAAG,KAAA,MAAAR,MAAA,IAAAP,KAAA,IAAAI,QAAA,MAAAH,SAAA,oDAAAe,SAAA,UAAApB,EAC9D,G"}
@@ -1,2 +1,2 @@
1
- System.register(["./p-c30e14d5.system.js"],(function(e){"use strict";var i,n,a;return{setters:[function(e){i=e.r;n=e.h;a=e.H}],execute:function(){var l=["360","accessibility","alertCircle","alertTriangle","arrowDown","arrowDownCircle","arrowLeft","arrowLeftCircle","arrowRight","arrowRightCircle","arrowUp","arrowUpCircle","attach","avatarF","avatarM","biometry","bloodGroup","calendar","cam","camOff","central","chatCircle","check","checkBadge","checkCircle","checkDouble","clock","close","closeCircle","collapse","config","delete","desktop","deslike","download","duplicate","edit","exam","expand","facebook","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","google","hate","healthPlan","height","height2","home","horizontalList","imageUp","info2","infoCircle","instagram","key","language","language2","languageEN","languagePT","lattes","like","likeHand","link","linkExternal","linkedin","list","login","logout","love","mail","mail2","medical","menuHamburguer","menuKebab","menuMeatballs","mic","micOff","minus","minusCircle","minusSquare","mobile","neutral","news","notification","order","partner","phone","play","plus","plusCircle","plusSquare","print","profile","profile2","pulldownG","pulldownP","pullupG","pullupP","questionCircle","questionSquare","range","reload","schedule","search","secure","share","share2","sound","soundOff","subItem","target","team","twitter","unLink","unSecure","unlikeHand","upload","verticalList","viewFalse","viewTrue","weight","whatsapp","wifi","youtube","zoomIn","zoomOut"];var s=':host{display:block;padding:24px;font-family:"Roboto", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#262626;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.icons .icon span{font-size:12px;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#000;color:#FFF;border-radius:2px;position:absolute;top:-2px;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);display:none}.icons .icon:hover{opacity:1}.icons .icon:hover span{display:block}';var r=e("cura_icons_view",function(){function e(e){var n=this;i(this,e);this.sizes=[16,20,24,32,40,48,64,72,128];this.colors=["primary","secondary","accent","info","warning","error","success","neutral"];this.setSelected=function(e){n.selected=e};this.selected="360"}e.prototype.render=function(){var e=this;return n(a,null,n("div",{class:"iconDetail"},n("h4",null,this.selected),n("div",{class:"iconSizes"},this.sizes.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,size:i}),n("span",null,i))}))),n("div",{class:"iconSizes invert"},this.sizes.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,size:i,color:"neutral-white"}),n("span",null,i))}))),n("div",{class:"iconSizes"},this.colors.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,color:i}),n("span",null,i))})),n("div",{class:"size"},n("cura-icon",{name:this.selected,disabled:true}),n("span",null,"Disabled")))),n("div",{class:"icons"},l.map((function(i){return n("div",{class:"icon",onClick:function(){return e.setSelected(i)}},n("cura-icon",{name:i}),n("span",null,i))}))))};return e}());r.style=s}}}));
2
- //# sourceMappingURL=p-958c8695.system.entry.js.map
1
+ System.register(["./p-a84ae34f.system.js"],(function(e){"use strict";var i,n,a;return{setters:[function(e){i=e.r;n=e.h;a=e.H}],execute:function(){var l=["360","accessibility","alertCircle","alertTriangle","arrowDown","arrowDownCircle","arrowLeft","arrowLeftCircle","arrowRight","arrowRightCircle","arrowUp","arrowUpCircle","attach","avatarF","avatarM","biometry","bloodGroup","calendar","cam","camOff","central","chatCircle","check","checkBadge","checkCircle","checkDouble","clock","close","closeCircle","collapse","config","delete","desktop","deslike","download","duplicate","edit","exam","expand","facebook","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","google","hate","healthPlan","height","height2","home","horizontalList","imageUp","info2","infoCircle","instagram","key","language","language2","languageEN","languagePT","lattes","like","likeHand","link","linkExternal","linkedin","list","login","logout","love","mail","mail2","medical","menuHamburguer","menuKebab","menuMeatballs","mic","micOff","minus","minusCircle","minusSquare","mobile","neutral","news","notification","order","partner","phone","play","plus","plusCircle","plusSquare","print","profile","profile2","pulldownG","pulldownP","pullupG","pullupP","questionCircle","questionSquare","range","reload","schedule","search","secure","share","share2","sound","soundOff","subItem","target","team","twitter","unLink","unSecure","unlikeHand","upload","verticalList","viewFalse","viewTrue","weight","whatsapp","wifi","youtube","zoomIn","zoomOut"];var s=':host{display:block;padding:24px;font-family:"Roboto", Arial, Helvetica, sans-serif}.iconDetail{display:block}.iconSizes{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.iconSizes .size{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;text-align:center;margin-right:9px;padding:8px}.iconSizes .size:last-child{margin-right:0}.iconSizes .size span{font-size:10px}.iconSizes.invert{margin-top:12px}.iconSizes.invert .size{background-color:#262626;color:#F6F6F6;border-radius:3px}.icons{margin-top:28px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.icons .icon{position:relative;padding:4px;cursor:pointer;opacity:0.6;-webkit-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.icons .icon span{font-size:12px;padding:6px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#000;color:#FFF;border-radius:2px;position:absolute;top:-2px;left:50%;-webkit-transform:translateX(-50%) translateY(-100%);transform:translateX(-50%) translateY(-100%);display:none}.icons .icon:hover{opacity:1}.icons .icon:hover span{display:block}';var r=e("cura_icons_view",function(){function e(e){var n=this;i(this,e);this.sizes=[16,20,24,32,40,48,64,72,128];this.colors=["primary","secondary","accent","info","warning","error","success","neutral"];this.setSelected=function(e){n.selected=e};this.selected="360"}e.prototype.render=function(){var e=this;return n(a,null,n("div",{class:"iconDetail"},n("h4",null,this.selected),n("div",{class:"iconSizes"},this.sizes.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,size:i}),n("span",null,i))}))),n("div",{class:"iconSizes invert"},this.sizes.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,size:i,color:"neutral-white"}),n("span",null,i))}))),n("div",{class:"iconSizes"},this.colors.map((function(i){return n("div",{class:"size"},n("cura-icon",{name:e.selected,color:i}),n("span",null,i))})),n("div",{class:"size"},n("cura-icon",{name:this.selected,disabled:true}),n("span",null,"Disabled")))),n("div",{class:"icons"},l.map((function(i){return n("div",{class:"icon",onClick:function(){return e.setSelected(i)}},n("cura-icon",{name:i}),n("span",null,i))}))))};return e}());r.style=s}}}));
2
+ //# sourceMappingURL=p-825028d1.system.entry.js.map