@omnia/velcron 8.0.403-dev → 8.0.405-dev
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/internal-do-not-import-from-here/shared/models/SharedConstants.d.ts +1 -0
- package/internal-do-not-import-from-here/shared/models/SharedConstants.js +1 -0
- package/internal-do-not-import-from-here/shared/models/theme/Typography.d.ts +32 -36
- package/internal-do-not-import-from-here/shared/models/theme/Typography.js +5 -14
- package/package.json +1 -1
- package/stores/VelcronTheming.js +8 -2
|
@@ -19,20 +19,24 @@ export interface TypographyBlueprint extends ThemeBase {
|
|
|
19
19
|
baseFontSize?: BaseScaleBreakpoint;
|
|
20
20
|
scale?: BaseScaleBreakpoint;
|
|
21
21
|
lineHeightMultiplier?: BaseScaleBreakpoint;
|
|
22
|
-
styles: {
|
|
23
|
-
s1: TextStyleDefinition;
|
|
24
|
-
s2: TextStyleDefinition;
|
|
25
|
-
s3: TextStyleDefinition;
|
|
26
|
-
s4: TextStyleDefinition;
|
|
27
|
-
s5: TextStyleDefinition;
|
|
28
|
-
s6: TextStyleDefinition;
|
|
29
|
-
s7: TextStyleDefinition;
|
|
30
|
-
s8: TextStyleDefinition;
|
|
31
|
-
s9: TextStyleDefinition;
|
|
32
|
-
s10: TextStyleDefinition;
|
|
33
|
-
};
|
|
34
22
|
};
|
|
35
23
|
variants?: VariantBlueprints<TextStyleDefinition>;
|
|
24
|
+
display?: {
|
|
25
|
+
xl: TextStyleDefinition;
|
|
26
|
+
l: TextStyleDefinition;
|
|
27
|
+
m: TextStyleDefinition;
|
|
28
|
+
s: TextStyleDefinition;
|
|
29
|
+
xs: TextStyleDefinition;
|
|
30
|
+
font?: TypographyFontRef;
|
|
31
|
+
};
|
|
32
|
+
headline?: {
|
|
33
|
+
xl: TextStyleDefinition;
|
|
34
|
+
l: TextStyleDefinition;
|
|
35
|
+
m: TextStyleDefinition;
|
|
36
|
+
s: TextStyleDefinition;
|
|
37
|
+
xs: TextStyleDefinition;
|
|
38
|
+
font?: TypographyFontRef;
|
|
39
|
+
};
|
|
36
40
|
title?: {
|
|
37
41
|
xl: TextStyleDefinition;
|
|
38
42
|
l: TextStyleDefinition;
|
|
@@ -49,15 +53,15 @@ export interface TypographyBlueprint extends ThemeBase {
|
|
|
49
53
|
xs: TextStyleDefinition;
|
|
50
54
|
font?: TypographyFontRef;
|
|
51
55
|
};
|
|
52
|
-
|
|
53
|
-
xl
|
|
54
|
-
l
|
|
56
|
+
label?: {
|
|
57
|
+
xl: TextStyleDefinition;
|
|
58
|
+
l: TextStyleDefinition;
|
|
55
59
|
m: TextStyleDefinition;
|
|
56
|
-
s
|
|
57
|
-
xs
|
|
60
|
+
s: TextStyleDefinition;
|
|
61
|
+
xs: TextStyleDefinition;
|
|
58
62
|
font?: TypographyFontRef;
|
|
59
63
|
};
|
|
60
|
-
|
|
64
|
+
navigation?: {
|
|
61
65
|
xl?: TextStyleDefinition;
|
|
62
66
|
l?: TextStyleDefinition;
|
|
63
67
|
m: TextStyleDefinition;
|
|
@@ -65,7 +69,7 @@ export interface TypographyBlueprint extends ThemeBase {
|
|
|
65
69
|
xs?: TextStyleDefinition;
|
|
66
70
|
font?: TypographyFontRef;
|
|
67
71
|
};
|
|
68
|
-
|
|
72
|
+
button?: {
|
|
69
73
|
xl?: TextStyleDefinition;
|
|
70
74
|
l?: TextStyleDefinition;
|
|
71
75
|
m: TextStyleDefinition;
|
|
@@ -86,10 +90,12 @@ export interface TextStyleDefinition {
|
|
|
86
90
|
name?: string;
|
|
87
91
|
}
|
|
88
92
|
export interface TextStyleBreakPoint {
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
customSize?: boolean;
|
|
94
|
+
customLineHeight?: boolean;
|
|
91
95
|
size?: number;
|
|
92
96
|
lineHeight?: number;
|
|
97
|
+
weight?: number;
|
|
98
|
+
lineHeightMultiplier?: number;
|
|
93
99
|
letterSpacing?: number;
|
|
94
100
|
}
|
|
95
101
|
export interface TypographyFontRef {
|
|
@@ -97,19 +103,19 @@ export interface TypographyFontRef {
|
|
|
97
103
|
}
|
|
98
104
|
export type TextStyleType = keyof typeof TextStyleTypes;
|
|
99
105
|
export declare enum TextStyleTypes {
|
|
106
|
+
display = "display",
|
|
107
|
+
headline = "headline",
|
|
100
108
|
title = "title",
|
|
101
109
|
text = "text",
|
|
102
|
-
navigation = "navigation",
|
|
103
110
|
label = "label",
|
|
104
|
-
variants = "variants"
|
|
105
|
-
fills = "fills",
|
|
106
|
-
typeScale = "typeScale"
|
|
111
|
+
variants = "variants"
|
|
107
112
|
}
|
|
108
113
|
export interface ThemedTextStyleValue {
|
|
109
114
|
type: TextStyleType;
|
|
110
115
|
size: TextStyleSize;
|
|
111
116
|
}
|
|
112
117
|
export type TextStyleValue = TextStyleDefinition | ThemedTextStyleValue;
|
|
118
|
+
export type TextStyleBreakpointType = "lg" | "md" | "sm";
|
|
113
119
|
export type TextStyleSize = keyof typeof TextStyleSizes;
|
|
114
120
|
export declare enum TextStyleSizes {
|
|
115
121
|
xl = "xl",
|
|
@@ -124,17 +130,7 @@ export declare enum TextStyleSizes {
|
|
|
124
130
|
variant5 = "variant5",
|
|
125
131
|
variant6 = "variant6",
|
|
126
132
|
variant7 = "variant7",
|
|
127
|
-
variant8 = "variant8"
|
|
128
|
-
scale1 = "s1",
|
|
129
|
-
scale2 = "s2",
|
|
130
|
-
scale3 = "s3",
|
|
131
|
-
scale4 = "s4",
|
|
132
|
-
scale5 = "s5",
|
|
133
|
-
scale6 = "s6",
|
|
134
|
-
scale7 = "s7",
|
|
135
|
-
scale8 = "s8",
|
|
136
|
-
scale9 = "s9",
|
|
137
|
-
scale10 = "s10"
|
|
133
|
+
variant8 = "variant8"
|
|
138
134
|
}
|
|
139
135
|
/**this reflect TypographySizes for member check*/
|
|
140
136
|
export declare const AvailableTextStyleSizes: string[];
|
|
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AvailableTextStyleSizes = exports.TextStyleSizes = exports.TextStyleTypes = void 0;
|
|
4
4
|
var TextStyleTypes;
|
|
5
5
|
(function (TextStyleTypes) {
|
|
6
|
+
TextStyleTypes["display"] = "display";
|
|
7
|
+
TextStyleTypes["headline"] = "headline";
|
|
6
8
|
TextStyleTypes["title"] = "title";
|
|
7
9
|
TextStyleTypes["text"] = "text";
|
|
8
|
-
TextStyleTypes["navigation"] = "navigation";
|
|
9
10
|
TextStyleTypes["label"] = "label";
|
|
11
|
+
//navigation = "navigation",
|
|
10
12
|
//button = "button",
|
|
11
13
|
TextStyleTypes["variants"] = "variants";
|
|
12
|
-
|
|
13
|
-
TextStyleTypes["typeScale"] = "typeScale";
|
|
14
|
+
//fills = "fills",
|
|
14
15
|
})(TextStyleTypes || (exports.TextStyleTypes = TextStyleTypes = {}));
|
|
15
16
|
var TextStyleSizes;
|
|
16
17
|
(function (TextStyleSizes) {
|
|
@@ -27,16 +28,6 @@ var TextStyleSizes;
|
|
|
27
28
|
TextStyleSizes["variant6"] = "variant6";
|
|
28
29
|
TextStyleSizes["variant7"] = "variant7";
|
|
29
30
|
TextStyleSizes["variant8"] = "variant8";
|
|
30
|
-
TextStyleSizes["scale1"] = "s1";
|
|
31
|
-
TextStyleSizes["scale2"] = "s2";
|
|
32
|
-
TextStyleSizes["scale3"] = "s3";
|
|
33
|
-
TextStyleSizes["scale4"] = "s4";
|
|
34
|
-
TextStyleSizes["scale5"] = "s5";
|
|
35
|
-
TextStyleSizes["scale6"] = "s6";
|
|
36
|
-
TextStyleSizes["scale7"] = "s7";
|
|
37
|
-
TextStyleSizes["scale8"] = "s8";
|
|
38
|
-
TextStyleSizes["scale9"] = "s9";
|
|
39
|
-
TextStyleSizes["scale10"] = "s10";
|
|
40
31
|
})(TextStyleSizes || (exports.TextStyleSizes = TextStyleSizes = {}));
|
|
41
32
|
/**this reflect TypographySizes for member check*/
|
|
42
|
-
exports.AvailableTextStyleSizes = ["xl", "l", "m", "s", "xs", "variant1", "variant2", "variant3", "variant4", "variant5", "variant6", "variant7", "variant8"
|
|
33
|
+
exports.AvailableTextStyleSizes = ["xl", "l", "m", "s", "xs", "variant1", "variant2", "variant3", "variant4", "variant5", "variant6", "variant7", "variant8"];
|
package/package.json
CHANGED
package/stores/VelcronTheming.js
CHANGED
|
@@ -33,8 +33,14 @@ exports.useVelcronThemingStore = (0, VelcronStore_1.defineVelcronStore)("Velcron
|
|
|
33
33
|
else if (typographyType === __1.TextStyleTypes.title) {
|
|
34
34
|
return typography.title[size];
|
|
35
35
|
}
|
|
36
|
-
else if (typographyType === __1.TextStyleTypes.
|
|
37
|
-
return typography.
|
|
36
|
+
else if (typographyType === __1.TextStyleTypes.display) {
|
|
37
|
+
return typography.display[size];
|
|
38
|
+
}
|
|
39
|
+
else if (typographyType === __1.TextStyleTypes.headline) {
|
|
40
|
+
return typography.headline[size];
|
|
41
|
+
}
|
|
42
|
+
else if (typographyType === __1.TextStyleTypes.label) {
|
|
43
|
+
return typography.label[size];
|
|
38
44
|
}
|
|
39
45
|
},
|
|
40
46
|
color: (colorSchemaType, colorType) => {
|