@dxos/react-ui 0.8.4-main.5ea62a8 → 0.8.4-main.72ec0f3
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-P333G32W.mjs → chunk-53MI2QCM.mjs} +632 -299
- package/dist/lib/browser/chunk-53MI2QCM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +12 -1
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +57 -29
- package/dist/lib/browser/testing/index.mjs.map +4 -4
- package/dist/lib/node-esm/{chunk-JRCE5UVS.mjs → chunk-ID67AFFF.mjs} +632 -299
- package/dist/lib/node-esm/chunk-ID67AFFF.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +12 -1
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +57 -29
- package/dist/lib/node-esm/testing/index.mjs.map +4 -4
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +0 -6
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +0 -6
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts.map +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +0 -6
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/types/src/components/{Buttons → Button}/Button.d.ts +1 -1
- package/dist/types/src/components/Button/Button.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/Button.stories.d.ts +1 -7
- package/dist/types/src/components/Button/Button.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/IconButton.d.ts +1 -2
- package/dist/types/src/components/Button/IconButton.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/IconButton.stories.d.ts +0 -6
- package/dist/types/src/components/Button/IconButton.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/Toggle.d.ts.map +1 -0
- package/dist/types/src/components/Button/Toggle.stories.d.ts +16 -0
- package/dist/types/src/components/Button/Toggle.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/ToggleGroup.d.ts +6 -7
- package/dist/types/src/components/Button/ToggleGroup.d.ts.map +1 -0
- package/dist/types/src/components/{Buttons → Button}/ToggleGroup.stories.d.ts +2 -12
- package/dist/types/src/components/Button/ToggleGroup.stories.d.ts.map +1 -0
- package/dist/types/src/components/Button/index.d.ts.map +1 -0
- package/dist/types/src/components/Clipboard/CopyButton.d.ts +1 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
- package/dist/types/src/components/Dialog/AlertDialog.d.ts.map +1 -0
- package/dist/types/src/components/{Dialogs → Dialog}/AlertDialog.stories.d.ts +0 -6
- package/dist/types/src/components/Dialog/AlertDialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/types/src/components/{Dialogs → Dialog}/Dialog.stories.d.ts +0 -1
- package/dist/types/src/components/Dialog/Dialog.stories.d.ts.map +1 -0
- package/dist/types/src/components/Dialog/index.d.ts.map +1 -0
- package/dist/types/src/components/Icon/Icon.d.ts +1 -1
- package/dist/types/src/components/Icon/Icon.d.ts.map +1 -1
- package/dist/types/src/components/Icon/Icon.stories.d.ts +17 -0
- package/dist/types/src/components/Icon/Icon.stories.d.ts.map +1 -0
- package/dist/types/src/components/Input/Input.d.ts +0 -2
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +0 -6
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Link/Link.stories.d.ts +0 -6
- package/dist/types/src/components/Link/Link.stories.d.ts.map +1 -1
- package/dist/types/src/components/List/List.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/List.stories.d.ts +0 -6
- package/dist/types/src/components/List/List.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/ListDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/List/Tree.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/Tree.stories.d.ts +0 -6
- package/dist/types/src/components/List/Tree.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/TreeDropIndicator.d.ts.map +1 -0
- package/dist/types/src/components/{Lists → List}/Treegrid.d.ts.map +1 -1
- package/dist/types/src/components/List/Treegrid.stories.d.ts.map +1 -0
- package/dist/types/src/components/List/index.d.ts.map +1 -0
- package/dist/types/src/components/Main/Main.d.ts +9 -18
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts +1 -2
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/ContextMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts +0 -6
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts +5 -4
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts +0 -6
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/types/src/components/Message/Message.stories.d.ts +0 -1
- package/dist/types/src/components/Message/Message.stories.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +0 -6
- package/dist/types/src/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +0 -6
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts +37 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.d.ts.map +1 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts +18 -0
- package/dist/types/src/components/ScrollContainer/ScrollContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ScrollContainer/index.d.ts +2 -0
- package/dist/types/src/components/ScrollContainer/index.d.ts.map +1 -0
- package/dist/types/src/components/Select/Select.d.ts +1 -1
- package/dist/types/src/components/Select/Select.d.ts.map +1 -1
- package/dist/types/src/components/Select/Select.stories.d.ts +0 -6
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts +0 -6
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +8 -8
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.stories.d.ts +0 -6
- package/dist/types/src/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +12 -12
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +0 -6
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +1 -3
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +0 -6
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useSafeArea.d.ts.map +1 -1
- package/dist/types/src/hooks/useVisualViewport.d.ts +2 -2
- package/dist/types/src/hooks/useVisualViewport.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts +0 -6
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Custom.stories.d.ts +1 -2
- package/dist/types/src/playground/Custom.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Typography.stories.d.ts +0 -6
- package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/index.d.ts +2 -1
- package/dist/types/src/testing/decorators/index.d.ts.map +1 -1
- package/dist/types/src/testing/decorators/withLayout.d.ts +15 -0
- package/dist/types/src/testing/decorators/withLayout.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/{withSurfaceVariantsLayout.d.ts → withLayoutVariants.d.ts} +2 -2
- package/dist/types/src/testing/decorators/withLayoutVariants.d.ts.map +1 -0
- package/dist/types/src/testing/decorators/withTheme.d.ts +3 -0
- package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
- package/dist/types/src/util/domino.d.ts +18 -0
- package/dist/types/src/util/domino.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/usePx.d.ts +8 -0
- package/dist/types/src/util/usePx.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -23
- package/src/components/Avatars/Avatar.stories.tsx +0 -2
- package/src/components/Avatars/AvatarGroup.stories.tsx +0 -3
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -4
- package/src/components/{Buttons → Button}/Button.stories.tsx +3 -5
- package/src/components/{Buttons → Button}/IconButton.stories.tsx +0 -3
- package/src/components/{Buttons → Button}/IconButton.tsx +14 -13
- package/src/components/{Buttons → Button}/Toggle.stories.tsx +5 -7
- package/src/components/{Buttons → Button}/ToggleGroup.stories.tsx +0 -3
- package/src/components/{Buttons → Button}/ToggleGroup.tsx +14 -1
- package/src/components/Clipboard/CopyButton.tsx +1 -1
- package/src/components/{Dialogs → Dialog}/AlertDialog.stories.tsx +1 -4
- package/src/components/{Dialogs → Dialog}/Dialog.stories.tsx +6 -4
- package/src/components/Icon/Icon.stories.tsx +113 -0
- package/src/components/Icon/Icon.tsx +1 -1
- package/src/components/Input/Input.stories.tsx +0 -3
- package/src/components/Input/Input.tsx +3 -3
- package/src/components/Link/Link.stories.tsx +0 -3
- package/src/components/{Lists → List}/List.stories.tsx +2 -6
- package/src/components/{Lists → List}/ListDropIndicator.tsx +1 -1
- package/src/components/{Lists → List}/Tree.stories.tsx +0 -3
- package/src/components/{Lists → List}/Treegrid.tsx +57 -16
- package/src/components/Main/Main.stories.tsx +4 -4
- package/src/components/Main/Main.tsx +28 -19
- package/src/components/Menus/ContextMenu.stories.tsx +0 -3
- package/src/components/Menus/ContextMenu.tsx +1 -0
- package/src/components/Menus/DropdownMenu.stories.tsx +1 -4
- package/src/components/Menus/DropdownMenu.tsx +33 -6
- package/src/components/Message/Message.stories.tsx +0 -2
- package/src/components/Popover/Popover.stories.tsx +1 -4
- package/src/components/Popover/Popover.tsx +22 -5
- package/src/components/ScrollArea/ScrollArea.stories.tsx +1 -4
- package/src/components/ScrollContainer/ScrollContainer.stories.tsx +69 -0
- package/src/components/ScrollContainer/ScrollContainer.tsx +231 -0
- package/src/components/ScrollContainer/index.ts +5 -0
- package/src/components/Select/Select.stories.tsx +3 -5
- package/src/components/Select/Select.tsx +5 -4
- package/src/components/Status/Status.stories.tsx +0 -3
- package/src/components/Tag/Tag.stories.tsx +8 -7
- package/src/components/Toast/Toast.stories.tsx +1 -4
- package/src/components/Toolbar/Toolbar.stories.tsx +2 -7
- package/src/components/Toolbar/Toolbar.tsx +18 -6
- package/src/components/Tooltip/Tooltip.stories.tsx +1 -4
- package/src/components/Tooltip/Tooltip.tsx +2 -1
- package/src/components/index.ts +4 -3
- package/src/hooks/useSafeArea.ts +3 -2
- package/src/hooks/useVisualViewport.ts +4 -4
- package/src/index.ts +1 -1
- package/src/playground/Controls.stories.tsx +3 -5
- package/src/playground/Custom.stories.tsx +9 -20
- package/src/playground/Typography.stories.tsx +0 -3
- package/src/testing/decorators/index.ts +2 -1
- package/src/testing/decorators/withLayout.tsx +56 -0
- package/src/testing/decorators/{withSurfaceVariantsLayout.tsx → withLayoutVariants.tsx} +2 -2
- package/src/testing/decorators/withTheme.tsx +31 -0
- package/src/util/domino.ts +53 -0
- package/src/util/index.ts +2 -0
- package/src/util/usePx.ts +61 -0
- package/dist/lib/browser/chunk-P333G32W.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JRCE5UVS.mjs.map +0 -7
- package/dist/types/src/components/Buttons/Button.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Button.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Toggle.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts +0 -19
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/ToggleGroup.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +0 -1
- package/dist/types/src/components/Buttons/index.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/Dialogs/index.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.d.ts.map +0 -1
- package/dist/types/src/components/Lists/List.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/TreeDropIndicator.d.ts.map +0 -1
- package/dist/types/src/components/Lists/Treegrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/Lists/index.d.ts.map +0 -1
- package/dist/types/src/testing/decorators/withSurfaceVariantsLayout.d.ts.map +0 -1
- package/src/testing/decorators/withTheme.ts +0 -25
- /package/dist/types/src/components/{Buttons → Button}/Toggle.d.ts +0 -0
- /package/dist/types/src/components/{Buttons → Button}/index.d.ts +0 -0
- /package/dist/types/src/components/{Dialogs → Dialog}/AlertDialog.d.ts +0 -0
- /package/dist/types/src/components/{Dialogs → Dialog}/Dialog.d.ts +0 -0
- /package/dist/types/src/components/{Dialogs → Dialog}/index.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/List.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/ListDropIndicator.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/Tree.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/TreeDropIndicator.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/Treegrid.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/Treegrid.stories.d.ts +0 -0
- /package/dist/types/src/components/{Lists → List}/index.d.ts +0 -0
- /package/src/components/{Buttons → Button}/Button.tsx +0 -0
- /package/src/components/{Buttons → Button}/Toggle.tsx +0 -0
- /package/src/components/{Buttons → Button}/index.ts +0 -0
- /package/src/components/{Dialogs → Dialog}/AlertDialog.tsx +0 -0
- /package/src/components/{Dialogs → Dialog}/Dialog.tsx +0 -0
- /package/src/components/{Dialogs → Dialog}/index.ts +0 -0
- /package/src/components/{Lists → List}/List.tsx +0 -0
- /package/src/components/{Lists → List}/Tree.tsx +0 -0
- /package/src/components/{Lists → List}/TreeDropIndicator.tsx +0 -0
- /package/src/components/{Lists → List}/Treegrid.stories.tsx +0 -0
- /package/src/components/{Lists → List}/index.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.72ec0f3",
|
|
4
4
|
"description": "Low-level React components for DXOS, applying a theme to a core group of primitives",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
|
|
39
39
|
"@fluentui/react-tabster": "^9.24.2",
|
|
40
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
41
40
|
"@preact-signals/safe-react": "^0.9.0",
|
|
42
41
|
"@radix-ui/primitive": "1.1.1",
|
|
43
42
|
"@radix-ui/react-alert-dialog": "1.1.6",
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
"@radix-ui/react-portal": "1.1.4",
|
|
58
57
|
"@radix-ui/react-presence": "1.1.2",
|
|
59
58
|
"@radix-ui/react-primitive": "2.0.2",
|
|
60
|
-
"@radix-ui/react-scroll-area": "1.2.
|
|
59
|
+
"@radix-ui/react-scroll-area": "1.2.10",
|
|
61
60
|
"@radix-ui/react-select": "2.1.6",
|
|
62
61
|
"@radix-ui/react-separator": "1.1.2",
|
|
63
62
|
"@radix-ui/react-slot": "1.1.2",
|
|
@@ -75,33 +74,35 @@
|
|
|
75
74
|
"keyborg": "^2.5.0",
|
|
76
75
|
"react-i18next": "^11.18.6",
|
|
77
76
|
"react-remove-scroll": "^2.6.0",
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/react-
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/react-
|
|
85
|
-
"@dxos/
|
|
77
|
+
"@dxos/async": "0.8.4-main.72ec0f3",
|
|
78
|
+
"@dxos/debug": "0.8.4-main.72ec0f3",
|
|
79
|
+
"@dxos/invariant": "0.8.4-main.72ec0f3",
|
|
80
|
+
"@dxos/lit-ui": "0.8.4-main.72ec0f3",
|
|
81
|
+
"@dxos/react-hooks": "0.8.4-main.72ec0f3",
|
|
82
|
+
"@dxos/log": "0.8.4-main.72ec0f3",
|
|
83
|
+
"@dxos/react-input": "0.8.4-main.72ec0f3",
|
|
84
|
+
"@dxos/react-list": "0.8.4-main.72ec0f3",
|
|
85
|
+
"@dxos/react-ui-types": "0.8.4-main.72ec0f3",
|
|
86
|
+
"@dxos/util": "0.8.4-main.72ec0f3"
|
|
86
87
|
},
|
|
87
88
|
"devDependencies": {
|
|
88
89
|
"@dnd-kit/core": "^6.0.5",
|
|
89
90
|
"@dnd-kit/sortable": "^7.0.1",
|
|
90
91
|
"@dnd-kit/utilities": "^3.2.0",
|
|
91
|
-
"@
|
|
92
|
-
"@types/react
|
|
93
|
-
"react": "~
|
|
94
|
-
"react
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
98
|
-
"@dxos/util": "0.8.4-main.
|
|
92
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
93
|
+
"@types/react": "~19.2.2",
|
|
94
|
+
"@types/react-dom": "~19.2.2",
|
|
95
|
+
"react": "~19.2.0",
|
|
96
|
+
"react-dom": "~19.2.0",
|
|
97
|
+
"vite": "7.1.9",
|
|
98
|
+
"@dxos/react-ui-theme": "0.8.4-main.72ec0f3",
|
|
99
|
+
"@dxos/util": "0.8.4-main.72ec0f3",
|
|
100
|
+
"@dxos/random": "0.8.4-main.72ec0f3"
|
|
99
101
|
},
|
|
100
102
|
"peerDependencies": {
|
|
101
|
-
"
|
|
102
|
-
"react": "
|
|
103
|
-
"react-
|
|
104
|
-
"@dxos/react-ui-theme": "0.8.4-main.5ea62a8"
|
|
103
|
+
"react": "^19.0.0",
|
|
104
|
+
"react-dom": "^19.0.0",
|
|
105
|
+
"@dxos/react-ui-theme": "0.8.4-main.72ec0f3"
|
|
105
106
|
},
|
|
106
107
|
"publishConfig": {
|
|
107
108
|
"access": "public"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
5
|
import { type Meta } from '@storybook/react-vite';
|
|
7
6
|
import React, { type PropsWithChildren } from 'react';
|
|
8
7
|
|
|
@@ -61,7 +60,6 @@ const meta = {
|
|
|
61
60
|
title: 'ui/react-ui-core/Avatar',
|
|
62
61
|
component: Avatar.Root,
|
|
63
62
|
decorators: [withTheme],
|
|
64
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
65
63
|
} satisfies Meta<typeof Avatar.Root>;
|
|
66
64
|
|
|
67
65
|
export default meta;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -43,7 +41,6 @@ const meta = {
|
|
|
43
41
|
title: 'ui/react-ui-core/AvatarGroup',
|
|
44
42
|
render: DefaultStory,
|
|
45
43
|
decorators: [withTheme],
|
|
46
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
47
44
|
} satisfies Meta<typeof DefaultStory>;
|
|
48
45
|
|
|
49
46
|
export default meta;
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
8
|
import { withTheme } from '../../testing';
|
|
11
|
-
import { Button } from '../
|
|
9
|
+
import { Button } from '../Button';
|
|
12
10
|
|
|
13
11
|
import { Breadcrumb, type BreadcrumbRootProps } from './Breadcrumb';
|
|
14
12
|
|
|
@@ -45,7 +43,6 @@ const meta = {
|
|
|
45
43
|
component: Breadcrumb.Root as any,
|
|
46
44
|
render: DefaultStory,
|
|
47
45
|
decorators: [withTheme],
|
|
48
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
49
46
|
} satisfies Meta<typeof DefaultStory>;
|
|
50
47
|
|
|
51
48
|
export default meta;
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
|
-
import {
|
|
8
|
+
import { withTheme } from '../../testing';
|
|
9
|
+
import { withLayoutVariants } from '../../testing';
|
|
11
10
|
import { Icon } from '../Icon';
|
|
12
11
|
|
|
13
12
|
import { Button, ButtonGroup, type ButtonProps } from './Button';
|
|
@@ -37,8 +36,7 @@ const meta = {
|
|
|
37
36
|
title: 'ui/react-ui-core/Button',
|
|
38
37
|
component: Button,
|
|
39
38
|
render: DefaultStory,
|
|
40
|
-
decorators: [
|
|
41
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
39
|
+
decorators: [withTheme, withLayoutVariants()],
|
|
42
40
|
} satisfies Meta<typeof Button>;
|
|
43
41
|
|
|
44
42
|
export default meta;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -30,7 +28,6 @@ const meta = {
|
|
|
30
28
|
component: IconButton,
|
|
31
29
|
render: DefaultStory as any,
|
|
32
30
|
decorators: [withTheme],
|
|
33
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
34
31
|
} satisfies Meta<typeof IconButton>;
|
|
35
32
|
|
|
36
33
|
export default meta;
|
|
@@ -12,21 +12,29 @@ import { Tooltip, type TooltipSide } from '../Tooltip';
|
|
|
12
12
|
import { Button, type ButtonProps } from './Button';
|
|
13
13
|
|
|
14
14
|
type IconButtonProps = Omit<ButtonProps, 'children'> &
|
|
15
|
-
Pick<IconProps, 'icon' | 'size'
|
|
15
|
+
Partial<Pick<IconProps, 'icon' | 'size'>> & {
|
|
16
16
|
label: string;
|
|
17
17
|
iconOnly?: boolean;
|
|
18
18
|
noTooltip?: boolean;
|
|
19
19
|
caretDown?: boolean;
|
|
20
20
|
iconClassNames?: ThemedClassName<any>['classNames'];
|
|
21
|
-
tooltipPortal?: boolean;
|
|
22
21
|
tooltipSide?: TooltipSide;
|
|
23
22
|
};
|
|
24
23
|
|
|
24
|
+
const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>((props, forwardedRef) =>
|
|
25
|
+
props.iconOnly ? (
|
|
26
|
+
<IconOnlyButton {...props} ref={forwardedRef} />
|
|
27
|
+
) : (
|
|
28
|
+
<LabelledIconButton {...props} ref={forwardedRef} />
|
|
29
|
+
),
|
|
30
|
+
);
|
|
31
|
+
|
|
25
32
|
const IconOnlyButton = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
26
|
-
({ noTooltip,
|
|
33
|
+
({ noTooltip, tooltipSide, ...props }, forwardedRef) => {
|
|
27
34
|
if (noTooltip) {
|
|
28
35
|
return <LabelledIconButton {...props} ref={forwardedRef} />;
|
|
29
36
|
}
|
|
37
|
+
|
|
30
38
|
return (
|
|
31
39
|
<Tooltip.Trigger asChild content={props.label} side={tooltipSide}>
|
|
32
40
|
<LabelledIconButton {...props} ref={forwardedRef} />
|
|
@@ -35,12 +43,13 @@ const IconOnlyButton = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
|
35
43
|
},
|
|
36
44
|
);
|
|
37
45
|
|
|
46
|
+
// TODO(burdon): Inherit size from container/density.
|
|
38
47
|
const LabelledIconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
39
|
-
({ icon, size, iconOnly, label, classNames, iconClassNames, caretDown, ...props }, forwardedRef) => {
|
|
48
|
+
({ icon, size = 5, iconOnly, label, classNames, iconClassNames, caretDown, ...props }, forwardedRef) => {
|
|
40
49
|
const { tx } = useThemeContext();
|
|
41
50
|
return (
|
|
42
51
|
<Button {...props} classNames={tx('iconButton.root', 'iconButton', { iconOnly }, classNames)} ref={forwardedRef}>
|
|
43
|
-
<Icon icon={icon} size={size} classNames={iconClassNames} />
|
|
52
|
+
{icon && <Icon icon={icon} size={size} classNames={iconClassNames} />}
|
|
44
53
|
<span className={iconOnly ? 'sr-only' : undefined}>{label}</span>
|
|
45
54
|
{caretDown && <Icon size={3} icon='ph--caret-down--bold' />}
|
|
46
55
|
</Button>
|
|
@@ -48,14 +57,6 @@ const LabelledIconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
|
48
57
|
},
|
|
49
58
|
);
|
|
50
59
|
|
|
51
|
-
const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>((props, forwardedRef) =>
|
|
52
|
-
props.iconOnly ? (
|
|
53
|
-
<IconOnlyButton {...props} ref={forwardedRef} />
|
|
54
|
-
) : (
|
|
55
|
-
<LabelledIconButton {...props} ref={forwardedRef} />
|
|
56
|
-
),
|
|
57
|
-
);
|
|
58
|
-
|
|
59
60
|
export { IconButton };
|
|
60
61
|
|
|
61
62
|
export type { IconButtonProps };
|
|
@@ -2,19 +2,15 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
8
|
import { withTheme } from '../../testing';
|
|
11
9
|
import { Icon } from '../Icon';
|
|
12
10
|
|
|
13
|
-
import { Toggle } from './Toggle';
|
|
14
|
-
|
|
15
|
-
type StorybookToggleProps = {};
|
|
11
|
+
import { Toggle, type ToggleProps } from './Toggle';
|
|
16
12
|
|
|
17
|
-
const DefaultStory = (props:
|
|
13
|
+
const DefaultStory = (props: ToggleProps) => {
|
|
18
14
|
return (
|
|
19
15
|
<Toggle {...props}>
|
|
20
16
|
<Icon icon='ph--text-b--regular' />
|
|
@@ -27,7 +23,9 @@ const meta = {
|
|
|
27
23
|
component: Toggle,
|
|
28
24
|
render: DefaultStory,
|
|
29
25
|
decorators: [withTheme],
|
|
30
|
-
parameters: {
|
|
26
|
+
parameters: {
|
|
27
|
+
layout: 'centered',
|
|
28
|
+
},
|
|
31
29
|
} satisfies Meta<typeof Toggle>;
|
|
32
30
|
|
|
33
31
|
export default meta;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -31,7 +29,6 @@ const meta = {
|
|
|
31
29
|
component: ToggleGroup,
|
|
32
30
|
render: DefaultStory,
|
|
33
31
|
decorators: [withTheme],
|
|
34
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
35
32
|
} satisfies Meta<typeof ToggleGroup>;
|
|
36
33
|
|
|
37
34
|
export default meta;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import React, { forwardRef } from 'react';
|
|
13
13
|
|
|
14
14
|
import { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps } from './Button';
|
|
15
|
+
import { IconButton, type IconButtonProps } from './IconButton';
|
|
15
16
|
|
|
16
17
|
type ToggleGroupProps = Omit<ToggleGroupSingleProps, 'className'> | Omit<ToggleGroupMultipleProps, 'className'>;
|
|
17
18
|
|
|
@@ -37,5 +38,17 @@ const ToggleGroupItem = forwardRef<HTMLButtonElement, ToggleGroupItemProps>(
|
|
|
37
38
|
},
|
|
38
39
|
);
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
type ToggleGroupIconItemProps = Omit<ToggleGroupItemPrimitiveProps, 'className'> & IconButtonProps;
|
|
42
|
+
|
|
43
|
+
const ToggleGroupIconItem = forwardRef<HTMLButtonElement, ToggleGroupIconItemProps>(
|
|
44
|
+
({ variant, label, icon, size, elevation, density, classNames, ...props }, forwardedRef) => {
|
|
45
|
+
return (
|
|
46
|
+
<ToggleGroupItemPrimitive {...props} asChild>
|
|
47
|
+
<IconButton {...{ variant, elevation, density, classNames, label, icon, size }} ref={forwardedRef} />
|
|
48
|
+
</ToggleGroupItemPrimitive>
|
|
49
|
+
);
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export { ToggleGroup, ToggleGroupItem, ToggleGroupIconItem };
|
|
41
54
|
export type { ToggleGroupProps, ToggleGroupItemProps };
|
|
@@ -6,7 +6,7 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { mx } from '@dxos/react-ui-theme';
|
|
8
8
|
|
|
9
|
-
import { Button, type ButtonProps, IconButton } from '../
|
|
9
|
+
import { Button, type ButtonProps, IconButton } from '../Button';
|
|
10
10
|
import { Icon, type IconProps } from '../Icon';
|
|
11
11
|
import { useTranslation } from '../ThemeProvider';
|
|
12
12
|
import { type TooltipScopedProps, useTooltipContext } from '../Tooltip';
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
8
|
import { withTheme } from '../../testing';
|
|
11
|
-
import { Button } from '../
|
|
9
|
+
import { Button } from '../Button';
|
|
12
10
|
import { Toolbar } from '../Toolbar';
|
|
13
11
|
|
|
14
12
|
import { AlertDialog } from './AlertDialog';
|
|
@@ -53,7 +51,6 @@ const meta = {
|
|
|
53
51
|
component: AlertDialog.Root as any,
|
|
54
52
|
render: DefaultStory as any,
|
|
55
53
|
decorators: [withTheme],
|
|
56
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
57
54
|
} satisfies Meta<typeof DefaultStory>;
|
|
58
55
|
|
|
59
56
|
export default meta;
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
10
8
|
import { withTheme } from '../../testing';
|
|
11
|
-
import { Button } from '../
|
|
9
|
+
import { Button } from '../Button';
|
|
12
10
|
|
|
13
11
|
import { Dialog } from './Dialog';
|
|
14
12
|
|
|
@@ -46,7 +44,11 @@ const meta = {
|
|
|
46
44
|
component: Dialog as any,
|
|
47
45
|
render: DefaultStory,
|
|
48
46
|
decorators: [withTheme],
|
|
49
|
-
parameters: {
|
|
47
|
+
parameters: {
|
|
48
|
+
chromatic: {
|
|
49
|
+
disableSnapshot: false,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
50
52
|
} satisfies Meta<typeof DefaultStory>;
|
|
51
53
|
|
|
52
54
|
export default meta;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { IconBase, type IconProps, type IconWeight } from '@phosphor-icons/react';
|
|
6
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
7
|
+
import React, { type FC, type ReactElement, type SVGProps, forwardRef } from 'react';
|
|
8
|
+
|
|
9
|
+
import { getSize, mx } from '@dxos/react-ui-theme';
|
|
10
|
+
|
|
11
|
+
import { withTheme } from '../../testing';
|
|
12
|
+
|
|
13
|
+
import { Icon } from './Icon';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Create icon from serializable data.
|
|
17
|
+
* https://github.com/phosphor-icons/react#custom-icons
|
|
18
|
+
* https://github.com/phosphor-icons/core/tree/main/assets
|
|
19
|
+
*/
|
|
20
|
+
const createIcon = ({
|
|
21
|
+
name,
|
|
22
|
+
weights,
|
|
23
|
+
}: {
|
|
24
|
+
name: string;
|
|
25
|
+
weights: Record<string, SVGProps<SVGPathElement>[]>;
|
|
26
|
+
}): FC<IconProps> => {
|
|
27
|
+
const CustomIcon = forwardRef<SVGSVGElement, IconProps>((props, ref) => (
|
|
28
|
+
<IconBase
|
|
29
|
+
ref={ref}
|
|
30
|
+
{...props}
|
|
31
|
+
weights={
|
|
32
|
+
new Map<IconWeight, ReactElement>(
|
|
33
|
+
Object.entries(weights).map(
|
|
34
|
+
([key, paths]) =>
|
|
35
|
+
[
|
|
36
|
+
key,
|
|
37
|
+
<>
|
|
38
|
+
{paths.map((props, i) => (
|
|
39
|
+
<path key={`${key}-${i}`} {...props} />
|
|
40
|
+
))}
|
|
41
|
+
</>,
|
|
42
|
+
] as [IconWeight, ReactElement],
|
|
43
|
+
),
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
));
|
|
48
|
+
|
|
49
|
+
CustomIcon.displayName = name;
|
|
50
|
+
return CustomIcon;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const DefaultStory = ({ CustomIcon }: { CustomIcon: FC<IconProps> }) => {
|
|
54
|
+
return (
|
|
55
|
+
<div className='grid grid-cols-2 gap-8'>
|
|
56
|
+
<CustomIcon weight={'regular'} className={mx(getSize(16))} />
|
|
57
|
+
<Icon icon='ph--github-logo--regular' classNames={mx(getSize(16))} />
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const meta = {
|
|
63
|
+
title: 'ui/react-ui-core/Icon',
|
|
64
|
+
render: DefaultStory,
|
|
65
|
+
decorators: [withTheme],
|
|
66
|
+
parameters: {
|
|
67
|
+
layout: 'centered',
|
|
68
|
+
},
|
|
69
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
70
|
+
|
|
71
|
+
export default meta;
|
|
72
|
+
|
|
73
|
+
type Story = StoryObj<typeof meta>;
|
|
74
|
+
|
|
75
|
+
export const Default: Story = {
|
|
76
|
+
args: {
|
|
77
|
+
CustomIcon: createIcon({
|
|
78
|
+
name: 'GithubLogo',
|
|
79
|
+
weights: {
|
|
80
|
+
// https://github.com/phosphor-icons/core/tree/main/assets
|
|
81
|
+
// <path d="M119.83,56A52,52,0,0,0,76,32a51.92,51.92,0,0,0-3.49,44.7A49.28,49.28,0,0,0,64,104v8a48,48,0,0,0,48,48h48a48,48,0,0,0,48-48v-8a49.28,49.28,0,0,0-8.51-27.3A51.92,51.92,0,0,0,196,32a52,52,0,0,0-43.83,24Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
82
|
+
// <path d="M104,232V192a32,32,0,0,1,32-32h0a32,32,0,0,1,32,32v40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
83
|
+
// <path d="M104,208H72a32,32,0,0,1-32-32A32,32,0,0,0,8,144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
84
|
+
regular: [
|
|
85
|
+
{
|
|
86
|
+
d: 'M119.83,56A52,52,0,0,0,76,32a51.92,51.92,0,0,0-3.49,44.7A49.28,49.28,0,0,0,64,104v8a48,48,0,0,0,48,48h48a48,48,0,0,0,48-48v-8a49.28,49.28,0,0,0-8.51-27.3A51.92,51.92,0,0,0,196,32a52,52,0,0,0-43.83,24Z',
|
|
87
|
+
fill: 'none',
|
|
88
|
+
stroke: 'currentColor',
|
|
89
|
+
strokeLinecap: 'round',
|
|
90
|
+
strokeLinejoin: 'round',
|
|
91
|
+
strokeWidth: '16',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
d: 'M104,232V192a32,32,0,0,1,32-32h0a32,32,0,0,1,32,32v40',
|
|
95
|
+
fill: 'none',
|
|
96
|
+
stroke: 'currentColor',
|
|
97
|
+
strokeLinecap: 'round',
|
|
98
|
+
strokeLinejoin: 'round',
|
|
99
|
+
strokeWidth: '16',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
d: 'M104,208H72a32,32,0,0,1-32-32A32,32,0,0,0,8,144',
|
|
103
|
+
fill: 'none',
|
|
104
|
+
stroke: 'currentColor',
|
|
105
|
+
strokeLinecap: 'round',
|
|
106
|
+
strokeLinejoin: 'round',
|
|
107
|
+
strokeWidth: '16',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
},
|
|
113
|
+
};
|
|
@@ -16,7 +16,7 @@ export type IconProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.s
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export const Icon = memo(
|
|
19
|
-
forwardRef<SVGSVGElement, IconProps>(({ icon, classNames, size, ...props }, forwardedRef) => {
|
|
19
|
+
forwardRef<SVGSVGElement, IconProps>(({ icon, classNames, size = 4, ...props }, forwardedRef) => {
|
|
20
20
|
const { tx } = useThemeContext();
|
|
21
21
|
const href = useIconHref(icon);
|
|
22
22
|
return (
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -94,7 +92,6 @@ const meta = {
|
|
|
94
92
|
component: Input.Root as any,
|
|
95
93
|
render: DefaultStory,
|
|
96
94
|
decorators: [withTheme],
|
|
97
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
98
95
|
} satisfies Meta<typeof DefaultStory>;
|
|
99
96
|
|
|
100
97
|
export default meta;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type IconWeight } from '@phosphor-icons/react';
|
|
6
5
|
import { Root as CheckboxPrimitive, type CheckboxProps as CheckboxPrimitiveProps } from '@radix-ui/react-checkbox';
|
|
7
6
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
8
7
|
import React, { type ComponentPropsWithRef, type ForwardRefExoticComponent, forwardRef, useCallback } from 'react';
|
|
@@ -230,7 +229,9 @@ const TextArea = forwardRef<HTMLTextAreaElement, InputScopedProps<TextAreaProps>
|
|
|
230
229
|
},
|
|
231
230
|
);
|
|
232
231
|
|
|
233
|
-
type CheckboxProps = ThemedClassName<Omit<CheckboxPrimitiveProps, 'children'>> & {
|
|
232
|
+
type CheckboxProps = ThemedClassName<Omit<CheckboxPrimitiveProps, 'children'>> & {
|
|
233
|
+
size?: Size;
|
|
234
|
+
};
|
|
234
235
|
|
|
235
236
|
const Checkbox: ForwardRefExoticComponent<CheckboxProps> = forwardRef<
|
|
236
237
|
HTMLButtonElement,
|
|
@@ -243,7 +244,6 @@ const Checkbox: ForwardRefExoticComponent<CheckboxProps> = forwardRef<
|
|
|
243
244
|
defaultChecked: propsDefaultChecked,
|
|
244
245
|
onCheckedChange: propsOnCheckedChange,
|
|
245
246
|
size,
|
|
246
|
-
weight = 'bold',
|
|
247
247
|
classNames,
|
|
248
248
|
...props
|
|
249
249
|
},
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
|
|
9
7
|
import { withTheme } from '../../testing';
|
|
@@ -14,7 +12,6 @@ const meta = {
|
|
|
14
12
|
title: 'ui/react-ui-core/Link',
|
|
15
13
|
component: Link,
|
|
16
14
|
decorators: [withTheme],
|
|
17
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
18
15
|
} satisfies Meta<typeof Link>;
|
|
19
16
|
|
|
20
17
|
export default meta;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2022 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { DndContext, type DragEndEvent, type DragStartEvent } from '@dnd-kit/core';
|
|
8
6
|
import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
9
7
|
import { CSS } from '@dnd-kit/utilities';
|
|
@@ -29,7 +27,6 @@ const meta = {
|
|
|
29
27
|
title: 'ui/react-ui-core/List',
|
|
30
28
|
component: List,
|
|
31
29
|
decorators: [withTheme],
|
|
32
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
33
30
|
} satisfies Meta<typeof List>;
|
|
34
31
|
|
|
35
32
|
export default meta;
|
|
@@ -198,7 +195,6 @@ export const Collapsible: Story = {
|
|
|
198
195
|
},
|
|
199
196
|
args: {
|
|
200
197
|
variant: 'unordered',
|
|
201
|
-
// toggleOpenLabel: 'Open/close storybook list item', // TODO(burdon): ???
|
|
202
198
|
},
|
|
203
199
|
};
|
|
204
200
|
|
|
@@ -229,11 +225,11 @@ export const SelectableListbox: Story = {
|
|
|
229
225
|
key={id}
|
|
230
226
|
tabIndex={0}
|
|
231
227
|
selected={selectedId === id}
|
|
232
|
-
classNames={mx(
|
|
228
|
+
classNames={mx(ghostHover, ghostSelected, ghostSelectedTrackingInterFromNormal)}
|
|
233
229
|
onClick={() => setSelectedId(id)}
|
|
234
230
|
onKeyUp={(event) => handleKeyUp(event, id)}
|
|
235
231
|
>
|
|
236
|
-
<ListItem.Heading classNames='
|
|
232
|
+
<ListItem.Heading classNames='flex pli-1 items-center grow truncate'>{text}</ListItem.Heading>
|
|
237
233
|
</ListItem.Root>
|
|
238
234
|
))}
|
|
239
235
|
</List>
|
|
@@ -18,7 +18,7 @@ const orientationStyles: Record<Orientation, HTMLAttributes<HTMLElement>['classN
|
|
|
18
18
|
horizontal:
|
|
19
19
|
'h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]',
|
|
20
20
|
vertical:
|
|
21
|
-
'
|
|
21
|
+
'is-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]',
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const edgeStyles: Record<Edge, HTMLAttributes<HTMLElement>['className']> = {
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -62,7 +60,6 @@ const meta = {
|
|
|
62
60
|
component: Tree as any,
|
|
63
61
|
render: DefaultStory,
|
|
64
62
|
decorators: [withTheme],
|
|
65
|
-
parameters: { chromatic: { disableSnapshot: false } },
|
|
66
63
|
} satisfies Meta<typeof DefaultStory>;
|
|
67
64
|
|
|
68
65
|
export default meta;
|