@astryxdesign/theme-matcha 0.0.0-bootstrap.0 → 0.0.15

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.
@@ -0,0 +1,247 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * Matcha Theme
5
+ *
6
+ * An earthy green theme inspired by matcha tea and natural botanicals.
7
+ * Core palette: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF
8
+ * Uses Playwrite US Trad for headings and DM Sans for body text.
9
+ */
10
+
11
+ import {defineTheme, defineSyntaxTheme} from '@astryxdesign/core/theme';
12
+ import {matchaIconRegistry} from './icons';
13
+
14
+ /** Matcha syntax palette — earthy greens and warm tones. */
15
+ const matchaSyntax = defineSyntaxTheme({
16
+ name: 'xds-matcha',
17
+ tokens: {
18
+ keyword: ['#5a6b2a', '#a8bf6a'],
19
+ string: ['#2e6b4a', '#7bc49e'],
20
+ comment: ['#707E46', '#707E46'],
21
+ number: ['#8c6b30', '#d4b870'],
22
+ function: ['#3a5e8c', '#7ba8d4'],
23
+ type: ['#6b4a8c', '#b08ed4'],
24
+ variable: ['#3E481D', '#C0CBA9'],
25
+ operator: ['#707E46', '#94a468'],
26
+ constant: ['#8c6b30', '#d4b870'],
27
+ tag: ['#8c3a3a', '#d47a7a'],
28
+ attribute: ['#7c5e3a', '#c4a882'],
29
+ property: ['#3a7c6b', '#70c4b0'],
30
+ punctuation: ['#707E46', '#5a6440'],
31
+ background: ['#F0F0E0', '#1a1c14'],
32
+ },
33
+ });
34
+
35
+ export const matchaTheme = defineTheme({
36
+ name: 'matcha',
37
+
38
+ typography: {
39
+ // base 16 / ratio 1.25 — aligned with the other themes' geometric scale.
40
+ scale: {base: 16, ratio: 1.25},
41
+ body: {
42
+ family: 'DM Sans',
43
+ fallbacks:
44
+ '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
45
+ },
46
+ heading: {
47
+ family: 'Playwrite US Trad',
48
+ fallbacks: 'Georgia, "Times New Roman", Times, serif',
49
+ },
50
+ code: {
51
+ family: 'JetBrains Mono',
52
+ fallbacks: '"SF Mono", Monaco, Consolas, monospace',
53
+ },
54
+ },
55
+
56
+ motion: {fast: 125, medium: 300, slow: 700, ratio: 0.75},
57
+
58
+ syntax: matchaSyntax,
59
+
60
+ tokens: {
61
+ // =========================================================================
62
+ // Colors — earthy matcha palette
63
+ // Core: #3E481D, #707E46, #C0CBA9, #F0F0E0, #FFFFFF
64
+ // =========================================================================
65
+
66
+ // Core semantic
67
+ '--color-accent': ['#3E481D', '#C0CBA9'],
68
+ '--color-accent-muted': ['#3E481D14', '#C0CBA920'],
69
+ '--color-neutral': ['#3E481D0F', '#C0CBA91A'],
70
+ '--color-background-surface': ['#FFFFFF', '#1a1c14'],
71
+ '--color-background-body': ['#F0F0E0', '#12140e'],
72
+ '--color-overlay': ['#3E481D80', '#3E481DCC'],
73
+ '--color-overlay-hover': ['#3E481D0D', '#C0CBA90D'],
74
+ '--color-overlay-pressed': ['#3E481D1A', '#C0CBA91A'],
75
+ '--color-background-muted': ['#F0F0E0', '#3E481D'],
76
+
77
+ // Text
78
+ '--color-text-primary': ['#3E481D', '#C0CBA9'],
79
+ '--color-text-secondary': ['#707E46', '#94a468'],
80
+ '--color-text-disabled': ['#C0CBA9', '#5a6440'],
81
+ '--color-text-accent': ['#3E481D', '#C0CBA9'],
82
+ '--color-on-dark': '#FFFFFF',
83
+ '--color-on-light': '#3E481D',
84
+ '--color-on-accent': ['#FFFFFF', '#3E481D'],
85
+ '--color-on-success': ['#FFFFFF', '#3E481D'],
86
+ '--color-on-error': ['#FFFFFF', '#3E481D'],
87
+ '--color-on-warning': ['#3E481D', '#3E481D'],
88
+
89
+ // Icon
90
+ '--color-icon-accent': ['#3E481D', '#C0CBA9'],
91
+ '--color-icon-primary': ['#3E481D', '#C0CBA9'],
92
+ '--color-icon-secondary': ['#707E46', '#94a468'],
93
+ '--color-icon-disabled': ['#C0CBA9', '#5a6440'],
94
+
95
+ // Surface variants
96
+ '--color-background-card': ['#FFFFFF', '#1e2016'],
97
+ '--color-background-popover': ['#FFFFFF', '#3E481D'],
98
+ '--color-background-inverted': ['#3E481D', '#C0CBA9'],
99
+
100
+ // Status / Sentiment
101
+ '--color-success': ['#4D9900', '#6dbf2a'],
102
+ '--color-success-muted': ['#4D990020', '#6dbf2a20'],
103
+ '--color-error': ['#FD0000', '#ff5c5c'],
104
+ '--color-error-muted': ['#FD000020', '#ff5c5c20'],
105
+ '--color-warning': ['#FFB600', '#ffc940'],
106
+ '--color-warning-muted': ['#FFB60020', '#ffc94020'],
107
+
108
+ // Border
109
+ // Softer sage borders (default + emphasized/card) in light mode.
110
+ '--color-border': ['#DCE3CE', '#C0CBA91A'],
111
+ '--color-border-emphasized': ['#B7C29E', '#5a6440'],
112
+
113
+ // Effects
114
+ '--color-skeleton': ['#C0CBA9', '#5a6440'],
115
+ '--color-shadow': ['#3E481D1A', '#0000004D'],
116
+ '--color-tint-hover': ['black', 'white'],
117
+
118
+ // Categorical — Blue
119
+ '--color-background-blue': ['#3a5e8c33', '#3a5e8c33'],
120
+ '--color-border-blue': ['#3a5e8c', '#7ba8d4'],
121
+ '--color-icon-blue': ['#3a5e8c', '#7ba8d4'],
122
+ '--color-text-blue': ['#2e4a6e', '#8dbce0'],
123
+
124
+ // Categorical — Cyan
125
+ '--color-background-cyan': ['#3a7c7c33', '#3a7c7c33'],
126
+ '--color-border-cyan': ['#3a7c7c', '#70c4c4'],
127
+ '--color-icon-cyan': ['#3a7c7c', '#70c4c4'],
128
+ '--color-text-cyan': ['#2e6060', '#82d4d4'],
129
+
130
+ // Categorical — Gray
131
+ '--color-background-gray': ['#707E4633', '#5a644033'],
132
+ '--color-border-gray': ['#707E46', '#707E46'],
133
+ '--color-icon-gray': ['#707E46', '#94a468'],
134
+ '--color-text-gray': ['#3E481D', '#C0CBA9'],
135
+
136
+ // Categorical — Green
137
+ '--color-background-green': ['#4D990033', '#6dbf2a33'],
138
+ '--color-border-green': ['#4D9900', '#6dbf2a'],
139
+ '--color-icon-green': ['#4D9900', '#6dbf2a'],
140
+ '--color-text-green': ['#3d7a00', '#80d43a'],
141
+
142
+ // Categorical — Orange
143
+ '--color-background-orange': ['#c4762033', '#d4903a33'],
144
+ '--color-border-orange': ['#c47620', '#d4903a'],
145
+ '--color-icon-orange': ['#c47620', '#d4903a'],
146
+ '--color-text-orange': ['#a06018', '#e0a04a'],
147
+
148
+ // Categorical — Pink
149
+ '--color-background-pink': ['#c44a7033', '#e07a9a33'],
150
+ '--color-border-pink': ['#c44a70', '#e07a9a'],
151
+ '--color-icon-pink': ['#c44a70', '#e07a9a'],
152
+ '--color-text-pink': ['#a03a5a', '#f08aaa'],
153
+
154
+ // Categorical — Purple
155
+ '--color-background-purple': ['#6b4a8c33', '#b08ed433'],
156
+ '--color-border-purple': ['#6b4a8c', '#b08ed4'],
157
+ '--color-icon-purple': ['#6b4a8c', '#b08ed4'],
158
+ '--color-text-purple': ['#553a70', '#c0a0e0'],
159
+
160
+ // Categorical — Red
161
+ '--color-background-red': ['#FD000033', '#ff5c5c33'],
162
+ '--color-border-red': ['#FD0000', '#ff5c5c'],
163
+ '--color-icon-red': ['#FD0000', '#ff5c5c'],
164
+ '--color-text-red': ['#cc0000', '#ff7a7a'],
165
+
166
+ // Categorical — Teal
167
+ '--color-background-teal': ['#2e6b5a33', '#5ab89833'],
168
+ '--color-border-teal': ['#2e6b5a', '#5ab898'],
169
+ '--color-icon-teal': ['#2e6b5a', '#5ab898'],
170
+ '--color-text-teal': ['#245546', '#6ccaaa'],
171
+
172
+ // Categorical — Yellow
173
+ '--color-background-yellow': ['#FFB60033', '#ffc94033'],
174
+ '--color-border-yellow': ['#FFB600', '#ffc940'],
175
+ '--color-icon-yellow': ['#FFB600', '#ffc940'],
176
+ '--color-text-yellow': ['#cc9200', '#ffd960'],
177
+
178
+ // =========================================================================
179
+ // Spacing
180
+ // =========================================================================
181
+ '--spacing-0-5': '3px',
182
+ '--spacing-1': '6px',
183
+ '--spacing-1-5': '9px',
184
+ '--spacing-2': '12px',
185
+ '--spacing-3': '18px',
186
+ '--spacing-4': '24px',
187
+ '--spacing-5': '30px',
188
+ '--spacing-6': '36px',
189
+ '--spacing-7': '42px',
190
+ '--spacing-8': '48px',
191
+ '--spacing-9': '54px',
192
+ '--spacing-10': '60px',
193
+ '--spacing-11': '66px',
194
+ '--spacing-12': '72px',
195
+
196
+ // =========================================================================
197
+ // Radius — soft and rounded
198
+ // =========================================================================
199
+ '--radius-inner': '6px',
200
+ '--radius-element': '12px',
201
+ '--radius-container': '18px',
202
+ '--radius-page': '42px',
203
+
204
+ // No explicit --font-size-* overrides — font sizes come from
205
+ // typography.scale above, keeping the scale the single source of truth.
206
+
207
+ // =========================================================================
208
+ // Element sizes
209
+ // =========================================================================
210
+ '--size-element-sm': '36px',
211
+ '--size-element-md': '40px',
212
+ '--size-element-lg': '44px',
213
+
214
+ // =========================================================================
215
+ // Shadows
216
+ // =========================================================================
217
+ '--shadow-low': '0 2px 4px #3E481D0D, 0 4px 8px #3E481D1A',
218
+ '--shadow-med': '0 2px 4px #3E481D0D, 0 4px 12px #3E481D1A',
219
+ '--shadow-high': '0 4px 6px #3E481D1A, 0 12px 24px #3E481D26',
220
+ '--shadow-inset-hover': 'inset 0px 0px 0px 2px #3E481D30',
221
+ '--shadow-inset-selected': 'inset 0px 0px 0px 2px #3E481D50',
222
+ '--shadow-inset-success': 'inset 0px 0px 0px 2px #4D990050',
223
+ '--shadow-inset-warning': 'inset 0px 0px 0px 2px #FFB60050',
224
+ '--shadow-inset-error': 'inset 0px 0px 0px 2px #FD000050',
225
+ },
226
+
227
+ components: {
228
+ button: {
229
+ base: {
230
+ borderRadius: 'var(--radius-full)',
231
+ },
232
+ },
233
+ card: {
234
+ base: {
235
+ borderRadius: 'var(--radius-page)',
236
+ padding: 'var(--spacing-3)',
237
+ },
238
+ },
239
+ section: {
240
+ base: {
241
+ padding: 'var(--spacing-3)',
242
+ },
243
+ },
244
+ },
245
+
246
+ icons: matchaIconRegistry,
247
+ });
package/src/source.ts ADDED
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ export {matchaTheme} from './matchaTheme';
4
+ export {matchaIconRegistry} from './icons';