@aurora-ds/components 1.7.15 → 1.7.16

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/index.d.ts CHANGED
@@ -693,6 +693,11 @@ type AvatarColor = 'default' | 'primary' | 'secondary' | 'success' | 'warning' |
693
693
  type AvatarGroupOverlap = 'sm' | 'md' | 'lg';
694
694
 
695
695
  type AvatarProps = {
696
+ /**
697
+ * Ref forwarded to the root `<div>` element.
698
+ * Pass a `useRef<HTMLDivElement>()` to use the avatar as `anchorEl` for a `Menu`.
699
+ */
700
+ ref?: Ref<HTMLDivElement>;
696
701
  /**
697
702
  * URL of the image to display.
698
703
  * Falls back to `initials` (or first letters of `name`) if the image fails to load.
@@ -726,6 +731,26 @@ type AvatarProps = {
726
731
  onClick?: () => void;
727
732
  /** Accessible label. Defaults to `name` when set, otherwise `'Avatar'`. */
728
733
  ariaLabel?: string;
734
+ /**
735
+ * HTML `id` attribute on the root element.
736
+ * Useful as `aria-labelledby` target for an associated `Menu`.
737
+ */
738
+ id?: string;
739
+ /**
740
+ * Indicates that this element controls a popup (e.g. a menu).
741
+ * Set to `'menu'` when the avatar acts as a menu trigger.
742
+ */
743
+ 'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
744
+ /**
745
+ * Communicates whether the controlled popup is currently open.
746
+ * Pair with `aria-haspopup` when using the avatar as a menu trigger.
747
+ */
748
+ 'aria-expanded'?: boolean;
749
+ /**
750
+ * `aria-controls` pointing to the id of the controlled popup panel
751
+ * (e.g. the `Menu` panel id).
752
+ */
753
+ 'aria-controls'?: string;
729
754
  };
730
755
 
731
756
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurora-ds/components",
3
- "version": "1.7.15",
3
+ "version": "1.7.16",
4
4
  "type": "module",
5
5
  "description": "Aurora DS - React Components Library",
6
6
  "main": "dist/cjs/index.js",