@bug-on/md3-tokens 1.0.0 → 3.0.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/.turbo/turbo-build.log +11 -4
- package/CHANGELOG.md +12 -0
- package/dist/colors.css +164 -0
- package/dist/shape.css +9 -0
- package/package.json +16 -6
- package/scripts/copy-css.js +35 -0
- package/src/css.d.ts +25 -0
- package/tsconfig.json +1 -0
- package/tsup.config.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @bug-on/md3-tokens@
|
|
2
|
+
> @bug-on/md3-tokens@3.0.0 build /home/runner/work/bug-on-md3-expressive/bug-on-md3-expressive/packages/tokens
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -12,11 +12,18 @@
|
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
13
|
[32mESM[39m [1mdist/index.mjs [22m[32m937.00 B[39m
|
|
14
14
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m2.15 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 17ms
|
|
16
16
|
[32mCJS[39m [1mdist/index.js [22m[32m2.00 KB[39m
|
|
17
17
|
[32mCJS[39m [1mdist/index.js.map [22m[32m2.30 KB[39m
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 17ms
|
|
19
|
+
Copying CSS assets to dist...
|
|
20
|
+
✅ Copied colors.css to dist/colors.css
|
|
21
|
+
✅ Copied shape.css to dist/shape.css
|
|
22
|
+
⚠️ index.css not found in src/, skipping
|
|
23
|
+
✅ Generated colors.css.d.ts
|
|
24
|
+
✅ Generated shape.css.d.ts
|
|
25
|
+
✅ Generated index.css.d.ts
|
|
19
26
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
27
|
+
[32mDTS[39m ⚡️ Build success in 878ms
|
|
21
28
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m3.11 KB[39m
|
|
22
29
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m3.11 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @bug-on/md3-tokens
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- e170496: Fix types tokens, tailwind, add menu component ver 1
|
|
8
|
+
|
|
9
|
+
## 2.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 039d035: Update docs, readme, optimize lints
|
|
14
|
+
|
|
3
15
|
## 1.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
package/dist/colors.css
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/* MD3 System Color Tokens — Light Theme (Baseline Scheme)
|
|
2
|
+
*
|
|
3
|
+
* Mapping: PaletteTokens → ColorLightTokens → CSS variable
|
|
4
|
+
* Reference: ColorLightTokens.kt, ColorDarkTokens.kt, PaletteTokens.kt
|
|
5
|
+
*/
|
|
6
|
+
:root {
|
|
7
|
+
/* ── Primary ─────────────────────────────────────────────────────────── */
|
|
8
|
+
--md-sys-color-primary: #6750a4; /* Primary40 */
|
|
9
|
+
--md-sys-color-on-primary: #ffffff; /* Primary100 */
|
|
10
|
+
--md-sys-color-primary-container: #eaddff; /* Primary90 */
|
|
11
|
+
--md-sys-color-on-primary-container: #21005d; /* Primary10 */
|
|
12
|
+
--md-sys-color-inverse-primary: #d0bcff; /* Primary80 */
|
|
13
|
+
|
|
14
|
+
/* ── Primary Fixed (stable across light/dark) ────────────────────────── */
|
|
15
|
+
--md-sys-color-primary-fixed: #eaddff; /* Primary90 */
|
|
16
|
+
--md-sys-color-primary-fixed-dim: #d0bcff; /* Primary80 */
|
|
17
|
+
--md-sys-color-on-primary-fixed: #21005d; /* Primary10 */
|
|
18
|
+
--md-sys-color-on-primary-fixed-variant: #4f378b; /* Primary30 */
|
|
19
|
+
|
|
20
|
+
/* ── Secondary ───────────────────────────────────────────────────────── */
|
|
21
|
+
--md-sys-color-secondary: #625b71; /* Secondary40 */
|
|
22
|
+
--md-sys-color-on-secondary: #ffffff; /* Secondary100 */
|
|
23
|
+
--md-sys-color-secondary-container: #e8def8; /* Secondary90 */
|
|
24
|
+
--md-sys-color-on-secondary-container: #1d192b; /* Secondary10 */
|
|
25
|
+
|
|
26
|
+
/* ── Secondary Fixed (stable across light/dark) ──────────────────────── */
|
|
27
|
+
--md-sys-color-secondary-fixed: #e8def8; /* Secondary90 */
|
|
28
|
+
--md-sys-color-secondary-fixed-dim: #ccc2dc; /* Secondary80 */
|
|
29
|
+
--md-sys-color-on-secondary-fixed: #1d192b; /* Secondary10 */
|
|
30
|
+
--md-sys-color-on-secondary-fixed-variant: #4a4458; /* Secondary30 */
|
|
31
|
+
|
|
32
|
+
/* ── Tertiary ────────────────────────────────────────────────────────── */
|
|
33
|
+
--md-sys-color-tertiary: #7d5260; /* Tertiary40 */
|
|
34
|
+
--md-sys-color-on-tertiary: #ffffff; /* Tertiary100 */
|
|
35
|
+
--md-sys-color-tertiary-container: #ffd8e4; /* Tertiary90 */
|
|
36
|
+
--md-sys-color-on-tertiary-container: #31111d; /* Tertiary10 */
|
|
37
|
+
|
|
38
|
+
/* ── Tertiary Fixed (stable across light/dark) ───────────────────────── */
|
|
39
|
+
--md-sys-color-tertiary-fixed: #ffd8e4; /* Tertiary90 */
|
|
40
|
+
--md-sys-color-tertiary-fixed-dim: #efb8c8; /* Tertiary80 */
|
|
41
|
+
--md-sys-color-on-tertiary-fixed: #31111d; /* Tertiary10 */
|
|
42
|
+
--md-sys-color-on-tertiary-fixed-variant: #633b48; /* Tertiary30 */
|
|
43
|
+
|
|
44
|
+
/* ── Error ───────────────────────────────────────────────────────────── */
|
|
45
|
+
--md-sys-color-error: #b3261e; /* Error40 */
|
|
46
|
+
--md-sys-color-on-error: #ffffff; /* Error100 */
|
|
47
|
+
--md-sys-color-error-container: #f9dedc; /* Error90 */
|
|
48
|
+
--md-sys-color-on-error-container: #410e0b; /* Error10 */
|
|
49
|
+
|
|
50
|
+
/* ── Surface ─────────────────────────────────────────────────────────── */
|
|
51
|
+
--md-sys-color-surface: #fef7ff; /* Neutral98 */
|
|
52
|
+
--md-sys-color-on-surface: #1c1b1f; /* Neutral10 */
|
|
53
|
+
--md-sys-color-surface-variant: #e7e0eb; /* NeutralVariant90 */
|
|
54
|
+
--md-sys-color-on-surface-variant: #49454f; /* NeutralVariant30 */
|
|
55
|
+
--md-sys-color-surface-dim: #ded8e1; /* Neutral87 */
|
|
56
|
+
--md-sys-color-surface-bright: #fef7ff; /* Neutral98 */
|
|
57
|
+
--md-sys-color-surface-tint: #6750a4; /* = primary */
|
|
58
|
+
--md-sys-color-surface-container-lowest: #ffffff; /* Neutral100 */
|
|
59
|
+
--md-sys-color-surface-container-low: #f7f2fa; /* Neutral96 */
|
|
60
|
+
--md-sys-color-surface-container: #f3edf7; /* Neutral94 */
|
|
61
|
+
--md-sys-color-surface-container-high: #ece6f0; /* Neutral92 */
|
|
62
|
+
--md-sys-color-surface-container-highest: #e6e0e9; /* Neutral90 */
|
|
63
|
+
|
|
64
|
+
/* ── Inverse Surface ─────────────────────────────────────────────────── */
|
|
65
|
+
--md-sys-color-inverse-surface: #313033; /* Neutral20 */
|
|
66
|
+
--md-sys-color-inverse-on-surface: #f4eff4; /* Neutral95 */
|
|
67
|
+
|
|
68
|
+
/* ── Background ──────────────────────────────────────────────────────── */
|
|
69
|
+
--md-sys-color-background: #fef7ff; /* Neutral98 — same as surface */
|
|
70
|
+
--md-sys-color-on-background: #1c1b1f; /* Neutral10 */
|
|
71
|
+
|
|
72
|
+
/* ── Outline ─────────────────────────────────────────────────────────── */
|
|
73
|
+
--md-sys-color-outline: #79747e; /* NeutralVariant50 */
|
|
74
|
+
--md-sys-color-outline-variant: #cac4d0; /* NeutralVariant80 */
|
|
75
|
+
|
|
76
|
+
/* ── Utility ─────────────────────────────────────────────────────────── */
|
|
77
|
+
--md-sys-color-scrim: #000000; /* Neutral0 */
|
|
78
|
+
--md-sys-color-shadow: #000000; /* Neutral0 */
|
|
79
|
+
|
|
80
|
+
/* ── Indicator tokens — Loading & Progress ───────────────────────────── */
|
|
81
|
+
--md-sys-color-indicator-active: var(--md-sys-color-primary);
|
|
82
|
+
--md-sys-color-indicator-container: var(--md-sys-color-secondary-container);
|
|
83
|
+
--md-sys-color-indicator-contained-active: var(
|
|
84
|
+
--md-sys-color-on-primary-container
|
|
85
|
+
);
|
|
86
|
+
--md-sys-color-indicator-contained-container: var(
|
|
87
|
+
--md-sys-color-primary-container
|
|
88
|
+
);
|
|
89
|
+
--md-sys-color-indicator-track: var(--md-sys-color-surface-variant);
|
|
90
|
+
--md-sys-color-indicator-stop: var(--md-sys-color-primary);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Dark Theme overrides
|
|
94
|
+
* Mapping: PaletteTokens → ColorDarkTokens → CSS variable
|
|
95
|
+
*/
|
|
96
|
+
[data-theme="dark"],
|
|
97
|
+
.dark {
|
|
98
|
+
/* ── Primary ─────────────────────────────────────────────────────────── */
|
|
99
|
+
--md-sys-color-primary: #d0bcff; /* Primary80 */
|
|
100
|
+
--md-sys-color-on-primary: #381e72; /* Primary20 */
|
|
101
|
+
--md-sys-color-primary-container: #4f378b; /* Primary30 */
|
|
102
|
+
--md-sys-color-on-primary-container: #eaddff; /* Primary90 */
|
|
103
|
+
--md-sys-color-inverse-primary: #6750a4; /* Primary40 */
|
|
104
|
+
|
|
105
|
+
/* ── Secondary ───────────────────────────────────────────────────────── */
|
|
106
|
+
--md-sys-color-secondary: #ccc2dc; /* Secondary80 */
|
|
107
|
+
--md-sys-color-on-secondary: #332d41; /* Secondary20 */
|
|
108
|
+
--md-sys-color-secondary-container: #4a4458; /* Secondary30 */
|
|
109
|
+
--md-sys-color-on-secondary-container: #e8def8; /* Secondary90 */
|
|
110
|
+
|
|
111
|
+
/* ── Tertiary ────────────────────────────────────────────────────────── */
|
|
112
|
+
--md-sys-color-tertiary: #efb8c8; /* Tertiary80 */
|
|
113
|
+
--md-sys-color-on-tertiary: #492532; /* Tertiary20 */
|
|
114
|
+
--md-sys-color-tertiary-container: #633b48; /* Tertiary30 */
|
|
115
|
+
--md-sys-color-on-tertiary-container: #ffd8e4; /* Tertiary90 */
|
|
116
|
+
|
|
117
|
+
/* ── Error ───────────────────────────────────────────────────────────── */
|
|
118
|
+
--md-sys-color-error: #f2b8b5; /* Error80 */
|
|
119
|
+
--md-sys-color-on-error: #601410; /* Error20 */
|
|
120
|
+
--md-sys-color-error-container: #8c1d18; /* Error30 */
|
|
121
|
+
--md-sys-color-on-error-container: #f9dedc; /* Error90 */
|
|
122
|
+
|
|
123
|
+
/* ── Surface ─────────────────────────────────────────────────────────── */
|
|
124
|
+
--md-sys-color-surface: #141218; /* Neutral6 */
|
|
125
|
+
--md-sys-color-on-surface: #e6e1e5; /* Neutral90 */
|
|
126
|
+
--md-sys-color-surface-variant: #49454f; /* NeutralVariant30 */
|
|
127
|
+
--md-sys-color-on-surface-variant: #cac4d0; /* NeutralVariant80 */
|
|
128
|
+
--md-sys-color-surface-dim: #141218; /* Neutral6 */
|
|
129
|
+
--md-sys-color-surface-bright: #3b383e; /* Neutral24 */
|
|
130
|
+
--md-sys-color-surface-tint: #d0bcff; /* = primary (dark) */
|
|
131
|
+
--md-sys-color-surface-container-lowest: #0f0d13; /* Neutral4 */
|
|
132
|
+
--md-sys-color-surface-container-low: #1d1b20; /* Neutral10 */
|
|
133
|
+
--md-sys-color-surface-container: #211f26; /* Neutral12 */
|
|
134
|
+
--md-sys-color-surface-container-high: #2b2930; /* Neutral17 */
|
|
135
|
+
--md-sys-color-surface-container-highest: #36343b; /* Neutral22 */
|
|
136
|
+
|
|
137
|
+
/* ── Inverse Surface ─────────────────────────────────────────────────── */
|
|
138
|
+
--md-sys-color-inverse-surface: #e6e1e5; /* Neutral90 */
|
|
139
|
+
--md-sys-color-inverse-on-surface: #313033; /* Neutral20 */
|
|
140
|
+
|
|
141
|
+
/* ── Background ──────────────────────────────────────────────────────── */
|
|
142
|
+
--md-sys-color-background: #141218; /* Neutral6 — same as dark surface */
|
|
143
|
+
--md-sys-color-on-background: #e6e1e5; /* Neutral90 */
|
|
144
|
+
|
|
145
|
+
/* ── Outline ─────────────────────────────────────────────────────────── */
|
|
146
|
+
--md-sys-color-outline: #938f99; /* NeutralVariant60 */
|
|
147
|
+
--md-sys-color-outline-variant: #49454f; /* NeutralVariant30 */
|
|
148
|
+
|
|
149
|
+
/* ── Utility ─────────────────────────────────────────────────────────── */
|
|
150
|
+
--md-sys-color-scrim: #000000;
|
|
151
|
+
--md-sys-color-shadow: #000000;
|
|
152
|
+
|
|
153
|
+
/* ── Indicator tokens — Dark ─────────────────────────────────────────── */
|
|
154
|
+
--md-sys-color-indicator-active: var(--md-sys-color-primary);
|
|
155
|
+
--md-sys-color-indicator-container: var(--md-sys-color-secondary-container);
|
|
156
|
+
--md-sys-color-indicator-contained-active: var(
|
|
157
|
+
--md-sys-color-on-primary-container
|
|
158
|
+
);
|
|
159
|
+
--md-sys-color-indicator-contained-container: var(
|
|
160
|
+
--md-sys-color-primary-container
|
|
161
|
+
);
|
|
162
|
+
--md-sys-color-indicator-track: var(--md-sys-color-surface-variant);
|
|
163
|
+
--md-sys-color-indicator-stop: var(--md-sys-color-primary);
|
|
164
|
+
}
|
package/dist/shape.css
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--md-sys-shape-corner-none: 0px;
|
|
3
|
+
--md-sys-shape-corner-extra-small: 4px;
|
|
4
|
+
--md-sys-shape-corner-small: 8px;
|
|
5
|
+
--md-sys-shape-corner-medium: 12px;
|
|
6
|
+
--md-sys-shape-corner-large: 16px;
|
|
7
|
+
--md-sys-shape-corner-extra-large: 28px;
|
|
8
|
+
--md-sys-shape-corner-full: 9999px;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bug-on/md3-tokens",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Material Design 3 Expressive design tokens",
|
|
5
5
|
"author": "Bug Ổn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,11 +27,21 @@
|
|
|
27
27
|
"import": "./dist/index.mjs",
|
|
28
28
|
"require": "./dist/index.js"
|
|
29
29
|
},
|
|
30
|
-
"./colors.css":
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"./
|
|
30
|
+
"./colors.css": {
|
|
31
|
+
"types": "./dist/colors.css.d.ts",
|
|
32
|
+
"default": "./dist/colors.css"
|
|
33
|
+
},
|
|
34
|
+
"./shape.css": {
|
|
35
|
+
"types": "./dist/shape.css.d.ts",
|
|
36
|
+
"default": "./dist/shape.css"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "^19.0.0",
|
|
41
|
+
"react-dom": "^19.0.0"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
35
45
|
},
|
|
36
46
|
"devDependencies": {
|
|
37
47
|
"tsup": "^8.4.0",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const fs = require("node:fs");
|
|
2
|
+
const path = require("node:path");
|
|
3
|
+
|
|
4
|
+
const srcDir = path.join(__dirname, "../src");
|
|
5
|
+
const distDir = path.join(__dirname, "../dist");
|
|
6
|
+
|
|
7
|
+
// Ensure dist exists
|
|
8
|
+
if (!fs.existsSync(distDir)) {
|
|
9
|
+
fs.mkdirSync(distDir, { recursive: true });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
console.log("Copying CSS assets to dist...");
|
|
13
|
+
|
|
14
|
+
// CSS files to copy from src/ to dist/ (only files that exist in src/)
|
|
15
|
+
const cssFiles = ["colors.css", "shape.css", "index.css"];
|
|
16
|
+
|
|
17
|
+
for (const file of cssFiles) {
|
|
18
|
+
const srcPath = path.join(srcDir, file);
|
|
19
|
+
const distPath = path.join(distDir, file);
|
|
20
|
+
if (fs.existsSync(srcPath)) {
|
|
21
|
+
fs.copyFileSync(srcPath, distPath);
|
|
22
|
+
console.log(`✅ Copied ${file} to dist/${file}`);
|
|
23
|
+
} else {
|
|
24
|
+
console.warn(`⚠️ ${file} not found in src/, skipping`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Generate .d.ts stubs for each CSS sub-path export that will be in dist/
|
|
29
|
+
const cssStubs = cssFiles.map((f) => `${f}.d.ts`);
|
|
30
|
+
|
|
31
|
+
for (const stub of cssStubs) {
|
|
32
|
+
const distPath = path.join(distDir, stub);
|
|
33
|
+
fs.writeFileSync(distPath, "// CSS module — no runtime types\nexport {};\n");
|
|
34
|
+
console.log(`✅ Generated ${stub}`);
|
|
35
|
+
}
|
package/src/css.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// CSS module type declarations for @bug-on/md3-tokens sub-path imports
|
|
2
|
+
declare module "@bug-on/md3-tokens/colors.css" {
|
|
3
|
+
const styles: string;
|
|
4
|
+
export default styles;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare module "@bug-on/md3-tokens/elevation.css" {
|
|
8
|
+
const styles: string;
|
|
9
|
+
export default styles;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module "@bug-on/md3-tokens/shape.css" {
|
|
13
|
+
const styles: string;
|
|
14
|
+
export default styles;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare module "@bug-on/md3-tokens/typography.css" {
|
|
18
|
+
const styles: string;
|
|
19
|
+
export default styles;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module "@bug-on/md3-tokens/index.css" {
|
|
23
|
+
const styles: string;
|
|
24
|
+
export default styles;
|
|
25
|
+
}
|
package/tsconfig.json
CHANGED