@omnia/velcron 8.0.300-dev → 8.0.302-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.
@@ -5,24 +5,45 @@ import { TypographyBlueprint } from "./Typography";
5
5
  import { ThemeBase } from "./ThemeBase";
6
6
  import { VelcronAppDefinition, VelcronRendererResolverReference } from "../velcron";
7
7
  import { guid } from "../Guid";
8
+ export interface BlueprintStrategy {
9
+ buttons: {
10
+ primary: ButtonBlueprint;
11
+ basic: ButtonBlueprint;
12
+ accent: ButtonBlueprint;
13
+ warn: ButtonBlueprint;
14
+ link: ButtonBlueprint;
15
+ close: ButtonBlueprint;
16
+ };
17
+ }
8
18
  export interface BoxDimensions extends Spacing {
9
19
  }
10
20
  export interface Blueprints {
11
21
  name?: string;
12
22
  }
13
- export type BlueprintVariant = "primary" | "secondary" | "variant1" | "variant2" | "variant3";
23
+ export type BlueprintVariant = "primary" | "secondary" | "variant1" | "variant2" | "variant3" | "variant4" | "variant5" | "variant6" | "variant7" | "variant8";
24
+ export declare const BlueprintVariants: Array<BlueprintVariant>;
14
25
  export interface ChromeBlueprints extends Blueprints, BlueprintsReference {
15
26
  primary: ChromeBlueprint;
16
27
  variant1?: ChromeBlueprint;
17
28
  variant2?: ChromeBlueprint;
18
29
  variant3?: ChromeBlueprint;
19
30
  }
