@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
@@ -21,45 +21,45 @@
21
21
  @scope (swiper-ui) {
22
22
  :where(:scope) {
23
23
  /* ── Layout ── */
24
- --swiper-gap-default: var(--a-gap-self, var(--a-gap));
25
- --swiper-peek-default: var(--a-space-8);
26
- --swiper-snap-default: start;
27
- --swiper-columns-default: 1;
24
+ --swiper-gap: var(--a-gap-self, var(--a-gap));
25
+ --swiper-peek: var(--a-space-8);
26
+ --swiper-snap: start;
27
+ --swiper-columns: 1;
28
28
 
29
29
  /* ── Pagination dots ── */
30
30
  /* Component-intrinsic visual constant; no --a-space-* equivalent */
31
- --swiper-dot-size-default: 6px;
31
+ --swiper-dot-size: 6px;
32
32
  /* Active dot is one space token (4px @ density=1) larger than the
33
33
  inactive dot — small, deliberate emphasis without rearranging
34
34
  the row. The hitbox stays at 1rem; only the visible circle grows. */
35
- --swiper-dot-size-active-default: calc(var(--swiper-dot-size, var(--swiper-dot-size-default)) + var(--a-space-1));
36
- --swiper-dot-gap-default: var(--a-space-2);
37
- --swiper-dot-bg-default: var(--a-border);
38
- --swiper-dot-bg-active-default: var(--a-fg);
39
- --swiper-dot-radius-default: var(--a-radius-full);
35
+ --swiper-dot-size-active: calc(var(--swiper-dot-size) + var(--a-space-1));
36
+ --swiper-dot-gap: var(--a-space-2);
37
+ --swiper-dot-bg: var(--a-border);
38
+ --swiper-dot-bg-active: var(--a-fg);
39
+ --swiper-dot-radius: var(--a-radius-full);
40
40
 
41
41
  /* ── Host vertical rhythm ── */
42
- --swiper-gap-vertical-default: var(--a-space-3);
42
+ --swiper-gap-vertical: var(--a-space-3);
43
43
 
44
44
  /* ── Paddle bottom offset ── */
45
- --swiper-btn-bottom-default: var(--a-space-3);
45
+ --swiper-btn-bottom: var(--a-space-3);
46
46
 
47
47
  /* ── Autoplay pause button offset ── */
48
- --swiper-pause-top-default: var(--a-space-2);
49
- --swiper-pause-right-default: var(--a-space-2);
48
+ --swiper-pause-top: var(--a-space-2);
49
+ --swiper-pause-right: var(--a-space-2);
50
50
 
51
51
  /* ── Paddles ── */
52
- --swiper-btn-size-default: 3rem;
53
- --swiper-btn-bg-default: transparent;
54
- --swiper-btn-bg-hover-default: var(--a-bg-muted);
55
- --swiper-btn-fg-default: var(--a-fg);
56
- --swiper-btn-radius-default: var(--a-radius-full);
57
- --swiper-btn-shadow-default: none;
58
- --swiper-btn-offset-default: var(--a-space-2);
52
+ --swiper-btn-size: 3rem;
53
+ --swiper-btn-bg: transparent;
54
+ --swiper-btn-bg-hover: var(--a-bg-muted);
55
+ --swiper-btn-fg: var(--a-fg);
56
+ --swiper-btn-radius: var(--a-radius-full);
57
+ --swiper-btn-shadow: none;
58
+ --swiper-btn-offset: var(--a-space-2);
59
59
 
60
60
  /* ── Motion ── */
61
- --swiper-duration-default: var(--a-duration);
62
- --swiper-easing-default: var(--a-easing);
61
+ --swiper-duration: var(--a-duration);
62
+ --swiper-easing: var(--a-easing);
63
63
  }
64
64
 
65
65
  /* ── Host: flex column so dots sit below the scroll track ── */
@@ -68,7 +68,7 @@
68
68
  box-sizing: border-box;
69
69
  display: flex;
70
70
  flex-direction: column;
71
- gap: var(--swiper-gap-vertical, var(--swiper-gap-vertical-default));
71
+ gap: var(--swiper-gap-vertical);
72
72
  width: 100%;
73
73
  position: relative;
74
74
  /* Host is the container so @container queries below read the
@@ -84,7 +84,7 @@
84
84
  display: grid;
85
85
  grid-auto-flow: column;
86
86
  grid-auto-columns: calc(
87
- (100% - (var(--swiper-columns, var(--swiper-columns-default)) - 1) * var(--swiper-gap, var(--swiper-gap-default))) / var(--swiper-columns, var(--swiper-columns-default))
87
+ (100% - (var(--swiper-columns) - 1) * var(--swiper-gap)) / var(--swiper-columns)
88
88
  );
89
89
  overflow-x: auto;
90
90
  overflow-y: hidden;
@@ -92,7 +92,7 @@
92
92
  scroll-behavior: smooth;
93
93
  scrollbar-width: none;
94
94
  -webkit-overflow-scrolling: touch;
95
- gap: var(--swiper-gap, var(--swiper-gap-default));
95
+ gap: var(--swiper-gap);
96
96
  }
97
97
 
98
98
  :scope > [data-swiper-track]::-webkit-scrollbar { display: none; }
@@ -110,29 +110,29 @@
110
110
  /* ── Slides ── */
111
111
 
112
112
  :scope > [data-swiper-track] > * {
113
- scroll-snap-align: var(--swiper-snap, var(--swiper-snap-default));
113
+ scroll-snap-align: var(--swiper-snap);
114
114
  scroll-snap-stop: always;
115
115
  min-width: 0;
116
116
  }
117
117
 
118
118
  /* ── Snap alignment ── */
119
119
 
120
- :scope[snap="center"] { --swiper-snap-default: center; }
121
- :scope[snap="end"] { --swiper-snap-default: end; }
120
+ :scope[snap="center"] { --swiper-snap: center; }
121
+ :scope[snap="end"] { --swiper-snap: end; }
122
122
 
123
123
  /* ── Peek: show partial adjacent slides ── */
124
124
 
125
125
  :scope[peek] > [data-swiper-track] {
126
- padding-inline: var(--swiper-peek, var(--swiper-peek-default));
127
- scroll-padding-inline: var(--swiper-peek, var(--swiper-peek-default));
126
+ padding-inline: var(--swiper-peek);
127
+ scroll-padding-inline: var(--swiper-peek);
128
128
  }
129
129
 
130
130
  /* ── Explicit slides-per-view ── */
131
131
 
132
- :scope[slides-per-view="1"] { --swiper-columns-default: 1; }
133
- :scope[slides-per-view="2"] { --swiper-columns-default: 2; }
134
- :scope[slides-per-view="3"] { --swiper-columns-default: 3; }
135
- :scope[slides-per-view="4"] { --swiper-columns-default: 4; }
132
+ :scope[slides-per-view="1"] { --swiper-columns: 1; }
133
+ :scope[slides-per-view="2"] { --swiper-columns: 2; }
134
+ :scope[slides-per-view="3"] { --swiper-columns: 3; }
135
+ :scope[slides-per-view="4"] { --swiper-columns: 4; }
136
136
 
137
137
  /* ── Responsive auto (container queries) ──
138
138
  The host IS the named `swiper` container, so @container queries
@@ -141,15 +141,15 @@
141
141
  the swiper's own width. */
142
142
 
143
143
  :scope:not([slides-per-view]) {
144
- --swiper-columns-default: 1;
144
+ --swiper-columns: 1;
145
145
  }
146
146
 
147
147
  @container swiper (min-width: 640px) {
148
- :scope:not([slides-per-view]) > [data-swiper-track] { --swiper-columns-default: 2; }
148
+ :scope:not([slides-per-view]) > [data-swiper-track] { --swiper-columns: 2; }
149
149
  }
150
150
 
151
151
  @container swiper (min-width: 960px) {
152
- :scope:not([slides-per-view]) > [data-swiper-track] { --swiper-columns-default: 3; }
152
+ :scope:not([slides-per-view]) > [data-swiper-track] { --swiper-columns: 3; }
153
153
  }
154
154
 
155
155
  /* ══════════════════════════════════════════════════════════
@@ -162,16 +162,16 @@
162
162
  :scope > [data-swiper-btn] {
163
163
  position: absolute;
164
164
  top: 0;
165
- bottom: var(--swiper-btn-bottom, var(--swiper-btn-bottom-default));
165
+ bottom: var(--swiper-btn-bottom);
166
166
  margin-block: auto;
167
167
  height: fit-content;
168
168
  z-index: 2;
169
- --button-size: var(--swiper-btn-size, var(--swiper-btn-size-default));
170
- --button-radius: var(--swiper-btn-radius, var(--swiper-btn-radius-default));
169
+ --button-size: var(--swiper-btn-size);
170
+ --button-radius: var(--swiper-btn-radius);
171
171
  }
172
172
 
173
- :scope > [data-swiper-prev] { left: var(--swiper-btn-offset, var(--swiper-btn-offset-default)); }
174
- :scope > [data-swiper-next] { right: var(--swiper-btn-offset, var(--swiper-btn-offset-default)); }
173
+ :scope > [data-swiper-prev] { left: var(--swiper-btn-offset); }
174
+ :scope > [data-swiper-next] { right: var(--swiper-btn-offset); }
175
175
 
176
176
  /* ══════════════════════════════════════════════════════════
177
177
  JS-stamped pagination dots
@@ -182,7 +182,7 @@
182
182
  display: flex;
183
183
  align-items: center;
184
184
  justify-content: center;
185
- gap: var(--swiper-dot-gap, var(--swiper-dot-gap-default));
185
+ gap: var(--swiper-dot-gap);
186
186
  min-height: 1.5rem;
187
187
  }
188
188
 
@@ -192,16 +192,16 @@
192
192
  for the active one (one space token larger). Padding is computed
193
193
  from the size so the dot stays centered in the hitbox. */
194
194
  :scope [data-swiper-dots] > button {
195
- width: var(--swiper-dot-size, var(--swiper-dot-size-default));
196
- height: var(--swiper-dot-size, var(--swiper-dot-size-default));
197
- border-radius: var(--swiper-dot-radius, var(--swiper-dot-radius-default));
198
- background: var(--swiper-dot-bg, var(--swiper-dot-bg-default));
195
+ width: var(--swiper-dot-size);
196
+ height: var(--swiper-dot-size);
197
+ border-radius: var(--swiper-dot-radius);
198
+ background: var(--swiper-dot-bg);
199
199
  border: none;
200
- padding: calc((1rem - var(--swiper-dot-size, var(--swiper-dot-size-default))) / 2);
200
+ padding: calc((1rem - var(--swiper-dot-size)) / 2);
201
201
  background-clip: content-box;
202
202
  box-sizing: content-box;
203
203
  cursor: pointer;
204
- transition: background var(--swiper-duration, var(--swiper-duration-default)) var(--swiper-easing, var(--swiper-easing-default));
204
+ transition: background var(--swiper-duration) var(--swiper-easing);
205
205
  }
206
206
 
207
207
  /* Long-hand `background-color` (not the `background` shorthand!) so
@@ -209,7 +209,7 @@
209
209
  its initial `border-box` value — the colored area would otherwise
210
210
  fill the full 1rem hitbox and turn into a huge circle. */
211
211
  :scope [data-swiper-dots] > button:hover {
212
- background-color: var(--swiper-dot-bg-active, var(--swiper-dot-bg-active-default));
212
+ background-color: var(--swiper-dot-bg-active);
213
213
  }
214
214
 
215
215
  /* Focus ring is rendered INSIDE the padding area (inset shadow), so
@@ -220,10 +220,10 @@
220
220
  }
221
221
 
222
222
  :scope [data-swiper-dots] > button[aria-current="true"] {
223
- background-color: var(--swiper-dot-bg-active, var(--swiper-dot-bg-active-default));
224
- width: var(--swiper-dot-size-active, var(--swiper-dot-size-active-default));
225
- height: var(--swiper-dot-size-active, var(--swiper-dot-size-active-default));
226
- padding: calc((1rem - var(--swiper-dot-size-active, var(--swiper-dot-size-active-default))) / 2);
223
+ background-color: var(--swiper-dot-bg-active);
224
+ width: var(--swiper-dot-size-active);
225
+ height: var(--swiper-dot-size-active);
226
+ padding: calc((1rem - var(--swiper-dot-size-active)) / 2);
227
227
  }
228
228
 
229
229
  /* ══════════════════════════════════════════════════════════
@@ -271,8 +271,8 @@
271
271
 
272
272
  :scope[autoplay] > [data-swiper-pause] {
273
273
  position: absolute;
274
- top: var(--swiper-pause-top, var(--swiper-pause-top-default));
275
- right: var(--swiper-pause-right, var(--swiper-pause-right-default));
274
+ top: var(--swiper-pause-top);
275
+ right: var(--swiper-pause-right);
276
276
  z-index: 1;
277
277
  }
278
278
 
@@ -2,64 +2,64 @@
2
2
  token-block (Flavor B — attribute-removal restyle) both fail inside
3
3
  `@scope`. Selectors moved out. See docs/BROWSER-COMPAT.md §3a. */
4
4
  switch-ui:not([disabled]):hover {
5
- --switch-track-bg-default: var(--switch-track-bg-hover, var(--switch-track-bg-hover-default));
6
- --switch-track-border-default: var(--switch-track-border-hover, var(--switch-track-border-hover-default));
5
+ --switch-track-bg: var(--switch-track-bg-hover);
6
+ --switch-track-border: var(--switch-track-border-hover);
7
7
  }
8
8
  switch-ui[checked]:not([disabled]):hover {
9
- --switch-track-bg-default: var(--switch-track-bg-checked-hover, var(--switch-track-bg-checked-hover-default));
10
- --switch-track-border-default: var(--switch-track-border-checked-hover, var(--switch-track-border-checked-hover-default));
9
+ --switch-track-bg: var(--switch-track-bg-checked-hover);
10
+ --switch-track-border: var(--switch-track-border-checked-hover);
11
11
  }
12
12
  switch-ui[checked] {
13
- --switch-track-bg-default: var(--switch-track-bg-checked, var(--switch-track-bg-checked-default));
14
- --switch-track-border-default: var(--switch-track-border-checked, var(--switch-track-border-checked-default));
15
- --switch-thumb-bg-default: var(--switch-thumb-bg-checked, var(--switch-thumb-bg-checked-default));
13
+ --switch-track-bg: var(--switch-track-bg-checked);
14
+ --switch-track-border: var(--switch-track-border-checked);
15
+ --switch-thumb-bg: var(--switch-thumb-bg-checked);
16
16
  }
17
17
  switch-ui[checked] [slot="thumb"] {
18
- transform: translateX(var(--switch-thumb-travel, var(--switch-thumb-travel-default)));
18
+ transform: translateX(var(--switch-thumb-travel));
19
19
  }
20
20
 
21
21
  @scope (switch-ui) {
22
22
  :where(:scope) {
23
23
  /* ── Layout ── */
24
- --switch-gap-default: var(--a-space-2);
25
- --switch-radius-default: var(--a-radius-full);
24
+ --switch-gap: var(--a-space-2);
25
+ --switch-radius: var(--a-radius-full);
26
26
 
27
27
  /* ── Typography ── */
28
- --switch-font-size-default: var(--a-ui-size);
28
+ --switch-font-size: var(--a-ui-size);
29
29
 
30
30
  /* ── Colors ── */
31
- --switch-track-bg-hover-default: var(--a-bg-muted);
32
- --switch-track-bg-checked-hover-default: var(--a-primary-hover);
33
- --switch-track-border-checked-hover-default: var(--a-primary-hover);
34
- --switch-thumb-shadow-default: var(--a-shadow-sm);
31
+ --switch-track-bg-hover: var(--a-bg-muted);
32
+ --switch-track-bg-checked-hover: var(--a-primary-hover);
33
+ --switch-track-border-checked-hover: var(--a-primary-hover);
34
+ --switch-thumb-shadow: var(--a-shadow-sm);
35
35
 
36
36
  /* ── Transition ── */
37
- --switch-duration-default: var(--a-duration-fast);
38
- --switch-easing-default: var(--a-easing);
37
+ --switch-duration: var(--a-duration-fast);
38
+ --switch-easing: var(--a-easing);
39
39
 
40
40
  /* ── Focus ── */
41
- --switch-focus-ring-default: var(--a-focus-ring);
41
+ --switch-focus-ring: var(--a-focus-ring);
42
42
 
43
43
  /* ── Track ── (sizes scale with universal [size] attribute via --a-toggle-size) */
44
- --switch-track-height-default: var(--a-toggle-size);
45
- --switch-track-width-default: calc(var(--a-toggle-size) * 1.8);
46
- --switch-track-bg-default: var(--a-ui-bg);
47
- --switch-track-border-default: var(--a-ui-border);
48
- --switch-track-border-hover-default: var(--a-fg-subtle);
44
+ --switch-track-height: var(--a-toggle-size);
45
+ --switch-track-width: calc(var(--a-toggle-size) * 1.8);
46
+ --switch-track-bg: var(--a-ui-bg);
47
+ --switch-track-border: var(--a-ui-border);
48
+ --switch-track-border-hover: var(--a-fg-subtle);
49
49
 
50
50
  /* ── Track: checked ── */
51
- --switch-track-bg-checked-default: var(--a-primary);
52
- --switch-track-border-checked-default: var(--a-primary);
51
+ --switch-track-bg-checked: var(--a-primary);
52
+ --switch-track-border-checked: var(--a-primary);
53
53
 
54
54
  /* ── Thumb ── (derived from track; inset accounts for border + visual gap) */
55
- --switch-thumb-inset-default: 2px;
56
- --switch-thumb-size-default: calc(var(--a-toggle-size) - 2 * var(--switch-thumb-inset, var(--switch-thumb-inset-default)) - 2px); /* -2px for 1px border each side */
57
- --switch-thumb-bg-default: var(--a-fg-muted);
58
- --switch-thumb-bg-checked-default: var(--a-chrome-light);
59
- --switch-thumb-travel-default: calc(var(--switch-track-width, var(--switch-track-width-default)) - var(--switch-thumb-size, var(--switch-thumb-size-default)) - 2 * var(--switch-thumb-inset, var(--switch-thumb-inset-default)) - 2px);
55
+ --switch-thumb-inset: 2px;
56
+ --switch-thumb-size: calc(var(--a-toggle-size) - 2 * var(--switch-thumb-inset) - 2px); /* -2px for 1px border each side */
57
+ --switch-thumb-bg: var(--a-fg-muted);
58
+ --switch-thumb-bg-checked: var(--a-chrome-light);
59
+ --switch-thumb-travel: calc(var(--switch-track-width) - var(--switch-thumb-size) - 2 * var(--switch-thumb-inset) - 2px);
60
60
 
61
61
  /* ── State: disabled ── */
62
- --switch-fg-disabled-default: var(--a-ui-text-disabled);
62
+ --switch-fg-disabled: var(--a-ui-text-disabled);
63
63
  text-align: start; /* §text-align-reset — blocks inheritance from centered ancestors */
64
64
  }
65
65
 
@@ -68,43 +68,43 @@ switch-ui[checked] [slot="thumb"] {
68
68
  box-sizing: border-box;
69
69
  display: inline-flex;
70
70
  align-items: center;
71
- gap: var(--switch-gap, var(--switch-gap-default));
71
+ gap: var(--switch-gap);
72
72
  cursor: pointer;
73
73
  user-select: none;
74
- font-size: var(--switch-font-size, var(--switch-font-size-default));
74
+ font-size: var(--switch-font-size);
75
75
  }
76
- :scope[disabled] { cursor: not-allowed; color: var(--switch-fg-disabled, var(--switch-fg-disabled-default)); }
76
+ :scope[disabled] { cursor: not-allowed; color: var(--switch-fg-disabled); }
77
77
 
78
78
  [slot="track"] {
79
79
  position: relative;
80
- width: var(--switch-track-width, var(--switch-track-width-default));
81
- height: var(--switch-track-height, var(--switch-track-height-default));
82
- border-radius: var(--switch-radius, var(--switch-radius-default));
83
- background: var(--switch-track-bg, var(--switch-track-bg-default));
84
- border: 1px solid var(--switch-track-border, var(--switch-track-border-default));
80
+ width: var(--switch-track-width);
81
+ height: var(--switch-track-height);
82
+ border-radius: var(--switch-radius);
83
+ background: var(--switch-track-bg);
84
+ border: 1px solid var(--switch-track-border);
85
85
  flex-shrink: 0;
86
86
  transition:
87
- background var(--switch-duration, var(--switch-duration-default)) var(--switch-easing, var(--switch-easing-default)),
88
- border-color var(--switch-duration, var(--switch-duration-default)) var(--switch-easing, var(--switch-easing-default));
87
+ background var(--switch-duration) var(--switch-easing),
88
+ border-color var(--switch-duration) var(--switch-easing);
89
89
  }
90
90
  /* hover + [checked] rules moved outside @scope — see Safari 17.x bug note at top. */
91
91
 
92
92
  [slot="thumb"] {
93
93
  position: absolute;
94
- top: var(--switch-thumb-inset, var(--switch-thumb-inset-default));
95
- left: var(--switch-thumb-inset, var(--switch-thumb-inset-default));
96
- width: var(--switch-thumb-size, var(--switch-thumb-size-default));
97
- height: var(--switch-thumb-size, var(--switch-thumb-size-default));
98
- border-radius: var(--switch-radius, var(--switch-radius-default));
99
- background: var(--switch-thumb-bg, var(--switch-thumb-bg-default));
100
- box-shadow: var(--switch-thumb-shadow, var(--switch-thumb-shadow-default));
94
+ top: var(--switch-thumb-inset);
95
+ left: var(--switch-thumb-inset);
96
+ width: var(--switch-thumb-size);
97
+ height: var(--switch-thumb-size);
98
+ border-radius: var(--switch-radius);
99
+ background: var(--switch-thumb-bg);
100
+ box-shadow: var(--switch-thumb-shadow);
101
101
  transition:
102
- transform var(--switch-duration, var(--switch-duration-default)) var(--switch-easing, var(--switch-easing-default)),
103
- background var(--switch-duration, var(--switch-duration-default)) var(--switch-easing, var(--switch-easing-default));
102
+ transform var(--switch-duration) var(--switch-easing),
103
+ background var(--switch-duration) var(--switch-easing);
104
104
  }
105
105
  /* :scope[checked] [slot="thumb"] moved outside @scope — see Safari 17.x bug note at top. */
106
106
 
107
- [slot="label"] { font-size: var(--switch-font-size, var(--switch-font-size-default)); }
107
+ [slot="label"] { font-size: var(--switch-font-size); }
108
108
 
109
109
  /* ── Hint (§184, v0.5.5, FEEDBACK-08 §7) ──
110
110
  Caption beneath the toggle row; wired to aria-describedby on host. */
@@ -126,11 +126,11 @@ switch-ui[checked] [slot="thumb"] {
126
126
  :scope:has([slot="hint"]) { flex-wrap: wrap; }
127
127
  :scope:has([slot="hint"]) [slot="hint"] {
128
128
  flex-basis: 100%;
129
- padding-inline-start: calc(var(--switch-track-width, var(--switch-track-width-default)) + var(--switch-gap, var(--switch-gap-default)));
129
+ padding-inline-start: calc(var(--switch-track-width) + var(--switch-gap));
130
130
  }
131
131
 
132
132
  :scope:focus-visible { outline: none; }
133
- :scope:focus-visible [slot="track"] { box-shadow: var(--switch-focus-ring, var(--switch-focus-ring-default)); }
133
+ :scope:focus-visible [slot="track"] { box-shadow: var(--switch-focus-ring); }
134
134
 
135
135
  /* Size handled by universal [size] attribute system. */
136
136
  }