@astryxdesign/theme-matcha 0.7.3 → 0.7.4-canary.31e54e4
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/README.md +27 -5
- package/dist/matcha.d.ts +2 -2
- package/dist/matcha.js +71 -71
- package/dist/matchaColorMapping.test.d.ts +2 -0
- package/dist/matchaColorMapping.test.d.ts.map +1 -0
- package/dist/matchaPaletteRefs.generated.d.ts +130 -0
- package/dist/matchaPaletteRefs.generated.d.ts.map +1 -0
- package/dist/matchaPalettes.d.ts +497 -0
- package/dist/matchaPalettes.d.ts.map +1 -0
- package/dist/matchaPalettes.generated.d.ts +496 -0
- package/dist/matchaPalettes.generated.d.ts.map +1 -0
- package/dist/matchaPalettes.test.d.ts +2 -0
- package/dist/matchaPalettes.test.d.ts.map +1 -0
- package/dist/matchaTheme.d.ts.map +1 -1
- package/dist/matchaTheme.test.d.ts +2 -0
- package/dist/matchaTheme.test.d.ts.map +1 -0
- package/dist/source.js +204 -103
- package/dist/source.mjs +204 -103
- package/dist/theme.css +71 -71
- package/dist/theme.css.d.ts +2 -2
- package/package.json +6 -5
- package/palette.config.json +448 -0
- package/src/matchaColorMapping.test.ts +48 -0
- package/src/matchaPaletteRefs.generated.ts +51 -0
- package/src/matchaPalettes.generated.receipt.json +1502 -0
- package/src/matchaPalettes.generated.ts +501 -0
- package/src/matchaPalettes.test.ts +50 -0
- package/src/matchaPalettes.ts +21 -0
- package/src/matchaTheme.test.ts +77 -0
- package/src/matchaTheme.ts +164 -103
package/src/matchaTheme.ts
CHANGED
|
@@ -4,33 +4,38 @@
|
|
|
4
4
|
* Matcha Theme
|
|
5
5
|
*
|
|
6
6
|
* An earthy green theme inspired by matcha tea and natural botanicals.
|
|
7
|
-
* Core palette: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF
|
|
8
7
|
* Uses Playwrite US Trad for headings and DM Sans for body text.
|
|
9
8
|
*/
|
|
10
9
|
|
|
11
10
|
import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
|
|
12
11
|
import {matchaIconRegistry} from './icons';
|
|
12
|
+
import {matchaPaletteRefs} from './matchaPaletteRefs.generated';
|
|
13
|
+
|
|
14
|
+
const {blue, cyan, green, neutral, orange, pink, purple, red, teal, yellow} =
|
|
15
|
+
matchaPaletteRefs;
|
|
16
|
+
|
|
17
|
+
const withAlpha = (color: string, alpha: string): string => `${color}${alpha}`;
|
|
13
18
|
|
|
14
19
|
/** Matcha syntax palette — earthy greens and warm tones. */
|
|
15
20
|
const matchaSyntax = defineSyntaxTheme({
|
|
16
21
|
name: 'astryx-matcha',
|
|
17
22
|
tokens: {
|
|
18
|
-
keyword: [
|
|
19
|
-
string: [
|
|
20
|
-
comment: [
|
|
21
|
-
number: [
|
|
22
|
-
function: [
|
|
23
|
-
type: [
|
|
24
|
-
variable: [
|
|
25
|
-
operator: [
|
|
26
|
-
constant: [
|
|
27
|
-
tag: [
|
|
28
|
-
attribute: [
|
|
29
|
-
property: [
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
punctuation: [
|
|
33
|
-
background: [
|
|
23
|
+
keyword: [neutral.light[30], neutral.dark[70]],
|
|
24
|
+
string: [teal.light[50], teal.dark[75]],
|
|
25
|
+
comment: [neutral.light[40], neutral.dark[40]],
|
|
26
|
+
number: [yellow.light[45], yellow.dark[75]],
|
|
27
|
+
function: [blue.light[50], blue.dark[70]],
|
|
28
|
+
type: [purple.light[50], purple.dark[70]],
|
|
29
|
+
variable: [neutral.light[20], neutral.dark[75]],
|
|
30
|
+
operator: [neutral.light[40], neutral.dark[60]],
|
|
31
|
+
constant: [yellow.light[45], yellow.dark[75]],
|
|
32
|
+
tag: [pink.light[30], pink.dark[65]],
|
|
33
|
+
attribute: [orange.light[30], yellow.dark[70]],
|
|
34
|
+
property: [teal.light[55], teal.dark[75]],
|
|
35
|
+
// Punctuation uses dedicated neutral stops that maintain WCAG AA against
|
|
36
|
+
// the syntax background in both modes (issue 5386).
|
|
37
|
+
punctuation: [neutral.light[30], neutral.dark[65]],
|
|
38
|
+
background: [neutral.light[95], neutral.dark[10]],
|
|
34
39
|
},
|
|
35
40
|
});
|
|
36
41
|
|
|
@@ -62,120 +67,176 @@ export const matchaTheme = defineTheme({
|
|
|
62
67
|
tokens: {
|
|
63
68
|
// =========================================================================
|
|
64
69
|
// Colors — earthy matcha palette
|
|
65
|
-
// Core: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF
|
|
66
70
|
// =========================================================================
|
|
67
71
|
|
|
68
72
|
// Core semantic
|
|
69
|
-
'--color-accent': [
|
|
70
|
-
'--color-accent-muted': [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
'--color-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
'--color-accent': [neutral.light[20], neutral.dark[75]],
|
|
74
|
+
'--color-accent-muted': [
|
|
75
|
+
withAlpha(neutral.light[20], '14'),
|
|
76
|
+
withAlpha(neutral.dark[75], '20'),
|
|
77
|
+
],
|
|
78
|
+
'--color-neutral': [
|
|
79
|
+
withAlpha(neutral.light[20], '0f'),
|
|
80
|
+
withAlpha(neutral.dark[75], '1a'),
|
|
81
|
+
],
|
|
82
|
+
'--color-background-surface': [neutral.light[100], neutral.dark[10]],
|
|
83
|
+
'--color-background-body': [neutral.light[95], neutral.dark[5]],
|
|
84
|
+
'--color-overlay': [
|
|
85
|
+
withAlpha(neutral.light[20], '80'),
|
|
86
|
+
withAlpha(neutral.dark[20], 'cc'),
|
|
87
|
+
],
|
|
88
|
+
'--color-overlay-hover': [
|
|
89
|
+
withAlpha(neutral.light[20], '0d'),
|
|
90
|
+
withAlpha(neutral.dark[75], '0d'),
|
|
91
|
+
],
|
|
92
|
+
'--color-overlay-pressed': [
|
|
93
|
+
withAlpha(neutral.light[20], '1a'),
|
|
94
|
+
withAlpha(neutral.dark[75], '1a'),
|
|
95
|
+
],
|
|
96
|
+
'--color-background-muted': [neutral.light[95], neutral.dark[20]],
|
|
78
97
|
|
|
79
98
|
// Text
|
|
80
|
-
'--color-text-primary': [
|
|
81
|
-
'--color-text-secondary': [
|
|
82
|
-
'--color-text-disabled': [
|
|
83
|
-
'--color-text-accent': [
|
|
84
|
-
'--color-on-dark':
|
|
85
|
-
'--color-on-light':
|
|
86
|
-
'--color-on-accent': [
|
|
87
|
-
'--color-on-success': [
|
|
88
|
-
'--color-on-error': [
|
|
89
|
-
'--color-on-warning': [
|
|
99
|
+
'--color-text-primary': [neutral.light[20], neutral.dark[75]],
|
|
100
|
+
'--color-text-secondary': [neutral.light[40], neutral.dark[60]],
|
|
101
|
+
'--color-text-disabled': [neutral.light[75], neutral.dark[30]],
|
|
102
|
+
'--color-text-accent': [neutral.light[20], neutral.dark[75]],
|
|
103
|
+
'--color-on-dark': neutral.light[100],
|
|
104
|
+
'--color-on-light': neutral.light[20],
|
|
105
|
+
'--color-on-accent': [neutral.light[100], neutral.dark[20]],
|
|
106
|
+
'--color-on-success': [neutral.light[100], neutral.dark[20]],
|
|
107
|
+
'--color-on-error': [neutral.light[100], neutral.dark[20]],
|
|
108
|
+
'--color-on-warning': [neutral.light[20], neutral.dark[20]],
|
|
90
109
|
|
|
91
110
|
// Icon
|
|
92
|
-
'--color-icon-accent': [
|
|
93
|
-
'--color-icon-primary': [
|
|
94
|
-
'--color-icon-secondary': [
|
|
95
|
-
'--color-icon-disabled': [
|
|
111
|
+
'--color-icon-accent': [neutral.light[20], neutral.dark[75]],
|
|
112
|
+
'--color-icon-primary': [neutral.light[20], neutral.dark[75]],
|
|
113
|
+
'--color-icon-secondary': [neutral.light[40], neutral.dark[60]],
|
|
114
|
+
'--color-icon-disabled': [neutral.light[75], neutral.dark[30]],
|
|
96
115
|
|
|
97
116
|
// Surface variants
|
|
98
|
-
'--color-background-card': [
|
|
99
|
-
'--color-background-popover': [
|
|
100
|
-
'--color-background-inverted': [
|
|
117
|
+
'--color-background-card': [neutral.light[100], neutral.dark[15]],
|
|
118
|
+
'--color-background-popover': [neutral.light[100], neutral.dark[20]],
|
|
119
|
+
'--color-background-inverted': [neutral.light[20], neutral.dark[75]],
|
|
101
120
|
|
|
102
121
|
// Status / Sentiment
|
|
103
|
-
'--color-success': [
|
|
104
|
-
'--color-success-muted': [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
'--color-
|
|
122
|
+
'--color-success': [green.light[50], green.dark[70]],
|
|
123
|
+
'--color-success-muted': [
|
|
124
|
+
withAlpha(green.light[50], '20'),
|
|
125
|
+
withAlpha(green.dark[70], '20'),
|
|
126
|
+
],
|
|
127
|
+
'--color-error': [red.light[50], red.dark[70]],
|
|
128
|
+
'--color-error-muted': [
|
|
129
|
+
withAlpha(red.light[50], '20'),
|
|
130
|
+
withAlpha(red.dark[70], '20'),
|
|
131
|
+
],
|
|
132
|
+
'--color-warning': [yellow.light[80], yellow.dark[85]],
|
|
133
|
+
'--color-warning-muted': [
|
|
134
|
+
withAlpha(yellow.light[80], '20'),
|
|
135
|
+
withAlpha(yellow.dark[85], '20'),
|
|
136
|
+
],
|
|
109
137
|
|
|
110
138
|
// Border
|
|
111
139
|
// Softer sage borders (default + emphasized/card) in light mode.
|
|
112
|
-
'--color-border': [
|
|
113
|
-
'--color-border-emphasized': [
|
|
140
|
+
'--color-border': [neutral.light[85], withAlpha(neutral.dark[75], '1a')],
|
|
141
|
+
'--color-border-emphasized': [neutral.light[70], neutral.dark[30]],
|
|
114
142
|
|
|
115
143
|
// Effects
|
|
116
|
-
'--color-skeleton': [
|
|
117
|
-
'--color-shadow': [
|
|
118
|
-
|
|
144
|
+
'--color-skeleton': [neutral.light[75], neutral.dark[30]],
|
|
145
|
+
'--color-shadow': [
|
|
146
|
+
withAlpha(neutral.light[20], '1a'),
|
|
147
|
+
withAlpha(neutral.dark[0], '4d'),
|
|
148
|
+
],
|
|
149
|
+
'--color-tint-hover': [neutral.light[0], neutral.dark[100]],
|
|
119
150
|
|
|
120
151
|
// Categorical — Blue
|
|
121
|
-
'--color-background-blue': [
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
152
|
+
'--color-background-blue': [
|
|
153
|
+
withAlpha(blue.light[50], '33'),
|
|
154
|
+
withAlpha(blue.dark[50], '33'),
|
|
155
|
+
],
|
|
156
|
+
'--color-border-blue': [blue.light[50], blue.dark[70]],
|
|
157
|
+
'--color-icon-blue': [blue.light[50], blue.dark[70]],
|
|
158
|
+
'--color-text-blue': [blue.light[35], blue.dark[75]],
|
|
125
159
|
|
|
126
160
|
// Categorical — Cyan
|
|
127
|
-
'--color-background-cyan': [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
161
|
+
'--color-background-cyan': [
|
|
162
|
+
withAlpha(cyan.light[50], '33'),
|
|
163
|
+
withAlpha(cyan.dark[50], '33'),
|
|
164
|
+
],
|
|
165
|
+
'--color-border-cyan': [cyan.light[50], cyan.dark[70]],
|
|
166
|
+
'--color-icon-cyan': [cyan.light[50], cyan.dark[70]],
|
|
167
|
+
'--color-text-cyan': [cyan.light[35], cyan.dark[75]],
|
|
131
168
|
|
|
132
169
|
// Categorical — Gray
|
|
133
|
-
'--color-background-gray': [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
170
|
+
'--color-background-gray': [
|
|
171
|
+
withAlpha(neutral.light[40], '33'),
|
|
172
|
+
withAlpha(neutral.dark[30], '33'),
|
|
173
|
+
],
|
|
174
|
+
'--color-border-gray': [neutral.light[40], neutral.dark[40]],
|
|
175
|
+
'--color-icon-gray': [neutral.light[40], neutral.dark[60]],
|
|
176
|
+
'--color-text-gray': [neutral.light[20], neutral.dark[75]],
|
|
137
177
|
|
|
138
178
|
// Categorical — Green
|
|
139
|
-
'--color-background-green': [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
179
|
+
'--color-background-green': [
|
|
180
|
+
withAlpha(green.light[50], '33'),
|
|
181
|
+
withAlpha(green.dark[70], '33'),
|
|
182
|
+
],
|
|
183
|
+
'--color-border-green': [green.light[50], green.dark[70]],
|
|
184
|
+
'--color-icon-green': [green.light[50], green.dark[70]],
|
|
185
|
+
'--color-text-green': [green.light[35], green.dark[75]],
|
|
143
186
|
|
|
144
187
|
// Categorical — Orange
|
|
145
|
-
'--color-background-orange': [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
188
|
+
'--color-background-orange': [
|
|
189
|
+
withAlpha(orange.light[50], '33'),
|
|
190
|
+
withAlpha(orange.dark[70], '33'),
|
|
191
|
+
],
|
|
192
|
+
'--color-border-orange': [orange.light[50], orange.dark[70]],
|
|
193
|
+
'--color-icon-orange': [orange.light[50], orange.dark[70]],
|
|
194
|
+
'--color-text-orange': [orange.light[35], orange.dark[75]],
|
|
149
195
|
|
|
150
196
|
// Categorical — Pink
|
|
151
|
-
'--color-background-pink': [
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
197
|
+
'--color-background-pink': [
|
|
198
|
+
withAlpha(pink.light[50], '33'),
|
|
199
|
+
withAlpha(pink.dark[70], '33'),
|
|
200
|
+
],
|
|
201
|
+
'--color-border-pink': [pink.light[50], pink.dark[70]],
|
|
202
|
+
'--color-icon-pink': [pink.light[50], pink.dark[70]],
|
|
203
|
+
'--color-text-pink': [pink.light[35], pink.dark[75]],
|
|
155
204
|
|
|
156
205
|
// Categorical — Purple
|
|
157
|
-
'--color-background-purple': [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
206
|
+
'--color-background-purple': [
|
|
207
|
+
withAlpha(purple.light[50], '33'),
|
|
208
|
+
withAlpha(purple.dark[70], '33'),
|
|
209
|
+
],
|
|
210
|
+
'--color-border-purple': [purple.light[50], purple.dark[70]],
|
|
211
|
+
'--color-icon-purple': [purple.light[50], purple.dark[70]],
|
|
212
|
+
'--color-text-purple': [purple.light[35], purple.dark[75]],
|
|
161
213
|
|
|
162
214
|
// Categorical — Red
|
|
163
|
-
'--color-background-red': [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
215
|
+
'--color-background-red': [
|
|
216
|
+
withAlpha(red.light[50], '33'),
|
|
217
|
+
withAlpha(red.dark[70], '33'),
|
|
218
|
+
],
|
|
219
|
+
'--color-border-red': [red.light[50], red.dark[70]],
|
|
220
|
+
'--color-icon-red': [red.light[50], red.dark[70]],
|
|
221
|
+
'--color-text-red': [red.light[35], red.dark[75]],
|
|
167
222
|
|
|
168
223
|
// Categorical — Teal
|
|
169
|
-
'--color-background-teal': [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
224
|
+
'--color-background-teal': [
|
|
225
|
+
withAlpha(teal.light[50], '33'),
|
|
226
|
+
withAlpha(teal.dark[70], '33'),
|
|
227
|
+
],
|
|
228
|
+
'--color-border-teal': [teal.light[50], teal.dark[70]],
|
|
229
|
+
'--color-icon-teal': [teal.light[50], teal.dark[70]],
|
|
230
|
+
'--color-text-teal': [teal.light[35], teal.dark[75]],
|
|
173
231
|
|
|
174
232
|
// Categorical — Yellow
|
|
175
|
-
'--color-background-yellow': [
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
233
|
+
'--color-background-yellow': [
|
|
234
|
+
withAlpha(yellow.light[80], '33'),
|
|
235
|
+
withAlpha(yellow.dark[85], '33'),
|
|
236
|
+
],
|
|
237
|
+
'--color-border-yellow': [yellow.light[80], yellow.dark[85]],
|
|
238
|
+
'--color-icon-yellow': [yellow.light[80], yellow.dark[85]],
|
|
239
|
+
'--color-text-yellow': [yellow.light[65], yellow.dark[90]],
|
|
179
240
|
|
|
180
241
|
// =========================================================================
|
|
181
242
|
// Spacing
|
|
@@ -216,14 +277,14 @@ export const matchaTheme = defineTheme({
|
|
|
216
277
|
// =========================================================================
|
|
217
278
|
// Shadows
|
|
218
279
|
// =========================================================================
|
|
219
|
-
'--shadow-low':
|
|
220
|
-
'--shadow-med':
|
|
221
|
-
'--shadow-high':
|
|
222
|
-
'--shadow-inset-hover':
|
|
223
|
-
'--shadow-inset-selected':
|
|
224
|
-
'--shadow-inset-success':
|
|
225
|
-
'--shadow-inset-warning':
|
|
226
|
-
'--shadow-inset-error':
|
|
280
|
+
'--shadow-low': `0 2px 4px ${withAlpha(neutral.light[20], '0d')}, 0 4px 8px ${withAlpha(neutral.light[20], '1a')}`,
|
|
281
|
+
'--shadow-med': `0 2px 4px ${withAlpha(neutral.light[20], '0d')}, 0 4px 12px ${withAlpha(neutral.light[20], '1a')}`,
|
|
282
|
+
'--shadow-high': `0 4px 6px ${withAlpha(neutral.light[20], '1a')}, 0 12px 24px ${withAlpha(neutral.light[20], '26')}`,
|
|
283
|
+
'--shadow-inset-hover': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[20], '30')}`,
|
|
284
|
+
'--shadow-inset-selected': `inset 0px 0px 0px 2px ${withAlpha(neutral.light[20], '50')}`,
|
|
285
|
+
'--shadow-inset-success': `inset 0px 0px 0px 2px ${withAlpha(green.light[50], '50')}`,
|
|
286
|
+
'--shadow-inset-warning': `inset 0px 0px 0px 2px ${withAlpha(yellow.light[80], '50')}`,
|
|
287
|
+
'--shadow-inset-error': `inset 0px 0px 0px 2px ${withAlpha(red.light[50], '50')}`,
|
|
227
288
|
},
|
|
228
289
|
|
|
229
290
|
components: {
|