@adia-ai/web-components 0.6.33 → 0.6.34

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 (157) 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 +57 -57
  7. package/components/agent-reasoning/agent-reasoning.css +62 -62
  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 +41 -41
  11. package/components/avatar/avatar.css +27 -27
  12. package/components/badge/badge.css +27 -27
  13. package/components/block/block.css +16 -16
  14. package/components/breadcrumb/breadcrumb.css +23 -23
  15. package/components/button/button.css +101 -91
  16. package/components/calendar-grid/calendar-grid.a2ui.json +136 -0
  17. package/components/calendar-grid/calendar-grid.css +226 -0
  18. package/components/calendar-grid/calendar-grid.d.ts +37 -0
  19. package/components/calendar-grid/calendar-grid.js +17 -0
  20. package/components/calendar-grid/calendar-grid.yaml +116 -0
  21. package/components/calendar-grid/class.js +300 -0
  22. package/components/calendar-picker/calendar-picker.css +139 -139
  23. package/components/canvas/canvas.css +12 -12
  24. package/components/card/card.css +83 -83
  25. package/components/chart/chart.css +224 -224
  26. package/components/chart-legend/chart-legend.css +26 -26
  27. package/components/check/check.css +40 -40
  28. package/components/code/code.css +125 -125
  29. package/components/col/col.css +15 -15
  30. package/components/color-picker/color-picker.css +55 -55
  31. package/components/combobox/class.js +861 -0
  32. package/components/combobox/combobox.a2ui.json +363 -0
  33. package/components/combobox/combobox.css +244 -0
  34. package/components/combobox/combobox.d.ts +113 -0
  35. package/components/combobox/combobox.examples.md +59 -0
  36. package/components/combobox/combobox.js +17 -0
  37. package/components/combobox/combobox.test.js +181 -0
  38. package/components/combobox/combobox.yaml +369 -0
  39. package/components/command/command.css +90 -90
  40. package/components/date-range-picker/class.js +775 -0
  41. package/components/date-range-picker/date-range-picker.a2ui.json +300 -0
  42. package/components/date-range-picker/date-range-picker.css +178 -0
  43. package/components/date-range-picker/date-range-picker.d.ts +82 -0
  44. package/components/date-range-picker/date-range-picker.examples.md +37 -0
  45. package/components/date-range-picker/date-range-picker.js +17 -0
  46. package/components/date-range-picker/date-range-picker.test.js +387 -0
  47. package/components/date-range-picker/date-range-picker.yaml +285 -0
  48. package/components/datetime-picker/class.js +706 -0
  49. package/components/datetime-picker/datetime-picker.a2ui.json +334 -0
  50. package/components/datetime-picker/datetime-picker.css +150 -0
  51. package/components/datetime-picker/datetime-picker.d.ts +86 -0
  52. package/components/datetime-picker/datetime-picker.examples.md +46 -0
  53. package/components/datetime-picker/datetime-picker.js +17 -0
  54. package/components/datetime-picker/datetime-picker.test.js +454 -0
  55. package/components/datetime-picker/datetime-picker.yaml +332 -0
  56. package/components/demo-toggle/demo-toggle.css +27 -27
  57. package/components/description-list/description-list.css +18 -18
  58. package/components/divider/divider.css +24 -24
  59. package/components/embed/embed.css +6 -6
  60. package/components/empty-state/empty-state.css +27 -27
  61. package/components/feed/feed.css +12 -12
  62. package/components/field/field.css +28 -28
  63. package/components/fields/fields.css +5 -5
  64. package/components/grid/grid.css +5 -5
  65. package/components/heatmap/heatmap.css +63 -63
  66. package/components/icon/icon.css +12 -12
  67. package/components/image/image.css +14 -14
  68. package/components/index.js +8 -0
  69. package/components/input/input.css +66 -66
  70. package/components/inspector/inspector.css +6 -6
  71. package/components/integration-card/class.js +410 -0
  72. package/components/integration-card/integration-card.a2ui.json +268 -0
  73. package/components/integration-card/integration-card.css +169 -0
  74. package/components/integration-card/integration-card.d.ts +63 -0
  75. package/components/integration-card/integration-card.examples.md +41 -0
  76. package/components/integration-card/integration-card.js +17 -0
  77. package/components/integration-card/integration-card.test.js +306 -0
  78. package/components/integration-card/integration-card.yaml +280 -0
  79. package/components/kbd/kbd.css +32 -32
  80. package/components/link/link.css +12 -12
  81. package/components/list/list.css +8 -8
  82. package/components/list-window/class.js +688 -0
  83. package/components/list-window/list-window.a2ui.json +277 -0
  84. package/components/list-window/list-window.css +124 -0
  85. package/components/list-window/list-window.d.ts +84 -0
  86. package/components/list-window/list-window.examples.md +73 -0
  87. package/components/list-window/list-window.js +17 -0
  88. package/components/list-window/list-window.test.js +303 -0
  89. package/components/list-window/list-window.yaml +270 -0
  90. package/components/menu/menu.css +8 -8
  91. package/components/modal/modal.css +43 -43
  92. package/components/nav/nav.css +40 -40
  93. package/components/nav-group/nav-group.css +52 -52
  94. package/components/nav-item/nav-item.css +44 -44
  95. package/components/noodles/noodles.css +31 -31
  96. package/components/option-card/option-card.css +69 -69
  97. package/components/otp-input/otp-input.css +30 -30
  98. package/components/page/page.css +18 -18
  99. package/components/pagination/pagination.css +61 -61
  100. package/components/pane/pane.css +57 -57
  101. package/components/pipeline-status/pipeline-status.css +65 -65
  102. package/components/popover/popover.css +17 -17
  103. package/components/progress/progress.css +23 -23
  104. package/components/progress-row/progress-row.css +17 -17
  105. package/components/radio/radio.css +39 -39
  106. package/components/range/range.css +55 -55
  107. package/components/rating/rating.css +28 -28
  108. package/components/richtext/richtext.css +133 -133
  109. package/components/row/row.css +19 -19
  110. package/components/search/search.css +5 -5
  111. package/components/segment/segment.css +24 -24
  112. package/components/segmented/segmented.css +25 -25
  113. package/components/select/select.css +84 -84
  114. package/components/skeleton/skeleton.css +14 -14
  115. package/components/slider/slider.css +46 -46
  116. package/components/spinner/class.js +69 -0
  117. package/components/spinner/spinner.a2ui.json +197 -0
  118. package/components/spinner/spinner.css +165 -0
  119. package/components/spinner/spinner.d.ts +26 -0
  120. package/components/spinner/spinner.examples.md +26 -0
  121. package/components/spinner/spinner.js +17 -0
  122. package/components/spinner/spinner.test.js +234 -0
  123. package/components/spinner/spinner.yaml +230 -0
  124. package/components/stack/stack.css +11 -11
  125. package/components/stat/stat.css +25 -25
  126. package/components/step-progress/step-progress.css +20 -20
  127. package/components/stepper/stepper.css +29 -29
  128. package/components/stream/stream.css +12 -12
  129. package/components/swatch/swatch.css +68 -68
  130. package/components/swiper/swiper.css +57 -57
  131. package/components/switch/switch.css +52 -52
  132. package/components/table/table.css +162 -162
  133. package/components/table-toolbar/table-toolbar.css +32 -32
  134. package/components/tabs/tabs.css +51 -51
  135. package/components/tag/tag.css +48 -48
  136. package/components/text/text.css +44 -44
  137. package/components/textarea/textarea.css +46 -46
  138. package/components/time-picker/class.js +693 -0
  139. package/components/time-picker/time-picker.a2ui.json +267 -0
  140. package/components/time-picker/time-picker.css +122 -0
  141. package/components/time-picker/time-picker.d.ts +75 -0
  142. package/components/time-picker/time-picker.examples.md +35 -0
  143. package/components/time-picker/time-picker.js +17 -0
  144. package/components/time-picker/time-picker.test.js +287 -0
  145. package/components/time-picker/time-picker.yaml +256 -0
  146. package/components/timeline/timeline.css +50 -50
  147. package/components/toast/toast.css +58 -58
  148. package/components/toggle-group/toggle-group.css +6 -6
  149. package/components/toggle-scheme/toggle-scheme.css +2 -2
  150. package/components/toolbar/toolbar.css +17 -17
  151. package/components/tooltip/tooltip.css +2 -2
  152. package/components/tree/tree.css +37 -37
  153. package/components/upload/upload.css +49 -49
  154. package/dist/web-components.min.css +1 -1
  155. package/dist/web-components.min.js +121 -83
  156. package/package.json +1 -1
  157. package/styles/components.css +8 -0
