@tangible/ui 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/components/ColorPicker/ColorField.d.ts +31 -2
  2. package/components/ColorPicker/ColorField.js +100 -8
  3. package/components/Combobox/Combobox.d.ts +1 -1
  4. package/components/Combobox/Combobox.js +2 -2
  5. package/components/Combobox/types.d.ts +5 -0
  6. package/components/Field/Field.d.ts +13 -1
  7. package/components/Field/Field.js +5 -3
  8. package/components/GradientPicker/AngleDial.d.ts +14 -0
  9. package/components/GradientPicker/AngleDial.js +24 -0
  10. package/components/GradientPicker/GradientBar.d.ts +38 -0
  11. package/components/GradientPicker/GradientBar.js +130 -0
  12. package/components/GradientPicker/GradientPicker.d.ts +32 -0
  13. package/components/GradientPicker/GradientPicker.js +191 -0
  14. package/components/GradientPicker/index.d.ts +8 -0
  15. package/components/GradientPicker/index.js +8 -0
  16. package/components/GradientPicker/labels.d.ts +42 -0
  17. package/components/GradientPicker/labels.js +31 -0
  18. package/components/MultiCombobox/MultiCombobox.d.ts +1 -1
  19. package/components/MultiCombobox/MultiCombobox.js +2 -2
  20. package/components/MultiCombobox/types.d.ts +5 -0
  21. package/components/Pager/Pager.d.ts +8 -1
  22. package/components/Pager/Pager.js +10 -6
  23. package/components/SearchInput/SearchInput.d.ts +11 -0
  24. package/components/SearchInput/SearchInput.js +76 -0
  25. package/components/SearchInput/index.d.ts +2 -0
  26. package/components/SearchInput/index.js +1 -0
  27. package/components/SearchInput/types.d.ts +69 -0
  28. package/components/SearchInput/types.js +1 -0
  29. package/components/index.d.ts +4 -0
  30. package/components/index.js +2 -0
  31. package/icons/icons.svg +16 -16
  32. package/icons/lms/index.js +13 -13
  33. package/icons/system/index.js +3 -3
  34. package/package.json +9 -1
  35. package/styles/all.css +1 -1
  36. package/styles/all.expanded.css +332 -19
  37. package/styles/all.expanded.unlayered.css +332 -19
  38. package/styles/all.unlayered.css +1 -1
  39. package/styles/components/_bundle.scss +11 -1
  40. package/styles/components/button.scss +4 -3
  41. package/styles/components/card.scss +21 -0
  42. package/styles/components/color-picker.scss +18 -2
  43. package/styles/components/dropdown.scss +1 -0
  44. package/styles/components/gradient-picker.scss +296 -0
  45. package/styles/components/icon-button.scss +15 -8
  46. package/styles/components/pager.scss +11 -5
  47. package/styles/components/search-input.scss +104 -0
  48. package/styles/system/_checkerboard.scss +24 -0
  49. package/styles/system/index.scss +2 -1
  50. package/tui-manifest.json +199 -5
  51. package/utils/color/gradient.d.ts +42 -0
  52. package/utils/color/gradient.js +408 -0
@@ -9,6 +9,7 @@
9
9
  @use "./chip-group" as chipgroup;
10
10
  @use "./combobox" as combobox;
11
11
  @use "./color-picker" as colorpicker;
12
+ @use "./gradient-picker" as gradientpicker;
12
13
  @use "./multi-combobox" as multicombobox;
13
14
  @use "./content-indicator" as contentindicator;
14
15
  @use "./date-picker" as datepicker;
@@ -33,6 +34,7 @@
33
34
  @use "./switch" as switch;
34
35
  @use "./sidebar" as sidebar;
35
36
  @use "./step-indicator" as stepindicator;
37
+ @use "./search-input" as searchinput;
36
38
  @use "./step-list" as steplist;
37
39
  @use "./table" as table;
38
40
  @use "./tabs" as tabs;
@@ -48,7 +50,13 @@
48
50
 
49
51
  // Components whose runtime markup renders the shared input-core classes
