@adia-ai/web-components 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/components/accordion/accordion.css +2 -2
  3. package/components/action-list/action-list.css +2 -2
  4. package/components/agent-artifact/agent-artifact.css +31 -31
  5. package/components/agent-feedback-bar/agent-feedback-bar.css +10 -10
  6. package/components/agent-questions/agent-questions.css +59 -57
  7. package/components/agent-reasoning/agent-reasoning.css +54 -54
  8. package/components/agent-suggestions/agent-suggestions.css +4 -4
  9. package/components/agent-trace/agent-trace.css +53 -53
  10. package/components/alert/alert.css +53 -53
  11. package/components/avatar/avatar.css +27 -27
  12. package/components/badge/badge.css +56 -53
  13. package/components/block/block.css +16 -16
  14. package/components/blockquote/blockquote.css +16 -16
  15. package/components/breadcrumb/breadcrumb.css +23 -23
  16. package/components/button/button.css +99 -100
  17. package/components/calendar-grid/calendar-grid.css +95 -92
  18. package/components/calendar-picker/calendar-picker.css +141 -139
  19. package/components/canvas/canvas.css +12 -12
  20. package/components/card/card.css +83 -83
  21. package/components/chart/chart.css +218 -218
  22. package/components/chart-legend/chart-legend.css +26 -26
  23. package/components/check/check.css +40 -40
  24. package/components/code/code.css +125 -125
  25. package/components/col/col.css +15 -15
  26. package/components/color-picker/color-picker.css +55 -55
  27. package/components/combobox/combobox.css +64 -62
  28. package/components/command/command.css +91 -91
  29. package/components/context-menu/context-menu.css +1 -1
  30. package/components/date-range-picker/date-range-picker.css +59 -59
  31. package/components/datetime-picker/datetime-picker.css +25 -25
  32. package/components/demo-toggle/demo-toggle.css +27 -27
  33. package/components/description-list/description-list.css +18 -18
  34. package/components/divider/divider.css +24 -24
  35. package/components/embed/embed.css +6 -6
  36. package/components/empty-state/empty-state.css +29 -29
  37. package/components/feed/feed.css +12 -12
  38. package/components/field/field.css +28 -28
  39. package/components/field/field.test.js +2 -2
  40. package/components/fields/fields.css +5 -5
  41. package/components/grid/grid.a2ui.json +10 -0
  42. package/components/grid/grid.css +23 -5
  43. package/components/grid/grid.d.ts +4 -0
  44. package/components/grid/grid.yaml +13 -0
  45. package/components/heatmap/heatmap.css +61 -61
  46. package/components/icon/icon.css +12 -12
  47. package/components/image/image.css +14 -14
  48. package/components/inline-edit/inline-edit.css +16 -16
  49. package/components/inline-message/inline-message.css +16 -16
  50. package/components/input/input.css +69 -66
  51. package/components/inspector/inspector.css +6 -6
  52. package/components/integration-card/integration-card.css +41 -41
  53. package/components/integration-card/integration-card.test.js +4 -4
  54. package/components/kbd/kbd.css +47 -40
  55. package/components/link/link.css +12 -12
  56. package/components/list/list.css +8 -8
  57. package/components/list-window/list-window.css +10 -10
  58. package/components/loading-overlay/loading-overlay.css +17 -18
  59. package/components/loading-overlay/loading-overlay.test.js +8 -8
  60. package/components/mark/mark.css +16 -16
  61. package/components/menu/menu.css +9 -9
  62. package/components/modal/modal.class.js +5 -9
  63. package/components/modal/modal.css +43 -43
  64. package/components/nav/nav.css +40 -40
  65. package/components/nav-group/nav-group.css +54 -54
  66. package/components/nav-item/nav-item.css +44 -44
  67. package/components/noodles/noodles.css +31 -31
  68. package/components/number-format/number-format.css +4 -4
  69. package/components/option-card/option-card.css +70 -70
  70. package/components/otp-input/otp-input.css +29 -29
  71. package/components/page/page.a2ui.json +1 -1
  72. package/components/page/page.css +27 -27
  73. package/components/page/page.d.ts +1 -1
  74. package/components/page/page.yaml +1 -1
  75. package/components/pagination/pagination.css +6 -6
  76. package/components/pane/pane.css +57 -57
  77. package/components/password-strength/password-strength.css +32 -32
  78. package/components/pipeline-status/pipeline-status.css +67 -67
  79. package/components/popover/popover.css +11 -11
  80. package/components/preview/preview.css +21 -21
  81. package/components/progress/progress.css +23 -23
  82. package/components/progress-row/progress-row.css +17 -17
  83. package/components/qr-code/qr-code.css +4 -4
  84. package/components/radio/radio.css +39 -39
  85. package/components/range/range.css +58 -55
  86. package/components/rating/rating.css +28 -28
  87. package/components/relative-time/relative-time.css +6 -6
  88. package/components/richtext/richtext.css +133 -133
  89. package/components/row/row.css +19 -19
  90. package/components/search/search.css +5 -5
  91. package/components/segment/segment.css +29 -24
  92. package/components/segmented/segmented.css +30 -25
  93. package/components/select/select.css +95 -93
  94. package/components/skeleton/skeleton.css +14 -14
  95. package/components/skip-nav/skip-nav.css +4 -4
  96. package/components/slider/slider.css +61 -61
  97. package/components/spinner/spinner.css +40 -40
  98. package/components/spinner/spinner.test.js +10 -12
  99. package/components/stack/stack.css +11 -11
  100. package/components/stat/stat.css +27 -27
  101. package/components/step-progress/step-progress.css +20 -20
  102. package/components/stepper/stepper.css +29 -29
  103. package/components/stream/stream.css +12 -12
  104. package/components/swatch/swatch.css +68 -68
  105. package/components/swiper/swiper.class.js +5 -12
  106. package/components/swiper/swiper.css +57 -57
  107. package/components/switch/switch.css +53 -53
  108. package/components/table/table.css +166 -163
  109. package/components/table-toolbar/table-toolbar.css +33 -33
  110. package/components/tabs/tabs.css +54 -51
  111. package/components/tag/tag.css +74 -71
  112. package/components/tag/tag.test.js +14 -14
  113. package/components/tags-input/tags-input.css +51 -49
  114. package/components/text/text.css +44 -44
  115. package/components/textarea/textarea.css +49 -46
  116. package/components/time-picker/time-picker.css +47 -47
  117. package/components/timeline/timeline.css +54 -54
  118. package/components/toast/toast.css +58 -58
  119. package/components/toc/toc.css +28 -28
  120. package/components/toggle-group/toggle-group.css +9 -6
  121. package/components/toggle-scheme/toggle-scheme.css +2 -2
  122. package/components/toolbar/toolbar.css +18 -18
  123. package/components/tooltip/tooltip.css +2 -2
  124. package/components/tour/tour.css +4 -4
  125. package/components/tree/tree.css +37 -37
  126. package/components/upload/upload.css +49 -49
  127. package/dist/host.min.css +1 -0
  128. package/dist/web-components.min.css +1 -1
  129. package/dist/web-components.min.js +2 -2
  130. package/package.json +1 -1
  131. package/styles/foundation/space.css +19 -18
  132. package/styles/host.css +48 -0
  133. package/styles/prose.css +187 -173
  134. package/styles/type/scale.css +6 -0
  135. package/styles/typography.css +10 -5
  136. package/styles/verse.css +122 -0
