@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.
Files changed (73) hide show
  1. package/README.md +2 -2
  2. package/components/Avatar/Avatar.js +20 -5
  3. package/components/Avatar/types.d.ts +15 -0
  4. package/components/Button/Button.js +10 -3
  5. package/components/Button/types.d.ts +31 -3
  6. package/components/Button/types.js +2 -0
  7. package/components/ColorPicker/ColorField.d.ts +1 -1
  8. package/components/ColorPicker/ColorField.js +9 -1
  9. package/components/DatePicker/DateRangePicker.d.ts +1 -0
  10. package/components/DatePicker/DateRangePicker.js +24 -6
  11. package/components/DatePicker/PickerTrigger.js +1 -1
  12. package/components/DatePicker/types.d.ts +20 -3
  13. package/components/DatePicker/types.js +1 -0
  14. package/components/IconButton/IconButtonCore.js +13 -5
  15. package/components/IconButton/index.d.ts +2 -1
  16. package/components/IconButton/index.js +1 -0
  17. package/components/IconButton/types.d.ts +37 -2
  18. package/components/IconButton/types.js +4 -1
  19. package/components/MultiSelect/MultiSelect.js +9 -3
  20. package/components/NavMenu/NavMenu.js +37 -3
  21. package/components/Notice/Notice.d.ts +13 -0
  22. package/components/Notice/Notice.js +10 -2
  23. package/components/Progress/Progress.js +73 -2
  24. package/components/Progress/index.d.ts +2 -1
  25. package/components/Progress/index.js +1 -0
  26. package/components/Progress/types.d.ts +130 -2
  27. package/components/Progress/types.js +3 -1
  28. package/components/Select/Select.js +2 -1
  29. package/components/Tooltip/Tooltip.js +23 -0
  30. package/components/index.d.ts +28 -26
  31. package/components/index.js +10 -10
  32. package/figma-tokens.json +1 -1
  33. package/icons/icons.svg +15 -5
  34. package/icons/lms/index.d.ts +7 -4
  35. package/icons/lms/index.js +9 -44
  36. package/icons/lms.svg +4 -4
  37. package/icons/manifest.json +96 -12
  38. package/icons/registry.d.ts +20 -0
  39. package/icons/registry.js +11 -0
  40. package/icons/searchsync/index.d.ts +21 -0
  41. package/icons/searchsync/index.js +82 -0
  42. package/icons/searchsync.svg +9 -0
  43. package/icons/sprite-registry.js +10 -0
  44. package/icons/sprite-version.js +1 -1
  45. package/icons/sprite.d.ts +1 -1
  46. package/icons/sprite.js +2 -1
  47. package/icons/sprite.php +3 -2
  48. package/icons/system/index.d.ts +6 -0
  49. package/icons/system/index.js +33 -0
  50. package/icons/system.svg +3 -0
  51. package/package.json +1 -1
  52. package/skills/building-with-tui/SKILL.md +81 -30
  53. package/styles/all.css +1 -1
  54. package/styles/all.expanded.css +221 -64
  55. package/styles/all.expanded.unlayered.css +221 -64
  56. package/styles/all.unlayered.css +1 -1
  57. package/styles/app.css +2 -0
  58. package/styles/components/button.scss +18 -0
  59. package/styles/components/checkbox.scss +21 -13
  60. package/styles/components/icon-button.scss +44 -25
  61. package/styles/components/nav-menu.scss +3 -0
  62. package/styles/components/notice.scss +38 -0
  63. package/styles/components/progress.scss +96 -0
  64. package/styles/components/radio.scss +35 -7
  65. package/styles/components/segmented-control.scss +98 -18
  66. package/styles/components/table.scss +39 -24
  67. package/tui-manifest.json +151 -39
  68. package/utils/portal.d.ts +4 -3
  69. package/utils/portal.js +16 -2
  70. package/utils/use-loading-announcer.d.ts +2 -0
  71. package/utils/use-loading-announcer.js +101 -0
  72. package/vanilla/styles.css +1 -1
  73. package/vanilla/styles.unlayered.css +1 -1
