@astryx-vue/themes 0.3.0 → 0.4.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.
Files changed (94) hide show
  1. package/butter/badge.css +5 -0
  2. package/butter/banner.css +29 -0
  3. package/butter/base.css +16 -89
  4. package/butter/button.css +6 -0
  5. package/butter/card.css +81 -0
  6. package/butter/input.css +13 -10
  7. package/butter/mobile-type.css +55 -0
  8. package/butter/progress-bar.css +5 -4
  9. package/butter/section.css +7 -0
  10. package/butter/top-nav.css +35 -0
  11. package/butter.css +4 -0
  12. package/chocolate/base.css +17 -90
  13. package/chocolate/button.css +4 -6
  14. package/chocolate/card.css +1 -0
  15. package/chocolate/mobile-type.css +55 -0
  16. package/chocolate/section.css +7 -0
  17. package/chocolate.css +3 -0
  18. package/data.css +84 -0
  19. package/gothic/badge.css +1 -0
  20. package/gothic/banner.css +32 -0
  21. package/gothic/base.css +16 -89
  22. package/gothic/card.css +57 -0
  23. package/gothic/code.css +5 -4
  24. package/gothic/section.css +7 -0
  25. package/gothic.css +2 -0
  26. package/matcha/base.css +3 -76
  27. package/matcha/button.css +1 -0
  28. package/matcha/card.css +2 -0
  29. package/matcha/section.css +8 -0
  30. package/matcha.css +2 -0
  31. package/neutral/alert-dialog.css +2 -2
  32. package/neutral/avatar-group.css +3 -3
  33. package/neutral/avatar.css +7 -7
  34. package/neutral/badge.css +31 -28
  35. package/neutral/banner.css +57 -10
  36. package/neutral/base.css +123 -190
  37. package/neutral/bottom-sheet.css +6 -6
  38. package/neutral/button.css +15 -5
  39. package/neutral/card.css +12 -12
  40. package/neutral/chat.css +1 -1
  41. package/neutral/checkbox.css +5 -5
  42. package/neutral/code.css +10 -12
  43. package/neutral/collapsible.css +4 -4
  44. package/neutral/context-menu.css +8 -8
  45. package/neutral/dialog.css +3 -3
  46. package/neutral/divider.css +3 -3
  47. package/neutral/dropdown-menu.css +4 -4
  48. package/neutral/empty-state.css +2 -2
  49. package/neutral/heading.css +13 -15
  50. package/neutral/hover-card.css +3 -3
  51. package/neutral/icon.css +2 -2
  52. package/neutral/input.css +12 -12
  53. package/neutral/kbd.css +1 -1
  54. package/neutral/link.css +3 -3
  55. package/neutral/list.css +2 -2
  56. package/neutral/local-tokens.css +29 -0
  57. package/neutral/mobile-type.css +42 -0
  58. package/neutral/more-menu.css +9 -9
  59. package/neutral/overlay.css +1 -1
  60. package/neutral/popover.css +2 -2
  61. package/neutral/progress-bar.css +6 -6
  62. package/neutral/{skeleton.css → section.css} +1 -1
  63. package/neutral/segmented-control.css +35 -12
  64. package/neutral/slider.css +3 -3
  65. package/neutral/spinner.css +4 -4
  66. package/neutral/status-dot.css +4 -4
  67. package/neutral/stepper.css +16 -0
  68. package/neutral/switch.css +3 -3
  69. package/neutral/text.css +7 -17
  70. package/neutral/toast.css +1 -1
  71. package/neutral/toggle-button.css +1 -1
  72. package/neutral/tooltip.css +3 -3
  73. package/neutral.css +5 -1
  74. package/package.json +2 -1
  75. package/stone/banner.css +29 -0
  76. package/stone/base.css +16 -89
  77. package/stone/button.css +5 -6
  78. package/stone/card.css +1 -0
  79. package/stone/code.css +5 -4
  80. package/stone/input.css +7 -6
  81. package/stone/mobile-type.css +55 -0
  82. package/stone/progress-bar.css +6 -4
  83. package/stone/section.css +7 -0
  84. package/stone/switch.css +1 -1
  85. package/stone.css +3 -0
  86. package/y2k/badge.css +5 -0
  87. package/y2k/banner.css +29 -0
  88. package/y2k/base.css +6 -79
  89. package/y2k/button.css +15 -6
  90. package/y2k/card.css +1 -0
  91. package/y2k/code.css +5 -4
  92. package/y2k/section.css +7 -0
  93. package/y2k/top-nav.css +22 -0
  94. package/y2k.css +3 -0
