@tujyane/alf 1.0.3 → 1.2.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/README.md +107 -93
- package/dist/index.d.ts +1 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -20
- package/dist/index.js.map +1 -1
- package/dist/palette.d.ts +6 -3
- package/dist/palette.d.ts.map +1 -1
- package/dist/palette.js +67 -136
- package/dist/palette.js.map +1 -1
- package/dist/semantic.d.ts +21 -0
- package/dist/semantic.d.ts.map +1 -0
- package/dist/semantic.js +73 -0
- package/dist/semantic.js.map +1 -0
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +1 -31
- package/src/palette.ts +1 -84
- package/src/semantic.ts +91 -0
- package/src/utils/alpha.ts +1 -1
- package/src/utils/flatten/index.ts +1 -1
- package/src/utils/index.ts +0 -1
- package/dist/themes.d.ts +0 -151
- package/dist/themes.d.ts.map +0 -1
- package/dist/themes.js +0 -191
- package/dist/themes.js.map +0 -1
- package/dist/utils/select.d.ts +0 -7
- package/dist/utils/select.d.ts.map +0 -1
- package/dist/utils/select.js +0 -14
- package/dist/utils/select.js.map +0 -1
- package/src/themes.ts +0 -332
- package/src/utils/select.ts +0 -17
package/dist/semantic.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.semantic = void 0;
|
|
4
|
+
const palette_1 = require("./palette");
|
|
5
|
+
exports.semantic = {
|
|
6
|
+
primary: {
|
|
7
|
+
100: palette_1.palette.primary_100,
|
|
8
|
+
200: palette_1.palette.primary_200,
|
|
9
|
+
300: palette_1.palette.primary_300,
|
|
10
|
+
400: palette_1.palette.primary_400,
|
|
11
|
+
500: palette_1.palette.primary_500,
|
|
12
|
+
600: palette_1.palette.primary_600,
|
|
13
|
+
700: palette_1.palette.primary_700,
|
|
14
|
+
800: palette_1.palette.primary_800,
|
|
15
|
+
900: palette_1.palette.primary_900,
|
|
16
|
+
},
|
|
17
|
+
success: {
|
|
18
|
+
100: palette_1.palette.positive_100,
|
|
19
|
+
200: palette_1.palette.positive_200,
|
|
20
|
+
300: palette_1.palette.positive_300,
|
|
21
|
+
400: palette_1.palette.positive_400,
|
|
22
|
+
500: palette_1.palette.positive_500,
|
|
23
|
+
600: palette_1.palette.positive_600,
|
|
24
|
+
700: palette_1.palette.positive_700,
|
|
25
|
+
800: palette_1.palette.positive_800,
|
|
26
|
+
900: palette_1.palette.positive_900,
|
|
27
|
+
},
|
|
28
|
+
error: {
|
|
29
|
+
100: palette_1.palette.negative_100,
|
|
30
|
+
200: palette_1.palette.negative_200,
|
|
31
|
+
300: palette_1.palette.negative_300,
|
|
32
|
+
400: palette_1.palette.negative_400,
|
|
33
|
+
500: palette_1.palette.negative_500,
|
|
34
|
+
600: palette_1.palette.negative_600,
|
|
35
|
+
700: palette_1.palette.negative_700,
|
|
36
|
+
800: palette_1.palette.negative_800,
|
|
37
|
+
900: palette_1.palette.negative_900,
|
|
38
|
+
},
|
|
39
|
+
warning: {
|
|
40
|
+
100: palette_1.palette.warning_100,
|
|
41
|
+
200: palette_1.palette.warning_200,
|
|
42
|
+
300: palette_1.palette.warning_300,
|
|
43
|
+
400: palette_1.palette.warning_400,
|
|
44
|
+
500: palette_1.palette.warning_500,
|
|
45
|
+
600: palette_1.palette.warning_600,
|
|
46
|
+
700: palette_1.palette.warning_700,
|
|
47
|
+
800: palette_1.palette.warning_800,
|
|
48
|
+
900: palette_1.palette.warning_900,
|
|
49
|
+
},
|
|
50
|
+
info: {
|
|
51
|
+
100: palette_1.palette.info_100,
|
|
52
|
+
200: palette_1.palette.info_200,
|
|
53
|
+
300: palette_1.palette.info_300,
|
|
54
|
+
400: palette_1.palette.info_400,
|
|
55
|
+
500: palette_1.palette.info_500,
|
|
56
|
+
600: palette_1.palette.info_600,
|
|
57
|
+
700: palette_1.palette.info_700,
|
|
58
|
+
800: palette_1.palette.info_800,
|
|
59
|
+
900: palette_1.palette.info_900,
|
|
60
|
+
},
|
|
61
|
+
secondary: {
|
|
62
|
+
100: palette_1.palette.secondary_100,
|
|
63
|
+
200: palette_1.palette.secondary_200,
|
|
64
|
+
300: palette_1.palette.secondary_300,
|
|
65
|
+
400: palette_1.palette.secondary_400,
|
|
66
|
+
500: palette_1.palette.secondary_500,
|
|
67
|
+
600: palette_1.palette.secondary_600,
|
|
68
|
+
700: palette_1.palette.secondary_700,
|
|
69
|
+
800: palette_1.palette.secondary_800,
|
|
70
|
+
900: palette_1.palette.secondary_900,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=semantic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic.js","sourceRoot":"","sources":["../src/semantic.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAuBvB,QAAA,QAAQ,GAAmB;IACtC,OAAO,EAAE;QACP,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;QACxB,GAAG,EAAE,iBAAO,CAAC,WAAW;KACzB;IACD,OAAO,EAAE;QACP,GAAG,EAAE,iBAAO,CAAC,YAAY;QACzB,GAAG,EAAE,iBAAO,CAAC,YAAY;QACzB,GAAG,EAAE,iBAAO,CAAC,YAAY;QACzB,GAAG,EAAE,iBAAO,CAAC,YAAY;QACzB,GAAG,EAAE,iBAAO,CAAC,YAAY;QACzB,GAAG,EA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SAAS,EAAE;QACT,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;QAC1B,GAAG,EAAE,iBAAO,CAAC,aAAa;KAC3B;CACF,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -17,5 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./alpha"), exports);
|
|
18
18
|
__exportStar(require("./leading"), exports);
|
|
19
19
|
__exportStar(require("./flatten"), exports);
|
|
20
|
-
__exportStar(require("./select"), exports);
|
|
21
20
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B"}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { type StyleProp, type TextStyle, type ViewStyle } from "react-native";
|
|
2
|
-
import { createContext, useContext, useMemo } from "react";
|
|
3
|
-
|
|
4
|
-
import { themes, type Theme } from "./themes";
|
|
5
2
|
|
|
6
3
|
export * from "./atoms";
|
|
7
4
|
export * from "./palette";
|
|
8
|
-
export * from "./
|
|
5
|
+
export * from "./semantic";
|
|
9
6
|
export * from "./platform";
|
|
10
7
|
export * as tokens from "./tokens";
|
|
11
8
|
export * as utils from "./utils";
|
|
@@ -17,30 +14,3 @@ export type TextStyleProp = {
|
|
|
17
14
|
export type ViewStyleProp = {
|
|
18
15
|
style?: StyleProp<ViewStyle>;
|
|
19
16
|
};
|
|
20
|
-
|
|
21
|
-
export const Context = createContext({
|
|
22
|
-
theme: themes.light,
|
|
23
|
-
});
|
|
24
|
-
Context.displayName = "AlfContext";
|
|
25
|
-
|
|
26
|
-
export function Provider<T extends string, A extends Record<T, Theme>>({
|
|
27
|
-
children,
|
|
28
|
-
activeTheme,
|
|
29
|
-
themes,
|
|
30
|
-
}: React.PropsWithChildren<{
|
|
31
|
-
activeTheme: T;
|
|
32
|
-
themes: A;
|
|
33
|
-
}>) {
|
|
34
|
-
const value = useMemo(
|
|
35
|
-
() => ({
|
|
36
|
-
theme: themes[activeTheme],
|
|
37
|
-
}),
|
|
38
|
-
[activeTheme, themes]
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
return <Context.Provider value={value}>{children}</Context.Provider>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function useTheme() {
|
|
45
|
-
return useContext(Context).theme;
|
|
46
|
-
}
|
package/src/palette.ts
CHANGED
|
@@ -79,7 +79,7 @@ export type Palette = {
|
|
|
79
79
|
secondary_900: string;
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
-
export const
|
|
82
|
+
export const palette: Palette = {
|
|
83
83
|
white: "#FFFFFF",
|
|
84
84
|
black: "#000000",
|
|
85
85
|
stroke_primary: "#E8F2F2",
|
|
@@ -164,86 +164,3 @@ export const DEFAULT_PALETTE: Palette = {
|
|
|
164
164
|
secondary_800: "#080C19",
|
|
165
165
|
secondary_900: "#040815",
|
|
166
166
|
};
|
|
167
|
-
|
|
168
|
-
export function invertPalette(palette: Palette): Palette {
|
|
169
|
-
return {
|
|
170
|
-
white: palette.white,
|
|
171
|
-
black: palette.black,
|
|
172
|
-
stroke_primary: palette.stroke_primary,
|
|
173
|
-
text_primary: palette.white,
|
|
174
|
-
text_secondary: palette.primary_300,
|
|
175
|
-
primary: palette.primary,
|
|
176
|
-
secondary: palette.secondary,
|
|
177
|
-
|
|
178
|
-
primary_25: palette.primary_50,
|
|
179
|
-
primary_50: palette.primary_25,
|
|
180
|
-
primary_100: palette.primary_900,
|
|
181
|
-
primary_200: palette.primary_800,
|
|
182
|
-
primary_300: palette.primary_700,
|
|
183
|
-
primary_400: palette.primary_600,
|
|
184
|
-
primary_500: palette.primary_500,
|
|
185
|
-
primary_600: palette.primary_400,
|
|
186
|
-
primary_700: palette.primary_300,
|
|
187
|
-
primary_800: palette.primary_200,
|
|
188
|
-
primary_900: palette.primary_100,
|
|
189
|
-
|
|
190
|
-
positive_25: palette.positive_975,
|
|
191
|
-
positive_50: palette.positive_950,
|
|
192
|
-
positive_100: palette.positive_900,
|
|
193
|
-
positive_200: palette.positive_800,
|
|
194
|
-
positive_300: palette.positive_700,
|
|
195
|
-
positive_400: palette.positive_600,
|
|
196
|
-
positive_500: palette.positive_500,
|
|
197
|
-
positive_600: palette.positive_400,
|
|
198
|
-
positive_700: palette.positive_300,
|
|
199
|
-
positive_800: palette.positive_200,
|
|
200
|
-
positive_900: palette.positive_100,
|
|
201
|
-
positive_950: palette.positive_50,
|
|
202
|
-
positive_975: palette.positive_25,
|
|
203
|
-
|
|
204
|
-
negative_25: palette.negative_975,
|
|
205
|
-
negative_50: palette.negative_950,
|
|
206
|
-
negative_100: palette.negative_900,
|
|
207
|
-
negative_200: palette.negative_800,
|
|
208
|
-
negative_300: palette.negative_700,
|
|
209
|
-
negative_400: palette.negative_600,
|
|
210
|
-
negative_500: palette.negative_500,
|
|
211
|
-
negative_600: palette.negative_400,
|
|
212
|
-
negative_700: palette.negative_300,
|
|
213
|
-
negative_800: palette.negative_200,
|
|
214
|
-
negative_900: palette.negative_100,
|
|
215
|
-
negative_950: palette.negative_50,
|
|
216
|
-
negative_975: palette.negative_25,
|
|
217
|
-
|
|
218
|
-
// New scales invert
|
|
219
|
-
warning_100: palette.warning_900,
|
|
220
|
-
warning_200: palette.warning_800,
|
|
221
|
-
warning_300: palette.warning_700,
|
|
222
|
-
warning_400: palette.warning_600,
|
|
223
|
-
warning_500: palette.warning_500,
|
|
224
|
-
warning_600: palette.warning_400,
|
|
225
|
-
warning_700: palette.warning_300,
|
|
226
|
-
warning_800: palette.warning_200,
|
|
227
|
-
warning_900: palette.warning_100,
|
|
228
|
-
|
|
229
|
-
info_100: palette.info_900,
|
|
230
|
-
info_200: palette.info_800,
|
|
231
|
-
info_300: palette.info_700,
|
|
232
|
-
info_400: palette.info_600,
|
|
233
|
-
info_500: palette.info_500,
|
|
234
|
-
info_600: palette.info_400,
|
|
235
|
-
info_700: palette.info_300,
|
|
236
|
-
info_800: palette.info_200,
|
|
237
|
-
info_900: palette.info_100,
|
|
238
|
-
|
|
239
|
-
secondary_100: palette.secondary_900,
|
|
240
|
-
secondary_200: palette.secondary_800,
|
|
241
|
-
secondary_300: palette.secondary_700,
|
|
242
|
-
secondary_400: palette.secondary_600,
|
|
243
|
-
secondary_500: palette.secondary_500,
|
|
244
|
-
secondary_600: palette.secondary_400,
|
|
245
|
-
secondary_700: palette.secondary_300,
|
|
246
|
-
secondary_800: palette.secondary_200,
|
|
247
|
-
secondary_900: palette.secondary_100,
|
|
248
|
-
};
|
|
249
|
-
}
|
package/src/semantic.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { palette } from "./palette";
|
|
2
|
+
|
|
3
|
+
export type ScaleSteps = {
|
|
4
|
+
100: string;
|
|
5
|
+
200: string;
|
|
6
|
+
300: string;
|
|
7
|
+
400: string;
|
|
8
|
+
500: string;
|
|
9
|
+
600: string;
|
|
10
|
+
700: string;
|
|
11
|
+
800: string;
|
|
12
|
+
900: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type SemanticColors = {
|
|
16
|
+
primary: ScaleSteps;
|
|
17
|
+
success: ScaleSteps;
|
|
18
|
+
error: ScaleSteps;
|
|
19
|
+
warning: ScaleSteps;
|
|
20
|
+
info: ScaleSteps;
|
|
21
|
+
secondary: ScaleSteps;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const semantic: SemanticColors = {
|
|
25
|
+
primary: {
|
|
26
|
+
100: palette.primary_100,
|
|
27
|
+
200: palette.primary_200,
|
|
28
|
+
300: palette.primary_300,
|
|
29
|
+
400: palette.primary_400,
|
|
30
|
+
500: palette.primary_500,
|
|
31
|
+
600: palette.primary_600,
|
|
32
|
+
700: palette.primary_700,
|
|
33
|
+
800: palette.primary_800,
|
|
34
|
+
900: palette.primary_900,
|
|
35
|
+
},
|
|
36
|
+
success: {
|
|
37
|
+
100: palette.positive_100,
|
|
38
|
+
200: palette.positive_200,
|
|
39
|
+
300: palette.positive_300,
|
|
40
|
+
400: palette.positive_400,
|
|
41
|
+
500: palette.positive_500,
|
|
42
|
+
600: palette.positive_600,
|
|
43
|
+
700: palette.positive_700,
|
|
44
|
+
800: palette.positive_800,
|
|
45
|
+
900: palette.positive_900,
|
|
46
|
+
},
|
|
47
|
+
error: {
|
|
48
|
+
100: palette.negative_100,
|
|
49
|
+
200: palette.negative_200,
|
|
50
|
+
300: palette.negative_300,
|
|
51
|
+
400: palette.negative_400,
|
|
52
|
+
500: palette.negative_500,
|
|
53
|
+
600: palette.negative_600,
|
|
54
|
+
700: palette.negative_700,
|
|
55
|
+
800: palette.negative_800,
|
|
56
|
+
900: palette.negative_900,
|
|
57
|
+
},
|
|
58
|
+
warning: {
|
|
59
|
+
100: palette.warning_100,
|
|
60
|
+
200: palette.warning_200,
|
|
61
|
+
300: palette.warning_300,
|
|
62
|
+
400: palette.warning_400,
|
|
63
|
+
500: palette.warning_500,
|
|
64
|
+
600: palette.warning_600,
|
|
65
|
+
700: palette.warning_700,
|
|
66
|
+
800: palette.warning_800,
|
|
67
|
+
900: palette.warning_900,
|
|
68
|
+
},
|
|
69
|
+
info: {
|
|
70
|
+
100: palette.info_100,
|
|
71
|
+
200: palette.info_200,
|
|
72
|
+
300: palette.info_300,
|
|
73
|
+
400: palette.info_400,
|
|
74
|
+
500: palette.info_500,
|
|
75
|
+
600: palette.info_600,
|
|
76
|
+
700: palette.info_700,
|
|
77
|
+
800: palette.info_800,
|
|
78
|
+
900: palette.info_900,
|
|
79
|
+
},
|
|
80
|
+
secondary: {
|
|
81
|
+
100: palette.secondary_100,
|
|
82
|
+
200: palette.secondary_200,
|
|
83
|
+
300: palette.secondary_300,
|
|
84
|
+
400: palette.secondary_400,
|
|
85
|
+
500: palette.secondary_500,
|
|
86
|
+
600: palette.secondary_600,
|
|
87
|
+
700: palette.secondary_700,
|
|
88
|
+
800: palette.secondary_800,
|
|
89
|
+
900: palette.secondary_900,
|
|
90
|
+
},
|
|
91
|
+
};
|
package/src/utils/alpha.ts
CHANGED
package/src/utils/index.ts
CHANGED
package/dist/themes.d.ts
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { Palette } from "./palette";
|
|
2
|
-
import { type ShadowStyle } from "./atoms/types";
|
|
3
|
-
export declare const themes: {
|
|
4
|
-
light: Theme;
|
|
5
|
-
dark: Theme;
|
|
6
|
-
};
|
|
7
|
-
export type ThemeAtoms = {
|
|
8
|
-
text: {
|
|
9
|
-
color: string;
|
|
10
|
-
};
|
|
11
|
-
text_low: {
|
|
12
|
-
color: string;
|
|
13
|
-
};
|
|
14
|
-
text_medium: {
|
|
15
|
-
color: string;
|
|
16
|
-
};
|
|
17
|
-
text_high: {
|
|
18
|
-
color: string;
|
|
19
|
-
};
|
|
20
|
-
text_inverted: {
|
|
21
|
-
color: string;
|
|
22
|
-
};
|
|
23
|
-
bg: {
|
|
24
|
-
backgroundColor: string;
|
|
25
|
-
};
|
|
26
|
-
bg_25: {
|
|
27
|
-
backgroundColor: string;
|
|
28
|
-
};
|
|
29
|
-
bg_50: {
|
|
30
|
-
backgroundColor: string;
|
|
31
|
-
};
|
|
32
|
-
border_low: {
|
|
33
|
-
borderColor: string;
|
|
34
|
-
};
|
|
35
|
-
border_medium: {
|
|
36
|
-
borderColor: string;
|
|
37
|
-
};
|
|
38
|
-
border_high: {
|
|
39
|
-
borderColor: string;
|
|
40
|
-
};
|
|
41
|
-
text_primary: {
|
|
42
|
-
color: string;
|
|
43
|
-
};
|
|
44
|
-
text_success: {
|
|
45
|
-
color: string;
|
|
46
|
-
};
|
|
47
|
-
text_error: {
|
|
48
|
-
color: string;
|
|
49
|
-
};
|
|
50
|
-
text_warning: {
|
|
51
|
-
color: string;
|
|
52
|
-
};
|
|
53
|
-
text_info: {
|
|
54
|
-
color: string;
|
|
55
|
-
};
|
|
56
|
-
text_secondary: {
|
|
57
|
-
color: string;
|
|
58
|
-
};
|
|
59
|
-
bg_primary: {
|
|
60
|
-
backgroundColor: string;
|
|
61
|
-
};
|
|
62
|
-
bg_success: {
|
|
63
|
-
backgroundColor: string;
|
|
64
|
-
};
|
|
65
|
-
bg_error: {
|
|
66
|
-
backgroundColor: string;
|
|
67
|
-
};
|
|
68
|
-
bg_warning: {
|
|
69
|
-
backgroundColor: string;
|
|
70
|
-
};
|
|
71
|
-
bg_info: {
|
|
72
|
-
backgroundColor: string;
|
|
73
|
-
};
|
|
74
|
-
bg_secondary: {
|
|
75
|
-
backgroundColor: string;
|
|
76
|
-
};
|
|
77
|
-
border_primary: {
|
|
78
|
-
borderColor: string;
|
|
79
|
-
};
|
|
80
|
-
border_success: {
|
|
81
|
-
borderColor: string;
|
|
82
|
-
};
|
|
83
|
-
border_error: {
|
|
84
|
-
borderColor: string;
|
|
85
|
-
};
|
|
86
|
-
border_warning: {
|
|
87
|
-
borderColor: string;
|
|
88
|
-
};
|
|
89
|
-
border_info: {
|
|
90
|
-
borderColor: string;
|
|
91
|
-
};
|
|
92
|
-
border_secondary: {
|
|
93
|
-
borderColor: string;
|
|
94
|
-
};
|
|
95
|
-
shadow_sm: ShadowStyle;
|
|
96
|
-
shadow_md: ShadowStyle;
|
|
97
|
-
shadow_lg: ShadowStyle;
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Categorical representation of the theme
|
|
101
|
-
*/
|
|
102
|
-
export type ThemeScheme = "light" | "dark";
|
|
103
|
-
/**
|
|
104
|
-
* Specific theme name, including low-contrast variants
|
|
105
|
-
*/
|
|
106
|
-
export type ThemeName = "light" | "dark";
|
|
107
|
-
/**
|
|
108
|
-
* A theme object, containing the color palette and atoms for the theme
|
|
109
|
-
*/
|
|
110
|
-
export type Theme = {
|
|
111
|
-
scheme: ThemeScheme;
|
|
112
|
-
name: ThemeName;
|
|
113
|
-
palette: Palette;
|
|
114
|
-
semantic: SemanticColors;
|
|
115
|
-
atoms: ThemeAtoms;
|
|
116
|
-
};
|
|
117
|
-
export type ScaleSteps = {
|
|
118
|
-
100: string;
|
|
119
|
-
200: string;
|
|
120
|
-
300: string;
|
|
121
|
-
400: string;
|
|
122
|
-
500: string;
|
|
123
|
-
600: string;
|
|
124
|
-
700: string;
|
|
125
|
-
800: string;
|
|
126
|
-
900: string;
|
|
127
|
-
};
|
|
128
|
-
export type SemanticColors = {
|
|
129
|
-
primary: ScaleSteps;
|
|
130
|
-
success: ScaleSteps;
|
|
131
|
-
error: ScaleSteps;
|
|
132
|
-
warning: ScaleSteps;
|
|
133
|
-
info: ScaleSteps;
|
|
134
|
-
secondary: ScaleSteps;
|
|
135
|
-
};
|
|
136
|
-
export declare function createTheme({ scheme, name, palette, options, }: {
|
|
137
|
-
scheme: ThemeScheme;
|
|
138
|
-
name: ThemeName;
|
|
139
|
-
palette: Palette;
|
|
140
|
-
options?: {
|
|
141
|
-
shadowOpacity?: number;
|
|
142
|
-
semanticOverrides?: Partial<SemanticColors>;
|
|
143
|
-
};
|
|
144
|
-
}): Theme;
|
|
145
|
-
export declare function createThemes({ defaultPalette }: {
|
|
146
|
-
defaultPalette: Palette;
|
|
147
|
-
}): {
|
|
148
|
-
light: Theme;
|
|
149
|
-
dark: Theme;
|
|
150
|
-
};
|
|
151
|
-
//# sourceMappingURL=themes.d.ts.map
|
package/dist/themes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAkC,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,eAAO,MAAM,MAAM;WAgTV,KAAK;UACN,KAAK;CA/SX,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG;IAEvB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAGF,EAAE,EAAE;QACF,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IAGF,UAAU,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,aAAa,EAAE;QAC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