package/tui-manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.2.38",
3
- "generated": "2026-11-19T20:46:48.988Z",
2
+ "version": "0.2.40",
3
+ "generated": "2026-11-20T21:20:14.273Z",
4
4
  "components": {
5
5
  "Accordion": {
6
6
  "props": {
@@ -154,6 +154,12 @@
154
154
  "required": false,
155
155
  "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."
156
156
  },
157
+ "decorative": {
158
+ "type": "boolean",
159
+ "required": false,
160
+ "defaultValue": "false",
161
+ "description": "Hide the avatar from assistive tech while keeping its picture, initials\nand color. Use it when the person is already named in visible text\nbeside the avatar, e.g. an account-menu button holding an avatar and an\nemail: without it, the avatar's `role=\"img\"` name is concatenated into\nthe button's accessible name.\n\nRenders `aria-hidden=\"true\"` with no `role` and no `aria-label`. `name`\nstill drives the initials and color. `tooltip` is ignored, and\n`indicatorLabel` is never announced (a dev warning fires), so put any\nstatus in the visible text too."
162
+ },
157
163
  "labels": {
158
164
  "type": "AvatarLabels",
159
165
  "required": false,
@@ -187,7 +193,9 @@
187
193
  "stable"
188
194
  ]
189
195
  },
190
- "subcomponents": null,
196
+ "subcomponents": [
197
+ "Group"
198
+ ],
191
199
  "description": null,
192
200
  "gotchas": null,
193
201
  "examples": null,
@@ -241,7 +249,7 @@
241
249
  "type": "boolean",
242
250
  "required": false,
243
251
  "defaultValue": "false",
244
- "description": "Loading state: shows a spinner and blocks activation while keeping the\nbutton focusable (`aria-disabled`, not native `disabled`), so a\nkeyboard user who triggered it keeps their place. Only `onClick` is\nguarded: put the action there, not in `onKeyDown`/`onPointerDown`.\nThe start and end of loading aren't announced; confirm completion\nthrough your own status message (a Toast, say)."
252
+ "description": "Loading state: shows a spinner and blocks activation while keeping the\nbutton focusable (`aria-disabled`, not native `disabled`), so a\nkeyboard user who triggered it keeps their place. Only `onClick` is\nguarded: put the action there, not in `onKeyDown`/`onPointerDown`.\n\nBy default the start and end of loading aren't announced: the busy\nname (\"Save, loading\") is set on the focused button, which screen\nreaders rarely re-read, and it reverts silently. Opt in with\n`labels={{ loadingStart: 'Saving…', loadingEnd: 'Saved' }}` to speak\neach transition through a pre-mounted polite live region (portaled, so\nit never becomes a DOM sibling of the button). If the button unmounts\nwhen the action completes (a dialog closing), the end can't be spoken\nfrom here: confirm through your own status message (a Toast).\n\nWith `loadingStart`, don't set `aria-busy` on an ancestor of the\nbutton: NVDA and Chromium hold live-region output under a busy ancestor.\nTest with a screen reader: some also re-read the busy name (\"Save,\nloading\"), which can double up with `loadingStart`.\n\nWhile loading, the button stays focusable, so it mutes its colors rather\nthan dimming the whole element: the focus ring keeps full contrast."
245
253
  },
246
254
  "loadingLabel": {
247
255
  "type": "string",
@@ -252,7 +260,7 @@
252
260
  "labels": {
253
261
  "type": "ButtonLabels",
254
262
  "required": false,
255
- "description": "Override default English strings for i18n.\nCovers strings not already handled by existing props (e.g. `loadingLabel`)."
263
+ "description": "Override default English strings for i18n, and opt in to loading\nannouncements (`loadingStart` / `loadingEnd`, empty by default).\nCovers strings not already handled by existing props (e.g. `loadingLabel`)."
256
264
  },
257
265
  "target": {
258
266
  "type": "HTMLAttributeAnchorTarget",
@@ -484,6 +492,7 @@
484
492
  "Head",
485
493
  "Body",
486
494
  "Foot",
495
+ "Media",
487
496
  "Link"
488
497
  ],
489
498
  "description": "Content container with semantic structure and optional inline layout",
@@ -571,7 +580,8 @@
571
580
  "--tui-checkbox-bg",
572
581
  "--tui-checkbox-size",
573
582
  "--tui-checkbox-gap",
574
- "--tui-checkbox-label-color"
583
+ "--tui-checkbox-label-color",
584
+ "--tui-checkbox-fg-disabled"
575
585
  ],
576
586
  "story": {
577
587
  "title": "Forms/Checkbox",
@@ -1033,7 +1043,12 @@
1033
1043
  "lms"
1034
1044
  ]
1035
1045
  },
1036
- "subcomponents": null,
1046
+ "subcomponents": [
1047
+ "Content",
1048
+ "Option",
1049
+ "Group",
1050
+ "Label"
1051
+ ],
1037
1052
  "description": null,
1038
1053
  "gotchas": null,
1039
1054
  "examples": null,
@@ -1187,6 +1202,9 @@
1187
1202
  "--tui-table-border",
1188
1203
  "--tui-table-bg",
1189
1204
  "--tui-table-bg-head",
1205
+ "--tui-table-font-size",
1206
+ "--tui-table-head-transform",
1207
+ "--tui-table-head-tracking",
1190
1208
  "--tui-table-fg",
1191
1209
  "--tui-table-padding",
1192
1210
  "--tui-table-selected-bg",
