@protonradio/proton-ui 0.11.0-beta.4 → 0.11.0-beta.6
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 +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +13 -9
- package/dist/index.es.js +2237 -2217
- package/dist/index.es.js.map +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';
|
|
@@ -9,6 +10,7 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
9
10
|
import { OverlayTriggerProps } from 'react-stately';
|
|
10
11
|
import { OverlayTriggerState } from 'react-stately';
|
|
11
12
|
import { PressEvent } from 'react-aria';
|
|
13
|
+
import { PressProps } from 'react-aria';
|
|
12
14
|
import { ReactNode } from 'react';
|
|
13
15
|
import { RefAttributes } from 'react';
|
|
14
16
|
import { RowProps } from '@react-stately/table';
|
|
@@ -204,7 +206,7 @@ declare interface BaseInputProps {
|
|
|
204
206
|
* A customizable button component that can render as either a button or anchor element
|
|
205
207
|
* @interface ButtonProps
|
|
206
208
|
*/
|
|
207
|
-
export declare
|
|
209
|
+
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
208
210
|
|
|
209
211
|
export declare function ButtonGroup(props: ButtonGroupProps): JSX_2.Element;
|
|
210
212
|
|
|
@@ -244,7 +246,7 @@ declare interface ButtonGroupProps {
|
|
|
244
246
|
children?: React.ReactNode;
|
|
245
247
|
}
|
|
246
248
|
|
|
247
|
-
declare interface ButtonProps {
|
|
249
|
+
declare interface ButtonProps extends AriaButtonProps<"button"> {
|
|
248
250
|
/** The button's visual aesthetic
|
|
249
251
|
* @param {ButtonVariant} variant
|
|
250
252
|
*/
|
|
@@ -273,7 +275,7 @@ declare interface ButtonProps {
|
|
|
273
275
|
/** The target attribute for the link. Defaults to `_blank` if the URL is external.
|
|
274
276
|
* @param {string} target
|
|
275
277
|
*/
|
|
276
|
-
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
278
|
+
target?: "_blank" | "_self" | "_parent" | "_top" | string;
|
|
277
279
|
/** Called when the button is pressed (on release, not keydown)
|
|
278
280
|
* @param {(e: PressEvent) => void} onPress
|
|
279
281
|
*/
|
|
@@ -428,7 +430,7 @@ declare interface MenuProps {
|
|
|
428
430
|
/** The id of the menu */
|
|
429
431
|
menuId?: string;
|
|
430
432
|
/** Custom trigger component. If not provided, defaults to ellipsis icon */
|
|
431
|
-
renderTrigger?: (triggerProps: TriggerProps
|
|
433
|
+
renderTrigger?: (triggerProps: TriggerProps) => ReactNode;
|
|
432
434
|
/** Size of the trigger icon */
|
|
433
435
|
size?: number;
|
|
434
436
|
/** Array of menu actions/items to display */
|
|
@@ -896,11 +898,13 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
|
|
|
896
898
|
* @returns {JSX.Element} - The MenuTrigger component.
|
|
897
899
|
*/
|
|
898
900
|
declare interface TriggerProps {
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
"
|
|
901
|
+
disabled?: boolean;
|
|
902
|
+
/** Props for handling press interactions on the trigger element */
|
|
903
|
+
domTriggerProps: PressProps;
|
|
904
|
+
/** Props for handling menu trigger interactions */
|
|
905
|
+
ariaTriggerProps: AriaButtonProps<"button">;
|
|
906
|
+
isOpen?: boolean;
|
|
907
|
+
triggerRef: React.RefObject<HTMLButtonElement>;
|
|
904
908
|
}
|
|
905
909
|
|
|
906
910
|
/**
|