@tangible/ui 0.2.38 → 0.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/components/Avatar/Avatar.js +20 -5
- package/components/Avatar/types.d.ts +15 -0
- package/components/Button/Button.js +10 -3
- package/components/Button/types.d.ts +31 -3
- package/components/Button/types.js +2 -0
- package/components/ColorPicker/ColorField.d.ts +1 -1
- package/components/ColorPicker/ColorField.js +9 -1
- package/components/DatePicker/DateRangePicker.d.ts +1 -0
- package/components/DatePicker/DateRangePicker.js +24 -6
- package/components/DatePicker/PickerTrigger.js +1 -1
- package/components/DatePicker/types.d.ts +20 -3
- package/components/DatePicker/types.js +1 -0
- package/components/IconButton/IconButtonCore.js +13 -5
- package/components/IconButton/index.d.ts +2 -1
- package/components/IconButton/index.js +1 -0
- package/components/IconButton/types.d.ts +37 -2
- package/components/IconButton/types.js +4 -1
- package/components/MultiSelect/MultiSelect.js +9 -3
- package/components/NavMenu/NavMenu.js +37 -3
- package/components/Notice/Notice.d.ts +13 -0
- package/components/Notice/Notice.js +10 -2
- package/components/Progress/Progress.js +73 -2
- package/components/Progress/index.d.ts +2 -1
- package/components/Progress/index.js +1 -0
- package/components/Progress/types.d.ts +130 -2
- package/components/Progress/types.js +3 -1
- package/components/Select/Select.js +2 -1
- package/components/Tooltip/Tooltip.js +23 -0
- package/components/index.d.ts +28 -26
- package/components/index.js +10 -10
- package/figma-tokens.json +1 -1
- package/icons/icons.svg +15 -5
- package/icons/lms/index.d.ts +7 -4
- package/icons/lms/index.js +9 -44
- package/icons/lms.svg +4 -4
- package/icons/manifest.json +96 -12
- package/icons/registry.d.ts +20 -0
- package/icons/registry.js +11 -0
- package/icons/searchsync/index.d.ts +21 -0
- package/icons/searchsync/index.js +82 -0
- package/icons/searchsync.svg +9 -0
- package/icons/sprite-registry.js +10 -0
- package/icons/sprite-version.js +1 -1
- package/icons/sprite.d.ts +1 -1
- package/icons/sprite.js +2 -1
- package/icons/sprite.php +3 -2
- package/icons/system/index.d.ts +6 -0
- package/icons/system/index.js +33 -0
- package/icons/system.svg +3 -0
- package/package.json +1 -1
- package/skills/building-with-tui/SKILL.md +81 -30
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +221 -64
- package/styles/all.expanded.unlayered.css +221 -64
- package/styles/all.unlayered.css +1 -1
- package/styles/app.css +2 -0
- package/styles/components/button.scss +18 -0
- package/styles/components/checkbox.scss +21 -13
- package/styles/components/icon-button.scss +44 -25
- package/styles/components/nav-menu.scss +3 -0
- package/styles/components/notice.scss +38 -0
- package/styles/components/progress.scss +96 -0
- package/styles/components/radio.scss +35 -7
- package/styles/components/segmented-control.scss +98 -18
- package/styles/components/table.scss +39 -24
- package/tui-manifest.json +151 -39
- package/utils/portal.d.ts +4 -3
- package/utils/portal.js +16 -2
- package/utils/use-loading-announcer.d.ts +2 -0
- package/utils/use-loading-announcer.js +101 -0
- package/vanilla/styles.css +1 -1
- package/vanilla/styles.unlayered.css +1 -1
package/styles/app.css
CHANGED
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
--tui-text-body-line-height: 1.4;
|
|
27
27
|
--tui-text-body-sm-line-height: 1.4;
|
|
28
28
|
--tui-field-helper-fg: var(--tui-color-fg-muted);
|
|
29
|
+
--tui-table-head-transform: none;
|
|
30
|
+
--tui-table-font-size: var(--tui-typography-size-sm);
|
|
29
31
|
}
|
|
30
32
|
:where(.tui-interface :any-link) {
|
|
31
33
|
cursor: pointer;
|
|
@@ -206,6 +206,24 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
|
|
|
206
206
|
pointer-events: none;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
// A loading button keeps focus (#130), so its focus ring must clear 3:1
|
|
210
|
+
// (SC 1.4.11). Element opacity composited the outline too: the dark ring
|
|
211
|
+
// measured 2.43:1 at 0.75. Loading drops the element opacity and mutes
|
|
212
|
+
// the paint instead, by the same token amount, so the resting look stays
|
|
213
|
+
// close and the ring stays at full strength. Plain aria-disabled can't
|
|
214
|
+
// take focus and keeps the opacity. Forced colors keep their own rules.
|
|
215
|
+
@media not (forced-colors: active) {
|
|
216
|
+
&[data-loading="true"]:not(:disabled) {
|
|
217
|
+
$_mute: calc(var(--#{sys.$prefix}opacity-disabled) * 100%);
|
|
218
|
+
opacity: 1;
|
|
219
|
+
background-color: color-mix(in srgb, var(--_bg) #{$_mute}, transparent) !important;
|
|
220
|
+
// Text mixes toward the page, not transparent: over the muted fill a
|
|
221
|
+
// transparent mix would pull it toward the fill and lose contrast.
|
|
222
|
+
color: color-mix(in srgb, var(--_fg) #{$_mute}, var(--#{sys.$prefix}color-bg)) !important;
|
|
223
|
+
border-color: color-mix(in srgb, var(--_border) #{$_mute}, transparent) !important;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
209
227
|
&[data-loading="true"] > .tui-icon:first-child {
|
|
210
228
|
visibility: hidden;
|
|
211
229
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
--tui-checkbox-size
|
|
11
11
|
--tui-checkbox-gap
|
|
12
12
|
--tui-checkbox-label-color
|
|
13
|
+
--tui-checkbox-fg-disabled
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
// Structural SCSS constants (compile away, not overridable)
|
|
@@ -42,6 +43,8 @@ $_indeterminate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/sv
|
|
|
42
43
|
// --tui-checkbox-size Font-size (controls box size via em units)
|
|
43
44
|
// --tui-checkbox-gap Gap between checkbox and label (labeled mode)
|
|
44
45
|
// --tui-checkbox-label-color Label text colour (labeled mode)
|
|
46
|
+
// --tui-checkbox-fg-disabled Label color when disabled (default fg-muted);
|
|
47
|
+
// wins over -label-color
|
|
45
48
|
//
|
|
46
49
|
// Note: Checkmark/indeterminate icons are white (#fff) SVGs embedded as
|
|
47
50
|
// data URIs. CSS custom properties cannot be referenced inside data URIs,
|
|
@@ -132,24 +135,19 @@ $_indeterminate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/sv
|
|
|
132
135
|
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
133
136
|
}
|
|
134
137
|
|
|
135
|
-
// Disabled — only in bare mode (no wrapper).
|
|
136
|
-
// Labeled mode uses .is-disabled on the wrapper to avoid 0.75 × 0.75 = 0.56 opacity stacking.
|
|
137
138
|
&:disabled {
|
|
138
139
|
cursor: not-allowed;
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
|
|
142
|
-
// Disabled
|
|
143
|
-
//
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.#{sys.$prefix}interface .#{sys.$prefix}inline-choice :is(
|
|
143
|
+
// Disabled: the box dims, bare or labeled. The label doesn't: it mutes to
|
|
144
|
+
// fg-muted at full opacity (below), since muting AND dimming text
|
|
145
|
+
// compounds to under 3:1, and axe checks a label beside a disabled input.
|
|
146
|
+
.#{sys.$prefix}interface :is(
|
|
149
147
|
.#{sys.$prefix}inline-choice__control[type="checkbox"],
|
|
150
|
-
input[type="checkbox"]
|
|
148
|
+
.#{sys.$prefix}inline-choice input[type="checkbox"]
|
|
151
149
|
):disabled {
|
|
152
|
-
opacity:
|
|
150
|
+
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
153
151
|
}
|
|
154
152
|
|
|
155
153
|
// ---------------------------------------------------------------------------
|
|
@@ -169,9 +167,8 @@ $_indeterminate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/sv
|
|
|
169
167
|
}
|
|
170
168
|
}
|
|
171
169
|
|
|
172
|
-
// Disabled
|
|
170
|
+
// Disabled wrapper (React Checkbox and CSS-only markup)
|
|
173
171
|
.#{sys.$prefix}interface .#{sys.$prefix}inline-choice.is-disabled {
|
|
174
|
-
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
175
172
|
cursor: not-allowed;
|
|
176
173
|
|
|
177
174
|
input {
|
|
@@ -179,6 +176,12 @@ $_indeterminate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/sv
|
|
|
179
176
|
}
|
|
180
177
|
}
|
|
181
178
|
|
|
179
|
+
// A disabled checkbox's label mutes: opacity on the row alone left
|
|
180
|
+
// near-black text reading as enabled. Out-weighs the label-color rule above.
|
|
181
|
+
.#{sys.$prefix}interface .#{sys.$prefix}inline-choice.is-disabled:has(input[type="checkbox"]) > :not(input) {
|
|
182
|
+
color: var(--#{sys.$prefix}checkbox-fg-disabled, var(--#{sys.$prefix}color-fg-muted));
|
|
183
|
+
}
|
|
184
|
+
|
|
182
185
|
// ---------------------------------------------------------------------------
|
|
183
186
|
// Forced colors (Windows High Contrast Mode)
|
|
184
187
|
// ---------------------------------------------------------------------------
|
|
@@ -191,5 +194,10 @@ $_indeterminate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/sv
|
|
|
191
194
|
// Let the browser render the checkbox natively in WHCM
|
|
192
195
|
forced-color-adjust: auto;
|
|
193
196
|
}
|
|
197
|
+
|
|
198
|
+
// The fg-muted cue is replaced by the system palette.
|
|
199
|
+
.#{sys.$prefix}interface .#{sys.$prefix}inline-choice.is-disabled:has(input[type="checkbox"]) > :not(input) {
|
|
200
|
+
color: GrayText;
|
|
201
|
+
}
|
|
194
202
|
}
|
|
195
203
|
}
|
|
@@ -116,37 +116,26 @@
|
|
|
116
116
|
font-size: calc(var(--_size) * #{$_icon-scale});
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
// -------------------------------------------------------------------------
|
|
120
|
-
// States
|
|
121
|
-
// -------------------------------------------------------------------------
|
|
122
|
-
&:hover {
|
|
123
|
-
--_bg: var(--_bg-interact);
|
|
124
|
-
--_fg: var(--_fg-interact);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&:focus-visible {
|
|
128
|
-
--_bg: var(--_bg-interact);
|
|
129
|
-
--_fg: var(--_fg-interact);
|
|
130
|
-
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
131
|
-
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&:active {
|
|
135
|
-
--_bg: var(--_bg-interact);
|
|
136
|
-
--_fg: var(--_fg-interact);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
&[aria-pressed="true"] {
|
|
140
|
-
--_bg: var(--_bg-pressed);
|
|
141
|
-
--_fg: var(--_fg-pressed);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
119
|
&:where(:disabled, [aria-disabled="true"], .is-disabled) {
|
|
145
120
|
pointer-events: none;
|
|
146
121
|
cursor: not-allowed;
|
|
147
122
|
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
148
123
|
}
|
|
149
124
|
|
|
125
|
+
// Loading keeps focus, so the ring must stay at full strength: mute the
|
|
126
|
+
// paint instead of the whole element (see Button's matching rule).
|
|
127
|
+
@media not (forced-colors: active) {
|
|
128
|
+
&[data-loading="true"]:not(:disabled) {
|
|
129
|
+
$_mute: calc(var(--#{sys.$prefix}opacity-disabled) * 100%);
|
|
130
|
+
opacity: 1;
|
|
131
|
+
background-color: color-mix(in srgb, var(--_bg) #{$_mute}, transparent);
|
|
132
|
+
// Text mixes toward the page, not transparent: over the muted fill a
|
|
133
|
+
// transparent mix would pull it toward the fill and lose contrast.
|
|
134
|
+
color: color-mix(in srgb, var(--_fg) #{$_mute}, var(--#{sys.$prefix}color-bg));
|
|
135
|
+
border-color: color-mix(in srgb, var(--_border) #{$_mute}, transparent);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
150
139
|
// -------------------------------------------------------------------------
|
|
151
140
|
// Sizes
|
|
152
141
|
// -------------------------------------------------------------------------
|
|
@@ -190,6 +179,36 @@
|
|
|
190
179
|
}
|
|
191
180
|
}
|
|
192
181
|
|
|
182
|
+
// -------------------------------------------------------------------------
|
|
183
|
+
// States
|
|
184
|
+
// -------------------------------------------------------------------------
|
|
185
|
+
// Written AFTER the theme rules on purpose. Both sit at (0,3,0), and the
|
|
186
|
+
// themes re-set --_fg to their resting color, so a state rule written
|
|
187
|
+
// before them lost on source order and a themed hover never reached
|
|
188
|
+
// --_fg-interact (#173). Solid variants below re-set --_fg at (0,3,0)+
|
|
189
|
+
// and keep their on-accent fg on hover, as intended.
|
|
190
|
+
&:hover {
|
|
191
|
+
--_bg: var(--_bg-interact);
|
|
192
|
+
--_fg: var(--_fg-interact);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&:focus-visible {
|
|
196
|
+
--_bg: var(--_bg-interact);
|
|
197
|
+
--_fg: var(--_fg-interact);
|
|
198
|
+
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
199
|
+
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&:active {
|
|
203
|
+
--_bg: var(--_bg-interact);
|
|
204
|
+
--_fg: var(--_fg-interact);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&[aria-pressed="true"] {
|
|
208
|
+
--_bg: var(--_bg-pressed);
|
|
209
|
+
--_fg: var(--_fg-pressed);
|
|
210
|
+
}
|
|
211
|
+
|
|
193
212
|
// -------------------------------------------------------------------------
|
|
194
213
|
// Variants
|
|
195
214
|
// -------------------------------------------------------------------------
|
|
@@ -360,6 +360,9 @@ $_knob-defaults: (
|
|
|
360
360
|
// Wraps rather than overflowing (SC 1.4.10). The small-screen pattern is
|
|
361
361
|
// still to swap the bar for a Sidebar drawer; this keeps it from
|
|
362
362
|
// scrolling sideways meanwhile.
|
|
363
|
+
// The implicit list around loose top-level items (no Group) lays out
|
|
364
|
+
// the same way.
|
|
365
|
+
> .#{sys.$prefix}nav-menu__list,
|
|
363
366
|
> .#{sys.$prefix}nav-menu__group > .#{sys.$prefix}nav-menu__list {
|
|
364
367
|
flex-direction: row;
|
|
365
368
|
flex-wrap: wrap;
|
|
@@ -272,6 +272,40 @@
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
+
// -------------------------------------------------------------------------
|
|
276
|
+
// align="start" (inline only): Head and Body top-aligned, a lone icon
|
|
277
|
+
// centred on the Body's first line, the Foot still centred.
|
|
278
|
+
// -------------------------------------------------------------------------
|
|
279
|
+
// Head and Body share padding-block in inline mode, so their tops line up.
|
|
280
|
+
// An icon-only Head takes the Body's font size and is one line tall (1lh,
|
|
281
|
+
// after a 1.4em fallback: the interface line-height), so its centred icon
|
|
282
|
+
// sits on line one. Coupling: 1lh is the Head's line-height; a consumer
|
|
283
|
+
// who changes only the Body's line-height breaks the alignment.
|
|
284
|
+
// :where() keeps the row at (0,1,0) like the slot rules above, so it stays
|
|
285
|
+
// overridable; it wins on source order. Child combinators, as in Card: a
|
|
286
|
+
// Notice nested in this one's Body must not pick up its alignment.
|
|
287
|
+
@container tuiNotice (width >= 400px) {
|
|
288
|
+
:where(&[data-align="start"]) > .#{sys.$prefix}notice__inner {
|
|
289
|
+
align-items: flex-start;
|
|
290
|
+
|
|
291
|
+
> .#{sys.$prefix}notice__foot {
|
|
292
|
+
align-self: center;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
> .#{sys.$prefix}notice__head:has(> .#{sys.$prefix}notice__icon:only-child) {
|
|
296
|
+
box-sizing: content-box;
|
|
297
|
+
block-size: 1.4em;
|
|
298
|
+
block-size: 1lh;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// Only sm sets an explicit Body size (md and lg inherit), so only sm needs
|
|
303
|
+
// the Head to match. A future lg Body size needs a rule here too.
|
|
304
|
+
:where(&.is-size-sm[data-align="start"]) > .#{sys.$prefix}notice__inner > .#{sys.$prefix}notice__head {
|
|
305
|
+
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
275
309
|
// -------------------------------------------------------------------------
|
|
276
310
|
// Reserve space for dismiss button when present (stacked mode only)
|
|
277
311
|
// -------------------------------------------------------------------------
|
|
@@ -304,6 +338,10 @@
|
|
|
304
338
|
--_border-width: var(--#{sys.$prefix}notice-border-width, var(--#{sys.$prefix}border-width, 1px));
|
|
305
339
|
overflow: hidden; // clip pseudo to border-radius
|
|
306
340
|
padding-inline-start: var(--#{sys.$prefix}notice-stripe-width, 4px);
|
|
341
|
+
// The stripe's z-index is internal layering (over the notice's own
|
|
342
|
+
// content). Without a stacking context here it competed in the page's
|
|
343
|
+
// stacking and painted over a host's sticky header at z-index 1 (#137).
|
|
344
|
+
isolation: isolate;
|
|
307
345
|
|
|
308
346
|
&::before {
|
|
309
347
|
content: "";
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--tui-progress-z3-label
|
|
17
17
|
--tui-progress-z4-label
|
|
18
18
|
--tui-progress-z5-label
|
|
19
|
+
--tui-progress-segment-gap
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
22
|
@mixin styles() {
|
|
@@ -49,6 +50,11 @@
|
|
|
49
50
|
// step of the same semantic — base fills are area
|
|
50
51
|
// colors and don't reliably clear 4.5:1 as text)
|
|
51
52
|
//
|
|
53
|
+
// Breakdown mode adds:
|
|
54
|
+
// --tui-progress-segment-gap Gap between parts, showing the track
|
|
55
|
+
// (default 2 × border-width). Fills follow each
|
|
56
|
+
// segment's theme (-strong step).
|
|
57
|
+
//
|
|
52
58
|
// To override from consuming code:
|
|
53
59
|
// .my-context .tui-progress { --tui-progress-fill: hotpink; }
|
|
54
60
|
//
|
|
@@ -334,6 +340,76 @@
|
|
|
334
340
|
}
|
|
335
341
|
}
|
|
336
342
|
|
|
343
|
+
// -------------------------------------------------------------------------
|
|
344
|
+
// Breakdown (by-status composition, #111)
|
|
345
|
+
// -------------------------------------------------------------------------
|
|
346
|
+
//
|
|
347
|
+
// Each segment is its own count colored by its theme, not its position.
|
|
348
|
+
// Fills use the -strong step: it clears 3:1 (SC 1.4.11) against the track,
|
|
349
|
+
// bg and surface for every theme in light and dark; base measured 2.23:1
|
|
350
|
+
// on the dark track for primary/info. A gap showing the track separates
|
|
351
|
+
// the segments, so neighbours never depend on their contrast with each
|
|
352
|
+
// other. The legend is a <ul>: reset it at full specificity against host
|
|
353
|
+
// list styles (WordPress admin sets ul/li margins).
|
|
354
|
+
&.is-breakdown {
|
|
355
|
+
--_segment-gap: var(
|
|
356
|
+
--#{sys.$prefix}progress-segment-gap,
|
|
357
|
+
calc(var(--#{sys.$prefix}border-width) * 2)
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
@each $theme in (primary, secondary, success, warning, danger, info) {
|
|
361
|
+
.is-theme-#{$theme} {
|
|
362
|
+
--_segment-fill: var(--#{sys.$prefix}theme-#{$theme}-strong);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
&.is-mode-line .#{sys.$prefix}progress__track {
|
|
367
|
+
gap: var(--_segment-gap);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// Shrink with the gaps instead of overflowing the track, but never below
|
|
371
|
+
// a visible sliver: a non-zero count is always drawn.
|
|
372
|
+
&.is-mode-line .#{sys.$prefix}progress__bar {
|
|
373
|
+
flex-shrink: 1;
|
|
374
|
+
min-inline-size: calc(var(--#{sys.$prefix}border-width) * 4);
|
|
375
|
+
background: var(--_segment-fill) !important;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.#{sys.$prefix}progress__segment-labels {
|
|
379
|
+
flex-wrap: wrap;
|
|
380
|
+
list-style: none;
|
|
381
|
+
padding: 0;
|
|
382
|
+
margin-inline: 0;
|
|
383
|
+
margin-block-end: 0;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.#{sys.$prefix}progress__segment-label {
|
|
387
|
+
align-items: center;
|
|
388
|
+
margin: 0;
|
|
389
|
+
color: var(--_label);
|
|
390
|
+
font-weight: normal;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.#{sys.$prefix}progress__segment-label-text {
|
|
394
|
+
font-weight: normal;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.#{sys.$prefix}progress__segment-swatch {
|
|
398
|
+
flex-shrink: 0;
|
|
399
|
+
inline-size: 0.75em;
|
|
400
|
+
block-size: 0.75em;
|
|
401
|
+
border-radius: var(--#{sys.$prefix}radius-sm);
|
|
402
|
+
background: var(--_segment-fill) !important;
|
|
403
|
+
|
|
404
|
+
// The remainder of `max` is empty track: same color, plus a control
|
|
405
|
+
// boundary, since the track alone is ~1.2:1 against the page.
|
|
406
|
+
&.is-remainder {
|
|
407
|
+
background: var(--_track) !important;
|
|
408
|
+
box-shadow: inset 0 0 0 var(--#{sys.$prefix}border-width) var(--#{sys.$prefix}color-border-control);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
337
413
|
// -------------------------------------------------------------------------
|
|
338
414
|
// Indeterminate state
|
|
339
415
|
// -------------------------------------------------------------------------
|
|
@@ -405,6 +481,26 @@
|
|
|
405
481
|
background: Highlight !important;
|
|
406
482
|
}
|
|
407
483
|
|
|
484
|
+
// Breakdown: every part is Highlight, told apart by the Canvas gaps
|
|
485
|
+
// between them and by the legend text; the swatch keeps a shape.
|
|
486
|
+
// These must out-weigh the breakdown rules above, which sit at (0,4,0)
|
|
487
|
+
// with !important; the track's forced-color-adjust: none is inherited,
|
|
488
|
+
// so nothing forces the theme fills away on its own. Same weight,
|
|
489
|
+
// later in source, wins.
|
|
490
|
+
&.is-breakdown.is-mode-line .#{sys.$prefix}progress__bar {
|
|
491
|
+
background: Highlight !important;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
&.is-breakdown.is-mode-line .#{sys.$prefix}progress__segment-swatch {
|
|
495
|
+
forced-color-adjust: none;
|
|
496
|
+
background: Highlight !important;
|
|
497
|
+
border: 1px solid CanvasText;
|
|
498
|
+
|
|
499
|
+
&.is-remainder {
|
|
500
|
+
background: Canvas !important;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
408
504
|
&.is-mode-circle .#{sys.$prefix}progress__circle__bar {
|
|
409
505
|
forced-color-adjust: none;
|
|
410
506
|
background:
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
--tui-radio-font-size
|
|
12
12
|
--tui-radio-label-color
|
|
13
13
|
--tui-radio-description-color
|
|
14
|
+
--tui-radio-fg-disabled
|
|
14
15
|
--tui-radio-group-gap
|
|
15
16
|
*/
|
|
16
17
|
|
|
@@ -30,6 +31,9 @@
|
|
|
30
31
|
// --tui-radio-font-size Font size for label + description base
|
|
31
32
|
// --tui-radio-label-color Label text color
|
|
32
33
|
// --tui-radio-description-color Description text color
|
|
34
|
+
// --tui-radio-fg-disabled Label + description color when disabled
|
|
35
|
+
// (default fg-muted). Wins over -label-color
|
|
36
|
+
// and -description-color on disabled items.
|
|
33
37
|
// --tui-radio-group-gap Gap between items in the group
|
|
34
38
|
//
|
|
35
39
|
// ==========================================================================
|
|
@@ -52,10 +56,6 @@
|
|
|
52
56
|
flex-wrap: wrap;
|
|
53
57
|
gap: var(--_group-gap);
|
|
54
58
|
}
|
|
55
|
-
|
|
56
|
-
&[aria-disabled="true"] {
|
|
57
|
-
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
58
|
-
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// ---------------------------------------------------------------------------
|
|
@@ -77,6 +77,20 @@
|
|
|
77
77
|
display: flex;
|
|
78
78
|
flex-direction: column;
|
|
79
79
|
|
|
80
|
+
// Disabled (item or group): the text mutes and the indicator dims.
|
|
81
|
+
// Opacity on the whole row left near-black text reading as enabled, and
|
|
82
|
+
// muting AND dimming the text compounds to under 3:1. So text stays at
|
|
83
|
+
// full opacity (fg-muted: 4.8:1 light), and only the indicator dims. One
|
|
84
|
+
// rule for both paths: a group-level opacity used to dim descriptions too.
|
|
85
|
+
&[data-disabled] {
|
|
86
|
+
--_label-color: var(--#{sys.$prefix}radio-fg-disabled, var(--#{sys.$prefix}color-fg-muted));
|
|
87
|
+
--_desc-color: var(--#{sys.$prefix}radio-fg-disabled, var(--#{sys.$prefix}color-fg-muted));
|
|
88
|
+
|
|
89
|
+
.#{sys.$prefix}radio__indicator {
|
|
90
|
+
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
80
94
|
// Selected state — targets the control button inside
|
|
81
95
|
&:has(.#{sys.$prefix}radio__control[aria-checked="true"]) {
|
|
82
96
|
.#{sys.$prefix}radio__indicator {
|
|
@@ -125,14 +139,13 @@
|
|
|
125
139
|
}
|
|
126
140
|
}
|
|
127
141
|
|
|
142
|
+
// Dimming is on the item (`[data-disabled]` above), not here.
|
|
128
143
|
&:disabled {
|
|
129
144
|
cursor: not-allowed;
|
|
130
|
-
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
131
145
|
pointer-events: none;
|
|
132
146
|
}
|
|
133
147
|
|
|
134
|
-
// Group-disabled: no
|
|
135
|
-
// no pointer-events: none (so cursor: not-allowed is visible).
|
|
148
|
+
// Group-disabled: no pointer-events: none (so cursor: not-allowed is visible).
|
|
136
149
|
// JS guard prevents selection.
|
|
137
150
|
&[aria-disabled="true"] {
|
|
138
151
|
cursor: not-allowed;
|
|
@@ -264,6 +277,14 @@
|
|
|
264
277
|
&:checked {
|
|
265
278
|
accent-color: var(--_accent);
|
|
266
279
|
}
|
|
280
|
+
|
|
281
|
+
&:disabled {
|
|
282
|
+
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.#{sys.$prefix}interface .#{sys.$prefix}inline-choice.is-disabled:has(input[type="radio"]) > :not(input) {
|
|
287
|
+
color: var(--#{sys.$prefix}radio-fg-disabled, var(--#{sys.$prefix}color-fg-muted));
|
|
267
288
|
}
|
|
268
289
|
|
|
269
290
|
// ---------------------------------------------------------------------------
|
|
@@ -271,6 +292,13 @@
|
|
|
271
292
|
// ---------------------------------------------------------------------------
|
|
272
293
|
|
|
273
294
|
@media (forced-colors: active) {
|
|
295
|
+
// The fg-muted cue is replaced by the system palette; GrayText is the
|
|
296
|
+
// system's own disabled text color.
|
|
297
|
+
.#{sys.$prefix}interface .#{sys.$prefix}radio[data-disabled] :is(.#{sys.$prefix}radio__label, .#{sys.$prefix}radio__description),
|
|
298
|
+
.#{sys.$prefix}interface .#{sys.$prefix}inline-choice.is-disabled:has(input[type="radio"]) > :not(input) {
|
|
299
|
+
color: GrayText;
|
|
300
|
+
}
|
|
301
|
+
|
|
274
302
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}radio__indicator {
|
|
275
303
|
forced-color-adjust: none;
|
|
276
304
|
border-color: CanvasText;
|