@@ -1264,7 +1282,7 @@
1264
1282
  "children": {
1265
1283
  "type": "ReactNode",
1266
1284
  "required": false,
1267
- "description": "Trigger placement. Omit and the picker renders its own input-group button,\nexactly as before. Provide children to place the trigger yourself — inside\na text field's suffix slot, a toolbar — with `<DatePicker.Trigger>` marking\nthe spot, and `asChild` on that Trigger to supply your own element:\n\n```tsx\n<DatePicker value={date} onChange={commit}>\n <TextInput\n value={text}\n onChange={(e) => setText(e.target.value)}\n suffix={\n <DatePicker.Trigger asChild>\n <IconButton icon=\"lms/calendar\" label=\"Pick a date\" />\n </DatePicker.Trigger>\n }\n />\n</DatePicker>\n```\n\nChildren with no Trigger among them leaves the picker unopenable; a dev\nwarning fires for that case."
1285
+ "description": "Trigger placement. Omit and the picker renders its own input-group button,\nexactly as before. Provide children to place the trigger yourself — inside\na text field's suffix slot, a toolbar — with `<DatePicker.Trigger>` marking\nthe spot, and `asChild` on that Trigger to supply your own element:\n\n```tsx\n<DatePicker value={date} onChange={commit}>\n <TextInput\n value={text}\n onChange={(e) => setText(e.target.value)}\n suffix={\n <DatePicker.Trigger asChild>\n <IconButton icon=\"system/calendar\" label=\"Pick a date\" />\n </DatePicker.Trigger>\n }\n />\n</DatePicker>\n```\n\nChildren with no Trigger among them leaves the picker unopenable; a dev\nwarning fires for that case."
1268
1286
  },
1269
1287
  "className": {
1270
1288
  "type": "string",
@@ -1291,7 +1309,9 @@
1291
1309
  "autodocs"
1292
1310
  ]
1293
1311
  },
1294
- "subcomponents": null,
1312
+ "subcomponents": [
1313
+ "Trigger"
1314
+ ],
1295
1315
  "description": null,
1296
1316
  "gotchas": null,
1297
1317
  "examples": null,
@@ -1334,7 +1354,13 @@
1334
1354
  "stable"
1335
1355
  ]
1336
1356
  },
1337
- "subcomponents": null,
1357
+ "subcomponents": [
1358
+ "Trigger",
1359
+ "Content",
1360
+ "Item",
1361
+ "Separator",
1362
+ "Header"
1363
+ ],
1338
1364
  "description": null,
1339
1365
  "gotchas": null,
1340
1366
  "examples": null,
@@ -1357,7 +1383,12 @@
1357
1383
  "lms"
1358
1384
  ]
1359
1385
  },
1360
- "subcomponents": null,
1386
+ "subcomponents": [
1387
+ "Label",
1388
+ "Control",
1389
+ "HelperText",
1390
+ "Error"
1391
+ ],
1361
1392
  "description": null,
1362
1393
  "gotchas": null,
1363
1394
  "examples": null,
@@ -1530,7 +1561,7 @@
1530
1561
  "loading": {
1531
1562
  "type": "boolean",
1532
1563
  "required": false,
1533
- "description": "Loading state: shows a spinner and blocks activation while keeping the\nbutton focusable (`aria-disabled`, not native `disabled`), so a\nkeyboard user who triggered it keeps their place. Only `onClick` is\nguarded: put the action there, not in `onKeyDown`/`onPointerDown`.\nThe start and end of loading aren't announced; confirm completion\nthrough your own status message (a Toast, say)."
1564
+ "description": "Loading state: shows a spinner and blocks activation while keeping the\nbutton focusable (`aria-disabled`, not native `disabled`), so a\nkeyboard user who triggered it keeps their place. Only `onClick` is\nguarded: put the action there, not in `onKeyDown`/`onPointerDown`.\n\nBy default the start and end of loading aren't announced: the busy\nname (\"Save, loading\") is set on the focused button, which screen\nreaders rarely re-read, and it reverts silently. Opt in with\n`labels={{ loadingStart: 'Saving…', loadingEnd: 'Saved' }}` to speak\neach transition through a pre-mounted polite live region (portaled, so\nit never becomes a DOM sibling of the button). If the button unmounts\nwhen the action completes, the end can't be spoken from here: confirm\nthrough your own status message (a Toast).\n\nWith `loadingStart`, don't set `aria-busy` on an ancestor of the\nbutton: NVDA and Chromium hold live-region output under a busy ancestor.\nTest with a screen reader: some also re-read the busy name (\"Save,\nloading\"), which can double up with `loadingStart`.\n\nWhile loading, the button stays focusable, so it mutes its colors rather\nthan dimming the whole element: the focus ring keeps full contrast."
1534
1565
  },
1535
1566
  "loadingLabel": {
1536
1567
  "type": "string",
@@ -1538,6 +1569,11 @@
1538
1569
  "defaultValue": "`${label}, loading` (English)",
1539
1570
  "description": "Accessible label override during loading state. For i18n support."
1540
1571
  },
