@dxos/react-ui 0.8.4-main.72ec0f3 → 0.8.4-main.7996785055
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-LUPEFGHJ.mjs +776 -0
- package/dist/lib/browser/chunk-LUPEFGHJ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +4097 -68
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +74 -63
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-EQOBFLZC.mjs +778 -0
- package/dist/lib/node-esm/chunk-EQOBFLZC.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +4097 -68
- 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 +74 -63
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- 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/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/src/components/Button/Button.d.ts +3 -3
- package/dist/types/src/components/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/Button/IconButton.d.ts +2 -1
- package/dist/types/src/components/Button/IconButton.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/ToggleGroup.d.ts +10 -10
- package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -1
- package/dist/types/src/components/Button/ToggleGroup.stories.d.ts +4 -4
- package/dist/types/src/components/Card/Card.d.ts +145 -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/index.d.ts +10 -1
- package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
- package/dist/types/src/components/DensityProvider/DensityProvider.d.ts +1 -1
- package/dist/types/src/components/DensityProvider/DensityProvider.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/AlertDialog.d.ts +41 -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 +56 -21
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts +10 -10
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts +1 -1
- package/dist/types/src/components/ElevationProvider/ElevationProvider.d.ts.map +1 -1
- package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts +11 -0
- package/dist/types/src/components/ErrorFallback/ErrorFallback.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts +7 -0
- package/dist/types/src/components/ErrorFallback/ErrorFallback.stories.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts +8 -0
- package/dist/types/src/components/ErrorFallback/ErrorStack.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/ThrowError.d.ts +9 -0
- package/dist/types/src/components/ErrorFallback/ThrowError.d.ts.map +1 -0
- package/dist/types/src/components/ErrorFallback/index.d.ts +5 -0
- package/dist/types/src/components/ErrorFallback/index.d.ts.map +1 -0
- package/dist/types/src/components/Focus/Focus.d.ts +44 -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 +4 -1
- 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 +7 -7
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +8 -8
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/List/List.d.ts +10 -4
- package/dist/types/src/components/List/List.d.ts.map +1 -1
- package/dist/types/src/components/List/List.stories.d.ts +8 -2
- package/dist/types/src/components/List/List.stories.d.ts.map +1 -1
- package/dist/types/src/components/List/Treegrid.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/{Menus → Menu}/ContextMenu.d.ts +6 -6
- package/dist/types/src/components/Menu/ContextMenu.d.ts.map +1 -0
- package/dist/types/src/components/Menu/ContextMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/Menu/DropdownMenu.d.ts +113 -0
- package/dist/types/src/components/Menu/DropdownMenu.d.ts.map +1 -0
- package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts +28 -0
- package/dist/types/src/components/Menu/DropdownMenu.stories.d.ts.map +1 -0
- package/dist/types/src/components/Menu/index.d.ts.map +1 -0
- package/dist/types/src/components/Message/Message.d.ts +1 -1
- package/dist/types/src/components/Message/Message.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +5 -6
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +33 -24
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +32 -24
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +65 -8
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +27 -9
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +8 -3
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.d.ts +9 -9
- 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 +4 -4
- 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 +37 -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 +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 +3 -3
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/types/src/components/{Menus/DropdownMenu.stories.d.ts → ThemeProvider/ThemeProvider.stories.d.ts} +2 -5
- package/dist/types/src/components/ThemeProvider/ThemeProvider.stories.d.ts.map +1 -0
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -8
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/index.d.ts +2 -1
- package/dist/types/src/components/ThemeProvider/index.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.d.ts +19 -19
- package/dist/types/src/components/Toast/Toast.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +43 -17
- package/dist/types/src/components/Toolbar/Toolbar.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 +10 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/exemplars/generics.stories.d.ts +23 -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 +2 -2
- package/dist/types/src/hooks/useDensityContext.d.ts.map +1 -1
- package/dist/types/src/hooks/useElevationContext.d.ts +1 -1
- package/dist/types/src/hooks/useElevationContext.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -1
- 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 +51 -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 +11 -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 +15 -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 +14 -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 +46 -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 +3 -3
- package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withLayoutVariants.d.ts +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/index.d.ts +1 -2
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/usePx.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +40 -31
- package/src/components/Avatars/Avatar.stories.tsx +7 -8
- package/src/components/Avatars/Avatar.tsx +6 -13
- package/src/components/Avatars/AvatarGroup.stories.tsx +2 -2
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +3 -3
- package/src/components/Breadcrumb/Breadcrumb.tsx +11 -37
- package/src/components/Button/Button.stories.tsx +3 -3
- package/src/components/Button/Button.tsx +12 -26
- package/src/components/Button/IconButton.stories.tsx +4 -4
- package/src/components/Button/IconButton.tsx +9 -5
- package/src/components/Button/Toggle.stories.tsx +2 -2
- package/src/components/Button/Toggle.tsx +4 -4
- package/src/components/Button/ToggleGroup.stories.tsx +2 -2
- package/src/components/Button/ToggleGroup.tsx +12 -16
- package/src/components/Card/Card.stories.tsx +151 -0
- package/src/components/Card/Card.tsx +394 -0
- package/src/components/Card/index.ts +5 -0
- package/src/components/Clipboard/CopyButton.tsx +6 -6
- package/src/components/DensityProvider/DensityProvider.tsx +1 -1
- package/src/components/Dialog/AlertDialog.stories.tsx +16 -16
- package/src/components/Dialog/AlertDialog.tsx +121 -82
- package/src/components/Dialog/Dialog.stories.tsx +139 -28
- package/src/components/Dialog/Dialog.tsx +192 -71
- package/src/components/ElevationProvider/ElevationProvider.tsx +1 -1
- package/src/components/ErrorFallback/ErrorFallback.stories.tsx +50 -0
- package/src/components/ErrorFallback/ErrorFallback.tsx +70 -0
- package/src/components/ErrorFallback/ErrorStack.tsx +80 -0
- package/src/components/ErrorFallback/ThrowError.tsx +37 -0
- package/src/components/ErrorFallback/index.ts +9 -0
- package/src/components/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 -14
- package/src/components/Icon/Icon.tsx +7 -3
- package/src/components/Image/Image.stories.tsx +86 -0
- package/src/components/Image/Image.tsx +223 -0
- package/src/components/Image/index.ts +5 -0
- package/src/components/Input/Input.stories.tsx +21 -40
- package/src/components/Input/Input.tsx +36 -72
- package/src/components/Link/Link.stories.tsx +2 -2
- package/src/components/Link/Link.tsx +2 -2
- package/src/components/List/List.stories.tsx +30 -33
- package/src/components/List/List.tsx +16 -19
- package/src/components/List/ListDropIndicator.tsx +7 -7
- package/src/components/List/Tree.stories.tsx +5 -5
- package/src/components/List/TreeDropIndicator.tsx +6 -6
- package/src/components/List/Treegrid.stories.tsx +3 -3
- package/src/components/List/Treegrid.tsx +10 -15
- package/src/components/Main/Main.stories.tsx +41 -23
- package/src/components/Main/Main.tsx +139 -82
- package/src/components/{Menus → Menu}/ContextMenu.stories.tsx +2 -2
- package/src/components/{Menus → Menu}/ContextMenu.tsx +9 -33
- package/src/components/{Menus → Menu}/DropdownMenu.stories.tsx +2 -2
- package/src/components/{Menus → Menu}/DropdownMenu.tsx +119 -109
- package/src/components/Message/Message.stories.tsx +28 -13
- package/src/components/Message/Message.tsx +43 -34
- package/src/components/Popover/Popover.stories.tsx +4 -4
- package/src/components/Popover/Popover.tsx +97 -92
- package/src/components/ScrollArea/ScrollArea.stories.tsx +222 -32
- package/src/components/ScrollArea/ScrollArea.tsx +97 -79
- package/src/components/ScrollArea/index.ts +1 -1
- package/src/components/ScrollContainer/ScrollContainer.stories.tsx +43 -22
- package/src/components/ScrollContainer/ScrollContainer.tsx +193 -104
- package/src/components/Select/Select.stories.tsx +4 -4
- package/src/components/Select/Select.tsx +11 -27
- package/src/components/Separator/Separator.tsx +5 -8
- package/src/components/Skeleton/Skeleton.stories.tsx +52 -0
- package/src/components/Skeleton/Skeleton.tsx +26 -0
- package/src/components/Skeleton/index.ts +5 -0
- package/src/components/Splitter/Splitter.stories.tsx +83 -0
- package/src/components/Splitter/Splitter.tsx +140 -0
- package/src/components/Splitter/index.ts +5 -0
- package/src/components/Status/Status.stories.tsx +21 -17
- package/src/components/Status/Status.tsx +10 -7
- package/src/components/Tag/Tag.stories.tsx +6 -11
- package/src/components/Tag/Tag.tsx +3 -8
- package/src/components/ThemeProvider/ThemeProvider.stories.tsx +32 -0
- package/src/components/ThemeProvider/ThemeProvider.tsx +10 -9
- package/src/components/ThemeProvider/TranslationsProvider.tsx +1 -16
- package/src/components/ThemeProvider/index.ts +3 -3
- package/src/components/Toast/Toast.stories.tsx +2 -2
- package/src/components/Toast/Toast.tsx +22 -41
- package/src/components/Toolbar/Toolbar.stories.tsx +2 -2
- package/src/components/Toolbar/Toolbar.tsx +183 -22
- package/src/components/Tooltip/Tooltip.stories.tsx +16 -14
- package/src/components/Tooltip/Tooltip.tsx +40 -38
- package/src/components/index.ts +11 -6
- 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 +3 -3
- package/src/hooks/useElevationContext.ts +1 -1
- package/src/index.ts +2 -1
- package/src/playground/Controls.stories.tsx +3 -10
- package/src/playground/Custom.stories.tsx +11 -21
- 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 +30 -0
- package/src/primitives/Container/Container.tsx +19 -0
- package/src/primitives/Container/index.ts +5 -0
- package/src/primitives/Flex/Flex.stories.tsx +58 -0
- package/src/primitives/Flex/Flex.tsx +24 -0
- package/src/primitives/Flex/index.ts +5 -0
- package/src/primitives/Grid/Grid.stories.tsx +57 -0
- package/src/primitives/Grid/Grid.tsx +30 -0
- package/src/primitives/Grid/index.ts +5 -0
- package/src/primitives/Panel/Panel.stories.tsx +67 -0
- package/src/primitives/Panel/Panel.tsx +114 -0
- package/src/primitives/Panel/index.ts +5 -0
- package/src/primitives/index.ts +9 -0
- package/src/testing/Loading.tsx +26 -0
- package/src/testing/decorators/withLayout.tsx +39 -18
- package/src/testing/decorators/withLayoutVariants.tsx +20 -23
- package/src/testing/decorators/withTheme.tsx +26 -20
- package/src/testing/index.ts +2 -0
- package/src/translations.ts +19 -0
- package/src/util/index.ts +2 -2
- package/src/util/usePx.ts +1 -0
- package/dist/lib/browser/chunk-53MI2QCM.mjs +0 -4707
- package/dist/lib/browser/chunk-53MI2QCM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ID67AFFF.mjs +0 -4709
- package/dist/lib/node-esm/chunk-ID67AFFF.mjs.map +0 -7
- package/dist/types/src/components/AnchoredOverflow/AnchoredOverflow.d.ts +0 -15
- package/dist/types/src/components/AnchoredOverflow/AnchoredOverflow.d.ts.map +0 -1
- package/dist/types/src/components/AnchoredOverflow/index.d.ts +0 -2
- package/dist/types/src/components/AnchoredOverflow/index.d.ts.map +0 -1
- package/dist/types/src/components/Menus/ContextMenu.d.ts.map +0 -1
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +0 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts +0 -113
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +0 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +0 -1
- package/dist/types/src/components/Menus/index.d.ts.map +0 -1
- package/dist/types/src/util/ThemedClassName.d.ts +0 -5
- package/dist/types/src/util/ThemedClassName.d.ts.map +0 -1
- package/dist/types/src/util/domino.d.ts +0 -18
- package/dist/types/src/util/domino.d.ts.map +0 -1
- package/src/components/AnchoredOverflow/AnchoredOverflow.tsx +0 -59
- package/src/components/AnchoredOverflow/index.ts +0 -5
- package/src/util/ThemedClassName.ts +0 -7
- package/src/util/domino.ts +0 -53
- /package/dist/types/src/components/{Menus → Menu}/ContextMenu.stories.d.ts +0 -0
- /package/dist/types/src/components/{Menus → Menu}/index.d.ts +0 -0
- /package/src/components/{Menus → Menu}/index.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type MessageValence } from '@dxos/
|
|
3
|
+
import { type MessageValence } from '@dxos/ui-types';
|
|
4
4
|
import { type CheckboxProps, type PinInputProps, type SwitchProps, type TextAreaProps, type TextInputProps } from './Input';
|
|
5
5
|
type VariantMap = {
|
|
6
6
|
text: TextInputProps;
|
|
@@ -14,7 +14,7 @@ type Variant = {
|
|
|
14
14
|
type: K;
|
|
15
15
|
} & VariantMap[K];
|
|
16
16
|
}[keyof VariantMap];
|
|
17
|
-
type
|
|
17
|
+
type DefaultStoryProps = Partial<{
|
|
18
18
|
kind: keyof VariantMap;
|
|
19
19
|
label: string;
|
|
20
20
|
labelVisuallyHidden: boolean;
|
|
@@ -26,19 +26,19 @@ type BaseProps = Partial<{
|
|
|
26
26
|
declare const meta: {
|
|
27
27
|
title: string;
|
|
28
28
|
component: any;
|
|
29
|
-
render: (props:
|
|
29
|
+
render: ({ kind, label, description, labelVisuallyHidden, descriptionVisuallyHidden, validationValence, validationMessage, ...props }: DefaultStoryProps) => React.JSX.Element;
|
|
30
30
|
decorators: import("@storybook/react").Decorator[];
|
|
31
31
|
};
|
|
32
32
|
export default meta;
|
|
33
|
-
type Story = StoryObj<
|
|
34
|
-
export declare const
|
|
33
|
+
type Story = StoryObj<DefaultStoryProps & Variant>;
|
|
34
|
+
export declare const DensityCoarse: Story;
|
|
35
35
|
export declare const DensityFine: Story;
|
|
36
36
|
export declare const Subdued: Story;
|
|
37
37
|
export declare const Disabled: Story;
|
|
38
38
|
export declare const LabelVisuallyHidden: Story;
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
39
|
+
export declare const WithDescription: Story;
|
|
40
|
+
export declare const WithErrorAndDescription: Story;
|
|
41
|
+
export declare const WithValidationAndDescription: Story;
|
|
42
42
|
export declare const TextArea: Story;
|
|
43
43
|
export declare const PinInput: Story;
|
|
44
44
|
export declare const Checkbox: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIrD,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,SAAS,CAAC;AAEjB,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,QAAQ,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,KAAK,OAAO,GAAG;KAAG,CAAC,IAAI,MAAM,UAAU,GAAG;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,GAAG,UAAU,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,UAAU,CAAC,CAAC;AAE1F,KAAK,iBAAiB,GAAG,OAAO,CAAC;IAC/B,IAAI,EAAE,MAAM,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,OAAO,CAAC;IACnC,iBAAiB,EAAE,cAAc,CAAC;IAClC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC,CAAC;AA8BH,QAAA,MAAM,IAAI;;eAEiB,GAAG;2IArB3B,iBAAiB;;CAwBiB,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,iBAAiB,GAAG,OAAO,CAAC,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,KAa3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAazB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAOjC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAO7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KASrC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,KAS1C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import React, { type ComponentPropsWithoutRef, type FC, type ForwardRefExoticComponent } from 'react';
|
|
2
2
|
import { LIST_ITEM_NAME, LIST_NAME, type ListItemCollapsibleContentProps, type ListItemScopedProps, type ListItemHeadingProps as ListPrimitiveItemHeadingProps, type ListItemOpenTriggerProps as ListPrimitiveItemOpenTriggerProps, type ListItemProps as ListPrimitiveItemProps, type ListProps as ListPrimitiveProps, type ListScopedProps, useListContext, useListItemContext } from '@dxos/react-list';
|
|
3
|
-
import { type Density } from '@dxos/
|
|
3
|
+
import { type Density } from '@dxos/ui-types';
|
|
4
4
|
import { type ThemedClassName } from '../../util';
|
|
5
5
|
import { ListDropIndicator } from './ListDropIndicator';
|
|
6
|
-
type ListProps = ThemedClassName<ListPrimitiveProps
|
|
6
|
+
type ListProps = ThemedClassName<ListPrimitiveProps & {
|
|
7
7
|
density?: Density;
|
|
8
|
-
}
|
|
9
|
-
declare const List: React.ForwardRefExoticComponent<Omit<ListProps, "
|
|
8
|
+
}>;
|
|
9
|
+
declare const List: React.ForwardRefExoticComponent<Omit<ListProps, "className"> & {
|
|
10
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
11
|
+
} & {
|
|
12
|
+
className?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
role?: string;
|
|
15
|
+
} & React.RefAttributes<HTMLOListElement>>;
|
|
10
16
|
type ListItemEndcapProps = ThemedClassName<ComponentPropsWithoutRef<'div'>> & {
|
|
11
17
|
asChild?: boolean;
|
|
12
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,wBAAwB,EAAE,KAAK,EAAE,EAAE,KAAK,yBAAyB,EAAc,MAAM,OAAO,CAAC;AAElH,OAAO,EACL,cAAc,EACd,SAAS,EAET,KAAK,+BAA+B,EACpC,KAAK,mBAAmB,EAIxB,KAAK,oBAAoB,IAAI,6BAA6B,EAE1D,KAAK,wBAAwB,IAAI,iCAAiC,EAClE,KAAK,aAAa,IAAI,sBAAsB,EAC5C,KAAK,SAAS,IAAI,kBAAkB,EACpC,KAAK,eAAe,EACpB,cAAc,EACd,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,KAAK,SAAS,GAAG,eAAe,CAAC,kBAAkB,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE7E,QAAA,MAAM,IAAI;;;;;;0CAYR,CAAC;AAEH,KAAK,mBAAmB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA6BpG,KAAK,oBAAoB,GAAG,eAAe,CAAC,6BAA6B,CAAC,CAAC;AAkB3E,KAAK,wBAAwB,GAAG,eAAe,CAAC,iCAAiC,CAAC,CAAC;AAyBnF,KAAK,iBAAiB,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC;AAkBjE,eAAO,MAAM,QAAQ,EAAE;IACrB,IAAI,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;IACnD,MAAM,EAAE,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;IACvD,OAAO,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;IACzD,WAAW,EAAE,yBAAyB,CAAC,wBAAwB,CAAC,CAAC;IACjE,kBAAkB,EAAE,yBAAyB,CAAC,+BAA+B,CAAC,CAAC;IAC/E,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACxF,aAAa,EAAE,OAAO,iBAAiB,CAAC;CASzC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,kBAAkB,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;AAE/E,YAAY,EACV,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,+BAA+B,GAChC,CAAC"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { type ReactNode } from 'react';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<Omit<import("./List").ListProps, "
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<import("./List").ListProps, "className"> & {
|
|
6
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
7
|
+
} & {
|
|
8
|
+
className?: string;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
role?: string;
|
|
11
|
+
} & React.RefAttributes<HTMLOListElement>>;
|
|
6
12
|
decorators: import("@storybook/react").Decorator[];
|
|
7
13
|
};
|
|
8
14
|
export default meta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"List.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/List.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;AASrE,QAAA,MAAM,IAAI;;;;;;;;;;CAImB,CAAC;AAE9B,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAuBnC,eAAO,MAAM,oBAAoB,EAAE,KAoClC,CAAC;AAgCF,eAAO,MAAM,kBAAkB,EAAE,KA8ChC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA8BzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAqC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Treegrid.d.ts","sourceRoot":"","sources":["../../../../../src/components/List/Treegrid.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,yBAAyB,CAAC;AACzE,OAAO,EA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;;;;;;;;CAQpB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DialogContent } from '@radix-ui/react-dialog';
|
|
2
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
3
3
|
import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type Dispatch, type KeyboardEvent, type PropsWithChildren, type SetStateAction } from 'react';
|
|
4
|
+
import { type MainStyleProps } from '@dxos/ui-theme';
|
|
4
5
|
import { type ThemedClassName } from '../../util';
|
|
5
6
|
import { type Label } from '../ThemeProvider';
|
|
6
7
|
/**
|
|
@@ -9,9 +10,9 @@ import { type Label } from '../ThemeProvider';
|
|
|
9
10
|
*/
|
|
10
11
|
declare const useLandmarkMover: (propsOnKeyDown: ComponentPropsWithoutRef<"div">["onKeyDown"], landmark: string) => {
|
|
11
12
|
"data-tabster": string | undefined;
|
|
12
|
-
onKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
13
13
|
"data-main-landmark": string;
|
|
14
14
|
tabIndex: number;
|
|
15
|
+
onKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
15
16
|
};
|
|
16
17
|
type SidebarState = 'expanded' | 'collapsed' | 'closed';
|
|
17
18
|
type MainContextValue = {
|
|
@@ -22,7 +23,7 @@ type MainContextValue = {
|
|
|
22
23
|
setComplementarySidebarState: Dispatch<SetStateAction<SidebarState | undefined>>;
|
|
23
24
|
};
|
|
24
25
|
declare const useMainContext: (consumerName: string) => MainContextValue;
|
|
25
|
-
declare const useSidebars: (consumerName
|
|
26
|
+
declare const useSidebars: (consumerName: string) => {
|
|
26
27
|
navigationSidebarState: SidebarState;
|
|
27
28
|
setNavigationSidebarState: React.Dispatch<React.SetStateAction<SidebarState | undefined>>;
|
|
28
29
|
toggleNavigationSidebar: () => void;
|
|
@@ -44,32 +45,30 @@ type MainRootProps = PropsWithChildren<{
|
|
|
44
45
|
defaultComplementarySidebarState?: SidebarState;
|
|
45
46
|
onComplementarySidebarStateChange?: (nextState: SidebarState) => void;
|
|
46
47
|
}>;
|
|
48
|
+
type MainOverlayProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.div>, 'children' | 'onClick'>>;
|
|
47
49
|
type MainSidebarProps = ThemedClassName<ComponentPropsWithRef<typeof DialogContent>> & {
|
|
48
50
|
swipeToDismiss?: boolean;
|
|
49
51
|
state?: SidebarState;
|
|
50
52
|
resizing?: boolean;
|
|
51
53
|
onStateChange?: (nextState: SidebarState) => void;
|
|
52
|
-
side: '
|
|
54
|
+
side: 'w-start' | 'w-end';
|
|
53
55
|
label: Label;
|
|
54
56
|
};
|
|
55
57
|
type MainNavigationSidebarProps = Omit<MainSidebarProps, 'expanded' | 'side'>;
|
|
56
58
|
type MainComplementarySidebarProps = Omit<MainSidebarProps, 'expanded' | 'side'>;
|
|
57
|
-
type
|
|
59
|
+
type MainContentProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div> & MainStyleProps & {
|
|
58
60
|
asChild?: boolean;
|
|
59
|
-
|
|
60
|
-
handlesFocus?: boolean;
|
|
61
|
-
};
|
|
62
|
-
type MainOverlayProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.div>, 'children'>>;
|
|
61
|
+
}>;
|
|
63
62
|
export declare const Main: {
|
|
64
63
|
Root: {
|
|
65
64
|
({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState, onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState, onComplementarySidebarStateChange, children, ...props }: MainRootProps): React.JSX.Element;
|
|
66
65
|
displayName: string;
|
|
67
66
|
};
|
|
68
|
-
Content: React.ForwardRefExoticComponent<Omit<MainProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
69
67
|
Overlay: React.ForwardRefExoticComponent<Omit<MainOverlayProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
+
Content: React.ForwardRefExoticComponent<Omit<MainContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
70
69
|
NavigationSidebar: React.ForwardRefExoticComponent<Omit<MainNavigationSidebarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
71
70
|
ComplementarySidebar: React.ForwardRefExoticComponent<Omit<MainComplementarySidebarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
72
71
|
};
|
|
73
72
|
export { useMainContext, useSidebars, useLandmarkMover };
|
|
74
|
-
export type { MainRootProps,
|
|
73
|
+
export type { MainRootProps, MainOverlayProps, MainContentProps, MainNavigationSidebarProps, SidebarState };
|
|
75
74
|
//# sourceMappingURL=Main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/Main/Main.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAmC,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAMpB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../../../../src/components/Main/Main.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAmC,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAMpB,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,KAAK,cAAc,EAAkB,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,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CAAC,OAAO,aAAa,CAAC,CAAC,GAAG;IACrF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AA2DF,KAAK,0BAA0B,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AAyB9E,KAAK,6BAA6B,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AA0BjF,KAAK,gBAAgB,GAAG,eAAe,CACrC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,GACzC,cAAc,GAAG;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACJ,CAAC;AAgCF,eAAO,MAAM,IAAI;;qRArPd,aAAa;;;;;;;CA2Pf,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;AAEzD,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Main.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Main/Main.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Main.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Main/Main.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,KAAK,aAAa,GAAG,EAAE,CAAC;AAuDxB,QAAA,MAAM,IAAI;;;;;;oBA7BmB,aAAa;;;;;CAqCL,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -23,27 +23,27 @@ export declare const ContextMenu: {
|
|
|
23
23
|
Trigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
24
24
|
Portal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
25
25
|
Content: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps, "className"> & {
|
|
26
|
-
classNames?: import("@dxos/
|
|
26
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
27
27
|
} & {
|
|
28
28
|
constrainBlockSize?: boolean;
|
|
29
29
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
30
30
|
Viewport: React.ForwardRefExoticComponent<Omit<ContextMenuViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
31
|
Arrow: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuArrowProps, "className"> & {
|
|
32
|
-
classNames?: import("@dxos/
|
|
32
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
33
33
|
} & React.RefAttributes<SVGSVGElement>>;
|
|
34
34
|
Group: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
35
|
Item: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps, "className"> & {
|
|
36
|
-
classNames?: import("@dxos/
|
|
36
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
37
37
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
38
38
|
CheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps, "className"> & {
|
|
39
|
-
classNames?: import("@dxos/
|
|
39
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
40
40
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
41
41
|
ItemIndicator: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
42
42
|
Separator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps, "className"> & {
|
|
43
|
-
classNames?: import("@dxos/
|
|
43
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
44
44
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
45
45
|
GroupLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps, "className"> & {
|
|
46
|
-
classNames?: import("@dxos/
|
|
46
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
47
47
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
48
48
|
};
|
|
49
49
|
export type { ContextMenuRootProps, ContextMenuTriggerProps, ContextMenuPortalProps, ContextMenuContentProps, ContextMenuViewportProps, ContextMenuArrowProps, ContextMenuGroupProps, ContextMenuItemProps, ContextMenuCheckboxItemProps, ContextMenuItemIndicatorProps, ContextMenuSeparatorProps, ContextMenuGroupLabelProps, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Menu/ContextMenu.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,MAAM,OAAO,CAAC;AAItE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,K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
1
|
+
{"version":3,"file":"ContextMenu.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Menu/ContextMenu.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAwF1B,QAAA,MAAM,IAAI;;eAEuB,GAAG;;;CAGC,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { Scope } from '@radix-ui/react-context';
|
|
2
|
+
import * as MenuPrimitive from '@radix-ui/react-menu';
|
|
3
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
4
|
+
import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type ComponentRef, PropsWithChildren, type ReactNode, type RefObject } from 'react';
|
|
5
|
+
import { type ThemedClassName } from '../../util';
|
|
6
|
+
type Direction = 'ltr' | 'rtl';
|
|
7
|
+
type ScopedProps<P> = P & {
|
|
8
|
+
__scopeDropdownMenu?: Scope;
|
|
9
|
+
};
|
|
10
|
+
declare const createDropdownMenuScope: import("@radix-ui/react-context").CreateScope;
|
|
11
|
+
type DropdownMenuContextValue = {
|
|
12
|
+
triggerId: string;
|
|
13
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
14
|
+
contentId: string;
|
|
15
|
+
open: boolean;
|
|
16
|
+
onOpenChange(open: boolean): void;
|
|
17
|
+
onOpenToggle(): void;
|
|
18
|
+
modal: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare const useDropdownMenuContext: (consumerName: string, scope: Scope<DropdownMenuContextValue | undefined>) => DropdownMenuContextValue;
|
|
21
|
+
type DropdownMenuRootProps = PropsWithChildren<{
|
|
22
|
+
dir?: Direction;
|
|
23
|
+
modal?: boolean;
|
|
24
|
+
open?: boolean;
|
|
25
|
+
defaultOpen?: boolean;
|
|
26
|
+
onOpenChange?(open: boolean): void;
|
|
27
|
+
}>;
|
|
28
|
+
type DropdownMenuTriggerElement = ComponentRef<typeof Primitive.button>;
|
|
29
|
+
type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
30
|
+
type DropdownMenuTriggerProps = PrimitiveButtonProps;
|
|
31
|
+
type DropdownMenuVirtualTriggerProps = {
|
|
32
|
+
virtualRef: RefObject<DropdownMenuTriggerElement | null>;
|
|
33
|
+
};
|
|
34
|
+
type MenuPortalProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
|
|
35
|
+
type DropdownMenuPortalProps = MenuPortalProps;
|
|
36
|
+
type DropdownMenuViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
37
|
+
asChild?: boolean;
|
|
38
|
+
};
|
|
39
|
+
type MenuContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Content>>;
|
|
40
|
+
type DropdownMenuContentProps = Omit<MenuContentProps, 'onEntryFocus'>;
|
|
41
|
+
type MenuGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
|
|
42
|
+
type DropdownMenuGroupProps = MenuGroupProps;
|
|
43
|
+
type MenuLabelProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Label>>;
|
|
44
|
+
type DropdownMenuLabelProps = MenuLabelProps;
|
|
45
|
+
type MenuItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Item>>;
|
|
46
|
+
type DropdownMenuItemProps = MenuItemProps;
|
|
47
|
+
type MenuCheckboxItemProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>>;
|
|
48
|
+
type DropdownMenuCheckboxItemProps = MenuCheckboxItemProps;
|
|
49
|
+
type MenuRadioGroupProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
|
|
50
|
+
type DropdownMenuRadioGroupProps = MenuRadioGroupProps;
|
|
51
|
+
type MenuRadioItemProps = ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
|
|
52
|
+
type DropdownMenuRadioItemProps = ThemedClassName<MenuRadioItemProps>;
|
|
53
|
+
type MenuItemIndicatorProps = ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
|
|
54
|
+
type DropdownMenuItemIndicatorProps = MenuItemIndicatorProps;
|
|
55
|
+
type MenuSeparatorProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>>;
|
|
56
|
+
type DropdownMenuSeparatorProps = MenuSeparatorProps;
|
|
57
|
+
type MenuArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>>;
|
|
58
|
+
type DropdownMenuArrowProps = MenuArrowProps;
|
|
59
|
+
type DropdownMenuSubProps = {
|
|
60
|
+
children?: ReactNode;
|
|
61
|
+
open?: boolean;
|
|
62
|
+
defaultOpen?: boolean;
|
|
63
|
+
onOpenChange?(open: boolean): void;
|
|
64
|
+
};
|
|
65
|
+
type MenuSubTriggerProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
|
|
66
|
+
type DropdownMenuSubTriggerProps = MenuSubTriggerProps;
|
|
67
|
+
type MenuSubContentProps = ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
|
|
68
|
+
type DropdownMenuSubContentProps = MenuSubContentProps;
|
|
69
|
+
export declare const DropdownMenu: {
|
|
70
|
+
Root: {
|
|
71
|
+
({ __scopeDropdownMenu, children, dir, modal, open: openProp, defaultOpen, onOpenChange, }: ScopedProps<DropdownMenuRootProps>): React.JSX.Element;
|
|
72
|
+
displayName: string;
|
|
73
|
+
};
|
|
74
|
+
Trigger: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
75
|
+
asChild?: boolean;
|
|
76
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
77
|
+
VirtualTrigger: {
|
|
78
|
+
(props: ScopedProps<DropdownMenuVirtualTriggerProps>): React.JSX.Element;
|
|
79
|
+
displayName: string;
|
|
80
|
+
};
|
|
81
|
+
Portal: React.FC<MenuPrimitive.MenuPortalProps>;
|
|
82
|
+
Content: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
83
|
+
Viewport: React.ForwardRefExoticComponent<Omit<DropdownMenuViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
Group: React.ForwardRefExoticComponent<Omit<MenuPrimitive.MenuGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
GroupLabel: React.ForwardRefExoticComponent<Omit<Omit<MenuPrimitive.MenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
86
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
87
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
88
|
+
Item: React.ForwardRefExoticComponent<Omit<Omit<MenuPrimitive.MenuItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
89
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
90
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
+
CheckboxItem: React.ForwardRefExoticComponent<Omit<Omit<MenuPrimitive.MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
92
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
93
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
94
|
+
RadioGroup: React.ForwardRefExoticComponent<Omit<MenuPrimitive.MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
RadioItem: React.ForwardRefExoticComponent<Omit<Omit<MenuPrimitive.MenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
96
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
97
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
98
|
+
ItemIndicator: React.ForwardRefExoticComponent<Omit<MenuPrimitive.MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
99
|
+
Separator: React.ForwardRefExoticComponent<Omit<Omit<MenuPrimitive.MenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
100
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
101
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
102
|
+
Arrow: React.ForwardRefExoticComponent<Omit<Omit<MenuPrimitive.MenuArrowProps & React.RefAttributes<SVGSVGElement>, "ref">, "className"> & {
|
|
103
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
104
|
+
} & React.RefAttributes<SVGSVGElement>>;
|
|
105
|
+
Sub: React.FC<DropdownMenuSubProps>;
|
|
106
|
+
SubTrigger: React.ForwardRefExoticComponent<Omit<MenuPrimitive.MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
SubContent: React.ForwardRefExoticComponent<Omit<MenuPrimitive.MenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
108
|
+
};
|
|
109
|
+
type DropdownMenuScope = Scope;
|
|
110
|
+
declare const useDropdownMenuMenuScope: (scope?: DropdownMenuScope) => any;
|
|
111
|
+
export { createDropdownMenuScope, useDropdownMenuContext, useDropdownMenuMenuScope };
|
|
112
|
+
export type { DropdownMenuRootProps, DropdownMenuTriggerProps, DropdownMenuVirtualTriggerProps, DropdownMenuPortalProps, DropdownMenuContentProps, DropdownMenuViewportProps, DropdownMenuGroupProps, DropdownMenuLabelProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuItemIndicatorProps, DropdownMenuSeparatorProps, DropdownMenuArrowProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuSubContentProps, };
|
|
113
|
+
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/Menu/DropdownMenu.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,KAAK,EAAE,EACZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EAEjB,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK,CAAC;AAQ/B,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,mBAAmB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAC1D,QAAA,MAAkC,uBAAuB,+CAA6D,CAAC;AAGvH,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,IAAI,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,QAAA,MAA6B,sBAAsB,wGACsB,CAAC;AAE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AAK,2BAA2B,GAAG,mBAAmB,CAAC;AAmBvD,KAAK,mBAAmB,GAAG,wBAAwB,CAAC,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC;AACrF,KAAK,2BAA2B,GAAG,mBAAmB,CAAC;AAkCvD,eAAO,MAAM,YAAY;;oGAviBtB,WAAW,CAAC,qBAAqB,CAAC;;;;;;;gBAwGM,WAAW,CAAC,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkdtF,CAAC;AAEF,KAAK,iBAAiB,GAAG,KAAK,CAAC;AAE/B,QAAA,MAAM,wBAAwB,EAAE,CAAC,KAAK,CAAC,EAAE,iBAAiB,KAAK,GAAkB,CAAC;AAElF,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,CAAC;AAErF,YAAY,EACV,qBAAqB,EACrB,wBAAwB,EACxB,+BAA+B,EAC/B,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,8BAA8B,EAC9B,0BAA0B,EAC1B,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,GAC5B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
({ __scopeDropdownMenu, children, dir, modal, open: openProp, defaultOpen, onOpenChange, }: {
|
|
7
|
+
dir?: "ltr" | "rtl";
|
|
8
|
+
modal?: boolean;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?(open: boolean): void;
|
|
12
|
+
} & {
|
|
13
|
+
children?: React.ReactNode | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
__scopeDropdownMenu?: import("@radix-ui/react-context").Scope;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
render: () => React.JSX.Element;
|
|
20
|
+
decorators: import("@storybook/react").Decorator[];
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
export declare const VirtualTrigger: {
|
|
26
|
+
render: () => React.JSX.Element;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=DropdownMenu.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Menu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAA2B,MAAM,OAAO,CAAC;AAwFhD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAK2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,cAAc;;CAqC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Menu/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
2
2
|
import React, { type ComponentPropsWithRef } from 'react';
|
|
3
|
-
import { type Elevation, type MessageValence } from '@dxos/
|
|
3
|
+
import { type Elevation, type MessageValence } from '@dxos/ui-types';
|
|
4
4
|
import { type ThemedClassName } from '../../util';
|
|
5
5
|
declare const messageIcons: Record<MessageValence, string>;
|
|
6
6
|
type MessageRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAMhD,CAAC;AAEF,KAAK,gBAAgB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG;IACrF,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAuDF,KAAK,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG;IACjG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAyBF,KAAK,mBAAmB,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG;IACnG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAuBF,eAAO,MAAM,OAAO;;;;CAInB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;CAAU,CAAC;AAE/B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { type MessageValence } from '@dxos/
|
|
4
|
-
type
|
|
3
|
+
import { type MessageValence } from '@dxos/ui-types';
|
|
4
|
+
type DefaultStoryProps = {
|
|
5
5
|
valence: MessageValence;
|
|
6
6
|
title: string;
|
|
7
7
|
body: string;
|
|
@@ -9,12 +9,10 @@ type StoryProps = {
|
|
|
9
9
|
declare const meta: {
|
|
10
10
|
title: string;
|
|
11
11
|
component: any;
|
|
12
|
-
render: ({ valence, title, body }:
|
|
12
|
+
render: ({ valence, title, body }: DefaultStoryProps) => React.JSX.Element;
|
|
13
13
|
decorators: import("@storybook/react").Decorator[];
|
|
14
14
|
parameters: {
|
|
15
|
-
|
|
16
|
-
disableSnapshot: boolean;
|
|
17
|
-
};
|
|
15
|
+
layout: string;
|
|
18
16
|
};
|
|
19
17
|
argTypes: {
|
|
20
18
|
valence: {
|
|
@@ -26,4 +24,5 @@ declare const meta: {
|
|
|
26
24
|
export default meta;
|
|
27
25
|
type Story = StoryObj<typeof meta>;
|
|
28
26
|
export declare const Default: Story;
|
|
27
|
+
export declare const Error: Story;
|
|
29
28
|
//# sourceMappingURL=Message.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Message.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Message/Message.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAQrD,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAWF,QAAA,MAAM,IAAI;;eAEmB,GAAG;uCAXgB,iBAAiB;;;;;;;;;;;CAuB5B,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC"}
|
|
@@ -4,31 +4,31 @@ import { FocusScope } from '@radix-ui/react-focus-scope';
|
|
|
4
4
|
import * as PopperPrimitive from '@radix-ui/react-popper';
|
|
5
5
|
import { Portal as PortalPrimitive } from '@radix-ui/react-portal';
|
|
6
6
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
7
|
-
import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type
|
|
7
|
+
import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type ComponentRef, type ReactNode, type RefObject } from 'react';
|
|
8
8
|
import { type ThemedClassName } from '../../util';
|
|
9
9
|
type ScopedProps<P> = P & {
|
|
10
10
|
__scopePopover?: Scope;
|
|
11
11
|
};
|
|
12
12
|
declare const createPopoverScope: import("@radix-ui/react-context").CreateScope;
|
|
13
|
-
|
|
13
|
+
type PopoverRootProps = {
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
open?: boolean;
|
|
16
16
|
defaultOpen?: boolean;
|
|
17
17
|
onOpenChange?: (open: boolean) => void;
|
|
18
18
|
modal?: boolean;
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
type PopperAnchorProps = ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type PopoverTriggerElement = ElementRef<typeof Primitive.button>;
|
|
21
|
+
type PopoverAnchorProps = PopperAnchorProps;
|
|
22
|
+
type PopoverTriggerElement = ComponentRef<typeof Primitive.button>;
|
|
24
23
|
type PrimitiveButtonProps = ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
type PopoverTriggerProps = PrimitiveButtonProps & {
|
|
25
|
+
asChild?: boolean;
|
|
26
|
+
};
|
|
27
|
+
type PopoverVirtualTriggerProps = {
|
|
28
28
|
virtualRef: RefObject<PopoverTriggerElement | null>;
|
|
29
|
-
}
|
|
29
|
+
};
|
|
30
30
|
type PortalProps = ComponentPropsWithoutRef<typeof PortalPrimitive>;
|
|
31
|
-
|
|
31
|
+
type PopoverPortalProps = {
|
|
32
32
|
children?: ReactNode;
|
|
33
33
|
/**
|
|
34
34
|
* Specify a container element to portal the content into.
|
|
@@ -39,7 +39,7 @@ interface PopoverPortalProps {
|
|
|
39
39
|
* controlling animation with React animation libraries.
|
|
40
40
|
*/
|
|
41
41
|
forceMount?: true;
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
type PopoverContentProps = ThemedClassName<PopoverContentTypeProps> & {
|
|
44
44
|
/**
|
|
45
45
|
* Used to force mounting when more control is needed. Useful when
|
|
@@ -52,7 +52,7 @@ export interface PopoverContentTypeProps extends Omit<PopoverContentImplProps, '
|
|
|
52
52
|
type FocusScopeProps = ComponentPropsWithoutRef<typeof FocusScope>;
|
|
53
53
|
type DismissableLayerProps = ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
54
54
|
type PopperContentProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Content>>;
|
|
55
|
-
|
|
55
|
+
type PopoverContentImplProps = Omit<PopperContentProps, 'onPlaced'> & Omit<DismissableLayerProps, 'onDismiss'> & {
|
|
56
56
|
/**
|
|
57
57
|
* Whether focus should be trapped within the `Popover`
|
|
58
58
|
* (default: false)
|
|
@@ -68,12 +68,10 @@ interface PopoverContentImplProps extends Omit<PopperContentProps, 'onPlaced'>,
|
|
|
68
68
|
* Can be prevented.
|
|
69
69
|
*/
|
|
70
70
|
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}
|
|
71
|
+
};
|
|
72
|
+
type PopoverCloseProps = PrimitiveButtonProps;
|
|
74
73
|
type PopperArrowProps = ThemedClassName<ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>>;
|
|
75
|
-
|
|
76
|
-
}
|
|
74
|
+
type PopoverArrowProps = PopperArrowProps;
|
|
77
75
|
type PopoverViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
|
|
78
76
|
asChild?: boolean;
|
|
79
77
|
constrainInline?: boolean;
|
|
@@ -82,15 +80,22 @@ type PopoverViewportProps = ThemedClassName<ComponentPropsWithRef<typeof Primiti
|
|
|
82
80
|
type PopoverContentInteractOutsideEvent = Parameters<NonNullable<PopoverContentProps['onInteractOutside']>>[0];
|
|
83
81
|
export declare const Popover: {
|
|
84
82
|
Root: React.FC<PopoverRootProps>;
|
|
85
|
-
Anchor: React.ForwardRefExoticComponent<
|
|
86
|
-
Trigger: React.ForwardRefExoticComponent<
|
|
83
|
+
Anchor: React.ForwardRefExoticComponent<Omit<PopperPrimitive.PopperAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
Trigger: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
85
|
+
asChild?: boolean;
|
|
86
|
+
}, "ref"> & {
|
|
87
|
+
asChild?: boolean;
|
|
88
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
87
89
|
VirtualTrigger: {
|
|
88
90
|
(props: ScopedProps<PopoverVirtualTriggerProps>): React.JSX.Element;
|
|
89
91
|
displayName: string;
|
|
90
92
|
};
|
|
91
|
-
Portal:
|
|
93
|
+
Portal: {
|
|
94
|
+
(props: ScopedProps<PopoverPortalProps>): React.JSX.Element;
|
|
95
|
+
displayName: string;
|
|
96
|
+
};
|
|
92
97
|
Content: React.ForwardRefExoticComponent<Omit<PopoverContentTypeProps, "className"> & {
|
|
93
|
-
classNames?: import("@dxos/
|
|
98
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
94
99
|
} & {
|
|
95
100
|
/**
|
|
96
101
|
* Used to force mounting when more control is needed. Useful when
|
|
@@ -98,8 +103,12 @@ export declare const Popover: {
|
|
|
98
103
|
*/
|
|
99
104
|
forceMount?: boolean;
|
|
100
105
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
101
|
-
Close: React.ForwardRefExoticComponent<
|
|
102
|
-
|
|
106
|
+
Close: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
107
|
+
asChild?: boolean;
|
|
108
|
+
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
109
|
+
Arrow: React.ForwardRefExoticComponent<Omit<Omit<PopperPrimitive.PopperArrowProps & React.RefAttributes<SVGSVGElement>, "ref">, "className"> & {
|
|
110
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
111
|
+
} & React.RefAttributes<SVGSVGElement>>;
|
|
103
112
|
Viewport: React.ForwardRefExoticComponent<Omit<PopoverViewportProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
104
113
|
};
|
|
105
114
|
export { createPopoverScope };
|