@@ -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-default: var(--a-title-size);
6
- --stat-value-weight-default: var(--a-weight-bold);
7
- --stat-value-fg-default: var(--a-fg-strong);
8
- --stat-label-size-default: var(--a-ui-size);
9
- --stat-label-fg-default: var(--a-fg);
10
- --stat-change-size-default: var(--a-ui-size);
11
- --stat-up-fg-default: var(--a-success-bg);
12
- --stat-down-fg-default: var(--a-danger-bg);
13
- --stat-icon-fg-default: var(--a-fg-muted);
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-default: var(--a-gap-self, var(--a-gap));
17
- --stat-row-gap-default: var(--a-gap-sm);
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, var(--stat-column-gap-default));
35
- row-gap: var(--stat-row-gap, var(--stat-row-gap-default));
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, var(--card-inset-default, 0px)));
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, var(--card-inset-default, 0px)));
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, var(--stat-label-size-default));
134
- color: var(--stat-label-fg, var(--stat-label-fg-default));
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, var(--stat-change-size-default));
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, var(--stat-value-size-default));
157
- font-weight: var(--stat-value-weight, var(--stat-value-weight-default));
158
- color: var(--stat-value-fg, var(--stat-value-fg-default));
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, var(--stat-up-fg-default));
169
+ color: var(--stat-up-fg);
170
170
  }
171
171
  :scope[trend="up"] [slot="change"] {
172
- color: var(--stat-up-fg, var(--stat-up-fg-default));
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, var(--stat-down-fg-default));
177
+ color: var(--stat-down-fg);
178
178
  }
179
179
  :scope[trend="down"] [slot="change"] {
180
- color: var(--stat-down-fg, var(--stat-down-fg-default));
180
+ color: var(--stat-down-fg);
181
181
  }
