@omnia/velcron 7.0.525-dev → 7.0.526-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.
@@ -20,4 +20,8 @@ export interface BlueprintDefinition {
20
20
  chip?: {
21
21
  borderRadius?: BoxDimensions;
22
22
  };
23
+ icon?: {
24
+ borderRadius?: BoxDimensions;
25
+ round?: boolean;
26
+ };
23
27
  }
@@ -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;
@@ -13,6 +13,7 @@ export interface TypographyType {
13
13
  large: TypographyTypeBreakPoint;
14
14
  medium?: TypographyTypeBreakPoint;
15
15
  small?: TypographyTypeBreakPoint;
16
+ style: object | string;
16
17
  }
17
18
  export interface TypographyTypeBreakPoint {
18
19
  weight: number;
package/models/Enums.d.ts CHANGED
@@ -38,7 +38,8 @@ export declare enum VelcronComponentPropertyEditors {
38
38
  slider = 2,
39
39
  colorPicker = 3,
40
40
  typographyPicker = 4,
41
- ratioPicker = 5
41
+ ratioPicker = 5,
42
+ booleanPicker = 6
42
43
  }
43
44
  export declare enum VelcronDataTypes {
44
45
  unknown = "unknown",
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
- color: string;
231
+ background?: boolean;
231
232
  size?: number;
232
233
  events?: VelcronOnPressEvent;
233
234
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/velcron",
3
3
  "license": "MIT",
4
- "version": "7.0.525-dev",
4
+ "version": "7.0.526-dev",
5
5
  "description": "Provide Omnia Velcron Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -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;
@@ -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) {