@astryxdesign/theme-y2k 0.7.0-canary.de3959f → 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/source.js +10 -10
- package/dist/source.mjs +10 -10
- package/dist/theme.css +12 -71
- package/dist/y2k.js +10 -10
- package/dist/y2kTheme.spacing.test.d.ts +2 -0
- package/dist/y2kTheme.spacing.test.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/y2kTheme.spacing.test.ts +42 -0
- package/src/y2kTheme.ts +10 -10
package/dist/source.js
CHANGED
|
@@ -112,16 +112,16 @@ var y2kTheme = (0, import_theme.defineTheme)({
|
|
|
112
112
|
// =========================================================================
|
|
113
113
|
// Spacing — comfortable preset (base=6)
|
|
114
114
|
// =========================================================================
|
|
115
|
-
"--spacing-0-5": "
|
|
116
|
-
"--spacing-1": "
|
|
117
|
-
"--spacing-1-5": "
|
|
118
|
-
"--spacing-2": "
|
|
119
|
-
"--spacing-3": "
|
|
120
|
-
"--spacing-4": "
|
|
121
|
-
"--spacing-5": "
|
|
122
|
-
"--spacing-6": "
|
|
123
|
-
"--spacing-7": "
|
|
124
|
-
"--spacing-8": "
|
|
115
|
+
"--spacing-0-5": "0.1875rem",
|
|
116
|
+
"--spacing-1": "0.375rem",
|
|
117
|
+
"--spacing-1-5": "0.5625rem",
|
|
118
|
+
"--spacing-2": "0.75rem",
|
|
119
|
+
"--spacing-3": "1.125rem",
|
|
120
|
+
"--spacing-4": "1.5rem",
|
|
121
|
+
"--spacing-5": "1.875rem",
|
|
122
|
+
"--spacing-6": "2.25rem",
|
|
123
|
+
"--spacing-7": "2.625rem",
|
|
124
|
+
"--spacing-8": "3rem",
|
|
125
125
|
// Size — comfortable preset
|
|
126
126
|
"--size-element-sm": "32px",
|
|
127
127
|
"--size-element-md": "40px",
|
package/dist/source.mjs
CHANGED
|
@@ -114,16 +114,16 @@ var y2kTheme = defineTheme({
|
|
|
114
114
|
// =========================================================================
|
|
115
115
|
// Spacing — comfortable preset (base=6)
|
|
116
116
|
// =========================================================================
|
|
117
|
-
"--spacing-0-5": "
|
|
118
|
-
"--spacing-1": "
|
|
119
|
-
"--spacing-1-5": "
|
|
120
|
-
"--spacing-2": "
|
|
121
|
-
"--spacing-3": "
|
|
122
|
-
"--spacing-4": "
|
|
123
|
-
"--spacing-5": "
|
|
124
|
-
"--spacing-6": "
|
|
125
|
-
"--spacing-7": "
|
|
126
|
-
"--spacing-8": "
|
|
117
|
+
"--spacing-0-5": "0.1875rem",
|
|
118
|
+
"--spacing-1": "0.375rem",
|
|
119
|
+
"--spacing-1-5": "0.5625rem",
|
|
120
|
+
"--spacing-2": "0.75rem",
|
|
121
|
+
"--spacing-3": "1.125rem",
|
|
122
|
+
"--spacing-4": "1.5rem",
|
|
123
|
+
"--spacing-5": "1.875rem",
|
|
124
|
+
"--spacing-6": "2.25rem",
|
|
125
|
+
"--spacing-7": "2.625rem",
|
|
126
|
+
"--spacing-8": "3rem",
|
|
127
127
|
// Size — comfortable preset
|
|
128
128
|
"--size-element-sm": "32px",
|
|
129
129
|
"--size-element-md": "40px",
|
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="y2k"]) 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; }
|
|
@@ -232,16 +173,16 @@
|
|
|
232
173
|
--color-syntax-property: light-dark(#3c6755, #87b5a1);
|
|
233
174
|
--color-syntax-punctuation: light-dark(#5e5e5e, #ababab);
|
|
234
175
|
--color-syntax-background: light-dark(#FFF6ED, #190f00);
|
|
235
|
-
--spacing-0-5:
|
|
236
|
-
--spacing-1:
|
|
237
|
-
--spacing-1-5:
|
|
238
|
-
--spacing-2:
|
|
239
|
-
--spacing-3:
|
|
240
|
-
--spacing-4:
|
|
241
|
-
--spacing-5:
|
|
242
|
-
--spacing-6:
|
|
243
|
-
--spacing-7:
|
|
244
|
-
--spacing-8:
|
|
176
|
+
--spacing-0-5: 0.1875rem;
|
|
177
|
+
--spacing-1: 0.375rem;
|
|
178
|
+
--spacing-1-5: 0.5625rem;
|
|
179
|
+
--spacing-2: 0.75rem;
|
|
180
|
+
--spacing-3: 1.125rem;
|
|
181
|
+
--spacing-4: 1.5rem;
|
|
182
|
+
--spacing-5: 1.875rem;
|
|
183
|
+
--spacing-6: 2.25rem;
|
|
184
|
+
--spacing-7: 2.625rem;
|
|
185
|
+
--spacing-8: 3rem;
|
|
245
186
|
--size-element-sm: 32px;
|
|
246
187
|
--size-element-md: 40px;
|
|
247
188
|
--size-element-lg: 48px;
|
package/dist/y2k.js
CHANGED
|
@@ -105,16 +105,16 @@ export const y2kTheme = {
|
|
|
105
105
|
"--color-syntax-property": "light-dark(#3c6755, #87b5a1)",
|
|
106
106
|
"--color-syntax-punctuation": "light-dark(#5e5e5e, #ababab)",
|
|
107
107
|
"--color-syntax-background": "light-dark(#FFF6ED, #190f00)",
|
|
108
|
-
"--spacing-0-5": "
|
|
109
|
-
"--spacing-1": "
|
|
110
|
-
"--spacing-1-5": "
|
|
111
|
-
"--spacing-2": "
|
|
112
|
-
"--spacing-3": "
|
|
113
|
-
"--spacing-4": "
|
|
114
|
-
"--spacing-5": "
|
|
115
|
-
"--spacing-6": "
|
|
116
|
-
"--spacing-7": "
|
|
117
|
-
"--spacing-8": "
|
|
108
|
+
"--spacing-0-5": "0.1875rem",
|
|
109
|
+
"--spacing-1": "0.375rem",
|
|
110
|
+
"--spacing-1-5": "0.5625rem",
|
|
111
|
+
"--spacing-2": "0.75rem",
|
|
112
|
+
"--spacing-3": "1.125rem",
|
|
113
|
+
"--spacing-4": "1.5rem",
|
|
114
|
+
"--spacing-5": "1.875rem",
|
|
115
|
+
"--spacing-6": "2.25rem",
|
|
116
|
+
"--spacing-7": "2.625rem",
|
|
117
|
+
"--spacing-8": "3rem",
|
|
118
118
|
"--size-element-sm": "32px",
|
|
119
119
|
"--size-element-md": "40px",
|
|
120
120
|
"--size-element-lg": "48px",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"y2kTheme.spacing.test.d.ts","sourceRoot":"","sources":["../src/y2kTheme.spacing.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/theme-y2k",
|
|
3
|
-
"version": "0.7.0-canary.
|
|
3
|
+
"version": "0.7.0-canary.e48e2ef",
|
|
4
4
|
"displayName": "Y2K Theme",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Hot pinks, lime greens, and Poppins. Bubbly, playful, and unmistakably retro.",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"lucide-react": "^1.18.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@astryxdesign/core": "0.7.0-canary.
|
|
60
|
+
"@astryxdesign/core": "0.7.0-canary.e48e2ef",
|
|
61
61
|
"react": ">=19"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@astryxdesign/cli": "0.7.0-canary.
|
|
64
|
+
"@astryxdesign/cli": "0.7.0-canary.e48e2ef"
|
|
65
65
|
},
|
|
66
66
|
"module": "./dist/source.mjs",
|
|
67
67
|
"scripts": {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
import {describe, expect, it} from 'vitest';
|
|
4
|
+
import {y2kTheme} from './y2kTheme';
|
|
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
|
+
};
|
|
21
|
+
|
|
22
|
+
describe('y2k spacing steps', () => {
|
|
23
|
+
const tokens = y2kTheme.tokens as Record<string, string>;
|
|
24
|
+
const spacingSteps = Object.entries(tokens).filter(([name]) =>
|
|
25
|
+
name.startsWith('--spacing-'),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
it('are rem, so they follow the root font size', () => {
|
|
29
|
+
expect(spacingSteps.length).toBe(Object.keys(previousPx).length);
|
|
30
|
+
for (const [name, value] of spacingSteps) {
|
|
31
|
+
expect(value, name).toMatch(/^\d+(\.\d+)?rem$/);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('keep their previous pixel values at the default 16px root', () => {
|
|
36
|
+
for (const [name, px] of Object.entries(previousPx)) {
|
|
37
|
+
expect(Number.parseFloat(tokens[name]) * ROOT_FONT_SIZE_PX, name).toBe(
|
|
38
|
+
px,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
package/src/y2kTheme.ts
CHANGED
|
@@ -63,16 +63,16 @@ export const y2kTheme = defineTheme({
|
|
|
63
63
|
// =========================================================================
|
|
64
64
|
// Spacing — comfortable preset (base=6)
|
|
65
65
|
// =========================================================================
|
|
66
|
-
'--spacing-0-5': '
|
|
67
|
-
'--spacing-1': '
|
|
68
|
-
'--spacing-1-5': '
|
|
69
|
-
'--spacing-2': '
|
|
70
|
-
'--spacing-3': '
|
|
71
|
-
'--spacing-4': '
|
|
72
|
-
'--spacing-5': '
|
|
73
|
-
'--spacing-6': '
|
|
74
|
-
'--spacing-7': '
|
|
75
|
-
'--spacing-8': '
|
|
66
|
+
'--spacing-0-5': '0.1875rem',
|
|
67
|
+
'--spacing-1': '0.375rem',
|
|
68
|
+
'--spacing-1-5': '0.5625rem',
|
|
69
|
+
'--spacing-2': '0.75rem',
|
|
70
|
+
'--spacing-3': '1.125rem',
|
|
71
|
+
'--spacing-4': '1.5rem',
|
|
72
|
+
'--spacing-5': '1.875rem',
|
|
73
|
+
'--spacing-6': '2.25rem',
|
|
74
|
+
'--spacing-7': '2.625rem',
|
|
75
|
+
'--spacing-8': '3rem',
|
|
76
76
|
|
|
77
77
|
// Size — comfortable preset
|
|
78
78
|
'--size-element-sm': '32px',
|