20
- export type ContainerFillVariant = "variant1" | "variant2" | "variant3" | "variant4";
21
- export interface ContainerFillBlueprints extends Blueprints, BlueprintsReference {
22
- variant1?: ContainerFillBlueprint;
23
- variant2?: ContainerFillBlueprint;
24
- variant3?: ContainerFillBlueprint;
25
- variant4?: ContainerFillBlueprint;
31
+ export interface VariantBlueprints<T> extends Blueprints, BlueprintsReference {
32
+ variant1?: T;
33
+ variant2?: T;
34
+ variant3?: T;
35
+ variant4?: T;
36
+ variant5?: T;
37
+ variant6?: T;
38
+ variant7?: T;
39
+ variant8?: T;
40
+ }
41
+ export interface HeaderBlueprint extends Blueprint {
42
+ viewTemplate?: VelcronRendererResolverReference;
43
+ }
44
+ export interface HeaderBlueprints extends VariantBlueprints<HeaderBlueprint>, Blueprints, BlueprintsReference {
45
+ }
46
+ export interface ContainerFillBlueprints extends VariantBlueprints<ContainerFillBlueprint>, Blueprints, BlueprintsReference {
26
47
  }
27
48
  export interface ContainerFillBlueprint extends Blueprints, BlueprintsReference {
28
49
  name?: string;
@@ -50,12 +71,14 @@ export interface ChromeBlueprint {
50
71
  };
51
72
  }
52
73
  export interface ComponentBlueprints extends ThemeBase {
74
+ strategy?: "MD2" | "MD3";
53
75
  buttons?: ButtonBlueprints;
54
76
  tabs?: TabsBlueprints;
55
77
  blocks?: ChromeBlueprints;
56
78
  icons?: IconBlueprints;
57
79
  chips?: ChipBlueprint;
58
80
  fills?: ContainerFillBlueprints;
81
+ headers?: HeaderBlueprints;
59
82
  }
60
83
  export interface SpacingBlueprint {
61
84
  l: SpacingDefinition;
@@ -71,6 +94,7 @@ export declare enum VelcronBlueprintDefintionTypes {
71
94
  button = "button"
72
95
  }
73
96
  export interface Blueprint {
97
+ name?: string;
74
98
  }
75
99
  export interface SearchBoxBlueprint extends Blueprint {
76
100
  borderRadius?: BoxDimensions;
@@ -83,7 +107,7 @@ export interface IconBlueprints extends Blueprints {
83
107
  l?: IconBlueprint;
84
108
  xl?: IconBlueprint;
85
109
  }
86
- export type ButtonTypes = "primary" | "basic" | "accent1" | "warn" | "link" | "close" | "variant1" | "variant2" | "variant3" | "variant4";
110
+ export type ButtonTypes = "primary" | "basic" | "accent1" | "warn" | "link" | "close" | "variant1" | "variant2" | "variant3" | "variant4" | "variant5" | "variant6" | "variant7" | "variant8";
87
111
  export type ButtonBlueprintType = "text" | "icon";
88
112
  export interface ButtonBlueprintVariant {
89
113
  type: ButtonTypes;
@@ -98,7 +122,7 @@ export interface ButtonBlueprint extends Blueprint {
98
122
  viewTemplate?: VelcronRendererResolverReference;
99
123
  }
100
124
  export interface ButtonBlueprints extends Blueprints {
101
- text: {
125
+ text?: {
102
126
  primary?: ButtonBlueprint;
103
127
  basic?: ButtonBlueprint;
104
128
  accent1?: ButtonBlueprint;
@@ -109,8 +133,12 @@ export interface ButtonBlueprints extends Blueprints {
109
133
  variant2?: ButtonBlueprint;
110
134
  variant3?: ButtonBlueprint;
111
135
  variant4?: ButtonBlueprint;
136
+ variant5?: ButtonBlueprint;
137
+ variant6?: ButtonBlueprint;
138
+ variant7?: ButtonBlueprint;
139
+ variant8?: ButtonBlueprint;
112
140
  };
113
- icon: {
141
+ icon?: {
114
142
  primary?: ButtonBlueprint;
115
143
  basic?: ButtonBlueprint;
116
144
  accent1?: ButtonBlueprint;
@@ -121,13 +149,14 @@ export interface ButtonBlueprints extends Blueprints {
121
149
  variant2?: ButtonBlueprint;
122
150
  variant3?: ButtonBlueprint;
123
151
  variant4?: ButtonBlueprint;
152
+ variant5?: ButtonBlueprint;
153
+ variant6?: ButtonBlueprint;
154
+ variant7?: ButtonBlueprint;
155
+ variant8?: ButtonBlueprint;
124
156
  };
125
157
  }
126
- export interface TabsBlueprints extends Blueprints {
158
+ export interface TabsBlueprints extends Blueprints, VariantBlueprints<TabsBlueprint> {
127
159
  primary?: TabsBlueprint;
128
- variant1?: TabsBlueprint;
129
- variant2?: TabsBlueprint;
130
- variant3?: TabsBlueprint;
131
160
  }
132
161
  export interface TabsBlueprint extends Blueprint {
133
162
  background?: BackgroundDefinition;
@@ -1,6 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VelcronBlueprintDefintionTypes = exports.WebBlueprintItemDefintionTypes = void 0;
3
+ exports.VelcronBlueprintDefintionTypes = exports.WebBlueprintItemDefintionTypes = exports.BlueprintVariants = void 0;
4
+ exports.BlueprintVariants = [
5
+ "variant1",
6
+ "variant2",
7
+ "variant3",
8
+ "variant4",
9
+ "variant5",
10
+ "variant6",
11
+ "variant7",
12
+ "variant8"
13
+ ];
4
14
  var WebBlueprintItemDefintionTypes;
5
15
  (function (WebBlueprintItemDefintionTypes) {
6
16
  WebBlueprintItemDefintionTypes["button"] = "button";
@@ -1,6 +1,6 @@
1
1
  import { guid } from "../Guid";
2
2
  import { Id } from "../Id";
3
- import { BoxDimensions, ButtonBlueprint, ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
3
+ import { BlueprintVariant, BoxDimensions, ButtonBlueprint, ComponentBlueprints, SpacingBlueprints, TypographyBlueprints } from "./Blueprints";
4
4
  import { Color } from "./Color";
5
5
  import { LegacyBorderDefinition, LegacyThemeDefinition } from "./LegacyThemeDefinition";
6
6
  import { ThemeBase } from "./ThemeBase";
@@ -143,8 +143,7 @@ export interface FillDefinition {
143
143
  colors: Array<ColorValue | ColorGradientValue>;
144
144
  acrylic?: boolean;
145
145
  }
146
- export type FillVariant = "variant1" | "variant2" | "variant3" | "variant4";
147
- export type FillDefinitionValue = FillVariant | FillDefinition | ColorValue;
146
+ export type FillDefinitionValue = BlueprintVariant | FillDefinition | ColorValue;
148
147
  export interface LinearGradientFillDefinition extends FillDefinition {
149
148
  degrees: number;
150
149
  }
@@ -13,6 +13,11 @@ export interface TypographyBlueprint {
13
13
  variant1?: FillDefinition;
14
14
  variant2?: FillDefinition;
15
15
  variant3?: FillDefinition;
16
+ variant4?: FillDefinition;
17
+ variant5?: FillDefinition;
18
+ variant6?: FillDefinition;
19
+ variant7?: FillDefinition;
20
+ variant8?: FillDefinition;
16
21
  };
17
22
  title: {
18
23
  xl: TypographyDefinition;
@@ -51,6 +56,10 @@ export interface TypographyBlueprint {
51
56
  variant2?: TypographyDefinition;
52
57
  variant3?: TypographyDefinition;
53
58
  variant4?: TypographyDefinition;
59
+ variant5?: TypographyDefinition;
60
+ variant6?: TypographyDefinition;
61
+ variant7?: TypographyDefinition;
62
+ variant8?: TypographyDefinition;
54
63
  font?: TypographyFontRef;
55
64
  };
56
65
  }
@@ -93,7 +102,11 @@ export declare enum TypographySizes {
93
102
  variant1 = "variant1",
94
103
  variant2 = "variant2",
95
104
  variant3 = "variant3",
96
- variant4 = "variant4"
105
+ variant4 = "variant4",
106
+ variant5 = "variant5",
107
+ variant6 = "variant6",
108
+ variant7 = "variant7",
109
+ variant8 = "variant8"
97
110
  }
98
111
  /**this reflect TypographySizes for member check*/
99
112
  export declare const AvailableTypographySizes: string[];
@@ -19,6 +19,10 @@ var TypographySizes;
19
19
  TypographySizes["variant2"] = "variant2";
20
20
  TypographySizes["variant3"] = "variant3";
21
21
  TypographySizes["variant4"] = "variant4";
22
+ TypographySizes["variant5"] = "variant5";
23
+ TypographySizes["variant6"] = "variant6";
24
+ TypographySizes["variant7"] = "variant7";
25
+ TypographySizes["variant8"] = "variant8";
22
26
  })(TypographySizes || (exports.TypographySizes = TypographySizes = {}));
23
27
  /**this reflect TypographySizes for member check*/
24
- exports.AvailableTypographySizes = ["xl", "l", "m", "s", "xs", "variant1", "variant2", "variant3", "variant4"];
28
+ exports.AvailableTypographySizes = ["xl", "l", "m", "s", "xs", "variant1", "variant2", "variant3", "variant4", "variant5", "variant6", "variant7", "variant8"];
@@ -1,7 +1,7 @@
1
- import { ContainerFillBlueprint, ContainerFillVariant } from "./Blueprints";
1
+ import { ContainerFillBlueprint, BlueprintVariant } from "./Blueprints";
2
2
  import { ColorDefinition, ColorSchema, ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes } from "./ThemeDefinition";
3
3
  export declare function useThemeMethods(getThemeDefinition: () => any): {
4
- containerBlueprint: (type: ContainerFillVariant | ContainerFillBlueprint | string) => any;
4
+ containerBlueprint: (type: BlueprintVariant | ContainerFillBlueprint | string) => any;
5
5
  colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => ColorSchema;
6
6
  color: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => string;
7
7
  colorDefinition: (colorSchemaType: ColorSchemaTypes | ColorSchemaType, colorType: ColorTypes | ColorType) => ColorDefinition;
@@ -4,21 +4,21 @@ exports.useThemeMethods = useThemeMethods;
4
4
  const ThemeDefinition_1 = require("./ThemeDefinition");
5
5
  // temp change ThemeDefinitionInstance to any because fx/shared can't reference higher level fx/ux
6
6
  function useThemeMethods(getThemeDefinition) {
7
- function containerBlueprint(type) {
7
+ function containerFillBlueprint(type) {
8
8
  if (typeof type !== "string") {
9
9
  return type;
10
10
  }
11
11
  if (type === "variant1") {
12
- return getThemeDefinition()?.components?.containers?.variant1;
12
+ return getThemeDefinition()?.components?.fills?.variant1;
13
13
  }
14
14
  if (type === "variant2") {
15
- return getThemeDefinition()?.components?.containers?.variant2;
15
+ return getThemeDefinition()?.components?.fills?.variant2;
16
16
  }
17
17
  if (type === "variant3") {
18
- return getThemeDefinition()?.components?.containers?.variant3;
18
+ return getThemeDefinition()?.components?.fills?.variant3;
19
19
  }
20
20
  if (type === "variant4") {
21
- return getThemeDefinition()?.components?.containers?.variant4;
21
+ return getThemeDefinition()?.components?.fills?.variant4;
22
22
  }
23
23
  return null;
24
24
  }
@@ -50,9 +50,18 @@ function useThemeMethods(getThemeDefinition) {
50
50
  else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.neutral) {
51
51
  return getThemeDefinition().colors.neutral;
52
52
  }
53
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.notification) {
54
+ return getThemeDefinition().colors.notification;
55
+ }
53
56
  else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.error) {
54
57
  return getThemeDefinition().colors.error;
55
58
  }
59
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.info) {
60
+ return getThemeDefinition().colors.info;
61
+ }
62
+ else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.warning) {
63
+ return getThemeDefinition().colors.warning;
64
+ }
56
65
  else if (colorSchemaType === ThemeDefinition_1.ColorSchemaTypes.success) {
57
66
  return getThemeDefinition().colors.success;
58
67
  }
@@ -79,7 +88,7 @@ function useThemeMethods(getThemeDefinition) {
79
88
  return mappedColorSchema.base;
80
89
  }
81
90
  return {
82
- containerBlueprint,
91
+ containerBlueprint: containerFillBlueprint,
83
92
  colorSchema,
84
93
  color,
85
94
  colorDefinition,
@@ -1,4 +1,4 @@
1
- import { ContainerFillBlueprint, ContainerFillVariant, IFontAwesomeIcon, VelcronColorStyling, VelcronOverflowValues } from "@omnia/fx-models";
1
+ import { ContainerFillBlueprint, BlueprintVariant, IFontAwesomeIcon, VelcronColorStyling, VelcronOverflowValues } from "@omnia/fx-models";
2
2
  import { DynamicState } from "../DynamicState";
3
3
  import { VelcronEvent, VelcronOnActiveEvent, VelcronOnEditModeEvent, VelcronOnLoadEvent, VelcronOnPersistingStateEvent, VelcronOnSavingEvent } from "./VelcronEvents";
4
4
  import { AnimationOptionsWithOverrides, VariantDefinition, Variants } from "motion";
@@ -88,7 +88,7 @@ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState
88
88
  version?: string;
89
89
  name?: string;
90
90
  lazy?: VelcronLazyApp;
91
- blueprint?: ContainerFillBlueprint | ContainerFillVariant;
91
+ blueprint?: ContainerFillBlueprint | BlueprintVariant;
92
92
  body?: Array<VelcronDefinition>;
93
93
  events?: VelcronOnLoadEvent & VelcronOnEditModeEvent & VelcronOnSavingEvent & VelcronOnPersistingStateEvent & VelcronOnActiveEvent;
94
94
  actions?: {
@@ -1,4 +1,4 @@
1
- import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, VelcronEditor, ContainerFillBlueprint, BackgroundDefinition, ContainerFillVariant, IconBlueprint, ButtonBlueprint } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
1
+ import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, VelcronEditor, ContainerFillBlueprint, BackgroundDefinition, BlueprintVariant, IconBlueprint, ButtonBlueprint } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
2
2
  import { VelcronComponentArrayType, VelcronPrimitiveType } from "./VelcronTypes";
3
3
  import { AssignOperators, VelcronHorizontalAlignments, VelcronIconTypes, VelcronActionTypes, VelcronVerticalAlignments } from "./Enums";
4
4
  import { DynamicState, VelcronDefinition, VelcronEffects, useVelcronThemingStore } from "..";
@@ -217,7 +217,7 @@ export interface VelcronFlexRowDefinition extends VelcronDefinition, VelcronColo
217
217
  direction?: VelcronBindableProp<"row" | "row-reverse">;
218
218
  position?: VelcronBindableProp<VelcronPosition>;
219
219
  zIndex?: VelcronBindableProp<number>;
220
- blueprint?: ContainerFillBlueprint | ContainerFillVariant;
220
+ blueprint?: ContainerFillBlueprint | BlueprintVariant;
221
221
  background?: BackgroundDefinition;
222
222
  wrap?: boolean;
223
223
  gapX?: number | string;
@@ -238,7 +238,7 @@ export interface VelcronFlexColumnDefinition extends VelcronDefinition, VelcronC
238
238
  type: "column";
239
239
  events?: VelcronOnPressEvent;
240
240
  grow?: number;
241
- blueprint?: ContainerFillBlueprint | ContainerFillVariant;
241
+ blueprint?: ContainerFillBlueprint | BlueprintVariant;
242
242
  alignY?: VelcronVerticalAlignments;
243
243
  position?: VelcronPosition;
244
244
  absolute?: VelcronSpacing;
@@ -1,4 +1,4 @@
1
- import { BackgroundDefinition, ContainerFillBlueprint, ContainerFillVariant, TextBlueprint, TypographySize, TypographyType, VelcronSpacing } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
1
+ import { BackgroundDefinition, ContainerFillBlueprint, BlueprintVariant, TextBlueprint, TypographySize, TypographyType, VelcronSpacing } from "@omnia/velcron/internal-do-not-import-from-here/shared/models";
2
2
  import { VelcronImageRatios } from "./VelcronDefinitions";
3
3
  export interface VelcronState {
4
4
  states?: {
@@ -16,7 +16,7 @@ export interface VelcronState {
16
16
  alignY?: string;
17
17
  colorSchemaType?: string;
18
18
  spacing?: VelcronSpacing;
19
- blueprint?: ContainerFillBlueprint | ContainerFillVariant;
19
+ blueprint?: ContainerFillBlueprint | BlueprintVariant;
20
20
  background?: BackgroundDefinition;
21
21
  };
22
22
  grid?: VelcronGridState;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/velcron",
3
3
  "license": "MIT",
4
- "version": "8.0.300-dev",
4
+ "version": "8.0.302-dev",
5
5
  "description": "Provide Omnia Velcron Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,11 +1,11 @@
1
- import { ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes, ContainerFillBlueprint, ContainerFillVariant, ResolvedThemeDefinition, TypographySize, TypographySizes, TypographyType, TypographyTypes } from "..";
1
+ import { ColorSchemaType, ColorSchemaTypes, ColorType, ColorTypes, ContainerFillBlueprint, BlueprintVariant, ResolvedThemeDefinition, TypographySize, TypographySizes, TypographyType, TypographyTypes } from "..";
2
2
  export declare const useVelcronThemingStore: (newStateWithName?: string) => {
3
3
  state: {
4
4
  currentTheme: ResolvedThemeDefinition;
5
5
  };
6
6
  get: {
7
7
  componentBlueprints: () => void;
8
- containerBlueprint: (type: ContainerFillVariant | ContainerFillBlueprint | string) => any;
8
+ containerBlueprint: (type: BlueprintVariant | ContainerFillBlueprint | string) => any;
9
9
  colorSchema: (colorSchemaType: ColorSchemaTypes | ColorSchemaType) => import("..").ColorSchema;
10
10
  spacing: () => import("..").SpacingBlueprint;
11
11
  typography: (typographyType: TypographyTypes | TypographyType, size: TypographySizes | TypographySize) => any;