@dxos/react-ui 0.8.1 → 0.8.2-main.2f9c567
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 +1152 -1150
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +1104 -1102
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +1152 -1150
- 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 +2 -1
- 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 +17 -13
- package/src/components/Dialogs/Dialog.tsx +1 -0
- package/src/components/Popover/Popover.tsx +3 -0
- package/src/components/index.ts +1 -1
|
@@ -41,19 +41,22 @@ 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
|
-
|
|
44
|
+
const AvatarContent = forwardRef<NaturalDxAvatar, AvatarContentProps>(
|
|
45
|
+
({ icon, classNames, ...props }, forwardedRef) => {
|
|
46
|
+
const href = useIconHref(icon);
|
|
47
|
+
const { labelId, descriptionId } = useAvatarContext('AvatarContent');
|
|
48
|
+
return (
|
|
49
|
+
<DxAvatar
|
|
50
|
+
{...props}
|
|
51
|
+
icon={href}
|
|
52
|
+
aria-labelledby={labelId}
|
|
53
|
+
aria-describedby={descriptionId}
|
|
54
|
+
rootClassName={mx(classNames)}
|
|
55
|
+
ref={forwardedRef}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
);
|
|
57
60
|
|
|
58
61
|
type AvatarLabelProps = ThemedClassName<Omit<ComponentPropsWithRef<typeof Primitive.span>, 'id'>> & {
|
|
59
62
|
asChild?: boolean;
|
|
@@ -113,4 +116,5 @@ export type {
|
|
|
113
116
|
AvatarContentProps,
|
|
114
117
|
AvatarLabelProps,
|
|
115
118
|
AvatarDescriptionProps,
|
|
119
|
+
NaturalDxAvatar as DxAvatar,
|
|
116
120
|
};
|
|
@@ -571,6 +571,8 @@ 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
|
+
|
|
574
576
|
export const Popover = {
|
|
575
577
|
Root: PopoverRoot,
|
|
576
578
|
Anchor: PopoverAnchor,
|
|
@@ -595,4 +597,5 @@ export type {
|
|
|
595
597
|
PopoverCloseProps,
|
|
596
598
|
PopoverArrowProps,
|
|
597
599
|
PopoverViewportProps,
|
|
600
|
+
PopoverContentInteractOutsideEvent,
|
|
598
601
|
};
|
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';
|
|
12
11
|
export * from './Icon';
|
|
13
12
|
export * from './Input';
|
|
14
13
|
export * from './Link';
|
|
15
14
|
export * from './Lists';
|
|
16
15
|
export * from './Main';
|
|
16
|
+
export * from './Menus';
|
|
17
17
|
export * from './Message';
|
|
18
18
|
export * from './Popover';
|
|
19
19
|
export * from './Status';
|