1572
+ "labels": {
1573
+ "type": "IconButtonLabels",
1574
+ "required": false,
1575
+ "description": "Override default strings for i18n, and opt in to loading announcements\n(`loadingStart` / `loadingEnd`, empty by default). The button's name is\n`label`; the busy name is `loadingLabel`."
1576
+ },
1541
1577
  "pressed": {
1542
1578
  "type": "boolean",
1543
1579
  "required": false,
@@ -1946,7 +1982,12 @@
1946
1982
  "autodocs"
1947
1983
  ]
1948
1984
  },
1949
- "subcomponents": null,
1985
+ "subcomponents": [
1986
+ "Content",
1987
+ "Option",
1988
+ "Group",
1989
+ "Label"
1990
+ ],
1950
1991
  "description": null,
1951
1992
  "gotchas": null,
1952
1993
  "examples": null,
@@ -2048,7 +2089,13 @@
2048
2089
  "lms"
2049
2090
  ]
2050
2091
  },
2051
- "subcomponents": null,
2092
+ "subcomponents": [
2093
+ "Trigger",
2094
+ "Content",
2095
+ "Option",
2096
+ "Group",
2097
+ "Label"
2098
+ ],
2052
2099
  "description": null,
2053
2100
  "gotchas": null,
2054
2101
  "examples": null,
@@ -2191,7 +2238,11 @@
2191
2238
  "stable"
2192
2239
  ]
2193
2240
  },
2194
- "subcomponents": null,
2241
+ "subcomponents": [
2242
+ "Group",
2243
+ "Item",
2244
+ "Sub"
2245
+ ],
2195
2246
  "description": null,
2196
2247
  "gotchas": null,
2197
2248
  "examples": null,
@@ -2206,6 +2257,12 @@
2206
2257
  "required": false,
2207
2258
  "description": "Inline layout: icon/title on left, content center, actions right"
2208
2259
  },
2260
+ "align": {
2261
+ "type": "\"center\" | \"start\"",
2262
+ "required": false,
2263
+ "defaultValue": "'center'",
2264
+ "description": "Inline layout only: how the Head and Body sit on the row's cross axis.\n`center` (default) centres them; `start` top-aligns them and centres a\nlone Head icon on the Body's first line, for a multi-line Body (a bold\ntitle over a detail line). The Foot stays centred either way.\nPublished as `data-align`, not an is-align class (it would collide with the flex utility).\nIgnored (with a dev warning) without `inline`, and below the 400px\ncontainer width, where inline Notices fall back to stacked. No `end`:\nnothing needs a bottom-aligned row, and `start`'s first-line rule has no\n`end` counterpart."
2265
+ },
2209
2266
  "elevated": {
2210
2267
  "type": "boolean",
2211
2268
  "required": false,
@@ -2429,7 +2486,9 @@
2429
2486
  "stable"
2430
2487
  ]
2431
2488
  },
2432
- "subcomponents": null,
2489
+ "subcomponents": [
2490
+ "Overflow"
2491
+ ],
2433
2492
  "description": null,
2434
2493
  "gotchas": null,
2435
2494
  "examples": null,
@@ -2571,7 +2630,10 @@
2571
2630
  "autodocs"
2572
2631
  ]
2573
2632
  },
2574
- "subcomponents": null,
2633
+ "subcomponents": [
2634
+ "Trigger",
2635
+ "Content"
2636
+ ],
2575
2637
  "description": null,
2576
2638
  "gotchas": null,
2577
2639
  "examples": null,
@@ -2584,7 +2646,7 @@
2584
2646
  "children": {
2585
2647
  "type": "ReactNode",
2586
2648
  "required": false,
2587
- "description": "Custom content to render inside the progress indicator.\n- Line mode with `inside`: Replaces default content inside the bar\n- Circle mode with `inside`: Replaces centered content\n- Segmented mode: Replaces the segment labels area below the bar"
2649
+ "description": "Custom content to render inside the progress indicator.\n- Line mode with `inside`: Replaces default content inside the bar\n- Circle mode with `inside`: Replaces centered content\n- Segmented mode: Replaces the segment labels area below the bar\nNot available in breakdown mode: the legend list is the accessible representation."
2588
2650
  },
