@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.
@@ -41,19 +41,22 @@ const DxAvatar = createComponent({
41
41
 
42
42
  type AvatarContentProps = ThemedClassName<Omit<ComponentProps<typeof DxAvatar>, 'children'>>;
43
43
 
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
- };
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
  };
@@ -115,6 +115,7 @@ const DialogContent: ForwardRefExoticComponent<DialogContentProps> = forwardRef<
115
115
 
116
116
  return (
117
117
  <DialogContentPrimitive
118
+ aria-describedby={undefined}
118
119
  {...props}
119
120
  className={tx(
120
121
  'dialog.content',
@@ -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
  };
@@ -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';