@clickhouse/click-ui 0.0.245-beta.0 → 0.0.245-fix-theme-test.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.
|
@@ -4,10 +4,10 @@ declare const useColorStyle: (defaultTheme?: CodeThemeType) => {
|
|
|
4
4
|
display: string;
|
|
5
5
|
overflowX: string;
|
|
6
6
|
padding: string;
|
|
7
|
-
color:
|
|
8
|
-
background:
|
|
9
|
-
borderRadius:
|
|
10
|
-
font:
|
|
7
|
+
color: string;
|
|
8
|
+
background: string;
|
|
9
|
+
borderRadius: string;
|
|
10
|
+
font: string;
|
|
11
11
|
};
|
|
12
12
|
"hljs-comment": {
|
|
13
13
|
color: string;
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -17,131 +17,131 @@ declare module "styled-components" {
|
|
|
17
17
|
declare const useCUITheme: () => {
|
|
18
18
|
breakpoint: {
|
|
19
19
|
readonly sizes: {
|
|
20
|
-
readonly sm:
|
|
21
|
-
readonly md:
|
|
22
|
-
readonly lg:
|
|
23
|
-
readonly xl:
|
|
24
|
-
readonly "2xl":
|
|
20
|
+
readonly sm: string;
|
|
21
|
+
readonly md: string;
|
|
22
|
+
readonly lg: string;
|
|
23
|
+
readonly xl: string;
|
|
24
|
+
readonly "2xl": string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
global: {
|
|
28
28
|
readonly color: {
|
|
29
29
|
readonly gradients: {
|
|
30
|
-
readonly yellowToBlack:
|
|
31
|
-
readonly whiteToBlack:
|
|
30
|
+
readonly yellowToBlack: string;
|
|
31
|
+
readonly whiteToBlack: string;
|
|
32
32
|
};
|
|
33
33
|
readonly background: {
|
|
34
|
-
readonly default:
|
|
35
|
-
readonly muted:
|
|
36
|
-
readonly sidebar:
|
|
37
|
-
readonly split:
|
|
38
|
-
readonly muted_a:
|
|
34
|
+
readonly default: string;
|
|
35
|
+
readonly muted: string;
|
|
36
|
+
readonly sidebar: string;
|
|
37
|
+
readonly split: string;
|
|
38
|
+
readonly muted_a: string;
|
|
39
39
|
};
|
|
40
40
|
readonly stroke: {
|
|
41
|
-
readonly default:
|
|
42
|
-
readonly muted:
|
|
43
|
-
readonly intense:
|
|
44
|
-
readonly split:
|
|
41
|
+
readonly default: string;
|
|
42
|
+
readonly muted: string;
|
|
43
|
+
readonly intense: string;
|
|
44
|
+
readonly split: string;
|
|
45
45
|
};
|
|
46
46
|
readonly accent: {
|
|
47
|
-
readonly default:
|
|
47
|
+
readonly default: string;
|
|
48
48
|
};
|
|
49
49
|
readonly text: {
|
|
50
|
-
readonly default:
|
|
51
|
-
readonly muted:
|
|
52
|
-
readonly disabled:
|
|
50
|
+
readonly default: string;
|
|
51
|
+
readonly muted: string;
|
|
52
|
+
readonly disabled: string;
|
|
53
53
|
readonly link: {
|
|
54
|
-
readonly default:
|
|
55
|
-
readonly hover:
|
|
54
|
+
readonly default: string;
|
|
55
|
+
readonly hover: string;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
readonly outline: {
|
|
59
|
-
readonly default:
|
|
59
|
+
readonly default: string;
|
|
60
60
|
};
|
|
61
61
|
readonly shadow: {
|
|
62
|
-
readonly default:
|
|
62
|
+
readonly default: string;
|
|
63
63
|
};
|
|
64
64
|
readonly feedback: {
|
|
65
65
|
readonly info: {
|
|
66
|
-
readonly background:
|
|
67
|
-
readonly foreground:
|
|
66
|
+
readonly background: string;
|
|
67
|
+
readonly foreground: string;
|
|
68
68
|
};
|
|
69
69
|
readonly success: {
|
|
70
|
-
readonly background:
|
|
71
|
-
readonly foreground:
|
|
70
|
+
readonly background: string;
|
|
71
|
+
readonly foreground: string;
|
|
72
72
|
};
|
|
73
73
|
readonly warning: {
|
|
74
|
-
readonly background:
|
|
75
|
-
readonly foreground:
|
|
74
|
+
readonly background: string;
|
|
75
|
+
readonly foreground: string;
|
|
76
76
|
};
|
|
77
77
|
readonly danger: {
|
|
78
|
-
readonly background:
|
|
79
|
-
readonly foreground:
|
|
78
|
+
readonly background: string;
|
|
79
|
+
readonly foreground: string;
|
|
80
80
|
};
|
|
81
81
|
readonly neutral: {
|
|
82
|
-
readonly background:
|
|
83
|
-
readonly foreground:
|
|
84
|
-
readonly stroke:
|
|
82
|
+
readonly background: string;
|
|
83
|
+
readonly foreground: string;
|
|
84
|
+
readonly stroke: string;
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
readonly chart: {
|
|
88
88
|
readonly default: {
|
|
89
|
-
readonly blue:
|
|
90
|
-
readonly orange:
|
|
91
|
-
readonly green:
|
|
92
|
-
readonly fuchsia:
|
|
93
|
-
readonly yellow:
|
|
94
|
-
readonly violet:
|
|
95
|
-
readonly babyblue:
|
|
96
|
-
readonly red:
|
|
97
|
-
readonly danger:
|
|
98
|
-
readonly teal:
|
|
99
|
-
readonly sunrise:
|
|
100
|
-
readonly slate:
|
|
89
|
+
readonly blue: string;
|
|
90
|
+
readonly orange: string;
|
|
91
|
+
readonly green: string;
|
|
92
|
+
readonly fuchsia: string;
|
|
93
|
+
readonly yellow: string;
|
|
94
|
+
readonly violet: string;
|
|
95
|
+
readonly babyblue: string;
|
|
96
|
+
readonly red: string;
|
|
97
|
+
readonly danger: string;
|
|
98
|
+
readonly teal: string;
|
|
99
|
+
readonly sunrise: string;
|
|
100
|
+
readonly slate: string;
|
|
101
101
|
};
|
|
102
102
|
readonly bars: {
|
|
103
|
-
readonly blue:
|
|
104
|
-
readonly orange:
|
|
105
|
-
readonly green:
|
|
106
|
-
readonly fuchsia:
|
|
107
|
-
readonly yellow:
|
|
108
|
-
readonly violet:
|
|
109
|
-
readonly babyblue:
|
|
110
|
-
readonly red:
|
|
111
|
-
readonly teal:
|
|
112
|
-
readonly sunrise:
|
|
113
|
-
readonly slate:
|
|
103
|
+
readonly blue: string;
|
|
104
|
+
readonly orange: string;
|
|
105
|
+
readonly green: string;
|
|
106
|
+
readonly fuchsia: string;
|
|
107
|
+
readonly yellow: string;
|
|
108
|
+
readonly violet: string;
|
|
109
|
+
readonly babyblue: string;
|
|
110
|
+
readonly red: string;
|
|
111
|
+
readonly teal: string;
|
|
112
|
+
readonly sunrise: string;
|
|
113
|
+
readonly slate: string;
|
|
114
114
|
};
|
|
115
115
|
readonly label: {
|
|
116
|
-
readonly default:
|
|
117
|
-
readonly deselected:
|
|
116
|
+
readonly default: string;
|
|
117
|
+
readonly deselected: string;
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
120
|
readonly iconButton: {
|
|
121
121
|
readonly badge: {
|
|
122
|
-
readonly foreground:
|
|
123
|
-
readonly background:
|
|
122
|
+
readonly foreground: string;
|
|
123
|
+
readonly background: string;
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
readonly icon: {
|
|
127
|
-
readonly background:
|
|
127
|
+
readonly background: string;
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
|
-
name:
|
|
131
|
+
name: string;
|
|
132
132
|
sizes: {
|
|
133
|
-
readonly "0":
|
|
134
|
-
readonly "1":
|
|
135
|
-
readonly "2":
|
|
136
|
-
readonly "3":
|
|
137
|
-
readonly "4":
|
|
138
|
-
readonly "5":
|
|
139
|
-
readonly "6":
|
|
140
|
-
readonly "7":
|
|
141
|
-
readonly "8":
|
|
142
|
-
readonly "9":
|
|
143
|
-
readonly "10":
|
|
144
|
-
readonly "11":
|
|
133
|
+
readonly "0": string;
|
|
134
|
+
readonly "1": string;
|
|
135
|
+
readonly "2": string;
|
|
136
|
+
readonly "3": string;
|
|
137
|
+
readonly "4": string;
|
|
138
|
+
readonly "5": string;
|
|
139
|
+
readonly "6": string;
|
|
140
|
+
readonly "7": string;
|
|
141
|
+
readonly "8": string;
|
|
142
|
+
readonly "9": string;
|
|
143
|
+
readonly "10": string;
|
|
144
|
+
readonly "11": string;
|
|
145
145
|
};
|
|
146
146
|
};
|
|
147
147
|
export { useCUITheme };
|
|
@@ -5,17 +5,26 @@
|
|
|
5
5
|
export type Prettify<T> = {
|
|
6
6
|
[K in keyof T]: T[K] extends object ? Prettify<T[K]> : T[K];
|
|
7
7
|
} & {};
|
|
8
|
+
/**
|
|
9
|
+
* WidenLiteral - Converts literal types to their base types
|
|
10
|
+
* - string literals → string
|
|
11
|
+
* - number literals → number
|
|
12
|
+
* - boolean literals → boolean
|
|
13
|
+
* - preserves other types as-is
|
|
14
|
+
*/
|
|
15
|
+
type WidenLiteral<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T;
|
|
8
16
|
/**
|
|
9
17
|
* GetTypes - Extracts TypeScript types from JSON token values
|
|
10
18
|
* Recursively traverses the token object and infers proper types
|
|
11
19
|
* Handles arrays and nested objects correctly
|
|
20
|
+
* Widens literal types to their base types (string, number, boolean)
|
|
12
21
|
*/
|
|
13
22
|
export type GetTypes<T> = Prettify<T extends (infer U)[] ? {
|
|
14
|
-
[I in keyof T]: U extends object ? GetTypes<U> : U
|
|
23
|
+
[I in keyof T]: U extends object ? GetTypes<U> : WidenLiteral<U>;
|
|
15
24
|
} : T extends object ? {
|
|
16
25
|
[K in keyof T]: T[K] extends (infer U)[] ? {
|
|
17
|
-
[I in keyof T[K]]: U extends object ? GetTypes<U> : U
|
|
18
|
-
} : T[K] extends object ? GetTypes<T[K]> : T[K]
|
|
19
|
-
} : T
|
|
26
|
+
[I in keyof T[K]]: U extends object ? GetTypes<U> : WidenLiteral<U>;
|
|
27
|
+
} : T[K] extends object ? GetTypes<T[K]> : WidenLiteral<T[K]>;
|
|
28
|
+
} : WidenLiteral<T>>;
|
|
20
29
|
export type { CUIThemeType as Theme } from '../index';
|
|
21
30
|
export type { ThemeName, PublicTheme } from '../index';
|