@adia-ai/web-components 0.7.3 → 0.7.5
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/CHANGELOG.md +31 -0
- package/components/accordion/accordion.css +2 -2
- package/components/action-list/action-list.css +2 -2
- package/components/agent-artifact/agent-artifact.css +31 -31
- package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
- package/components/agent-questions/agent-questions.css +59 -57
- package/components/agent-reasoning/agent-reasoning.css +54 -54
- package/components/agent-suggestions/agent-suggestions.css +4 -4
- package/components/agent-trace/agent-trace.css +53 -53
- package/components/alert/alert.css +53 -53
- package/components/avatar/avatar.css +27 -27
- package/components/badge/badge.css +56 -53
- package/components/block/block.css +16 -16
- package/components/blockquote/blockquote.css +16 -16
- package/components/breadcrumb/breadcrumb.css +23 -23
- package/components/button/button.css +123 -101
- package/components/calendar-grid/calendar-grid.css +95 -92
- package/components/calendar-picker/calendar-picker.css +141 -139
- package/components/canvas/canvas.css +12 -12
- package/components/card/card.css +83 -83
- package/components/chart/chart.css +218 -218
- package/components/chart-legend/chart-legend.css +26 -26
- package/components/check/check.css +40 -40
- package/components/code/code.css +125 -125
- package/components/col/col.css +15 -15
- package/components/color-picker/color-picker.css +55 -55
- package/components/combobox/combobox.css +64 -62
- package/components/command/command.css +91 -91
- package/components/context-menu/context-menu.css +1 -1
- package/components/date-range-picker/date-range-picker.css +59 -59
- package/components/datetime-picker/datetime-picker.css +25 -25
- package/components/demo-toggle/demo-toggle.css +27 -27
- package/components/description-list/description-list.css +18 -18
- package/components/divider/divider.css +24 -24
- package/components/embed/embed.css +6 -6
- package/components/empty-state/empty-state.css +29 -29
- package/components/feed/feed.css +12 -12
- package/components/field/field.css +28 -28
- package/components/field/field.test.js +2 -2
- package/components/fields/fields.css +5 -5
- package/components/grid/grid.a2ui.json +10 -0
- package/components/grid/grid.css +23 -5
- package/components/grid/grid.d.ts +4 -0
- package/components/grid/grid.yaml +13 -0
- package/components/heatmap/heatmap.css +61 -61
- package/components/icon/icon.css +12 -12
- package/components/image/image.css +14 -14
- package/components/inline-edit/inline-edit.css +16 -16
- package/components/inline-message/inline-message.css +16 -16
- package/components/input/input.css +69 -66
- package/components/inspector/inspector.css +6 -6
- package/components/integration-card/integration-card.css +41 -41
- package/components/integration-card/integration-card.test.js +4 -4
- package/components/kbd/kbd.css +47 -40
- package/components/link/link.css +12 -12
- package/components/list/list.css +8 -8
- package/components/list-window/list-window.css +10 -10
- package/components/loading-overlay/loading-overlay.css +17 -18
- package/components/loading-overlay/loading-overlay.test.js +8 -8
- package/components/mark/mark.css +16 -16
- package/components/menu/menu.css +9 -9
- package/components/modal/modal.class.js +5 -9
- package/components/modal/modal.css +43 -43
- package/components/nav/nav.css +40 -40
- package/components/nav-group/nav-group.css +54 -54
- package/components/nav-item/nav-item.css +44 -44
- package/components/noodles/noodles.css +31 -31
- package/components/number-format/number-format.css +4 -4
- package/components/option-card/option-card.css +70 -70
- package/components/otp-input/otp-input.css +29 -29
- package/components/page/page.a2ui.json +1 -1
- package/components/page/page.css +27 -27
- package/components/page/page.d.ts +1 -1
- package/components/page/page.yaml +1 -1
- package/components/pagination/pagination.css +6 -6
- package/components/pane/pane.css +57 -57
- package/components/password-strength/password-strength.css +32 -32
- package/components/pipeline-status/pipeline-status.css +67 -67
- package/components/popover/popover.css +11 -11
- package/components/preview/preview.css +21 -21
- package/components/progress/progress.css +23 -23
- package/components/progress-row/progress-row.css +17 -17
- package/components/qr-code/qr-code.css +4 -4
- package/components/radio/radio.css +39 -39
- package/components/range/range.css +58 -55
- package/components/rating/rating.css +28 -28
- package/components/relative-time/relative-time.css +6 -6
- package/components/richtext/richtext.css +133 -133
- package/components/row/row.css +19 -19
- package/components/search/search.css +5 -5
- package/components/segment/segment.css +29 -24
- package/components/segmented/segmented.css +30 -25
- package/components/select/select.css +95 -93
- package/components/skeleton/skeleton.css +14 -14
- package/components/skip-nav/skip-nav.css +4 -4
- package/components/slider/slider.css +61 -61
- package/components/spinner/spinner.css +40 -40
- package/components/spinner/spinner.test.js +10 -12
- package/components/stack/stack.css +11 -11
- package/components/stat/stat.css +27 -27
- package/components/step-progress/step-progress.css +20 -20
- package/components/stepper/stepper.css +29 -29
- package/components/stream/stream.css +12 -12
- package/components/swatch/swatch.css +68 -68
- package/components/swiper/swiper.class.js +5 -12
- package/components/swiper/swiper.css +57 -57
- package/components/switch/switch.css +53 -53
- package/components/table/table.css +166 -163
- package/components/table-toolbar/table-toolbar.css +33 -33
- package/components/tabs/tabs.css +54 -51
- package/components/tag/tag.css +74 -71
- package/components/tag/tag.test.js +14 -14
- package/components/tags-input/tags-input.css +51 -49
- package/components/text/text.css +44 -44
- package/components/textarea/textarea.css +49 -46
- package/components/time-picker/time-picker.css +47 -47
- package/components/timeline/timeline.css +54 -54
- package/components/toast/toast.css +58 -58
- package/components/toc/toc.css +28 -28
- package/components/toggle-group/toggle-group.css +9 -6
- package/components/toggle-scheme/toggle-scheme.css +2 -2
- package/components/toolbar/toolbar.css +18 -18
- package/components/tooltip/tooltip.css +2 -2
- package/components/tour/tour.css +4 -4
- package/components/tree/tree.css +37 -37
- package/components/upload/upload.css +49 -49
- package/dist/host.min.css +1 -0
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.min.js +2 -2
- package/package.json +1 -1
- package/styles/api/text.css +9 -2
- package/styles/foundation/space.css +19 -18
- package/styles/host.css +48 -0
- package/styles/prose.css +187 -173
- package/styles/type/scale.css +6 -0
- package/styles/typography.css +10 -5
- package/styles/verse.css +122 -0
package/components/stat/stat.css
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Tokens ──
|
|
4
4
|
Use size-responsive tokens so stat shrinks when parent card has size="sm". */
|
|
5
|
-
--stat-value-size
|
|
6
|
-
--stat-value-weight
|
|
7
|
-
--stat-value-fg
|
|
8
|
-
--stat-label-size
|
|
9
|
-
--stat-label-fg
|
|
10
|
-
--stat-change-size
|
|
11
|
-
--stat-up-fg
|
|
12
|
-
--stat-down-fg
|
|
13
|
-
--stat-icon-fg
|
|
5
|
+
--stat-value-size: var(--a-title-size);
|
|
6
|
+
--stat-value-weight: var(--a-weight-bold);
|
|
7
|
+
--stat-value-fg: var(--a-fg-strong);
|
|
8
|
+
--stat-label-size: var(--a-ui-size);
|
|
9
|
+
--stat-label-fg: var(--a-fg);
|
|
10
|
+
--stat-change-size: var(--a-ui-size);
|
|
11
|
+
--stat-up-fg: var(--a-success-bg);
|
|
12
|
+
--stat-down-fg: var(--a-danger-bg);
|
|
13
|
+
--stat-icon-fg: var(--a-fg-muted);
|
|
14
14
|
|
|
15
15
|
/* ── Spacing ── */
|
|
16
|
-
--stat-column-gap
|
|
17
|
-
--stat-row-gap
|
|
16
|
+
--stat-column-gap: var(--a-gap-self, var(--a-gap));
|
|
17
|
+
--stat-row-gap: var(--a-gap-sm);
|
|
18
18
|
text-align: start; /* §text-align-reset — blocks inheritance from centered ancestors */
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"label icon"
|
|
32
32
|
"value value"
|
|
33
33
|
"change change";
|
|
34
|
-
column-gap: var(--stat-column-gap
|
|
35
|
-
row-gap: var(--stat-row-gap
|
|
34
|
+
column-gap: var(--stat-column-gap);
|
|
35
|
+
row-gap: var(--stat-row-gap);
|
|
36
36
|
align-items: baseline;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
chart-ui[slot="chart"]{height:100%} so the stretch governs. */
|
|
114
114
|
align-self: stretch;
|
|
115
115
|
height: auto;
|
|
116
|
-
margin-block: calc(-1 * var(--card-inset,
|
|
116
|
+
margin-block: calc(-1 * var(--card-inset, 0px));
|
|
117
117
|
/* HORIZONTAL bleed via explicit width: chart-ui pins its own
|
|
118
118
|
`width:100%` (chart.css), which beats justify-self:stretch and would
|
|
119
119
|
freeze the box to the track — so a negative margin-inline-end can't
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
so the right edge overflows to the card edge while the left keeps the
|
|
122
122
|
column gap. The percentage resolves against the grid track. */
|
|
123
123
|
justify-self: start;
|
|
124
|
-
width: calc(100% + var(--card-inset,
|
|
124
|
+
width: calc(100% + var(--card-inset, 0px));
|
|
125
125
|
min-width: 0;
|
|
126
126
|
/* override the inline-chart 4:3 — fill the row span instead */
|
|
127
127
|
aspect-ratio: auto;
|
|
@@ -130,8 +130,8 @@
|
|
|
130
130
|
/* ── Label (eyebrow) ── */
|
|
131
131
|
[slot="label"] {
|
|
132
132
|
grid-area: label;
|
|
133
|
-
font-size: var(--stat-label-size
|
|
134
|
-
color: var(--stat-label-fg
|
|
133
|
+
font-size: var(--stat-label-size);
|
|
134
|
+
color: var(--stat-label-fg);
|
|
135
135
|
line-height: 1.4;
|
|
136
136
|
min-width: 0;
|
|
137
137
|
overflow: hidden;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
display: inline-flex;
|
|
146
146
|
align-items: center;
|
|
147
147
|
gap: 0.25em;
|
|
148
|
-
font-size: var(--stat-change-size
|
|
148
|
+
font-size: var(--stat-change-size);
|
|
149
149
|
line-height: 1;
|
|
150
150
|
justify-self: start;
|
|
151
151
|
}
|
|
@@ -153,9 +153,9 @@
|
|
|
153
153
|
/* ── Value ── */
|
|
154
154
|
[slot="value"] {
|
|
155
155
|
grid-column: 1 / -1;
|
|
156
|
-
font-size: var(--stat-value-size
|
|
157
|
-
font-weight: var(--stat-value-weight
|
|
158
|
-
color: var(--stat-value-fg
|
|
156
|
+
font-size: var(--stat-value-size);
|
|
157
|
+
font-weight: var(--stat-value-weight);
|
|
158
|
+
color: var(--stat-value-fg);
|
|
159
159
|
line-height: 1.2;
|
|
160
160
|
min-width: 0;
|
|
161
161
|
overflow: hidden;
|
|
@@ -166,29 +166,29 @@
|
|
|
166
166
|
/* Trend arrows via ::before */
|
|
167
167
|
:scope[trend="up"] [slot="change"]::before {
|
|
168
168
|
content: "\25B2";
|
|
169
|
-
color: var(--stat-up-fg
|
|
169
|
+
color: var(--stat-up-fg);
|
|
170
170
|
}
|
|
171
171
|
:scope[trend="up"] [slot="change"] {
|
|
172
|
-
color: var(--stat-up-fg
|
|
172
|
+
color: var(--stat-up-fg);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
:scope[trend="down"] [slot="change"]::before {
|
|
176
176
|
content: "\25BC";
|
|
177
|
-
color: var(--stat-down-fg
|
|
177
|
+
color: var(--stat-down-fg);
|
|
178
178
|
}
|
|
179
179
|
:scope[trend="down"] [slot="change"] {
|
|
180
|
-
color: var(--stat-down-fg
|
|
180
|
+
color: var(--stat-down-fg);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
:scope[trend="neutral"] [slot="change"] {
|
|
184
|
-
color: var(--stat-label-fg
|
|
184
|
+
color: var(--stat-label-fg);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
/* ── Icon ── */
|
|
188
188
|
[slot="icon"] {
|
|
189
189
|
grid-area: icon;
|
|
190
190
|
align-self: start;
|
|
191
|
-
color: var(--stat-icon-fg
|
|
191
|
+
color: var(--stat-icon-fg);
|
|
192
192
|
--a-icon-size: 1.25rem;
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -5,34 +5,34 @@
|
|
|
5
5
|
|
|
6
6
|
@scope (step-progress-ui) {
|
|
7
7
|
:where(:scope) {
|
|
8
|
-
--step-progress-gap
|
|
9
|
-
--step-progress-track-gap
|
|
10
|
-
--step-progress-dash-h
|
|
11
|
-
--step-progress-dash-radius
|
|
12
|
-
--step-progress-dash-bg
|
|
13
|
-
--step-progress-dash-bg-active
|
|
14
|
-
--step-progress-caption-fg
|
|
15
|
-
--step-progress-caption-size
|
|
8
|
+
--step-progress-gap: var(--a-space-2);
|
|
9
|
+
--step-progress-track-gap: var(--a-space-1);
|
|
10
|
+
--step-progress-dash-h: 4px;
|
|
11
|
+
--step-progress-dash-radius: var(--a-radius-full);
|
|
12
|
+
--step-progress-dash-bg: var(--a-border-subtle);
|
|
13
|
+
--step-progress-dash-bg-active: var(--a-accent);
|
|
14
|
+
--step-progress-caption-fg: var(--a-fg-muted);
|
|
15
|
+
--step-progress-caption-size: var(--a-ui-sm);
|
|
16
16
|
|
|
17
17
|
/* Sizing — match the bespoke flex shape in registration + onboarding
|
|
18
18
|
(flex:0 1 18rem; min-width:10rem). Consumers can override. */
|
|
19
|
-
--step-progress-flex
|
|
20
|
-
--step-progress-min-width
|
|
19
|
+
--step-progress-flex: 0 1 18rem;
|
|
20
|
+
--step-progress-min-width: 10rem;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
:scope {
|
|
24
24
|
display: flex;
|
|
25
25
|
flex-direction: column;
|
|
26
|
-
gap: var(--step-progress-gap
|
|
27
|
-
flex: var(--step-progress-flex
|
|
28
|
-
min-width: var(--step-progress-min-width
|
|
26
|
+
gap: var(--step-progress-gap);
|
|
27
|
+
flex: var(--step-progress-flex);
|
|
28
|
+
min-width: var(--step-progress-min-width);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/* Caption row — small, muted text. Hidden when no caption provided
|
|
32
32
|
(the [hidden] attribute is set by the JS). */
|
|
33
33
|
[slot="caption"] {
|
|
34
|
-
color: var(--step-progress-caption-fg
|
|
35
|
-
font-size: var(--step-progress-caption-size
|
|
34
|
+
color: var(--step-progress-caption-fg);
|
|
35
|
+
font-size: var(--step-progress-caption-size);
|
|
36
36
|
line-height: 1.4;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
item so the track scales with the column width. */
|
|
45
45
|
[slot="track"] {
|
|
46
46
|
display: flex;
|
|
47
|
-
gap: var(--step-progress-track-gap
|
|
47
|
+
gap: var(--step-progress-track-gap);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
[slot="track"] > span {
|
|
51
51
|
flex: 1;
|
|
52
|
-
height: var(--step-progress-dash-h
|
|
53
|
-
border-radius: var(--step-progress-dash-radius
|
|
54
|
-
background: var(--step-progress-dash-bg
|
|
52
|
+
height: var(--step-progress-dash-h);
|
|
53
|
+
border-radius: var(--step-progress-dash-radius);
|
|
54
|
+
background: var(--step-progress-dash-bg);
|
|
55
55
|
transition: background var(--a-duration-fast, 150ms) var(--a-easing, ease);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
[slot="track"] > span[data-active] {
|
|
59
|
-
background: var(--step-progress-dash-bg-active
|
|
59
|
+
background: var(--step-progress-dash-bg-active);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -12,41 +12,41 @@
|
|
|
12
12
|
@scope (stepper-ui) {
|
|
13
13
|
:where(:scope) {
|
|
14
14
|
/* ── Circle ── */
|
|
15
|
-
--stepper-size
|
|
16
|
-
--stepper-bg
|
|
17
|
-
--stepper-border
|
|
18
|
-
--stepper-fg
|
|
19
|
-
--stepper-font
|
|
20
|
-
--stepper-weight
|
|
21
|
-
--stepper-border-size
|
|
22
|
-
|
|
23
|
-
--stepper-bg-active
|
|
24
|
-
--stepper-border-active
|
|
25
|
-
--stepper-fg-active
|
|
26
|
-
|
|
27
|
-
--stepper-bg-done
|
|
28
|
-
--stepper-border-done
|
|
29
|
-
--stepper-fg-done
|
|
30
|
-
|
|
31
|
-
--stepper-line
|
|
32
|
-
--stepper-line-done
|
|
33
|
-
--stepper-line-size
|
|
15
|
+
--stepper-size: 2rem;
|
|
16
|
+
--stepper-bg: var(--a-bg);
|
|
17
|
+
--stepper-border: var(--a-border);
|
|
18
|
+
--stepper-fg: var(--a-fg-muted);
|
|
19
|
+
--stepper-font: var(--a-ui-sm);
|
|
20
|
+
--stepper-weight: var(--a-weight-medium);
|
|
21
|
+
--stepper-border-size: 2px;
|
|
22
|
+
|
|
23
|
+
--stepper-bg-active: var(--a-bg);
|
|
24
|
+
--stepper-border-active: var(--a-accent);
|
|
25
|
+
--stepper-fg-active: var(--a-accent);
|
|
26
|
+
|
|
27
|
+
--stepper-bg-done: var(--a-accent);
|
|
28
|
+
--stepper-border-done: var(--a-accent);
|
|
29
|
+
--stepper-fg-done: var(--a-accent-fg);
|
|
30
|
+
|
|
31
|
+
--stepper-line: var(--a-border-subtle);
|
|
32
|
+
--stepper-line-done: var(--a-accent);
|
|
33
|
+
--stepper-line-size: 2px;
|
|
34
34
|
|
|
35
35
|
/* ── Layout ──
|
|
36
36
|
Parent tokens use the bare `--stepper-*` name (no `-item-` infix)
|
|
37
37
|
so the child's `:where(stepper-item-ui)` block can pull from
|
|
38
38
|
parent → child via `var(--stepper-X, …)` without name collisions.
|
|
39
39
|
A self-named child declaration like
|
|
40
|
-
`--stepper-item-gap-sm
|
|
40
|
+
`--stepper-item-gap-sm: var(--stepper-item-gap-sm, …)` resolves
|
|
41
41
|
to invalid (cycle), which silently breaks any calc() that
|
|
42
42
|
consumes it. */
|
|
43
|
-
--stepper-radius-full
|
|
44
|
-
--stepper-gap
|
|
45
|
-
--stepper-gap-sm
|
|
46
|
-
--stepper-pad-x
|
|
47
|
-
--stepper-pad-y
|
|
48
|
-
--stepper-offset-xs
|
|
49
|
-
--stepper-min-width
|
|
43
|
+
--stepper-radius-full: var(--a-radius-full);
|
|
44
|
+
--stepper-gap: var(--a-space-3);
|
|
45
|
+
--stepper-gap-sm: var(--a-space-2);
|
|
46
|
+
--stepper-pad-x: var(--a-space-4);
|
|
47
|
+
--stepper-pad-y: var(--a-space-6);
|
|
48
|
+
--stepper-offset-xs: var(--a-space-1);
|
|
49
|
+
--stepper-min-width: 5rem;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
:scope {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
|
|
91
91
|
--stepper-item-radius-full: var(--a-radius-full);
|
|
92
92
|
--stepper-item-gap: var(--stepper-gap, var(--a-space-3));
|
|
93
|
-
--stepper-item-gap-sm
|
|
93
|
+
--stepper-item-gap-sm: var(--stepper-gap-sm, var(--a-space-2));
|
|
94
94
|
--stepper-item-pad-x: var(--stepper-pad-x, var(--a-space-4));
|
|
95
95
|
--stepper-item-pad-y: var(--stepper-pad-y, var(--a-space-6));
|
|
96
96
|
--stepper-item-offset-xs: var(--stepper-offset-xs, var(--a-space-1));
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
flex: 1;
|
|
115
115
|
min-width: var(--stepper-item-min-width);
|
|
116
116
|
text-align: center;
|
|
117
|
-
padding-top: calc(var(--stepper-item-size) + var(--stepper-item-gap-sm
|
|
117
|
+
padding-top: calc(var(--stepper-item-size) + var(--stepper-item-gap-sm));
|
|
118
118
|
padding-left: 0;
|
|
119
119
|
padding-bottom: 0;
|
|
120
120
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
@scope (stream-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
|
-
--stream-fg
|
|
4
|
-
--stream-font-size
|
|
5
|
-
--stream-font-family
|
|
6
|
-
--stream-leading
|
|
7
|
-
--stream-cursor-color
|
|
8
|
-
--stream-blink-duration
|
|
3
|
+
--stream-fg: var(--a-fg);
|
|
4
|
+
--stream-font-size: var(--a-body-size);
|
|
5
|
+
--stream-font-family: var(--a-font-family);
|
|
6
|
+
--stream-leading: var(--a-body-leading);
|
|
7
|
+
--stream-cursor-color: var(--a-accent-bg);
|
|
8
|
+
--stream-blink-duration: 0.6s;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
:scope {
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
display: block;
|
|
14
|
-
color: var(--stream-fg
|
|
15
|
-
font-family: var(--stream-font-family
|
|
16
|
-
font-size: var(--stream-font-size
|
|
17
|
-
line-height: var(--stream-leading
|
|
14
|
+
color: var(--stream-fg);
|
|
15
|
+
font-family: var(--stream-font-family);
|
|
16
|
+
font-size: var(--stream-font-size);
|
|
17
|
+
line-height: var(--stream-leading);
|
|
18
18
|
white-space: pre-wrap;
|
|
19
19
|
word-break: break-word;
|
|
20
20
|
}
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
/* Blinking cursor during stream (default; suppress with [hide-cursor]) */
|
|
23
23
|
:scope[streaming]:not([hide-cursor])::after {
|
|
24
24
|
content: '▊';
|
|
25
|
-
color: var(--stream-cursor-color
|
|
26
|
-
animation: _stream-blink var(--stream-blink-duration
|
|
25
|
+
color: var(--stream-cursor-color);
|
|
26
|
+
animation: _stream-blink var(--stream-blink-duration) step-end infinite;
|
|
27
27
|
margin-left: 1px;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
@scope (swatch-ui) {
|
|
2
2
|
:where(:scope) {
|
|
3
3
|
/* ── Layout ── */
|
|
4
|
-
--swatch-gap
|
|
4
|
+
--swatch-gap: var(--a-space-2);
|
|
5
5
|
|
|
6
6
|
/* ── Sizes ──
|
|
7
7
|
The "tile" is the coloured shape; the label is plain text rendered
|
|
8
8
|
beside (or below, for shape="block") the tile. Tile dimensions are
|
|
9
9
|
size-driven; line shapes use a fixed thickness regardless of size. */
|
|
10
|
-
--swatch-tile-sm
|
|
11
|
-
--swatch-tile-md
|
|
12
|
-
--swatch-tile-lg
|
|
13
|
-
--swatch-line-thickness
|
|
14
|
-
--swatch-line-length
|
|
10
|
+
--swatch-tile-sm: var(--a-space-2); /* 8px ~ */
|
|
11
|
+
--swatch-tile-md: var(--a-space-2-5); /* 10px ~ */
|
|
12
|
+
--swatch-tile-lg: 40px; /* token-scale block */
|
|
13
|
+
--swatch-line-thickness: 2px;
|
|
14
|
+
--swatch-line-length: calc(var(--swatch-tile-md) * 1.75);
|
|
15
15
|
|
|
16
16
|
/* ── Colors ──
|
|
17
17
|
Default colour falls back through the data palette so a bare
|
|
18
18
|
<swatch-ui> still renders something visible; consumers usually set
|
|
19
19
|
--swatch-color via [color] attr or inline style. */
|
|
20
|
-
--swatch-color
|
|
21
|
-
--swatch-label-fg
|
|
20
|
+
--swatch-color: var(--a-data-0);
|
|
21
|
+
--swatch-label-fg: var(--a-fg-subtle);
|
|
22
22
|
|
|
23
23
|
/* ── Shape ── */
|
|
24
|
-
--swatch-radius-block
|
|
25
|
-
--swatch-radius-square
|
|
24
|
+
--swatch-radius-block: var(--a-radius-sm);
|
|
25
|
+
--swatch-radius-square: var(--a-radius-sm);
|
|
26
26
|
|
|
27
27
|
/* ── Block-shape extras (token-scale) ── */
|
|
28
|
-
--swatch-block-shadow
|
|
28
|
+
--swatch-block-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 8%, transparent);
|
|
29
29
|
|
|
30
30
|
/* ── Typography ── */
|
|
31
|
-
--swatch-label-size
|
|
32
|
-
--swatch-label-step-size
|
|
33
|
-
--swatch-label-step-mt
|
|
34
|
-
--swatch-detail-size
|
|
35
|
-
--swatch-detail-fg
|
|
31
|
+
--swatch-label-size: var(--a-ui-size);
|
|
32
|
+
--swatch-label-step-size: 10px;
|
|
33
|
+
--swatch-label-step-mt: 4px;
|
|
34
|
+
--swatch-detail-size: var(--a-ui-xs);
|
|
35
|
+
--swatch-detail-fg: var(--a-fg-subtle);
|
|
36
36
|
|
|
37
37
|
/* ── Badge ── */
|
|
38
|
-
--swatch-badge-size
|
|
39
|
-
--swatch-badge-fg
|
|
40
|
-
--swatch-badge-bg
|
|
41
|
-
--swatch-badge-pad
|
|
42
|
-
--swatch-badge-radius
|
|
38
|
+
--swatch-badge-size: var(--a-ui-xs);
|
|
39
|
+
--swatch-badge-fg: var(--a-chrome-fg);
|
|
40
|
+
--swatch-badge-bg: var(--a-chrome-bg);
|
|
41
|
+
--swatch-badge-pad: 2px 4px;
|
|
42
|
+
--swatch-badge-radius: var(--a-radius-xs);
|
|
43
43
|
|
|
44
44
|
/* ── Copy button ── */
|
|
45
|
-
--swatch-copy-size
|
|
46
|
-
--swatch-copy-fg
|
|
47
|
-
--swatch-copy-fg-ok
|
|
48
|
-
--swatch-copy-fg-fail
|
|
45
|
+
--swatch-copy-size: var(--a-space-3);
|
|
46
|
+
--swatch-copy-fg: var(--a-fg-muted);
|
|
47
|
+
--swatch-copy-fg-ok: var(--a-success);
|
|
48
|
+
--swatch-copy-fg-fail: var(--a-warning);
|
|
49
49
|
|
|
50
50
|
/* ── Selectable ring ── */
|
|
51
|
-
--swatch-select-ring
|
|
52
|
-
--swatch-select-ring-width
|
|
51
|
+
--swatch-select-ring: var(--a-accent);
|
|
52
|
+
--swatch-select-ring-width: 2px;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
:scope {
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
box-sizing: border-box;
|
|
60
60
|
display: inline-flex;
|
|
61
61
|
align-items: center;
|
|
62
|
-
gap: var(--swatch-gap
|
|
62
|
+
gap: var(--swatch-gap);
|
|
63
63
|
min-width: 0;
|
|
64
|
-
color: var(--swatch-label-fg
|
|
65
|
-
font-size: var(--swatch-label-size
|
|
64
|
+
color: var(--swatch-label-fg);
|
|
65
|
+
font-size: var(--swatch-label-size);
|
|
66
66
|
line-height: 1.2;
|
|
67
67
|
vertical-align: baseline;
|
|
68
68
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
box-sizing: border-box;
|
|
73
73
|
display: block;
|
|
74
74
|
flex-shrink: 0;
|
|
75
|
-
background: var(--swatch-color
|
|
75
|
+
background: var(--swatch-color);
|
|
76
76
|
line-height: 0;
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -87,31 +87,31 @@
|
|
|
87
87
|
|
|
88
88
|
/* ═══════ Shape: dot ═══════ */
|
|
89
89
|
:scope[shape="dot"] > [data-tile] {
|
|
90
|
-
width: var(--_size, var(--swatch-tile-md
|
|
91
|
-
height: var(--_size, var(--swatch-tile-md
|
|
90
|
+
width: var(--_size, var(--swatch-tile-md));
|
|
91
|
+
height: var(--_size, var(--swatch-tile-md));
|
|
92
92
|
border-radius: 50%;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/* ═══════ Shape: square ═══════ */
|
|
96
96
|
:scope[shape="square"] > [data-tile] {
|
|
97
|
-
width: var(--_size, var(--swatch-tile-md
|
|
98
|
-
height: var(--_size, var(--swatch-tile-md
|
|
99
|
-
border-radius: var(--swatch-radius-square
|
|
97
|
+
width: var(--_size, var(--swatch-tile-md));
|
|
98
|
+
height: var(--_size, var(--swatch-tile-md));
|
|
99
|
+
border-radius: var(--swatch-radius-square);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/* ═══════ Shape: line (solid hairline) ═══════ */
|
|
103
103
|
:scope[shape="line"] > [data-tile] {
|
|
104
|
-
width: var(--swatch-line-length
|
|
105
|
-
height: var(--swatch-line-thickness
|
|
106
|
-
border-radius: var(--swatch-line-thickness
|
|
104
|
+
width: var(--swatch-line-length);
|
|
105
|
+
height: var(--swatch-line-thickness);
|
|
106
|
+
border-radius: var(--swatch-line-thickness);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/* ═══════ Shape: dashed (dashed hairline) ═══════ */
|
|
110
110
|
:scope[shape="dashed"] > [data-tile] {
|
|
111
|
-
width: var(--swatch-line-length
|
|
112
|
-
height: var(--swatch-line-thickness
|
|
111
|
+
width: var(--swatch-line-length);
|
|
112
|
+
height: var(--swatch-line-thickness);
|
|
113
113
|
background: transparent;
|
|
114
|
-
border-top: var(--swatch-line-thickness
|
|
114
|
+
border-top: var(--swatch-line-thickness) dashed var(--swatch-color);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/* ═══════ Shape: block (token-scale tile) ═══════
|
|
@@ -126,18 +126,18 @@
|
|
|
126
126
|
|
|
127
127
|
:scope[shape="block"] > [data-tile] {
|
|
128
128
|
width: 100%;
|
|
129
|
-
height: var(--_block-h, var(--swatch-tile-lg
|
|
130
|
-
border-radius: var(--swatch-radius-block
|
|
131
|
-
box-shadow: var(--swatch-block-shadow
|
|
129
|
+
height: var(--_block-h, var(--swatch-tile-lg));
|
|
130
|
+
border-radius: var(--swatch-radius-block);
|
|
131
|
+
box-shadow: var(--swatch-block-shadow);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
:scope[shape="block"] > [data-label] {
|
|
135
135
|
text-align: center;
|
|
136
136
|
font-family: var(--a-font-family-code);
|
|
137
|
-
font-size: var(--swatch-label-step-size
|
|
137
|
+
font-size: var(--swatch-label-step-size);
|
|
138
138
|
font-variant-numeric: tabular-nums;
|
|
139
139
|
color: var(--a-fg-muted);
|
|
140
|
-
margin-block-start: var(--swatch-label-step-mt
|
|
140
|
+
margin-block-start: var(--swatch-label-step-mt);
|
|
141
141
|
white-space: nowrap;
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
position: absolute;
|
|
165
165
|
top: 0;
|
|
166
166
|
inset-inline: 0;
|
|
167
|
-
height: var(--_block-h, var(--swatch-tile-lg
|
|
167
|
+
height: var(--_block-h, var(--swatch-tile-lg));
|
|
168
168
|
display: flex;
|
|
169
169
|
align-items: center;
|
|
170
170
|
justify-content: center;
|
|
@@ -178,16 +178,16 @@
|
|
|
178
178
|
height (`--_block-h`) for each size preset. Line/dashed widths use
|
|
179
179
|
--swatch-line-length so they stay consistent at all sizes. */
|
|
180
180
|
:scope[size="sm"] {
|
|
181
|
-
--_size: var(--swatch-tile-sm
|
|
182
|
-
--_block-h: calc(var(--swatch-tile-lg
|
|
181
|
+
--_size: var(--swatch-tile-sm);
|
|
182
|
+
--_block-h: calc(var(--swatch-tile-lg) * 0.6);
|
|
183
183
|
}
|
|
184
184
|
:scope[size="md"] {
|
|
185
|
-
--_size: var(--swatch-tile-md
|
|
186
|
-
--_block-h: calc(var(--swatch-tile-lg
|
|
185
|
+
--_size: var(--swatch-tile-md);
|
|
186
|
+
--_block-h: calc(var(--swatch-tile-lg) * 0.75);
|
|
187
187
|
}
|
|
188
188
|
:scope[size="lg"] {
|
|
189
|
-
--_size: calc(var(--swatch-tile-md
|
|
190
|
-
--_block-h: var(--swatch-tile-lg
|
|
189
|
+
--_size: calc(var(--swatch-tile-md) * 1.4);
|
|
190
|
+
--_block-h: var(--swatch-tile-lg);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
/* ═══════ Detail line ═══════
|
|
@@ -195,8 +195,8 @@
|
|
|
195
195
|
design-token swatch. For shape="block" sits under the label; for
|
|
196
196
|
non-block shapes is inline (small, muted, after label). */
|
|
197
197
|
:scope > [data-detail] {
|
|
198
|
-
color: var(--swatch-detail-fg
|
|
199
|
-
font-size: var(--swatch-detail-size
|
|
198
|
+
color: var(--swatch-detail-fg);
|
|
199
|
+
font-size: var(--swatch-detail-size);
|
|
200
200
|
font-family: var(--a-font-family-code);
|
|
201
201
|
font-variant-numeric: tabular-nums;
|
|
202
202
|
white-space: nowrap;
|
|
@@ -232,12 +232,12 @@
|
|
|
232
232
|
justify-content: center;
|
|
233
233
|
min-width: var(--a-space-4);
|
|
234
234
|
height: var(--a-space-4);
|
|
235
|
-
padding: var(--swatch-badge-pad
|
|
236
|
-
background: var(--swatch-badge-bg
|
|
237
|
-
color: var(--swatch-badge-fg
|
|
238
|
-
font-size: var(--swatch-badge-size
|
|
235
|
+
padding: var(--swatch-badge-pad);
|
|
236
|
+
background: var(--swatch-badge-bg);
|
|
237
|
+
color: var(--swatch-badge-fg);
|
|
238
|
+
font-size: var(--swatch-badge-size);
|
|
239
239
|
line-height: 1;
|
|
240
|
-
border-radius: var(--swatch-badge-radius
|
|
240
|
+
border-radius: var(--swatch-badge-radius);
|
|
241
241
|
box-shadow: 0 0 0 1px color-mix(in oklab, var(--a-border-subtle) 60%, transparent);
|
|
242
242
|
}
|
|
243
243
|
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
border: 0;
|
|
297
297
|
padding: 2px 4px;
|
|
298
298
|
margin-inline-start: var(--a-space-1);
|
|
299
|
-
color: var(--swatch-copy-fg
|
|
299
|
+
color: var(--swatch-copy-fg);
|
|
300
300
|
font-size: var(--a-ui-sm);
|
|
301
301
|
line-height: 1;
|
|
302
302
|
cursor: pointer;
|
|
@@ -305,12 +305,12 @@
|
|
|
305
305
|
}
|
|
306
306
|
:scope > [data-copy]:hover { color: var(--a-fg); background: var(--a-bg-muted); }
|
|
307
307
|
:scope > [data-copy]:focus-visible {
|
|
308
|
-
outline: var(--swatch-select-ring-width
|
|
308
|
+
outline: var(--swatch-select-ring-width) solid var(--swatch-select-ring);
|
|
309
309
|
outline-offset: 1px;
|
|
310
310
|
}
|
|
311
311
|
:scope > [data-copy][hidden] { display: none; }
|
|
312
|
-
:scope > [data-copy][data-copy-state="ok"] { color: var(--swatch-copy-fg-ok
|
|
313
|
-
:scope > [data-copy][data-copy-state="fail"] { color: var(--swatch-copy-fg-fail
|
|
312
|
+
:scope > [data-copy][data-copy-state="ok"] { color: var(--swatch-copy-fg-ok); }
|
|
313
|
+
:scope > [data-copy][data-copy-state="fail"] { color: var(--swatch-copy-fg-fail); }
|
|
314
314
|
|
|
315
315
|
/* ═══════ Selectable + selected states ═══════
|
|
316
316
|
[selectable] makes the whole host focusable; ring on :focus-visible.
|
|
@@ -322,12 +322,12 @@
|
|
|
322
322
|
}
|
|
323
323
|
:scope[selectable]:focus { outline: none; }
|
|
324
324
|
:scope[selectable]:focus-visible {
|
|
325
|
-
box-shadow: 0 0 0 var(--swatch-select-ring-width
|
|
325
|
+
box-shadow: 0 0 0 var(--swatch-select-ring-width) var(--swatch-select-ring);
|
|
326
326
|
}
|
|
327
327
|
:scope[selected] {
|
|
328
|
-
box-shadow: 0 0 0 var(--swatch-select-ring-width
|
|
328
|
+
box-shadow: 0 0 0 var(--swatch-select-ring-width) var(--swatch-select-ring);
|
|
329
329
|
}
|
|
330
330
|
:scope[selectable]:hover:not([selected]) {
|
|
331
|
-
box-shadow: 0 0 0 1px color-mix(in oklab, var(--swatch-select-ring
|
|
331
|
+
box-shadow: 0 0 0 1px color-mix(in oklab, var(--swatch-select-ring) 50%, transparent);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -250,21 +250,14 @@ export class UISwiper extends UIElement {
|
|
|
250
250
|
|
|
251
251
|
// ── Snap & page helpers ──
|
|
252
252
|
// The column count drives the page/dot math. `[slides-per-view]` (and the
|
|
253
|
-
// responsive @container rules) set `--swiper-columns
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
// not just the public token. Reading only `--swiper-columns` (unset unless a
|
|
258
|
-
// consumer overrides) made #getColumns() always fall back to 1, so the dot
|
|
259
|
-
// count was `total - 1 + 1 = total slides` instead of the real page count
|
|
260
|
-
// (bug-29: 5 slides at slides-per-view=3 stamped 5 dots, not 3). Regressed by
|
|
261
|
-
// the 2026-05-24 OD-5 `-default` token sweep, which renamed the CSS side but
|
|
262
|
-
// not this read site.
|
|
253
|
+
// responsive @container rules) set `--swiper-columns` on the track; we read
|
|
254
|
+
// the computed value so the dot count tracks the real per-view count
|
|
255
|
+
// (bug-29: 5 slides at slides-per-view=3 → 3 dots, not 5). Consumers may
|
|
256
|
+
// override `--swiper-columns` at any ancestor.
|
|
263
257
|
#getColumns() {
|
|
264
258
|
if (!this.#track) return 1;
|
|
265
259
|
const cs = getComputedStyle(this.#track);
|
|
266
|
-
const v = cs.getPropertyValue('--swiper-columns').trim()
|
|
267
|
-
|| cs.getPropertyValue('--swiper-columns-default').trim();
|
|
260
|
+
const v = cs.getPropertyValue('--swiper-columns').trim();
|
|
268
261
|
const n = parseInt(v, 10);
|
|
269
262
|
return Number.isFinite(n) && n > 0 ? n : 1;
|
|
270
263
|
}
|