@protonradio/proton-ui 0.11.0 → 0.11.1-beta.1

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
@@ -26,7 +26,7 @@ import { TooltipTriggerComponentProps } from 'react-aria-components';
26
26
  * Renders a list of actions as a focusable menu, or non-focusable children.
27
27
  * @interface ActionMenuProps
28
28
  */
29
- export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, children, showCancel, cancelButtonText, actions, title, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
29
+ export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, children, showCancel, cancelButtonText, actions, title, onSelectionChange, onClose, "data-testid": testId, menuId, }: ActionMenuProps) => JSX_2.Element;
30
30
 
31
31
  declare interface ActionMenuAction {
32
32
  key: string;
@@ -53,6 +53,7 @@ declare interface ActionMenuProps {
53
53
  onClose?: () => void;
54
54
  onSelectionChange?: (keys: Selection_2) => void;
55
55
  "data-testid"?: string;
56
+ menuId?: string;
56
57
  }
57
58
 
58
59
  export declare const Badge: ({ variant, children, ...props }: BadgeProps) => JSX_2.Element;
@@ -441,6 +442,8 @@ declare interface MenuProps {
441
442
  triggerTestId?: string;
442
443
  /** Test ID for the menu */
443
444
  menuTestId?: string;
445
+ /** Can be used to target the menu element */
446
+ menuId?: string;
444
447
  /** Callback when a menu item is selected */
445
448
  onSelectionChange?: (key: string) => void;
446
449
  /** The key of the selected item */
@@ -449,7 +452,7 @@ declare interface MenuProps {
449
452
  disabledKeys?: string[];
450
453
  }
451
454
 
452
- export declare function MenuTrigger({ renderTrigger, size, title, items, disabled, onClose, triggerTestId, menuTestId, onSelectionChange, selectedKey, disabledKeys, }: MenuProps): JSX_2.Element;
455
+ export declare function MenuTrigger({ renderTrigger, size, title, items, disabled, onClose, triggerTestId, menuTestId, onSelectionChange, selectedKey, disabledKeys, menuId, }: MenuProps): JSX_2.Element;
453
456
 
454
457
  export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX_2.Element) & {
455
458
  Title: ({ children }: {
@@ -898,9 +901,9 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
898
901
  * @returns {JSX.Element} - The MenuTrigger component.
899
902
  */
900
903
  declare interface TriggerProps {
901
- disabled?: boolean;
902
- isOpen?: boolean;
903
- setIsOpen?: (isOpen: boolean) => void;
904
+ disabled: boolean;
905
+ isOpen: boolean;
906
+ setIsOpen: (isOpen: boolean) => void;
904
907
  triggerRef: React.RefObject<HTMLButtonElement>;
905
908
  }
906
909