@dxos/react-ui 0.7.5-main.9d2a38b → 0.7.5-main.b19bfc8
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/index.mjs +87 -86
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +88 -86
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +87 -86
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts +6 -10
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +12 -13
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.d.ts +1 -1
- package/dist/types/src/components/Avatars/AvatarGroup.stories.d.ts +2 -2
- package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +3 -3
- package/dist/types/src/components/Buttons/Button.stories.d.ts +2 -2
- package/dist/types/src/components/Buttons/IconButton.d.ts +3 -0
- package/dist/types/src/components/Buttons/IconButton.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/IconButton.stories.d.ts +2 -2
- package/dist/types/src/components/Buttons/Toggle.stories.d.ts +2 -2
- package/dist/types/src/components/Buttons/ToggleGroup.d.ts +4 -4
- package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts +6 -6
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts +1 -1
- package/dist/types/src/components/Clipboard/ClipboardProvider.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts +6 -3
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/index.d.ts +8 -3
- 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/Dialogs/AlertDialog.d.ts +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.stories.d.ts +2 -2
- package/dist/types/src/components/Dialogs/Dialog.d.ts +4 -2
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.stories.d.ts +2 -2
- 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/Icon/Icon.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.d.ts +1 -1
- package/dist/types/src/components/Input/Input.d.ts.map +1 -1
- package/dist/types/src/components/Input/Input.stories.d.ts +7 -7
- package/dist/types/src/components/Input/Input.stories.d.ts.map +1 -1
- package/dist/types/src/components/Lists/List.stories.d.ts +5 -5
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts +3 -2
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Tree.stories.d.ts +3 -3
- package/dist/types/src/components/Lists/TreeDropIndicator.d.ts +1 -2
- package/dist/types/src/components/Lists/TreeDropIndicator.d.ts.map +1 -1
- package/dist/types/src/components/Lists/Treegrid.stories.d.ts +2 -2
- package/dist/types/src/components/Main/Main.d.ts +35 -22
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts +3 -4
- package/dist/types/src/components/Main/Main.stories.d.ts.map +1 -1
- package/dist/types/src/components/Menus/ContextMenu.d.ts +6 -6
- package/dist/types/src/components/Menus/ContextMenu.stories.d.ts +8 -8
- package/dist/types/src/components/Menus/DropdownMenu.d.ts +3 -7
- package/dist/types/src/components/Menus/DropdownMenu.d.ts.map +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.stories.d.ts +4 -4
- package/dist/types/src/components/Message/Message.stories.d.ts +2 -2
- package/dist/types/src/components/Popover/Popover.d.ts +1 -1
- package/dist/types/src/components/Popover/Popover.stories.d.ts +5 -5
- package/dist/types/src/components/ScrollArea/ScrollArea.d.ts +5 -5
- package/dist/types/src/components/ScrollArea/ScrollArea.stories.d.ts +7 -7
- package/dist/types/src/components/Select/Select.d.ts +9 -9
- package/dist/types/src/components/Select/Select.stories.d.ts +2 -3
- package/dist/types/src/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/types/src/components/Separator/Separator.d.ts +1 -1
- package/dist/types/src/components/Status/Status.stories.d.ts +3 -3
- package/dist/types/src/components/Status/Status.stories.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +12 -5
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts +2 -2
- package/dist/types/src/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts +1 -1
- package/dist/types/src/components/ThemeProvider/TranslationsProvider.d.ts.map +1 -1
- package/dist/types/src/components/Toast/Toast.d.ts +4 -4
- package/dist/types/src/components/Toast/Toast.stories.d.ts +8 -8
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +6 -6
- package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts +12 -12
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts +16 -4
- package/dist/types/src/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useThemeContext.d.ts +1 -1
- package/dist/types/src/hooks/useThemeContext.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranslationsContext.d.ts +1 -1
- package/dist/types/src/playground/Controls.stories.d.ts +2 -3
- package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
- package/dist/types/src/playground/Typography.stories.d.ts +2 -3
- package/dist/types/src/playground/Typography.stories.d.ts.map +1 -1
- package/dist/types/src/util/ThemedClassName.d.ts +1 -1
- package/dist/types/src/util/ThemedClassName.d.ts.map +1 -1
- package/package.json +43 -42
- package/src/components/Avatars/Avatar.tsx +5 -13
- package/src/components/Buttons/IconButton.tsx +11 -3
- package/src/components/Clipboard/CopyButton.tsx +6 -2
- package/src/components/Dialogs/AlertDialog.tsx +3 -1
- package/src/components/Dialogs/Dialog.stories.tsx +1 -1
- package/src/components/Dialogs/Dialog.tsx +9 -4
- package/src/components/Icon/Icon.tsx +4 -1
- package/src/components/Input/Input.tsx +1 -1
- package/src/components/Lists/ListDropIndicator.tsx +15 -7
- package/src/components/Main/Main.stories.tsx +1 -1
- package/src/components/Main/Main.tsx +78 -72
- package/src/components/Tag/Tag.stories.tsx +17 -31
- package/src/components/Tag/Tag.tsx +15 -6
- package/src/components/Tooltip/Tooltip.stories.tsx +13 -2
- package/src/util/ThemedClassName.ts +1 -1
|
@@ -5,41 +5,41 @@ declare const _default: {
|
|
|
5
5
|
title: string;
|
|
6
6
|
component: {
|
|
7
7
|
Root: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-toolbar").ToolbarProps, "className"> & {
|
|
8
|
-
classNames?: import("
|
|
8
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
9
9
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
Button: React.ForwardRefExoticComponent<Omit<import("
|
|
11
|
-
IconButton: React.ForwardRefExoticComponent<Omit<import("
|
|
10
|
+
Button: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
IconButton: React.ForwardRefExoticComponent<Omit<import("..").IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
Link: React.ForwardRefExoticComponent<Omit<import("..").LinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
13
|
-
Toggle: React.ForwardRefExoticComponent<Omit<import("
|
|
13
|
+
Toggle: React.ForwardRefExoticComponent<Omit<import("..").ToggleProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
14
|
ToggleGroup: React.ForwardRefExoticComponent<(Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleGroupSingleProps, "className"> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
15
|
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
16
16
|
} & {
|
|
17
17
|
asChild?: boolean;
|
|
18
18
|
}, "className"> & {
|
|
19
|
-
classNames?: import("
|
|
19
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
20
20
|
} & {
|
|
21
|
-
elevation?: import("
|
|
21
|
+
elevation?: import("@dxos/react-ui-types").Elevation;
|
|
22
22
|
asChild?: boolean;
|
|
23
23
|
}, "ref"> | Omit<Omit<import("@radix-ui/react-toolbar").ToolbarToggleGroupMultipleProps, "className"> & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
24
24
|
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
25
25
|
} & {
|
|
26
26
|
asChild?: boolean;
|
|
27
27
|
}, "className"> & {
|
|
28
|
-
classNames?: import("
|
|
28
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
29
29
|
} & {
|
|
30
|
-
elevation?: import("
|
|
30
|
+
elevation?: import("@dxos/react-ui-types").Elevation;
|
|
31
31
|
asChild?: boolean;
|
|
32
32
|
}, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
ToggleGroupItem: React.ForwardRefExoticComponent<Omit<import("
|
|
33
|
+
ToggleGroupItem: React.ForwardRefExoticComponent<Omit<import("..").ToggleGroupItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
34
34
|
ToggleGroupIconItem: React.ForwardRefExoticComponent<Omit<import("./Toolbar").ToolbarToggleGroupIconItemProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
35
35
|
Separator: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-separator").SeparatorProps, "className"> & {
|
|
36
|
-
classNames?: import("
|
|
36
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
37
37
|
} & {
|
|
38
38
|
variant?: "gap" | "line";
|
|
39
39
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
40
40
|
};
|
|
41
|
-
render: (props: StorybookToolbarProps) =>
|
|
42
|
-
decorators: import("@storybook/react
|
|
41
|
+
render: (props: StorybookToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
decorators: import("@storybook/react").Decorator[];
|
|
43
43
|
parameters: {
|
|
44
44
|
chromatic: {
|
|
45
45
|
disableSnapshot: boolean;
|
|
@@ -13,10 +13,10 @@ export declare const Tooltip: {
|
|
|
13
13
|
Portal: React.FC<TooltipPortalPrimitiveProps>;
|
|
14
14
|
Trigger: React.ForwardRefExoticComponent<TooltipTriggerPrimitiveProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
15
|
Arrow: React.ForwardRefExoticComponent<Omit<TooltipArrowPrimitiveProps, "className"> & {
|
|
16
|
-
classNames?: import("
|
|
16
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
17
17
|
} & React.RefAttributes<SVGSVGElement>>;
|
|
18
18
|
Content: React.ForwardRefExoticComponent<Omit<TooltipContentPrimitiveProps, "className"> & {
|
|
19
|
-
classNames?: import("
|
|
19
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
20
20
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
};
|
|
22
22
|
export type { TooltipProviderProps, TooltipRootProps, TooltipPortalProps, TooltipTriggerProps, TooltipArrowProps, TooltipContentProps, };
|
|
@@ -2,6 +2,7 @@ import '@dxos-theme';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type StoryTooltipProps = {
|
|
4
4
|
content: string;
|
|
5
|
+
defaultOpen?: boolean;
|
|
5
6
|
};
|
|
6
7
|
declare const _default: {
|
|
7
8
|
title: string;
|
|
@@ -11,14 +12,14 @@ declare const _default: {
|
|
|
11
12
|
Portal: React.FC<import("@radix-ui/react-tooltip").TooltipPortalProps>;
|
|
12
13
|
Trigger: React.ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
14
|
Arrow: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tooltip").TooltipArrowProps, "className"> & {
|
|
14
|
-
classNames?: import("
|
|
15
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
15
16
|
} & React.RefAttributes<SVGSVGElement>>;
|
|
16
17
|
Content: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tooltip").TooltipContentProps, "className"> & {
|
|
17
|
-
classNames?: import("
|
|
18
|
+
classNames?: import("@dxos/react-ui-types").ClassNameValue;
|
|
18
19
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
20
|
};
|
|
20
|
-
render: ({ content }: StoryTooltipProps) =>
|
|
21
|
-
decorators: import("@storybook/react
|
|
21
|
+
render: ({ content, defaultOpen }: StoryTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
decorators: import("@storybook/react").Decorator[];
|
|
22
23
|
parameters: {
|
|
23
24
|
chromatic: {
|
|
24
25
|
disableSnapshot: boolean;
|
|
@@ -36,4 +37,15 @@ export declare const Default: {
|
|
|
36
37
|
};
|
|
37
38
|
};
|
|
38
39
|
};
|
|
40
|
+
export declare const Testing: {
|
|
41
|
+
args: {
|
|
42
|
+
defaultOption: boolean;
|
|
43
|
+
content: string;
|
|
44
|
+
};
|
|
45
|
+
parameters: {
|
|
46
|
+
chromatic: {
|
|
47
|
+
delay: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
39
51
|
//# sourceMappingURL=Tooltip.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;;;;;;;;;;;;;;;uCAE8C,iBAAiB;;;;;;;;AAcjE,wBAME;AAEF,eAAO,MAAM,OAAO;;;;;;;;;CAOnB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;CAQnB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useThemeContext: () => import("
|
|
1
|
+
export declare const useThemeContext: () => import("..").ThemeContextValue;
|
|
2
2
|
//# sourceMappingURL=useThemeContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeContext.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"useThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeContext.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,sCAA6E,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
export declare const Default: {};
|
|
4
3
|
declare const _default: {
|
|
5
4
|
title: string;
|
|
6
|
-
render: () =>
|
|
7
|
-
decorators: import("@storybook/react
|
|
5
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
decorators: import("@storybook/react").Decorator[];
|
|
8
7
|
parameters: {
|
|
9
8
|
chromatic: {
|
|
10
9
|
disableSnapshot: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Controls.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Controls.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Controls.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Controls.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AA+ErB,eAAO,MAAM,OAAO,IAAK,CAAC;;;;;;;;;;;AAE1B,wBAKE"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '@dxos-theme';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
render: () =>
|
|
6
|
-
decorators: import("@storybook/react
|
|
4
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
decorators: import("@storybook/react").Decorator[];
|
|
7
6
|
parameters: {
|
|
8
7
|
chromatic: {
|
|
9
8
|
disableSnapshot: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Typography.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"Typography.stories.d.ts","sourceRoot":"","sources":["../../../../src/playground/Typography.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;;;;;;;AAyCrB,wBAKE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemedClassName.d.ts","sourceRoot":"","sources":["../../../../src/util/ThemedClassName.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"ThemedClassName.d.ts","sourceRoot":"","sources":["../../../../src/util/ThemedClassName.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.b19bfc8",
|
|
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",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "DXOS.org",
|
|
9
9
|
"sideEffects": true,
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
@@ -24,49 +25,49 @@
|
|
|
24
25
|
],
|
|
25
26
|
"dependencies": {
|
|
26
27
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
|
|
27
|
-
"@fluentui/react-tabster": "
|
|
28
|
-
"@radix-ui/primitive": "
|
|
29
|
-
"@radix-ui/react-alert-dialog": "
|
|
30
|
-
"@radix-ui/react-avatar": "
|
|
31
|
-
"@radix-ui/react-checkbox": "
|
|
32
|
-
"@radix-ui/react-collapsible": "
|
|
33
|
-
"@radix-ui/react-compose-refs": "
|
|
34
|
-
"@radix-ui/react-context": "
|
|
35
|
-
"@radix-ui/react-context-menu": "
|
|
36
|
-
"@radix-ui/react-dialog": "
|
|
37
|
-
"@radix-ui/react-dismissable-layer": "
|
|
38
|
-
"@radix-ui/react-focus-guards": "
|
|
39
|
-
"@radix-ui/react-focus-scope": "
|
|
40
|
-
"@radix-ui/react-id": "
|
|
41
|
-
"@radix-ui/react-menu": "
|
|
42
|
-
"@radix-ui/react-popper": "
|
|
43
|
-
"@radix-ui/react-portal": "
|
|
44
|
-
"@radix-ui/react-presence": "
|
|
45
|
-
"@radix-ui/react-primitive": "
|
|
46
|
-
"@radix-ui/react-scroll-area": "
|
|
47
|
-
"@radix-ui/react-select": "
|
|
48
|
-
"@radix-ui/react-separator": "
|
|
49
|
-
"@radix-ui/react-slot": "
|
|
50
|
-
"@radix-ui/react-switch": "
|
|
51
|
-
"@radix-ui/react-toast": "
|
|
52
|
-
"@radix-ui/react-toggle": "
|
|
53
|
-
"@radix-ui/react-toggle-group": "
|
|
54
|
-
"@radix-ui/react-toolbar": "
|
|
55
|
-
"@radix-ui/react-tooltip": "
|
|
56
|
-
"@radix-ui/react-use-controllable-state": "
|
|
28
|
+
"@fluentui/react-tabster": "9.23.3",
|
|
29
|
+
"@radix-ui/primitive": "1.1.1",
|
|
30
|
+
"@radix-ui/react-alert-dialog": "1.1.6",
|
|
31
|
+
"@radix-ui/react-avatar": "1.1.3",
|
|
32
|
+
"@radix-ui/react-checkbox": "1.1.4",
|
|
33
|
+
"@radix-ui/react-collapsible": "1.1.3",
|
|
34
|
+
"@radix-ui/react-compose-refs": "1.1.1",
|
|
35
|
+
"@radix-ui/react-context": "1.1.1",
|
|
36
|
+
"@radix-ui/react-context-menu": "2.2.6",
|
|
37
|
+
"@radix-ui/react-dialog": "1.1.6",
|
|
38
|
+
"@radix-ui/react-dismissable-layer": "1.1.5",
|
|
39
|
+
"@radix-ui/react-focus-guards": "1.1.1",
|
|
40
|
+
"@radix-ui/react-focus-scope": "1.1.2",
|
|
41
|
+
"@radix-ui/react-id": "1.1.0",
|
|
42
|
+
"@radix-ui/react-menu": "2.1.6",
|
|
43
|
+
"@radix-ui/react-popper": "1.2.2",
|
|
44
|
+
"@radix-ui/react-portal": "1.1.4",
|
|
45
|
+
"@radix-ui/react-presence": "1.1.2",
|
|
46
|
+
"@radix-ui/react-primitive": "2.0.2",
|
|
47
|
+
"@radix-ui/react-scroll-area": "1.2.3",
|
|
48
|
+
"@radix-ui/react-select": "2.1.6",
|
|
49
|
+
"@radix-ui/react-separator": "1.1.2",
|
|
50
|
+
"@radix-ui/react-slot": "1.1.2",
|
|
51
|
+
"@radix-ui/react-switch": "1.1.3",
|
|
52
|
+
"@radix-ui/react-toast": "1.2.6",
|
|
53
|
+
"@radix-ui/react-toggle": "1.1.2",
|
|
54
|
+
"@radix-ui/react-toggle-group": "1.1.2",
|
|
55
|
+
"@radix-ui/react-toolbar": "1.1.2",
|
|
56
|
+
"@radix-ui/react-tooltip": "1.1.8",
|
|
57
|
+
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
57
58
|
"aria-hidden": "^1.2.4",
|
|
58
59
|
"date-fns": "^3.3.1",
|
|
59
60
|
"i18next": "^21.10.0",
|
|
60
61
|
"keyborg": "^2.5.0",
|
|
61
62
|
"react-i18next": "^11.18.6",
|
|
62
63
|
"react-remove-scroll": "^2.6.0",
|
|
63
|
-
"@dxos/debug": "0.7.5-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/react-
|
|
67
|
-
"@dxos/react-
|
|
68
|
-
"@dxos/react-
|
|
69
|
-
"@dxos/util": "0.7.5-main.
|
|
64
|
+
"@dxos/debug": "0.7.5-main.b19bfc8",
|
|
65
|
+
"@dxos/react-input": "0.7.5-main.b19bfc8",
|
|
66
|
+
"@dxos/log": "0.7.5-main.b19bfc8",
|
|
67
|
+
"@dxos/react-list": "0.7.5-main.b19bfc8",
|
|
68
|
+
"@dxos/react-hooks": "0.7.5-main.b19bfc8",
|
|
69
|
+
"@dxos/react-ui-types": "0.7.5-main.b19bfc8",
|
|
70
|
+
"@dxos/util": "0.7.5-main.b19bfc8"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
73
|
"@dnd-kit/core": "^6.0.5",
|
|
@@ -78,15 +79,15 @@
|
|
|
78
79
|
"react": "~18.2.0",
|
|
79
80
|
"react-dom": "~18.2.0",
|
|
80
81
|
"vite": "5.4.7",
|
|
81
|
-
"@dxos/random": "0.7.5-main.
|
|
82
|
-
"@dxos/react-ui-theme": "0.7.5-main.
|
|
83
|
-
"@dxos/util": "0.7.5-main.
|
|
82
|
+
"@dxos/random": "0.7.5-main.b19bfc8",
|
|
83
|
+
"@dxos/react-ui-theme": "0.7.5-main.b19bfc8",
|
|
84
|
+
"@dxos/util": "0.7.5-main.b19bfc8"
|
|
84
85
|
},
|
|
85
86
|
"peerDependencies": {
|
|
86
87
|
"@phosphor-icons/react": "^2.1.5",
|
|
87
88
|
"react": "~18.2.0",
|
|
88
89
|
"react-dom": "~18.2.0",
|
|
89
|
-
"@dxos/react-ui-theme": "0.7.5-main.
|
|
90
|
+
"@dxos/react-ui-theme": "0.7.5-main.b19bfc8"
|
|
90
91
|
},
|
|
91
92
|
"publishConfig": {
|
|
92
93
|
"access": "public"
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import {
|
|
6
6
|
Root as AvatarRootPrimitive,
|
|
7
7
|
type AvatarProps as AvatarRootPrimitiveProps,
|
|
8
|
-
type ImageLoadingStatus,
|
|
9
8
|
Fallback as AvatarFallbackPrimitive,
|
|
9
|
+
type AvatarImageProps as AvatarImagePrimitiveProps,
|
|
10
10
|
} from '@radix-ui/react-avatar';
|
|
11
11
|
import { createContext } from '@radix-ui/react-context';
|
|
12
12
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
@@ -112,15 +112,10 @@ const AvatarFrame = forwardRef<HTMLSpanElement, AvatarFrameProps>(
|
|
|
112
112
|
</mask>
|
|
113
113
|
</defs>
|
|
114
114
|
{variant === 'circle' ? (
|
|
115
|
-
<circle
|
|
116
|
-
className={hue ? tx('hue.fill', 'avatar__frame__circle', { hue }) : 'fill-[var(--surface-bg)]'}
|
|
117
|
-
cx='50%'
|
|
118
|
-
cy='50%'
|
|
119
|
-
r={r}
|
|
120
|
-
/>
|
|
115
|
+
<circle cx='50%' cy='50%' r={r} fill={hue ? `var(--dx-${hue}Fill)` : 'var(--surface-bg)'} />
|
|
121
116
|
) : (
|
|
122
117
|
<rect
|
|
123
|
-
|
|
118
|
+
fill={hue ? `var(--dx-${hue}Fill)` : 'var(--surface-bg)'}
|
|
124
119
|
x={ringGap + ringWidth}
|
|
125
120
|
y={ringGap + ringWidth}
|
|
126
121
|
width={2 * r}
|
|
@@ -243,9 +238,7 @@ const AvatarMaskedText = (props: AvatarMaskedTextProps) => {
|
|
|
243
238
|
);
|
|
244
239
|
};
|
|
245
240
|
|
|
246
|
-
type AvatarImageProps = ComponentPropsWithRef<'image'> &
|
|
247
|
-
onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
|
|
248
|
-
};
|
|
241
|
+
type AvatarImageProps = ComponentPropsWithRef<'image'> & Pick<AvatarImagePrimitiveProps, 'onLoadingStatusChange'>;
|
|
249
242
|
|
|
250
243
|
const AvatarImage = forwardRef<SVGImageElement, AvatarImageProps>(
|
|
251
244
|
({ onLoadingStatusChange, ...props }, forwardedRef) => {
|
|
@@ -264,8 +257,7 @@ const AvatarImage = forwardRef<SVGImageElement, AvatarImageProps>(
|
|
|
264
257
|
|
|
265
258
|
type AvatarIconProps = {
|
|
266
259
|
icon: string;
|
|
267
|
-
|
|
268
|
-
};
|
|
260
|
+
} & Pick<AvatarImagePrimitiveProps, 'onLoadingStatusChange'>;
|
|
269
261
|
|
|
270
262
|
const AvatarIcon = forwardRef<SVGSVGElement, AvatarIconProps>(({ onLoadingStatusChange, ...props }, forwardedRef) => {
|
|
271
263
|
const { size } = useAvatarContext('AvatarIcon');
|
|
@@ -8,25 +8,33 @@ import { Button, type ButtonProps } from './Button';
|
|
|
8
8
|
import { useThemeContext } from '../../hooks';
|
|
9
9
|
import { type ThemedClassName } from '../../util';
|
|
10
10
|
import { Icon, type IconProps } from '../Icon';
|
|
11
|
-
import { Tooltip } from '../Tooltip';
|
|
11
|
+
import { Tooltip, type TooltipContentProps } from '../Tooltip';
|
|
12
12
|
|
|
13
13
|
type IconButtonProps = Omit<ButtonProps, 'children'> &
|
|
14
14
|
Pick<IconProps, 'icon' | 'size'> & {
|
|
15
15
|
label: NonNullable<ReactNode>;
|
|
16
16
|
iconOnly?: boolean;
|
|
17
|
+
noTooltip?: boolean;
|
|
17
18
|
caretDown?: boolean;
|
|
18
19
|
// TODO(burdon): Create slots abstraction?
|
|
19
20
|
iconClassNames?: ThemedClassName<any>['classNames'];
|
|
20
21
|
tooltipPortal?: boolean;
|
|
21
22
|
tooltipZIndex?: string;
|
|
23
|
+
tooltipSide?: TooltipContentProps['side'];
|
|
22
24
|
suppressNextTooltip?: MutableRefObject<boolean>;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
const IconOnlyButton = forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
26
|
-
(
|
|
28
|
+
(
|
|
29
|
+
{ noTooltip, tooltipPortal = true, tooltipZIndex: zIndex, tooltipSide, suppressNextTooltip, ...props },
|
|
30
|
+
forwardedRef,
|
|
31
|
+
) => {
|
|
27
32
|
const [triggerTooltipOpen, setTriggerTooltipOpen] = useState(false);
|
|
33
|
+
if (noTooltip) {
|
|
34
|
+
return <LabelledIconButton {...props} ref={forwardedRef} />;
|
|
35
|
+
}
|
|
28
36
|
const content = (
|
|
29
|
-
<Tooltip.Content {...(zIndex && { style: { zIndex } })}>
|
|
37
|
+
<Tooltip.Content {...(zIndex && { style: { zIndex } })} side={tooltipSide}>
|
|
30
38
|
{props.label}
|
|
31
39
|
<Tooltip.Arrow />
|
|
32
40
|
</Tooltip.Content>
|
|
@@ -44,11 +44,15 @@ export const CopyButton = ({ value, classNames, iconProps, ...props }: CopyButto
|
|
|
44
44
|
);
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
type CopyButtonIconOnlyProps = CopyButtonProps & {
|
|
48
|
+
label?: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }: CopyButtonIconOnlyProps) => {
|
|
48
52
|
const { t } = useTranslation('os');
|
|
49
53
|
const { textValue, setTextValue } = useClipboard();
|
|
50
54
|
const isCopied = textValue === value;
|
|
51
|
-
const label = isCopied ? t('copy success label') : t('copy label');
|
|
55
|
+
const label = isCopied ? t('copy success label') : props.label ?? t('copy label');
|
|
52
56
|
const [open, setOpen] = useState(false);
|
|
53
57
|
return (
|
|
54
58
|
<Tooltip.Root delayDuration={1500} open={open} onOpenChange={setOpen}>
|
|
@@ -95,7 +95,9 @@ const [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLa
|
|
|
95
95
|
},
|
|
96
96
|
);
|
|
97
97
|
|
|
98
|
-
type AlertDialogOverlayProps = ThemedClassName<AlertDialogOverlayPrimitiveProps> & {
|
|
98
|
+
type AlertDialogOverlayProps = ThemedClassName<AlertDialogOverlayPrimitiveProps> & {
|
|
99
|
+
blockAlign?: 'center' | 'start' | 'end';
|
|
100
|
+
};
|
|
99
101
|
|
|
100
102
|
const AlertDialogOverlay: ForwardRefExoticComponent<AlertDialogOverlayProps> = forwardRef<
|
|
101
103
|
HTMLDivElement,
|
|
@@ -85,7 +85,7 @@ const [OverlayLayoutProvider, useOverlayLayoutContext] = createContext<OverlayLa
|
|
|
85
85
|
inOverlayLayout: false,
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
type DialogOverlayProps = ThemedClassName<DialogOverlayPrimitiveProps> & { blockAlign?: 'center' | 'start' };
|
|
88
|
+
type DialogOverlayProps = ThemedClassName<DialogOverlayPrimitiveProps> & { blockAlign?: 'center' | 'start' | 'end' };
|
|
89
89
|
|
|
90
90
|
const DialogOverlay: ForwardRefExoticComponent<DialogOverlayProps> = forwardRef<HTMLDivElement, DialogOverlayProps>(
|
|
91
91
|
({ classNames, children, blockAlign, ...props }, forwardedRef) => {
|
|
@@ -106,17 +106,22 @@ const DialogOverlay: ForwardRefExoticComponent<DialogOverlayProps> = forwardRef<
|
|
|
106
106
|
|
|
107
107
|
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
108
108
|
|
|
109
|
-
type DialogContentProps = ThemedClassName<DialogContentPrimitiveProps
|
|
109
|
+
type DialogContentProps = ThemedClassName<DialogContentPrimitiveProps> & { inOverlayLayout?: boolean };
|
|
110
110
|
|
|
111
111
|
const DialogContent: ForwardRefExoticComponent<DialogContentProps> = forwardRef<HTMLDivElement, DialogContentProps>(
|
|
112
|
-
({ classNames, children, ...props }, forwardedRef) => {
|
|
112
|
+
({ classNames, children, inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
|
|
113
113
|
const { tx } = useThemeContext();
|
|
114
114
|
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
115
115
|
|
|
116
116
|
return (
|
|
117
117
|
<DialogContentPrimitive
|
|
118
118
|
{...props}
|
|
119
|
-
className={tx(
|
|
119
|
+
className={tx(
|
|
120
|
+
'dialog.content',
|
|
121
|
+
'dialog',
|
|
122
|
+
{ inOverlayLayout: propsInOverlayLayout || inOverlayLayout },
|
|
123
|
+
classNames,
|
|
124
|
+
)}
|
|
120
125
|
ref={forwardedRef}
|
|
121
126
|
>
|
|
122
127
|
{children}
|
|
@@ -12,7 +12,10 @@ import { type ThemedClassName } from '../../util';
|
|
|
12
12
|
|
|
13
13
|
const ICONS_URL = '/icons.svg';
|
|
14
14
|
|
|
15
|
-
export type IconProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.svg>> & {
|
|
15
|
+
export type IconProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.svg>> & {
|
|
16
|
+
icon: string;
|
|
17
|
+
size?: Size;
|
|
18
|
+
};
|
|
16
19
|
|
|
17
20
|
export const Icon = memo(
|
|
18
21
|
forwardRef<SVGSVGElement, IconProps>(({ icon, classNames, size, ...props }, forwardedRef) => {
|
|
@@ -307,7 +307,7 @@ const Switch = forwardRef<HTMLInputElement, InputScopedProps<SwitchProps>>(
|
|
|
307
307
|
return (
|
|
308
308
|
<input
|
|
309
309
|
type='checkbox'
|
|
310
|
-
className='
|
|
310
|
+
className='dx-checkbox--switch dx-focus-ring'
|
|
311
311
|
checked={checked}
|
|
312
312
|
onChange={(event) => {
|
|
313
313
|
onCheckedChange(event.target.checked);
|
|
@@ -15,8 +15,10 @@ const edgeToOrientationMap: Record<Edge, Orientation> = {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const orientationStyles: Record<Orientation, HTMLAttributes<HTMLElement>['className']> = {
|
|
18
|
-
horizontal:
|
|
19
|
-
|
|
18
|
+
horizontal:
|
|
19
|
+
'h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]',
|
|
20
|
+
vertical:
|
|
21
|
+
'w-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]',
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
const edgeStyles: Record<Edge, HTMLAttributes<HTMLElement>['className']> = {
|
|
@@ -33,14 +35,19 @@ const offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
|
|
|
33
35
|
export type DropIndicatorProps = {
|
|
34
36
|
edge: Edge;
|
|
35
37
|
gap?: number;
|
|
38
|
+
terminalInset?: number;
|
|
39
|
+
lineInset?: number;
|
|
36
40
|
};
|
|
37
41
|
|
|
38
42
|
/**
|
|
39
43
|
* This is a tailwind port of `@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box`
|
|
40
44
|
*/
|
|
41
|
-
export const ListDropIndicator = ({
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
export const ListDropIndicator = ({
|
|
46
|
+
edge,
|
|
47
|
+
gap = 0,
|
|
48
|
+
lineInset = 0,
|
|
49
|
+
terminalInset = lineInset - terminalSize,
|
|
50
|
+
}: DropIndicatorProps) => {
|
|
44
51
|
const orientation = edgeToOrientationMap[edge];
|
|
45
52
|
|
|
46
53
|
return (
|
|
@@ -49,10 +56,11 @@ export const ListDropIndicator = ({ edge, gap = 0 }: DropIndicatorProps) => {
|
|
|
49
56
|
style={
|
|
50
57
|
{
|
|
51
58
|
'--line-thickness': `${strokeSize}px`,
|
|
52
|
-
'--line-offset':
|
|
59
|
+
'--line-offset': `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
|
|
60
|
+
'--line-inset': `${lineInset}px`,
|
|
53
61
|
'--terminal-size': `${terminalSize}px`,
|
|
54
62
|
'--terminal-radius': `${terminalSize / 2}px`,
|
|
55
|
-
'--
|
|
63
|
+
'--terminal-inset': `${terminalInset}px`,
|
|
56
64
|
'--offset-terminal': `${offsetToAlignTerminalWithLine}px`,
|
|
57
65
|
} as CSSProperties
|
|
58
66
|
}
|
|
@@ -24,7 +24,7 @@ const ComplementarySidebarToggle = () => {
|
|
|
24
24
|
|
|
25
25
|
const StoryMain = (_args: StoryMainArgs) => {
|
|
26
26
|
return (
|
|
27
|
-
<Main.Root
|
|
27
|
+
<Main.Root>
|
|
28
28
|
<Main.Overlay />
|
|
29
29
|
<Main.NavigationSidebar classNames='p-4'>
|
|
30
30
|
<p>Navigation sidebar content, hi!</p>
|