@dxos/react-ui 0.8.4-main.c1de068 → 0.8.4-main.c85a9c8dae
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/lib/browser/chunk-2FKSMWNY.mjs +774 -0
- package/dist/lib/browser/chunk-2FKSMWNY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3931 -61
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +82 -60
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-ZNBLTSHI.mjs +776 -0
- package/dist/lib/node-esm/chunk-ZNBLTSHI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +3931 -61
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +82 -60
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/components/Avatars/Avatar.d.ts +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +5 -31
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +5 -11
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +8 -20
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/{Buttons → Button}/Button.d.ts +2 -2
- package/dist/types/src/components/Button/Button.d.ts.map +1 -0
- package/dist/types/src/components/Button/Button.stories.d.ts +17 -0
- package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/IconButton.d.ts +4 -4
- package/dist/types/src/components/Button/IconButton.d.ts.map +1 -0
- package/dist/types/src/components/Button/IconButton.stories.d.ts +13 -0
- package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/Toggle.d.ts.map +1 -0
- package/dist/types/src/components/Button/Toggle.stories.d.ts +16 -0
- package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/ToggleGroup.d.ts +27 -0
- package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -0
- package/dist/types/src/components/Button/ToggleGroup.stories.d.ts +27 -0
- package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/index.d.ts.map +1 -0
- package/dist/types/src/components/Card/Card.d.ts +121 -0
- package/dist/types/src/components/Card/Card.d.ts.map +1 -0
- package/dist/types/src/components/Card/Card.stories.d.ts +21 -0
- package/dist/types/src/components/Card/Card.stories.d.ts.map +1 -0
- package/dist/types/src/components/Card/index.d.ts +2 -0
- package/dist/types/src/components/Card/index.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts +1 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
- package/dist/types/src/components/DensityProvider/DensityProvider.d.ts +1 -1
- package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
- package/dist/types/src/components/{Dialogs → Dialog}/AlertDialog.d.ts +13 -4
- package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts +11 -0
- package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/Dialog.d.ts +47 -0
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts +24 -0
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/index.d.ts.map +1 -0
- package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts +1 -1
- package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts.map +1 -1
- package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts +11 -0
- package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts +7 -0
- package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts +8 -0
- package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/ThrowError.d.ts +9 -0
- package/dist/types/src/components/ErrorFallback/ThrowError.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/index.d.ts +5 -0
- package/dist/types/src/components/ErrorFallback/index.d.ts.map +1 -0
- package/dist/types/src/components/Icon/Icon.d.ts +2 -2
- package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/types/src/components/Icon/Icon.stories.d.ts +17 -0
- package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -0
- package/dist/types/src/components/Image/Image.d.ts +14 -0
- package/dist/types/src/components/Image/Image.d.ts.map +1 -0
- package/dist/types/src/components/Image/Image.stories.d.ts +33 -0
- package/dist/types/src/components/Image/Image.stories.d.ts.map +1 -0
- package/dist/types/src/components/Image/index.d.ts +2 -0
- package/dist/types/src/components/Image/index.d.ts.map +1 -0
- package/dist/types/src/components/Input/Input.d.ts +6 -8
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +17 -18
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts +8 -8
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/{Lists → List}/List.d.ts +3 -3
- package/dist/types/src/components/List/List.d.ts.map +1 -0
- package/dist/types/src/components/List/List.stories.d.ts +14 -0
- package/dist/types/src/components/List/List.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/ListDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/Tree.d.ts +1 -1
- package/dist/types/src/components/List/Tree.d.ts.map +1 -0
- package/dist/types/src/components/List/Tree.stories.d.ts +15 -0
- package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/Treegrid.d.ts +1 -1
- package/dist/types/src/components/{Lists → List}/Treegrid.d.ts.map +1 -1
- package/dist/types/src/components/List/Treegrid.stories.d.ts +12 -0
- package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/index.d.ts.map +1 -0
- package/dist/types/src/components/Main/Main.d.ts +18 -28
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts +6 -10
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/{Menus → Menu}/ContextMenu.d.ts +6 -6
- package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -0
- package/dist/types/src/components/Menu/ContextMenu.stories.d.ts +12 -0
- package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Menus → Menu}/DropdownMenu.d.ts +8 -8
- package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -0
- package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +15 -0
- package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/Menu/index.d.ts.map +1 -0
- package/dist/types/src/components/Message/Message.d.ts +1 -1
- package/dist/types/src/components/Message/Message.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +10 -20
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +4 -3
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +6 -34
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +25 -26
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +37 -25
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +39 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +24 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScrollContainer/index.d.ts +2 -0
- package/dist/types/src/components/ScrollContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/Select/Select.d.ts +10 -10
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +4 -9
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Separator/Separator.d.ts +1 -1
- package/dist/types/src/components/Skeleton/Skeleton.d.ts +12 -0
- package/dist/types/src/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts +17 -0
- package/dist/types/src/components/Skeleton/Skeleton.stories.d.ts.map +1 -0
- package/dist/types/src/components/Skeleton/index.d.ts +2 -0
- package/dist/types/src/components/Skeleton/index.d.ts.map +1 -0
- package/dist/types/src/components/Splitter/Splitter.d.ts +36 -0
- package/dist/types/src/components/Splitter/Splitter.d.ts.map +1 -0
- package/dist/types/src/components/Splitter/Splitter.stories.d.ts +7 -0
- package/dist/types/src/components/Splitter/Splitter.stories.d.ts.map +1 -0
- package/dist/types/src/components/Splitter/index.d.ts +2 -0
- package/dist/types/src/components/Splitter/index.d.ts.map +1 -0
- package/dist/types/src/components/Status/Status.stories.d.ts +6 -10
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.d.ts +1 -1
- package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +8 -13
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +3 -3
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts +12 -0
- package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -0
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -8
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/index.d.ts +2 -1
- package/dist/types/src/components/ThemeProvider/index.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.d.ts +5 -5
- package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts +6 -44
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +47 -19
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +6 -50
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +2 -4
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +8 -61
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +13 -8
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/exemplars/generics.stories.d.ts +18 -0
- package/dist/types/src/exemplars/generics.stories.d.ts.map +1 -0
- package/dist/types/src/exemplars/slot.stories.d.ts +14 -0
- package/dist/types/src/exemplars/slot.stories.d.ts.map +1 -0
- package/dist/types/src/exemplars/tabster.stories.d.ts +8 -0
- package/dist/types/src/exemplars/tabster.stories.d.ts.map +1 -0
- package/dist/types/src/exemplars/virtualizer.stories.d.ts +11 -0
- package/dist/types/src/exemplars/virtualizer.stories.d.ts.map +1 -0
- package/dist/types/src/hooks/useDensityContext.d.ts +1 -1
- package/dist/types/src/hooks/useDensityContext.d.ts.map +1 -1
- package/dist/types/src/hooks/useElevationContext.d.ts +1 -1
- package/dist/types/src/hooks/useElevationContext.d.ts.map +1 -1
- package/dist/types/src/hooks/useSafeArea.d.ts.map +1 -1
- package/dist/types/src/hooks/useVisualViewport.d.ts +2 -2
- package/dist/types/src/hooks/useVisualViewport.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts +5 -9
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Custom.stories.d.ts +12 -4
- package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Typography.stories.d.ts +5 -11
- package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
- package/dist/types/src/primitives/Column/Column.d.ts +32 -0
- package/dist/types/src/primitives/Column/Column.d.ts.map +1 -0
- package/dist/types/src/primitives/Column/Column.stories.d.ts +6 -0
- package/dist/types/src/primitives/Column/Column.stories.d.ts.map +1 -0
- package/dist/types/src/primitives/Column/index.d.ts +2 -0
- package/dist/types/src/primitives/Column/index.d.ts.map +1 -0
- package/dist/types/src/primitives/Flex/Flex.d.ts +8 -0
- package/dist/types/src/primitives/Flex/Flex.d.ts.map +1 -0
- package/dist/types/src/primitives/Flex/Flex.stories.d.ts +8 -0
- package/dist/types/src/primitives/Flex/Flex.stories.d.ts.map +1 -0
- package/dist/types/src/primitives/Flex/index.d.ts +2 -0
- package/dist/types/src/primitives/Flex/index.d.ts.map +1 -0
- package/dist/types/src/primitives/Grid/Grid.d.ts +9 -0
- package/dist/types/src/primitives/Grid/Grid.d.ts.map +1 -0
- package/dist/types/src/primitives/Grid/Grid.stories.d.ts +8 -0
- package/dist/types/src/primitives/Grid/Grid.stories.d.ts.map +1 -0
- package/dist/types/src/primitives/Grid/index.d.ts +2 -0
- package/dist/types/src/primitives/Grid/index.d.ts.map +1 -0
- package/dist/types/src/primitives/Panel/Panel.d.ts +34 -0
- package/dist/types/src/primitives/Panel/Panel.d.ts.map +1 -0
- package/dist/types/src/primitives/Panel/Panel.stories.d.ts +6 -0
- package/dist/types/src/primitives/Panel/Panel.stories.d.ts.map +1 -0
- package/dist/types/src/primitives/Panel/index.d.ts +2 -0
- package/dist/types/src/primitives/Panel/index.d.ts.map +1 -0
- package/dist/types/src/primitives/index.d.ts +5 -0
- package/dist/types/src/primitives/index.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/index.d.ts +2 -1
- package/dist/types/src/testing/decorators/index.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withLayout.d.ts +15 -0
- package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/withLayoutVariants.d.ts +12 -0
- package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/withTheme.d.ts +5 -1
- package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +11 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/usePx.d.ts +8 -0
- package/dist/types/src/util/usePx.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +43 -31
- package/src/components/Avatars/Avatar.stories.tsx +24 -16
- package/src/components/Avatars/Avatar.tsx +9 -16
- package/src/components/Avatars/AvatarGroup.stories.tsx +12 -8
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +20 -15
- package/src/components/Breadcrumb/Breadcrumb.tsx +12 -38
- package/src/components/{Buttons → Button}/Button.stories.tsx +10 -11
- package/src/components/{Buttons → Button}/Button.tsx +7 -13
- package/src/components/{Buttons → Button}/IconButton.stories.tsx +15 -12
- package/src/components/{Buttons → Button}/IconButton.tsx +23 -16
- package/src/components/Button/Toggle.stories.tsx +37 -0
- package/src/components/{Buttons → Button}/ToggleGroup.stories.tsx +12 -9
- package/src/components/{Buttons → Button}/ToggleGroup.tsx +17 -4
- package/src/components/Card/Card.stories.tsx +151 -0
- package/src/components/Card/Card.tsx +352 -0
- package/src/components/Card/index.ts +5 -0
- package/src/components/Clipboard/ClipboardProvider.tsx +1 -1
- package/src/components/Clipboard/CopyButton.tsx +9 -8
- package/src/components/DensityProvider/DensityProvider.tsx +2 -2
- package/src/components/Dialog/AlertDialog.stories.tsx +69 -0
- package/src/components/{Dialogs → Dialog}/AlertDialog.tsx +128 -28
- package/src/components/Dialog/Dialog.stories.tsx +122 -0
- package/src/components/{Dialogs → Dialog}/Dialog.tsx +190 -60
- package/src/components/ElevationProvider/ElevationProvider.tsx +2 -2
- package/src/components/ErrorFallback/ErrorFallback.stories.tsx +50 -0
- package/src/components/ErrorFallback/ErrorFallback.tsx +70 -0
- package/src/components/ErrorFallback/ErrorStack.tsx +80 -0
- package/src/components/ErrorFallback/ThrowError.tsx +37 -0
- package/src/components/ErrorFallback/index.ts +9 -0
- package/src/components/Icon/Icon.stories.tsx +113 -0
- package/src/components/Icon/Icon.tsx +3 -3
- package/src/components/Image/Image.stories.tsx +86 -0
- package/src/components/Image/Image.tsx +223 -0
- package/src/components/Image/index.ts +5 -0
- package/src/components/Input/Input.stories.tsx +28 -49
- package/src/components/Input/Input.tsx +46 -82
- package/src/components/Link/Link.stories.tsx +12 -8
- package/src/components/Link/Link.tsx +2 -2
- package/src/components/{Lists → List}/List.stories.tsx +44 -45
- package/src/components/{Lists → List}/List.tsx +27 -28
- package/src/components/{Lists → List}/ListDropIndicator.tsx +7 -7
- package/src/components/{Lists → List}/Tree.stories.tsx +15 -12
- package/src/components/{Lists → List}/Tree.tsx +4 -3
- package/src/components/{Lists → List}/TreeDropIndicator.tsx +7 -7
- package/src/components/{Lists → List}/Treegrid.stories.tsx +15 -9
- package/src/components/{Lists → List}/Treegrid.tsx +67 -31
- package/src/components/Main/Main.stories.tsx +53 -27
- package/src/components/Main/Main.tsx +176 -104
- package/src/components/{Menus → Menu}/ContextMenu.stories.tsx +13 -10
- package/src/components/{Menus → Menu}/ContextMenu.tsx +10 -33
- package/src/components/{Menus → Menu}/DropdownMenu.stories.tsx +14 -11
- package/src/components/{Menus → Menu}/DropdownMenu.tsx +111 -80
- package/src/components/Message/Message.stories.tsx +35 -16
- package/src/components/Message/Message.tsx +46 -33
- package/src/components/Popover/Popover.stories.tsx +16 -13
- package/src/components/Popover/Popover.tsx +86 -64
- package/src/components/ScrollArea/ScrollArea.stories.tsx +163 -34
- package/src/components/ScrollArea/ScrollArea.tsx +84 -82
- package/src/components/ScrollArea/index.ts +1 -1
- package/src/components/ScrollContainer/ScrollContainer.stories.tsx +89 -0
- package/src/components/ScrollContainer/ScrollContainer.tsx +238 -0
- package/src/components/ScrollContainer/index.ts +5 -0
- package/src/components/Select/Select.stories.tsx +15 -12
- package/src/components/Select/Select.tsx +16 -31
- package/src/components/Separator/Separator.tsx +1 -1
- package/src/components/Skeleton/Skeleton.stories.tsx +52 -0
- package/src/components/Skeleton/Skeleton.tsx +26 -0
- package/src/components/Skeleton/index.ts +5 -0
- package/src/components/Splitter/Splitter.stories.tsx +83 -0
- package/src/components/Splitter/Splitter.tsx +138 -0
- package/src/components/Splitter/index.ts +5 -0
- package/src/components/Status/Status.stories.tsx +30 -23
- package/src/components/Status/Status.tsx +2 -2
- package/src/components/Tag/Tag.stories.tsx +17 -13
- package/src/components/Tag/Tag.tsx +3 -8
- package/src/components/ThemeProvider/ThemeProvider.stories.tsx +32 -0
- package/src/components/ThemeProvider/ThemeProvider.tsx +7 -7
- package/src/components/ThemeProvider/TranslationsProvider.tsx +3 -18
- package/src/components/ThemeProvider/index.ts +3 -3
- package/src/components/Toast/Toast.stories.tsx +14 -11
- package/src/components/Toast/Toast.tsx +19 -23
- package/src/components/Toolbar/Toolbar.stories.tsx +16 -14
- package/src/components/Toolbar/Toolbar.tsx +199 -11
- package/src/components/Tooltip/Tooltip.stories.tsx +31 -25
- package/src/components/Tooltip/Tooltip.tsx +30 -26
- package/src/components/index.ts +14 -9
- package/src/exemplars/generics.stories.tsx +49 -0
- package/src/exemplars/slot.stories.tsx +119 -0
- package/src/exemplars/tabster.stories.tsx +127 -0
- package/src/exemplars/virtualizer.stories.tsx +137 -0
- package/src/hooks/useDensityContext.ts +1 -1
- package/src/hooks/useElevationContext.ts +1 -1
- package/src/hooks/useSafeArea.ts +3 -2
- package/src/hooks/useVisualViewport.ts +4 -4
- package/src/index.ts +2 -1
- package/src/playground/Controls.stories.tsx +12 -15
- package/src/playground/Custom.stories.tsx +15 -26
- package/src/playground/Typography.stories.tsx +11 -9
- package/src/primitives/Column/Column.stories.tsx +72 -0
- package/src/primitives/Column/Column.tsx +156 -0
- package/src/primitives/Column/index.ts +5 -0
- package/src/primitives/Flex/Flex.stories.tsx +58 -0
- package/src/primitives/Flex/Flex.tsx +27 -0
- package/src/primitives/Flex/index.ts +5 -0
- package/src/primitives/Grid/Grid.stories.tsx +57 -0
- package/src/primitives/Grid/Grid.tsx +43 -0
- package/src/primitives/Grid/index.ts +5 -0
- package/src/primitives/Panel/Panel.stories.tsx +67 -0
- package/src/primitives/Panel/Panel.tsx +137 -0
- package/src/primitives/Panel/index.ts +5 -0
- package/src/primitives/index.ts +8 -0
- package/src/testing/decorators/index.ts +2 -1
- package/src/testing/decorators/withLayout.tsx +77 -0
- package/src/testing/decorators/withLayoutVariants.tsx +48 -0
- package/src/testing/decorators/withTheme.tsx +34 -0
- package/src/translations.ts +19 -0
- package/src/util/index.ts +3 -1
- package/src/util/usePx.ts +61 -0
- package/dist/lib/browser/chunk-2COVUP44.mjs +0 -4373
- package/dist/lib/browser/chunk-2COVUP44.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GHXHND5V.mjs +0 -4375
- package/dist/lib/node-esm/chunk-GHXHND5V.mjs.map +0 -7
- package/dist/types/src/components/AnchoredOverflow/AnchoredOverflow.d.ts +0 -15
- package/dist/types/src/components/AnchoredOverflow/AnchoredOverflow.d.ts.map +0 -1
- package/dist/types/src/components/AnchoredOverflow/index.d.ts +0 -2
- package/dist/types/src/components/AnchoredOverflow/index.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Button.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts +0 -12
- package/dist/types/src/components/Buttons/Button.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts +0 -22
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Toggle.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts +0 -19
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/ToggleGroup.d.ts +0 -28
- package/dist/types/src/components/Buttons/ToggleGroup.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts +0 -39
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/index.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts +0 -43
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts +0 -31
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts +0 -48
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/index.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.stories.d.ts +0 -37
- package/dist/types/src/components/Lists/List.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts +0 -41
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/TreeDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Treegrid.stories.d.ts +0 -10
- package/dist/types/src/components/Lists/Treegrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/index.d.ts.map +0 -1
- package/dist/types/src/components/Menus/ContextMenu.d.ts.map +0 -1
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts +0 -50
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +0 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +0 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts +0 -50
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +0 -1
- package/dist/types/src/components/Menus/index.d.ts.map +0 -1
- package/dist/types/src/testing/decorators/withSurfaceVariantsLayout.d.ts +0 -12
- package/dist/types/src/testing/decorators/withSurfaceVariantsLayout.d.ts.map +0 -1
- package/dist/types/src/util/ThemedClassName.d.ts +0 -5
- package/dist/types/src/util/ThemedClassName.d.ts.map +0 -1
- package/src/components/AnchoredOverflow/AnchoredOverflow.tsx +0 -59
- package/src/components/AnchoredOverflow/index.ts +0 -5
- package/src/components/Buttons/Toggle.stories.tsx +0 -33
- package/src/components/Dialogs/AlertDialog.stories.tsx +0 -66
- package/src/components/Dialogs/Dialog.stories.tsx +0 -65
- package/src/testing/decorators/withSurfaceVariantsLayout.tsx +0 -51
- package/src/testing/decorators/withTheme.ts +0 -25
- package/src/util/ThemedClassName.ts +0 -7
- /package/dist/types/src/components/{Buttons → Button}/Toggle.d.ts +0 -0
- /package/dist/types/src/components/{Buttons → Button}/index.d.ts +0 -0
- /package/dist/types/src/components/{Dialogs → Dialog}/index.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/ListDropIndicator.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/TreeDropIndicator.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/index.d.ts +0 -0
- /package/dist/types/src/components/{Menus → Menu}/index.d.ts +0 -0
- /package/src/components/{Buttons → Button}/Toggle.tsx +0 -0
- /package/src/components/{Buttons → Button}/index.ts +0 -0
- /package/src/components/{Dialogs → Dialog}/index.ts +0 -0
- /package/src/components/{Lists → List}/index.ts +0 -0
- /package/src/components/{Menus → Menu}/index.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport { type Resource, type TFunction } from 'i18next';\nexport { Trans } from 'react-i18next';\n\nexport * from '@dxos/react-hooks';\nexport type * from '@dxos/react-ui-types';\n\nexport * from './components';\nexport * from './hooks';\nexport * from './util';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,SAASA,aAAa;AAEtB,cAAc;",
|
|
6
|
-
"names": ["Trans"]
|
|
3
|
+
"sources": ["../../../src/index.ts", "../../../src/components/ThemeProvider/index.ts", "../../../src/hooks/useDensityContext.ts", "../../../src/hooks/useIconHref.ts", "../../../src/hooks/useTranslationsContext.ts", "../../../src/hooks/useVisualViewport.ts", "../../../src/util/usePx.ts", "../../../src/components/Avatars/Avatar.tsx", "../../../src/components/Breadcrumb/Breadcrumb.tsx", "../../../src/components/Icon/Icon.tsx", "../../../src/components/Link/Link.tsx", "../../../src/components/Button/Button.tsx", "../../../src/components/Button/IconButton.tsx", "../../../src/components/Button/Toggle.tsx", "../../../src/components/Button/ToggleGroup.tsx", "../../../src/components/Card/Card.tsx", "../../../src/primitives/Column/Column.tsx", "../../../src/primitives/Flex/Flex.tsx", "../../../src/primitives/Grid/Grid.tsx", "../../../src/primitives/Panel/Panel.tsx", "../../../src/components/Image/Image.tsx", "../../../src/components/Toolbar/Toolbar.tsx", "../../../src/translations.ts", "../../../src/components/Menu/ContextMenu.tsx", "../../../src/hooks/useSafeCollisionPadding.ts", "../../../src/components/Menu/DropdownMenu.tsx", "../../../src/components/Separator/Separator.tsx", "../../../src/components/Clipboard/ClipboardProvider.tsx", "../../../src/components/Clipboard/CopyButton.tsx", "../../../src/components/Clipboard/index.ts", "../../../src/components/Dialog/Dialog.tsx", "../../../src/components/Dialog/AlertDialog.tsx", "../../../src/components/ErrorFallback/index.ts", "../../../src/components/ErrorFallback/ErrorFallback.tsx", "../../../src/components/ErrorFallback/ErrorStack.tsx", "../../../src/components/ErrorFallback/ThrowError.tsx", "../../../src/components/Input/Input.tsx", "../../../src/components/List/List.tsx", "../../../src/components/List/ListDropIndicator.tsx", "../../../src/components/List/Tree.tsx", "../../../src/components/List/TreeDropIndicator.tsx", "../../../src/components/List/Treegrid.tsx", "../../../src/components/Main/Main.tsx", "../../../src/components/Main/useSwipeToDismiss.ts", "../../../src/components/Message/Message.tsx", "../../../src/components/Popover/Popover.tsx", "../../../src/components/Status/Status.tsx", "../../../src/components/ScrollArea/ScrollArea.tsx", "../../../src/components/ScrollContainer/ScrollContainer.tsx", "../../../src/components/Select/Select.tsx", "../../../src/components/Skeleton/Skeleton.tsx", "../../../src/components/Splitter/Splitter.tsx", "../../../src/components/Tag/Tag.tsx", "../../../src/components/Toast/Toast.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nexport { type Resource, type TFunction } from 'i18next';\nexport { Trans } from 'react-i18next';\n\nexport * from '@dxos/react-hooks';\nexport * from '@dxos/ui-types';\n\nexport * from './components';\nexport * from './hooks';\nexport * from './primitives';\nexport * from './util';\n", "//\n// Copyright 2022 DXOS.org\n//\n\nexport { type Label, isLabel, toLocalizedString } from '@dxos/ui-types';\n\nexport * from './ThemeProvider';\nexport { useTranslation } from './TranslationsProvider';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { type Density } from '@dxos/ui-types';\n\nimport { DensityContext } from '../components';\n\nexport const useDensityContext = (propsDensity?: Density) => {\n const { density } = useContext(DensityContext);\n return propsDensity ?? density;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useThemeContext } from './useThemeContext';\n\nconst ICONS_URL = '/icons.svg';\n\nexport const useIconHref = (icon?: string) => {\n const { noCache } = useThemeContext();\n const url = noCache ? `${ICONS_URL}?nocache=${new Date().getMinutes()}` : ICONS_URL;\n return icon ? `${url}#${icon}` : undefined;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { TranslationsContext } from '../components/ThemeProvider/TranslationsProvider';\n\nexport const useTranslationsContext = () => useContext(TranslationsContext);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useCallback, useState } from 'react';\n\nimport { useViewportResize } from '@dxos/react-hooks';\n\nexport const useVisualViewport = (deps?: Parameters<typeof useViewportResize>[1]) => {\n const [width, setWidth] = useState<number | null>(null);\n const [height, setHeight] = useState<number | null>(null);\n\n const handleResize = useCallback(() => {\n if (window.visualViewport) {\n setWidth(window.visualViewport.width);\n setHeight(window.visualViewport.height);\n }\n }, []);\n\n useViewportResize(handleResize, deps);\n\n return { width, height };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\n\nconst getDocumentElementFontSize = () => parseFloat(getComputedStyle(document.documentElement).fontSize);\n\n/**\n * React hook that converts rem values to pixels and updates when the root font size changes.\n *\n * @param rem The rem value to convert to pixels\n * @returns The current pixel value equivalent of the rem input\n */\nexport const usePx = (rem: number): number => {\n const [fontSize, setFontSize] = useState(() => {\n if (typeof document !== 'undefined') {\n return getDocumentElementFontSize();\n }\n return 16; // Default fallback for SSR\n });\n\n const updateFontSize = useCallback(() => {\n setFontSize(getDocumentElementFontSize());\n }, []);\n\n useEffect(() => {\n if (typeof document === 'undefined') {\n return;\n }\n\n // Create a ResizeObserver to watch for font size changes on the document element\n const resizeObserver = new ResizeObserver(updateFontSize);\n resizeObserver.observe(document.documentElement);\n\n // Also listen for viewport changes that might affect font size\n const mediaQueryList = window.matchMedia('all');\n const handleMediaChange = () => {\n updateFontSize();\n };\n\n if (mediaQueryList.addEventListener) {\n mediaQueryList.addEventListener('change', handleMediaChange);\n } else {\n // Fallback for older browsers\n mediaQueryList.addListener(handleMediaChange);\n }\n\n return () => {\n resizeObserver.disconnect();\n if (mediaQueryList.removeEventListener) {\n mediaQueryList.removeEventListener('change', handleMediaChange);\n } else {\n // Fallback for older browsers\n mediaQueryList.removeListener(handleMediaChange);\n }\n };\n }, []);\n\n return useMemo(() => rem * fontSize, [fontSize]);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport '@dxos/lit-ui/dx-avatar.pcss';\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentProps, type ComponentPropsWithRef, type PropsWithChildren, forwardRef } from 'react';\n\nimport {\n type AvatarAnimation,\n type AvatarStatus,\n type AvatarVariant,\n type DxAvatar as NaturalDxAvatar,\n} from '@dxos/lit-ui';\nimport { DxAvatar } from '@dxos/lit-ui/react';\nimport { useId } from '@dxos/react-hooks';\nimport { mx } from '@dxos/ui-theme';\n\nimport { useIconHref, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type AvatarRootProps = PropsWithChildren<Partial<AvatarContextValue>>;\n\ntype AvatarContextValue = {\n labelId: string;\n descriptionId: string;\n};\n\nconst AVATAR_NAME = 'Avatar';\nconst [AvatarProvider, useAvatarContext] = createContext<AvatarContextValue>(AVATAR_NAME);\n\nconst AvatarRoot = ({ children, labelId: propsLabelId, descriptionId: propsDescriptionId }: AvatarRootProps) => {\n const labelId = useId('avatar__label', propsLabelId);\n const descriptionId = useId('avatar__description', propsDescriptionId);\n return <AvatarProvider {...{ labelId, descriptionId }}>{children}</AvatarProvider>;\n};\n\ntype AvatarContentProps = ThemedClassName<Omit<ComponentProps<typeof DxAvatar>, 'children'>>;\n\nconst AvatarContent = forwardRef<NaturalDxAvatar, AvatarContentProps>(\n ({ icon, classNames, ...props }, forwardedRef) => {\n const href = useIconHref(icon);\n const { labelId, descriptionId } = useAvatarContext('AvatarContent');\n return (\n <DxAvatar\n {...props}\n icon={href}\n aria-labelledby={labelId}\n aria-describedby={descriptionId}\n rootClassName={mx(classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype AvatarLabelProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.span>, 'id'>> & {\n asChild?: boolean;\n srOnly?: boolean;\n};\n\nconst AvatarLabel = forwardRef<HTMLSpanElement, AvatarLabelProps>(\n ({ asChild, srOnly, classNames, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : Primitive.span;\n const { tx } = useThemeContext();\n const { labelId } = useAvatarContext('AvatarLabel');\n return <Comp {...props} id={labelId} ref={forwardedRef} className={tx('avatar.label', { srOnly }, classNames)} />;\n },\n);\n\ntype AvatarDescriptionProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.span>, 'id'>> & {\n asChild?: boolean;\n srOnly?: boolean;\n};\n\nconst AvatarDescription = forwardRef<HTMLSpanElement, AvatarDescriptionProps>(\n ({ asChild, srOnly, classNames, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : Primitive.span;\n const { tx } = useThemeContext();\n const { descriptionId } = useAvatarContext('AvatarDescription');\n return (\n <Comp\n {...props}\n id={descriptionId}\n ref={forwardedRef}\n className={tx('avatar.description', { srOnly }, classNames)}\n />\n );\n },\n);\n\nexport const Avatar = {\n Root: AvatarRoot,\n Content: AvatarContent,\n Label: AvatarLabel,\n Description: AvatarDescription,\n};\n\nexport { useAvatarContext };\n\nexport type {\n AvatarStatus,\n AvatarVariant,\n AvatarAnimation,\n AvatarContentProps,\n AvatarLabelProps,\n AvatarDescriptionProps,\n NaturalDxAvatar as DxAvatar,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Icon } from '../Icon';\nimport { Link, type LinkProps } from '../Link';\n\ntype BreadcrumbRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n 'aria-label': string;\n asChild?: boolean;\n};\n\nconst BreadcrumbRoot = forwardRef<HTMLDivElement, BreadcrumbRootProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return <Comp role='navigation' {...props} className={tx('breadcrumb.root', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype BreadcrumbListProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.ol>> & { asChild?: boolean };\n\nconst BreadcrumbList = forwardRef<HTMLOListElement, BreadcrumbListProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.ol;\n return <Comp role='list' {...props} className={tx('breadcrumb.list', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype BreadcrumbListItemProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.li>> & { asChild?: boolean };\n\nconst BreadcrumbListItem = forwardRef<HTMLLIElement, BreadcrumbListItemProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.li;\n return <Comp role='listitem' {...props} className={tx('breadcrumb.listItem', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype BreadcrumbLinkProps = LinkProps;\n\nconst BreadcrumbLink = forwardRef<HTMLAnchorElement, BreadcrumbLinkProps>(({ asChild, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : Link;\n return <Comp {...props} ref={forwardedRef} />;\n});\n\ntype BreadcrumbCurrentProps = ThemedClassName<ComponentPropsWithRef<'h1'>> & { asChild?: boolean };\n\nconst BreadcrumbCurrent = forwardRef<HTMLHeadingElement, BreadcrumbCurrentProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : 'h1';\n return (\n <Comp {...props} aria-current='page' className={tx('breadcrumb.current', {}, classNames)} ref={forwardedRef} />\n );\n },\n);\n\ntype BreadcrumbSeparatorProps = ThemedClassName<ComponentPropsWithoutRef<typeof Primitive.span>>;\n\nconst BreadcrumbSeparator = ({ children, classNames, ...props }: BreadcrumbSeparatorProps) => {\n const { tx } = useThemeContext();\n return (\n <Primitive.span\n role='separator'\n aria-hidden='true'\n {...props}\n className={tx('breadcrumb.separator', {}, classNames)}\n >\n {children ?? <Icon icon='ph--dot--bold' />}\n </Primitive.span>\n );\n};\n\nexport const Breadcrumb = {\n Root: BreadcrumbRoot,\n List: BreadcrumbList,\n ListItem: BreadcrumbListItem,\n Link: BreadcrumbLink,\n Current: BreadcrumbCurrent,\n Separator: BreadcrumbSeparator,\n};\n\nexport type {\n BreadcrumbRootProps,\n BreadcrumbListProps,\n BreadcrumbListItemProps,\n BreadcrumbLinkProps,\n BreadcrumbCurrentProps,\n BreadcrumbSeparatorProps,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Primitive } from '@radix-ui/react-primitive';\nimport React, { type ComponentPropsWithRef, forwardRef, memo } from 'react';\n\nimport { type Size } from '@dxos/ui-types';\n\nimport { useIconHref, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type IconProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.svg>> & {\n icon: string;\n size?: Size;\n};\n\nexport const Icon = memo(\n forwardRef<SVGSVGElement, IconProps>(({ icon, classNames, size = 4, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const href = useIconHref(icon);\n return (\n <svg {...props} className={tx('icon.root', { size }, classNames)} ref={forwardedRef}>\n <use href={href} />\n </svg>\n );\n }),\n);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type LinkProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.a>> &\n Partial<{\n asChild: boolean;\n variant: 'accent' | 'neutral';\n }>;\n\nexport const Link = forwardRef<HTMLAnchorElement, LinkProps>(\n ({ asChild, variant, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.a;\n return <Comp {...props} className={tx('link.root', { variant }, classNames)} ref={forwardedRef} />;\n },\n);\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef, memo } from 'react';\n\nimport { type Density, type Elevation } from '@dxos/ui-types';\n\nimport { useDensityContext, useElevationContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ninterface ButtonProps extends ThemedClassName<ComponentPropsWithRef<typeof Primitive.button>> {\n variant?: 'default' | 'primary' | 'outline' | 'ghost' | 'destructive';\n density?: Density;\n elevation?: Elevation;\n asChild?: boolean;\n}\n\ntype ButtonGroupContextValue = { inGroup?: boolean };\n\nconst BUTTON_GROUP_NAME = 'ButtonGroup';\nconst BUTTON_NAME = 'Button';\n\nconst [ButtonGroupProvider, useButtonGroupContext] = createContext<ButtonGroupContextValue>(BUTTON_GROUP_NAME, {\n inGroup: false,\n});\n\nconst Button = memo(\n forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n classNames,\n children,\n density: propsDensity,\n elevation: propsElevation,\n variant = 'default',\n asChild,\n ...props\n },\n ref,\n ) => {\n const { inGroup } = useButtonGroupContext(BUTTON_NAME);\n const { tx } = useThemeContext();\n const elevation = useElevationContext(propsElevation);\n const density = useDensityContext(propsDensity);\n const Comp = asChild ? Slot : Primitive.button;\n return (\n <Comp\n ref={ref}\n {...props}\n data-variant={variant}\n data-density={density}\n data-props={inGroup ? 'grouped' : ''}\n className={tx(\n 'button.root',\n {\n variant,\n inGroup,\n disabled: props.disabled,\n density,\n elevation,\n },\n classNames,\n )}\n {...(props.disabled && { disabled: true })}\n >\n {children}\n </Comp>\n );\n },\n ),\n);\n\nButton.displayName = BUTTON_NAME;\n\ntype ButtonGroupProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n elevation?: Elevation;\n asChild?: boolean;\n};\n\nconst ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(\n ({ children, elevation: propsElevation, classNames, asChild, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const elevation = useElevationContext(propsElevation);\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp role='none' {...props} className={tx('button.group', { elevation }, classNames)} ref={forwardedRef}>\n <ButtonGroupProvider inGroup>{children}</ButtonGroupProvider>\n </Comp>\n );\n },\n);\n\nButtonGroup.displayName = BUTTON_GROUP_NAME;\n\nexport { Button, ButtonGroup, BUTTON_GROUP_NAME, useButtonGroupContext };\n\nexport type { ButtonProps, ButtonGroupProps };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Icon, type IconProps } from '../Icon';\nimport { Tooltip, type TooltipSide } from '../Tooltip';\n\nimport { Button, type ButtonProps } from './Button';\n\ntype IconButtonProps = Omit<ButtonProps, 'children'> &\n Partial<Pick<IconProps, 'icon' | 'size'>> & {\n label: string;\n noTooltip?: boolean;\n caretDown?: boolean;\n iconOnly?: boolean;\n iconEnd?: boolean;\n iconClassNames?: ThemedClassName<any>['classNames'];\n tooltipSide?: TooltipSide;\n };\n\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>((props, forwardedRef) =>\n props.iconOnly ? (\n <IconOnlyButton {...props} ref={forwardedRef} />\n ) : (\n <LabelledIconButton {...props} ref={forwardedRef} />\n ),\n);\n\nconst IconOnlyButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ noTooltip, tooltipSide, ...props }, forwardedRef) => {\n if (noTooltip) {\n return <LabelledIconButton {...props} ref={forwardedRef} />;\n }\n\n return (\n <Tooltip.Trigger asChild content={props.label} side={tooltipSide}>\n <LabelledIconButton {...props} ref={forwardedRef} />\n </Tooltip.Trigger>\n );\n },\n);\n\n// TODO(burdon): Inherit size from container/density.\nconst LabelledIconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n { size = 5, icon, iconOnly, iconEnd, iconClassNames, label, caretDown, noTooltip: _, classNames, ...props },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n return (\n <Button {...props} classNames={tx('iconButton.root', { iconOnly }, classNames)} ref={forwardedRef}>\n {icon && !iconEnd && <Icon icon={icon} size={size} classNames={iconClassNames} />}\n <span className={iconOnly ? 'sr-only' : undefined}>{label}</span>\n {icon && iconEnd && <Icon icon={icon} size={size} classNames={iconClassNames} />}\n {caretDown && <Icon size={3} icon='ph--caret-down--bold' />}\n </Button>\n );\n },\n);\n\nexport { IconButton };\n\nexport type { IconButtonProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Toggle as TogglePrimitive, type ToggleProps as TogglePrimitiveProps } from '@radix-ui/react-toggle';\nimport React, { forwardRef } from 'react';\n\nimport { Button, type ButtonProps } from './Button';\n\ntype ToggleProps = Omit<TogglePrimitiveProps, 'asChild'> & ButtonProps;\n\nconst Toggle = forwardRef<HTMLButtonElement, ToggleProps>(\n ({ defaultPressed, pressed, onPressedChange, ...props }, forwardedRef) => {\n return (\n <TogglePrimitive {...{ defaultPressed, pressed, onPressedChange }} asChild>\n <Button {...props} ref={forwardedRef} />\n </TogglePrimitive>\n );\n },\n);\n\nexport { Toggle };\nexport type { ToggleProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n ToggleGroupItem as ToggleGroupItemPrimitive,\n type ToggleGroupItemProps as ToggleGroupItemPrimitiveProps,\n type ToggleGroupMultipleProps,\n ToggleGroup as ToggleGroupPrimitive,\n type ToggleGroupSingleProps,\n} from '@radix-ui/react-toggle-group';\nimport React, { forwardRef } from 'react';\n\nimport { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps } from './Button';\nimport { IconButton, type IconButtonProps } from './IconButton';\n\ntype ToggleGroupProps = Omit<ToggleGroupSingleProps, 'className'> | Omit<ToggleGroupMultipleProps, 'className'>;\n\nconst ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps & ButtonGroupProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n return (\n <ToggleGroupPrimitive {...props} asChild>\n <ButtonGroup {...{ classNames, children }} ref={forwardedRef} />\n </ToggleGroupPrimitive>\n );\n },\n);\n\ntype ToggleGroupItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & ButtonProps;\n\nconst ToggleGroupItem = forwardRef<HTMLButtonElement, ToggleGroupItemProps>(\n ({ variant, elevation, density, classNames, children, ...props }, forwardedRef) => {\n return (\n <ToggleGroupItemPrimitive {...props} asChild>\n <Button {...{ variant, elevation, density, classNames, children }} ref={forwardedRef} />\n </ToggleGroupItemPrimitive>\n );\n },\n);\n\ntype ToggleGroupIconItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & IconButtonProps;\n\nconst ToggleGroupIconItem = forwardRef<HTMLButtonElement, ToggleGroupIconItemProps>(\n ({ variant, label, icon, size, elevation, density, classNames, ...props }, forwardedRef) => {\n return (\n <ToggleGroupItemPrimitive {...props} asChild>\n <IconButton {...{ variant, elevation, density, classNames, label, icon, size }} ref={forwardedRef} />\n </ToggleGroupItemPrimitive>\n );\n },\n);\n\nexport { ToggleGroup, ToggleGroupItem, ToggleGroupIconItem };\nexport type { ToggleGroupProps, ToggleGroupItemProps };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type HTMLAttributes, type PropsWithChildren, createContext, forwardRef, useContext } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type Density, type SlottableProps } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\nimport { Column } from '../../primitives';\nimport { type ThemedClassName } from '../../util';\nimport { Button } from '../Button';\nimport { Icon, type IconProps } from '../Icon';\nimport { Image } from '../Image';\nimport { Toolbar, type ToolbarMenuItem, type ToolbarMenuProps, type ToolbarRootProps } from '../Toolbar';\n\n//\n// Context\n//\n\ntype CardContextValue = {\n menuItems?: CardMenuItem<any>[];\n};\n\n/** @deprecated Use context for menus. */\nconst CardContext = createContext<CardContextValue>({});\n\n//\n// Root\n//\n\ntype CardRootProps = SlottableProps<HTMLDivElement> & {\n id?: string;\n border?: boolean;\n fullWidth?: boolean;\n};\n\nconst CardRoot = forwardRef<HTMLDivElement, CardRootProps>(\n ({ children, classNames, className, id, asChild, role, border = true, fullWidth, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp\n {...props}\n {...(id && { 'data-object-id': id })}\n role={role ?? 'group'}\n className={tx('card.root', { border, fullWidth }, [className, classNames])}\n ref={forwardedRef}\n >\n <Column.Root gutter='rail'>{children}</Column.Root>\n </Comp>\n );\n },\n);\n\n//\n// Toolbar\n//\n\ntype CardToolbarProps = ToolbarRootProps & {\n density?: Density;\n};\n\n// TODO(burdon): Roncile name with DialogHeader.\nconst CardToolbar = forwardRef<HTMLDivElement, CardToolbarProps>(\n ({ children, classNames, density = 'fine', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n\n return (\n <Toolbar.Root\n {...props}\n classNames={[tx('card.toolbar', { coarse: density !== 'fine' }), classNames]}\n ref={forwardedRef}\n >\n {children}\n </Toolbar.Root>\n );\n },\n);\n\n//\n// Menu (delegated to Toolbar.Menu)\n//\n\ntype CardMenuItem<T extends any | void = void> = ToolbarMenuItem<T>;\ntype CardMenuProps<T extends any | void = void> = ToolbarMenuProps<T>;\n\nconst CardMenu = <T extends any | void = void>({ context, items }: CardMenuProps<T>) => {\n const { menuItems } = useContext(CardContext) ?? {};\n const combinedItems = [...(items ?? []), ...((menuItems as CardMenuItem<T>[]) ?? [])];\n\n return <Toolbar.Menu context={context} items={combinedItems} />;\n};\n\n//\n// Title\n//\n\ntype CardTitleProps = SlottableProps<HTMLDivElement>;\n\nconst CardTitle = forwardRef<HTMLDivElement, CardTitleProps>(\n ({ children, classNames, className, asChild, role, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp\n {...props}\n role={role ?? 'heading'}\n className={tx('card.title', {}, [className, classNames])}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\n//\n// Content\n//\n\ntype CardContentProps = SlottableProps<HTMLDivElement>;\n\nconst CardContent = forwardRef<HTMLDivElement, CardContentProps>(({ children, role, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n\n return (\n <div {...props} role={role ?? 'none'} className={tx('card.content', {})} ref={forwardedRef}>\n {children}\n </div>\n );\n});\n\n//\n// Row\n//\n\ntype CardRowProps = SlottableProps<HTMLDivElement> & { icon?: string };\n\nconst CardRow = forwardRef<HTMLDivElement, CardRowProps>(\n ({ children, classNames, className, role, icon, ...props }, forwardedRef) => {\n return (\n <Column.Row {...props} role={role ?? 'none'} classNames={[classNames, className]} ref={forwardedRef}>\n {(icon && <CardIcon classNames='text-subdued' icon={icon} />) || <div />}\n {children}\n <div />\n </Column.Row>\n );\n },\n);\n\n//\n// Section\n//\n\ntype CardSectionProps = SlottableProps<HTMLDivElement>;\n\nconst CardSection = forwardRef<HTMLDivElement, CardSectionProps>(\n ({ children, classNames, className, asChild, role, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp {...props} role={role ?? 'none'} className={mx(classNames, className, 'col-span-full')} ref={forwardedRef}>\n {children}\n </Comp>\n );\n },\n);\n\n//\n// Heading\n//\n\ntype CardHeadingProps = SlottableProps<HTMLDivElement> & { variant?: 'default' | 'subtitle' };\n\n/**\n * @deprecated Use typography.\n */\nconst CardHeading = forwardRef<HTMLDivElement, CardHeadingProps>(\n ({ children, classNames, className, asChild, role, variant = 'default', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp\n {...props}\n role={role ?? 'heading'}\n className={tx('card.heading', { variant }, [classNames, className])}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\n//\n// Text\n//\n\ntype CardTextProps = SlottableProps<HTMLDivElement> & { truncate?: boolean; variant?: 'default' | 'description' };\n\nconst CardText = forwardRef<HTMLDivElement, CardTextProps>(\n ({ children, classNames, className, asChild, role, truncate, variant = 'default', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp\n {...props}\n role={role ?? 'none'}\n className={tx('card.text', { variant }, [classNames, className])}\n ref={forwardedRef}\n >\n <span className={tx('card.text-span', { variant, truncate })}>{children}</span>\n </Comp>\n );\n },\n);\n\n//\n// Poster\n//\n\ntype CardPosterProps = ThemedClassName<\n {\n alt: string;\n aspect?: 'video' | 'auto';\n } & Partial<{ image: string; icon: string }>\n>;\n\nconst CardPoster = (props: CardPosterProps) => {\n const { tx } = useThemeContext();\n const aspect = props.aspect === 'auto' ? 'aspect-auto' : 'aspect-video';\n if (props.image) {\n return (\n <div role='none' className='col-span-full mb-1'>\n <Image classNames={[tx('card.poster', {}), aspect, props.classNames]} src={props.image} alt={props.alt} />\n </div>\n );\n }\n\n if (props.icon) {\n return (\n <div role='image' className={tx('card.poster-icon', {}, [aspect, props.classNames])} aria-label={props.alt}>\n <Icon icon={props.icon} size={10} />\n </div>\n );\n }\n};\n\n//\n// Action\n//\n\ntype CardActionProps = { icon?: string; label: string; actionIcon?: string; onClick?: () => void };\n\nconst CardAction = ({ icon, actionIcon = 'ph--arrow-right--regular', label, onClick }: CardActionProps) => {\n const { tx } = useThemeContext();\n return (\n <Button variant='ghost' classNames={tx('card.action', {})} onClick={onClick}>\n {icon ? <CardIcon classNames='text-subdued' icon={icon} /> : <div />}\n <span className={tx('card.action-label', {}, !actionIcon ? 'col-span-2' : undefined)}>{label}</span>\n {actionIcon && <CardIcon icon={actionIcon} />}\n </Button>\n );\n};\n\n//\n// Link\n//\n\ntype CardLinkProps = { label: string; href: string };\n\nconst CardLink = ({ label, href }: CardLinkProps) => {\n const { tx } = useThemeContext();\n return (\n <a className={tx('card.link', {})} data-variant='ghost' href={href} target='_blank' rel='noreferrer'>\n <CardIcon classNames='text-subdued' icon='ph--link--regular' />\n <span className={tx('card.link-label', {})}>{label}</span>\n <CardIcon classNames='invisible group-hover:visible' icon='ph--arrow-square-out--regular' />\n </a>\n );\n};\n\n//\n// Icon\n//\n\nconst CardIcon = ({ toolbar, ...props }: IconProps & { toolbar?: boolean }) => {\n return (\n <CardIconBlock>\n <Icon {...props} size={toolbar ? 5 : 4} />\n </CardIconBlock>\n );\n};\n\n//\n// IconBlock\n//\n\nconst CardIconBlock = ({\n classNames,\n children,\n role,\n ...props\n}: ThemedClassName<PropsWithChildren<HTMLAttributes<HTMLDivElement>>>) => {\n const { tx } = useThemeContext();\n return (\n <div {...props} role={role ?? 'none'} className={tx('card.icon-block', {}, classNames)}>\n {children}\n </div>\n );\n};\n\n//\n// Card\n//\n\nexport const Card = {\n Root: CardRoot,\n\n // Toolbar\n Toolbar: CardToolbar,\n ToolbarIconButton: Toolbar.IconButton,\n ToolbarSeparator: Toolbar.Separator,\n DragHandle: forwardRef<HTMLButtonElement, Parameters<typeof Toolbar.DragHandle>[0]>((props, ref) => (\n <Toolbar.DragHandle testId='card-drag-handle' {...props} ref={ref} />\n )),\n CloseIconButton: Toolbar.CloseIconButton,\n Title: CardTitle,\n Menu: CardMenu,\n Icon: CardIcon,\n IconBlock: CardIconBlock,\n\n // Content\n Content: CardContent,\n Row: CardRow,\n Section: CardSection,\n Heading: CardHeading,\n Text: CardText,\n Poster: CardPoster,\n Action: CardAction,\n Link: CardLink,\n};\n\nexport type { CardContextValue, CardRootProps, CardToolbarProps, CardMenuProps };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type CSSProperties, forwardRef } from 'react';\n\nimport { type SlottableProps } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\n\n//\n// Root\n//\n\nconst COLUMN_ROOT_NAME = 'Column.Root';\n\ntype GutterSize = 'sm' | 'md' | 'lg' | 'rail';\n\nconst gutterSizes: Record<GutterSize, string> = {\n sm: 'var(--dx-gutter-sm)',\n md: 'var(--dx-gutter-md)',\n lg: 'var(--dx-gutter-lg)',\n rail: 'var(--dx-rail-item)',\n};\n\ntype ColumnRootProps = SlottableProps<HTMLDivElement> & { gutter?: GutterSize };\n\n/**\n * Creates a vertical channel with left/right gutter columns.\n * The `--gutter` CSS variable is set for nested components (Dialog, ScrollArea, Form.Viewport, etc.).\n * Use `gutter='rail'` for icon-slot row layouts (Card); `gutter='md'` for whitespace layouts (Dialog).\n * Direct children must use Column.Row (spans all 3 cols) or Column.Segment (center col only).\n *\n * NOTE: The theme applies a `dx-column` marker class to this element.\n * ScrollArea.Root detects this via `[.dx-column_&]:col-span-full` to span all 3 grid columns,\n * ensuring scroll content extends under the gutters rather than being confined to the center column.\n * The `--gutter` CSS variable is also consumed by ScrollArea's `margin` option to align scrollbar spacing.\n */\nconst Root = forwardRef<HTMLDivElement, ColumnRootProps>(\n ({ classNames, className, asChild, role, children, gutter = 'md', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Component = asChild ? Slot : Primitive.div;\n const gutterSize = gutterSizes[gutter];\n return (\n <Component\n {...props}\n role={role ?? 'none'}\n style={\n {\n '--gutter': gutterSize,\n gridTemplateColumns: [gutterSize, 'minmax(0,1fr)', gutterSize].join(' '),\n } as CSSProperties\n }\n className={tx('column.root', { gutter }, [className, classNames])}\n ref={forwardedRef}\n >\n {children}\n </Component>\n );\n },\n);\n\nRoot.displayName = COLUMN_ROOT_NAME;\n\n//\n// Row\n//\n\nconst COLUMN_ROW_NAME = 'Column.Row';\n\ntype ColumnRowProps = SlottableProps<HTMLDivElement>;\n\n/**\n * Spans all 3 columns of the parent Column.Root and uses CSS subgrid to inherit their sizing.\n * Children map to: [col-1: icon/slot] [col-2: content] [col-3: icon/action].\n * Must be a direct child of Column.Root.\n */\nconst Row = forwardRef<HTMLDivElement, ColumnRowProps>(\n ({ classNames, className, asChild, role, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Component = asChild ? Slot : Primitive.div;\n return (\n <Component\n {...props}\n className={tx('column.row', {}, [className, classNames])}\n role={role ?? 'none'}\n ref={forwardedRef}\n >\n {children}\n </Component>\n );\n },\n);\n\nRow.displayName = COLUMN_ROW_NAME;\n\n//\n// Segment\n//\n\nconst COLUMN_SEGMENT_NAME = 'Column.Segment';\n\ntype ColumnSegmentProps = SlottableProps<HTMLDivElement>;\n\n/**\n * Occupies only the center column (col-2) of the parent Column.Root grid.\n * Use `asChild` to merge grid positioning onto the child element, eliminating the wrapper div.\n * NOTE: Must not use overflow-hidden here since it will clip input focus rings.\n */\nconst Segment = forwardRef<HTMLDivElement, ColumnSegmentProps>(\n ({ classNames, className, asChild, role, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Component = asChild ? Slot : Primitive.div;\n\n if (asChild) {\n // With asChild, merge col-start-2 directly onto the child — no contents wrapper needed.\n return (\n <Component\n {...props}\n role={role ?? 'none'}\n className={tx('column.segment', {}, [className, classNames])}\n ref={forwardedRef}\n >\n {children}\n </Component>\n );\n }\n\n return (\n <Component\n {...props}\n className={tx('column.segment', {}, [className, classNames])}\n role={role}\n ref={forwardedRef}\n >\n <div className='contents'>{children}</div>\n </Component>\n );\n },\n);\n\nSegment.displayName = COLUMN_SEGMENT_NAME;\n\n//\n// Column\n//\n\nexport const Column = {\n Root,\n Row,\n Segment,\n};\n\nexport type { ColumnRootProps, ColumnRowProps, ColumnSegmentProps };\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type HTMLAttributes } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ComposableProps } from '@dxos/ui-types';\n\nexport type FlexProps = ComposableProps<\n HTMLAttributes<HTMLDivElement> & {\n column?: boolean;\n grow?: boolean;\n }\n>;\n\nexport const Flex = ({ children, classNames, className, role, column, grow, ...props }: FlexProps) => {\n return (\n <div\n {...props}\n role={role ?? 'none'}\n className={mx('flex', column && 'flex-col', grow && 'flex-1 overflow-hidden', className, classNames)}\n >\n {children}\n </div>\n );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type HTMLAttributes } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ComposableProps } from '@dxos/ui-types';\n\nexport type GridProps = ComposableProps<\n HTMLAttributes<HTMLDivElement> & {\n cols?: number;\n rows?: number;\n grow?: boolean;\n }\n>;\n\nexport const Grid = ({\n children,\n classNames,\n className,\n style,\n role,\n cols,\n rows,\n grow = true,\n ...props\n}: GridProps) => {\n return (\n <div\n {...props}\n role={role ?? 'none'}\n style={{\n gridTemplateColumns: cols ? `repeat(${cols}, 1fr)` : undefined,\n gridTemplateRows: rows ? `repeat(${rows}, 1fr)` : undefined,\n ...style,\n }}\n className={mx('grid overflow-hidden', grow && 'dx-container', className, classNames)}\n >\n {children}\n </div>\n );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { forwardRef } from 'react';\n\nimport { type SlottableProps } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\n\n//\n// Root\n//\n\nconst GRID_TEMPLATE_ROWS = 'auto 1fr auto';\nconst GRID_TEMPLATE_AREAS = '\"toolbar\" \"content\" \"statusbar\"';\n\ntype PanelRootProps = SlottableProps<HTMLDivElement>;\n\nconst Root = forwardRef<HTMLDivElement, PanelRootProps>(\n ({ classNames, className, asChild, children, role, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp\n ref={forwardedRef}\n role={role ?? 'none'}\n {...props}\n style={{\n gridTemplateRows: GRID_TEMPLATE_ROWS,\n gridTemplateAreas: GRID_TEMPLATE_AREAS,\n ...props.style,\n }}\n className={tx('panel.root', {}, [className, classNames])}\n >\n {children}\n </Comp>\n );\n },\n);\n\nRoot.displayName = 'Panel.Root';\n\n//\n// Toolbar\n//\n\ntype ToolbarProps = SlottableProps<HTMLDivElement>;\n\nconst Toolbar = forwardRef<HTMLDivElement, ToolbarProps>(\n ({ classNames, className, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp\n ref={forwardedRef}\n data-slot='toolbar'\n {...props}\n className={tx('panel.toolbar', {}, [className, classNames])}\n >\n {children}\n </Comp>\n );\n },\n);\n\nToolbar.displayName = 'Panel.Toolbar';\n\n//\n// Content\n//\n\ntype ContentProps = SlottableProps<HTMLDivElement>;\n\nconst Content = forwardRef<HTMLDivElement, ContentProps>(\n ({ classNames, className, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp\n ref={forwardedRef}\n data-slot='content'\n {...props}\n className={tx('panel.content', {}, [className, classNames])}\n >\n {children}\n </Comp>\n );\n },\n);\n\nContent.displayName = 'Panel.Content';\n\n//\n// Statusbar\n//\n\ntype StatusbarProps = SlottableProps<HTMLDivElement>;\n\nconst Statusbar = forwardRef<HTMLDivElement, StatusbarProps>(\n ({ classNames, className, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp\n ref={forwardedRef}\n data-slot='statusbar'\n {...props}\n className={tx('panel.statusbar', {}, [className, classNames])}\n >\n {children}\n </Comp>\n );\n },\n);\n\nStatusbar.displayName = 'Panel.Statusbar';\n\n//\n// Panel\n//\n\nexport const Panel = {\n Root,\n Toolbar,\n Content,\n Statusbar,\n};\n\nexport type {\n PanelRootProps,\n ToolbarProps as PanelToolbarProps,\n ContentProps as PanelContentProps,\n StatusbarProps as PanelStatusbarProps,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { type SyntheticEvent, useCallback, useRef, useState } from 'react';\n\nimport { type ThemedClassName } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nconst cache = new Map<string, string>();\n\nexport type ImageProps = ThemedClassName<\n {\n src: string;\n alt?: string;\n crossOrigin?: 'anonymous' | 'use-credentials' | '';\n } & ColorOptions\n>;\n\n// TODO(burdon): Option for neutral background color.\nexport const Image = ({\n classNames,\n src,\n alt = '',\n crossOrigin = 'anonymous',\n sampleSize = 64,\n contrast = 0.9,\n}: ImageProps) => {\n const [crossOriginState, setCrossOriginState] = useState<ImageProps['crossOrigin']>(crossOrigin);\n const [dominantColor, setDominantColor] = useState<string | undefined>(undefined);\n const [imageLoaded, setImageLoaded] = useState<boolean>(false);\n const canvasRef = useRef<HTMLCanvasElement>(null);\n\n // CORS not supported by server.\n const handleImageError = (): void => {\n setCrossOriginState(undefined);\n };\n\n const handleImageLoad = useCallback(\n ({ target }: SyntheticEvent<HTMLImageElement>): void => {\n const rgb = cache.get(src);\n if (rgb) {\n setDominantColor(rgb);\n setImageLoaded(true);\n return;\n }\n\n const img = target as HTMLImageElement;\n if (!canvasRef.current) {\n return;\n }\n\n try {\n const color = extractDominantColor(canvasRef.current, img, { sampleSize, contrast });\n if (color) {\n const rgb = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;\n cache.set(src, rgb);\n setDominantColor(rgb);\n }\n } catch {\n setCrossOriginState(undefined);\n }\n\n setImageLoaded(true);\n },\n [sampleSize, contrast, src],\n );\n\n return (\n <div\n className={mx(`relative flex w-full justify-center overflow-hidden transition-all duration-700`, classNames)}\n style={{\n backgroundColor: dominantColor,\n }}\n >\n {/* Hidden canvas for color extraction. */}\n <canvas ref={canvasRef} style={{ display: 'none' }} aria-hidden='true' />\n\n {/* Background gradient overlay for smooth transition. */}\n <div\n className='absolute inset-0 pointer-events-none'\n style={{\n background: dominantColor\n ? `radial-gradient(circle at center, transparent 30%, ${dominantColor} 100%)`\n : undefined,\n transition: 'opacity 0.7s ease-in-out',\n opacity: 0.5,\n }}\n />\n\n <img\n src={src}\n alt={alt}\n crossOrigin={crossOriginState}\n onError={handleImageError}\n onLoad={handleImageLoad}\n className='z-10 object-contain transition-opacity duration-500'\n style={{\n opacity: imageLoaded ? 1 : 0,\n }}\n />\n </div>\n );\n};\n\ntype ColorOptions = {\n sampleSize?: number;\n contrast?: number;\n};\n\n/**\n * Get dominant color from image (esp. from corners).\n */\nconst extractDominantColor = (\n canvas: HTMLCanvasElement,\n img: HTMLImageElement,\n { sampleSize = 64, contrast = 0.95 }: ColorOptions,\n): [number, number, number] | null => {\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return null;\n }\n\n // Draw the image scaled down.\n canvas.width = sampleSize;\n canvas.height = sampleSize;\n ctx.drawImage(img, 0, 0, sampleSize, sampleSize);\n\n // Get image data.\n const imageData = ctx.getImageData(0, 0, sampleSize, sampleSize);\n const pixels = imageData.data;\n\n // Check for transparent background.\n if (isTransparent(pixels, sampleSize)) {\n return null;\n }\n\n let r = 0;\n let g = 0;\n let b = 0;\n let totalWeight = 0;\n\n // Define corner sampling areas (e.g., 25% of each dimension from each corner).\n const cornerSize = Math.floor(sampleSize * 0.125);\n\n // Sample only pixels in corner areas.\n for (let y = 0; y < sampleSize; y++) {\n for (let x = 0; x < sampleSize; x++) {\n // Check if pixel is in any corner area.\n const isInTopLeft = x < cornerSize && y < cornerSize;\n const isInTopRight = x >= sampleSize - cornerSize && y < cornerSize;\n const isInBottomLeft = x < cornerSize && y >= sampleSize - cornerSize;\n const isInBottomRight = x >= sampleSize - cornerSize && y >= sampleSize - cornerSize;\n if (!isInTopLeft && !isInTopRight && !isInBottomLeft && !isInBottomRight) {\n continue; // Skip pixels not in corner areas.\n }\n\n const i = (y * sampleSize + x) * 4;\n const red = pixels[i];\n const green = pixels[i + 1];\n const blue = pixels[i + 2];\n const alpha = pixels[i + 3];\n\n // Skip transparent pixels.\n if (alpha === 0) continue;\n\n // Calculate saturation to weight vibrant colors more.\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const saturation = max === 0 ? 0 : (max - min) / max;\n const weight = 1 + saturation * 2;\n\n r += red * weight;\n g += green * weight;\n b += blue * weight;\n totalWeight += weight;\n }\n }\n\n if (totalWeight > 0) {\n // Slightly darken the color for better contrast.\n r = Math.round(Math.round(r / totalWeight) * contrast);\n g = Math.round(Math.round(g / totalWeight) * contrast);\n b = Math.round(Math.round(b / totalWeight) * contrast);\n return [r, g, b];\n }\n\n return null;\n};\n\n/**\n * Detects if an image has a transparent background by examining edge pixels.\n * @param pixels - Image pixel data from canvas\n * @param sampleSize - Size of the sampled image\n * @param threshold - Percentage threshold for considering background transparent (default: 0.5)\n * @returns True if the image has a transparent background\n */\nconst isTransparent = (pixels: Uint8ClampedArray, sampleSize: number, threshold: number = 0.5): boolean => {\n let edgeTransparentPixels = 0;\n const edgePixels = sampleSize * 4 - 4; // Perimeter minus corners counted twice.\n\n for (let x = 0; x < sampleSize; x++) {\n // Top edge.\n const topIndex = x * 4;\n if (pixels[topIndex + 3] === 0) edgeTransparentPixels++;\n\n // Bottom edge.\n const bottomIndex = ((sampleSize - 1) * sampleSize + x) * 4;\n if (pixels[bottomIndex + 3] === 0) edgeTransparentPixels++;\n }\n\n for (let y = 1; y < sampleSize - 1; y++) {\n // Left edge.\n const leftIndex = y * sampleSize * 4;\n if (pixels[leftIndex + 3] === 0) edgeTransparentPixels++;\n\n // Right edge.\n const rightIndex = (y * sampleSize + sampleSize - 1) * 4;\n if (pixels[rightIndex + 3] === 0) edgeTransparentPixels++;\n }\n\n return edgeTransparentPixels / edgePixels > threshold;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { ToggleGroupItemProps as ToggleGroupItemPrimitiveProps } from '@radix-ui/react-toggle-group';\nimport * as ToolbarPrimitive from '@radix-ui/react-toolbar';\nimport React, { Fragment, forwardRef } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { type ToolbarStyleProps } from '@dxos/ui-theme';\nimport { type SlottableProps } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\nimport { translationKey } from '../../translations';\nimport { type ThemedClassName } from '../../util';\nimport {\n Button,\n ButtonGroup,\n type ButtonGroupProps,\n type ButtonProps,\n IconButton,\n type IconButtonProps,\n Toggle,\n type ToggleGroupItemProps,\n type ToggleProps,\n} from '../Button';\nimport { Link, type LinkProps } from '../Link';\nimport { DropdownMenu } from '../Menu';\nimport { Separator, type SeparatorProps } from '../Separator';\n\n//\n// Root\n//\n\ntype ToolbarRootProps = ThemedClassName<\n ToolbarPrimitive.ToolbarProps &\n ToolbarStyleProps & {\n textBlockWidth?: boolean;\n }\n>;\n\n// TODO(burdon): Implement asChild property.\nconst ToolbarRoot = forwardRef<HTMLDivElement, ToolbarRootProps>(\n (\n { classNames, children, density, disabled, layoutManaged, textBlockWidth: textBlockWidthProp, ...props },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const InnerRoot = textBlockWidthProp ? 'div' : Fragment;\n const innerRootProps = textBlockWidthProp\n ? {\n role: 'none',\n className: tx('toolbar.inner', { layoutManaged }, classNames),\n }\n : {};\n\n return (\n <ToolbarPrimitive.Root\n {...props}\n data-arrow-keys={props.orientation === 'vertical' ? 'up down' : 'left right'}\n className={tx('toolbar.root', { density, disabled, layoutManaged }, classNames)}\n ref={forwardedRef}\n >\n <InnerRoot {...innerRootProps}>{children}</InnerRoot>\n </ToolbarPrimitive.Root>\n );\n },\n);\n\n//\n// Text\n//\n\ntype ToolbarTextProps = SlottableProps<HTMLDivElement>;\n\nconst ToolbarText = forwardRef<HTMLDivElement, ToolbarTextProps>(\n ({ classNames, className, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp {...props} className={tx('toolbar.text', {}, [className, classNames])} ref={forwardedRef}>\n {children}\n </Comp>\n );\n },\n);\n\n//\n// Button\n//\n\ntype ToolbarButtonProps = ButtonProps;\n\nconst ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Button asChild>\n <Button {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Button>\n );\n});\n\n//\n// IconButton\n//\n\ntype ToolbarIconButtonProps = IconButtonProps;\n\nconst ToolbarIconButton = forwardRef<HTMLButtonElement, ToolbarIconButtonProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Button asChild>\n <IconButton {...props} noTooltip ref={forwardedRef} />\n </ToolbarPrimitive.Button>\n );\n});\n\ntype ToolbarToggleProps = ToggleProps;\n\nconst ToolbarToggle = forwardRef<HTMLButtonElement, ToolbarToggleProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Button asChild>\n <Toggle {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Button>\n );\n});\n\n//\n// Link\n//\n\ntype ToolbarLinkProps = LinkProps;\n\nconst ToolbarLink = forwardRef<HTMLAnchorElement, ToolbarLinkProps>((props, forwardedRef) => {\n return (\n <ToolbarPrimitive.Link asChild>\n <Link {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Link>\n );\n});\n\ntype ToolbarToggleGroupProps = (\n | Omit<ToolbarPrimitive.ToolbarToggleGroupSingleProps, 'className'>\n | Omit<ToolbarPrimitive.ToolbarToggleGroupMultipleProps, 'className'>\n) &\n ButtonGroupProps;\n\n//\n// ToggleGroup\n//\n\nconst ToolbarToggleGroup = forwardRef<HTMLDivElement, ToolbarToggleGroupProps>(\n ({ classNames, children, elevation, ...props }, forwardedRef) => {\n return (\n <ToolbarPrimitive.ToolbarToggleGroup {...props} asChild>\n <ButtonGroup {...{ classNames, children, elevation }} ref={forwardedRef} />\n </ToolbarPrimitive.ToolbarToggleGroup>\n );\n },\n);\n\ntype ToolbarToggleGroupItemProps = ToggleGroupItemProps;\n\nconst ToolbarToggleGroupItem = forwardRef<HTMLButtonElement, ToolbarToggleGroupItemProps>(\n ({ variant, density, elevation, classNames, children, ...props }, forwardedRef) => {\n return (\n <ToolbarPrimitive.ToolbarToggleItem {...props} asChild>\n <Button {...{ variant, density, elevation, classNames, children }} ref={forwardedRef} />\n </ToolbarPrimitive.ToolbarToggleItem>\n );\n },\n);\n\ntype ToolbarToggleGroupIconItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & IconButtonProps;\n\nconst ToolbarToggleGroupIconItem = forwardRef<HTMLButtonElement, ToolbarToggleGroupIconItemProps>(\n ({ variant, density, elevation, classNames, icon, label, iconOnly, ...props }, forwardedRef) => {\n return (\n <ToolbarPrimitive.ToolbarToggleItem {...props} asChild>\n <IconButton\n {...{\n variant,\n density,\n elevation,\n classNames,\n icon,\n label,\n iconOnly,\n }}\n ref={forwardedRef}\n />\n </ToolbarPrimitive.ToolbarToggleItem>\n );\n },\n);\n\n//\n// Separator\n//\n\ntype ToolbarSeparatorProps = SeparatorProps & { variant?: 'gap' | 'line' };\n\nconst ToolbarSeparator = forwardRef<HTMLDivElement, ToolbarSeparatorProps>(\n ({ variant = 'gap', ...props }, forwardedRef) => {\n return variant === 'line' ? (\n <ToolbarPrimitive.Separator asChild>\n <Separator {...props} ref={forwardedRef} />\n </ToolbarPrimitive.Separator>\n ) : (\n <ToolbarPrimitive.Separator className='grow' ref={forwardedRef} />\n );\n },\n);\n\n//\n// DragHandle\n//\n\ntype ToolbarDragHandleProps = { testId?: string; label?: string };\n\nconst ToolbarDragHandle = forwardRef<HTMLButtonElement, ToolbarDragHandleProps>(\n ({ testId = 'drag-handle', label }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n return (\n <ToolbarIconButton\n data-testid={testId}\n noTooltip\n iconOnly\n icon='ph--dots-six-vertical--regular'\n variant='ghost'\n label={label ?? t('toolbar drag handle label')}\n classNames='cursor-pointer'\n size={5}\n disabled={!forwardedRef}\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// CloseIconButton\n//\n\ntype ToolbarCloseIconButtonProps = { onClick?: () => void; label?: string };\n\nconst ToolbarCloseIconButton = forwardRef<HTMLButtonElement, ToolbarCloseIconButtonProps>(\n ({ onClick, label }, forwardedRef) => {\n const { t } = useTranslation(translationKey);\n return (\n <ToolbarIconButton\n iconOnly\n icon='ph--x--regular'\n variant='ghost'\n label={label ?? t('toolbar close label')}\n classNames='cursor-pointer'\n size={5}\n onClick={onClick}\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// Menu\n//\n\ntype ToolbarMenuItem<T extends any | void = void> = {\n label: string;\n onClick: (context: T) => void;\n};\n\ntype ToolbarMenuProps<T extends any | void = void> = {\n context?: T;\n items?: ToolbarMenuItem<T>[];\n};\n\n// TODO(burdon): Make slottable.\nconst ToolbarMenu = <T extends any | void = void>({ context, items }: ToolbarMenuProps<T>) => {\n const { t } = useTranslation(translationKey);\n\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger disabled={!items?.length} asChild>\n <ToolbarIconButton\n iconOnly\n variant='ghost'\n icon='ph--dots-three-vertical--regular'\n label={t('toolbar menu label')}\n />\n </DropdownMenu.Trigger>\n {(items?.length ?? 0) > 0 && (\n <DropdownMenu.Portal>\n <DropdownMenu.Content>\n <DropdownMenu.Viewport>\n {items?.map(({ label, onClick: onSelect }, index) => (\n <DropdownMenu.Item key={index} onSelect={() => onSelect(context as T)}>\n {label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Viewport>\n <DropdownMenu.Arrow />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n )}\n </DropdownMenu.Root>\n );\n};\n\n//\n// Toolbar\n//\n\nexport const Toolbar = {\n Root: ToolbarRoot,\n Text: ToolbarText,\n Button: ToolbarButton,\n IconButton: ToolbarIconButton,\n Link: ToolbarLink,\n Toggle: ToolbarToggle,\n ToggleGroup: ToolbarToggleGroup,\n ToggleGroupItem: ToolbarToggleGroupItem,\n ToggleGroupIconItem: ToolbarToggleGroupIconItem,\n Separator: ToolbarSeparator,\n DragHandle: ToolbarDragHandle,\n CloseIconButton: ToolbarCloseIconButton,\n Menu: ToolbarMenu,\n};\n\nexport type {\n ToolbarRootProps,\n ToolbarTextProps,\n ToolbarButtonProps,\n ToolbarIconButtonProps,\n ToolbarLinkProps,\n ToolbarToggleProps,\n ToolbarToggleGroupProps,\n ToolbarToggleGroupItemProps,\n ToolbarToggleGroupIconItemProps,\n ToolbarSeparatorProps,\n ToolbarDragHandleProps,\n ToolbarCloseIconButtonProps,\n ToolbarMenuItem,\n ToolbarMenuProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'toolbar menu label': 'Action menu',\n 'toolbar drag handle label': 'Drag to rearrange',\n 'toolbar close label': 'Close',\n },\n },\n },\n] as const satisfies Resource[];\n", "//\n// Copyright 2023 DXOS.org\n//\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\n\ntype ContextMenuRootProps = ContextMenuPrimitive.ContextMenuProps;\n\nconst ContextMenuRoot = ContextMenuPrimitive.ContextMenu;\n\ntype ContextMenuTriggerProps = ContextMenuPrimitive.ContextMenuTriggerProps;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\ntype ContextMenuPortalProps = ContextMenuPrimitive.ContextMenuPortalProps;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\ntype ContextMenuContentProps = ThemedClassName<ContextMenuPrimitive.ContextMenuContentProps> & {\n constrainBlockSize?: boolean;\n};\n\nconst ContextMenuContent = forwardRef<HTMLDivElement, ContextMenuContentProps>(\n ({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const elevation = useElevationContext();\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n return (\n <ContextMenuPrimitive.Content\n {...props}\n data-arrow-keys='up down'\n collisionPadding={safeCollisionPadding}\n className={tx('menu.content', { elevation }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ContextMenuPrimitive.Content>\n );\n },\n);\n\ntype ContextMenuViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst ContextMenuViewport = forwardRef<HTMLDivElement, ContextMenuViewportProps>(\n ({ classNames, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp {...props} className={tx('menu.viewport', {}, classNames)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n },\n);\n\ntype ContextMenuArrowProps = ThemedClassName<ContextMenuPrimitive.ContextMenuArrowProps>;\n\nconst ContextMenuArrow = forwardRef<SVGSVGElement, ContextMenuArrowProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <ContextMenuPrimitive.Arrow {...props} className={tx('menu.arrow', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype ContextMenuGroupProps = ContextMenuPrimitive.ContextMenuGroupProps;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\ntype ContextMenuItemIndicatorProps = ContextMenuPrimitive.ContextMenuItemIndicatorProps;\n\nconst ContextMenuItemIndicator = ContextMenuPrimitive.ItemIndicator;\n\ntype ContextMenuItemProps = ThemedClassName<ContextMenuPrimitive.ContextMenuItemProps>;\n\nconst ContextMenuItem = forwardRef<HTMLDivElement, ContextMenuItemProps>(\n ({ classNames, ...props }: ContextMenuItemProps, forwardedRef) => {\n const { tx } = useThemeContext();\n return <ContextMenuPrimitive.Item {...props} className={tx('menu.item', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype ContextMenuCheckboxItemProps = ThemedClassName<ContextMenuPrimitive.ContextMenuCheckboxItemProps>;\n\nconst ContextMenuCheckboxItem = forwardRef<HTMLDivElement, ContextMenuCheckboxItemProps>(\n ({ classNames, ...props }: ContextMenuItemProps, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.CheckboxItem {...props} className={tx('menu.item', {}, classNames)} ref={forwardedRef} />\n );\n },\n);\n\ntype ContextMenuSeparatorProps = ThemedClassName<ContextMenuPrimitive.ContextMenuSeparatorProps>;\n\nconst ContextMenuSeparator = forwardRef<HTMLDivElement, ContextMenuSeparatorProps>(\n ({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.Separator {...props} className={tx('menu.separator', {}, classNames)} ref={forwardedRef} />\n );\n },\n);\n\ntype ContextMenuGroupLabelProps = ThemedClassName<ContextMenuPrimitive.ContextMenuLabelProps>;\n\nconst ContextMenuGroupLabel = forwardRef<HTMLDivElement, ContextMenuGroupLabelProps>(\n ({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.Label {...props} className={tx('menu.groupLabel', {}, classNames)} ref={forwardedRef} />\n );\n },\n);\n\nexport const ContextMenu = {\n Root: ContextMenuRoot,\n Trigger: ContextMenuTrigger,\n Portal: ContextMenuPortal,\n Content: ContextMenuContent,\n Viewport: ContextMenuViewport,\n Arrow: ContextMenuArrow,\n Group: ContextMenuGroup,\n Item: ContextMenuItem,\n CheckboxItem: ContextMenuCheckboxItem,\n ItemIndicator: ContextMenuItemIndicator,\n Separator: ContextMenuSeparator,\n GroupLabel: ContextMenuGroupLabel,\n};\n\nexport type {\n ContextMenuRootProps,\n ContextMenuTriggerProps,\n ContextMenuPortalProps,\n ContextMenuContentProps,\n ContextMenuViewportProps,\n ContextMenuArrowProps,\n ContextMenuGroupProps,\n ContextMenuItemProps,\n ContextMenuCheckboxItemProps,\n ContextMenuItemIndicatorProps,\n ContextMenuSeparatorProps,\n ContextMenuGroupLabelProps,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type TooltipContentProps } from '@radix-ui/react-tooltip';\nimport { useMemo } from 'react';\n\nimport { type SafeAreaPadding } from './useSafeArea';\nimport { useThemeContext } from './useThemeContext';\n\ntype PaddingProp = TooltipContentProps['collisionPadding'];\ntype PaddingRecord = Exclude<PaddingProp, number | undefined>;\n\nconst propIsNumber = (prop: PaddingProp): prop is number => Number.isFinite(prop);\nconst propsIsRecord = (prop: PaddingProp): prop is PaddingRecord => !!(prop && typeof prop === 'object');\n\nconst safePadding = (\n propsPadding: TooltipContentProps['collisionPadding'],\n safePadding: SafeAreaPadding,\n side: keyof SafeAreaPadding,\n) => {\n return (\n (propIsNumber(safePadding[side]) ? safePadding[side] : 0) +\n (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? (propsPadding[side] ?? 0) : 0)\n );\n};\n\nexport const useSafeCollisionPadding = (collisionPadding?: PaddingProp) => {\n const { safeAreaPadding } = useThemeContext();\n return useMemo(\n () => ({\n top: safePadding(collisionPadding, safeAreaPadding!, 'top'),\n right: safePadding(collisionPadding, safeAreaPadding!, 'right'),\n bottom: safePadding(collisionPadding, safeAreaPadding!, 'bottom'),\n left: safePadding(collisionPadding, safeAreaPadding!, 'left'),\n }),\n [collisionPadding, safeAreaPadding],\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\n// This is based upon `@radix-ui/react-dropdown-menu` fetched 25 Oct 2024 at https://github.com/radix-ui/primitives at commit 06de2d4.\n\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport type { Scope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {\n type ComponentPropsWithRef,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type FC,\n type MutableRefObject,\n type ReactNode,\n type RefObject,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\n\ntype Direction = 'ltr' | 'rtl';\n\n//\n// DropdownMenu\n//\n\nconst DROPDOWN_MENU_NAME = 'DropdownMenu';\n\ntype ScopedProps<P> = P & { __scopeDropdownMenu?: Scope };\nconst [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [createMenuScope]);\nconst useMenuScope: (scope?: Scope) => any = createMenuScope();\n\ntype DropdownMenuContextValue = {\n triggerId: string;\n triggerRef: MutableRefObject<HTMLButtonElement | null>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DropdownMenuProvider, useDropdownMenuContext] =\n createDropdownMenuContext<DropdownMenuContextValue>(DROPDOWN_MENU_NAME);\n\ninterface DropdownMenuRootProps {\n children?: ReactNode;\n dir?: Direction;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst DropdownMenuRoot: FC<DropdownMenuRootProps> = (props: ScopedProps<DropdownMenuRootProps>) => {\n const { __scopeDropdownMenu, children, dir, open: openProp, defaultOpen, onOpenChange, modal = true } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <DropdownMenuProvider\n scope={__scopeDropdownMenu}\n triggerId={useId()}\n triggerRef={triggerRef as MutableRefObject<HTMLButtonElement | null>}\n contentId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n <MenuPrimitive.Root {...menuScope} open={open} onOpenChange={setOpen} dir={dir} modal={modal}>\n {children}\n </MenuPrimitive.Root>\n </DropdownMenuProvider>\n );\n};\n\nDropdownMenuRoot.displayName = DROPDOWN_MENU_NAME;\n\n//\n// DropdownMenuTrigger\n//\n\nconst TRIGGER_NAME = 'DropdownMenuTrigger';\n\ntype DropdownMenuTriggerElement = ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DropdownMenuTriggerProps extends PrimitiveButtonProps {}\n\nconst DropdownMenuTrigger = forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n (props: ScopedProps<DropdownMenuTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return (\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type='button'\n id={context.triggerId}\n aria-haspopup='menu'\n aria-expanded={context.open}\n aria-controls={context.open ? context.contentId : undefined}\n data-state={context.open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composeRefs(forwardedRef, context.triggerRef)}\n data-arrow-keys='down'\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!context.open) {\n event.preventDefault();\n }\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) {\n return;\n }\n if (['Enter', ' '].includes(event.key)) {\n context.onOpenToggle();\n }\n if (event.key === 'ArrowDown') {\n context.onOpenChange(true);\n }\n // prevent keydown from scrolling window / first focused item to execute\n // that keydown (inadvertently closing the menu)\n if (['Enter', ' ', 'ArrowDown'].includes(event.key)) {\n event.preventDefault();\n }\n })}\n />\n </MenuPrimitive.Anchor>\n );\n },\n);\n\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\n\n//\n// DropdownMenuVirtualTrigger\n//\n\nconst VIRTUAL_TRIGGER_NAME = 'DropdownMenuVirtualTrigger';\n\ninterface DropdownMenuVirtualTriggerProps {\n virtualRef: RefObject<DropdownMenuTriggerElement | null>;\n}\n\nconst DropdownMenuVirtualTrigger = (props: ScopedProps<DropdownMenuVirtualTriggerProps>) => {\n const { __scopeDropdownMenu, virtualRef } = props;\n const context = useDropdownMenuContext(VIRTUAL_TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n useEffect(() => {\n if (virtualRef.current) {\n context.triggerRef.current = virtualRef.current;\n }\n });\n return <MenuPrimitive.Anchor {...menuScope} virtualRef={virtualRef as RefObject<DropdownMenuTriggerElement>} />;\n};\n\nDropdownMenuVirtualTrigger.displayName = VIRTUAL_TRIGGER_NAME;\n\n//\n// DropdownMenuPortal\n//\n\nconst PORTAL_NAME = 'DropdownMenuPortal';\n\ntype MenuPortalProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface DropdownMenuPortalProps extends MenuPortalProps {}\n\nconst DropdownMenuPortal: FC<DropdownMenuPortalProps> = (props: ScopedProps<DropdownMenuPortalProps>) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nDropdownMenuPortal.displayName = PORTAL_NAME;\n\n//\n// DropdownMenuViewport\n//\n\ntype DropdownMenuViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst DropdownMenuViewport = forwardRef<HTMLDivElement, DropdownMenuViewportProps>(\n ({ classNames, asChild, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp {...props} className={tx('menu.viewport', {}, classNames)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n },\n);\n\n//\n// DropdownMenuContent\n//\n\nconst CONTENT_NAME = 'DropdownMenuContent';\n\ntype DropdownMenuContentElement = ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Content>>;\ninterface DropdownMenuContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {}\n\nconst DropdownMenuContent = forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props: ScopedProps<DropdownMenuContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, collisionPadding = 8, collisionBoundary, ...contentProps } = props;\n const { tx } = useThemeContext();\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const elevation = useElevationContext();\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = useRef(false);\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n\n // Check for the closest annotated collision boundary in the DOM tree.\n const computedCollisionBoundary = useMemo(() => {\n const closestBoundary = context.triggerRef.current?.closest(\n '[data-popover-collision-boundary]',\n ) as HTMLElement | null;\n return closestBoundary\n ? Array.isArray(collisionBoundary)\n ? [closestBoundary, ...collisionBoundary]\n : collisionBoundary\n ? [closestBoundary, collisionBoundary]\n : [closestBoundary]\n : collisionBoundary;\n }, [context.open, collisionBoundary, context.triggerRef.current]);\n\n return (\n <MenuPrimitive.Content\n id={context.contentId}\n aria-labelledby={context.triggerId}\n {...menuScope}\n {...contentProps}\n collisionBoundary={computedCollisionBoundary}\n collisionPadding={safeCollisionPadding}\n ref={forwardedRef}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) {\n context.triggerRef.current?.focus();\n }\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent as PointerEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) {\n hasInteractedOutsideRef.current = true;\n }\n })}\n data-arrow-keys='up down'\n className={tx('menu.content', { elevation }, classNames)}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\nDropdownMenuContent.displayName = CONTENT_NAME;\n\n//\n// DropdownMenuGroup\n//\n\nconst GROUP_NAME = 'DropdownMenuGroup';\n\ntype DropdownMenuGroupElement = ElementRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface DropdownMenuGroupProps extends MenuGroupProps {}\n\nconst DropdownMenuGroup = forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n (props: ScopedProps<DropdownMenuGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuGroup.displayName = GROUP_NAME;\n\n//\n// DropdownMenuLabel\n//\n\nconst LABEL_NAME = 'DropdownMenuLabel';\n\ntype DropdownMenuLabelElement = ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Label>>;\ninterface DropdownMenuLabelProps extends MenuLabelProps {}\n\nconst DropdownMenuGroupLabel = forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n (props: ScopedProps<DropdownMenuLabelProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Label\n {...menuScope}\n {...labelProps}\n className={tx('menu.groupLabel', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuGroupLabel.displayName = LABEL_NAME;\n\n//\n// DropdownMenuItem\n//\n\nconst ITEM_NAME = 'DropdownMenuItem';\n\ntype DropdownMenuItemElement = ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Item>>;\ninterface DropdownMenuItemProps extends MenuItemProps {}\n\nconst DropdownMenuItem = forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props: ScopedProps<DropdownMenuItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Item\n {...menuScope}\n {...itemProps}\n className={tx('menu.item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuItem.displayName = ITEM_NAME;\n\n//\n// DropdownMenuCheckboxItem\n//\n\nconst CHECKBOX_ITEM_NAME = 'DropdownMenuCheckboxItem';\n\ntype DropdownMenuCheckboxItemElement = ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>>;\ninterface DropdownMenuCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst DropdownMenuCheckboxItem = forwardRef<DropdownMenuCheckboxItemElement, DropdownMenuCheckboxItemProps>(\n (props: ScopedProps<DropdownMenuCheckboxItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.CheckboxItem\n {...menuScope}\n {...checkboxItemProps}\n className={tx('menu.item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n//\n// DropdownMenuRadioGroup\n//\n\nconst RADIO_GROUP_NAME = 'DropdownMenuRadioGroup';\n\ntype DropdownMenuRadioGroupElement = ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps extends MenuRadioGroupProps {}\n\nconst DropdownMenuRadioGroup = forwardRef<DropdownMenuRadioGroupElement, DropdownMenuRadioGroupProps>(\n (props: ScopedProps<DropdownMenuRadioGroupProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\n\n//\n// DropdownMenuRadioItem\n//\n\nconst RADIO_ITEM_NAME = 'DropdownMenuRadioItem';\n\ntype DropdownMenuRadioItemElement = ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemProps = ThemedClassName<MenuRadioItemProps>;\n\nconst DropdownMenuRadioItem = forwardRef<DropdownMenuRadioItemElement, DropdownMenuRadioItemProps>(\n (props: ScopedProps<DropdownMenuRadioItemProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Item\n {...menuScope}\n {...itemProps}\n className={tx('menu.item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\n\n//\n// DropdownMenuItemIndicator\n//\n\nconst INDICATOR_NAME = 'DropdownMenuItemIndicator';\n\ntype DropdownMenuItemIndicatorElement = ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface DropdownMenuItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst DropdownMenuItemIndicator = forwardRef<DropdownMenuItemIndicatorElement, DropdownMenuItemIndicatorProps>(\n (props: ScopedProps<DropdownMenuItemIndicatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\n\n//\n// DropdownMenuSeparator\n//\n\nconst SEPARATOR_NAME = 'DropdownMenuSeparator';\n\ntype DropdownMenuSeparatorElement = ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>>;\ninterface DropdownMenuSeparatorProps extends MenuSeparatorProps {}\n\nconst DropdownMenuSeparator = forwardRef<DropdownMenuSeparatorElement, DropdownMenuSeparatorProps>(\n (props: ScopedProps<DropdownMenuSeparatorProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Separator\n {...menuScope}\n {...separatorProps}\n className={tx('menu.separator', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\n\n//\n// DropdownMenuArrow\n//\n\nconst ARROW_NAME = 'DropdownMenuArrow';\n\ntype DropdownMenuArrowElement = ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>>;\ninterface DropdownMenuArrowProps extends MenuArrowProps {}\n\nconst DropdownMenuArrow = forwardRef<DropdownMenuArrowElement, DropdownMenuArrowProps>(\n (props: ScopedProps<DropdownMenuArrowProps>, forwardedRef) => {\n const { __scopeDropdownMenu, classNames, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const { tx } = useThemeContext();\n return (\n <MenuPrimitive.Arrow\n {...menuScope}\n {...arrowProps}\n className={tx('menu.arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nDropdownMenuArrow.displayName = ARROW_NAME;\n\n//\n// DropdownMenuSub\n//\n\ninterface DropdownMenuSubProps {\n children?: ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst DropdownMenuSub: FC<DropdownMenuSubProps> = (props: ScopedProps<DropdownMenuSubProps>) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\n//\n// DropdownMenuSubTrigger\n//\n\nconst SUB_TRIGGER_NAME = 'DropdownMenuSubTrigger';\n\ntype DropdownMenuSubTriggerElement = ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps extends MenuSubTriggerProps {}\n\nconst DropdownMenuSubTrigger = forwardRef<DropdownMenuSubTriggerElement, DropdownMenuSubTriggerProps>(\n (props: ScopedProps<DropdownMenuSubTriggerProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return <MenuPrimitive.SubTrigger {...menuScope} {...subTriggerProps} ref={forwardedRef} />;\n },\n);\n\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n//\n// DropdownMenuSubContent\n//\n\nconst SUB_CONTENT_NAME = 'DropdownMenuSubContent';\n\ntype DropdownMenuSubContentElement = ElementRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps extends MenuSubContentProps {}\n\nconst DropdownMenuSubContent = forwardRef<DropdownMenuSubContentElement, DropdownMenuSubContentProps>(\n (props: ScopedProps<DropdownMenuSubContentProps>, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n {...subContentProps}\n ref={forwardedRef}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-dropdown-menu-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-dropdown-menu-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-dropdown-menu-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-dropdown-menu-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-dropdown-menu-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n },\n);\n\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\n\n//\n// DropdownMenu\n//\n\nexport const DropdownMenu = {\n Root: DropdownMenuRoot,\n Trigger: DropdownMenuTrigger,\n VirtualTrigger: DropdownMenuVirtualTrigger,\n Portal: DropdownMenuPortal,\n Content: DropdownMenuContent,\n Viewport: DropdownMenuViewport,\n Group: DropdownMenuGroup,\n GroupLabel: DropdownMenuGroupLabel,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n RadioGroup: DropdownMenuRadioGroup,\n RadioItem: DropdownMenuRadioItem,\n ItemIndicator: DropdownMenuItemIndicator,\n Separator: DropdownMenuSeparator,\n Arrow: DropdownMenuArrow,\n Sub: DropdownMenuSub,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n};\n\ntype DropdownMenuScope = Scope;\n\nconst useDropdownMenuMenuScope: (scope?: DropdownMenuScope) => any = useMenuScope;\n\nexport { createDropdownMenuScope, useDropdownMenuContext, useDropdownMenuMenuScope };\n\nexport type {\n DropdownMenuRootProps,\n DropdownMenuTriggerProps,\n DropdownMenuVirtualTriggerProps,\n DropdownMenuPortalProps,\n DropdownMenuContentProps,\n DropdownMenuViewportProps,\n DropdownMenuGroupProps,\n DropdownMenuLabelProps,\n DropdownMenuItemProps,\n DropdownMenuCheckboxItemProps,\n DropdownMenuRadioGroupProps,\n DropdownMenuRadioItemProps,\n DropdownMenuItemIndicatorProps,\n DropdownMenuSeparatorProps,\n DropdownMenuArrowProps,\n DropdownMenuSubProps,\n DropdownMenuSubTriggerProps,\n DropdownMenuSubContentProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\nimport {\n Separator as SeparatorPrimitive,\n type SeparatorProps as SeparatorPrimitiveProps,\n} from '@radix-ui/react-separator';\nimport React, { forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype SeparatorProps = ThemedClassName<SeparatorPrimitiveProps> & { subdued?: boolean };\n\nconst Separator = forwardRef<HTMLDivElement, SeparatorProps>(\n ({ classNames, orientation = 'horizontal', subdued, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SeparatorPrimitive\n orientation={orientation}\n {...props}\n className={tx('separator.root', { orientation, subdued }, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nexport type { SeparatorProps };\n\nexport { Separator };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type PropsWithChildren, createContext, useCallback, useContext, useState } from 'react';\n\nexport type ClipboardContextValue = {\n textValue: string;\n setTextValue: (nextValue: string) => Promise<void>;\n};\n\nexport const ClipboardContext = createContext<ClipboardContextValue>({\n textValue: '',\n setTextValue: async (_) => {},\n});\n\nexport const useClipboard = () => useContext(ClipboardContext);\n\nexport const ClipboardProvider = ({ children }: PropsWithChildren<{}>) => {\n const [textValue, setInternalTextValue] = useState('');\n const setTextValue = useCallback(async (nextValue: string) => {\n await navigator.clipboard.writeText(nextValue);\n return setInternalTextValue(nextValue);\n }, []);\n return <ClipboardContext.Provider value={{ textValue, setTextValue }}>{children}</ClipboardContext.Provider>;\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { mx, osTranslations } from '@dxos/ui-theme';\n\nimport { Button, type ButtonProps, IconButton } from '../Button';\nimport { Icon, type IconProps } from '../Icon';\nimport { useTranslation } from '../ThemeProvider';\nimport { type TooltipScopedProps, useTooltipContext } from '../Tooltip';\n\nimport { useClipboard } from './ClipboardProvider';\n\nexport type CopyButtonProps = ButtonProps &\n Pick<IconProps, 'size'> & {\n value: string;\n };\n\nconst inactiveLabelStyles = 'invisible h-px -mb-px overflow-hidden';\n\nexport const CopyButton = ({ classNames, value, size = 5, ...props }: CopyButtonProps) => {\n const { t } = useTranslation(osTranslations);\n const { textValue, setTextValue } = useClipboard();\n const isCopied = textValue === value;\n return (\n <Button\n {...props}\n classNames={['inline-flex flex-col justify-center', classNames]}\n onClick={() => setTextValue(value)}\n data-testid='copy-invitation'\n >\n <div role='none' className={mx('flex gap-1 items-center', isCopied && inactiveLabelStyles)}>\n <span className='px-1'>{t('copy label')}</span>\n <Icon icon='ph--copy--regular' size={size} />\n </div>\n <div role='none' className={mx('flex gap-1 items-center', !isCopied && inactiveLabelStyles)}>\n <span className='px-1'>{t('copy success label')}</span>\n <Icon icon='ph--check--regular' size={size} />\n </div>\n </Button>\n );\n};\n\ntype CopyButtonIconOnlyProps = CopyButtonProps & {\n label?: string;\n};\n\nexport const CopyButtonIconOnly = ({\n __scopeTooltip,\n value,\n classNames,\n size,\n variant,\n ...props\n}: TooltipScopedProps<CopyButtonIconOnlyProps>) => {\n const { t } = useTranslation(osTranslations);\n const { textValue, setTextValue } = useClipboard();\n const isCopied = textValue === value;\n const label = isCopied ? t('copy success label') : (props.label ?? t('copy label'));\n const { onOpen } = useTooltipContext('CopyButton', __scopeTooltip);\n return (\n <IconButton\n iconOnly\n label={label!}\n icon='ph--copy--regular'\n size={size}\n variant={variant}\n classNames={['inline-flex flex-col justify-center', classNames]}\n onClick={() => setTextValue(value).then(onOpen)}\n data-testid='copy-invitation'\n />\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ClipboardProvider } from './ClipboardProvider';\nimport { CopyButton, CopyButtonIconOnly } from './CopyButton';\n\nexport const Clipboard = {\n Button: CopyButton,\n IconButton: CopyButtonIconOnly,\n Provider: ClipboardProvider,\n};\n\nexport { useClipboard } from './ClipboardProvider';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport {\n DialogClose as DialogClosePrimitive,\n type DialogCloseProps as DialogClosePrimitiveProps,\n DialogContent as DialogContentPrimitive,\n DialogDescription as DialogDescriptionPrimitive,\n type DialogDescriptionProps as DialogDescriptionPrimitiveProps,\n DialogOverlay as DialogOverlayPrimitive,\n type DialogOverlayProps as DialogOverlayPrimitiveProps,\n DialogPortal as DialogPortalPrimitive,\n type DialogPortalProps as DialogPortalPrimitiveProps,\n Root as DialogRootPrimitive,\n type DialogProps as DialogRootPrimitiveProps,\n DialogTitle as DialogTitlePrimitive,\n type DialogTitleProps as DialogTitlePrimitiveProps,\n DialogTrigger as DialogTriggerPrimitive,\n type DialogTriggerProps as DialogTriggerPrimitiveProps,\n} from '@radix-ui/react-dialog';\nimport React, {\n type ComponentPropsWithRef,\n type ForwardRefExoticComponent,\n type FunctionComponent,\n type PropsWithChildren,\n forwardRef,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { type DialogSize, osTranslations } from '@dxos/ui-theme';\n\nimport { useThemeContext } from '../../hooks';\nimport { Column } from '../../primitives';\nimport { type ThemedClassName } from '../../util';\nimport { IconButton } from '../Button';\nimport { ElevationProvider } from '../ElevationProvider';\n\n//\n// Root\n//\n\ntype DialogRootProps = DialogRootPrimitiveProps;\n\nconst DialogRoot: FunctionComponent<DialogRootProps> = (props) => (\n <ElevationProvider elevation='dialog'>\n <DialogRootPrimitive {...props} />\n </ElevationProvider>\n);\n\n//\n// Trigger\n//\n\ntype DialogTriggerProps = DialogTriggerPrimitiveProps;\n\nconst DialogTrigger: FunctionComponent<DialogTriggerProps> = DialogTriggerPrimitive;\n\n//\n// Portal\n//\n\ntype DialogPortalProps = DialogPortalPrimitiveProps;\n\nconst DialogPortal: FunctionComponent<DialogPortalProps> = DialogPortalPrimitive;\n\n//\n// Overlay\n//\n\nconst DIALOG_OVERLAY_NAME = 'DialogOverlay';\n\ntype OverlayLayoutContextValue = { inOverlayLayout?: boolean };\n\nconst [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLayoutContextValue>(\n DIALOG_OVERLAY_NAME,\n {},\n);\n\ntype DialogOverlayProps = ThemedClassName<DialogOverlayPrimitiveProps & { blockAlign?: 'center' | 'start' | 'end' }>;\n\nconst DialogOverlay: ForwardRefExoticComponent<DialogOverlayProps> = forwardRef<HTMLDivElement, DialogOverlayProps>(\n ({ classNames, children, blockAlign, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n\n return (\n <DialogOverlayPrimitive\n {...props}\n data-block-align={blockAlign}\n className={tx('dialog.overlay', {}, classNames)}\n ref={forwardedRef}\n >\n <OverlayLayoutProvider inOverlayLayout>{children}</OverlayLayoutProvider>\n </DialogOverlayPrimitive>\n );\n },\n);\n\nDialogOverlay.displayName = DIALOG_OVERLAY_NAME;\n\n//\n// Content\n//\n\nconst DIALOG_CONTENT_NAME = 'DialogContent';\n\ntype DialogContentProps = ThemedClassName<ComponentPropsWithRef<typeof DialogContentPrimitive>> & {\n size?: DialogSize;\n inOverlayLayout?: boolean;\n};\n\nconst DialogContent: ForwardRefExoticComponent<DialogContentProps> = forwardRef<HTMLDivElement, DialogContentProps>(\n ({ classNames, children, size = 'md', inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);\n\n return (\n <DialogContentPrimitive\n {...props}\n // NOTE: Radix warning unless set to undefined.\n // https://www.radix-ui.com/primitives/docs/components/dialog#description\n aria-describedby={undefined}\n className={tx('dialog.content', { inOverlayLayout: propsInOverlayLayout || inOverlayLayout, size }, classNames)}\n ref={forwardedRef}\n >\n <Column.Root>{children}</Column.Root>\n </DialogContentPrimitive>\n );\n },\n);\n\nDialogContent.displayName = DIALOG_CONTENT_NAME;\n\n//\n// Header\n//\n\ntype DialogHeaderProps = ThemedClassName<PropsWithChildren> & { srOnly?: boolean };\n\nconst DialogHeader: ForwardRefExoticComponent<DialogTitleProps> = forwardRef<HTMLHeadingElement, DialogTitleProps>(\n ({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Segment asChild>\n <div role='heading' {...props} className={tx('dialog.header', { srOnly }, [classNames])} ref={forwardedRef} />\n </Column.Segment>\n );\n },\n);\n\n//\n// CloseIconButton\n//\n\ntype DialogCloseIconButtonProps = { label?: string };\n\nconst DialogCloseIconButton = forwardRef<HTMLButtonElement, DialogCloseIconButtonProps>(\n ({ label, ...props }, forwardedRef) => {\n const { t } = useTranslation(osTranslations);\n return (\n <IconButton\n {...props}\n label={label ?? t('close dialog label')}\n icon='ph--x--regular'\n iconOnly\n size={4}\n density='fine'\n variant='ghost'\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// Body\n//\n\ntype DialogBodyProps = PropsWithChildren;\n\nconst DialogBody: ForwardRefExoticComponent<DialogBodyProps> = forwardRef<HTMLDivElement, DialogBodyProps>(\n ({ children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Segment asChild>\n <div role='none' {...props} className={tx('dialog.body')} ref={forwardedRef}>\n {children}\n </div>\n </Column.Segment>\n );\n },\n);\n\n//\n// Title\n//\n\ntype DialogTitleProps = ThemedClassName<DialogTitlePrimitiveProps> & { srOnly?: boolean };\n\nconst DialogTitle: ForwardRefExoticComponent<DialogTitleProps> = forwardRef<HTMLHeadingElement, DialogTitleProps>(\n ({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DialogTitlePrimitive {...props} className={tx('dialog.title', { srOnly }, classNames)} ref={forwardedRef} />\n );\n },\n);\n\n//\n// Description\n//\n\ntype DialogDescriptionProps = ThemedClassName<DialogDescriptionPrimitiveProps> & { srOnly?: boolean };\n\nconst DialogDescription: ForwardRefExoticComponent<DialogTitleProps> = forwardRef<\n HTMLParagraphElement,\n DialogDescriptionProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DialogDescriptionPrimitive\n {...props}\n className={tx('dialog.description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// ActionBar\n//\n\ntype DialogActionBarProps = ThemedClassName<PropsWithChildren>;\n\nconst DialogActionBar: ForwardRefExoticComponent<DialogActionBarProps> = forwardRef<\n HTMLDivElement,\n DialogActionBarProps\n>(({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Segment asChild>\n <div {...props} className={tx('dialog.actionbar', {}, classNames)} ref={forwardedRef}>\n {children}\n </div>\n </Column.Segment>\n );\n});\n\n//\n// Close\n//\n\ntype DialogCloseProps = DialogClosePrimitiveProps;\n\nconst DialogClose: FunctionComponent<DialogCloseProps> = DialogClosePrimitive;\n\n//\n// Dialog\n//\n\nexport const Dialog = {\n Root: DialogRoot,\n Trigger: DialogTrigger,\n Portal: DialogPortal,\n Overlay: DialogOverlay,\n Content: DialogContent,\n Header: DialogHeader,\n Body: DialogBody,\n Title: DialogTitle,\n Description: DialogDescription,\n ActionBar: DialogActionBar,\n Close: DialogClose,\n CloseIconButton: DialogCloseIconButton,\n};\n\nexport type {\n DialogRootProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogHeaderProps,\n DialogBodyProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogActionBarProps,\n DialogCloseProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport {\n AlertDialogAction as AlertDialogActionPrimitive,\n type AlertDialogActionProps as AlertDialogActionPrimitiveProps,\n AlertDialogCancel as AlertDialogCancelPrimitive,\n type AlertDialogCancelProps as AlertDialogCancelPrimitiveProps,\n AlertDialogContent as AlertDialogContentPrimitive,\n type AlertDialogContentProps as AlertDialogContentPrimitiveProps,\n AlertDialogDescription as AlertDialogDescriptionPrimitive,\n type AlertDialogDescriptionProps as AlertDialogDescriptionPrimitiveProps,\n AlertDialogOverlay as AlertDialogOverlayPrimitive,\n type AlertDialogOverlayProps as AlertDialogOverlayPrimitiveProps,\n AlertDialogPortal as AlertDialogPortalPrimitive,\n type AlertDialogPortalProps as AlertDialogPortalPrimitiveProps,\n Root as AlertDialogRootPrimitive,\n type AlertDialogProps as AlertDialogRootPrimitiveProps,\n AlertDialogTitle as AlertDialogTitlePrimitive,\n type AlertDialogTitleProps as AlertDialogTitlePrimitiveProps,\n AlertDialogTrigger as AlertDialogTriggerPrimitive,\n type AlertDialogTriggerProps as AlertDialogTriggerPrimitiveProps,\n} from '@radix-ui/react-alert-dialog';\nimport { createContext } from '@radix-ui/react-context';\nimport React, {\n type ForwardRefExoticComponent,\n type FunctionComponent,\n type PropsWithChildren,\n forwardRef,\n} from 'react';\n\nimport { type DialogSize } from '@dxos/ui-theme';\n\nimport { useThemeContext } from '../../hooks';\nimport { Column } from '../../primitives';\nimport { type ThemedClassName } from '../../util';\nimport { ElevationProvider } from '../ElevationProvider';\n\n//\n// Root\n//\n\ntype AlertDialogRootProps = AlertDialogRootPrimitiveProps;\n\nconst AlertDialogRoot: FunctionComponent<AlertDialogRootProps> = (props) => (\n <ElevationProvider elevation='dialog'>\n <AlertDialogRootPrimitive {...props} />\n </ElevationProvider>\n);\n\n//\n// Trigger\n//\n\ntype AlertDialogTriggerProps = AlertDialogTriggerPrimitiveProps;\n\nconst AlertDialogTrigger: FunctionComponent<AlertDialogTriggerProps> = AlertDialogTriggerPrimitive;\n\n//\n// Portal\n//\n\ntype AlertDialogPortalProps = AlertDialogPortalPrimitiveProps;\n\nconst AlertDialogPortal: FunctionComponent<AlertDialogPortalProps> = AlertDialogPortalPrimitive;\n\n//\n// Cancel\n//\n\ntype AlertDialogCancelProps = AlertDialogCancelPrimitiveProps;\n\nconst AlertDialogCancel: FunctionComponent<AlertDialogCancelProps> = AlertDialogCancelPrimitive;\n\n//\n// Action\n//\n\ntype AlertDialogActionProps = AlertDialogActionPrimitiveProps;\n\nconst AlertDialogAction: FunctionComponent<AlertDialogActionProps> = AlertDialogActionPrimitive;\n\n//\n// Title\n//\n\ntype AlertDialogTitleProps = ThemedClassName<AlertDialogTitlePrimitiveProps> & { srOnly?: boolean };\n\nconst AlertDialogTitle: ForwardRefExoticComponent<AlertDialogTitleProps> = forwardRef<\n HTMLHeadingElement,\n AlertDialogTitleProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogTitlePrimitive {...props} className={tx('dialog.title', { srOnly }, classNames)} ref={forwardedRef} />\n );\n});\n\n//\n// Description\n//\n\ntype AlertDialogDescriptionProps = ThemedClassName<AlertDialogDescriptionPrimitiveProps> & { srOnly?: boolean };\n\nconst AlertDialogDescription: ForwardRefExoticComponent<AlertDialogTitleProps> = forwardRef<\n HTMLParagraphElement,\n AlertDialogDescriptionProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogDescriptionPrimitive\n {...props}\n className={tx('dialog.description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype OverlayLayoutContextValue = { inOverlayLayout?: boolean };\n\n//\n// Context\n//\n\nconst ALERT_DIALOG_OVERLAY_NAME = 'AlertDialogOverlay';\nconst ALERT_DIALOG_CONTENT_NAME = 'AlertDialogContent';\nconst ALERT_DIALOG_BODY_NAME = 'AlertDialogBody';\nconst ALERT_DIALOG_ACTIONBAR_NAME = 'AlertDialogActionBar';\n\nconst [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLayoutContextValue>(\n ALERT_DIALOG_OVERLAY_NAME,\n {\n inOverlayLayout: false,\n },\n);\n\n//\n// Overlay\n//\n\ntype AlertDialogOverlayProps = ThemedClassName<AlertDialogOverlayPrimitiveProps> & {\n blockAlign?: 'center' | 'start' | 'end';\n};\n\nconst AlertDialogOverlay: ForwardRefExoticComponent<AlertDialogOverlayProps> = forwardRef<\n HTMLDivElement,\n AlertDialogOverlayProps\n>(({ classNames, children, blockAlign, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogOverlayPrimitive\n {...props}\n data-block-align={blockAlign}\n className={tx(\n 'dialog.overlay',\n {},\n classNames,\n // TODO(burdon): Move to dialog.ts.\n 'data-[h-align=start]:justify-center',\n 'data-[h-align=start]:items-start',\n 'data-[h-align=center]:place-content-center',\n )}\n ref={forwardedRef}\n >\n <OverlayLayoutProvider inOverlayLayout>{children}</OverlayLayoutProvider>\n </AlertDialogOverlayPrimitive>\n );\n});\n\nAlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;\n\n//\n// Content\n//\n\ntype AlertDialogContentProps = ThemedClassName<AlertDialogContentPrimitiveProps> & { size?: DialogSize };\n\nconst AlertDialogContent: ForwardRefExoticComponent<AlertDialogContentProps> = forwardRef<\n HTMLDivElement,\n AlertDialogContentProps\n>(({ classNames, children, size = 'md', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { inOverlayLayout } = useOverlayLayoutContext(ALERT_DIALOG_CONTENT_NAME);\n return (\n <AlertDialogContentPrimitive\n {...props}\n className={tx('dialog.content', { inOverlayLayout, size }, classNames)}\n ref={forwardedRef}\n >\n <Column.Root>{children}</Column.Root>\n </AlertDialogContentPrimitive>\n );\n});\n\nAlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;\n\n//\n// Body\n//\n\ntype AlertDialogBodyProps = PropsWithChildren;\n\nconst AlertDialogBody: ForwardRefExoticComponent<AlertDialogBodyProps> = forwardRef<\n HTMLDivElement,\n AlertDialogBodyProps\n>(({ children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Segment asChild>\n <div role='none' {...props} className={tx('dialog.body')} ref={forwardedRef}>\n {children}\n </div>\n </Column.Segment>\n );\n});\n\nAlertDialogBody.displayName = ALERT_DIALOG_BODY_NAME;\n\n//\n// ActionBar\n//\n\ntype AlertDialogActionBarProps = ThemedClassName<PropsWithChildren>;\n\nconst AlertDialogActionBar: ForwardRefExoticComponent<AlertDialogActionBarProps> = forwardRef<\n HTMLDivElement,\n AlertDialogActionBarProps\n>(({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Segment asChild>\n <div {...props} className={tx('dialog.actionbar', {}, classNames)} ref={forwardedRef}>\n {children}\n </div>\n </Column.Segment>\n );\n});\n\nAlertDialogActionBar.displayName = ALERT_DIALOG_ACTIONBAR_NAME;\n\n//\n// AlertDialog\n//\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Overlay: AlertDialogOverlay,\n Content: AlertDialogContent,\n Body: AlertDialogBody,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n ActionBar: AlertDialogActionBar,\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n};\n\nexport type {\n AlertDialogRootProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogBodyProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n AlertDialogActionBarProps,\n AlertDialogCancelProps,\n AlertDialogActionProps,\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nexport { ErrorBoundary, type ErrorBoundaryProps, type FallbackProps } from '@dxos/react-error-boundary';\n\nexport * from './ErrorFallback';\nexport * from './ErrorStack';\nexport * from './ThrowError';\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type PropsWithChildren } from 'react';\nimport { type FallbackProps } from 'react-error-boundary';\n\nimport { safeStringify } from '@dxos/util';\n\nimport { ErrorStack } from './ErrorStack';\n\nexport type ErrorFallbackProps = PropsWithChildren<Pick<FallbackProps, 'error'> & { title?: string; data?: any }>;\n\n/**\n * Themed fallback component for `ErrorBoundary`.\n */\nexport const ErrorFallback = ({ children, error, title, data }: ErrorFallbackProps) => {\n const isDev = process.env.NODE_ENV === 'development';\n const message = error instanceof Error ? error.message : String(error);\n\n return (\n <div role='alert' data-testid='error-boundary-fallback' className='flex flex-col p-4 gap-4 overflow-auto'>\n <h1 className='text-lg text-info-text'>{title ?? 'Runtime Error'}</h1>\n <p>{message}</p>\n\n {isDev && error instanceof Error && (\n <Section\n title='Stack'\n onClick={() => {\n const text = error instanceof Error ? (error.stack ?? error.message) : String(error);\n void navigator.clipboard.writeText(text);\n }}\n >\n <ErrorStack error={error} />\n </Section>\n )}\n\n {data && (\n <Section\n title='Data'\n onClick={() => {\n void navigator.clipboard.writeText(JSON.stringify(data, undefined, 2));\n }}\n >\n <pre className='overflow-x-auto text-xs'>{safeStringify(data, undefined, 2)}</pre>\n </Section>\n )}\n\n {children}\n </div>\n );\n};\n\nconst Section = ({ children, title, onClick }: PropsWithChildren<{ title?: string; onClick?: () => void }>) => {\n return (\n <div className='flex flex-col gap-1'>\n {onClick && (\n <button\n type='button'\n onClick={onClick}\n className='flex items-center gap-1 text-xs text-subdued hover:text-primary-500 transition-colors'\n title={`Copy ${title}`}\n >\n <h2 className='text-xs uppercase text-subdued'>{title}</h2>\n </button>\n )}\n {children}\n </div>\n );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport ErrorStackParser from 'error-stack-parser';\nimport React from 'react';\n\nimport { mx } from '@dxos/ui-theme';\n\ntype LocalFrame = { href: string; fileName: string };\n\n/**\n * Renders a parsed error stack trace with tree connector symbols and clickable vscode:// links for local frames.\n */\nexport const ErrorStack = ({ error }: { error: Error }) => {\n const frames = ErrorStackParser.parse(error);\n\n return (\n <div className='font-mono text-sm'>\n {frames.map((frame, i) => {\n const isLast = i === frames.length - 1;\n const local = frame.fileName\n ? parseLocalFrame(frame.fileName, frame.lineNumber, frame.columnNumber)\n : undefined;\n const name = frame.functionName ?? '<anonymous>';\n return (\n <div\n key={i}\n className={mx(\n 'grid grid-cols-[16px_1fr_auto_auto] items-stretch gap-x-2',\n local && 'cursor-pointer hover:bg-hover-surface',\n )}\n >\n {/* Tree connector: vertical line full-height + horizontal branch at midpoint */}\n <div className='relative'>\n <div\n className={mx(\n 'absolute left-1/2 -translate-x-1/2 w-px bg-neutral-500',\n isLast ? 'top-0 h-1/2' : 'inset-y-0',\n )}\n />\n <div className='absolute top-1/2 -translate-y-1/2 left-1/2 right-0 h-px bg-neutral-500' />\n </div>\n {local ? (\n <a href={local.href} className='truncate self-center'>\n {name}\n </a>\n ) : (\n <span className='text-subdued truncate self-center'>{name}</span>\n )}\n <span className='text-xs text-subdued truncate self-center'>{local?.fileName ?? ''}</span>\n <span className='text-xs text-subdued text-right self-center'>\n {local ? `${frame.lineNumber}:${frame.columnNumber}` : ''}\n </span>\n </div>\n );\n })}\n </div>\n );\n};\n\n/**\n * Parses a Vite `/@fs/` URL into a `vscode://` deep link and short filename.\n * Returns undefined if the URL cannot be resolved to a local file.\n */\nconst parseLocalFrame = (fileUrl: string, line?: number, col?: number): LocalFrame | undefined => {\n try {\n const { pathname } = new URL(fileUrl);\n if (!pathname.startsWith('/@fs/')) {\n return undefined;\n }\n const localPath = pathname.slice(4); // /@fs/Users/... → /Users/...\n return {\n href: `vscode://file/${localPath}:${line ?? 1}:${col ?? 1}`,\n fileName: pathname.split('/').pop() ?? localPath,\n };\n } catch {\n return undefined;\n }\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nexport type ThrowErrorProps = {\n error?: () => Error;\n delay?: number;\n};\n\n/**\n * Use this to debug the error boundary.\n */\nexport const ThrowError = ({ delay = 1_000, ...props }: ThrowErrorProps) => {\n const [error, setError] = useState<Error>();\n useEffect(() => {\n if (delay < 0) {\n return;\n }\n\n const t = setTimeout(() => {\n setError(generator({ delay, ...props }));\n }, delay);\n return () => clearTimeout(t);\n }, [delay, generator]);\n\n if (error) {\n throw error;\n }\n\n return null;\n};\n\nconst generator = ({ error, delay }: ThrowErrorProps) => {\n return error?.() ?? new Error(`Error generated after ${delay}ms`);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Root as CheckboxPrimitive, type CheckboxProps as CheckboxPrimitiveProps } from '@radix-ui/react-checkbox';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { type ComponentPropsWithRef, type ForwardRefExoticComponent, forwardRef } from 'react';\n\nimport {\n DescriptionAndValidation as DescriptionAndValidationPrimitive,\n type DescriptionAndValidationProps as DescriptionAndValidationPrimitiveProps,\n Description as DescriptionPrimitive,\n type DescriptionProps as DescriptionPrimitiveProps,\n INPUT_NAME,\n InputRoot,\n type InputRootProps,\n type InputScopedProps,\n Label as LabelPrimitive,\n type LabelProps as LabelPrimitiveProps,\n PinInput as PinInputPrimitive,\n type PinInputProps as PinInputPrimitiveProps,\n TextArea as TextAreaPrimitive,\n type TextAreaProps as TextAreaPrimitiveProps,\n TextInput as TextInputPrimitive,\n type TextInputProps as TextInputPrimitiveProps,\n Validation as ValidationPrimitive,\n type ValidationProps as ValidationPrimitiveProps,\n useInputContext,\n} from '@dxos/react-input';\nimport { mx } from '@dxos/ui-theme';\nimport { type Density, type Elevation, type Size } from '@dxos/ui-types';\n\nimport { useDensityContext, useElevationContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Icon } from '../Icon';\n\ntype InputVariant = 'default' | 'subdued';\n\ntype InputSharedProps = Partial<{ density: Density; elevation: Elevation; variant: InputVariant }>;\n\ntype LabelProps = ThemedClassName<LabelPrimitiveProps> & { srOnly?: boolean };\n\nconst Label = forwardRef<HTMLLabelElement, LabelProps>(({ classNames, children, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <LabelPrimitive {...props} className={tx('input.label', { srOnly }, classNames)} ref={forwardedRef}>\n {children}\n </LabelPrimitive>\n );\n});\n\ntype DescriptionProps = ThemedClassName<DescriptionPrimitiveProps> & { srOnly?: boolean };\n\nconst Description = forwardRef<HTMLSpanElement, DescriptionProps>(\n ({ classNames, children, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DescriptionPrimitive {...props} className={tx('input.description', { srOnly }, classNames)} ref={forwardedRef}>\n {children}\n </DescriptionPrimitive>\n );\n },\n);\n\ntype ValidationProps = ThemedClassName<ValidationPrimitiveProps> & { srOnly?: boolean };\n\nconst Validation = forwardRef<HTMLSpanElement, InputScopedProps<ValidationProps>>(\n ({ __inputScope, classNames, children, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n return (\n <ValidationPrimitive\n {...props}\n className={tx('input.validation', { srOnly, validationValence }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ValidationPrimitive>\n );\n },\n);\n\ntype DescriptionAndValidationProps = ThemedClassName<DescriptionAndValidationPrimitiveProps> & { srOnly?: boolean };\n\nconst DescriptionAndValidation = forwardRef<HTMLParagraphElement, DescriptionAndValidationProps>(\n ({ classNames, children, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DescriptionAndValidationPrimitive\n {...props}\n className={tx('input.descriptionAndValidation', { srOnly }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </DescriptionAndValidationPrimitive>\n );\n },\n);\n\ntype PinInputProps = ThemedClassName<InputSharedProps & Omit<PinInputPrimitiveProps, 'className' | 'segmentClassName'>>;\n\nconst PinInput = forwardRef<HTMLInputElement, PinInputProps>(\n ({ classNames, density: propsDensity, elevation: propsElevation, ...props }, forwardedRef) => {\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n\n return (\n <PinInputPrimitive\n {...{\n ...props,\n ...(props.autoFocus && !hasIosKeyboard && { autoFocus: true }),\n }}\n className={tx('input.inputWithSegments', { disabled: props.disabled }, classNames) || ''}\n segmentClassName={tx('input.segment', { disabled: props.disabled, density, elevation }) || ''}\n ref={forwardedRef}\n />\n );\n },\n);\n\n// TODO(burdon): Implement inline icon within button: e.g., https://www.radix-ui.com/themes/playground#text-field\n\ntype AutoFillProps = {\n noAutoFill?: boolean;\n};\n\ntype TextInputProps = InputSharedProps & ThemedClassName<TextInputPrimitiveProps> & AutoFillProps;\n\nconst TextInput = forwardRef<HTMLInputElement, InputScopedProps<TextInputProps>>(\n (\n { __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, noAutoFill, ...props },\n forwardedRef,\n ) => {\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n\n return (\n <TextInputPrimitive\n {...props}\n // TODO(wittjosiah): Factor out autofill properies.\n {...{ 'data-1p-ignore': noAutoFill }}\n className={tx(\n 'input.input',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n validationValence,\n },\n classNames,\n )}\n {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype TextAreaProps = InputSharedProps & ThemedClassName<TextAreaPrimitiveProps>;\n\nconst TextArea = forwardRef<HTMLTextAreaElement, InputScopedProps<TextAreaProps>>(\n ({ __inputScope, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n\n return (\n <TextAreaPrimitive\n {...props}\n className={tx(\n 'input.textArea',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n validationValence,\n },\n classNames,\n )}\n {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype CheckboxProps = ThemedClassName<Omit<CheckboxPrimitiveProps, 'children'>> & {\n size?: Size;\n};\n\nconst Checkbox: ForwardRefExoticComponent<CheckboxProps> = forwardRef<\n HTMLButtonElement,\n InputScopedProps<CheckboxProps>\n>(\n (\n {\n __inputScope,\n classNames,\n checked: propsChecked,\n defaultChecked: propsDefaultChecked,\n onCheckedChange: propsOnCheckedChange,\n size,\n ...props\n },\n forwardedRef,\n ) => {\n const [checked, onCheckedChange] = useControllableState({\n prop: propsChecked,\n defaultProp: propsDefaultChecked,\n onChange: propsOnCheckedChange,\n });\n const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);\n const { tx } = useThemeContext();\n\n return (\n <CheckboxPrimitive\n {...{\n ...props,\n checked,\n onCheckedChange,\n id,\n 'aria-describedby': descriptionId,\n ...(validationValence === 'error' && {\n 'aria-invalid': 'true' as const,\n 'aria-errormessage': errorMessageId,\n }),\n className: tx('input.checkbox', { size }, 'shrink-0', classNames),\n }}\n ref={forwardedRef}\n >\n <Icon\n icon={checked === 'indeterminate' ? 'ph--minus--regular' : 'ph--check--regular'}\n classNames={tx('input.checkboxIndicator', { size, checked })}\n />\n </CheckboxPrimitive>\n );\n },\n);\n\ntype SwitchProps = ThemedClassName<\n Omit<ComponentPropsWithRef<'input'>, 'children' | 'onChange'> & { onCheckedChange?: (checked: boolean) => void }\n>;\n\nconst Switch = forwardRef<HTMLInputElement, InputScopedProps<SwitchProps>>(\n (\n {\n __inputScope,\n classNames,\n checked: propsChecked,\n defaultChecked: propsDefaultChecked,\n onCheckedChange: propsOnCheckedChange,\n ...props\n },\n forwardedRef,\n ) => {\n const [checked, onCheckedChange] = useControllableState({\n prop: propsChecked,\n defaultProp: propsDefaultChecked ?? false,\n onChange: propsOnCheckedChange,\n });\n\n const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);\n\n return (\n <input\n type='checkbox'\n className={mx('dx-checkbox--switch dx-focus-ring', classNames)}\n checked={checked}\n onChange={(event) => {\n onCheckedChange(event.target.checked);\n }}\n id={id}\n aria-describedby={descriptionId}\n {...props}\n {...(validationValence === 'error' && {\n 'aria-invalid': 'true' as const,\n 'aria-errormessage': errorMessageId,\n })}\n ref={forwardedRef}\n />\n );\n },\n);\n\nexport const Input = {\n Root: InputRoot,\n PinInput,\n TextInput,\n TextArea,\n Checkbox,\n Switch,\n Label,\n Description,\n Validation,\n DescriptionAndValidation,\n};\n\nexport type {\n InputVariant,\n InputRootProps,\n InputSharedProps,\n PinInputProps,\n TextInputProps,\n TextAreaProps,\n CheckboxProps,\n SwitchProps,\n LabelProps,\n DescriptionProps,\n ValidationProps,\n DescriptionAndValidationProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithoutRef, type FC, type ForwardRefExoticComponent, forwardRef } from 'react';\n\nimport {\n LIST_ITEM_NAME,\n LIST_NAME,\n ListItemCollapsibleContent,\n type ListItemCollapsibleContentProps,\n type ListItemScopedProps,\n List as ListPrimitive,\n ListItem as ListPrimitiveItem,\n ListItemHeading as ListPrimitiveItemHeading,\n type ListItemHeadingProps as ListPrimitiveItemHeadingProps,\n ListItemOpenTrigger as ListPrimitiveItemOpenTrigger,\n type ListItemOpenTriggerProps as ListPrimitiveItemOpenTriggerProps,\n type ListItemProps as ListPrimitiveItemProps,\n type ListProps as ListPrimitiveProps,\n type ListScopedProps,\n useListContext,\n useListItemContext,\n} from '@dxos/react-list';\nimport { type Density } from '@dxos/ui-types';\n\nimport { useDensityContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { DensityProvider } from '../DensityProvider';\nimport { Icon } from '../Icon';\n\nimport { ListDropIndicator } from './ListDropIndicator';\n\ntype ListProps = ThemedClassName<ListPrimitiveProps> & { density?: Density };\n\nconst List = forwardRef<HTMLOListElement, ListProps>(({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext(props.density);\n\n return (\n <DensityProvider density={density}>\n <ListPrimitive {...props} className={tx('list.root', {}, classNames)} ref={forwardedRef}>\n {children}\n </ListPrimitive>\n </DensityProvider>\n );\n});\n\ntype ListItemEndcapProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & { asChild?: boolean };\n\nconst ListItemEndcap = forwardRef<HTMLDivElement, ListItemEndcapProps>(\n ({ children, classNames, asChild, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : Primitive.div;\n const density = useDensityContext();\n const { tx } = useThemeContext();\n return (\n <Comp\n {...(!asChild && { role: 'none' })}\n {...props}\n className={tx('list.item.endcap', { density }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\nconst MockListItemOpenTrigger = ({\n classNames,\n ...props\n}: ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'children'>>) => {\n const density = useDensityContext();\n const { tx } = useThemeContext();\n return <div role='none' {...props} className={tx('list.item.openTrigger', { density }, classNames)} />;\n};\n\ntype ListItemHeadingProps = ThemedClassName<ListPrimitiveItemHeadingProps>;\n\nconst ListItemHeading = forwardRef<HTMLParagraphElement, ListItemHeadingProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext();\n return (\n <ListPrimitiveItemHeading\n {...props}\n className={tx('list.item.heading', { density }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ListPrimitiveItemHeading>\n );\n },\n);\n\ntype ListItemOpenTriggerProps = ThemedClassName<ListPrimitiveItemOpenTriggerProps>;\n\nconst ListItemOpenTrigger = forwardRef<HTMLButtonElement, ListItemOpenTriggerProps>(\n ({ __listItemScope, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext();\n const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);\n return (\n <ListPrimitiveItemOpenTrigger\n {...props}\n className={tx('list.item.openTrigger', { density }, classNames)}\n ref={forwardedRef}\n >\n {children || (\n <Icon\n size={3}\n icon={open ? 'ph--caret-down--bold' : 'ph--caret-right--bold'}\n classNames={tx('list.item.openTriggerIcon', {})}\n />\n )}\n </ListPrimitiveItemOpenTrigger>\n );\n },\n);\n\ntype ListItemRootProps = ThemedClassName<ListPrimitiveItemProps>;\n\nconst ListItemRoot = forwardRef<HTMLLIElement, ListItemRootProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext();\n return (\n <ListPrimitiveItem\n {...props}\n className={tx('list.item.root', { density, collapsible: props.collapsible }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </ListPrimitiveItem>\n );\n },\n);\n\nexport const ListItem: {\n Root: ForwardRefExoticComponent<ListItemRootProps>;\n Endcap: ForwardRefExoticComponent<ListItemEndcapProps>;\n Heading: ForwardRefExoticComponent<ListItemHeadingProps>;\n OpenTrigger: ForwardRefExoticComponent<ListItemOpenTriggerProps>;\n CollapsibleContent: ForwardRefExoticComponent<ListItemCollapsibleContentProps>;\n MockOpenTrigger: FC<ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'children'>>>;\n DropIndicator: typeof ListDropIndicator;\n} = {\n Root: ListItemRoot,\n Endcap: ListItemEndcap,\n Heading: ListItemHeading,\n OpenTrigger: ListItemOpenTrigger,\n CollapsibleContent: ListItemCollapsibleContent,\n MockOpenTrigger: MockListItemOpenTrigger,\n DropIndicator: ListDropIndicator,\n};\n\nexport { List, useListContext, useListItemContext, LIST_NAME, LIST_ITEM_NAME };\n\nexport type {\n ListProps,\n ListScopedProps,\n ListItemRootProps,\n ListItemScopedProps,\n ListItemEndcapProps,\n ListItemHeadingProps,\n ListItemOpenTriggerProps,\n ListItemCollapsibleContentProps,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/types';\nimport React, { type CSSProperties, type HTMLAttributes } from 'react';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nconst edgeToOrientationMap: Record<Edge, Orientation> = {\n top: 'horizontal',\n bottom: 'horizontal',\n left: 'vertical',\n right: 'vertical',\n};\n\nconst orientationStyles: Record<Orientation, HTMLAttributes<HTMLElement>['className']> = {\n horizontal:\n 'h-(--line-thickness) left-[calc(var(--line-inset)+var(--terminal-radius))] right-(--line-inset) before:left-(--terminal-inset)',\n vertical:\n 'w-(--line-thickness) top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-(--line-inset) before:top-(--terminal-inset)',\n};\n\nconst edgeStyles: Record<Edge, HTMLAttributes<HTMLElement>['className']> = {\n top: 'top-(--line-offset) before:top-(--offset-terminal)',\n right: 'right-(--line-offset) before:right-(--offset-terminal)',\n bottom: 'bottom-(--line-offset) before:bottom-(--offset-terminal)',\n left: 'left-(--line-offset) before:left-(--offset-terminal)',\n};\n\nconst strokeSize = 2;\nconst terminalSize = 8;\nconst offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;\n\nexport type DropIndicatorProps = {\n edge: Edge;\n gap?: number;\n terminalInset?: number;\n lineInset?: number;\n};\n\n/**\n * This is a tailwind port of `@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box`\n */\nexport const ListDropIndicator = ({\n edge,\n gap = 0,\n lineInset = 0,\n terminalInset = lineInset - terminalSize,\n}: DropIndicatorProps) => {\n const orientation = edgeToOrientationMap[edge];\n\n return (\n <div\n role='none'\n style={\n {\n '--line-thickness': `${strokeSize}px`,\n '--line-offset': `calc(-0.5 * (${gap}px + ${strokeSize}px))`,\n '--line-inset': `${lineInset}px`,\n '--terminal-size': `${terminalSize}px`,\n '--terminal-radius': `${terminalSize / 2}px`,\n '--terminal-inset': `${terminalInset}px`,\n '--offset-terminal': `${offsetToAlignTerminalWithLine}px`,\n } as CSSProperties\n }\n className={`absolute z-10 pointer-events-none bg-accent-surface before:content-[''] before:w-(--terminal-size) before:h-(--terminal-size) box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accent-surface before:rounded-full ${orientationStyles[orientation]} ${edgeStyles[edge]}`}\n />\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ComponentPropsWithoutRef, type FC, type ForwardRefExoticComponent, forwardRef } from 'react';\n\nimport { type ThemedClassName } from '../../util';\n\nimport {\n LIST_ITEM_NAME,\n List,\n ListItem,\n type ListItemCollapsibleContentProps,\n type ListItemHeadingProps,\n type ListItemOpenTriggerProps,\n type ListItemRootProps,\n type ListProps,\n type ListScopedProps,\n useListItemContext,\n} from './List';\nimport { TreeDropIndicator } from './TreeDropIndicator';\n\ntype TreeRootProps = ListProps;\n\ntype TreeItemProps = ListItemRootProps;\n\nconst TreeRoot = forwardRef<HTMLOListElement, TreeRootProps>((props, forwardedRef) => {\n return <List {...props} ref={forwardedRef} />;\n});\n\ntype TreeBranchProps = TreeRootProps;\n\nconst TreeBranch = forwardRef<HTMLOListElement, ListScopedProps<TreeBranchProps>>(\n ({ __listScope, ...props }, forwardedRef) => {\n const { headingId } = useListItemContext(LIST_ITEM_NAME, __listScope);\n return <List {...props} aria-labelledby={headingId} ref={forwardedRef} />;\n },\n);\n\nconst TreeItemRoot = forwardRef<HTMLLIElement, ListItemRootProps>((props, forwardedRef) => {\n return <ListItem.Root role='treeitem' {...props} ref={forwardedRef} />;\n});\n\ntype TreeItemHeadingProps = ListItemHeadingProps;\n\nconst TreeItemHeading = ListItem.Heading;\n\ntype TreeItemOpenTriggerProps = ListItemOpenTriggerProps;\n\nconst TreeItemOpenTrigger = ListItem.OpenTrigger;\n\nconst MockTreeItemOpenTrigger = ListItem.MockOpenTrigger;\n\ntype TreeItemBodyProps = ListItemCollapsibleContentProps;\n\nconst TreeItemBody: ForwardRefExoticComponent<TreeItemBodyProps> = ListItem.CollapsibleContent;\n\nexport const Tree = { Root: TreeRoot, Branch: TreeBranch };\nexport const TreeItem: {\n Root: ForwardRefExoticComponent<TreeItemProps>;\n Heading: ForwardRefExoticComponent<TreeItemHeadingProps>;\n Body: ForwardRefExoticComponent<TreeItemBodyProps>;\n OpenTrigger: ForwardRefExoticComponent<TreeItemOpenTriggerProps>;\n MockOpenTrigger: FC<ThemedClassName<Omit<ComponentPropsWithoutRef<'div'>, 'children'>>>;\n DropIndicator: typeof TreeDropIndicator;\n} = {\n Root: TreeItemRoot,\n Heading: TreeItemHeading,\n Body: TreeItemBody,\n OpenTrigger: TreeItemOpenTrigger,\n MockOpenTrigger: MockTreeItemOpenTrigger,\n DropIndicator: TreeDropIndicator,\n};\n\nexport type { TreeRootProps, TreeItemProps, TreeItemHeadingProps, TreeItemBodyProps, TreeItemOpenTriggerProps };\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item';\nimport React, { type CSSProperties, type HTMLAttributes } from 'react';\n\n// Tree item hitbox\n// https://github.com/atlassian/pragmatic-drag-and-drop/blob/main/packages/hitbox/constellation/index/about.mdx#tree-item\n\ntype InstructionType = Exclude<Instruction, { type: 'instruction-blocked' }>['type'];\ntype Orientation = 'sibling' | 'child';\n\nconst edgeToOrientationMap: Record<InstructionType, Orientation> = {\n 'reorder-above': 'sibling',\n 'reorder-below': 'sibling',\n 'make-child': 'child',\n reparent: 'child',\n};\n\nconst orientationStyles: Record<Orientation, HTMLAttributes<HTMLElement>['className']> = {\n // TODO(wittjosiah): Stop using left/right here.\n sibling:\n 'h-(--line-thickness) left-(--horizontal-indent) right-0 bg-accent-surface before:left-(--negative-terminal-size)',\n child: 'w-full top-0 bottom-0 border-[length:--line-thickness] before:invisible',\n};\n\nconst instructionStyles: Record<InstructionType, HTMLAttributes<HTMLElement>['className']> = {\n 'reorder-above': 'top-(--line-offset) before:top-(--offset-terminal)',\n 'reorder-below': 'bottom-(--line-offset) before:bottom-(--offset-terminal)',\n 'make-child': 'border-accent-surface',\n // TODO(wittjosiah): This is not occurring in the current implementation.\n reparent: '',\n};\n\nconst strokeSize = 2;\nconst terminalSize = 8;\nconst offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;\n\nexport type DropIndicatorProps = {\n instruction: Instruction;\n gap?: number;\n};\n\nexport const TreeDropIndicator = ({ instruction, gap = 0 }: DropIndicatorProps) => {\n const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;\n const isBlocked = instruction.type === 'instruction-blocked';\n const desiredInstruction = isBlocked ? instruction.desired : instruction;\n const orientation = edgeToOrientationMap[desiredInstruction.type];\n if (isBlocked) {\n return null;\n }\n\n return (\n <div\n style={\n {\n '--line-thickness': `${strokeSize}px`,\n '--line-offset': `${lineOffset}`,\n '--terminal-size': `${terminalSize}px`,\n '--terminal-radius': `${terminalSize / 2}px`,\n '--negative-terminal-size': `-${terminalSize}px`,\n '--offset-terminal': `${offsetToAlignTerminalWithLine}px`,\n '--horizontal-indent': `${desiredInstruction.currentLevel * desiredInstruction.indentPerLevel + 4}px`,\n } as CSSProperties\n }\n className={`absolute z-10 pointer-events-none before:w-(--terminal-size) before:h-(--terminal-size) box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accent-surface before:rounded-full ${orientationStyles[orientation]} ${instructionStyles[desiredInstruction.type]}`}\n ></div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { type Scope, createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {\n type CSSProperties,\n type ComponentPropsWithRef,\n type KeyboardEvent,\n forwardRef,\n useCallback,\n} from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\n// TODO(thure): A lot of the accessible affordances for this kind of thing need to be implemented per https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/treegrid_role\n\nconst TREEGRID_ROW_NAME = 'TreegridRow';\n\ntype TreegridRowScopedProps<P> = P & { __treegridRowScope?: Scope };\n\nconst [createTreegridRowContext, createTreegridRowScope] = createContextScope(TREEGRID_ROW_NAME, []);\n\ntype TreegridRowContextValue = {\n open?: boolean;\n onOpenChange?: (nextOpen: boolean) => void;\n};\n\nconst [TreegridRowProvider, useTreegridRowContext] =\n createTreegridRowContext<TreegridRowContextValue>(TREEGRID_ROW_NAME);\n\nconst PATH_SEPARATOR = '~';\nconst PARENT_OF_SEPARATOR = ' ';\n\ntype TreegridRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n gridTemplateColumns: CSSProperties['gridTemplateColumns'];\n asChild?: boolean;\n};\n\nconst TreegridRoot = forwardRef<HTMLDivElement, TreegridRootProps>(\n ({ asChild, classNames, children, style, gridTemplateColumns, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n const { findFirstFocusable } = useFocusFinders();\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowUp': {\n const direction = event.key === 'ArrowDown' ? 'down' : 'up';\n const target = event.target as HTMLElement;\n\n // Find ancestor with data-arrow-keys containing the relevant direction.\n const ancestorWithArrowKeys = target.closest(`[data-arrow-keys*=\"${direction}\"], [data-arrow-keys=\"all\"]`);\n\n // If no ancestor with data-arrow-keys found, proceed with row navigation.\n if (!ancestorWithArrowKeys) {\n // Find the closest row\n const currentRow = target.closest('[role=\"row\"]');\n if (currentRow) {\n // Find the treegrid container.\n const treegrid = currentRow.closest('[role=\"treegrid\"]');\n if (treegrid) {\n // Get all rows in the treegrid.\n const rows = Array.from(treegrid.querySelectorAll('[role=\"row\"]'));\n const currentIndex = rows.indexOf(currentRow as Element);\n\n // Find next or previous row.\n const nextIndex = direction === 'down' ? currentIndex + 1 : currentIndex - 1;\n const targetRow = rows[nextIndex];\n\n if (targetRow) {\n // Focus the first focusable element in the target row.\n const firstFocusable = findFirstFocusable(targetRow as HTMLElement);\n if (firstFocusable) {\n event.preventDefault();\n firstFocusable.focus();\n }\n }\n }\n }\n }\n break;\n }\n }\n props.onKeyDown?.(event);\n },\n [findFirstFocusable],\n );\n\n return (\n <Comp\n role='treegrid'\n {...props}\n className={tx('treegrid.root', {}, classNames)}\n style={{ ...style, gridTemplateColumns }}\n onKeyDown={handleKeyDown}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\ntype TreegridRowProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n id: string;\n asChild?: boolean;\n parentOf?: string;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?(open: boolean): void;\n};\n\nconst TreegridRow = forwardRef<HTMLDivElement, TreegridRowScopedProps<TreegridRowProps>>(\n (\n {\n __treegridRowScope,\n asChild,\n classNames,\n children,\n id,\n parentOf,\n open: propsOpen,\n defaultOpen,\n onOpenChange: propsOnOpenChange,\n ...props\n },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n const pathParts = id.split(PATH_SEPARATOR);\n const level = pathParts.length - 1;\n const [open, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n\n return (\n <TreegridRowProvider open={open} onOpenChange={onOpenChange} scope={__treegridRowScope}>\n <Comp\n role='row'\n aria-level={level}\n className={tx('treegrid.row', { level }, classNames)}\n {...(parentOf && { 'aria-expanded': open, 'aria-owns': parentOf })}\n {...props}\n id={id}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n </TreegridRowProvider>\n );\n },\n);\n\ntype TreegridCellProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & { indent?: boolean };\n\nconst TreegridCell = forwardRef<HTMLDivElement, TreegridCellProps>(\n ({ classNames, children, indent, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <div role='gridcell' className={tx('treegrid.cell', { indent }, classNames)} {...props} ref={forwardedRef}>\n {children}\n </div>\n );\n },\n);\n\nexport type { TreegridRootProps, TreegridRowProps };\n\nexport const Treegrid = {\n Root: TreegridRoot,\n Row: TreegridRow,\n Cell: TreegridCell,\n PARENT_OF_SEPARATOR,\n PATH_SEPARATOR,\n createTreegridRowScope,\n useTreegridRowContext,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { createContext } from '@radix-ui/react-context';\nimport { DialogContent, Root as DialogRoot, DialogTitle } from '@radix-ui/react-dialog';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {\n type ComponentPropsWithRef,\n type ComponentPropsWithoutRef,\n type Dispatch,\n type KeyboardEvent,\n type PropsWithChildren,\n type SetStateAction,\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport { addEventListener } from '@dxos/async';\nimport { log } from '@dxos/log';\nimport { useForwardedRef, useMediaQuery } from '@dxos/react-hooks';\nimport { type MainStyleProps, osTranslations } from '@dxos/ui-theme';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { type Label, toLocalizedString, useTranslation } from '../ThemeProvider';\n\nimport { useSwipeToDismiss } from './useSwipeToDismiss';\n\nconst MAIN_NAME = 'Main';\nconst MAIN_ROOT_NAME = 'MainRoot';\nconst MAIN_OVERLAY_NAME = 'MainOverlay';\nconst NAVIGATION_SIDEBAR_NAME = 'NavigationSidebar';\nconst COMPLEMENTARY_SIDEBAR_NAME = 'ComplementarySidebar';\n\nconst handleOpenAutoFocus = (event: Event) => {\n !document.body.hasAttribute('data-w-keyboard') && event.preventDefault();\n};\n\n//\n// Landmark\n//\n\nconst landmarkAttr = 'data-main-landmark';\n\n/**\n * Facilitates moving focus between landmarks.\n * Ref https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/landmark_role\n */\nconst useLandmarkMover = (propsOnKeyDown: ComponentPropsWithoutRef<'div'>['onKeyDown'], landmark: string) => {\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target as HTMLDivElement;\n if (event.target === event.currentTarget && event.key === 'Tab' && target.hasAttribute(landmarkAttr)) {\n event.preventDefault();\n const landmarks = Array.from(document.querySelectorAll(`[${landmarkAttr}]:not([inert])`))\n .map((el) => (el.hasAttribute(landmarkAttr) ? parseInt(el.getAttribute(landmarkAttr)!) : NaN))\n .sort();\n const l = landmarks.length;\n const cursor = landmarks.indexOf(parseInt(target.getAttribute(landmarkAttr)!));\n const nextLandmark = landmarks[(cursor + l + (event.getModifierState('Shift') ? -1 : 1)) % l];\n (document.querySelector(`[${landmarkAttr}=\"${nextLandmark}\"]`) as HTMLDivElement | null)?.focus();\n }\n propsOnKeyDown?.(event);\n },\n [propsOnKeyDown],\n );\n\n // TODO(thure): This was disconnected once before in #8818;\n // if this should change again to support the browser extension, please ensure the change doesn’t break web, desktop and mobile.\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited', ignoreDefaultKeydown: { Tab: true } });\n\n return {\n [landmarkAttr]: landmark,\n tabIndex: 0,\n onKeyDown: handleKeyDown,\n ...focusableGroupAttrs,\n };\n};\n\n//\n// Context\n//\n\n// TODO(burdon): Define collapsed state.\ntype SidebarState = 'expanded' | 'collapsed' | 'closed';\n\ntype MainContextValue = {\n resizing: boolean;\n\n // Navigation\n navigationSidebarState: SidebarState;\n setNavigationSidebarState: Dispatch<SetStateAction<SidebarState | undefined>>;\n\n // Complementary\n complementarySidebarState: SidebarState;\n setComplementarySidebarState: Dispatch<SetStateAction<SidebarState | undefined>>;\n};\n\nconst [MainProvider, useMainContext] = createContext<MainContextValue>(MAIN_NAME, {\n resizing: false,\n\n navigationSidebarState: 'closed',\n setNavigationSidebarState: (_nextState) => {\n log.warn('Not initialized');\n },\n\n complementarySidebarState: 'closed',\n setComplementarySidebarState: (_nextState) => {\n log.warn('Not initialized');\n },\n});\n\nconst useSidebars = (consumerName: string) => {\n const {\n navigationSidebarState,\n setNavigationSidebarState,\n\n complementarySidebarState,\n setComplementarySidebarState,\n } = useMainContext(consumerName);\n\n return {\n navigationSidebarState,\n setNavigationSidebarState,\n toggleNavigationSidebar: useCallback(\n () => setNavigationSidebarState(navigationSidebarState === 'expanded' ? 'closed' : 'expanded'),\n [navigationSidebarState, setNavigationSidebarState],\n ),\n openNavigationSidebar: useCallback(() => setNavigationSidebarState('expanded'), []),\n collapseNavigationSidebar: useCallback(() => setNavigationSidebarState('collapsed'), []),\n closeNavigationSidebar: useCallback(() => setNavigationSidebarState('closed'), []),\n\n complementarySidebarState,\n setComplementarySidebarState,\n toggleComplementarySidebar: useCallback(\n () => setComplementarySidebarState(complementarySidebarState === 'expanded' ? 'closed' : 'expanded'),\n [complementarySidebarState, setComplementarySidebarState],\n ),\n openComplementarySidebar: useCallback(() => setComplementarySidebarState('expanded'), []),\n collapseComplementarySidebar: useCallback(() => setComplementarySidebarState('collapsed'), []),\n closeComplementarySidebar: useCallback(() => setComplementarySidebarState('closed'), []),\n };\n};\n\n//\n// Root\n//\n\ntype MainRootProps = PropsWithChildren<{\n navigationSidebarState?: SidebarState;\n defaultNavigationSidebarState?: SidebarState;\n onNavigationSidebarStateChange?: (nextState: SidebarState) => void;\n\n complementarySidebarState?: SidebarState;\n defaultComplementarySidebarState?: SidebarState;\n onComplementarySidebarStateChange?: (nextState: SidebarState) => void;\n}>;\n\nconst MainRoot = ({\n navigationSidebarState: propsNavigationSidebarState,\n defaultNavigationSidebarState = 'closed',\n onNavigationSidebarStateChange,\n\n complementarySidebarState: propsComplementarySidebarState,\n defaultComplementarySidebarState = 'closed',\n onComplementarySidebarStateChange,\n\n children,\n ...props\n}: MainRootProps) => {\n const [isLg] = useMediaQuery('lg');\n const [navigationSidebarState = isLg ? 'expanded' : 'collapsed', setNavigationSidebarState] =\n useControllableState<SidebarState>({\n prop: propsNavigationSidebarState,\n defaultProp: defaultNavigationSidebarState,\n onChange: onNavigationSidebarStateChange,\n });\n const [complementarySidebarState = isLg ? 'expanded' : 'collapsed', setComplementarySidebarState] =\n useControllableState<SidebarState>({\n prop: propsComplementarySidebarState,\n defaultProp: defaultComplementarySidebarState,\n onChange: onComplementarySidebarStateChange,\n });\n\n const [resizing, setResizing] = useState(false);\n const resizeInterval = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(\n () =>\n addEventListener(window, 'resize', () => {\n setResizing(true);\n if (resizeInterval.current) {\n clearTimeout(resizeInterval.current);\n }\n\n resizeInterval.current = setTimeout(() => {\n setResizing(false);\n resizeInterval.current = null;\n }, 3_000);\n }),\n [],\n );\n\n return (\n <MainProvider\n {...props}\n {...{\n navigationSidebarState,\n setNavigationSidebarState,\n complementarySidebarState,\n setComplementarySidebarState,\n }}\n resizing={resizing}\n >\n {children}\n </MainProvider>\n );\n};\n\nMainRoot.displayName = MAIN_ROOT_NAME;\n\n//\n// Overlay\n//\n\ntype MainOverlayProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.div>, 'children' | 'onClick'>>;\n\nconst MainOverlay = forwardRef<HTMLDivElement, MainOverlayProps>(({ classNames, ...props }, forwardedRef) => {\n const [isLg] = useMediaQuery('lg');\n const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } =\n useMainContext(MAIN_OVERLAY_NAME);\n const { tx } = useThemeContext();\n return (\n <div\n {...props}\n onClick={() => {\n setNavigationSidebarState('collapsed');\n setComplementarySidebarState('collapsed');\n }}\n className={tx(\n 'main.overlay',\n {\n isLg,\n inlineStartSidebarOpen: navigationSidebarState,\n inlineEndSidebarOpen: complementarySidebarState,\n },\n classNames,\n )}\n data-state={navigationSidebarState === 'expanded' || complementarySidebarState === 'expanded' ? 'open' : 'closed'}\n aria-hidden='true'\n ref={forwardedRef}\n />\n );\n});\n\nMainOverlay.displayName = MAIN_OVERLAY_NAME;\n\n//\n// Sidebar\n//\n\ntype MainSidebarProps = ThemedClassName<ComponentPropsWithRef<typeof DialogContent>> & {\n swipeToDismiss?: boolean;\n state?: SidebarState;\n resizing?: boolean;\n onStateChange?: (nextState: SidebarState) => void;\n side: 'w-start' | 'w-end';\n label: Label;\n};\n\nconst MainSidebar = forwardRef<HTMLDivElement, MainSidebarProps>(\n (\n { classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, label, ...props },\n forwardedRef,\n ) => {\n const [isLg] = useMediaQuery('lg');\n const { tx } = useThemeContext();\n const { t } = useTranslation(osTranslations);\n const ref = useForwardedRef(forwardedRef);\n const noopRef = useRef(null);\n\n useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {\n onDismiss: () => onStateChange?.('closed'),\n });\n\n // NOTE(thure): This is a workaround for something further down the tree grabbing focus on Escape. Adding this\n // intervention to `Tabs.Root` or `Tabs.Tabpenel` instances is somehow ineffectual.\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n const focusGroupParent = (event.target as HTMLElement).closest('[data-tabster]');\n if (event.key === 'Escape' && focusGroupParent) {\n event.preventDefault();\n event.stopPropagation();\n (focusGroupParent as HTMLElement).focus();\n }\n props.onKeyDown?.(event);\n },\n [props.onKeyDown],\n );\n\n const Root = isLg ? Primitive.div : DialogContent;\n\n return (\n <DialogRoot open={state !== 'closed'} aria-label={toLocalizedString(label, t)} modal={false}>\n {!isLg && <DialogTitle className='sr-only'>{toLocalizedString(label, t)}</DialogTitle>}\n <Root\n {...(!isLg && { forceMount: true, tabIndex: -1, onOpenAutoFocus: onOpenAutoFocus ?? handleOpenAutoFocus })}\n {...(state === 'closed' && { inert: true })}\n {...props}\n data-side={side === 'w-end' ? 'ie' : 'is'}\n data-state={state}\n data-resizing={resizing ? 'true' : 'false'}\n className={tx('main.sidebar', {}, classNames)}\n onKeyDownCapture={handleKeyDown}\n ref={ref}\n >\n {children}\n </Root>\n </DialogRoot>\n );\n },\n);\n\n//\n// Navigation Sidebar\n//\n\ntype MainNavigationSidebarProps = Omit<MainSidebarProps, 'expanded' | 'side'>;\n\nconst MainNavigationSidebar = forwardRef<HTMLDivElement, MainNavigationSidebarProps>((props, forwardedRef) => {\n const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);\n const mover = useLandmarkMover(props.onKeyDown, '0');\n\n return (\n <MainSidebar\n {...mover}\n {...props}\n state={navigationSidebarState}\n onStateChange={setNavigationSidebarState}\n resizing={resizing}\n side='w-start'\n ref={forwardedRef}\n />\n );\n});\n\nMainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;\n\n//\n// Complementary Sidebar\n//\n\ntype MainComplementarySidebarProps = Omit<MainSidebarProps, 'expanded' | 'side'>;\n\nconst MainComplementarySidebar = forwardRef<HTMLDivElement, MainComplementarySidebarProps>((props, forwardedRef) => {\n const { complementarySidebarState, setComplementarySidebarState, resizing } =\n useMainContext(COMPLEMENTARY_SIDEBAR_NAME);\n const mover = useLandmarkMover(props.onKeyDown, '2');\n\n return (\n <MainSidebar\n {...mover}\n {...props}\n state={complementarySidebarState}\n onStateChange={setComplementarySidebarState}\n resizing={resizing}\n side='w-end'\n ref={forwardedRef}\n />\n );\n});\n\nMainComplementarySidebar.displayName = COMPLEMENTARY_SIDEBAR_NAME;\n\n//\n// Content\n//\n\ntype MainContentProps = ThemedClassName<\n ComponentPropsWithRef<typeof Primitive.div> &\n MainStyleProps & {\n asChild?: boolean;\n }\n>;\n\nconst MainContent = forwardRef<HTMLDivElement, MainContentProps>(\n ({ asChild, classNames, bounce, handlesFocus, children, role, ...props }: MainContentProps, forwardedRef) => {\n const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : role ? Primitive.div : 'main';\n const mover = useLandmarkMover(props.onKeyDown, '1');\n\n return (\n <Comp\n role={role}\n {...(handlesFocus && { ...mover })}\n {...props}\n data-sidebar-left-state={navigationSidebarState}\n data-sidebar-right-state={complementarySidebarState}\n data-handles-focus={handlesFocus}\n className={tx('main.content', { bounce, handlesFocus }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\nMainContent.displayName = MAIN_NAME;\n\n//\n// Main\n//\n\nexport const Main = {\n Root: MainRoot,\n Overlay: MainOverlay,\n Content: MainContent,\n NavigationSidebar: MainNavigationSidebar,\n ComplementarySidebar: MainComplementarySidebar,\n};\n\nexport { useMainContext, useSidebars, useLandmarkMover };\n\nexport type { MainRootProps, MainOverlayProps, MainContentProps, MainNavigationSidebarProps, SidebarState };\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// This implementation is based upon https://github.com/hosembafer/react-swipe-to-dismiss, commit d88deafe910a6bd1400cf8fa90459a76cf4f71d3\n\nimport { type RefObject, useCallback, useEffect, useState } from 'react';\n\nenum MotionState {\n IDLE,\n DEBOUNCING,\n FOLLOWING,\n}\n\ntype Options = Partial<{\n onDismiss: () => void;\n dismissThreshold: number;\n debounceThreshold: number;\n side: 'inline-start' | 'inline-end';\n offset: number;\n}>;\n\nexport const useSwipeToDismiss = (\n ref: RefObject<HTMLElement | null>,\n { onDismiss, dismissThreshold = 64, debounceThreshold = 8, offset = 0 /* side = 'inline-start' */ }: Options,\n) => {\n const $root = ref.current;\n // todo(thure): Implement other sides.\n // const dK = direction === 'inline-start' ? 1 : -1;\n\n const [motionState, setMotionState] = useState<MotionState>(MotionState.IDLE);\n const [gestureStartX, setGestureStartX] = useState(0);\n\n const setIdle = useCallback(() => {\n setMotionState(MotionState.IDLE);\n $root?.style.removeProperty('inset-inline-start');\n $root?.style.setProperty('transition-duration', '200ms');\n }, [$root]);\n\n const setFollowing = useCallback(() => {\n setMotionState(MotionState.FOLLOWING);\n $root?.style.setProperty('transition-duration', '0ms');\n }, [$root]);\n\n const handlePointerDown = useCallback(\n ({ screenX }: PointerEvent) => {\n if (motionState === MotionState.IDLE) {\n setMotionState(MotionState.DEBOUNCING);\n setGestureStartX(screenX);\n }\n },\n [motionState],\n );\n\n const handlePointerMove = useCallback(\n ({ screenX }: PointerEvent) => {\n if ($root) {\n const delta = Math.min(screenX - gestureStartX, 0);\n switch (motionState) {\n case MotionState.FOLLOWING:\n if (Math.abs(delta) > dismissThreshold) {\n setIdle();\n onDismiss?.();\n } else {\n $root.style.setProperty('inset-inline-start', `${offset + delta}px`);\n }\n break;\n case MotionState.DEBOUNCING:\n if (Math.abs(delta) > debounceThreshold) {\n setFollowing();\n }\n break;\n }\n }\n },\n [$root, motionState, gestureStartX],\n );\n\n const handlePointerUp = useCallback(() => {\n setIdle();\n }, [setIdle]);\n\n useEffect(() => {\n $root?.addEventListener('pointerdown', handlePointerDown);\n return () => {\n $root?.removeEventListener('pointerdown', handlePointerDown);\n };\n }, [$root, handlePointerDown]);\n\n useEffect(() => {\n $root && document.documentElement.addEventListener('pointermove', handlePointerMove);\n return () => {\n document.documentElement.removeEventListener('pointermove', handlePointerMove);\n };\n }, [$root, handlePointerMove]);\n\n useEffect(() => {\n $root && document.documentElement.addEventListener('pointerup', handlePointerUp);\n return () => {\n document.documentElement.removeEventListener('pointerup', handlePointerUp);\n };\n }, [$root, handlePointerUp]);\n};\n", "//\n// Copyright 2022 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useId } from '@dxos/react-hooks';\nimport { type Elevation, type MessageValence } from '@dxos/ui-types';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { Icon } from '../Icon';\n\nconst messageIcons: Record<MessageValence, string> = {\n success: 'ph--check-circle--duotone',\n info: 'ph--info--duotone',\n warning: 'ph--warning--duotone',\n error: 'ph--warning-circle--duotone',\n neutral: 'ph--info--duotone',\n};\n\ntype MessageRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n valence?: MessageValence;\n elevation?: Elevation;\n asChild?: boolean;\n titleId?: string;\n descriptionId?: string;\n};\n\ntype MessageContextValue = { titleId?: string; descriptionId: string; valence: MessageValence };\n\nconst MESSAGE_NAME = 'Message';\n\nconst [MessageProvider, useMessageContext] = createContext<MessageContextValue>(MESSAGE_NAME);\n\n//\n// Root\n//\n\nconst MessageRoot = forwardRef<HTMLDivElement, MessageRootProps>(\n (\n {\n asChild,\n valence = 'neutral',\n elevation: propsElevation,\n classNames,\n titleId: propsTitleId,\n descriptionId: propsDescriptionId,\n children,\n ...props\n },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const titleId = useId('message__title', propsTitleId);\n const descriptionId = useId('message__description', propsDescriptionId);\n const elevation = useElevationContext(propsElevation);\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <MessageProvider {...{ titleId, descriptionId, valence }}>\n <Comp\n role={valence === 'neutral' ? 'paragraph' : 'alert'}\n {...props}\n className={tx('message.root', { valence, elevation }, classNames)}\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n </MessageProvider>\n );\n },\n);\n\nMessageRoot.displayName = MESSAGE_NAME;\n\n//\n// Title\n//\n\ntype MessageTitleProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {\n asChild?: boolean;\n icon?: string;\n};\n\nconst MESSAGE_TITLE_NAME = 'MessageTitle';\n\nconst MessageTitle = forwardRef<HTMLHeadingElement, MessageTitleProps>(\n ({ asChild, classNames, children, icon: iconProp, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);\n const Comp = asChild ? Slot : Primitive.h2;\n const icon = iconProp ?? messageIcons[valence];\n return (\n <Comp {...props} className={tx('message.header', {}, classNames)} id={titleId} ref={forwardedRef}>\n {!icon && valence === 'neutral' ? (\n <div />\n ) : (\n <Icon size={5} icon={icon} classNames={tx('message.icon', { valence })} />\n )}\n <span className={tx('message.title', {}, classNames)}>{children}</span>\n </Comp>\n );\n },\n);\n\nMessageTitle.displayName = MESSAGE_TITLE_NAME;\n\n//\n// Content\n//\n\ntype MessageContentProps = Omit<ThemedClassName<ComponentPropsWithRef<typeof Primitive.h2>>, 'id'> & {\n asChild?: boolean;\n};\n\nconst MESSAGE_CONTENT_NAME = 'MessageContent';\n\nconst MessageContent = forwardRef<HTMLParagraphElement, MessageContentProps>(\n ({ asChild, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { descriptionId } = useMessageContext(MESSAGE_CONTENT_NAME);\n const Comp = asChild ? Slot : Primitive.p;\n return (\n <Comp {...props} className={tx('message.content', {}, classNames)} id={descriptionId} ref={forwardedRef}>\n {children}\n </Comp>\n );\n },\n);\n\nMessageContent.displayName = MESSAGE_CONTENT_NAME;\n\n//\n// Message\n//\n\nexport const Message = {\n Root: MessageRoot,\n Title: MessageTitle,\n Content: MessageContent,\n};\n\nexport const Callout = Message;\n\nexport type { MessageRootProps, MessageTitleProps, MessageContentProps };\n\nexport { messageIcons };\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// This is based upon `@radix-ui/react-popover` fetched Oct 25, 2024 at https://github.com/radix-ui/primitives at commit 374c7d7.\n\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { type Scope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport React, {\n type ComponentPropsWithRef,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n type ElementRef,\n type FC,\n type ReactNode,\n type RefObject,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\n\n//\n// Context\n//\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [createPopperScope]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: RefObject<HTMLButtonElement>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n};\n\nconst [PopoverProvider, usePopoverContext] = createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\n//\n// PopoverRoot\n//\n\ninterface PopoverRootProps {\n children?: ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n}\n\nconst PopoverRoot: FC<PopoverRootProps> = (props: ScopedProps<PopoverRootProps>) => {\n const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef as RefObject<HTMLButtonElement>}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopoverRoot.displayName = POPOVER_NAME;\n\n//\n// PopoverAnchor\n//\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = ComponentRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n },\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n//\n// PopoverTrigger\n//\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface PopoverTriggerProps extends PrimitiveButtonProps {\n asChild?: boolean;\n}\n\nconst PopoverTrigger = forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, asChild, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const Comp = asChild ? Slot : Primitive.button;\n\n const trigger = (\n <Comp\n type='button'\n aria-haspopup='dialog'\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperPrimitive.Anchor asChild {...popperScope}>\n {trigger}\n </PopperPrimitive.Anchor>\n );\n },\n);\n\nPopoverTrigger.displayName = TRIGGER_NAME;\n\n//\n// PopoverVirtualTrigger\n//\n\nconst VIRTUAL_TRIGGER_NAME = 'PopoverVirtualTrigger';\n\ninterface PopoverVirtualTriggerProps {\n virtualRef: RefObject<PopoverTriggerElement | null>;\n}\n\nconst PopoverVirtualTrigger = (props: ScopedProps<PopoverVirtualTriggerProps>) => {\n const { __scopePopover, virtualRef } = props;\n const context = usePopoverContext(VIRTUAL_TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useEffect(() => {\n if (virtualRef.current) {\n context.triggerRef.current = virtualRef.current;\n }\n });\n return <PopperPrimitive.Anchor {...popperScope} virtualRef={virtualRef as RefObject<PopoverTriggerElement>} />;\n};\n\nPopoverVirtualTrigger.displayName = VIRTUAL_TRIGGER_NAME;\n\n//\n// PopoverPortal\n//\n\nconst PORTAL_NAME = 'PopoverPortal';\n\ntype PortalContextValue = { forceMount?: true };\nconst [PortalProvider, usePortalContext] = createPopoverContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n});\n\ntype PortalProps = ComponentPropsWithoutRef<typeof PortalPrimitive>;\ninterface PopoverPortalProps {\n children?: ReactNode;\n /**\n * Specify a container element to portal the content into.\n */\n container?: PortalProps['container'];\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true;\n}\n\nconst PopoverPortal: FC<PopoverPortalProps> = (props: ScopedProps<PopoverPortalProps>) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return (\n <PortalProvider scope={__scopePopover} forceMount={forceMount}>\n <Presence present={forceMount || context.open}>\n <PortalPrimitive asChild container={container}>\n {children}\n </PortalPrimitive>\n </Presence>\n </PortalProvider>\n );\n};\n\nPopoverPortal.displayName = PORTAL_NAME;\n\n//\n// PopoverContent\n//\n\nconst CONTENT_NAME = 'PopoverContent';\n\ntype PopoverContentProps = ThemedClassName<PopoverContentTypeProps> & {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: boolean;\n};\n\nconst PopoverContent = forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n\n return (\n <Presence present={forceMount || context.open}>\n {context.modal ? (\n <PopoverContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </Presence>\n );\n },\n);\n\nPopoverContent.displayName = CONTENT_NAME;\n\ntype PopoverContentTypeElement = PopoverContentImplElement;\nexport interface PopoverContentTypeProps extends Omit<\n PopoverContentImplProps,\n 'trapFocus' | 'disableOutsidePointerEvents'\n> {}\n\nconst PopoverContentModal = forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = useRef(false);\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n useEffect(() => {\n const content = contentRef.current;\n if (content) {\n return hideOthers(content);\n }\n }, []);\n\n return (\n <RemoveScroll as={Slot} allowPinchZoom>\n <PopoverContentImpl\n {...props}\n ref={composedRefs}\n // Make sure we're not trapping once it's been closed (closed !== unmounted when animating out).\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) {\n context.triggerRef.current?.focus();\n }\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false },\n )}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault(), {\n checkForDefaultPrevented: false,\n })}\n />\n </RemoveScroll>\n );\n },\n);\n\nconst PopoverContentNonModal = forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = useRef(false);\n const hasPointerDownOutsideRef = useRef(false);\n\n return (\n <PopoverContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event);\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) {\n context.triggerRef.current?.focus();\n }\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event);\n\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') {\n hasPointerDownOutsideRef.current = true;\n }\n }\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target as HTMLElement;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) {\n event.preventDefault();\n }\n\n // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }}\n />\n );\n },\n);\n\ntype PopoverContentImplElement = ElementRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Content>>;\n\ninterface PopoverContentImplProps\n extends Omit<PopperContentProps, 'onPlaced'>, Omit<DismissableLayerProps, 'onDismiss'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped'];\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];\n}\n\nconst PopoverContentImpl = forwardRef<PopoverContentImplElement, PopoverContentImplProps>(\n (props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n collisionPadding = 8,\n collisionBoundary,\n classNames,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { tx } = useThemeContext();\n const elevation = useElevationContext();\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n\n // Make sure the whole tree has focus guards as our `Popover` may be the last element in the DOM (because of the `Portal`)\n useFocusGuards();\n\n // Check for the closest annotated collision boundary in the DOM tree.\n const computedCollisionBoundary = useMemo(() => {\n const closestBoundary = context.triggerRef.current?.closest(\n '[data-popover-collision-boundary]',\n ) as HTMLElement | null;\n return closestBoundary\n ? Array.isArray(collisionBoundary)\n ? [closestBoundary, ...collisionBoundary]\n : collisionBoundary\n ? [closestBoundary, collisionBoundary]\n : [closestBoundary]\n : collisionBoundary;\n }, [context.open, collisionBoundary, context.triggerRef.current]);\n\n return (\n <FocusScope\n asChild\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <DismissableLayer\n asChild\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onInteractOutside={onInteractOutside}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onDismiss={() => context.onOpenChange(false)}\n >\n <PopperPrimitive.Content\n data-state={getState(context.open)}\n role='dialog'\n id={context.contentId}\n {...popperScope}\n {...contentProps}\n collisionPadding={safeCollisionPadding}\n collisionBoundary={computedCollisionBoundary}\n className={tx('popover.content', { elevation }, classNames)}\n ref={forwardedRef}\n style={{\n ...contentProps.style,\n // Re-namespace exposed content custom properties.\n ...{\n '--radix-popover-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-popover-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-popover-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-popover-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-popover-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n </DismissableLayer>\n </FocusScope>\n );\n },\n);\n\n//\n// PopoverClose\n//\n\nconst CLOSE_NAME = 'PopoverClose';\n\ntype PopoverCloseElement = ElementRef<typeof Primitive.button>;\ninterface PopoverCloseProps extends PrimitiveButtonProps {}\n\nconst PopoverClose = forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return (\n <Primitive.button\n type='button'\n {...closeProps}\n ref={forwardedRef}\n onClick={composeEventHandlers(props.onClick, () => context.onOpenChange(false))}\n />\n );\n },\n);\n\nPopoverClose.displayName = CLOSE_NAME;\n\n//\n// PopoverArrow\n//\n\nconst ARROW_NAME = 'PopoverArrow';\n\ntype PopoverArrowElement = ElementRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>>;\ninterface PopoverArrowProps extends PopperArrowProps {}\n\nconst PopoverArrow = forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, classNames, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n const { tx } = useThemeContext();\n return (\n <PopperPrimitive.Arrow\n {...popperScope}\n {...arrowProps}\n className={tx('popover.arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nPopoverArrow.displayName = ARROW_NAME;\n\n//\n// PopoverViewport\n//\n\ntype PopoverViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n constrainInline?: boolean;\n constrainBlock?: boolean;\n};\n\nconst PopoverViewport = forwardRef<HTMLDivElement, PopoverViewportProps>(\n ({ classNames, asChild, constrainInline = true, constrainBlock = true, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp\n {...props}\n className={tx('popover.viewport', { constrainInline, constrainBlock }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\nconst getState = (open: boolean) => (open ? 'open' : 'closed');\n\ntype PopoverContentInteractOutsideEvent = Parameters<NonNullable<PopoverContentProps['onInteractOutside']>>[0];\n\n//\n// Popver\n//\n\nexport const Popover = {\n Root: PopoverRoot,\n Anchor: PopoverAnchor,\n Trigger: PopoverTrigger,\n VirtualTrigger: PopoverVirtualTrigger,\n Portal: PopoverPortal,\n Content: PopoverContent,\n Close: PopoverClose,\n Arrow: PopoverArrow,\n Viewport: PopoverViewport,\n};\n\nexport { createPopoverScope };\n\nexport type {\n PopoverRootProps,\n PopoverAnchorProps,\n PopoverTriggerProps,\n PopoverVirtualTriggerProps,\n PopoverPortalProps,\n PopoverContentProps,\n PopoverCloseProps,\n PopoverArrowProps,\n PopoverViewportProps,\n PopoverContentInteractOutsideEvent,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype StatusProps = ThemedClassName<ComponentPropsWithRef<'span'>> & {\n indeterminate?: boolean;\n variant?: 'default' | 'main-bottom';\n progress?: number;\n};\n\nconst Status = forwardRef<HTMLSpanElement, StatusProps>(\n ({ classNames, children, progress = 0, indeterminate, variant, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <span\n role='status'\n {...props}\n className={tx('status.root', { indeterminate, variant }, classNames)}\n ref={forwardedRef}\n >\n <span\n role='none'\n className={tx('status.bar', { indeterminate, variant }, classNames)}\n {...(!indeterminate && { style: { width: `${Math.round(progress * 100)}%` } })}\n />\n {children}\n </span>\n );\n },\n);\n\nexport { Status };\n\nexport type { StatusProps };\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type HTMLAttributes, forwardRef } from 'react';\n\nimport { type AllowedAxis, type SlottableProps, type ThemedClassName } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\n\n//\n// Context\n//\n\nconst SCROLLAREA_NAME = 'ScrollArea';\n\ntype ScrollAreaContextType = {\n /** Orientation of scrollbars. */\n orientation: AllowedAxis;\n /** Hide scrollbars when not scrolling. */\n autoHide: boolean;\n /** Apply padding to opposite side of scrollbar. */\n margin?: boolean;\n /** Apply padding. */\n padding: boolean;\n /** Use thin scrollbars. */\n thin: boolean;\n /** Enable snap scrolling. */\n snap: boolean;\n};\n\nconst [ScrollAreaProvider, useScrollAreaContext] = createContext<ScrollAreaContextType>(SCROLLAREA_NAME);\n\n//\n// Root\n//\n\nconst SCROLLAREA_ROOT_NAME = 'ScrollArea.Root';\n\ntype ScrollAreaRootProps = SlottableProps<HTMLDivElement> & Partial<ScrollAreaContextType>;\n\n/**\n * ScrollArea provides native scrollbars with custom styling.\n */\nconst ScrollAreaRoot = forwardRef<HTMLDivElement, ScrollAreaRootProps>(\n (\n {\n classNames,\n className,\n asChild,\n children,\n orientation = 'vertical',\n autoHide = true,\n margin = false,\n padding = false,\n thin = false,\n snap = false,\n ...props\n },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n const options = { orientation, autoHide, margin, padding, thin, snap };\n\n return (\n <ScrollAreaProvider {...options}>\n <Comp {...props} className={tx('scrollArea.root', options, [className, classNames])} ref={forwardedRef}>\n {children}\n </Comp>\n </ScrollAreaProvider>\n );\n },\n);\n\nScrollAreaRoot.displayName = SCROLLAREA_ROOT_NAME;\n\n//\n// Viewport\n//\n\nconst SCROLLAREA_VIEWPORT_NAME = 'ScrollArea.Viewport';\n\ntype ScrollAreaViewportProps = ThemedClassName<HTMLAttributes<HTMLDivElement>>;\n\nconst ScrollAreaViewport = forwardRef<HTMLDivElement, ScrollAreaViewportProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const options = useScrollAreaContext(SCROLLAREA_VIEWPORT_NAME);\n\n return (\n <div {...props} className={tx('scrollArea.viewport', options, classNames)} ref={forwardedRef}>\n {children}\n </div>\n );\n },\n);\n\nScrollAreaViewport.displayName = SCROLLAREA_VIEWPORT_NAME;\n\n//\n// ScrollArea\n//\n\nexport const ScrollArea = {\n Root: ScrollAreaRoot,\n Viewport: ScrollAreaViewport,\n};\n\nexport type { ScrollAreaRootProps, ScrollAreaViewportProps };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { createContext } from '@radix-ui/react-context';\nimport React, {\n type HTMLAttributes,\n type PropsWithChildren,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { addEventListener, combine } from '@dxos/async';\nimport { invariant } from '@dxos/invariant';\nimport { useForwardedRef } from '@dxos/react-hooks';\nimport { mx } from '@dxos/ui-theme';\n\nimport { type ThemedClassName } from '../../util';\nimport { IconButton } from '../Button';\nimport { ScrollArea } from '../ScrollArea';\n\nconst isBottom = (el: HTMLElement | null) => {\n return !!(el && el.scrollHeight - el.scrollTop === el.clientHeight);\n};\n\nexport interface ScrollController {\n viewport: HTMLDivElement | null;\n scrollToTop: (behavior?: ScrollBehavior) => void;\n scrollToBottom: (behavior?: ScrollBehavior) => void;\n}\n\ntype ScrollContainerContextValue = {\n scrollToBottom: (behavior?: ScrollBehavior) => void;\n controller?: ScrollController;\n pinned?: boolean;\n};\n\nconst [ScrollContainerProvider, useScrollContainerContext] =\n createContext<ScrollContainerContextValue>('ScrollContainer');\n\n//\n// Root\n//\n\ntype RootProps = ThemedClassName<\n PropsWithChildren<{\n pin?: boolean;\n fade?: boolean;\n behavior?: ScrollBehavior;\n }>\n>;\n\n/**\n * Scroll container that automatically scrolls to the bottom when new content is added.\n */\nconst Root = forwardRef<ScrollController, RootProps>(\n ({ children, classNames, pin, fade, behavior: behaviorProp = 'smooth' }, forwardedRef) => {\n const scrollerRef = useRef<HTMLDivElement>(null);\n const autoScrollRef = useRef(false);\n const [overflow, setOverflow] = useState(false);\n const [pinned, setPinned] = useState(pin);\n\n const timeoutRef = useRef<NodeJS.Timeout>(undefined);\n const scrollToBottom = useCallback((behavior: ScrollBehavior = behaviorProp) => {\n if (scrollerRef.current) {\n // Temporarily hide scrollbar to prevent flickering.\n autoScrollRef.current = true;\n scrollerRef.current.classList.add('scrollbar-none');\n scrollerRef.current.scrollTo({\n top: scrollerRef.current.scrollHeight,\n behavior,\n });\n\n clearTimeout(timeoutRef.current);\n if (behavior !== 'instant') {\n timeoutRef.current = setTimeout(() => {\n scrollerRef.current?.classList.remove('scrollbar-none');\n autoScrollRef.current = false;\n }, 500);\n }\n\n setPinned(true);\n }\n }, []);\n\n const controller = useMemo(\n () => ({\n viewport: scrollerRef.current,\n scrollToTop: () => {\n invariant(scrollerRef.current);\n scrollerRef.current.scrollTo({ top: 0, behavior: 'smooth' });\n setPinned(false);\n },\n scrollToBottom: () => {\n scrollToBottom('smooth');\n },\n }),\n [scrollToBottom, scrollerRef.current],\n );\n\n // Scroll controller imperative ref.\n useImperativeHandle(forwardedRef, () => controller, [controller]);\n\n // Listen for scroll events.\n useEffect(() => {\n if (!scrollerRef.current) {\n return;\n }\n\n return combine(\n // Check if user scrolls.\n addEventListener(scrollerRef.current, 'wheel', () => {\n setPinned(isBottom(scrollerRef.current));\n }),\n // Check if scrolls.\n addEventListener(scrollerRef.current, 'scroll', () => {\n setOverflow((scrollerRef.current?.scrollTop ?? 0) > 0);\n }),\n );\n }, []);\n\n return (\n <ScrollContainerProvider pinned={pinned} controller={controller} scrollToBottom={scrollToBottom}>\n <div className='relative grid dx-container overflow-hidden'>\n {fade && (\n <div\n role='none'\n data-visible={overflow}\n className={mx(\n // NOTE: Gradients may not be visible with dark reader extensions.\n 'z-10 absolute top-0 inset-x-0 h-24 w-full',\n 'opacity-0 duration-200 transition-opacity data-[visible=\"true\"]:opacity-100',\n 'bg-gradient-to-b from-(--surface-bg) to-transparent pointer-events-none',\n )}\n />\n )}\n <ScrollArea.Root classNames={mx('min-h-0', classNames)} thin>\n <ScrollArea.Viewport ref={scrollerRef}>{children}</ScrollArea.Viewport>\n </ScrollArea.Root>\n </div>\n </ScrollContainerProvider>\n );\n },\n);\n\nRoot.displayName = 'ScrollContainer.Root';\n\n//\n// Viewport\n//\n\nconst VIEWPORT_NAME = 'ScrollContainer.Viewport';\n\ntype ViewportProps = ThemedClassName<PropsWithChildren<Omit<HTMLAttributes<HTMLDivElement>, 'className'>>>;\n\nconst Viewport = forwardRef<HTMLDivElement, ViewportProps>(({ classNames, children, ...props }, forwardedRef) => {\n const contentRef = useForwardedRef(forwardedRef);\n const { pinned, scrollToBottom } = useScrollContainerContext(VIEWPORT_NAME);\n\n useEffect(() => {\n if (!pinned || !contentRef.current) {\n return;\n }\n\n // Scroll instantly otherwise it might move while we're scrolling.\n scrollToBottom();\n\n // Setup resize observer to detect content changes.\n const resizeObserver = new ResizeObserver(() => scrollToBottom());\n resizeObserver.observe(contentRef.current);\n return () => resizeObserver.disconnect();\n }, [pinned, scrollToBottom]);\n\n return (\n <div className={mx('w-full', classNames)} {...props} ref={contentRef}>\n {children}\n </div>\n );\n});\n\nViewport.displayName = VIEWPORT_NAME;\n\n//\n// ScrollDownButton\n//\n\nconst SCROLL_DOWN_BUTTON_NAME = 'ScrollContainer.ScrollDownButton';\n\ntype ScrollDownButtonProps = ThemedClassName;\n\nconst ScrollDownButton = ({ classNames }: ScrollDownButtonProps) => {\n const { pinned, scrollToBottom } = useScrollContainerContext(SCROLL_DOWN_BUTTON_NAME);\n\n return (\n <div\n role='none'\n className={mx(\n 'absolute bottom-2 right-4 opacity-100 transition-opacity duration-300',\n pinned && 'opacity-0',\n classNames,\n )}\n >\n <IconButton\n variant='primary'\n icon='ph--arrow-down--regular'\n iconOnly\n size={4}\n label='Scroll down'\n onClick={() => scrollToBottom()}\n />\n </div>\n );\n};\n\nScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;\n\n//\n// ScrollContainer\n//\n\nexport { useScrollContainerContext };\n\nexport const ScrollContainer = {\n Root,\n Viewport,\n ScrollDownButton,\n};\n\nexport type {\n RootProps as ScrollContainerRootProps,\n ViewportProps as ScrollContainerViewportProps,\n ScrollDownButtonProps as ScrollContainerScrollDownButtonProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport React, { forwardRef } from 'react';\n\nimport { useElevationContext, useThemeContext } from '../../hooks';\nimport { useSafeCollisionPadding } from '../../hooks/useSafeCollisionPadding';\nimport { type ThemedClassName } from '../../util';\nimport { Button, type ButtonProps } from '../Button';\nimport { Icon } from '../Icon';\n\ntype SelectRootProps = SelectPrimitive.SelectProps;\n\nconst SelectRoot = SelectPrimitive.Root;\n\ntype SelectTriggerProps = SelectPrimitive.SelectTriggerProps;\n\nconst SelectTrigger = SelectPrimitive.Trigger;\n\ntype SelectValueProps = SelectPrimitive.SelectValueProps;\n\nconst SelectValue = SelectPrimitive.Value;\n\ntype SelectIconProps = SelectPrimitive.SelectIconProps;\n\nconst SelectIcon = SelectPrimitive.Icon;\n\ntype SelectPortalProps = SelectPrimitive.SelectPortalProps;\n\nconst SelectPortal = SelectPrimitive.Portal;\n\ntype SelectTriggerButtonProps = Omit<ButtonProps, 'children'> & Pick<SelectValueProps, 'placeholder' | 'children'>;\n\nconst SelectTriggerButton = forwardRef<HTMLButtonElement, SelectTriggerButtonProps>(\n ({ children, placeholder, ...props }, forwardedRef) => {\n return (\n <SelectPrimitive.Trigger asChild ref={forwardedRef}>\n <Button {...props}>\n <SelectPrimitive.Value placeholder={placeholder}>{children}</SelectPrimitive.Value>\n <span className='w-1 flex-1' />\n <SelectPrimitive.Icon asChild>\n <Icon size={3} icon='ph--caret-down--bold' />\n </SelectPrimitive.Icon>\n </Button>\n </SelectPrimitive.Trigger>\n );\n },\n);\n\ntype SelectContentProps = ThemedClassName<SelectPrimitive.SelectContentProps>;\n\nconst SelectContent = forwardRef<HTMLDivElement, SelectContentProps>(\n ({ classNames, children, collisionPadding = 8, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const elevation = useElevationContext();\n const safeCollisionPadding = useSafeCollisionPadding(collisionPadding);\n return (\n <SelectPrimitive.Content\n {...props}\n data-arrow-keys='up down'\n collisionPadding={safeCollisionPadding}\n className={tx('select.content', { elevation }, classNames)}\n position='popper'\n ref={forwardedRef}\n >\n {children}\n </SelectPrimitive.Content>\n );\n },\n);\n\ntype SelectScrollUpButtonProps = ThemedClassName<SelectPrimitive.SelectScrollUpButtonProps>;\n\nconst SelectScrollUpButton = forwardRef<HTMLDivElement, SelectScrollUpButtonProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.SelectScrollUpButton\n {...props}\n className={tx('select.scrollButton', {}, classNames)}\n ref={forwardedRef}\n >\n {children ?? <Icon size={3} icon='ph--caret-up--bold' />}\n </SelectPrimitive.SelectScrollUpButton>\n );\n },\n);\n\ntype SelectScrollDownButtonProps = ThemedClassName<SelectPrimitive.SelectScrollDownButtonProps>;\n\nconst SelectScrollDownButton = forwardRef<HTMLDivElement, SelectScrollDownButtonProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.SelectScrollDownButton\n {...props}\n className={tx('select.scrollButton', {}, classNames)}\n ref={forwardedRef}\n >\n {children ?? <Icon size={3} icon='ph--caret-down--bold' />}\n </SelectPrimitive.SelectScrollDownButton>\n );\n },\n);\n\ntype SelectViewportProps = ThemedClassName<SelectPrimitive.SelectViewportProps>;\n\nconst SelectViewport = forwardRef<HTMLDivElement, SelectViewportProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.SelectViewport {...props} className={tx('select.viewport', {}, classNames)} ref={forwardedRef}>\n {children}\n </SelectPrimitive.SelectViewport>\n );\n },\n);\n\ntype SelectItemProps = ThemedClassName<SelectPrimitive.SelectItemProps>;\n\nconst SelectItem = forwardRef<HTMLDivElement, SelectItemProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <SelectPrimitive.Item {...props} className={tx('select.item', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype SelectItemTextProps = SelectPrimitive.SelectItemTextProps;\n\nconst SelectItemText = SelectPrimitive.ItemText;\n\ntype SelectItemIndicatorProps = ThemedClassName<SelectPrimitive.SelectItemIndicatorProps>;\n\nconst SelectItemIndicator = forwardRef<HTMLDivElement, SelectItemIndicatorProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.ItemIndicator\n {...props}\n className={tx('select.itemIndicator', {}, classNames)}\n ref={forwardedRef}\n >\n {children}\n </SelectPrimitive.ItemIndicator>\n );\n },\n);\n\ntype SelectOptionProps = SelectItemProps;\n\n// TODO(burdon): Option to show icon on left/right.\nconst SelectOption = forwardRef<HTMLDivElement, SelectItemProps>(({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.Item {...props} className={tx('select.item', {}, classNames)} ref={forwardedRef}>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className='grow w-1' />\n {/* <SelectPrimitive.ItemIndicator className={tx('select.itemIndicator', 'option__indicator', {})}> */}\n <Icon icon='ph--check--regular' />\n {/* </SelectPrimitive.ItemIndicator> */}\n </SelectPrimitive.Item>\n );\n});\n\ntype SelectGroupProps = SelectPrimitive.SelectGroupProps;\n\nconst SelectGroup = SelectPrimitive.Group;\n\ntype SelectLabelProps = SelectPrimitive.SelectLabelProps;\n\nconst SelectLabel = SelectPrimitive.Label;\n\ntype SelectSeparatorProps = ThemedClassName<SelectPrimitive.SelectSeparatorProps>;\n\nconst SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <SelectPrimitive.Separator {...props} className={tx('select.separator', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype SelectArrowProps = ThemedClassName<SelectPrimitive.SelectArrowProps>;\n\nconst SelectArrow = forwardRef<SVGSVGElement, SelectArrowProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <SelectPrimitive.Arrow {...props} className={tx('select.arrow', {}, classNames)} ref={forwardedRef} />;\n});\n\nexport const Select = {\n Root: SelectRoot,\n Trigger: SelectTrigger,\n TriggerButton: SelectTriggerButton,\n Value: SelectValue,\n Icon: SelectIcon,\n Portal: SelectPortal,\n Content: SelectContent,\n ScrollUpButton: SelectScrollUpButton,\n ScrollDownButton: SelectScrollDownButton,\n Viewport: SelectViewport,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Option: SelectOption,\n Group: SelectGroup,\n Label: SelectLabel,\n Separator: SelectSeparator,\n Arrow: SelectArrow,\n};\n\nexport type {\n SelectRootProps,\n SelectTriggerProps,\n SelectTriggerButtonProps,\n SelectValueProps,\n SelectIconProps,\n SelectPortalProps,\n SelectContentProps,\n SelectScrollUpButtonProps,\n SelectScrollDownButtonProps,\n SelectViewportProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectItemIndicatorProps,\n SelectOptionProps,\n SelectGroupProps,\n SelectLabelProps,\n SelectSeparatorProps,\n SelectArrowProps,\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype SkeletonProps = ThemedClassName<ComponentPropsWithRef<'div'>> & {\n variant?: 'default' | 'circle' | 'text';\n};\n\n/**\n * A skeleton loading component that displays a placeholder while content is loading.\n */\nconst Skeleton = forwardRef<HTMLDivElement, SkeletonProps>(\n ({ classNames, variant = 'default', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <div {...props} className={tx('skeleton.root', { variant }, classNames)} ref={forwardedRef} />;\n },\n);\n\nexport { Skeleton };\n\nexport type { SkeletonProps };\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { forwardRef } from 'react';\n\nimport { type SlottableProps } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\n\ntype ScopedProps<P> = P & { __scopeSplitter?: any };\n\n// TODO(burdon): Enable resize.\n// TODO(burdon): Generalize horizontal/vertical and change to start/end.\ntype Mode = 'upper' | 'lower' | 'both';\n\ntype SplitterContextValue = {\n mode: Mode;\n ratio: number;\n transition: number;\n};\n\nconst SPLITTER_NAME = 'Splitter';\n\nconst [createSplitterContext, createSplitterScope] = createContextScope(SPLITTER_NAME);\n\nconst [SplitterProvider, useSplitterContext] = createSplitterContext<SplitterContextValue>(SPLITTER_NAME);\n\n//\n// Root\n//\n\nconst ROOT_NAME = 'Splitter.Root';\n\ntype RootProps = SlottableProps<HTMLDivElement> & Partial<SplitterContextValue>;\n\nconst Root = forwardRef<HTMLDivElement, ScopedProps<RootProps>>(\n (\n {\n __scopeSplitter,\n classNames,\n className,\n asChild,\n mode = 'upper',\n ratio = 0.5,\n transition = 250,\n children,\n ...rootProps\n },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <SplitterProvider scope={__scopeSplitter} mode={mode} ratio={ratio} transition={transition}>\n <Comp\n role='none'\n {...rootProps}\n ref={forwardedRef}\n className={tx('splitter.root', {}, [className, classNames])}\n >\n {children}\n </Comp>\n </SplitterProvider>\n );\n },\n);\n\nRoot.displayName = ROOT_NAME;\n\n//\n// Panel\n//\n\nconst PANEL_NAME = 'Splitter.Panel';\n\ntype PanelProps = SlottableProps<HTMLDivElement> & {\n position: 'upper' | 'lower';\n};\n\nconst Panel = forwardRef<HTMLDivElement, ScopedProps<PanelProps>>(\n ({ __scopeSplitter, classNames, className, asChild, children, position, style, ...props }, forwardedRef) => {\n const { mode, ratio, transition } = useSplitterContext(PANEL_NAME, __scopeSplitter);\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n\n // Calculate position and height based on mode and ratio.\n const isUpper = position === 'upper';\n const top = isUpper ? '0%' : mode === 'upper' ? '100%' : mode === 'lower' ? '0%' : `${ratio * 100}%`;\n\n const height = isUpper\n ? mode === 'upper'\n ? '100%'\n : mode === 'lower'\n ? '0%'\n : `${ratio * 100}%`\n : mode === 'lower'\n ? '100%'\n : mode === 'upper'\n ? '0%'\n : `${(1 - ratio) * 100}%`;\n\n return (\n <Comp\n role='none'\n {...props}\n ref={forwardedRef}\n className={tx('splitter.panel', {}, [className, classNames])}\n style={{\n top,\n height,\n transition: `top ${transition}ms, height ${transition}ms ease-out`,\n ...style,\n }}\n >\n {children}\n </Comp>\n );\n },\n);\n\nPanel.displayName = PANEL_NAME;\n\n//\n// Splitter\n//\n\nconst Splitter = {\n Root,\n Panel,\n};\n\nexport { Splitter, createSplitterScope };\n\nexport type { Mode as SplitterMode, RootProps as SplitterRootProps, PanelProps as SplitterPanelProps };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, { type ComponentPropsWithRef, forwardRef } from 'react';\n\nimport { type ChromaticPalette, type MessageValence, type NeutralPalette } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\nexport type TagProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.span>> & {\n palette?: NeutralPalette | ChromaticPalette | MessageValence;\n asChild?: boolean;\n};\n\nexport const Tag = forwardRef<HTMLSpanElement, TagProps>(\n ({ asChild, palette = 'neutral', classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.span;\n return (\n <Comp {...props} className={tx('tag.root', { palette }, classNames)} data-hue={palette} ref={forwardedRef} />\n );\n },\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n ToastAction as ToastActionPrimitive,\n type ToastActionProps as ToastActionPrimitiveProps,\n ToastClose as ToastClosePrimitive,\n type ToastCloseProps as ToastClosePrimitiveProps,\n ToastDescription as ToastDescriptionPrimitive,\n type ToastDescriptionProps as ToastDescriptionPrimitiveProps,\n ToastProvider as ToastProviderPrimitive,\n type ToastProviderProps as ToastProviderPrimitiveProps,\n Root as ToastRootPrimitive,\n type ToastProps as ToastRootPrimitiveProps,\n ToastTitle as ToastTitlePrimitive,\n type ToastTitleProps as ToastTitlePrimitiveProps,\n ToastViewport as ToastViewportPrimitive,\n type ToastViewportProps as ToastViewportPrimitiveProps,\n} from '@radix-ui/react-toast';\nimport React, { type ComponentPropsWithRef, type FunctionComponent, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { ElevationProvider } from '../ElevationProvider';\n\ntype ToastProviderProps = ToastProviderPrimitiveProps;\n\nconst ToastProvider: FunctionComponent<ToastProviderProps> = ToastProviderPrimitive;\n\ntype ToastViewportProps = ThemedClassName<ToastViewportPrimitiveProps>;\n\nconst ToastViewport = forwardRef<HTMLOListElement, ToastViewportProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <ToastViewportPrimitive className={tx('toast.viewport', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype ToastRootProps = ThemedClassName<ToastRootPrimitiveProps>;\n\nconst ToastRoot = forwardRef<HTMLLIElement, ToastRootProps>(({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ToastRootPrimitive {...props} className={tx('toast.root', {}, classNames)} ref={forwardedRef}>\n <ElevationProvider elevation='toast'>{children}</ElevationProvider>\n </ToastRootPrimitive>\n );\n});\n\ntype ToastBodyProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>>;\n\nconst ToastBody = forwardRef<HTMLDivElement, ToastBodyProps>(({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return <Comp {...props} className={tx('toast.body', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype ToastTitleProps = ThemedClassName<ToastTitlePrimitiveProps>;\n\nconst ToastTitle = forwardRef<HTMLHeadingElement, ToastTitleProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : ToastTitlePrimitive;\n return <Comp {...props} className={tx('toast.title', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype ToastDescriptionProps = ThemedClassName<ToastDescriptionPrimitiveProps>;\n\nconst ToastDescription = forwardRef<HTMLParagraphElement, ToastDescriptionProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : ToastDescriptionPrimitive;\n return <Comp {...props} className={tx('toast.description', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype ToastActionsProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>>;\n\nconst ToastActions = forwardRef<HTMLDivElement, ToastActionsProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : Primitive.div;\n return <Comp {...props} className={tx('toast.actions', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype ToastActionProps = ToastActionPrimitiveProps;\n\nconst ToastAction: FunctionComponent<ToastActionProps> = ToastActionPrimitive;\n\ntype ToastCloseProps = ToastClosePrimitiveProps;\n\nconst ToastClose: FunctionComponent<ToastCloseProps> = ToastClosePrimitive;\n\nexport const Toast = {\n Provider: ToastProvider,\n Viewport: ToastViewport,\n Root: ToastRoot,\n Body: ToastBody,\n Title: ToastTitle,\n Description: ToastDescription,\n Actions: ToastActions,\n Action: ToastAction,\n Close: ToastClose,\n};\n\nexport type {\n ToastProviderProps,\n ToastViewportProps,\n ToastRootProps,\n ToastBodyProps,\n ToastTitleProps,\n ToastDescriptionProps,\n ToastActionsProps,\n ToastActionProps,\n ToastCloseProps,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAKA,SAASA,aAAa;AAEtB,cAAc;AACd,cAAc;;;ACJd,SAAqBC,SAASC,yBAAyB;;;ACAvD,SAASC,kBAAkB;AAMpB,IAAMC,oBAAoB,CAACC,iBAAAA;AAChC,QAAM,EAAEC,QAAO,IAAKC,WAAWC,cAAAA;AAC/B,SAAOH,gBAAgBC;AACzB;;;ACPA,IAAMG,YAAY;AAEX,IAAMC,cAAc,CAACC,SAAAA;AAC1B,QAAM,EAAEC,QAAO,IAAKC,gBAAAA;AACpB,QAAMC,MAAMF,UAAU,GAAGH,SAAAA,aAAqB,oBAAIM,KAAAA,GAAOC,WAAU,CAAA,KAAOP;AAC1E,SAAOE,OAAO,GAAGG,GAAAA,IAAOH,IAAAA,KAASM;AACnC;;;ACRA,SAASC,cAAAA,mBAAkB;AAIpB,IAAMC,yBAAyB,MAAMC,YAAWC,mBAAAA;;;ACJvD,SAASC,aAAaC,gBAAgB;AAEtC,SAASC,yBAAyB;AAE3B,IAAMC,oBAAoB,CAACC,SAAAA;AAChC,QAAM,CAACC,OAAOC,QAAAA,IAAYC,SAAwB,IAAA;AAClD,QAAM,CAACC,QAAQC,SAAAA,IAAaF,SAAwB,IAAA;AAEpD,QAAMG,eAAeC,YAAY,MAAA;AAC/B,QAAIC,OAAOC,gBAAgB;AACzBP,eAASM,OAAOC,eAAeR,KAAK;AACpCI,gBAAUG,OAAOC,eAAeL,MAAM;IACxC;EACF,GAAG,CAAA,CAAE;AAELM,oBAAkBJ,cAAcN,IAAAA;AAEhC,SAAO;IAAEC;IAAOG;EAAO;AACzB;;;AClBA,SAASO,eAAAA,cAAaC,WAAWC,SAASC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UE,SAAOI;AAC9B,SAAO,gBAAAhB,QAAA,cAACW,MAAAA;IAAM,GAAGf;IAAOM,WAAWJ,GAAG,eAAe,CAAC,GAAGH,UAAAA;IAAaQ,KAAKN;;AAC7E,CAAA;AAKF,IAAMoB,mBAAmBvB,gBAAAA,aACvB,CAAC,EAAEgB,SAASf,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;AAClC,QAAM,EAAEC,GAAE,IAAKC,gBAAAA;AACf,QAAMY,OAAOD,UAAUE,SAAOM;AAC9B,SAAO,gBAAAlB,QAAA,cAACW,MAAAA;IAAM,GAAGf;IAAOM,WAAWJ,GAAG,qBAAqB,CAAC,GAAGH,UAAAA;IAAaQ,KAAKN;;AACnF,CAAA;AAKF,IAAMsB,eAAezB,gBAAAA,aACnB,CAAC,EAAEgB,SAASf,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;AAClC,QAAM,EAAEC,GAAE,IAAKC,gBAAAA;AACf,QAAMY,OAAOD,UAAUE,SAAOC,YAAUC;AACxC,SAAO,gBAAAd,QAAA,cAACW,MAAAA;IAAM,GAAGf;IAAOM,WAAWJ,GAAG,iBAAiB,CAAC,GAAGH,UAAAA;IAAaQ,KAAKN;;AAC/E,CAAA;AAKF,IAAMuB,cAAmDC;AAIzD,IAAMC,aAAiDC;AAEhD,IAAMC,QAAQ;EACnBC,UAAUlC;EACVmC,UAAUjC;EACVkC,MAAMvB;EACNwB,MAAMnB;EACNoB,OAAOd;EACPe,aAAab;EACbc,SAASZ;EACTa,QAAQZ;EACRa,OAAOX;AACT;",
|
|
6
|
+
"names": ["Trans", "isLabel", "toLocalizedString", "useContext", "useDensityContext", "propsDensity", "density", "useContext", "DensityContext", "ICONS_URL", "useIconHref", "icon", "noCache", "useThemeContext", "url", "Date", "getMinutes", "undefined", "useContext", "useTranslationsContext", "useContext", "TranslationsContext", "useCallback", "useState", "useViewportResize", "useVisualViewport", "deps", "width", "setWidth", "useState", "height", "setHeight", "handleResize", "useCallback", "window", "visualViewport", "useViewportResize", "useCallback", "useEffect", "useMemo", "useState", "getDocumentElementFontSize", "parseFloat", "getComputedStyle", "document", "documentElement", "fontSize", "usePx", "rem", "setFontSize", "useState", "updateFontSize", "useCallback", "useEffect", "resizeObserver", "ResizeObserver", "observe", "mediaQueryList", "window", "matchMedia", "handleMediaChange", "addEventListener", "addListener", "disconnect", "removeEventListener", "removeListener", "useMemo", "createContext", "Primitive", "Slot", "React", "forwardRef", "DxAvatar", "useId", "mx", "AVATAR_NAME", "AvatarProvider", "useAvatarContext", "createContext", "AvatarRoot", "children", "labelId", "propsLabelId", "descriptionId", "propsDescriptionId", "useId", "AvatarContent", "forwardRef", "icon", "classNames", "props", "forwardedRef", "href", "useIconHref", "DxAvatar", "aria-labelledby", "aria-describedby", "rootClassName", "mx", "ref", "AvatarLabel", "asChild", "srOnly", "Comp", "Slot", "Primitive", "span", "tx", "useThemeContext", "id", "className", "AvatarDescription", "Avatar", "Root", "Content", "Label", "Description", "Primitive", "Slot", "React", "forwardRef", "React", "forwardRef", "memo", "Icon", "memo", "forwardRef", "icon", "classNames", "size", "props", "forwardedRef", "tx", "useThemeContext", "href", "useIconHref", "React", "svg", "className", "ref", "use", "Primitive", "Slot", "React", "forwardRef", "Link", "forwardRef", "asChild", "variant", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "a", "React", "className", "ref", "BreadcrumbRoot", "forwardRef", "asChild", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "div", "React", "role", "className", "ref", "BreadcrumbList", "ol", "BreadcrumbListItem", "li", "BreadcrumbLink", "Link", "BreadcrumbCurrent", "aria-current", "BreadcrumbSeparator", "children", "span", "aria-hidden", "Icon", "icon", "Breadcrumb", "Root", "List", "ListItem", "Current", "Separator", "createContext", "Primitive", "Slot", "React", "forwardRef", "memo", "BUTTON_GROUP_NAME", "BUTTON_NAME", "ButtonGroupProvider", "useButtonGroupContext", "createContext", "inGroup", "Button", "memo", "forwardRef", "classNames", "children", "density", "propsDensity", "elevation", "propsElevation", "variant", "asChild", "props", "ref", "tx", "useThemeContext", "useElevationContext", "useDensityContext", "Comp", "Slot", "Primitive", "button", "React", "data-variant", "data-density", "data-props", "className", "disabled", "displayName", "ButtonGroup", "forwardedRef", "div", "role", "React", "forwardRef", "IconButton", "forwardRef", "props", "forwardedRef", "iconOnly", "React", "IconOnlyButton", "ref", "LabelledIconButton", "noTooltip", "tooltipSide", "Tooltip", "Trigger", "asChild", "content", "label", "side", "size", "icon", "iconEnd", "iconClassNames", "caretDown", "_", "classNames", "tx", "useThemeContext", "Button", "Icon", "span", "className", "undefined", "Toggle", "TogglePrimitive", "React", "forwardRef", "Toggle", "forwardRef", "defaultPressed", "pressed", "onPressedChange", "props", "forwardedRef", "React", "TogglePrimitive", "asChild", "Button", "ref", "ToggleGroupItem", "ToggleGroupItemPrimitive", "ToggleGroup", "ToggleGroupPrimitive", "React", "forwardRef", "ToggleGroup", "forwardRef", "classNames", "children", "props", "forwardedRef", "React", "ToggleGroupPrimitive", "asChild", "ButtonGroup", "ref", "ToggleGroupItem", "variant", "elevation", "density", "ToggleGroupItemPrimitive", "Button", "ToggleGroupIconItem", "label", "icon", "size", "IconButton", "Primitive", "Slot", "React", "createContext", "forwardRef", "useContext", "mx", "Primitive", "Slot", "React", "forwardRef", "COLUMN_ROOT_NAME", "gutterSizes", "sm", "md", "lg", "rail", "Root", "forwardRef", "classNames", "className", "asChild", "role", "children", "gutter", "props", "forwardedRef", "tx", "useThemeContext", "Component", "Slot", "Primitive", "div", "gutterSize", "React", "style", "gridTemplateColumns", "join", "ref", "displayName", "COLUMN_ROW_NAME", "Row", "COLUMN_SEGMENT_NAME", "Segment", "Column", "React", "mx", "Flex", "children", "classNames", "className", "role", "column", "grow", "props", "React", "div", "mx", "React", "mx", "Grid", "children", "classNames", "className", "style", "role", "cols", "rows", "grow", "props", "React", "div", "gridTemplateColumns", "undefined", "gridTemplateRows", "mx", "Primitive", "Slot", "React", "forwardRef", "GRID_TEMPLATE_ROWS", "GRID_TEMPLATE_AREAS", "Root", "forwardRef", "classNames", "className", "asChild", "children", "role", "props", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "div", "React", "ref", "style", "gridTemplateRows", "gridTemplateAreas", "displayName", "Toolbar", "data-slot", "Content", "Statusbar", "Panel", "React", "useCallback", "useRef", "useState", "mx", "cache", "Map", "Image", "classNames", "src", "alt", "crossOrigin", "sampleSize", "contrast", "crossOriginState", "setCrossOriginState", "useState", "dominantColor", "setDominantColor", "undefined", "imageLoaded", "setImageLoaded", "canvasRef", "useRef", "handleImageError", "handleImageLoad", "useCallback", "target", "rgb", "get", "img", "current", "color", "extractDominantColor", "set", "React", "div", "className", "mx", "style", "backgroundColor", "canvas", "ref", "display", "aria-hidden", "background", "transition", "opacity", "onError", "onLoad", "ctx", "getContext", "width", "height", "drawImage", "imageData", "getImageData", "pixels", "data", "isTransparent", "r", "g", "b", "totalWeight", "cornerSize", "Math", "floor", "y", "x", "isInTopLeft", "isInTopRight", "isInBottomLeft", "isInBottomRight", "i", "red", "green", "blue", "alpha", "max", "min", "saturation", "weight", "round", "threshold", "edgeTransparentPixels", "edgePixels", "topIndex", "bottomIndex", "leftIndex", "rightIndex", "Primitive", "Slot", "ToolbarPrimitive", "React", "Fragment", "forwardRef", "useTranslation", "translationKey", "translations", "ContextMenuPrimitive", "Primitive", "Slot", "React", "forwardRef", "useMemo", "propIsNumber", "prop", "Number", "isFinite", "propsIsRecord", "safePadding", "propsPadding", "side", "useSafeCollisionPadding", "collisionPadding", "safeAreaPadding", "useThemeContext", "useMemo", "top", "right", "bottom", "left", "ContextMenuRoot", "ContextMenu", "ContextMenuTrigger", "Trigger", "ContextMenuPortal", "Portal", "ContextMenuContent", "forwardRef", "classNames", "children", "collisionPadding", "props", "forwardedRef", "tx", "useThemeContext", "elevation", "useElevationContext", "safeCollisionPadding", "useSafeCollisionPadding", "React", "Content", "data-arrow-keys", "className", "ref", "ContextMenuViewport", "asChild", "Comp", "Slot", "Primitive", "div", "ContextMenuArrow", "Arrow", "ContextMenuGroup", "Group", "ContextMenuItemIndicator", "ItemIndicator", "ContextMenuItem", "Item", "ContextMenuCheckboxItem", "CheckboxItem", "ContextMenuSeparator", "Separator", "ContextMenuGroupLabel", "Label", "Root", "Viewport", "GroupLabel", "composeEventHandlers", "composeRefs", "createContextScope", "useId", "MenuPrimitive", "createMenuScope", "Primitive", "Slot", "useControllableState", "React", "forwardRef", "useCallback", "useEffect", "useMemo", "useRef", "DROPDOWN_MENU_NAME", "createDropdownMenuContext", "createDropdownMenuScope", "createContextScope", "createMenuScope", "useMenuScope", "DropdownMenuProvider", "useDropdownMenuContext", "DropdownMenuRoot", "props", "__scopeDropdownMenu", "children", "dir", "open", "openProp", "defaultOpen", "onOpenChange", "modal", "menuScope", "triggerRef", "useRef", "setOpen", "useControllableState", "prop", "defaultProp", "onChange", "React", "scope", "triggerId", "useId", "contentId", "onOpenToggle", "useCallback", "prevOpen", "Root", "displayName", "TRIGGER_NAME", "DropdownMenuTrigger", "forwardRef", "forwardedRef", "disabled", "triggerProps", "context", "Anchor", "asChild", "Primitive", "button", "type", "id", "aria-haspopup", "aria-expanded", "aria-controls", "undefined", "data-state", "data-disabled", "ref", "composeRefs", "data-arrow-keys", "onPointerDown", "composeEventHandlers", "event", "ctrlKey", "preventDefault", "onKeyDown", "includes", "key", "VIRTUAL_TRIGGER_NAME", "DropdownMenuVirtualTrigger", "virtualRef", "useEffect", "current", "PORTAL_NAME", "DropdownMenuPortal", "portalProps", "Portal", "DropdownMenuViewport", "classNames", "tx", "useThemeContext", "Comp", "Slot", "div", "className", "CONTENT_NAME", "DropdownMenuContent", "collisionPadding", "collisionBoundary", "contentProps", "elevation", "useElevationContext", "hasInteractedOutsideRef", "safeCollisionPadding", "useSafeCollisionPadding", "computedCollisionBoundary", "useMemo", "closestBoundary", "closest", "Array", "isArray", "Content", "aria-labelledby", "onCloseAutoFocus", "focus", "onInteractOutside", "originalEvent", "detail", "ctrlLeftClick", "isRightClick", "style", "GROUP_NAME", "DropdownMenuGroup", "groupProps", "Group", "LABEL_NAME", "DropdownMenuGroupLabel", "labelProps", "Label", "ITEM_NAME", "DropdownMenuItem", "itemProps", "Item", "CHECKBOX_ITEM_NAME", "DropdownMenuCheckboxItem", "checkboxItemProps", "CheckboxItem", "RADIO_GROUP_NAME", "DropdownMenuRadioGroup", "radioGroupProps", "RadioGroup", "RADIO_ITEM_NAME", "DropdownMenuRadioItem", "INDICATOR_NAME", "DropdownMenuItemIndicator", "itemIndicatorProps", "ItemIndicator", "SEPARATOR_NAME", "DropdownMenuSeparator", "separatorProps", "Separator", "ARROW_NAME", "DropdownMenuArrow", "arrowProps", "Arrow", "DropdownMenuSub", "Sub", "SUB_TRIGGER_NAME", "DropdownMenuSubTrigger", "subTriggerProps", "SubTrigger", "SUB_CONTENT_NAME", "DropdownMenuSubContent", "subContentProps", "SubContent", "DropdownMenu", "Trigger", "VirtualTrigger", "Viewport", "GroupLabel", "RadioItem", "useDropdownMenuMenuScope", "Separator", "SeparatorPrimitive", "React", "forwardRef", "Separator", "forwardRef", "classNames", "orientation", "subdued", "props", "forwardedRef", "tx", "useThemeContext", "React", "SeparatorPrimitive", "className", "ref", "ToolbarRoot", "forwardRef", "classNames", "children", "density", "disabled", "layoutManaged", "textBlockWidth", "textBlockWidthProp", "props", "forwardedRef", "tx", "useThemeContext", "InnerRoot", "Fragment", "innerRootProps", "role", "className", "React", "Root", "data-arrow-keys", "orientation", "ref", "ToolbarText", "asChild", "Comp", "Slot", "Primitive", "div", "ToolbarButton", "Button", "ToolbarIconButton", "IconButton", "noTooltip", "ToolbarToggle", "Toggle", "ToolbarLink", "Link", "ToolbarToggleGroup", "elevation", "ButtonGroup", "ToolbarToggleGroupItem", "variant", "ToolbarToggleItem", "ToolbarToggleGroupIconItem", "icon", "label", "iconOnly", "ToolbarSeparator", "Separator", "ToolbarDragHandle", "testId", "t", "useTranslation", "translationKey", "data-testid", "size", "ToolbarCloseIconButton", "onClick", "ToolbarMenu", "context", "items", "DropdownMenu", "Trigger", "length", "Portal", "Content", "Viewport", "map", "onSelect", "index", "Item", "key", "Arrow", "Toolbar", "Text", "ToggleGroup", "ToggleGroupItem", "ToggleGroupIconItem", "DragHandle", "CloseIconButton", "Menu", "CardContext", "createContext", "CardRoot", "forwardRef", "children", "classNames", "className", "id", "asChild", "role", "border", "fullWidth", "props", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "div", "React", "ref", "Column", "Root", "gutter", "CardToolbar", "density", "Toolbar", "coarse", "CardMenu", "context", "items", "menuItems", "useContext", "combinedItems", "Menu", "CardTitle", "CardContent", "CardRow", "icon", "Row", "CardIcon", "CardSection", "mx", "CardHeading", "variant", "CardText", "truncate", "span", "CardPoster", "aspect", "image", "Image", "src", "alt", "aria-label", "Icon", "size", "CardAction", "actionIcon", "label", "onClick", "Button", "undefined", "CardLink", "href", "a", "data-variant", "target", "rel", "toolbar", "CardIconBlock", "Card", "ToolbarIconButton", "IconButton", "ToolbarSeparator", "Separator", "DragHandle", "testId", "CloseIconButton", "Title", "IconBlock", "Content", "Section", "Heading", "Text", "Poster", "Action", "Link", "React", "createContext", "useCallback", "useContext", "useState", "ClipboardContext", "createContext", "textValue", "setTextValue", "_", "useClipboard", "useContext", "ClipboardProvider", "children", "setInternalTextValue", "useState", "useCallback", "nextValue", "navigator", "clipboard", "writeText", "React", "Provider", "value", "React", "mx", "osTranslations", "inactiveLabelStyles", "CopyButton", "classNames", "value", "size", "props", "t", "useTranslation", "osTranslations", "textValue", "setTextValue", "useClipboard", "isCopied", "React", "Button", "onClick", "data-testid", "div", "role", "className", "mx", "span", "Icon", "icon", "CopyButtonIconOnly", "__scopeTooltip", "variant", "label", "onOpen", "useTooltipContext", "IconButton", "iconOnly", "then", "Clipboard", "Button", "CopyButton", "IconButton", "CopyButtonIconOnly", "Provider", "ClipboardProvider", "createContext", "DialogClose", "DialogClosePrimitive", "DialogContent", "DialogContentPrimitive", "DialogDescription", "DialogDescriptionPrimitive", "DialogOverlay", "DialogOverlayPrimitive", "DialogPortal", "DialogPortalPrimitive", "Root", "DialogRootPrimitive", "DialogTitle", "DialogTitlePrimitive", "DialogTrigger", "DialogTriggerPrimitive", "React", "forwardRef", "useTranslation", "osTranslations", "DialogRoot", "props", "React", "ElevationProvider", "elevation", "DialogRootPrimitive", "DialogTrigger", "DialogTriggerPrimitive", "DialogPortal", "DialogPortalPrimitive", "DIALOG_OVERLAY_NAME", "OverlayLayoutProvider", "useOverlayLayoutContext", "createContext", "DialogOverlay", "forwardRef", "classNames", "children", "blockAlign", "forwardedRef", "tx", "useThemeContext", "DialogOverlayPrimitive", "data-block-align", "className", "ref", "inOverlayLayout", "displayName", "DIALOG_CONTENT_NAME", "DialogContent", "size", "propsInOverlayLayout", "DialogContentPrimitive", "aria-describedby", "undefined", "Column", "Root", "DialogHeader", "srOnly", "Segment", "asChild", "div", "role", "DialogCloseIconButton", "label", "t", "useTranslation", "osTranslations", "IconButton", "icon", "iconOnly", "density", "variant", "DialogBody", "DialogTitle", "DialogTitlePrimitive", "DialogDescription", "DialogDescriptionPrimitive", "DialogActionBar", "DialogClose", "DialogClosePrimitive", "Dialog", "Trigger", "Portal", "Overlay", "Content", "Header", "Body", "Title", "Description", "ActionBar", "Close", "CloseIconButton", "AlertDialogAction", "AlertDialogActionPrimitive", "AlertDialogCancel", "AlertDialogCancelPrimitive", "AlertDialogContent", "AlertDialogContentPrimitive", "AlertDialogDescription", "AlertDialogDescriptionPrimitive", "AlertDialogOverlay", "AlertDialogOverlayPrimitive", "AlertDialogPortal", "AlertDialogPortalPrimitive", "Root", "AlertDialogRootPrimitive", "AlertDialogTitle", "AlertDialogTitlePrimitive", "AlertDialogTrigger", "AlertDialogTriggerPrimitive", "createContext", "React", "forwardRef", "AlertDialogRoot", "props", "React", "ElevationProvider", "elevation", "AlertDialogRootPrimitive", "AlertDialogTrigger", "AlertDialogTriggerPrimitive", "AlertDialogPortal", "AlertDialogPortalPrimitive", "AlertDialogCancel", "AlertDialogCancelPrimitive", "AlertDialogAction", "AlertDialogActionPrimitive", "AlertDialogTitle", "forwardRef", "classNames", "srOnly", "forwardedRef", "tx", "useThemeContext", "AlertDialogTitlePrimitive", "className", "ref", "AlertDialogDescription", "AlertDialogDescriptionPrimitive", "ALERT_DIALOG_OVERLAY_NAME", "ALERT_DIALOG_CONTENT_NAME", "ALERT_DIALOG_BODY_NAME", "ALERT_DIALOG_ACTIONBAR_NAME", "OverlayLayoutProvider", "useOverlayLayoutContext", "createContext", "inOverlayLayout", "AlertDialogOverlay", "children", "blockAlign", "AlertDialogOverlayPrimitive", "data-block-align", "displayName", "AlertDialogContent", "size", "AlertDialogContentPrimitive", "Column", "Root", "AlertDialogBody", "Segment", "asChild", "div", "role", "AlertDialogActionBar", "AlertDialog", "Trigger", "Portal", "Overlay", "Content", "Body", "Title", "Description", "ActionBar", "Cancel", "Action", "ErrorBoundary", "React", "safeStringify", "ErrorStackParser", "React", "mx", "ErrorStack", "error", "frames", "ErrorStackParser", "parse", "React", "div", "className", "map", "frame", "i", "isLast", "length", "local", "fileName", "parseLocalFrame", "lineNumber", "columnNumber", "undefined", "name", "functionName", "key", "mx", "a", "href", "span", "fileUrl", "line", "col", "pathname", "URL", "startsWith", "localPath", "slice", "split", "pop", "ErrorFallback", "children", "error", "title", "data", "isDev", "process", "message", "Error", "String", "React", "div", "role", "data-testid", "className", "h1", "p", "Section", "onClick", "text", "stack", "navigator", "clipboard", "writeText", "ErrorStack", "JSON", "stringify", "undefined", "pre", "safeStringify", "button", "type", "h2", "useEffect", "useState", "ThrowError", "delay", "props", "error", "setError", "useState", "useEffect", "t", "setTimeout", "generator", "clearTimeout", "Error", "Root", "CheckboxPrimitive", "useControllableState", "React", "forwardRef", "DescriptionAndValidation", "DescriptionAndValidationPrimitive", "Description", "DescriptionPrimitive", "INPUT_NAME", "InputRoot", "Label", "LabelPrimitive", "PinInput", "PinInputPrimitive", "TextArea", "TextAreaPrimitive", "TextInput", "TextInputPrimitive", "Validation", "ValidationPrimitive", "useInputContext", "mx", "Label", "forwardRef", "classNames", "children", "srOnly", "props", "forwardedRef", "tx", "useThemeContext", "React", "LabelPrimitive", "className", "ref", "Description", "DescriptionPrimitive", "Validation", "__inputScope", "validationValence", "useInputContext", "INPUT_NAME", "ValidationPrimitive", "DescriptionAndValidation", "DescriptionAndValidationPrimitive", "PinInput", "density", "propsDensity", "elevation", "propsElevation", "hasIosKeyboard", "useDensityContext", "useElevationContext", "PinInputPrimitive", "autoFocus", "disabled", "segmentClassName", "TextInput", "variant", "noAutoFill", "TextInputPrimitive", "TextArea", "TextAreaPrimitive", "Checkbox", "checked", "propsChecked", "defaultChecked", "propsDefaultChecked", "onCheckedChange", "propsOnCheckedChange", "size", "useControllableState", "prop", "defaultProp", "onChange", "id", "descriptionId", "errorMessageId", "CheckboxPrimitive", "Icon", "icon", "Switch", "input", "type", "mx", "event", "target", "aria-describedby", "Input", "Root", "InputRoot", "Primitive", "Slot", "React", "forwardRef", "LIST_ITEM_NAME", "LIST_NAME", "ListItemCollapsibleContent", "List", "ListPrimitive", "ListItem", "ListPrimitiveItem", "ListItemHeading", "ListPrimitiveItemHeading", "ListItemOpenTrigger", "ListPrimitiveItemOpenTrigger", "useListContext", "useListItemContext", "React", "edgeToOrientationMap", "top", "bottom", "left", "right", "orientationStyles", "horizontal", "vertical", "edgeStyles", "strokeSize", "terminalSize", "offsetToAlignTerminalWithLine", "ListDropIndicator", "edge", "gap", "lineInset", "terminalInset", "orientation", "React", "div", "role", "style", "className", "List", "forwardRef", "classNames", "children", "props", "forwardedRef", "tx", "useThemeContext", "density", "useDensityContext", "React", "DensityProvider", "ListPrimitive", "className", "ref", "ListItemEndcap", "asChild", "Comp", "Slot", "Primitive", "div", "role", "MockListItemOpenTrigger", "ListItemHeading", "ListPrimitiveItemHeading", "ListItemOpenTrigger", "__listItemScope", "open", "useListItemContext", "LIST_ITEM_NAME", "ListPrimitiveItemOpenTrigger", "Icon", "size", "icon", "ListItemRoot", "ListPrimitiveItem", "collapsible", "ListItem", "Root", "Endcap", "Heading", "OpenTrigger", "CollapsibleContent", "ListItemCollapsibleContent", "MockOpenTrigger", "DropIndicator", "ListDropIndicator", "React", "forwardRef", "React", "edgeToOrientationMap", "reparent", "orientationStyles", "sibling", "child", "instructionStyles", "strokeSize", "terminalSize", "offsetToAlignTerminalWithLine", "TreeDropIndicator", "instruction", "gap", "lineOffset", "isBlocked", "type", "desiredInstruction", "desired", "orientation", "React", "div", "style", "currentLevel", "indentPerLevel", "className", "TreeRoot", "forwardRef", "props", "forwardedRef", "React", "List", "ref", "TreeBranch", "__listScope", "headingId", "useListItemContext", "LIST_ITEM_NAME", "aria-labelledby", "TreeItemRoot", "ListItem", "Root", "role", "TreeItemHeading", "Heading", "TreeItemOpenTrigger", "OpenTrigger", "MockTreeItemOpenTrigger", "MockOpenTrigger", "TreeItemBody", "CollapsibleContent", "Tree", "Branch", "TreeItem", "Body", "DropIndicator", "TreeDropIndicator", "useFocusFinders", "createContextScope", "Primitive", "Slot", "useControllableState", "React", "forwardRef", "useCallback", "TREEGRID_ROW_NAME", "createTreegridRowContext", "createTreegridRowScope", "createContextScope", "TreegridRowProvider", "useTreegridRowContext", "PATH_SEPARATOR", "PARENT_OF_SEPARATOR", "TreegridRoot", "forwardRef", "asChild", "classNames", "children", "style", "gridTemplateColumns", "props", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "div", "findFirstFocusable", "useFocusFinders", "handleKeyDown", "useCallback", "event", "key", "direction", "target", "ancestorWithArrowKeys", "closest", "currentRow", "treegrid", "rows", "Array", "from", "querySelectorAll", "currentIndex", "indexOf", "nextIndex", "targetRow", "firstFocusable", "preventDefault", "focus", "onKeyDown", "React", "role", "className", "ref", "TreegridRow", "__treegridRowScope", "id", "parentOf", "open", "propsOpen", "defaultOpen", "onOpenChange", "propsOnOpenChange", "pathParts", "split", "level", "length", "useControllableState", "prop", "onChange", "defaultProp", "scope", "aria-level", "TreegridCell", "indent", "Treegrid", "Root", "Row", "Cell", "useFocusableGroup", "createContext", "DialogContent", "Root", "DialogRoot", "DialogTitle", "Primitive", "Slot", "useControllableState", "React", "forwardRef", "useCallback", "useEffect", "useRef", "useState", "addEventListener", "log", "useForwardedRef", "useMediaQuery", "osTranslations", "useCallback", "useEffect", "useState", "useSwipeToDismiss", "ref", "onDismiss", "dismissThreshold", "debounceThreshold", "offset", "$root", "current", "motionState", "setMotionState", "useState", "gestureStartX", "setGestureStartX", "setIdle", "useCallback", "style", "removeProperty", "setProperty", "setFollowing", "handlePointerDown", "screenX", "handlePointerMove", "delta", "Math", "min", "abs", "handlePointerUp", "useEffect", "addEventListener", "removeEventListener", "document", "documentElement", "MAIN_NAME", "MAIN_ROOT_NAME", "MAIN_OVERLAY_NAME", "NAVIGATION_SIDEBAR_NAME", "COMPLEMENTARY_SIDEBAR_NAME", "handleOpenAutoFocus", "event", "document", "body", "hasAttribute", "preventDefault", "landmarkAttr", "useLandmarkMover", "propsOnKeyDown", "landmark", "handleKeyDown", "useCallback", "target", "currentTarget", "key", "landmarks", "Array", "from", "querySelectorAll", "map", "el", "parseInt", "getAttribute", "NaN", "sort", "l", "length", "cursor", "indexOf", "nextLandmark", "getModifierState", "querySelector", "focus", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "ignoreDefaultKeydown", "Tab", "tabIndex", "onKeyDown", "MainProvider", "useMainContext", "createContext", "resizing", "navigationSidebarState", "setNavigationSidebarState", "_nextState", "log", "warn", "complementarySidebarState", "setComplementarySidebarState", "useSidebars", "consumerName", "toggleNavigationSidebar", "openNavigationSidebar", "collapseNavigationSidebar", "closeNavigationSidebar", "toggleComplementarySidebar", "openComplementarySidebar", "collapseComplementarySidebar", "closeComplementarySidebar", "MainRoot", "propsNavigationSidebarState", "defaultNavigationSidebarState", "onNavigationSidebarStateChange", "propsComplementarySidebarState", "defaultComplementarySidebarState", "onComplementarySidebarStateChange", "children", "props", "isLg", "useMediaQuery", "useControllableState", "prop", "defaultProp", "onChange", "setResizing", "useState", "resizeInterval", "useRef", "useEffect", "addEventListener", "window", "current", "clearTimeout", "setTimeout", "React", "displayName", "MainOverlay", "forwardRef", "classNames", "forwardedRef", "tx", "useThemeContext", "div", "onClick", "className", "inlineStartSidebarOpen", "inlineEndSidebarOpen", "data-state", "aria-hidden", "ref", "MainSidebar", "swipeToDismiss", "onOpenAutoFocus", "state", "onStateChange", "side", "label", "t", "useTranslation", "osTranslations", "useForwardedRef", "noopRef", "useSwipeToDismiss", "onDismiss", "focusGroupParent", "closest", "stopPropagation", "Root", "Primitive", "DialogContent", "DialogRoot", "open", "aria-label", "toLocalizedString", "modal", "DialogTitle", "forceMount", "inert", "data-side", "data-resizing", "onKeyDownCapture", "MainNavigationSidebar", "mover", "MainComplementarySidebar", "MainContent", "asChild", "bounce", "handlesFocus", "role", "Comp", "Slot", "data-sidebar-left-state", "data-sidebar-right-state", "data-handles-focus", "Main", "Overlay", "Content", "NavigationSidebar", "ComplementarySidebar", "createContext", "Primitive", "Slot", "React", "forwardRef", "useId", "messageIcons", "success", "info", "warning", "error", "neutral", "MESSAGE_NAME", "MessageProvider", "useMessageContext", "createContext", "MessageRoot", "forwardRef", "asChild", "valence", "elevation", "propsElevation", "classNames", "titleId", "propsTitleId", "descriptionId", "propsDescriptionId", "children", "props", "forwardedRef", "tx", "useThemeContext", "useId", "useElevationContext", "Comp", "Slot", "Primitive", "div", "React", "role", "className", "aria-labelledby", "aria-describedby", "ref", "displayName", "MESSAGE_TITLE_NAME", "MessageTitle", "icon", "iconProp", "h2", "id", "Icon", "size", "span", "MESSAGE_CONTENT_NAME", "MessageContent", "p", "Message", "Root", "Title", "Content", "Callout", "composeEventHandlers", "useComposedRefs", "createContextScope", "DismissableLayer", "useFocusGuards", "FocusScope", "useId", "PopperPrimitive", "createPopperScope", "Portal", "PortalPrimitive", "Presence", "Primitive", "Slot", "useControllableState", "hideOthers", "React", "forwardRef", "useCallback", "useEffect", "useMemo", "useRef", "useState", "RemoveScroll", "POPOVER_NAME", "createPopoverContext", "createPopoverScope", "createContextScope", "createPopperScope", "usePopperScope", "PopoverProvider", "usePopoverContext", "PopoverRoot", "props", "__scopePopover", "children", "open", "openProp", "defaultOpen", "onOpenChange", "modal", "popperScope", "triggerRef", "useRef", "hasCustomAnchor", "setHasCustomAnchor", "useState", "setOpen", "useControllableState", "prop", "defaultProp", "onChange", "React", "Root", "scope", "contentId", "useId", "onOpenToggle", "useCallback", "prevOpen", "onCustomAnchorAdd", "onCustomAnchorRemove", "displayName", "ANCHOR_NAME", "PopoverAnchor", "forwardRef", "forwardedRef", "anchorProps", "context", "useEffect", "Anchor", "ref", "TRIGGER_NAME", "PopoverTrigger", "asChild", "triggerProps", "composedTriggerRef", "useComposedRefs", "Comp", "Slot", "Primitive", "button", "trigger", "type", "aria-haspopup", "aria-expanded", "aria-controls", "data-state", "getState", "onClick", "composeEventHandlers", "VIRTUAL_TRIGGER_NAME", "PopoverVirtualTrigger", "virtualRef", "current", "PORTAL_NAME", "PortalProvider", "usePortalContext", "forceMount", "undefined", "PopoverPortal", "container", "Presence", "present", "PortalPrimitive", "CONTENT_NAME", "PopoverContent", "portalContext", "contentProps", "PopoverContentModal", "PopoverContentNonModal", "contentRef", "composedRefs", "isRightClickOutsideRef", "content", "hideOthers", "RemoveScroll", "as", "allowPinchZoom", "PopoverContentImpl", "trapFocus", "disableOutsidePointerEvents", "onCloseAutoFocus", "event", "preventDefault", "focus", "onPointerDownOutside", "originalEvent", "detail", "ctrlLeftClick", "ctrlKey", "isRightClick", "checkForDefaultPrevented", "onFocusOutside", "hasInteractedOutsideRef", "hasPointerDownOutsideRef", "defaultPrevented", "onInteractOutside", "target", "targetIsTrigger", "contains", "onOpenAutoFocus", "onEscapeKeyDown", "collisionPadding", "collisionBoundary", "classNames", "tx", "useThemeContext", "elevation", "useElevationContext", "safeCollisionPadding", "useSafeCollisionPadding", "useFocusGuards", "computedCollisionBoundary", "useMemo", "closestBoundary", "closest", "Array", "isArray", "FocusScope", "loop", "trapped", "onMountAutoFocus", "onUnmountAutoFocus", "DismissableLayer", "onDismiss", "Content", "role", "id", "className", "style", "CLOSE_NAME", "PopoverClose", "closeProps", "ARROW_NAME", "PopoverArrow", "arrowProps", "Arrow", "PopoverViewport", "constrainInline", "constrainBlock", "div", "Popover", "Trigger", "VirtualTrigger", "Portal", "Close", "Viewport", "React", "forwardRef", "Status", "forwardRef", "classNames", "children", "progress", "indeterminate", "variant", "props", "forwardedRef", "tx", "useThemeContext", "React", "span", "role", "className", "ref", "style", "width", "Math", "round", "createContext", "Primitive", "Slot", "React", "forwardRef", "SCROLLAREA_NAME", "ScrollAreaProvider", "useScrollAreaContext", "createContext", "SCROLLAREA_ROOT_NAME", "ScrollAreaRoot", "forwardRef", "classNames", "className", "asChild", "children", "orientation", "autoHide", "margin", "padding", "thin", "snap", "props", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "div", "options", "React", "ref", "displayName", "SCROLLAREA_VIEWPORT_NAME", "ScrollAreaViewport", "ScrollArea", "Root", "Viewport", "createContext", "React", "forwardRef", "useCallback", "useEffect", "useImperativeHandle", "useMemo", "useRef", "useState", "addEventListener", "combine", "invariant", "useForwardedRef", "mx", "isBottom", "el", "scrollHeight", "scrollTop", "clientHeight", "ScrollContainerProvider", "useScrollContainerContext", "createContext", "Root", "forwardRef", "children", "classNames", "pin", "fade", "behavior", "behaviorProp", "forwardedRef", "scrollerRef", "useRef", "autoScrollRef", "overflow", "setOverflow", "useState", "pinned", "setPinned", "timeoutRef", "undefined", "scrollToBottom", "useCallback", "current", "classList", "add", "scrollTo", "top", "clearTimeout", "setTimeout", "remove", "controller", "useMemo", "viewport", "scrollToTop", "invariant", "useImperativeHandle", "useEffect", "combine", "addEventListener", "React", "div", "className", "role", "data-visible", "mx", "ScrollArea", "thin", "Viewport", "ref", "displayName", "VIEWPORT_NAME", "props", "contentRef", "useForwardedRef", "resizeObserver", "ResizeObserver", "observe", "disconnect", "SCROLL_DOWN_BUTTON_NAME", "ScrollDownButton", "IconButton", "variant", "icon", "iconOnly", "size", "label", "onClick", "ScrollContainer", "Root", "Viewport", "ScrollDownButton", "SelectPrimitive", "React", "forwardRef", "SelectRoot", "Root", "SelectTrigger", "Trigger", "SelectValue", "Value", "SelectIcon", "Icon", "SelectPortal", "Portal", "SelectTriggerButton", "forwardRef", "children", "placeholder", "props", "forwardedRef", "React", "asChild", "ref", "Button", "span", "className", "size", "icon", "SelectContent", "classNames", "collisionPadding", "tx", "useThemeContext", "elevation", "useElevationContext", "safeCollisionPadding", "useSafeCollisionPadding", "Content", "data-arrow-keys", "position", "SelectScrollUpButton", "SelectScrollDownButton", "SelectViewport", "SelectItem", "Item", "SelectItemText", "ItemText", "SelectItemIndicator", "ItemIndicator", "SelectOption", "SelectGroup", "Group", "SelectLabel", "Label", "SelectSeparator", "Separator", "SelectArrow", "Arrow", "Select", "TriggerButton", "ScrollUpButton", "ScrollDownButton", "Viewport", "Option", "React", "forwardRef", "Skeleton", "forwardRef", "classNames", "variant", "props", "forwardedRef", "tx", "useThemeContext", "React", "div", "className", "ref", "createContextScope", "Primitive", "Slot", "React", "forwardRef", "SPLITTER_NAME", "createSplitterContext", "createSplitterScope", "createContextScope", "SplitterProvider", "useSplitterContext", "ROOT_NAME", "Root", "forwardRef", "__scopeSplitter", "classNames", "className", "asChild", "mode", "ratio", "transition", "children", "rootProps", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "div", "React", "scope", "role", "ref", "displayName", "PANEL_NAME", "Panel", "position", "style", "props", "isUpper", "top", "height", "Splitter", "Primitive", "Slot", "React", "forwardRef", "Tag", "forwardRef", "asChild", "palette", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Comp", "Slot", "Primitive", "span", "React", "className", "data-hue", "ref", "Primitive", "Slot", "ToastAction", "ToastActionPrimitive", "ToastClose", "ToastClosePrimitive", "ToastDescription", "ToastDescriptionPrimitive", "ToastProvider", "ToastProviderPrimitive", "Root", "ToastRootPrimitive", "ToastTitle", "ToastTitlePrimitive", "ToastViewport", "ToastViewportPrimitive", "React", "forwardRef", "ToastProvider", "ToastProviderPrimitive", "ToastViewport", "forwardRef", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "React", "ToastViewportPrimitive", "className", "ref", "ToastRoot", "children", "ToastRootPrimitive", "ElevationProvider", "elevation", "ToastBody", "asChild", "Comp", "Slot", "Primitive", "div", "ToastTitle", "ToastTitlePrimitive", "ToastDescription", "ToastDescriptionPrimitive", "ToastActions", "ToastAction", "ToastActionPrimitive", "ToastClose", "ToastClosePrimitive", "Toast", "Provider", "Viewport", "Root", "Body", "Title", "Description", "Actions", "Action", "Close"]
|
|
7
7
|
}
|