@astryx-vue/themes 0.33.3 → 0.34.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.
package/README.md CHANGED
@@ -24,7 +24,7 @@ import '@astryx-vue/themes/neutral.css'
24
24
 
25
25
  Put `data-astryx-theme` on the element that should take the theme. On `html`, that is the whole app. On a smaller element, only that subtree. Neutral also writes the same variables on `:root`, so a single-theme app can import `neutral.css` without the attribute. The other themes do not touch `:root`.
26
26
 
27
- Every theme loads Figtree and JetBrains Mono (400, 500, 600, 700, and 400 italic; Figtree also includes 600 italic). Butter, Chocolate, Gothic, Matcha, Stone, and Y2K also load their own text faces.
27
+ Every theme loads Figtree and JetBrains Mono (400, 500, 600, 700, and 400 italic; Figtree also includes 600 italic). Butter, Chocolate, Gothic, Matcha, Stone, and Y2K also load their own text faces. All faces come from `@fontsource` packages the themes package depends on, so a page loads its fonts from its own origin and never from a font service.
28
28
 
29
29
  ## Entries
30
30
 
package/butter/base.css CHANGED
@@ -7,7 +7,11 @@
7
7
  * Tokens the theme does not set keep the shared default from Neutral's base.
8
8
  * Figtree and JetBrains Mono stay on the shared fonts.css stack.
9
9
  */
10
- @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Sarina&display=swap');
10
+ @import '@fontsource/outfit/400.css';
11
+ @import '@fontsource/outfit/500.css';
12
+ @import '@fontsource/outfit/600.css';
13
+ @import '@fontsource/outfit/700.css';
14
+ @import '@fontsource/sarina/400.css';
11
15
  @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
12
16
 
