@dxos/react-ui 0.8.2-main.f11618f → 0.8.2-staging.7ac8446
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 +1130 -1132
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +1099 -1101
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +1130 -1132
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts +2 -2
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Popover/Popover.d.ts +1 -2
- package/dist/types/src/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/components/Avatars/Avatar.tsx +13 -17
- package/src/components/Dialogs/Dialog.tsx +0 -1
- package/src/components/Popover/Popover.tsx +0 -3
- package/src/components/index.ts +1 -1
|
@@ -41,22 +41,19 @@ const DxAvatar = createComponent({
|
|
|
41
41
|
|
|
42
42
|
type AvatarContentProps = ThemedClassName<Omit<ComponentProps<typeof DxAvatar>, 'children'>>;
|
|
43
43
|
|
|
44
|
-
const AvatarContent =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
);
|
|
58
|
-
},
|
|
59
|
-
);
|
|
44
|
+
const AvatarContent = ({ icon, classNames, ...props }: AvatarContentProps) => {
|
|
45
|
+
const href = useIconHref(icon);
|
|
46
|
+
const { labelId, descriptionId } = useAvatarContext('AvatarContent');
|
|
47
|
+
return (
|
|
48
|
+
<DxAvatar
|
|
49
|
+
{...props}
|
|
50
|
+
icon={href}
|
|
51
|
+
labelId={labelId}
|
|
52
|
+
aria-describedby={descriptionId}
|
|
53
|
+
rootClassName={mx(classNames)}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
60
57
|
|
|
61
58
|
type AvatarLabelProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.span>, 'id'>> & {
|
|
62
59
|
asChild?: boolean;
|
|
@@ -116,5 +113,4 @@ export type {
|
|
|
116
113
|
AvatarContentProps,
|
|
117
114
|
AvatarLabelProps,
|
|
118
115
|
AvatarDescriptionProps,
|
|
119
|
-
NaturalDxAvatar as DxAvatar,
|
|
120
116
|
};
|
|
@@ -571,8 +571,6 @@ const PopoverViewport = forwardRef<HTMLDivElement, PopoverViewportProps>(
|
|
|
571
571
|
|
|
572
572
|
const getState = (open: boolean) => (open ? 'open' : 'closed');
|
|
573
573
|
|
|
574
|
-
type PopoverContentInteractOutsideEvent = Parameters<NonNullable<PopoverContentProps['onInteractOutside']>>[0];
|
|
575
|
-
|
|
576
574
|
export const Popover = {
|
|
577
575
|
Root: PopoverRoot,
|
|
578
576
|
Anchor: PopoverAnchor,
|
|
@@ -597,5 +595,4 @@ export type {
|
|
|
597
595
|
PopoverCloseProps,
|
|
598
596
|
PopoverArrowProps,
|
|
599
597
|
PopoverViewportProps,
|
|
600
|
-
PopoverContentInteractOutsideEvent,
|
|
601
598
|
};
|
package/src/components/index.ts
CHANGED
|
@@ -8,12 +8,12 @@ export * from './Breadcrumb';
|
|
|
8
8
|
export * from './Buttons';
|
|
9
9
|
export * from './Clipboard';
|
|
10
10
|
export * from './Dialogs';
|
|
11
|
+
export * from './Menus';
|
|
11
12
|
export * from './Icon';
|
|
12
13
|
export * from './Input';
|
|
13
14
|
export * from './Link';
|
|
14
15
|
export * from './Lists';
|
|
15
16
|
export * from './Main';
|
|
16
|
-
export * from './Menus';
|
|
17
17
|
export * from './Message';
|
|
18
18
|
export * from './Popover';
|
|
19
19
|
export * from './Status';
|