@astryxdesign/theme-matcha 0.7.0-canary.e3c1cfd → 0.7.0-canary.e48e2ef

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/dist/matcha.js CHANGED
@@ -175,20 +175,20 @@ export const matchaTheme = {
175
175
  "--color-border-yellow": "light-dark(#FFB600, #ffc940)",
176
176
  "--color-icon-yellow": "light-dark(#FFB600, #ffc940)",
177
177
  "--color-text-yellow": "light-dark(#cc9200, #ffd960)",
178
- "--spacing-0-5": "3px",
179
- "--spacing-1": "6px",
180
- "--spacing-1-5": "9px",
181
- "--spacing-2": "12px",
182
- "--spacing-3": "18px",
183
- "--spacing-4": "24px",
184
- "--spacing-5": "30px",
185
- "--spacing-6": "36px",
186
- "--spacing-7": "42px",
187
- "--spacing-8": "48px",
188
- "--spacing-9": "54px",
189
- "--spacing-10": "60px",
190
- "--spacing-11": "66px",
191
- "--spacing-12": "72px",
178
+ "--spacing-0-5": "0.1875rem",
179
+ "--spacing-1": "0.375rem",
180
+ "--spacing-1-5": "0.5625rem",
181
+ "--spacing-2": "0.75rem",
182
+ "--spacing-3": "1.125rem",
183
+ "--spacing-4": "1.5rem",
184
+ "--spacing-5": "1.875rem",
185
+ "--spacing-6": "2.25rem",
186
+ "--spacing-7": "2.625rem",
187
+ "--spacing-8": "3rem",
188
+ "--spacing-9": "3.375rem",
189
+ "--spacing-10": "3.75rem",
190
+ "--spacing-11": "4.125rem",
191
+ "--spacing-12": "4.5rem",
192
192
  "--radius-inner": "6px",
193
193
  "--radius-element": "12px",
194
194
  "--radius-container": "18px",
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=matchaTheme.spacing.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchaTheme.spacing.test.d.ts","sourceRoot":"","sources":["../src/matchaTheme.spacing.test.ts"],"names":[],"mappings":""}
package/dist/source.js CHANGED
@@ -213,20 +213,20 @@ var matchaTheme = (0, import_theme.defineTheme)({
213
213
  // =========================================================================
214
214
  // Spacing
215
215
  // =========================================================================
216
- "--spacing-0-5": "3px",
217
- "--spacing-1": "6px",
218
- "--spacing-1-5": "9px",
219
- "--spacing-2": "12px",
220
- "--spacing-3": "18px",
221
- "--spacing-4": "24px",
222
- "--spacing-5": "30px",
223
- "--spacing-6": "36px",
224
- "--spacing-7": "42px",
225
- "--spacing-8": "48px",
226
- "--spacing-9": "54px",
227
- "--spacing-10": "60px",
228
- "--spacing-11": "66px",
229
- "--spacing-12": "72px",
216
+ "--spacing-0-5": "0.1875rem",
217
+ "--spacing-1": "0.375rem",
218
+ "--spacing-1-5": "0.5625rem",
219
+ "--spacing-2": "0.75rem",
220
+ "--spacing-3": "1.125rem",
221
+ "--spacing-4": "1.5rem",
222
+ "--spacing-5": "1.875rem",
223
+ "--spacing-6": "2.25rem",
224
+ "--spacing-7": "2.625rem",
225
+ "--spacing-8": "3rem",
226
+ "--spacing-9": "3.375rem",
227
+ "--spacing-10": "3.75rem",
228
+ "--spacing-11": "4.125rem",
229
+ "--spacing-12": "4.5rem",
230
230
  // =========================================================================
231
231
  // Radius — soft and rounded
232
232
  // =========================================================================
package/dist/source.mjs CHANGED
@@ -216,20 +216,20 @@ var matchaTheme = defineTheme({
216
216
  // =========================================================================
217
217
  // Spacing
218
218
  // =========================================================================
219
- "--spacing-0-5": "3px",
220
- "--spacing-1": "6px",
221
- "--spacing-1-5": "9px",
222
- "--spacing-2": "12px",
223
- "--spacing-3": "18px",
224
- "--spacing-4": "24px",
225
- "--spacing-5": "30px",
226
- "--spacing-6": "36px",
227
- "--spacing-7": "42px",
228
- "--spacing-8": "48px",
229
- "--spacing-9": "54px",
230
- "--spacing-10": "60px",
231
- "--spacing-11": "66px",
232
- "--spacing-12": "72px",
219
+ "--spacing-0-5": "0.1875rem",
220
+ "--spacing-1": "0.375rem",
221
+ "--spacing-1-5": "0.5625rem",
222
+ "--spacing-2": "0.75rem",
223
+ "--spacing-3": "1.125rem",
224
+ "--spacing-4": "1.5rem",
225
+ "--spacing-5": "1.875rem",
226
+ "--spacing-6": "2.25rem",
227
+ "--spacing-7": "2.625rem",
228
+ "--spacing-8": "3rem",
229
+ "--spacing-9": "3.375rem",
230
+ "--spacing-10": "3.75rem",
231
+ "--spacing-11": "4.125rem",
232
+ "--spacing-12": "4.5rem",
233
233
  // =========================================================================
234
234
  // Radius — soft and rounded
235
235
  // =========================================================================
package/dist/theme.css CHANGED
@@ -6,6 +6,8 @@
6
6
  * Core: @astryxdesign/core@0.7.0
7
7
  */
8
8
 
9
+ @layer reset, astryx-base, astryx-theme;
10
+
9
11
  @layer reset {
10
12
  @scope ([data-astryx-theme="matcha"]) to ([data-astryx-theme]) {
11
13
  :where(h1, h2, h3, h4, h5, h6) {
@@ -77,67 +79,6 @@
77
79
  }
78
80
  }
79
81
 
80
- @layer astryx-base {
81
- :root {
82
- --color-data-categorical-blue: light-dark(#0171E3, #0171E3);
83
- --color-data-categorical-orange: light-dark(#EB6E00, #EB6E00);
84
- --color-data-categorical-purple: light-dark(#6B1EFD, #6B1EFD);
85
- --color-data-categorical-green: light-dark(#0B991F, #0B991F);
86
- --color-data-categorical-pink: light-dark(#F351C0, #F351C0);
87
- --color-data-categorical-cyan: light-dark(#0171A4, #0171A4);
88
- --color-data-categorical-red: light-dark(#F5394F, #F5394F);
89
- --color-data-categorical-teal: light-dark(#08A3A3, #08A3A3);
90
- --color-data-categorical-brown: light-dark(#965E03, #965E03);
91
- --color-data-categorical-indigo: light-dark(#6F8AFF, #6F8AFF);
92
- --color-data-neutral: light-dark(#8494A3, #8C939B);
93
- --color-data-blue-5: light-dark(#02165E, #02165E);
94
- --color-data-blue-4: light-dark(#004CBC, #004CBC);
95
- --color-data-blue-3: light-dark(#2694FE, #2694FE);
96
- --color-data-blue-2: light-dark(#78BEFF, #78BEFF);
97
- --color-data-blue-1: light-dark(#DBECFF, #DBECFF);
98
- --color-data-shamrock-5: light-dark(#0B603D, #0B603D);
99
- --color-data-shamrock-4: light-dark(#138546, #138546);
100
- --color-data-shamrock-3: light-dark(#24BB5E, #24BB5E);
101
- --color-data-shamrock-2: light-dark(#8EF7AA, #8EF7AA);
102
- --color-data-shamrock-1: light-dark(#D6FEE4, #D6FEE4);
103
- --color-data-orange-5: light-dark(#A13F04, #A13F04);
104
- --color-data-orange-4: light-dark(#D66100, #D66100);
105
- --color-data-orange-3: light-dark(#FD9537, #FD9537);
106
- --color-data-orange-2: light-dark(#FDB876, #FDB876);
107
- --color-data-orange-1: light-dark(#FFE6CF, #FFE6CF);
108
- --color-data-pink-5: light-dark(#8E1073, #8E1073);
109
- --color-data-pink-4: light-dark(#D123A1, #D123A1);
110
- --color-data-pink-3: light-dark(#F989D3, #F989D3);
111
- --color-data-pink-2: light-dark(#FEADE3, #FEADE3);
112
- --color-data-pink-1: light-dark(#FCE3F4, #FCE3F4);
113
- --color-data-purple-5: light-dark(#3E0697, #3E0697);
114
- --color-data-purple-4: light-dark(#6B1EFD, #6B1EFD);
115
- --color-data-purple-3: light-dark(#9081FF, #9081FF);
116
- --color-data-purple-2: light-dark(#B3B0FE, #B3B0FE);
117
- --color-data-purple-1: light-dark(#E8E8FB, #E8E8FB);
118
- --color-data-red-5: light-dark(#9D0519, #9D0519);
119
- --color-data-red-4: light-dark(#D31130, #D31130);
120
- --color-data-red-3: light-dark(#FB7D87, #FB7D87);
121
- --color-data-red-2: light-dark(#FFB2B8, #FFB2B8);
122
- --color-data-red-1: light-dark(#FEE4E6, #FEE4E6);
123
- --color-data-teal-5: light-dark(#08767D, #08767D);
124
- --color-data-teal-4: light-dark(#0C9293, #0C9293);
125
- --color-data-teal-3: light-dark(#0DB7AF, #0DB7AF);
126
- --color-data-teal-2: light-dark(#6CE6D8, #6CE6D8);
127
- --color-data-teal-1: light-dark(#D7FCF8, #D7FCF8);
128
- --color-data-yellow-5: light-dark(#8A5001, #8A5001);
129
- --color-data-yellow-4: light-dark(#D69804, #D69804);
130
- --color-data-yellow-3: light-dark(#FBCE03, #FBCE03);
131
- --color-data-yellow-2: light-dark(#FCEC85, #FCEC85);
132
- --color-data-yellow-1: light-dark(#FDF6BA, #FDF6BA);
133
- --color-data-gray-5: light-dark(#25363F, #333338);
134
- --color-data-gray-4: light-dark(#5D6C7B, #666A72);
135
- --color-data-gray-3: light-dark(#AFB9C4, #B2B8BE);
136
- --color-data-gray-2: light-dark(#CCD3DB, #D0D3D6);
137
- --color-data-gray-1: light-dark(#F1F4F7, #F2F4F6);
138
- }
139
- }
140
-
141
82
  @layer astryx-theme {
142
83
  :root { color-scheme: light dark; }
143
84
  html[data-theme="light"] { color-scheme: light; }
@@ -302,20 +243,20 @@
302
243
  --color-border-yellow: light-dark(#FFB600, #ffc940);
303
244
  --color-icon-yellow: light-dark(#FFB600, #ffc940);
304
245
  --color-text-yellow: light-dark(#cc9200, #ffd960);
305
- --spacing-0-5: 3px;
306
- --spacing-1: 6px;
307
- --spacing-1-5: 9px;
308
- --spacing-2: 12px;
309
- --spacing-3: 18px;
310
- --spacing-4: 24px;
311
- --spacing-5: 30px;
312
- --spacing-6: 36px;
313
- --spacing-7: 42px;
314
- --spacing-8: 48px;
315
- --spacing-9: 54px;
316
- --spacing-10: 60px;
317
- --spacing-11: 66px;
318
- --spacing-12: 72px;
246
+ --spacing-0-5: 0.1875rem;
247
+ --spacing-1: 0.375rem;
248
+ --spacing-1-5: 0.5625rem;
249
+ --spacing-2: 0.75rem;
250
+ --spacing-3: 1.125rem;
251
+ --spacing-4: 1.5rem;
252
+ --spacing-5: 1.875rem;
253
+ --spacing-6: 2.25rem;
254
+ --spacing-7: 2.625rem;
255
+ --spacing-8: 3rem;
256
+ --spacing-9: 3.375rem;
257
+ --spacing-10: 3.75rem;
258
+ --spacing-11: 4.125rem;
259
+ --spacing-12: 4.5rem;
319
260
  --radius-inner: 6px;
320
261
  --radius-element: 12px;
321
262
  --radius-container: 18px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/theme-matcha",
3
- "version": "0.7.0-canary.e3c1cfd",
3
+ "version": "0.7.0-canary.e48e2ef",
4
4
  "private": false,
5
5
  "description": "Earthy greens with a calm, organic feel. Naturalistic and grounded, great for wellness or content-first apps.",
6
6
  "author": "Meta Open Source",
@@ -56,11 +56,11 @@
56
56
  "lucide-react": "^1.18.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@astryxdesign/core": "0.7.0-canary.e3c1cfd",
59
+ "@astryxdesign/core": "0.7.0-canary.e48e2ef",
60
60
  "react": ">=19"
61
61
  },
62
62
  "devDependencies": {
63
- "@astryxdesign/cli": "0.7.0-canary.e3c1cfd"
63
+ "@astryxdesign/cli": "0.7.0-canary.e48e2ef"
64
64
  },
65
65
  "module": "./dist/source.mjs",
66
66
  "scripts": {
@@ -0,0 +1,46 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ import {describe, expect, it} from 'vitest';
4
+ import {matchaTheme} from './matchaTheme';
5
+
6
+ const ROOT_FONT_SIZE_PX = 16;
7
+
8
+ // The pixel values these steps had before they moved to rem.
9
+ const previousPx: Record<string, number> = {
10
+ '--spacing-0-5': 3,
11
+ '--spacing-1': 6,
12
+ '--spacing-1-5': 9,
13
+ '--spacing-2': 12,
14
+ '--spacing-3': 18,
15
+ '--spacing-4': 24,
16
+ '--spacing-5': 30,
17
+ '--spacing-6': 36,
18
+ '--spacing-7': 42,
19
+ '--spacing-8': 48,
20
+ '--spacing-9': 54,
21
+ '--spacing-10': 60,
22
+ '--spacing-11': 66,
23
+ '--spacing-12': 72,
24
+ };
25
+
26
+ describe('matcha spacing steps', () => {
27
+ const tokens = matchaTheme.tokens as Record<string, string>;
28
+ const spacingSteps = Object.entries(tokens).filter(([name]) =>
29
+ name.startsWith('--spacing-'),
30
+ );
31
+
32
+ it('are rem, so they follow the root font size', () => {
33
+ expect(spacingSteps.length).toBe(Object.keys(previousPx).length);
34
+ for (const [name, value] of spacingSteps) {
35
+ expect(value, name).toMatch(/^\d+(\.\d+)?rem$/);
36
+ }
37
+ });
38
+
39
+ it('keep their previous pixel values at the default 16px root', () => {
40
+ for (const [name, px] of Object.entries(previousPx)) {
41
+ expect(Number.parseFloat(tokens[name]) * ROOT_FONT_SIZE_PX, name).toBe(
42
+ px,
43
+ );
44
+ }
45
+ });
46
+ });
@@ -180,20 +180,20 @@ export const matchaTheme = defineTheme({
180
180
  // =========================================================================
181
181
  // Spacing
182
182
  // =========================================================================
183
- '--spacing-0-5': '3px',
184
- '--spacing-1': '6px',
185
- '--spacing-1-5': '9px',
186
- '--spacing-2': '12px',
187
- '--spacing-3': '18px',
188
- '--spacing-4': '24px',
189
- '--spacing-5': '30px',
190
- '--spacing-6': '36px',
191
- '--spacing-7': '42px',
192
- '--spacing-8': '48px',
193
- '--spacing-9': '54px',
194
- '--spacing-10': '60px',
195
- '--spacing-11': '66px',
196
- '--spacing-12': '72px',
183
+ '--spacing-0-5': '0.1875rem',
184
+ '--spacing-1': '0.375rem',
185
+ '--spacing-1-5': '0.5625rem',
186
+ '--spacing-2': '0.75rem',
187
+ '--spacing-3': '1.125rem',
188
+ '--spacing-4': '1.5rem',
189
+ '--spacing-5': '1.875rem',
190
+ '--spacing-6': '2.25rem',
191
+ '--spacing-7': '2.625rem',
192
+ '--spacing-8': '3rem',
193
+ '--spacing-9': '3.375rem',
194
+ '--spacing-10': '3.75rem',
195
+ '--spacing-11': '4.125rem',
196
+ '--spacing-12': '4.5rem',
197
197
 
198
198
  // =========================================================================
199
199
  // Radius — soft and rounded