50
52
  // (.tui-input etc.) — requesting any of them pulls the input core in.
51
- $-input-dependents: (input, field, text-input, textarea, pager);
53
+ // gradient-picker renders TextInput internally for its numeric fields.
54
+ // NOTE: a subset build requesting gradient-picker must ALSO request
55
+ // color-picker, popover, select, tooltip, button, and icon-button — the
56
+ // panel composes all of them. The dependents mechanism below only covers the
57
+ // input core; extend it to full dependency sets if subset builds become a
58
+ // real workflow (Pager has the same latent gap).
59
+ $-input-dependents: (input, field, text-input, textarea, pager, search-input, gradient-picker);
52
60
 
53
61
  @function -needs-input($only) {
54
62
  @if $only == null {
@@ -76,6 +84,7 @@ $-input-dependents: (input, field, text-input, textarea, pager);
76
84
  @if -wants($only, chip-group) { @include chipgroup.styles(); }
77
85
  @if -wants($only, combobox) { @include combobox.styles(); }
78
86
  @if -wants($only, color-picker) { @include colorpicker.styles(); }
87
+ @if -wants($only, gradient-picker) { @include gradientpicker.styles(); }
79
88
  @if -wants($only, multi-combobox) { @include multicombobox.styles(); }
80
89
  @if -wants($only, content-indicator) { @include contentindicator.styles(); }
81
90
  @if -wants($only, date-picker) { @include datepicker.styles(); }
@@ -95,6 +104,7 @@ $-input-dependents: (input, field, text-input, textarea, pager);
95
104
  @if -wants($only, radio) { @include radio.styles(); }
96
105
  @if -wants($only, rating) { @include rating.styles(); }
97
106
  @if -wants($only, progress) { @include progress.styles(); }
107
+ @if -wants($only, search-input) { @include searchinput.styles(); }
98
108
  @if -wants($only, segmented-control) { @include segmentedcontrol.styles(); }
99
109
  @if -wants($only, slider) { @include slider.styles(); }
100
110
  @if -wants($only, switch) { @include switch.styles(); }
@@ -8,7 +8,6 @@
8
8
  --tui-button-bg-interact
9
9
  --tui-button-fg-interact
10
10
  --tui-button-border-interact
11
- --tui-button-fg-active
12
11
  --tui-button-icon-scale
13
12
  --tui-control-height-xs
14
13
  --tui-control-height-sm
@@ -64,7 +63,6 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
64
63
  // --tui-button-bg-interact Hover/focus/active background
65
64
  // --tui-button-fg-interact Hover/focus/active foreground
66
65
  // --tui-button-border-interact Hover/focus/active border
67
- // --tui-button-fg-active Active/pressed foreground color
68
66
  // --tui-button-icon-scale Icon:label size ratio multiplier (default 1.25)
69
67
  // --tui-button-font-weight Font weight
70
68
  // --tui-button-line-height Line height for button text
@@ -181,9 +179,12 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
181
179
  outline-offset: var(--#{sys.$prefix}focus-ring-offset);
182
180
  }
183
181
 
182
+ // Button has no distinct toggle-pressed treatment by design — toggles
183
+ // belong to IconButton/SegmentedControl/Switch/Chip. A stray aria-pressed
184
+ // holds the interact treatment rather than looking untoggled.
184
185
  &:is(:active, [aria-pressed="true"]) {
185
186
  --_bg: var(--_bg-interact);
186
- --_fg: var(--#{sys.$prefix}button-fg-active, var(--#{sys.$prefix}color-fg-on-accent));
187
+ --_fg: var(--_fg-interact);
187
188
  --_border: var(--_border-interact);
188
189
  }
189
190
 
@@ -174,6 +174,27 @@
174
174
  }
175
175
  }
176
176
 
177
+ // -------------------------------------------------------------------------
178
+ // Stacked layout (default)
179
+ // -------------------------------------------------------------------------
180
+ // The inner wrapper is a full-height flex column. This is what lets a
181
+ // trailing slot be pinned to the card's bottom edge via an auto margin
182
+ // (e.g. `Card.Foot` with `.tui-margin-block-start-auto`) — essential in
183
+ // card grids, where sibling cards set a taller row height and a short
184
+ // card's footer would otherwise float mid-card. `height: 100%` fills the
185
+ // grid/flex-stretched card so the free space the auto margin consumes
186
+ // actually exists. On a natural-height card the percentage resolves to
187
+ // content height (no free space), so this is inert until a card is
188
+ // stretched — no visual change to standalone cards.
189
+ //
190
+ // Scoped away from inline layout, which owns its own row flex in the
191
+ // container query below (the two selectors are mutually exclusive).
192
+ &:not(.is-layout-inline) .#{sys.$prefix}card__inner {
193
+ display: flex;
194
+ flex-direction: column;
195
+ height: 100%;
196
+ }
197
+
177
198
  // -------------------------------------------------------------------------
