@tangible/ui 0.0.19 → 0.0.21
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 +1 -0
- package/components/Accordion/Accordion.js +1 -1
- package/components/Avatar/Avatar.d.ts +3 -1
- package/components/Avatar/Avatar.js +6 -25
- package/components/Avatar/index.d.ts +2 -2
- package/components/Avatar/index.js +1 -1
- package/components/Avatar/types.d.ts +8 -8
- package/components/Avatar/types.js +0 -12
- package/components/Combobox/Combobox.js +2 -2
- package/components/Icon/Icon.d.ts +10 -1
- package/components/Icon/Icon.js +5 -1
- package/components/Modal/Modal.js +1 -1
- package/components/MultiSelect/MultiSelect.js +1 -1
- package/components/Notice/Notice.d.ts +2 -2
- package/components/OverlapStack/OverlapStack.js +4 -2
- package/components/Pager/Pager.js +9 -3
- package/components/Pager/types.d.ts +9 -0
- package/components/Pager/types.js +2 -0
- package/components/Progress/Progress.js +3 -3
- package/components/Rating/Rating.js +4 -2
- package/components/Rating/types.d.ts +5 -1
- package/components/Rating/types.js +1 -0
- package/components/Select/Select.d.ts +1 -1
- package/components/Select/Select.js +6 -4
- package/components/Select/types.d.ts +5 -0
- package/components/StepIndicator/StepIndicator.js +6 -2
- package/components/StepIndicator/types.d.ts +3 -0
- package/components/StepIndicator/types.js +1 -0
- package/components/Table/BulkActionsBar.js +4 -1
- package/components/Table/DataTable.js +8 -5
- package/components/Tabs/Tabs.js +1 -1
- package/components/index.d.ts +3 -2
- package/components/index.js +2 -1
- package/icons/icons.svg +6 -2
- package/icons/lms/index.js +1 -1
- package/icons/manifest.json +32 -0
- package/icons/registry.d.ts +8 -0
- package/icons/registry.js +4 -0
- package/icons/system/index.d.ts +8 -0
- package/icons/system/index.js +45 -1
- package/package.json +1 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +266 -106
- package/styles/all.expanded.unlayered.css +266 -106
- package/styles/all.unlayered.css +1 -1
- package/styles/components/accordion.scss +5 -2
- package/styles/components/avatar.scss +15 -63
- package/styles/components/button.scss +9 -2
- package/styles/components/chip.scss +9 -1
- package/styles/components/combobox.scss +4 -2
- package/styles/components/dropdown.scss +2 -2
- package/styles/components/icon.scss +14 -3
- package/styles/components/input/index.scss +6 -1
- package/styles/components/move-handle.scss +1 -1
- package/styles/components/multi-select.scss +6 -3
- package/styles/components/notice.scss +30 -6
- package/styles/components/overlap-stack.scss +4 -3
- package/styles/components/pager.scss +6 -3
- package/styles/components/progress.scss +17 -5
- package/styles/components/rating.scss +2 -2
- package/styles/components/segmented-control.scss +2 -2
- package/styles/components/select.scss +13 -4
- package/styles/components/step-indicator.scss +8 -8
- package/styles/components/step-list.scss +1 -1
- package/styles/components/table.scss +2 -1
- package/styles/components/tabs.scss +2 -2
- package/styles/components/text-input.scss +5 -1
- package/styles/core.css +1 -1
- package/styles/core.unlayered.css +1 -1
- package/styles/index.scss +5 -2
- package/styles/system/_constants.scss +2 -2
- package/styles/system/_motion.scss +20 -18
- package/styles/system/_tokens.scss +89 -10
- package/tui-manifest.json +19 -6
- package/utils/generative.d.ts +16 -0
- package/utils/generative.js +45 -0
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
background: var(--_trigger-bg);
|
|
111
111
|
color: inherit;
|
|
112
112
|
font: inherit;
|
|
113
|
-
font-weight: var(--#{sys.$prefix}
|
|
113
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
|
|
114
114
|
text-align: start;
|
|
115
115
|
cursor: pointer;
|
|
116
116
|
transition-property: background-color;
|
|
@@ -151,10 +151,13 @@
|
|
|
151
151
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}accordion__indicator {
|
|
152
152
|
flex-shrink: 0;
|
|
153
153
|
color: var(--_indicator);
|
|
154
|
+
// Component-owned size (was Icon size="lg" under the typography-tracking
|
|
155
|
+
// scale): the icon presentation scale has no 20px step, and the chevron
|
|
156
|
+
// sizes with the trigger's type, not the icon scale.
|
|
157
|
+
font-size: var(--#{sys.$prefix}typography-size-lg);
|
|
154
158
|
transition-property: transform;
|
|
155
159
|
transition-duration: var(--#{sys.$prefix}motion-duration);
|
|
156
160
|
transition-timing-function: var(--#{sys.$prefix}motion-timing);
|
|
157
|
-
|
|
158
161
|
}
|
|
159
162
|
|
|
160
163
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}accordion__trigger[data-state="open"] > .#{sys.$prefix}accordion__indicator {
|
|
@@ -38,35 +38,14 @@
|
|
|
38
38
|
// --tui-avatar-group-border-width Border ring width (default: 2px)
|
|
39
39
|
// --tui-avatar-group-border-color Border ring color (default: bg-surface)
|
|
40
40
|
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
41
|
+
// Initials colors come from the system's generative palette
|
|
42
|
+
// (--tui-generative-*, The Jellybean Bag) — see styles/system/_tokens.scss.
|
|
43
43
|
//
|
|
44
44
|
// To override from consuming code:
|
|
45
45
|
// .my-context .tui-avatar { --tui-avatar-indicator-bg: #22c55e; }
|
|
46
46
|
//
|
|
47
47
|
// ==========================================================================
|
|
48
48
|
|
|
49
|
-
// ---------------------------------------------------------------------------
|
|
50
|
-
// Avatar Palette (variety colors for initials)
|
|
51
|
-
// ---------------------------------------------------------------------------
|
|
52
|
-
// These are pleasant, accessible background colors with good contrast for white text.
|
|
53
|
-
// They're not tied to semantic themes - just visual variety based on name hash.
|
|
54
|
-
|
|
55
|
-
// Palette colors chosen for WCAG AA contrast (4.5:1+) with white text,
|
|
56
|
-
// except amber/lime/cyan which use dark text for better contrast.
|
|
57
|
-
:where(.#{sys.$prefix}interface) {
|
|
58
|
-
--#{sys.$prefix}avatar-palette-coral: #c62828;
|
|
59
|
-
--#{sys.$prefix}avatar-palette-amber: #f59e0b;
|
|
60
|
-
--#{sys.$prefix}avatar-palette-lime: #65a30d;
|
|
61
|
-
--#{sys.$prefix}avatar-palette-teal: #0f766e;
|
|
62
|
-
--#{sys.$prefix}avatar-palette-cyan: #0891b2;
|
|
63
|
-
--#{sys.$prefix}avatar-palette-blue: #1d4ed8;
|
|
64
|
-
--#{sys.$prefix}avatar-palette-violet: #6d28d9;
|
|
65
|
-
--#{sys.$prefix}avatar-palette-pink: #be185d;
|
|
66
|
-
--#{sys.$prefix}avatar-palette-slate: #475569;
|
|
67
|
-
--#{sys.$prefix}avatar-palette-emerald: #047857;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
49
|
// ---------------------------------------------------------------------------
|
|
71
50
|
// Avatar Base
|
|
72
51
|
// ---------------------------------------------------------------------------
|
|
@@ -89,7 +68,7 @@
|
|
|
89
68
|
border: var(--_border);
|
|
90
69
|
background-color: var(--_bg);
|
|
91
70
|
color: var(--_fg);
|
|
92
|
-
font-weight: var(--#{sys.$prefix}
|
|
71
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
|
|
93
72
|
font-size: calc(var(--_size) * 0.4);
|
|
94
73
|
line-height: 1;
|
|
95
74
|
flex-shrink: 0;
|
|
@@ -135,49 +114,22 @@
|
|
|
135
114
|
}
|
|
136
115
|
|
|
137
116
|
// -------------------------------------------------------------------------
|
|
138
|
-
//
|
|
117
|
+
// Identity Colors (for initials backgrounds)
|
|
139
118
|
// -------------------------------------------------------------------------
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&.is-color-lime {
|
|
150
|
-
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}avatar-palette-lime));
|
|
151
|
-
--_fg: var(--#{sys.$prefix}avatar-fg, var(--#{sys.$prefix}color-fg)); // Dark text for light bg
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&.is-color-teal {
|
|
155
|
-
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}avatar-palette-teal));
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&.is-color-cyan {
|
|
159
|
-
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}avatar-palette-cyan));
|
|
160
|
-
--_fg: var(--#{sys.$prefix}avatar-fg, var(--#{sys.$prefix}color-fg)); // Dark text for light bg
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
&.is-color-blue {
|
|
164
|
-
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}avatar-palette-blue));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&.is-color-violet {
|
|
168
|
-
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}avatar-palette-violet));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&.is-color-pink {
|
|
172
|
-
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}avatar-palette-pink));
|
|
119
|
+
// The generative palette (The Jellybean Bag) — each bean carries its own
|
|
120
|
+
// mode-independent fg pairing, so no per-color special cases here.
|
|
121
|
+
@each $bean, $def in sys.$generative {
|
|
122
|
+
&.is-color-#{$bean} {
|
|
123
|
+
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}generative-#{$bean}));
|
|
124
|
+
--_fg: var(--#{sys.$prefix}avatar-fg, var(--#{sys.$prefix}generative-#{$bean}-fg));
|
|
125
|
+
}
|
|
173
126
|
}
|
|
174
127
|
|
|
128
|
+
// Neutral fallback for name-less avatars — deliberately NOT a bag member
|
|
129
|
+
// (grey means "no identity", not a flavour). Fixed values, like a bean.
|
|
175
130
|
&.is-color-slate {
|
|
176
|
-
--_bg: var(--#{sys.$prefix}avatar-bg,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
&.is-color-emerald {
|
|
180
|
-
--_bg: var(--#{sys.$prefix}avatar-bg, var(--#{sys.$prefix}avatar-palette-emerald));
|
|
131
|
+
--_bg: var(--#{sys.$prefix}avatar-bg, #475569);
|
|
132
|
+
--_fg: var(--#{sys.$prefix}avatar-fg, #fff);
|
|
181
133
|
}
|
|
182
134
|
|
|
183
135
|
// -------------------------------------------------------------------------
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
--tui-button-fg-interact
|
|
10
10
|
--tui-button-border-interact
|
|
11
11
|
--tui-button-fg-active
|
|
12
|
+
--tui-button-icon-scale
|
|
12
13
|
--tui-control-height-sm
|
|
13
14
|
--tui-control-height-md
|
|
14
15
|
--tui-control-height-lg
|
|
@@ -61,6 +62,7 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
|
|
|
61
62
|
// --tui-button-fg-interact Hover/focus/active foreground
|
|
62
63
|
// --tui-button-border-interact Hover/focus/active border
|
|
63
64
|
// --tui-button-fg-active Active/pressed foreground color
|
|
65
|
+
// --tui-button-icon-scale Icon:label size ratio multiplier (default 1.25)
|
|
64
66
|
// --tui-button-font-weight Font weight
|
|
65
67
|
// --tui-button-line-height Line height for button text
|
|
66
68
|
// --tui-button-font-size Font size for medium button text
|
|
@@ -149,8 +151,13 @@ $_typography-lineHeight: var(--#{sys.$prefix}button-line-height, 1.4);
|
|
|
149
151
|
border-style: solid;
|
|
150
152
|
border-width: var(--#{sys.$prefix}border-width);
|
|
151
153
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
// Icons track the label, never the presentation scale — the [class*=]
|
|
155
|
+
// arm outranks Icon's is-size-* rules so changes to the global icon
|
|
156
|
+
// scale can't reflow buttons. --tui-button-icon-scale adjusts the
|
|
157
|
+
// icon:label ratio (default 1.25).
|
|
158
|
+
.#{sys.$prefix}icon,
|
|
159
|
+
.#{sys.$prefix}icon[class*="is-size-"] {
|
|
160
|
+
font-size: calc(1.25em * var(--#{sys.$prefix}button-icon-scale, 1));
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
// -------------------------------------------------------------------------
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
--tui-chip-fg
|
|
6
6
|
--tui-chip-border
|
|
7
7
|
--tui-chip-icon
|
|
8
|
+
--tui-chip-icon-scale
|
|
8
9
|
--tui-chip-radius
|
|
9
10
|
--tui-chip-selected-ring
|
|
10
11
|
--tui-chip-icon-slot-bg
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
// --tui-chip-fg Foreground/text color
|
|
22
23
|
// --tui-chip-border Border color
|
|
23
24
|
// --tui-chip-icon Icon color (optional, defaults to inherit)
|
|
25
|
+
// --tui-chip-icon-scale Icon:text size ratio multiplier (default 1.25)
|
|
24
26
|
// --tui-chip-radius Border radius
|
|
25
27
|
// --tui-chip-selected-ring Selected/pressed inset ring width (default: 1px)
|
|
26
28
|
// --tui-chip-icon-slot-bg Icon-slot panel background (used when leftIcon
|
|
@@ -80,8 +82,14 @@
|
|
|
80
82
|
transition-timing-function: var(--#{sys.$prefix}motion-timing);
|
|
81
83
|
transition-property: border-color, color, background-color, filter;
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
// Icons track the chip text, never the presentation scale — the
|
|
86
|
+
// [class*=] arm outranks Icon's is-size-* rules so changes to the
|
|
87
|
+
// global icon scale can't reflow chips. --tui-chip-icon-scale adjusts
|
|
88
|
+
// the icon:text ratio (default 1.25).
|
|
89
|
+
.#{sys.$prefix}icon,
|
|
90
|
+
.#{sys.$prefix}icon[class*="is-size-"] {
|
|
84
91
|
color: var(--_icon);
|
|
92
|
+
font-size: calc(1em * var(--#{sys.$prefix}chip-icon-scale, 1.25));
|
|
85
93
|
}
|
|
86
94
|
|
|
87
95
|
&:where([aria-disabled="true"], [disabled]) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use "../system" as sys;
|
|
2
2
|
|
|
3
3
|
/* @tui-tokens
|
|
4
|
+
--tui-combobox-min-width
|
|
4
5
|
--tui-combobox-input-bg
|
|
5
6
|
--tui-combobox-input-fg
|
|
6
7
|
--tui-combobox-input-border
|
|
@@ -192,10 +193,11 @@ $_label-letter-spacing: 0.05em;
|
|
|
192
193
|
--_border: var(--#{sys.$prefix}combobox-content-border, var(--#{sys.$prefix}select-content-border, var(--#{sys.$prefix}color-border)));
|
|
193
194
|
--_shadow: var(--#{sys.$prefix}combobox-content-shadow, var(--#{sys.$prefix}select-content-shadow, var(--#{sys.$prefix}shadow-dropdown)));
|
|
194
195
|
--_radius: var(--#{sys.$prefix}combobox-content-radius, var(--#{sys.$prefix}select-content-radius, var(--#{sys.$prefix}radius-md)));
|
|
196
|
+
--_min-width: var(--#{sys.$prefix}combobox-min-width, var(--#{sys.$prefix}select-min-width, $_min-width));
|
|
195
197
|
|
|
196
198
|
// Layout
|
|
197
199
|
z-index: var(--#{sys.$prefix}layer-top);
|
|
198
|
-
min-width:
|
|
200
|
+
min-width: var(--_min-width);
|
|
199
201
|
padding: var(--#{sys.$prefix}spacing-xxs);
|
|
200
202
|
overflow-y: auto;
|
|
201
203
|
overscroll-behavior: contain;
|
|
@@ -308,7 +310,7 @@ $_label-letter-spacing: 0.05em;
|
|
|
308
310
|
padding: var(--#{sys.$prefix}spacing-xs) var(--#{sys.$prefix}spacing-sm);
|
|
309
311
|
padding-bottom: var(--#{sys.$prefix}spacing-xxs);
|
|
310
312
|
font-size: var(--#{sys.$prefix}typography-size-xs);
|
|
311
|
-
font-weight: var(--#{sys.$prefix}
|
|
313
|
+
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
312
314
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
313
315
|
text-transform: uppercase;
|
|
314
316
|
letter-spacing: $_label-letter-spacing;
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
&:focus-visible {
|
|
100
100
|
--#{sys.$prefix}button-bg: var(--_item-bg-hover);
|
|
101
101
|
--#{sys.$prefix}button-fg: inherit;
|
|
102
|
-
outline: var(--#{sys.$prefix}focus-ring-width
|
|
102
|
+
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
103
103
|
outline-offset: calc(-1 * var(--#{sys.$prefix}focus-ring-width, 2px));
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
padding: var(--#{sys.$prefix}spacing-xs, 8px) var(--#{sys.$prefix}spacing-sm, 12px);
|
|
139
139
|
padding-block-end: var(--#{sys.$prefix}spacing-xxs, 4px);
|
|
140
140
|
font-size: var(--#{sys.$prefix}typography-size-xs, 11px);
|
|
141
|
-
font-weight: var(--#{sys.$prefix}
|
|
141
|
+
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
142
142
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
143
143
|
letter-spacing: 0.02em;
|
|
144
144
|
user-select: none;
|
|
@@ -17,19 +17,30 @@
|
|
|
17
17
|
// Component API tokens (never defined here, only read via fallback):
|
|
18
18
|
// --tui-icon-size-{xs,sm,md,lg,xl,xxl} Size overrides per scale
|
|
19
19
|
//
|
|
20
|
-
// Default behavior: inherits font-size from parent (icons scale with text)
|
|
20
|
+
// Default behavior: inherits font-size from parent (icons scale with text).
|
|
21
|
+
//
|
|
22
|
+
// Sized icons use a dedicated 8px-rhythm presentation scale, decoupled
|
|
23
|
+
// from typography — mirroring the control-sizing approach: API tokens are
|
|
24
|
+
// read via fallback, defaults live inline. The rem idiom (N * 1rem/16)
|
|
25
|
+
// reads as px at the default root size but scales with the user's
|
|
26
|
+
// font-size preference, same as the typography tokens.
|
|
27
|
+
//
|
|
28
|
+
// Inside Button and Chip, presentation sizes are neutralised — child icons
|
|
29
|
+
// track the label text (see --tui-button-icon-scale / --tui-chip-icon-scale).
|
|
21
30
|
//
|
|
22
31
|
// ==========================================================================
|
|
23
32
|
|
|
33
|
+
$icon-scale: (xs: 12, sm: 16, md: 24, lg: 32, xl: 40, xxl: 48);
|
|
34
|
+
|
|
24
35
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}icon {
|
|
25
36
|
display: inline-flex;
|
|
26
37
|
vertical-align: -0.125em;
|
|
27
38
|
line-height: 1;
|
|
28
39
|
|
|
29
40
|
// Size variants
|
|
30
|
-
@each $size
|
|
41
|
+
@each $size, $px in $icon-scale {
|
|
31
42
|
&.is-size-#{$size} {
|
|
32
|
-
font-size: var(--#{sys.$prefix}icon-size-#{$size},
|
|
43
|
+
font-size: var(--#{sys.$prefix}icon-size-#{$size}, calc(#{$px} * calc(1rem / 16)));
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
|
|
@@ -111,8 +111,13 @@
|
|
|
111
111
|
// Select with dropdown arrow
|
|
112
112
|
// ---------------------------------------------------------------------------
|
|
113
113
|
:where(.#{sys.$prefix}interface) :is(select, select.#{sys.$prefix}input) {
|
|
114
|
+
// !important: WordPress-host defence — admin CSS sets its own select
|
|
115
|
+
// padding, which would let text run under the chevron.
|
|
114
116
|
padding-inline-end: 2.5em !important;
|
|
115
|
-
|
|
117
|
+
// Chevron comes from the token system (light/dark variants defined in
|
|
118
|
+
// system/_tokens.scss): a <select> can't be masked without masking its
|
|
119
|
+
// text, so the image itself swaps with the scheme.
|
|
120
|
+
background-image: var(--#{sys.$prefix}input-chevron);
|
|
116
121
|
background-repeat: no-repeat;
|
|
117
122
|
background-position: calc(100% - 0.75em) 50%;
|
|
118
123
|
background-size: 1em;
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
width: var(--_size);
|
|
201
201
|
border-radius: var(--#{sys.$prefix}radius-md);
|
|
202
202
|
font-size: var(--#{sys.$prefix}typography-size-sm, 0.875rem);
|
|
203
|
-
font-weight: var(--#{sys.$prefix}
|
|
203
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
|
|
204
204
|
color: var(--_fg);
|
|
205
205
|
user-select: none;
|
|
206
206
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use "../system" as sys;
|
|
2
2
|
|
|
3
3
|
/* @tui-tokens
|
|
4
|
+
--tui-multiselect-min-width
|
|
4
5
|
--tui-multiselect-trigger-bg
|
|
5
6
|
--tui-multiselect-trigger-fg
|
|
6
7
|
--tui-multiselect-trigger-border
|
|
@@ -66,6 +67,7 @@ $_chip-max-width: 120px;
|
|
|
66
67
|
--_border: var(--#{sys.$prefix}multiselect-trigger-border, var(--#{sys.$prefix}color-border));
|
|
67
68
|
--_border-focus: var(--#{sys.$prefix}multiselect-trigger-border-focus, var(--#{sys.$prefix}theme-primary-base));
|
|
68
69
|
--_radius: var(--#{sys.$prefix}multiselect-trigger-radius, var(--#{sys.$prefix}radius-md));
|
|
70
|
+
--_min-width: var(--#{sys.$prefix}multiselect-min-width, $_min-width);
|
|
69
71
|
|
|
70
72
|
// Reset
|
|
71
73
|
appearance: none;
|
|
@@ -81,7 +83,7 @@ $_chip-max-width: 120px;
|
|
|
81
83
|
align-items: center;
|
|
82
84
|
justify-content: space-between;
|
|
83
85
|
gap: var(--#{sys.$prefix}spacing-xs);
|
|
84
|
-
min-width:
|
|
86
|
+
min-width: var(--_min-width);
|
|
85
87
|
width: 100%;
|
|
86
88
|
padding-inline: var(--#{sys.$prefix}spacing-sm);
|
|
87
89
|
|
|
@@ -222,10 +224,11 @@ $_chip-max-width: 120px;
|
|
|
222
224
|
--_border: var(--#{sys.$prefix}multiselect-content-border, var(--#{sys.$prefix}color-border));
|
|
223
225
|
--_shadow: var(--#{sys.$prefix}multiselect-content-shadow, var(--#{sys.$prefix}shadow-dropdown));
|
|
224
226
|
--_radius: var(--#{sys.$prefix}multiselect-content-radius, var(--#{sys.$prefix}radius-md));
|
|
227
|
+
--_min-width: var(--#{sys.$prefix}multiselect-min-width, $_min-width);
|
|
225
228
|
|
|
226
229
|
// Layout
|
|
227
230
|
z-index: var(--#{sys.$prefix}layer-top);
|
|
228
|
-
min-width:
|
|
231
|
+
min-width: var(--_min-width);
|
|
229
232
|
padding: var(--#{sys.$prefix}spacing-xxs);
|
|
230
233
|
overflow-y: auto;
|
|
231
234
|
overscroll-behavior: contain;
|
|
@@ -370,7 +373,7 @@ $_chip-max-width: 120px;
|
|
|
370
373
|
padding: var(--#{sys.$prefix}spacing-xs) var(--#{sys.$prefix}spacing-sm);
|
|
371
374
|
padding-bottom: var(--#{sys.$prefix}spacing-xxs);
|
|
372
375
|
font-size: var(--#{sys.$prefix}typography-size-xs);
|
|
373
|
-
font-weight: var(--#{sys.$prefix}
|
|
376
|
+
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
374
377
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
375
378
|
text-transform: uppercase;
|
|
376
379
|
letter-spacing: $_label-letter-spacing;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
--tui-notice-fg
|
|
9
9
|
--tui-notice-radius
|
|
10
10
|
--tui-notice-padding
|
|
11
|
+
--tui-notice-title-size
|
|
11
12
|
--tui-notice-foot-basis
|
|
12
13
|
*/
|
|
13
14
|
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
// --tui-notice-fg Text color
|
|
25
26
|
// --tui-notice-radius Border radius
|
|
26
27
|
// --tui-notice-padding Padding
|
|
28
|
+
// --tui-notice-title-size Title font size (defaults per size preset)
|
|
27
29
|
// --tui-notice-foot-basis Flex basis for foot in inline layout
|
|
28
30
|
//
|
|
29
31
|
// To override from consuming code:
|
|
@@ -81,7 +83,10 @@
|
|
|
81
83
|
&__title {
|
|
82
84
|
flex: 1 1 auto;
|
|
83
85
|
margin: 0;
|
|
84
|
-
|
|
86
|
+
// Explicit size: the title renders as a heading element (h2–h6 via
|
|
87
|
+
// titleAs), which must not pull in element-level heading typography.
|
|
88
|
+
font-size: var(--#{sys.$prefix}notice-title-size, var(--#{sys.$prefix}typography-size-md));
|
|
89
|
+
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
85
90
|
}
|
|
86
91
|
// -------------------------------------------------------------------------
|
|
87
92
|
// Slots
|
|
@@ -149,10 +154,6 @@
|
|
|
149
154
|
--_gap: var(--#{sys.$prefix}spacing-xs);
|
|
150
155
|
--_para-gap: var(--#{sys.$prefix}spacing-xs);
|
|
151
156
|
|
|
152
|
-
.#{sys.$prefix}notice__title {
|
|
153
|
-
font-size: var(--#{sys.$prefix}typography-size-md);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
157
|
.#{sys.$prefix}notice__body {
|
|
157
158
|
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
158
159
|
}
|
|
@@ -164,7 +165,7 @@
|
|
|
164
165
|
--_para-gap: var(--#{sys.$prefix}spacing-md);
|
|
165
166
|
|
|
166
167
|
.#{sys.$prefix}notice__title {
|
|
167
|
-
font-size: var(--#{sys.$prefix}typography-size-lg);
|
|
168
|
+
font-size: var(--#{sys.$prefix}notice-title-size, var(--#{sys.$prefix}typography-size-lg));
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
|
|
@@ -210,6 +211,12 @@
|
|
|
210
211
|
.#{sys.$prefix}notice__foot {
|
|
211
212
|
width: unset;
|
|
212
213
|
flex: 0 1 var(--_foot-basis);
|
|
214
|
+
// The end-alignment contract below needs the foot to actually be a
|
|
215
|
+
// flex container — without this, content sat start-aligned inside
|
|
216
|
+
// the foot's basis width.
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
gap: var(--_gap);
|
|
213
220
|
padding-block: var(--_padding);
|
|
214
221
|
padding-inline-end: var(--_padding);
|
|
215
222
|
margin-inline-start: auto;
|
|
@@ -275,9 +282,14 @@
|
|
|
275
282
|
// -------------------------------------------------------------------------
|
|
276
283
|
// Themes
|
|
277
284
|
// -------------------------------------------------------------------------
|
|
285
|
+
// Each theme wires --_border to the theme's subtle step (the same value
|
|
286
|
+
// as its hover bg), so hosts can theme borders per-notice via
|
|
287
|
+
// --tui-notice-border or just widen border-width and get a colour that
|
|
288
|
+
// matches the theme.
|
|
278
289
|
&.is-theme-info {
|
|
279
290
|
--_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-primary-subtlest));
|
|
280
291
|
--_bg-hover: var(--#{sys.$prefix}theme-primary-subtle);
|
|
292
|
+
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-primary-subtle));
|
|
281
293
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-primary-base));
|
|
282
294
|
--_icon-color: var(--#{sys.$prefix}theme-primary-base);
|
|
283
295
|
}
|
|
@@ -285,6 +297,7 @@
|
|
|
285
297
|
&.is-theme-success {
|
|
286
298
|
--_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-success-subtlest));
|
|
287
299
|
--_bg-hover: var(--#{sys.$prefix}theme-success-subtle);
|
|
300
|
+
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-success-subtle));
|
|
288
301
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-success-base));
|
|
289
302
|
--_icon-color: var(--#{sys.$prefix}theme-success-base);
|
|
290
303
|
}
|
|
@@ -292,6 +305,7 @@
|
|
|
292
305
|
&.is-theme-warning {
|
|
293
306
|
--_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-warning-subtlest));
|
|
294
307
|
--_bg-hover: var(--#{sys.$prefix}theme-warning-subtle);
|
|
308
|
+
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-warning-subtle));
|
|
295
309
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-warning-base));
|
|
296
310
|
--_icon-color: var(--#{sys.$prefix}theme-warning-base);
|
|
297
311
|
}
|
|
@@ -299,10 +313,20 @@
|
|
|
299
313
|
&.is-theme-danger {
|
|
300
314
|
--_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-danger-subtlest));
|
|
301
315
|
--_bg-hover: var(--#{sys.$prefix}theme-danger-subtle);
|
|
316
|
+
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}theme-danger-subtle));
|
|
302
317
|
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-danger-base));
|
|
303
318
|
--_icon-color: var(--#{sys.$prefix}theme-danger-base);
|
|
304
319
|
}
|
|
305
320
|
|
|
321
|
+
// No-status treatment on the neutral palette, for resting/empty states.
|
|
322
|
+
&.is-theme-neutral {
|
|
323
|
+
--_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}color-bg-surface));
|
|
324
|
+
--_bg-hover: var(--#{sys.$prefix}color-bg-muted);
|
|
325
|
+
--_border: var(--#{sys.$prefix}notice-border, var(--#{sys.$prefix}color-border));
|
|
326
|
+
--_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}color-fg-muted));
|
|
327
|
+
--_icon-color: var(--#{sys.$prefix}color-fg-muted);
|
|
328
|
+
}
|
|
329
|
+
|
|
306
330
|
// -------------------------------------------------------------------------
|
|
307
331
|
// Elevated style
|
|
308
332
|
// -------------------------------------------------------------------------
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
// OverlapStack Component
|
|
15
15
|
// ==========================================================================
|
|
16
16
|
//
|
|
17
|
-
// Layout utility for overlapping items with
|
|
18
|
-
//
|
|
17
|
+
// Layout utility for overlapping items with ascending z-index stacking.
|
|
18
|
+
// Last item (and the overflow badge) appears on top — the convention for
|
|
19
|
+
// avatar stacks, where the newest/overflow edge reads as frontmost.
|
|
19
20
|
//
|
|
20
21
|
// Component API tokens (never defined here, only read via fallback):
|
|
21
22
|
// --tui-overlap-stack-overlap Overlap amount (-0.5rem)
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
background-color: var(--_bg);
|
|
73
74
|
color: var(--_fg);
|
|
74
75
|
font-size: 0.75rem;
|
|
75
|
-
font-weight: var(--#{sys.$prefix}
|
|
76
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
|
|
76
77
|
|
|
77
78
|
@media (forced-colors: active) {
|
|
78
79
|
border: 1px solid CanvasText;
|
|
@@ -31,9 +31,12 @@
|
|
|
31
31
|
gap: 0;
|
|
32
32
|
.#{sys.$prefix}pager__item,
|
|
33
33
|
.#{sys.$prefix}pager__ellipsis {
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
// Token Bridging: pager items are Button consumers — the connected
|
|
35
|
+
// group border routes through Button's own API token instead of
|
|
36
|
+
// fighting its internals with !important. Theme via
|
|
37
|
+
// --tui-pager-item-border.
|
|
38
|
+
--#{sys.$prefix}button-border: var(--#{sys.$prefix}pager-item-border, var(--#{sys.$prefix}color-border));
|
|
39
|
+
border-color: var(--#{sys.$prefix}button-border);
|
|
37
40
|
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
38
41
|
padding-inline: 0.85em;
|
|
39
42
|
padding-block: 0.4em;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
--tui-progress-fill
|
|
6
6
|
--tui-progress-label
|
|
7
7
|
--tui-progress-radius
|
|
8
|
+
--tui-progress-block-size
|
|
8
9
|
--tui-progress-z1-fill
|
|
9
10
|
--tui-progress-z2-fill
|
|
10
11
|
--tui-progress-z3-fill
|
|
@@ -18,10 +19,20 @@
|
|
|
18
19
|
// ==========================================================================
|
|
19
20
|
//
|
|
20
21
|
// Component API tokens (never defined here, only read via fallback):
|
|
21
|
-
// --tui-progress-track
|
|
22
|
-
// --tui-progress-fill
|
|
23
|
-
// --tui-progress-label
|
|
24
|
-
// --tui-progress-radius
|
|
22
|
+
// --tui-progress-track Track/background color
|
|
23
|
+
// --tui-progress-fill Fill/bar color
|
|
24
|
+
// --tui-progress-label Label text color
|
|
25
|
+
// --tui-progress-radius Border radius
|
|
26
|
+
// --tui-progress-block-size Track thickness (line mode). Default 1em — scales with size class.
|
|
27
|
+
// Override with a fixed value (e.g. 8px) to break the em coupling.
|
|
28
|
+
//
|
|
29
|
+
// Design Decisions:
|
|
30
|
+
// - background declarations carry !important as WordPress-host defence —
|
|
31
|
+
// admin and theme CSS target bars/track-like elements aggressively.
|
|
32
|
+
// Same rationale as Button and Chip (see their headers). Candidates for
|
|
33
|
+
// retirement if a host audit proves them unnecessary; do not add new
|
|
34
|
+
// ones. Sibling components must NOT counter them — bridge the
|
|
35
|
+
// --tui-progress-* API tokens instead (see StepIndicator).
|
|
25
36
|
//
|
|
26
37
|
// Segmented mode adds:
|
|
27
38
|
// --tui-progress-z1-fill Segment 1 color (default: primary)
|
|
@@ -41,6 +52,7 @@
|
|
|
41
52
|
--_fill: var(--#{sys.$prefix}progress-fill, var(--#{sys.$prefix}theme-primary-base));
|
|
42
53
|
--_label: var(--#{sys.$prefix}progress-label, var(--#{sys.$prefix}color-fg));
|
|
43
54
|
--_radius: var(--#{sys.$prefix}progress-radius, var(--#{sys.$prefix}radius-md));
|
|
55
|
+
--_block-size: var(--#{sys.$prefix}progress-block-size, 1em);
|
|
44
56
|
|
|
45
57
|
// Runtime vars (set by component)
|
|
46
58
|
--#{sys.$prefix}progress-value: 0;
|
|
@@ -75,7 +87,7 @@
|
|
|
75
87
|
.#{sys.$prefix}progress__track {
|
|
76
88
|
position: relative;
|
|
77
89
|
inline-size: 100%;
|
|
78
|
-
block-size:
|
|
90
|
+
block-size: var(--_block-size);
|
|
79
91
|
background: var(--_track) !important;
|
|
80
92
|
border-radius: var(--_radius);
|
|
81
93
|
overflow: clip;
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
align-items: center;
|
|
105
105
|
justify-content: center;
|
|
106
106
|
font-size: inherit;
|
|
107
|
-
color: var(--_inactive)
|
|
107
|
+
color: var(--_inactive);
|
|
108
108
|
|
|
109
109
|
// Make icon size track font size cleanly
|
|
110
110
|
.#{sys.$prefix}icon {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
&.is-active {
|
|
123
|
-
color: var(--_active)
|
|
123
|
+
color: var(--_active);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
}
|
|
@@ -129,8 +129,8 @@
|
|
|
129
129
|
color: var(--_item-fg);
|
|
130
130
|
font: inherit;
|
|
131
131
|
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
132
|
-
font-weight: var(--#{sys.$prefix}
|
|
133
|
-
line-height: var(--#{sys.$prefix}line-height-tight, 1.25);
|
|
132
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
|
|
133
|
+
line-height: var(--#{sys.$prefix}typography-line-height-tight, 1.25);
|
|
134
134
|
white-space: nowrap;
|
|
135
135
|
cursor: pointer;
|
|
136
136
|
transition-property: background-color, color;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use "../system" as sys;
|
|
2
2
|
|
|
3
3
|
/* @tui-tokens
|
|
4
|
+
--tui-select-min-width
|
|
4
5
|
--tui-select-trigger-bg
|
|
5
6
|
--tui-select-trigger-fg
|
|
6
7
|
--tui-select-trigger-border
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
19
|
// Structural SCSS constants (compile away, not overridable)
|
|
20
|
+
// $_min-width is the compile-time default for --tui-select-min-width.
|
|
19
21
|
$_min-width: 160px;
|
|
20
22
|
$_label-letter-spacing: 0.05em;
|
|
21
23
|
|
|
@@ -26,6 +28,11 @@ $_label-letter-spacing: 0.05em;
|
|
|
26
28
|
//
|
|
27
29
|
// Component API tokens (never defined here, only read via fallback):
|
|
28
30
|
//
|
|
31
|
+
// Shared:
|
|
32
|
+
// --tui-select-min-width (trigger and listbox; the listbox is
|
|
33
|
+
// portaled, so set it on .tui-interface
|
|
34
|
+
// or a portal-root ancestor to reach it)
|
|
35
|
+
//
|
|
29
36
|
// Trigger:
|
|
30
37
|
// --tui-select-trigger-bg
|
|
31
38
|
// --tui-select-trigger-fg
|
|
@@ -66,6 +73,7 @@ $_label-letter-spacing: 0.05em;
|
|
|
66
73
|
--_border: var(--#{sys.$prefix}select-trigger-border, var(--#{sys.$prefix}color-border));
|
|
67
74
|
--_border-focus: var(--#{sys.$prefix}select-trigger-border-focus, var(--#{sys.$prefix}theme-primary-base));
|
|
68
75
|
--_radius: var(--#{sys.$prefix}select-trigger-radius, var(--#{sys.$prefix}radius-md));
|
|
76
|
+
--_min-width: var(--#{sys.$prefix}select-min-width, $_min-width);
|
|
69
77
|
|
|
70
78
|
// Reset
|
|
71
79
|
appearance: none;
|
|
@@ -81,7 +89,7 @@ $_label-letter-spacing: 0.05em;
|
|
|
81
89
|
align-items: center;
|
|
82
90
|
justify-content: space-between;
|
|
83
91
|
gap: var(--#{sys.$prefix}spacing-xs);
|
|
84
|
-
min-width:
|
|
92
|
+
min-width: var(--_min-width);
|
|
85
93
|
width: 100%;
|
|
86
94
|
padding-inline: var(--#{sys.$prefix}spacing-sm);
|
|
87
95
|
|
|
@@ -197,10 +205,11 @@ $_label-letter-spacing: 0.05em;
|
|
|
197
205
|
--_border: var(--#{sys.$prefix}select-content-border, var(--#{sys.$prefix}color-border));
|
|
198
206
|
--_shadow: var(--#{sys.$prefix}select-content-shadow, var(--#{sys.$prefix}shadow-dropdown));
|
|
199
207
|
--_radius: var(--#{sys.$prefix}select-content-radius, var(--#{sys.$prefix}radius-md));
|
|
208
|
+
--_min-width: var(--#{sys.$prefix}select-min-width, $_min-width);
|
|
200
209
|
|
|
201
210
|
// Layout
|
|
202
211
|
z-index: var(--#{sys.$prefix}layer-top);
|
|
203
|
-
min-width:
|
|
212
|
+
min-width: var(--_min-width);
|
|
204
213
|
padding: var(--#{sys.$prefix}spacing-xxs);
|
|
205
214
|
overflow-y: auto;
|
|
206
215
|
overscroll-behavior: contain;
|
|
@@ -269,7 +278,7 @@ $_label-letter-spacing: 0.05em;
|
|
|
269
278
|
|
|
270
279
|
&[aria-selected="true"] {
|
|
271
280
|
background-color: var(--_bg-selected);
|
|
272
|
-
font-weight: var(--#{sys.$prefix}
|
|
281
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
|
|
273
282
|
}
|
|
274
283
|
|
|
275
284
|
&[aria-selected="true"]:hover:not([data-disabled]),
|
|
@@ -316,7 +325,7 @@ $_label-letter-spacing: 0.05em;
|
|
|
316
325
|
padding: var(--#{sys.$prefix}spacing-xs) var(--#{sys.$prefix}spacing-sm);
|
|
317
326
|
padding-bottom: var(--#{sys.$prefix}spacing-xxs);
|
|
318
327
|
font-size: var(--#{sys.$prefix}typography-size-xs);
|
|
319
|
-
font-weight: var(--#{sys.$prefix}
|
|
328
|
+
font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
|
|
320
329
|
color: var(--#{sys.$prefix}color-fg-muted);
|
|
321
330
|
text-transform: uppercase;
|
|
322
331
|
letter-spacing: $_label-letter-spacing;
|