@@ -5,34 +5,34 @@
5
5
 
6
6
  @scope (step-progress-ui) {
7
7
  :where(:scope) {
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);
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);
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: 0 1 18rem;
20
- --step-progress-min-width: 10rem;
19
+ --step-progress-flex-default: 0 1 18rem;
20
+ --step-progress-min-width-default: 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, 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));
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, var(--step-progress-caption-fg-default));
35
+ font-size: var(--step-progress-caption-size, var(--step-progress-caption-size-default));
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, var(--step-progress-track-gap-default));
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, 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));
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, var(--step-progress-dash-bg-active-default));
60
60
  }
61
61
  }
@@ -12,41 +12,41 @@
12
12
  @scope (stepper-ui) {
13
13
  :where(:scope) {
14
14
  /* ── Circle ── */
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;
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;
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: var(--stepper-item-gap-sm, …)` resolves
40
+ `--stepper-item-gap-sm-default: 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: 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;
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;
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: var(--stepper-gap-sm, var(--a-space-2));
93
+ --stepper-item-gap-sm-default: 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, var(--stepper-item-gap-sm-default)));
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: 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;
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;
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, 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));
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) step-end infinite;
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;
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: var(--a-space-2);
4
+ --swatch-gap-default: 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: 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);
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);
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: var(--a-data-0);
21
- --swatch-label-fg: var(--a-fg-subtle);
20
+ --swatch-color-default: var(--a-data-0);
21
+ --swatch-label-fg-default: var(--a-fg-subtle);
22
22
 
