@tensor_1/react 2.9.0 → 2.10.0
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/dist/chart.cjs +12 -3
- package/dist/components/Alert.js +15 -7
- package/dist/components/AppShell.d.ts +3 -1
- package/dist/components/AppShell.js +3 -1
- package/dist/components/Avatar.js +2 -1
- package/dist/components/Button.js +32 -16
- package/dist/components/Card.d.ts +3 -1
- package/dist/components/Card.js +2 -2
- package/dist/components/Chart.js +12 -3
- package/dist/components/CommandPalette.d.ts +4 -2
- package/dist/components/CommandPalette.js +66 -13
- package/dist/components/Comments.d.ts +5 -1
- package/dist/components/Comments.js +1 -1
- package/dist/components/Composer.d.ts +8 -1
- package/dist/components/Composer.js +7 -2
- package/dist/components/DetailLayout.js +1 -1
- package/dist/components/Drawer.d.ts +3 -4
- package/dist/components/Drawer.js +6 -4
- package/dist/components/Field.js +6 -3
- package/dist/components/Inbox.d.ts +13 -3
- package/dist/components/Inbox.js +61 -3
- package/dist/components/Input.d.ts +13 -2
- package/dist/components/Input.js +20 -5
- package/dist/components/Kanban.d.ts +15 -3
- package/dist/components/Kanban.js +42 -10
- package/dist/components/Meter.d.ts +3 -1
- package/dist/components/Meter.js +9 -1
- package/dist/components/Modal.d.ts +3 -5
- package/dist/components/Modal.js +6 -4
- package/dist/components/NavFavourites.js +11 -0
- package/dist/components/PageHeader.d.ts +3 -1
- package/dist/components/PageHeader.js +2 -2
- package/dist/components/Peek.d.ts +3 -4
- package/dist/components/Peek.js +9 -6
- package/dist/components/Progress.d.ts +3 -1
- package/dist/components/Progress.js +5 -3
- package/dist/components/Radio.d.ts +3 -1
- package/dist/components/Radio.js +6 -2
- package/dist/components/Sidebar.js +4 -2
- package/dist/components/Spinner.d.ts +3 -1
- package/dist/components/Spinner.js +3 -3
- package/dist/components/Stat.js +5 -1
- package/dist/components/States.d.ts +3 -1
- package/dist/components/States.js +8 -2
- package/dist/components/Table.d.ts +9 -2
- package/dist/components/Table.js +10 -6
- package/dist/components/Tabs.d.ts +13 -1
- package/dist/components/Tabs.js +78 -3
- package/dist/components/Timeline.d.ts +3 -3
- package/dist/components/Timeline.js +3 -3
- package/dist/components/Toast.js +42 -5
- package/dist/components/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip.js +44 -5
- package/dist/components/Tree.d.ts +2 -0
- package/dist/components/Tree.js +26 -4
- package/dist/hooks/useDialog.d.ts +1 -1
- package/dist/hooks/useDialog.js +17 -2
- package/dist/hooks/useTable.d.ts +5 -0
- package/dist/hooks/useTable.js +20 -1
- package/dist/index.cjs +616 -162
- package/dist/index.d.cts +127 -37
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/tree-model.d.ts +4 -0
- package/dist/tree-model.js +8 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { RefObject, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes,
|
|
2
|
+
import { RefObject, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, AriaAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, HTMLAttributes, AnchorHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
declare function cx(...args: (string | false | null | undefined | 0)[]): string;
|
|
5
5
|
|
|
6
|
-
declare function useDialog(open: boolean): React.RefObject<HTMLDialogElement>;
|
|
6
|
+
declare function useDialog(open: boolean, onClose?: () => void): React.RefObject<HTMLDialogElement>;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* uix table engine — framework-agnostic, dependency-free logic for data grids.
|
|
@@ -114,6 +114,11 @@ interface UseTableResult<T> {
|
|
|
114
114
|
pinned: ReadonlySet<string>;
|
|
115
115
|
/** header select-all tri-state over the current derived rows. */
|
|
116
116
|
selectAll: SelectAllState;
|
|
117
|
+
/**
|
|
118
|
+
* Screen-reader status text reflecting the latest change — "Sorted by {field}, {dir}",
|
|
119
|
+
* "{n} results" (filter/search), "{n} selected". Pass to `<TableWrap announcement>` (UIX-A11Y-2).
|
|
120
|
+
*/
|
|
121
|
+
announcement: string;
|
|
117
122
|
/** cycle a column's sort; pass additive (⇧-click) to keep it as a secondary key. */
|
|
118
123
|
toggleSort: (field: string, additive?: boolean) => void;
|
|
119
124
|
setSort: (keys: SortKey[]) => void;
|
|
@@ -241,8 +246,19 @@ interface InputGroupProps {
|
|
|
241
246
|
leadingIcon?: ReactNode;
|
|
242
247
|
trailingIcon?: ReactNode;
|
|
243
248
|
className?: string;
|
|
249
|
+
/** Injected by `<Field>` when it wraps the group; forwarded onto the child control. */
|
|
250
|
+
id?: string;
|
|
251
|
+
'aria-describedby'?: string;
|
|
252
|
+
'aria-invalid'?: AriaAttributes['aria-invalid'];
|
|
253
|
+
'aria-required'?: AriaAttributes['aria-required'];
|
|
244
254
|
}
|
|
245
|
-
|
|
255
|
+
/**
|
|
256
|
+
* Icon-adorned wrapper for a child `<Input>`. The control is passed as `children`, so
|
|
257
|
+
* `<Field>`'s injected `id`/`aria-*` land on this wrapper — they're forwarded onto the
|
|
258
|
+
* single child element (the child's own props win) so label/message association survives
|
|
259
|
+
* the extra div (UIX-A11Y-3).
|
|
260
|
+
*/
|
|
261
|
+
declare function InputGroup({ children, leadingIcon, trailingIcon, className, id, 'aria-describedby': describedBy, 'aria-invalid': invalid, 'aria-required': required, }: InputGroupProps): react.JSX.Element;
|
|
246
262
|
|
|
247
263
|
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
248
264
|
invalid?: boolean;
|
|
@@ -267,8 +283,10 @@ declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttri
|
|
|
267
283
|
interface RadioGroupProps {
|
|
268
284
|
children: ReactNode;
|
|
269
285
|
className?: string;
|
|
286
|
+
/** Group name; when set the group renders as fieldset/legend so it's announced with each radio. */
|
|
287
|
+
label?: ReactNode;
|
|
270
288
|
}
|
|
271
|
-
declare function RadioGroup({ children, className }: RadioGroupProps): react.JSX.Element;
|
|
289
|
+
declare function RadioGroup({ children, className, label }: RadioGroupProps): react.JSX.Element;
|
|
272
290
|
|
|
273
291
|
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
274
292
|
label?: ReactNode;
|
|
@@ -287,28 +305,25 @@ interface FieldProps {
|
|
|
287
305
|
}
|
|
288
306
|
declare function Field({ label, hint, error, success, required, children, className, htmlFor }: FieldProps): react.JSX.Element;
|
|
289
307
|
|
|
290
|
-
interface ModalProps {
|
|
308
|
+
interface ModalProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
|
|
291
309
|
open: boolean;
|
|
292
310
|
onClose?: () => void;
|
|
293
311
|
title?: ReactNode;
|
|
294
312
|
children?: ReactNode;
|
|
295
313
|
footer?: ReactNode;
|
|
296
|
-
className?: string;
|
|
297
|
-
style?: CSSProperties;
|
|
298
314
|
}
|
|
299
|
-
declare function Modal({ open, onClose, title, children, footer, className,
|
|
315
|
+
declare function Modal({ open, onClose, title, children, footer, className, ...rest }: ModalProps): react.JSX.Element;
|
|
300
316
|
|
|
301
|
-
interface DrawerProps {
|
|
317
|
+
interface DrawerProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
|
|
302
318
|
open: boolean;
|
|
303
319
|
onClose?: () => void;
|
|
304
320
|
title?: ReactNode;
|
|
305
321
|
children?: ReactNode;
|
|
306
322
|
footer?: ReactNode;
|
|
307
|
-
className?: string;
|
|
308
323
|
}
|
|
309
|
-
declare function Drawer({ open, onClose, title, children, footer, className }: DrawerProps): react.JSX.Element;
|
|
324
|
+
declare function Drawer({ open, onClose, title, children, footer, className, ...rest }: DrawerProps): react.JSX.Element;
|
|
310
325
|
|
|
311
|
-
interface PeekProps {
|
|
326
|
+
interface PeekProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
|
|
312
327
|
open: boolean;
|
|
313
328
|
onClose?: () => void;
|
|
314
329
|
title?: ReactNode;
|
|
@@ -317,22 +332,25 @@ interface PeekProps {
|
|
|
317
332
|
onNavPrev?: () => void;
|
|
318
333
|
onNavNext?: () => void;
|
|
319
334
|
hint?: string;
|
|
320
|
-
className?: string;
|
|
321
335
|
}
|
|
322
|
-
declare function Peek({ open, onClose, title, children, footer, onNavPrev, onNavNext, hint, className }: PeekProps): react.JSX.Element;
|
|
336
|
+
declare function Peek({ open, onClose, title, children, footer, onNavPrev, onNavNext, hint, className, onClick, ...rest }: PeekProps): react.JSX.Element;
|
|
323
337
|
|
|
324
338
|
interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
325
339
|
title?: ReactNode;
|
|
340
|
+
/** Element for the title — pick a real heading to slot the card into the page outline (UIX-A11Y-4). Default `div` keeps legacy rendering. */
|
|
341
|
+
titleAs?: 'h2' | 'h3' | 'h4' | 'div';
|
|
326
342
|
subtitle?: ReactNode;
|
|
327
343
|
headerAction?: ReactNode;
|
|
328
344
|
footer?: ReactNode;
|
|
329
345
|
children?: ReactNode;
|
|
330
346
|
}
|
|
331
|
-
declare function Card({ title, subtitle, headerAction, footer, children, className, ...props }: CardProps): react.JSX.Element;
|
|
347
|
+
declare function Card({ title, titleAs: TitleTag, subtitle, headerAction, footer, children, className, ...props }: CardProps): react.JSX.Element;
|
|
332
348
|
|
|
333
349
|
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
334
350
|
eyebrow?: ReactNode;
|
|
335
351
|
title: ReactNode;
|
|
352
|
+
/** Heading level for the title — drop to `h2` when the page already owns an `h1` (UIX-A11Y-4). */
|
|
353
|
+
as?: 'h1' | 'h2';
|
|
336
354
|
/** Supporting copy under the title. */
|
|
337
355
|
subtitle?: ReactNode;
|
|
338
356
|
/** Right-aligned action area (buttons, menus). */
|
|
@@ -342,7 +360,7 @@ interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
|
342
360
|
* Page header — eyebrow / title / subtitle + actions row, over `.uix-page-header`.
|
|
343
361
|
* The hairline + breathing room below come from the component CSS.
|
|
344
362
|
*/
|
|
345
|
-
declare function PageHeader({ eyebrow, title, subtitle, actions, className, ...props }: PageHeaderProps): react.JSX.Element;
|
|
363
|
+
declare function PageHeader({ eyebrow, title, subtitle, actions, as: TitleTag, className, ...props }: PageHeaderProps): react.JSX.Element;
|
|
346
364
|
|
|
347
365
|
interface DetailLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
348
366
|
/** The narrow trailing column (record meta, side panels). */
|
|
@@ -429,6 +447,18 @@ interface TabProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
|
429
447
|
disabled?: boolean;
|
|
430
448
|
}
|
|
431
449
|
declare function Tab({ value, children, disabled, className, onClick, ...props }: TabProps): react.JSX.Element;
|
|
450
|
+
interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
451
|
+
/** The owning `<Tab>`'s value — the panel renders only while that tab is selected. */
|
|
452
|
+
value: string;
|
|
453
|
+
children?: ReactNode;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* The tabpanel paired with a `<Tab>` by `value` (UIX-A11Y-2): labelled by its tab,
|
|
457
|
+
* `tabIndex 0` so Tab from the tablist lands in the content, rendered only while
|
|
458
|
+
* selected. Place it as a direct child of `<Tabs>` — it is hoisted out of the tablist —
|
|
459
|
+
* or anywhere the Tabs context reaches.
|
|
460
|
+
*/
|
|
461
|
+
declare function TabPanel({ value, children, ...props }: TabPanelProps): react.JSX.Element | null;
|
|
432
462
|
|
|
433
463
|
type ShellNav = 'full' | 'rail' | 'hidden';
|
|
434
464
|
interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -446,11 +476,13 @@ interface AppShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
446
476
|
onExitFocus?: () => void;
|
|
447
477
|
/** Drop the content gutter so a genuinely wide table runs edge-to-edge. */
|
|
448
478
|
mainBleed?: boolean;
|
|
479
|
+
/** id given to `<main>` and targeted by the skip link. Override on collision (UIX-A11Y-2). */
|
|
480
|
+
mainId?: string;
|
|
449
481
|
sidebar?: ReactNode;
|
|
450
482
|
topbar?: ReactNode;
|
|
451
483
|
children?: ReactNode;
|
|
452
484
|
}
|
|
453
|
-
declare function AppShell({ nav, collapsed, focus, onExitFocus, mainBleed, sidebar, topbar, children, className, ...props }: AppShellProps): react.JSX.Element;
|
|
485
|
+
declare function AppShell({ nav, collapsed, focus, onExitFocus, mainBleed, mainId, sidebar, topbar, children, className, ...props }: AppShellProps): react.JSX.Element;
|
|
454
486
|
|
|
455
487
|
interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
456
488
|
collapsed?: boolean;
|
|
@@ -584,8 +616,10 @@ declare function Alert({ tone, title, icon, children, className, ...props }: Ale
|
|
|
584
616
|
interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
585
617
|
size?: 'md' | 'lg';
|
|
586
618
|
accent?: boolean;
|
|
619
|
+
/** Announced loading text (default "Loading…"). */
|
|
620
|
+
label?: string;
|
|
587
621
|
}
|
|
588
|
-
declare function Spinner({ size, accent, className, ...props }: SpinnerProps): react.JSX.Element;
|
|
622
|
+
declare function Spinner({ size, accent, label, className, ...props }: SpinnerProps): react.JSX.Element;
|
|
589
623
|
|
|
590
624
|
type ToastTone = 'success' | 'danger' | 'info';
|
|
591
625
|
interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
@@ -603,9 +637,14 @@ interface ToasterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
603
637
|
declare function Toaster({ children, className, ...props }: ToasterProps): react.JSX.Element;
|
|
604
638
|
|
|
605
639
|
interface TableWrapProps extends HTMLAttributes<HTMLDivElement> {
|
|
640
|
+
/**
|
|
641
|
+
* Polite live-region text for table state changes — "Sorted by …", "N results",
|
|
642
|
+
* "N selected". Pass `useTable().announcement` straight through (UIX-A11Y-2).
|
|
643
|
+
*/
|
|
644
|
+
announcement?: string;
|
|
606
645
|
children?: ReactNode;
|
|
607
646
|
}
|
|
608
|
-
declare function TableWrap({ children, className, ...props }: TableWrapProps): react.JSX.Element;
|
|
647
|
+
declare function TableWrap({ announcement, children, className, ...props }: TableWrapProps): react.JSX.Element;
|
|
609
648
|
type TableDensity = 'compact' | 'standard' | 'comfortable';
|
|
610
649
|
type SortDirection = 'ascending' | 'descending' | 'none';
|
|
611
650
|
interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
@@ -654,9 +693,11 @@ interface RowActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
654
693
|
declare function RowAction({ children, className, type, ...props }: RowActionProps): react.JSX.Element;
|
|
655
694
|
interface ExpandToggleProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
656
695
|
expanded?: boolean;
|
|
696
|
+
/** id of the detail row this toggle controls → `aria-controls` (UIX-A11Y-2). */
|
|
697
|
+
controls?: string;
|
|
657
698
|
}
|
|
658
699
|
/** Chevron button that expands/collapses an inline detail row. */
|
|
659
|
-
declare function ExpandToggle({ expanded, className, type, ...props }: ExpandToggleProps): react.JSX.Element;
|
|
700
|
+
declare function ExpandToggle({ expanded, controls, className, type, ...props }: ExpandToggleProps): react.JSX.Element;
|
|
660
701
|
/** Emphasised primary cell text. */
|
|
661
702
|
declare function CellStrong({ children, className, ...props }: HTMLAttributes<HTMLSpanElement>): react.JSX.Element;
|
|
662
703
|
/** Secondary line under a primary cell value (muted, meta size). */
|
|
@@ -698,8 +739,10 @@ interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
698
739
|
max?: number;
|
|
699
740
|
/** Continuous slide animation when the amount of work is unknown. */
|
|
700
741
|
indeterminate?: boolean;
|
|
742
|
+
/** Accessible name — rendered as `aria-label` (an explicit `aria-label` prop wins). */
|
|
743
|
+
label?: string;
|
|
701
744
|
}
|
|
702
|
-
declare function Progress({ value, max, indeterminate, className, ...props }: ProgressProps): react.JSX.Element;
|
|
745
|
+
declare function Progress({ value, max, indeterminate, label, className, ...props }: ProgressProps): react.JSX.Element;
|
|
703
746
|
|
|
704
747
|
/** Fill color tone for the meter bar. Defaults to `success` (green). */
|
|
705
748
|
type MeterTone = 'success' | 'warning' | 'danger' | 'attention' | 'overdue';
|
|
@@ -708,9 +751,11 @@ interface MeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
708
751
|
value?: number;
|
|
709
752
|
/** Threshold tone applied via `data-tone` on the fill element. `success` is the implicit default (no attribute). */
|
|
710
753
|
tone?: MeterTone;
|
|
754
|
+
/** Accessible name — rendered as `aria-label` (an explicit `aria-label` prop wins). */
|
|
755
|
+
label?: string;
|
|
711
756
|
}
|
|
712
757
|
/** Horizontal utilization / threshold bar backed by `.uix-meter`. */
|
|
713
|
-
declare function Meter({ value, tone, className, ...props }: MeterProps): react.JSX.Element;
|
|
758
|
+
declare function Meter({ value, tone, label, className, ...props }: MeterProps): react.JSX.Element;
|
|
714
759
|
|
|
715
760
|
interface StatTrend {
|
|
716
761
|
direction: 'up' | 'down';
|
|
@@ -740,7 +785,9 @@ interface TooltipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
740
785
|
* Tooltip whose bubble renders in the top layer via the native Popover API, so it
|
|
741
786
|
* escapes any `overflow: hidden/scroll` ancestor that would clip the old CSS-only
|
|
742
787
|
* `[data-uix-tip]` tooltip (UIX-FIX-02). Positioned by the shared overlay engine
|
|
743
|
-
* (flip/shift), shown on hover and keyboard focus, dismissed on blur or Escape
|
|
788
|
+
* (flip/shift), shown on hover and keyboard focus, dismissed on blur or Escape
|
|
789
|
+
* (document-level, per WCAG 1.4.13), and hoverable: the bubble stays open while
|
|
790
|
+
* the pointer is over it (UIX-A11Y-1).
|
|
744
791
|
*/
|
|
745
792
|
declare function Tooltip({ label, placement, className, children, ...props }: TooltipProps): react.JSX.Element;
|
|
746
793
|
|
|
@@ -774,9 +821,11 @@ declare function Skeleton({ variant, width, height, className, style, ...props }
|
|
|
774
821
|
interface LoadingStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
775
822
|
/** Number of skeleton rows to render. */
|
|
776
823
|
rows?: number;
|
|
824
|
+
/** Announced loading text (default "Loading"). */
|
|
825
|
+
label?: string;
|
|
777
826
|
}
|
|
778
827
|
/** A stack of skeleton rows for list/section loading. `role="status"`. */
|
|
779
|
-
declare function LoadingState({ rows, className, ...props }: LoadingStateProps): react.JSX.Element;
|
|
828
|
+
declare function LoadingState({ rows, label, className, ...props }: LoadingStateProps): react.JSX.Element;
|
|
780
829
|
|
|
781
830
|
interface LabelProps extends HTMLAttributes<HTMLSpanElement> {
|
|
782
831
|
/** Any CSS color or a `--uix-chart-*` var; sets `--label-color`. */
|
|
@@ -816,7 +865,11 @@ declare function UserChip({ avatar, name, sub, className, children, ...props }:
|
|
|
816
865
|
interface CommentsProps extends HTMLAttributes<HTMLDivElement> {
|
|
817
866
|
children?: ReactNode;
|
|
818
867
|
}
|
|
819
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* Comment thread container over `.uix-comments`. role="log" is an implicit polite
|
|
870
|
+
* live region: comments appended after initial render are announced, the initial
|
|
871
|
+
* list is not (UIX-A11Y-3). Pass `role` to override.
|
|
872
|
+
*/
|
|
820
873
|
declare function Comments({ children, className, ...props }: CommentsProps): react.JSX.Element;
|
|
821
874
|
interface CommentProps extends HTMLAttributes<HTMLDivElement> {
|
|
822
875
|
/** Usually an `<Avatar />` (the grid reserves the leading column). */
|
|
@@ -830,6 +883,8 @@ declare function Comment({ avatar, author, meta, children, className, ...props }
|
|
|
830
883
|
|
|
831
884
|
interface ComposerProps extends HTMLAttributes<HTMLDivElement> {
|
|
832
885
|
children?: ReactNode;
|
|
886
|
+
/** Accessible name for the child `<textarea>`; applied as its `aria-label`. */
|
|
887
|
+
label?: string;
|
|
833
888
|
}
|
|
834
889
|
/**
|
|
835
890
|
* Composer surface over `.uix-composer` — a single box that owns the
|
|
@@ -837,8 +892,13 @@ interface ComposerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
837
892
|
* `<ComposerBar>` inside; the descendant `textarea` picks up the composer's
|
|
838
893
|
* padding/typography automatically, so the input never reads as a second
|
|
839
894
|
* nested box.
|
|
895
|
+
*
|
|
896
|
+
* A placeholder is not an accessible name, so the composer labels a bare child
|
|
897
|
+
* `<textarea>` with `label` (default "Add a comment"); a textarea that brings its
|
|
898
|
+
* own `aria-label`/`aria-labelledby` — or an `id` (likely tied to an external
|
|
899
|
+
* `<label htmlFor>`) — is left untouched (UIX-A11Y-3).
|
|
840
900
|
*/
|
|
841
|
-
declare function Composer({ children, className, ...props }: ComposerProps): react.JSX.Element;
|
|
901
|
+
declare function Composer({ children, className, label, ...props }: ComposerProps): react.JSX.Element;
|
|
842
902
|
interface ComposerBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
843
903
|
children?: ReactNode;
|
|
844
904
|
}
|
|
@@ -870,12 +930,12 @@ interface SegmentedOptionProps extends Omit<ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
870
930
|
*/
|
|
871
931
|
declare function SegmentedOption({ value, children, className, onClick, ...props }: SegmentedOptionProps): react.JSX.Element;
|
|
872
932
|
|
|
873
|
-
interface TimelineProps extends HTMLAttributes<
|
|
933
|
+
interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
|
|
874
934
|
children?: ReactNode;
|
|
875
935
|
}
|
|
876
|
-
/** Activity timeline container over `.uix-timeline`. */
|
|
936
|
+
/** Activity timeline container over `.uix-timeline`. Ordered list so AT reads entry count + sequence (UIX-A11Y-4). */
|
|
877
937
|
declare function Timeline({ children, className, ...props }: TimelineProps): react.JSX.Element;
|
|
878
|
-
interface TimelineItemProps extends HTMLAttributes<
|
|
938
|
+
interface TimelineItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
879
939
|
/**
|
|
880
940
|
* Custom rail node — an icon puck, an avatar, a tinted dot. Defaults to the
|
|
881
941
|
* accent `.uix-timeline__node` dot. Supply this to make a heterogeneous feed
|
|
@@ -939,7 +999,9 @@ interface CommandPaletteProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
939
999
|
}
|
|
940
1000
|
/**
|
|
941
1001
|
* ⌘K command palette surface over `.uix-cmdk`. Presentational: mount it inside a
|
|
942
|
-
* Modal/Popover and wire search + keyboard selection in the consumer.
|
|
1002
|
+
* Modal/Popover and wire search + keyboard selection in the consumer. The input is
|
|
1003
|
+
* a combobox over the listbox of `CommandItem`s; spreads override every default, so
|
|
1004
|
+
* consumers already passing their own roles/labels keep working.
|
|
943
1005
|
*/
|
|
944
1006
|
declare function CommandPalette({ inputProps, children, className, ...props }: CommandPaletteProps): react.JSX.Element;
|
|
945
1007
|
interface CommandGroupProps {
|
|
@@ -956,17 +1018,27 @@ interface CommandItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
956
1018
|
children?: ReactNode;
|
|
957
1019
|
}
|
|
958
1020
|
/** A single command row over `.uix-cmdk__item`. */
|
|
959
|
-
declare function CommandItem({ icon, shortcut, active, children, className, ...props }: CommandItemProps): react.JSX.Element;
|
|
1021
|
+
declare function CommandItem({ icon, shortcut, active, children, className, id, ...props }: CommandItemProps): react.JSX.Element;
|
|
960
1022
|
|
|
961
1023
|
interface InboxProps extends HTMLAttributes<HTMLDivElement> {
|
|
1024
|
+
/**
|
|
1025
|
+
* Which pane a narrow viewport (<700px) shows: 'list' (default, matches the old
|
|
1026
|
+
* behaviour) or 'detail'. Consumers should render a Back control in the detail pane
|
|
1027
|
+
* on narrow viewports to return to the list (UIX-A11Y-2).
|
|
1028
|
+
*/
|
|
1029
|
+
view?: 'list' | 'detail';
|
|
962
1030
|
children?: ReactNode;
|
|
963
1031
|
}
|
|
964
1032
|
/** Two-pane inbox master-detail container backed by `.uix-inbox`. Place `<InboxList>` and `<InboxDetail>` as children. */
|
|
965
|
-
declare function Inbox({ children, className, ...props }: InboxProps): react.JSX.Element;
|
|
1033
|
+
declare function Inbox({ view, children, className, ...props }: InboxProps): react.JSX.Element;
|
|
966
1034
|
interface InboxListProps extends HTMLAttributes<HTMLDivElement> {
|
|
967
1035
|
children?: ReactNode;
|
|
968
1036
|
}
|
|
969
|
-
/**
|
|
1037
|
+
/**
|
|
1038
|
+
* Left-pane item list. Place `<InboxItem>` children here. A keyboard listbox
|
|
1039
|
+
* (UIX-A11Y-2): the list is the single tab stop; ArrowUp/ArrowDown/Home/End move the
|
|
1040
|
+
* active option via `aria-activedescendant`, Enter/Space click it.
|
|
1041
|
+
*/
|
|
970
1042
|
declare function InboxList({ children, className, ...props }: InboxListProps): react.JSX.Element;
|
|
971
1043
|
interface InboxItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
972
1044
|
/** Primary subject / title line. */
|
|
@@ -982,7 +1054,7 @@ interface InboxItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
982
1054
|
children?: ReactNode;
|
|
983
1055
|
}
|
|
984
1056
|
/** A single inbox row with subject, preview excerpt, optional leading slot, and unread/selected states. */
|
|
985
|
-
declare function InboxItem({ subject, preview, leading, unread, selected, children, className, ...props }: InboxItemProps): react.JSX.Element;
|
|
1057
|
+
declare function InboxItem({ subject, preview, leading, unread, selected, children, className, id, ...props }: InboxItemProps): react.JSX.Element;
|
|
986
1058
|
interface InboxDetailProps extends HTMLAttributes<HTMLDivElement> {
|
|
987
1059
|
children?: ReactNode;
|
|
988
1060
|
}
|
|
@@ -990,25 +1062,39 @@ interface InboxDetailProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
990
1062
|
declare function InboxDetail({ children, className, ...props }: InboxDetailProps): react.JSX.Element;
|
|
991
1063
|
|
|
992
1064
|
interface KanbanProps extends HTMLAttributes<HTMLDivElement> {
|
|
1065
|
+
/**
|
|
1066
|
+
* Polite live-region text for keyboard moves (UIX-A11Y-2). `onMove` implementations
|
|
1067
|
+
* should set it, e.g. "Card X moved to Doing, position 2 of 4".
|
|
1068
|
+
*/
|
|
1069
|
+
announcement?: string;
|
|
993
1070
|
children?: ReactNode;
|
|
994
1071
|
}
|
|
995
|
-
declare function Kanban({ children, className, ...props }: KanbanProps): react.JSX.Element;
|
|
1072
|
+
declare function Kanban({ announcement, children, className, ...props }: KanbanProps): react.JSX.Element;
|
|
996
1073
|
interface KanbanColumnProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
997
1074
|
title?: ReactNode;
|
|
998
1075
|
count?: number;
|
|
999
1076
|
children?: ReactNode;
|
|
1000
1077
|
}
|
|
1001
1078
|
declare function KanbanColumn({ title, count, children, className, ...props }: KanbanColumnProps): react.JSX.Element;
|
|
1079
|
+
type KanbanMoveDirection = 'up' | 'down' | 'left' | 'right';
|
|
1002
1080
|
interface KanbanCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1003
1081
|
title?: ReactNode;
|
|
1004
1082
|
meta?: ReactNode;
|
|
1083
|
+
/**
|
|
1084
|
+
* Keyboard move contract (UIX-A11Y-2): when provided, Alt+Arrow on the focused card
|
|
1085
|
+
* calls it — the same accelerator convention as NavFavourites row moves. Pair with
|
|
1086
|
+
* the board-level `announcement` so SR users hear the result.
|
|
1087
|
+
*/
|
|
1088
|
+
onMove?: (dir: KanbanMoveDirection) => void;
|
|
1005
1089
|
children?: ReactNode;
|
|
1006
1090
|
}
|
|
1007
|
-
declare function KanbanCard({ title, meta, children, className, ...props }: KanbanCardProps): react.JSX.Element;
|
|
1091
|
+
declare function KanbanCard({ title, meta, children, className, onMove, onKeyDown, ...props }: KanbanCardProps): react.JSX.Element;
|
|
1008
1092
|
|
|
1009
1093
|
interface TreeNodeData {
|
|
1010
1094
|
id: string;
|
|
1011
1095
|
label: ReactNode;
|
|
1096
|
+
/** Plain-text label for keyboard typeahead when `label` is not a string (UIX-A11Y-2). */
|
|
1097
|
+
typeaheadLabel?: string;
|
|
1012
1098
|
icon?: ReactNode;
|
|
1013
1099
|
children?: TreeNodeData[];
|
|
1014
1100
|
}
|
|
@@ -1057,6 +1143,10 @@ declare function Tree({ nodes, expanded: controlledExpanded, defaultExpanded, se
|
|
|
1057
1143
|
interface TreeLike<T> {
|
|
1058
1144
|
id: string;
|
|
1059
1145
|
children?: T[];
|
|
1146
|
+
/** The display label — typeahead matches it only when it is a plain string (UIX-A11Y-2). */
|
|
1147
|
+
label?: unknown;
|
|
1148
|
+
/** Explicit typeahead text for nodes whose `label` is not a string (rich ReactNode labels). */
|
|
1149
|
+
typeaheadLabel?: string;
|
|
1060
1150
|
}
|
|
1061
1151
|
interface FlatNode<T> {
|
|
1062
1152
|
node: T;
|
|
@@ -1270,4 +1360,4 @@ interface StatusRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1270
1360
|
/** Status row — indicator + name + trailing meta (`.uix-status-row`). */
|
|
1271
1361
|
declare function StatusRow({ indicator, name, meta, className, ...props }: StatusRowProps): react.JSX.Element;
|
|
1272
1362
|
|
|
1273
|
-
export { Alert, type AlertProps, type AlertTone, type Align, AppShell, type AppShellProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, type ColumnFilter, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FlatNode, Highlighted, type HighlightedProps, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, Input, InputGroup, type InputGroupProps, type InputProps, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, Meter, type MeterProps, type MeterTone, Modal, type ModalProps, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, type Placement, Popover, type PopoverProps, type PositionOptions, type PositionResult, type Primitive, Progress, type ProgressProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Rect, ResourceGrid, type ResourceGridProps, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, type Side, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, type Size, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, SubNavItem, type SubNavItemProps, Switch, type SwitchProps, Tab, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, UserChip, type UserChipProps, type ViewState, type VirtualWindow, applyFilters, clampWidth, computePosition, cx, flattenTree, highlightSegments, matchFilter, mergePinned, multiSort, nextSortDir, parseView, reorder, searchRows, selectAllState, serializeView, shouldVirtualize, toggleId, togglePage, toggleSort, treeNav, useAnchoredPosition, useDialog, useTable, virtualWindow };
|
|
1363
|
+
export { Alert, type AlertProps, type AlertTone, type Align, AppShell, type AppShellProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, type ColumnFilter, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FlatNode, Highlighted, type HighlightedProps, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, Input, InputGroup, type InputGroupProps, type InputProps, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanMoveDirection, type KanbanProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, Meter, type MeterProps, type MeterTone, Modal, type ModalProps, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, type Placement, Popover, type PopoverProps, type PositionOptions, type PositionResult, type Primitive, Progress, type ProgressProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Rect, ResourceGrid, type ResourceGridProps, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, type Side, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, type Size, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, SubNavItem, type SubNavItemProps, Switch, type SwitchProps, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, UserChip, type UserChipProps, type ViewState, type VirtualWindow, applyFilters, clampWidth, computePosition, cx, flattenTree, highlightSegments, matchFilter, mergePinned, multiSort, nextSortDir, parseView, reorder, searchRows, selectAllState, serializeView, shouldVirtualize, toggleId, togglePage, toggleSort, treeNav, useAnchoredPosition, useDialog, useTable, virtualWindow };
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { PageHeader, PageHeaderProps } from './components/PageHeader.js';
|
|
|
19
19
|
export { DetailLayout, DetailLayoutProps } from './components/DetailLayout.js';
|
|
20
20
|
export { List, ListItem, ListItemProps, ListProps } from './components/List.js';
|
|
21
21
|
export { DescriptionItem, DescriptionItemProps, DescriptionList, DescriptionListItem, DescriptionListProps } from './components/DescriptionList.js';
|
|
22
|
-
export { Tab, TabProps, Tabs, TabsProps } from './components/Tabs.js';
|
|
22
|
+
export { Tab, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps } from './components/Tabs.js';
|
|
23
23
|
export { AppShell, AppShellProps, ShellNav } from './components/AppShell.js';
|
|
24
24
|
export { NavGroup, NavGroupProps, NavItem, NavItemProps, Sidebar, SidebarProps, SidebarSection, SidebarSectionProps, SubNavItem, SubNavItemProps } from './components/Sidebar.js';
|
|
25
25
|
export { StarButton, StarButtonProps } from './components/StarButton.js';
|
|
@@ -46,7 +46,7 @@ export { Note, NoteProps, NoteTone, Prose, ProseProps } from './components/Prose
|
|
|
46
46
|
export { Popover, PopoverProps } from './components/Popover.js';
|
|
47
47
|
export { CommandGroup, CommandGroupProps, CommandItem, CommandItemProps, CommandPalette, CommandPaletteProps } from './components/CommandPalette.js';
|
|
48
48
|
export { Inbox, InboxDetail, InboxDetailProps, InboxItem, InboxItemProps, InboxList, InboxListProps, InboxProps } from './components/Inbox.js';
|
|
49
|
-
export { Kanban, KanbanCard, KanbanCardProps, KanbanColumn, KanbanColumnProps, KanbanProps } from './components/Kanban.js';
|
|
49
|
+
export { Kanban, KanbanCard, KanbanCardProps, KanbanColumn, KanbanColumnProps, KanbanMoveDirection, KanbanProps } from './components/Kanban.js';
|
|
50
50
|
export { Tree, TreeNodeData, TreeNodeProps, TreeProps } from './components/Tree.js';
|
|
51
51
|
export { FlatNode, TreeLike, TreeNavAction, flattenTree, treeNav } from './tree-model.js';
|
|
52
52
|
export { ContentList, ContentListItem, ContentListItemProps, ContentListProps, EventRow, EventRowProps, FeaturedRundown, FeaturedRundownItem, FeaturedRundownItemProps, FeaturedRundownProps, FeaturedStage, FeaturedStageProps, NewsLead, NewsLeadProps, NoticeQueue, NoticeQueueProps, PageIntro, PageIntroProps, ResourceGrid, ResourceGridProps, SectionHead, SectionHeadProps, StatLine, StatLineItem, StatLineProps, StatusRow, StatusRowProps } from './components/EditorialHome.js';
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import { PageHeader } from "./components/PageHeader.js";
|
|
|
19
19
|
import { DetailLayout } from "./components/DetailLayout.js";
|
|
20
20
|
import { List, ListItem } from "./components/List.js";
|
|
21
21
|
import { DescriptionList, DescriptionItem } from "./components/DescriptionList.js";
|
|
22
|
-
import { Tabs, Tab } from "./components/Tabs.js";
|
|
22
|
+
import { Tabs, Tab, TabPanel } from "./components/Tabs.js";
|
|
23
23
|
import { AppShell } from "./components/AppShell.js";
|
|
24
24
|
import { Sidebar, SidebarSection, NavItem, NavGroup, SubNavItem } from "./components/Sidebar.js";
|
|
25
25
|
import { StarButton } from "./components/StarButton.js";
|
|
@@ -162,6 +162,7 @@ export {
|
|
|
162
162
|
SubNavItem,
|
|
163
163
|
Switch,
|
|
164
164
|
Tab,
|
|
165
|
+
TabPanel,
|
|
165
166
|
Table,
|
|
166
167
|
TableWrap,
|
|
167
168
|
Tabs,
|
package/dist/tree-model.d.ts
CHANGED
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
interface TreeLike<T> {
|
|
12
12
|
id: string;
|
|
13
13
|
children?: T[];
|
|
14
|
+
/** The display label — typeahead matches it only when it is a plain string (UIX-A11Y-2). */
|
|
15
|
+
label?: unknown;
|
|
16
|
+
/** Explicit typeahead text for nodes whose `label` is not a string (rich ReactNode labels). */
|
|
17
|
+
typeaheadLabel?: string;
|
|
14
18
|
}
|
|
15
19
|
interface FlatNode<T> {
|
|
16
20
|
node: T;
|
package/dist/tree-model.js
CHANGED
|
@@ -40,6 +40,14 @@ function treeNav(flat, currentId, key) {
|
|
|
40
40
|
case " ":
|
|
41
41
|
return cur.hasChildren ? { toggleId: cur.node.id, selectId: cur.node.id } : { selectId: cur.node.id };
|
|
42
42
|
default:
|
|
43
|
+
if (key.length === 1) {
|
|
44
|
+
const q = key.toLowerCase();
|
|
45
|
+
for (let step = 1; step <= flat.length; step++) {
|
|
46
|
+
const f = flat[(idx + step) % flat.length];
|
|
47
|
+
const label = f.node.typeaheadLabel ?? (typeof f.node.label === "string" ? f.node.label : void 0);
|
|
48
|
+
if (label != null && label.toLowerCase().startsWith(q)) return { focusId: f.node.id };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
43
51
|
return {};
|
|
44
52
|
}
|
|
45
53
|
}
|