@omnia/velcron 7.0.525-dev → 7.0.527-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/theming/BlueprintDefinition.d.ts +4 -0
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +4 -3
- package/internal-do-not-import-from-here/shared/models/theming/TypographyDefinition.d.ts +1 -0
- package/models/Enums.d.ts +2 -1
- package/models/Enums.js +1 -0
- package/models/VelcronDefinitions.d.ts +3 -2
- package/package.json +1 -1
- package/parser/VelcronRenderers.d.ts +1 -0
- package/stores/VelcronTheming.d.ts +1 -0
- package/stores/VelcronTheming.js +21 -1
|
@@ -9,9 +9,9 @@ export interface ColorDefinition {
|
|
|
9
9
|
colorTonedStyles: ColorStyles;
|
|
10
10
|
}
|
|
11
11
|
export interface ColorStyles {
|
|
12
|
-
background: object;
|
|
13
|
-
color: object;
|
|
14
|
-
all: object;
|
|
12
|
+
background: object | string;
|
|
13
|
+
color: object | string;
|
|
14
|
+
all: object | string;
|
|
15
15
|
}
|
|
16
16
|
export interface ColorSchema {
|
|
17
17
|
name: string;
|
|
@@ -26,6 +26,7 @@ export interface ColorGroup {
|
|
|
26
26
|
}
|
|
27
27
|
export interface ThemeDefinitionV2 {
|
|
28
28
|
id: Guid;
|
|
29
|
+
name: string;
|
|
29
30
|
dark: boolean;
|
|
30
31
|
primary: ColorSchema;
|
|
31
32
|
secondary: ColorSchema;
|
package/models/Enums.d.ts
CHANGED
package/models/Enums.js
CHANGED
|
@@ -49,6 +49,7 @@ var VelcronComponentPropertyEditors;
|
|
|
49
49
|
VelcronComponentPropertyEditors[VelcronComponentPropertyEditors["colorPicker"] = 3] = "colorPicker";
|
|
50
50
|
VelcronComponentPropertyEditors[VelcronComponentPropertyEditors["typographyPicker"] = 4] = "typographyPicker";
|
|
51
51
|
VelcronComponentPropertyEditors[VelcronComponentPropertyEditors["ratioPicker"] = 5] = "ratioPicker";
|
|
52
|
+
VelcronComponentPropertyEditors[VelcronComponentPropertyEditors["booleanPicker"] = 6] = "booleanPicker";
|
|
52
53
|
})(VelcronComponentPropertyEditors = exports.VelcronComponentPropertyEditors || (exports.VelcronComponentPropertyEditors = {}));
|
|
53
54
|
var VelcronDataTypes;
|
|
54
55
|
(function (VelcronDataTypes) {
|
|
@@ -110,6 +110,7 @@ export interface VelcronDefinitionBase {
|
|
|
110
110
|
}
|
|
111
111
|
export interface VelcronCustomThemeSettings {
|
|
112
112
|
colorSchema?: string;
|
|
113
|
+
color?: string;
|
|
113
114
|
opacity?: number;
|
|
114
115
|
}
|
|
115
116
|
export interface VelcronDefinition extends VelcronDefinitionBase {
|
|
@@ -224,10 +225,10 @@ export interface VelcronDialogDefinition extends VelcronDefinition {
|
|
|
224
225
|
visible: string;
|
|
225
226
|
events?: VelcronOnCloseRequestedEvent & VelcronOnClosedEvent;
|
|
226
227
|
}
|
|
227
|
-
export interface VelcronIconDefinition extends VelcronDefinition {
|
|
228
|
+
export interface VelcronIconDefinition extends VelcronDefinition, VelcronCustomThemeSettings {
|
|
228
229
|
type: "Icon";
|
|
229
230
|
icon: string;
|
|
230
|
-
|
|
231
|
+
background?: boolean;
|
|
231
232
|
size?: number;
|
|
232
233
|
events?: VelcronOnPressEvent;
|
|
233
234
|
}
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ export declare class VelcronRenderers {
|
|
|
17
17
|
colorSchema: (schema: string) => import("@omnia/fx-models").ColorSchema;
|
|
18
18
|
typography: (name: string) => import("@omnia/fx-models").TypographyType;
|
|
19
19
|
color: (schemaName: string, colorType: string) => string;
|
|
20
|
+
complementaryColor: (colorType: string) => string;
|
|
20
21
|
};
|
|
21
22
|
actions: {
|
|
22
23
|
setTheme(newTheme: import("@omnia/fx-models").ThemeDefinitionV2): void;
|
|
@@ -7,6 +7,7 @@ export declare const useVelcronThemingStore: (newStateWithName?: string) => {
|
|
|
7
7
|
colorSchema: (schema: string) => import("..").ColorSchema;
|
|
8
8
|
typography: (name: string) => TypographyType;
|
|
9
9
|
color: (schemaName: string, colorType: string) => string;
|
|
10
|
+
complementaryColor: (colorType: string) => string;
|
|
10
11
|
};
|
|
11
12
|
actions: {
|
|
12
13
|
setTheme(newTheme: ThemeDefinitionV2): void;
|
package/stores/VelcronTheming.js
CHANGED
|
@@ -60,6 +60,25 @@ exports.useVelcronThemingStore = (0, VelcronStore_1.defineVelcronStore)("Velcron
|
|
|
60
60
|
}
|
|
61
61
|
return state.currentTheme.typography.text;
|
|
62
62
|
};
|
|
63
|
+
const complementaryColor = (colorType) => {
|
|
64
|
+
if (colorType === __1.ColorTypes.base
|
|
65
|
+
|| colorType === __1.ColorTypes.baseTone) {
|
|
66
|
+
return __1.ColorTypes.onBase;
|
|
67
|
+
}
|
|
68
|
+
else if (colorType === __1.ColorTypes.onBase
|
|
69
|
+
|| colorType === __1.ColorTypes.onBaseTone) {
|
|
70
|
+
return __1.ColorTypes.base;
|
|
71
|
+
}
|
|
72
|
+
else if (colorType === __1.ColorTypes.container
|
|
73
|
+
|| colorType === __1.ColorTypes.containerTone) {
|
|
74
|
+
return __1.ColorTypes.onContainer;
|
|
75
|
+
}
|
|
76
|
+
else if (colorType === __1.ColorTypes.onContainer
|
|
77
|
+
|| colorType === __1.ColorTypes.onContainerTone) {
|
|
78
|
+
return __1.ColorTypes.container;
|
|
79
|
+
}
|
|
80
|
+
return colorType;
|
|
81
|
+
};
|
|
63
82
|
const color = (schemaName, colorType) => {
|
|
64
83
|
const mappedColorSchema = colorSchema(schemaName);
|
|
65
84
|
if (colorType === __1.ColorTypes.base) {
|
|
@@ -91,7 +110,8 @@ exports.useVelcronThemingStore = (0, VelcronStore_1.defineVelcronStore)("Velcron
|
|
|
91
110
|
return {
|
|
92
111
|
colorSchema,
|
|
93
112
|
typography,
|
|
94
|
-
color
|
|
113
|
+
color,
|
|
114
|
+
complementaryColor
|
|
95
115
|
};
|
|
96
116
|
},
|
|
97
117
|
actions(state) {
|