23
23
  /* ── Shape ── */
24
- --swatch-radius-block: var(--a-radius-sm);
25
- --swatch-radius-square: var(--a-radius-sm);
24
+ --swatch-radius-block-default: var(--a-radius-sm);
25
+ --swatch-radius-square-default: var(--a-radius-sm);
26
26
 
27
27
  /* ── Block-shape extras (token-scale) ── */
28
- --swatch-block-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 8%, transparent);
28
+ --swatch-block-shadow-default: inset 0 0 0 1px color-mix(in oklab, currentColor 8%, transparent);
29
29
 
30
30
  /* ── Typography ── */
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);
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);
36
36
 
37
37
  /* ── Badge ── */
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);
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);
43
43
 
44
44
  /* ── Copy button ── */
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);
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);
49
49
 
50
50
  /* ── Selectable ring ── */
51
- --swatch-select-ring: var(--a-accent);
52
- --swatch-select-ring-width: 2px;
51
+ --swatch-select-ring-default: var(--a-accent);
52
+ --swatch-select-ring-width-default: 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, var(--swatch-gap-default));
63
63
  min-width: 0;
64
- color: var(--swatch-label-fg);
65
- font-size: var(--swatch-label-size);
64
+ color: var(--swatch-label-fg, var(--swatch-label-fg-default));
65
+ font-size: var(--swatch-label-size, var(--swatch-label-size-default));
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, var(--swatch-color-default));
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, var(--swatch-tile-md-default)));
91
+ height: var(--_size, var(--swatch-tile-md, var(--swatch-tile-md-default)));
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, 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));
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, 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));
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, var(--swatch-line-length-default));
112
+ height: var(--swatch-line-thickness, var(--swatch-line-thickness-default));
113
113
  background: transparent;
114
- border-top: var(--swatch-line-thickness) dashed var(--swatch-color);
114
+ border-top: var(--swatch-line-thickness, var(--swatch-line-thickness-default)) dashed var(--swatch-color, var(--swatch-color-default));
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, 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));
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, var(--swatch-label-step-size-default));
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, var(--swatch-label-step-mt-default));
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, var(--swatch-tile-lg-default)));
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) * 0.6);
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);
183
183
  }
184
184
  :scope[size="md"] {
185
- --_size: var(--swatch-tile-md);
186
- --_block-h: calc(var(--swatch-tile-lg) * 0.75);
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);
187
187
  }
188
188
  :scope[size="lg"] {
189
- --_size: calc(var(--swatch-tile-md) * 1.4);
190
- --_block-h: var(--swatch-tile-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));
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, var(--swatch-detail-fg-default));
199
+ font-size: var(--swatch-detail-size, var(--swatch-detail-size-default));
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, 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));
239
239
  line-height: 1;
240
- border-radius: var(--swatch-badge-radius);
240
+ border-radius: var(--swatch-badge-radius, var(--swatch-badge-radius-default));
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, var(--swatch-copy-fg-default));
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) solid var(--swatch-select-ring);
308
+ outline: var(--swatch-select-ring-width, var(--swatch-select-ring-width-default)) solid var(--swatch-select-ring, var(--swatch-select-ring-default));
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, 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)); }
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);
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));
326
326
  }
327
327
  :scope[selected] {
328
- box-shadow: 0 0 0 var(--swatch-select-ring-width) var(--swatch-select-ring);
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));
329
329
  }
330
330
  :scope[selectable]:hover:not([selected]) {
331
- box-shadow: 0 0 0 1px color-mix(in oklab, var(--swatch-select-ring) 50%, transparent);
331
+ box-shadow: 0 0 0 1px color-mix(in oklab, var(--swatch-select-ring, var(--swatch-select-ring-default)) 50%, transparent);
332
332
  }
333
333
  }