@assure-one/design-system 1.50.0 → 1.51.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/{brand-scope-ObBYNT0J.d.ts → brand-scope-4F-W2F_m.d.ts} +1 -1
- package/dist/{chunk-HZZGCMRU.js → chunk-AVPJDQUY.js} +3 -3
- package/dist/{chunk-HZZGCMRU.js.map → chunk-AVPJDQUY.js.map} +1 -1
- package/dist/{chunk-GT7A7HP4.js → chunk-KITVNCIJ.js} +159 -31
- package/dist/chunk-KITVNCIJ.js.map +1 -0
- package/dist/{chunk-CRA6WJZ6.js → chunk-TL4NK3KN.js} +4 -3
- package/dist/chunk-TL4NK3KN.js.map +1 -0
- package/dist/css/components.css +1 -1
- package/dist/{data-table-view-Dhcbsxls.d.ts → data-table-view-CwciwQq3.d.ts} +1 -1
- package/dist/{design-system-provider-YblRtwYw.d.ts → design-system-provider-DLS-Nd27.d.ts} +1 -1
- package/dist/index.d.ts +17 -12
- package/dist/index.js +187 -75
- package/dist/index.js.map +1 -1
- package/dist/legacy/index.d.ts +3 -3
- package/dist/legacy/index.js +2 -2
- package/dist/next/index.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/dist/suite/index.d.ts +3 -3
- package/dist/suite/index.js +2 -2
- package/dist/{types-CKpkEBvW.d.ts → types-iJjWtP6z.d.ts} +2 -0
- package/docs/components.md +2 -2
- package/docs/components.registry.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-CRA6WJZ6.js.map +0 -1
- package/dist/chunk-GT7A7HP4.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { ReactNode, CSSProperties, RefObject } from 'react';
|
|
|
3
3
|
import { V as Variant, I as Intent, C as ControlSize, S as Shape } from './vocab-DornLJbW.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
|
-
import { S as SelectMessages, T as TableMessages } from './types-
|
|
6
|
+
import { S as SelectMessages, T as TableMessages } from './types-iJjWtP6z.js';
|
|
7
7
|
import { a as BrandTheme } from './brand-theme-ZYM867Jz.js';
|
|
8
8
|
import { O as Option } from './option-izy_4w4Z.js';
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ComponentType, AnchorHTMLAttributes, Ref, ReactNode, ImgHTMLAttributes } from 'react';
|
|
3
|
-
import { D as DsMessageNamespace, a as DsMessages, b as DsMessagesOverride } from './types-
|
|
3
|
+
import { D as DsMessageNamespace, a as DsMessages, b as DsMessagesOverride } from './types-iJjWtP6z.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* L0 foundation (W5-21, ADR-010). The adapters through which the design
|
package/dist/index.d.ts
CHANGED
|
@@ -11,15 +11,15 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
11
11
|
import { VariantProps } from 'class-variance-authority';
|
|
12
12
|
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
13
13
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
14
|
-
import { c as AvatarSlot, d as FileUploadSlot, I as InputSlot, N as NumberInputSlot, P as PhoneFieldSlot, e as SearchInputSlot, f as ThemeDensity, g as TextareaSlot, h as BadgeSize, i as BadgeShape, j as DataTableController, k as DataTableSlot, l as TableProps, m as DataTableRowModel } from './data-table-view-
|
|
15
|
-
export { n as AlertDialogSlot, o as Badge, p as BadgeAppearance, q as BadgeAppearanceInput, r as BadgeLegacyVariant, B as BadgeProps, s as BadgeSlot, t as BadgeVariant, u as BadgeVariantsProps, v as ButtonSlot, C as CardSlot, w as CheckboxSlot, x as ChipSlot, y as CodeSlot, z as ComboboxSlot, E as CommandSlot, G as ContextMenuSlot, H as ConversationHeaderSlot, J as ConversationRowSlot, K as DataTable, L as DataTableAccessor, O as DataTableAriaSort, Q as DataTableBody, R as DataTableBodyProps, U as DataTableCell, V as DataTableCellDue, W as DataTableCellDueProps, X as DataTableCellId, Y as DataTableCellMono, Z as DataTableCellName, _ as DataTableCellProps, $ as DataTableCellSecondary, a0 as DataTableCellSecondaryProps, a1 as DataTableCheckbox, a2 as DataTableCheckboxProps, a3 as DataTableColumn, a4 as DataTableColumnOrderApi, a5 as DataTableColumnOrderState, a6 as DataTableColumnPinningApi, a7 as DataTableColumnPinningState, a8 as DataTableColumnVisibilityApi, a9 as DataTableColumnVisibilityState, aa as DataTableColumnWidthsApi, ab as DataTableColumnWidthsState, ac as DataTableFilterDefinition, ad as DataTableFilterValue, ae as DataTableFiltersApi, af as DataTableFiltersState, ag as DataTableHead, ah as DataTableHeadProps, ai as DataTableHeader, aj as DataTableHeaderProps, ak as DataTableLoadMore, al as DataTableLoadMoreProps, am as DataTableMultiSortingState, an as DataTablePaginationApi, ao as DataTablePaginationState, ap as DataTableProps, aq as DataTableResultsCount, ar as DataTableResultsCountProps, as as DataTableRow, at as DataTableRowProps, au as DataTableSearch, av as DataTableSearchApi, aw as DataTableSearchProps, ax as DataTableSelectionApi, ay as DataTableSelectionState, az as DataTableSortDirection, aA as DataTableSortToggleOptions, aB as DataTableSortValue, aC as DataTableSortingApi, aD as DataTableSortingState, aE as DataTableSpacer, aF as DataTableSpacerProps, aG as DataTableSpacerRow, aH as DataTableSpacerRowProps, aI as DataTableState, aJ as DataTableToolbar, aK as DataTableToolbarProps, aL as DataTableView, aM as DataTableViewColumn, aN as DataTableViewFilter, aO as DataTableViewProps, aP as DataTableViewSelection, aQ as DataTableViewSort, aR as DataTableVirtualRows, aS as DialogSlot, aT as DropdownMenuSlot, aU as EmptyValue, aV as FieldSlot, aW as FieldsetSlot, aX as FileChip, aY as FileChipProps, F as FileKind, aZ as FilterChipsSlot, a_ as HeadingSlot, a$ as IconButtonSlot, b0 as InlineSlot, b1 as KbdSlot, b2 as LabelSlot, b3 as LinkButtonSlot, b4 as ListPageSlot, b5 as MessageBubbleSlot, b6 as PaginationSlot, b7 as PeopleListSlot, b8 as PopoverSlot, b9 as PressableSlot, ba as RadioGroupSlot, bb as SERVICE_TONES, bc as Select, bd as SelectClassNames, be as SelectContent, bf as SelectContentProps, bg as SelectGroup, bh as SelectItem, bi as SelectLabel, bj as SelectOption, bk as SelectProps, bl as SelectRoot, bm as SelectScrollDownButton, bn as SelectScrollUpButton, bo as SelectSeparator, S as SelectSize, bp as SelectSlot, bq as SelectTrigger, br as SelectTriggerProps, bs as SelectValue, a as ServiceTone, bt as SheetSlot, bu as ShellSlot, bv as SideDrawerSlot, bw as SidebarBrandSwitcherSlot, bx as SidebarSlot, by as SortDirection, bz as StackSlot, bA as StatStripSlot, bB as StatusBadgeSlot, bC as SurfaceSlot, bD as SwitchSlot, bE as Table, bF as TableBody, bG as TableBodyProps, bH as TableCaption, bI as TableCaptionProps, bJ as TableCell, bK as TableCellAlign, bL as TableCellCommonProps, bM as TableCellProps, bN as TableCellSecondary, bO as TableCellSecondaryProps, bP as TableFooter, bQ as TableFooterProps, bR as TableGroupRow, bS as TableGroupRowProps, bT as TableGroupRowSubtotal, bU as TableHead, bV as TableHeadProps, bW as TableHeader, bX as TableHeaderProps, bY as TableHeaderStyle, bZ as TableRow, b_ as TableRowData, b$ as TableRowProps, c0 as TableSlot, c1 as TableSortChangeMeta, c2 as TableSortDirection, c3 as TableStickyEdge, c4 as TableTone, c5 as TextSlot, c6 as ThemeBrand, c7 as ThemeDirection, c8 as ThemeScheme, c9 as ThemeScope, ca as ThemeScopeProps, cb as ThemeScopeValue, cc as ThreadDividerSlot, cd as ThreadEventSlot, ce as ToastSlot, cf as TooltipSlot, cg as UseDataTableOptions, ch as UseDataTableVirtualRowsOptions, ci as UseScrollRestorationOptions, cj as badgeVariants, ck as compareSortValues, cl as nextSortDirection, cm as resolveBadgeAppearance, cn as serviceToneLabel, co as serviceToneStyle, cp as useDataTable, cq as useDataTableVirtualRows, cr as useScrollRestoration } from './data-table-view-
|
|
14
|
+
import { c as AvatarSlot, d as FileUploadSlot, I as InputSlot, N as NumberInputSlot, P as PhoneFieldSlot, e as SearchInputSlot, f as ThemeDensity, g as TextareaSlot, h as BadgeSize, i as BadgeShape, j as DataTableController, k as DataTableSlot, l as TableProps, m as DataTableRowModel } from './data-table-view-CwciwQq3.js';
|
|
15
|
+
export { n as AlertDialogSlot, o as Badge, p as BadgeAppearance, q as BadgeAppearanceInput, r as BadgeLegacyVariant, B as BadgeProps, s as BadgeSlot, t as BadgeVariant, u as BadgeVariantsProps, v as ButtonSlot, C as CardSlot, w as CheckboxSlot, x as ChipSlot, y as CodeSlot, z as ComboboxSlot, E as CommandSlot, G as ContextMenuSlot, H as ConversationHeaderSlot, J as ConversationRowSlot, K as DataTable, L as DataTableAccessor, O as DataTableAriaSort, Q as DataTableBody, R as DataTableBodyProps, U as DataTableCell, V as DataTableCellDue, W as DataTableCellDueProps, X as DataTableCellId, Y as DataTableCellMono, Z as DataTableCellName, _ as DataTableCellProps, $ as DataTableCellSecondary, a0 as DataTableCellSecondaryProps, a1 as DataTableCheckbox, a2 as DataTableCheckboxProps, a3 as DataTableColumn, a4 as DataTableColumnOrderApi, a5 as DataTableColumnOrderState, a6 as DataTableColumnPinningApi, a7 as DataTableColumnPinningState, a8 as DataTableColumnVisibilityApi, a9 as DataTableColumnVisibilityState, aa as DataTableColumnWidthsApi, ab as DataTableColumnWidthsState, ac as DataTableFilterDefinition, ad as DataTableFilterValue, ae as DataTableFiltersApi, af as DataTableFiltersState, ag as DataTableHead, ah as DataTableHeadProps, ai as DataTableHeader, aj as DataTableHeaderProps, ak as DataTableLoadMore, al as DataTableLoadMoreProps, am as DataTableMultiSortingState, an as DataTablePaginationApi, ao as DataTablePaginationState, ap as DataTableProps, aq as DataTableResultsCount, ar as DataTableResultsCountProps, as as DataTableRow, at as DataTableRowProps, au as DataTableSearch, av as DataTableSearchApi, aw as DataTableSearchProps, ax as DataTableSelectionApi, ay as DataTableSelectionState, az as DataTableSortDirection, aA as DataTableSortToggleOptions, aB as DataTableSortValue, aC as DataTableSortingApi, aD as DataTableSortingState, aE as DataTableSpacer, aF as DataTableSpacerProps, aG as DataTableSpacerRow, aH as DataTableSpacerRowProps, aI as DataTableState, aJ as DataTableToolbar, aK as DataTableToolbarProps, aL as DataTableView, aM as DataTableViewColumn, aN as DataTableViewFilter, aO as DataTableViewProps, aP as DataTableViewSelection, aQ as DataTableViewSort, aR as DataTableVirtualRows, aS as DialogSlot, aT as DropdownMenuSlot, aU as EmptyValue, aV as FieldSlot, aW as FieldsetSlot, aX as FileChip, aY as FileChipProps, F as FileKind, aZ as FilterChipsSlot, a_ as HeadingSlot, a$ as IconButtonSlot, b0 as InlineSlot, b1 as KbdSlot, b2 as LabelSlot, b3 as LinkButtonSlot, b4 as ListPageSlot, b5 as MessageBubbleSlot, b6 as PaginationSlot, b7 as PeopleListSlot, b8 as PopoverSlot, b9 as PressableSlot, ba as RadioGroupSlot, bb as SERVICE_TONES, bc as Select, bd as SelectClassNames, be as SelectContent, bf as SelectContentProps, bg as SelectGroup, bh as SelectItem, bi as SelectLabel, bj as SelectOption, bk as SelectProps, bl as SelectRoot, bm as SelectScrollDownButton, bn as SelectScrollUpButton, bo as SelectSeparator, S as SelectSize, bp as SelectSlot, bq as SelectTrigger, br as SelectTriggerProps, bs as SelectValue, a as ServiceTone, bt as SheetSlot, bu as ShellSlot, bv as SideDrawerSlot, bw as SidebarBrandSwitcherSlot, bx as SidebarSlot, by as SortDirection, bz as StackSlot, bA as StatStripSlot, bB as StatusBadgeSlot, bC as SurfaceSlot, bD as SwitchSlot, bE as Table, bF as TableBody, bG as TableBodyProps, bH as TableCaption, bI as TableCaptionProps, bJ as TableCell, bK as TableCellAlign, bL as TableCellCommonProps, bM as TableCellProps, bN as TableCellSecondary, bO as TableCellSecondaryProps, bP as TableFooter, bQ as TableFooterProps, bR as TableGroupRow, bS as TableGroupRowProps, bT as TableGroupRowSubtotal, bU as TableHead, bV as TableHeadProps, bW as TableHeader, bX as TableHeaderProps, bY as TableHeaderStyle, bZ as TableRow, b_ as TableRowData, b$ as TableRowProps, c0 as TableSlot, c1 as TableSortChangeMeta, c2 as TableSortDirection, c3 as TableStickyEdge, c4 as TableTone, c5 as TextSlot, c6 as ThemeBrand, c7 as ThemeDirection, c8 as ThemeScheme, c9 as ThemeScope, ca as ThemeScopeProps, cb as ThemeScopeValue, cc as ThreadDividerSlot, cd as ThreadEventSlot, ce as ToastSlot, cf as TooltipSlot, cg as UseDataTableOptions, ch as UseDataTableVirtualRowsOptions, ci as UseScrollRestorationOptions, cj as badgeVariants, ck as compareSortValues, cl as nextSortDirection, cm as resolveBadgeAppearance, cn as serviceToneLabel, co as serviceToneStyle, cp as useDataTable, cq as useDataTableVirtualRows, cr as useScrollRestoration } from './data-table-view-CwciwQq3.js';
|
|
16
16
|
import { DayPickerProps } from 'react-day-picker';
|
|
17
17
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
18
|
-
import { C as ComboboxSize, c as ComboboxMultipleProps, d as ComboboxProps } from './brand-scope-
|
|
19
|
-
export { e as BrandScope, f as BrandScopeProps, g as BrandScopeProvider, h as Combobox, i as ComboboxBaseProps, j as ComboboxClassNames, k as ComboboxOptionState, l as ComboboxSelectionControls, m as ComboboxSingleProps, D as DEFAULT_COMBOBOX_MESSAGES, n as brandScope, u as useBrandScope } from './brand-scope-
|
|
18
|
+
import { C as ComboboxSize, c as ComboboxMultipleProps, d as ComboboxProps } from './brand-scope-4F-W2F_m.js';
|
|
19
|
+
export { e as BrandScope, f as BrandScopeProps, g as BrandScopeProvider, h as Combobox, i as ComboboxBaseProps, j as ComboboxClassNames, k as ComboboxOptionState, l as ComboboxSelectionControls, m as ComboboxSingleProps, D as DEFAULT_COMBOBOX_MESSAGES, n as brandScope, u as useBrandScope } from './brand-scope-4F-W2F_m.js';
|
|
20
20
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
21
|
-
import { d as CommandPaletteMessages, e as ConfirmMessages, f as CopyButtonMessages, E as ErrorStateMessages, F as FileUploadMessages, K as KeyboardShortcutsMessages, P as PaginationMessages, g as PhoneFieldMessages, h as SearchInputMessages, i as TableDensityMessages, j as ToastMessages, k as FieldMessages, l as TableStatesMessages, m as DisplayMenuMessages, n as DisplayMenuFiltersMessages, o as FilterChipsMessages, L as ListPageMessages, p as DataTableMessages } from './types-
|
|
22
|
-
export { B as BulkActionBarMessages, C as ComboboxMessages, D as DsMessageNamespace, a as DsMessages, b as DsMessagesOverride, S as SelectMessages, q as StatStripMessages, T as TableMessages } from './types-
|
|
21
|
+
import { d as CommandPaletteMessages, e as ConfirmMessages, f as CopyButtonMessages, E as ErrorStateMessages, F as FileUploadMessages, K as KeyboardShortcutsMessages, P as PaginationMessages, g as PhoneFieldMessages, h as SearchInputMessages, i as TableDensityMessages, j as ToastMessages, k as FieldMessages, l as TableStatesMessages, m as DisplayMenuMessages, n as DisplayMenuFiltersMessages, o as FilterChipsMessages, L as ListPageMessages, p as DataTableMessages } from './types-iJjWtP6z.js';
|
|
22
|
+
export { B as BulkActionBarMessages, C as ComboboxMessages, D as DsMessageNamespace, a as DsMessages, b as DsMessagesOverride, S as SelectMessages, q as StatStripMessages, T as TableMessages } from './types-iJjWtP6z.js';
|
|
23
23
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
24
24
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
25
25
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -39,7 +39,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
39
39
|
import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';
|
|
40
40
|
import { O as Option } from './option-izy_4w4Z.js';
|
|
41
41
|
export { a as OptionAccessors } from './option-izy_4w4Z.js';
|
|
42
|
-
export { a as DesignSystemProvider, D as DesignSystemProviderProps, b as DsDirection, I as ImageComponent, c as ImageComponentProps, L as LinkComponent, d as LinkComponentProps, T as TooltipDefaults, u as useDsMessages } from './design-system-provider-
|
|
42
|
+
export { a as DesignSystemProvider, D as DesignSystemProviderProps, b as DsDirection, I as ImageComponent, c as ImageComponentProps, L as LinkComponent, d as LinkComponentProps, T as TooltipDefaults, u as useDsMessages } from './design-system-provider-DLS-Nd27.js';
|
|
43
43
|
import { ClassValue } from 'clsx';
|
|
44
44
|
import '@radix-ui/react-select';
|
|
45
45
|
import './brand-theme-ZYM867Jz.js';
|
|
@@ -4884,11 +4884,16 @@ declare const QuestionnairePanel: React$1.ForwardRefExoticComponent<Questionnair
|
|
|
4884
4884
|
|
|
4885
4885
|
/**
|
|
4886
4886
|
* FolderTree — collapsible document tree (Documents panel / mobile sheet).
|
|
4887
|
-
* Rows are chevron + folder + name + optional count.
|
|
4888
|
-
*
|
|
4889
|
-
*
|
|
4890
|
-
*
|
|
4891
|
-
*
|
|
4887
|
+
* Rows are chevron + folder + name + optional count.
|
|
4888
|
+
*
|
|
4889
|
+
* Follows the WAI-ARIA tree view pattern: one `tree`, one focusable
|
|
4890
|
+
* `treeitem` per folder with roving tabindex, and the keyboard model screen
|
|
4891
|
+
* reader users expect (↑/↓ move, → opens or enters, ← closes or leaves,
|
|
4892
|
+
* Home/End, Enter/Space select, type-ahead by name). A row keeps two pointer
|
|
4893
|
+
* intents — the chevron toggles, the rest of the row selects — but neither is
|
|
4894
|
+
* a separate tab stop: a `treeitem` may not contain interactive descendants,
|
|
4895
|
+
* and the item itself already exposes both intents through `aria-expanded`
|
|
4896
|
+
* and the arrow keys.
|
|
4892
4897
|
*
|
|
4893
4898
|
* Sizing matches the firm Documents workspace: 12px name rows, a 13px
|
|
4894
4899
|
* chevron column, 14px folder glyphs, and a flush-right tabular count pill.
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Skeleton, ToggleGroup, ToggleGroupItem, useOverflowTooltip, badgeVariants, DataTableBody, DataTableRow, DataTableCell, Badge, VisuallyHidden, ProgressBar, Pagination, TableBody, TableRow, TableCell, Table, TableHeader, TableHead } from './chunk-
|
|
3
|
-
export { Badge, DATA_TABLE_NO_GROUPING, DataTable, DataTableBody, DataTableCell, DataTableCellDue, DataTableCellId, DataTableCellMono, DataTableCellName, DataTableCellSecondary, DataTableCheckbox, DataTableHead, DataTableHeader, DataTableHeaderMenu, DataTableLoadMore, DataTablePagination, DataTableResultsCount, DataTableRow, DataTableSearch, DataTableSpacer, DataTableSpacerRow, DataTableToolbar, DataTableView, EmptyValue, PROGRESS_LEGACY_TO_INTENT, Pagination, ProgressBar, ProgressRing, SERVICE_TONES, STATUS_DOT_TONE_TO_INTENT, SegmentedProgress, Skeleton, SkeletonCircle, SkeletonText, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableCellSecondary, TableFooter, TableGroupRow, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, ToggleGroup, ToggleGroupItem, VisuallyHidden, badgeVariants, compareSortValues, nextSortDirection, progressBarVariants, progressRingVariants, resolveBadgeAppearance, serviceToneLabel, serviceToneStyle, statusDotVariants, useDataTable, useDataTableGrouping, useDataTableVirtualRows, useScrollRestoration } from './chunk-
|
|
4
|
-
import { Collapsible, CollapsibleTrigger, CollapsibleContent, PlainLink, Combobox, Sidebar, SidebarFooter, SidebarUser, Chip, useSidebarState, SidebarSection, SidebarLinkGroup, SidebarLink, SidebarLinkLabel, SidebarLinkBadge, CmdkCompatContext, Sheet, SheetContent, SheetTitle } from './chunk-
|
|
5
|
-
export { BrandScope, BrandScopeProvider, Chip, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, DEFAULT_COMBOBOX_MESSAGES, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBrand, SidebarBrandText, SidebarDrawer, SidebarFooter, SidebarLink, SidebarLinkAction, SidebarLinkBadge, SidebarLinkGroup, SidebarLinkLabel, SidebarPinButton, SidebarProvider, SidebarSection, SidebarTrigger, SidebarUser, assetPath, brandScope, chipVariants, getAssetBasePath, resolveChipStyle, setAssetBasePath, sidebarLinkBadgeVariants, useBrandScope, useSidebarPeekLock, useSidebarState } from './chunk-
|
|
6
|
-
import { withPortalContainer, Backdrop, alertDialogAnatomy, OverlaySurface, OverlayTitle, OverlayDescription, Button, slot, useDsMessages, useLinkComponent, surfaceAnatomy, stateAttributes, cardAnatomy, ModalPortal, kbdAnatomy, FieldContext, fieldAnatomy, useFieldContext, MENU_SUB_TRIGGER_CHEVRON, menuSubTriggerClasses, MENU_INSET, contextMenuAnatomy, presence, menuItemClasses, MENU_ITEM_DANGER, MENU_INDICATOR_WELL, MENU_CHECK_GLYPH, menuIndicatorItemClasses, MENU_RADIO_GLYPH, menuLabelClasses, menuSeparatorClasses, useFieldControl, useMergedRefs, joinIds, Popover, PopoverTrigger, PopoverContent, FormBridge, CONTROL_SIZE_CLASSES, dialogAnatomy, DismissButton, DEFAULT_OVERLAY_MESSAGES, DISMISS_GLYPH_CLASSES, OverlayBody, headingAnatomy, deprecate, floatingSurfaceClasses, FLOATING_PADDING, FLOATING_WIDTH, labelAnatomy, warnLegacyButtonProps, resolveButtonIcons, buttonVariants, INERT_CLASSES, DISABLED_LOOK_CLASSES, inertHandlers, INERT_ATTRIBUTES, linkButtonAnatomy, useControllableState, controlChrome, mergeRefs, numberInputAnatomy, EN_MESSAGES, phoneFieldAnatomy, Input, useFieldsetContext, useFormReset2, radioGroupAnatomy, microInteractions, CONTROL_LABEL_TEXT, searchInputAnatomy, IconButton, Tooltip, TooltipTrigger, TooltipContent, codeAnatomy, textAnatomy, Slot, stackAnatomy, inlineAnatomy, statusBadgeAnatomy, useFieldsetState, FieldsetContext, fieldsetAnatomy, useFieldsetLegend, shellAnatomy, Avatar, messageBubbleAnatomy, useId as useId$1, partId, statStripAnatomy, Pressable, Spinner, DropdownMenuItem, filterChipsAnatomy, listPageAnatomy, dataTableAnatomy, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuCheckboxItem, threadEventAnatomy, threadDividerAnatomy, conversationRowAnatomy, conversationHeaderAnatomy, peopleListAnatomy, errorOnce, isLabelable, Select, Checkbox, FIELD_PARTS, SelectRoot, SelectTrigger, SelectValue, SelectContent, SelectItem, OverlayHeader, OverlayFooter, commandAnatomy, menuShortcutClasses, useFormReset, sideDrawerAnatomy, Portal, toastAnatomy, useExitPresence, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, TooltipProvider, TOOLTIP_DEFAULT_DELAY_MS, DesignSystemContext, PortalContainerContext, ModalRoot, ModalOverlay, ModalContent, ModalTitle, ModalDescription } from './chunk-
|
|
7
|
-
export { Avatar, Button, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileChip, FileUpload, IconButton, Input, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Pressable, SPINNER_TONE_TO_INTENT, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Spinner, Textarea, ThemeScope, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, buttonVariants, iconButtonVariants, inputVariants, resolveButtonStyle, spinnerVariants, textareaVariants, useDsMessages, useFieldControl } from './chunk-
|
|
2
|
+
import { Skeleton, ToggleGroup, ToggleGroupItem, useOverflowTooltip, badgeVariants, DataTableBody, DataTableRow, DataTableCell, Badge, VisuallyHidden, ProgressBar, Pagination, TableBody, TableRow, TableCell, Table, TableHeader, TableHead } from './chunk-AVPJDQUY.js';
|
|
3
|
+
export { Badge, DATA_TABLE_NO_GROUPING, DataTable, DataTableBody, DataTableCell, DataTableCellDue, DataTableCellId, DataTableCellMono, DataTableCellName, DataTableCellSecondary, DataTableCheckbox, DataTableHead, DataTableHeader, DataTableHeaderMenu, DataTableLoadMore, DataTablePagination, DataTableResultsCount, DataTableRow, DataTableSearch, DataTableSpacer, DataTableSpacerRow, DataTableToolbar, DataTableView, EmptyValue, PROGRESS_LEGACY_TO_INTENT, Pagination, ProgressBar, ProgressRing, SERVICE_TONES, STATUS_DOT_TONE_TO_INTENT, SegmentedProgress, Skeleton, SkeletonCircle, SkeletonText, StatusDot, Switch, Table, TableBody, TableCaption, TableCell, TableCellSecondary, TableFooter, TableGroupRow, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, ToggleGroup, ToggleGroupItem, VisuallyHidden, badgeVariants, compareSortValues, nextSortDirection, progressBarVariants, progressRingVariants, resolveBadgeAppearance, serviceToneLabel, serviceToneStyle, statusDotVariants, useDataTable, useDataTableGrouping, useDataTableVirtualRows, useScrollRestoration } from './chunk-AVPJDQUY.js';
|
|
4
|
+
import { Collapsible, CollapsibleTrigger, CollapsibleContent, PlainLink, Combobox, Sidebar, SidebarFooter, SidebarUser, Chip, useSidebarState, SidebarSection, SidebarLinkGroup, SidebarLink, SidebarLinkLabel, SidebarLinkBadge, CmdkCompatContext, Sheet, SheetContent, SheetTitle } from './chunk-KITVNCIJ.js';
|
|
5
|
+
export { BrandScope, BrandScopeProvider, Chip, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, DEFAULT_COMBOBOX_MESSAGES, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBrand, SidebarBrandText, SidebarDrawer, SidebarFooter, SidebarLink, SidebarLinkAction, SidebarLinkBadge, SidebarLinkGroup, SidebarLinkLabel, SidebarPinButton, SidebarProvider, SidebarSection, SidebarTrigger, SidebarUser, assetPath, brandScope, chipVariants, getAssetBasePath, resolveChipStyle, setAssetBasePath, sidebarLinkBadgeVariants, useBrandScope, useSidebarPeekLock, useSidebarState } from './chunk-KITVNCIJ.js';
|
|
6
|
+
import { withPortalContainer, Backdrop, alertDialogAnatomy, OverlaySurface, OverlayTitle, OverlayDescription, Button, slot, useDsMessages, useLinkComponent, surfaceAnatomy, stateAttributes, cardAnatomy, ModalPortal, kbdAnatomy, FieldContext, fieldAnatomy, useFieldContext, MENU_SUB_TRIGGER_CHEVRON, menuSubTriggerClasses, MENU_INSET, contextMenuAnatomy, presence, menuItemClasses, MENU_ITEM_DANGER, MENU_INDICATOR_WELL, MENU_CHECK_GLYPH, menuIndicatorItemClasses, MENU_RADIO_GLYPH, menuLabelClasses, menuSeparatorClasses, useFieldControl, useMergedRefs, joinIds, Popover, PopoverTrigger, PopoverContent, FormBridge, CONTROL_SIZE_CLASSES, dialogAnatomy, DismissButton, DEFAULT_OVERLAY_MESSAGES, DISMISS_GLYPH_CLASSES, OverlayBody, headingAnatomy, deprecate, floatingSurfaceClasses, FLOATING_PADDING, FLOATING_WIDTH, labelAnatomy, warnLegacyButtonProps, resolveButtonIcons, buttonVariants, INERT_CLASSES, DISABLED_LOOK_CLASSES, inertHandlers, INERT_ATTRIBUTES, linkButtonAnatomy, useControllableState, controlChrome, mergeRefs, numberInputAnatomy, EN_MESSAGES, phoneFieldAnatomy, Input, useFieldsetContext, useFormReset2, radioGroupAnatomy, microInteractions, CONTROL_LABEL_TEXT, searchInputAnatomy, IconButton, Tooltip, TooltipTrigger, TooltipContent, codeAnatomy, textAnatomy, Slot, stackAnatomy, inlineAnatomy, statusBadgeAnatomy, useFieldsetState, FieldsetContext, fieldsetAnatomy, useFieldsetLegend, shellAnatomy, Avatar, messageBubbleAnatomy, useId as useId$1, partId, statStripAnatomy, Pressable, Spinner, DropdownMenuItem, filterChipsAnatomy, listPageAnatomy, dataTableAnatomy, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuCheckboxItem, threadEventAnatomy, threadDividerAnatomy, conversationRowAnatomy, conversationHeaderAnatomy, peopleListAnatomy, errorOnce, isLabelable, Select, Checkbox, FIELD_PARTS, SelectRoot, SelectTrigger, SelectValue, SelectContent, SelectItem, OverlayHeader, OverlayFooter, commandAnatomy, menuShortcutClasses, useFormReset, sideDrawerAnatomy, Portal, toastAnatomy, useExitPresence, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, TooltipProvider, TOOLTIP_DEFAULT_DELAY_MS, DesignSystemContext, PortalContainerContext, ModalRoot, ModalOverlay, ModalContent, ModalTitle, ModalDescription } from './chunk-TL4NK3KN.js';
|
|
7
|
+
export { Avatar, Button, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileChip, FileUpload, IconButton, Input, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverPortal, PopoverTrigger, Pressable, SPINNER_TONE_TO_INTENT, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectRoot, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Spinner, Textarea, ThemeScope, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, buttonVariants, iconButtonVariants, inputVariants, resolveButtonStyle, spinnerVariants, textareaVariants, useDsMessages, useFieldControl } from './chunk-TL4NK3KN.js';
|
|
8
8
|
import { cn, ChevronDownIcon, EyeIcon, DownloadIcon, ChevronRightIcon, CheckIcon, CircleIcon, CopyIcon, CalendarIcon, XIcon, AlertTriangleIcon, ArrowRightIcon, ArrowLeftIcon, FileTextIcon, ZoomOutIcon, ZoomInIcon, lucideIcon, SquareExclamationPointIcon, TrendingUpIcon, TrendingDownIcon, SearchIcon, TableIcon, StarIcon, RowsIcon, Rows4Icon, ListChecksIcon, CheckCircleSolidIcon, HelpCircleIcon, UserIcon, SendIcon, SettingsIcon, ChevronUpIcon, ClockIcon, XCircleIcon, CheckCircle2Icon, InfoIcon, ChevronLeftIcon, FolderOpenIcon, FolderClosedIcon, MinusIcon, Icon, ChartNoAxesColumnIncreasingIcon, MoreHorizontalIcon, AlertCircleIcon, PlusIcon, CircleDashedIcon, LoaderIcon, InfoCircleSolidIcon, AlertTriangleSolidIcon, XCircleSolidIcon, RotateCcwIcon, CommandIcon, GripVerticalIcon, LockIcon, ArrowUpIcon, ArrowDownIcon } from './chunk-ARCWF2S3.js';
|
|
9
9
|
export { AlertCircleIcon, AlertTriangleIcon, AlertTriangleSolidIcon, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, AppWindowIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowRightSmallIcon, ArrowUpIcon, ArrowUpRightIcon, AtSignIcon, BanIcon, BarChartIcon, BellIcon, BellRingIcon, BoldIcon, BookTextIcon, BrainIcon, BriefcaseIcon, Building2Icon, BuildingIcon, CalculatorIcon, CalendarIcon, CameraIcon, ChartNoAxesColumnIncreasingIcon, ChatBubbleIcon, CheckCheckIcon, CheckCircle2Icon, CheckCircleSolidIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpDownIcon, CircleDashedIcon, CircleDotIcon, CircleIcon, ClipboardCheckIcon, ClockAlertIcon, ClockIcon, CloseIcon, CommandIcon, CopyIcon, CornerDownLeftIcon, CreditCardIcon, DecimalsArrowLeftIcon, DecimalsArrowRightIcon, DocumentIcon, DollarSignIcon, DownloadIcon, ExternalLinkIcon, ExtractIcon, EyeIcon, EyeOffIcon, FileChartColumnIcon, FileIcon, FilePlusIcon, FileReturnIcon, FileTextIcon, FilterIcon, FlagIcon, FolderClosedIcon, FolderDownIcon, FolderOpenIcon, FolderPlusIcon, FolderUpIcon, GlobeIcon, GoogleBrandIcon, GraduationCapIcon, Grid2x2Icon, GripHorizontalIcon, GripVerticalIcon, HelpCircleIcon, HighlighterIcon, HistoryIcon, HomeIcon, InboxIcon, InfoCircleSolidIcon, InfoIcon, ItalicIcon, KanbanIcon, KeyIcon, LandmarkIcon, LayersIcon, LayoutDashboardIcon, LayoutGridIcon, LayoutListIcon, LightningIcon, Link2Icon, LinkIcon, ListChecksIcon, ListIcon, ListOrderedIcon, LoaderIcon, LockIcon, LockKeyholeIcon, LockOpenIcon, LogOutIcon, MailIcon, MapPinIcon, MaximizeIcon, MenuIcon, MessageCircleIcon, MessageCircleMoreIcon, MessageCircleWarningIcon, MicIcon, MicrosoftBrandIcon, MinimizeIcon, MinusIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MousePointer2Icon, MoveIcon, PaletteIcon, PanelLeftCloseIcon, PanelLeftIcon, PanelRightCloseIcon, PanelRightIcon, PaperclipIcon, PauseIcon, PenSignIcon, PenToolIcon, PencilIcon, PercentIcon, PhoneIcon, PinIcon, PinOffIcon, PlayIcon, PlusIcon, ReceiptIcon, RefreshCwIcon, RepeatIcon, ReplyIcon, RotateCcwIcon, Rows4Icon, RowsIcon, SaveIcon, SearchCheckIcon, SearchIcon, SendIcon, SettingsIcon, ShieldIcon, SigmaIcon, SlashIcon, SmartphoneIcon, SparkleIcon, SparklesIcon, SquareExclamationPointIcon, SquareFunctionIcon, SquareIcon, SquarePlayIcon, SquareSquareIcon, StampIcon, StarIcon, StopIcon, StrikethroughIcon, StripeBrandIcon, SunIcon, TableIcon, TagIcon, TeamIcon, ThumbsDownIcon, ThumbsUpIcon, TimerIcon, Trash2Icon, TrashIcon, TrashSolidIcon, TrendingDownIcon, TrendingUpIcon, TypeIcon, UnderlineIcon, Undo2Icon, UploadIcon, UserCircleIcon, UserIcon, UsersIcon, VideoIcon, Volume2Icon, VolumeXIcon, WorkflowIcon, XCircleIcon, XCircleSolidIcon, XIcon, ZoomInIcon, ZoomOutIcon, cn, createIcon, iconCursor, iconToSvg } from './chunk-ARCWF2S3.js';
|
|
10
10
|
export { systemTokens } from './chunk-CPOGSNXS.js';
|
|
@@ -8607,89 +8607,201 @@ QuestionnairePanel.displayName = "QuestionnairePanel";
|
|
|
8607
8607
|
var ROW_BASE = "ds:group/row ds:flex ds:w-full ds:items-center ds:gap-1.5 ds:rounded-lg ds:px-2.5 ds:py-1 ds:text-left ds:text-[12px] ds:font-medium ds:transition-colors ds:duration-[var(--motion-duration-feedback)] ds:motion-reduce:transition-none";
|
|
8608
8608
|
var ROW_INACTIVE = "ds:text-fg-2 ds:hover:bg-surface-2 ds:hover:text-fg";
|
|
8609
8609
|
var ROW_ACTIVE = "ds:bg-brand-bg ds:text-brand ds:font-semibold";
|
|
8610
|
+
var ROW_FOCUS = "ds:[li:focus-visible>&]:[box-shadow:var(--shadow-focus-ring)]";
|
|
8610
8611
|
var BADGE_BASE = "ds:ml-auto ds:min-w-[18px] ds:rounded-full ds:px-[5px] ds:py-px ds:text-center ds:text-[10px] ds:font-[650] ds:tabular-nums";
|
|
8611
8612
|
var BADGE_INACTIVE = "ds:bg-surface-2 ds:text-fg-4";
|
|
8612
8613
|
var BADGE_ACTIVE = "ds:bg-brand-bg ds:text-brand";
|
|
8613
|
-
var FolderTree = forwardRef(function FolderTree2({
|
|
8614
|
+
var FolderTree = forwardRef(function FolderTree2({
|
|
8615
|
+
nodes,
|
|
8616
|
+
activeId,
|
|
8617
|
+
onSelect,
|
|
8618
|
+
defaultOpenIds,
|
|
8619
|
+
openIds,
|
|
8620
|
+
onOpenChange,
|
|
8621
|
+
className,
|
|
8622
|
+
"aria-label": ariaLabel,
|
|
8623
|
+
"aria-labelledby": ariaLabelledBy,
|
|
8624
|
+
...props
|
|
8625
|
+
}, ref) {
|
|
8614
8626
|
const messages = useDsMessages("folderTree");
|
|
8615
8627
|
const isControlled = openIds !== void 0;
|
|
8616
8628
|
const [internalOpen, setInternalOpen] = useState(() => new Set(defaultOpenIds ?? []));
|
|
8617
8629
|
const open = isControlled ? new Set(openIds) : internalOpen;
|
|
8630
|
+
const [focusedId, setFocusedId] = useState();
|
|
8631
|
+
const items = useRef(/* @__PURE__ */ new Map());
|
|
8632
|
+
const idBase = useId();
|
|
8633
|
+
const visible = [];
|
|
8634
|
+
const collect = (list, parentId) => {
|
|
8635
|
+
for (const node of list) {
|
|
8636
|
+
const hasChildren = Boolean(node.children?.length);
|
|
8637
|
+
visible.push({ id: node.id, name: node.name, parentId, hasChildren });
|
|
8638
|
+
if (hasChildren && open.has(node.id)) collect(node.children, node.id);
|
|
8639
|
+
}
|
|
8640
|
+
};
|
|
8641
|
+
collect(nodes, void 0);
|
|
8642
|
+
const isVisible = (id) => id !== void 0 && visible.some((n) => n.id === id);
|
|
8643
|
+
const tabbableId = isVisible(focusedId) ? focusedId : isVisible(activeId) ? activeId : visible[0]?.id;
|
|
8644
|
+
const focusItem = (id) => {
|
|
8645
|
+
if (id === void 0) return;
|
|
8646
|
+
setFocusedId(id);
|
|
8647
|
+
items.current.get(id)?.focus();
|
|
8648
|
+
};
|
|
8649
|
+
const setOpen = (id, next) => {
|
|
8650
|
+
if (open.has(id) === next) return;
|
|
8651
|
+
const nextOpen = new Set(open);
|
|
8652
|
+
if (next) nextOpen.add(id);
|
|
8653
|
+
else nextOpen.delete(id);
|
|
8654
|
+
if (!isControlled) setInternalOpen(nextOpen);
|
|
8655
|
+
onOpenChange?.([...nextOpen]);
|
|
8656
|
+
};
|
|
8618
8657
|
const toggle = (id) => {
|
|
8619
|
-
const
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
onOpenChange?.([...next]);
|
|
8658
|
+
const closing = open.has(id);
|
|
8659
|
+
setOpen(id, !closing);
|
|
8660
|
+
if (closing && focusedId !== void 0 && focusedId !== id) {
|
|
8661
|
+
let cursor = visible.find((n) => n.id === focusedId)?.parentId;
|
|
8662
|
+
while (cursor !== void 0 && cursor !== id) cursor = visible.find((n) => n.id === cursor)?.parentId;
|
|
8663
|
+
if (cursor === id) focusItem(id);
|
|
8626
8664
|
}
|
|
8627
8665
|
};
|
|
8628
|
-
const
|
|
8666
|
+
const onKeyDown = (event) => {
|
|
8667
|
+
const index = visible.findIndex((n) => n.id === tabbableId);
|
|
8668
|
+
const current = visible[index];
|
|
8669
|
+
if (!current || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
8670
|
+
let handled = true;
|
|
8671
|
+
switch (event.key) {
|
|
8672
|
+
case "ArrowDown":
|
|
8673
|
+
focusItem(visible[index + 1]?.id);
|
|
8674
|
+
break;
|
|
8675
|
+
case "ArrowUp":
|
|
8676
|
+
focusItem(visible[index - 1]?.id);
|
|
8677
|
+
break;
|
|
8678
|
+
case "Home":
|
|
8679
|
+
focusItem(visible[0]?.id);
|
|
8680
|
+
break;
|
|
8681
|
+
case "End":
|
|
8682
|
+
focusItem(visible[visible.length - 1]?.id);
|
|
8683
|
+
break;
|
|
8684
|
+
case "ArrowRight":
|
|
8685
|
+
if (current.hasChildren && !open.has(current.id)) setOpen(current.id, true);
|
|
8686
|
+
else if (current.hasChildren) focusItem(visible[index + 1]?.id);
|
|
8687
|
+
break;
|
|
8688
|
+
case "ArrowLeft":
|
|
8689
|
+
if (current.hasChildren && open.has(current.id)) setOpen(current.id, false);
|
|
8690
|
+
else focusItem(current.parentId);
|
|
8691
|
+
break;
|
|
8692
|
+
case "Enter":
|
|
8693
|
+
case " ":
|
|
8694
|
+
onSelect?.(current.id);
|
|
8695
|
+
break;
|
|
8696
|
+
default: {
|
|
8697
|
+
handled = false;
|
|
8698
|
+
if (event.key.length !== 1 || !/\S/.test(event.key)) break;
|
|
8699
|
+
const key = event.key.toLocaleLowerCase();
|
|
8700
|
+
for (let step = 1; step <= visible.length; step++) {
|
|
8701
|
+
const candidate = visible[(index + step) % visible.length];
|
|
8702
|
+
if (candidate.name.toLocaleLowerCase().startsWith(key)) {
|
|
8703
|
+
focusItem(candidate.id);
|
|
8704
|
+
handled = true;
|
|
8705
|
+
break;
|
|
8706
|
+
}
|
|
8707
|
+
}
|
|
8708
|
+
}
|
|
8709
|
+
}
|
|
8710
|
+
if (handled) event.preventDefault();
|
|
8711
|
+
};
|
|
8712
|
+
const renderNode = (node, depth, position, setSize) => {
|
|
8629
8713
|
const hasChildren = Boolean(node.children?.length);
|
|
8630
8714
|
const isOpen = open.has(node.id);
|
|
8631
8715
|
const isActive = activeId === node.id;
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
}
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8716
|
+
const labelId = `${idBase}-${node.id}`;
|
|
8717
|
+
return /* @__PURE__ */ jsxs(
|
|
8718
|
+
"li",
|
|
8719
|
+
{
|
|
8720
|
+
ref: (el) => {
|
|
8721
|
+
if (el) items.current.set(node.id, el);
|
|
8722
|
+
else items.current.delete(node.id);
|
|
8723
|
+
},
|
|
8724
|
+
role: "treeitem",
|
|
8725
|
+
"aria-labelledby": labelId,
|
|
8726
|
+
"aria-level": depth + 1,
|
|
8727
|
+
"aria-posinset": position,
|
|
8728
|
+
"aria-setsize": setSize,
|
|
8729
|
+
"aria-expanded": hasChildren ? isOpen : void 0,
|
|
8730
|
+
"aria-selected": isActive,
|
|
8731
|
+
tabIndex: node.id === tabbableId ? 0 : -1,
|
|
8732
|
+
onFocus: (event) => {
|
|
8733
|
+
if (event.target === event.currentTarget) setFocusedId(node.id);
|
|
8734
|
+
},
|
|
8735
|
+
className: "ds:relative ds:outline-none",
|
|
8736
|
+
children: [
|
|
8737
|
+
depth > 0 && /* @__PURE__ */ jsx(
|
|
8738
|
+
"span",
|
|
8739
|
+
{
|
|
8740
|
+
"aria-hidden": true,
|
|
8741
|
+
className: "ds:pointer-events-none ds:absolute ds:left-[-11px] ds:top-0 ds:bottom-0 ds:w-px ds:bg-[color:var(--color-rule-strong)]"
|
|
8742
|
+
}
|
|
8743
|
+
),
|
|
8744
|
+
/* @__PURE__ */ jsxs(
|
|
8745
|
+
"div",
|
|
8746
|
+
{
|
|
8747
|
+
onClick: () => onSelect?.(node.id),
|
|
8748
|
+
className: cn(ROW_BASE, ROW_FOCUS, "ds:cursor-pointer", isActive ? ROW_ACTIVE : ROW_INACTIVE),
|
|
8749
|
+
children: [
|
|
8750
|
+
hasChildren ? /* @__PURE__ */ jsx(
|
|
8751
|
+
"span",
|
|
8752
|
+
{
|
|
8753
|
+
"aria-hidden": true,
|
|
8754
|
+
onClick: (e) => {
|
|
8755
|
+
e.stopPropagation();
|
|
8756
|
+
toggle(node.id);
|
|
8757
|
+
},
|
|
8758
|
+
className: cn(
|
|
8759
|
+
"ds:shrink-0 ds:rounded-icon ds:text-fg-4 ds:hover:text-fg-2",
|
|
8760
|
+
"ds:transition-[color,transform] ds:duration-[var(--motion-duration-feedback)] ds:ease-[var(--motion-ease-enter)] ds:motion-reduce:transition-none",
|
|
8761
|
+
isOpen && "ds:rotate-90"
|
|
8762
|
+
),
|
|
8763
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: 13, "aria-hidden": "true" })
|
|
8764
|
+
}
|
|
8765
|
+
) : /* @__PURE__ */ jsx("span", { className: "ds:w-[13px] ds:shrink-0", "aria-hidden": true }),
|
|
8766
|
+
/* @__PURE__ */ jsxs("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:items-center ds:gap-1.5 ds:text-left ds:text-[12px]", children: [
|
|
8767
|
+
isOpen && hasChildren ? /* @__PURE__ */ jsx(
|
|
8768
|
+
FolderOpenIcon,
|
|
8769
|
+
{
|
|
8770
|
+
size: 14,
|
|
8771
|
+
"aria-hidden": "true",
|
|
8772
|
+
className: cn("ds:shrink-0", isActive ? "ds:text-brand" : "ds:text-fg-3")
|
|
8773
|
+
}
|
|
8774
|
+
) : /* @__PURE__ */ jsx(
|
|
8775
|
+
FolderClosedIcon,
|
|
8776
|
+
{
|
|
8777
|
+
size: 14,
|
|
8778
|
+
"aria-hidden": "true",
|
|
8779
|
+
className: cn("ds:shrink-0", isActive ? "ds:text-brand" : "ds:text-fg-3")
|
|
8780
|
+
}
|
|
8781
|
+
),
|
|
8782
|
+
/* @__PURE__ */ jsx("span", { id: labelId, className: "ds:min-w-0 ds:flex-1 ds:truncate", children: node.name })
|
|
8783
|
+
] }),
|
|
8784
|
+
node.count != null && /* @__PURE__ */ jsx("span", { className: cn(BADGE_BASE, isActive ? BADGE_ACTIVE : BADGE_INACTIVE), children: node.count })
|
|
8785
|
+
]
|
|
8786
|
+
}
|
|
8787
|
+
),
|
|
8788
|
+
hasChildren && isOpen && /* @__PURE__ */ jsx("ul", { role: "group", className: "ds:relative ds:flex ds:flex-col ds:pl-[22px]", children: node.children.map((child, i, list) => renderNode(child, depth + 1, i + 1, list.length)) })
|
|
8789
|
+
]
|
|
8790
|
+
},
|
|
8791
|
+
node.id
|
|
8792
|
+
);
|
|
8691
8793
|
};
|
|
8692
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("ds:w-full", className), ...props, children: /* @__PURE__ */ jsx(
|
|
8794
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("ds:w-full", className), ...props, children: /* @__PURE__ */ jsx(
|
|
8795
|
+
"ul",
|
|
8796
|
+
{
|
|
8797
|
+
role: "tree",
|
|
8798
|
+
"aria-label": ariaLabelledBy ? ariaLabel : ariaLabel ?? messages.label,
|
|
8799
|
+
"aria-labelledby": ariaLabelledBy,
|
|
8800
|
+
onKeyDown,
|
|
8801
|
+
className: "ds:flex ds:flex-col",
|
|
8802
|
+
children: nodes.map((node, i, list) => renderNode(node, 0, i + 1, list.length))
|
|
8803
|
+
}
|
|
8804
|
+
) });
|
|
8693
8805
|
});
|
|
8694
8806
|
FolderTree.displayName = "FolderTree";
|
|
8695
8807
|
function SegmentedControl({
|