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.
@@ -1,4 +1,4 @@
1
- export type { ColorPalette, ColorThemeDefinition } from './palettes';
2
- export { defaultTheme } from './palettes';
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';
@@ -0,0 +1,2 @@
1
+ import { ModeColorPalette } from './types';
2
+ export declare const darkPalette: ModeColorPalette;
@@ -1,2 +1,3 @@
1
- export type { ColorPalette, ColorThemeDefinition } from './types';
2
- export { defaultTheme } from './default.palette';
1
+ export type { ModeColorPalette } from './types';
2
+ export { lightPalette } from './light.palette';
3
+ export { darkPalette } from './dark.palette';
@@ -0,0 +1,2 @@
1
+ import { ModeColorPalette } from './types';
2
+ export declare const lightPalette: ModeColorPalette;
@@ -1,49 +1,74 @@
1
- /** Shape of every color palette slot names are role-based, not color-based */
2
- export interface ColorPalette {
3
- teal50: string;
4
- teal100: string;
5
- teal200: string;
6
- teal400: string;
7
- teal600: string;
8
- teal800: string;
9
- teal900: string;
10
- orange50: string;
11
- orange100: string;
12
- orange300: string;
13
- orange400: string;
14
- orange500: string;
15
- green50: string;
16
- green100: string;
17
- green200: string;
18
- green400: string;
19
- green500: string;
20
- green600: string;
21
- green800: string;
22
- red400: string;
23
- red600: string;
24
- white: string;
25
- gray50: string;
26
- gray100: string;
27
- gray200: string;
28
- gray300: string;
29
- gray400: string;
30
- gray500: string;
31
- gray600: string;
32
- gray700: string;
33
- gray800: string;
34
- gray900: string;
35
- black: string;
36
- }
37
- /** Full definition for a color theme */
38
- export interface ColorThemeDefinition {
39
- palette: ColorPalette;
40
- /** Theme-specific dark mode overrides for colors not derivable from palette slots */
41
- darkOverrides: {
42
- secondaryContainer: string;
43
- surface: string;
44
- surfaceVariant: string;
45
- surfaceContainer: string;
46
- surfaceContainerHigh: string;
47
- background: string;
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: import('./palettes').ColorPalette;
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: import('./palettes').ColorPalette;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ymy-components",
3
3
  "private": false,
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- import { ColorThemeDefinition } from './types';
2
- export declare const defaultTheme: ColorThemeDefinition;