2589
2651
  "size": {
2590
2652
  "type": "\"xs\" | \"sm\" | \"md\" | \"lg\"",
@@ -2601,8 +2663,8 @@
2601
2663
  "showLabels": {
2602
2664
  "type": "boolean",
2603
2665
  "required": false,
2604
- "defaultValue": "true",
2605
- "description": "Whether to display labels.\nWhen false, hides all label content regardless of other props."
2666
+ "defaultValue": "true\ntrue",
2667
+ "description": "Whether to display labels.\nWhen false, hides all label content regardless of other props.\nWhether to show the legend. When false the list stays in the\naccessibility tree (visually hidden), but sighted users are left with\ncolor alone (SC 1.4.1): you must show the labels and values in visible\ntext elsewhere."
2606
2668
  },
2607
2669
  "defaultLabel": {
2608
2670
  "type": "string",
@@ -2617,41 +2679,57 @@
2617
2679
  "mode": {
2618
2680
  "type": "\"line\" | \"circle\"",
2619
2681
  "required": false,
2620
- "defaultValue": "'line'\n'line'",
2621
- "description": "Display mode. Segmented progress only supports line mode.\nDisplay mode of the progress indicator.\n- `'line'`: Horizontal bar (default)\n- `'circle'`: Circular/ring indicator"
2682
+ "defaultValue": "'line'\n'line'\n'line'",
2683
+ "description": "Display mode. Segmented progress only supports line mode.\nDisplay mode. A breakdown is a line.\nDisplay mode of the progress indicator.\n- `'line'`: Horizontal bar (default)\n- `'circle'`: Circular/ring indicator"
2684
+ },
2685
+ "breakdown": {
2686
+ "type": "boolean",
2687
+ "required": false,
2688
+ "description": "Cumulative segments. Set `breakdown` for a by-status composition.\nEach segment is its own count, colored by its `theme`.\nNot available in standard mode."
2689
+ },
2690
+ "showPercent": {
2691
+ "type": "boolean",
2692
+ "required": false,
2693
+ "defaultValue": "false",
2694
+ "description": "Breakdown only.\nShow each segment's share of the total (\"25%\") instead of its count.\nThis replaces the count in the accessible output too: the list items\nread \"Done 75%\", so put counts in visible text nearby if they matter.\nNot available in standard mode."
2622
2695
  },
2623
2696
  "segments": {
2624
- "type": "ProgressSegment[]",
2697
+ "type": "ProgressSegment[] | ProgressBreakdownSegment[]",
2625
2698
  "required": false,
2626
- "description": "Segments to display, ordered front-to-back (z1, z2, z3...).\nMaximum 5 segments have default colors; beyond that, override via CSS.\nNot available in standard mode. Use segmented mode instead."
2699
+ "description": "Segments to display, ordered front-to-back (z1, z2, z3...).\nMaximum 5 segments have default colors; beyond that, override via CSS.\nThe parts, in display order (start to end).\nNot available in standard mode. Use segmented mode instead."
2627
2700
  },
2628
2701
  "value": {
2629
2702
  "type": "number",
2630
2703
  "required": false,
2631
2704
  "defaultValue": "0",
2632
- "description": "Not available in segmented mode.\nCurrent progress value (0–100, or use with `max` prop)."
2705
+ "description": "Not available in segmented mode.\nNot available in breakdown mode.\nCurrent progress value (0–100, or use with `max` prop)."
2633
2706
  },
2634
2707
  "indeterminate": {
2635
2708
  "type": "boolean",
2636
2709
  "required": false,
2637
2710
  "defaultValue": "false",
2638
- "description": "Not supported in segmented mode.\nWhen true, shows an animated indeterminate state.\nUse for operations where progress percentage is unknown.\nIgnores `value` when enabled."
2711
+ "description": "Not supported in segmented mode.\nNot supported in breakdown mode.\nWhen true, shows an animated indeterminate state.\nUse for operations where progress percentage is unknown.\nIgnores `value` when enabled."
2639
2712
  },
2640
2713
  "labelPosition": {
2641
2714
  "type": "\"above\" | \"inline\" | \"below\" | \"inside\"",
2642
2715
  "required": false,
2643
2716
  "defaultValue": "'inline'",
2644
- "description": "Not available in segmented mode. Labels appear below the bar.\nWhere to display the labels relative to the progress bar.\n- `'above'`: Labels in a row above the bar\n- `'inline'`: Labels beside the bar horizontally (default)\n- `'below'`: Labels in a row below the bar\n- `'inside'`: Label content inside/overlapping the bar (or centered in circle)\n\nWhen both `labelStart` and `labelEnd` are provided with `above`, `inline`,\nor `below`, they appear on opposite sides (space-between)."
2717
+ "description": "Not available in segmented mode. Labels appear below the bar.\nNot available in breakdown mode.\nWhere to display the labels relative to the progress bar.\n- `'above'`: Labels in a row above the bar\n- `'inline'`: Labels beside the bar horizontally (default)\n- `'below'`: Labels in a row below the bar\n- `'inside'`: Label content inside/overlapping the bar (or centered in circle)\n\nWhen both `labelStart` and `labelEnd` are provided with `above`, `inline`,\nor `below`, they appear on opposite sides (space-between)."
2645
2718
  },
2646
2719
  "labelStart": {
2647
2720
  "type": "ReactNode",
2648
2721
  "required": false,
2649
- "description": "Not available in segmented mode.\nLabel content for the start (left) position.\nUse with `labelPosition` to control placement.\n@example labelStart=\"33% Complete\""
2722
+ "description": "Not available in segmented mode.\nNot available in breakdown mode.\nLabel content for the start (left) position.\nUse with `labelPosition` to control placement.\n@example labelStart=\"33% Complete\""
2650
2723
  },
2651
2724
  "labelEnd": {
2652
2725
  "type": "ReactNode",
2653
2726
  "required": false,
2654
- "description": "Not available in segmented mode.\nLabel content for the end (right) position.\nUse with `labelPosition` to control placement.\n@example labelEnd=\"3/9 Steps\""
2727
+ "description": "Not available in segmented mode.\nNot available in breakdown mode.\nLabel content for the end (right) position.\nUse with `labelPosition` to control placement.\n@example labelEnd=\"3/9 Steps\""
2728
+ },
2729
+ "labels": {
2730
+ "type": "ProgressLabels",
2731
+ "required": false,
2732
+ "description": "Overridable strings for i18n (`remaining`)."
2655
2733
  },
2656
2734
  "variant": {
2657
2735
  "type": "\"ring\" | \"solid\"",
@@ -2675,7 +2753,8 @@
2675
2753
  "--tui-progress-z2-label",
2676
2754
  "--tui-progress-z3-label",
2677
2755
  "--tui-progress-z4-label",
2678
- "--tui-progress-z5-label"
2756
+ "--tui-progress-z5-label",
2757
+ "--tui-progress-segment-gap"
2679
2758
  ],
2680
2759
  "story": {
2681
2760
  "title": "Primitives/Progress",
@@ -2748,6 +2827,7 @@
2748
2827
  "--tui-radio-font-size",
2749
2828
  "--tui-radio-label-color",
2750
2829
  "--tui-radio-description-color",
2830
+ "--tui-radio-fg-disabled",
2751
2831
  "--tui-radio-group-gap"
2752
2832
  ],
2753
2833
  "story": {
@@ -3034,7 +3114,13 @@
3034
3114
  "stable"
3035
3115
  ]
3036
3116
  },
3037
- "subcomponents": null,
3117
+ "subcomponents": [
3118
+ "Trigger",
3119
+ "Content",
3120
+ "Option",
3121
+ "Group",
3122
+ "Label"
3123
+ ],
3038
3124
  "description": null,
3039
3125
  "gotchas": null,
3040
3126
  "examples": null,
@@ -3207,6 +3293,7 @@
3207
3293
  "--tui-segmented-item-bg-active",
3208
3294
  "--tui-segmented-item-fg-active",
3209
3295
  "--tui-segmented-item-border-active",
3296
+ "--tui-segmented-item-fg-disabled",
3210
3297
  "--tui-segmented-indicator",
3211
3298
  "--tui-segmented-indicator-size"
3212
3299
  ],
