@rededor/cura 0.2.1 → 0.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 (96) hide show
  1. package/dist/cjs/app-globals-5f5b9fbf.js +398 -0
  2. package/dist/cjs/cura-display_3.cjs.entry.js +187 -0
  3. package/dist/cjs/cura-icon.cjs.entry.js +59 -0
  4. package/dist/cjs/{cura-icon_2.cjs.entry.js → cura-icons-view.cjs.entry.js} +2 -56
  5. package/dist/cjs/cura.cjs.js +3 -3
  6. package/dist/cjs/{index-9092c64d.js → index-8686299e.js} +29 -0
  7. package/dist/cjs/loader.cjs.js +3 -3
  8. package/dist/collection/api/cura-api.js +10 -1
  9. package/dist/collection/api/modules/cura-theme-colors-module.js +69 -0
  10. package/dist/collection/api/modules/cura-theme-fonts-module.js +35 -0
  11. package/dist/collection/api/modules/cura-theme-module.js +4 -0
  12. package/dist/collection/api/theme-presets/static.js +103 -0
  13. package/dist/collection/api/theme-presets/theme-default.js +28 -22
  14. package/dist/collection/api/theme-presets/theme-maternity.js +10 -12
  15. package/dist/collection/collection-manifest.json +3 -1
  16. package/dist/collection/components/cura-icon/cura-icon.css +1 -43
  17. package/dist/collection/components/cura-icon/cura-icon.js +15 -12
  18. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  19. package/dist/collection/components/text/cura-display/cura-display.css +61 -0
  20. package/dist/collection/components/text/cura-display/cura-display.js +110 -0
  21. package/dist/collection/components/text/cura-heading/cura-heading.css +69 -0
  22. package/dist/collection/components/text/cura-heading/cura-heading.js +136 -0
  23. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +81 -0
  24. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +76 -0
  25. package/dist/components/{dummy-component.d.ts → cura-display.d.ts} +4 -4
  26. package/dist/components/cura-display.js +86 -0
  27. package/dist/components/cura-heading.d.ts +11 -0
  28. package/dist/components/cura-heading.js +95 -0
  29. package/dist/components/cura-icon2.js +12 -13
  30. package/dist/components/cura-icons-view.js +1 -1
  31. package/dist/components/cura-paragraph.d.ts +11 -0
  32. package/dist/components/cura-paragraph.js +69 -0
  33. package/dist/components/index.d.ts +3 -1
  34. package/dist/components/index.js +261 -36
  35. package/dist/cura/cura.esm.js +1 -1
  36. package/dist/cura/cura.js +1 -1
  37. package/dist/cura/p-22290742.entry.js +1 -0
  38. package/dist/cura/p-265c1706.js +1 -0
  39. package/dist/cura/p-3d8bbf37.system.js +1 -0
  40. package/dist/cura/p-5ae0d10c.system.entry.js +1 -0
  41. package/dist/cura/p-80dc1c9f.entry.js +1 -0
  42. package/dist/cura/p-9312a846.system.entry.js +1 -0
  43. package/dist/cura/p-a50716bc.js +2 -0
  44. package/dist/cura/p-a8dcaaed.system.js +1 -0
  45. package/dist/cura/p-d29b9e16.entry.js +1 -0
  46. package/dist/cura/p-e447016d.system.js +2 -0
  47. package/dist/cura/p-e8fadcfa.system.entry.js +1 -0
  48. package/dist/esm/app-globals-d7dd3a4d.js +396 -0
  49. package/dist/esm/cura-display_3.entry.js +181 -0
  50. package/dist/esm/cura-icon.entry.js +55 -0
  51. package/dist/esm/{cura-icon_2.entry.js → cura-icons-view.entry.js} +3 -56
  52. package/dist/esm/cura.js +3 -3
  53. package/dist/esm/{index-cec9b650.js → index-c3d31886.js} +29 -0
  54. package/dist/esm/loader.js +3 -3
  55. package/dist/esm-es5/app-globals-d7dd3a4d.js +1 -0
  56. package/dist/esm-es5/cura-display_3.entry.js +1 -0
  57. package/dist/esm-es5/cura-icon.entry.js +1 -0
  58. package/dist/esm-es5/cura-icons-view.entry.js +1 -0
  59. package/dist/esm-es5/cura.js +1 -1
  60. package/dist/esm-es5/index-c3d31886.js +2 -0
  61. package/dist/esm-es5/loader.js +1 -1
  62. package/dist/types/api/cura-api.type.d.ts +9 -0
  63. package/dist/types/api/modules/cura-theme-colors-module.d.ts +48 -0
  64. package/dist/types/api/modules/cura-theme-fonts-module.d.ts +24 -0
  65. package/dist/types/api/modules/cura-theme-module.d.ts +4 -0
  66. package/dist/types/api/theme-presets/static.d.ts +78 -0
  67. package/dist/types/api/theme-presets/theme-default.d.ts +28 -22
  68. package/dist/types/api/theme-presets/theme-maternity.d.ts +23 -19
  69. package/dist/types/api/theme-presets/theme-presets.d.ts +51 -41
  70. package/dist/types/components/cura-icon/cura-icon.d.ts +1 -1
  71. package/dist/types/components/text/cura-display/cura-display.d.ts +28 -0
  72. package/dist/types/components/text/cura-heading/cura-heading.d.ts +33 -0
  73. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +22 -0
  74. package/dist/types/components.d.ts +83 -9
  75. package/package.json +2 -2
  76. package/dist/cjs/app-globals-af978331.js +0 -175
  77. package/dist/cjs/dummy-component.cjs.entry.js +0 -19
  78. package/dist/collection/components/dummy-component/dummy-component.css +0 -3
  79. package/dist/collection/components/dummy-component/dummy-component.js +0 -18
  80. package/dist/components/dummy-component.js +0 -33
  81. package/dist/cura/p-18f978f3.system.entry.js +0 -1
  82. package/dist/cura/p-3132f4b7.system.js +0 -2
  83. package/dist/cura/p-5f113376.entry.js +0 -1
  84. package/dist/cura/p-70abb532.system.js +0 -1
  85. package/dist/cura/p-a0cd4b75.system.js +0 -1
  86. package/dist/cura/p-abcda1d1.js +0 -2
  87. package/dist/cura/p-ac79f9d1.entry.js +0 -1
  88. package/dist/cura/p-b4c69836.system.entry.js +0 -1
  89. package/dist/cura/p-d2dcd470.js +0 -1
  90. package/dist/esm/app-globals-962e5cc3.js +0 -173
  91. package/dist/esm/dummy-component.entry.js +0 -15
  92. package/dist/esm-es5/app-globals-962e5cc3.js +0 -1
  93. package/dist/esm-es5/cura-icon_2.entry.js +0 -1
  94. package/dist/esm-es5/dummy-component.entry.js +0 -1
  95. package/dist/esm-es5/index-cec9b650.js +0 -2
  96. package/dist/types/components/dummy-component/dummy-component.d.ts +0 -3