13
17
  @layer astryx.tokens {
package/butter/input.css CHANGED
@@ -10,14 +10,14 @@
10
10
  --astryx-input-height-sm: var(--astryx-size-element-sm);
11
11
  --astryx-input-height-md: var(--astryx-size-element-md);
12
12
  --astryx-input-height-lg: var(--astryx-size-element-lg);
13
- /* 状态描边、状态图标和状态提示条都用状态条那套醒目色。 */
13
+ /* 状态提示条用状态条那套醒目色;描边和图标在浅色下取色阶中段,才能在输入框底色上达到 3:1。 */
14
14
  --astryx-input-error: #fc473b;
15
15
  --astryx-input-error-foreground: #ffffff;
16
16
  --astryx-input-error-background: #fc473b;
17
- --astryx-input-warning: #ffc502;
17
+ --astryx-input-warning: light-dark(#958500, #ffc502);
18
18
  --astryx-input-warning-foreground: #1d1c11;
19
19
  --astryx-input-warning-background: #ffc502;
20
- --astryx-input-success: #91d143;
20
+ --astryx-input-success: light-dark(#4a984a, #91d143);
21
21
  --astryx-input-success-foreground: #1d1c11;
22
22
  --astryx-input-success-background: #91d143;
23
23
  }
@@ -201,7 +201,7 @@
201
201
  --astryx-color-text-accent: light-dark(#225bff, #fdee8c);
202
202
  }
203
203
 
204
- [data-astryx-theme='butter'] .astryx-table tbody tr:nth-child(even of :not([data-expansion-panel])) {
204
+ [data-astryx-theme='butter'] .astryx-table[data-striped='true'] tbody tr:nth-child(even of :not([data-expansion-panel])) {
205
205
  --astryx-color-text-primary: light-dark(#1d1c11, #f3f2e2);
206
206
  --astryx-color-text-secondary: light-dark(#605f52, #adac9e);
207
207
  --astryx-color-text-accent: light-dark(#225bff, #fdee8c);
@@ -7,10 +7,27 @@
7
7
  --astryx-progress-bar-track-height-lg: 12px;
8
8
  --astryx-progress-bar-track-background: light-dark(#e5e3d4, #725538);
9
9
  --astryx-progress-bar-fill-background: var(--astryx-color-accent);
10
- /* 填充用和状态条同一套醒目色。 */
11
- --astryx-progress-bar-success-fill: #91d143;
12
- --astryx-progress-bar-warning-fill: #ffc502;
13
- --astryx-progress-bar-error-fill: #fc473b;
10
+ /* 状态填充取主题的状态色,在这条轨道上都够 3:1。 */
11
+ --astryx-progress-bar-success-fill: var(--astryx-color-success);
12
+ --astryx-progress-bar-warning-fill: var(--astryx-color-warning);
13
+ --astryx-progress-bar-error-fill: var(--astryx-color-error);
14
+ /* 次要文字色在暗色轨道上低于 3:1,中性和禁用的填充在暗色下取更亮的一档。 */
15
+ --astryx-progress-bar-neutral-fill: light-dark(var(--astryx-color-text-secondary), #d6d3b8);
14
16
  --astryx-progress-bar-info-fill: var(--astryx-color-background-blue);
15
17
  }
16
18
  }
19
+
20
+ @layer astryx.overrides {
21
+ /* 状态填充就是状态色,填充里的标记取那个状态的 on 色。 */
22
+ [data-astryx-theme='butter'] .astryx-progress-bar[data-variant='success']:not([data-disabled]) .astryx-progress-bar-mark[data-placement='fill'] {
23
+ background: var(--astryx-color-on-success);
24
+ }
25
+
26
+ [data-astryx-theme='butter'] .astryx-progress-bar[data-variant='warning']:not([data-disabled]) .astryx-progress-bar-mark[data-placement='fill'] {
27
+ background: var(--astryx-color-on-warning);
28
+ }
29
+
30
+ [data-astryx-theme='butter'] .astryx-progress-bar[data-variant='error']:not([data-disabled]) .astryx-progress-bar-mark[data-placement='fill'] {
31
+ background: var(--astryx-color-on-error);
32
+ }
33
+ }
@@ -7,7 +7,11 @@
7
7
  * Tokens the theme does not set keep the shared default from Neutral's base.
8
8
  * Figtree and JetBrains Mono stay on the shared fonts.css stack.
9
9
  */
10
- @import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&display=swap');
10
+ @import '@fontsource/albert-sans/400.css';
11
+ @import '@fontsource/albert-sans/500.css';
12
+ @import '@fontsource/albert-sans/600.css';
13
+ @import '@fontsource/albert-sans/700.css';
14
+ @import '@fontsource-variable/fraunces/opsz.css';
11
15
  @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
12
16
 
13
17
  @layer astryx.tokens {
@@ -93,7 +97,7 @@
93
97
  --astryx-color-background-cyan: light-dark(#3a7c7c33, #3a7c7c33);
94
98
  --astryx-color-border-cyan: light-dark(#3a7c7c, #70c4c4);
95
99
  --astryx-color-icon-cyan: light-dark(#3a7c7c, #70c4c4);
96
- --astryx-color-text-cyan: light-dark(#2e6060, #82d4d4);
100
+ --astryx-color-text-cyan: light-dark(#2d5f5f, #82d4d4);
97
101
 
98
102
  --astryx-color-background-gray: light-dark(#B8885933, #6b554033);
99
103
  --astryx-color-border-gray: light-dark(#B88859, #B88859);
@@ -103,17 +107,17 @@
103
107
  --astryx-color-background-green: light-dark(#70990033, #96bf2a33);
104
108
  --astryx-color-border-green: light-dark(#709900, #96bf2a);
105
109
  --astryx-color-icon-green: light-dark(#709900, #96bf2a);
106
- --astryx-color-text-green: light-dark(#4e6c00, #a8d43a);
110
+ --astryx-color-text-green: light-dark(#476300, #a8d43a);
107
111
 
108
112
  --astryx-color-background-orange: light-dark(#c4762033, #d4903a33);
109
113
  --astryx-color-border-orange: light-dark(#c47620, #d4903a);
110
114
  --astryx-color-icon-orange: light-dark(#c47620, #d4903a);
111
- --astryx-color-text-orange: light-dark(#925314, #e0a04a);
115
+ --astryx-color-text-orange: light-dark(#894a04, #e0a04a);
112
116
 
113
117
  --astryx-color-background-pink: light-dark(#c44a7033, #e07a9a33);
114
118
  --astryx-color-border-pink: light-dark(#c44a70, #e07a9a);
115
119
  --astryx-color-icon-pink: light-dark(#c44a70, #e07a9a);
116
- --astryx-color-text-pink: light-dark(#a03a5a, #f08aaa);
120
+ --astryx-color-text-pink: light-dark(#963152, #f08aaa);
117
121
 
118
122
  --astryx-color-background-purple: light-dark(#6b4a8c33, #b08ed433);
119
123
  --astryx-color-border-purple: light-dark(#6b4a8c, #b08ed4);
@@ -123,7 +127,7 @@
123
127
  --astryx-color-background-red: light-dark(#FD000033, #ff5c5c33);
124
128
  --astryx-color-border-red: light-dark(#FD0000, #ff5c5c);
125
129
  --astryx-color-icon-red: light-dark(#FD0000, #ff5c5c);
126
- --astryx-color-text-red: light-dark(#b60000, #ff7a7a);
130
+ --astryx-color-text-red: light-dark(#a80000, #ff7a7a);
127
131
 
128
132
  --astryx-color-background-teal: light-dark(#2e6b5a33, #5ab89833);
129
133
  --astryx-color-border-teal: light-dark(#2e6b5a, #5ab898);
@@ -133,7 +137,7 @@
133
137
  --astryx-color-background-yellow: light-dark(#FFB60033, #ffc94033);
134
138
  --astryx-color-border-yellow: light-dark(#FFB600, #ffc940);
135
139
  --astryx-color-icon-yellow: light-dark(#FFB600, #ffc940);
136
- --astryx-color-text-yellow: light-dark(#8b6200, #ffd960);
140
+ --astryx-color-text-yellow: light-dark(#805a00, #ffd960);
137
141
 
138
142
  --astryx-spacing-0: 0rem;
139
143
  --astryx-spacing-0-5: 0.125rem;
@@ -197,7 +201,7 @@
197
201
 
198
202
  --astryx-font-family-body: 'Albert Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
199
203
  --astryx-font-family-code: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
200
- --astryx-font-family-heading: Fraunces, Georgia, 'Times New Roman', Times, serif;
204
+ --astryx-font-family-heading: 'Fraunces Variable', Fraunces, Georgia, 'Times New Roman', Times, serif;
201
205
 
202
206
  --_scaled-font-size-4xs: min(calc(0.375rem * var(--_dynamic-type-caption2, 1)), var(--_scaled-font-size-3xs));
203
207
  --astryx-font-size-4xs: var(--_scaled-font-size-4xs);
@@ -0,0 +1,40 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.overrides {
4
+ /* 冷色调卡片上的链接取更深的一档,次要文字也退一档,读得清选中行、编号引用的强调色底纹。 */
5
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='blue'] {
6
+ --astryx-color-text-accent: light-dark(#7d4e21, #d4a06a);
7
+ --astryx-color-text-secondary: light-dark(#7b4200, #c4a882);
8
+ }
9
+
10
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='cyan'] {
11
+ --astryx-color-text-accent: light-dark(#7d4e21, #d4a06a);
12
+ }
13
+
14
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='pink'] {
15
+ --astryx-color-text-accent: light-dark(#7d4e21, #d4a06a);
16
+ }
17
+
18
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='purple'] {
19
+ --astryx-color-text-accent: light-dark(#7d4e21, #d4a06a);
20
+ --astryx-color-text-secondary: light-dark(#7b4200, #c4a882);
21
+ }
22
+
23
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='red'] {
24
+ --astryx-color-text-accent: light-dark(#7d4e21, #d4a06a);
25
+ --astryx-color-text-secondary: light-dark(#7b4200, #c4a882);
26
+ }
27
+
28
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='teal'] {
29
+ --astryx-color-text-accent: light-dark(#7d4e21, #d4a06a);
30
+ --astryx-color-text-secondary: light-dark(#7b4200, #e4ad77);
31
+ }
32
+
33
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='green'] {
34
+ --astryx-color-text-secondary: light-dark(#894d0e, #e4ad77);
35
+ }
36
+
37
+ [data-astryx-theme='chocolate'] .astryx-card[data-variant='yellow'] {
38
+ --astryx-color-text-secondary: light-dark(#894d0e, #f4ba82);
39
+ }
40
+ }
@@ -7,9 +7,6 @@
7
7
  --astryx-progress-bar-track-height-lg: 12px;
8
8
  --astryx-progress-bar-track-background: var(--astryx-color-background-muted);
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);
13
10
  --astryx-progress-bar-info-fill: var(--astryx-color-background-blue);
14
11
  }
15
12
  }
package/chocolate.css CHANGED
@@ -10,6 +10,7 @@
10
10
  @import './chocolate/bottom-sheet.css';
11
11
  @import './chocolate/button.css';
12
12
  @import './chocolate/card.css';
13
+ @import './chocolate/card-text.css';
13
14
  @import './chocolate/center.css';
14
15
  @import './chocolate/chat.css';
15
16
  @import './chocolate/checkbox.css';
package/gothic/base.css CHANGED
@@ -7,7 +7,12 @@
7
7
  * Tokens the theme does not set keep the shared default from Neutral's base.
8
8
  * Figtree and JetBrains Mono stay on the shared fonts.css stack.
9
9
  */
10
- @import url('https://fonts.googleapis.com/css2?family=Fustat:wght@400;500;600;700&family=Manufacturing+Consent&family=UnifrakturMaguntia&display=swap');
10
+ @import '@fontsource/fustat/400.css';
11
+ @import '@fontsource/fustat/500.css';
12
+ @import '@fontsource/fustat/600.css';
13
+ @import '@fontsource/fustat/700.css';
14
+ @import '@fontsource/manufacturing-consent/400.css';
15
+ @import '@fontsource/unifrakturmaguntia/400.css';
11
16
  @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
12
17
 
13
18
  @layer astryx.tokens {
@@ -0,0 +1,16 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.overrides {
4
+ /*
5
+ * Gothic 的强调文字和图标是同一个浅色。媒体表面(MediaTheme)重新声明了 accent,
6
+ * 但没有重新声明强调文字和图标,浅色表面上它们就停在近白色上。
7
+ * 这里让它们跟着各自表面的 accent;深色表面嵌在浅色表面里时也拿回自己的浅色强调。
8
+ */
9
+ [data-astryx-theme='gothic'] [data-astryx-media='dark'],
10
+ [data-astryx-theme='gothic'] [data-astryx-media='light'],
11
+ [data-astryx-theme='gothic'][data-astryx-media='dark'],
12
+ [data-astryx-theme='gothic'][data-astryx-media='light'] {
13
+ --astryx-color-text-accent: var(--astryx-color-accent);
14
+ --astryx-color-icon-accent: var(--astryx-color-accent);
15
+ }
16
+ }
@@ -131,7 +131,7 @@
131
131
  --astryx-color-text-accent: #e8f1f6;
132
132
  }
133
133
 
134
- [data-astryx-theme='gothic'] .astryx-table tbody tr:nth-child(even of :not([data-expansion-panel])) {
134
+ [data-astryx-theme='gothic'] .astryx-table[data-striped='true'] tbody tr:nth-child(even of :not([data-expansion-panel])) {
135
135
  --astryx-color-text-primary: #e8f1f6;
136
136
  --astryx-color-text-secondary: #96a0ab;
137
137
  --astryx-color-text-accent: #e8f1f6;
@@ -7,9 +7,6 @@
7
7
  --astryx-progress-bar-track-height-lg: 12px;
8
8
  --astryx-progress-bar-track-background: var(--astryx-color-background-muted);
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);
13
10
  --astryx-progress-bar-info-fill: var(--astryx-color-background-blue);
14
11
  }
15
12
  }
package/gothic.css CHANGED
@@ -29,6 +29,7 @@
29
29
  @import './gothic/kbd.css';
30
30
  @import './gothic/link.css';
31
31
  @import './gothic/list.css';
32
+ @import './gothic/media-accent.css';
32
33
  @import './gothic/mobile-nav.css';
33
34
  @import './gothic/more-menu.css';
34
35
  @import './gothic/nav-menu.css';
package/matcha/base.css CHANGED
@@ -7,7 +7,11 @@
7
7
  * Tokens the theme does not set keep the shared default from Neutral's base.
8
8
  * Figtree and JetBrains Mono stay on the shared fonts.css stack.
9
9
  */
10
- @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playwrite+US+Trad&display=swap');
10
+ @import '@fontsource/dm-sans/400.css';
11
+ @import '@fontsource/dm-sans/500.css';
12
+ @import '@fontsource/dm-sans/600.css';
13
+ @import '@fontsource/dm-sans/700.css';
14
+ @import '@fontsource/playwrite-us-trad/400.css';
11
15
  @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
12
16
 
13
17
  @layer astryx.tokens {
@@ -27,7 +31,7 @@
27
31
  --astryx-color-overlay: light-dark(#3E481D80, #3E481DCC);
28
32
  --astryx-color-overlay-hover: light-dark(#3E481D0D, #C0CBA90D);
29
33
  --astryx-color-overlay-pressed: light-dark(#3E481D1A, #C0CBA91A);
30
- --astryx-color-background-muted: light-dark(#F0F0E0, #3E481D);
34
+ --astryx-color-background-muted: light-dark(#F0F0E0, #12140e);
31
35
 
32
36
  --astryx-color-text-primary: light-dark(#3E481D, #C0CBA9);
33
37
  --astryx-color-text-secondary: light-dark(#5a6b2a, #a8bf6a);
@@ -42,7 +46,7 @@
42
46
  --astryx-color-icon-disabled: light-dark(#C0CBA9, #5a6440);
43
47
 
44
48
  --astryx-color-background-card: light-dark(#FFFFFF, #1e2016);
45
- --astryx-color-background-popover: light-dark(#FFFFFF, #3E481D);
49
+ --astryx-color-background-popover: light-dark(#FFFFFF, #1e2016);
46
50
  --astryx-color-background-inverted: light-dark(#3E481D, #C0CBA9);
47
51
  --astryx-color-background-error-inverted: light-dark(#aa071e, #e3193b);
48
52
 
@@ -0,0 +1,49 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.overrides {
4
+ /* 卡片上的次要文字(以及灰底卡片的主文字)退到够 4.5:1 的色阶:落在卡片底色上,以及其上选中行、编号引用的强调色底纹上都读得清。 */
5
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='blue'] {
6
+ --astryx-color-text-secondary: light-dark(#3e481d, #a8bf6a);
7
+ }
8
+
9
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='cyan'] {
10
+ --astryx-color-text-secondary: light-dark(#4c5924, #a8bf6a);
11
+ }
12
+
13
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='gray'] {
14
+ --astryx-color-text-secondary: light-dark(#4c5924, #a8bf6a);
15
+ }
16
+
17
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='green'] {
18
+ --astryx-color-text-secondary: light-dark(#4c5924, #c0cba9);
19
+ }
20
+
21
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='orange'] {
22
+ --astryx-color-text-secondary: light-dark(#4c5924, #a8bf6a);
23
+ }
24
+
25
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='pink'] {
26
+ --astryx-color-text-secondary: light-dark(#4c5924, #a8bf6a);
27
+ }
28
+
29
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='purple'] {
30
+ --astryx-color-text-secondary: light-dark(#3e481d, #a8bf6a);
31
+ }
32
+
33
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='red'] {
34
+ --astryx-color-text-secondary: light-dark(#3e481d, #a8bf6a);
35
+ }
36
+
37
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='teal'] {
38
+ --astryx-color-text-secondary: light-dark(#3e481d, #c0cba9);
39
+ }
40
+
41
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='yellow'] {
42
+ --astryx-color-text-secondary: light-dark(#4c5924, #c0cba9);
43
+ }
44
+
45
+ [data-astryx-theme='matcha'] .astryx-card[data-variant='muted'] {
46
+ --astryx-color-text-primary: light-dark(#3e481d, #cdd8b9);
47
+ --astryx-color-text-secondary: light-dark(#5a6b2a, #cdd8b9);
48
+ }
49
+ }
@@ -7,9 +7,6 @@
7
7
  --astryx-progress-bar-track-height-lg: 12px;
8
8
  --astryx-progress-bar-track-background: var(--astryx-color-background-muted);
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);
13
10
  --astryx-progress-bar-info-fill: var(--astryx-color-background-blue);
14
11
  }
15
12
  }
package/matcha.css CHANGED
@@ -10,6 +10,7 @@
10
10
  @import './matcha/bottom-sheet.css';
11
11
  @import './matcha/button.css';
12
12
  @import './matcha/card.css';
13
+ @import './matcha/card-text.css';
13
14
  @import './matcha/center.css';
14
15
  @import './matcha/chat.css';
15
16
  @import './matcha/checkbox.css';
@@ -0,0 +1,49 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.overrides {
4
+ /* 深色模式下,分类色卡片上的次要文字取更亮的一档,在卡片底色和悬停态下都够 4.5:1。 */
5
+ :where(:root) .astryx-card[data-variant='blue']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
6
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='blue'] {
7
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
8
+ }
9
+
10
+ :where(:root) .astryx-card[data-variant='cyan']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
11
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='cyan'] {
12
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
13
+ }
14
+
15
+ :where(:root) .astryx-card[data-variant='green']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
16
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='green'] {
17
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
18
+ }
19
+
20
+ :where(:root) .astryx-card[data-variant='orange']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
21
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='orange'] {
22
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
23
+ }
24
+
25
+ :where(:root) .astryx-card[data-variant='pink']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
26
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='pink'] {
27
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
28
+ }
29
+
30
+ :where(:root) .astryx-card[data-variant='purple']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
31
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='purple'] {
32
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
33
+ }
34
+
35
+ :where(:root) .astryx-card[data-variant='red']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
36
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='red'] {
37
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
38
+ }
39
+
40
+ :where(:root) .astryx-card[data-variant='teal']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
41
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='teal'] {
42
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
43
+ }
44
+
45
+ :where(:root) .astryx-card[data-variant='yellow']:not(:where([data-astryx-theme]:not([data-astryx-theme='neutral']) *)),
46
+ [data-astryx-theme='neutral'] .astryx-card[data-variant='yellow'] {
47
+ --astryx-color-text-secondary: light-dark(#474747, #b9b9b9);
48
+ }
49
+ }
@@ -8,9 +8,8 @@
8
8
  --astryx-progress-bar-track-height-lg: 12px;
9
9
  --astryx-progress-bar-track-background: var(--astryx-color-border-emphasized);
10
10
  --astryx-progress-bar-fill-background: var(--astryx-color-accent);
11
- --astryx-progress-bar-success-fill: var(--astryx-color-success);
12
- --astryx-progress-bar-warning-fill: var(--astryx-color-warning);
13
- --astryx-progress-bar-error-fill: var(--astryx-color-error);
14
11
  --astryx-progress-bar-info-fill: var(--astryx-color-info);
12
+ /* 次要文字色在暗色轨道上低于 3:1,中性和禁用的填充在暗色下取更亮的一档。 */
13
+ --astryx-progress-bar-neutral-fill: light-dark(var(--astryx-color-text-secondary), #b9b9b9);
15
14
  }
16
15
  }
package/neutral.css CHANGED
@@ -10,6 +10,7 @@
10
10
  @import './neutral/bottom-sheet.css';
11
11
  @import './neutral/button.css';
12
12
  @import './neutral/card.css';
13
+ @import './neutral/card-text.css';
13
14
  @import './neutral/center.css';
14
15
  @import './neutral/chat.css';
15
16
  @import './neutral/checkbox.css';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/themes",
3
3
  "type": "module",
4
- "version": "0.33.3",
4
+ "version": "0.34.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",
@@ -57,8 +57,20 @@
57
57
  "y2k.css"
58
58
  ],
59
59
  "dependencies": {
60
+ "@fontsource-variable/fraunces": "5.3.0",
61
+ "@fontsource/albert-sans": "5.3.0",
62
+ "@fontsource/crimson-text": "5.3.0",
63
+ "@fontsource/dm-sans": "5.3.0",
60
64
  "@fontsource/figtree": "5.3.0",
61
- "@fontsource/jetbrains-mono": "5.3.0"
65
+ "@fontsource/fustat": "5.3.0",
66
+ "@fontsource/jetbrains-mono": "5.3.0",
67
+ "@fontsource/manufacturing-consent": "5.3.0",
68
+ "@fontsource/montserrat": "5.3.0",
69
+ "@fontsource/outfit": "5.3.0",
70
+ "@fontsource/playwrite-us-trad": "5.3.0",
71
+ "@fontsource/poppins": "5.3.0",
72
+ "@fontsource/sarina": "5.3.0",
73
+ "@fontsource/unifrakturmaguntia": "5.3.0"
62
74
  },
63
75
  "publishConfig": {
64
76
  "access": "public"
package/stone/base.css CHANGED
@@ -7,7 +7,10 @@
7
7
  * Tokens the theme does not set keep the shared default from Neutral's base.
8
8
  * Figtree and JetBrains Mono stay on the shared fonts.css stack.
9
9
  */
10
- @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
10
+ @import '@fontsource/montserrat/400.css';
11
+ @import '@fontsource/montserrat/500.css';
12
+ @import '@fontsource/montserrat/600.css';
13
+ @import '@fontsource/montserrat/700.css';
11
14
  @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
12
15
 
13
16
  @layer astryx.tokens {
@@ -0,0 +1,48 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.overrides {
4
+ /* 卡片上的次要文字退到够 4.5:1 的中性色阶:落在分类色卡片、灰底卡片上,以及其上选中行、编号引用的强调色底纹上都读得清。 */
5
+ [data-astryx-theme='stone'] .astryx-card[data-variant='muted'] {
6
+ --astryx-color-text-secondary: light-dark(#525259, #c6c6cf);
7
+ }
8
+
9
+ [data-astryx-theme='stone'] .astryx-card[data-variant='blue'] {
10
+ --astryx-color-text-secondary: light-dark(#525259, #f0f0f9);
11
+ }
12
+
13
+ [data-astryx-theme='stone'] .astryx-card[data-variant='cyan'] {
14
+ --astryx-color-text-secondary: light-dark(#525259, #f0f0f9);
15
+ }
16
+
17
+ [data-astryx-theme='stone'] .astryx-card[data-variant='gray'] {
18
+ --astryx-color-text-secondary: light-dark(#525259, #f0f0f9);
19
+ }
20
+
21
+ [data-astryx-theme='stone'] .astryx-card[data-variant='green'] {
22
+ --astryx-color-text-secondary: light-dark(#525259, #f0f0f9);
23
+ }
24
+
25
+ [data-astryx-theme='stone'] .astryx-card[data-variant='orange'] {
26
+ --astryx-color-text-secondary: light-dark(#525259, #e2e2e8);
27
+ }
28
+
29
+ [data-astryx-theme='stone'] .astryx-card[data-variant='pink'] {
30
+ --astryx-color-text-secondary: light-dark(#525259, #e2e2e8);
31
+ }
32
+
33
+ [data-astryx-theme='stone'] .astryx-card[data-variant='purple'] {
34
+ --astryx-color-text-secondary: light-dark(#525259, #f0f0f9);
35
+ }
36
+
37
+ [data-astryx-theme='stone'] .astryx-card[data-variant='red'] {
38
+ --astryx-color-text-secondary: light-dark(#525259, #e2e2e8);
39
+ }
40
+
41
+ [data-astryx-theme='stone'] .astryx-card[data-variant='teal'] {
42
+ --astryx-color-text-secondary: light-dark(#525259, #f0f0f9);
43
+ }
44
+
45
+ [data-astryx-theme='stone'] .astryx-card[data-variant='yellow'] {
46
+ --astryx-color-text-secondary: light-dark(#525259, #f0f0f9);
47
+ }
48
+ }
package/stone/input.css CHANGED
@@ -8,14 +8,14 @@
8
8
  --astryx-input-height-sm: var(--astryx-size-element-sm);
9
9
  --astryx-input-height-md: var(--astryx-size-element-md);
10
10
  --astryx-input-height-lg: var(--astryx-size-element-lg);
11
- /* 状态描边和状态图标用柔和的 T60/T70,和上方状态提示底色同族。 */
12
- --astryx-input-error: light-dark(#a58b86, #c0a5a1);
11
+ /* 状态描边和状态图标用柔和的中段色阶(浅色 T55/T60,深色 T70),和上方状态提示底色同族。 */
12
+ --astryx-input-error: light-dark(#a98984, #c6a29c);
13
13
  --astryx-input-error-foreground: var(--astryx-color-text-red);
14
14
  --astryx-input-error-background: var(--astryx-color-background-red);
15
- --astryx-input-warning: light-dark(#9f8f68, #bbaa81);
15
+ --astryx-input-warning: light-dark(#a08c36, #c2af6e);
16
16
  --astryx-input-warning-foreground: var(--astryx-color-text-yellow);
17
17
  --astryx-input-warning-background: var(--astryx-color-background-yellow);
18
- --astryx-input-success: light-dark(#7f977e, #99b298);
18
+ --astryx-input-success: light-dark(#609757, #90ba8a);
19
19
  --astryx-input-success-foreground: var(--astryx-color-text-green);
20
20
  --astryx-input-success-background: var(--astryx-color-background-green);
21
21
  }
@@ -7,11 +7,33 @@
7
7
  --astryx-progress-bar-track-height-lg: 12px;
8
8
  --astryx-progress-bar-track-background: var(--astryx-color-skeleton);
9
9
  --astryx-progress-bar-fill-background: var(--astryx-color-accent);
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);
10
+ /* accent 填充取蓝色阶,状态填充取主题的状态色,在 skeleton 轨道上两种模式都够 3:1。 */
11
+ --astryx-progress-bar-accent-fill: light-dark(#516074, #b6c8e1);
12
+ --astryx-progress-bar-success-fill: var(--astryx-color-success);
13
+ --astryx-progress-bar-warning-fill: var(--astryx-color-warning);
14
+ --astryx-progress-bar-error-fill: var(--astryx-color-error);
15
+ /* 次要文字色在暗色轨道上低于 3:1,中性和禁用的填充在暗色下取更亮的一档。 */
16
+ --astryx-progress-bar-neutral-fill: light-dark(var(--astryx-color-text-secondary), #c6c6cf);
15
17
  --astryx-progress-bar-info-fill: var(--astryx-color-background-blue);
16
18
  }
17
19
  }
20
+
21
+ @layer astryx.overrides {
22
+ /* 浅色下 accent 填充是深色阶,标记取白;深色下填充是浅色阶,标记取深墨。 */
23
+ [data-astryx-theme='stone'] .astryx-progress-bar[data-variant='accent']:not([data-disabled]) .astryx-progress-bar-mark[data-placement='fill'] {
24
+ background: light-dark(#ffffff, var(--astryx-color-on-light));
25
+ }
26
+
27
+ /* 状态填充就是状态色,填充里的标记取那个状态的 on 色。 */
28
+ [data-astryx-theme='stone'] .astryx-progress-bar[data-variant='success']:not([data-disabled]) .astryx-progress-bar-mark[data-placement='fill'] {
29
+ background: var(--astryx-color-on-success);
30
+ }
31
+
32
+ [data-astryx-theme='stone'] .astryx-progress-bar[data-variant='warning']:not([data-disabled]) .astryx-progress-bar-mark[data-placement='fill'] {
33
+ background: var(--astryx-color-on-warning);
34
+ }
35
+
36
+ [data-astryx-theme='stone'] .astryx-progress-bar[data-variant='error']:not([data-disabled]) .astryx-progress-bar-mark[data-placement='fill'] {
37
+ background: var(--astryx-color-on-error);
38
+ }
39
+ }
package/stone.css CHANGED
@@ -10,6 +10,7 @@
10
10
  @import './stone/bottom-sheet.css';
11
11
  @import './stone/button.css';
12
12
  @import './stone/card.css';
13
+ @import './stone/card-text.css';
13
14
  @import './stone/center.css';
14
15
  @import './stone/chat.css';
15
16
  @import './stone/checkbox.css';
package/y2k/base.css CHANGED
@@ -7,7 +7,13 @@
7
7
  * Tokens the theme does not set keep the shared default from Neutral's base.
8
8
  * Figtree and JetBrains Mono stay on the shared fonts.css stack.
9
9
  */
10
- @import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=Poppins:wght@400;500;600;700&display=swap');
10
+ @import '@fontsource/crimson-text/400.css';
11
+ @import '@fontsource/crimson-text/600.css';
12
+ @import '@fontsource/crimson-text/700.css';
13
+ @import '@fontsource/poppins/400.css';
14
+ @import '@fontsource/poppins/500.css';
15
+ @import '@fontsource/poppins/600.css';
16
+ @import '@fontsource/poppins/700.css';
11
17
  @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
12
18
 
13
19
  @layer astryx.tokens {
@@ -0,0 +1,64 @@
1
+ @layer astryx.reset, astryx.tokens, astryx.base, astryx.components, astryx.overrides;
2
+
3
+ @layer astryx.overrides {
4
+ /* 分类色卡片在深色模式下保持粉彩底色,所以文字取深色墨水:最近的、够 4.5:1 的中性色阶。 */
5
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='blue'] {
6
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
7
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
8
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
9
+ }
10
+
11
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='cyan'] {
12
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
13
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
14
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
15
+ }
16
+
17
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='gray'] {
18
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
19
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
20
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
21
+ }
22
+
23
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='green'] {
24
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
25
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
26
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
27
+ }
28
+
29
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='orange'] {
30
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
31
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
32
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
33
+ }
34
+
35
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='pink'] {
36
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
37
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
38
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
39
+ }
40
+
41
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='purple'] {
42
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
43
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
44
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
45
+ }
46
+
47
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='red'] {
48
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
49
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
50
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
51
+ }
52
+
53
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='teal'] {
54
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
55
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
56
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
57
+ }
58
+
59
+ [data-astryx-theme='y2k'] .astryx-card[data-variant='yellow'] {
60
+ --astryx-color-text-accent: light-dark(#2d241b, #1a1d31);
61
+ --astryx-color-text-primary: light-dark(#2d241b, #1a1d31);
62
+ --astryx-color-text-secondary: light-dark(#5a5146, #4a4f6b);
63
+ }
64
+ }
package/y2k/own-fill.css CHANGED
@@ -137,7 +137,7 @@
137
137
  --astryx-color-text-accent: light-dark(#2d241b, #edeffc);
138
138
  }
139
139
 
140
- [data-astryx-theme='y2k'] .astryx-table tbody tr:nth-child(even of :not([data-expansion-panel])) {
140
+ [data-astryx-theme='y2k'] .astryx-table[data-striped='true'] tbody tr:nth-child(even of :not([data-expansion-panel])) {
141
141
  --astryx-color-text-primary: light-dark(#2d241b, #edeffc);
142
142
  --astryx-color-text-secondary: light-dark(#5a5146, #a6acd6);
143
143
  --astryx-color-text-accent: light-dark(#2d241b, #edeffc);
@@ -7,9 +7,6 @@
7
7
  --astryx-progress-bar-track-height-lg: 12px;
8
8
  --astryx-progress-bar-track-background: var(--astryx-color-background-muted);
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);
13
10
  --astryx-progress-bar-info-fill: var(--astryx-color-background-blue);
14
11
  }
15
12
  }
package/y2k.css CHANGED
@@ -10,6 +10,7 @@
10
10
  @import './y2k/bottom-sheet.css';
11
11
  @import './y2k/button.css';
12
12
  @import './y2k/card.css';
13
+ @import './y2k/card-text.css';
13
14
  @import './y2k/center.css';
14
15
  @import './y2k/chat.css';
15
16
  @import './y2k/checkbox.css';