@dxos/react-ui 0.8.4-main.937b3ca → 0.8.4-main.9be5663bfe
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-CEKVHJ27.mjs → chunk-OCVRIJCH.mjs} +184 -110
- package/dist/lib/browser/chunk-OCVRIJCH.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +3033 -1990
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +73 -37
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/{chunk-2NHEX4AD.mjs → chunk-QUD5P3RU.mjs} +184 -110
- package/dist/lib/node-esm/chunk-QUD5P3RU.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +3033 -1990
- 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 +73 -37
- 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.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/Button/Button.d.ts +2 -2
- package/dist/types/src/components/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/types/src/components/Button/IconButton.d.ts.map +1 -1
- package/dist/types/src/components/Button/IconButton.stories.d.ts +3 -0
- package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -1
- package/dist/types/src/components/Button/Toggle.d.ts +2 -2
- package/dist/types/src/components/Button/Toggle.d.ts.map +1 -1
- package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -1
- package/dist/types/src/components/Button/ToggleGroup.d.ts +6 -6
- package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
- package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Card/Card.d.ts +118 -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/CopyButton.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/index.d.ts +10 -1
- package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/AlertDialog.d.ts +37 -19
- package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/Dialog.d.ts +44 -22
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts +6 -8
- package/dist/types/src/components/Dialog/Dialog.stories.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 +19 -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/Focus/Focus.d.ts +36 -0
- package/dist/types/src/components/Focus/Focus.d.ts.map +1 -0
- package/dist/types/src/components/Focus/Focus.stories.d.ts +9 -0
- package/dist/types/src/components/Focus/Focus.stories.d.ts.map +1 -0
- package/dist/types/src/components/Focus/index.d.ts +2 -0
- package/dist/types/src/components/Focus/index.d.ts.map +1 -0
- package/dist/types/src/components/Icon/Icon.d.ts +3 -0
- package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/types/src/components/Icon/Icon.stories.d.ts +11 -3
- package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -1
- 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 +4 -7
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +7 -7
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/List/List.d.ts +5 -3
- package/dist/types/src/components/List/List.d.ts.map +1 -1
- package/dist/types/src/components/List/List.stories.d.ts +3 -1
- package/dist/types/src/components/List/List.stories.d.ts.map +1 -1
- package/dist/types/src/components/List/Tree.d.ts.map +1 -1
- package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/components/List/Treegrid.d.ts +5 -9
- package/dist/types/src/components/List/Treegrid.d.ts.map +1 -1
- package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.d.ts +9 -10
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts +0 -3
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menu/DropdownMenu.d.ts +51 -50
- package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +14 -1
- package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +4 -5
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +32 -23
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +26 -28
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +54 -9
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +34 -13
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +9 -5
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +2 -2
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Separator/Separator.d.ts +3 -3
- package/dist/types/src/components/Separator/Separator.d.ts.map +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 +34 -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.d.ts +3 -4
- package/dist/types/src/components/Status/Status.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts +4 -2
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +0 -5
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +2 -1
- 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/Toast/Toast.d.ts +15 -15
- package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +30 -12
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +9 -9
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +9 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/exemplars/generics.stories.d.ts +19 -0
- package/dist/types/src/exemplars/generics.stories.d.ts.map +1 -0
- package/dist/types/src/exemplars/slot.stories.d.ts +15 -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/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- 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/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
- package/dist/types/src/primitives/Column/Column.d.ts +35 -0
- package/dist/types/src/primitives/Column/Column.d.ts.map +1 -0
- package/dist/types/src/primitives/Column/Column.stories.d.ts +25 -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/Container/Container.d.ts +7 -0
- package/dist/types/src/primitives/Container/Container.d.ts.map +1 -0
- package/dist/types/src/primitives/Container/Container.stories.d.ts +6 -0
- package/dist/types/src/primitives/Container/Container.stories.d.ts.map +1 -0
- package/dist/types/src/primitives/Container/index.d.ts +2 -0
- package/dist/types/src/primitives/Container/index.d.ts.map +1 -0
- package/dist/types/src/primitives/Flex/Flex.d.ts +11 -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 +10 -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 +35 -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 +6 -0
- package/dist/types/src/primitives/index.d.ts.map +1 -0
- package/dist/types/src/testing/Loading.d.ts +9 -0
- package/dist/types/src/testing/Loading.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/withLayout.d.ts +1 -1
- package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withTheme.d.ts +3 -2
- package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.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/usePx.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +27 -22
- package/src/components/Avatars/Avatar.stories.tsx +7 -9
- package/src/components/Avatars/Avatar.tsx +6 -14
- package/src/components/Avatars/AvatarGroup.stories.tsx +2 -3
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +3 -4
- package/src/components/Breadcrumb/Breadcrumb.tsx +11 -37
- package/src/components/Button/Button.stories.tsx +3 -4
- package/src/components/Button/Button.tsx +11 -25
- package/src/components/Button/IconButton.stories.tsx +8 -6
- package/src/components/Button/IconButton.tsx +2 -4
- package/src/components/Button/Toggle.stories.tsx +2 -3
- package/src/components/Button/Toggle.tsx +4 -4
- package/src/components/Button/ToggleGroup.stories.tsx +2 -3
- package/src/components/Button/ToggleGroup.tsx +12 -16
- package/src/components/Card/Card.stories.tsx +151 -0
- package/src/components/Card/Card.tsx +492 -0
- package/src/components/Card/index.ts +5 -0
- package/src/components/Clipboard/CopyButton.tsx +4 -5
- package/src/components/Dialog/AlertDialog.stories.tsx +16 -17
- package/src/components/Dialog/AlertDialog.tsx +123 -82
- package/src/components/Dialog/Dialog.stories.tsx +100 -20
- package/src/components/Dialog/Dialog.tsx +113 -87
- package/src/components/ErrorFallback/ErrorFallback.stories.tsx +45 -0
- package/src/components/ErrorFallback/ErrorFallback.tsx +70 -0
- package/src/components/ErrorFallback/ErrorStack.tsx +114 -0
- package/src/components/ErrorFallback/ThrowError.tsx +37 -0
- package/src/components/ErrorFallback/index.ts +9 -0
- package/src/components/Focus/AUDIT.md +43 -0
- package/src/components/Focus/Focus.stories.tsx +230 -0
- package/src/components/Focus/Focus.tsx +201 -0
- package/src/components/Focus/index.ts +5 -0
- package/src/components/Icon/Icon.stories.tsx +45 -15
- package/src/components/Icon/Icon.tsx +6 -2
- 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 +20 -40
- package/src/components/Input/Input.tsx +24 -69
- package/src/components/Link/Link.stories.tsx +2 -3
- package/src/components/Link/Link.tsx +2 -2
- package/src/components/List/List.stories.tsx +15 -23
- package/src/components/List/List.tsx +16 -20
- package/src/components/List/ListDropIndicator.tsx +7 -7
- package/src/components/List/Tree.stories.tsx +5 -6
- package/src/components/List/Tree.tsx +0 -1
- package/src/components/List/TreeDropIndicator.tsx +6 -6
- package/src/components/List/Treegrid.stories.tsx +29 -30
- package/src/components/List/Treegrid.tsx +23 -28
- package/src/components/Main/Main.stories.tsx +41 -24
- package/src/components/Main/Main.tsx +139 -83
- package/src/components/Menu/ContextMenu.stories.tsx +2 -3
- package/src/components/Menu/ContextMenu.tsx +9 -33
- package/src/components/Menu/DropdownMenu.stories.tsx +2 -3
- package/src/components/Menu/DropdownMenu.tsx +58 -52
- package/src/components/Message/Message.stories.tsx +26 -12
- package/src/components/Message/Message.tsx +14 -30
- package/src/components/Popover/Popover.stories.tsx +7 -8
- package/src/components/Popover/Popover.tsx +62 -59
- package/src/components/ScrollArea/ScrollArea.stories.tsx +214 -75
- package/src/components/ScrollArea/ScrollArea.tsx +85 -113
- package/src/components/ScrollArea/index.ts +1 -1
- package/src/components/ScrollContainer/ScrollContainer.stories.tsx +47 -26
- package/src/components/ScrollContainer/ScrollContainer.tsx +206 -92
- package/src/components/Select/Select.stories.tsx +7 -8
- package/src/components/Select/Select.tsx +11 -27
- package/src/components/Separator/Separator.tsx +5 -8
- package/src/components/Skeleton/Skeleton.stories.tsx +51 -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 +127 -0
- package/src/components/Splitter/index.ts +5 -0
- package/src/components/Status/Status.stories.tsx +21 -18
- package/src/components/Status/Status.tsx +10 -7
- package/src/components/Tag/Tag.stories.tsx +4 -10
- package/src/components/Tag/Tag.tsx +2 -7
- package/src/components/ThemeProvider/ThemeProvider.stories.tsx +31 -0
- package/src/components/ThemeProvider/ThemeProvider.tsx +9 -7
- package/src/components/Toast/Toast.stories.tsx +2 -3
- package/src/components/Toast/Toast.tsx +22 -41
- package/src/components/Toolbar/Toolbar.stories.tsx +2 -3
- package/src/components/Toolbar/Toolbar.tsx +173 -26
- package/src/components/Tooltip/Tooltip.stories.tsx +20 -19
- package/src/components/Tooltip/Tooltip.tsx +18 -18
- package/src/components/index.ts +10 -5
- package/src/exemplars/generics.stories.tsx +41 -0
- package/src/exemplars/slot.stories.tsx +117 -0
- package/src/exemplars/tabster.stories.tsx +127 -0
- package/src/exemplars/virtualizer.stories.tsx +137 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useDensityContext.ts +2 -2
- package/src/index.ts +1 -0
- package/src/playground/Controls.stories.tsx +3 -10
- package/src/playground/Custom.stories.tsx +15 -18
- package/src/playground/Typography.stories.tsx +3 -3
- package/src/primitives/Column/AUDIT.md +354 -0
- package/src/primitives/Column/Column.stories.tsx +183 -0
- package/src/primitives/Column/Column.tsx +169 -0
- package/src/primitives/Column/index.ts +5 -0
- package/src/primitives/Container/Container.stories.tsx +29 -0
- package/src/primitives/Container/Container.tsx +19 -0
- package/src/primitives/Container/index.ts +5 -0
- package/src/primitives/Flex/Flex.stories.tsx +57 -0
- package/src/primitives/Flex/Flex.tsx +27 -0
- package/src/primitives/Flex/index.ts +5 -0
- package/src/primitives/Grid/Grid.stories.tsx +56 -0
- package/src/primitives/Grid/Grid.tsx +30 -0
- package/src/primitives/Grid/index.ts +5 -0
- package/src/primitives/Panel/Panel.stories.tsx +68 -0
- package/src/primitives/Panel/Panel.tsx +120 -0
- package/src/primitives/Panel/index.ts +5 -0
- package/src/primitives/index.ts +9 -0
- package/src/testing/Loading.tsx +47 -0
- package/src/testing/decorators/withLayout.tsx +21 -7
- package/src/testing/decorators/withLayoutVariants.tsx +18 -21
- package/src/testing/decorators/withTheme.tsx +24 -19
- package/src/testing/index.ts +2 -0
- package/src/translations.ts +19 -0
- package/src/util/usePx.ts +1 -0
- package/dist/lib/browser/chunk-CEKVHJ27.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2NHEX4AD.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/src/components/AnchoredOverflow/AnchoredOverflow.tsx +0 -59
- package/src/components/AnchoredOverflow/index.ts +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/index.ts", "../../../src/components/
|
|
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 './util';\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\ntype AnchoredOverflowRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst AnchoredOverflowRoot = forwardRef<HTMLDivElement, AnchoredOverflowRootProps>(\n ({ asChild, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='none'\n {...props}\n className={tx('anchoredOverflow.root', 'overflow-anchored', {}, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\ntype AnchoredOverflowAnchorProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n};\n\nconst AnchoredOverflowAnchor = forwardRef<HTMLDivElement, AnchoredOverflowAnchorProps>(\n ({ asChild, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='none'\n {...props}\n className={tx('anchoredOverflow.anchor', 'overflow-anchor', {}, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\nexport const AnchoredOverflow = {\n Root: AnchoredOverflowRoot,\n Anchor: AnchoredOverflowAnchor,\n};\n\nexport type { AnchoredOverflowRootProps, AnchoredOverflowAnchorProps };\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 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 Root = asChild ? Slot : Primitive.span;\n const { tx } = useThemeContext();\n const { labelId } = useAvatarContext('AvatarLabel');\n return (\n <Root\n {...props}\n id={labelId}\n ref={forwardedRef}\n className={tx('avatar.label', 'avatar__label', { srOnly }, classNames)}\n />\n );\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 Root = asChild ? Slot : Primitive.span;\n const { tx } = useThemeContext();\n const { descriptionId } = useAvatarContext('AvatarDescription');\n return (\n <Root\n {...props}\n id={descriptionId}\n ref={forwardedRef}\n className={tx('avatar.description', '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 Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='navigation'\n {...props}\n className={tx('breadcrumb.root', 'breadcrumb', {}, classNames)}\n ref={forwardedRef}\n />\n );\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 Root = asChild ? Slot : Primitive.ol;\n return (\n <Root\n role='list'\n {...props}\n className={tx('breadcrumb.list', 'breadcrumb__list', {}, classNames)}\n ref={forwardedRef}\n />\n );\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 Root = asChild ? Slot : Primitive.li;\n return (\n <Root\n role='listitem'\n {...props}\n className={tx('breadcrumb.listItem', 'breadcrumb__list__item', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype BreadcrumbLinkProps = LinkProps;\n\nconst BreadcrumbLink = forwardRef<HTMLAnchorElement, BreadcrumbLinkProps>(({ asChild, ...props }, forwardedRef) => {\n const Root = asChild ? Slot : Link;\n return <Root {...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 Root = asChild ? Slot : 'h1';\n return (\n <Root\n {...props}\n aria-current='page'\n className={tx('breadcrumb.current', 'breadcrumb__item__heading--current', {}, classNames)}\n ref={forwardedRef}\n />\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', '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', 'icon', { 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 Root = asChild ? Slot : Primitive.a;\n return <Root {...props} className={tx('link.root', 'link', { 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 Root = asChild ? Slot : Primitive.button;\n return (\n <Root\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 'button',\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 </Root>\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 Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n role='none'\n {...props}\n className={tx('button.group', 'button-group', { elevation }, classNames)}\n ref={forwardedRef}\n >\n <ButtonGroupProvider inGroup>{children}</ButtonGroupProvider>\n </Root>\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', 'iconButton', { 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 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 bs-px -mbe-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='pli-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='pli-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 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 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 { 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 { type ThemedClassName } from '../../util';\nimport { IconButton, type IconButtonProps } 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 className={tx('dialog.overlay', 'dialog__overlay', {}, classNames)}\n ref={forwardedRef}\n data-block-align={blockAlign}\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, inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);\n\n return (\n <DialogContentPrimitive\n // NOTE: Radix warning unless set to undefined.\n // https://www.radix-ui.com/primitives/docs/components/dialog#description\n aria-describedby={undefined}\n {...props}\n className={tx(\n 'dialog.content',\n 'dialog',\n { inOverlayLayout: propsInOverlayLayout || inOverlayLayout, size },\n classNames,\n )}\n ref={forwardedRef}\n >\n {children}\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 <div\n {...props}\n role='header'\n className={tx('dialog.header', 'dialog__header', { srOnly }, classNames)}\n ref={forwardedRef}\n />\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\n {...props}\n className={tx('dialog.title', 'dialog__title', { srOnly }, classNames)}\n ref={forwardedRef}\n />\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', 'dialog__description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// Close\n//\n\ntype DialogCloseProps = DialogClosePrimitiveProps;\n\nconst DialogClose: FunctionComponent<DialogCloseProps> = DialogClosePrimitive;\n\n//\n// Close Button\n//\n\ntype DialogCloseIconButtonProps = ThemedClassName<Partial<IconButtonProps>>;\n\nconst DialogCloseIconButton: ForwardRefExoticComponent<DialogCloseIconButtonProps> = forwardRef<\n HTMLButtonElement,\n DialogCloseIconButtonProps\n>((props, forwardedRef) => {\n const { t } = useTranslation(osTranslations);\n return (\n <IconButton\n {...props}\n label={props.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// 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 Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n CloseIconButton: DialogCloseIconButton,\n};\n\nexport type {\n DialogRootProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogHeaderProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n DialogCloseIconButtonProps,\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, { type ForwardRefExoticComponent, type FunctionComponent, forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\nimport { ElevationProvider } from '../ElevationProvider';\n\ntype AlertDialogRootProps = AlertDialogRootPrimitiveProps;\n\nconst AlertDialogRoot: FunctionComponent<AlertDialogRootProps> = (props) => (\n <ElevationProvider elevation='dialog'>\n <AlertDialogRootPrimitive {...props} />\n </ElevationProvider>\n);\n\ntype AlertDialogTriggerProps = AlertDialogTriggerPrimitiveProps;\n\nconst AlertDialogTrigger: FunctionComponent<AlertDialogTriggerProps> = AlertDialogTriggerPrimitive;\n\ntype AlertDialogPortalProps = AlertDialogPortalPrimitiveProps;\n\nconst AlertDialogPortal: FunctionComponent<AlertDialogPortalProps> = AlertDialogPortalPrimitive;\n\ntype AlertDialogCancelProps = AlertDialogCancelPrimitiveProps;\n\nconst AlertDialogCancel: FunctionComponent<AlertDialogCancelProps> = AlertDialogCancelPrimitive;\n\ntype AlertDialogActionProps = AlertDialogActionPrimitiveProps;\n\nconst AlertDialogAction: FunctionComponent<AlertDialogActionProps> = AlertDialogActionPrimitive;\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\n {...props}\n className={tx('dialog.title', 'dialog--alert__title', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\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', 'dialog--alert__description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype OverlayLayoutContextValue = { inOverlayLayout?: boolean };\nconst ALERT_DIALOG_OVERLAY_NAME = 'AlertDialogOverlay';\nconst ALERT_DIALOG_CONTENT_NAME = 'AlertDialogContent';\nconst [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLayoutContextValue>(\n ALERT_DIALOG_OVERLAY_NAME,\n {\n inOverlayLayout: false,\n },\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 className={tx(\n 'dialog.overlay',\n 'dialog--alert__overlay',\n {},\n classNames,\n 'data-[block-align=start]:justify-center',\n 'data-[block-align=start]:items-start',\n 'data-[block-align=center]:place-content-center',\n )}\n ref={forwardedRef}\n data-block-align={blockAlign}\n >\n <OverlayLayoutProvider inOverlayLayout>{children}</OverlayLayoutProvider>\n </AlertDialogOverlayPrimitive>\n );\n});\n\nAlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;\n\ntype AlertDialogContentProps = ThemedClassName<AlertDialogContentPrimitiveProps>;\n\nconst AlertDialogContent: ForwardRefExoticComponent<AlertDialogContentProps> = forwardRef<\n HTMLDivElement,\n AlertDialogContentProps\n>(({ classNames, children, ...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', 'dialog--alert', { inOverlayLayout }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </AlertDialogContentPrimitive>\n );\n});\n\nAlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;\n\nexport const AlertDialog = {\n Root: AlertDialogRoot,\n Trigger: AlertDialogTrigger,\n Portal: AlertDialogPortal,\n Overlay: AlertDialogOverlay,\n Content: AlertDialogContent,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n};\n\nexport type {\n AlertDialogRootProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n AlertDialogCancelProps,\n AlertDialogActionProps,\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, useCallback } 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 ClassNameValue, 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>(({ srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <LabelPrimitive {...props} className={tx('input.label', '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 ({ srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DescriptionPrimitive\n {...props}\n className={tx('input.description', 'input__description', { srOnly }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </DescriptionPrimitive>\n );\n },\n);\n\ntype ValidationProps = ThemedClassName<ValidationPrimitiveProps> & { srOnly?: boolean };\n\nconst Validation = forwardRef<HTMLSpanElement, InputScopedProps<ValidationProps>>(\n ({ __inputScope, srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n return (\n <ValidationPrimitive\n {...props}\n className={tx(\n 'input.validation',\n `input__validation-message input__validation-message--${validationValence}`,\n { srOnly, validationValence },\n classNames,\n )}\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 ({ srOnly, classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DescriptionAndValidationPrimitive\n {...props}\n className={tx('input.descriptionAndValidation', 'input__description-and-validation', { srOnly }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </DescriptionAndValidationPrimitive>\n );\n },\n);\n\ntype PinInputProps = InputSharedProps &\n Omit<PinInputPrimitiveProps, 'segmentClassName' | 'inputClassName'> & {\n segmentClassName?: ClassNameValue;\n inputClassName?: ClassNameValue;\n };\n\nconst PinInput = forwardRef<HTMLInputElement, PinInputProps>(\n (\n {\n density: propsDensity,\n elevation: propsElevation,\n segmentClassName: propsSegmentClassName,\n inputClassName,\n variant,\n ...props\n },\n forwardedRef,\n ) => {\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n\n const segmentClassName = useCallback(\n ({ focused, validationValence }: Parameters<Exclude<PinInputPrimitiveProps['segmentClassName'], undefined>>[0]) =>\n tx(\n 'input.input',\n 'input--pin-segment',\n {\n variant: 'static',\n focused,\n disabled: props.disabled,\n density,\n elevation,\n validationValence,\n },\n propsSegmentClassName,\n ),\n [tx, props.disabled, elevation, propsElevation, density],\n );\n return (\n <PinInputPrimitive\n {...{\n ...props,\n segmentClassName,\n ...(props.autoFocus && !hasIosKeyboard && { autoFocus: true }),\n }}\n inputClassName={tx('input.inputWithSegments', 'input input--pin', { disabled: props.disabled }, inputClassName)}\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 themeContextValue = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n const { validationValence } = useInputContext(INPUT_NAME, __inputScope);\n\n const { tx } = themeContextValue;\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 '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.input',\n 'input--text-area',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n validationValence,\n },\n '-mbe-labelSpacingBlock',\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 checked: propsChecked,\n defaultChecked: propsDefaultChecked,\n onCheckedChange: propsOnCheckedChange,\n size,\n classNames,\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', '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', 'input--checkbox__indicator', { 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 checked: propsChecked,\n defaultChecked: propsDefaultChecked,\n onCheckedChange: propsOnCheckedChange,\n classNames,\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 { 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', 'list', {}, 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 Root = asChild ? Slot : 'div';\n const density = useDensityContext();\n const { tx } = useThemeContext();\n return (\n <Root\n {...(!asChild && { role: 'none' })}\n {...props}\n className={tx('list.item.endcap', 'list__listItem__endcap', { density }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\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 (\n <div\n role='none'\n {...props}\n className={tx('list.item.openTrigger', 'list__listItem__openTrigger--mock', { density }, classNames)}\n />\n );\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', 'list__listItem__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', 'list__listItem__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', 'list__listItem__openTrigger__icon', {})}\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', 'list__listItem', { 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 'is-[--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-accentSurface before:content-[''] before:w-[--terminal-size] before:h-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface 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 'bs-[--line-thickness] left-[--horizontal-indent] right-0 bg-accentSurface before:left-[--negative-terminal-size]',\n child: 'is-full block-start-0 block-end-0 border-[length:--line-thickness] before:invisible',\n};\n\nconst instructionStyles: Record<InstructionType, HTMLAttributes<HTMLElement>['className']> = {\n 'reorder-above': 'block-start-[--line-offset] before:block-start-[--offset-terminal]',\n 'reorder-below': 'block-end-[--line-offset] before:block-end-[--offset-terminal]',\n 'make-child': 'border-accentSurface',\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:is-[--terminal-size] before:bs-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface 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 Root = 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 <Root\n role='treegrid'\n onKeyDown={handleKeyDown}\n {...props}\n className={tx('treegrid.root', 'treegrid', {}, classNames)}\n style={{ ...style, gridTemplateColumns }}\n ref={forwardedRef}\n >\n {children}\n </Root>\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 Root = 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 <Root\n role='row'\n aria-level={level}\n className={tx('treegrid.row', 'treegrid__row', { level }, classNames)}\n {...(parentOf && { 'aria-expanded': open, 'aria-owns': parentOf })}\n {...props}\n id={id}\n ref={forwardedRef}\n >\n {children}\n </Root>\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\n role='gridcell'\n className={tx('treegrid.cell', 'treegrid__cell', { indent }, classNames)}\n {...props}\n ref={forwardedRef}\n >\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 { log } from '@dxos/log';\nimport { useForwardedRef, useMediaQuery } from '@dxos/react-hooks';\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 NAVIGATION_SIDEBAR_NAME = 'NavigationSidebar';\nconst COMPLEMENTARY_SIDEBAR_NAME = 'ComplementarySidebar';\nconst GENERIC_CONSUMER_NAME = 'GenericConsumer';\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 onKeyDown: handleKeyDown,\n [landmarkAttr]: landmark,\n tabIndex: 0,\n ...focusableGroupAttrs,\n };\n};\n\ntype SidebarState = 'expanded' | 'collapsed' | 'closed';\n\ntype MainContextValue = {\n resizing: boolean;\n navigationSidebarState: SidebarState;\n setNavigationSidebarState: Dispatch<SetStateAction<SidebarState | undefined>>;\n complementarySidebarState: SidebarState;\n setComplementarySidebarState: Dispatch<SetStateAction<SidebarState | undefined>>;\n};\n\nconst [MainProvider, useMainContext] = createContext<MainContextValue>(MAIN_NAME, {\n resizing: false,\n navigationSidebarState: 'closed',\n setNavigationSidebarState: (_nextState) => {\n // TODO(burdon): Standardize with other context missing errors using raise.\n log.warn('Attempt to set sidebar state without initializing `MainRoot`');\n },\n complementarySidebarState: 'closed',\n setComplementarySidebarState: (_nextState) => {\n // TODO(burdon): Standardize with other context missing errors using raise.\n log.warn('Attempt to set sidebar state without initializing `MainRoot`');\n },\n});\n\nconst useSidebars = (consumerName = GENERIC_CONSUMER_NAME) => {\n const { setNavigationSidebarState, navigationSidebarState, setComplementarySidebarState, complementarySidebarState } =\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 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\ntype MainRootProps = PropsWithChildren<{\n navigationSidebarState?: SidebarState;\n defaultNavigationSidebarState?: SidebarState;\n onNavigationSidebarStateChange?: (nextState: SidebarState) => void;\n complementarySidebarState?: SidebarState;\n defaultComplementarySidebarState?: SidebarState;\n onComplementarySidebarStateChange?: (nextState: SidebarState) => void;\n}>;\n\nconst resizeDebounce = 3000;\n\nconst MainRoot = ({\n navigationSidebarState: propsNavigationSidebarState,\n defaultNavigationSidebarState,\n onNavigationSidebarStateChange,\n complementarySidebarState: propsComplementarySidebarState,\n defaultComplementarySidebarState,\n onComplementarySidebarStateChange,\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\n const handleResize = useCallback(() => {\n setResizing(true);\n if (resizeInterval.current) {\n clearTimeout(resizeInterval.current);\n }\n resizeInterval.current = setTimeout(() => {\n setResizing(false);\n resizeInterval.current = null;\n }, resizeDebounce);\n }, []);\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [handleResize]);\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\nconst handleOpenAutoFocus = (event: Event) => {\n !document.body.hasAttribute('data-is-keyboard') && event.preventDefault();\n};\n\ntype MainSidebarProps = ThemedClassName<ComponentPropsWithRef<typeof DialogContent>> & {\n swipeToDismiss?: boolean;\n state?: SidebarState;\n resizing?: boolean;\n onStateChange?: (nextState: SidebarState) => void;\n side: 'inline-start' | 'inline-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();\n const ref = useForwardedRef(forwardedRef);\n const noopRef = useRef(null);\n useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {\n onDismiss: () => onStateChange?.('closed'),\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 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 {...props}\n data-side={side === 'inline-end' ? 'ie' : 'is'}\n data-state={state}\n data-resizing={resizing ? 'true' : 'false'}\n className={tx('main.sidebar', 'main__sidebar', {}, classNames)}\n onKeyDownCapture={handleKeyDown}\n {...(state === 'closed' && { inert: true })}\n ref={ref}\n >\n {children}\n </Root>\n </DialogRoot>\n );\n },\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='inline-start'\n ref={forwardedRef}\n />\n );\n});\n\nMainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;\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='inline-end'\n ref={forwardedRef}\n />\n );\n});\n\nMainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;\n\ntype MainProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n asChild?: boolean;\n bounce?: boolean;\n handlesFocus?: boolean;\n};\n\nconst MainContent = forwardRef<HTMLDivElement, MainProps>(\n ({ asChild, classNames, bounce, handlesFocus, children, role, ...props }: MainProps, forwardedRef) => {\n const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);\n const { tx } = useThemeContext();\n const Root = asChild ? Slot : role ? 'div' : 'main';\n\n const mover = useLandmarkMover(props.onKeyDown, '1');\n\n return (\n <Root\n role={role}\n {...(handlesFocus && { ...mover })}\n {...props}\n data-sidebar-inline-start-state={navigationSidebarState}\n data-sidebar-inline-end-state={complementarySidebarState}\n data-handles-focus={handlesFocus}\n className={tx('main.content', 'main', { bounce, handlesFocus }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\n );\n },\n);\n\nMainContent.displayName = MAIN_NAME;\n\ntype MainOverlayProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.div>, 'children'>>;\n\nconst MainOverlay = forwardRef<HTMLDivElement, MainOverlayProps>(({ classNames, ...props }, forwardedRef) => {\n const [isLg] = useMediaQuery('lg');\n const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } =\n useMainContext(MAIN_NAME);\n const { tx } = useThemeContext();\n return (\n <div\n onClick={() => {\n setNavigationSidebarState('collapsed');\n setComplementarySidebarState('collapsed');\n }}\n {...props}\n className={tx(\n 'main.overlay',\n 'main__overlay',\n { isLg, inlineStartSidebarOpen: navigationSidebarState, inlineEndSidebarOpen: complementarySidebarState },\n classNames,\n )}\n data-state={navigationSidebarState === 'expanded' || complementarySidebarState === 'expanded' ? 'open' : 'closed'}\n aria-hidden='true'\n ref={forwardedRef}\n />\n );\n});\n\nexport const Main = {\n Root: MainRoot,\n Content: MainContent,\n Overlay: MainOverlay,\n NavigationSidebar: MainNavigationSidebar,\n ComplementarySidebar: MainComplementarySidebar,\n};\n\nexport { useMainContext, useSidebars, useLandmarkMover };\n\nexport type { MainRootProps, MainProps, MainOverlayProps, 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 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', 'menu', { 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 Root = asChild ? Slot : Primitive.div;\n return (\n <Root {...props} className={tx('menu.viewport', 'menu__viewport', {}, classNames)} ref={forwardedRef}>\n {children}\n </Root>\n );\n },\n);\n\ntype ContextMenuArrowProps = ThemedClassName<ContextMenuPrimitive.ContextMenuArrowProps>;\n\nconst ContextMenuArrow = forwardRef<SVGSVGElement, ContextMenuArrowProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ContextMenuPrimitive.Arrow\n {...props}\n className={tx('menu.arrow', 'menu__arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\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 (\n <ContextMenuPrimitive.Item\n {...props}\n className={tx('menu.item', 'menu__item', {}, classNames)}\n ref={forwardedRef}\n />\n );\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\n {...props}\n className={tx('menu.item', 'menu__item--checkbox', {}, classNames)}\n ref={forwardedRef}\n />\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\n {...props}\n className={tx('menu.separator', 'menu__item', {}, classNames)}\n ref={forwardedRef}\n />\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\n {...props}\n className={tx('menu.groupLabel', 'menu__group__label', {}, classNames)}\n ref={forwardedRef}\n />\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 Root = asChild ? Slot : Primitive.div;\n return (\n <Root {...props} className={tx('menu.viewport', 'menu__viewport', {}, classNames)} ref={forwardedRef}>\n {children}\n </Root>\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', 'menu', { 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', 'menu__group__label', {}, 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', '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', 'menu__item--checkbox', {}, 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', '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', 'menu__item', {}, 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', '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 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 Root = asChild ? Slot : Primitive.div;\n\n return (\n <MessageProvider {...{ titleId, descriptionId, valence }}>\n <Root\n role={valence === 'neutral' ? 'paragraph' : 'alert'}\n {...props}\n className={tx('message.root', 'message', { valence, elevation }, classNames)}\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n ref={forwardedRef}\n >\n {children}\n </Root>\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, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { titleId, valence } = useMessageContext(MESSAGE_TITLE_NAME);\n const Root = asChild ? Slot : Primitive.h2;\n\n return (\n <Root\n {...props}\n className={tx('message.title', 'message__title', {}, classNames)}\n id={titleId}\n ref={forwardedRef}\n >\n {!icon && valence === 'neutral' ? null : (\n <Icon\n size={5}\n icon={icon ?? messageIcons[valence]}\n classNames={tx('message.icon', 'message__icon', { valence })}\n />\n )}\n <span>{children}</span>\n </Root>\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 Root = asChild ? Slot : Primitive.p;\n return (\n <Root\n {...props}\n className={tx('message.content', 'message__content', {}, classNames)}\n id={descriptionId}\n ref={forwardedRef}\n >\n {children}\n </Root>\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 25 Oct 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 ElementRef,\n type FC,\n type MutableRefObject,\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: MutableRefObject<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 MutableRefObject<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 = ElementRef<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\nconst PopoverTrigger = forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n (props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const trigger = (\n <Primitive.button\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\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\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 // we make sure we're not trapping once it's been closed\n // (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'>,\n 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', 'popover', { 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', '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 Root = asChild ? Slot : Primitive.div;\n return (\n <Root\n {...props}\n className={tx('popover.viewport', 'popover__viewport', { constrainInline, constrainBlock }, classNames)}\n ref={forwardedRef}\n >\n {children}\n </Root>\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', 'status', { indeterminate, variant }, classNames)}\n ref={forwardedRef}\n >\n <span\n role='none'\n className={tx('status.bar', '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 2023 DXOS.org\n//\n\nimport {\n Corner as ScrollAreaPrimitiveCorner,\n type ScrollAreaCornerProps as ScrollAreaPrimitiveCornerProps,\n Root as ScrollAreaPrimitiveRoot,\n type ScrollAreaProps as ScrollAreaPrimitiveRootProps,\n Scrollbar as ScrollAreaPrimitiveScrollbar,\n type ScrollAreaScrollbarProps as ScrollAreaPrimitiveScrollbarProps,\n Thumb as ScrollAreaPrimitiveThumb,\n type ScrollAreaThumbProps as ScrollAreaPrimitiveThumbProps,\n Viewport as ScrollAreaPrimitiveViewport,\n type ScrollAreaViewportProps as ScrollAreaPrimitiveViewportProps,\n} from '@radix-ui/react-scroll-area';\nimport React, { type PropsWithChildren, forwardRef } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype ScrollAreaVariant = 'coarse' | 'fine';\n\n//\n// Root\n//\n\ntype ScrollAreaRootProps = ThemedClassName<ScrollAreaPrimitiveRootProps>;\n\nconst ScrollAreaRoot = forwardRef<HTMLDivElement, ScrollAreaRootProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveRoot\n {...props}\n className={tx('scrollArea.root', 'scroll-area', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// Viewport\n//\n\ntype ScrollAreaViewportProps = ThemedClassName<ScrollAreaPrimitiveViewportProps>;\n\nconst ScrollAreaViewport = forwardRef<HTMLDivElement, ScrollAreaViewportProps>(\n ({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveViewport\n {...props}\n className={tx('scrollArea.viewport', 'scroll-area', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// Scrollbar\n//\n\ntype ScrollAreaScrollbarProps = ThemedClassName<ScrollAreaPrimitiveScrollbarProps> & { variant?: ScrollAreaVariant };\n\nconst ScrollAreaScrollbar = forwardRef<HTMLDivElement, ScrollAreaScrollbarProps>(\n ({ classNames, variant = 'fine', ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveScrollbar\n data-variant={variant}\n {...props}\n className={tx('scrollArea.scrollbar', 'scroll-area__scrollbar', {}, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// Thumb\n//\n\ntype ScrollAreaThumbProps = ThemedClassName<ScrollAreaPrimitiveThumbProps>;\n\nconst ScrollAreaThumb = forwardRef<HTMLDivElement, ScrollAreaThumbProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveThumb\n {...props}\n className={tx('scrollArea.thumb', 'scroll-area__thumb', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// Corner\n//\n\ntype ScrollAreaCornerProps = ThemedClassName<ScrollAreaPrimitiveCornerProps>;\n\nconst ScrollAreaCorner = forwardRef<HTMLDivElement, ScrollAreaCornerProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ScrollAreaPrimitiveCorner\n {...props}\n className={tx('scrollArea.corner', 'scroll-area__corner', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\n//\n// Expander\n//\n\ntype ScrollAreaExpanderProps = ThemedClassName<PropsWithChildren>;\n\n/**\n * Size-locking wrapper required for inner ScrollArea to function correctly.\n * NOTE: Radix ScrollArea.Viewport applies `display: table` to its immediate child,\n * causing the content to participate in table layout and escape the intended fixed-size viewport.\n */\nconst ScrollAreaExpander = ({ classNames, children }: ScrollAreaExpanderProps) => {\n return (\n <div role='none' className={mx('relative bs-full is-full overflow-hidden', classNames)}>\n <div role='none' className='absolute inset-0 overflow-hidden'>\n {children}\n </div>\n </div>\n );\n};\n\n//\n// ScrollArea\n//\n\nexport const ScrollArea = {\n Root: ScrollAreaRoot,\n Viewport: ScrollAreaViewport,\n Scrollbar: ScrollAreaScrollbar,\n Thumb: ScrollAreaThumb,\n Corner: ScrollAreaCorner,\n Expander: ScrollAreaExpander,\n};\n\nexport type {\n ScrollAreaRootProps,\n ScrollAreaViewportProps,\n ScrollAreaScrollbarProps,\n ScrollAreaThumbProps,\n ScrollAreaCornerProps,\n ScrollAreaExpanderProps,\n};\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\n// TODO(burdon): Move these deps to @dxos/dom-util.\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';\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 flicker.\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 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 flex-1 min-bs-0 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 block-start-0 inset-inline-0 bs-24 is-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 <div className={mx('flex flex-col min-bs-0 overflow-y-auto scrollbar-thin', classNames)} ref={scrollerRef}>\n {children}\n </div>\n </div>\n </ScrollContainerProvider>\n );\n },\n);\n\nRoot.displayName = 'ScrollContainer.Root';\n\n//\n// Viewport\n//\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.displayName!);\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('is-full', classNames)} {...props} ref={contentRef}>\n {children}\n </div>\n );\n});\n\nViewport.displayName = 'ScrollContainer.Viewport';\n\n//\n// ScrollDownButton\n//\n\ntype ScrollDownButtonProps = ThemedClassName;\n\nconst ScrollDownButton = ({ classNames }: ScrollDownButtonProps) => {\n const { pinned, scrollToBottom } = useScrollContainerContext(ScrollDownButton.displayName!);\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 = 'ScrollContainer.ScrollDownButton';\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='is-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', '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', 'select__scroll-button--up', {}, 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', 'select__scroll-button--down', {}, 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\n {...props}\n className={tx('select.viewport', 'select__viewport', {}, classNames)}\n ref={forwardedRef}\n >\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', 'option', {}, 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', 'option__indicator', {}, 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', 'option', {}, classNames)} ref={forwardedRef}>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className='grow is-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 (\n <SelectPrimitive.Separator\n {...props}\n className={tx('select.separator', 'select__separator', {}, classNames)}\n ref={forwardedRef}\n />\n );\n});\n\ntype SelectArrowProps = ThemedClassName<SelectPrimitive.SelectArrowProps>;\n\nconst SelectArrow = forwardRef<SVGSVGElement, SelectArrowProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SelectPrimitive.Arrow\n {...props}\n className={tx('select.arrow', 'select__arrow', {}, classNames)}\n ref={forwardedRef}\n />\n );\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 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', 'separator', { orientation, subdued }, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\nexport type { SeparatorProps };\n\nexport { Separator };\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 Root = asChild ? Slot : Primitive.span;\n return (\n <Root\n {...props}\n className={tx('tag.root', 'dx-tag', { palette }, classNames)}\n data-hue={palette}\n ref={forwardedRef}\n />\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 (\n <ToastViewportPrimitive className={tx('toast.viewport', 'toast-viewport', {}, classNames)} ref={forwardedRef} />\n );\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', 'toast', {}, 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 Root = asChild ? Slot : Primitive.div;\n return <Root {...props} className={tx('toast.body', '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 Root = asChild ? Slot : ToastTitlePrimitive;\n return <Root {...props} className={tx('toast.title', '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 Root = asChild ? Slot : ToastDescriptionPrimitive;\n return (\n <Root {...props} className={tx('toast.description', 'toast__description', {}, classNames)} ref={forwardedRef} />\n );\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 Root = asChild ? Slot : Primitive.div;\n return <Root {...props} className={tx('toast.actions', '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", "//\n// Copyright 2023 DXOS.org\n//\n\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';\n\nimport { useThemeContext } from '../../hooks';\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 { Separator, type SeparatorProps } from '../Separator';\n\ntype ToolbarRootProps = ThemedClassName<\n ToolbarPrimitive.ToolbarProps & {\n disabled?: boolean;\n layoutManaged?: boolean; // TODO(burdon): Replace with Toolbar.Content to allow inner layout management?\n textBlockWidth?: boolean;\n }\n>;\n\n// TODO(burdon): Implement asChild.\nconst ToolbarRoot = forwardRef<HTMLDivElement, ToolbarRootProps>(\n ({ classNames, children, disabled, layoutManaged, textBlockWidth: textBlockWidthProp, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const InnerRoot = textBlockWidthProp ? 'div' : Fragment;\n const innerRootProps = textBlockWidthProp\n ? {\n role: 'none',\n className: tx('toolbar.inner', 'toolbar', { 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', 'toolbar', { layoutManaged, disabled }, classNames)}\n ref={forwardedRef}\n >\n <InnerRoot {...innerRootProps}>{children}</InnerRoot>\n </ToolbarPrimitive.Root>\n );\n },\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\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\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\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\ntype ToolbarSeparatorProps = SeparatorProps & { variant?: 'gap' | 'line' };\n\nconst ToolbarSeparator = forwardRef<HTMLDivElement, ToolbarSeparatorProps>(\n ({ variant = 'line', ...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\nexport const Toolbar = {\n Root: ToolbarRoot,\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};\n\nexport type {\n ToolbarRootProps,\n ToolbarButtonProps,\n ToolbarIconButtonProps,\n ToolbarLinkProps,\n ToolbarToggleProps,\n ToolbarToggleGroupProps,\n ToolbarToggleGroupItemProps,\n ToolbarToggleGroupIconItemProps,\n ToolbarSeparatorProps,\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAKA,SAASA,aAAa;AAEtB,cAAc;AACd,cAAc;;;ACJd,SAASC,iBAAiB;AAC1B,SAASC,YAAY;AACrB,OAAOC,SAAqCC,kBAAkB;;;ACF9D,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,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AAO2B,YAAY,SACjB,gBAAAnB,QAAA,cAAkB2B,4BAAS;IAACpB,SAAAA;KAC1B,gBAAAP,QAAA,cAAC2B,YAAAA;IAAW,GAAGpC;IAAOa,KAAKZ;QAG7B,gBAAAQ,QAAA,cAAkB2B,4BAAS;IAAC5B,WAAU;IAAOK,KAAKZ;;AAEtD,CAAA;AAGK,IAAMoC,UAAU;EACrB3B,MAAMlB;EACNuB,QAAQD;EACRI,YAAYD;EACZM,MAAMD;EACND,QAAQD;EACRkB,aAAad;EACbe,iBAAiBZ;EACjBa,qBAAqBT;EACrBK,WAAWD;AACb;",
|
|
6
|
-
"names": ["Trans", "Primitive", "Slot", "React", "forwardRef", "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", "AnchoredOverflowRoot", "forwardRef", "asChild", "classNames", "children", "props", "forwardedRef", "tx", "useThemeContext", "Root", "Slot", "Primitive", "div", "role", "className", "ref", "AnchoredOverflowAnchor", "AnchoredOverflow", "Anchor", "createContext", "Primitive", "Slot", "React", "forwardRef", "DxAvatar", "useId", "mx", "AVATAR_NAME", "AvatarProvider", "useAvatarContext", "createContext", "AvatarRoot", "children", "labelId", "propsLabelId", "descriptionId", "propsDescriptionId", "useId", "React", "AvatarContent", "forwardRef", "icon", "classNames", "props", "forwardedRef", "href", "useIconHref", "DxAvatar", "aria-labelledby", "aria-describedby", "rootClassName", "mx", "ref", "AvatarLabel", "asChild", "srOnly", "Root", "Slot", "Primitive", "span", "tx", "useThemeContext", "id", "className", "AvatarDescription", "Avatar", "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", "Root", "Slot", "Primitive", "a", "React", "className", "ref", "BreadcrumbRoot", "forwardRef", "asChild", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Root", "Slot", "Primitive", "div", "React", "role", "className", "ref", "BreadcrumbList", "ol", "BreadcrumbListItem", "li", "BreadcrumbLink", "Link", "BreadcrumbCurrent", "aria-current", "BreadcrumbSeparator", "children", "span", "aria-hidden", "Icon", "icon", "Breadcrumb", "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", "Root", "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", "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", "isLabel", "toLocalizedString", "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", "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", "className", "ref", "data-block-align", "inOverlayLayout", "displayName", "DIALOG_CONTENT_NAME", "DialogContent", "size", "propsInOverlayLayout", "DialogContentPrimitive", "aria-describedby", "undefined", "DialogHeader", "srOnly", "div", "role", "DialogTitle", "DialogTitlePrimitive", "DialogDescription", "DialogDescriptionPrimitive", "DialogClose", "DialogClosePrimitive", "DialogCloseIconButton", "t", "useTranslation", "osTranslations", "IconButton", "label", "icon", "iconOnly", "density", "variant", "Dialog", "Root", "Trigger", "Portal", "Overlay", "Content", "Header", "Title", "Description", "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", "OverlayLayoutProvider", "useOverlayLayoutContext", "createContext", "inOverlayLayout", "AlertDialogOverlay", "children", "blockAlign", "AlertDialogOverlayPrimitive", "data-block-align", "displayName", "AlertDialogContent", "AlertDialogContentPrimitive", "AlertDialog", "Root", "Trigger", "Portal", "Overlay", "Content", "Title", "Description", "Cancel", "Action", "Root", "CheckboxPrimitive", "useControllableState", "React", "forwardRef", "useCallback", "DescriptionAndValidation", "DescriptionAndValidationPrimitive", "Description", "DescriptionPrimitive", "INPUT_NAME", "InputRoot", "Label", "LabelPrimitive", "PinInput", "PinInputPrimitive", "TextArea", "TextAreaPrimitive", "TextInput", "TextInputPrimitive", "Validation", "ValidationPrimitive", "useInputContext", "mx", "Label", "forwardRef", "srOnly", "classNames", "children", "props", "forwardedRef", "tx", "useThemeContext", "React", "LabelPrimitive", "className", "ref", "Description", "DescriptionPrimitive", "Validation", "__inputScope", "validationValence", "useInputContext", "INPUT_NAME", "ValidationPrimitive", "DescriptionAndValidation", "DescriptionAndValidationPrimitive", "PinInput", "density", "propsDensity", "elevation", "propsElevation", "segmentClassName", "propsSegmentClassName", "inputClassName", "variant", "hasIosKeyboard", "useDensityContext", "useElevationContext", "useCallback", "focused", "disabled", "PinInputPrimitive", "autoFocus", "TextInput", "noAutoFill", "themeContextValue", "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", "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", "Root", "Slot", "role", "MockListItemOpenTrigger", "div", "ListItemHeading", "ListPrimitiveItemHeading", "ListItemOpenTrigger", "__listItemScope", "open", "useListItemContext", "LIST_ITEM_NAME", "ListPrimitiveItemOpenTrigger", "Icon", "size", "icon", "ListItemRoot", "ListPrimitiveItem", "collapsible", "ListItem", "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", "Root", "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", "Row", "Cell", "useFocusableGroup", "createContext", "DialogContent", "Root", "DialogRoot", "DialogTitle", "Primitive", "Slot", "useControllableState", "React", "forwardRef", "useCallback", "useEffect", "useRef", "useState", "log", "useForwardedRef", "useMediaQuery", "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", "NAVIGATION_SIDEBAR_NAME", "COMPLEMENTARY_SIDEBAR_NAME", "GENERIC_CONSUMER_NAME", "landmarkAttr", "useLandmarkMover", "propsOnKeyDown", "landmark", "handleKeyDown", "useCallback", "event", "target", "currentTarget", "key", "hasAttribute", "preventDefault", "landmarks", "Array", "from", "document", "querySelectorAll", "map", "el", "parseInt", "getAttribute", "NaN", "sort", "l", "length", "cursor", "indexOf", "nextLandmark", "getModifierState", "querySelector", "focus", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "ignoreDefaultKeydown", "Tab", "onKeyDown", "tabIndex", "MainProvider", "useMainContext", "createContext", "resizing", "navigationSidebarState", "setNavigationSidebarState", "_nextState", "log", "warn", "complementarySidebarState", "setComplementarySidebarState", "useSidebars", "consumerName", "toggleNavigationSidebar", "openNavigationSidebar", "collapseNavigationSidebar", "closeNavigationSidebar", "toggleComplementarySidebar", "openComplementarySidebar", "collapseComplementarySidebar", "closeComplementarySidebar", "resizeDebounce", "MainRoot", "propsNavigationSidebarState", "defaultNavigationSidebarState", "onNavigationSidebarStateChange", "propsComplementarySidebarState", "defaultComplementarySidebarState", "onComplementarySidebarStateChange", "children", "props", "isLg", "useMediaQuery", "useControllableState", "prop", "defaultProp", "onChange", "setResizing", "useState", "resizeInterval", "useRef", "handleResize", "current", "clearTimeout", "setTimeout", "useEffect", "window", "addEventListener", "removeEventListener", "React", "displayName", "handleOpenAutoFocus", "body", "MainSidebar", "forwardRef", "classNames", "swipeToDismiss", "onOpenAutoFocus", "state", "onStateChange", "side", "label", "forwardedRef", "tx", "useThemeContext", "t", "useTranslation", "ref", "useForwardedRef", "noopRef", "useSwipeToDismiss", "onDismiss", "focusGroupParent", "closest", "stopPropagation", "Root", "Primitive", "div", "DialogContent", "DialogRoot", "open", "aria-label", "toLocalizedString", "modal", "DialogTitle", "className", "forceMount", "data-side", "data-state", "data-resizing", "onKeyDownCapture", "inert", "MainNavigationSidebar", "mover", "MainComplementarySidebar", "MainContent", "asChild", "bounce", "handlesFocus", "role", "Slot", "data-sidebar-inline-start-state", "data-sidebar-inline-end-state", "data-handles-focus", "MainOverlay", "onClick", "inlineStartSidebarOpen", "inlineEndSidebarOpen", "aria-hidden", "Main", "Content", "Overlay", "NavigationSidebar", "ComplementarySidebar", "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", "Root", "Slot", "Primitive", "div", "ContextMenuArrow", "Arrow", "ContextMenuGroup", "Group", "ContextMenuItemIndicator", "ItemIndicator", "ContextMenuItem", "Item", "ContextMenuCheckboxItem", "CheckboxItem", "ContextMenuSeparator", "Separator", "ContextMenuGroupLabel", "Label", "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", "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", "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", "Root", "Slot", "Primitive", "div", "React", "role", "className", "aria-labelledby", "aria-describedby", "ref", "displayName", "MESSAGE_TITLE_NAME", "MessageTitle", "icon", "h2", "id", "Icon", "size", "span", "MESSAGE_CONTENT_NAME", "MessageContent", "p", "Message", "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", "triggerProps", "composedTriggerRef", "useComposedRefs", "trigger", "Primitive", "button", "type", "aria-haspopup", "aria-expanded", "aria-controls", "data-state", "getState", "onClick", "composeEventHandlers", "asChild", "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", "Slot", "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", "Corner", "ScrollAreaPrimitiveCorner", "Root", "ScrollAreaPrimitiveRoot", "Scrollbar", "ScrollAreaPrimitiveScrollbar", "Thumb", "ScrollAreaPrimitiveThumb", "Viewport", "ScrollAreaPrimitiveViewport", "React", "forwardRef", "mx", "ScrollAreaRoot", "forwardRef", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "React", "ScrollAreaPrimitiveRoot", "className", "ref", "ScrollAreaViewport", "ScrollAreaPrimitiveViewport", "ScrollAreaScrollbar", "variant", "ScrollAreaPrimitiveScrollbar", "data-variant", "ScrollAreaThumb", "ScrollAreaPrimitiveThumb", "ScrollAreaCorner", "ScrollAreaPrimitiveCorner", "ScrollAreaExpander", "children", "div", "role", "mx", "ScrollArea", "Root", "Viewport", "Scrollbar", "Thumb", "Corner", "Expander", "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", "ref", "displayName", "Viewport", "props", "contentRef", "useForwardedRef", "resizeObserver", "ResizeObserver", "observe", "disconnect", "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", "Separator", "SeparatorPrimitive", "React", "forwardRef", "Separator", "forwardRef", "classNames", "orientation", "subdued", "props", "forwardedRef", "tx", "useThemeContext", "React", "SeparatorPrimitive", "className", "ref", "Primitive", "Slot", "React", "forwardRef", "Tag", "forwardRef", "asChild", "palette", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "Root", "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", "Root", "Slot", "Primitive", "div", "ToastTitle", "ToastTitlePrimitive", "ToastDescription", "ToastDescriptionPrimitive", "ToastActions", "ToastAction", "ToastActionPrimitive", "ToastClose", "ToastClosePrimitive", "Toast", "Provider", "Viewport", "Body", "Title", "Description", "Actions", "Action", "Close", "ToolbarPrimitive", "React", "Fragment", "forwardRef", "ToolbarRoot", "forwardRef", "classNames", "children", "disabled", "layoutManaged", "textBlockWidth", "textBlockWidthProp", "props", "forwardedRef", "tx", "useThemeContext", "InnerRoot", "Fragment", "innerRootProps", "role", "className", "React", "Root", "data-arrow-keys", "orientation", "ref", "ToolbarButton", "Button", "asChild", "ToolbarIconButton", "IconButton", "noTooltip", "ToolbarToggle", "Toggle", "ToolbarLink", "Link", "ToolbarToggleGroup", "elevation", "ButtonGroup", "ToolbarToggleGroupItem", "variant", "density", "ToolbarToggleItem", "ToolbarToggleGroupIconItem", "icon", "label", "iconOnly", "ToolbarSeparator", "Separator", "Toolbar", "ToggleGroup", "ToggleGroupItem", "ToggleGroupIconItem"]
|
|
3
|
+
"sources": ["../../../src/index.ts", "../../../src/components/ThemeProvider/index.ts", "../../../src/hooks/useDensityContext.ts", "../../../src/hooks/useIconHref.ts", "../../../src/hooks/useSafeCollisionPadding.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/Container/Container.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/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/ThrowError.tsx", "../../../src/components/Focus/Focus.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 = (densityProp?: Density): Density | undefined => {\n const { density } = useContext(DensityContext);\n return densityProp ?? 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 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 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\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 { 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 '@dxos/lit-ui/dx-avatar.pcss';\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\n/**\n * The Icon's size can be set directly or inherited from the `--dx-icon-size` CSS variable.\n */\nexport const Icon = memo(\n forwardRef<SVGSVGElement, IconProps>(({ icon, classNames, size, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const href = useIconHref(icon);\n\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\ntype ButtonProps = 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 { classNames, children, density: densityProp, elevation: elevationProp, variant = 'default', asChild, ...props },\n ref,\n ) => {\n const { inGroup } = useButtonGroupContext(BUTTON_NAME);\n const { tx } = useThemeContext();\n const elevation = useElevationContext(elevationProp);\n const density = useDensityContext(densityProp);\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';\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\nconst LabelledIconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n { size, 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 * as TogglePrimitive from '@radix-ui/react-toggle';\nimport React, { forwardRef } from 'react';\n\nimport { Button, type ButtonProps } from './Button';\n\ntype ToggleProps = Omit<TogglePrimitive.ToggleProps, 'asChild'> & ButtonProps;\n\nconst Toggle = forwardRef<HTMLButtonElement, ToggleProps>(\n ({ defaultPressed, pressed, onPressedChange, ...props }, forwardedRef) => {\n return (\n <TogglePrimitive.Root {...{ defaultPressed, pressed, onPressedChange }} asChild>\n <Button {...props} ref={forwardedRef} />\n </TogglePrimitive.Root>\n );\n },\n);\n\nexport { Toggle };\nexport type { ToggleProps };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as ToggleGroupPrimitive 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 =\n | Omit<ToggleGroupPrimitive.ToggleGroupSingleProps, 'className'>\n | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps, 'className'>;\n\nconst ToggleGroup = forwardRef<HTMLDivElement, ToggleGroupProps & ButtonGroupProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n return (\n <ToggleGroupPrimitive.Root {...props} asChild>\n <ButtonGroup {...{ classNames, children }} ref={forwardedRef} />\n </ToggleGroupPrimitive.Root>\n );\n },\n);\n\ntype ToggleGroupItemProps = Omit<ToggleGroupPrimitive.ToggleGroupItemProps, 'className'> & ButtonProps;\n\nconst ToggleGroupItem = forwardRef<HTMLButtonElement, ToggleGroupItemProps>(\n ({ variant, elevation, density, classNames, children, ...props }, forwardedRef) => {\n return (\n <ToggleGroupPrimitive.Item {...props} asChild>\n <Button {...{ variant, elevation, density, classNames, children }} ref={forwardedRef} />\n </ToggleGroupPrimitive.Item>\n );\n },\n);\n\ntype ToggleGroupIconItemProps = Omit<ToggleGroupPrimitive.ToggleGroupItemProps, 'className'> & IconButtonProps;\n\nconst ToggleGroupIconItem = forwardRef<HTMLButtonElement, ToggleGroupIconItemProps>(\n ({ variant, label, icon, size, elevation, density, classNames, ...props }, forwardedRef) => {\n return (\n <ToggleGroupPrimitive.Item {...props} asChild>\n <IconButton {...{ variant, elevation, density, classNames, label, icon, size }} ref={forwardedRef} />\n </ToggleGroupPrimitive.Item>\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 DOMPurify from 'dompurify';\nimport React, {\n CSSProperties,\n MouseEventHandler,\n type PropsWithChildren,\n createContext,\n forwardRef,\n useContext,\n useMemo,\n} from 'react';\n\nimport { composable, composableProps, iconSize, mx, slottable } from '@dxos/ui-theme';\nimport { type Density } 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 {\n Toolbar,\n ToolbarCloseIconButtonProps,\n ToolbarDragHandleProps,\n type ToolbarMenuItem,\n type ToolbarMenuProps,\n type ToolbarRootProps,\n} from '../Toolbar';\n\n//\n// Context\n//\n\nconst CARD_NAME = 'Card';\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\nconst CARD_ROOT_NAME = 'Card.Root';\n\ntype CardRootOwnProps = {\n id?: string;\n border?: boolean;\n fullWidth?: boolean;\n density?: Density;\n style?: CSSProperties;\n tabIndex?: number;\n onClick?: MouseEventHandler<HTMLDivElement>;\n 'data-selected'?: boolean;\n 'data-testid'?: string;\n};\n\ntype CardRootProps = CardRootOwnProps;\n\nconst CardRoot = slottable<HTMLDivElement, CardRootOwnProps>(\n ({ children, id, asChild, role, border = true, fullWidth, density, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n\n return (\n <Comp\n {...rest}\n {...(id && { 'data-object-id': id })}\n role={role ?? 'group'}\n className={tx('card.root', { border, fullWidth }, className)}\n ref={forwardedRef}\n >\n <Column.Root gutter={density === 'coarse' ? 'lg' : 'md'}>{children}</Column.Root>\n </Comp>\n );\n },\n);\n\nCardRoot.displayName = CARD_ROOT_NAME;\n\n//\n// Toolbar\n//\n\nconst CARD_TOOLBAR_NAME = 'Card.Toolbar';\n\ntype CardToolbarProps = ToolbarRootProps;\n\nconst CardToolbar = composable<HTMLDivElement, CardToolbarProps>(({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n\n return (\n <Toolbar.Root {...props} style={iconSize(5)} classNames={[tx('card.toolbar', {}), classNames]} ref={forwardedRef}>\n {children}\n </Toolbar.Root>\n );\n});\n\nCardToolbar.displayName = CARD_TOOLBAR_NAME;\n\n//\n// DragHandle\n//\n\nconst CARD_DRAG_HANDLE_NAME = 'Card.DragHandle';\n\ntype CardDragHandleProps = ToolbarDragHandleProps;\n\nconst CardDragHandle = forwardRef<HTMLButtonElement, CardDragHandleProps>((props, forwardedRef) => {\n return (\n <CardIconBlock padding>\n <Toolbar.DragHandle {...props} ref={forwardedRef} />\n </CardIconBlock>\n );\n});\n\nCardDragHandle.displayName = CARD_DRAG_HANDLE_NAME;\n\n//\n// CloseIconButton\n//\n\nconst CARD_CLOSE_ICON_BUTTON_NAME = 'Card.CloseIconButton';\n\ntype CloseIconButtonProps = ToolbarCloseIconButtonProps;\n\nconst CloseIconButton = forwardRef<HTMLButtonElement, CloseIconButtonProps>((props, forwardedRef) => {\n return (\n <CardIconBlock padding>\n <Toolbar.CloseIconButton {...props} ref={forwardedRef} />\n </CardIconBlock>\n );\n});\n\nCloseIconButton.displayName = CARD_CLOSE_ICON_BUTTON_NAME;\n\n//\n// Menu\n//\n\nconst CARD_MENU_NAME = 'Card.Menu';\n\ntype CardMenuItem<T extends any | void = void> = ToolbarMenuItem<T>;\n\ntype CardMenuProps<T extends any | void = void> = ToolbarMenuProps<T>;\n\nconst CardMenu = <T extends any | void = void>({ context, items, ...props }: CardMenuProps<T>) => {\n const { menuItems } = useContext(CardContext) ?? {};\n const combinedItems = [...(items ?? []), ...((menuItems as CardMenuItem<T>[]) ?? [])];\n\n return (\n <CardIconBlock padding>\n <Toolbar.Menu {...props} context={context} items={combinedItems} />\n </CardIconBlock>\n );\n};\n\n(CardMenu as any).displayName = CARD_MENU_NAME;\n\n//\n// Icon\n//\n\nconst CARD_ICON_NAME = 'Card.Icon';\n\nconst CardIcon = (props: IconProps) => {\n return (\n <CardIconBlock>\n <Icon {...props} />\n </CardIconBlock>\n );\n};\n\n(CardIcon as any).displayName = CARD_ICON_NAME;\n\n//\n// IconBlock\n//\n\nconst CARD_ICON_BLOCK_NAME = 'Card.IconBlock';\n\nconst CardIconBlock = forwardRef<HTMLDivElement, ThemedClassName<PropsWithChildren<{ padding?: boolean }>>>(\n ({ classNames, children, padding, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n\n return (\n <div {...props} role='none' className={tx('card.icon-block', { padding }, classNames)} ref={forwardedRef}>\n {children}\n </div>\n );\n },\n);\n\nCardIconBlock.displayName = CARD_ICON_BLOCK_NAME;\n\n//\n// Title\n//\n\nconst CARD_TITLE_NAME = 'Card.Title';\n\nconst CardTitle = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { className, ...rest } = composableProps(props, { role: 'heading' });\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp {...rest} className={tx('card.title', {}, className)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n});\n\nCardTitle.displayName = CARD_TITLE_NAME;\n\n//\n// Content\n//\n\nconst CARD_CONTENT_NAME = 'Card.Content';\n\nconst CardContent = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n\n return (\n <Comp {...rest} className={tx('card.content', {}, className)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n});\n\nCardContent.displayName = CARD_CONTENT_NAME;\n\n//\n// Row\n//\n\nconst CARD_ROW_NAME = 'Card.Row';\n\ntype CardRowProps = { icon?: string; fullWidth?: boolean };\n\nconst CardRow = composable<HTMLDivElement, CardRowProps>(({ children, icon, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const { tx } = useThemeContext();\n\n return (\n <Column.Row {...rest} className={tx('card.row', {}, className)} ref={forwardedRef}>\n {(icon && <CardIcon classNames='text-subdued' icon={icon} size={4} />) || <div />}\n {children}\n </Column.Row>\n );\n});\n\nCardRow.displayName = CARD_ROW_NAME;\n\n//\n// Section\n//\n\nconst CARD_SECTION_NAME = 'Card.Section';\n\n/**\n * @deprecated Merge with Card.Row fullWidth\n */\nconst CardSection = slottable<HTMLDivElement>(({ children, asChild, role, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp {...rest} role={role ?? 'none'} className={mx('col-span-full', className)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n});\n\nCardSection.displayName = CARD_SECTION_NAME;\n\n//\n// Heading\n//\n\nconst CARD_HEADING_NAME = 'Card.Heading';\n\ntype CardHeadingProps = { variant?: 'default' | 'subtitle' };\n\n/**\n * @deprecated Use typography.\n */\nconst CardHeading = slottable<HTMLDivElement, CardHeadingProps>(\n ({ children, asChild, role, variant = 'default', ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n\n return (\n <Comp\n {...rest}\n role={role ?? 'heading'}\n className={tx('card.heading', { variant }, className)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\nCardHeading.displayName = CARD_HEADING_NAME;\n\n//\n// Text\n//\n\nconst CARD_TEXT_NAME = 'Card.Text';\n\ntype CardTextProps = { truncate?: boolean; variant?: 'default' | 'description' };\n\nconst CardText = slottable<HTMLDivElement, CardTextProps>(\n ({ children, asChild, role, truncate, variant = 'default', ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n\n return (\n <Comp {...rest} role={role ?? 'none'} className={tx('card.text', { variant }, className)} ref={forwardedRef}>\n <span className={tx('card.text-span', { variant, truncate })}>{children}</span>\n </Comp>\n );\n },\n);\n\nCardText.displayName = CARD_TEXT_NAME;\n\n//\n// Html\n//\n\nconst CARD_HTML_NAME = 'Card.Html';\n\ntype CardHtmlProps = { html: string; variant?: 'default' | 'description' };\n\n/**\n * Renders sanitized HTML content inside a card text slot.\n * Uses DOMPurify to prevent XSS from untrusted markup (e.g. RSS feed content).\n */\nconst CardHtml = ({ html, variant = 'default', ...props }: CardHtmlProps & ThemedClassName<object>) => {\n const { tx } = useThemeContext();\n const sanitized = useMemo(() => DOMPurify.sanitize(html), [html]);\n\n return (\n <div\n {...props}\n role='none'\n className={tx('card.text', { variant })}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: sanitized }}\n />\n );\n};\n\n(CardHtml as any).displayName = CARD_HTML_NAME;\n\n//\n// Poster\n//\n\nconst CARD_POSTER_NAME = 'Card.Poster';\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\n if (props.image) {\n return (\n <div role='none' className='col-span-full'>\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(CardPoster as any).displayName = CARD_POSTER_NAME;\n\n//\n// Action\n//\n\nconst CARD_ACTION_NAME = 'Card.Action';\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} size={4} /> : <div />}\n <span className={tx('card.action-label', {}, !actionIcon ? 'col-span-2' : undefined)}>{label}</span>\n {actionIcon && <CardIcon icon={actionIcon} size={4} />}\n </Button>\n );\n};\n\n(CardAction as any).displayName = CARD_ACTION_NAME;\n\n//\n// Link\n//\n\nconst CARD_LINK_NAME = 'Card.Link';\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(CardLink as any).displayName = CARD_LINK_NAME;\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\n // Toolbar blocks\n IconBlock: CardIconBlock,\n DragHandle: CardDragHandle,\n CloseIconButton: CloseIconButton,\n Menu: CardMenu,\n Icon: CardIcon,\n Title: CardTitle,\n\n // Content\n Content: CardContent,\n Row: CardRow,\n Section: CardSection,\n Heading: CardHeading,\n Text: CardText,\n Html: CardHtml,\n Poster: CardPoster,\n Action: CardAction,\n Link: CardLink,\n};\n\nexport type {\n CardContextValue,\n CardRootProps,\n CardToolbarProps,\n CardDragHandleProps,\n CloseIconButtonProps,\n CardMenuProps,\n};\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 } from 'react';\n\nimport { type ColumnStyleProps, composableProps, slottable } from '@dxos/ui-theme';\nimport { type SlottableProps } from '@dxos/ui-types';\n\nimport { ScrollArea, type ScrollAreaRootProps } from '../../components';\nimport { useThemeContext } from '../../hooks';\n\n//\n// Root\n//\n\nconst COLUMN_ROOT_NAME = 'Column.Root';\n\ntype GutterSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst gutterSizes: Record<GutterSize, string> = {\n xs: 'var(--dx-gutter-xs)',\n sm: 'var(--dx-gutter-sm)',\n md: 'var(--dx-gutter-md)',\n lg: 'var(--dx-gutter-lg)',\n};\n\ntype ColumnRootProps = { gutter?: GutterSize };\n\n/**\n * Creates a 3-column CSS grid with left/right gutter columns and a center content column.\n * Sets the `--gutter` CSS variable for nested components.\n *\n * Direct children participate in the grid in one of three ways:\n * - **Column.Row** — 3-col subgrid row (icons in gutters, content in center).\n * - **Column.Content** — spans full width; re-applies gutters as `px-[var(--gutter)]` padding.\n * Sets `--gutter-offset` so nested ScrollAreas can break out of the padding.\n * - **Column.Viewport** — spans full width; delegates gutters to ScrollArea.\n *\n * Gutter sizes: `'sm'` for compact layouts (Dialog); `'md'` (default); `'lg'` for wider spacing.\n */\nconst ColumnRoot = slottable<HTMLDivElement, ColumnRootProps>(\n ({ children, asChild, role, gutter = 'md', ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n const gutterSize = gutterSizes[gutter];\n return (\n <Comp\n {...rest}\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)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\nColumnRoot.displayName = COLUMN_ROOT_NAME;\n\n//\n// Row\n//\n\nconst COLUMN_ROW_NAME = 'Column.Row';\n\ntype ColumnRowProps = ColumnStyleProps;\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 ColumnRow = slottable<HTMLDivElement, ColumnRowProps>(\n ({ children, asChild, role, fullWidth, center, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n return (\n <Comp\n {...rest}\n role={role ?? 'none'}\n className={tx('column.row', { fullWidth, center }, className)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\nColumnRow.displayName = COLUMN_ROW_NAME;\n\n//\n// Content\n//\n\nconst COLUMN_CONTENT_NAME = 'Column.Content';\n\ntype ColumnContentProps = SlottableProps;\n\n/**\n * Full-width content area that inherits Column.Root's 3-column grid via CSS subgrid.\n * Non-scrolling children default to the center column (between gutters).\n * ScrollArea children span all 3 columns via `[.dx-column_&]:col-span-full`.\n */\nconst ColumnContent = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp {...rest} className={tx('column.content', {}, className)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n});\n\nColumnContent.displayName = COLUMN_CONTENT_NAME;\n\n//\n// Viewport\n//\n\nconst COLUMN_VIEWPORT_NAME = 'Column.Viewport';\n\ntype ColumnViewportProps = Pick<ScrollAreaRootProps, 'thin'>;\n\nconst ColumnViewport = slottable<HTMLDivElement, ColumnViewportProps>(\n ({ children, asChild, role, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { className, ...rest } = composableProps(props);\n return (\n <ScrollArea.Root\n {...rest}\n className={tx('column.viewport', {}, className)}\n orientation='vertical'\n padding\n ref={forwardedRef}\n >\n <ScrollArea.Viewport>{children}</ScrollArea.Viewport>\n </ScrollArea.Root>\n );\n },\n);\n\nColumnViewport.displayName = COLUMN_VIEWPORT_NAME;\n\n//\n// Column\n//\n\nexport const Column = {\n Root: ColumnRoot,\n Content: ColumnContent,\n Viewport: ColumnViewport,\n Row: ColumnRow,\n};\n\nexport type { ColumnRootProps, ColumnContentProps, ColumnViewportProps, ColumnRowProps };\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React from 'react';\n\nimport { composableProps, mx, slottable } from '@dxos/ui-theme';\n\nexport const Container = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps<HTMLDivElement>(props);\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp {...rest} className={mx('dx-container', className)} ref={forwardedRef}>\n {children}\n </Comp>\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 from 'react';\n\nimport { composableProps, mx, slottable } from '@dxos/ui-theme';\n\nexport type FlexProps = { column?: boolean; grow?: boolean };\n\nexport const Flex = slottable<HTMLDivElement, FlexProps>(\n ({ children, asChild, column, grow, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n return (\n <Comp\n ref={forwardedRef}\n {...rest}\n className={mx('flex', column && 'flex-col', grow && 'flex-1 overflow-hidden', className)}\n >\n {children}\n </Comp>\n );\n },\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport React from 'react';\n\nimport { composable, composableProps, mx } from '@dxos/ui-theme';\n\nexport type GridProps = { cols?: number; rows?: number; grow?: boolean };\n\nexport const Grid = composable<HTMLDivElement, GridProps>(\n ({ children, style, role, cols, rows, grow = true, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n return (\n <div\n ref={forwardedRef}\n {...rest}\n role={role ?? 'none'}\n className={mx('grid overflow-hidden', grow && 'dx-container', className)}\n style={{\n gridTemplateColumns: cols ? `repeat(${cols}, 1fr)` : undefined,\n gridTemplateRows: rows ? `repeat(${rows}, 1fr)` : undefined,\n ...style,\n }}\n >\n {children}\n </div>\n );\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, { type CSSProperties } from 'react';\n\nimport { composableProps, PanelStyleProps, slottable } from '@dxos/ui-theme';\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<{ style?: CSSProperties }>;\n\nconst PanelRoot = slottable<HTMLDivElement, { style?: CSSProperties }>(\n ({ children, asChild, role, style, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n return (\n <Comp\n {...rest}\n role={role ?? 'none'}\n style={{\n gridTemplateRows: GRID_TEMPLATE_ROWS,\n gridTemplateAreas: GRID_TEMPLATE_AREAS,\n ...style,\n }}\n className={tx('panel.root', {}, className)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\nPanelRoot.displayName = 'Panel.Root';\n\n//\n// Toolbar\n//\n\ntype PanelToolbarProps = SlottableProps & Pick<PanelStyleProps, 'size'>;\n\nconst PanelToolbar = slottable<HTMLDivElement, Pick<PanelStyleProps, 'size'>>(\n ({ children, asChild, size, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n return (\n <Comp {...rest} data-slot='toolbar' className={tx('panel.toolbar', { size }, className)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n },\n);\n\nPanelToolbar.displayName = 'Panel.Toolbar';\n\n//\n// Content\n//\n\ntype PanelContentProps = SlottableProps;\n\nconst PanelContent = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n return (\n <Comp {...rest} data-slot='content' className={tx('panel.content', {}, className)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n});\n\nPanelContent.displayName = 'Panel.Content';\n\n//\n// Statusbar\n//\n\ntype PanelStatusbarProps = SlottableProps & Pick<PanelStyleProps, 'size'>;\n\nconst PanelStatusbar = slottable<HTMLDivElement, Pick<PanelStyleProps, 'size'>>(\n ({ children, asChild, size, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n return (\n <Comp {...rest} data-slot='statusbar' className={tx('panel.statusbar', { size }, className)} ref={forwardedRef}>\n {children}\n </Comp>\n );\n },\n);\n\nPanelStatusbar.displayName = 'Panel.Statusbar';\n\n//\n// Panel\n//\n\nexport const Panel = {\n Root: PanelRoot,\n Toolbar: PanelToolbar,\n Content: PanelContent,\n Statusbar: PanelStatusbar,\n};\n\nexport type { PanelRootProps, PanelToolbarProps, PanelContentProps, PanelStatusbarProps };\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, { forwardRef } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { composable, composableProps, slottable, type ToolbarStyleProps } from '@dxos/ui-theme';\nimport { type SlottableProps } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\nimport { translationKey } from '../../translations';\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 = ToolbarPrimitive.ToolbarProps & ToolbarStyleProps;\n\nconst ToolbarRoot = composable<HTMLDivElement, ToolbarRootProps>(\n ({ children, density, disabled, layoutManaged, orientation, ...props }, forwardedRef) => {\n const { className, role, ...rest } = composableProps(props);\n const { tx } = useThemeContext();\n\n return (\n <ToolbarPrimitive.Root\n {...rest}\n // Only pass role when explicitly set; radix provides role=\"toolbar\" by default.\n {...(role !== 'none' && { role })}\n orientation={orientation}\n data-arrow-keys={orientation === 'vertical' ? 'up down' : 'left right'}\n className={tx('toolbar.root', { density, disabled, layoutManaged }, className)}\n ref={forwardedRef}\n >\n {children}\n </ToolbarPrimitive.Root>\n );\n },\n);\n\n//\n// Text\n//\n\ntype ToolbarTextProps = SlottableProps;\n\nconst ToolbarText = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n return (\n <Comp {...rest} className={tx('toolbar.text', {}, className)} ref={forwardedRef}>\n {children}\n </Comp>\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 orientation='vertical' {...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 tabIndex={-1}\n noTooltip\n iconOnly\n icon='ph--dots-six-vertical--regular'\n variant='ghost'\n label={label ?? t('toolbar-drag-handle.label')}\n classNames='dx-focus-ring-none cursor-pointer'\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\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 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 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 ComponentRef,\n type FC,\n PropsWithChildren,\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: RefObject<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\ntype DropdownMenuRootProps = PropsWithChildren<{\n dir?: Direction;\n modal?: boolean;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}>;\n\nconst DropdownMenuRoot = ({\n __scopeDropdownMenu,\n children,\n dir,\n modal = true,\n open: openProp,\n defaultOpen,\n onOpenChange,\n}: ScopedProps<DropdownMenuRootProps>) => {\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}\n contentId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n <MenuPrimitive.Root {...menuScope} dir={dir} modal={modal} open={open} onOpenChange={setOpen}>\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 = ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;\ntype DropdownMenuTriggerProps = 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\ntype 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>;\ntype DropdownMenuPortalProps = 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 = ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Content>>;\ntype DropdownMenuContentProps = 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 = ComponentRef<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ntype DropdownMenuGroupProps = 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 = ComponentRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Label>>;\ntype DropdownMenuLabelProps = 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 = ComponentRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Item>>;\ntype DropdownMenuItemProps = 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 = ComponentRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>>;\ntype DropdownMenuCheckboxItemProps = 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 = ComponentRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ntype DropdownMenuRadioGroupProps = 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 = ComponentRef<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 = ComponentRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ntype DropdownMenuItemIndicatorProps = 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 = ComponentRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>>;\ntype DropdownMenuSeparatorProps = 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 = ComponentRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>>;\ntype DropdownMenuArrowProps = 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\ntype 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 = ComponentRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ntype DropdownMenuSubTriggerProps = 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 = ComponentRef<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ntype DropdownMenuSubContentProps = 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 * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport React, { forwardRef } from 'react';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype SeparatorProps = ThemedClassName<SeparatorPrimitive.SeparatorProps> & { subdued?: boolean };\n\nconst Separator = forwardRef<HTMLDivElement, SeparatorProps>(\n ({ classNames, orientation = 'horizontal', subdued, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <SeparatorPrimitive.Root\n {...props}\n orientation={orientation}\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';\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 * as DialogPrimitive 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';\nimport { slottable } from '@dxos/ui-theme';\nimport { type SlottableProps } from '@dxos/ui-types';\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 = DialogPrimitive.DialogProps;\n\nconst DialogRoot: FunctionComponent<DialogRootProps> = (props) => (\n <ElevationProvider elevation='dialog'>\n <DialogPrimitive.Root\n // NOTE: Radix warning unless set to undefined.\n // https://www.radix-ui.com/primitives/docs/components/dialog#description\n aria-describedby={undefined}\n {...props}\n />\n </ElevationProvider>\n);\n\n//\n// Trigger\n//\n\ntype DialogTriggerProps = DialogPrimitive.DialogTriggerProps;\n\nconst DialogTrigger: FunctionComponent<DialogTriggerProps> = DialogPrimitive.Trigger;\n\n//\n// Portal\n//\n\ntype DialogPortalProps = DialogPrimitive.DialogPortalProps;\n\nconst DialogPortal: FunctionComponent<DialogPortalProps> = DialogPrimitive.Portal;\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<\n DialogPrimitive.DialogOverlayProps & { blockAlign?: 'center' | 'start' | 'end' }\n>;\n\nconst DialogOverlay: ForwardRefExoticComponent<DialogOverlayProps> = forwardRef<HTMLDivElement, DialogOverlayProps>(\n ({ classNames, children, blockAlign, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n\n return (\n <DialogPrimitive.Overlay\n {...props}\n data-block-align={blockAlign}\n className={tx('dialog.overlay', {}, classNames)}\n ref={forwardedRef}\n >\n <OverlayLayoutProvider inOverlayLayout>{children}</OverlayLayoutProvider>\n </DialogPrimitive.Overlay>\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 DialogPrimitive.Content>> & {\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 <DialogPrimitive.Content\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(\n 'dialog.content',\n {\n size,\n inOverlayLayout: propsInOverlayLayout || inOverlayLayout,\n },\n classNames,\n )}\n ref={forwardedRef}\n >\n <Column.Root classNames='dx-expander' gutter='sm'>\n {children}\n </Column.Root>\n </DialogPrimitive.Content>\n );\n },\n);\n\nDialogContent.displayName = DIALOG_CONTENT_NAME;\n\n//\n// Header\n//\n\ntype DialogHeaderProps = PropsWithChildren;\n\nconst DialogHeader: ForwardRefExoticComponent<DialogHeaderProps> = forwardRef<HTMLHeadingElement, DialogHeaderProps>(\n ({ children }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Row className={tx('dialog.header')} center ref={forwardedRef}>\n {children}\n </Column.Row>\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 variant='ghost'\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// Body\n//\n\ntype DialogBodyProps = SlottableProps;\n\nconst DialogBody = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Content {...props} asChild={asChild} className={tx('dialog.body', {})} ref={forwardedRef}>\n {children}\n </Column.Content>\n );\n});\n\n//\n// Title\n//\n\ntype DialogTitleProps = ThemedClassName<DialogPrimitive.DialogTitleProps> & { srOnly?: boolean };\n\nconst DialogTitle = forwardRef<HTMLHeadingElement, DialogTitleProps>(\n ({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DialogPrimitive.Title {...props} className={tx('dialog.title', { srOnly }, classNames)} ref={forwardedRef} />\n );\n },\n);\n\n//\n// Description\n//\n\ntype DialogDescriptionProps = ThemedClassName<DialogPrimitive.DialogDescriptionProps> & { srOnly?: boolean };\n\nconst DialogDescription = forwardRef<HTMLParagraphElement, DialogDescriptionProps>(\n ({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <DialogPrimitive.Description\n {...props}\n className={tx('dialog.description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n },\n);\n\n//\n// ActionBar\n//\n\ntype DialogActionBarProps = ThemedClassName<PropsWithChildren>;\n\nconst DialogActionBar = forwardRef<HTMLDivElement, DialogActionBarProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <Column.Row center>\n <div {...props} className={tx('dialog.actionbar', {}, classNames)} ref={forwardedRef}>\n {children}\n </div>\n </Column.Row>\n );\n },\n);\n\n//\n// Close\n//\n\ntype DialogCloseProps = DialogPrimitive.DialogCloseProps;\n\nconst DialogClose: FunctionComponent<DialogCloseProps> = DialogPrimitive.Close;\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 DialogCloseIconButtonProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport { createContext } from '@radix-ui/react-context';\nimport React, { type ForwardRefExoticComponent, type FunctionComponent, forwardRef } 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';\nimport {\n Dialog,\n type DialogHeaderProps,\n type DialogBodyProps,\n type DialogActionBarProps,\n type DialogCloseIconButtonProps,\n} from './Dialog';\n\n//\n// Root\n//\n\ntype AlertDialogRootProps = AlertDialogPrimitive.AlertDialogProps;\n\nconst AlertDialogRoot: FunctionComponent<AlertDialogRootProps> = (props) => (\n <ElevationProvider elevation='dialog'>\n <AlertDialogPrimitive.Root {...props} />\n </ElevationProvider>\n);\n\n//\n// Trigger\n//\n\ntype AlertDialogTriggerProps = AlertDialogPrimitive.AlertDialogTriggerProps;\n\nconst AlertDialogTrigger: FunctionComponent<AlertDialogTriggerProps> = AlertDialogPrimitive.Trigger;\n\n//\n// Portal\n//\n\ntype AlertDialogPortalProps = AlertDialogPrimitive.AlertDialogPortalProps;\n\nconst AlertDialogPortal: FunctionComponent<AlertDialogPortalProps> = AlertDialogPrimitive.Portal;\n\n//\n// Cancel\n//\n\ntype AlertDialogCancelProps = AlertDialogPrimitive.AlertDialogCancelProps;\n\nconst AlertDialogCancel: FunctionComponent<AlertDialogCancelProps> = AlertDialogPrimitive.Cancel;\n\n//\n// Action\n//\n\ntype AlertDialogActionProps = AlertDialogPrimitive.AlertDialogActionProps;\n\nconst AlertDialogAction: FunctionComponent<AlertDialogActionProps> = AlertDialogPrimitive.Action;\n\n//\n// Context\n//\n\ntype OverlayLayoutContextValue = { inOverlayLayout?: boolean };\n\nconst ALERT_DIALOG_OVERLAY_NAME = 'AlertDialogOverlay';\nconst ALERT_DIALOG_CONTENT_NAME = 'AlertDialogContent';\n\nconst [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLayoutContextValue>(\n ALERT_DIALOG_OVERLAY_NAME,\n { inOverlayLayout: false },\n);\n\n//\n// Overlay\n//\n\ntype AlertDialogOverlayProps = ThemedClassName<\n AlertDialogPrimitive.AlertDialogOverlayProps & { 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 <AlertDialogPrimitive.Overlay\n {...props}\n data-block-align={blockAlign}\n className={tx('dialog.overlay', {}, classNames)}\n ref={forwardedRef}\n >\n <OverlayLayoutProvider inOverlayLayout>{children}</OverlayLayoutProvider>\n </AlertDialogPrimitive.Overlay>\n );\n});\n\nAlertDialogOverlay.displayName = ALERT_DIALOG_OVERLAY_NAME;\n\n//\n// Content\n//\n\ntype AlertDialogContentProps = ThemedClassName<AlertDialogPrimitive.AlertDialogContentProps> & { 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 <AlertDialogPrimitive.Content\n {...props}\n className={tx('dialog.content', { inOverlayLayout, size }, classNames)}\n // NOTE: Radix warning unless set to undefined.\n // https://www.radix-ui.com/primitives/docs/components/dialog#description\n aria-describedby={undefined}\n ref={forwardedRef}\n >\n <Column.Root classNames='dx-expander' gutter='sm'>\n {children}\n </Column.Root>\n </AlertDialogPrimitive.Content>\n );\n});\n\nAlertDialogContent.displayName = ALERT_DIALOG_CONTENT_NAME;\n\n//\n// Title\n//\n\ntype AlertDialogTitleProps = ThemedClassName<AlertDialogPrimitive.AlertDialogTitleProps> & { srOnly?: boolean };\n\nconst AlertDialogTitle: ForwardRefExoticComponent<AlertDialogTitleProps> = forwardRef<\n HTMLHeadingElement,\n AlertDialogTitleProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogPrimitive.Title {...props} className={tx('dialog.title', { srOnly }, classNames)} ref={forwardedRef} />\n );\n});\n\n//\n// Description\n//\n\ntype AlertDialogDescriptionProps = ThemedClassName<AlertDialogPrimitive.AlertDialogDescriptionProps> & {\n srOnly?: boolean;\n};\n\nconst AlertDialogDescription: ForwardRefExoticComponent<AlertDialogDescriptionProps> = forwardRef<\n HTMLParagraphElement,\n AlertDialogDescriptionProps\n>(({ classNames, srOnly, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <AlertDialogPrimitive.Description\n {...props}\n className={tx('dialog.description', { srOnly }, classNames)}\n ref={forwardedRef}\n />\n );\n});\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 // Shared with Dialog.\n Header: Dialog.Header,\n Body: Dialog.Body,\n Title: AlertDialogTitle,\n Description: AlertDialogDescription,\n ActionBar: Dialog.ActionBar,\n CloseIconButton: Dialog.CloseIconButton,\n // AlertDialog-specific dismissal.\n Cancel: AlertDialogCancel,\n Action: AlertDialogAction,\n};\n\nexport type {\n AlertDialogRootProps,\n AlertDialogTriggerProps,\n AlertDialogPortalProps,\n AlertDialogOverlayProps,\n AlertDialogContentProps,\n AlertDialogTitleProps,\n AlertDialogDescriptionProps,\n AlertDialogCancelProps,\n AlertDialogActionProps,\n // Re-export shared types.\n DialogHeaderProps as AlertDialogHeaderProps,\n DialogBodyProps as AlertDialogBodyProps,\n DialogActionBarProps as AlertDialogActionBarProps,\n DialogCloseIconButtonProps as AlertDialogCloseIconButtonProps,\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 { 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 2026 DXOS.org\n//\n\nimport {\n useArrowNavigationGroup,\n useFocusableGroup,\n useMergedTabsterAttributes_unstable,\n} from '@fluentui/react-tabster';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { Slot } from '@radix-ui/react-slot';\nimport React, {\n type FocusEvent,\n type KeyboardEvent,\n type MouseEvent,\n createContext,\n useCallback,\n useContext,\n useRef,\n useState,\n} from 'react';\n\nimport { composableProps, slottable } from '@dxos/ui-theme';\nimport { type Axis } from '@dxos/ui-types';\n\nimport { useThemeContext } from '../../hooks';\n\n//\n// Context\n//\n\ntype FocusState = 'active' | 'error';\n\nconst FOCUS_STATE_ATTR = 'focus-state';\n\ntype ContextValue = {\n setFocus?: (state: FocusState | undefined) => void;\n /** True when any item within the group has DOM focus. */\n groupHasFocus?: boolean;\n};\n\nconst FocusContext = createContext<ContextValue>({});\n\nconst useFocus = () => useContext(FocusContext);\n\n//\n// Group\n//\n\ntype GroupProps = {\n orientation?: Axis;\n /** Show a subdued ring when unfocused (e.g., as a cell border). */\n border?: boolean;\n onKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void;\n};\n\n/**\n * Provides arrow-key navigation across focusable children via tabster.\n * Does not manage `aria-current` — use `Focus.Item` on each child for that.\n */\n// TODO(wittjosiah): Consider how this could integrate with with react-ui-attention.\n// Perhaps react-ui-attention comes under the mosaic umbrella as it supports selection?\nconst Group = slottable<HTMLDivElement, GroupProps>(\n ({ children, asChild, orientation = 'vertical', border = false, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n const rootRef = useRef<HTMLDivElement>(null);\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n const arrowNavigationAttrs = useArrowNavigationGroup({ axis: orientation, memorizeCurrent: true });\n const tabsterAttrs = useMergedTabsterAttributes_unstable(focusableGroupAttrs, arrowNavigationAttrs);\n const [state, setState] = useState<FocusState | undefined>();\n const [groupHasFocus, setGroupHasFocus] = useState(false);\n\n const handleFocusIn = useCallback(() => setGroupHasFocus(true), []);\n const handleFocusOut = useCallback((event: FocusEvent<HTMLDivElement>) => {\n const related = event.relatedTarget as HTMLElement | null;\n if (!related || !rootRef.current?.contains(related)) {\n setGroupHasFocus(false);\n }\n }, []);\n\n const { className, ...rest } = composableProps(props);\n return (\n <FocusContext.Provider value={{ setFocus: setState, groupHasFocus }}>\n <Comp\n {...rest}\n tabIndex={0}\n className={tx('focus.group', { border }, className)}\n {...tabsterAttrs}\n {...(state && {\n [`data-${FOCUS_STATE_ATTR}`]: state,\n })}\n onBlur={handleFocusOut}\n onFocus={handleFocusIn}\n ref={useComposedRefs<HTMLDivElement>(rootRef, forwardedRef)}\n >\n {children}\n </Comp>\n </FocusContext.Provider>\n );\n },\n);\n\n//\n// Item\n//\n\ntype ItemProps = {\n current?: boolean;\n /** Show a subdued ring when unfocused (e.g., as a cell border). */\n border?: boolean;\n onCurrentChange?: () => void;\n};\n\n/**\n * Focusable item within a `Focus.Group`.\n * Uses `useFocusableGroup` so the parent Group's arrow navigation treats this as a single unit\n * (internal buttons are not arrow-navigation targets; Enter/Escape to go in/out).\n * Supports controlled (`current` prop) and uncontrolled (focus-driven) `aria-current`.\n */\nconst Item = slottable<HTMLDivElement, ItemProps>(\n (\n { children, asChild, current, border = false, onCurrentChange, onClick, onFocus, onBlur, ...props },\n forwardedRef,\n ) => {\n const Comp = asChild ? Slot : Primitive.div;\n const { tx } = useThemeContext();\n // Tell tabster's groupper to ignore Enter so it doesn't move focus into the group.\n const focusableGroupAttrs = useFocusableGroup({ ignoreDefaultKeydown: { Enter: true } });\n const [focused, setFocused] = useState(false);\n\n const handleClick = useCallback(\n (event: MouseEvent<HTMLDivElement>) => {\n onCurrentChange?.();\n onClick?.(event);\n },\n [onCurrentChange, onClick],\n );\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Enter') {\n onCurrentChange?.();\n }\n },\n [onCurrentChange],\n );\n\n const handleFocus = useCallback(\n (event: FocusEvent<HTMLDivElement>) => {\n setFocused(true);\n onFocus?.(event);\n },\n [onFocus],\n );\n\n const handleBlur = useCallback(\n (event: FocusEvent<HTMLDivElement>) => {\n setFocused(false);\n onBlur?.(event);\n },\n [onBlur],\n );\n\n // Controlled `current` prop takes precedence (e.g., virtualized items that scroll back into view).\n // Otherwise fall back to DOM focus state.\n const isCurrent = current ?? focused;\n\n const { className, ...rest } = composableProps(props);\n return (\n <Comp\n {...rest}\n tabIndex={0}\n className={tx('focus.item', { border }, className)}\n {...focusableGroupAttrs}\n aria-current={isCurrent || undefined}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n );\n },\n);\n\n//\n// Focus\n//\n\nexport const Focus = {\n Group,\n Item,\n};\n\nexport type { GroupProps as FocusGroupProps, ItemProps as FocusItemProps };\n\nexport { useFocus };\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as CheckboxPrimitive 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<CheckboxPrimitive.CheckboxProps, '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.Root\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.Root>\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 { composable, composableProps } from '@dxos/ui-theme';\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';\nimport { ListDropIndicator } from './ListDropIndicator';\n\ntype ListProps = ThemedClassName<ListPrimitiveProps & { density?: Density }>;\n\nconst List = composable<HTMLOListElement, ListProps>(({ children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const density = useDensityContext(props.density);\n const { className, ...rest } = composableProps(props);\n\n return (\n <DensityProvider density={density}>\n <ListPrimitive {...rest} className={tx('list.root', {}, className)} 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 <span>{children}</span>\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';\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: 'inset-0 border-[length:var(--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 { composable, composableProps } from '@dxos/ui-theme';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\n// TODO(thure): 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\n// TODO(burdon): Replace with functions.\nexport const TREEGRID_PATH_SEPARATOR = '~';\nexport const TREEGRID_PARENT_OF_SEPARATOR = ' ';\n\ntype TreegridRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {\n gridTemplateColumns: CSSProperties['gridTemplateColumns'];\n asChild?: boolean;\n};\n\nconst TreegridRoot = composable<HTMLDivElement, TreegridRootProps>(\n ({ asChild, classNames, children, style, gridTemplateColumns, onKeyDown: onKeyDownProp, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { className, role: _role, ...rest } = composableProps<HTMLDivElement>(props, { classNames });\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 onKeyDownProp?.(event);\n },\n [findFirstFocusable, onKeyDownProp],\n );\n\n return (\n <Comp\n role='treegrid'\n {...rest}\n className={tx('treegrid.root', {}, className)}\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(TREEGRID_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};\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';\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 {...(handlesFocus && { ...mover })}\n {...props}\n role={role}\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' ? <div /> : <Icon icon={icon} classNames={tx('message.icon', { valence })} />}\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 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 { useSafeCollisionPadding, useElevationContext, useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\n//\n// Context\n//\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\n\nconst POPOVER_NAME = 'Popover';\n\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [createPopperScope]);\n\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: RefObject<HTMLButtonElement>;\n contentId: string;\n hasCustomAnchor: boolean;\n modal: boolean;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n};\n\nconst [PopoverProvider, usePopoverContext] = createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\n//\n// PopoverRoot\n//\n\ntype 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>;\ntype PopoverAnchorProps = 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 = ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;\ntype PopoverTriggerProps = 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\ntype 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>;\ntype 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 = (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 = ComponentRef<typeof PopperPrimitive.Content>;\ntype FocusScopeProps = ComponentPropsWithoutRef<typeof FocusScope>;\ntype DismissableLayerProps = ComponentPropsWithoutRef<typeof DismissableLayer>;\ntype PopperContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Content>>;\n\ntype PopoverContentImplProps = Omit<PopperContentProps, 'onPlaced'> &\n 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 = ComponentRef<typeof Primitive.button>;\ntype PopoverCloseProps = 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 = ComponentRef<typeof PopperPrimitive.Arrow>;\ntype PopperArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>>;\ntype PopoverArrowProps = 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 { type StatusStyleProps } from '@dxos/ui-theme';\n\nimport { useThemeContext } from '../../hooks';\nimport { type ThemedClassName } from '../../util';\n\ntype StatusProps = ThemedClassName<\n ComponentPropsWithRef<'span'> &\n StatusStyleProps & {\n progress?: number;\n }\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, { CSSProperties, useMemo } from 'react';\n\nimport { composableProps, scrollbar, slottable } from '@dxos/ui-theme';\nimport { type AllowedAxis, type SlottableProps } 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 centered?: 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 = Partial<ScrollAreaContextType>;\n\n/**\n * ScrollArea provides native scrollbars with custom styling.\n */\nconst ScrollAreaRoot = slottable<HTMLDivElement, ScrollAreaRootProps>(\n (\n {\n children,\n asChild,\n orientation = 'vertical',\n autoHide = true,\n centered = false,\n padding = false,\n thin = false,\n snap = false,\n ...props\n },\n forwardedRef,\n ) => {\n const { tx } = useThemeContext();\n const { className, ...rest } = composableProps(props);\n const Comp = asChild ? Slot : Primitive.div;\n const options = useMemo(\n () => ({ orientation, autoHide, centered, padding, thin, snap }),\n [orientation, autoHide, centered, padding, thin, snap],\n );\n\n return (\n <ScrollAreaProvider {...options}>\n <Comp {...rest} className={tx('scrollArea.root', options, className)} 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 = SlottableProps;\n\nconst ScrollAreaViewport = slottable<HTMLDivElement>(({ children, asChild, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const options = useScrollAreaContext(SCROLLAREA_VIEWPORT_NAME);\n const density = options.thin ? scrollbar.thin : scrollbar.coarse;\n const { className, ...rest } = composableProps(props);\n const { style, ...restWithoutStyle } = rest as { style?: CSSProperties; [key: string]: any };\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <Comp\n {...restWithoutStyle}\n style={\n {\n '--scroll-width': `${density.size}px`,\n '--scroll-padding': `${density.padding}px`,\n ...style,\n } as CSSProperties\n }\n className={tx('scrollArea.viewport', options, className)}\n ref={forwardedRef}\n >\n {children}\n </Comp>\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 PropsWithChildren,\n type RefObject,\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 { useMergeRefs } from '@dxos/react-hooks';\nimport { composable, composableProps, slottable } from '@dxos/ui-theme';\nimport { mx } from '@dxos/ui-theme';\nimport { type SlottableProps } from '@dxos/ui-types';\n\nimport { type ThemedClassName } from '../../util';\nimport { IconButton } from '../Button';\nimport { ScrollArea, type ScrollAreaRootProps } 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 controller?: ScrollController;\n pinned?: boolean;\n overflow?: boolean;\n /** Called by Viewport to register/unregister the scroll element. */\n setViewport: (el: HTMLDivElement | null) => void;\n /** Called by Viewport on wheel events to update pinned state. */\n setPinned: (value: boolean) => void;\n /** Called by Viewport on scroll events to update overflow state. */\n setOverflow: (value: boolean) => void;\n};\n\nconst [ScrollContainerProvider, useScrollContainerContext] =\n createContext<ScrollContainerContextValue>('ScrollContainer');\n\n//\n// Root\n//\n\ntype RootProps = PropsWithChildren<{\n pin?: boolean;\n behavior?: ScrollBehavior;\n}>;\n\n/**\n * Headless scroll container that provides context for scroll state.\n * Render ScrollContainer.Content and ScrollContainer.Viewport as children.\n */\nconst Root = forwardRef<ScrollController, RootProps>(\n ({ children, pin, behavior: behaviorProp = 'smooth' }, forwardedRef) => {\n const scrollerRef = useRef<HTMLDivElement | null>(null);\n const autoScrollRef = useRef(false);\n const [pinned, setPinned] = useState(pin);\n const [overflow, setOverflow] = useState(false);\n\n const timeoutRef = useRef<NodeJS.Timeout>(undefined);\n const scrollToBottom = useCallback(\n (behavior: ScrollBehavior = behaviorProp) => {\n if (scrollerRef.current) {\n if (behavior !== 'instant') {\n // Temporarily hide scrollbar to prevent flickering during smooth scroll.\n // For instant scrolling we skip this — there's no animation to hide,\n // and adding the class changes element size which re-fires the ResizeObserver.\n autoScrollRef.current = true;\n scrollerRef.current.classList.add('scrollbar-none');\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => {\n scrollerRef.current?.classList.remove('scrollbar-none');\n autoScrollRef.current = false;\n }, 500);\n }\n\n scrollerRef.current.scrollTo({\n top: scrollerRef.current.scrollHeight,\n behavior,\n });\n\n setPinned(true);\n }\n },\n [behaviorProp],\n );\n\n const controller = useMemo<ScrollController>(\n () => ({\n get viewport() {\n return scrollerRef.current;\n },\n scrollToTop: () => {\n invariant(scrollerRef.current);\n scrollerRef.current.scrollTo({ top: 0, behavior: 'smooth' });\n setPinned(false);\n },\n scrollToBottom: (behavior = 'smooth' as ScrollBehavior) => {\n scrollToBottom(behavior);\n },\n }),\n [scrollToBottom],\n );\n\n // Scroll controller imperative ref.\n useImperativeHandle(forwardedRef, () => controller, [controller]);\n\n // Called by Viewport when the scroll element mounts/unmounts.\n const setViewport = useCallback((el: HTMLDivElement | null) => {\n scrollerRef.current = el;\n }, []);\n\n return (\n <ScrollContainerProvider\n pinned={pinned}\n overflow={overflow}\n controller={controller}\n setViewport={setViewport}\n setPinned={setPinned}\n setOverflow={setOverflow}\n >\n {children}\n </ScrollContainerProvider>\n );\n },\n);\n\nRoot.displayName = 'ScrollContainer.Root';\n\n//\n// Content\n//\n\ntype ContentProps = Pick<ScrollAreaRootProps, 'thin' | 'padding' | 'centered'>;\n\n/**\n * Composable wrapper around ScrollArea.Root.\n * Provides the DOM structure for the scroll container.\n */\nconst Content = composable<HTMLDivElement, ContentProps>(\n ({ children, thin, padding, centered, ...props }, forwardedRef) => {\n return (\n <ScrollArea.Root\n {...composableProps(props, { classNames: 'relative' })}\n thin={thin}\n padding={padding}\n centered={centered}\n ref={forwardedRef}\n >\n {children}\n </ScrollArea.Root>\n );\n },\n);\n\nContent.displayName = 'ScrollContainer.Content';\n\n//\n// Viewport\n//\n\nconst VIEWPORT_NAME = 'ScrollContainer.Viewport';\n\ntype ViewportProps = SlottableProps;\n\nconst Viewport = slottable<HTMLDivElement, ViewportProps>(({ children, asChild, ...props }, forwardedRef) => {\n const scrollerRef = useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs([forwardedRef, scrollerRef]);\n const { setViewport, setPinned, setOverflow } = useScrollContainerContext(VIEWPORT_NAME);\n\n // Register the scroll element with Root and set up wheel/scroll listeners.\n useEffect(() => {\n const el = scrollerRef.current;\n if (!el) {\n return;\n }\n\n setViewport(el);\n\n return combine(\n addEventListener(el, 'wheel', () => setPinned(isBottom(el))),\n addEventListener(el, 'scroll', () => setOverflow((el.scrollTop ?? 0) > 0)),\n () => setViewport(null),\n );\n }, [setViewport, setPinned, setOverflow]);\n\n return (\n <>\n <ScrollArea.Viewport asChild={asChild} {...composableProps(props)} ref={mergedRef}>\n {children}\n </ScrollArea.Viewport>\n <PinEffect scrollerRef={scrollerRef} />\n </>\n );\n});\n\nViewport.displayName = VIEWPORT_NAME;\n\n/**\n * Isolated component that consumes pinned/controller from context.\n * Kept separate so that Viewport does not re-render when pinned changes.\n */\nconst PIN_EFFECT_NAME = 'ScrollContainer.PinEffect';\n\nconst PinEffect = ({ scrollerRef }: { scrollerRef: RefObject<HTMLDivElement | null> }) => {\n const { pinned, controller } = useScrollContainerContext(PIN_EFFECT_NAME);\n\n // Pin scroll to bottom when content changes.\n useEffect(() => {\n const viewport = scrollerRef.current;\n if (!pinned || !viewport) {\n return;\n }\n\n // Scroll instantly so we don't visually jump while content is being added.\n controller?.scrollToBottom('instant');\n\n // Setup resize observer on content children to detect size changes (e.g. streaming).\n // We observe children rather than the viewport itself, because the viewport's size\n // stays fixed — only its content grows.\n // Use instant scroll in the callback — smooth scrolling adds/removes the\n // scrollbar-none class, which changes the element size and re-fires the\n // observer, creating an infinite loop.\n const resizeObserver = new ResizeObserver(() => controller?.scrollToBottom('smooth'));\n Array.from(viewport.children).forEach((child) => {\n resizeObserver.observe(child);\n });\n\n // Watch for added/removed children.\n const mutationObserver = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n mutation.addedNodes.forEach((node) => {\n if (node instanceof Element) {\n resizeObserver.observe(node);\n }\n });\n });\n\n controller?.scrollToBottom('smooth');\n });\n mutationObserver.observe(viewport, { childList: true });\n\n return () => {\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n }, [pinned, controller, scrollerRef]);\n\n return null;\n};\n\n//\n// Fade\n//\n\nconst FADE_NAME = 'ScrollContainer.Fade';\n\ntype FadeProps = {};\n\nconst Fade = () => {\n const { overflow } = useScrollContainerContext(FADE_NAME);\n\n return (\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};\n\nFade.displayName = FADE_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, controller } = 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={() => controller?.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 Content,\n Viewport,\n Fade,\n ScrollDownButton,\n};\n\nexport type {\n RootProps as ScrollContainerRootProps,\n ContentProps as ScrollContainerContentProps,\n ViewportProps as ScrollContainerViewportProps,\n FadeProps as ScrollContainerFadeProps,\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 from 'react';\n\nimport { composableProps, slottable } from '@dxos/ui-theme';\n\nimport { useThemeContext } from '../../hooks';\nimport { ThemedClassName } from '../../util';\n\ntype ScopedProps<P> = P & { __scopeSplitter?: any };\n\n// TODO(burdon): Generalize horizontal/vertical and change to start/end.\ntype Mode = 'top' | 'bottom' | 'split';\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 RootOwnProps = Partial<SplitterContextValue>;\n\ntype RootProps = RootOwnProps;\n\nconst Root = slottable<HTMLDivElement, RootOwnProps>(\n ({ asChild, mode = 'top', ratio = 0.5, transition = 250, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { __scopeSplitter, ...rest } = props as ScopedProps<typeof props>;\n const { className, ...restProps } = composableProps(rest);\n const Comp = asChild ? Slot : Primitive.div;\n\n return (\n <SplitterProvider scope={__scopeSplitter} mode={mode} ratio={ratio} transition={transition}>\n <Comp {...restProps} ref={forwardedRef} className={tx('splitter.root', {}, className)}>\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 PanelOwnProps = ThemedClassName<{\n position: 'top' | 'bottom';\n}>;\n\ntype PanelProps = PanelOwnProps;\n\nconst Panel = slottable<HTMLDivElement, PanelOwnProps>(\n ({ classNames, asChild, children, position, style, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const { __scopeSplitter, ...rest } = props as ScopedProps<typeof props>;\n const Comp = asChild ? Slot : Primitive.div;\n const { mode, ratio = 0.5, transition } = useSplitterContext(PANEL_NAME, __scopeSplitter);\n const { className, ...restProps } = composableProps(rest);\n\n // Calculate position and height based on mode and ratio.\n const isTopPanel = position === 'top';\n const topOffset = isTopPanel ? '0%' : mode === 'top' ? '100%' : mode === 'bottom' ? '0%' : `${ratio * 100}%`;\n const height = isTopPanel\n ? mode === 'top'\n ? '100%'\n : mode === 'bottom'\n ? '0%'\n : `${ratio * 100}%`\n : mode === 'bottom'\n ? '100%'\n : mode === 'top'\n ? '0%'\n : `${(1 - ratio) * 100}%`;\n\n return (\n <Comp\n {...restProps}\n ref={forwardedRef}\n className={tx('splitter.panel', {}, className)}\n style={{\n top: topOffset,\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 * as ToastPrimitive 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 = ToastPrimitive.ToastProviderProps;\n\nconst ToastProvider: FunctionComponent<ToastProviderProps> = ToastPrimitive.Provider;\n\ntype ToastViewportProps = ThemedClassName<ToastPrimitive.ToastViewportProps>;\n\nconst ToastViewport = forwardRef<HTMLOListElement, ToastViewportProps>(({ classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return <ToastPrimitive.Viewport {...props} className={tx('toast.viewport', {}, classNames)} ref={forwardedRef} />;\n});\n\ntype ToastRootProps = ThemedClassName<ToastPrimitive.ToastProps>;\n\nconst ToastRoot = forwardRef<HTMLLIElement, ToastRootProps>(({ classNames, children, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n return (\n <ToastPrimitive.Root {...props} className={tx('toast.root', {}, classNames)} ref={forwardedRef}>\n <ElevationProvider elevation='toast'>{children}</ElevationProvider>\n </ToastPrimitive.Root>\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<ToastPrimitive.ToastTitleProps>;\n\nconst ToastTitle = forwardRef<HTMLHeadingElement, ToastTitleProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : ToastPrimitive.Title;\n return <Comp {...props} className={tx('toast.title', {}, classNames)} ref={forwardedRef} />;\n },\n);\n\ntype ToastDescriptionProps = ThemedClassName<ToastPrimitive.ToastDescriptionProps>;\n\nconst ToastDescription = forwardRef<HTMLParagraphElement, ToastDescriptionProps>(\n ({ asChild, classNames, ...props }, forwardedRef) => {\n const { tx } = useThemeContext();\n const Comp = asChild ? Slot : ToastPrimitive.Description;\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 = ToastPrimitive.ToastActionProps;\n\nconst ToastAction: FunctionComponent<ToastActionProps> = ToastPrimitive.Action;\n\ntype ToastCloseProps = ToastPrimitive.ToastCloseProps;\n\nconst ToastClose: FunctionComponent<ToastCloseProps> = ToastPrimitive.Close;\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,gBAAAA;AAChC,QAAM,EAAEC,QAAO,IAAKC,WAAWC,cAAAA;AAC/B,SAAOH,eAAeC;AACxB;;;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;;;ACPA,SAASC,eAAe;AAQxB,IAAMC,eAAe,CAACC,SAAsCC,OAAOC,SAASF,IAAAA;AAC5E,IAAMG,gBAAgB,CAACH,SAA6C,CAAC,EAAEA,QAAQ,OAAOA,SAAS;AAE/F,IAAMI,cAAc,CAClBC,cACAD,cACAE,SAAAA;AAEA,UACGP,aAAaK,aAAYE,IAAAA,CAAK,IAA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ACnF,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,cAAkEC;AAIxE,IAAMC,aAAgEC;AAE/D,IAAMC,QAAQ;EACnBhC,UAAUD;EACVU,UAAUR;EACVa,MAAMF;EACNqB,MAAMhB;EACNO,OAAOD;EACPG,aAAaD;EACbS,SAASP;EACTE,QAAQD;EACRG,OAAOD;AACT;",
|
|
6
|
+
"names": ["Trans", "isLabel", "toLocalizedString", "useContext", "useDensityContext", "densityProp", "density", "useContext", "DensityContext", "ICONS_URL", "useIconHref", "icon", "noCache", "useThemeContext", "url", "Date", "getMinutes", "undefined", "useMemo", "propIsNumber", "prop", "Number", "isFinite", "propsIsRecord", "safePadding", "propsPadding", "side", "useSafeCollisionPadding", "collisionPadding", "safeAreaPadding", "useThemeContext", "useMemo", "top", "right", "bottom", "left", "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", "densityProp", "elevation", "elevationProp", "variant", "asChild", "props", "ref", "tx", "useThemeContext", "useElevationContext", "useDensityContext", "Comp", "Slot", "Primitive", "button", "React", "data-variant", "data-density", "data-props", "className", "disabled", "displayName", "ButtonGroup", "propsElevation", "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", "TogglePrimitive", "React", "forwardRef", "Toggle", "forwardRef", "defaultPressed", "pressed", "onPressedChange", "props", "forwardedRef", "React", "Root", "asChild", "Button", "ref", "ToggleGroupPrimitive", "React", "forwardRef", "ToggleGroup", "forwardRef", "classNames", "children", "props", "forwardedRef", "React", "Root", "asChild", "ButtonGroup", "ref", "ToggleGroupItem", "variant", "elevation", "density", "Item", "Button", "ToggleGroupIconItem", "label", "icon", "size", "IconButton", "Primitive", "Slot", "DOMPurify", "React", "createContext", "forwardRef", "useContext", "useMemo", "composable", "composableProps", "iconSize", "mx", "slottable", "Primitive", "Slot", "React", "composableProps", "slottable", "COLUMN_ROOT_NAME", "gutterSizes", "xs", "sm", "md", "lg", "ColumnRoot", "slottable", "children", "asChild", "role", "gutter", "props", "forwardedRef", "className", "rest", "composableProps", "Comp", "Slot", "Primitive", "div", "tx", "useThemeContext", "gutterSize", "React", "style", "gridTemplateColumns", "join", "ref", "displayName", "COLUMN_ROW_NAME", "ColumnRow", "fullWidth", "center", "COLUMN_CONTENT_NAME", "ColumnContent", "COLUMN_VIEWPORT_NAME", "ColumnViewport", "ScrollArea", "Root", "orientation", "padding", "Viewport", "Column", "Content", "Row", "Primitive", "Slot", "React", "composableProps", "mx", "slottable", "Container", "slottable", "children", "asChild", "props", "forwardedRef", "className", "rest", "composableProps", "Comp", "Slot", "Primitive", "div", "React", "mx", "ref", "Primitive", "Slot", "React", "composableProps", "mx", "slottable", "Flex", "slottable", "children", "asChild", "column", "grow", "props", "forwardedRef", "className", "rest", "composableProps", "Comp", "Slot", "Primitive", "div", "React", "ref", "mx", "React", "composable", "composableProps", "mx", "Grid", "composable", "children", "style", "role", "cols", "rows", "grow", "props", "forwardedRef", "className", "rest", "composableProps", "React", "div", "ref", "mx", "gridTemplateColumns", "undefined", "gridTemplateRows", "Primitive", "Slot", "React", "composableProps", "slottable", "GRID_TEMPLATE_ROWS", "GRID_TEMPLATE_AREAS", "PanelRoot", "slottable", "children", "asChild", "role", "style", "props", "forwardedRef", "className", "rest", "composableProps", "Comp", "Slot", "Primitive", "div", "tx", "useThemeContext", "React", "gridTemplateRows", "gridTemplateAreas", "ref", "displayName", "PanelToolbar", "size", "data-slot", "PanelContent", "PanelStatusbar", "Panel", "Root", "Toolbar", "Content", "Statusbar", "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", "forwardRef", "useTranslation", "composable", "composableProps", "slottable", "translationKey", "translations", "ContextMenuPrimitive", "Primitive", "Slot", "React", "forwardRef", "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", "__scopeDropdownMenu", "children", "dir", "modal", "open", "openProp", "defaultOpen", "onOpenChange", "menuScope", "triggerRef", "useRef", "setOpen", "useControllableState", "prop", "defaultProp", "onChange", "React", "scope", "triggerId", "useId", "contentId", "onOpenToggle", "useCallback", "prevOpen", "Root", "displayName", "TRIGGER_NAME", "DropdownMenuTrigger", "forwardRef", "props", "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", "SeparatorPrimitive", "React", "forwardRef", "Separator", "forwardRef", "classNames", "orientation", "subdued", "props", "forwardedRef", "tx", "useThemeContext", "React", "Root", "className", "ref", "ToolbarRoot", "composable", "children", "density", "disabled", "layoutManaged", "orientation", "props", "forwardedRef", "className", "role", "rest", "composableProps", "tx", "useThemeContext", "React", "Root", "data-arrow-keys", "ref", "ToolbarText", "slottable", "asChild", "Comp", "Slot", "Primitive", "div", "ToolbarButton", "forwardRef", "Button", "ToolbarIconButton", "IconButton", "noTooltip", "ToolbarToggle", "Toggle", "ToolbarLink", "Link", "ToolbarToggleGroup", "classNames", "elevation", "ButtonGroup", "ToolbarToggleGroupItem", "variant", "ToolbarToggleItem", "ToolbarToggleGroupIconItem", "icon", "label", "iconOnly", "ToolbarSeparator", "Separator", "ToolbarDragHandle", "testId", "t", "useTranslation", "translationKey", "data-testid", "tabIndex", "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", "CARD_ROOT_NAME", "CardRoot", "slottable", "children", "id", "asChild", "role", "border", "fullWidth", "density", "props", "forwardedRef", "className", "rest", "composableProps", "Comp", "Slot", "Primitive", "div", "tx", "useThemeContext", "React", "ref", "Column", "Root", "gutter", "displayName", "CARD_TOOLBAR_NAME", "CardToolbar", "composable", "classNames", "Toolbar", "style", "iconSize", "CARD_DRAG_HANDLE_NAME", "CardDragHandle", "forwardRef", "CardIconBlock", "padding", "DragHandle", "CARD_CLOSE_ICON_BUTTON_NAME", "CloseIconButton", "CARD_MENU_NAME", "CardMenu", "context", "items", "menuItems", "useContext", "combinedItems", "Menu", "CARD_ICON_NAME", "CardIcon", "Icon", "CARD_ICON_BLOCK_NAME", "CARD_TITLE_NAME", "CardTitle", "CARD_CONTENT_NAME", "CardContent", "CARD_ROW_NAME", "CardRow", "icon", "Row", "size", "CARD_SECTION_NAME", "CardSection", "mx", "CARD_HEADING_NAME", "CardHeading", "variant", "CARD_TEXT_NAME", "CardText", "truncate", "span", "CARD_HTML_NAME", "CardHtml", "html", "sanitized", "useMemo", "DOMPurify", "sanitize", "dangerouslySetInnerHTML", "__html", "CARD_POSTER_NAME", "CardPoster", "aspect", "image", "Image", "src", "alt", "aria-label", "CARD_ACTION_NAME", "CardAction", "actionIcon", "label", "onClick", "Button", "undefined", "CARD_LINK_NAME", "CardLink", "href", "a", "data-variant", "target", "rel", "Card", "ToolbarIconButton", "IconButton", "ToolbarSeparator", "Separator", "IconBlock", "Title", "Content", "Section", "Heading", "Text", "Html", "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", "DialogPrimitive", "React", "forwardRef", "useTranslation", "osTranslations", "slottable", "DialogRoot", "props", "React", "ElevationProvider", "elevation", "Root", "aria-describedby", "undefined", "DialogTrigger", "Trigger", "DialogPortal", "Portal", "DIALOG_OVERLAY_NAME", "OverlayLayoutProvider", "useOverlayLayoutContext", "createContext", "DialogOverlay", "forwardRef", "classNames", "children", "blockAlign", "forwardedRef", "tx", "useThemeContext", "Overlay", "data-block-align", "className", "ref", "inOverlayLayout", "displayName", "DIALOG_CONTENT_NAME", "DialogContent", "size", "propsInOverlayLayout", "Content", "Column", "gutter", "DialogHeader", "Row", "center", "DialogCloseIconButton", "label", "t", "useTranslation", "osTranslations", "IconButton", "icon", "iconOnly", "variant", "DialogBody", "slottable", "asChild", "DialogTitle", "srOnly", "Title", "DialogDescription", "Description", "DialogActionBar", "div", "DialogClose", "Close", "Dialog", "Header", "Body", "ActionBar", "CloseIconButton", "AlertDialogPrimitive", "createContext", "React", "forwardRef", "AlertDialogRoot", "props", "React", "ElevationProvider", "elevation", "Root", "AlertDialogTrigger", "Trigger", "AlertDialogPortal", "Portal", "AlertDialogCancel", "Cancel", "AlertDialogAction", "Action", "ALERT_DIALOG_OVERLAY_NAME", "ALERT_DIALOG_CONTENT_NAME", "OverlayLayoutProvider", "useOverlayLayoutContext", "createContext", "inOverlayLayout", "AlertDialogOverlay", "forwardRef", "classNames", "children", "blockAlign", "forwardedRef", "tx", "useThemeContext", "Overlay", "data-block-align", "className", "ref", "displayName", "AlertDialogContent", "size", "Content", "aria-describedby", "undefined", "Column", "gutter", "AlertDialogTitle", "srOnly", "Title", "AlertDialogDescription", "Description", "AlertDialog", "Header", "Dialog", "Body", "ActionBar", "CloseIconButton", "ErrorBoundary", "React", "safeStringify", "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", "useArrowNavigationGroup", "useFocusableGroup", "useMergedTabsterAttributes_unstable", "useComposedRefs", "Primitive", "Slot", "React", "createContext", "useCallback", "useContext", "useRef", "useState", "composableProps", "slottable", "FOCUS_STATE_ATTR", "FocusContext", "createContext", "useFocus", "useContext", "Group", "slottable", "children", "asChild", "orientation", "border", "props", "forwardedRef", "Comp", "Slot", "Primitive", "div", "tx", "useThemeContext", "rootRef", "useRef", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "arrowNavigationAttrs", "useArrowNavigationGroup", "axis", "memorizeCurrent", "tabsterAttrs", "useMergedTabsterAttributes_unstable", "state", "setState", "useState", "groupHasFocus", "setGroupHasFocus", "handleFocusIn", "useCallback", "handleFocusOut", "event", "related", "relatedTarget", "current", "contains", "className", "rest", "composableProps", "React", "Provider", "value", "setFocus", "tabIndex", "onBlur", "onFocus", "ref", "useComposedRefs", "Item", "onCurrentChange", "onClick", "ignoreDefaultKeydown", "Enter", "focused", "setFocused", "handleClick", "handleKeyDown", "key", "handleFocus", "handleBlur", "isCurrent", "aria-current", "undefined", "onKeyDown", "Focus", "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", "Root", "Icon", "icon", "Switch", "input", "type", "mx", "event", "target", "aria-describedby", "Input", "InputRoot", "Primitive", "Slot", "React", "forwardRef", "LIST_ITEM_NAME", "LIST_NAME", "ListItemCollapsibleContent", "List", "ListPrimitive", "ListItem", "ListPrimitiveItem", "ListItemHeading", "ListPrimitiveItemHeading", "ListItemOpenTrigger", "ListPrimitiveItemOpenTrigger", "useListContext", "useListItemContext", "composable", "composableProps", "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", "composable", "children", "props", "forwardedRef", "tx", "useThemeContext", "density", "useDensityContext", "className", "rest", "composableProps", "React", "DensityProvider", "ListPrimitive", "ref", "ListItemEndcap", "forwardRef", "classNames", "asChild", "Comp", "Slot", "Primitive", "div", "role", "MockListItemOpenTrigger", "ListItemHeading", "ListPrimitiveItemHeading", "span", "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", "composable", "composableProps", "TREEGRID_ROW_NAME", "createTreegridRowContext", "createTreegridRowScope", "createContextScope", "TreegridRowProvider", "useTreegridRowContext", "TREEGRID_PATH_SEPARATOR", "TREEGRID_PARENT_OF_SEPARATOR", "TreegridRoot", "composable", "asChild", "classNames", "children", "style", "gridTemplateColumns", "onKeyDown", "onKeyDownProp", "props", "forwardedRef", "tx", "useThemeContext", "className", "role", "_role", "rest", "composableProps", "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", "React", "ref", "TreegridRow", "forwardRef", "__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", "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", "useMemo", "composableProps", "scrollbar", "slottable", "SCROLLAREA_NAME", "ScrollAreaProvider", "useScrollAreaContext", "createContext", "SCROLLAREA_ROOT_NAME", "ScrollAreaRoot", "slottable", "children", "asChild", "orientation", "autoHide", "centered", "padding", "thin", "snap", "props", "forwardedRef", "tx", "useThemeContext", "className", "rest", "composableProps", "Comp", "Slot", "Primitive", "div", "options", "useMemo", "React", "ref", "displayName", "SCROLLAREA_VIEWPORT_NAME", "ScrollAreaViewport", "density", "scrollbar", "coarse", "style", "restWithoutStyle", "size", "ScrollArea", "Root", "Viewport", "createContext", "React", "forwardRef", "useCallback", "useEffect", "useImperativeHandle", "useMemo", "useRef", "useState", "addEventListener", "combine", "invariant", "useMergeRefs", "composable", "composableProps", "slottable", "mx", "isBottom", "el", "scrollHeight", "scrollTop", "clientHeight", "ScrollContainerProvider", "useScrollContainerContext", "createContext", "Root", "forwardRef", "children", "pin", "behavior", "behaviorProp", "forwardedRef", "scrollerRef", "useRef", "autoScrollRef", "pinned", "setPinned", "useState", "overflow", "setOverflow", "timeoutRef", "undefined", "scrollToBottom", "useCallback", "current", "classList", "add", "clearTimeout", "setTimeout", "remove", "scrollTo", "top", "controller", "useMemo", "viewport", "scrollToTop", "invariant", "useImperativeHandle", "setViewport", "React", "displayName", "Content", "composable", "thin", "padding", "centered", "props", "ScrollArea", "composableProps", "classNames", "ref", "VIEWPORT_NAME", "Viewport", "slottable", "asChild", "mergedRef", "useMergeRefs", "useEffect", "combine", "addEventListener", "PinEffect", "PIN_EFFECT_NAME", "resizeObserver", "ResizeObserver", "Array", "from", "forEach", "child", "observe", "mutationObserver", "MutationObserver", "mutations", "mutation", "addedNodes", "node", "Element", "childList", "disconnect", "FADE_NAME", "Fade", "div", "role", "data-visible", "className", "mx", "SCROLL_DOWN_BUTTON_NAME", "ScrollDownButton", "IconButton", "variant", "icon", "iconOnly", "size", "label", "onClick", "ScrollContainer", "Root", "Content", "Viewport", "Fade", "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", "composableProps", "slottable", "SPLITTER_NAME", "createSplitterContext", "createSplitterScope", "createContextScope", "SplitterProvider", "useSplitterContext", "ROOT_NAME", "Root", "slottable", "asChild", "mode", "ratio", "transition", "children", "props", "forwardedRef", "tx", "useThemeContext", "__scopeSplitter", "rest", "className", "restProps", "composableProps", "Comp", "Slot", "Primitive", "div", "React", "scope", "ref", "displayName", "PANEL_NAME", "Panel", "classNames", "position", "style", "isTopPanel", "topOffset", "height", "top", "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", "ToastPrimitive", "React", "forwardRef", "ToastProvider", "Provider", "ToastViewport", "forwardRef", "classNames", "props", "forwardedRef", "tx", "useThemeContext", "React", "Viewport", "className", "ref", "ToastRoot", "children", "Root", "ElevationProvider", "elevation", "ToastBody", "asChild", "Comp", "Slot", "Primitive", "div", "ToastTitle", "Title", "ToastDescription", "Description", "ToastActions", "ToastAction", "Action", "ToastClose", "Close", "Toast", "Body", "Actions"]
|
|
7
7
|
}
|