@@ -0,0 +1,181 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-c3d31886.js';
2
+
3
+ const curaDisplayCss = ":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:6.21em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3em;font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.92em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:7.07em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.428em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:6.14em;line-height:125%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:8.857em;letter-spacing:-6%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:4.285em;letter-spacing:-2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
4
+
5
+ const CuraDisplay = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ /**
9
+ * Heading level for semantics.
10
+ * Values: 1(default)-6.
11
+ */
12
+ this.level = 1;
13
+ /**
14
+ * Heading style size.
15
+ * Values: small | regular(default) | large.
16
+ */
17
+ this.size = 'regular';
18
+ }
19
+ connectedCallback() {
20
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
21
+ this.setFontProperties();
22
+ this.setColors();
23
+ }
24
+ getClasses() {
25
+ const classes = {};
26
+ classes[this.size.toLowerCase()] = true;
27
+ return classes;
28
+ }
29
+ setFontProperties() {
30
+ this.styles = {
31
+ '--font-family': window.CuraAPI.theme.fonts.getFamily('display'),
32
+ '--font-size': window.CuraAPI.theme.fonts.getSize(),
33
+ '--font-weight-bold': this.weights.bold,
34
+ '--font-weight-black': this.weights.black
35
+ };
36
+ this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
37
+ }
38
+ setColors() {
39
+ const fontColor = window.CuraAPI.theme.fonts.getColor();
40
+ this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
41
+ this.styles['--color-link'] = window.CuraAPI.theme.colors.getColor('primary-700');
42
+ }
43
+ setHostProperty(prop, value) {
44
+ this.host.style.setProperty(prop, value);
45
+ }
46
+ getHeadingTag() {
47
+ const tags = {
48
+ '1': h("h1", { style: this.styles, class: this.getClasses() }, h("slot", null)),
49
+ '2': h("h2", { style: this.styles, class: this.getClasses() }, h("slot", null)),
50
+ '3': h("h3", { style: this.styles, class: this.getClasses() }, h("slot", null)),
51
+ '4': h("h4", { style: this.styles, class: this.getClasses() }, h("slot", null)),
52
+ '5': h("h5", { style: this.styles, class: this.getClasses() }, h("slot", null)),
53
+ '6': h("h6", { style: this.styles, class: this.getClasses() }, h("slot", null)),
54
+ 'default': h("h1", { style: this.styles, class: this.getClasses() }, h("slot", null))
55
+ };
56
+ return tags[`${this.level}`] || tags['default'];
57
+ }
58
+ render() {
59
+ return (h(Host, null, this.getHeadingTag()));
60
+ }
61
+ get host() { return getElement(this); }
62
+ };
63
+ CuraDisplay.style = curaDisplayCss;
64
+
65
+ const curaHeadingCss = ":host{display:block;font-size:var(--font-size)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.71em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:130%;letter-spacing:0%}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.07em;letter-spacing:-2%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:150%;letter-spacing:0%}:host h1.small.bold-weight,:host h2.small.bold-weight,:host h3.small.bold-weight,:host h4.small.bold-weight,:host h5.small.bold-weight,:host h6.small.bold-weight{font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:135%;letter-spacing:-2%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.92em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.71em;line-height:160%;letter-spacing:0%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
66
+
67
+ const CuraHeading = class {
68
+ constructor(hostRef) {
69
+ registerInstance(this, hostRef);
70
+ /**
71
+ * Heading level for semantics.
72
+ * Values: 1(default)-6.
73
+ */
74
+ this.level = 1;
75
+ /**
76
+ * Heading style size.
77
+ * Values: small | regular(default) | large.
78
+ */
79
+ this.size = 'regular';
80
+ /**
81
+ * Heading font weight.
82
+ * Values: regular(default) | bold.
83
+ */
84
+ this.weight = 'regular';
85
+ }
86
+ connectedCallback() {
87
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
88
+ this.setFontProperties();
89
+ this.setColors();
90
+ }
91
+ getClasses() {
92
+ const classes = {};
93
+ classes[this.size.toLowerCase()] = true;
94
+ classes[`${this.weight.toLowerCase()}-weight`] = true;
95
+ return classes;
96
+ }
97
+ setFontProperties() {
98
+ this.styles = {
99
+ '--font-family': window.CuraAPI.theme.fonts.getFamily('heading'),
100
+ '--font-size': window.CuraAPI.theme.fonts.getSize(),
101
+ '--font-weight-regular': this.weights.regular,
102
+ '--font-weight-medium': this.weights.medium,
103
+ '--font-weight-bold': this.weights.bold,
104
+ '--font-weight-black': this.weights.black
105
+ };
106
+ this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
107
+ }
108
+ setColors() {
109
+ const fontColor = window.CuraAPI.theme.fonts.getColor();
110
+ this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor('neutral-darker');
111
+ this.styles['--color-link'] = window.CuraAPI.theme.colors.getColor('primary-700');
112
+ }
113
+ setHostProperty(prop, value) {
114
+ this.host.style.setProperty(prop, value);
115
+ }
116
+ getHeadingTag() {
117
+ const tags = {
118
+ '1': h("h1", { style: this.styles, class: this.getClasses() }, h("slot", null)),
119
+ '2': h("h2", { style: this.styles, class: this.getClasses() }, h("slot", null)),
120
+ '3': h("h3", { style: this.styles, class: this.getClasses() }, h("slot", null)),
121
+ '4': h("h4", { style: this.styles, class: this.getClasses() }, h("slot", null)),
122
+ '5': h("h5", { style: this.styles, class: this.getClasses() }, h("slot", null)),
123
+ '6': h("h6", { style: this.styles, class: this.getClasses() }, h("slot", null)),
124
+ 'default': h("h1", { style: this.styles, class: this.getClasses() }, h("slot", null))
125
+ };
126
+ return tags[`${this.level}`] || tags['default'];
127
+ }
128
+ render() {
129
+ return (h(Host, null, this.getHeadingTag()));
130
+ }
131
+ get host() { return getElement(this); }
132
+ };
133
+ CuraHeading.style = curaHeadingCss;
134
+
135
+ const curaParagraphCss = ":host{display:block;font-size:var(--font-size)}:host p{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight-regular);color:var(--color-body);line-height:140%;letter-spacing:2%}:host p.large{font-size:1.21em;line-height:150%;letter-spacing:0%}:host p.small{font-size:0.85em;line-height:135%;letter-spacing:4%}:host p.caption{font-size:0.71em;line-height:135%;letter-spacing:6%}@media screen and (min-width: 768px) and (max-width: 1366px){:host p{font-size:1.14em;line-height:145%}:host p.large{font-size:1.35em;line-height:150%}:host p.small{font-size:1em;line-height:135%}:host p.caption{font-size:0.85em;line-height:135%;letter-spacing:6%}}@media screen and (min-width: 1367px){:host p{font-size:1.42em;line-height:150%;letter-spacing:0%}:host p.large{font-size:1.71em;line-height:160%}:host p.small{font-size:1.21em;line-height:145%;letter-spacing:0%}:host p.caption{font-size:1em;line-height:145%;letter-spacing:2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-medium);color:var(--color-link);text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";
136
+
137
+ const CuraParagraph = class {
138
+ constructor(hostRef) {
139
+ registerInstance(this, hostRef);
140
+ /**
141
+ * Set size of body text.
142
+ * Values: regular (default) | large | small | caption.
143
+ */
144
+ this.size = 'regular';
145
+ }
146
+ connectedCallback() {
147
+ this.weights = window.CuraAPI.theme.fonts.getWeights();
148
+ this.setFontProperties();
149
+ this.setColors();
150
+ }
151
+ setsizeClass() {
152
+ const sizeclass = {};
153
+ sizeclass[this.size.toLowerCase()] = true;
154
+ return sizeclass;
155
+ }
156
+ setFontProperties() {
157
+ this.styles = {
158
+ '--font-family': window.CuraAPI.theme.fonts.getFamily('body'),
159
+ '--font-size': window.CuraAPI.theme.fonts.getSize(),
160
+ '--font-weight-regular': this.weights.regular,
161
+ '--font-weight-medium': this.weights.medium,
162
+ '--font-weight-bold': this.weights.bold
163
+ };
164
+ this.setHostProperty('--font-size', window.CuraAPI.theme.fonts.getSize());
165
+ }
166
+ setColors() {
167
+ const fontColor = window.CuraAPI.theme.fonts.getColor();
168
+ this.styles['--color-body'] = fontColor || window.CuraAPI.theme.colors.getColor(`neutral-darker`);
169
+ this.styles['--color-link'] = window.CuraAPI.theme.colors.getColor('primary-700');
170
+ }
171
+ setHostProperty(prop, value) {
172
+ this.host.style.setProperty(prop, value);
173
+ }
174
+ render() {
175
+ return (h(Host, null, h("p", { style: this.styles, class: this.setsizeClass() }, h("slot", null))));
176
+ }
177
+ get host() { return getElement(this); }
178
+ };
179
+ CuraParagraph.style = curaParagraphCss;
180
+
181
+ export { CuraDisplay as cura_display, CuraHeading as cura_heading, CuraParagraph as cura_paragraph };
@@ -0,0 +1,55 @@
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-c3d31886.js';
2
+
3
+ const curaIconCss = ":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";
4
+
5
+ const CuraIcon = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.name = '';
9
+ this.color = 'neutral-base';
10
+ this.iconset = 'default';
11
+ this.disabled = false;
12
+ this.sizes = {
13
+ "128": { size: 128, stroke: 5.25 },
14
+ "72": { size: 72, stroke: 3.5 },
15
+ "64": { size: 64, stroke: 3.25 },
16
+ "48": { size: 48, stroke: 2.75 },
17
+ "40": { size: 40, stroke: 2.5 },
18
+ "32": { size: 32, stroke: 2.25 },
19
+ "24": { size: 24, stroke: 2 },
20
+ "20": { size: 20, stroke: 1.75 },
21
+ "16": { size: 16, stroke: 1.5 },
22
+ "default": { size: 24, stroke: 2 }
23
+ };
24
+ }
25
+ sizeHandler(size) {
26
+ const scaledStroke = (iconSize) => {
27
+ return `${this.sizes[iconSize].stroke * (this.sizes.default.size / this.sizes[iconSize].size)}px`;
28
+ };
29
+ this.setHostProperty('--size', this.sizes[`${size}`] ? `${this.sizes[size].size}px` : `${this.sizes.default.size}px`);
30
+ this.setHostProperty('--stroke', this.sizes[`${size}`] ? scaledStroke(size) : scaledStroke("default"));
31
+ }
32
+ colorHandler() {
33
+ this.setHostProperty('--color', window.CuraAPI.theme.colors.getColor(this.disabled ? 'neutral-light' : this.color));
34
+ }
35
+ connectedCallback() {
36
+ this.assetsPath = window.CuraAPI.localAssetsPath;
37
+ this.sizeHandler(this.size);
38
+ this.colorHandler();
39
+ }
40
+ setHostProperty(prop, value) {
41
+ this.host.style.setProperty(prop, value);
42
+ }
43
+ render() {
44
+ return (h(Host, null, h("svg", { version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, h("use", { xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
45
+ }
46
+ get host() { return getElement(this); }
47
+ static get watchers() { return {
48
+ "size": ["sizeHandler"],
49
+ "color": ["colorHandler"],
50
+ "disabled": ["colorHandler"]
51
+ }; }
52
+ };
53
+ CuraIcon.style = curaIconCss;
54
+
55
+ export { CuraIcon as cura_icon };
@@ -1,57 +1,4 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-cec9b650.js';
2
-
3
- const curaIconCss = ":host{--stroke-color:#B7B7B7}:host svg.icon-neutral{--stroke-color:#B7B7B7}:host svg.icon-primary{--stroke-color:var(--cura-color-primary-base, #004186)}:host svg.icon-secondary{--stroke-color:var(--cura-color-secondary-base, #AA8E0B)}:host svg.icon-accent{--stroke-color:var(--cura-color-accent-base, #DF8D2C)}:host svg.icon-success{--stroke-color:#5FD290}:host svg.icon-info{--stroke-color:#6EA8FF}:host svg.icon-error{--stroke-color:#EB5757}:host svg.icon-warning{--stroke-color:#FFCF3C}:host svg.icon-white{--stroke-color:#F6F6F6}:host svg.icon-black{--stroke-color:#262626}:host svg.icon-disabled{--stroke-color:#D4D4D4}:host{width:var(--size);height:var(--size);display:inline-block}:host svg{display:inline-block;stroke:var(--stroke-color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";
4
-
5
- const CuraIcon = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.name = '';
9
- this.color = 'neutral';
10
- this.iconset = 'default';
11
- this.disabled = false;
12
- this.sizes = {
13
- "128": { size: 128, stroke: 5.25 },
14
- "72": { size: 72, stroke: 3.5 },
15
- "64": { size: 64, stroke: 3.25 },
16
- "48": { size: 48, stroke: 2.75 },
17
- "40": { size: 40, stroke: 2.5 },
18
- "32": { size: 32, stroke: 2.25 },
19
- "24": { size: 24, stroke: 2 },
20
- "20": { size: 20, stroke: 1.75 },
21
- "16": { size: 16, stroke: 1.5 },
22
- "default": { size: 24, stroke: 2 }
23
- };
24
- }
25
- sizeHandler(size) {
26
- const scaledStroke = (iconSize) => {
27
- return `${this.sizes[iconSize].stroke * (this.sizes.default.size / this.sizes[iconSize].size)}px`;
28
- };
29
- this.setHostProperty('--size', this.sizes[`${size}`] ? `${this.sizes[size].size}px` : `${this.sizes.default.size}px`);
30
- this.setHostProperty('--stroke', this.sizes[`${size}`] ? scaledStroke(size) : scaledStroke("default"));
31
- }
32
- connectedCallback() {
33
- this.assetsPath = window.CuraAPI.localAssetsPath;
34
- this.sizeHandler(this.size);
35
- }
36
- getClasses() {
37
- const classes = {};
38
- classes[`icon-${this.color}`] = true;
39
- if (this.disabled)
40
- classes[`icon-disabled`] = true;
41
- return classes;
42
- }
43
- setHostProperty(prop, value) {
44
- this.host.style.setProperty(prop, value);
45
- }
46
- render() {
47
- return (h(Host, null, h("svg", { version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", class: this.getClasses() }, h("use", { xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
48
- }
49
- get host() { return getElement(this); }
50
- static get watchers() { return {
51
- "size": ["sizeHandler"]
52
- }; }
53
- };
54
- CuraIcon.style = curaIconCss;
1
+ import { r as registerInstance, h, H as Host } from './index-c3d31886.js';
55
2
 
56
3
  const iconsetdefaulticons = ["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", "fileBmp", "fileJpg", "filePdf", "filePng", "fileUpload", "fileXls", "filter", "fullscreen", "gallery", "geotag", "hate", "healthPlan", "height", "height2", "home", "horizontalList", "imageUp", "info2", "infoCircle", "key", "language", "language2", "languageEN", "languagePT", "like", "link", "linkExternal", "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", "unLink", "unSecure", "upload", "verticalList", "viewFalse", "viewTrue", "weight", "wifi", "zoomIn", "zoomOut"];
57
4
 
@@ -68,9 +15,9 @@ const CuraIconsView = class {
68
15
  };
69
16
  }
70
17
  render() {
71
- return (h(Host, null, h("div", { class: "iconDetail" }, h("h4", null, this.selected), h("div", { class: "iconSizes" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { class: "iconSizes invert" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "white" }), h("span", null, size)))), h("div", { class: "iconSizes" }, this.colors.map(color => h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: color }), h("span", null, color))), h("div", { class: "size" }, h("cura-icon", { name: this.selected, disabled: true }), h("span", null, "Disabled")))), h("div", { class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: "icon", onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon }), h("span", null, icon))))));
18
+ return (h(Host, null, h("div", { class: "iconDetail" }, h("h4", null, this.selected), h("div", { class: "iconSizes" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size }), h("span", null, size)))), h("div", { class: "iconSizes invert" }, this.sizes.map(size => h("div", { class: "size" }, h("cura-icon", { name: this.selected, size: size, color: "neutral-white" }), h("span", null, size)))), h("div", { class: "iconSizes" }, this.colors.map(color => h("div", { class: "size" }, h("cura-icon", { name: this.selected, color: color }), h("span", null, color))), h("div", { class: "size" }, h("cura-icon", { name: this.selected, disabled: true }), h("span", null, "Disabled")))), h("div", { class: "icons" }, iconsetdefaulticons.map(icon => h("div", { class: "icon", onClick: () => this.setSelected(icon) }, h("cura-icon", { name: icon }), h("span", null, icon))))));
72
19
  }
