@tangible/ui 0.0.6 → 0.0.8
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/components/Accordion/Accordion.js +11 -3
- package/components/Avatar/Avatar.js +4 -3
- package/components/Avatar/AvatarGroup.js +7 -5
- package/components/Avatar/index.d.ts +2 -2
- package/components/Avatar/index.js +1 -1
- package/components/Avatar/types.d.ts +27 -0
- package/components/Avatar/types.js +8 -0
- package/components/Button/Button.js +4 -2
- package/components/Button/index.d.ts +2 -1
- package/components/Button/index.js +1 -0
- package/components/Button/types.d.ts +10 -0
- package/components/Button/types.js +3 -1
- package/components/Checkbox/Checkbox.js +46 -11
- package/components/Checkbox/types.d.ts +9 -0
- package/components/Combobox/Combobox.d.ts +1 -1
- package/components/Combobox/Combobox.js +28 -7
- package/components/Combobox/index.d.ts +2 -1
- package/components/Combobox/index.js +1 -0
- package/components/Combobox/types.d.ts +14 -0
- package/components/Combobox/types.js +3 -1
- package/components/Dropdown/Dropdown.js +16 -4
- package/components/Field/Field.d.ts +4 -1
- package/components/Field/Field.js +38 -7
- package/components/Field/FieldContext.d.ts +18 -0
- package/components/Field/FieldContext.js +3 -0
- package/components/Field/index.d.ts +2 -1
- package/components/Field/index.js +1 -0
- package/components/MoveHandle/MoveHandle.js +1 -1
- package/components/MoveHandle/types.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.js +37 -19
- package/components/MultiSelect/index.d.ts +2 -1
- package/components/MultiSelect/index.js +1 -0
- package/components/MultiSelect/types.d.ts +34 -0
- package/components/MultiSelect/types.js +10 -0
- package/components/Pager/Pager.d.ts +7 -1
- package/components/Pager/Pager.js +7 -5
- package/components/Pager/index.d.ts +2 -0
- package/components/Pager/index.js +1 -0
- package/components/Pager/types.d.ts +37 -0
- package/components/Pager/types.js +12 -0
- package/components/Radio/Radio.d.ts +4 -0
- package/components/Radio/Radio.js +15 -5
- package/components/Radio/RadioGroup.d.ts +1 -1
- package/components/Radio/RadioGroup.js +2 -2
- package/components/Radio/types.d.ts +10 -0
- package/components/Rating/Rating.d.ts +2 -32
- package/components/Rating/Rating.js +5 -3
- package/components/Rating/index.d.ts +2 -1
- package/components/Rating/index.js +1 -0
- package/components/Rating/types.d.ts +41 -0
- package/components/Rating/types.js +4 -0
- package/components/SegmentedControl/SegmentedControl.js +6 -5
- package/components/SegmentedControl/types.d.ts +17 -5
- package/components/Select/Select.d.ts +1 -0
- package/components/Select/Select.js +109 -77
- package/components/Select/SelectContext.d.ts +4 -16
- package/components/Select/SelectContext.js +5 -35
- package/components/Select/types.d.ts +19 -19
- package/components/Sidebar/Sidebar.js +25 -20
- package/components/StepIndicator/StepIndicator.js +11 -8
- package/components/StepIndicator/index.d.ts +2 -1
- package/components/StepIndicator/index.js +1 -0
- package/components/StepIndicator/types.d.ts +18 -0
- package/components/StepIndicator/types.js +7 -1
- package/components/Switch/Switch.js +28 -14
- package/components/Table/BulkActionsBar.d.ts +4 -1
- package/components/Table/BulkActionsBar.js +5 -4
- package/components/Table/DataTable.d.ts +4 -1
- package/components/Table/DataTable.js +10 -8
- package/components/Table/index.d.ts +3 -0
- package/components/Table/index.js +2 -0
- package/components/Table/types.d.ts +20 -0
- package/components/Table/types.js +11 -0
- package/components/Tabs/Tabs.js +11 -4
- package/components/TextInput/TextInput.js +2 -1
- package/components/TextInput/types.d.ts +7 -1
- package/components/Textarea/Textarea.js +3 -2
- package/components/Textarea/types.d.ts +6 -1
- package/icons/icons.svg +29 -15
- package/icons/lms/index.d.ts +8 -0
- package/icons/lms/index.js +48 -4
- package/icons/manifest.json +112 -0
- package/icons/player/index.js +9 -9
- package/icons/registry.d.ts +28 -0
- package/icons/registry.js +14 -0
- package/icons/system/index.d.ts +20 -0
- package/icons/system/index.js +112 -2
- package/package.json +1 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +426 -136
- package/styles/all.expanded.unlayered.css +426 -136
- package/styles/all.unlayered.css +1 -1
- package/styles/components/input/index.scss +29 -7
- package/styles/system/_constants.scss +1 -1
- package/styles/system/_tokens.scss +1 -0
- package/styles/utilities/_index.scss +14 -4
- package/tui-manifest.json +102 -46
- package/utils/use-roving-group.js +9 -6
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
// --tui-input-border-focus Focus state border color
|
|
14
14
|
// --tui-input-border-invalid Invalid state border color
|
|
15
15
|
// --tui-input-radius Border radius
|
|
16
|
+
// --tui-input-fg-placeholder Placeholder text color
|
|
17
|
+
// --tui-input-bg-readonly Read-only background color
|
|
16
18
|
// --tui-input-accent Accent color (checkboxes, toggles)
|
|
17
19
|
//
|
|
18
20
|
// To override from consuming code:
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
) {
|
|
59
61
|
// Internal tokens — read component API with fallback to primitives
|
|
60
62
|
--_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
|
|
61
|
-
--_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg
|
|
63
|
+
--_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg));
|
|
62
64
|
--_border: var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border));
|
|
63
65
|
--_border-focus: var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base));
|
|
64
66
|
--_border-invalid: var(--#{sys.$prefix}input-border-invalid, var(--#{sys.$prefix}theme-danger-base));
|
|
@@ -79,12 +81,22 @@
|
|
|
79
81
|
transition-timing-function: var(--#{sys.$prefix}motion-timing);
|
|
80
82
|
transition-property: border-color, color, background-color;
|
|
81
83
|
|
|
84
|
+
&::placeholder {
|
|
85
|
+
color: var(--#{sys.$prefix}input-fg-placeholder, var(--#{sys.$prefix}color-fg-muted));
|
|
86
|
+
opacity: 1; // Normalize Firefox which applies its own opacity reduction
|
|
87
|
+
}
|
|
88
|
+
|
|
82
89
|
&:focus-visible {
|
|
83
90
|
--_border: var(--_border-focus);
|
|
84
91
|
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
85
92
|
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
86
93
|
}
|
|
87
94
|
|
|
95
|
+
&[readonly] {
|
|
96
|
+
background-color: var(--#{sys.$prefix}input-bg-readonly, var(--#{sys.$prefix}color-bg));
|
|
97
|
+
cursor: default;
|
|
98
|
+
}
|
|
99
|
+
|
|
88
100
|
&[disabled] {
|
|
89
101
|
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
90
102
|
cursor: not-allowed;
|
|
@@ -110,26 +122,33 @@
|
|
|
110
122
|
// Inline choice (radio/checkbox with label)
|
|
111
123
|
// ---------------------------------------------------------------------------
|
|
112
124
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}inline-choice {
|
|
113
|
-
// Internal tokens
|
|
114
|
-
--_accent: var(--#{sys.$prefix}input-accent, var(--#{sys.$prefix}theme-primary-base));
|
|
115
|
-
|
|
116
125
|
display: flex;
|
|
117
126
|
align-items: center;
|
|
118
127
|
gap: var(--#{sys.$prefix}spacing-xs);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
|
|
130
|
+
// Radio: native appearance with accent-color
|
|
131
|
+
input[type="radio"] {
|
|
132
|
+
--_accent: var(--#{sys.$prefix}input-accent, var(--#{sys.$prefix}theme-primary-base));
|
|
119
133
|
|
|
120
|
-
input[type="radio"],
|
|
121
|
-
input[type="checkbox"] {
|
|
122
134
|
font-size: 1.15em;
|
|
123
135
|
width: 1em;
|
|
124
136
|
height: 1em;
|
|
125
137
|
flex: 0 0 1em;
|
|
126
138
|
margin: 0;
|
|
127
139
|
|
|
140
|
+
&:focus-visible {
|
|
141
|
+
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
142
|
+
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
143
|
+
}
|
|
144
|
+
|
|
128
145
|
&:checked {
|
|
129
146
|
accent-color: var(--_accent);
|
|
130
147
|
}
|
|
131
148
|
}
|
|
132
149
|
|
|
150
|
+
// Checkbox: fully handled by Checkbox/styles.scss (appearance, sizing, states).
|
|
151
|
+
|
|
133
152
|
label {
|
|
134
153
|
font-weight: unset;
|
|
135
154
|
line-height: 1.25em;
|
|
@@ -140,6 +159,9 @@
|
|
|
140
159
|
// ---------------------------------------------------------------------------
|
|
141
160
|
// Toggle switch
|
|
142
161
|
// ---------------------------------------------------------------------------
|
|
162
|
+
// The base checkbox rule (Checkbox/styles.scss) applies appearance: none and
|
|
163
|
+
// visual properties to ALL checkboxes. The toggle's checkbox is visually hidden
|
|
164
|
+
// via clip/position — those properties are inert on a clipped element.
|
|
143
165
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}toggle {
|
|
144
166
|
// Internal tokens
|
|
145
167
|
--_accent: var(--#{sys.$prefix}input-accent, var(--#{sys.$prefix}theme-primary-base));
|
|
@@ -216,7 +238,7 @@
|
|
|
216
238
|
:where(.#{sys.$prefix}interface) input[type="file"] {
|
|
217
239
|
// Internal tokens
|
|
218
240
|
--_bg: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
|
|
219
|
-
--_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg
|
|
241
|
+
--_fg: var(--#{sys.$prefix}input-fg, var(--#{sys.$prefix}color-fg));
|
|
220
242
|
--_border: var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border));
|
|
221
243
|
--_radius: var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md));
|
|
222
244
|
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
$prefix: tui- !default;
|
|
9
9
|
$container-name: tuiContainer !default;
|
|
10
|
-
$radius: (xs: 2px, sm: 4px, md: 8px, lg: 12px) !default;
|
|
10
|
+
$radius: (xs: 2px, sm: 4px, md: 8px, lg: 12px, full: 9999px) !default;
|
|
11
11
|
$space : (1: .25rem, 2: .5rem, 3: .75rem, 4: 1rem) !default;
|
|
12
12
|
$font : (base-size: 16px, line: 1.5) !default;
|
|
@@ -209,19 +209,29 @@
|
|
|
209
209
|
.is-place-center { place-items: center; }
|
|
210
210
|
.is-place-end { place-items: end; }
|
|
211
211
|
|
|
212
|
-
// Lists as layout containers
|
|
213
|
-
|
|
212
|
+
// Lists as layout containers — strip list chrome but leave margin alone
|
|
213
|
+
// so spacing utilities (tui-margin-block-end-lg etc.) can still win.
|
|
214
|
+
ul.#{sys.$prefix}grid,
|
|
214
215
|
ul.#{sys.$prefix}stack,
|
|
215
216
|
ul.#{sys.$prefix}inline-flex,
|
|
216
|
-
ul.#{sys.$prefix}flex { list-style: none !important; padding: 0 !important;
|
|
217
|
+
ul.#{sys.$prefix}flex { list-style: none !important; padding-inline-start: 0 !important; }
|
|
217
218
|
|
|
218
|
-
ul.#{sys.$prefix}grid > li,
|
|
219
|
+
ul.#{sys.$prefix}grid > li,
|
|
219
220
|
ul.#{sys.$prefix}stack > li,
|
|
220
221
|
ul.#{sys.$prefix}inline-flex > li,
|
|
221
222
|
ul.#{sys.$prefix}flex > li {
|
|
222
223
|
list-style: none !important;
|
|
223
224
|
}
|
|
224
225
|
|
|
226
|
+
// Opt-in full list reset — use when you want zero margin/padding on a list
|
|
227
|
+
.#{sys.$prefix}list-reset {
|
|
228
|
+
list-style: none !important;
|
|
229
|
+
padding: 0 !important;
|
|
230
|
+
margin: 0 !important;
|
|
231
|
+
|
|
232
|
+
> li { list-style: none !important; }
|
|
233
|
+
}
|
|
234
|
+
|
|
225
235
|
// ---------------------------
|
|
226
236
|
// Density utilities (aliases)
|
|
227
237
|
// Applies to BOTH grid and flex via shared custom props.
|
package/tui-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
3
|
-
"generated": "2026-03-
|
|
2
|
+
"version": "0.0.8",
|
|
3
|
+
"generated": "2026-03-17T20:49:24.034Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Accordion": {
|
|
6
6
|
"props": {
|
|
@@ -140,6 +140,11 @@
|
|
|
140
140
|
"required": false,
|
|
141
141
|
"description": "When true, wraps the avatar with a Tooltip showing the `name`.\nHelps sighted users discover the user's name on hover/focus.\nHas no effect when `name` is not provided."
|
|
142
142
|
},
|
|
143
|
+
"labels": {
|
|
144
|
+
"type": "AvatarLabels",
|
|
145
|
+
"required": false,
|
|
146
|
+
"description": "Overridable strings for i18n."
|
|
147
|
+
},
|
|
143
148
|
"className": {
|
|
144
149
|
"type": "string",
|
|
145
150
|
"required": false,
|
|
@@ -230,6 +235,11 @@
|
|
|
230
235
|
"defaultValue": "`${label}, loading` (English)",
|
|
231
236
|
"description": "Accessible label override during loading state. For i18n support.\nWhen loading, this replaces the auto-composed label."
|
|
232
237
|
},
|
|
238
|
+
"labels": {
|
|
239
|
+
"type": "ButtonLabels",
|
|
240
|
+
"required": false,
|
|
241
|
+
"description": "Override default English strings for i18n.\nCovers strings not already handled by existing props (e.g. `loadingLabel`)."
|
|
242
|
+
},
|
|
233
243
|
"target": {
|
|
234
244
|
"type": "HTMLAttributeAnchorTarget",
|
|
235
245
|
"required": false,
|
|
@@ -428,6 +438,7 @@
|
|
|
428
438
|
"cssTokens": [
|
|
429
439
|
"--tui-card-bg",
|
|
430
440
|
"--tui-card-border",
|
|
441
|
+
"--tui-card-border-width",
|
|
431
442
|
"--tui-card-border-interact",
|
|
432
443
|
"--tui-card-radius",
|
|
433
444
|
"--tui-card-shadow",
|
|
@@ -520,17 +531,26 @@
|
|
|
520
531
|
},
|
|
521
532
|
"label": {
|
|
522
533
|
"type": "ReactNode",
|
|
523
|
-
"required": false
|
|
534
|
+
"required": false,
|
|
535
|
+
"description": "When provided, renders the checkbox inside a `<label>` with this content.\nWhen omitted, renders a bare `<input>` — you must provide an accessible name\nvia `aria-label`, `aria-labelledby`, or a wrapping `Field.Control` + `Field.Label`.\n@remarks When used inside `Field.Control`, `Field.Label` injects `aria-labelledby`\nonto the input. If both `label` and `Field.Label` are present, AT may concatenate\nboth names. Prefer one labelling mechanism — either `label` prop or `Field.Label`."
|
|
524
536
|
}
|
|
525
537
|
},
|
|
526
538
|
"cssTokens": [
|
|
527
|
-
"--tui-
|
|
539
|
+
"--tui-checkbox-accent",
|
|
540
|
+
"--tui-checkbox-border",
|
|
541
|
+
"--tui-checkbox-border-invalid",
|
|
542
|
+
"--tui-checkbox-radius",
|
|
543
|
+
"--tui-checkbox-bg",
|
|
544
|
+
"--tui-checkbox-size",
|
|
545
|
+
"--tui-checkbox-gap",
|
|
546
|
+
"--tui-checkbox-label-color"
|
|
528
547
|
],
|
|
529
548
|
"story": {
|
|
530
549
|
"title": "Forms/Checkbox",
|
|
531
550
|
"tags": [
|
|
532
551
|
"autodocs",
|
|
533
|
-
"lms"
|
|
552
|
+
"lms",
|
|
553
|
+
"a11y"
|
|
534
554
|
]
|
|
535
555
|
},
|
|
536
556
|
"subcomponents": null,
|
|
@@ -829,10 +849,21 @@
|
|
|
829
849
|
"defaultValue": "true",
|
|
830
850
|
"description": "Whether to open the listbox when the input receives focus."
|
|
831
851
|
},
|
|
852
|
+
"clearable": {
|
|
853
|
+
"type": "boolean",
|
|
854
|
+
"required": false,
|
|
855
|
+
"defaultValue": "true",
|
|
856
|
+
"description": "Whether to show the clear button when a value is present."
|
|
857
|
+
},
|
|
832
858
|
"inputClassName": {
|
|
833
859
|
"type": "string",
|
|
834
860
|
"required": false,
|
|
835
861
|
"description": "Class name applied directly to the `<input>` element.\nUse for utilities like `tui-input-reset` that must target the input itself."
|
|
862
|
+
},
|
|
863
|
+
"labels": {
|
|
864
|
+
"type": "ComboboxLabels",
|
|
865
|
+
"required": false,
|
|
866
|
+
"description": "Override default English strings for i18n."
|
|
836
867
|
}
|
|
837
868
|
},
|
|
838
869
|
"cssTokens": [
|
|
@@ -852,6 +883,7 @@
|
|
|
852
883
|
"story": {
|
|
853
884
|
"title": "Forms/Combobox",
|
|
854
885
|
"tags": [
|
|
886
|
+
"stable",
|
|
855
887
|
"lms"
|
|
856
888
|
]
|
|
857
889
|
},
|
|
@@ -961,33 +993,7 @@
|
|
|
961
993
|
"notFor": null
|
|
962
994
|
},
|
|
963
995
|
"Field": {
|
|
964
|
-
"props": {
|
|
965
|
-
"error": {
|
|
966
|
-
"type": "boolean",
|
|
967
|
-
"required": false,
|
|
968
|
-
"description": "Whether the field has an error state"
|
|
969
|
-
},
|
|
970
|
-
"required": {
|
|
971
|
-
"type": "boolean",
|
|
972
|
-
"required": false,
|
|
973
|
-
"description": "Whether the field is required"
|
|
974
|
-
},
|
|
975
|
-
"disabled": {
|
|
976
|
-
"type": "boolean",
|
|
977
|
-
"required": false,
|
|
978
|
-
"description": "Whether the field is disabled"
|
|
979
|
-
},
|
|
980
|
-
"inline": {
|
|
981
|
-
"type": "boolean",
|
|
982
|
-
"required": false,
|
|
983
|
-
"description": "Inline layout: label and control on same row"
|
|
984
|
-
},
|
|
985
|
-
"className": {
|
|
986
|
-
"type": "string",
|
|
987
|
-
"required": false,
|
|
988
|
-
"description": "Additional class name for the field wrapper"
|
|
989
|
-
}
|
|
990
|
-
},
|
|
996
|
+
"props": {},
|
|
991
997
|
"cssTokens": [
|
|
992
998
|
"--tui-field-gap",
|
|
993
999
|
"--tui-field-label-fg",
|
|
@@ -1278,7 +1284,7 @@
|
|
|
1278
1284
|
"type": "\"sm\" | \"md\"",
|
|
1279
1285
|
"required": false,
|
|
1280
1286
|
"defaultValue": "md",
|
|
1281
|
-
"description": "Component scale. sm = 32px, md = 40px.
|
|
1287
|
+
"description": "Component scale. Full mode: sm = 32px, md = 40px. Handle mode: sm = 24px, md = 32px."
|
|
1282
1288
|
},
|
|
1283
1289
|
"index": {
|
|
1284
1290
|
"type": "number",
|
|
@@ -1389,6 +1395,11 @@
|
|
|
1389
1395
|
"required": false,
|
|
1390
1396
|
"description": "Maximum number of selections allowed.\nWhen reached, unselected options become disabled."
|
|
1391
1397
|
},
|
|
1398
|
+
"labels": {
|
|
1399
|
+
"type": "MultiSelectLabels",
|
|
1400
|
+
"required": false,
|
|
1401
|
+
"description": "Override internal display and screen reader strings for i18n.\nAll keys are optional — omitted keys use English defaults."
|
|
1402
|
+
},
|
|
1392
1403
|
"id": {
|
|
1393
1404
|
"type": "string",
|
|
1394
1405
|
"required": false,
|
|
@@ -1415,6 +1426,7 @@
|
|
|
1415
1426
|
"title": "Forms/MultiSelect",
|
|
1416
1427
|
"tags": [
|
|
1417
1428
|
"autodocs",
|
|
1429
|
+
"stable",
|
|
1418
1430
|
"lms"
|
|
1419
1431
|
]
|
|
1420
1432
|
},
|
|
@@ -1691,6 +1703,11 @@
|
|
|
1691
1703
|
"type": "string",
|
|
1692
1704
|
"required": false,
|
|
1693
1705
|
"description": "Additional class name"
|
|
1706
|
+
},
|
|
1707
|
+
"labels": {
|
|
1708
|
+
"type": "PagerLabels",
|
|
1709
|
+
"required": false,
|
|
1710
|
+
"description": "Overridable label strings for i18n.\nAll keys are optional — defaults are English."
|
|
1694
1711
|
}
|
|
1695
1712
|
},
|
|
1696
1713
|
"cssTokens": [
|
|
@@ -1824,6 +1841,11 @@
|
|
|
1824
1841
|
"type": "ReactNode",
|
|
1825
1842
|
"required": false
|
|
1826
1843
|
},
|
|
1844
|
+
"description": {
|
|
1845
|
+
"type": "string",
|
|
1846
|
+
"required": false,
|
|
1847
|
+
"description": "Description text displayed below the label."
|
|
1848
|
+
},
|
|
1827
1849
|
"disabled": {
|
|
1828
1850
|
"type": "boolean",
|
|
1829
1851
|
"required": false,
|
|
@@ -1835,7 +1857,15 @@
|
|
|
1835
1857
|
}
|
|
1836
1858
|
},
|
|
1837
1859
|
"cssTokens": [
|
|
1838
|
-
"--tui-radio-accent"
|
|
1860
|
+
"--tui-radio-accent",
|
|
1861
|
+
"--tui-radio-size",
|
|
1862
|
+
"--tui-radio-border",
|
|
1863
|
+
"--tui-radio-bg",
|
|
1864
|
+
"--tui-radio-gap",
|
|
1865
|
+
"--tui-radio-font-size",
|
|
1866
|
+
"--tui-radio-label-color",
|
|
1867
|
+
"--tui-radio-description-color",
|
|
1868
|
+
"--tui-radio-group-gap"
|
|
1839
1869
|
],
|
|
1840
1870
|
"story": {
|
|
1841
1871
|
"title": "Forms/RadioGroup",
|
|
@@ -1910,6 +1940,11 @@
|
|
|
1910
1940
|
"type": "string",
|
|
1911
1941
|
"required": false,
|
|
1912
1942
|
"description": "Gap override (e.g. '0.25rem') – otherwise uses density utilities"
|
|
1943
|
+
},
|
|
1944
|
+
"labels": {
|
|
1945
|
+
"type": "RatingLabels",
|
|
1946
|
+
"required": false,
|
|
1947
|
+
"description": "Override default English strings for i18n."
|
|
1913
1948
|
}
|
|
1914
1949
|
},
|
|
1915
1950
|
"cssTokens": [
|
|
@@ -1950,7 +1985,7 @@
|
|
|
1950
1985
|
"description": "Visual style"
|
|
1951
1986
|
},
|
|
1952
1987
|
"size": {
|
|
1953
|
-
"type": "\"sm\" | \"md\"",
|
|
1988
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
1954
1989
|
"required": false,
|
|
1955
1990
|
"description": "Size scale"
|
|
1956
1991
|
},
|
|
@@ -1964,6 +1999,11 @@
|
|
|
1964
1999
|
"required": false,
|
|
1965
2000
|
"description": "Whether arrow keys wrap around"
|
|
1966
2001
|
},
|
|
2002
|
+
"wrap": {
|
|
2003
|
+
"type": "boolean",
|
|
2004
|
+
"required": false,
|
|
2005
|
+
"description": "Allow items to wrap to multiple lines (default: false)"
|
|
2006
|
+
},
|
|
1967
2007
|
"disabled": {
|
|
1968
2008
|
"type": "boolean",
|
|
1969
2009
|
"required": false,
|
|
@@ -1985,13 +2025,16 @@
|
|
|
1985
2025
|
"--tui-segmented-item-radius",
|
|
1986
2026
|
"--tui-segmented-item-fg",
|
|
1987
2027
|
"--tui-segmented-item-bg-active",
|
|
1988
|
-
"--tui-segmented-item-fg-active"
|
|
2028
|
+
"--tui-segmented-item-fg-active",
|
|
2029
|
+
"--tui-segmented-indicator",
|
|
2030
|
+
"--tui-segmented-indicator-size"
|
|
1989
2031
|
],
|
|
1990
2032
|
"story": {
|
|
1991
2033
|
"title": "Components/SegmentedControl",
|
|
1992
2034
|
"tags": [
|
|
1993
2035
|
"autodocs",
|
|
1994
|
-
"stable"
|
|
2036
|
+
"stable",
|
|
2037
|
+
"a11y"
|
|
1995
2038
|
]
|
|
1996
2039
|
},
|
|
1997
2040
|
"subcomponents": [
|
|
@@ -2114,7 +2157,8 @@
|
|
|
2114
2157
|
"title": "Forms/Select",
|
|
2115
2158
|
"tags": [
|
|
2116
2159
|
"autodocs",
|
|
2117
|
-
"lms"
|
|
2160
|
+
"lms",
|
|
2161
|
+
"stable"
|
|
2118
2162
|
]
|
|
2119
2163
|
},
|
|
2120
2164
|
"subcomponents": null,
|
|
@@ -2222,6 +2266,11 @@
|
|
|
2222
2266
|
"type": "string",
|
|
2223
2267
|
"required": false,
|
|
2224
2268
|
"description": "Additional CSS class names."
|
|
2269
|
+
},
|
|
2270
|
+
"labels": {
|
|
2271
|
+
"type": "StepIndicatorLabels",
|
|
2272
|
+
"required": false,
|
|
2273
|
+
"description": "Override default English strings for i18n.\nCovers status display names and the aria-label template."
|
|
2225
2274
|
}
|
|
2226
2275
|
},
|
|
2227
2276
|
"cssTokens": [],
|
|
@@ -2331,7 +2380,14 @@
|
|
|
2331
2380
|
},
|
|
2332
2381
|
"cssTokens": [
|
|
2333
2382
|
"--tui-switch-accent",
|
|
2334
|
-
"--tui-switch-
|
|
2383
|
+
"--tui-switch-bg",
|
|
2384
|
+
"--tui-switch-border",
|
|
2385
|
+
"--tui-switch-thumb-bg",
|
|
2386
|
+
"--tui-switch-track-height",
|
|
2387
|
+
"--tui-switch-size",
|
|
2388
|
+
"--tui-switch-label-color",
|
|
2389
|
+
"--tui-switch-font-size",
|
|
2390
|
+
"--tui-switch-gap"
|
|
2335
2391
|
],
|
|
2336
2392
|
"story": {
|
|
2337
2393
|
"title": "Forms/Switch",
|
|
@@ -2496,13 +2552,13 @@
|
|
|
2496
2552
|
"type": "\"none\" | \"vertical\" | \"horizontal\" | \"both\"",
|
|
2497
2553
|
"required": false,
|
|
2498
2554
|
"defaultValue": "vertical",
|
|
2499
|
-
"description": "Resize behaviour.\nIgnored when `autoResize` is true (resize is disabled to avoid conflict)."
|
|
2555
|
+
"description": "Resize behaviour.\nIgnored when `autoResize` is true (resize is disabled to avoid conflict).\nTakes precedence over `style.resize` when both are provided."
|
|
2500
2556
|
},
|
|
2501
2557
|
"autoResize": {
|
|
2502
2558
|
"type": "boolean",
|
|
2503
2559
|
"required": false,
|
|
2504
2560
|
"defaultValue": "false",
|
|
2505
|
-
"description": "Automatically grow height to fit content.\nDisables manual resize and scrollbar."
|
|
2561
|
+
"description": "Automatically grow height to fit content.\nDisables manual resize and sets `overflow: hidden`.\n\n**Warning:** If you apply an external `max-height` via CSS or `style`,\ncontent beyond that height will be clipped with no scrollbar.\nIn that case, add `overflow-y: auto` to restore scrolling."
|
|
2506
2562
|
}
|
|
2507
2563
|
},
|
|
2508
2564
|
"cssTokens": [],
|
|
@@ -2576,12 +2632,12 @@
|
|
|
2576
2632
|
"suffix": {
|
|
2577
2633
|
"type": "ReactNode",
|
|
2578
2634
|
"required": false,
|
|
2579
|
-
"description": "Content to render after the input (icon, button)."
|
|
2635
|
+
"description": "Content to render after the input (icon, button).\n@remarks String addons (e.g. \"USD\", \".com\") are not part of the input's\naccessible name. Use `aria-label` on the input to provide full context."
|
|
2580
2636
|
},
|
|
2581
2637
|
"inputClassName": {
|
|
2582
2638
|
"type": "string",
|
|
2583
2639
|
"required": false,
|
|
2584
|
-
"description": "Class name applied directly to the `<input>` element.\nUse for utilities like `tui-input-reset` that must target the input itself."
|
|
2640
|
+
"description": "Class name applied directly to the `<input>` element.\nUse for utilities like `tui-input-reset` (removes browser-native search\ndecoration, clear buttons, and spinners) that must target the input itself."
|
|
2585
2641
|
}
|
|
2586
2642
|
},
|
|
2587
2643
|
"cssTokens": [
|
|
@@ -2875,12 +2931,12 @@
|
|
|
2875
2931
|
"icons": {
|
|
2876
2932
|
"sets": {
|
|
2877
2933
|
"cred": 12,
|
|
2878
|
-
"lms":
|
|
2934
|
+
"lms": 11,
|
|
2879
2935
|
"player": 24,
|
|
2880
2936
|
"reaction": 36,
|
|
2881
|
-
"system":
|
|
2937
|
+
"system": 86
|
|
2882
2938
|
},
|
|
2883
|
-
"total":
|
|
2939
|
+
"total": 169,
|
|
2884
2940
|
"manifest": "./icons/manifest.json"
|
|
2885
2941
|
}
|
|
2886
2942
|
}
|
|
@@ -52,11 +52,15 @@ export function useRovingGroup({ selectedValue, onSelect, disabled = false, loop
|
|
|
52
52
|
const items = getOrderedItems().filter((item) => !item.disabled && !disabled);
|
|
53
53
|
if (items.length === 0)
|
|
54
54
|
return;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (
|
|
59
|
-
|
|
55
|
+
// Only handle keys when a registered item has focus — don't hijack
|
|
56
|
+
// arrow keys from nested interactive controls (e.g. number inputs).
|
|
57
|
+
const target = event.target;
|
|
58
|
+
if (!items.some((item) => item.element === target))
|
|
59
|
+
return;
|
|
60
|
+
// Navigate from the focused item, not the selected value — these can
|
|
61
|
+
// differ when there's no selection or when focus moved without selecting.
|
|
62
|
+
const focusedIndex = items.findIndex((item) => item.element === target);
|
|
63
|
+
const currentIndex = focusedIndex !== -1 ? focusedIndex : 0;
|
|
60
64
|
// Determine which keys map to next/prev
|
|
61
65
|
let nextKeys;
|
|
62
66
|
let prevKeys;
|
|
@@ -107,7 +111,6 @@ export function useRovingGroup({ selectedValue, onSelect, disabled = false, loop
|
|
|
107
111
|
}, [
|
|
108
112
|
getOrderedItems,
|
|
109
113
|
disabled,
|
|
110
|
-
selectedValue,
|
|
111
114
|
orientationKeyboard,
|
|
112
115
|
orientation,
|
|
113
116
|
loop,
|