@@ -3356,7 +3443,13 @@
3356
3443
  "stable"
3357
3444
  ]
3358
3445
  },
3359
- "subcomponents": null,
3446
+ "subcomponents": [
3447
+ "Trigger",
3448
+ "Content",
3449
+ "Option",
3450
+ "Group",
3451
+ "Label"
3452
+ ],
3360
3453
  "description": null,
3361
3454
  "gotchas": null,
3362
3455
  "examples": null,
@@ -3439,7 +3532,12 @@
3439
3532
  "lms"
3440
3533
  ]
3441
3534
  },
3442
- "subcomponents": null,
3535
+ "subcomponents": [
3536
+ "Header",
3537
+ "Footer",
3538
+ "Nav",
3539
+ "Toggle"
3540
+ ],
3443
3541
  "description": null,
3444
3542
  "gotchas": null,
3445
3543
  "examples": null,
@@ -3653,7 +3751,9 @@
3653
3751
  "lms"
3654
3752
  ]
3655
3753
  },
3656
- "subcomponents": null,
3754
+ "subcomponents": [
3755
+ "Item"
3756
+ ],
3657
3757
  "description": null,
3658
3758
  "gotchas": null,
3659
3759
  "examples": null,
@@ -4135,7 +4235,10 @@
4135
4235
  "a11y"
4136
4236
  ]
4137
4237
  },
4138
- "subcomponents": null,
4238
+ "subcomponents": [
4239
+ "Group",
4240
+ "Item"
4241
+ ],
4139
4242
  "description": null,
4140
4243
  "gotchas": null,
4141
4244
  "examples": null,
@@ -4182,7 +4285,11 @@
4182
4285
  "stable"
4183
4286
  ]
4184
4287
  },
4185
- "subcomponents": null,
4288
+ "subcomponents": [
4289
+ "Provider",
4290
+ "Trigger",
4291
+ "Content"
4292
+ ],
4186
4293
  "description": null,