73
20
  };
74
21
  CuraIconsView.style = curaIconsViewCss;
75
22
 
76
- export { CuraIcon as cura_icon, CuraIconsView as cura_icons_view };
23
+ export { CuraIconsView as cura_icons_view };
package/dist/esm/cura.js CHANGED
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-cec9b650.js';
2
- import { g as globalScripts } from './app-globals-962e5cc3.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-c3d31886.js';
2
+ import { g as globalScripts } from './app-globals-d7dd3a4d.js';
3
3
 
4
4
  /*
5
5
  Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
 
16
16
  patchBrowser().then(options => {
17
17
  globalScripts();
18
- return bootstrapLazy([["dummy-component",[[1,"dummy-component"]]],["cura-icon_2",[[1,"cura-icons-view",{"selected":[32]}],[1,"cura-icon",{"name":[513],"color":[513],"size":[8],"iconset":[513],"disabled":[516]}]]]], options);
18
+ return bootstrapLazy([["cura-icon",[[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]],["cura-icons-view",[[1,"cura-icons-view",{"selected":[32]}]]],["cura-display_3",[[1,"cura-display",{"level":[514],"size":[513]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513]}],[1,"cura-paragraph",{"size":[513]}]]]], options);
19
19
  });
@@ -152,6 +152,10 @@ const parsePropertyValue = (propValue, propType) => {
152
152
  // but we'll cheat here and say that the string "false" is the boolean false
153
153
  return propValue === 'false' ? false : propValue === '' || !!propValue;
154
154
  }
155
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
156
+ // force it to be a number
157
+ return parseFloat(propValue);
158
+ }
155
159
  if (propType & 1 /* MEMBER_FLAGS.String */) {
156
160
  // could have been passed as a number or boolean
157
161
  // but we still want it as a string
@@ -266,6 +270,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
266
270
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
267
271
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
268
272
  }