178
199
  // Inline layout (container query)
179
200
  // -------------------------------------------------------------------------
@@ -7,6 +7,7 @@
7
7
  --tui-color-slider-radius
8
8
  --tui-color-slider-height
9
9
  --tui-color-slider-thumb-size
10
+ --tui-color-field-swatch-border
10
11
  */
11
12
 
12
13
  @mixin styles() {
@@ -200,7 +201,7 @@
200
201
  flex: 1 1 0;
201
202
  min-width: 0;
202
203
  display: flex;
203
- align-items: baseline;
204
+ align-items: center;
204
205
  gap: 0.125em;
205
206
  }
206
207
 
@@ -223,6 +224,12 @@
223
224
  font: inherit;
224
225
  text-align: start;
225
226
  border-radius: var(--#{sys.$prefix}radius-sm);
227
+ // Inset the rounded input (and its focus tint) from the field-group edge so
228
+ // the pill doesn't run into the border. Mirrors the swatch's sizing: the
229
+ // group is fixed at control-height-md, so the input keeps that height minus
230
+ // the two insets.
231
+ margin-block: var(--#{sys.$prefix}spacing-xxs);
232
+ min-height: calc(var(--#{sys.$prefix}control-height-md, 2.5rem) - 2 * var(--#{sys.$prefix}spacing-xxs));
226
233
 
227
234
  // The group carries the :focus-within ring; each field additionally shows a
228
235
  // subtle tint so a sighted keyboard user can tell WHICH channel has focus.
@@ -244,7 +251,10 @@
244
251
  // Kept in the DOM (so the aria-live region announces on toggle) but
245
252
  // collapsed when there's nothing to say. Not display:none — that would
246
253
  // remove it from the accessibility tree and defeat the live region.
254
+ // position:absolute takes it out of flow too: a zero-height flex item
255
+ // still claims a gap slot, leaving phantom space after the value row.
247
256
  &.is-empty {
257
+ position: absolute;
248
258
  block-size: 0;
249
259
  overflow: hidden;
250
260
  }
@@ -316,8 +326,13 @@
316
326
  inline-size: var(--_size);
317
327
  block-size: var(--_size);
318
328
  border-radius: var(--#{sys.$prefix}radius-sm);
329
+ // Subtle edge so light swatches read against the field. Neutral default,
330
+ // overridable per context (it reads faint on dark themes).
331
+ border: var(--#{sys.$prefix}color-field-swatch-border, var(--#{sys.$prefix}border-width) solid rgb(0 0 0 / 0.3));
319
332
  background-color: var(--#{sys.$prefix}color-bg);
320
- background-image: linear-gradient(var(--_swatch), var(--_swatch)),
333
+ // First layer: a full gradient value when set (ColorField gradient mode),
334
+ // else the flat colour painted as a degenerate gradient.
335
+ background-image: var(--_swatch-image, linear-gradient(var(--_swatch), var(--_swatch))),
321
336
  linear-gradient(45deg, #ccc 25%, transparent 25%),
322
337
  linear-gradient(-45deg, #ccc 25%, transparent 25%),
323
338
  linear-gradient(45deg, transparent 75%, #ccc 75%),
@@ -359,6 +374,7 @@
359
374
  max-inline-size: calc(100vw - 2rem);
360
375
  }
361
376
 
377
+
362
378
  @media (forced-colors: active) {
363
379
  .#{sys.$prefix}interface .#{sys.$prefix}color-area,
364
380
  .#{sys.$prefix}interface .#{sys.$prefix}color-slider {
@@ -76,6 +76,7 @@
76
76
  // Button's `.tui-interface .tui-button` rule which is also 0,2,0.
77
77
  .#{sys.$prefix}interface .#{sys.$prefix}dropdown__item {
78
78
  // Override Button's sizing/layout
79
+ display: flex;
79
80
  justify-content: flex-start;
80
81
  width: 100%;
81
82
  min-width: 0;
@@ -0,0 +1,296 @@
1
+ @use "../system" as sys;
2
+
3
+ /* @tui-tokens
4
+ --tui-gradient-bar-height
5
+ --tui-gradient-bar-radius
6
+ --tui-gradient-bar-thumb-size
7
+ --tui-angle-dial-size
8
+ */
9
+
10
+ @mixin styles() {
11
+ // ==========================================================================
12
+ // GradientPicker — stop strip + value field + stop list + geometry controls
13
+ // ==========================================================================
14
+ //
15
+ // Like the ColorPicker primitives, thumb chrome (white ring + dark halo) and
16
+ // the alpha checkerboard use fixed neutral values on purpose: they must read
17
+ // on top of an ARBITRARY user gradient, so they can't defer to theme tokens.
18
+
19
+ // ---------------------------------------------------------------------------
20
+ // GradientBar — the stop strip
21
+ // ---------------------------------------------------------------------------
22
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-bar {
23
+ --_thumb: var(--#{sys.$prefix}gradient-bar-thumb-size, 16px);
24
+ position: relative;
25
+ height: var(--#{sys.$prefix}gradient-bar-height, 3rem);
26
+ border-radius: var(--#{sys.$prefix}gradient-bar-radius, var(--#{sys.$prefix}radius-md));
27
+ @include sys.alpha-checkerboard(8px);
28
+ cursor: copy; // the track adds a stop where you click
29
+ touch-action: none;
30
+ user-select: none;
31
+ // The gradient IS the content here — Windows High Contrast would strip
32
+ // the track background and thumb fills, leaving an unreadable blank strip.
33
+ forced-color-adjust: none;
34
+
35
+ &.is-disabled {
36
+ opacity: var(--#{sys.$prefix}opacity-disabled);
37
+ pointer-events: none;
38
+ }
39
+ }
40
+
41
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-bar__track {
42
+ position: absolute;
43
+ inset: 0;
44
+ border-radius: inherit;
45
+ }
46
+
47
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-bar__thumb {
48
+ position: absolute;
49
+ top: 50%;
50
+ width: var(--_thumb);
51
+ height: var(--_thumb);
52
+ transform: translate(-50%, -50%);
53
+ border-radius: var(--#{sys.$prefix}radius-full, 999px);
54
+ background: var(--_stop-color);
55
+ border: 2px solid #fff;
56
+ box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);
57
+ cursor: grab;
58
+
59
+ // Invisible expanded hit area — the visual thumb is 16px but the pointer
60
+ // target must meet the 24px floor (WCAG 2.5.5 / house rule in CLAUDE.md).
61
+ &::before {
62
+ content: "";
63
+ position: absolute;
64
+ top: 50%;
65
+ left: 50%;
66
+ width: max(1.5rem, 100%);
67
+ height: max(1.5rem, 100%);
68
+ transform: translate(-50%, -50%);
69
+ }
70
+
71
+ &.is-active {
72
+ box-shadow: 0 0 0 2px rgb(0 0 0 / 0.5);
73
+ }
74
+
75
+ &:focus-visible {
76
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
77
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
78
+ }
79
+ }
80
+
81
+ // ---------------------------------------------------------------------------
82
+ // AngleDial — pointer-only companion to the angle input
83
+ // ---------------------------------------------------------------------------
84
+ .#{sys.$prefix}interface .#{sys.$prefix}angle-dial {
85
+ position: relative;
86
+ flex: none;
87
+ width: var(--#{sys.$prefix}angle-dial-size, 1.75rem);
88
+ height: var(--#{sys.$prefix}angle-dial-size, 1.75rem);
89
+ border-radius: var(--#{sys.$prefix}radius-full, 999px);
90
+ border: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-border);
91
+ background: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
92
+ cursor: grab;
93
+ touch-action: none;
94
+ user-select: none;
95
+
96
+ &.is-disabled {
97
+ opacity: var(--#{sys.$prefix}opacity-disabled);
98
+ pointer-events: none;
99
+ }
100
+ }
101
+
102
+ .#{sys.$prefix}interface .#{sys.$prefix}angle-dial__pointer {
103
+ position: absolute;
104
+ inset: 0;
105
+ transform: rotate(var(--_angle, 0deg));
106
+
107
+ &::before {
108
+ content: "";
109
+ position: absolute;
110
+ top: 3px;
111
+ left: 50%;
112
+ width: 5px;
113
+ height: 5px;
114
+ transform: translateX(-50%);
115
+ border-radius: var(--#{sys.$prefix}radius-full, 999px);
116
+ background: var(--#{sys.$prefix}theme-primary-base);
117
+ }
118
+ }
119
+
120
+ // ---------------------------------------------------------------------------
121
+ // GradientPicker composition
122
+ // ---------------------------------------------------------------------------
123
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker {
124
+ display: flex;
125
+ flex-direction: column;
126
+ gap: var(--#{sys.$prefix}spacing-sm);
127
+ width: 100%;
128
+
129
+ &.is-disabled {
130
+ opacity: var(--#{sys.$prefix}opacity-disabled);
131
+ }
132
+ }
133
+
134
+ // The value row — gradient string field + reverse / copy buttons.
135
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__value {
136
+ display: flex;
137
+ align-items: center;
138
+ gap: var(--#{sys.$prefix}spacing-xxs);
139
+ }
140
+
141
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__value-input {
142
+ flex: 1 1 auto;
143
+ min-width: 0;
144
+ min-height: var(--#{sys.$prefix}control-height-sm, 2.25rem);
145
+ padding-inline: var(--#{sys.$prefix}spacing-xs);
146
+ border: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-border);
147
+ border-radius: var(--#{sys.$prefix}radius-md);
148
+ background: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
149
+ color: inherit;
150
+ font: inherit;
151
+ font-size: var(--#{sys.$prefix}typography-size-xs);
152
+ text-overflow: ellipsis;
153
+
154
+ &:focus-visible {
155
+ border-color: var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base));
156
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
157
+ outline-offset: calc(-1 * var(--#{sys.$prefix}border-width));
158
+ }
159
+ }
160
+
161
+ // Small uppercase section/field label (matches the design's control labels).
162
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__label {
163
+ display: block;
164
+ font-size: var(--#{sys.$prefix}typography-size-xs);
165
+ font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
166
+ letter-spacing: 0.04em;
167
+ text-transform: uppercase;
168
+ color: var(--#{sys.$prefix}color-fg-muted);
169
+ }
170
+
171
+ // The stop list — swatch + position + remove per row, then the add button.
172
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__stops {
173
+ display: flex;
174
+ flex-direction: column;
175
+ gap: var(--#{sys.$prefix}spacing-xxs);
176
+ }
177
+
178
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__stop {
179
+ display: flex;
180
+ align-items: center;
181
+ gap: var(--#{sys.$prefix}spacing-xs);
182
+ }
183
+
184
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__stop-position {
185
+ flex: 1 1 auto;
186
+ min-width: 0;
187
+ }
188
+
189
+ // Stop swatch — a round colour chip over the alpha checkerboard.
190
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__swatch {
191
+ flex: none;
192
+ display: inline-flex;
193
+ width: calc(var(--#{sys.$prefix}control-height-sm, 2.25rem) - 2 * var(--#{sys.$prefix}spacing-xxs));
194
+ height: calc(var(--#{sys.$prefix}control-height-sm, 2.25rem) - 2 * var(--#{sys.$prefix}spacing-xxs));
195
+ // WCAG 2.5.5 floor — keep the hit target at least 24px even if the
196
+ // control-height token shrinks in a dense context.
197
+ min-inline-size: 1.5rem;
198
+ min-block-size: 1.5rem;
199
+ padding: 0;
200
+ border: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-border);
201
+ border-radius: var(--#{sys.$prefix}radius-full, 999px);
202
+ overflow: hidden;
203
+ @include sys.alpha-checkerboard(6px);
204
+ cursor: pointer;
205
+ // Keep the colour visible under Windows High Contrast — a swatch with its
206
+ // background stripped is meaningless.
207
+ forced-color-adjust: none;
208
+
209
+ &:focus-visible,
210
+ &[data-popover-open] {
211
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
212
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
213
+ }
214
+
215
+ &:disabled {
216
+ opacity: var(--#{sys.$prefix}opacity-disabled);
217
+ cursor: default;
218
+ }
219
+ }
220
+
221
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__swatch-fill {
222
+ flex: 1 1 auto;
223
+ background: var(--_swatch);
224
+ }
225
+
226
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__stop-popover {
227
+ inline-size: 20rem;
228
+ max-inline-size: calc(100vw - 2rem);
229
+ }
230
+
231
+ // Geometry controls — type + per-type fields in a two-column grid.
232
+ // minmax(0, …): a bare 1fr is minmax(auto, 1fr), and the angle cell's
233
+ // min-content (the input's intrinsic width + the dial) would refuse to
234
+ // shrink in narrow containers (e.g. the ColorField popover), crushing the
235
+ // type select down to its chevron.
236
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__geometry {
237
+ display: grid;
238
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
239
+ gap: var(--#{sys.$prefix}spacing-xs) var(--#{sys.$prefix}spacing-sm);
240
+ align-items: end;
241
+ }
242
+
243
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__geometry .#{sys.$prefix}input-group {
244
+ // Let the numeric inputs shrink with their grid cell.
245
+ min-width: 0;
246
+
247
+ input {
248
+ min-width: 0;
249
+ }
250
+ }
251
+
252
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__field {
253
+ display: flex;
254
+ flex-direction: column;
255
+ gap: var(--#{sys.$prefix}spacing-xxs);
256
+ min-width: 0;
257
+ }
258
+
259
+ // Radial/conic: TYPE takes its own row; the size/position pairs grid below.
260
+ // Linear (.is-linear): TYPE shares the row with ANGLE + dial.
261
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__type-field {
262
+ grid-column: 1 / -1;
263
+ }
264
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__geometry.is-linear .#{sys.$prefix}gradient-picker__type-field {
265
+ grid-column: auto;
266
+ }
267
+
268
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__angle {
269
+ display: flex;
270
+ align-items: end;
271
+ gap: var(--#{sys.$prefix}spacing-xs);
272
+
273
+ > .#{sys.$prefix}gradient-picker__field {
274
+ flex: 1 1 auto;
275
+ }
276
+
277
+ // Sit the dial on the input's baseline row.
278
+ > .#{sys.$prefix}angle-dial {
279
+ margin-block-end: calc((var(--#{sys.$prefix}control-height-sm, 2.25rem) - var(--#{sys.$prefix}angle-dial-size, 1.75rem)) / 2);
280
+ }
281
+ }
282
+
283
+ @media (forced-colors: active) {
284
+ // The bar/swatches opt out of forced colors (the colour IS the content),
285
+ // so the focus indicators must be re-asserted in system colors here.
286
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-bar__thumb {
287
+ &:focus-visible {
288
+ outline: var(--#{sys.$prefix}focus-ring-width) solid Highlight;
289
+ }
290
+ }
291
+
292
+ .#{sys.$prefix}interface .#{sys.$prefix}gradient-picker__swatch:focus-visible {
293
+ outline-color: Highlight;
294
+ }
295
+ }
296
+ }
@@ -7,6 +7,8 @@
7
7
  --tui-icon-button-radius
8
8
  --tui-icon-button-bg-interact
9
9
  --tui-icon-button-fg-interact
10
+ --tui-icon-button-bg-pressed
11
+ --tui-icon-button-fg-pressed
10
12
  */
11
13
 
12
14
  @mixin styles() {
@@ -24,6 +26,8 @@
24
26
  // --tui-icon-button-radius Border radius
25
27
  // --tui-icon-button-bg-interact Hover/focus/active background
26
28
  // --tui-icon-button-fg-interact Hover/focus/active icon color
29
+ // --tui-icon-button-bg-pressed Toggled-on (aria-pressed) background
30
+ // --tui-icon-button-fg-pressed Toggled-on (aria-pressed) icon color
27
31
  //
28
32
  // To override from consuming code:
29
33
  // .my-context .tui-icon-button { --tui-icon-button-bg: hotpink; }
@@ -69,8 +73,11 @@
69
73
  --_bg-interact: var(--#{sys.$prefix}icon-button-bg-interact, var(--#{sys.$prefix}theme-secondary-subtle));
70
74
  --_fg-interact: var(--#{sys.$prefix}icon-button-fg-interact, var(--#{sys.$prefix}color-fg));
71
75
 
72
- // Pressed/toggle state — visually distinct from hover
73
- --_bg-pressed: var(--#{sys.$prefix}theme-secondary-soft);
76
+ // Pressed/toggle state — visually distinct from hover.
77
+ // fg-pressed falls back to the interact color; both resolve on the same
78
+ // element, so per-theme --_fg-interact overrides carry through.
79
+ --_bg-pressed: var(--#{sys.$prefix}icon-button-bg-pressed, var(--#{sys.$prefix}theme-secondary-soft));
80
+ --_fg-pressed: var(--#{sys.$prefix}icon-button-fg-pressed, var(--_fg-interact));
74
81
 
75
82
  // Reset
76
83
  appearance: none;
@@ -131,7 +138,7 @@
131
138
 
132
139
  &[aria-pressed="true"] {
133
140
  --_bg: var(--_bg-pressed);
134
- --_fg: var(--_fg-interact);
141
+ --_fg: var(--_fg-pressed);
135
142
  }
136
143
 
137
144
  &:where(:disabled, [aria-disabled="true"], .is-disabled) {
@@ -170,7 +177,7 @@
170
177
  --_fg: var(--#{sys.$prefix}icon-button-fg, var(--#{sys.$prefix}theme-primary-base));
171
178
  --_fg-interact: var(--#{sys.$prefix}icon-button-fg-interact, var(--#{sys.$prefix}theme-primary-strong));
172
179
  --_bg-interact: var(--#{sys.$prefix}icon-button-bg-interact, var(--#{sys.$prefix}theme-primary-subtlest));
173
- --_bg-pressed: var(--#{sys.$prefix}theme-primary-subtle);
180
+ --_bg-pressed: var(--#{sys.$prefix}icon-button-bg-pressed, var(--#{sys.$prefix}theme-primary-subtle));
174
181
  }
175
182
 
176
183
  // Status themes (danger/success/warning/info) share one recipe.
@@ -179,7 +186,7 @@
179
186
  --_fg: var(--#{sys.$prefix}icon-button-fg, var(--#{sys.$prefix}theme-#{$status}-base));
180
187
  --_fg-interact: var(--#{sys.$prefix}icon-button-fg-interact, var(--#{sys.$prefix}theme-#{$status}-strong));
181
188
  --_bg-interact: var(--#{sys.$prefix}icon-button-bg-interact, var(--#{sys.$prefix}theme-#{$status}-subtlest));
182
- --_bg-pressed: var(--#{sys.$prefix}theme-#{$status}-subtle);
189
+ --_bg-pressed: var(--#{sys.$prefix}icon-button-bg-pressed, var(--#{sys.$prefix}theme-#{$status}-subtle));
183
190
  }
184
191
  }
185
192
 
@@ -212,7 +219,7 @@
212
219
  &.is-style-solid {
213
220
  --_bg: var(--#{sys.$prefix}icon-button-bg, var(--#{sys.$prefix}theme-secondary-subtle));
214
221
  --_fg: var(--#{sys.$prefix}icon-button-fg, var(--#{sys.$prefix}color-fg));
215
- --_bg-pressed: var(--#{sys.$prefix}theme-secondary-soft);
222
+ --_bg-pressed: var(--#{sys.$prefix}icon-button-bg-pressed, var(--#{sys.$prefix}theme-secondary-soft));
216
223
 
217
224
  &:hover,
218
225
  &:focus-visible,
@@ -228,7 +235,7 @@
228
235
  &.is-style-solid.is-theme-primary {
229
236
  --_bg: var(--#{sys.$prefix}icon-button-bg, var(--#{sys.$prefix}theme-primary-base));
230
237
  --_fg: var(--#{sys.$prefix}icon-button-fg, var(--#{sys.$prefix}color-fg-on-accent));
231
- --_bg-pressed: var(--#{sys.$prefix}theme-primary-stronger);
238
+ --_bg-pressed: var(--#{sys.$prefix}icon-button-bg-pressed, var(--#{sys.$prefix}theme-primary-stronger));
232
239
 
233
240
  &:hover,
234
241
  &:focus-visible,
@@ -245,7 +252,7 @@
245
252
  &.is-style-solid.is-theme-#{$status} {
246
253
  --_bg: var(--#{sys.$prefix}icon-button-bg, var(--#{sys.$prefix}theme-#{$status}-base));
247
254
  --_fg: var(--#{sys.$prefix}icon-button-fg, var(--#{sys.$prefix}color-fg-on-accent));
248
- --_bg-pressed: var(--#{sys.$prefix}theme-#{$status}-stronger);
255
+ --_bg-pressed: var(--#{sys.$prefix}icon-button-bg-pressed, var(--#{sys.$prefix}theme-#{$status}-stronger));
249
256
 
250
257
  &:hover,
251
258
  &:focus-visible,
@@ -37,9 +37,11 @@
37
37
  // --tui-pager-item-border.
38
38
  --#{sys.$prefix}button-border: var(--#{sys.$prefix}pager-item-border, var(--#{sys.$prefix}color-border));
39
39
  border-color: var(--#{sys.$prefix}button-border);
40
- font-size: var(--#{sys.$prefix}typography-size-sm);
40
+ // Compact page-number width. Font-size and height come from the shared
41
+ // control ladder — Button's own control-sizing for the items, and the
42
+ // control-sizing mixin for the ellipsis below — so the whole nav scales
43
+ // with `size` and honours a context's --tui-control-height-* override.
41
44
  padding-inline: 0.85em;
42
- padding-block: 0.4em;
43
45
 
44
46
  // Connected button group: remove inner radii
45
47
  &:not(:first-child) {
@@ -54,10 +56,14 @@
54
56
  }
55
57
  }
56
58
 
57
- // Ellipsis: non-interactive, styled to match outline buttons. The border
58
- // reads the bridged Button token defined on the group above — not
59
- // Button's --_border internal, which only exists on actual Buttons.
59
+ // Ellipsis: non-interactive, styled to match outline buttons. It's a plain
60
+ // <span> (not a Button), so it needs the control ladder applied directly
61
+ // to match the sibling buttons' height at each size tier (keyed on the
62
+ // `is-size-*` class the component adds). The border reads the bridged
63
+ // Button token defined on the group above — not Button's --_border
64
+ // internal, which only exists on actual Buttons.
60
65
  .#{sys.$prefix}pager__ellipsis {
66
+ @include sys.control-sizing(sys.$prefix);
61
67
  display: inline-flex;
62
68
  align-items: center;
63
69
  justify-content: center;