@protonradio/proton-ui 0.11.0-beta.5 → 0.11.0-beta.8
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.cjs.js +11 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +12 -5
- package/dist/index.es.js +2653 -2628
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AriaButtonProps } from 'react-aria';
|
|
1
2
|
import { AriaDialogProps } from 'react-aria';
|
|
2
3
|
import { AriaPopoverProps } from 'react-aria';
|
|
3
4
|
import { AriaTableProps } from 'react-aria';
|
|
@@ -26,7 +27,7 @@ import { TooltipTriggerComponentProps } from 'react-aria-components';
|
|
|
26
27
|
* Renders a list of actions as a focusable menu, or non-focusable children.
|
|
27
28
|
* @interface ActionMenuProps
|
|
28
29
|
*/
|
|
29
|
-
export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, children, showCancel, cancelButtonText, actions, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
|
|
30
|
+
export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, children, showCancel, cancelButtonText, actions, title, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
|
|
30
31
|
|
|
31
32
|
declare interface ActionMenuAction {
|
|
32
33
|
key: string;
|
|
@@ -47,6 +48,7 @@ declare interface ActionMenuProps {
|
|
|
47
48
|
}) => ReactNode);
|
|
48
49
|
showCancel?: boolean;
|
|
49
50
|
cancelButtonText?: string;
|
|
51
|
+
title?: string;
|
|
50
52
|
actions?: ActionMenuAction[];
|
|
51
53
|
id?: string;
|
|
52
54
|
onClose?: () => void;
|
|
@@ -245,7 +247,7 @@ declare interface ButtonGroupProps {
|
|
|
245
247
|
children?: React.ReactNode;
|
|
246
248
|
}
|
|
247
249
|
|
|
248
|
-
declare interface ButtonProps {
|
|
250
|
+
declare interface ButtonProps extends AriaButtonProps<"button"> {
|
|
249
251
|
/** The button's visual aesthetic
|
|
250
252
|
* @param {ButtonVariant} variant
|
|
251
253
|
*/
|
|
@@ -274,7 +276,7 @@ declare interface ButtonProps {
|
|
|
274
276
|
/** The target attribute for the link. Defaults to `_blank` if the URL is external.
|
|
275
277
|
* @param {string} target
|
|
276
278
|
*/
|
|
277
|
-
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
279
|
+
target?: "_blank" | "_self" | "_parent" | "_top" | string;
|
|
278
280
|
/** Called when the button is pressed (on release, not keydown)
|
|
279
281
|
* @param {(e: PressEvent) => void} onPress
|
|
280
282
|
*/
|
|
@@ -432,6 +434,8 @@ declare interface MenuProps {
|
|
|
432
434
|
renderTrigger?: (triggerProps: TriggerProps) => ReactNode;
|
|
433
435
|
/** Size of the trigger icon */
|
|
434
436
|
size?: number;
|
|
437
|
+
/** Title of the parent menu */
|
|
438
|
+
title?: string;
|
|
435
439
|
/** Array of menu actions/items to display */
|
|
436
440
|
items: MenuItemType[];
|
|
437
441
|
/** Whether the menu is disabled */
|
|
@@ -450,7 +454,7 @@ declare interface MenuProps {
|
|
|
450
454
|
disabledKeys?: string[];
|
|
451
455
|
}
|
|
452
456
|
|
|
453
|
-
export declare function MenuTrigger({ renderTrigger, menuId, size, items, disabled, onClose, testId: triggerTestId, menuTestId, onSelectionChange, selectedKey, disabledKeys, }: MenuProps): JSX_2.Element;
|
|
457
|
+
export declare function MenuTrigger({ renderTrigger, menuId, size, title, items, disabled, onClose, testId: triggerTestId, menuTestId, onSelectionChange, selectedKey, disabledKeys, }: MenuProps): JSX_2.Element;
|
|
454
458
|
|
|
455
459
|
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX_2.Element) & {
|
|
456
460
|
Title: ({ children }: {
|
|
@@ -898,7 +902,10 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
|
|
|
898
902
|
*/
|
|
899
903
|
declare interface TriggerProps {
|
|
900
904
|
disabled?: boolean;
|
|
901
|
-
|
|
905
|
+
/** Props for handling press interactions on the trigger element */
|
|
906
|
+
domTriggerProps: PressProps;
|
|
907
|
+
/** Props for handling menu trigger interactions */
|
|
908
|
+
ariaTriggerProps: AriaButtonProps<"button">;
|
|
902
909
|
isOpen?: boolean;
|
|
903
910
|
triggerRef: React.RefObject<HTMLButtonElement>;
|
|
904
911
|
}
|