@rmikit/design-tokens 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nitin Jaiswal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,36 @@
1
- # Temporary Holding Version
1
+ # @rmikit/design-tokens
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Design tokens for **RMIKit**, based on the Material Design 3 guidelines: color (OKLCH), typography, elevation, motion, shape and state layers. They ship as typed TypeScript values and as a standalone CSS file.
4
+
5
+ ```bash
6
+ npm install @rmikit/design-tokens
7
+ ```
8
+
9
+ ## CSS
10
+
11
+ ```ts
12
+ import '@rmikit/design-tokens/tokens.css'
13
+ ```
14
+
15
+ This defines `--md-sys-*` custom properties on `:root`, with dark colors applied for `prefers-color-scheme: dark` or `data-theme="dark"`. Colors are bare OKLCH channels (`0.515 0.177 286.75`), read with `oklch(var(--md-sys-color-primary))`.
16
+
17
+ You don't need this package to use `@rmikit/core`, whose stylesheet already contains everything the components need. Use it for building your own components on the same tokens.
18
+
19
+ ## TypeScript
20
+
21
+ ```ts
22
+ import { lightColorTokens, darkColorTokens } from '@rmikit/design-tokens/colors'
23
+ import { typographyScale } from '@rmikit/design-tokens/typography'
24
+ import { elevation } from '@rmikit/design-tokens/elevation'
25
+ import { generateAllTokensCSS } from '@rmikit/design-tokens'
26
+
27
+ lightColorTokens.primary // 'oklch(0.515 0.177 286.75)'
28
+ typographyScale.bodyLarge // { fontSize: '16px', lineHeight: '24px', … }
29
+ generateAllTokensCSS() // the same CSS as tokens.css, as a string
30
+ ```
31
+
32
+ Subpath exports: `/colors`, `/typography`, `/elevation`, `/motion`, `/shape`, `/state`, `/tokens.css`. ESM only.
33
+
34
+ Not affiliated with Google LLC.
35
+
36
+ MIT © 2026 Nitin Jaiswal
@@ -0,0 +1,115 @@
1
+ // src/colors.ts
2
+ var lightColorTokens = {
3
+ // Primary - Purple
4
+ primary: "oklch(0.515 0.177 286.75)",
5
+ onPrimary: "oklch(1 0 0)",
6
+ primaryContainer: "oklch(0.933 0.066 292.71)",
7
+ onPrimaryContainer: "oklch(0.288 0.14 285.75)",
8
+ // Secondary - Purple variant
9
+ secondary: "oklch(0.544 0.088 286.96)",
10
+ onSecondary: "oklch(1 0 0)",
11
+ secondaryContainer: "oklch(0.918 0.039 289.09)",
12
+ onSecondaryContainer: "oklch(0.306 0.069 285.68)",
13
+ // Tertiary - Pink
14
+ tertiary: "oklch(0.609 0.163 14.28)",
15
+ onTertiary: "oklch(1 0 0)",
16
+ tertiaryContainer: "oklch(0.957 0.056 16.41)",
17
+ onTertiaryContainer: "oklch(0.337 0.128 13.14)",
18
+ // Error - Red
19
+ error: "oklch(0.576 0.214 27.35)",
20
+ onError: "oklch(1 0 0)",
21
+ errorContainer: "oklch(0.955 0.074 27.34)",
22
+ onErrorContainer: "oklch(0.33 0.17 24.84)",
23
+ // Surface - Light
24
+ surface: "oklch(0.987 0.004 286.38)",
25
+ onSurface: "oklch(0.224 0.008 286.38)",
26
+ surfaceVariant: "oklch(0.921 0.011 286.52)",
27
+ onSurfaceVariant: "oklch(0.443 0.018 289.22)",
28
+ surfaceContainerLowest: "oklch(1 0 0)",
29
+ surfaceContainerLow: "oklch(0.976 0.003 288.17)",
30
+ surfaceContainer: "oklch(0.965 0.004 286.76)",
31
+ surfaceContainerHigh: "oklch(0.954 0.003 286.55)",
32
+ surfaceContainerHighest: "oklch(0.943 0.004 287.14)",
33
+ // Background
34
+ background: "oklch(0.993 0.001 288.17)",
35
+ onBackground: "oklch(0.224 0.008 286.38)",
36
+ // Outline
37
+ outline: "oklch(0.591 0.014 287.98)",
38
+ outlineVariant: "oklch(0.792 0.01 288.67)",
39
+ // Other
40
+ shadow: "oklch(0 0 0)",
41
+ scrim: "oklch(0 0 0)",
42
+ inverseSurface: "oklch(0.277 0.01 286.96)",
43
+ inverseOnSurface: "oklch(0.926 0.004 286.76)",
44
+ inversePrimary: "oklch(0.858 0.094 290.01)"
45
+ };
46
+ var darkColorTokens = {
47
+ // Primary
48
+ primary: "oklch(0.858 0.094 290.01)",
49
+ onPrimary: "oklch(0.345 0.162 286.18)",
50
+ primaryContainer: "oklch(0.419 0.169 286.57)",
51
+ onPrimaryContainer: "oklch(0.933 0.066 292.71)",
52
+ // Secondary
53
+ secondary: "oklch(0.831 0.052 289.35)",
54
+ onSecondary: "oklch(0.372 0.082 287.46)",
55
+ secondaryContainer: "oklch(0.454 0.084 287.21)",
56
+ onSecondaryContainer: "oklch(0.918 0.039 289.09)",
57
+ // Tertiary
58
+ tertiary: "oklch(0.891 0.084 15.26)",
59
+ onTertiary: "oklch(0.412 0.155 12.62)",
60
+ tertiaryContainer: "oklch(0.506 0.158 13.68)",
61
+ onTertiaryContainer: "oklch(0.957 0.056 16.41)",
62
+ // Error
63
+ error: "oklch(0.879 0.114 26.76)",
64
+ onError: "oklch(0.408 0.204 25.72)",
65
+ errorContainer: "oklch(0.488 0.207 27.02)",
66
+ onErrorContainer: "oklch(0.955 0.074 27.34)",
67
+ // Surface - Dark
68
+ surface: "oklch(0.171 0.008 286.96)",
69
+ onSurface: "oklch(0.901 0.004 287.14)",
70
+ surfaceVariant: "oklch(0.363 0.015 289.35)",
71
+ onSurfaceVariant: "oklch(0.792 0.01 288.67)",
72
+ surfaceContainerLowest: "oklch(0.13 0.009 283.58)",
73
+ surfaceContainerLow: "oklch(0.203 0.008 287.74)",
74
+ surfaceContainer: "oklch(0.224 0.009 286.96)",
75
+ surfaceContainerHigh: "oklch(0.245 0.009 287.34)",
76
+ surfaceContainerHighest: "oklch(0.277 0.01 286.96)",
77
+ // Background
78
+ background: "oklch(0.149 0.009 286.96)",
79
+ onBackground: "oklch(0.901 0.004 287.14)",
80
+ // Outline
81
+ outline: "oklch(0.545 0.013 287.98)",
82
+ outlineVariant: "oklch(0.363 0.015 289.35)",
83
+ // Other
84
+ shadow: "oklch(0 0 0)",
85
+ scrim: "oklch(0 0 0)",
86
+ inverseSurface: "oklch(0.901 0.004 287.14)",
87
+ inverseOnSurface: "oklch(0.277 0.01 286.96)",
88
+ inversePrimary: "oklch(0.515 0.177 286.75)"
89
+ };
90
+ var channels = (value) => value.replace(/^oklch\((.*)\)$/, "$1");
91
+ var toKebab = (key) => key.replace(/([A-Z])/g, "-$1").toLowerCase();
92
+ function generateColorCSS(tokens, isDark = false) {
93
+ const body = Object.entries(tokens).map(([key, value]) => ` --md-sys-color-${toKebab(key)}: ${channels(value)};`).join("\n");
94
+ if (!isDark) return `:root {
95
+ ${body}
96
+ }
97
+ `;
98
+ const indented = body.replace(/^/gm, " ");
99
+ return `@media (prefers-color-scheme: dark) {
100
+ :root:not([data-theme="light"]) {
101
+ ${indented}
102
+ }
103
+ }
104
+ :root[data-theme="dark"] {
105
+ ${body}
106
+ }
107
+ `;
108
+ }
109
+
110
+ export {
111
+ lightColorTokens,
112
+ darkColorTokens,
113
+ generateColorCSS
114
+ };
115
+ //# sourceMappingURL=chunk-3E7VYS7F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/colors.ts"],"sourcesContent":["/**\n * Material Design 3 Color Tokens\n * Using OKLCH color space for better perceptual uniformity\n */\n\nexport interface ColorTokens {\n // Primary colors\n primary: string\n onPrimary: string\n primaryContainer: string\n onPrimaryContainer: string\n\n // Secondary colors\n secondary: string\n onSecondary: string\n secondaryContainer: string\n onSecondaryContainer: string\n\n // Tertiary colors\n tertiary: string\n onTertiary: string\n tertiaryContainer: string\n onTertiaryContainer: string\n\n // Error colors\n error: string\n onError: string\n errorContainer: string\n onErrorContainer: string\n\n // Surface colors\n surface: string\n onSurface: string\n surfaceVariant: string\n onSurfaceVariant: string\n surfaceContainerLowest: string\n surfaceContainerLow: string\n surfaceContainer: string\n surfaceContainerHigh: string\n surfaceContainerHighest: string\n\n // Background colors\n background: string\n onBackground: string\n\n // Outline colors\n outline: string\n outlineVariant: string\n\n // Other\n shadow: string\n scrim: string\n inverseSurface: string\n inverseOnSurface: string\n inversePrimary: string\n}\n\n/**\n * Light theme color tokens (Material Design 3 default)\n */\nexport const lightColorTokens: ColorTokens = {\n // Primary - Purple\n primary: 'oklch(0.515 0.177 286.75)',\n onPrimary: 'oklch(1 0 0)',\n primaryContainer: 'oklch(0.933 0.066 292.71)',\n onPrimaryContainer: 'oklch(0.288 0.14 285.75)',\n\n // Secondary - Purple variant\n secondary: 'oklch(0.544 0.088 286.96)',\n onSecondary: 'oklch(1 0 0)',\n secondaryContainer: 'oklch(0.918 0.039 289.09)',\n onSecondaryContainer: 'oklch(0.306 0.069 285.68)',\n\n // Tertiary - Pink\n tertiary: 'oklch(0.609 0.163 14.28)',\n onTertiary: 'oklch(1 0 0)',\n tertiaryContainer: 'oklch(0.957 0.056 16.41)',\n onTertiaryContainer: 'oklch(0.337 0.128 13.14)',\n\n // Error - Red\n error: 'oklch(0.576 0.214 27.35)',\n onError: 'oklch(1 0 0)',\n errorContainer: 'oklch(0.955 0.074 27.34)',\n onErrorContainer: 'oklch(0.33 0.17 24.84)',\n\n // Surface - Light\n surface: 'oklch(0.987 0.004 286.38)',\n onSurface: 'oklch(0.224 0.008 286.38)',\n surfaceVariant: 'oklch(0.921 0.011 286.52)',\n onSurfaceVariant: 'oklch(0.443 0.018 289.22)',\n surfaceContainerLowest: 'oklch(1 0 0)',\n surfaceContainerLow: 'oklch(0.976 0.003 288.17)',\n surfaceContainer: 'oklch(0.965 0.004 286.76)',\n surfaceContainerHigh: 'oklch(0.954 0.003 286.55)',\n surfaceContainerHighest: 'oklch(0.943 0.004 287.14)',\n\n // Background\n background: 'oklch(0.993 0.001 288.17)',\n onBackground: 'oklch(0.224 0.008 286.38)',\n\n // Outline\n outline: 'oklch(0.591 0.014 287.98)',\n outlineVariant: 'oklch(0.792 0.01 288.67)',\n\n // Other\n shadow: 'oklch(0 0 0)',\n scrim: 'oklch(0 0 0)',\n inverseSurface: 'oklch(0.277 0.01 286.96)',\n inverseOnSurface: 'oklch(0.926 0.004 286.76)',\n inversePrimary: 'oklch(0.858 0.094 290.01)'\n}\n\n/**\n * Dark theme color tokens (Material Design 3 default)\n */\nexport const darkColorTokens: ColorTokens = {\n // Primary\n primary: 'oklch(0.858 0.094 290.01)',\n onPrimary: 'oklch(0.345 0.162 286.18)',\n primaryContainer: 'oklch(0.419 0.169 286.57)',\n onPrimaryContainer: 'oklch(0.933 0.066 292.71)',\n\n // Secondary\n secondary: 'oklch(0.831 0.052 289.35)',\n onSecondary: 'oklch(0.372 0.082 287.46)',\n secondaryContainer: 'oklch(0.454 0.084 287.21)',\n onSecondaryContainer: 'oklch(0.918 0.039 289.09)',\n\n // Tertiary\n tertiary: 'oklch(0.891 0.084 15.26)',\n onTertiary: 'oklch(0.412 0.155 12.62)',\n tertiaryContainer: 'oklch(0.506 0.158 13.68)',\n onTertiaryContainer: 'oklch(0.957 0.056 16.41)',\n\n // Error\n error: 'oklch(0.879 0.114 26.76)',\n onError: 'oklch(0.408 0.204 25.72)',\n errorContainer: 'oklch(0.488 0.207 27.02)',\n onErrorContainer: 'oklch(0.955 0.074 27.34)',\n\n // Surface - Dark\n surface: 'oklch(0.171 0.008 286.96)',\n onSurface: 'oklch(0.901 0.004 287.14)',\n surfaceVariant: 'oklch(0.363 0.015 289.35)',\n onSurfaceVariant: 'oklch(0.792 0.01 288.67)',\n surfaceContainerLowest: 'oklch(0.13 0.009 283.58)',\n surfaceContainerLow: 'oklch(0.203 0.008 287.74)',\n surfaceContainer: 'oklch(0.224 0.009 286.96)',\n surfaceContainerHigh: 'oklch(0.245 0.009 287.34)',\n surfaceContainerHighest: 'oklch(0.277 0.01 286.96)',\n\n // Background\n background: 'oklch(0.149 0.009 286.96)',\n onBackground: 'oklch(0.901 0.004 287.14)',\n\n // Outline\n outline: 'oklch(0.545 0.013 287.98)',\n outlineVariant: 'oklch(0.363 0.015 289.35)',\n\n // Other\n shadow: 'oklch(0 0 0)',\n scrim: 'oklch(0 0 0)',\n inverseSurface: 'oklch(0.901 0.004 287.14)',\n inverseOnSurface: 'oklch(0.277 0.01 286.96)',\n inversePrimary: 'oklch(0.515 0.177 286.75)'\n}\n\n/** Strip the oklch() wrapper: CSS vars hold bare \"L C H\" channels, consumed as oklch(var(--x)). */\nconst channels = (value: string): string => value.replace(/^oklch\\((.*)\\)$/, '$1')\n\nconst toKebab = (key: string): string => key.replace(/([A-Z])/g, '-$1').toLowerCase()\n\n/**\n * Generate CSS custom properties for color tokens.\n *\n * Values are emitted as bare OKLCH channels, matching @rmikit/core.\n * Dark tokens apply when the OS prefers dark (unless data-theme=\"light\" is set on <html>)\n * or when data-theme=\"dark\" is set.\n */\nexport function generateColorCSS(tokens: ColorTokens, isDark = false): string {\n const body = Object.entries(tokens)\n .map(([key, value]) => ` --md-sys-color-${toKebab(key)}: ${channels(value)};`)\n .join('\\n')\n\n if (!isDark) return `:root {\\n${body}\\n}\\n`\n\n const indented = body.replace(/^/gm, ' ')\n return `@media (prefers-color-scheme: dark) {\\n :root:not([data-theme=\"light\"]) {\\n${indented}\\n }\\n}\\n:root[data-theme=\"dark\"] {\\n${body}\\n}\\n`\n}\n"],"mappings":";AA4DO,IAAM,mBAAgC;AAAA;AAAA,EAE3C,SAAS;AAAA,EACT,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,oBAAoB;AAAA;AAAA,EAGpB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,sBAAsB;AAAA;AAAA,EAGtB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,qBAAqB;AAAA;AAAA,EAGrB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,kBAAkB;AAAA;AAAA,EAGlB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,yBAAyB;AAAA;AAAA,EAGzB,YAAY;AAAA,EACZ,cAAc;AAAA;AAAA,EAGd,SAAS;AAAA,EACT,gBAAgB;AAAA;AAAA,EAGhB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,gBAAgB;AAClB;AAKO,IAAM,kBAA+B;AAAA;AAAA,EAE1C,SAAS;AAAA,EACT,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,oBAAoB;AAAA;AAAA,EAGpB,WAAW;AAAA,EACX,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,sBAAsB;AAAA;AAAA,EAGtB,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,qBAAqB;AAAA;AAAA,EAGrB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,kBAAkB;AAAA;AAAA,EAGlB,SAAS;AAAA,EACT,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,sBAAsB;AAAA,EACtB,yBAAyB;AAAA;AAAA,EAGzB,YAAY;AAAA,EACZ,cAAc;AAAA;AAAA,EAGd,SAAS;AAAA,EACT,gBAAgB;AAAA;AAAA,EAGhB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,gBAAgB;AAClB;AAGA,IAAM,WAAW,CAAC,UAA0B,MAAM,QAAQ,mBAAmB,IAAI;AAEjF,IAAM,UAAU,CAAC,QAAwB,IAAI,QAAQ,YAAY,KAAK,EAAE,YAAY;AAS7E,SAAS,iBAAiB,QAAqB,SAAS,OAAe;AAC5E,QAAM,OAAO,OAAO,QAAQ,MAAM,EAC/B,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,oBAAoB,QAAQ,GAAG,CAAC,KAAK,SAAS,KAAK,CAAC,GAAG,EAC7E,KAAK,IAAI;AAEZ,MAAI,CAAC,OAAQ,QAAO;AAAA,EAAY,IAAI;AAAA;AAAA;AAEpC,QAAM,WAAW,KAAK,QAAQ,OAAO,IAAI;AACzC,SAAO;AAAA;AAAA,EAA+E,QAAQ;AAAA;AAAA;AAAA;AAAA,EAAyC,IAAI;AAAA;AAAA;AAC7I;","names":[]}
@@ -0,0 +1,22 @@
1
+ // src/state.ts
2
+ var state = {
3
+ hover: 0.08,
4
+ focus: 0.12,
5
+ pressed: 0.12,
6
+ dragged: 0.16
7
+ };
8
+ function generateStateCSS() {
9
+ return `:root {
10
+ --md-sys-state-hover-state-layer-opacity: ${state.hover};
11
+ --md-sys-state-focus-state-layer-opacity: ${state.focus};
12
+ --md-sys-state-pressed-state-layer-opacity: ${state.pressed};
13
+ --md-sys-state-dragged-state-layer-opacity: ${state.dragged};
14
+ }
15
+ `;
16
+ }
17
+
18
+ export {
19
+ state,
20
+ generateStateCSS
21
+ };
22
+ //# sourceMappingURL=chunk-5PV64REL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/state.ts"],"sourcesContent":["/**\n * Material Design 3 State Layer System\n */\n\nexport const state = {\n hover: 0.08,\n focus: 0.12,\n pressed: 0.12,\n dragged: 0.16\n} as const\n\nexport function generateStateCSS(): string {\n return `:root {\n --md-sys-state-hover-state-layer-opacity: ${state.hover};\n --md-sys-state-focus-state-layer-opacity: ${state.focus};\n --md-sys-state-pressed-state-layer-opacity: ${state.pressed};\n --md-sys-state-dragged-state-layer-opacity: ${state.dragged};\n}\n`\n}\n"],"mappings":";AAIO,IAAM,QAAQ;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AACX;AAEO,SAAS,mBAA2B;AACzC,SAAO;AAAA,8CACqC,MAAM,KAAK;AAAA,8CACX,MAAM,KAAK;AAAA,gDACT,MAAM,OAAO;AAAA,gDACb,MAAM,OAAO;AAAA;AAAA;AAG7D;","names":[]}
@@ -0,0 +1,28 @@
1
+ // src/shape.ts
2
+ var shape = {
3
+ none: "0px",
4
+ extraSmall: "4px",
5
+ small: "8px",
6
+ medium: "12px",
7
+ large: "16px",
8
+ extraLarge: "28px",
9
+ full: "9999px"
10
+ };
11
+ function generateShapeCSS() {
12
+ return `:root {
13
+ --md-sys-shape-corner-none: ${shape.none};
14
+ --md-sys-shape-corner-extra-small: ${shape.extraSmall};
15
+ --md-sys-shape-corner-small: ${shape.small};
16
+ --md-sys-shape-corner-medium: ${shape.medium};
17
+ --md-sys-shape-corner-large: ${shape.large};
18
+ --md-sys-shape-corner-extra-large: ${shape.extraLarge};
19
+ --md-sys-shape-corner-full: ${shape.full};
20
+ }
21
+ `;
22
+ }
23
+
24
+ export {
25
+ shape,
26
+ generateShapeCSS
27
+ };
28
+ //# sourceMappingURL=chunk-HW7JGBVG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shape.ts"],"sourcesContent":["/**\n * Material Design 3 Shape System\n */\n\nexport const shape = {\n none: '0px',\n extraSmall: '4px',\n small: '8px',\n medium: '12px',\n large: '16px',\n extraLarge: '28px',\n full: '9999px'\n} as const\n\nexport function generateShapeCSS(): string {\n return `:root {\n --md-sys-shape-corner-none: ${shape.none};\n --md-sys-shape-corner-extra-small: ${shape.extraSmall};\n --md-sys-shape-corner-small: ${shape.small};\n --md-sys-shape-corner-medium: ${shape.medium};\n --md-sys-shape-corner-large: ${shape.large};\n --md-sys-shape-corner-extra-large: ${shape.extraLarge};\n --md-sys-shape-corner-full: ${shape.full};\n}\n`\n}\n"],"mappings":";AAIO,IAAM,QAAQ;AAAA,EACnB,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,MAAM;AACR;AAEO,SAAS,mBAA2B;AACzC,SAAO;AAAA,gCACuB,MAAM,IAAI;AAAA,uCACH,MAAM,UAAU;AAAA,iCACtB,MAAM,KAAK;AAAA,kCACV,MAAM,MAAM;AAAA,iCACb,MAAM,KAAK;AAAA,uCACL,MAAM,UAAU;AAAA,gCACvB,MAAM,IAAI;AAAA;AAAA;AAG1C;","names":[]}
@@ -0,0 +1,65 @@
1
+ // src/motion.ts
2
+ var motion = {
3
+ duration: {
4
+ short1: "50ms",
5
+ short2: "100ms",
6
+ short3: "150ms",
7
+ short4: "200ms",
8
+ medium1: "250ms",
9
+ medium2: "300ms",
10
+ medium3: "350ms",
11
+ medium4: "400ms",
12
+ long1: "450ms",
13
+ long2: "500ms",
14
+ long3: "550ms",
15
+ long4: "600ms",
16
+ extraLong1: "700ms",
17
+ extraLong2: "800ms",
18
+ extraLong3: "900ms",
19
+ extraLong4: "1000ms"
20
+ },
21
+ easing: {
22
+ emphasized: "cubic-bezier(0.2, 0, 0, 1)",
23
+ emphasizedDecelerate: "cubic-bezier(0.05, 0.7, 0.1, 1)",
24
+ emphasizedAccelerate: "cubic-bezier(0.3, 0, 0.8, 0.15)",
25
+ standard: "cubic-bezier(0.2, 0, 0, 1)",
26
+ standardDecelerate: "cubic-bezier(0, 0, 0, 1)",
27
+ standardAccelerate: "cubic-bezier(0.3, 0, 1, 1)",
28
+ legacy: "cubic-bezier(0.4, 0, 0.2, 1)",
29
+ legacyDecelerate: "cubic-bezier(0, 0, 0.2, 1)",
30
+ legacyAccelerate: "cubic-bezier(0.4, 0, 1, 1)",
31
+ linear: "cubic-bezier(0, 0, 1, 1)"
32
+ }
33
+ };
34
+ function generateMotionCSS() {
35
+ return `:root {
36
+ /* Duration */
37
+ --md-sys-motion-duration-short1: ${motion.duration.short1};
38
+ --md-sys-motion-duration-short2: ${motion.duration.short2};
39
+ --md-sys-motion-duration-short3: ${motion.duration.short3};
40
+ --md-sys-motion-duration-short4: ${motion.duration.short4};
41
+ --md-sys-motion-duration-medium1: ${motion.duration.medium1};
42
+ --md-sys-motion-duration-medium2: ${motion.duration.medium2};
43
+ --md-sys-motion-duration-medium3: ${motion.duration.medium3};
44
+ --md-sys-motion-duration-medium4: ${motion.duration.medium4};
45
+ --md-sys-motion-duration-long1: ${motion.duration.long1};
46
+ --md-sys-motion-duration-long2: ${motion.duration.long2};
47
+ --md-sys-motion-duration-long3: ${motion.duration.long3};
48
+ --md-sys-motion-duration-long4: ${motion.duration.long4};
49
+
50
+ /* Easing */
51
+ --md-sys-motion-easing-emphasized: ${motion.easing.emphasized};
52
+ --md-sys-motion-easing-emphasized-decelerate: ${motion.easing.emphasizedDecelerate};
53
+ --md-sys-motion-easing-emphasized-accelerate: ${motion.easing.emphasizedAccelerate};
54
+ --md-sys-motion-easing-standard: ${motion.easing.standard};
55
+ --md-sys-motion-easing-standard-decelerate: ${motion.easing.standardDecelerate};
56
+ --md-sys-motion-easing-standard-accelerate: ${motion.easing.standardAccelerate};
57
+ }
58
+ `;
59
+ }
60
+
61
+ export {
62
+ motion,
63
+ generateMotionCSS
64
+ };
65
+ //# sourceMappingURL=chunk-IHSA74E4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/motion.ts"],"sourcesContent":["/**\n * Material Design 3 Motion System\n */\n\nexport const motion = {\n duration: {\n short1: '50ms',\n short2: '100ms',\n short3: '150ms',\n short4: '200ms',\n medium1: '250ms',\n medium2: '300ms',\n medium3: '350ms',\n medium4: '400ms',\n long1: '450ms',\n long2: '500ms',\n long3: '550ms',\n long4: '600ms',\n extraLong1: '700ms',\n extraLong2: '800ms',\n extraLong3: '900ms',\n extraLong4: '1000ms'\n },\n easing: {\n emphasized: 'cubic-bezier(0.2, 0, 0, 1)',\n emphasizedDecelerate: 'cubic-bezier(0.05, 0.7, 0.1, 1)',\n emphasizedAccelerate: 'cubic-bezier(0.3, 0, 0.8, 0.15)',\n standard: 'cubic-bezier(0.2, 0, 0, 1)',\n standardDecelerate: 'cubic-bezier(0, 0, 0, 1)',\n standardAccelerate: 'cubic-bezier(0.3, 0, 1, 1)',\n legacy: 'cubic-bezier(0.4, 0, 0.2, 1)',\n legacyDecelerate: 'cubic-bezier(0, 0, 0.2, 1)',\n legacyAccelerate: 'cubic-bezier(0.4, 0, 1, 1)',\n linear: 'cubic-bezier(0, 0, 1, 1)'\n }\n} as const\n\nexport function generateMotionCSS(): string {\n return `:root {\n /* Duration */\n --md-sys-motion-duration-short1: ${motion.duration.short1};\n --md-sys-motion-duration-short2: ${motion.duration.short2};\n --md-sys-motion-duration-short3: ${motion.duration.short3};\n --md-sys-motion-duration-short4: ${motion.duration.short4};\n --md-sys-motion-duration-medium1: ${motion.duration.medium1};\n --md-sys-motion-duration-medium2: ${motion.duration.medium2};\n --md-sys-motion-duration-medium3: ${motion.duration.medium3};\n --md-sys-motion-duration-medium4: ${motion.duration.medium4};\n --md-sys-motion-duration-long1: ${motion.duration.long1};\n --md-sys-motion-duration-long2: ${motion.duration.long2};\n --md-sys-motion-duration-long3: ${motion.duration.long3};\n --md-sys-motion-duration-long4: ${motion.duration.long4};\n\n /* Easing */\n --md-sys-motion-easing-emphasized: ${motion.easing.emphasized};\n --md-sys-motion-easing-emphasized-decelerate: ${motion.easing.emphasizedDecelerate};\n --md-sys-motion-easing-emphasized-accelerate: ${motion.easing.emphasizedAccelerate};\n --md-sys-motion-easing-standard: ${motion.easing.standard};\n --md-sys-motion-easing-standard-decelerate: ${motion.easing.standardDecelerate};\n --md-sys-motion-easing-standard-accelerate: ${motion.easing.standardAccelerate};\n}\n`\n}\n"],"mappings":";AAIO,IAAM,SAAS;AAAA,EACpB,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY;AAAA,EACd;AAAA,EACA,QAAQ;AAAA,IACN,YAAY;AAAA,IACZ,sBAAsB;AAAA,IACtB,sBAAsB;AAAA,IACtB,UAAU;AAAA,IACV,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,IACpB,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,QAAQ;AAAA,EACV;AACF;AAEO,SAAS,oBAA4B;AAC1C,SAAO;AAAA;AAAA,qCAE4B,OAAO,SAAS,MAAM;AAAA,qCACtB,OAAO,SAAS,MAAM;AAAA,qCACtB,OAAO,SAAS,MAAM;AAAA,qCACtB,OAAO,SAAS,MAAM;AAAA,sCACrB,OAAO,SAAS,OAAO;AAAA,sCACvB,OAAO,SAAS,OAAO;AAAA,sCACvB,OAAO,SAAS,OAAO;AAAA,sCACvB,OAAO,SAAS,OAAO;AAAA,oCACzB,OAAO,SAAS,KAAK;AAAA,oCACrB,OAAO,SAAS,KAAK;AAAA,oCACrB,OAAO,SAAS,KAAK;AAAA,oCACrB,OAAO,SAAS,KAAK;AAAA;AAAA;AAAA,uCAGlB,OAAO,OAAO,UAAU;AAAA,kDACb,OAAO,OAAO,oBAAoB;AAAA,kDAClC,OAAO,OAAO,oBAAoB;AAAA,qCAC/C,OAAO,OAAO,QAAQ;AAAA,gDACX,OAAO,OAAO,kBAAkB;AAAA,gDAChC,OAAO,OAAO,kBAAkB;AAAA;AAAA;AAGhF;","names":[]}
@@ -0,0 +1,26 @@
1
+ // src/elevation.ts
2
+ var elevation = {
3
+ 0: "none",
4
+ 1: "0px 1px 2px oklch(0 0 0 / 0.3), 0px 1px 3px 1px oklch(0 0 0 / 0.15)",
5
+ 2: "0px 1px 2px oklch(0 0 0 / 0.3), 0px 2px 6px 2px oklch(0 0 0 / 0.15)",
6
+ 3: "0px 4px 8px 3px oklch(0 0 0 / 0.15), 0px 1px 3px oklch(0 0 0 / 0.3)",
7
+ 4: "0px 6px 10px 4px oklch(0 0 0 / 0.15), 0px 2px 3px oklch(0 0 0 / 0.3)",
8
+ 5: "0px 8px 12px 6px oklch(0 0 0 / 0.15), 0px 4px 4px oklch(0 0 0 / 0.3)"
9
+ };
10
+ function generateElevationCSS() {
11
+ return `:root {
12
+ --md-sys-elevation-level0: ${elevation[0]};
13
+ --md-sys-elevation-level1: ${elevation[1]};
14
+ --md-sys-elevation-level2: ${elevation[2]};
15
+ --md-sys-elevation-level3: ${elevation[3]};
16
+ --md-sys-elevation-level4: ${elevation[4]};
17
+ --md-sys-elevation-level5: ${elevation[5]};
18
+ }
19
+ `;
20
+ }
21
+
22
+ export {
23
+ elevation,
24
+ generateElevationCSS
25
+ };
26
+ //# sourceMappingURL=chunk-Q4HN4PJQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/elevation.ts"],"sourcesContent":["/**\n * Material Design 3 Elevation System\n */\n\nexport const elevation = {\n 0: 'none',\n 1: '0px 1px 2px oklch(0 0 0 / 0.3), 0px 1px 3px 1px oklch(0 0 0 / 0.15)',\n 2: '0px 1px 2px oklch(0 0 0 / 0.3), 0px 2px 6px 2px oklch(0 0 0 / 0.15)',\n 3: '0px 4px 8px 3px oklch(0 0 0 / 0.15), 0px 1px 3px oklch(0 0 0 / 0.3)',\n 4: '0px 6px 10px 4px oklch(0 0 0 / 0.15), 0px 2px 3px oklch(0 0 0 / 0.3)',\n 5: '0px 8px 12px 6px oklch(0 0 0 / 0.15), 0px 4px 4px oklch(0 0 0 / 0.3)'\n} as const\n\nexport function generateElevationCSS(): string {\n return `:root {\n --md-sys-elevation-level0: ${elevation[0]};\n --md-sys-elevation-level1: ${elevation[1]};\n --md-sys-elevation-level2: ${elevation[2]};\n --md-sys-elevation-level3: ${elevation[3]};\n --md-sys-elevation-level4: ${elevation[4]};\n --md-sys-elevation-level5: ${elevation[5]};\n}\n`\n}\n"],"mappings":";AAIO,IAAM,YAAY;AAAA,EACvB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEO,SAAS,uBAA+B;AAC7C,SAAO;AAAA,+BACsB,UAAU,CAAC,CAAC;AAAA,+BACZ,UAAU,CAAC,CAAC;AAAA,+BACZ,UAAU,CAAC,CAAC;AAAA,+BACZ,UAAU,CAAC,CAAC;AAAA,+BACZ,UAAU,CAAC,CAAC;AAAA,+BACZ,UAAU,CAAC,CAAC;AAAA;AAAA;AAG3C;","names":[]}
@@ -0,0 +1,134 @@
1
+ // src/typography.ts
2
+ var typographyScale = {
3
+ displayLarge: {
4
+ fontSize: "57px",
5
+ lineHeight: "64px",
6
+ fontWeight: "400",
7
+ letterSpacing: "-0.25px",
8
+ fontFamily: 'var(--md-sys-typescale-brand-font-family, "Roboto", system-ui, sans-serif)'
9
+ },
10
+ displayMedium: {
11
+ fontSize: "45px",
12
+ lineHeight: "52px",
13
+ fontWeight: "400",
14
+ letterSpacing: "0px",
15
+ fontFamily: 'var(--md-sys-typescale-brand-font-family, "Roboto", system-ui, sans-serif)'
16
+ },
17
+ displaySmall: {
18
+ fontSize: "36px",
19
+ lineHeight: "44px",
20
+ fontWeight: "400",
21
+ letterSpacing: "0px",
22
+ fontFamily: 'var(--md-sys-typescale-brand-font-family, "Roboto", system-ui, sans-serif)'
23
+ },
24
+ headlineLarge: {
25
+ fontSize: "32px",
26
+ lineHeight: "40px",
27
+ fontWeight: "400",
28
+ letterSpacing: "0px",
29
+ fontFamily: 'var(--md-sys-typescale-brand-font-family, "Roboto", system-ui, sans-serif)'
30
+ },
31
+ headlineMedium: {
32
+ fontSize: "28px",
33
+ lineHeight: "36px",
34
+ fontWeight: "400",
35
+ letterSpacing: "0px",
36
+ fontFamily: 'var(--md-sys-typescale-brand-font-family, "Roboto", system-ui, sans-serif)'
37
+ },
38
+ headlineSmall: {
39
+ fontSize: "24px",
40
+ lineHeight: "32px",
41
+ fontWeight: "400",
42
+ letterSpacing: "0px",
43
+ fontFamily: 'var(--md-sys-typescale-brand-font-family, "Roboto", system-ui, sans-serif)'
44
+ },
45
+ titleLarge: {
46
+ fontSize: "22px",
47
+ lineHeight: "28px",
48
+ fontWeight: "400",
49
+ letterSpacing: "0px",
50
+ fontFamily: 'var(--md-sys-typescale-brand-font-family, "Roboto", system-ui, sans-serif)'
51
+ },
52
+ titleMedium: {
53
+ fontSize: "16px",
54
+ lineHeight: "24px",
55
+ fontWeight: "500",
56
+ letterSpacing: "0.15px",
57
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
58
+ },
59
+ titleSmall: {
60
+ fontSize: "14px",
61
+ lineHeight: "20px",
62
+ fontWeight: "500",
63
+ letterSpacing: "0.1px",
64
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
65
+ },
66
+ bodyLarge: {
67
+ fontSize: "16px",
68
+ lineHeight: "24px",
69
+ fontWeight: "400",
70
+ letterSpacing: "0.5px",
71
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
72
+ },
73
+ bodyMedium: {
74
+ fontSize: "14px",
75
+ lineHeight: "20px",
76
+ fontWeight: "400",
77
+ letterSpacing: "0.25px",
78
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
79
+ },
80
+ bodySmall: {
81
+ fontSize: "12px",
82
+ lineHeight: "16px",
83
+ fontWeight: "400",
84
+ letterSpacing: "0.4px",
85
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
86
+ },
87
+ labelLarge: {
88
+ fontSize: "14px",
89
+ lineHeight: "20px",
90
+ fontWeight: "500",
91
+ letterSpacing: "0.1px",
92
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
93
+ },
94
+ labelMedium: {
95
+ fontSize: "12px",
96
+ lineHeight: "16px",
97
+ fontWeight: "500",
98
+ letterSpacing: "0.5px",
99
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
100
+ },
101
+ labelSmall: {
102
+ fontSize: "11px",
103
+ lineHeight: "16px",
104
+ fontWeight: "500",
105
+ letterSpacing: "0.5px",
106
+ fontFamily: 'var(--md-sys-typescale-plain-font-family, "Roboto", system-ui, sans-serif)'
107
+ }
108
+ };
109
+ function generateTypographyCSS(scale) {
110
+ const entries = Object.entries(scale);
111
+ const cssVars = [];
112
+ entries.forEach(([name, tokens]) => {
113
+ const varName = name.replace(/([A-Z])/g, "-$1").toLowerCase();
114
+ cssVars.push(` --md-sys-typescale-${varName}-font-size: ${tokens.fontSize};`);
115
+ cssVars.push(` --md-sys-typescale-${varName}-line-height: ${tokens.lineHeight};`);
116
+ cssVars.push(` --md-sys-typescale-${varName}-font-weight: ${tokens.fontWeight};`);
117
+ cssVars.push(` --md-sys-typescale-${varName}-letter-spacing: ${tokens.letterSpacing};`);
118
+ });
119
+ return `:root {
120
+ /* Font families */
121
+ --md-sys-typescale-brand-font-family: "Roboto", system-ui, sans-serif;
122
+ --md-sys-typescale-plain-font-family: "Roboto", system-ui, sans-serif;
123
+
124
+ /* Typography scale */
125
+ ${cssVars.join("\n")}
126
+ }
127
+ `;
128
+ }
129
+
130
+ export {
131
+ typographyScale,
132
+ generateTypographyCSS
133
+ };
134
+ //# sourceMappingURL=chunk-SB3IH2SF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/typography.ts"],"sourcesContent":["/**\n * Material Design 3 Typography Tokens\n */\n\nexport interface TypographyTokens {\n fontSize: string\n lineHeight: string\n fontWeight: string\n letterSpacing: string\n fontFamily: string\n}\n\nexport interface TypographyScale {\n displayLarge: TypographyTokens\n displayMedium: TypographyTokens\n displaySmall: TypographyTokens\n headlineLarge: TypographyTokens\n headlineMedium: TypographyTokens\n headlineSmall: TypographyTokens\n titleLarge: TypographyTokens\n titleMedium: TypographyTokens\n titleSmall: TypographyTokens\n bodyLarge: TypographyTokens\n bodyMedium: TypographyTokens\n bodySmall: TypographyTokens\n labelLarge: TypographyTokens\n labelMedium: TypographyTokens\n labelSmall: TypographyTokens\n}\n\n/**\n * Default Material Design 3 typography scale\n */\nexport const typographyScale: TypographyScale = {\n displayLarge: {\n fontSize: '57px',\n lineHeight: '64px',\n fontWeight: '400',\n letterSpacing: '-0.25px',\n fontFamily: 'var(--md-sys-typescale-brand-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n displayMedium: {\n fontSize: '45px',\n lineHeight: '52px',\n fontWeight: '400',\n letterSpacing: '0px',\n fontFamily: 'var(--md-sys-typescale-brand-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n displaySmall: {\n fontSize: '36px',\n lineHeight: '44px',\n fontWeight: '400',\n letterSpacing: '0px',\n fontFamily: 'var(--md-sys-typescale-brand-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n headlineLarge: {\n fontSize: '32px',\n lineHeight: '40px',\n fontWeight: '400',\n letterSpacing: '0px',\n fontFamily: 'var(--md-sys-typescale-brand-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n headlineMedium: {\n fontSize: '28px',\n lineHeight: '36px',\n fontWeight: '400',\n letterSpacing: '0px',\n fontFamily: 'var(--md-sys-typescale-brand-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n headlineSmall: {\n fontSize: '24px',\n lineHeight: '32px',\n fontWeight: '400',\n letterSpacing: '0px',\n fontFamily: 'var(--md-sys-typescale-brand-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n titleLarge: {\n fontSize: '22px',\n lineHeight: '28px',\n fontWeight: '400',\n letterSpacing: '0px',\n fontFamily: 'var(--md-sys-typescale-brand-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n titleMedium: {\n fontSize: '16px',\n lineHeight: '24px',\n fontWeight: '500',\n letterSpacing: '0.15px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n titleSmall: {\n fontSize: '14px',\n lineHeight: '20px',\n fontWeight: '500',\n letterSpacing: '0.1px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n bodyLarge: {\n fontSize: '16px',\n lineHeight: '24px',\n fontWeight: '400',\n letterSpacing: '0.5px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n bodyMedium: {\n fontSize: '14px',\n lineHeight: '20px',\n fontWeight: '400',\n letterSpacing: '0.25px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n bodySmall: {\n fontSize: '12px',\n lineHeight: '16px',\n fontWeight: '400',\n letterSpacing: '0.4px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n labelLarge: {\n fontSize: '14px',\n lineHeight: '20px',\n fontWeight: '500',\n letterSpacing: '0.1px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n labelMedium: {\n fontSize: '12px',\n lineHeight: '16px',\n fontWeight: '500',\n letterSpacing: '0.5px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n },\n labelSmall: {\n fontSize: '11px',\n lineHeight: '16px',\n fontWeight: '500',\n letterSpacing: '0.5px',\n fontFamily: 'var(--md-sys-typescale-plain-font-family, \"Roboto\", system-ui, sans-serif)'\n }\n}\n\n/**\n * Generate CSS custom properties for typography tokens\n */\nexport function generateTypographyCSS(scale: TypographyScale): string {\n const entries = Object.entries(scale)\n const cssVars: string[] = []\n\n entries.forEach(([name, tokens]) => {\n const varName = name.replace(/([A-Z])/g, '-$1').toLowerCase()\n cssVars.push(` --md-sys-typescale-${varName}-font-size: ${tokens.fontSize};`)\n cssVars.push(` --md-sys-typescale-${varName}-line-height: ${tokens.lineHeight};`)\n cssVars.push(` --md-sys-typescale-${varName}-font-weight: ${tokens.fontWeight};`)\n cssVars.push(` --md-sys-typescale-${varName}-letter-spacing: ${tokens.letterSpacing};`)\n })\n\n return `:root {\n /* Font families */\n --md-sys-typescale-brand-font-family: \"Roboto\", system-ui, sans-serif;\n --md-sys-typescale-plain-font-family: \"Roboto\", system-ui, sans-serif;\n\n /* Typography scale */\n${cssVars.join('\\n')}\n}\n`\n}\n"],"mappings":";AAiCO,IAAM,kBAAmC;AAAA,EAC9C,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,cAAc;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,gBAAgB;AAAA,IACd,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,YAAY;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,aAAa;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,YAAY;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,WAAW;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,YAAY;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,WAAW;AAAA,IACT,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,YAAY;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,aAAa;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AAAA,EACA,YAAY;AAAA,IACV,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AACF;AAKO,SAAS,sBAAsB,OAAgC;AACpE,QAAM,UAAU,OAAO,QAAQ,KAAK;AACpC,QAAM,UAAoB,CAAC;AAE3B,UAAQ,QAAQ,CAAC,CAAC,MAAM,MAAM,MAAM;AAClC,UAAM,UAAU,KAAK,QAAQ,YAAY,KAAK,EAAE,YAAY;AAC5D,YAAQ,KAAK,wBAAwB,OAAO,eAAe,OAAO,QAAQ,GAAG;AAC7E,YAAQ,KAAK,wBAAwB,OAAO,iBAAiB,OAAO,UAAU,GAAG;AACjF,YAAQ,KAAK,wBAAwB,OAAO,iBAAiB,OAAO,UAAU,GAAG;AACjF,YAAQ,KAAK,wBAAwB,OAAO,oBAAoB,OAAO,aAAa,GAAG;AAAA,EACzF,CAAC;AAED,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMP,QAAQ,KAAK,IAAI,CAAC;AAAA;AAAA;AAGpB;","names":[]}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Material Design 3 Color Tokens
3
+ * Using OKLCH color space for better perceptual uniformity
4
+ */
5
+ interface ColorTokens {
6
+ primary: string;
7
+ onPrimary: string;
8
+ primaryContainer: string;
9
+ onPrimaryContainer: string;
10
+ secondary: string;
11
+ onSecondary: string;
12
+ secondaryContainer: string;
13
+ onSecondaryContainer: string;
14
+ tertiary: string;
15
+ onTertiary: string;
16
+ tertiaryContainer: string;
17
+ onTertiaryContainer: string;
18
+ error: string;
19
+ onError: string;
20
+ errorContainer: string;
21
+ onErrorContainer: string;
22
+ surface: string;
23
+ onSurface: string;
24
+ surfaceVariant: string;
25
+ onSurfaceVariant: string;
26
+ surfaceContainerLowest: string;
27
+ surfaceContainerLow: string;
28
+ surfaceContainer: string;
29
+ surfaceContainerHigh: string;
30
+ surfaceContainerHighest: string;
31
+ background: string;
32
+ onBackground: string;
33
+ outline: string;
34
+ outlineVariant: string;
35
+ shadow: string;
36
+ scrim: string;
37
+ inverseSurface: string;
38
+ inverseOnSurface: string;
39
+ inversePrimary: string;
40
+ }
41
+ /**
42
+ * Light theme color tokens (Material Design 3 default)
43
+ */
44
+ declare const lightColorTokens: ColorTokens;
45
+ /**
46
+ * Dark theme color tokens (Material Design 3 default)
47
+ */
48
+ declare const darkColorTokens: ColorTokens;
49
+ /**
50
+ * Generate CSS custom properties for color tokens.
51
+ *
52
+ * Values are emitted as bare OKLCH channels, matching @rmikit/core.
53
+ * Dark tokens apply when the OS prefers dark (unless data-theme="light" is set on <html>)
54
+ * or when data-theme="dark" is set.
55
+ */
56
+ declare function generateColorCSS(tokens: ColorTokens, isDark?: boolean): string;
57
+
58
+ export { darkColorTokens, generateColorCSS, lightColorTokens };
59
+ export type { ColorTokens };
package/dist/colors.js ADDED
@@ -0,0 +1,11 @@
1
+ import {
2
+ darkColorTokens,
3
+ generateColorCSS,
4
+ lightColorTokens
5
+ } from "./chunk-3E7VYS7F.js";
6
+ export {
7
+ darkColorTokens,
8
+ generateColorCSS,
9
+ lightColorTokens
10
+ };
11
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Material Design 3 Elevation System
3
+ */
4
+ declare const elevation: {
5
+ readonly 0: "none";
6
+ readonly 1: "0px 1px 2px oklch(0 0 0 / 0.3), 0px 1px 3px 1px oklch(0 0 0 / 0.15)";
7
+ readonly 2: "0px 1px 2px oklch(0 0 0 / 0.3), 0px 2px 6px 2px oklch(0 0 0 / 0.15)";
8
+ readonly 3: "0px 4px 8px 3px oklch(0 0 0 / 0.15), 0px 1px 3px oklch(0 0 0 / 0.3)";
9
+ readonly 4: "0px 6px 10px 4px oklch(0 0 0 / 0.15), 0px 2px 3px oklch(0 0 0 / 0.3)";
10
+ readonly 5: "0px 8px 12px 6px oklch(0 0 0 / 0.15), 0px 4px 4px oklch(0 0 0 / 0.3)";
11
+ };
12
+ declare function generateElevationCSS(): string;
13
+
14
+ export { elevation, generateElevationCSS };
@@ -0,0 +1,9 @@
1
+ import {
2
+ elevation,
3
+ generateElevationCSS
4
+ } from "./chunk-Q4HN4PJQ.js";
5
+ export {
6
+ elevation,
7
+ generateElevationCSS
8
+ };
9
+ //# sourceMappingURL=elevation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,18 @@
1
+ export { ColorTokens, darkColorTokens, generateColorCSS, lightColorTokens } from './colors.js';
2
+ export { TypographyScale, TypographyTokens, generateTypographyCSS, typographyScale } from './typography.js';
3
+ export { elevation, generateElevationCSS } from './elevation.js';
4
+ export { generateMotionCSS, motion } from './motion.js';
5
+ export { generateShapeCSS, shape } from './shape.js';
6
+ export { generateStateCSS, state } from './state.js';
7
+
8
+ /**
9
+ * @rmikit/design-tokens
10
+ * Material Design 3 design system tokens
11
+ */
12
+
13
+ /**
14
+ * Generate complete CSS for all Material Design 3 tokens
15
+ */
16
+ declare function generateAllTokensCSS(): string;
17
+
18
+ export { generateAllTokensCSS };
package/dist/index.js ADDED
@@ -0,0 +1,55 @@
1
+ import {
2
+ darkColorTokens,
3
+ generateColorCSS,
4
+ lightColorTokens
5
+ } from "./chunk-3E7VYS7F.js";
6
+ import {
7
+ generateTypographyCSS,
8
+ typographyScale
9
+ } from "./chunk-SB3IH2SF.js";
10
+ import {
11
+ elevation,
12
+ generateElevationCSS
13
+ } from "./chunk-Q4HN4PJQ.js";
14
+ import {
15
+ generateMotionCSS,
16
+ motion
17
+ } from "./chunk-IHSA74E4.js";
18
+ import {
19
+ generateShapeCSS,
20
+ shape
21
+ } from "./chunk-HW7JGBVG.js";
22
+ import {
23
+ generateStateCSS,
24
+ state
25
+ } from "./chunk-5PV64REL.js";
26
+
27
+ // src/index.ts
28
+ function generateAllTokensCSS() {
29
+ return [
30
+ generateColorCSS(lightColorTokens),
31
+ generateColorCSS(darkColorTokens, true),
32
+ generateTypographyCSS(typographyScale),
33
+ generateElevationCSS(),
34
+ generateMotionCSS(),
35
+ generateShapeCSS(),
36
+ generateStateCSS()
37
+ ].join("\n");
38
+ }
39
+ export {
40
+ darkColorTokens,
41
+ elevation,
42
+ generateAllTokensCSS,
43
+ generateColorCSS,
44
+ generateElevationCSS,
45
+ generateMotionCSS,
46
+ generateShapeCSS,
47
+ generateStateCSS,
48
+ generateTypographyCSS,
49
+ lightColorTokens,
50
+ motion,
51
+ shape,
52
+ state,
53
+ typographyScale
54
+ };
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @rmikit/design-tokens\n * Material Design 3 design system tokens\n */\n\nexport * from './colors'\nexport * from './typography'\nexport * from './elevation'\nexport * from './motion'\nexport * from './shape'\nexport * from './state'\n\nimport { lightColorTokens, darkColorTokens, generateColorCSS } from './colors'\nimport { typographyScale, generateTypographyCSS } from './typography'\nimport { generateElevationCSS } from './elevation'\nimport { generateMotionCSS } from './motion'\nimport { generateShapeCSS } from './shape'\nimport { generateStateCSS } from './state'\n\n/**\n * Generate complete CSS for all Material Design 3 tokens\n */\nexport function generateAllTokensCSS(): string {\n return [\n generateColorCSS(lightColorTokens),\n generateColorCSS(darkColorTokens, true),\n generateTypographyCSS(typographyScale),\n generateElevationCSS(),\n generateMotionCSS(),\n generateShapeCSS(),\n generateStateCSS()\n ].join('\\n')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,SAAS,uBAA+B;AAC7C,SAAO;AAAA,IACL,iBAAiB,gBAAgB;AAAA,IACjC,iBAAiB,iBAAiB,IAAI;AAAA,IACtC,sBAAsB,eAAe;AAAA,IACrC,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EACnB,EAAE,KAAK,IAAI;AACb;","names":[]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Material Design 3 Motion System
3
+ */
4
+ declare const motion: {
5
+ readonly duration: {
6
+ readonly short1: "50ms";
7
+ readonly short2: "100ms";
8
+ readonly short3: "150ms";
9
+ readonly short4: "200ms";
10
+ readonly medium1: "250ms";
11
+ readonly medium2: "300ms";
12
+ readonly medium3: "350ms";
13
+ readonly medium4: "400ms";
14
+ readonly long1: "450ms";
15
+ readonly long2: "500ms";
16
+ readonly long3: "550ms";
17
+ readonly long4: "600ms";
18
+ readonly extraLong1: "700ms";
19
+ readonly extraLong2: "800ms";
20
+ readonly extraLong3: "900ms";
21
+ readonly extraLong4: "1000ms";
22
+ };
23
+ readonly easing: {
24
+ readonly emphasized: "cubic-bezier(0.2, 0, 0, 1)";
25
+ readonly emphasizedDecelerate: "cubic-bezier(0.05, 0.7, 0.1, 1)";
26
+ readonly emphasizedAccelerate: "cubic-bezier(0.3, 0, 0.8, 0.15)";
27
+ readonly standard: "cubic-bezier(0.2, 0, 0, 1)";
28
+ readonly standardDecelerate: "cubic-bezier(0, 0, 0, 1)";
29
+ readonly standardAccelerate: "cubic-bezier(0.3, 0, 1, 1)";
30
+ readonly legacy: "cubic-bezier(0.4, 0, 0.2, 1)";
31
+ readonly legacyDecelerate: "cubic-bezier(0, 0, 0.2, 1)";
32
+ readonly legacyAccelerate: "cubic-bezier(0.4, 0, 1, 1)";
33
+ readonly linear: "cubic-bezier(0, 0, 1, 1)";
34
+ };
35
+ };
36
+ declare function generateMotionCSS(): string;
37
+
38
+ export { generateMotionCSS, motion };
package/dist/motion.js ADDED
@@ -0,0 +1,9 @@
1
+ import {
2
+ generateMotionCSS,
3
+ motion
4
+ } from "./chunk-IHSA74E4.js";
5
+ export {
6
+ generateMotionCSS,
7
+ motion
8
+ };
9
+ //# sourceMappingURL=motion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Material Design 3 Shape System
3
+ */
4
+ declare const shape: {
5
+ readonly none: "0px";
6
+ readonly extraSmall: "4px";
7
+ readonly small: "8px";
8
+ readonly medium: "12px";
9
+ readonly large: "16px";
10
+ readonly extraLarge: "28px";
11
+ readonly full: "9999px";
12
+ };
13
+ declare function generateShapeCSS(): string;
14
+
15
+ export { generateShapeCSS, shape };
package/dist/shape.js ADDED
@@ -0,0 +1,9 @@
1
+ import {
2
+ generateShapeCSS,
3
+ shape
4
+ } from "./chunk-HW7JGBVG.js";
5
+ export {
6
+ generateShapeCSS,
7
+ shape
8
+ };
9
+ //# sourceMappingURL=shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Material Design 3 State Layer System
3
+ */
4
+ declare const state: {
5
+ readonly hover: 0.08;
6
+ readonly focus: 0.12;
7
+ readonly pressed: 0.12;
8
+ readonly dragged: 0.16;
9
+ };
10
+ declare function generateStateCSS(): string;
11
+
12
+ export { generateStateCSS, state };
package/dist/state.js ADDED
@@ -0,0 +1,9 @@
1
+ import {
2
+ generateStateCSS,
3
+ state
4
+ } from "./chunk-5PV64REL.js";
5
+ export {
6
+ generateStateCSS,
7
+ state
8
+ };
9
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,230 @@
1
+ /* @rmikit/design-tokens — generated by scripts/build-css.mjs. Do not edit. */
2
+ :root {
3
+ --md-sys-color-primary: 0.515 0.177 286.75;
4
+ --md-sys-color-on-primary: 1 0 0;
5
+ --md-sys-color-primary-container: 0.933 0.066 292.71;
6
+ --md-sys-color-on-primary-container: 0.288 0.14 285.75;
7
+ --md-sys-color-secondary: 0.544 0.088 286.96;
8
+ --md-sys-color-on-secondary: 1 0 0;
9
+ --md-sys-color-secondary-container: 0.918 0.039 289.09;
10
+ --md-sys-color-on-secondary-container: 0.306 0.069 285.68;
11
+ --md-sys-color-tertiary: 0.609 0.163 14.28;
12
+ --md-sys-color-on-tertiary: 1 0 0;
13
+ --md-sys-color-tertiary-container: 0.957 0.056 16.41;
14
+ --md-sys-color-on-tertiary-container: 0.337 0.128 13.14;
15
+ --md-sys-color-error: 0.576 0.214 27.35;
16
+ --md-sys-color-on-error: 1 0 0;
17
+ --md-sys-color-error-container: 0.955 0.074 27.34;
18
+ --md-sys-color-on-error-container: 0.33 0.17 24.84;
19
+ --md-sys-color-surface: 0.987 0.004 286.38;
20
+ --md-sys-color-on-surface: 0.224 0.008 286.38;
21
+ --md-sys-color-surface-variant: 0.921 0.011 286.52;
22
+ --md-sys-color-on-surface-variant: 0.443 0.018 289.22;
23
+ --md-sys-color-surface-container-lowest: 1 0 0;
24
+ --md-sys-color-surface-container-low: 0.976 0.003 288.17;
25
+ --md-sys-color-surface-container: 0.965 0.004 286.76;
26
+ --md-sys-color-surface-container-high: 0.954 0.003 286.55;
27
+ --md-sys-color-surface-container-highest: 0.943 0.004 287.14;
28
+ --md-sys-color-background: 0.993 0.001 288.17;
29
+ --md-sys-color-on-background: 0.224 0.008 286.38;
30
+ --md-sys-color-outline: 0.591 0.014 287.98;
31
+ --md-sys-color-outline-variant: 0.792 0.01 288.67;
32
+ --md-sys-color-shadow: 0 0 0;
33
+ --md-sys-color-scrim: 0 0 0;
34
+ --md-sys-color-inverse-surface: 0.277 0.01 286.96;
35
+ --md-sys-color-inverse-on-surface: 0.926 0.004 286.76;
36
+ --md-sys-color-inverse-primary: 0.858 0.094 290.01;
37
+ }
38
+
39
+ @media (prefers-color-scheme: dark) {
40
+ :root:not([data-theme="light"]) {
41
+ --md-sys-color-primary: 0.858 0.094 290.01;
42
+ --md-sys-color-on-primary: 0.345 0.162 286.18;
43
+ --md-sys-color-primary-container: 0.419 0.169 286.57;
44
+ --md-sys-color-on-primary-container: 0.933 0.066 292.71;
45
+ --md-sys-color-secondary: 0.831 0.052 289.35;
46
+ --md-sys-color-on-secondary: 0.372 0.082 287.46;
47
+ --md-sys-color-secondary-container: 0.454 0.084 287.21;
48
+ --md-sys-color-on-secondary-container: 0.918 0.039 289.09;
49
+ --md-sys-color-tertiary: 0.891 0.084 15.26;
50
+ --md-sys-color-on-tertiary: 0.412 0.155 12.62;
51
+ --md-sys-color-tertiary-container: 0.506 0.158 13.68;
52
+ --md-sys-color-on-tertiary-container: 0.957 0.056 16.41;
53
+ --md-sys-color-error: 0.879 0.114 26.76;
54
+ --md-sys-color-on-error: 0.408 0.204 25.72;
55
+ --md-sys-color-error-container: 0.488 0.207 27.02;
56
+ --md-sys-color-on-error-container: 0.955 0.074 27.34;
57
+ --md-sys-color-surface: 0.171 0.008 286.96;
58
+ --md-sys-color-on-surface: 0.901 0.004 287.14;
59
+ --md-sys-color-surface-variant: 0.363 0.015 289.35;
60
+ --md-sys-color-on-surface-variant: 0.792 0.01 288.67;
61
+ --md-sys-color-surface-container-lowest: 0.13 0.009 283.58;
62
+ --md-sys-color-surface-container-low: 0.203 0.008 287.74;
63
+ --md-sys-color-surface-container: 0.224 0.009 286.96;
64
+ --md-sys-color-surface-container-high: 0.245 0.009 287.34;
65
+ --md-sys-color-surface-container-highest: 0.277 0.01 286.96;
66
+ --md-sys-color-background: 0.149 0.009 286.96;
67
+ --md-sys-color-on-background: 0.901 0.004 287.14;
68
+ --md-sys-color-outline: 0.545 0.013 287.98;
69
+ --md-sys-color-outline-variant: 0.363 0.015 289.35;
70
+ --md-sys-color-shadow: 0 0 0;
71
+ --md-sys-color-scrim: 0 0 0;
72
+ --md-sys-color-inverse-surface: 0.901 0.004 287.14;
73
+ --md-sys-color-inverse-on-surface: 0.277 0.01 286.96;
74
+ --md-sys-color-inverse-primary: 0.515 0.177 286.75;
75
+ }
76
+ }
77
+ :root[data-theme="dark"] {
78
+ --md-sys-color-primary: 0.858 0.094 290.01;
79
+ --md-sys-color-on-primary: 0.345 0.162 286.18;
80
+ --md-sys-color-primary-container: 0.419 0.169 286.57;
81
+ --md-sys-color-on-primary-container: 0.933 0.066 292.71;
82
+ --md-sys-color-secondary: 0.831 0.052 289.35;
83
+ --md-sys-color-on-secondary: 0.372 0.082 287.46;
84
+ --md-sys-color-secondary-container: 0.454 0.084 287.21;
85
+ --md-sys-color-on-secondary-container: 0.918 0.039 289.09;
86
+ --md-sys-color-tertiary: 0.891 0.084 15.26;
87
+ --md-sys-color-on-tertiary: 0.412 0.155 12.62;
88
+ --md-sys-color-tertiary-container: 0.506 0.158 13.68;
89
+ --md-sys-color-on-tertiary-container: 0.957 0.056 16.41;
90
+ --md-sys-color-error: 0.879 0.114 26.76;
91
+ --md-sys-color-on-error: 0.408 0.204 25.72;
92
+ --md-sys-color-error-container: 0.488 0.207 27.02;
93
+ --md-sys-color-on-error-container: 0.955 0.074 27.34;
94
+ --md-sys-color-surface: 0.171 0.008 286.96;
95
+ --md-sys-color-on-surface: 0.901 0.004 287.14;
96
+ --md-sys-color-surface-variant: 0.363 0.015 289.35;
97
+ --md-sys-color-on-surface-variant: 0.792 0.01 288.67;
98
+ --md-sys-color-surface-container-lowest: 0.13 0.009 283.58;
99
+ --md-sys-color-surface-container-low: 0.203 0.008 287.74;
100
+ --md-sys-color-surface-container: 0.224 0.009 286.96;
101
+ --md-sys-color-surface-container-high: 0.245 0.009 287.34;
102
+ --md-sys-color-surface-container-highest: 0.277 0.01 286.96;
103
+ --md-sys-color-background: 0.149 0.009 286.96;
104
+ --md-sys-color-on-background: 0.901 0.004 287.14;
105
+ --md-sys-color-outline: 0.545 0.013 287.98;
106
+ --md-sys-color-outline-variant: 0.363 0.015 289.35;
107
+ --md-sys-color-shadow: 0 0 0;
108
+ --md-sys-color-scrim: 0 0 0;
109
+ --md-sys-color-inverse-surface: 0.901 0.004 287.14;
110
+ --md-sys-color-inverse-on-surface: 0.277 0.01 286.96;
111
+ --md-sys-color-inverse-primary: 0.515 0.177 286.75;
112
+ }
113
+
114
+ :root {
115
+ /* Font families */
116
+ --md-sys-typescale-brand-font-family: "Roboto", system-ui, sans-serif;
117
+ --md-sys-typescale-plain-font-family: "Roboto", system-ui, sans-serif;
118
+
119
+ /* Typography scale */
120
+ --md-sys-typescale-display-large-font-size: 57px;
121
+ --md-sys-typescale-display-large-line-height: 64px;
122
+ --md-sys-typescale-display-large-font-weight: 400;
123
+ --md-sys-typescale-display-large-letter-spacing: -0.25px;
124
+ --md-sys-typescale-display-medium-font-size: 45px;
125
+ --md-sys-typescale-display-medium-line-height: 52px;
126
+ --md-sys-typescale-display-medium-font-weight: 400;
127
+ --md-sys-typescale-display-medium-letter-spacing: 0px;
128
+ --md-sys-typescale-display-small-font-size: 36px;
129
+ --md-sys-typescale-display-small-line-height: 44px;
130
+ --md-sys-typescale-display-small-font-weight: 400;
131
+ --md-sys-typescale-display-small-letter-spacing: 0px;
132
+ --md-sys-typescale-headline-large-font-size: 32px;
133
+ --md-sys-typescale-headline-large-line-height: 40px;
134
+ --md-sys-typescale-headline-large-font-weight: 400;
135
+ --md-sys-typescale-headline-large-letter-spacing: 0px;
136
+ --md-sys-typescale-headline-medium-font-size: 28px;
137
+ --md-sys-typescale-headline-medium-line-height: 36px;
138
+ --md-sys-typescale-headline-medium-font-weight: 400;
139
+ --md-sys-typescale-headline-medium-letter-spacing: 0px;
140
+ --md-sys-typescale-headline-small-font-size: 24px;
141
+ --md-sys-typescale-headline-small-line-height: 32px;
142
+ --md-sys-typescale-headline-small-font-weight: 400;
143
+ --md-sys-typescale-headline-small-letter-spacing: 0px;
144
+ --md-sys-typescale-title-large-font-size: 22px;
145
+ --md-sys-typescale-title-large-line-height: 28px;
146
+ --md-sys-typescale-title-large-font-weight: 400;
147
+ --md-sys-typescale-title-large-letter-spacing: 0px;
148
+ --md-sys-typescale-title-medium-font-size: 16px;
149
+ --md-sys-typescale-title-medium-line-height: 24px;
150
+ --md-sys-typescale-title-medium-font-weight: 500;
151
+ --md-sys-typescale-title-medium-letter-spacing: 0.15px;
152
+ --md-sys-typescale-title-small-font-size: 14px;
153
+ --md-sys-typescale-title-small-line-height: 20px;
154
+ --md-sys-typescale-title-small-font-weight: 500;
155
+ --md-sys-typescale-title-small-letter-spacing: 0.1px;
156
+ --md-sys-typescale-body-large-font-size: 16px;
157
+ --md-sys-typescale-body-large-line-height: 24px;
158
+ --md-sys-typescale-body-large-font-weight: 400;
159
+ --md-sys-typescale-body-large-letter-spacing: 0.5px;
160
+ --md-sys-typescale-body-medium-font-size: 14px;
161
+ --md-sys-typescale-body-medium-line-height: 20px;
162
+ --md-sys-typescale-body-medium-font-weight: 400;
163
+ --md-sys-typescale-body-medium-letter-spacing: 0.25px;
164
+ --md-sys-typescale-body-small-font-size: 12px;
165
+ --md-sys-typescale-body-small-line-height: 16px;
166
+ --md-sys-typescale-body-small-font-weight: 400;
167
+ --md-sys-typescale-body-small-letter-spacing: 0.4px;
168
+ --md-sys-typescale-label-large-font-size: 14px;
169
+ --md-sys-typescale-label-large-line-height: 20px;
170
+ --md-sys-typescale-label-large-font-weight: 500;
171
+ --md-sys-typescale-label-large-letter-spacing: 0.1px;
172
+ --md-sys-typescale-label-medium-font-size: 12px;
173
+ --md-sys-typescale-label-medium-line-height: 16px;
174
+ --md-sys-typescale-label-medium-font-weight: 500;
175
+ --md-sys-typescale-label-medium-letter-spacing: 0.5px;
176
+ --md-sys-typescale-label-small-font-size: 11px;
177
+ --md-sys-typescale-label-small-line-height: 16px;
178
+ --md-sys-typescale-label-small-font-weight: 500;
179
+ --md-sys-typescale-label-small-letter-spacing: 0.5px;
180
+ }
181
+
182
+ :root {
183
+ --md-sys-elevation-level0: none;
184
+ --md-sys-elevation-level1: 0px 1px 2px oklch(0 0 0 / 0.3), 0px 1px 3px 1px oklch(0 0 0 / 0.15);
185
+ --md-sys-elevation-level2: 0px 1px 2px oklch(0 0 0 / 0.3), 0px 2px 6px 2px oklch(0 0 0 / 0.15);
186
+ --md-sys-elevation-level3: 0px 4px 8px 3px oklch(0 0 0 / 0.15), 0px 1px 3px oklch(0 0 0 / 0.3);
187
+ --md-sys-elevation-level4: 0px 6px 10px 4px oklch(0 0 0 / 0.15), 0px 2px 3px oklch(0 0 0 / 0.3);
188
+ --md-sys-elevation-level5: 0px 8px 12px 6px oklch(0 0 0 / 0.15), 0px 4px 4px oklch(0 0 0 / 0.3);
189
+ }
190
+
191
+ :root {
192
+ /* Duration */
193
+ --md-sys-motion-duration-short1: 50ms;
194
+ --md-sys-motion-duration-short2: 100ms;
195
+ --md-sys-motion-duration-short3: 150ms;
196
+ --md-sys-motion-duration-short4: 200ms;
197
+ --md-sys-motion-duration-medium1: 250ms;
198
+ --md-sys-motion-duration-medium2: 300ms;
199
+ --md-sys-motion-duration-medium3: 350ms;
200
+ --md-sys-motion-duration-medium4: 400ms;
201
+ --md-sys-motion-duration-long1: 450ms;
202
+ --md-sys-motion-duration-long2: 500ms;
203
+ --md-sys-motion-duration-long3: 550ms;
204
+ --md-sys-motion-duration-long4: 600ms;
205
+
206
+ /* Easing */
207
+ --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
208
+ --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
209
+ --md-sys-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
210
+ --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
211
+ --md-sys-motion-easing-standard-decelerate: cubic-bezier(0, 0, 0, 1);
212
+ --md-sys-motion-easing-standard-accelerate: cubic-bezier(0.3, 0, 1, 1);
213
+ }
214
+
215
+ :root {
216
+ --md-sys-shape-corner-none: 0px;
217
+ --md-sys-shape-corner-extra-small: 4px;
218
+ --md-sys-shape-corner-small: 8px;
219
+ --md-sys-shape-corner-medium: 12px;
220
+ --md-sys-shape-corner-large: 16px;
221
+ --md-sys-shape-corner-extra-large: 28px;
222
+ --md-sys-shape-corner-full: 9999px;
223
+ }
224
+
225
+ :root {
226
+ --md-sys-state-hover-state-layer-opacity: 0.08;
227
+ --md-sys-state-focus-state-layer-opacity: 0.12;
228
+ --md-sys-state-pressed-state-layer-opacity: 0.12;
229
+ --md-sys-state-dragged-state-layer-opacity: 0.16;
230
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Material Design 3 Typography Tokens
3
+ */
4
+ interface TypographyTokens {
5
+ fontSize: string;
6
+ lineHeight: string;
7
+ fontWeight: string;
8
+ letterSpacing: string;
9
+ fontFamily: string;
10
+ }
11
+ interface TypographyScale {
12
+ displayLarge: TypographyTokens;
13
+ displayMedium: TypographyTokens;
14
+ displaySmall: TypographyTokens;
15
+ headlineLarge: TypographyTokens;
16
+ headlineMedium: TypographyTokens;
17
+ headlineSmall: TypographyTokens;
18
+ titleLarge: TypographyTokens;
19
+ titleMedium: TypographyTokens;
20
+ titleSmall: TypographyTokens;
21
+ bodyLarge: TypographyTokens;
22
+ bodyMedium: TypographyTokens;
23
+ bodySmall: TypographyTokens;
24
+ labelLarge: TypographyTokens;
25
+ labelMedium: TypographyTokens;
26
+ labelSmall: TypographyTokens;
27
+ }
28
+ /**
29
+ * Default Material Design 3 typography scale
30
+ */
31
+ declare const typographyScale: TypographyScale;
32
+ /**
33
+ * Generate CSS custom properties for typography tokens
34
+ */
35
+ declare function generateTypographyCSS(scale: TypographyScale): string;
36
+
37
+ export { generateTypographyCSS, typographyScale };
38
+ export type { TypographyScale, TypographyTokens };
@@ -0,0 +1,9 @@
1
+ import {
2
+ generateTypographyCSS,
3
+ typographyScale
4
+ } from "./chunk-SB3IH2SF.js";
5
+ export {
6
+ generateTypographyCSS,
7
+ typographyScale
8
+ };
9
+ //# sourceMappingURL=typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,81 @@
1
1
  {
2
2
  "name": "@rmikit/design-tokens",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Design tokens for RMIKit (colors, typography, elevation, motion, shape, state) based on Material Design 3 guidelines, as TypeScript values and CSS custom properties",
6
+ "license": "MIT",
7
+ "author": "Nitin Jaiswal",
8
+ "homepage": "https://github.com/RMIKit/rmikit#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/RMIKit/rmikit.git",
12
+ "directory": "packages/design-tokens"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/RMIKit/rmikit/issues"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "keywords": [
21
+ "design-tokens",
22
+ "material-design-3",
23
+ "oklch",
24
+ "css-variables",
25
+ "rmikit"
26
+ ],
27
+ "main": "./dist/index.js",
28
+ "module": "./dist/index.js",
29
+ "types": "./dist/index.d.ts",
30
+ "sideEffects": [
31
+ "*.css"
32
+ ],
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/index.d.ts",
36
+ "import": "./dist/index.js"
37
+ },
38
+ "./colors": {
39
+ "types": "./dist/colors.d.ts",
40
+ "import": "./dist/colors.js"
41
+ },
42
+ "./typography": {
43
+ "types": "./dist/typography.d.ts",
44
+ "import": "./dist/typography.js"
45
+ },
46
+ "./elevation": {
47
+ "types": "./dist/elevation.d.ts",
48
+ "import": "./dist/elevation.js"
49
+ },
50
+ "./motion": {
51
+ "types": "./dist/motion.d.ts",
52
+ "import": "./dist/motion.js"
53
+ },
54
+ "./shape": {
55
+ "types": "./dist/shape.d.ts",
56
+ "import": "./dist/shape.js"
57
+ },
58
+ "./state": {
59
+ "types": "./dist/state.d.ts",
60
+ "import": "./dist/state.js"
61
+ },
62
+ "./tokens.css": "./dist/tokens.css",
63
+ "./package.json": "./package.json"
64
+ },
65
+ "files": [
66
+ "dist",
67
+ "README.md",
68
+ "LICENSE"
69
+ ],
70
+ "devDependencies": {
71
+ "@rmikit/tsconfig": "0.0.0",
72
+ "tsup": "^9.0.0",
73
+ "typescript": "^6.0.3"
74
+ },
75
+ "scripts": {
76
+ "build": "tsup && node scripts/build-css.mjs",
77
+ "dev": "tsup --watch",
78
+ "clean": "rm -rf dist",
79
+ "type-check": "tsc --noEmit"
80
+ }
6
81
  }