@roku-ui/vue 0.27.0 → 0.29.0
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/dist/components/Avatar.vue.d.ts +2 -2
- package/dist/components/Btn.vue.d.ts +2 -2
- package/dist/components/Calendar.vue.d.ts +1 -1
- package/dist/components/CalendarInput.vue.d.ts +1 -1
- package/dist/components/ChatMessage.vue.d.ts +1 -1
- package/dist/components/ChatSystem.vue.d.ts +1 -1
- package/dist/components/Checkbox.vue.d.ts +1 -1
- package/dist/components/Chip.vue.d.ts +2 -2
- package/dist/components/ColorInput.vue.d.ts +1 -1
- package/dist/components/ColorSwatch.vue.d.ts +1 -1
- package/dist/components/Notification.vue.d.ts +1 -1
- package/dist/components/Paper.vue.d.ts +1 -1
- package/dist/components/PinInput.vue.d.ts +3 -3
- package/dist/components/Progress.vue.d.ts +10 -4
- package/dist/components/RokuProvider.vue.d.ts +2 -7
- package/dist/components/SelectArea.vue.d.ts +10 -1
- package/dist/components/Slider.vue.d.ts +2 -2
- package/dist/components/Step.vue.d.ts +48 -0
- package/dist/components/Switch.vue.d.ts +1 -1
- package/dist/components/Tag.vue.d.ts +3 -1
- package/dist/components/TextField.vue.d.ts +1 -1
- package/dist/components/ThemeProvider.vue.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/index.d.ts +8 -28
- package/dist/index.css +1 -1
- package/dist/index.js +6576 -4360
- package/dist/index.umd.cjs +4 -1
- package/dist/shared/button-styles.d.ts +4 -0
- package/dist/shared/color-system.d.ts +87 -0
- package/dist/shared/constants.d.ts +21 -0
- package/dist/shared/container-styles.d.ts +26 -0
- package/dist/shared/index.d.ts +6 -106
- package/dist/shared/tag-styles.d.ts +4 -0
- package/dist/shared/theme.d.ts +118 -0
- package/dist/test/demo/ComponentDefaultsDemo.vue.d.ts +2 -0
- package/dist/test/demo/ModernColorDemo.vue.d.ts +2 -0
- package/dist/test/demo/PartialColorsDemo.vue.d.ts +2 -0
- package/dist/test/demo/ProgressDemo.vue.d.ts +2 -0
- package/dist/test/demo/StepDemo.vue.d.ts +2 -0
- package/dist/test/demo/ThemeManagerDemo.vue.d.ts +2 -0
- package/dist/utils/index.d.ts +92 -5
- package/package.json +19 -20
- package/dist/utils/theme.d.ts +0 -12
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Color as CuloriColor } from 'culori';
|
|
2
|
+
import { MaybeRef } from 'vue';
|
|
3
|
+
import { Color, InputVariant } from '../types';
|
|
4
|
+
export declare const primaryColors: import('vue').ComputedRef<{
|
|
5
|
+
mode: "hsl";
|
|
6
|
+
h: number | undefined;
|
|
7
|
+
s: number;
|
|
8
|
+
l: number;
|
|
9
|
+
alpha: number | undefined;
|
|
10
|
+
}[]>;
|
|
11
|
+
export declare const secondaryColors: import('vue').ComputedRef<{
|
|
12
|
+
mode: "hsl";
|
|
13
|
+
h: number | undefined;
|
|
14
|
+
s: number;
|
|
15
|
+
l: number;
|
|
16
|
+
alpha: number | undefined;
|
|
17
|
+
}[]>;
|
|
18
|
+
export declare const tertiaryColors: import('vue').ComputedRef<{
|
|
19
|
+
mode: "hsl";
|
|
20
|
+
h: number | undefined;
|
|
21
|
+
s: number;
|
|
22
|
+
l: number;
|
|
23
|
+
alpha: number | undefined;
|
|
24
|
+
}[]>;
|
|
25
|
+
export declare const errorColors: import('vue').ComputedRef<{
|
|
26
|
+
mode: "hsl";
|
|
27
|
+
h: number | undefined;
|
|
28
|
+
s: number;
|
|
29
|
+
l: number;
|
|
30
|
+
alpha: number | undefined;
|
|
31
|
+
}[]>;
|
|
32
|
+
export declare const surfaceColors: import('vue').ComputedRef<any[]>;
|
|
33
|
+
export declare function useColors(color: MaybeRef<Color>, lightnessMap?: number[]): import('vue').ComputedRef<CuloriColor[]>;
|
|
34
|
+
export declare function useSurfaceColors(): import('vue').ComputedRef<any[]>;
|
|
35
|
+
export declare function useTextCS(color: MaybeRef<Color>): import('vue').ComputedRef<CS>;
|
|
36
|
+
export type CSType = 'bg' | 'border' | 'text' | 'placeholder' | 'hover:bg' | 'hover:border' | 'hover:text' | 'outline';
|
|
37
|
+
export type CSIndex = number | {
|
|
38
|
+
dark: number;
|
|
39
|
+
light: number;
|
|
40
|
+
};
|
|
41
|
+
export interface CSOptions {
|
|
42
|
+
color: MaybeRef<Color | 'surface'>;
|
|
43
|
+
type: CSType;
|
|
44
|
+
index: CSIndex;
|
|
45
|
+
alpha?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface CS {
|
|
48
|
+
style: Record<string, string>;
|
|
49
|
+
class: string[] | string;
|
|
50
|
+
}
|
|
51
|
+
export declare function getCSInner(colors: CuloriColor[], type: CSType, darkIndex: number, lightIndex: number, alpha?: number): CS;
|
|
52
|
+
export declare function useCS(cs: CSOptions): import('vue').ComputedRef<CS>;
|
|
53
|
+
export declare function useColorCS(color: MaybeRef<Color>, type: CSType, index: CSIndex, alpha?: number): import('vue').ComputedRef<CS>;
|
|
54
|
+
export declare function useSurfaceCS(type: CSType, index: CSIndex, alpha?: number): import('vue').ComputedRef<CS>;
|
|
55
|
+
export declare function useOutlineCS(color: MaybeRef<Color>): import('vue').ComputedRef<CS>;
|
|
56
|
+
export declare function useMergedCS(...cs: ReturnType<typeof useCS>[]): import('vue').ComputedRef<{
|
|
57
|
+
style: Record<string, string>;
|
|
58
|
+
class: string[];
|
|
59
|
+
}>;
|
|
60
|
+
export declare const borderCS: import('vue').ComputedRef<CS>;
|
|
61
|
+
export declare function useInputColorStyle(color: MaybeRef<string>, variant?: MaybeRef<InputVariant>): import('vue').ComputedRef<{
|
|
62
|
+
'--d-bg': string;
|
|
63
|
+
'--d-border-f': string;
|
|
64
|
+
'--d-border': string;
|
|
65
|
+
'--d-placeholder': string;
|
|
66
|
+
'--d-text': string;
|
|
67
|
+
'--l-bg': string;
|
|
68
|
+
'--l-border-f': string;
|
|
69
|
+
'--l-border': string;
|
|
70
|
+
'--l-placeholder': string;
|
|
71
|
+
'--l-text': string;
|
|
72
|
+
'--d-bg-h'?: undefined;
|
|
73
|
+
'--l-bg-h'?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
'--d-bg': string;
|
|
76
|
+
'--d-bg-h': string;
|
|
77
|
+
'--d-border': string;
|
|
78
|
+
'--l-bg': string;
|
|
79
|
+
'--l-bg-h': string;
|
|
80
|
+
'--l-border': string;
|
|
81
|
+
'--d-border-f'?: undefined;
|
|
82
|
+
'--d-placeholder'?: undefined;
|
|
83
|
+
'--d-text'?: undefined;
|
|
84
|
+
'--l-border-f'?: undefined;
|
|
85
|
+
'--l-placeholder'?: undefined;
|
|
86
|
+
'--l-text'?: undefined;
|
|
87
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const darkSurfaceBgIndex = 9;
|
|
2
|
+
export declare const darkSurfaceBgVariant1Index = 8;
|
|
3
|
+
export declare const darkSurfaceBgVariant2Index = 7;
|
|
4
|
+
export declare const darkBorderIndex = 7;
|
|
5
|
+
export declare const darkBorderVariantIndex = 7;
|
|
6
|
+
export declare const darkTextIndex = 3;
|
|
7
|
+
export declare const darkTextVariantIndex = 6;
|
|
8
|
+
export declare const darkBgIndex = 5;
|
|
9
|
+
export declare const darkBgVariantIndex = 6;
|
|
10
|
+
export declare const lightBorderIndex = 3;
|
|
11
|
+
export declare const lightBorderVariantIndex = 4;
|
|
12
|
+
export declare const darkOpacity = 0.25;
|
|
13
|
+
export declare const darkOpacityVariant = 0.3;
|
|
14
|
+
export declare const lightSurfaceBgIndex = 1;
|
|
15
|
+
export declare const lightSurfaceBgVariantIndex = 2;
|
|
16
|
+
export declare const lightTextIndex = 6;
|
|
17
|
+
export declare const lightTextVariantIndex = 5;
|
|
18
|
+
export declare const lightBgIndex = 4;
|
|
19
|
+
export declare const lightBgVariantIndex = 5;
|
|
20
|
+
export declare const lightOpacity = 0.08;
|
|
21
|
+
export declare const lightOpacityVariant = 0.15;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MaybeRef } from 'vue';
|
|
2
|
+
import { Color, ContainerVariant } from '../types';
|
|
3
|
+
export declare function useContainerCS(variant: MaybeRef<ContainerVariant>, color: MaybeRef<Color>): import('vue').ComputedRef<{
|
|
4
|
+
style: Record<string, string>;
|
|
5
|
+
class: string[];
|
|
6
|
+
}>;
|
|
7
|
+
export declare function useContainerDefaultCS(): import('vue').ComputedRef<{
|
|
8
|
+
style: Record<string, string>;
|
|
9
|
+
class: string[];
|
|
10
|
+
}>;
|
|
11
|
+
export declare function useContainerDefaultVariantCS(): import('vue').ComputedRef<{
|
|
12
|
+
style: Record<string, string>;
|
|
13
|
+
class: string[];
|
|
14
|
+
}>;
|
|
15
|
+
export declare function useIndicatorFilledCS(color: MaybeRef<Color>): import('vue').ComputedRef<{
|
|
16
|
+
style: Record<string, string>;
|
|
17
|
+
class: string[];
|
|
18
|
+
}>;
|
|
19
|
+
export declare function useContainerFilledCS(color: MaybeRef<Color>): import('vue').ComputedRef<{
|
|
20
|
+
style: Record<string, string>;
|
|
21
|
+
class: string[];
|
|
22
|
+
}>;
|
|
23
|
+
export declare function useContainerLightCS(color: MaybeRef<Color>): import('vue').ComputedRef<{
|
|
24
|
+
style: Record<string, string>;
|
|
25
|
+
class: string[];
|
|
26
|
+
}>;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,106 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export declare const secondaryColors: ComputedRef<tinycolor.Instance[]>;
|
|
8
|
-
export declare const tertiaryColors: ComputedRef<tinycolor.Instance[]>;
|
|
9
|
-
export declare const errorColors: ComputedRef<tinycolor.Instance[]>;
|
|
10
|
-
export declare const surfaceColors: ComputedRef<tinycolor.Instance[]>;
|
|
11
|
-
export declare function useContainerCS(variant: MaybeRef<ContainerVariant>, color: MaybeRef<Color>): ComputedRef<{
|
|
12
|
-
style: Record<string, string>;
|
|
13
|
-
class: string[];
|
|
14
|
-
}>;
|
|
15
|
-
export declare function useColors(color: MaybeRef<Color>, lightnessMap?: number[]): ComputedRef<tinycolor.Instance[]>;
|
|
16
|
-
export declare function useSurfaceColors(): ComputedRef<tinycolor.Instance[]>;
|
|
17
|
-
type CSType = 'bg' | 'border' | 'text' | 'placeholder' | 'hover:bg' | 'hover:border' | 'hover:text' | 'outline';
|
|
18
|
-
type CSIndex = number | {
|
|
19
|
-
dark: number;
|
|
20
|
-
light: number;
|
|
21
|
-
};
|
|
22
|
-
interface CSOptions {
|
|
23
|
-
color: MaybeRef<Color | 'surface'>;
|
|
24
|
-
type: CSType;
|
|
25
|
-
index: CSIndex;
|
|
26
|
-
alpha?: number;
|
|
27
|
-
}
|
|
28
|
-
interface CS {
|
|
29
|
-
style: Record<string, string>;
|
|
30
|
-
class: string[] | string;
|
|
31
|
-
}
|
|
32
|
-
export declare function useContainerDefaultCS(): ComputedRef<{
|
|
33
|
-
style: Record<string, string>;
|
|
34
|
-
class: string[];
|
|
35
|
-
}>;
|
|
36
|
-
export declare function useContainerDefaultVariantCS(): ComputedRef<{
|
|
37
|
-
style: Record<string, string>;
|
|
38
|
-
class: string[];
|
|
39
|
-
}>;
|
|
40
|
-
export declare function useMergedCS(...cs: ReturnType<typeof useCS>[]): ComputedRef<{
|
|
41
|
-
style: Record<string, string>;
|
|
42
|
-
class: string[];
|
|
43
|
-
}>;
|
|
44
|
-
export declare function useIndicatorFilledCS(color: MaybeRef<Color>): ComputedRef<{
|
|
45
|
-
style: Record<string, string>;
|
|
46
|
-
class: string[];
|
|
47
|
-
}>;
|
|
48
|
-
export declare function useContainerFilledCS(color: MaybeRef<Color>): ComputedRef<{
|
|
49
|
-
style: Record<string, string>;
|
|
50
|
-
class: string[];
|
|
51
|
-
}>;
|
|
52
|
-
export declare function useContainerLightCS(color: MaybeRef<Color>): ComputedRef<{
|
|
53
|
-
style: Record<string, string>;
|
|
54
|
-
class: string[];
|
|
55
|
-
}>;
|
|
56
|
-
export declare function getCSInner(colors: tinycolor.Instance[], type: CSType, darkIndex: number, lightIndex: number, alpha?: number): CS;
|
|
57
|
-
export declare function useCS(cs: CSOptions): ComputedRef<CS>;
|
|
58
|
-
export declare function useColorCS(color: MaybeRef<Color>, type: CSType, index: CSIndex, alpha?: number): ComputedRef<CS>;
|
|
59
|
-
export declare function useSurfaceCS(type: CSType, index: CSIndex, alpha?: number): ComputedRef<CS>;
|
|
60
|
-
export declare function useOutlineCS(color: MaybeRef<Color>): ComputedRef<CS>;
|
|
61
|
-
export declare function useButtonCS(variant?: MaybeRef<BtnVariant>, color?: MaybeRef<Color>): ComputedRef<CS>;
|
|
62
|
-
export declare function useTagCS(variant?: MaybeRef<BtnVariant>, color?: MaybeRef<Color>, hasInteraction?: MaybeRef<boolean>): ComputedRef<CS>;
|
|
63
|
-
export declare function useInputColorStyle(color: MaybeRef<string>, variant?: MaybeRef<InputVariant>): ComputedRef<{
|
|
64
|
-
'--d-bg': string;
|
|
65
|
-
'--d-border-f': string;
|
|
66
|
-
'--d-border': string;
|
|
67
|
-
'--d-placeholder': string;
|
|
68
|
-
'--d-text': string;
|
|
69
|
-
'--l-bg': string;
|
|
70
|
-
'--l-border-f': string;
|
|
71
|
-
'--l-border': string;
|
|
72
|
-
'--l-placeholder': string;
|
|
73
|
-
'--l-text': string;
|
|
74
|
-
'--d-bg-h'?: undefined;
|
|
75
|
-
'--l-bg-h'?: undefined;
|
|
76
|
-
} | {
|
|
77
|
-
'--d-bg': string;
|
|
78
|
-
'--d-bg-h': string;
|
|
79
|
-
'--d-border': string;
|
|
80
|
-
'--l-bg': string;
|
|
81
|
-
'--l-bg-h': string;
|
|
82
|
-
'--l-border': string;
|
|
83
|
-
'--d-border-f'?: undefined;
|
|
84
|
-
'--d-placeholder'?: undefined;
|
|
85
|
-
'--d-text'?: undefined;
|
|
86
|
-
'--l-border-f'?: undefined;
|
|
87
|
-
'--l-placeholder'?: undefined;
|
|
88
|
-
'--l-text'?: undefined;
|
|
89
|
-
}>;
|
|
90
|
-
export interface ThemeColors {
|
|
91
|
-
primary: string;
|
|
92
|
-
secondary: string;
|
|
93
|
-
tertiary: string;
|
|
94
|
-
error: string;
|
|
95
|
-
surface: string;
|
|
96
|
-
}
|
|
97
|
-
export interface Theme {
|
|
98
|
-
withBorder: boolean;
|
|
99
|
-
rounded: Rounded;
|
|
100
|
-
colors: ThemeColors;
|
|
101
|
-
}
|
|
102
|
-
export declare const defaultThemeData: Theme;
|
|
103
|
-
export declare function useTheme(): Theme;
|
|
104
|
-
export declare function provideTheme(theme: Partial<Theme>): void;
|
|
105
|
-
export declare function themeToThemeData(theme: Theme): import('../utils/theme').ThemeData;
|
|
106
|
-
export {};
|
|
1
|
+
export * from './button-styles';
|
|
2
|
+
export * from './color-system';
|
|
3
|
+
export * from './constants';
|
|
4
|
+
export * from './container-styles';
|
|
5
|
+
export * from './tag-styles';
|
|
6
|
+
export * from './theme';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRef } from 'vue';
|
|
2
|
+
import { CS } from './color-system';
|
|
3
|
+
import { BtnVariant, Color } from '../types';
|
|
4
|
+
export declare function useTagCS(variant?: MaybeRef<BtnVariant>, color?: MaybeRef<Color>, hasInteraction?: MaybeRef<boolean>): ComputedRef<CS>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { Rounded } from '../types';
|
|
3
|
+
export interface ThemeColors {
|
|
4
|
+
primary?: string;
|
|
5
|
+
secondary?: string;
|
|
6
|
+
tertiary?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
surface?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ComponentDefaults {
|
|
11
|
+
Btn?: {
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
|
+
variant?: import('../types').BtnVariant;
|
|
14
|
+
color?: string;
|
|
15
|
+
rounded?: Rounded;
|
|
16
|
+
pressEffect?: 'translate' | 'scale';
|
|
17
|
+
};
|
|
18
|
+
TextField?: {
|
|
19
|
+
size?: 'sm' | 'md' | 'lg';
|
|
20
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
21
|
+
rounded?: Rounded;
|
|
22
|
+
};
|
|
23
|
+
Switch?: {
|
|
24
|
+
size?: 'sm' | 'md' | 'lg';
|
|
25
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
26
|
+
};
|
|
27
|
+
Select?: {
|
|
28
|
+
size?: 'sm' | 'md' | 'lg';
|
|
29
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
30
|
+
rounded?: Rounded;
|
|
31
|
+
};
|
|
32
|
+
Checkbox?: {
|
|
33
|
+
size?: 'sm' | 'md' | 'lg';
|
|
34
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
35
|
+
rounded?: Rounded;
|
|
36
|
+
};
|
|
37
|
+
Paper?: {
|
|
38
|
+
variant?: import('../types').ContainerVariant;
|
|
39
|
+
color?: string;
|
|
40
|
+
rounded?: Rounded;
|
|
41
|
+
};
|
|
42
|
+
Progress?: {
|
|
43
|
+
size?: 'sm' | 'md' | 'lg';
|
|
44
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
45
|
+
};
|
|
46
|
+
Rating?: {
|
|
47
|
+
size?: 'sm' | 'md' | 'lg';
|
|
48
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
49
|
+
};
|
|
50
|
+
Slider?: {
|
|
51
|
+
size?: 'sm' | 'md' | 'lg';
|
|
52
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
53
|
+
};
|
|
54
|
+
Avatar?: {
|
|
55
|
+
size?: 'sm' | 'md' | 'lg';
|
|
56
|
+
color?: string;
|
|
57
|
+
rounded?: Rounded;
|
|
58
|
+
};
|
|
59
|
+
Tag?: {
|
|
60
|
+
size?: 'sm' | 'md' | 'lg';
|
|
61
|
+
variant?: import('../types').ContainerVariant;
|
|
62
|
+
color?: string;
|
|
63
|
+
rounded?: Rounded;
|
|
64
|
+
};
|
|
65
|
+
Chip?: {
|
|
66
|
+
size?: 'sm' | 'md' | 'lg';
|
|
67
|
+
variant?: import('../types').ContainerVariant;
|
|
68
|
+
color?: string;
|
|
69
|
+
rounded?: Rounded;
|
|
70
|
+
};
|
|
71
|
+
Modal?: {
|
|
72
|
+
size?: 'sm' | 'md' | 'lg';
|
|
73
|
+
rounded?: Rounded;
|
|
74
|
+
};
|
|
75
|
+
Drawer?: {
|
|
76
|
+
size?: 'sm' | 'md' | 'lg';
|
|
77
|
+
};
|
|
78
|
+
Notification?: {
|
|
79
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
80
|
+
rounded?: Rounded;
|
|
81
|
+
};
|
|
82
|
+
ColorInput?: {
|
|
83
|
+
size?: 'sm' | 'md' | 'lg';
|
|
84
|
+
rounded?: Rounded;
|
|
85
|
+
};
|
|
86
|
+
CalendarInput?: {
|
|
87
|
+
size?: 'sm' | 'md' | 'lg';
|
|
88
|
+
rounded?: Rounded;
|
|
89
|
+
};
|
|
90
|
+
PinInput?: {
|
|
91
|
+
size?: 'sm' | 'md' | 'lg';
|
|
92
|
+
rounded?: Rounded;
|
|
93
|
+
};
|
|
94
|
+
Dropzone?: {
|
|
95
|
+
rounded?: Rounded;
|
|
96
|
+
};
|
|
97
|
+
Step?: {
|
|
98
|
+
size?: 'sm' | 'md' | 'lg';
|
|
99
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
100
|
+
direction?: 'horizontal' | 'vertical';
|
|
101
|
+
type?: 'default' | 'navigation' | 'dot' | 'simple';
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export interface ThemeData {
|
|
105
|
+
withBorder: boolean;
|
|
106
|
+
rounded: Rounded;
|
|
107
|
+
colors: ThemeColors;
|
|
108
|
+
defaultSize: 'sm' | 'md' | 'lg';
|
|
109
|
+
defaultColor: 'primary' | 'secondary' | 'tertiary' | 'error';
|
|
110
|
+
componentDefaults?: ComponentDefaults;
|
|
111
|
+
}
|
|
112
|
+
export declare const defaultThemeData: ThemeData;
|
|
113
|
+
export declare const symbolStyle: unique symbol;
|
|
114
|
+
export declare function useTheme(): ComputedRef<ThemeData>;
|
|
115
|
+
export declare function provideTheme(theme: ComputedRef<ThemeData>): void;
|
|
116
|
+
export declare function getThemeColorString(colorKey: keyof ThemeColors): string;
|
|
117
|
+
export declare function useComponentDefaults<K extends keyof ComponentDefaults>(componentName: K): ComponentDefaults[K];
|
|
118
|
+
export declare function getComponentDefault<K extends keyof ComponentDefaults>(componentName: K, propName: string, fallback?: any): any;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,14 +1,93 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Color as CuloriColor } from 'culori';
|
|
2
|
+
type ColorInput = string | CuloriColor;
|
|
2
3
|
export * from './classGenerator';
|
|
3
4
|
export * from './notifications';
|
|
4
5
|
export * from './symbols';
|
|
5
|
-
export declare function generateColorsMap(color:
|
|
6
|
+
export declare function generateColorsMap(color: ColorInput, lightnessMap?: number[]): {
|
|
6
7
|
colors: string[];
|
|
7
8
|
baseColorIndex: number;
|
|
8
9
|
};
|
|
9
|
-
export
|
|
10
|
+
export interface ColorGenerationOptions {
|
|
11
|
+
strategy?: 'conservative' | 'balanced' | 'vibrant';
|
|
12
|
+
contrastTarget?: 'AA' | 'AAA' | 'none';
|
|
13
|
+
gamut?: 'srgb' | 'p3' | 'rec2020';
|
|
14
|
+
customChromaCurve?: (lightness: number) => number;
|
|
15
|
+
}
|
|
16
|
+
export declare function generateColorsObjMapOKLCH(color: ColorInput, lightnessMap?: number[], options?: ColorGenerationOptions): {
|
|
10
17
|
baseColorIndex: number;
|
|
11
|
-
colors:
|
|
18
|
+
colors: any[];
|
|
19
|
+
};
|
|
20
|
+
export interface GamutInfo {
|
|
21
|
+
name: 'srgb' | 'p3' | 'rec2020';
|
|
22
|
+
rgbLimits: {
|
|
23
|
+
min: number;
|
|
24
|
+
max: number;
|
|
25
|
+
};
|
|
26
|
+
description: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const GAMUT_DEFINITIONS: Record<string, GamutInfo>;
|
|
29
|
+
export declare function isColorInGamut(color: any, gamut: 'srgb' | 'p3' | 'rec2020'): boolean;
|
|
30
|
+
export declare function analyzeColorGamut(colors: any[]): {
|
|
31
|
+
srgbCoverage: number;
|
|
32
|
+
p3Coverage: number;
|
|
33
|
+
rec2020Coverage: number;
|
|
34
|
+
outOfGamutColors: {
|
|
35
|
+
index: number;
|
|
36
|
+
gamuts: string[];
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
export declare function generateContrastAwareColors(color: ColorInput, backgroundLightness?: number, // Default to light background
|
|
40
|
+
options?: ColorGenerationOptions): ColorsTuple;
|
|
41
|
+
export declare function generateAdaptiveLightnessMap(color: ColorInput, purpose?: 'primary' | 'secondary' | 'surface' | 'accent'): number[];
|
|
42
|
+
export declare function generateAdaptiveColors(color: ColorInput, purpose?: 'primary' | 'secondary' | 'surface' | 'accent', options?: ColorGenerationOptions): ColorsTuple;
|
|
43
|
+
export interface AdvancedColorOptions extends ColorGenerationOptions {
|
|
44
|
+
purpose?: 'primary' | 'secondary' | 'surface' | 'accent';
|
|
45
|
+
backgroundLightness?: number;
|
|
46
|
+
enableAnalysis?: boolean;
|
|
47
|
+
outputFormat?: 'hex' | 'oklch' | 'rgb' | 'hsl' | 'all';
|
|
48
|
+
}
|
|
49
|
+
export interface ColorPaletteResult {
|
|
50
|
+
colors: ColorsTuple;
|
|
51
|
+
baseColorIndex: number;
|
|
52
|
+
metadata: {
|
|
53
|
+
strategy: string;
|
|
54
|
+
purpose: string;
|
|
55
|
+
gamut: string;
|
|
56
|
+
contrastTarget: string;
|
|
57
|
+
gamutAnalysis?: ReturnType<typeof analyzeColorGamut>;
|
|
58
|
+
};
|
|
59
|
+
alternatives?: {
|
|
60
|
+
conservative: ColorsTuple;
|
|
61
|
+
balanced: ColorsTuple;
|
|
62
|
+
vibrant: ColorsTuple;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export declare function generateAdvancedColorPalette(color: ColorInput, options?: AdvancedColorOptions): ColorPaletteResult;
|
|
66
|
+
export declare function createColorPalette(color: string, type?: 'primary' | 'secondary' | 'accent' | 'surface'): ColorsTuple;
|
|
67
|
+
export declare function generateColorsEnhanced(color: ColorInput, options?: AdvancedColorOptions): ColorsTuple;
|
|
68
|
+
export declare function generateColorsObjMapOKLCHCached(color: ColorInput, lightnessMap?: number[], options?: ColorGenerationOptions): {
|
|
69
|
+
baseColorIndex: number;
|
|
70
|
+
colors: any[];
|
|
71
|
+
};
|
|
72
|
+
export declare function generateAdvancedColorPaletteCached(color: ColorInput, options?: AdvancedColorOptions): ColorPaletteResult;
|
|
73
|
+
export declare const ColorPalettePerformance: {
|
|
74
|
+
clearCache: () => void;
|
|
75
|
+
getCacheStats: () => {
|
|
76
|
+
size: number;
|
|
77
|
+
maxSize: number;
|
|
78
|
+
hitRate: number;
|
|
79
|
+
};
|
|
80
|
+
precomputePalettes: (colors: string[]) => void;
|
|
81
|
+
};
|
|
82
|
+
export declare function generateColorsObjMap(color: ColorInput, lightnessMap?: number[]): {
|
|
83
|
+
baseColorIndex: number;
|
|
84
|
+
colors: {
|
|
85
|
+
mode: "hsl";
|
|
86
|
+
h: number | undefined;
|
|
87
|
+
s: number;
|
|
88
|
+
l: number;
|
|
89
|
+
alpha: number | undefined;
|
|
90
|
+
}[];
|
|
12
91
|
};
|
|
13
92
|
export type ColorsTuple = readonly [
|
|
14
93
|
string,
|
|
@@ -25,4 +104,12 @@ export type ColorsTuple = readonly [
|
|
|
25
104
|
...string[]
|
|
26
105
|
];
|
|
27
106
|
export declare function generateColors(color: ColorInput, lightnessMap?: number[]): ColorsTuple;
|
|
28
|
-
export
|
|
107
|
+
export declare function generateColorsOKLCH(color: ColorInput, lightnessMap?: number[], options?: ColorGenerationOptions): ColorsTuple;
|
|
108
|
+
export declare function generateOKLCHString(color: ColorInput): string;
|
|
109
|
+
export declare function generateEditorFriendlyColors(color: ColorInput, lightnessMap?: number[]): {
|
|
110
|
+
index: number;
|
|
111
|
+
hex: string;
|
|
112
|
+
rgb: string;
|
|
113
|
+
oklch: string;
|
|
114
|
+
lightness: number;
|
|
115
|
+
}[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roku-ui/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.29.0",
|
|
5
5
|
"author": "Jianqi Pan <jannchie@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -28,34 +28,33 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@formkit/auto-animate": "^0.
|
|
32
|
-
"@unocss/reset": "66.
|
|
33
|
-
"@vueuse/core": "^13.
|
|
34
|
-
"
|
|
35
|
-
"vue": "^3.5.
|
|
31
|
+
"@formkit/auto-animate": "^0.9.0",
|
|
32
|
+
"@unocss/reset": "66.5.0",
|
|
33
|
+
"@vueuse/core": "^13.9.0",
|
|
34
|
+
"culori": "^4.0.2",
|
|
35
|
+
"vue": "^3.5.21",
|
|
36
36
|
"vue-wf": "^0.5.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@iconify/json": "^2.2.
|
|
40
|
-
"@jannchie/eslint-config": "^3.
|
|
41
|
-
"@
|
|
42
|
-
"@unocss/eslint-
|
|
43
|
-
"@unocss/
|
|
44
|
-
"@unocss/preset-icons": "66.3.3",
|
|
39
|
+
"@iconify/json": "^2.2.382",
|
|
40
|
+
"@jannchie/eslint-config": "^3.7.1",
|
|
41
|
+
"@unocss/eslint-config": "66.5.0",
|
|
42
|
+
"@unocss/eslint-plugin": "66.5.0",
|
|
43
|
+
"@unocss/preset-icons": "66.5.0",
|
|
45
44
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
46
|
-
"@vitejs/plugin-vue-jsx": "^5.
|
|
47
|
-
"eslint": "^9.
|
|
45
|
+
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
|
46
|
+
"eslint": "^9.35.0",
|
|
48
47
|
"eslint-plugin-format": "^1.0.1",
|
|
49
48
|
"typescript": "5.9.2",
|
|
50
|
-
"unocss": "66.
|
|
49
|
+
"unocss": "66.5.0",
|
|
51
50
|
"unplugin-auto-export": "^1.0.4",
|
|
52
|
-
"unplugin-auto-import": "^
|
|
53
|
-
"unplugin-vue-components": "^
|
|
54
|
-
"vite": "^7.
|
|
51
|
+
"unplugin-auto-import": "^20.1.0",
|
|
52
|
+
"unplugin-vue-components": "^29.0.0",
|
|
53
|
+
"vite": "^7.1.4",
|
|
55
54
|
"vite-plugin-dts": "4.5.4",
|
|
56
55
|
"vitest": "^3.2.4",
|
|
57
|
-
"vue-tsc": "^3.0.
|
|
58
|
-
"@roku-ui/preset": "^0.
|
|
56
|
+
"vue-tsc": "^3.0.6",
|
|
57
|
+
"@roku-ui/preset": "^0.29.0"
|
|
59
58
|
},
|
|
60
59
|
"scripts": {
|
|
61
60
|
"dev": "vite",
|
package/dist/utils/theme.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ColorsTuple } from '.';
|
|
2
|
-
export interface ThemeColorsColors {
|
|
3
|
-
primary: ColorsTuple | string;
|
|
4
|
-
secondary: ColorsTuple | string;
|
|
5
|
-
tertiary: ColorsTuple | string;
|
|
6
|
-
error: ColorsTuple | string;
|
|
7
|
-
surface: ColorsTuple | string;
|
|
8
|
-
}
|
|
9
|
-
export interface ThemeData {
|
|
10
|
-
name: string;
|
|
11
|
-
colors: ThemeColorsColors;
|
|
12
|
-
}
|