4187
4294
  "gotchas": null,
4188
4295
  "examples": null,
@@ -4261,7 +4368,11 @@
4261
4368
  "stable"
4262
4369
  ]
4263
4370
  },
4264
- "subcomponents": null,
4371
+ "subcomponents": [
4372
+ "Message",
4373
+ "Actions",
4374
+ "SaveActions"
4375
+ ],
4265
4376
  "description": null,
4266
4377
  "gotchas": null,
4267
4378
  "examples": null,
@@ -4475,9 +4586,10 @@
4475
4586
  "membersync": 22,
4476
4587
  "player": 24,
4477
4588
  "reaction": 36,
4478
- "system": 141
4589
+ "searchsync": 7,
4590
+ "system": 144
4479
4591
  },
4480
- "total": 280,
4592
+ "total": 290,
4481
4593
  "manifest": "./icons/manifest.json"
4482
4594
  }
4483
4595
  }
package/utils/portal.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- export declare function getPortalRoot(): HTMLElement;
1
+ export declare function getPortalRoot(): HTMLElement | null;
2
2
  /**
3
3
  * Gets portal root for a specific element (finds its nearest .tui-interface ancestor).
4
4
  * Reuses existing portal roots per interface container to prevent DOM accumulation.
5
- * Always returns a valid portal root inside .tui-interface scope.
5
+ * Returns a valid portal root inside .tui-interface scope, or null on the
6
+ * server (no `document`).
6
7
  */
7
- export declare function getPortalRootFor(element: HTMLElement | null): HTMLElement;
8
+ export declare function getPortalRootFor(element: HTMLElement | null): HTMLElement | null;
package/utils/portal.js CHANGED
@@ -2,7 +2,12 @@
2
2
  // Portal Root Utility
3
3
  // =============================================================================
4
4
  //
5
- // GUARANTEE: Always returns a node inside `.tui-interface` scope.
5
+ // GUARANTEE: In the browser, always returns a node inside `.tui-interface`
6
+ // scope. On the server (no `document`) it returns null: Floating UI's
7
+ // FloatingPortal waits on a null root and renders nothing, and a client's
8
+ // first render also renders nothing (the portal node is created in a layout
9
+ // effect), so server and client markup agree and the content portals on
10
+ // mount (#139). Callers that mount into it directly must handle null.
6
11
  //
7
12
  // If no interface wrapper exists, creates one at document.body level.
8
13
  // Components using this utility can rely on token inheritance and
@@ -15,6 +20,8 @@
15
20
  // =============================================================================
16
21
  import { PREFIX, INTERFACE_CLASS } from '../constants.js';
17
22
  const PORTAL_ID = `${PREFIX}-portal-root`;
23
+ /** False while server-rendering: these helpers are called during render. */
24
+ const hasDocument = () => typeof document !== 'undefined';
18
25
  // Track which interface elements have portal roots (prevents accumulation)
19
26
  const portalRoots = new WeakMap();
20
27
  /**
@@ -85,6 +92,8 @@ function getOrCreateGlobalInterface() {
85
92
  * created under.
86
93
  */
