@ohseungik/maru-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 +21 -0
- package/README.md +46 -2
- package/dist/index.d.ts +196 -0
- package/dist/index.js +196 -0
- package/dist/tokens.css +157 -0
- package/package.json +40 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ohseungik
|
|
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,47 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ohseungik/maru-tokens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Design tokens for [Maru UI](https://ohseungik.github.io/Maru-UI/): CSS variables with light and dark themes, plus the same values as typed JavaScript.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pnpm add @ohseungik/maru-tokens
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## CSS variables
|
|
10
|
+
|
|
11
|
+
Import the stylesheet once, in your app entry:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import '@ohseungik/maru-tokens/css';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Then use the variables anywhere:
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
body {
|
|
21
|
+
background: var(--maru-color-bg-default);
|
|
22
|
+
color: var(--maru-color-text-default);
|
|
23
|
+
font-family: var(--maru-font-family-sans);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The theme follows the operating system. Set `data-theme="light"` or `data-theme="dark"` on the root element to pin it.
|
|
28
|
+
|
|
29
|
+
## Typed values
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { tokens } from '@ohseungik/maru-tokens';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Contrast
|
|
36
|
+
|
|
37
|
+
Text and focus-ring colors are checked against WCAG 2.2 AA contrast ratios in both themes by the package tests.
|
|
38
|
+
|
|
39
|
+
## Related
|
|
40
|
+
|
|
41
|
+
- [`@ohseungik/maru-ui`](https://www.npmjs.com/package/@ohseungik/maru-ui): React components built on these tokens
|
|
42
|
+
- [Documentation and Storybook](https://ohseungik.github.io/Maru-UI/)
|
|
43
|
+
- [Source](https://github.com/ohseungik/Maru-UI/tree/main/packages/tokens)
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// Generated by scripts/build.mjs. Do not edit.
|
|
2
|
+
export declare const tokens: {
|
|
3
|
+
"palette": {
|
|
4
|
+
"gray": {
|
|
5
|
+
"0": "#ffffff",
|
|
6
|
+
"50": "#f8fafc",
|
|
7
|
+
"100": "#f1f5f9",
|
|
8
|
+
"200": "#e2e8f0",
|
|
9
|
+
"300": "#cbd5e1",
|
|
10
|
+
"400": "#94a3b8",
|
|
11
|
+
"500": "#64748b",
|
|
12
|
+
"600": "#475569",
|
|
13
|
+
"700": "#334155",
|
|
14
|
+
"800": "#1e293b",
|
|
15
|
+
"900": "#0f172a",
|
|
16
|
+
"950": "#020617"
|
|
17
|
+
},
|
|
18
|
+
"blue": {
|
|
19
|
+
"50": "#eff6ff",
|
|
20
|
+
"100": "#dbeafe",
|
|
21
|
+
"200": "#bfdbfe",
|
|
22
|
+
"300": "#93c5fd",
|
|
23
|
+
"400": "#60a5fa",
|
|
24
|
+
"500": "#3b82f6",
|
|
25
|
+
"600": "#2563eb",
|
|
26
|
+
"700": "#1d4ed8",
|
|
27
|
+
"800": "#1e40af",
|
|
28
|
+
"900": "#1e3a8a"
|
|
29
|
+
},
|
|
30
|
+
"red": {
|
|
31
|
+
"200": "#fecaca",
|
|
32
|
+
"300": "#fca5a5",
|
|
33
|
+
"400": "#f87171",
|
|
34
|
+
"600": "#dc2626",
|
|
35
|
+
"700": "#b91c1c",
|
|
36
|
+
"800": "#991b1b"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"scale": {
|
|
40
|
+
"space": {
|
|
41
|
+
"0": "0",
|
|
42
|
+
"1": "0.25rem",
|
|
43
|
+
"2": "0.5rem",
|
|
44
|
+
"3": "0.75rem",
|
|
45
|
+
"4": "1rem",
|
|
46
|
+
"5": "1.25rem",
|
|
47
|
+
"6": "1.5rem",
|
|
48
|
+
"8": "2rem",
|
|
49
|
+
"10": "2.5rem",
|
|
50
|
+
"12": "3rem"
|
|
51
|
+
},
|
|
52
|
+
"radius": {
|
|
53
|
+
"sm": "0.25rem",
|
|
54
|
+
"md": "0.5rem",
|
|
55
|
+
"lg": "0.75rem",
|
|
56
|
+
"full": "9999px"
|
|
57
|
+
},
|
|
58
|
+
"shadow": {
|
|
59
|
+
"lg": "0 10px 30px rgb(0 0 0 / 0.2)"
|
|
60
|
+
},
|
|
61
|
+
"font": {
|
|
62
|
+
"family": {
|
|
63
|
+
"sans": "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif",
|
|
64
|
+
"mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
65
|
+
},
|
|
66
|
+
"size": {
|
|
67
|
+
"xs": "0.75rem",
|
|
68
|
+
"sm": "0.875rem",
|
|
69
|
+
"md": "1rem",
|
|
70
|
+
"lg": "1.125rem",
|
|
71
|
+
"xl": "1.25rem",
|
|
72
|
+
"2xl": "1.5rem",
|
|
73
|
+
"3xl": "1.875rem",
|
|
74
|
+
"4xl": "2.25rem"
|
|
75
|
+
},
|
|
76
|
+
"weight": {
|
|
77
|
+
"regular": "400",
|
|
78
|
+
"medium": "500",
|
|
79
|
+
"semibold": "600",
|
|
80
|
+
"bold": "700"
|
|
81
|
+
},
|
|
82
|
+
"line-height": {
|
|
83
|
+
"tight": "1.25",
|
|
84
|
+
"normal": "1.5"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"motion": {
|
|
88
|
+
"duration": {
|
|
89
|
+
"fast": "120ms"
|
|
90
|
+
},
|
|
91
|
+
"easing": {
|
|
92
|
+
"standard": "cubic-bezier(0.2, 0, 0, 1)"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"semantic": {
|
|
97
|
+
"shared": {
|
|
98
|
+
"focus": {
|
|
99
|
+
"ring-width": "2px",
|
|
100
|
+
"ring-offset": "2px"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"light": {
|
|
104
|
+
"color": {
|
|
105
|
+
"bg": {
|
|
106
|
+
"default": "#ffffff",
|
|
107
|
+
"subtle": "#f8fafc",
|
|
108
|
+
"muted": "#f1f5f9"
|
|
109
|
+
},
|
|
110
|
+
"text": {
|
|
111
|
+
"default": "#0f172a",
|
|
112
|
+
"muted": "#475569",
|
|
113
|
+
"danger": "#b91c1c"
|
|
114
|
+
},
|
|
115
|
+
"border": {
|
|
116
|
+
"default": "#cbd5e1",
|
|
117
|
+
"strong": "#64748b"
|
|
118
|
+
},
|
|
119
|
+
"overlay": {
|
|
120
|
+
"bg": "rgb(15 23 42 / 0.5)"
|
|
121
|
+
},
|
|
122
|
+
"focus": {
|
|
123
|
+
"ring": "#2563eb"
|
|
124
|
+
},
|
|
125
|
+
"action": {
|
|
126
|
+
"bg": "#2563eb",
|
|
127
|
+
"bg-hover": "#1d4ed8",
|
|
128
|
+
"bg-active": "#1e40af",
|
|
129
|
+
"fg": "#ffffff",
|
|
130
|
+
"text": "#1d4ed8",
|
|
131
|
+
"ghost-bg-hover": "#eff6ff",
|
|
132
|
+
"ghost-bg-active": "#dbeafe"
|
|
133
|
+
},
|
|
134
|
+
"danger": {
|
|
135
|
+
"bg": "#dc2626",
|
|
136
|
+
"bg-hover": "#b91c1c",
|
|
137
|
+
"bg-active": "#991b1b",
|
|
138
|
+
"fg": "#ffffff"
|
|
139
|
+
},
|
|
140
|
+
"neutral": {
|
|
141
|
+
"bg": "#f1f5f9",
|
|
142
|
+
"bg-hover": "#e2e8f0",
|
|
143
|
+
"bg-active": "#cbd5e1",
|
|
144
|
+
"fg": "#0f172a"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"dark": {
|
|
149
|
+
"color": {
|
|
150
|
+
"bg": {
|
|
151
|
+
"default": "#0f172a",
|
|
152
|
+
"subtle": "#1e293b",
|
|
153
|
+
"muted": "#334155"
|
|
154
|
+
},
|
|
155
|
+
"text": {
|
|
156
|
+
"default": "#f8fafc",
|
|
157
|
+
"muted": "#cbd5e1",
|
|
158
|
+
"danger": "#f87171"
|
|
159
|
+
},
|
|
160
|
+
"border": {
|
|
161
|
+
"default": "#334155",
|
|
162
|
+
"strong": "#94a3b8"
|
|
163
|
+
},
|
|
164
|
+
"overlay": {
|
|
165
|
+
"bg": "rgb(0 0 0 / 0.7)"
|
|
166
|
+
},
|
|
167
|
+
"focus": {
|
|
168
|
+
"ring": "#93c5fd"
|
|
169
|
+
},
|
|
170
|
+
"action": {
|
|
171
|
+
"bg": "#60a5fa",
|
|
172
|
+
"bg-hover": "#93c5fd",
|
|
173
|
+
"bg-active": "#bfdbfe",
|
|
174
|
+
"fg": "#020617",
|
|
175
|
+
"text": "#93c5fd",
|
|
176
|
+
"ghost-bg-hover": "#1e3a8a",
|
|
177
|
+
"ghost-bg-active": "#1e40af"
|
|
178
|
+
},
|
|
179
|
+
"danger": {
|
|
180
|
+
"bg": "#f87171",
|
|
181
|
+
"bg-hover": "#fca5a5",
|
|
182
|
+
"bg-active": "#fecaca",
|
|
183
|
+
"fg": "#020617"
|
|
184
|
+
},
|
|
185
|
+
"neutral": {
|
|
186
|
+
"bg": "#334155",
|
|
187
|
+
"bg-hover": "#475569",
|
|
188
|
+
"bg-active": "#64748b",
|
|
189
|
+
"fg": "#f8fafc"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export declare const themes: readonly ['light', 'dark'];
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// Generated by scripts/build.mjs. Do not edit.
|
|
2
|
+
export const tokens = {
|
|
3
|
+
"palette": {
|
|
4
|
+
"gray": {
|
|
5
|
+
"0": "#ffffff",
|
|
6
|
+
"50": "#f8fafc",
|
|
7
|
+
"100": "#f1f5f9",
|
|
8
|
+
"200": "#e2e8f0",
|
|
9
|
+
"300": "#cbd5e1",
|
|
10
|
+
"400": "#94a3b8",
|
|
11
|
+
"500": "#64748b",
|
|
12
|
+
"600": "#475569",
|
|
13
|
+
"700": "#334155",
|
|
14
|
+
"800": "#1e293b",
|
|
15
|
+
"900": "#0f172a",
|
|
16
|
+
"950": "#020617"
|
|
17
|
+
},
|
|
18
|
+
"blue": {
|
|
19
|
+
"50": "#eff6ff",
|
|
20
|
+
"100": "#dbeafe",
|
|
21
|
+
"200": "#bfdbfe",
|
|
22
|
+
"300": "#93c5fd",
|
|
23
|
+
"400": "#60a5fa",
|
|
24
|
+
"500": "#3b82f6",
|
|
25
|
+
"600": "#2563eb",
|
|
26
|
+
"700": "#1d4ed8",
|
|
27
|
+
"800": "#1e40af",
|
|
28
|
+
"900": "#1e3a8a"
|
|
29
|
+
},
|
|
30
|
+
"red": {
|
|
31
|
+
"200": "#fecaca",
|
|
32
|
+
"300": "#fca5a5",
|
|
33
|
+
"400": "#f87171",
|
|
34
|
+
"600": "#dc2626",
|
|
35
|
+
"700": "#b91c1c",
|
|
36
|
+
"800": "#991b1b"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"scale": {
|
|
40
|
+
"space": {
|
|
41
|
+
"0": "0",
|
|
42
|
+
"1": "0.25rem",
|
|
43
|
+
"2": "0.5rem",
|
|
44
|
+
"3": "0.75rem",
|
|
45
|
+
"4": "1rem",
|
|
46
|
+
"5": "1.25rem",
|
|
47
|
+
"6": "1.5rem",
|
|
48
|
+
"8": "2rem",
|
|
49
|
+
"10": "2.5rem",
|
|
50
|
+
"12": "3rem"
|
|
51
|
+
},
|
|
52
|
+
"radius": {
|
|
53
|
+
"sm": "0.25rem",
|
|
54
|
+
"md": "0.5rem",
|
|
55
|
+
"lg": "0.75rem",
|
|
56
|
+
"full": "9999px"
|
|
57
|
+
},
|
|
58
|
+
"shadow": {
|
|
59
|
+
"lg": "0 10px 30px rgb(0 0 0 / 0.2)"
|
|
60
|
+
},
|
|
61
|
+
"font": {
|
|
62
|
+
"family": {
|
|
63
|
+
"sans": "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif",
|
|
64
|
+
"mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
65
|
+
},
|
|
66
|
+
"size": {
|
|
67
|
+
"xs": "0.75rem",
|
|
68
|
+
"sm": "0.875rem",
|
|
69
|
+
"md": "1rem",
|
|
70
|
+
"lg": "1.125rem",
|
|
71
|
+
"xl": "1.25rem",
|
|
72
|
+
"2xl": "1.5rem",
|
|
73
|
+
"3xl": "1.875rem",
|
|
74
|
+
"4xl": "2.25rem"
|
|
75
|
+
},
|
|
76
|
+
"weight": {
|
|
77
|
+
"regular": "400",
|
|
78
|
+
"medium": "500",
|
|
79
|
+
"semibold": "600",
|
|
80
|
+
"bold": "700"
|
|
81
|
+
},
|
|
82
|
+
"line-height": {
|
|
83
|
+
"tight": "1.25",
|
|
84
|
+
"normal": "1.5"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"motion": {
|
|
88
|
+
"duration": {
|
|
89
|
+
"fast": "120ms"
|
|
90
|
+
},
|
|
91
|
+
"easing": {
|
|
92
|
+
"standard": "cubic-bezier(0.2, 0, 0, 1)"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"semantic": {
|
|
97
|
+
"shared": {
|
|
98
|
+
"focus": {
|
|
99
|
+
"ring-width": "2px",
|
|
100
|
+
"ring-offset": "2px"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"light": {
|
|
104
|
+
"color": {
|
|
105
|
+
"bg": {
|
|
106
|
+
"default": "#ffffff",
|
|
107
|
+
"subtle": "#f8fafc",
|
|
108
|
+
"muted": "#f1f5f9"
|
|
109
|
+
},
|
|
110
|
+
"text": {
|
|
111
|
+
"default": "#0f172a",
|
|
112
|
+
"muted": "#475569",
|
|
113
|
+
"danger": "#b91c1c"
|
|
114
|
+
},
|
|
115
|
+
"border": {
|
|
116
|
+
"default": "#cbd5e1",
|
|
117
|
+
"strong": "#64748b"
|
|
118
|
+
},
|
|
119
|
+
"overlay": {
|
|
120
|
+
"bg": "rgb(15 23 42 / 0.5)"
|
|
121
|
+
},
|
|
122
|
+
"focus": {
|
|
123
|
+
"ring": "#2563eb"
|
|
124
|
+
},
|
|
125
|
+
"action": {
|
|
126
|
+
"bg": "#2563eb",
|
|
127
|
+
"bg-hover": "#1d4ed8",
|
|
128
|
+
"bg-active": "#1e40af",
|
|
129
|
+
"fg": "#ffffff",
|
|
130
|
+
"text": "#1d4ed8",
|
|
131
|
+
"ghost-bg-hover": "#eff6ff",
|
|
132
|
+
"ghost-bg-active": "#dbeafe"
|
|
133
|
+
},
|
|
134
|
+
"danger": {
|
|
135
|
+
"bg": "#dc2626",
|
|
136
|
+
"bg-hover": "#b91c1c",
|
|
137
|
+
"bg-active": "#991b1b",
|
|
138
|
+
"fg": "#ffffff"
|
|
139
|
+
},
|
|
140
|
+
"neutral": {
|
|
141
|
+
"bg": "#f1f5f9",
|
|
142
|
+
"bg-hover": "#e2e8f0",
|
|
143
|
+
"bg-active": "#cbd5e1",
|
|
144
|
+
"fg": "#0f172a"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"dark": {
|
|
149
|
+
"color": {
|
|
150
|
+
"bg": {
|
|
151
|
+
"default": "#0f172a",
|
|
152
|
+
"subtle": "#1e293b",
|
|
153
|
+
"muted": "#334155"
|
|
154
|
+
},
|
|
155
|
+
"text": {
|
|
156
|
+
"default": "#f8fafc",
|
|
157
|
+
"muted": "#cbd5e1",
|
|
158
|
+
"danger": "#f87171"
|
|
159
|
+
},
|
|
160
|
+
"border": {
|
|
161
|
+
"default": "#334155",
|
|
162
|
+
"strong": "#94a3b8"
|
|
163
|
+
},
|
|
164
|
+
"overlay": {
|
|
165
|
+
"bg": "rgb(0 0 0 / 0.7)"
|
|
166
|
+
},
|
|
167
|
+
"focus": {
|
|
168
|
+
"ring": "#93c5fd"
|
|
169
|
+
},
|
|
170
|
+
"action": {
|
|
171
|
+
"bg": "#60a5fa",
|
|
172
|
+
"bg-hover": "#93c5fd",
|
|
173
|
+
"bg-active": "#bfdbfe",
|
|
174
|
+
"fg": "#020617",
|
|
175
|
+
"text": "#93c5fd",
|
|
176
|
+
"ghost-bg-hover": "#1e3a8a",
|
|
177
|
+
"ghost-bg-active": "#1e40af"
|
|
178
|
+
},
|
|
179
|
+
"danger": {
|
|
180
|
+
"bg": "#f87171",
|
|
181
|
+
"bg-hover": "#fca5a5",
|
|
182
|
+
"bg-active": "#fecaca",
|
|
183
|
+
"fg": "#020617"
|
|
184
|
+
},
|
|
185
|
+
"neutral": {
|
|
186
|
+
"bg": "#334155",
|
|
187
|
+
"bg-hover": "#475569",
|
|
188
|
+
"bg-active": "#64748b",
|
|
189
|
+
"fg": "#f8fafc"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export const themes = ['light', 'dark'];
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* Generated by scripts/build.mjs from src/tokens.json. Do not edit. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--maru-palette-gray-0: #ffffff;
|
|
5
|
+
--maru-palette-gray-50: #f8fafc;
|
|
6
|
+
--maru-palette-gray-100: #f1f5f9;
|
|
7
|
+
--maru-palette-gray-200: #e2e8f0;
|
|
8
|
+
--maru-palette-gray-300: #cbd5e1;
|
|
9
|
+
--maru-palette-gray-400: #94a3b8;
|
|
10
|
+
--maru-palette-gray-500: #64748b;
|
|
11
|
+
--maru-palette-gray-600: #475569;
|
|
12
|
+
--maru-palette-gray-700: #334155;
|
|
13
|
+
--maru-palette-gray-800: #1e293b;
|
|
14
|
+
--maru-palette-gray-900: #0f172a;
|
|
15
|
+
--maru-palette-gray-950: #020617;
|
|
16
|
+
--maru-palette-blue-50: #eff6ff;
|
|
17
|
+
--maru-palette-blue-100: #dbeafe;
|
|
18
|
+
--maru-palette-blue-200: #bfdbfe;
|
|
19
|
+
--maru-palette-blue-300: #93c5fd;
|
|
20
|
+
--maru-palette-blue-400: #60a5fa;
|
|
21
|
+
--maru-palette-blue-500: #3b82f6;
|
|
22
|
+
--maru-palette-blue-600: #2563eb;
|
|
23
|
+
--maru-palette-blue-700: #1d4ed8;
|
|
24
|
+
--maru-palette-blue-800: #1e40af;
|
|
25
|
+
--maru-palette-blue-900: #1e3a8a;
|
|
26
|
+
--maru-palette-red-200: #fecaca;
|
|
27
|
+
--maru-palette-red-300: #fca5a5;
|
|
28
|
+
--maru-palette-red-400: #f87171;
|
|
29
|
+
--maru-palette-red-600: #dc2626;
|
|
30
|
+
--maru-palette-red-700: #b91c1c;
|
|
31
|
+
--maru-palette-red-800: #991b1b;
|
|
32
|
+
--maru-space-0: 0;
|
|
33
|
+
--maru-space-1: 0.25rem;
|
|
34
|
+
--maru-space-2: 0.5rem;
|
|
35
|
+
--maru-space-3: 0.75rem;
|
|
36
|
+
--maru-space-4: 1rem;
|
|
37
|
+
--maru-space-5: 1.25rem;
|
|
38
|
+
--maru-space-6: 1.5rem;
|
|
39
|
+
--maru-space-8: 2rem;
|
|
40
|
+
--maru-space-10: 2.5rem;
|
|
41
|
+
--maru-space-12: 3rem;
|
|
42
|
+
--maru-radius-sm: 0.25rem;
|
|
43
|
+
--maru-radius-md: 0.5rem;
|
|
44
|
+
--maru-radius-lg: 0.75rem;
|
|
45
|
+
--maru-radius-full: 9999px;
|
|
46
|
+
--maru-shadow-lg: 0 10px 30px rgb(0 0 0 / 0.2);
|
|
47
|
+
--maru-font-family-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
|
|
48
|
+
--maru-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
49
|
+
--maru-font-size-xs: 0.75rem;
|
|
50
|
+
--maru-font-size-sm: 0.875rem;
|
|
51
|
+
--maru-font-size-md: 1rem;
|
|
52
|
+
--maru-font-size-lg: 1.125rem;
|
|
53
|
+
--maru-font-size-xl: 1.25rem;
|
|
54
|
+
--maru-font-size-2xl: 1.5rem;
|
|
55
|
+
--maru-font-size-3xl: 1.875rem;
|
|
56
|
+
--maru-font-size-4xl: 2.25rem;
|
|
57
|
+
--maru-font-weight-regular: 400;
|
|
58
|
+
--maru-font-weight-medium: 500;
|
|
59
|
+
--maru-font-weight-semibold: 600;
|
|
60
|
+
--maru-font-weight-bold: 700;
|
|
61
|
+
--maru-font-line-height-tight: 1.25;
|
|
62
|
+
--maru-font-line-height-normal: 1.5;
|
|
63
|
+
--maru-motion-duration-fast: 120ms;
|
|
64
|
+
--maru-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
65
|
+
--maru-focus-ring-width: 2px;
|
|
66
|
+
--maru-focus-ring-offset: 2px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:root,
|
|
70
|
+
[data-theme='light'] {
|
|
71
|
+
color-scheme: light;
|
|
72
|
+
--maru-color-bg-default: var(--maru-palette-gray-0);
|
|
73
|
+
--maru-color-bg-subtle: var(--maru-palette-gray-50);
|
|
74
|
+
--maru-color-bg-muted: var(--maru-palette-gray-100);
|
|
75
|
+
--maru-color-text-default: var(--maru-palette-gray-900);
|
|
76
|
+
--maru-color-text-muted: var(--maru-palette-gray-600);
|
|
77
|
+
--maru-color-text-danger: var(--maru-palette-red-700);
|
|
78
|
+
--maru-color-border-default: var(--maru-palette-gray-300);
|
|
79
|
+
--maru-color-border-strong: var(--maru-palette-gray-500);
|
|
80
|
+
--maru-color-overlay-bg: rgb(15 23 42 / 0.5);
|
|
81
|
+
--maru-color-focus-ring: var(--maru-palette-blue-600);
|
|
82
|
+
--maru-color-action-bg: var(--maru-palette-blue-600);
|
|
83
|
+
--maru-color-action-bg-hover: var(--maru-palette-blue-700);
|
|
84
|
+
--maru-color-action-bg-active: var(--maru-palette-blue-800);
|
|
85
|
+
--maru-color-action-fg: var(--maru-palette-gray-0);
|
|
86
|
+
--maru-color-action-text: var(--maru-palette-blue-700);
|
|
87
|
+
--maru-color-action-ghost-bg-hover: var(--maru-palette-blue-50);
|
|
88
|
+
--maru-color-action-ghost-bg-active: var(--maru-palette-blue-100);
|
|
89
|
+
--maru-color-danger-bg: var(--maru-palette-red-600);
|
|
90
|
+
--maru-color-danger-bg-hover: var(--maru-palette-red-700);
|
|
91
|
+
--maru-color-danger-bg-active: var(--maru-palette-red-800);
|
|
92
|
+
--maru-color-danger-fg: var(--maru-palette-gray-0);
|
|
93
|
+
--maru-color-neutral-bg: var(--maru-palette-gray-100);
|
|
94
|
+
--maru-color-neutral-bg-hover: var(--maru-palette-gray-200);
|
|
95
|
+
--maru-color-neutral-bg-active: var(--maru-palette-gray-300);
|
|
96
|
+
--maru-color-neutral-fg: var(--maru-palette-gray-900);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-theme='dark'] {
|
|
100
|
+
color-scheme: dark;
|
|
101
|
+
--maru-color-bg-default: var(--maru-palette-gray-900);
|
|
102
|
+
--maru-color-bg-subtle: var(--maru-palette-gray-800);
|
|
103
|
+
--maru-color-bg-muted: var(--maru-palette-gray-700);
|
|
104
|
+
--maru-color-text-default: var(--maru-palette-gray-50);
|
|
105
|
+
--maru-color-text-muted: var(--maru-palette-gray-300);
|
|
106
|
+
--maru-color-text-danger: var(--maru-palette-red-400);
|
|
107
|
+
--maru-color-border-default: var(--maru-palette-gray-700);
|
|
108
|
+
--maru-color-border-strong: var(--maru-palette-gray-400);
|
|
109
|
+
--maru-color-overlay-bg: rgb(0 0 0 / 0.7);
|
|
110
|
+
--maru-color-focus-ring: var(--maru-palette-blue-300);
|
|
111
|
+
--maru-color-action-bg: var(--maru-palette-blue-400);
|
|
112
|
+
--maru-color-action-bg-hover: var(--maru-palette-blue-300);
|
|
113
|
+
--maru-color-action-bg-active: var(--maru-palette-blue-200);
|
|
114
|
+
--maru-color-action-fg: var(--maru-palette-gray-950);
|
|
115
|
+
--maru-color-action-text: var(--maru-palette-blue-300);
|
|
116
|
+
--maru-color-action-ghost-bg-hover: var(--maru-palette-blue-900);
|
|
117
|
+
--maru-color-action-ghost-bg-active: var(--maru-palette-blue-800);
|
|
118
|
+
--maru-color-danger-bg: var(--maru-palette-red-400);
|
|
119
|
+
--maru-color-danger-bg-hover: var(--maru-palette-red-300);
|
|
120
|
+
--maru-color-danger-bg-active: var(--maru-palette-red-200);
|
|
121
|
+
--maru-color-danger-fg: var(--maru-palette-gray-950);
|
|
122
|
+
--maru-color-neutral-bg: var(--maru-palette-gray-700);
|
|
123
|
+
--maru-color-neutral-bg-hover: var(--maru-palette-gray-600);
|
|
124
|
+
--maru-color-neutral-bg-active: var(--maru-palette-gray-500);
|
|
125
|
+
--maru-color-neutral-fg: var(--maru-palette-gray-50);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (prefers-color-scheme: dark) {
|
|
129
|
+
:root:not([data-theme='light']) {
|
|
130
|
+
color-scheme: dark;
|
|
131
|
+
--maru-color-bg-default: var(--maru-palette-gray-900);
|
|
132
|
+
--maru-color-bg-subtle: var(--maru-palette-gray-800);
|
|
133
|
+
--maru-color-bg-muted: var(--maru-palette-gray-700);
|
|
134
|
+
--maru-color-text-default: var(--maru-palette-gray-50);
|
|
135
|
+
--maru-color-text-muted: var(--maru-palette-gray-300);
|
|
136
|
+
--maru-color-text-danger: var(--maru-palette-red-400);
|
|
137
|
+
--maru-color-border-default: var(--maru-palette-gray-700);
|
|
138
|
+
--maru-color-border-strong: var(--maru-palette-gray-400);
|
|
139
|
+
--maru-color-overlay-bg: rgb(0 0 0 / 0.7);
|
|
140
|
+
--maru-color-focus-ring: var(--maru-palette-blue-300);
|
|
141
|
+
--maru-color-action-bg: var(--maru-palette-blue-400);
|
|
142
|
+
--maru-color-action-bg-hover: var(--maru-palette-blue-300);
|
|
143
|
+
--maru-color-action-bg-active: var(--maru-palette-blue-200);
|
|
144
|
+
--maru-color-action-fg: var(--maru-palette-gray-950);
|
|
145
|
+
--maru-color-action-text: var(--maru-palette-blue-300);
|
|
146
|
+
--maru-color-action-ghost-bg-hover: var(--maru-palette-blue-900);
|
|
147
|
+
--maru-color-action-ghost-bg-active: var(--maru-palette-blue-800);
|
|
148
|
+
--maru-color-danger-bg: var(--maru-palette-red-400);
|
|
149
|
+
--maru-color-danger-bg-hover: var(--maru-palette-red-300);
|
|
150
|
+
--maru-color-danger-bg-active: var(--maru-palette-red-200);
|
|
151
|
+
--maru-color-danger-fg: var(--maru-palette-gray-950);
|
|
152
|
+
--maru-color-neutral-bg: var(--maru-palette-gray-700);
|
|
153
|
+
--maru-color-neutral-bg-hover: var(--maru-palette-gray-600);
|
|
154
|
+
--maru-color-neutral-bg-active: var(--maru-palette-gray-500);
|
|
155
|
+
--maru-color-neutral-fg: var(--maru-palette-gray-50);
|
|
156
|
+
}
|
|
157
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohseungik/maru-tokens",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Design tokens for Maru UI: CSS variables (light/dark) and typed values.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"design-tokens",
|
|
9
|
+
"design-system",
|
|
10
|
+
"css-variables",
|
|
11
|
+
"dark-mode"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/ohseungik/Maru-UI.git",
|
|
16
|
+
"directory": "packages/tokens"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://ohseungik.github.io/Maru-UI/",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/ohseungik/Maru-UI/issues"
|
|
21
|
+
},
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"**/*.css"
|
|
24
|
+
],
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./css": "./dist/tokens.css",
|
|
34
|
+
"./package.json": "./package.json"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "node scripts/build.mjs",
|
|
41
|
+
"test": "node --test"
|
|
42
|
+
}
|
|
6
43
|
}
|