@protonradio/proton-ui 0.11.0-beta.9 → 0.11.1-beta.0

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
@@ -10,7 +10,6 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
10
10
  import { OverlayTriggerProps } from 'react-stately';
11
11
  import { OverlayTriggerState } from 'react-stately';
12
12
  import { PressEvent } from 'react-aria';
13
- import { PressProps } from 'react-aria';
14
13
  import { ReactNode } from 'react';
15
14
  import { RefAttributes } from 'react';
16
15
  import { RowProps } from '@react-stately/table';
@@ -27,7 +26,7 @@ import { TooltipTriggerComponentProps } from 'react-aria-components';
27
26
  * Renders a list of actions as a focusable menu, or non-focusable children.
28
27
  * @interface ActionMenuProps
29
28
  */
30
- 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;
31
30
 
32
31
  declare interface ActionMenuAction {
33
32
  key: string;
@@ -51,10 +50,10 @@ declare interface ActionMenuProps {
51
50
  cancelButtonText?: string;
52
51
  title?: string;
53
52
  actions?: ActionMenuAction[];
54
- id?: string;
55
53
  onClose?: () => void;
56
54
  onSelectionChange?: (keys: Selection_2) => void;
57
55
  "data-testid"?: string;
56
+ menuId?: string;
58
57
  }
59
58
 
60
59
  export declare const Badge: ({ variant, children, ...props }: BadgeProps) => JSX_2.Element;
@@ -294,10 +293,6 @@ declare interface ButtonProps extends AriaButtonProps<"button"> {
294
293
  * @param {React.ReactNode} children
295
294
  */
296
295
  children?: React.ReactNode;
297
- /** DO NOT USE. INTERNAL USE ONLY. Will be used in calculation for the shift of the button text. Represents the # of horizontal pixels to shift.
298
- * @param {number} __textShift
299
- */
300
- __textShift?: number;
301
296
  }
302
297
 
303
298
  declare type ButtonSize = "small" | "medium" | "large" | "xlarge" | "2xlarge";
@@ -429,11 +424,11 @@ export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps &
429
424
  declare type MenuItemType = ActionMenuAction;
430
425
 
431
426
  declare interface MenuProps {
432
- /** The id of the menu */
433
- menuId?: string;
434
427
  /** Custom trigger component. If not provided, defaults to ellipsis icon */
435
428
  renderTrigger?: (triggerProps: TriggerProps) => ReactNode;
436
- /** Size of the trigger icon */
429
+ /** Size of the trigger icon
430
+ * @default 24
431
+ */
437
432
  size?: number;
438
433
  /** Title of the parent menu */
439
434
  title?: string;
@@ -444,9 +439,11 @@ declare interface MenuProps {
444
439
  /** Callback when menu closes */
445
440
  onClose?: () => void;
446
441
  /** Test ID for the trigger component */
447
- testId?: string;
442
+ triggerTestId?: string;
448
443
  /** Test ID for the menu */
449
444
  menuTestId?: string;
445
+ /** Can be used to target the menu element */
446
+ menuId?: string;
450
447
  /** Callback when a menu item is selected */
451
448
  onSelectionChange?: (key: string) => void;
452
449
  /** The key of the selected item */
@@ -455,7 +452,7 @@ declare interface MenuProps {
455
452
  disabledKeys?: string[];
456
453
  }
457
454
 
458
- export declare function MenuTrigger({ renderTrigger, menuId, size, title, items, disabled, onClose, testId: 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;
459
456
 
460
457
  export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX_2.Element) & {
461
458
  Title: ({ children }: {
@@ -514,6 +511,7 @@ declare type Palette = {
514
511
  BRAND: {
515
512
  PRIMARY: string;
516
513
  PRIMARY_LIGHT: string;
514
+ PRIMARY_SUPER_LIGHT: string;
517
515
  SECONDARY: string;
518
516
  };
519
517
  PRIMARY: {
@@ -824,6 +822,7 @@ declare interface ThemeVariables {
824
822
  "--proton-control__shadow-color": string;
825
823
  "--proton-color__primary": string;
826
824
  "--proton-color__primary-light": string;
825
+ "--proton-color__primary-super-light": string;
827
826
  "--proton-color__secondary": string;
828
827
  "--proton-control__primary-super-dark": string;
829
828
  "--proton-control__primary-dark": string;
@@ -903,11 +902,8 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
903
902
  */
904
903
  declare interface TriggerProps {
905
904
  disabled?: boolean;
906
- /** Props for handling press interactions on the trigger element */
907
- domTriggerProps: PressProps;
908
- /** Props for handling menu trigger interactions */
909
- ariaTriggerProps: AriaButtonProps<"button">;
910
905
  isOpen?: boolean;
906
+ setIsOpen?: (isOpen: boolean) => void;
911
907
  triggerRef: React.RefObject<HTMLButtonElement>;
912
908
  }
913
909