182
182
 
183
183
  :scope[trend="neutral"] [slot="change"] {
184
- color: var(--stat-label-fg, var(--stat-label-fg-default));
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, var(--stat-icon-fg-default));
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-default: var(--a-space-2);
9
- --step-progress-track-gap-default: var(--a-space-1);
10
- --step-progress-dash-h-default: 4px;
11
- --step-progress-dash-radius-default: var(--a-radius-full);
12
- --step-progress-dash-bg-default: var(--a-border-subtle);
13
- --step-progress-dash-bg-active-default: var(--a-accent);
14
- --step-progress-caption-fg-default: var(--a-fg-muted);
15
- --step-progress-caption-size-default: var(--a-ui-sm);
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-default: 0 1 18rem;
20
- --step-progress-min-width-default: 10rem;
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, var(--step-progress-gap-default));
27
- flex: var(--step-progress-flex, var(--step-progress-flex-default));
28
- min-width: var(--step-progress-min-width, var(--step-progress-min-width-default));
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, var(--step-progress-caption-fg-default));
35
- font-size: var(--step-progress-caption-size, var(--step-progress-caption-size-default));
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, var(--step-progress-track-gap-default));
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, var(--step-progress-dash-h-default));
53
- border-radius: var(--step-progress-dash-radius, var(--step-progress-dash-radius-default));
54
- background: var(--step-progress-dash-bg, var(--step-progress-dash-bg-default));
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, var(--step-progress-dash-bg-active-default));
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-default: 2rem;
16
- --stepper-bg-default: var(--a-bg);
17
- --stepper-border-default: var(--a-border);
18
- --stepper-fg-default: var(--a-fg-muted);
19
- --stepper-font-default: var(--a-ui-sm);
20
- --stepper-weight-default: var(--a-weight-medium);
21
- --stepper-border-size-default: 2px;
22
-
23
- --stepper-bg-active-default: var(--a-bg);
24
- --stepper-border-active-default: var(--a-accent);
25
- --stepper-fg-active-default: var(--a-accent);
26
-
27
- --stepper-bg-done-default: var(--a-accent);
28
- --stepper-border-done-default: var(--a-accent);
29
- --stepper-fg-done-default: var(--a-accent-fg);
30
-
31
- --stepper-line-default: var(--a-border-subtle);
32
- --stepper-line-done-default: var(--a-accent);
33
- --stepper-line-size-default: 2px;
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-default: var(--stepper-item-gap-sm, …)` resolves
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-default: var(--a-radius-full);
44
- --stepper-gap-default: var(--a-space-3);
45
- --stepper-gap-sm-default: var(--a-space-2);
46
- --stepper-pad-x-default: var(--a-space-4);
47
- --stepper-pad-y-default: var(--a-space-6);
48
- --stepper-offset-xs-default: var(--a-space-1);
49
- --stepper-min-width-default: 5rem;
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-default: var(--stepper-gap-sm, var(--a-space-2));
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, var(--stepper-item-gap-sm-default)));
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-default: var(--a-fg);
4
- --stream-font-size-default: var(--a-body-size);
5
- --stream-font-family-default: var(--a-font-family);
6
- --stream-leading-default: var(--a-body-leading);
7
- --stream-cursor-color-default: var(--a-accent-bg);
8
- --stream-blink-duration-default: 0.6s;
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, var(--stream-fg-default));
15
- font-family: var(--stream-font-family, var(--stream-font-family-default));
16
- font-size: var(--stream-font-size, var(--stream-font-size-default));
17
- line-height: var(--stream-leading, var(--stream-leading-default));
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, var(--stream-cursor-color-default));
26
- animation: _stream-blink var(--stream-blink-duration, var(--stream-blink-duration-default)) step-end infinite;
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-default: var(--a-space-2);
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-default: var(--a-space-2); /* 8px ~ */
11
- --swatch-tile-md-default: var(--a-space-2-5); /* 10px ~ */
12
- --swatch-tile-lg-default: 40px; /* token-scale block */
13
- --swatch-line-thickness-default: 2px;
14
- --swatch-line-length-default: calc(var(--swatch-tile-md, var(--swatch-tile-md-default)) * 1.75);
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-default: var(--a-data-0);
21
- --swatch-label-fg-default: var(--a-fg-subtle);
20
+ --swatch-color: var(--a-data-0);
21
+ --swatch-label-fg: var(--a-fg-subtle);
22
22
 
23
23
  /* ── Shape ── */
24
- --swatch-radius-block-default: var(--a-radius-sm);
25
- --swatch-radius-square-default: var(--a-radius-sm);
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-default: inset 0 0 0 1px color-mix(in oklab, currentColor 8%, transparent);
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-default: var(--a-ui-size);
32
- --swatch-label-step-size-default: 10px;
33
- --swatch-label-step-mt-default: 4px;
34
- --swatch-detail-size-default: var(--a-ui-xs);
35
- --swatch-detail-fg-default: var(--a-fg-subtle);
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-default: var(--a-ui-xs);
39
- --swatch-badge-fg-default: var(--a-chrome-fg);
40
- --swatch-badge-bg-default: var(--a-chrome-bg);
41
- --swatch-badge-pad-default: 2px 4px;
42
- --swatch-badge-radius-default: var(--a-radius-xs);
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-default: var(--a-space-3);
46
- --swatch-copy-fg-default: var(--a-fg-muted);
47
- --swatch-copy-fg-ok-default: var(--a-success);
48
- --swatch-copy-fg-fail-default: var(--a-warning);
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-default: var(--a-accent);
52
- --swatch-select-ring-width-default: 2px;
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, var(--swatch-gap-default));
62
+ gap: var(--swatch-gap);
63
63
  min-width: 0;
64
- color: var(--swatch-label-fg, var(--swatch-label-fg-default));
65
- font-size: var(--swatch-label-size, var(--swatch-label-size-default));
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, var(--swatch-color-default));
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, var(--swatch-tile-md-default)));
91
- height: var(--_size, var(--swatch-tile-md, var(--swatch-tile-md-default)));
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, var(--swatch-tile-md-default)));
98
- height: var(--_size, var(--swatch-tile-md, var(--swatch-tile-md-default)));
99
- border-radius: var(--swatch-radius-square, var(--swatch-radius-square-default));
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, var(--swatch-line-length-default));
105
- height: var(--swatch-line-thickness, var(--swatch-line-thickness-default));
106
- border-radius: var(--swatch-line-thickness, var(--swatch-line-thickness-default));
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, var(--swatch-line-length-default));
112
- height: var(--swatch-line-thickness, var(--swatch-line-thickness-default));
111
+ width: var(--swatch-line-length);
112
+ height: var(--swatch-line-thickness);
113
113
  background: transparent;
114
- border-top: var(--swatch-line-thickness, var(--swatch-line-thickness-default)) dashed var(--swatch-color, var(--swatch-color-default));
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, var(--swatch-tile-lg-default)));
130
- border-radius: var(--swatch-radius-block, var(--swatch-radius-block-default));
131
- box-shadow: var(--swatch-block-shadow, var(--swatch-block-shadow-default));
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, var(--swatch-label-step-size-default));
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, var(--swatch-label-step-mt-default));
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, var(--swatch-tile-lg-default)));
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, var(--swatch-tile-sm-default));
182
- --_block-h: calc(var(--swatch-tile-lg, var(--swatch-tile-lg-default)) * 0.6);
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, var(--swatch-tile-md-default));
186
- --_block-h: calc(var(--swatch-tile-lg, var(--swatch-tile-lg-default)) * 0.75);
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, var(--swatch-tile-md-default)) * 1.4);
190
- --_block-h: var(--swatch-tile-lg, var(--swatch-tile-lg-default));
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, var(--swatch-detail-fg-default));
199
- font-size: var(--swatch-detail-size, var(--swatch-detail-size-default));
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, var(--swatch-badge-pad-default));
236
- background: var(--swatch-badge-bg, var(--swatch-badge-bg-default));
237
- color: var(--swatch-badge-fg, var(--swatch-badge-fg-default));
238
- font-size: var(--swatch-badge-size, var(--swatch-badge-size-default));
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, var(--swatch-badge-radius-default));
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, var(--swatch-copy-fg-default));
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, var(--swatch-select-ring-width-default)) solid var(--swatch-select-ring, var(--swatch-select-ring-default));
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, var(--swatch-copy-fg-ok-default)); }
313
- :scope > [data-copy][data-copy-state="fail"] { color: var(--swatch-copy-fg-fail, var(--swatch-copy-fg-fail-default)); }
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, var(--swatch-select-ring-width-default)) var(--swatch-select-ring, var(--swatch-select-ring-default));
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, var(--swatch-select-ring-width-default)) var(--swatch-select-ring, var(--swatch-select-ring-default));
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, var(--swatch-select-ring-default)) 50%, transparent);
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-default` on the host /
254
- // track per the component-token contract; consumers may override via the
255
- // public `--swiper-columns`. We must read the SAME fallback chain the CSS
256
- // width calc uses — `var(--swiper-columns, var(--swiper-columns-default))`
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
  }