@atom63/ui-react 0.2.0-beta.14 → 0.2.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3LGXD3HE.js +450 -0
- package/dist/chunk-3LGXD3HE.js.map +1 -0
- package/dist/chunk-6HKGC3HE.js +3 -0
- package/dist/chunk-6HKGC3HE.js.map +1 -0
- package/dist/chunk-6VV4EBOO.js +25 -0
- package/dist/chunk-6VV4EBOO.js.map +1 -0
- package/dist/{chunk-IXWOWQBP.js → chunk-ALARPBUL.js} +5 -22
- package/dist/chunk-ALARPBUL.js.map +1 -0
- package/dist/chunk-FHL2NLXP.js +101 -0
- package/dist/chunk-FHL2NLXP.js.map +1 -0
- package/dist/chunk-HPUHI2YJ.js +69 -0
- package/dist/chunk-HPUHI2YJ.js.map +1 -0
- package/dist/chunk-QU33S646.js +118 -0
- package/dist/chunk-QU33S646.js.map +1 -0
- package/dist/components/art-plate/index.js +7 -0
- package/dist/components/art-plate/index.js.map +1 -0
- package/dist/components/layered-scene/index.js +7 -0
- package/dist/components/layered-scene/index.js.map +1 -0
- package/dist/components/segmented-control/index.js +1 -1
- package/dist/index.d.ts +89 -6
- package/dist/index.js +18 -13
- package/dist/media/index.d.ts +24 -3
- package/dist/media/index.js +9 -361
- package/dist/media/index.js.map +1 -1
- package/dist/media/media-lightbox/parts/index.js +2 -1
- package/dist/preview/index.js +4 -4
- package/dist/theme/index.d.ts +6 -2
- package/dist/theme/index.js +10 -1
- package/dist/theme/index.js.map +1 -1
- package/package.json +5 -3
- package/src/components/alert-dialog/alert-dialog.css +1 -1
- package/src/components/art-plate/art-plate.css +172 -0
- package/src/components/autocomplete/autocomplete.css +3 -3
- package/src/components/checkbox/checkbox.css +1 -1
- package/src/components/feedback-state/feedback-state.css +1 -1
- package/src/components/field/field.css +1 -1
- package/src/components/form/form.css +1 -1
- package/src/components/input/input.css +3 -3
- package/src/components/input-otp/input-otp.css +3 -3
- package/src/components/layered-scene/layered-scene.css +117 -0
- package/src/components/load-more-trigger/load-more-trigger.css +4 -2
- package/src/components/radio/radio.css +1 -1
- package/src/components/rating/rating.css +18 -17
- package/src/components/segmented-control/segmented-control.css +11 -11
- package/src/components/select/select.css +3 -3
- package/src/components/textarea/textarea.css +3 -3
- package/src/styles/recipes.css +2 -0
- package/dist/chunk-IXWOWQBP.js.map +0 -1
- package/dist/chunk-T7FUZUZO.js +0 -70
- package/dist/chunk-T7FUZUZO.js.map +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ArtPlate recipe — the SURFACE archetype. Levers: `data-size` (block size and
|
|
3
|
+
* shape), `data-safe-area` (where the content region sits), `data-tone` (theme
|
|
4
|
+
* text or on-media text), `data-veil` (gradient behind the safe area),
|
|
5
|
+
* `data-parallax` (scroll-driven drift). The focal point arrives as
|
|
6
|
+
* `--a63-art-plate-focus` / `--a63-art-plate-focus-mobile` from the component.
|
|
7
|
+
* Tokens only: no literal colors, logical directions, and focus styles on
|
|
8
|
+
* :focus-visible (`pnpm check:craft`).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.a63-ArtPlate {
|
|
12
|
+
--a63-art-plate-veil-color: var(--a63-surface-page);
|
|
13
|
+
--a63-art-plate-veil-strength: 0%;
|
|
14
|
+
|
|
15
|
+
position: relative;
|
|
16
|
+
isolation: isolate;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
display: grid;
|
|
19
|
+
overflow: clip;
|
|
20
|
+
min-block-size: 100svh;
|
|
21
|
+
background-color: var(--a63-surface-page);
|
|
22
|
+
color: var(--a63-text-primary);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.a63-ArtPlate[data-size='band'] {
|
|
26
|
+
min-block-size: 75svh;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.a63-ArtPlate[data-size='card'] {
|
|
30
|
+
min-block-size: 0;
|
|
31
|
+
aspect-ratio: 4 / 5;
|
|
32
|
+
border-radius: var(--radius-3xl);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (min-width: 768px) {
|
|
36
|
+
.a63-ArtPlate[data-size='card'] {
|
|
37
|
+
aspect-ratio: 16 / 9;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.a63-ArtPlate[data-tone='media'] {
|
|
42
|
+
--a63-art-plate-veil-color: var(--a63-media-scrim);
|
|
43
|
+
|
|
44
|
+
background-color: var(--a63-media-stage);
|
|
45
|
+
color: var(--a63-on-media-foreground);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Picture */
|
|
49
|
+
|
|
50
|
+
.a63-ArtPlate-image {
|
|
51
|
+
position: absolute;
|
|
52
|
+
inset: 0;
|
|
53
|
+
z-index: var(--z-layer-below);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.a63-ArtPlate-image img {
|
|
57
|
+
object-position: var(--a63-art-plate-focus, 50% 50%);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (max-width: 767px) {
|
|
61
|
+
.a63-ArtPlate-image img {
|
|
62
|
+
object-position: var(--a63-art-plate-focus-mobile, var(--a63-art-plate-focus, 50% 50%));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Veil: a gradient from the safe-area edge, under the content. */
|
|
67
|
+
|
|
68
|
+
.a63-ArtPlate[data-veil='soft'] {
|
|
69
|
+
--a63-art-plate-veil-strength: 55%;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.a63-ArtPlate[data-veil='strong'] {
|
|
73
|
+
--a63-art-plate-veil-strength: 85%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.a63-ArtPlate:not([data-veil='none'])::before {
|
|
77
|
+
--a63-art-plate-veil: color-mix(
|
|
78
|
+
in oklch,
|
|
79
|
+
var(--a63-art-plate-veil-color) var(--a63-art-plate-veil-strength),
|
|
80
|
+
transparent
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
content: '';
|
|
84
|
+
position: absolute;
|
|
85
|
+
inset: 0;
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
background-image: linear-gradient(to bottom, var(--a63-art-plate-veil), transparent 60%);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.a63-ArtPlate[data-safe-area='bottom']:not([data-veil='none'])::before {
|
|
91
|
+
background-image: linear-gradient(to top, var(--a63-art-plate-veil), transparent 60%);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.a63-ArtPlate[data-safe-area='center']:not([data-veil='none'])::before {
|
|
95
|
+
background-image: radial-gradient(closest-side, var(--a63-art-plate-veil), transparent);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.a63-ArtPlate[data-safe-area='start']:not([data-veil='none'])::before {
|
|
99
|
+
background-image: linear-gradient(to right, var(--a63-art-plate-veil), transparent 70%);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.a63-ArtPlate[data-safe-area='end']:not([data-veil='none'])::before {
|
|
103
|
+
background-image: linear-gradient(to left, var(--a63-art-plate-veil), transparent 70%);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.a63-ArtPlate[data-safe-area='start']:dir(rtl):not([data-veil='none'])::before {
|
|
107
|
+
background-image: linear-gradient(to left, var(--a63-art-plate-veil), transparent 70%);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.a63-ArtPlate[data-safe-area='end']:dir(rtl):not([data-veil='none'])::before {
|
|
111
|
+
background-image: linear-gradient(to right, var(--a63-art-plate-veil), transparent 70%);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Content region, placed in the safe area. */
|
|
115
|
+
|
|
116
|
+
.a63-ArtPlate-content {
|
|
117
|
+
position: relative;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
display: grid;
|
|
120
|
+
align-content: start;
|
|
121
|
+
inline-size: 100%;
|
|
122
|
+
padding-block: var(--spacing-24) var(--spacing-16);
|
|
123
|
+
padding-inline: var(--a63-space-6);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.a63-ArtPlate[data-size='card'] .a63-ArtPlate-content {
|
|
127
|
+
padding: var(--spacing-10);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.a63-ArtPlate[data-safe-area='bottom'] .a63-ArtPlate-content {
|
|
131
|
+
align-content: end;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.a63-ArtPlate[data-safe-area='center'] .a63-ArtPlate-content {
|
|
135
|
+
align-content: center;
|
|
136
|
+
justify-items: center;
|
|
137
|
+
text-align: center;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@media (min-width: 768px) {
|
|
141
|
+
.a63-ArtPlate[data-safe-area='start'] .a63-ArtPlate-content,
|
|
142
|
+
.a63-ArtPlate[data-safe-area='end'] .a63-ArtPlate-content {
|
|
143
|
+
align-content: center;
|
|
144
|
+
inline-size: 50%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.a63-ArtPlate[data-safe-area='end'] .a63-ArtPlate-content {
|
|
148
|
+
justify-self: end;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Parallax: the picture drifts slower than the page, about 5% of the scroll. */
|
|
153
|
+
|
|
154
|
+
@keyframes a63-art-plate-drift {
|
|
155
|
+
from {
|
|
156
|
+
translate: 0 -5%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
to {
|
|
160
|
+
translate: 0 5%;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
165
|
+
@supports (animation-timeline: view()) {
|
|
166
|
+
.a63-ArtPlate[data-parallax] .a63-ArtPlate-image {
|
|
167
|
+
inset-block: -6%;
|
|
168
|
+
animation: a63-art-plate-drift linear both;
|
|
169
|
+
animation-timeline: view();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
/* Invalid: the same danger edge as .a63-Input[data-invalid] (input.css). */
|
|
67
67
|
.a63-Autocomplete-input[data-invalid],
|
|
68
68
|
.a63-Autocomplete-input[aria-invalid='true'] {
|
|
69
|
-
--autocomplete-border:
|
|
70
|
-
--autocomplete-focus-border: var(--a63-
|
|
71
|
-
--autocomplete-focus-ring:
|
|
69
|
+
--autocomplete-border: var(--a63-border-danger);
|
|
70
|
+
--autocomplete-focus-border: var(--a63-status-danger);
|
|
71
|
+
--autocomplete-focus-ring: var(--a63-status-danger);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.a63-Autocomplete-input[data-has-start-addon] {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.a63-Checkbox[aria-invalid='true'] {
|
|
110
|
-
border-color:
|
|
110
|
+
border-color: var(--a63-border-danger);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/* ── Sizes (md is the base rule above) ─────────────────────────────────── */
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
text-wrap: balance;
|
|
26
26
|
}
|
|
27
27
|
.a63-FeedbackState[data-state='error'] {
|
|
28
|
-
--feedback-accent: var(--a63-
|
|
28
|
+
--feedback-accent: var(--a63-status-danger);
|
|
29
29
|
}
|
|
30
30
|
.a63-FeedbackState[data-state='loading'] {
|
|
31
31
|
--feedback-accent: var(--a63-action-primary);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Faithful to prod @atom63/ui field.tsx (flex column stacks, orientation
|
|
4
4
|
* variants, invalid-state recolor, muted description, destructive error) but
|
|
5
5
|
* spaced/colored with --a63-* semantic tokens. No new tokens: muted text →
|
|
6
|
-
* --a63-text-secondary, destructive → --a63-
|
|
6
|
+
* --a63-text-secondary, destructive → --a63-text-danger, container-query
|
|
7
7
|
* responsive orientation keyed off .a63-FieldGroup as the @container.
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Form recipe — react-hook-form field wrappers. Faithful to prod @atom63/ui
|
|
3
3
|
* form.tsx (grid item stack, error-recolored label, muted description,
|
|
4
4
|
* destructive message) recolored/spaced with --a63-* semantic tokens. No new
|
|
5
|
-
* tokens: muted → --a63-text-secondary, destructive → --a63-
|
|
5
|
+
* tokens: muted → --a63-text-secondary, destructive → --a63-text-danger.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
.a63-FormItem {
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
/* Mix danger toward TRANSPARENT, not the neutral border: an oklch mix between
|
|
141
141
|
danger (red) and the blue-ish neutral swings through magenta on the shortest
|
|
142
142
|
hue path. Mixing with transparent keeps the red hue and just softens it. */
|
|
143
|
-
--field-border:
|
|
144
|
-
--field-focus-border: var(--a63-
|
|
145
|
-
--field-focus-ring:
|
|
143
|
+
--field-border: var(--a63-border-danger);
|
|
144
|
+
--field-focus-border: var(--a63-status-danger);
|
|
145
|
+
--field-focus-ring: var(--a63-status-danger);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.a63-Input[data-disabled],
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
/* Invalid state — recolor the border + active ring to danger. */
|
|
82
82
|
.a63-InputOTP-slot[aria-invalid='true'],
|
|
83
83
|
.a63-InputOTP:has(.a63-InputOTP-input[aria-invalid='true']) .a63-InputOTP-slot {
|
|
84
|
-
--otp-border:
|
|
84
|
+
--otp-border: var(--a63-border-danger);
|
|
85
85
|
}
|
|
86
86
|
.a63-InputOTP-slot[aria-invalid='true'][data-active='true'],
|
|
87
87
|
.a63-InputOTP:has(.a63-InputOTP-input[aria-invalid='true']) .a63-InputOTP-slot[data-active='true'] {
|
|
88
|
-
border-color: var(--a63-
|
|
89
|
-
outline-color:
|
|
88
|
+
border-color: var(--a63-status-danger);
|
|
89
|
+
outline-color: var(--a63-status-danger);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/* Fake caret — a blinking hairline centered in the active empty slot. */
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* LayeredScene recipe — the SURFACE archetype. A two-row grid: the plate and
|
|
3
|
+
* the foreground span both rows, the copy takes the first and the stage the
|
|
4
|
+
* second, docked at the bottom. Levers: `data-placement` (stage position and
|
|
5
|
+
* copy alignment), `data-width` (stage width from the medium breakpoint up),
|
|
6
|
+
* `data-phone` on the foreground. Layers use the in-context z band. The
|
|
7
|
+
* foreground reads the plate's focal point variables, so it crops the same way.
|
|
8
|
+
* Tokens only: no literal colors, logical directions, and focus styles on
|
|
9
|
+
* :focus-visible (`pnpm check:craft`).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
.a63-LayeredScene {
|
|
13
|
+
position: relative;
|
|
14
|
+
isolation: isolate;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: minmax(0, 1fr);
|
|
18
|
+
grid-template-rows: auto 1fr;
|
|
19
|
+
overflow: clip;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.a63-LayeredScene > .a63-LayeredScene-plate {
|
|
23
|
+
z-index: var(--z-layer-below);
|
|
24
|
+
grid-row: 1 / -1;
|
|
25
|
+
grid-column: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Copy */
|
|
29
|
+
|
|
30
|
+
.a63-LayeredScene-content {
|
|
31
|
+
z-index: var(--z-layer-default);
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
display: grid;
|
|
34
|
+
align-content: start;
|
|
35
|
+
justify-items: center;
|
|
36
|
+
gap: var(--a63-space-4);
|
|
37
|
+
grid-row: 1;
|
|
38
|
+
grid-column: 1;
|
|
39
|
+
padding-block: var(--spacing-24) var(--spacing-10);
|
|
40
|
+
padding-inline: var(--a63-space-6);
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.a63-LayeredScene:not([data-placement='center-bottom']) .a63-LayeredScene-content {
|
|
45
|
+
justify-items: start;
|
|
46
|
+
text-align: start;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (min-width: 768px) {
|
|
50
|
+
.a63-LayeredScene-content {
|
|
51
|
+
padding-inline: var(--spacing-16);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Stage */
|
|
56
|
+
|
|
57
|
+
.a63-LayeredScene-stage {
|
|
58
|
+
z-index: var(--z-layer-default);
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
grid-row: 2;
|
|
61
|
+
grid-column: 1;
|
|
62
|
+
align-self: end;
|
|
63
|
+
justify-self: center;
|
|
64
|
+
inline-size: calc(100% - var(--a63-space-6) * 2);
|
|
65
|
+
margin-block-end: var(--spacing-12);
|
|
66
|
+
border-radius: var(--radius-2xl);
|
|
67
|
+
box-shadow: var(--effect-shadow-2xl);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (min-width: 768px) {
|
|
71
|
+
.a63-LayeredScene-stage {
|
|
72
|
+
inline-size: 66%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.a63-LayeredScene[data-width='half'] .a63-LayeredScene-stage {
|
|
76
|
+
inline-size: 45%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.a63-LayeredScene[data-placement='end-bottom'] .a63-LayeredScene-stage {
|
|
80
|
+
justify-self: end;
|
|
81
|
+
margin-inline-end: var(--spacing-16);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.a63-LayeredScene[data-placement='start-bottom'] .a63-LayeredScene-stage {
|
|
85
|
+
justify-self: start;
|
|
86
|
+
margin-inline-start: var(--spacing-16);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Foreground: the plate's box, inert, in front of the stage. */
|
|
91
|
+
|
|
92
|
+
.a63-LayeredScene-foreground {
|
|
93
|
+
position: relative;
|
|
94
|
+
z-index: var(--z-layer-raised);
|
|
95
|
+
grid-row: 1 / -1;
|
|
96
|
+
grid-column: 1;
|
|
97
|
+
pointer-events: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.a63-LayeredScene-foreground img {
|
|
101
|
+
position: absolute;
|
|
102
|
+
inset: 0;
|
|
103
|
+
inline-size: 100%;
|
|
104
|
+
block-size: 100%;
|
|
105
|
+
object-fit: cover;
|
|
106
|
+
object-position: var(--a63-art-plate-focus, 50% 50%);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (max-width: 767px) {
|
|
110
|
+
.a63-LayeredScene-foreground img {
|
|
111
|
+
object-position: var(--a63-art-plate-focus-mobile, var(--a63-art-plate-focus, 50% 50%));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.a63-LayeredScene-foreground[data-phone='hide'] {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.a63-LoadMoreTrigger[data-tone='error'] {
|
|
29
|
-
--load-more-accent: var(--a63-
|
|
29
|
+
--load-more-accent: var(--a63-status-danger);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
/* Hidden keeps only the empty live region mounted; it takes no space. */
|
|
@@ -90,7 +90,9 @@
|
|
|
90
90
|
padding: 0;
|
|
91
91
|
border: 0;
|
|
92
92
|
background: transparent;
|
|
93
|
-
|
|
93
|
+
/* Retry shows only in the failed row: text, so the danger text role (4.5:1),
|
|
94
|
+
not the 3:1 accent the icon uses. */
|
|
95
|
+
color: var(--a63-text-danger);
|
|
94
96
|
font: inherit;
|
|
95
97
|
font-weight: 600;
|
|
96
98
|
cursor: pointer;
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
.a63-Radio[aria-invalid='true'] {
|
|
112
|
-
border-color:
|
|
112
|
+
border-color: var(--a63-border-danger);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/* ── Sizes (md is the base rule above) ─────────────────────────────────── */
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Rating recipe — the CHOICE archetype. Stars are the caller's or lucide's
|
|
3
|
-
* glyph
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* glyph, and on and off differ by shape as well as colour: an on star is filled
|
|
4
|
+
* in the warning status colour, an off star is an outline in the input border
|
|
5
|
+
* colour. Both reach 3:1 against the page and the panel in every theme and mode
|
|
6
|
+
* (WCAG 1.4.11; contrast.browser.test.ts holds the pairs). A read-only star
|
|
7
|
+
* stacks a filled copy over an outlined one and clips it to --rating-fill from
|
|
8
|
+
* the inline start, so halves mirror in right-to-left languages. Input stars
|
|
9
|
+
* are radios; the ring is on :focus-visible.
|
|
7
10
|
*/
|
|
8
11
|
|
|
9
12
|
.a63-Rating {
|
|
10
13
|
--rating-size: 1.25rem;
|
|
11
|
-
--rating-on: var(--a63-
|
|
12
|
-
--rating-off:
|
|
14
|
+
--rating-on: var(--a63-status-warning);
|
|
15
|
+
--rating-off: var(--a63-border-input);
|
|
13
16
|
|
|
14
17
|
display: inline-flex;
|
|
15
18
|
align-items: center;
|
|
@@ -38,6 +41,7 @@
|
|
|
38
41
|
border-radius: var(--radius-sm);
|
|
39
42
|
background: transparent;
|
|
40
43
|
color: inherit;
|
|
44
|
+
--rating-glyph-fill: none;
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
.a63-Rating-icon {
|
|
@@ -48,7 +52,7 @@
|
|
|
48
52
|
.a63-Rating-icon > :where(svg) {
|
|
49
53
|
width: 100%;
|
|
50
54
|
height: 100%;
|
|
51
|
-
fill:
|
|
55
|
+
fill: var(--rating-glyph-fill);
|
|
52
56
|
stroke: currentColor;
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -60,6 +64,7 @@
|
|
|
60
64
|
width: var(--rating-fill);
|
|
61
65
|
overflow: hidden;
|
|
62
66
|
color: var(--rating-on);
|
|
67
|
+
--rating-glyph-fill: currentColor;
|
|
63
68
|
}
|
|
64
69
|
.a63-Rating-icon--filled > :where(svg) {
|
|
65
70
|
width: var(--rating-size);
|
|
@@ -79,12 +84,15 @@
|
|
|
79
84
|
}
|
|
80
85
|
.a63-Rating-item[data-on] {
|
|
81
86
|
color: var(--rating-on);
|
|
87
|
+
--rating-glyph-fill: currentColor;
|
|
82
88
|
}
|
|
83
89
|
.a63-Rating:not([data-read-only], [data-disabled]):has(.a63-Rating-item:hover) .a63-Rating-item {
|
|
84
90
|
color: var(--rating-on);
|
|
91
|
+
--rating-glyph-fill: currentColor;
|
|
85
92
|
}
|
|
86
93
|
.a63-Rating:not([data-read-only], [data-disabled]) .a63-Rating-item:hover ~ .a63-Rating-item {
|
|
87
94
|
color: var(--rating-off);
|
|
95
|
+
--rating-glyph-fill: none;
|
|
88
96
|
}
|
|
89
97
|
.a63-Rating-item:focus-visible {
|
|
90
98
|
outline: var(--a63-control-focus-ring-width) solid
|
|
@@ -102,19 +110,12 @@
|
|
|
102
110
|
}
|
|
103
111
|
}
|
|
104
112
|
|
|
105
|
-
/* Forced colors
|
|
106
|
-
|
|
107
|
-
|
|
113
|
+
/* Forced colors replace the theme colours: on stars take the system selection
|
|
114
|
+
colour and off stars the text colour; the outline/fill shape still carries
|
|
115
|
+
the score. */
|
|
108
116
|
@media (forced-colors: active) {
|
|
109
117
|
.a63-Rating {
|
|
110
118
|
--rating-on: Highlight;
|
|
111
119
|
--rating-off: CanvasText;
|
|
112
120
|
}
|
|
113
|
-
.a63-Rating-icon > :where(svg) {
|
|
114
|
-
fill: none;
|
|
115
|
-
}
|
|
116
|
-
.a63-Rating-icon--filled > :where(svg),
|
|
117
|
-
.a63-Rating-item[data-on] .a63-Rating-icon > :where(svg) {
|
|
118
|
-
fill: currentColor;
|
|
119
|
-
}
|
|
120
121
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* SegmentedControl recipe — a single-select segmented track with a sliding
|
|
3
|
-
* indicator (Base UI
|
|
3
|
+
* indicator (a Base UI radio group). Segment archetype fills/treatment via --a63-segment-*;
|
|
4
4
|
* the recessed well also reads --a63-track-shadow when a theme leaves the segment
|
|
5
5
|
* track shadow unset. Indicator = raised selected plate (or brand accent for
|
|
6
|
-
* tone=accent) that slides via
|
|
6
|
+
* tone=accent) that slides via the --segment-indicator-* vars the component measures.
|
|
7
7
|
*
|
|
8
8
|
* Light-mode contrast: track falls back to --a63-surface-muted (recessed), pill to
|
|
9
9
|
* --a63-surface-overlay (raised). Do NOT use --a63-surface-control for the track —
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.a63-SegmentedControl-item[data-
|
|
100
|
+
.a63-SegmentedControl-item[data-checked] {
|
|
101
101
|
color: var(--a63-segment-selected-foreground, var(--a63-text-primary));
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/* Full-width: the track fills its container and segments share the width equally.
|
|
127
|
-
|
|
127
|
+
The component still measures the selected segment, so the sliding pill sizes correctly. */
|
|
128
128
|
.a63-SegmentedControl[data-full] {
|
|
129
129
|
display: flex;
|
|
130
130
|
}
|
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
left: 0;
|
|
168
168
|
z-index: 0;
|
|
169
169
|
box-sizing: border-box;
|
|
170
|
-
width: var(--
|
|
171
|
-
height: var(--
|
|
170
|
+
width: var(--segment-indicator-width);
|
|
171
|
+
height: var(--segment-indicator-height);
|
|
172
172
|
border-radius: var(--segment-active-radius);
|
|
173
173
|
/* Raised selected plate. Overlay (not panel) is the cross-mode fallback: in
|
|
174
174
|
light it sits above muted; in dark it is lighter than muted. Themes override
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
/* Indicator is a raised CONTROL cell, not a pressed-in Toggle cell — keep the
|
|
179
179
|
control shadow even when themes set --a63-segment-selected-shadow to inset. */
|
|
180
180
|
box-shadow: var(--a63-control-shadow);
|
|
181
|
-
transform: translateX(var(--
|
|
181
|
+
transform: translateX(var(--segment-indicator-left)) translateY(-50%);
|
|
182
182
|
transition:
|
|
183
183
|
transform var(--a63-control-feedback-duration) var(--a63-control-feedback-ease),
|
|
184
184
|
width var(--a63-control-feedback-duration) var(--a63-control-feedback-ease);
|
|
@@ -195,11 +195,11 @@
|
|
|
195
195
|
box-shadow: var(--a63-control-shadow);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.a63-SegmentedControl[data-tone='accent'] .a63-SegmentedControl-item[data-
|
|
198
|
+
.a63-SegmentedControl[data-tone='accent'] .a63-SegmentedControl-item[data-checked] {
|
|
199
199
|
color: var(--a63-segment-primary-foreground, var(--a63-action-primary-foreground));
|
|
200
200
|
}
|
|
201
201
|
/* The inset ring would vanish into the accent pill; it takes the label colour. */
|
|
202
|
-
.a63-SegmentedControl[data-tone='accent'] .a63-SegmentedControl-item[data-
|
|
202
|
+
.a63-SegmentedControl[data-tone='accent'] .a63-SegmentedControl-item[data-checked]:focus-visible {
|
|
203
203
|
outline-color: var(--a63-segment-primary-foreground, var(--a63-action-primary-foreground));
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -242,8 +242,8 @@
|
|
|
242
242
|
.a63-SegmentedControl[data-tone='accent'] .a63-SegmentedControl-indicator {
|
|
243
243
|
background-color: Highlight;
|
|
244
244
|
}
|
|
245
|
-
.a63-SegmentedControl-item[data-
|
|
246
|
-
.a63-SegmentedControl[data-tone='accent'] .a63-SegmentedControl-item[data-
|
|
245
|
+
.a63-SegmentedControl-item[data-checked],
|
|
246
|
+
.a63-SegmentedControl[data-tone='accent'] .a63-SegmentedControl-item[data-checked] {
|
|
247
247
|
color: HighlightText;
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
/* Invalid: the same danger edge as .a63-Input[data-invalid] (input.css). */
|
|
72
72
|
.a63-Select-trigger[data-invalid],
|
|
73
73
|
.a63-Select-trigger[aria-invalid='true'] {
|
|
74
|
-
--select-border:
|
|
75
|
-
--select-focus-border: var(--a63-
|
|
76
|
-
--select-focus-ring:
|
|
74
|
+
--select-border: var(--a63-border-danger);
|
|
75
|
+
--select-focus-border: var(--a63-status-danger);
|
|
76
|
+
--select-focus-ring: var(--a63-status-danger);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.a63-Select-trigger[data-disabled] {
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.a63-Textarea[data-invalid] {
|
|
82
|
-
--field-border:
|
|
83
|
-
--field-focus-border: var(--a63-
|
|
84
|
-
--field-focus-ring:
|
|
82
|
+
--field-border: var(--a63-border-danger);
|
|
83
|
+
--field-focus-border: var(--a63-status-danger);
|
|
84
|
+
--field-focus-ring: var(--a63-status-danger);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.a63-Textarea[data-shadow='false'] {
|
package/src/styles/recipes.css
CHANGED
|
@@ -75,6 +75,8 @@
|
|
|
75
75
|
@import '../components/amount/amount.css' layer(components);
|
|
76
76
|
@import '../components/app-view/app-view.css' layer(components);
|
|
77
77
|
@import '../components/message/message.css' layer(components);
|
|
78
|
+
@import '../components/art-plate/art-plate.css' layer(components);
|
|
79
|
+
@import '../components/layered-scene/layered-scene.css' layer(components);
|
|
78
80
|
/* Document-level ::view-transition pseudos — deliberately unlayered so they are
|
|
79
81
|
not outranked by an app's own transition rules. */
|
|
80
82
|
@import '../media/media-lightbox/media-lightbox.css';
|