@rededor/cura 0.5.1 → 0.5.2
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.
- package/dist/cjs/{app-globals-0e3b7fc6.js → app-globals-2988084b.js} +5 -5
- package/dist/cjs/app-globals-2988084b.js.map +1 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js +452 -0
- package/dist/cjs/cura-accordion_8.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js +83 -0
- package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +74 -0
- package/dist/cjs/cura-display.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +29 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-label.cjs.entry.js +69 -0
- package/dist/cjs/cura-label.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +2 -2
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/api/cura-api.type.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js +1 -1
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
- package/dist/collection/api/theme-presets/static.js +2 -2
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.css +10 -6
- package/dist/collection/components/cura-page-template/cura-page-template.css +13 -9
- package/dist/collection/components/forms/cura-label/cura-label.css +70 -0
- package/dist/collection/components/forms/cura-label/cura-label.js +190 -0
- package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js +137 -0
- package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.css +21 -38
- package/dist/collection/components/text/cura-display/cura-display.js +80 -49
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
- package/dist/collection/components/text/cura-display/cura-display.stories.js +78 -33
- package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.css +50 -24
- package/dist/collection/components/text/cura-heading/cura-heading.js +94 -39
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js +92 -36
- package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +37 -38
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +62 -41
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +78 -46
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
- package/dist/collection/index.js +3 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/cura-accordion-item.js +1 -1
- package/dist/components/cura-accordion-item.js.map +1 -1
- package/dist/components/cura-display.js +41 -35
- package/dist/components/cura-display.js.map +1 -1
- package/dist/components/cura-heading.js +34 -21
- package/dist/components/cura-heading.js.map +1 -1
- package/dist/components/cura-label.d.ts +11 -0
- package/dist/components/cura-label.js +91 -0
- package/dist/components/cura-label.js.map +1 -0
- package/dist/components/cura-page-template.js +1 -1
- package/dist/components/cura-page-template.js.map +1 -1
- package/dist/components/cura-paragraph.js +25 -23
- package/dist/components/cura-paragraph.js.map +1 -1
- package/dist/components/index.js +11 -5
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/index.esm.js.map +1 -1
- package/dist/cura/p-03047b3e.entry.js +2 -0
- package/dist/cura/p-03047b3e.entry.js.map +1 -0
- package/dist/cura/p-0c79c54e.entry.js +2 -0
- package/dist/cura/p-0c79c54e.entry.js.map +1 -0
- package/dist/cura/p-120926c5.system.js +2 -0
- package/dist/cura/p-120926c5.system.js.map +1 -0
- package/dist/cura/p-223924fb.system.entry.js +2 -0
- package/dist/cura/p-223924fb.system.entry.js.map +1 -0
- package/dist/cura/p-48426f60.system.js +2 -0
- package/dist/cura/p-48426f60.system.js.map +1 -0
- package/dist/cura/p-49813052.entry.js +2 -0
- package/dist/cura/p-49813052.entry.js.map +1 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js +2 -0
- package/dist/cura/p-4bdbcdf0.system.entry.js.map +1 -0
- package/dist/cura/p-7c8f3c77.system.entry.js +2 -0
- package/dist/cura/p-7c8f3c77.system.entry.js.map +1 -0
- package/dist/cura/p-8b18b5f7.system.js +2 -0
- package/dist/cura/p-8b18b5f7.system.js.map +1 -0
- package/dist/cura/p-91b0f78e.entry.js +2 -0
- package/dist/cura/p-91b0f78e.entry.js.map +1 -0
- package/dist/cura/p-a0395f90.entry.js +2 -0
- package/dist/cura/p-a0395f90.entry.js.map +1 -0
- package/dist/cura/p-a7ef255f.entry.js +2 -0
- package/dist/cura/p-a7ef255f.entry.js.map +1 -0
- package/dist/cura/p-ca054b07.system.entry.js +2 -0
- package/dist/cura/p-ca054b07.system.entry.js.map +1 -0
- package/dist/cura/p-d47b9cfe.system.entry.js +2 -0
- package/dist/cura/p-d47b9cfe.system.entry.js.map +1 -0
- package/dist/cura/p-f8fffdc1.js +2 -0
- package/dist/cura/p-f8fffdc1.js.map +1 -0
- package/dist/cura/p-fc77814b.system.entry.js +2 -0
- package/dist/cura/p-fc77814b.system.entry.js.map +1 -0
- package/dist/esm/{app-globals-cc003eaf.js → app-globals-29001758.js} +5 -5
- package/dist/esm/app-globals-29001758.js.map +1 -0
- package/dist/esm/cura-accordion_8.entry.js +441 -0
- package/dist/esm/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm/cura-button-outline.entry.js +79 -0
- package/dist/esm/cura-button-outline.entry.js.map +1 -0
- package/dist/esm/cura-button-transparent.entry.js +79 -0
- package/dist/esm/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm/cura-display.entry.js +70 -0
- package/dist/esm/cura-display.entry.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +25 -0
- package/dist/esm/cura-icons-view.entry.js.map +1 -0
- package/dist/esm/cura-label.entry.js +65 -0
- package/dist/esm/cura-label.entry.js.map +1 -0
- package/dist/esm/cura.js +2 -2
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm-es5/app-globals-29001758.js +2 -0
- package/dist/esm-es5/app-globals-29001758.js.map +1 -0
- package/dist/esm-es5/cura-accordion_8.entry.js +2 -0
- package/dist/esm-es5/cura-accordion_8.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-outline.entry.js +2 -0
- package/dist/esm-es5/cura-button-outline.entry.js.map +1 -0
- package/dist/esm-es5/cura-button-transparent.entry.js +2 -0
- package/dist/esm-es5/cura-button-transparent.entry.js.map +1 -0
- package/dist/esm-es5/cura-display.entry.js +2 -0
- package/dist/esm-es5/cura-display.entry.js.map +1 -0
- package/dist/esm-es5/cura-icons-view.entry.js +2 -0
- package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
- package/dist/esm-es5/cura-label.entry.js +2 -0
- package/dist/esm-es5/cura-label.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/cura.js.map +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/index.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/api/cura-api.type.d.ts +1 -0
- package/dist/types/components/forms/cura-label/cura-label.d.ts +54 -0
- package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +126 -0
- package/dist/types/components/text/cura-display/cura-display.d.ts +29 -18
- package/dist/types/components/text/cura-display/cura-display.stories.d.ts +52 -14
- package/dist/types/components/text/cura-heading/cura-heading.d.ts +34 -17
- package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +58 -6
- package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +24 -12
- package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +47 -9
- package/dist/types/components.d.ts +139 -46
- package/dist/types/index.d.ts +9 -0
- package/package.json +2 -4
- package/dist/cjs/app-globals-0e3b7fc6.js.map +0 -1
- package/dist/cjs/cura-accordion_12.cjs.entry.js +0 -674
- package/dist/cjs/cura-accordion_12.cjs.entry.js.map +0 -1
- package/dist/cura/p-319699df.entry.js +0 -2
- package/dist/cura/p-319699df.entry.js.map +0 -1
- package/dist/cura/p-50ea2036.system.js +0 -2
- package/dist/cura/p-50ea2036.system.js.map +0 -1
- package/dist/cura/p-5250cb43.system.js +0 -2
- package/dist/cura/p-5250cb43.system.js.map +0 -1
- package/dist/cura/p-5cc3c8bd.system.entry.js +0 -2
- package/dist/cura/p-5cc3c8bd.system.entry.js.map +0 -1
- package/dist/cura/p-788e035b.system.js +0 -2
- package/dist/cura/p-788e035b.system.js.map +0 -1
- package/dist/cura/p-d5c64a5f.js +0 -2
- package/dist/cura/p-d5c64a5f.js.map +0 -1
- package/dist/esm/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm/cura-accordion_12.entry.js +0 -659
- package/dist/esm/cura-accordion_12.entry.js.map +0 -1
- package/dist/esm-es5/app-globals-cc003eaf.js +0 -2
- package/dist/esm-es5/app-globals-cc003eaf.js.map +0 -1
- package/dist/esm-es5/cura-accordion_12.entry.js +0 -2
- package/dist/esm-es5/cura-accordion_12.entry.js.map +0 -1
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
export declare class CuraParagraph {
|
|
2
2
|
/**
|
|
3
3
|
* Set size of body text.
|
|
4
|
-
* Values: regular (default) | large | small | caption.
|
|
4
|
+
* Values: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall.
|
|
5
5
|
*/
|
|
6
|
-
size: 'regular' | 'large' | 'small' | 'caption';
|
|
6
|
+
size: 'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall';
|
|
7
7
|
/**
|
|
8
|
-
* Apply
|
|
9
|
-
* Values:
|
|
10
|
-
*/
|
|
11
|
-
inverted: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Apply base system color to elements like <a> and <abbr>.
|
|
14
|
-
* Values: String primary(default) | secondary | accent | neutral | success | error | warning | info.
|
|
8
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text.
|
|
9
|
+
* Values: Color from design system scheme. Default to 'accent-dark'.
|
|
15
10
|
*/
|
|
16
11
|
spotColor: string;
|
|
17
12
|
/**
|
|
18
|
-
*
|
|
13
|
+
* Text color.
|
|
14
|
+
* Values: Color from design system scheme. Default to the font color from the theme.
|
|
19
15
|
*/
|
|
20
|
-
color:
|
|
16
|
+
color: string;
|
|
21
17
|
handleChangeColor(): void;
|
|
18
|
+
/**
|
|
19
|
+
* CSS margin-block property values.
|
|
20
|
+
* Default to 1.25em
|
|
21
|
+
*/
|
|
22
|
+
marginBlock: string;
|
|
23
|
+
/**
|
|
24
|
+
* CSS line-height property values.
|
|
25
|
+
* Default to 140%
|
|
26
|
+
*/
|
|
27
|
+
lineHeight: string;
|
|
22
28
|
/**
|
|
23
29
|
* Host element <cura-paragraph>
|
|
24
30
|
*/
|
|
@@ -27,11 +33,17 @@ export declare class CuraParagraph {
|
|
|
27
33
|
* Internal Props
|
|
28
34
|
*/
|
|
29
35
|
weights: any;
|
|
36
|
+
fontSizeBase: string;
|
|
30
37
|
styles: {};
|
|
38
|
+
theme: import("../../../api/cura-api.type").APIThemeFunctions;
|
|
31
39
|
connectedCallback(): void;
|
|
32
40
|
setsizeClass(): {};
|
|
33
41
|
setFontProperties(): void;
|
|
34
42
|
setColors(): void;
|
|
35
|
-
|
|
43
|
+
hostCSSProperties(): {
|
|
44
|
+
'--margin-block': string;
|
|
45
|
+
'--font-size-base': string;
|
|
46
|
+
'--line-height': string;
|
|
47
|
+
};
|
|
36
48
|
render(): any;
|
|
37
49
|
}
|
|
@@ -11,8 +11,11 @@ declare const _default: {
|
|
|
11
11
|
description: string;
|
|
12
12
|
name: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
control:
|
|
14
|
+
size: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
options: string[];
|
|
16
19
|
description: string;
|
|
17
20
|
table: {
|
|
18
21
|
category: string;
|
|
@@ -21,7 +24,7 @@ declare const _default: {
|
|
|
21
24
|
};
|
|
22
25
|
};
|
|
23
26
|
};
|
|
24
|
-
|
|
27
|
+
color: {
|
|
25
28
|
control: {
|
|
26
29
|
type: string;
|
|
27
30
|
};
|
|
@@ -40,6 +43,7 @@ declare const _default: {
|
|
|
40
43
|
};
|
|
41
44
|
options: string[];
|
|
42
45
|
description: string;
|
|
46
|
+
name: string;
|
|
43
47
|
table: {
|
|
44
48
|
category: string;
|
|
45
49
|
defaultValue: {
|
|
@@ -47,12 +51,43 @@ declare const _default: {
|
|
|
47
51
|
};
|
|
48
52
|
};
|
|
49
53
|
};
|
|
50
|
-
|
|
51
|
-
control:
|
|
52
|
-
|
|
54
|
+
marginBlock: {
|
|
55
|
+
control: string;
|
|
56
|
+
description: string;
|
|
57
|
+
name: string;
|
|
58
|
+
table: {
|
|
59
|
+
category: string;
|
|
60
|
+
defaultValue: {
|
|
61
|
+
summary: string;
|
|
62
|
+
};
|
|
53
63
|
};
|
|
54
|
-
|
|
64
|
+
};
|
|
65
|
+
lineHeight: {
|
|
66
|
+
control: string;
|
|
55
67
|
description: string;
|
|
68
|
+
name: string;
|
|
69
|
+
table: {
|
|
70
|
+
category: string;
|
|
71
|
+
defaultValue: {
|
|
72
|
+
summary: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
cssMarginBlock: {
|
|
77
|
+
control: string;
|
|
78
|
+
description: string;
|
|
79
|
+
name: string;
|
|
80
|
+
table: {
|
|
81
|
+
category: string;
|
|
82
|
+
defaultValue: {
|
|
83
|
+
summary: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
cssLineHeight: {
|
|
88
|
+
control: string;
|
|
89
|
+
description: string;
|
|
90
|
+
name: string;
|
|
56
91
|
table: {
|
|
57
92
|
category: string;
|
|
58
93
|
defaultValue: {
|
|
@@ -67,8 +102,11 @@ export declare const Paragraph: {
|
|
|
67
102
|
args: {
|
|
68
103
|
label: string;
|
|
69
104
|
size: string;
|
|
70
|
-
spotColor: string;
|
|
71
|
-
inverted: boolean;
|
|
72
105
|
color: string;
|
|
106
|
+
spotColor: string;
|
|
107
|
+
marginBlock: string;
|
|
108
|
+
lineHeight: string;
|
|
109
|
+
cssMarginBlock: string;
|
|
110
|
+
cssLineHeight: string;
|
|
73
111
|
};
|
|
74
112
|
};
|
|
@@ -206,43 +206,55 @@ export namespace Components {
|
|
|
206
206
|
}
|
|
207
207
|
interface CuraDisplay {
|
|
208
208
|
/**
|
|
209
|
-
*
|
|
209
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
210
210
|
*/
|
|
211
|
-
"
|
|
211
|
+
"color": string;
|
|
212
|
+
/**
|
|
213
|
+
* Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ... Values: 1(default) to 6.
|
|
214
|
+
*/
|
|
215
|
+
"level": 1 | 2 | 3 | 4 | 5 | 6;
|
|
212
216
|
/**
|
|
213
|
-
*
|
|
217
|
+
* CSS line-height property values. Default to 140%
|
|
214
218
|
*/
|
|
215
|
-
"
|
|
219
|
+
"lineHeight": string;
|
|
216
220
|
/**
|
|
217
|
-
*
|
|
221
|
+
* CSS margin-block property values. Default to 1.25em
|
|
218
222
|
*/
|
|
219
|
-
"
|
|
223
|
+
"marginBlock": string;
|
|
220
224
|
/**
|
|
221
|
-
* Apply
|
|
225
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
222
226
|
*/
|
|
223
227
|
"spotColor": string;
|
|
224
228
|
}
|
|
225
229
|
interface CuraHeading {
|
|
226
230
|
/**
|
|
227
|
-
*
|
|
231
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
232
|
+
*/
|
|
233
|
+
"color": string;
|
|
234
|
+
/**
|
|
235
|
+
* Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ... Values: 1(default) to 6.
|
|
236
|
+
*/
|
|
237
|
+
"level": 1 | 2 | 3 | 4 | 5 | 6;
|
|
238
|
+
/**
|
|
239
|
+
* CSS line-height property values. Default to 140%
|
|
228
240
|
*/
|
|
229
|
-
"
|
|
241
|
+
"lineHeight": string;
|
|
230
242
|
/**
|
|
231
|
-
*
|
|
243
|
+
* CSS margin-block property values. Default to 1.25em
|
|
232
244
|
*/
|
|
233
|
-
"
|
|
245
|
+
"marginBlock": string;
|
|
234
246
|
/**
|
|
235
|
-
* Heading style size. Values: small |
|
|
247
|
+
* Heading style size. Values: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall.
|
|
236
248
|
*/
|
|
237
|
-
"size":
|
|
249
|
+
"size": 'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall';
|
|
238
250
|
/**
|
|
239
|
-
* Apply
|
|
251
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
240
252
|
*/
|
|
241
253
|
"spotColor": string;
|
|
242
254
|
/**
|
|
243
|
-
* Heading font weight. Values: regular(default) | bold.
|
|
255
|
+
* Heading font weight. It is possible to use regular HTML tags like <b> or <strong> as well. Values: regular (default) | bold.
|
|
244
256
|
*/
|
|
245
|
-
"weight":
|
|
257
|
+
"weight": 'regular' | 'bold';
|
|
246
258
|
}
|
|
247
259
|
interface CuraIcon {
|
|
248
260
|
"color": string;
|
|
@@ -253,6 +265,32 @@ export namespace Components {
|
|
|
253
265
|
}
|
|
254
266
|
interface CuraIconsView {
|
|
255
267
|
}
|
|
268
|
+
interface CuraLabel {
|
|
269
|
+
/**
|
|
270
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
271
|
+
*/
|
|
272
|
+
"color": string;
|
|
273
|
+
/**
|
|
274
|
+
* CSS line-height property values. Default to 140%
|
|
275
|
+
*/
|
|
276
|
+
"lineHeight": string;
|
|
277
|
+
/**
|
|
278
|
+
* CSS margin-block property values. Default to 1.25em
|
|
279
|
+
*/
|
|
280
|
+
"marginBlock": string;
|
|
281
|
+
/**
|
|
282
|
+
* Set size of body text. Values: medium (default) | large | small | xsmall.
|
|
283
|
+
*/
|
|
284
|
+
"size": 'medium' | 'large' | 'small' | 'xsmall';
|
|
285
|
+
/**
|
|
286
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
287
|
+
*/
|
|
288
|
+
"spotColor": string;
|
|
289
|
+
/**
|
|
290
|
+
* Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well. Values: regular (default) | bold.
|
|
291
|
+
*/
|
|
292
|
+
"weight": 'regular' | 'bold';
|
|
293
|
+
}
|
|
256
294
|
interface CuraLoaderCircle {
|
|
257
295
|
/**
|
|
258
296
|
* One from color scheme. Default: neutral-white.
|
|
@@ -268,19 +306,23 @@ export namespace Components {
|
|
|
268
306
|
}
|
|
269
307
|
interface CuraParagraph {
|
|
270
308
|
/**
|
|
271
|
-
* Color
|
|
309
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
310
|
+
*/
|
|
311
|
+
"color": string;
|
|
312
|
+
/**
|
|
313
|
+
* CSS line-height property values. Default to 140%
|
|
272
314
|
*/
|
|
273
|
-
"
|
|
315
|
+
"lineHeight": string;
|
|
274
316
|
/**
|
|
275
|
-
*
|
|
317
|
+
* CSS margin-block property values. Default to 1.25em
|
|
276
318
|
*/
|
|
277
|
-
"
|
|
319
|
+
"marginBlock": string;
|
|
278
320
|
/**
|
|
279
|
-
* Set size of body text. Values: regular (default) | large | small | caption.
|
|
321
|
+
* Set size of body text. Values: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall.
|
|
280
322
|
*/
|
|
281
|
-
"size": 'regular' | 'large' | 'small' | 'caption';
|
|
323
|
+
"size": 'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall';
|
|
282
324
|
/**
|
|
283
|
-
* Apply
|
|
325
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
284
326
|
*/
|
|
285
327
|
"spotColor": string;
|
|
286
328
|
}
|
|
@@ -340,6 +382,12 @@ declare global {
|
|
|
340
382
|
prototype: HTMLCuraIconsViewElement;
|
|
341
383
|
new (): HTMLCuraIconsViewElement;
|
|
342
384
|
};
|
|
385
|
+
interface HTMLCuraLabelElement extends Components.CuraLabel, HTMLStencilElement {
|
|
386
|
+
}
|
|
387
|
+
var HTMLCuraLabelElement: {
|
|
388
|
+
prototype: HTMLCuraLabelElement;
|
|
389
|
+
new (): HTMLCuraLabelElement;
|
|
390
|
+
};
|
|
343
391
|
interface HTMLCuraLoaderCircleElement extends Components.CuraLoaderCircle, HTMLStencilElement {
|
|
344
392
|
}
|
|
345
393
|
var HTMLCuraLoaderCircleElement: {
|
|
@@ -368,6 +416,7 @@ declare global {
|
|
|
368
416
|
"cura-heading": HTMLCuraHeadingElement;
|
|
369
417
|
"cura-icon": HTMLCuraIconElement;
|
|
370
418
|
"cura-icons-view": HTMLCuraIconsViewElement;
|
|
419
|
+
"cura-label": HTMLCuraLabelElement;
|
|
371
420
|
"cura-loader-circle": HTMLCuraLoaderCircleElement;
|
|
372
421
|
"cura-page-template": HTMLCuraPageTemplateElement;
|
|
373
422
|
"cura-paragraph": HTMLCuraParagraphElement;
|
|
@@ -574,43 +623,55 @@ declare namespace LocalJSX {
|
|
|
574
623
|
}
|
|
575
624
|
interface CuraDisplay {
|
|
576
625
|
/**
|
|
577
|
-
*
|
|
626
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
627
|
+
*/
|
|
628
|
+
"color"?: string;
|
|
629
|
+
/**
|
|
630
|
+
* Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ... Values: 1(default) to 6.
|
|
578
631
|
*/
|
|
579
|
-
"
|
|
632
|
+
"level"?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
580
633
|
/**
|
|
581
|
-
*
|
|
634
|
+
* CSS line-height property values. Default to 140%
|
|
582
635
|
*/
|
|
583
|
-
"
|
|
636
|
+
"lineHeight"?: string;
|
|
584
637
|
/**
|
|
585
|
-
*
|
|
638
|
+
* CSS margin-block property values. Default to 1.25em
|
|
586
639
|
*/
|
|
587
|
-
"
|
|
640
|
+
"marginBlock"?: string;
|
|
588
641
|
/**
|
|
589
|
-
* Apply
|
|
642
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
590
643
|
*/
|
|
591
644
|
"spotColor"?: string;
|
|
592
645
|
}
|
|
593
646
|
interface CuraHeading {
|
|
594
647
|
/**
|
|
595
|
-
*
|
|
648
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
649
|
+
*/
|
|
650
|
+
"color"?: string;
|
|
651
|
+
/**
|
|
652
|
+
* Heading level for semantics. Will render the related HTML tag <h1>, <h2>, ... Values: 1(default) to 6.
|
|
596
653
|
*/
|
|
597
|
-
"
|
|
654
|
+
"level"?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
598
655
|
/**
|
|
599
|
-
*
|
|
656
|
+
* CSS line-height property values. Default to 140%
|
|
600
657
|
*/
|
|
601
|
-
"
|
|
658
|
+
"lineHeight"?: string;
|
|
602
659
|
/**
|
|
603
|
-
*
|
|
660
|
+
* CSS margin-block property values. Default to 1.25em
|
|
604
661
|
*/
|
|
605
|
-
"
|
|
662
|
+
"marginBlock"?: string;
|
|
606
663
|
/**
|
|
607
|
-
*
|
|
664
|
+
* Heading style size. Values: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall.
|
|
665
|
+
*/
|
|
666
|
+
"size"?: 'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall';
|
|
667
|
+
/**
|
|
668
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
608
669
|
*/
|
|
609
670
|
"spotColor"?: string;
|
|
610
671
|
/**
|
|
611
|
-
* Heading font weight. Values: regular(default) | bold.
|
|
672
|
+
* Heading font weight. It is possible to use regular HTML tags like <b> or <strong> as well. Values: regular (default) | bold.
|
|
612
673
|
*/
|
|
613
|
-
"weight"?:
|
|
674
|
+
"weight"?: 'regular' | 'bold';
|
|
614
675
|
}
|
|
615
676
|
interface CuraIcon {
|
|
616
677
|
"color"?: string;
|
|
@@ -621,6 +682,32 @@ declare namespace LocalJSX {
|
|
|
621
682
|
}
|
|
622
683
|
interface CuraIconsView {
|
|
623
684
|
}
|
|
685
|
+
interface CuraLabel {
|
|
686
|
+
/**
|
|
687
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
688
|
+
*/
|
|
689
|
+
"color"?: string;
|
|
690
|
+
/**
|
|
691
|
+
* CSS line-height property values. Default to 140%
|
|
692
|
+
*/
|
|
693
|
+
"lineHeight"?: string;
|
|
694
|
+
/**
|
|
695
|
+
* CSS margin-block property values. Default to 1.25em
|
|
696
|
+
*/
|
|
697
|
+
"marginBlock"?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Set size of body text. Values: medium (default) | large | small | xsmall.
|
|
700
|
+
*/
|
|
701
|
+
"size"?: 'medium' | 'large' | 'small' | 'xsmall';
|
|
702
|
+
/**
|
|
703
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
704
|
+
*/
|
|
705
|
+
"spotColor"?: string;
|
|
706
|
+
/**
|
|
707
|
+
* Label font weight. It is possible to use regular HTML tags like <b> or <strong> as well. Values: regular (default) | bold.
|
|
708
|
+
*/
|
|
709
|
+
"weight"?: 'regular' | 'bold';
|
|
710
|
+
}
|
|
624
711
|
interface CuraLoaderCircle {
|
|
625
712
|
/**
|
|
626
713
|
* One from color scheme. Default: neutral-white.
|
|
@@ -636,19 +723,23 @@ declare namespace LocalJSX {
|
|
|
636
723
|
}
|
|
637
724
|
interface CuraParagraph {
|
|
638
725
|
/**
|
|
639
|
-
* Color
|
|
726
|
+
* Text color. Values: Color from design system scheme. Default to the font color from the theme.
|
|
727
|
+
*/
|
|
728
|
+
"color"?: string;
|
|
729
|
+
/**
|
|
730
|
+
* CSS line-height property values. Default to 140%
|
|
640
731
|
*/
|
|
641
|
-
"
|
|
732
|
+
"lineHeight"?: string;
|
|
642
733
|
/**
|
|
643
|
-
*
|
|
734
|
+
* CSS margin-block property values. Default to 1.25em
|
|
644
735
|
*/
|
|
645
|
-
"
|
|
736
|
+
"marginBlock"?: string;
|
|
646
737
|
/**
|
|
647
|
-
* Set size of body text. Values: regular (default) | large | small | caption.
|
|
738
|
+
* Set size of body text. Values: regular (deprecated), medium (default) | large | small | caption (deprecated) | xsmall.
|
|
648
739
|
*/
|
|
649
|
-
"size"?: 'regular' | 'large' | 'small' | 'caption';
|
|
740
|
+
"size"?: 'regular' | 'medium' | 'large' | 'small' | 'caption' | 'xsmall';
|
|
650
741
|
/**
|
|
651
|
-
* Apply
|
|
742
|
+
* Apply design system color to interactive elements like <a> and <abbr> inside the text. Values: Color from design system scheme. Default to 'accent-dark'.
|
|
652
743
|
*/
|
|
653
744
|
"spotColor"?: string;
|
|
654
745
|
}
|
|
@@ -662,6 +753,7 @@ declare namespace LocalJSX {
|
|
|
662
753
|
"cura-heading": CuraHeading;
|
|
663
754
|
"cura-icon": CuraIcon;
|
|
664
755
|
"cura-icons-view": CuraIconsView;
|
|
756
|
+
"cura-label": CuraLabel;
|
|
665
757
|
"cura-loader-circle": CuraLoaderCircle;
|
|
666
758
|
"cura-page-template": CuraPageTemplate;
|
|
667
759
|
"cura-paragraph": CuraParagraph;
|
|
@@ -680,6 +772,7 @@ declare module "@stencil/core" {
|
|
|
680
772
|
"cura-heading": LocalJSX.CuraHeading & JSXBase.HTMLAttributes<HTMLCuraHeadingElement>;
|
|
681
773
|
"cura-icon": LocalJSX.CuraIcon & JSXBase.HTMLAttributes<HTMLCuraIconElement>;
|
|
682
774
|
"cura-icons-view": LocalJSX.CuraIconsView & JSXBase.HTMLAttributes<HTMLCuraIconsViewElement>;
|
|
775
|
+
"cura-label": LocalJSX.CuraLabel & JSXBase.HTMLAttributes<HTMLCuraLabelElement>;
|
|
683
776
|
"cura-loader-circle": LocalJSX.CuraLoaderCircle & JSXBase.HTMLAttributes<HTMLCuraLoaderCircleElement>;
|
|
684
777
|
"cura-page-template": LocalJSX.CuraPageTemplate & JSXBase.HTMLAttributes<HTMLCuraPageTemplateElement>;
|
|
685
778
|
"cura-paragraph": LocalJSX.CuraParagraph & JSXBase.HTMLAttributes<HTMLCuraParagraphElement>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
1
|
export { Components, JSX } from './components';
|
|
2
|
+
import CuraAPI from './api/cura-api';
|
|
3
|
+
import { CuraConfig } from './api/cura-api.type';
|
|
4
|
+
declare global {
|
|
5
|
+
export interface Window {
|
|
6
|
+
CuraAPI?: CuraAPI;
|
|
7
|
+
CuraInit?: CuraConfig;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare function CuraInit(options: CuraConfig, w?: Window & typeof globalThis): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rededor/cura",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Cura Design System",
|
|
5
5
|
"author": "Rede D`Or São Luiz",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,10 +30,8 @@
|
|
|
30
30
|
"@stencil/core": "^3.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@stencil/angular-output-target": "^0.5.0",
|
|
34
33
|
"@stencil/react-output-target": "^0.4.0",
|
|
35
34
|
"@stencil/sass": "^2.0.3",
|
|
36
|
-
"@stencil/vue-output-target": "^0.7.0",
|
|
37
35
|
"@storybook/addon-essentials": "^7.6.7",
|
|
38
36
|
"@storybook/addon-interactions": "^7.6.7",
|
|
39
37
|
"@storybook/addon-links": "^7.6.7",
|
|
@@ -50,5 +48,5 @@
|
|
|
50
48
|
"storybook": "^7.6.7",
|
|
51
49
|
"svgo": "^3.0.1"
|
|
52
50
|
},
|
|
53
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "33b8e569445ba39e483a0f917284fd07e66cd5c0"
|
|
54
52
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"app-globals-0e3b7fc6.js","mappings":";;AAAA;;;AAGO,MAAM,YAAY,GAAG;;EAE1B,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,UAAU;MACjB,KAAK,EAAE,SAAS;KACjB;IACD,SAAS,EAAE;MACT,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,UAAU;KAClB;IACD,MAAM,EAAE;MACN,KAAK,EAAE,aAAa;MACpB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,WAAW;MAClB,KAAK,EAAE,YAAY;MACnB,KAAK,EAAE,WAAW;KACnB;GACF;;EAED,OAAO,EAAE;IACP,IAAI,EAAE,CAA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C;IACD,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE;MAChC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;KAC1C;SAAM;MACL,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;MAChE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;GACF;;;;ECvBD,MAAM,MAAM,GAAG,MAAM,CAAC;EACtB,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI;EAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;EAC3B,MAAM,CAAC,aAAa,CAAC,IAAI;EACzB,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;IAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E;;ACjBY,MAAC,aAAa,GAAG;;;;","names":[],"sources":["./src/api/theme-presets/theme-default.ts","./src/api/theme-presets/theme-maternity.ts","./src/api/theme-presets/theme-oncology.ts","./src/api/theme-presets/theme-legacy-default.ts","./src/api/theme-presets/theme-presets.ts","./src/api/theme-presets/static.ts","./src/api/modules/cura-theme-colors-module.ts","./src/api/modules/cura-theme-spacing-module.ts","./src/api/modules/cura-theme-fonts-module.ts","./src/api/modules/cura-theme-breakpoints-module.ts","./src/api/modules/cura-theme-module.ts","./src/api/cura-api.ts","./src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '113,197,232',\n '300': '68,142,205',\n '500': '0,61,165',\n '700': '0,48,117',\n '900': '0,40,85'\n },\n secondary: {\n '100': '245,236,227',\n '300': '221,192,162',\n '500': '204,160,116',\n '700': '136,107,77',\n '900': '41,32,23'\n },\n accent: {\n '100': '255,194,123',\n '300': '255,168,74',\n '500': '255,130,0',\n '700': '215,114,10',\n '900': '155,90,26'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '248,227,226',\n '300': '255,179,171',\n '500': '218,113,111',\n '700': '145,75,74',\n '900': '73,38,37'\n },\n secondary: {\n '100': '253,251,249',\n '300': '247,244,238',\n '500': '245,236,227',\n '700': '204,197,189',\n '900': '163,157,151'\n },\n accent: {\n '100': '236,239,249',\n '300': '133,153,203',\n '500': '11,20,151',\n '700': '7,13,101',\n '900': '4,7,50'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 325,\n light: 325,\n regular: 325,\n medium: 350,\n bold: 400,\n black: 425\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '170,190,225',\n '300': '85,126,196',\n '500': '0,61,166',\n '700': '0,41,111',\n '900': '0,12,33'\n },\n secondary: {\n '100': '205,215,227',\n '300': '155,175,199',\n '500': '104,134,171',\n '700': '54,95,143',\n '900': '4,54,115',\n },\n accent: {\n '100': '153,207,255',\n '300': '71,169,255',\n '500': '0,131,245',\n '700': '0,109,204',\n '900': '0,88,164',\n },\n aux: {\n '100': '218,242,239',\n '300': '132,212,202',\n '500': '71,191,176',\n '700': '33,100,92',\n '900': '14,38,35',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Legacy Default Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeLegacyDefault = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '204,217,231',\n '300': '85,128,174',\n '500': '0,65,134',\n '700': '0,43,89',\n '900': '0,13,27'\n },\n secondary: {\n '100': '238,232,206',\n '300': '198,180,92',\n '500': '170,142,11',\n '700': '113,95,7',\n '900': '34,28,2'\n },\n accent: {\n '100': '249,232,213',\n '300': '228,160,79',\n '500': '223,141,44',\n '700': '149,94,29',\n '900': '45,28,9'\n }\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1919\n },\n xlarge: {\n min: 1920,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n\n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.rootElement = window.document.documentElement;\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.rootElement.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|