@uni-design-system/uni-core 0.0.1
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/LICENSE +201 -0
- package/README.md +2 -0
- package/dist/cjs/components/button/button.component.d.ts +6 -0
- package/dist/cjs/components/button/button.component.js +17 -0
- package/dist/cjs/components/button/button.component.js.map +1 -0
- package/dist/cjs/components/card/card.component.d.ts +5 -0
- package/dist/cjs/components/card/card.component.js +11 -0
- package/dist/cjs/components/card/card.component.js.map +1 -0
- package/dist/cjs/core/backgrounds/background.model.d.ts +9 -0
- package/dist/cjs/core/backgrounds/background.model.js +3 -0
- package/dist/cjs/core/backgrounds/background.model.js.map +1 -0
- package/dist/cjs/core/backgrounds/background.types.d.ts +1 -0
- package/dist/cjs/core/backgrounds/background.types.js +3 -0
- package/dist/cjs/core/backgrounds/background.types.js.map +1 -0
- package/dist/cjs/core/backgrounds/index.d.ts +2 -0
- package/dist/cjs/core/backgrounds/index.js +19 -0
- package/dist/cjs/core/backgrounds/index.js.map +1 -0
- package/dist/cjs/core/border/border.types.d.ts +1 -0
- package/dist/cjs/core/border/border.types.js +3 -0
- package/dist/cjs/core/border/border.types.js.map +1 -0
- package/dist/cjs/core/color/color.helper.d.ts +4 -0
- package/dist/cjs/core/color/color.helper.js +17 -0
- package/dist/cjs/core/color/color.helper.js.map +1 -0
- package/dist/cjs/core/color/color.model.d.ts +22 -0
- package/dist/cjs/core/color/color.model.js +3 -0
- package/dist/cjs/core/color/color.model.js.map +1 -0
- package/dist/cjs/core/color/color.types.d.ts +11 -0
- package/dist/cjs/core/color/color.types.js +35 -0
- package/dist/cjs/core/color/color.types.js.map +1 -0
- package/dist/cjs/core/container/container.component.d.ts +5 -0
- package/dist/cjs/core/container/container.component.js +11 -0
- package/dist/cjs/core/container/container.component.js.map +1 -0
- package/dist/cjs/core/container/container.model.d.ts +40 -0
- package/dist/cjs/core/container/container.model.js +3 -0
- package/dist/cjs/core/container/container.model.js.map +1 -0
- package/dist/cjs/core/core.types.d.ts +9 -0
- package/dist/cjs/core/core.types.js +3 -0
- package/dist/cjs/core/core.types.js.map +1 -0
- package/dist/cjs/core/gradients/gradiennt.helper.d.ts +2 -0
- package/dist/cjs/core/gradients/gradiennt.helper.js +8 -0
- package/dist/cjs/core/gradients/gradiennt.helper.js.map +1 -0
- package/dist/cjs/core/gradients/gradient.model.d.ts +6 -0
- package/dist/cjs/core/gradients/gradient.model.js +3 -0
- package/dist/cjs/core/gradients/gradient.model.js.map +1 -0
- package/dist/cjs/core/gradients/gradient.types.d.ts +0 -0
- package/dist/cjs/core/gradients/gradient.types.js +2 -0
- package/dist/cjs/core/gradients/gradient.types.js.map +1 -0
- package/dist/cjs/core/iconography/icon.model.d.ts +7 -0
- package/dist/cjs/core/iconography/icon.model.js +3 -0
- package/dist/cjs/core/iconography/icon.model.js.map +1 -0
- package/dist/cjs/core/iconography/icon.types.d.ts +7 -0
- package/dist/cjs/core/iconography/icon.types.js +3 -0
- package/dist/cjs/core/iconography/icon.types.js.map +1 -0
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +18 -0
- package/dist/cjs/core/index.js.map +1 -0
- package/dist/cjs/core/layout/layout.types.d.ts +3 -0
- package/dist/cjs/core/layout/layout.types.js +5 -0
- package/dist/cjs/core/layout/layout.types.js.map +1 -0
- package/dist/cjs/core/masking/masking.model.d.ts +6 -0
- package/dist/cjs/core/masking/masking.model.js +3 -0
- package/dist/cjs/core/masking/masking.model.js.map +1 -0
- package/dist/cjs/core/masking/masking.types.d.ts +1 -0
- package/dist/cjs/core/masking/masking.types.js +3 -0
- package/dist/cjs/core/masking/masking.types.js.map +1 -0
- package/dist/cjs/core/shadow/shadow.types.d.ts +1 -0
- package/dist/cjs/core/shadow/shadow.types.js +3 -0
- package/dist/cjs/core/shadow/shadow.types.js.map +1 -0
- package/dist/cjs/core/theme/theme.context.d.ts +4 -0
- package/dist/cjs/core/theme/theme.context.js +12 -0
- package/dist/cjs/core/theme/theme.context.js.map +1 -0
- package/dist/cjs/core/theme/theme.hook.d.ts +2 -0
- package/dist/cjs/core/theme/theme.hook.js +19 -0
- package/dist/cjs/core/theme/theme.hook.js.map +1 -0
- package/dist/cjs/core/theme/theme.model.d.ts +10 -0
- package/dist/cjs/core/theme/theme.model.js +3 -0
- package/dist/cjs/core/theme/theme.model.js.map +1 -0
- package/dist/cjs/core/theme/theme.provider.d.ts +9 -0
- package/dist/cjs/core/theme/theme.provider.js +80 -0
- package/dist/cjs/core/theme/theme.provider.js.map +1 -0
- package/dist/cjs/core/theme/theme.records.d.ts +3 -0
- package/dist/cjs/core/theme/theme.records.js +12 -0
- package/dist/cjs/core/theme/theme.records.js.map +1 -0
- package/dist/cjs/core/theme/theme.types.d.ts +1 -0
- package/dist/cjs/core/theme/theme.types.js +3 -0
- package/dist/cjs/core/theme/theme.types.js.map +1 -0
- package/dist/cjs/core/theme/themes/dark.theme.d.ts +2 -0
- package/dist/cjs/core/theme/themes/dark.theme.js +9 -0
- package/dist/cjs/core/theme/themes/dark.theme.js.map +1 -0
- package/dist/cjs/core/theme/themes/light.theme.d.ts +2 -0
- package/dist/cjs/core/theme/themes/light.theme.js +15 -0
- package/dist/cjs/core/theme/themes/light.theme.js.map +1 -0
- package/dist/cjs/core/typography/typography.types.d.ts +5 -0
- package/dist/cjs/core/typography/typography.types.js +3 -0
- package/dist/cjs/core/typography/typography.types.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/stories/Button.d.ts +27 -0
- package/dist/cjs/stories/Button.js +29 -0
- package/dist/cjs/stories/Button.js.map +1 -0
- package/dist/cjs/stories/Header.d.ts +12 -0
- package/dist/cjs/stories/Header.js +28 -0
- package/dist/cjs/stories/Header.js.map +1 -0
- package/dist/cjs/stories/Page.d.ts +3 -0
- package/dist/cjs/stories/Page.js +45 -0
- package/dist/cjs/stories/Page.js.map +1 -0
- package/dist/esm/components/button/button.component.d.ts +6 -0
- package/dist/esm/components/button/button.component.js +10 -0
- package/dist/esm/components/button/button.component.js.map +1 -0
- package/dist/esm/components/card/card.component.d.ts +5 -0
- package/dist/esm/components/card/card.component.js +5 -0
- package/dist/esm/components/card/card.component.js.map +1 -0
- package/dist/esm/core/backgrounds/background.model.d.ts +9 -0
- package/dist/esm/core/backgrounds/background.model.js +2 -0
- package/dist/esm/core/backgrounds/background.model.js.map +1 -0
- package/dist/esm/core/backgrounds/background.types.d.ts +1 -0
- package/dist/esm/core/backgrounds/background.types.js +2 -0
- package/dist/esm/core/backgrounds/background.types.js.map +1 -0
- package/dist/esm/core/backgrounds/index.d.ts +2 -0
- package/dist/esm/core/backgrounds/index.js +3 -0
- package/dist/esm/core/backgrounds/index.js.map +1 -0
- package/dist/esm/core/border/border.types.d.ts +1 -0
- package/dist/esm/core/border/border.types.js +2 -0
- package/dist/esm/core/border/border.types.js.map +1 -0
- package/dist/esm/core/color/color.helper.d.ts +4 -0
- package/dist/esm/core/color/color.helper.js +12 -0
- package/dist/esm/core/color/color.helper.js.map +1 -0
- package/dist/esm/core/color/color.model.d.ts +22 -0
- package/dist/esm/core/color/color.model.js +2 -0
- package/dist/esm/core/color/color.model.js.map +1 -0
- package/dist/esm/core/color/color.types.d.ts +11 -0
- package/dist/esm/core/color/color.types.js +32 -0
- package/dist/esm/core/color/color.types.js.map +1 -0
- package/dist/esm/core/container/container.component.d.ts +5 -0
- package/dist/esm/core/container/container.component.js +5 -0
- package/dist/esm/core/container/container.component.js.map +1 -0
- package/dist/esm/core/container/container.model.d.ts +40 -0
- package/dist/esm/core/container/container.model.js +2 -0
- package/dist/esm/core/container/container.model.js.map +1 -0
- package/dist/esm/core/core.types.d.ts +9 -0
- package/dist/esm/core/core.types.js +2 -0
- package/dist/esm/core/core.types.js.map +1 -0
- package/dist/esm/core/gradients/gradiennt.helper.d.ts +2 -0
- package/dist/esm/core/gradients/gradiennt.helper.js +4 -0
- package/dist/esm/core/gradients/gradiennt.helper.js.map +1 -0
- package/dist/esm/core/gradients/gradient.model.d.ts +6 -0
- package/dist/esm/core/gradients/gradient.model.js +2 -0
- package/dist/esm/core/gradients/gradient.model.js.map +1 -0
- package/dist/esm/core/gradients/gradient.types.d.ts +0 -0
- package/dist/esm/core/gradients/gradient.types.js +2 -0
- package/dist/esm/core/gradients/gradient.types.js.map +1 -0
- package/dist/esm/core/iconography/icon.model.d.ts +7 -0
- package/dist/esm/core/iconography/icon.model.js +2 -0
- package/dist/esm/core/iconography/icon.model.js.map +1 -0
- package/dist/esm/core/iconography/icon.types.d.ts +7 -0
- package/dist/esm/core/iconography/icon.types.js +2 -0
- package/dist/esm/core/iconography/icon.types.js.map +1 -0
- package/dist/esm/core/index.d.ts +1 -0
- package/dist/esm/core/index.js +2 -0
- package/dist/esm/core/index.js.map +1 -0
- package/dist/esm/core/layout/layout.types.d.ts +3 -0
- package/dist/esm/core/layout/layout.types.js +2 -0
- package/dist/esm/core/layout/layout.types.js.map +1 -0
- package/dist/esm/core/masking/masking.model.d.ts +6 -0
- package/dist/esm/core/masking/masking.model.js +2 -0
- package/dist/esm/core/masking/masking.model.js.map +1 -0
- package/dist/esm/core/masking/masking.types.d.ts +1 -0
- package/dist/esm/core/masking/masking.types.js +2 -0
- package/dist/esm/core/masking/masking.types.js.map +1 -0
- package/dist/esm/core/shadow/shadow.types.d.ts +1 -0
- package/dist/esm/core/shadow/shadow.types.js +2 -0
- package/dist/esm/core/shadow/shadow.types.js.map +1 -0
- package/dist/esm/core/theme/theme.context.d.ts +4 -0
- package/dist/esm/core/theme/theme.context.js +7 -0
- package/dist/esm/core/theme/theme.context.js.map +1 -0
- package/dist/esm/core/theme/theme.hook.d.ts +2 -0
- package/dist/esm/core/theme/theme.hook.js +13 -0
- package/dist/esm/core/theme/theme.hook.js.map +1 -0
- package/dist/esm/core/theme/theme.model.d.ts +10 -0
- package/dist/esm/core/theme/theme.model.js +2 -0
- package/dist/esm/core/theme/theme.model.js.map +1 -0
- package/dist/esm/core/theme/theme.provider.d.ts +9 -0
- package/dist/esm/core/theme/theme.provider.js +50 -0
- package/dist/esm/core/theme/theme.provider.js.map +1 -0
- package/dist/esm/core/theme/theme.records.d.ts +3 -0
- package/dist/esm/core/theme/theme.records.js +9 -0
- package/dist/esm/core/theme/theme.records.js.map +1 -0
- package/dist/esm/core/theme/theme.types.d.ts +1 -0
- package/dist/esm/core/theme/theme.types.js +2 -0
- package/dist/esm/core/theme/theme.types.js.map +1 -0
- package/dist/esm/core/theme/themes/dark.theme.d.ts +2 -0
- package/dist/esm/core/theme/themes/dark.theme.js +6 -0
- package/dist/esm/core/theme/themes/dark.theme.js.map +1 -0
- package/dist/esm/core/theme/themes/light.theme.d.ts +2 -0
- package/dist/esm/core/theme/themes/light.theme.js +12 -0
- package/dist/esm/core/theme/themes/light.theme.js.map +1 -0
- package/dist/esm/core/typography/typography.types.d.ts +5 -0
- package/dist/esm/core/typography/typography.types.js +2 -0
- package/dist/esm/core/typography/typography.types.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/stories/Button.d.ts +27 -0
- package/dist/esm/stories/Button.js +22 -0
- package/dist/esm/stories/Button.js.map +1 -0
- package/dist/esm/stories/Header.d.ts +12 -0
- package/dist/esm/stories/Header.js +21 -0
- package/dist/esm/stories/Header.js.map +1 -0
- package/dist/esm/stories/Page.d.ts +3 -0
- package/dist/esm/stories/Page.js +38 -0
- package/dist/esm/stories/Page.js.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/backgrounds/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type BorderWidth = 'thick' | 'default' | 'thin' | 'none';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"border.types.js","sourceRoot":"","sources":["../../../../src/core/border/border.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { roleHues } from './color.types';
|
|
2
|
+
export function hslColor(c) {
|
|
3
|
+
return `hsl(${c.hue}, ${c.saturation}, ${c.lightness}, ${c.alpha})`;
|
|
4
|
+
}
|
|
5
|
+
export function roleColor(r) {
|
|
6
|
+
const hue = roleHues[r].default;
|
|
7
|
+
const role = r;
|
|
8
|
+
const alpha = 1;
|
|
9
|
+
const category = 'jewel';
|
|
10
|
+
return hslColor({ role, category, hue, alpha });
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=color.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.helper.js","sourceRoot":"","sources":["../../../../src/core/color/color.helper.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEtE,MAAM,UAAU,QAAQ,CAAC,CAAS;IAChC,OAAO,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,SAAS,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,CAAa;IAErC,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAChC,MAAM,IAAI,GAAe,CAAC,CAAC;IAC3B,MAAM,KAAK,GAAG,CAAC,CAAC;IAChB,MAAM,QAAQ,GAAoB,OAAO,CAAC;IAE1C,OAAO,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { colorCategories, colorRoles, colorSchemes, colorStyles } from './color.types';
|
|
2
|
+
export interface IColor {
|
|
3
|
+
scheme?: colorSchemes;
|
|
4
|
+
style?: colorStyles;
|
|
5
|
+
role?: colorRoles;
|
|
6
|
+
category?: colorCategories;
|
|
7
|
+
GradientPosition?: IGradientPosition;
|
|
8
|
+
saturationRange?: IRange;
|
|
9
|
+
brightnessRangeMap?: IRange;
|
|
10
|
+
hue: number | undefined;
|
|
11
|
+
saturation?: number;
|
|
12
|
+
lightness?: number;
|
|
13
|
+
alpha: number;
|
|
14
|
+
}
|
|
15
|
+
export interface IGradientPosition {
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IRange {
|
|
19
|
+
low: number;
|
|
20
|
+
high: number;
|
|
21
|
+
default?: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.model.js","sourceRoot":"","sources":["../../../../src/core/color/color.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IRange } from './color.model';
|
|
2
|
+
export declare type colorStyles = 'solid' | 'transparent' | 'gradient';
|
|
3
|
+
export declare type colorSchemes = 'monochromatic' | 'analogous' | 'complimentary' | 'splitComplimentary' | 'triadic';
|
|
4
|
+
export declare type colorCategories = 'jewel' | 'pastel' | 'earth' | 'neutral' | 'florescent' | 'shades';
|
|
5
|
+
export declare const saturationRanges: Record<colorCategories, IRange>;
|
|
6
|
+
export declare const lightnessRanges: Record<colorCategories, IRange>;
|
|
7
|
+
export declare type utilColorRoles = 'warn' | 'alert' | 'success' | 'info';
|
|
8
|
+
export declare type colorRoles = 'primary' | 'secondary' | 'tertiary' | 'inverse' | 'ghost';
|
|
9
|
+
export declare const roleHues: Record<colorRoles, IRange>;
|
|
10
|
+
export declare const utilHues: Record<utilColorRoles, IRange>;
|
|
11
|
+
export declare type ColorToken = 'primary';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// https://designerup.co/blog/ui-design-choosing-color-palettes/
|
|
2
|
+
// https://designerup.co/blog/practical-guide-to-perfect-ui-color-palettes/
|
|
3
|
+
export const saturationRanges = {
|
|
4
|
+
jewel: { low: 73, high: 83 },
|
|
5
|
+
pastel: { low: 14, high: 21 },
|
|
6
|
+
earth: { low: 36, high: 41 },
|
|
7
|
+
neutral: { low: 1, high: 10 },
|
|
8
|
+
florescent: { low: 63, high: 100 },
|
|
9
|
+
shades: { low: 0, high: 0 },
|
|
10
|
+
};
|
|
11
|
+
export const lightnessRanges = {
|
|
12
|
+
jewel: { low: 56, high: 76 },
|
|
13
|
+
pastel: { low: 89, high: 96 },
|
|
14
|
+
earth: { low: 36, high: 77 },
|
|
15
|
+
neutral: { low: 70, high: 99 },
|
|
16
|
+
florescent: { low: 82, high: 100 },
|
|
17
|
+
shades: { low: 0, high: 100 }
|
|
18
|
+
};
|
|
19
|
+
export const roleHues = {
|
|
20
|
+
primary: { low: 73, high: 83, default: 0 },
|
|
21
|
+
secondary: { low: 14, high: 21, default: 0 },
|
|
22
|
+
tertiary: { low: 36, high: 41, default: 0 },
|
|
23
|
+
inverse: { low: 63, high: 100, default: 0 },
|
|
24
|
+
ghost: { low: 0, high: 0, default: 0 },
|
|
25
|
+
};
|
|
26
|
+
export const utilHues = {
|
|
27
|
+
warn: { low: 320, high: 20, default: 0 },
|
|
28
|
+
alert: { low: 40, high: 70, default: 60 },
|
|
29
|
+
success: { low: 90, high: 150, default: 120 },
|
|
30
|
+
info: { low: 200, high: 260, default: 240 }, // blue
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=color.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.types.js","sourceRoot":"","sources":["../../../../src/core/color/color.types.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,2EAA2E;AAsB3E,MAAM,CAAC,MAAM,gBAAgB,GAAoC;IAC/D,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5B,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7B,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5B,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7B,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;IAClC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAoC;IAC9D,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5B,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7B,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5B,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC9B,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;IAClC,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE;CAC9B,CAAC;AAqBF,MAAM,CAAC,MAAM,QAAQ,GAA+B;IAClD,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;IAC1C,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;IAC5C,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;IAC3C,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE;IAC3C,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;CACvC,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAmC;IACtD,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;IACxC,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IACzC,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;IAC7C,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,OAAO;CACrD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.component.js","sourceRoot":"","sources":["../../../../src/core/container/container.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAMzC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAkB;IAE5D,OAAO,CACL,iCACG,QAAQ,CACL,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BackgroundType } from '../backgrounds/background.types';
|
|
2
|
+
import { BorderWidth } from '../border/border.types';
|
|
3
|
+
import { ColorToken } from '../color/color.types';
|
|
4
|
+
import { Apply, HorizontalAlign, RadiusApply, Size } from '../core.types';
|
|
5
|
+
import { ShadowStyle } from '../shadow/shadow.types';
|
|
6
|
+
export interface ContainerProps {
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
align?: HorizontalAlign;
|
|
9
|
+
backgroundType?: BackgroundType;
|
|
10
|
+
shadowStyle?: ShadowStyle;
|
|
11
|
+
backgroundColor?: ColorToken;
|
|
12
|
+
textColor?: ColorToken;
|
|
13
|
+
blur?: {
|
|
14
|
+
amount?: number;
|
|
15
|
+
};
|
|
16
|
+
border?: {
|
|
17
|
+
apply?: Apply;
|
|
18
|
+
applyAsSeparator?: boolean;
|
|
19
|
+
color?: ColorToken;
|
|
20
|
+
thickness?: BorderWidth;
|
|
21
|
+
};
|
|
22
|
+
radius?: {
|
|
23
|
+
size?: Size;
|
|
24
|
+
apply?: RadiusApply;
|
|
25
|
+
};
|
|
26
|
+
gradient?: {
|
|
27
|
+
degree?: number;
|
|
28
|
+
colors?: string[];
|
|
29
|
+
};
|
|
30
|
+
imageConfig?: {
|
|
31
|
+
src?: string;
|
|
32
|
+
};
|
|
33
|
+
margin?: {
|
|
34
|
+
horizontal?: Record<Size, number>;
|
|
35
|
+
bottom?: Record<Size, number>;
|
|
36
|
+
top?: Record<Size, number>;
|
|
37
|
+
};
|
|
38
|
+
Spacings?: Record<Size, number>;
|
|
39
|
+
TopSpacings?: Record<Size, number>;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.model.js","sourceRoot":"","sources":["../../../../src/core/container/container.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type Role = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'error' | 'warn' | 'link';
|
|
2
|
+
export declare type SupportRole = 'info' | 'warn' | 'success' | 'error';
|
|
3
|
+
export declare type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export declare type HorizontalBinary = 'left' | 'right';
|
|
5
|
+
export declare type HorizontalAlign = HorizontalBinary | 'center';
|
|
6
|
+
export declare type VerticalBinary = 'top' | 'bottom';
|
|
7
|
+
export declare type VerticalAlign = VerticalBinary | 'middle';
|
|
8
|
+
export declare type Apply = HorizontalBinary | VerticalBinary | 'vertical' | 'horizontal' | 'all';
|
|
9
|
+
export declare type RadiusApply = 'left' | 'right' | 'top' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'all' | 'none';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.types.js","sourceRoot":"","sources":["../../../src/core/core.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradiennt.helper.js","sourceRoot":"","sources":["../../../../src/core/gradients/gradiennt.helper.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACxC,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradient.model.js","sourceRoot":"","sources":["../../../../src/core/gradients/gradient.model.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradient.types.js","sourceRoot":"","sources":["../../../../src/core/gradients/gradient.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.model.js","sourceRoot":"","sources":["../../../../src/core/iconography/icon.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare type color = 'white' | 'black' | 'red' | 'blue' | 'green';
|
|
2
|
+
export declare type style = 'solid' | 'outline' | 'gradient';
|
|
3
|
+
export declare type display = 'logo' | 'alert' | 'warn' | 'disabled' | 'trash' | 'user' | 'back' | 'next' | 'unlock' | 'view' | 'hide';
|
|
4
|
+
export declare type actionable = 'add' | 'create' | 'copy' | 'edit' | 'disable' | 'save' | 'pin' | 'fav' | 'tag' | 'update' | 'archive' | 'delete' | 'lock' | 'unlock' | 'view' | 'hide';
|
|
5
|
+
export declare type behavior = 'open' | 'expand' | 'collapse';
|
|
6
|
+
export declare type messaging = 'alert' | 'info' | 'success' | 'warn' | 'warning';
|
|
7
|
+
export declare type usage = 'logo' | 'alert' | 'chat' | 'down' | 'favorite' | 'info' | 'location' | 'lock' | 'message' | 'profile' | 'question' | 'remove' | 'schedule' | 'search' | 'send' | 'settings' | 'share' | 'unlock' | 'up';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.types.js","sourceRoot":"","sources":["../../../../src/core/iconography/icon.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './backgrounds';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.types.js","sourceRoot":"","sources":["../../../../src/core/layout/layout.types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,GAAyB,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masking.model.js","sourceRoot":"","sources":["../../../../src/core/masking/masking.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type MaskingShape = 'square' | 'circle' | 'squircle' | 'rounded';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"masking.types.js","sourceRoot":"","sources":["../../../../src/core/masking/masking.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type ShadowStyle = 'Flat' | 'Raised' | 'Focussed' | 'Pressed' | 'Modal' | 'Navigation' | 'Drawer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow.types.js","sourceRoot":"","sources":["../../../../src/core/shadow/shadow.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.context.js","sourceRoot":"","sources":["../../../../src/core/theme/theme.context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAa,EAAE,CAAC,CAAC;AAEzD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;CAC3C;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ThemeContext from './theme.context';
|
|
3
|
+
import { LightTheme } from './themes/light.theme';
|
|
4
|
+
export default function useTheme() {
|
|
5
|
+
const themeProps = React.useContext(ThemeContext);
|
|
6
|
+
const theme = themeProps && themeProps.themes && themeProps.themeId && themeProps.themes[themeProps.themeId];
|
|
7
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
8
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
9
|
+
React.useDebugValue(theme);
|
|
10
|
+
}
|
|
11
|
+
return theme || LightTheme;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=theme.hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.hook.js","sourceRoot":"","sources":["../../../../src/core/theme/theme.hook.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,OAAO,UAAU,QAAQ;IAE9B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAElD,MAAM,KAAK,GAAG,UAAU,IAAI,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAE7G,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,sDAAsD;QACtD,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KAC5B;IAED,OAAO,KAAK,IAAI,UAAU,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.model.js","sourceRoot":"","sources":["../../../../src/core/theme/theme.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ThemeModel } from './theme.model';
|
|
3
|
+
interface ThemeProviderProps {
|
|
4
|
+
themeId: string;
|
|
5
|
+
themes: Record<string, ThemeModel>;
|
|
6
|
+
children?: React.ReactChild;
|
|
7
|
+
}
|
|
8
|
+
export declare const ThemeProvider: ({ children, themeId, themes }: ThemeProviderProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import React, { useState, useEffect } from 'react';
|
|
11
|
+
import { DefaultThemeId } from './theme.records';
|
|
12
|
+
import ThemeContext from './theme.context';
|
|
13
|
+
const STORAGE_KEY = 'THEME_ID';
|
|
14
|
+
export const ThemeProvider = ({ children, themeId, themes }) => {
|
|
15
|
+
const [_themeId, setThemeId] = useState(themeId);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const id = localStorage.getItem(STORAGE_KEY);
|
|
19
|
+
if (id) {
|
|
20
|
+
setThemeId(id);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
setThemeId(DefaultThemeId);
|
|
24
|
+
}
|
|
25
|
+
}))();
|
|
26
|
+
}, []);
|
|
27
|
+
return (React.createElement(ThemeContext.Provider, { value: { themeId, themes } }, _themeId ? children : null));
|
|
28
|
+
};
|
|
29
|
+
/*export function withTheme(Component: ({children, theme, themes }: (any & ThemeProps)) => JSX.Element) {
|
|
30
|
+
|
|
31
|
+
return (props: JSX.IntrinsicAttributes) => {
|
|
32
|
+
const { themeId, setThemeId } = useContext(ThemeContext);
|
|
33
|
+
|
|
34
|
+
const getTheme = (themeId: string) => themes[themeId];
|
|
35
|
+
const setTheme = (themeId: string) => {
|
|
36
|
+
localStorage.setItem(STORAGE_KEY, themeId);
|
|
37
|
+
setThemeId(themeId);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Component
|
|
42
|
+
{...props}
|
|
43
|
+
themes={Themes}
|
|
44
|
+
theme={getTheme(themeId)}
|
|
45
|
+
setTheme={setTheme}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
}*/
|
|
50
|
+
//# sourceMappingURL=theme.provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.provider.js","sourceRoot":"","sources":["../../../../src/core/theme/theme.provider.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,MAAM,WAAW,GAAG,UAAU,CAAC;AAQ/B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAsB,EAAE,EAAE;IAEjF,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAS,OAAO,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,GAAS,EAAE;YACV,MAAM,EAAE,GAAG,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAC7C,IAAI,EAAE,EAAE;gBACN,UAAU,CAAC,EAAE,CAAC,CAAC;aAChB;iBAAM;gBACL,UAAU,CAAC,cAAc,CAAC,CAAC;aAC5B;QACH,CAAC,CAAA,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,OAAO,EAAE,MAAM,EAAC,IAC5C,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CACL,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DarkTheme } from './themes/dark.theme';
|
|
2
|
+
import { LightTheme } from './themes/light.theme';
|
|
3
|
+
export const BuiltInThemes = {
|
|
4
|
+
LightTheme,
|
|
5
|
+
DarkTheme
|
|
6
|
+
};
|
|
7
|
+
// First Theme is default.
|
|
8
|
+
export const DefaultThemeId = Object.keys(BuiltInThemes)[0];
|
|
9
|
+
//# sourceMappingURL=theme.records.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.records.js","sourceRoot":"","sources":["../../../../src/core/theme/theme.records.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAA+B;IACvD,UAAU;IACV,SAAS;CACV,CAAA;AAED,0BAA0B;AAC1B,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type themes = 'uni' | 'carbon' | 'material' | 'bootstrap';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.types.js","sourceRoot":"","sources":["../../../../src/core/theme/theme.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark.theme.js","sourceRoot":"","sources":["../../../../../src/core/theme/themes/dark.theme.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC,EAAE,EAAE,WAAW;IACf,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,EAEP;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light.theme.js","sourceRoot":"","sources":["../../../../../src/core/theme/themes/light.theme.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE;QACN,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,SAAS;KACtB;CACF,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare type classes = 'sanserif' | 'serif' | 'slab' | 'script' | 'display' | 'monospace';
|
|
2
|
+
export declare type families = 'Open-Sans' | 'Times-New-Roman' | 'Noto-Serif-Display';
|
|
3
|
+
export declare type styles = 'thin' | 'light' | 'regular' | 'medium' | 'bold' | 'semi-bold' | 'black';
|
|
4
|
+
export declare type placement = 'overline' | 'title' | 'underline' | 'body' | 'label' | 'note' | 'footer';
|
|
5
|
+
export declare type alignment = 'left' | 'right' | 'center';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.types.js","sourceRoot":"","sources":["../../../../src/core/typography/typography.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './button.css';
|
|
2
|
+
export interface ButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* Is this the principal call to action on the page?
|
|
5
|
+
*/
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* What background color to use
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* How large should the button be?
|
|
13
|
+
*/
|
|
14
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
|
+
/**
|
|
16
|
+
* Button contents
|
|
17
|
+
*/
|
|
18
|
+
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional click handler
|
|
21
|
+
*/
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Primary UI component for user interaction
|
|
26
|
+
*/
|
|
27
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element;
|