ymy-components 0.1.0 → 0.1.2
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/index.cjs +70 -70
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1362 -1353
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/palettes/dark.palette.d.ts +2 -0
- package/dist/theme/palettes/index.d.ts +3 -2
- package/dist/theme/palettes/light.palette.d.ts +2 -0
- package/dist/theme/palettes/types.d.ts +73 -48
- package/dist/theme/theme.builder.d.ts +27 -34
- package/package.json +1 -1
- package/dist/theme/palettes/default.palette.d.ts +0 -2
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { ModeColorPalette } from './palettes';
|
|
2
|
+
export { lightPalette, darkPalette } from './palettes';
|
|
3
3
|
export { buildTheme, theme, hexToRgb } from './theme.builder';
|
|
4
4
|
export type { ThemeType } from './theme.builder';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { ModeColorPalette } from './types';
|
|
2
|
+
export { lightPalette } from './light.palette';
|
|
3
|
+
export { darkPalette } from './dark.palette';
|
|
@@ -1,49 +1,74 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export interface
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
/** Per-mode color palette: every design token as a ready-to-use value */
|
|
2
|
+
export interface ModeColorPalette {
|
|
3
|
+
primary: string;
|
|
4
|
+
onPrimary: string;
|
|
5
|
+
primaryContainer: string;
|
|
6
|
+
onPrimaryContainer: string;
|
|
7
|
+
primaryDark: string;
|
|
8
|
+
primaryDarker: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
onSecondary: string;
|
|
11
|
+
secondaryContainer: string;
|
|
12
|
+
onSecondaryContainer: string;
|
|
13
|
+
secondaryLight: string;
|
|
14
|
+
success: string;
|
|
15
|
+
onSuccess: string;
|
|
16
|
+
successContainer: string;
|
|
17
|
+
onSuccessContainer: string;
|
|
18
|
+
successSurface: string;
|
|
19
|
+
successDark: string;
|
|
20
|
+
successMuted: string;
|
|
21
|
+
error: string;
|
|
22
|
+
onError: string;
|
|
23
|
+
errorMuted: string;
|
|
24
|
+
surface: string;
|
|
25
|
+
onSurface: string;
|
|
26
|
+
surfaceVariant: string;
|
|
27
|
+
onSurfaceVariant: string;
|
|
28
|
+
surfaceContainer: string;
|
|
29
|
+
surfaceContainerHigh: string;
|
|
30
|
+
background: string;
|
|
31
|
+
onBackground: string;
|
|
32
|
+
outline: string;
|
|
33
|
+
outlineVariant: string;
|
|
34
|
+
shadow: string;
|
|
35
|
+
shadowLight: string;
|
|
36
|
+
shadowLighter: string;
|
|
37
|
+
shadowSubtle: string;
|
|
38
|
+
shadowFaint: string;
|
|
39
|
+
scrim: string;
|
|
40
|
+
scrimLight: string;
|
|
41
|
+
ripple: string;
|
|
42
|
+
whiteHigh: string;
|
|
43
|
+
whiteMedium: string;
|
|
44
|
+
whiteLow: string;
|
|
45
|
+
whiteHover: string;
|
|
46
|
+
keyboardSurface: string;
|
|
47
|
+
keyCharacter: string;
|
|
48
|
+
keyCharacterText: string;
|
|
49
|
+
keyDefault: string;
|
|
50
|
+
keyDefaultText: string;
|
|
51
|
+
keyWrong: string;
|
|
52
|
+
keyWrongMuted: string;
|
|
53
|
+
keyCorrect: string;
|
|
54
|
+
keyCorrectMuted: string;
|
|
55
|
+
keyAccentText: string;
|
|
56
|
+
keyDisabled: string;
|
|
57
|
+
keyDisabledText: string;
|
|
58
|
+
toggleTrackOn: string;
|
|
59
|
+
toggleTrackOff: string;
|
|
60
|
+
toggleThumbOn: string;
|
|
61
|
+
toggleThumbOff: string;
|
|
62
|
+
toggleHoverOn: string;
|
|
63
|
+
toggleHoverOff: string;
|
|
64
|
+
toggleFocusOn: string;
|
|
65
|
+
toggleFocusOff: string;
|
|
66
|
+
textShadowDark: string;
|
|
67
|
+
textShadow1: string;
|
|
68
|
+
textShadow2: string;
|
|
69
|
+
textShadow3: string;
|
|
70
|
+
primaryRgb: string;
|
|
71
|
+
backgroundRgb: string;
|
|
72
|
+
surfaceRgb: string;
|
|
73
|
+
primaryDarkerRgb: string;
|
|
49
74
|
}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Bold minimal color system
|
|
3
|
-
*
|
|
4
|
-
* Inspired by saturated single-color backgrounds with high-contrast text.
|
|
5
|
-
* Light mode: sky blue splash, warm white cards, amber accents for contrast.
|
|
6
|
-
* Dark mode: near-black with subtle green tint, soft green accents.
|
|
7
|
-
*
|
|
8
|
-
* Contrast targets (WCAG AA):
|
|
9
|
-
* - primary / onPrimary: >= 4.5:1 (normal text)
|
|
10
|
-
* - background / onBackground: >= 3:1 (large text — loading screen is 48-56px bold)
|
|
11
|
-
* - keyCharacter / keyCharacterText: >= 4.5:1 (normal text)
|
|
12
|
-
* - keyDefault / keyDefaultText: >= 4.5:1 (normal text)
|
|
13
|
-
* - error / onError: >= 4.5:1 (normal text)
|
|
14
|
-
*/
|
|
1
|
+
import { ModeColorPalette } from './palettes/types';
|
|
15
2
|
/** Convert a hex color (#rrggbb) to an "r, g, b" string for rgba() usage */
|
|
16
3
|
export declare function hexToRgb(hex: string): string;
|
|
17
4
|
/** Build a theme object for the given mode */
|
|
@@ -20,15 +7,6 @@ export declare function buildTheme(mode: 'light' | 'dark'): {
|
|
|
20
7
|
readonly appStandardPadding: "1rem";
|
|
21
8
|
};
|
|
22
9
|
readonly colors: {
|
|
23
|
-
readonly primaryRgb: string;
|
|
24
|
-
readonly backgroundRgb: string;
|
|
25
|
-
readonly surfaceRgb: string;
|
|
26
|
-
readonly primaryDarkerRgb: string;
|
|
27
|
-
readonly primaryLight: string;
|
|
28
|
-
readonly backgroundHex: string;
|
|
29
|
-
readonly bottomNavBarBackgroundRgb: string;
|
|
30
|
-
readonly settingsBackgroundRgb: string;
|
|
31
|
-
readonly text: string;
|
|
32
10
|
readonly primary: string;
|
|
33
11
|
readonly onPrimary: string;
|
|
34
12
|
readonly primaryContainer: string;
|
|
@@ -93,11 +71,23 @@ export declare function buildTheme(mode: 'light' | 'dark'): {
|
|
|
93
71
|
readonly toggleFocusOn: string;
|
|
94
72
|
readonly toggleFocusOff: string;
|
|
95
73
|
readonly textShadowDark: string;
|
|
74
|
+
readonly textShadow1: string;
|
|
75
|
+
readonly textShadow2: string;
|
|
76
|
+
readonly textShadow3: string;
|
|
77
|
+
readonly primaryRgb: string;
|
|
78
|
+
readonly backgroundRgb: string;
|
|
79
|
+
readonly surfaceRgb: string;
|
|
80
|
+
readonly primaryDarkerRgb: string;
|
|
81
|
+
readonly primaryLight: string;
|
|
82
|
+
readonly backgroundHex: string;
|
|
83
|
+
readonly bottomNavBarBackgroundRgb: string;
|
|
84
|
+
readonly settingsBackgroundRgb: string;
|
|
85
|
+
readonly text: string;
|
|
96
86
|
};
|
|
97
87
|
readonly styling: {
|
|
98
88
|
readonly borderRadiusPixel: number;
|
|
99
89
|
};
|
|
100
|
-
readonly palette:
|
|
90
|
+
readonly palette: ModeColorPalette;
|
|
101
91
|
};
|
|
102
92
|
/** Default light theme (for backwards compatibility and tests) */
|
|
103
93
|
export declare const theme: {
|
|
@@ -105,15 +95,6 @@ export declare const theme: {
|
|
|
105
95
|
readonly appStandardPadding: "1rem";
|
|
106
96
|
};
|
|
107
97
|
readonly colors: {
|
|
108
|
-
readonly primaryRgb: string;
|
|
109
|
-
readonly backgroundRgb: string;
|
|
110
|
-
readonly surfaceRgb: string;
|
|
111
|
-
readonly primaryDarkerRgb: string;
|
|
112
|
-
readonly primaryLight: string;
|
|
113
|
-
readonly backgroundHex: string;
|
|
114
|
-
readonly bottomNavBarBackgroundRgb: string;
|
|
115
|
-
readonly settingsBackgroundRgb: string;
|
|
116
|
-
readonly text: string;
|
|
117
98
|
readonly primary: string;
|
|
118
99
|
readonly onPrimary: string;
|
|
119
100
|
readonly primaryContainer: string;
|
|
@@ -178,11 +159,23 @@ export declare const theme: {
|
|
|
178
159
|
readonly toggleFocusOn: string;
|
|
179
160
|
readonly toggleFocusOff: string;
|
|
180
161
|
readonly textShadowDark: string;
|
|
162
|
+
readonly textShadow1: string;
|
|
163
|
+
readonly textShadow2: string;
|
|
164
|
+
readonly textShadow3: string;
|
|
165
|
+
readonly primaryRgb: string;
|
|
166
|
+
readonly backgroundRgb: string;
|
|
167
|
+
readonly surfaceRgb: string;
|
|
168
|
+
readonly primaryDarkerRgb: string;
|
|
169
|
+
readonly primaryLight: string;
|
|
170
|
+
readonly backgroundHex: string;
|
|
171
|
+
readonly bottomNavBarBackgroundRgb: string;
|
|
172
|
+
readonly settingsBackgroundRgb: string;
|
|
173
|
+
readonly text: string;
|
|
181
174
|
};
|
|
182
175
|
readonly styling: {
|
|
183
176
|
readonly borderRadiusPixel: number;
|
|
184
177
|
};
|
|
185
|
-
readonly palette:
|
|
178
|
+
readonly palette: ModeColorPalette;
|
|
186
179
|
};
|
|
187
180
|
/** Type export for use in styled.d.ts augmentations */
|
|
188
181
|
export type ThemeType = ReturnType<typeof buildTheme>;
|
package/package.json
CHANGED