273
+ else if (memberName === 'style') {
274
+ // update style attribute, css properties and values
275
+ {
276
+ for (const prop in oldValue) {
277
+ if (!newValue || newValue[prop] == null) {
278
+ if (prop.includes('-')) {
279
+ elm.style.removeProperty(prop);
280
+ }
281
+ else {
282
+ elm.style[prop] = '';
283
+ }
284
+ }
285
+ }
286
+ }
287
+ for (const prop in newValue) {
288
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
289
+ if (prop.includes('-')) {
290
+ elm.style.setProperty(prop, newValue[prop]);
291
+ }
292
+ else {
293
+ elm.style[prop] = newValue[prop];
294
+ }
295
+ }
296
+ }
297
+ }
269
298
  else if ((!isProp ) &&
270
299
  memberName[0] === 'o' &&
271
300
  memberName[1] === 'n') {
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-cec9b650.js';
2
- import { g as globalScripts } from './app-globals-962e5cc3.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-c3d31886.js';
2
+ import { g as globalScripts } from './app-globals-d7dd3a4d.js';
3
3
 
4
4
  /*
5
5
  Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
@@ -12,7 +12,7 @@ const defineCustomElements = (win, options) => {
12
12
  if (typeof window === 'undefined') return Promise.resolve();
13
13
  return patchEsm().then(() => {
14
14
  globalScripts();
15
- return bootstrapLazy([["dummy-component",[[1,"dummy-component"]]],["cura-icon_2",[[1,"cura-icons-view",{"selected":[32]}],[1,"cura-icon",{"name":[513],"color":[513],"size":[8],"iconset":[513],"disabled":[516]}]]]], options);
15
+ return bootstrapLazy([["cura-icon",[[1,"cura-icon",{"name":[513],"color":[1],"size":[8],"iconset":[513],"disabled":[4]}]]],["cura-icons-view",[[1,"cura-icons-view",{"selected":[32]}]]],["cura-display_3",[[1,"cura-display",{"level":[514],"size":[513]}],[1,"cura-heading",{"level":[514],"size":[513],"weight":[513]}],[1,"cura-paragraph",{"size":[513]}]]]], options);
16
16
  });
17
17
  };
18
18
 
@@ -0,0 +1 @@
1
+ var ThemeDefault={color:{primary:{100:"#71C5E8",300:"#449CD5",500:"#005EB8",700:"#004890",900:"#002855"},secondary:{100:"#F5ECE3",300:"#DDC0A2",500:"#CCA074",700:"#886B4D",900:"#292017"},accent:{100:"#F9E8D5",300:"#E4A04F",500:"#DF8D2C",700:"#955E1D",900:"#2D1C09"}},spacing:{base:4},font:{size:"14px",color:"#4A4A4A",body:"'Roboto', Arial, Helvetica, sans-serif",heading:"'Roboto', Arial, Helvetica, sans-serif",display:"'Roboto', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}};var ThemeMaternity=Object.assign(Object.assign({},ThemeDefault),{color:{primary:{100:"#FCEFF6",300:"#FFBFE5",500:"#CD4D9A",700:"#99126C",900:"#00133B"},secondary:{100:"#EDF3FF",300:"#BDD2FF",500:"#189AB4",700:"#001C58",900:"#430E31"}}});var ThemePresets={default:ThemeDefault,maternidade:ThemeMaternity};var Static={color:{success:{lighter:"#DFF6E9",light:"#94E1B5",base:"#5FD290",dark:"#3F8C60",darker:"#132A1D",depth100:"#DFF6E9",depth300:"#94E1B5",depth500:"#5FD290",depth700:"#3F8C60",depth900:"#132A1D"},info:{lighter:"#CFE2FF",light:"#95BFFF",base:"#6EA8FF",dark:"#517BBB",darker:"#253855",depth100:"#CFE2FF",depth300:"#95BFFF",depth500:"#6EA8FF",depth700:"#517BBB",depth900:"#253855"},error:{lighter:"#FBDDDD",light:"#F28F8F",base:"#EB5757",dark:"#9D3A3A",darker:"#2F1111",depth100:"#FBDDDD",depth300:"#F28F8F",depth500:"#EB5757",depth700:"#9D3A3A",depth900:"#2F1111"},warning:{lighter:"#FCFAC4",light:"#F8F489",base:"#F5EF4E",dark:"#A39F34",darker:"#313010",depth100:"#FCFAC4",depth300:"#F8F489",depth500:"#F5EF4E",depth700:"#A39F34",depth900:"#313010"},neutral:{0:"#FFFFFF",100:"#F6F6F6",200:"#E9E9E9",300:"#E2E2E2",400:"#D4D4D4",500:"#B7B7B7",600:"#929292",700:"#6E6E6E",800:"#4A4A4A",900:"#262626"}},icons:{sizes:["128","72","64","48","40","32","24","20","16"],strokes:["5.25","3.5","3.25","2.75","2.5","2.25","2","1.75","1.5"],"default-size":"24"},breakpoints:{small:"576px",medium:"768px",large:"992px",xlarge:"1200px"}};var CuraThemeColorsModule=function(){function e(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"};this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}e.prototype.getColor=function(e){if(e===void 0){e="primary-base"}var t=this.splitColorDepth(e),r=t.color,o=t.depth;var a=this.getStatic(r,o);if(a)return a;return this.getDynamic(r,o)};e.prototype.getStatic=function(e,t){var r,o;return((r=Static.color[e])===null||r===void 0?void 0:r[t])||((o=Static.color[e])===null||o===void 0?void 0:o[this.NeutralDepthAlias[t]])||null};e.prototype.getDynamic=function(e,t){var r=this.ColorDepthAlias[t]?"--cura-color-".concat(e,"-").concat(this.ColorDepthAlias[t]):"--cura-color-".concat(e,"-").concat(t);return getComputedStyle(document.body).getPropertyValue(r)?"var(".concat(r,")"):"var(--cura-color-primary-500)"};e.prototype.splitColorDepth=function(e){var t=e.toLowerCase().split(/-(.*)/),r=t[0],o=t[1];return{color:r!==null&&r!==void 0?r:"primary",depth:o!==null&&o!==void 0?o:"base"}};return e}();var CuraThemeFontsModule=function(){function e(){this.getSize=function(){return"var(--cura-font-size)"};this.getColor=function(){return"var(--cura-font-color)"}}e.prototype.getFamily=function(e){if(e===void 0){e="body"}var t="--cura-font-".concat(e.toLowerCase());return getComputedStyle(document.body).getPropertyValue(t)?"var(".concat(t,")"):"var(--cura-font-body)"};e.prototype.getWeights=function(){var e={};Object.keys(ThemeDefault.font.weights).forEach((function(t){return e[t]="var(--cura-font-weights-".concat(t,")")}));return e};return e}();var CuraThemeModule=function(){function e(){var e=this;this.prefix="--cura";this.colors=new CuraThemeColorsModule;this.fonts=new CuraThemeFontsModule;this.setCssVar=function(t,r){var o=e.groupPath(r,t[0]);e.body.style.setProperty(o,t[1])};this.groupPath=function(e,t){return"".concat(e,"-").concat(t)};this.isObject=function(e){return e&&typeof e==="object"&&!Array.isArray(e)};this.mergeObject=function(t,r){var o=Object.entries(t);for(var a=0,i=o;a<i.length;a++){var s=i[a];if(e.isObject(s[1])){e.mergeObject(s[1],r[s[0]])}else{r[s[0]]=s[1]}}};this.buildCssVars=function(t,r){var o=Object.entries(r);for(var a=0,i=o;a<i.length;a++){var s=i[a];if(e.isObject(s[1])){e.buildCssVars(e.groupPath(t,s[0]),s[1])}else{e.setCssVar(s,t)}}};this.body=window.document.documentElement.querySelector("body")}e.prototype.load=function(e){if(e===void 0){e="default"}var t=ThemePresets[e]?ThemePresets[e]:ThemePresets.default;this.buildCssVars(this.prefix,t)};e.prototype.setCustom=function(e){var t=e.name;if(t in ThemePresets){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",t);this.load("default")}else{var r=e.fromPreset&&e.fromPreset in ThemePresets?ThemePresets[e.fromPreset]:ThemePresets.default;var o=Object.assign({},JSON.parse(JSON.stringify(r)));this.mergeObject(e.definitions,o);ThemePresets[t]=o;this.load(t)}};return e}();var CuraAPI=function(){function e(e){this.localAssetsPath=e&&e.localAssetsPath?e.localAssetsPath:"/assets";var t=new CuraThemeModule;this.theme={load:function(e){t.load(e)},setCustom:function(e){t.setCustom(e)},colors:{getColor:function(e){return t.colors.getColor(e)}},fonts:{getFamily:function(e){return t.fonts.getFamily(e)},getWeights:function(){return t.fonts.getWeights()},getSize:function(){return t.fonts.getSize()},getColor:function(){return t.fonts.getColor()}}};if(e&&e.customTheme){this.theme.setCustom(e.customTheme)}else{var r=e&&e.theme?e.theme:"default";this.theme.load(r)}}return e}();function appGlobalScript(){var e=window.CuraInit;window.CuraAPI=e?new CuraAPI(e):new CuraAPI;var t=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:t}}));if(e&&typeof e.onReady==="function")e.onReady(t)}var globalScripts=appGlobalScript;export{globalScripts as g};
@@ -0,0 +1 @@
1
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-c3d31886.js";var curaDisplayCss=":host{display:block;font-size:var(--font-size);text-transform:uppercase}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:4.285em;font-weight:var(--font-weight-black);color:var(--color-body);line-height:120%;letter-spacing:-4%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:6.21em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3em;font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:4.92em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:7.07em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:3.428em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:6.14em;line-height:125%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:8.857em;letter-spacing:-6%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:4.285em;letter-spacing:-2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";var CuraDisplay=function(){function t(t){registerInstance(this,t);this.level=1;this.size="regular"}t.prototype.connectedCallback=function(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.setFontProperties();this.setColors()};t.prototype.getClasses=function(){var t={};t[this.size.toLowerCase()]=true;return t};t.prototype.setFontProperties=function(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("display"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-bold":this.weights.bold,"--font-weight-black":this.weights.black};this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())};t.prototype.setColors=function(){var t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker");this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")};t.prototype.setHostProperty=function(t,e){this.host.style.setProperty(t,e)};t.prototype.getHeadingTag=function(){var t={1:h("h1",{style:this.styles,class:this.getClasses()},h("slot",null)),2:h("h2",{style:this.styles,class:this.getClasses()},h("slot",null)),3:h("h3",{style:this.styles,class:this.getClasses()},h("slot",null)),4:h("h4",{style:this.styles,class:this.getClasses()},h("slot",null)),5:h("h5",{style:this.styles,class:this.getClasses()},h("slot",null)),6:h("h6",{style:this.styles,class:this.getClasses()},h("slot",null)),default:h("h1",{style:this.styles,class:this.getClasses()},h("slot",null))};return t["".concat(this.level)]||t["default"]};t.prototype.render=function(){return h(Host,null,this.getHeadingTag())};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CuraDisplay.style=curaDisplayCss;var curaHeadingCss=":host{display:block;font-size:var(--font-size)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.71em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:130%;letter-spacing:0%}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.07em;letter-spacing:-2%}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:150%;letter-spacing:0%}:host h1.small.bold-weight,:host h2.small.bold-weight,:host h3.small.bold-weight,:host h4.small.bold-weight,:host h5.small.bold-weight,:host h6.small.bold-weight{font-weight:var(--font-weight-bold)}@media screen and (min-width: 768px) and (max-width: 1366px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}}@media screen and (min-width: 1367px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:135%;letter-spacing:-2%}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.92em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.71em;line-height:160%;letter-spacing:0%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-decoration:none;text-underline-offset:10%;cursor:pointer}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";var CuraHeading=function(){function t(t){registerInstance(this,t);this.level=1;this.size="regular";this.weight="regular"}t.prototype.connectedCallback=function(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.setFontProperties();this.setColors()};t.prototype.getClasses=function(){var t={};t[this.size.toLowerCase()]=true;t["".concat(this.weight.toLowerCase(),"-weight")]=true;return t};t.prototype.setFontProperties=function(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("heading"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold,"--font-weight-black":this.weights.black};this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())};t.prototype.setColors=function(){var t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker");this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")};t.prototype.setHostProperty=function(t,e){this.host.style.setProperty(t,e)};t.prototype.getHeadingTag=function(){var t={1:h("h1",{style:this.styles,class:this.getClasses()},h("slot",null)),2:h("h2",{style:this.styles,class:this.getClasses()},h("slot",null)),3:h("h3",{style:this.styles,class:this.getClasses()},h("slot",null)),4:h("h4",{style:this.styles,class:this.getClasses()},h("slot",null)),5:h("h5",{style:this.styles,class:this.getClasses()},h("slot",null)),6:h("h6",{style:this.styles,class:this.getClasses()},h("slot",null)),default:h("h1",{style:this.styles,class:this.getClasses()},h("slot",null))};return t["".concat(this.level)]||t["default"]};t.prototype.render=function(){return h(Host,null,this.getHeadingTag())};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CuraHeading.style=curaHeadingCss;var curaParagraphCss=":host{display:block;font-size:var(--font-size)}:host p{font-family:var(--font-family);font-size:var(--font-size);font-weight:var(--font-weight-regular);color:var(--color-body);line-height:140%;letter-spacing:2%}:host p.large{font-size:1.21em;line-height:150%;letter-spacing:0%}:host p.small{font-size:0.85em;line-height:135%;letter-spacing:4%}:host p.caption{font-size:0.71em;line-height:135%;letter-spacing:6%}@media screen and (min-width: 768px) and (max-width: 1366px){:host p{font-size:1.14em;line-height:145%}:host p.large{font-size:1.35em;line-height:150%}:host p.small{font-size:1em;line-height:135%}:host p.caption{font-size:0.85em;line-height:135%;letter-spacing:6%}}@media screen and (min-width: 1367px){:host p{font-size:1.42em;line-height:150%;letter-spacing:0%}:host p.large{font-size:1.71em;line-height:160%}:host p.small{font-size:1.21em;line-height:145%;letter-spacing:0%}:host p.caption{font-size:1em;line-height:145%;letter-spacing:2%}}:host ::slotted(b),:host ::slotted(strong){font-weight:var(--font-weight-bold)}:host ::slotted(a){font-weight:var(--font-weight-medium);color:var(--color-link);text-underline-offset:10%}:host ::slotted(abbr){color:var(--color-link);-webkit-text-decoration:underline dashed 1px var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";var CuraParagraph=function(){function t(t){registerInstance(this,t);this.size="regular"}t.prototype.connectedCallback=function(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.setFontProperties();this.setColors()};t.prototype.setsizeClass=function(){var t={};t[this.size.toLowerCase()]=true;return t};t.prototype.setFontProperties=function(){this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("body"),"--font-size":window.CuraAPI.theme.fonts.getSize(),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold};this.setHostProperty("--font-size",window.CuraAPI.theme.fonts.getSize())};t.prototype.setColors=function(){var t=window.CuraAPI.theme.fonts.getColor();this.styles["--color-body"]=t||window.CuraAPI.theme.colors.getColor("neutral-darker");this.styles["--color-link"]=window.CuraAPI.theme.colors.getColor("primary-700")};t.prototype.setHostProperty=function(t,e){this.host.style.setProperty(t,e)};t.prototype.render=function(){return h(Host,null,h("p",{style:this.styles,class:this.setsizeClass()},h("slot",null)))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();CuraParagraph.style=curaParagraphCss;export{CuraDisplay as cura_display,CuraHeading as cura_heading,CuraParagraph as cura_paragraph};
@@ -0,0 +1 @@
1
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-c3d31886.js";var curaIconCss=":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";var CuraIcon=function(){function e(e){registerInstance(this,e);this.name="";this.color="neutral-base";this.iconset="default";this.disabled=false;this.sizes={128:{size:128,stroke:5.25},72:{size:72,stroke:3.5},64:{size:64,stroke:3.25},48:{size:48,stroke:2.75},40:{size:40,stroke:2.5},32:{size:32,stroke:2.25},24:{size:24,stroke:2},20:{size:20,stroke:1.75},16:{size:16,stroke:1.5},default:{size:24,stroke:2}}}e.prototype.sizeHandler=function(e){var t=this;var s=function(e){return"".concat(t.sizes[e].stroke*(t.sizes.default.size/t.sizes[e].size),"px")};this.setHostProperty("--size",this.sizes["".concat(e)]?"".concat(this.sizes[e].size,"px"):"".concat(this.sizes.default.size,"px"));this.setHostProperty("--stroke",this.sizes["".concat(e)]?s(e):s("default"))};e.prototype.colorHandler=function(){this.setHostProperty("--color",window.CuraAPI.theme.colors.getColor(this.disabled?"neutral-light":this.color))};e.prototype.connectedCallback=function(){this.assetsPath=window.CuraAPI.localAssetsPath;this.sizeHandler(this.size);this.colorHandler()};e.prototype.setHostProperty=function(e,t){this.host.style.setProperty(e,t)};e.prototype.render=function(){return h(Host,null,h("svg",{version:"1.1",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},h("use",{xlinkHref:"".concat(this.assetsPath,"/icons/iconset-").concat(this.iconset,".svg#").concat(this.name)})))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{size:["sizeHandler"],color:["colorHandler"],disabled:["colorHandler"]}},enumerable:false,configurable:true});return e}();CuraIcon.style=curaIconCss;export{CuraIcon as cura_icon};
@@ -0,0 +1 @@
1
+ import{r as registerInstance,h,H as Host}from"./index-c3d31886.js";var iconsetdefaulticons=["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","fileBmp","fileJpg","filePdf","filePng","fileUpload","fileXls","filter","fullscreen","gallery","geotag","hate","healthPlan","height","height2","home","horizontalList","imageUp","info2","infoCircle","key","language","language2","languageEN","languagePT","like","link","linkExternal","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","unLink","unSecure","upload","verticalList","viewFalse","viewTrue","weight","wifi","zoomIn","zoomOut"];var curaIconsViewCss=":host{display:block;padding:24px;font-family:var(--cura-font-family-body)}.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 CuraIconsView=function(){function e(e){var i=this;registerInstance(this,e);this.sizes=[16,20,24,32,40,48,64,72,128];this.colors=["primary","secondary","accent","info","warning","error","success","neutral"];this.selected="360";this.setSelected=function(e){i.selected=e}}e.prototype.render=function(){var e=this;return h(Host,null,h("div",{class:"iconDetail"},h("h4",null,this.selected),h("div",{class:"iconSizes"},this.sizes.map((function(i){return h("div",{class:"size"},h("cura-icon",{name:e.selected,size:i}),h("span",null,i))}))),h("div",{class:"iconSizes invert"},this.sizes.map((function(i){return h("div",{class:"size"},h("cura-icon",{name:e.selected,size:i,color:"neutral-white"}),h("span",null,i))}))),h("div",{class:"iconSizes"},this.colors.map((function(i){return h("div",{class:"size"},h("cura-icon",{name:e.selected,color:i}),h("span",null,i))})),h("div",{class:"size"},h("cura-icon",{name:this.selected,disabled:true}),h("span",null,"Disabled")))),h("div",{class:"icons"},iconsetdefaulticons.map((function(i){return h("div",{class:"icon",onClick:function(){return e.setSelected(i)}},h("cura-icon",{name:i}),h("span",null,i))}))))};return e}();CuraIconsView.style=curaIconsViewCss;export{CuraIconsView as cura_icons_view};
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-cec9b650.js";import{g as globalScripts}from"./app-globals-962e5cc3.js";var patchBrowser=function(){var o=import.meta.url;var r={};if(o!==""){r.resourcesUrl=new URL(".",o).href}return promiseResolve(r)};patchBrowser().then((function(o){globalScripts();return bootstrapLazy([["dummy-component",[[1,"dummy-component"]]],["cura-icon_2",[[1,"cura-icons-view",{selected:[32]}],[1,"cura-icon",{name:[513],color:[513],size:[8],iconset:[513],disabled:[516]}]]]],o)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-c3d31886.js";import{g as globalScripts}from"./app-globals-d7dd3a4d.js";var patchBrowser=function(){var r=import.meta.url;var e={};if(r!==""){e.resourcesUrl=new URL(".",r).href}return promiseResolve(e)};patchBrowser().then((function(r){globalScripts();return bootstrapLazy([["cura-icon",[[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]],["cura-icons-view",[[1,"cura-icons-view",{selected:[32]}]]],["cura-display_3",[[1,"cura-display",{level:[514],size:[513]}],[1,"cura-heading",{level:[514],size:[513],weight:[513]}],[1,"cura-paragraph",{size:[513]}]]]],r)}));
@@ -0,0 +1,2 @@
1
+ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function i(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?r(e.value):a(e.value).then(o,i)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,a,s,o;return o={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function i(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,a&&(s=o[0]&2?a["return"]:o[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,o[1])).done)return s;if(a=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;a=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];a=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,s;n<a;n++){if(s||!(n in t)){if(!s)s=Array.prototype.slice.call(t,0,n);s[n]=t[n]}}return e.concat(s||Array.prototype.slice.call(t))};var NAMESPACE="cura";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,t){if(t===void 0){t=""}{return function(){return}}};var uniqueTime=function(e,t){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}.hydrated{visibility:inherit}";var XLINK_NS="http://www.w3.org/1999/xlink";var EMPTY_OBJ={};var SVG_NS="http://www.w3.org/2000/svg";var HTML_NS="http://www.w3.org/1999/xhtml";var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};var h=function(e,t){var r=[];for(var n=2;n<arguments.length;n++){r[n-2]=arguments[n]}var a=null;var s=false;var o=false;var i=[];var l=function(t){for(var r=0;r<t.length;r++){a=t[r];if(Array.isArray(a)){l(a)}else if(a!=null&&typeof a!=="boolean"){if(s=typeof e!=="function"&&!isComplexType(a)){a=String(a)}if(s&&o){i[i.length-1].$text$+=a}else{i.push(s?newVNode(null,a):a)}o=s}}};l(r);if(t){{var c=t.className||t.class;if(c){t.class=typeof c!=="object"?c:Object.keys(c).filter((function(e){return c[e]})).join(" ")}}}var u=newVNode(e,null);u.$attrs$=t;if(i.length>0){u.$children$=i}return u};var newVNode=function(e,t){var r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};{r.$attrs$=null}return r};var Host={};var isHost=function(e){return e&&e.$tag$===Host};var parsePropertyValue=function(e,t){if(e!=null&&!isComplexType(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var emitEvent=function(e,t,r){var n=plt.ce(t,r);e.dispatchEvent(n);return n};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,t,r){var n=styles.get(e);if(supportsConstructableStylesheets&&r){n=n||new CSSStyleSheet;if(typeof n==="string"){n=t}else{n.replaceSync(t)}}else{n=t}styles.set(e,n)};var addStyle=function(e,t,r,n){var a=getScopeId(t);var s=styles.get(a);e=e.nodeType===11?e:doc;if(s){if(typeof s==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var i=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(a)){{{i=doc.createElement("style");i.innerHTML=s}e.insertBefore(i,e.querySelector("link"))}if(o){o.add(a)}}}else if(!e.adoptedStyleSheets.includes(s)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[s],false)}}return a};var attachStyles=function(e){var t=e.$cmpMeta$;var r=e.$hostElement$;var n=t.$flags$;var a=createTime("attachStyles",t.$tagName$);var s=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),t);if(n&10){r["s-sc"]=s;r.classList.add(s+"-h")}a()};var getScopeId=function(e,t){return"sc-"+e.$tagName$};var setAccessor=function(e,t,r,n,a,s){if(r!==n){var o=isMemberInElement(e,t);var i=t.toLowerCase();if(t==="class"){var l=e.classList;var c=parseClassList(r);var u=parseClassList(n);l.remove.apply(l,c.filter((function(e){return e&&!u.includes(e)})));l.add.apply(l,u.filter((function(e){return e&&!c.includes(e)})))}else if(t==="style"){{for(var f in r){if(!n||n[f]==null){if(f.includes("-")){e.style.removeProperty(f)}else{e.style[f]=""}}}}for(var f in n){if(!r||n[f]!==r[f]){if(f.includes("-")){e.style.setProperty(f,n[f])}else{e.style[f]=n[f]}}}}else if(!o&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(isMemberInElement(win,i)){t=i.slice(2)}else{t=i[2]+t.slice(3)}if(r){plt.rel(e,t,r,false)}if(n){plt.ael(e,t,n,false)}}else{var $=isComplexType(n);if((o||$&&n!==null)&&!a){try{if(!e.tagName.includes("-")){var d=n==null?"":n;if(t==="list"){o=false}else if(r==null||e[t]!=d){e[t]=d}}else{e[t]=n}}catch(e){}}var v=false;{if(i!==(i=i.replace(/^xlink\:?/,""))){t=i;v=true}}if(n==null||n===false){if(n!==false||e.getAttribute(t)===""){if(v){e.removeAttributeNS(XLINK_NS,t)}else{e.removeAttribute(t)}}}else if((!o||s&4||a)&&!$){n=n===true?"":n;if(v){e.setAttributeNS(XLINK_NS,t,n)}else{e.setAttribute(t,n)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var updateElement=function(e,t,r,n){var a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$;var s=e&&e.$attrs$||EMPTY_OBJ;var o=t.$attrs$||EMPTY_OBJ;{for(n in s){if(!(n in o)){setAccessor(a,n,s[n],undefined,r,t.$flags$)}}}for(n in o){setAccessor(a,n,s[n],o[n],r,t.$flags$)}};var createElm=function(e,t,r,n){var a=t.$children$[r];var s=0;var o;var i;if(a.$text$!==null){o=a.$elm$=doc.createTextNode(a.$text$)}else{if(!isSvgMode){isSvgMode=a.$tag$==="svg"}o=a.$elm$=doc.createElementNS(isSvgMode?SVG_NS:HTML_NS,a.$tag$);if(isSvgMode&&a.$tag$==="foreignObject"){isSvgMode=false}{updateElement(null,a,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(a.$children$){for(s=0;s<a.$children$.length;++s){i=createElm(e,a,s);if(i){o.appendChild(i)}}}{if(a.$tag$==="svg"){isSvgMode=false}else if(o.tagName==="foreignObject"){isSvgMode=true}}}return o};var addVnodes=function(e,t,r,n,a,s){var o=e;var i;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;a<=s;++a){if(n[a]){i=createElm(null,r,a);if(i){n[a].$elm$=i;o.insertBefore(i,t)}}}};var removeVnodes=function(e,t,r,n,a){for(;t<=r;++t){if(n=e[t]){a=n.$elm$;a.remove()}}};var updateChildren=function(e,t,r,n){var a=0;var s=0;var o=t.length-1;var i=t[0];var l=t[o];var c=n.length-1;var u=n[0];var f=n[c];var $;while(a<=o&&s<=c){if(i==null){i=t[++a]}else if(l==null){l=t[--o]}else if(u==null){u=n[++s]}else if(f==null){f=n[--c]}else if(isSameVnode(i,u)){patch(i,u);i=t[++a];u=n[++s]}else if(isSameVnode(l,f)){patch(l,f);l=t[--o];f=n[--c]}else if(isSameVnode(i,f)){patch(i,f);e.insertBefore(i.$elm$,l.$elm$.nextSibling);i=t[++a];f=n[--c]}else if(isSameVnode(l,u)){patch(l,u);e.insertBefore(l.$elm$,i.$elm$);l=t[--o];u=n[++s]}else{{$=createElm(t&&t[s],r,s);u=n[++s]}if($){{i.$elm$.parentNode.insertBefore($,i.$elm$)}}}}if(a>o){addVnodes(e,n[c+1]==null?null:n[c+1].$elm$,r,n,s,c)}else if(s>c){removeVnodes(t,a,o)}};var isSameVnode=function(e,t){if(e.$tag$===t.$tag$){return true}return false};var patch=function(e,t){var r=t.$elm$=e.$elm$;var n=e.$children$;var a=t.$children$;var s=t.$tag$;var o=t.$text$;if(o===null){{isSvgMode=s==="svg"?true:s==="foreignObject"?false:isSvgMode}{if(s==="slot");else{updateElement(e,t,isSvgMode)}}if(n!==null&&a!==null){updateChildren(r,n,t,a)}else if(a!==null){if(e.$text$!==null){r.textContent=""}addVnodes(r,null,t,a,0,a.length-1)}else if(n!==null){removeVnodes(n,0,n.length-1)}if(isSvgMode&&s==="svg"){isSvgMode=false}}else if(e.$text$!==o){r.data=o}};var renderVdom=function(e,t){var r=e.$hostElement$;var n=e.$cmpMeta$;var a=e.$vnode$||newVNode(null,null);var s=isHost(t)?t:h(null,null,t);hostTagName=r.tagName;if(n.$attrsToReflect$){s.$attrs$=s.$attrs$||{};n.$attrsToReflect$.map((function(e){var t=e[0],n=e[1];return s.$attrs$[n]=r[t]}))}s.$tag$=null;s.$flags$|=4;e.$vnode$=s;s.$elm$=a.$elm$=r.shadowRoot||r;{scopeId=r["s-sc"]}patch(a,s)};var attachToAncestor=function(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var scheduleUpdate=function(e,t){{e.$flags$|=16}if(e.$flags$&4){e.$flags$|=512;return}attachToAncestor(e,e.$ancestorComponent$);var r=function(){return dispatchHooks(e,t)};return writeTask(r)};var dispatchHooks=function(e,t){var r=createTime("scheduleUpdate",e.$cmpMeta$.$tagName$);var n=e.$lazyInstance$;var a;r();return then(a,(function(){return updateComponent(e,n,t)}))};var updateComponent=function(e,t,r){return __awaiter(void 0,void 0,void 0,(function(){var n,a,s,o,i,l;return __generator(this,(function(c){n=e.$hostElement$;a=createTime("update",e.$cmpMeta$.$tagName$);s=n["s-rc"];if(r){attachStyles(e)}o=createTime("render",e.$cmpMeta$.$tagName$);{callRender(e,t)}if(s){s.map((function(e){return e()}));n["s-rc"]=undefined}o();a();{i=n["s-p"];l=function(){return postUpdateComponent(e)};if(i.length===0){l()}else{Promise.all(i).then(l);e.$flags$|=4;i.length=0}}return[2]}))}))};var callRender=function(e,t,r){try{t=t.render();{e.$flags$&=~16}{e.$flags$|=2}{{{renderVdom(e,t)}}}}catch(t){consoleError(t,e.$hostElement$)}return null};var postUpdateComponent=function(e){var t=e.$cmpMeta$.$tagName$;var r=e.$hostElement$;var n=createTime("postUpdate",t);var a=e.$ancestorComponent$;if(!(e.$flags$&64)){e.$flags$|=64;{addHydratedFlag(r)}n();{e.$onReadyResolve$(r);if(!a){appDidLoad()}}}else{n()}{if(e.$onRenderResolve$){e.$onRenderResolve$();e.$onRenderResolve$=undefined}if(e.$flags$&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.$flags$&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,t,r){if(e&&e[t]){try{return e[t](r)}catch(e){consoleError(e)}}return undefined};var then=function(e,t){return e&&e.then?e.then(t):t()};var addHydratedFlag=function(e){return e.classList.add("hydrated")};var getValue=function(e,t){return getHostRef(e).$instanceValues$.get(t)};var setValue=function(e,t,r,n){var a=getHostRef(e);var s=a.$hostElement$;var o=a.$instanceValues$.get(t);var i=a.$flags$;var l=a.$lazyInstance$;r=parsePropertyValue(r,n.$members$[t][0]);var c=Number.isNaN(o)&&Number.isNaN(r);var u=r!==o&&!c;if((!(i&8)||o===undefined)&&u){a.$instanceValues$.set(t,r);if(l){if(n.$watchers$&&i&128){var f=n.$watchers$[t];if(f){f.map((function(e){try{l[e](r,o,t)}catch(e){consoleError(e,s)}}))}}if((i&(2|16))===2){scheduleUpdate(a,false)}}}};var proxyComponent=function(e,t,r){if(t.$members$){if(e.watchers){t.$watchers$=e.watchers}var n=Object.entries(t.$members$);var a=e.prototype;n.map((function(e){var n=e[0],s=e[1][0];if(s&31||r&2&&s&32){Object.defineProperty(a,n,{get:function(){return getValue(this,n)},set:function(e){setValue(this,n,e,t)},configurable:true,enumerable:true})}}));if(r&1){var s=new Map;a.attributeChangedCallback=function(e,t,r){var n=this;plt.jmp((function(){var t=s.get(e);if(n.hasOwnProperty(t)){r=n[t];delete n[t]}else if(a.hasOwnProperty(t)&&typeof n[t]==="number"&&n[t]==r){return}n[t]=r===null&&typeof n[t]==="boolean"?false:r}))};e.observedAttributes=n.filter((function(e){var t=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],n=e[1];var a=n[1]||r;s.set(a,r);if(n[0]&512){t.$attrsToReflect$.push([r,a])}return a}))}}return e};var initializeComponent=function(e,t,r,n,a){return __awaiter(void 0,void 0,void 0,(function(){var e,n,s,o,i,l,c;return __generator(this,(function(u){switch(u.label){case 0:if(!((t.$flags$&32)===0))return[3,3];t.$flags$|=32;a=loadModule(r);if(!a.then)return[3,2];e=uniqueTime();return[4,a];case 1:a=u.sent();e();u.label=2;case 2:if(!a.isProxied){{r.$watchers$=a.watchers}proxyComponent(a,r,2);a.isProxied=true}n=createTime("createInstance",r.$tagName$);{t.$flags$|=8}try{new a(t)}catch(e){consoleError(e)}{t.$flags$&=~8}{t.$flags$|=128}n();fireConnectedCallback(t.$lazyInstance$);if(a.style){s=a.style;o=getScopeId(r);if(!styles.has(o)){i=createTime("registerStyles",r.$tagName$);registerStyle(o,s,!!(r.$flags$&1));i()}}u.label=3;case 3:l=t.$ancestorComponent$;c=function(){return scheduleUpdate(t,true)};if(l&&l["s-rc"]){l["s-rc"].push(c)}else{c()}return[2]}}))}))};var fireConnectedCallback=function(e){{safeCall(e,"connectedCallback")}};var connectedCallback=function(e){if((plt.$flags$&1)===0){var t=getHostRef(e);var r=t.$cmpMeta$;var n=createTime("connectedCallback",r.$tagName$);if(!(t.$flags$&1)){t.$flags$|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){attachToAncestor(t,t.$ancestorComponent$=a);break}}}if(r.$members$){Object.entries(r.$members$).map((function(t){var r=t[0],n=t[1][0];if(n&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{initializeComponent(e,t,r)}}else{fireConnectedCallback(t.$lazyInstance$)}n()}};var disconnectedCallback=function(e){if((plt.$flags$&1)===0){getHostRef(e)}};var bootstrapLazy=function(e,t){if(t===void 0){t={}}var r=createTime();var n=[];var a=t.exclude||[];var s=win.customElements;var o=doc.head;var i=o.querySelector("meta[charset]");var l=doc.createElement("style");var c=[];var u;var f=true;Object.assign(plt,t);plt.$resourcesUrl$=new URL(t.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(t){var r={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};{r.$members$=t[2]}{r.$attrsToReflect$=[]}{r.$watchers$={}}var o=r.$tagName$;var i=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;t=n;registerHost(t,r);if(r.$flags$&1){{{t.attachShadow({mode:"open"})}}}return n}t.prototype.connectedCallback=function(){var e=this;if(u){clearTimeout(u);u=null}if(f){c.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};t.prototype.componentOnReady=function(){return getHostRef(this).$onReadyPromise$};return t}(HTMLElement);r.$lazyBundleId$=e[0];if(!a.includes(o)&&!s.get(o)){n.push(o);s.define(o,proxyComponent(i,r,1))}}))}));{l.innerHTML=n+HYDRATED_CSS;l.setAttribute("data-styles","");o.insertBefore(l,i?i.nextSibling:o.firstChild)}f=false;if(c.length){c.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return u=setTimeout(appDidLoad,30)}))}}r()};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,t){return hostRefs.set(t.$lazyInstance$=e,t)};var registerHost=function(e,t){var r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};{r.$onReadyPromise$=new Promise((function(e){return r.$onReadyResolve$=e}));e["s-p"]=[];e["s-rc"]=[]}return hostRefs.set(e,r)};var isMemberInElement=function(e,t){return t in e};var consoleError=function(e,t){return(0,console.error)(e,t)};var cmpModules=new Map;var loadModule=function(e,t,r){var n=e.$tagName$.replace(/-/g,"_");var a=e.$lazyBundleId$;var s=cmpModules.get(a);if(s){return s[n]}
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(a,".entry.js").concat("")).then((function(e){{cmpModules.set(a,e)}return e[n]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,r,n){return e.addEventListener(t,r,n)},rel:function(e,t,r,n){return e.removeEventListener(t,r,n)},ce:function(e,t){return new CustomEvent(e,t)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,t){return function(r){e.push(r);if(!queuePending){queuePending=true;if(t&&plt.$flags$&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Host as H,bootstrapLazy as b,getElement as g,h,promiseResolve as p,registerInstance as r};
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-cec9b650.js";import{g as globalScripts}from"./app-globals-962e5cc3.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,o){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){globalScripts();return bootstrapLazy([["dummy-component",[[1,"dummy-component"]]],["cura-icon_2",[[1,"cura-icons-view",{selected:[32]}],[1,"cura-icon",{name:[513],color:[513],size:[8],iconset:[513],disabled:[516]}]]]],o)}))};export{defineCustomElements};
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-c3d31886.js";import{g as globalScripts}from"./app-globals-d7dd3a4d.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,r){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){globalScripts();return bootstrapLazy([["cura-icon",[[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]],["cura-icons-view",[[1,"cura-icons-view",{selected:[32]}]]],["cura-display_3",[[1,"cura-display",{level:[514],size:[513]}],[1,"cura-heading",{level:[514],size:[513],weight:[513]}],[1,"cura-paragraph",{size:[513]}]]]],r)}))};export{defineCustomElements};
@@ -47,4 +47,13 @@ export declare enum InterfaceModes {
47
47
  export interface APIThemeFunctions {
48
48
  load(themeTag: string): unknown;
49
49
  setCustom(customThemeDefinitions: CuraCustomTheme): unknown;
50
+ colors: {
51
+ getColor(color?: string, depth?: string): string;
52
+ };
53
+ fonts: {
54
+ getFamily(type?: string): string;
55
+ getWeights(): any;
56
+ getSize(): string;
57
+ getColor(): string;
58
+ };
50
59
  }
@@ -0,0 +1,48 @@
1
+ export default class CuraThemeColorsModule {
2
+ NeutralDepthAlias: {
3
+ purewhite: string;
4
+ white: string;
5
+ pale: string;
6
+ lighter: string;
7
+ light: string;
8
+ base: string;
9
+ medium: string;
10
+ dark: string;
11
+ darker: string;
12
+ black: string;
13
+ };
14
+ ColorDepthAlias: {
15
+ lighter: string;
16
+ light: string;
17
+ base: string;
18
+ dark: string;
19
+ darker: string;
20
+ };
21
+ constructor();
22
+ /**
23
+ * Get theme color.
24
+ * @param colorWithDepth string Ex.: primary-light
25
+ * @returns css color property. Color definition or related css var from the theme.
26
+ */
27
+ getColor(colorWithDepth?: string): string;
28
+ /**
29
+ * Internal: Look for static color by name and depth.
30
+ * @param color Color name.
31
+ * @param depth Depth number or alias.
32
+ * @returns Static color definition.
33
+ */
34
+ getStatic(color: string, depth: string): any;
35
+ /**
36
+ * Internal: Look for theme dynamic colors.
37
+ * @param color Color name.
38
+ * @param depth Depth number or alias.
39
+ * @returns Related CSS variable defined by the theme.
40
+ */
41
+ getDynamic(color: string, depth: string): string;
42
+ /**
43
+ * Internal: Split color strings
44
+ * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.
45
+ * @returns Object { color: string, depth: string }.
46
+ */
47
+ private splitColorDepth;
48
+ }
@@ -0,0 +1,24 @@
1
+ export default class CuraThemeFontsModule {
2
+ constructor();
3
+ /**
4
+ * Get the CSS variable related to the font family defined by the theme.
5
+ * @param type 'body' | 'heading' | 'display'
6
+ * @returns Related css variable as a string.
7
+ */
8
+ getFamily(type?: string): string;
9
+ /**
10
+ * Get the CSS variables related to font weights defined by the theme.
11
+ * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.
12
+ */
13
+ getWeights(): any;
14
+ /**
15
+ * Get the CSS variable related to the font size base defined by the theme.
16
+ * @returns Related CSS variable as a string.
17
+ */
18
+ getSize: () => string;
19
+ /**
20
+ * Get CSS variable related to the font color defined by the theme.
21
+ * @returns Related CSS variable as a string.
22
+ */
23
+ getColor: () => string;
24
+ }
@@ -1,7 +1,11 @@
1
1
  import { CuraCustomTheme } from "../cura-api.type";
2
+ import CuraThemeColorsModule from "./cura-theme-colors-module";
3
+ import CuraThemeFontsModule from "./cura-theme-fonts-module";
2
4
  export default class CuraThemeModule {
3
5
  body: HTMLBodyElement;
4
6
  prefix: string;
7
+ colors: CuraThemeColorsModule;
8
+ fonts: CuraThemeFontsModule;
5
9
  constructor();
6
10
  /**
7
11
  * Load a theme.