87
94
  function reconcileFallback() {
95
+ if (!hasDocument())
96
+ return;
88
97
  const fallback = document.getElementById(GLOBAL_INTERFACE_ID);
89
98
  if (!fallback)
90
99
  return;
@@ -110,6 +119,8 @@ function reconcileFallback() {
110
119
  fallback.remove();
111
120
  }
112
121
  export function getPortalRoot() {
122
+ if (!hasDocument())
123
+ return null;
113
124
  reconcileFallback();
114
125
  // Check if we already have a global portal root
115
126
  const portalRoot = document.getElementById(PORTAL_ID);
@@ -129,9 +140,12 @@ export function getPortalRoot() {
129
140
  /**
130
141
  * Gets portal root for a specific element (finds its nearest .tui-interface ancestor).
131
142
  * Reuses existing portal roots per interface container to prevent DOM accumulation.
132
- * Always returns a valid portal root inside .tui-interface scope.
143
+ * Returns a valid portal root inside .tui-interface scope, or null on the
144
+ * server (no `document`).
133
145
  */
134
146
  export function getPortalRootFor(element) {
147
+ if (!hasDocument())
148
+ return null;
135
149
  reconcileFallback();
136
150
  if (!element)
137
151
  return getPortalRoot();
@@ -0,0 +1,2 @@
1
+ import type { ReactNode, RefObject } from 'react';
2
+ export declare function useLoadingAnnouncer(elementRef: RefObject<HTMLElement | null>, loading: boolean, start: string | undefined, end: string | undefined): ReactNode;
@@ -0,0 +1,101 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import { getPortalRootFor } from './portal.js';
5
+ // =============================================================================
6
+ // useLoadingAnnouncer (@internal) — Button / IconButton loading announcements
7
+ // =============================================================================
8
+ //
9
+ // A loading button keeps focus (#130), and a focused element's aria-label
10
+ // change ("Save, loading") is not reliably re-announced, nor is the silent
11
+ // revert when loading ends (#131, WCAG 4.1.3). This speaks the transitions
12
+ // through a polite live region instead.
13
+ //
14
+ // Rules, from Toast's announcers:
15
+ // - The region is PRE-MOUNTED (empty) as soon as the feature is enabled, so
16
+ // an announcement is a text mutation in a region AT already knows about. A
17
+ // live region inserted together with its text is the unreliable path.
18
+ // - An alternating trailing NBSP guarantees a DOM mutation when the same text
19
+ // repeats (Save twice), and a timer clears the text so browse mode can't
20
+ // stumble on it later.
21
+ //
22
+ // Where it lives: PORTALED, never a DOM sibling of the button. A sibling
23
+ // would become the button's `:last-child`/`+` neighbour and break connected
24
+ // groups (Pager's flush segments), input-group slot rules
25
+ // (`__suffix > .tui-button`) and any consumer's structural selectors. The
26
+ // container is the nearest dialog ancestor when there is one, because the
27
+ // page outside a dialog can be hidden from AT: Modal inerts its siblings, and
28
+ // a `Popover modal` (DatePicker's) is role="dialog" WITHOUT aria-modal while
29
+ // Floating UI's FloatingFocusManager aria-hides everything else, so checking
30
+ // aria-modal alone left the region silenced there. Matches role="dialog",
31
+ // role="alertdialog", aria-modal="true" and dialog[open] (Sidebar's drawer is
32
+ // role="dialog" aria-modal="true"); closest() takes the nearest. Otherwise
33
+ // the portal root of the button's `.tui-interface`.
34
+ //
35
+ // Don't put aria-busy on an ancestor of the button: NVDA and Chromium hold
36
+ // live-region output under a busy ancestor until it clears. The clip styles are inline because
37
+ // `.tui-visually-hidden` is scoped under `.tui-interface` and a fallback
38
+ // portal root may sit outside one.
39
+ //
40
+ // Only rendered when a start or end string is set: nothing changes for
41
+ // consumers who don't opt in.
42
+ // =============================================================================
43
+ const CLEAR_AFTER_MS = 3000;
44
+ const VISUALLY_HIDDEN = {
45
+ position: 'absolute',
46
+ width: 1,
47
+ height: 1,
48
+ padding: 0,
49
+ margin: -1,
50
+ overflow: 'hidden',
51
+ clip: 'rect(0 0 0 0)',
52
+ clipPath: 'inset(50%)',
53
+ whiteSpace: 'nowrap',
54
+ border: 0,
55
+ };
56
+ function resolveContainer(el) {
57
+ const modal = el.closest('[role="dialog"], [role="alertdialog"], [aria-modal="true"], dialog[open]');
58
+ return modal ?? getPortalRootFor(el);
59
+ }
60
+ export function useLoadingAnnouncer(elementRef, loading, start, end) {
61
+ const enabled = !!(start || end);
62
+ const [container, setContainer] = useState(null);
63
+ const [text, setText] = useState('');
64
+ const seqRef = useRef(0);
65
+ const clearRef = useRef(null);
66
+ const prevLoadingRef = useRef(loading);
67
+ // Resolve once enabled, before paint, so the empty region is in the DOM
68
+ // well before the first loading change.
69
+ useLayoutEffect(() => {
70
+ if (!enabled) {
71
+ setContainer(null);
72
+ return;
73
+ }
74
+ const el = elementRef.current;
75
+ if (el)
76
+ setContainer(resolveContainer(el));
77
+ }, [enabled, elementRef]);
78
+ const announce = useCallback((message) => {
79
+ seqRef.current += 1;
80
+ setText(message + (seqRef.current % 2 ? ' ' : ''));
81
+ if (clearRef.current)
82
+ clearTimeout(clearRef.current);
83
+ clearRef.current = setTimeout(() => setText(''), CLEAR_AFTER_MS);
84
+ }, []);
85
+ useEffect(() => {
86
+ const wasLoading = prevLoadingRef.current;
87
+ prevLoadingRef.current = loading;
88
+ if (!enabled || wasLoading === loading)
89
+ return;
90
+ const message = loading ? start : end;
91
+ if (message)
92
+ announce(message);
93
+ }, [loading, enabled, start, end, announce]);
94
+ useEffect(() => () => {
95
+ if (clearRef.current)
96
+ clearTimeout(clearRef.current);
97
+ }, []);
98
+ if (!enabled || !container)
99
+ return null;
100
+ return createPortal(_jsx("span", { className: "tui-loading-announcer", role: "status", "aria-live": "polite", "aria-atomic": "true", style: VISUALLY_HIDDEN, children: text }), container);
101
+ }