@omnia/velcron 8.0.134-dev → 8.0.135-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/Blueprints.d.ts +38 -42
- package/internal-do-not-import-from-here/shared/models/theming/ThemeDefinitionV2.d.ts +29 -7
- package/package.json +1 -1
- package/stores/VelcronColorSchema.d.ts +0 -3
- package/stores/VelcronTheming.d.ts +1 -4
- package/stores/VelcronTheming.js +3 -6
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { BackgroundDefinition, ColorSchemaType, ColorValue, FillDefinition } from "./ThemeDefinitionV2";
|
|
1
|
+
import { BackgroundDefinition, BlueprintsReference, ColorSchemaType, ColorValue, FillDefinition } from "./ThemeDefinitionV2";
|
|
2
2
|
import { SpacingDefinition, Spacing } from "./Spacing";
|
|
3
3
|
import { TypographyValue } from "./Typography";
|
|
4
4
|
export interface BoxDimensions extends Spacing {
|
|
5
5
|
}
|
|
6
6
|
import { TypographyBlueprint } from "./Typography";
|
|
7
|
-
import {
|
|
7
|
+
import { GuidValue, VelcronAppDefinition } from "@omnia/fx-models";
|
|
8
8
|
export interface Blueprints {
|
|
9
|
-
id: Guid;
|
|
10
9
|
name?: string;
|
|
11
10
|
}
|
|
12
11
|
export type BlueprintVariant = "primary" | "secondary" | "variant1" | "variant2" | "variant3";
|
|
13
12
|
export type ButtonBlueprintType = "text" | "icon";
|
|
14
|
-
export interface ChromeBlueprints extends Blueprints {
|
|
13
|
+
export interface ChromeBlueprints extends Blueprints, BlueprintsReference {
|
|
15
14
|
primary: ChromeBlueprint;
|
|
16
15
|
variant1?: ChromeBlueprint;
|
|
17
16
|
variant2?: ChromeBlueprint;
|
|
18
17
|
variant3?: ChromeBlueprint;
|
|
19
18
|
}
|
|
20
|
-
export interface TypographyBlueprints extends Blueprints {
|
|
19
|
+
export interface TypographyBlueprints extends Blueprints, BlueprintsReference {
|
|
21
20
|
primary: TypographyBlueprint;
|
|
22
21
|
}
|
|
23
|
-
export interface SpacingBlueprints extends Blueprints {
|
|
22
|
+
export interface SpacingBlueprints extends Blueprints, BlueprintsReference {
|
|
24
23
|
primary: SpacingBlueprint;
|
|
25
24
|
}
|
|
26
25
|
export interface ChromeBlueprint {
|
|
@@ -36,37 +35,9 @@ export interface ChromeBlueprint {
|
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
37
|
export type ButtonTypes = "primary" | "basic" | "accent1" | "warn" | "link" | "variant1" | "variant2" | "variant3" | "variant4";
|
|
39
|
-
export interface ComponentBlueprints extends Blueprints {
|
|
40
|
-
buttons?:
|
|
41
|
-
|
|
42
|
-
primary?: ButtonBlueprint;
|
|
43
|
-
basic?: ButtonBlueprint;
|
|
44
|
-
accent1?: ButtonBlueprint;
|
|
45
|
-
warn?: ButtonBlueprint;
|
|
46
|
-
link?: ButtonBlueprint;
|
|
47
|
-
variant1?: ButtonBlueprint;
|
|
48
|
-
variant2?: ButtonBlueprint;
|
|
49
|
-
variant3?: ButtonBlueprint;
|
|
50
|
-
variant4?: ButtonBlueprint;
|
|
51
|
-
};
|
|
52
|
-
icon?: {
|
|
53
|
-
primary?: ButtonBlueprint;
|
|
54
|
-
basic?: ButtonBlueprint;
|
|
55
|
-
accent1?: ButtonBlueprint;
|
|
56
|
-
warn?: ButtonBlueprint;
|
|
57
|
-
link?: ButtonBlueprint;
|
|
58
|
-
variant1?: ButtonBlueprint;
|
|
59
|
-
variant2?: ButtonBlueprint;
|
|
60
|
-
variant3?: ButtonBlueprint;
|
|
61
|
-
variant4?: ButtonBlueprint;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
tabs?: {
|
|
65
|
-
primary?: TabsBlueprint;
|
|
66
|
-
variant1?: TabsBlueprint;
|
|
67
|
-
variant2?: TabsBlueprint;
|
|
68
|
-
variant3?: TabsBlueprint;
|
|
69
|
-
};
|
|
38
|
+
export interface ComponentBlueprints extends Blueprints, BlueprintsReference {
|
|
39
|
+
buttons?: ButtonBlueprints;
|
|
40
|
+
tabs?: TabsBlueprints;
|
|
70
41
|
blocks?: ChromeBlueprints;
|
|
71
42
|
}
|
|
72
43
|
export interface SpacingBlueprint {
|
|
@@ -87,20 +58,47 @@ export interface Blueprint {
|
|
|
87
58
|
type: VelcronBlueprintDefintionType | WebBlueprintItemDefintionType;
|
|
88
59
|
}
|
|
89
60
|
export interface SearchBoxBlueprint extends Blueprint {
|
|
90
|
-
type: "searchbox";
|
|
91
61
|
borderRadius?: BoxDimensions;
|
|
92
62
|
variant?: "outlined" | "solo" | "regular" | "plain" | "underlined";
|
|
93
63
|
}
|
|
94
64
|
export interface ButtonBlueprint extends Blueprint {
|
|
95
|
-
type: "button";
|
|
96
65
|
padding?: Spacing;
|
|
97
66
|
background?: BackgroundDefinition;
|
|
98
67
|
alterCase?: boolean;
|
|
99
68
|
text?: TextBlueprint;
|
|
100
69
|
icon?: IconBlueprint;
|
|
101
70
|
}
|
|
71
|
+
export interface ButtonBlueprints extends Blueprints {
|
|
72
|
+
text: {
|
|
73
|
+
primary?: ButtonBlueprint;
|
|
74
|
+
basic?: ButtonBlueprint;
|
|
75
|
+
accent1?: ButtonBlueprint;
|
|
76
|
+
warn?: ButtonBlueprint;
|
|
77
|
+
link?: ButtonBlueprint;
|
|
78
|
+
variant1?: ButtonBlueprint;
|
|
79
|
+
variant2?: ButtonBlueprint;
|
|
80
|
+
variant3?: ButtonBlueprint;
|
|
81
|
+
variant4?: ButtonBlueprint;
|
|
82
|
+
};
|
|
83
|
+
icon: {
|
|
84
|
+
primary?: ButtonBlueprint;
|
|
85
|
+
basic?: ButtonBlueprint;
|
|
86
|
+
accent1?: ButtonBlueprint;
|
|
87
|
+
warn?: ButtonBlueprint;
|
|
88
|
+
link?: ButtonBlueprint;
|
|
89
|
+
variant1?: ButtonBlueprint;
|
|
90
|
+
variant2?: ButtonBlueprint;
|
|
91
|
+
variant3?: ButtonBlueprint;
|
|
92
|
+
variant4?: ButtonBlueprint;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export interface TabsBlueprints extends Blueprints {
|
|
96
|
+
primary?: TabsBlueprint;
|
|
97
|
+
variant1?: TabsBlueprint;
|
|
98
|
+
variant2?: TabsBlueprint;
|
|
99
|
+
variant3?: TabsBlueprint;
|
|
100
|
+
}
|
|
102
101
|
export interface TabsBlueprint extends Blueprint {
|
|
103
|
-
type: "tab";
|
|
104
102
|
background?: BackgroundDefinition;
|
|
105
103
|
padding?: Spacing;
|
|
106
104
|
margin?: Spacing;
|
|
@@ -125,12 +123,10 @@ export interface TabsBlueprint extends Blueprint {
|
|
|
125
123
|
};
|
|
126
124
|
}
|
|
127
125
|
export interface TextBlueprint extends Blueprint {
|
|
128
|
-
type: "text";
|
|
129
126
|
color?: FillDefinition;
|
|
130
127
|
typography?: TypographyValue;
|
|
131
128
|
}
|
|
132
129
|
export interface IconBlueprint extends Blueprint {
|
|
133
|
-
type: "icon";
|
|
134
130
|
color?: FillDefinition;
|
|
135
131
|
size?: number;
|
|
136
132
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Guid } from "../Guid";
|
|
2
|
-
import { BoxDimensions } from "./Blueprints";
|
|
2
|
+
import { BoxDimensions, ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
|
|
3
3
|
export interface ColorTypeResult<resultType> {
|
|
4
4
|
base: resultType;
|
|
5
5
|
baseTone: resultType;
|
|
@@ -21,14 +21,14 @@ export interface ColorStyles {
|
|
|
21
21
|
color: object | string;
|
|
22
22
|
all: object | string;
|
|
23
23
|
}
|
|
24
|
-
export interface ColorSchema {
|
|
24
|
+
export interface ColorSchema extends BlueprintsReference {
|
|
25
25
|
name: string;
|
|
26
26
|
base: ColorDefinition;
|
|
27
27
|
onBase: ColorDefinition;
|
|
28
28
|
container: ColorDefinition;
|
|
29
29
|
onContainer: ColorDefinition;
|
|
30
30
|
}
|
|
31
|
-
export interface ColorSchemas {
|
|
31
|
+
export interface ColorSchemas extends ColorSchemasReference {
|
|
32
32
|
primary: ColorSchema;
|
|
33
33
|
secondary: ColorSchema;
|
|
34
34
|
accent1: ColorSchema;
|
|
@@ -41,13 +41,35 @@ export interface ColorSchemas {
|
|
|
41
41
|
warning: ColorSchema;
|
|
42
42
|
notification: ColorSchema;
|
|
43
43
|
}
|
|
44
|
-
export interface
|
|
44
|
+
export interface BlueprintsReference {
|
|
45
|
+
id: Guid;
|
|
46
|
+
}
|
|
47
|
+
export interface ColorSchemasReference {
|
|
48
|
+
primary: BlueprintsReference;
|
|
49
|
+
secondary: BlueprintsReference;
|
|
50
|
+
accent1: BlueprintsReference;
|
|
51
|
+
accent2: BlueprintsReference;
|
|
52
|
+
accent3: BlueprintsReference;
|
|
53
|
+
neutral: BlueprintsReference;
|
|
54
|
+
background: BlueprintsReference;
|
|
55
|
+
error: BlueprintsReference;
|
|
56
|
+
info: BlueprintsReference;
|
|
57
|
+
warning: BlueprintsReference;
|
|
58
|
+
notification: BlueprintsReference;
|
|
59
|
+
}
|
|
60
|
+
export interface ThemeDefinitionReference {
|
|
45
61
|
id: Guid;
|
|
46
62
|
name?: string;
|
|
63
|
+
colors: ColorSchemasReference;
|
|
64
|
+
typography: BlueprintsReference;
|
|
65
|
+
spacing: BlueprintsReference;
|
|
66
|
+
components: BlueprintsReference;
|
|
67
|
+
}
|
|
68
|
+
export interface ThemeDefinitionV2 extends ThemeDefinitionReference {
|
|
47
69
|
colors: ColorSchemas;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
70
|
+
typography: TypographyBlueprints;
|
|
71
|
+
spacing: SpacingBlueprints;
|
|
72
|
+
components: ComponentBlueprints;
|
|
51
73
|
}
|
|
52
74
|
export type ColorSchemaType = keyof typeof ColorSchemaTypes;
|
|
53
75
|
export declare enum ColorSchemaTypes {
|
package/package.json
CHANGED
|
@@ -12,9 +12,6 @@ export declare const useVelcronColorSchemaStore: (newStateWithName?: string) =>
|
|
|
12
12
|
themeStore: {
|
|
13
13
|
state: {
|
|
14
14
|
currentTheme: import("@omnia/fx-models").ThemeDefinitionV2;
|
|
15
|
-
components: import("@omnia/fx-models").ComponentBlueprints;
|
|
16
|
-
spacing: import("@omnia/fx-models").SpacingBlueprints;
|
|
17
|
-
typography: import("@omnia/fx-models").TypographyBlueprints;
|
|
18
15
|
};
|
|
19
16
|
get: {
|
|
20
17
|
componentBlueprints: () => void;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes,
|
|
1
|
+
import { ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes, ThemeDefinitionV2, TypographySize, TypographySizes, TypographyType, TypographyTypes } from "..";
|
|
2
2
|
export declare const useVelcronThemingStore: (newStateWithName?: string) => {
|
|
3
3
|
state: {
|
|
4
4
|
currentTheme: ThemeDefinitionV2;
|
|
5
|
-
components: ComponentBlueprints;
|
|
6
|
-
spacing: SpacingBlueprints;
|
|
7
|
-
typography: TypographyBlueprints;
|
|
8
5
|
};
|
|
9
6
|
get: {
|
|
10
7
|
componentBlueprints: () => void;
|
package/stores/VelcronTheming.js
CHANGED
|
@@ -8,25 +8,22 @@ exports.useVelcronThemingStore = (0, _1.defineVelcronStore)("VelcronTheming", {
|
|
|
8
8
|
return {
|
|
9
9
|
state: {
|
|
10
10
|
currentTheme: {},
|
|
11
|
-
components: {},
|
|
12
|
-
spacing: {},
|
|
13
|
-
typography: {},
|
|
14
11
|
}
|
|
15
12
|
};
|
|
16
13
|
},
|
|
17
14
|
getters(state) {
|
|
18
15
|
return {
|
|
19
16
|
componentBlueprints: () => {
|
|
20
|
-
state.components;
|
|
17
|
+
state.currentTheme.components;
|
|
21
18
|
},
|
|
22
19
|
colorSchema: (colorSchemaType) => {
|
|
23
20
|
return (0, __1.useThemeMethods)(() => state.currentTheme).colorSchema(colorSchemaType);
|
|
24
21
|
},
|
|
25
22
|
spacing: () => {
|
|
26
|
-
return state.spacing.primary.inner;
|
|
23
|
+
return state.currentTheme.spacing.primary.inner;
|
|
27
24
|
},
|
|
28
25
|
typography: (typographyType, size) => {
|
|
29
|
-
const typography = state.typography.primary;
|
|
26
|
+
const typography = state.currentTheme.typography.primary;
|
|
30
27
|
if (typographyType === __1.TypographyTypes.text) {
|
|
31
28
|
return typography.text[size];
|
|
32
29
|
}
|