@@ -3,8 +3,8 @@
3
3
  @layer astryx.tokens {
4
4
  :root,
5
5
  [data-astryx-theme='neutral'] {
6
- --astryx-tooltip-background: light-dark(#171717, #fafafa);
7
- --astryx-tooltip-foreground: light-dark(#fff, #262626);
8
- --astryx-tooltip-indication-color: light-dark(#d4d4d4, #525252);
6
+ --astryx-tooltip-background: light-dark(#171717, #262626);
7
+ --astryx-tooltip-foreground: light-dark(#ffffff, #fafafa);
8
+ --astryx-tooltip-indication-color: var(--astryx-color-border-emphasized);
9
9
  }
10
10
  }
package/neutral.css CHANGED
@@ -1,5 +1,6 @@
1
1
  /* 这个文件由 `pnpm sync` 生成,不要手改。 */
2
2
  @import './fonts.css';
3
+ @import './data.css';
3
4
  @import './neutral/alert-dialog.css';
4
5
  @import './neutral/avatar.css';
5
6
  @import './neutral/avatar-group.css';
@@ -29,19 +30,22 @@
29
30
  @import './neutral/kbd.css';
30
31
  @import './neutral/link.css';
31
32
  @import './neutral/list.css';
33
+ @import './neutral/local-tokens.css';
32
34
  @import './neutral/mobile-nav.css';
35
+ @import './neutral/mobile-type.css';
33
36
  @import './neutral/more-menu.css';
34
37
  @import './neutral/nav-menu.css';
35
38
  @import './neutral/overlay.css';
36
39
  @import './neutral/popover.css';
37
40
  @import './neutral/progress-bar.css';
38
41
  @import './neutral/radio.css';
42
+ @import './neutral/section.css';
39
43
  @import './neutral/segmented-control.css';
40
44
  @import './neutral/side-nav.css';
41
- @import './neutral/skeleton.css';
42
45
  @import './neutral/slider.css';
43
46
  @import './neutral/spinner.css';
44
47
  @import './neutral/status-dot.css';
48
+ @import './neutral/stepper.css';
45
49
  @import './neutral/switch.css';
46
50
  @import './neutral/text.css';
47
51
  @import './neutral/text-area.css';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/themes",
3
3
  "type": "module",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "description": "CSS themes for the unofficial astryx-vue port of Astryx. Not affiliated with Meta.",
6
6
  "author": "ShenQingchuan",
7
7
  "license": "MIT",
@@ -43,6 +43,7 @@
43
43
  "chocolate",
44
44
  "chocolate.css",
45
45
  "css.d.ts",
46
+ "data.css",
46
47
  "fonts.css",
47
48
  "gothic",
48
49
  "gothic.css",
package/stone/banner.css CHANGED
@@ -13,3 +13,32 @@
13
13
  --astryx-banner-border: var(--astryx-color-border);
14
14
  }
15
15
  }
16
+
17
+ /*
18
+ * 状态色底上,状态条把共享的文字和色相 token 重指到对应色相的深色值。
19
+ */
20
+ @layer astryx.overrides {
21
+ [data-astryx-theme='stone'] .astryx-banner[data-status='info'] {
22
+ --astryx-color-text-primary: var(--astryx-color-text-blue);
23
+ --astryx-color-text-secondary: var(--astryx-color-text-blue);
24
+ --astryx-color-accent: var(--astryx-color-text-blue);
25
+ }
26
+
27
+ [data-astryx-theme='stone'] .astryx-banner[data-status='success'] {
28
+ --astryx-color-text-primary: var(--astryx-color-text-green);
29
+ --astryx-color-text-secondary: var(--astryx-color-text-green);
30
+ --astryx-color-success: var(--astryx-color-text-green);
31
+ }
32
+
33
+ [data-astryx-theme='stone'] .astryx-banner[data-status='warning'] {
34
+ --astryx-color-text-primary: var(--astryx-color-text-yellow);
35
+ --astryx-color-text-secondary: var(--astryx-color-text-yellow);
36
+ --astryx-color-warning: var(--astryx-color-text-yellow);
37
+ }
38
+
39
+ [data-astryx-theme='stone'] .astryx-banner[data-status='error'] {
40
+ --astryx-color-text-primary: var(--astryx-color-text-red);
41
+ --astryx-color-text-secondary: var(--astryx-color-text-red);
42
+ --astryx-color-error: var(--astryx-color-text-red);
43
+ }
44
+ }
package/stone/base.css CHANGED
@@ -115,94 +115,21 @@
115
115
  --astryx-color-icon-yellow: light-dark(#524622, #f4e1b7);
116
116
  --astryx-color-text-yellow: light-dark(#524622, #f4e1b7);
117
117
 
118
- /*
119
- * Chart colors. Categorical series use one stop in both schemes.
120
- * Sequential ramps run from 5 (darkest) to 1 (lightest).
121
- * Gray, and the neutral reference color, change with the scheme.
122
- * Values match the upstream data color tokens.
123
- */
124
- --astryx-color-data-categorical-blue: light-dark(#0171E3, #0171E3);
125
- --astryx-color-data-categorical-orange: light-dark(#EB6E00, #EB6E00);
126
- --astryx-color-data-categorical-purple: light-dark(#6B1EFD, #6B1EFD);
127
- --astryx-color-data-categorical-green: light-dark(#0B991F, #0B991F);
128
- --astryx-color-data-categorical-pink: light-dark(#F351C0, #F351C0);
129
- --astryx-color-data-categorical-cyan: light-dark(#0171A4, #0171A4);
130
- --astryx-color-data-categorical-red: light-dark(#F5394F, #F5394F);
131
- --astryx-color-data-categorical-teal: light-dark(#08A3A3, #08A3A3);
132
- --astryx-color-data-categorical-brown: light-dark(#965E03, #965E03);
133
- --astryx-color-data-categorical-indigo: light-dark(#6F8AFF, #6F8AFF);
134
-
135
- --astryx-color-data-neutral: light-dark(#8494A3, #8C939B);
136
-
137
- --astryx-color-data-blue-5: light-dark(#02165E, #02165E);
138
- --astryx-color-data-blue-4: light-dark(#004CBC, #004CBC);
139
- --astryx-color-data-blue-3: light-dark(#2694FE, #2694FE);
140
- --astryx-color-data-blue-2: light-dark(#78BEFF, #78BEFF);
141
- --astryx-color-data-blue-1: light-dark(#DBECFF, #DBECFF);
142
-
143
- --astryx-color-data-shamrock-5: light-dark(#0B603D, #0B603D);
144
- --astryx-color-data-shamrock-4: light-dark(#138546, #138546);
145
- --astryx-color-data-shamrock-3: light-dark(#24BB5E, #24BB5E);
146
- --astryx-color-data-shamrock-2: light-dark(#8EF7AA, #8EF7AA);
147
- --astryx-color-data-shamrock-1: light-dark(#D6FEE4, #D6FEE4);
148
-
149
- --astryx-color-data-orange-5: light-dark(#A13F04, #A13F04);
150
- --astryx-color-data-orange-4: light-dark(#D66100, #D66100);
151
- --astryx-color-data-orange-3: light-dark(#FD9537, #FD9537);
152
- --astryx-color-data-orange-2: light-dark(#FDB876, #FDB876);
153
- --astryx-color-data-orange-1: light-dark(#FFE6CF, #FFE6CF);
154
-
155
- --astryx-color-data-pink-5: light-dark(#8E1073, #8E1073);
156
- --astryx-color-data-pink-4: light-dark(#D123A1, #D123A1);
157
- --astryx-color-data-pink-3: light-dark(#F989D3, #F989D3);
158
- --astryx-color-data-pink-2: light-dark(#FEADE3, #FEADE3);
159
- --astryx-color-data-pink-1: light-dark(#FCE3F4, #FCE3F4);
160
-
161
- --astryx-color-data-purple-5: light-dark(#3E0697, #3E0697);
162
- --astryx-color-data-purple-4: light-dark(#6B1EFD, #6B1EFD);
163
- --astryx-color-data-purple-3: light-dark(#9081FF, #9081FF);
164
- --astryx-color-data-purple-2: light-dark(#B3B0FE, #B3B0FE);
165
- --astryx-color-data-purple-1: light-dark(#E8E8FB, #E8E8FB);
166
-
167
- --astryx-color-data-red-5: light-dark(#9D0519, #9D0519);
168
- --astryx-color-data-red-4: light-dark(#D31130, #D31130);
169
- --astryx-color-data-red-3: light-dark(#FB7D87, #FB7D87);
170
- --astryx-color-data-red-2: light-dark(#FFB2B8, #FFB2B8);
171
- --astryx-color-data-red-1: light-dark(#FEE4E6, #FEE4E6);
172
-
173
- --astryx-color-data-teal-5: light-dark(#08767D, #08767D);
174
- --astryx-color-data-teal-4: light-dark(#0C9293, #0C9293);
175
- --astryx-color-data-teal-3: light-dark(#0DB7AF, #0DB7AF);
176
- --astryx-color-data-teal-2: light-dark(#6CE6D8, #6CE6D8);
177
- --astryx-color-data-teal-1: light-dark(#D7FCF8, #D7FCF8);
178
-
179
- --astryx-color-data-yellow-5: light-dark(#8A5001, #8A5001);
180
- --astryx-color-data-yellow-4: light-dark(#D69804, #D69804);
181
- --astryx-color-data-yellow-3: light-dark(#FBCE03, #FBCE03);
182
- --astryx-color-data-yellow-2: light-dark(#FCEC85, #FCEC85);
183
- --astryx-color-data-yellow-1: light-dark(#FDF6BA, #FDF6BA);
184
-
185
- --astryx-color-data-gray-5: light-dark(#25363F, #333338);
186
- --astryx-color-data-gray-4: light-dark(#5D6C7B, #666A72);
187
- --astryx-color-data-gray-3: light-dark(#AFB9C4, #B2B8BE);
188
- --astryx-color-data-gray-2: light-dark(#CCD3DB, #D0D3D6);
189
- --astryx-color-data-gray-1: light-dark(#F1F4F7, #F2F4F6);
190
-
191
- --astryx-spacing-0: 0;
192
- --astryx-spacing-0-5: 2px;
193
- --astryx-spacing-1: 4px;
194
- --astryx-spacing-1-5: 6px;
195
- --astryx-spacing-2: 8px;
196
- --astryx-spacing-3: 12px;
197
- --astryx-spacing-4: 16px;
198
- --astryx-spacing-5: 20px;
199
- --astryx-spacing-6: 24px;
200
- --astryx-spacing-7: 28px;
201
- --astryx-spacing-8: 32px;
202
- --astryx-spacing-9: 36px;
203
- --astryx-spacing-10: 40px;
204
- --astryx-spacing-11: 44px;
205
- --astryx-spacing-12: 48px;
118
+ --astryx-spacing-0: 0rem;
119
+ --astryx-spacing-0-5: 0.125rem;
120
+ --astryx-spacing-1: 0.25rem;
121
+ --astryx-spacing-1-5: 0.375rem;
122
+ --astryx-spacing-2: 0.5rem;
123
+ --astryx-spacing-3: 0.75rem;
124
+ --astryx-spacing-4: 1rem;
125
+ --astryx-spacing-5: 1.25rem;
126
+ --astryx-spacing-6: 1.5rem;
127
+ --astryx-spacing-7: 1.75rem;
128
+ --astryx-spacing-8: 2rem;
129
+ --astryx-spacing-9: 2.25rem;
130
+ --astryx-spacing-10: 2.5rem;
131
+ --astryx-spacing-11: 2.75rem;
132
+ --astryx-spacing-12: 3rem;
206
133
 
207
134
  --astryx-size-element-sm: 28px;
208
135
  --astryx-size-element-md: 32px;
@@ -245,7 +172,7 @@
245
172
  --astryx-ease-standard: cubic-bezier(0.24, 1, 0.4, 1);
246
173
 
247
174
  --astryx-font-family-body: Figtree, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
248
- --astryx-font-family-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
175
+ --astryx-font-family-code: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
249
176
  --astryx-font-family-heading: Montserrat, 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
250
177
 
251
178
  --astryx-font-size-4xs: 0.3125rem;
package/stone/button.css CHANGED
@@ -4,8 +4,13 @@
4
4
  [data-astryx-theme='stone'] {
5
5
  --astryx-button-primary-background: var(--astryx-color-accent);
6
6
  --astryx-button-primary-foreground: var(--astryx-color-on-accent);
7
+ --astryx-button-radius: var(--astryx-radius-full);
7
8
  --astryx-button-secondary-background: transparent;
8
9
  --astryx-button-secondary-foreground: var(--astryx-color-text-primary);
10
+ --astryx-button-secondary-border-width: 1.5px;
11
+ --astryx-button-secondary-border-style: solid;
12
+ --astryx-button-secondary-border-color: var(--astryx-color-border-emphasized);
13
+ --astryx-button-secondary-hover-overlay: var(--astryx-color-neutral);
9
14
  --astryx-button-ghost-background: transparent;
10
15
  --astryx-button-ghost-foreground: var(--astryx-color-text-primary);
11
16
  --astryx-button-destructive-background: var(--astryx-color-background-red);
@@ -22,9 +27,3 @@
22
27
  --astryx-button-shadow-high: var(--astryx-shadow-high);
23
28
  }
24
29
  }
25
-
26
- @layer astryx.components {
27
- [data-astryx-theme='stone'] .astryx-button[data-variant='secondary'] {
28
- border: 1.5px solid var(--astryx-color-border-emphasized);
29
- }
30
- }
package/stone/card.css CHANGED
@@ -3,6 +3,7 @@
3
3
  @layer astryx.tokens {
4
4
  [data-astryx-theme='stone'] {
5
5
  --astryx-card-background: var(--astryx-color-background-card);
6
+ --astryx-card-padding: var(--astryx-spacing-3);
6
7
  --astryx-card-muted-background: var(--astryx-color-background-muted);
7
8
  --astryx-card-border: var(--astryx-color-border);
8
9
  --astryx-card-shadow-low: var(--astryx-shadow-low);
package/stone/code.css CHANGED
@@ -30,10 +30,11 @@
30
30
  --astryx-code-syntax-property: light-dark(#4e6357, #94b2a0);
31
31
  --astryx-code-syntax-punctuation: light-dark(#5e5e5e, #ababb0);
32
32
 
33
- --astryx-code-syntax-added: color-mix(in srgb, var(--astryx-color-success-muted) 25%, transparent);
34
- --astryx-code-syntax-removed: color-mix(in srgb, var(--astryx-color-error-muted) 25%, transparent);
33
+ /* 差异行是带透明度的淡绿、淡红;标记色在深色底上用浅色调,浅色底上用深色调。 */
34
+ --astryx-code-syntax-added: light-dark(#d0e9ce40, #b4cdb233);
35
+ --astryx-code-syntax-removed: light-dark(#f9dcd740, #dcc0bc33);
35
36
  --astryx-code-syntax-diff-header: var(--astryx-color-background-muted);
36
- --astryx-code-syntax-added-marker: var(--astryx-color-text-green);
37
- --astryx-code-syntax-removed-marker: var(--astryx-color-text-red);
37
+ --astryx-code-syntax-added-marker: light-dark(#374c36, #d0e9ce);
38
+ --astryx-code-syntax-removed-marker: light-dark(#58413e, #f9dcd7);
38
39
  }
39
40
  }
package/stone/input.css CHANGED
@@ -8,14 +8,15 @@
8
8
  --astryx-input-height-sm: 28px;
9
9
  --astryx-input-height-md: 32px;
10
10
  --astryx-input-height-lg: 36px;
11
- --astryx-input-error: var(--astryx-color-error);
11
+ /* 状态描边和状态图标用柔和的 T60/T70,和上方状态提示底色同族。 */
12
+ --astryx-input-error: light-dark(#a58b86, #c0a5a1);
12
13
  --astryx-input-error-foreground: var(--astryx-color-text-red);
13
- --astryx-input-error-background: var(--astryx-color-error-muted);
14
- --astryx-input-warning: var(--astryx-color-warning);
14
+ --astryx-input-error-background: var(--astryx-color-background-red);
15
+ --astryx-input-warning: light-dark(#9f8f68, #bbaa81);
15
16
  --astryx-input-warning-foreground: var(--astryx-color-text-yellow);
16
- --astryx-input-warning-background: var(--astryx-color-warning-muted);
17
- --astryx-input-success: var(--astryx-color-success);
17
+ --astryx-input-warning-background: var(--astryx-color-background-yellow);
18
+ --astryx-input-success: light-dark(#7f977e, #99b298);
18
19
  --astryx-input-success-foreground: var(--astryx-color-text-green);
19
- --astryx-input-success-background: var(--astryx-color-success-muted);
20
+ --astryx-input-success-background: var(--astryx-color-background-green);
20
21
  }
21
22
  }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Stone type scale on touch devices.
3
+ *
4
+ * On a coarse pointer below the lg breakpoint the whole ladder is re-derived
5
+ * from a 16px base with a smaller ratio, so body text reaches 16px while the
6
+ * display sizes keep their desktop look. Sizes are re-derived here instead of
7
+ * swapping the base size, because every size token is an absolute rem value.
8
+ */
9
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
10
+
11
+ @layer astryx.tokens {
12
+ @media (width < 1024px) and (pointer: coarse) {
13
+ [data-astryx-theme='stone'] {
14
+ --astryx-font-size-4xs: 0.375rem;
15
+ --astryx-font-size-3xs: 0.4375rem;
16
+ --astryx-font-size-2xs: 0.5625rem;
17
+ --astryx-font-size-xs: 0.6875rem;
18
+ --astryx-font-size-sm: 0.8125rem;
19
+ --astryx-font-size-base: 1rem;
20
+ --astryx-font-size-lg: 1.25rem;
21
+ --astryx-font-size-xl: 1.5rem;
22
+ --astryx-font-size-2xl: 1.8125rem;
23
+ --astryx-font-size-3xl: 2.25rem;
24
+ --astryx-font-size-4xl: 2.75rem;
25
+
26
+ --astryx-text-heading-1-size: var(--astryx-font-size-2xl);
27
+ --astryx-text-heading-1-leading: 1.3793;
28
+ --astryx-text-heading-2-size: var(--astryx-font-size-xl);
29
+ --astryx-text-heading-2-leading: 1.3333;
30
+ --astryx-text-heading-3-size: var(--astryx-font-size-lg);
31
+ --astryx-text-heading-3-leading: 1.4;
32
+ --astryx-text-heading-4-size: var(--astryx-font-size-base);
33
+ --astryx-text-heading-4-leading: 1.5;
34
+ --astryx-text-heading-5-size: var(--astryx-font-size-sm);
35
+ --astryx-text-heading-5-leading: 1.5385;
36
+ --astryx-text-heading-6-size: var(--astryx-font-size-xs);
37
+ --astryx-text-heading-6-leading: 1.4545;
38
+ --astryx-text-body-size: var(--astryx-font-size-base);
39
+ --astryx-text-body-leading: 1.5;
40
+ --astryx-text-large-size: var(--astryx-font-size-lg);
41
+ --astryx-text-large-leading: 1.4;
42
+ --astryx-text-label-size: var(--astryx-font-size-base);
43
+ --astryx-text-label-leading: 1.5;
44
+ --astryx-text-code-size: var(--astryx-font-size-base);
45
+ --astryx-text-code-leading: 1.5;
46
+ --astryx-text-supporting-size: var(--astryx-font-size-sm);
47
+ --astryx-text-supporting-leading: 1.5385;
48
+ --astryx-text-display-1-size: var(--astryx-font-size-5xl);
49
+ --astryx-text-display-2-size: var(--astryx-font-size-4xl);
50
+ --astryx-text-display-2-leading: 1.2727;
51
+ --astryx-text-display-3-size: var(--astryx-font-size-3xl);
52
+ --astryx-text-display-3-leading: 1.2222;
53
+ }
54
+ }
55
+ }
@@ -5,11 +5,13 @@
5
5
  --astryx-progress-bar-track-height: 8px;
6
6
  --astryx-progress-bar-track-height-sm: 4px;
7
7
  --astryx-progress-bar-track-height-lg: 12px;
8
- --astryx-progress-bar-track-background: var(--astryx-color-background-muted);
8
+ --astryx-progress-bar-track-background: var(--astryx-color-skeleton);
9
9
  --astryx-progress-bar-fill-background: var(--astryx-color-accent);
10
- --astryx-progress-bar-success-fill: var(--astryx-color-success);
11
- --astryx-progress-bar-warning-fill: var(--astryx-color-warning);
12
- --astryx-progress-bar-error-fill: var(--astryx-color-error);
10
+ /* 填充在浅色下取各自色阶的 T90,深色下取 T70,和状态底同族。 */
11
+ --astryx-progress-bar-accent-fill: light-dark(#d7e4f5, #a0acbc);
12
+ --astryx-progress-bar-success-fill: light-dark(#d0e9ce, #9ab298);
13
+ --astryx-progress-bar-warning-fill: light-dark(#f4e1b7, #bbaa82);
14
+ --astryx-progress-bar-error-fill: light-dark(#f9dcd7, #c0a5a0);
13
15
  --astryx-progress-bar-info-fill: var(--astryx-color-background-blue);
14
16
  }
15
17
  }
@@ -0,0 +1,7 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.tokens {
4
+ [data-astryx-theme='stone'] {
5
+ --astryx-section-padding: var(--astryx-spacing-3);
6
+ }
7
+ }
package/stone/switch.css CHANGED
@@ -22,7 +22,7 @@
22
22
  --astryx-switch-thumb-travel-lg: 22px;
23
23
  --astryx-switch-track-radius: 999px;
24
24
  --astryx-switch-thumb-radius: 999px;
25
- --astryx-switch-track-off: var(--astryx-color-background-muted);
25
+ --astryx-switch-track-off: var(--astryx-color-skeleton);
26
26
  --astryx-switch-track-on: var(--astryx-color-accent);
27
27
  --astryx-switch-thumb: var(--astryx-color-background-surface);
28
28
  }
package/stone.css CHANGED
@@ -1,5 +1,6 @@
1
1
  /* 这个文件由 `pnpm sync` 生成,不要手改。 */
2
2
  @import './fonts.css';
3
+ @import './data.css';
3
4
  @import './stone/alert-dialog.css';
4
5
  @import './stone/avatar.css';
5
6
  @import './stone/avatar-group.css';
@@ -30,12 +31,14 @@
30
31
  @import './stone/link.css';
31
32
  @import './stone/list.css';
32
33
  @import './stone/mobile-nav.css';
34
+ @import './stone/mobile-type.css';
33
35
  @import './stone/more-menu.css';
34
36
  @import './stone/nav-menu.css';
35
37
  @import './stone/overlay.css';
36
38
  @import './stone/popover.css';
37
39
  @import './stone/progress-bar.css';
38
40
  @import './stone/radio.css';
41
+ @import './stone/section.css';
39
42
  @import './stone/segmented-control.css';
40
43
  @import './stone/side-nav.css';
41
44
  @import './stone/skeleton.css';
package/y2k/badge.css CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  @layer astryx.tokens {
4
4
  [data-astryx-theme='y2k'] {
5
+ --astryx-badge-radius: 9999px;
6
+ --astryx-badge-border-width: 1.5px;
7
+ --astryx-badge-border-style: solid;
8
+ --astryx-badge-border-color: color-mix(in srgb, currentcolor 30%, transparent);
9
+
5
10
  --astryx-badge-neutral-background: var(--astryx-color-background-gray);
6
11
  --astryx-badge-neutral-foreground: var(--astryx-color-text-gray);
7
12
  --astryx-badge-info-background: var(--astryx-color-background-blue);
package/y2k/banner.css CHANGED
@@ -13,3 +13,32 @@
13
13
  --astryx-banner-border: var(--astryx-color-border);
14
14
  }
15
15
  }
16
+
17
+ /*
18
+ * 状态色底上,状态条把共享的文字和色相 token 重指到对应色相的深色值。
19
+ */
20
+ @layer astryx.overrides {
21
+ [data-astryx-theme='y2k'] .astryx-banner[data-status='info'] {
22
+ --astryx-color-text-primary: var(--astryx-color-text-blue);
23
+ --astryx-color-text-secondary: var(--astryx-color-text-blue);
24
+ --astryx-color-accent: var(--astryx-color-text-blue);
25
+ }
26
+
27
+ [data-astryx-theme='y2k'] .astryx-banner[data-status='success'] {
28
+ --astryx-color-text-primary: var(--astryx-color-text-green);
29
+ --astryx-color-text-secondary: var(--astryx-color-text-green);
30
+ --astryx-color-success: var(--astryx-color-text-green);
31
+ }
32
+
33
+ [data-astryx-theme='y2k'] .astryx-banner[data-status='warning'] {
34
+ --astryx-color-text-primary: var(--astryx-color-text-yellow);
35
+ --astryx-color-text-secondary: var(--astryx-color-text-yellow);
36
+ --astryx-color-warning: var(--astryx-color-text-yellow);
37
+ }
38
+
39
+ [data-astryx-theme='y2k'] .astryx-banner[data-status='error'] {
40
+ --astryx-color-text-primary: var(--astryx-color-text-red);
41
+ --astryx-color-text-secondary: var(--astryx-color-text-red);
42
+ --astryx-color-error: var(--astryx-color-text-red);
43
+ }
44
+ }
package/y2k/base.css CHANGED
@@ -115,80 +115,7 @@
115
115
  --astryx-color-icon-yellow: light-dark(#614400, #3f2600);
116
116
  --astryx-color-text-yellow: light-dark(#614400, #3f2600);
117
117
 
118
- /*
119
- * Chart colors. Categorical series use one stop in both schemes.
120
- * Sequential ramps run from 5 (darkest) to 1 (lightest).
121
- * Gray, and the neutral reference color, change with the scheme.
122
- * Values match the upstream data color tokens.
123
- */
124
- --astryx-color-data-categorical-blue: light-dark(#0171E3, #0171E3);
125
- --astryx-color-data-categorical-orange: light-dark(#EB6E00, #EB6E00);
126
- --astryx-color-data-categorical-purple: light-dark(#6B1EFD, #6B1EFD);
127
- --astryx-color-data-categorical-green: light-dark(#0B991F, #0B991F);
128
- --astryx-color-data-categorical-pink: light-dark(#F351C0, #F351C0);
129
- --astryx-color-data-categorical-cyan: light-dark(#0171A4, #0171A4);
130
- --astryx-color-data-categorical-red: light-dark(#F5394F, #F5394F);
131
- --astryx-color-data-categorical-teal: light-dark(#08A3A3, #08A3A3);
132
- --astryx-color-data-categorical-brown: light-dark(#965E03, #965E03);
133
- --astryx-color-data-categorical-indigo: light-dark(#6F8AFF, #6F8AFF);
134
-
135
- --astryx-color-data-neutral: light-dark(#8494A3, #8C939B);
136
-
137
- --astryx-color-data-blue-5: light-dark(#02165E, #02165E);
138
- --astryx-color-data-blue-4: light-dark(#004CBC, #004CBC);
139
- --astryx-color-data-blue-3: light-dark(#2694FE, #2694FE);
140
- --astryx-color-data-blue-2: light-dark(#78BEFF, #78BEFF);
141
- --astryx-color-data-blue-1: light-dark(#DBECFF, #DBECFF);
142
-
143
- --astryx-color-data-shamrock-5: light-dark(#0B603D, #0B603D);
144
- --astryx-color-data-shamrock-4: light-dark(#138546, #138546);
145
- --astryx-color-data-shamrock-3: light-dark(#24BB5E, #24BB5E);
146
- --astryx-color-data-shamrock-2: light-dark(#8EF7AA, #8EF7AA);
147
- --astryx-color-data-shamrock-1: light-dark(#D6FEE4, #D6FEE4);
148
-
149
- --astryx-color-data-orange-5: light-dark(#A13F04, #A13F04);
150
- --astryx-color-data-orange-4: light-dark(#D66100, #D66100);
151
- --astryx-color-data-orange-3: light-dark(#FD9537, #FD9537);
152
- --astryx-color-data-orange-2: light-dark(#FDB876, #FDB876);
153
- --astryx-color-data-orange-1: light-dark(#FFE6CF, #FFE6CF);
154
-
155
- --astryx-color-data-pink-5: light-dark(#8E1073, #8E1073);
156
- --astryx-color-data-pink-4: light-dark(#D123A1, #D123A1);
157
- --astryx-color-data-pink-3: light-dark(#F989D3, #F989D3);
158
- --astryx-color-data-pink-2: light-dark(#FEADE3, #FEADE3);
159
- --astryx-color-data-pink-1: light-dark(#FCE3F4, #FCE3F4);
160
-
161
- --astryx-color-data-purple-5: light-dark(#3E0697, #3E0697);
162
- --astryx-color-data-purple-4: light-dark(#6B1EFD, #6B1EFD);
163
- --astryx-color-data-purple-3: light-dark(#9081FF, #9081FF);
164
- --astryx-color-data-purple-2: light-dark(#B3B0FE, #B3B0FE);
165
- --astryx-color-data-purple-1: light-dark(#E8E8FB, #E8E8FB);
166
-
167
- --astryx-color-data-red-5: light-dark(#9D0519, #9D0519);
168
- --astryx-color-data-red-4: light-dark(#D31130, #D31130);
169
- --astryx-color-data-red-3: light-dark(#FB7D87, #FB7D87);
170
- --astryx-color-data-red-2: light-dark(#FFB2B8, #FFB2B8);
171
- --astryx-color-data-red-1: light-dark(#FEE4E6, #FEE4E6);
172
-
173
- --astryx-color-data-teal-5: light-dark(#08767D, #08767D);
174
- --astryx-color-data-teal-4: light-dark(#0C9293, #0C9293);
175
- --astryx-color-data-teal-3: light-dark(#0DB7AF, #0DB7AF);
176
- --astryx-color-data-teal-2: light-dark(#6CE6D8, #6CE6D8);
177
- --astryx-color-data-teal-1: light-dark(#D7FCF8, #D7FCF8);
178
-
179
- --astryx-color-data-yellow-5: light-dark(#8A5001, #8A5001);
180
- --astryx-color-data-yellow-4: light-dark(#D69804, #D69804);
181
- --astryx-color-data-yellow-3: light-dark(#FBCE03, #FBCE03);
182
- --astryx-color-data-yellow-2: light-dark(#FCEC85, #FCEC85);
183
- --astryx-color-data-yellow-1: light-dark(#FDF6BA, #FDF6BA);
184
-
185
- --astryx-color-data-gray-5: light-dark(#25363F, #333338);
186
- --astryx-color-data-gray-4: light-dark(#5D6C7B, #666A72);
187
- --astryx-color-data-gray-3: light-dark(#AFB9C4, #B2B8BE);
188
- --astryx-color-data-gray-2: light-dark(#CCD3DB, #D0D3D6);
189
- --astryx-color-data-gray-1: light-dark(#F1F4F7, #F2F4F6);
190
-
191
- --astryx-spacing-0: 0;
118
+ --astryx-spacing-0: 0rem;
192
119
  --astryx-spacing-0-5: 0.1875rem;
193
120
  --astryx-spacing-1: 0.375rem;
194
121
  --astryx-spacing-1-5: 0.5625rem;
@@ -199,10 +126,10 @@
199
126
  --astryx-spacing-6: 2.25rem;
200
127
  --astryx-spacing-7: 2.625rem;
201
128
  --astryx-spacing-8: 3rem;
202
- --astryx-spacing-9: 36px;
203
- --astryx-spacing-10: 40px;
204
- --astryx-spacing-11: 44px;
205
- --astryx-spacing-12: 48px;
129
+ --astryx-spacing-9: 2.25rem;
130
+ --astryx-spacing-10: 2.5rem;
131
+ --astryx-spacing-11: 2.75rem;
132
+ --astryx-spacing-12: 3rem;
206
133
 
207
134
  --astryx-size-element-sm: 32px;
208
135
  --astryx-size-element-md: 40px;
@@ -245,7 +172,7 @@
245
172
  --astryx-ease-standard: cubic-bezier(0.24, 1, 0.4, 1);
246
173
 
247
174
  --astryx-font-family-body: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
248
- --astryx-font-family-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
175
+ --astryx-font-family-code: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
249
176
  --astryx-font-family-heading: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
250
177
 
251
178
  --astryx-font-size-4xs: 0.3125rem;
package/y2k/button.css CHANGED
@@ -2,14 +2,29 @@
2
2
 
3
3
  @layer astryx.tokens {
4
4
  [data-astryx-theme='y2k'] {
5
+ --astryx-button-border-width: 1px;
6
+ --astryx-button-border-style: solid;
7
+ --astryx-button-border-color: var(--astryx-color-border);
8
+
5
9
  --astryx-button-primary-background: var(--astryx-color-text-primary);
6
10
  --astryx-button-primary-foreground: var(--astryx-color-background-body);
11
+ --astryx-button-primary-border-color: transparent;
12
+
7
13
  --astryx-button-secondary-background: var(--astryx-color-background-green);
8
14
  --astryx-button-secondary-foreground: var(--astryx-color-text-green);
15
+ --astryx-button-secondary-border-width: 1px;
16
+ --astryx-button-secondary-border-color: var(--astryx-color-text-green);
17
+ --astryx-button-secondary-hover-overlay: var(--astryx-color-border-green);
18
+
9
19
  --astryx-button-ghost-background: transparent;
10
20
  --astryx-button-ghost-foreground: var(--astryx-color-text-primary);
21
+ --astryx-button-ghost-border-color: transparent;
22
+
11
23
  --astryx-button-destructive-background: var(--astryx-color-background-red);
12
24
  --astryx-button-destructive-foreground: var(--astryx-color-text-red);
25
+ --astryx-button-destructive-border-width: 1px;
26
+ --astryx-button-destructive-border-color: var(--astryx-color-text-red);
27
+
13
28
  --astryx-button-hover-overlay: var(--astryx-color-overlay-hover);
14
29
  --astryx-button-pressed-overlay: var(--astryx-color-overlay-pressed);
15
30
  --astryx-button-focus: var(--astryx-color-accent);
@@ -22,9 +37,3 @@
22
37
  --astryx-button-shadow-high: var(--astryx-shadow-high);
23
38
  }
24
39
  }
25
-
26
- @layer astryx.components {
27
- [data-astryx-theme='y2k'] .astryx-button[data-variant='secondary'] {
28
- border: 1px solid var(--astryx-color-text-green);
29
- }
30
- }
package/y2k/card.css CHANGED
@@ -3,6 +3,7 @@
3
3
  @layer astryx.tokens {
4
4
  [data-astryx-theme='y2k'] {
5
5
  --astryx-card-background: var(--astryx-color-background-card);
6
+ --astryx-card-padding: var(--astryx-spacing-3);
6
7
  --astryx-card-muted-background: var(--astryx-color-background-muted);
7
8
  --astryx-card-border: var(--astryx-color-border);
8
9
  --astryx-card-shadow-low: var(--astryx-shadow-low);
package/y2k/code.css CHANGED
@@ -30,10 +30,11 @@
30
30
  --astryx-code-syntax-property: light-dark(#3c6755, #87b5a1);
31
31
  --astryx-code-syntax-punctuation: light-dark(#5e5e5e, #ababab);
32
32
 
33
- --astryx-code-syntax-added: color-mix(in srgb, var(--astryx-color-success-muted) 25%, transparent);
34
- --astryx-code-syntax-removed: color-mix(in srgb, var(--astryx-color-error-muted) 25%, transparent);
33
+ /* 差异行是带透明度的淡绿、淡红,压住亮度让行内语法保持 4.5:1 以上。 */
34
+ --astryx-code-syntax-added: light-dark(#c5e17a40, #c5e17a33);
35
+ --astryx-code-syntax-removed: light-dark(#ffc5c340, #ffc5c333);
35
36
  --astryx-code-syntax-diff-header: var(--astryx-color-background-muted);
36
- --astryx-code-syntax-added-marker: var(--astryx-color-text-green);
37
- --astryx-code-syntax-removed-marker: var(--astryx-color-text-red);
37
+ --astryx-code-syntax-added-marker: light-dark(#3a5500, #a5af8b);
38
+ --astryx-code-syntax-removed-marker: light-dark(#8b1d24, #d19f9d);
38
39
  }
39
40
  }
@@ -0,0 +1,7 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.tokens {
4
+ [data-astryx-theme='y2k'] {
5
+ --astryx-section-padding: var(--astryx-spacing-3);
6
+ }
7
+ }
@@ -0,0 +1,22 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ /*
4
+ * 选中的导航项不用底色,靠字重和主文字色区分;悬停和按压只叠上中性层。
5
+ */
6
+ @layer astryx.overrides {
7
+ [data-astryx-theme='y2k'] .astryx-top-nav-item.astryx-nav-item--selected {
8
+ background: transparent;
9
+ }
10
+
11
+ @media (hover: hover) {
12
+ [data-astryx-theme='y2k'] .astryx-top-nav-item.astryx-nav-item--selected:hover {
13
+ background: var(--astryx-color-overlay-hover);
14
+ }
15
+ }
16
+
17
+ @media not all and (pointer: coarse) {
18
+ [data-astryx-theme='y2k'] .astryx-top-nav-item.astryx-nav-item--selected:active {
19
+ background: var(--astryx-color-overlay-pressed);
20
+ }
21
+ }
22
+ }