@spark-ui/components 12.2.0 → 13.0.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/DialogTrigger-8oDlAJjU.d.mts +142 -0
- package/dist/DialogTrigger-8oDlAJjU.d.ts +142 -0
- package/dist/alert-dialog/index.d.mts +78 -38
- package/dist/alert-dialog/index.d.ts +78 -38
- package/dist/alert-dialog/index.js +187 -1341
- package/dist/alert-dialog/index.js.map +1 -1
- package/dist/alert-dialog/index.mjs +234 -89
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/chunk-2BSBKLHG.mjs +358 -0
- package/dist/chunk-2BSBKLHG.mjs.map +1 -0
- package/dist/chunk-D7YBYT5H.mjs +308 -0
- package/dist/chunk-D7YBYT5H.mjs.map +1 -0
- package/dist/chunk-HEKSVWYW.mjs +800 -0
- package/dist/chunk-HEKSVWYW.mjs.map +1 -0
- package/dist/chunk-TKAU6SMC.mjs +197 -0
- package/dist/chunk-TKAU6SMC.mjs.map +1 -0
- package/dist/chunk-WA56YHV3.mjs +358 -0
- package/dist/chunk-WA56YHV3.mjs.map +1 -0
- package/dist/chunk-XYK6V3JF.mjs +53 -0
- package/dist/chunk-XYK6V3JF.mjs.map +1 -0
- package/dist/chunk-XZ47F6TP.mjs +50 -0
- package/dist/chunk-XZ47F6TP.mjs.map +1 -0
- package/dist/dialog/index.d.mts +140 -7
- package/dist/dialog/index.d.ts +140 -7
- package/dist/dialog/index.mjs +308 -5
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docgen.json +3448 -3319
- package/dist/index-BRKaV3lI.d.mts +93 -0
- package/dist/index-BRKaV3lI.d.ts +93 -0
- package/dist/index-Cw_DIfiq.d.mts +93 -0
- package/dist/index-Cw_DIfiq.d.ts +93 -0
- package/dist/spinner/index.d.mts +1 -1
- package/dist/spinner/index.d.ts +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Dialog as Dialog$1 } from 'radix-ui';
|
|
2
|
+
import { ReactElement, ReactNode, Ref } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
interface DialogProps {
|
|
8
|
+
/**
|
|
9
|
+
* Children of the component.
|
|
10
|
+
*/
|
|
11
|
+
children?: Dialog$1.DialogProps['children'];
|
|
12
|
+
/**
|
|
13
|
+
* Specifies if the dialog is open or not.
|
|
14
|
+
*/
|
|
15
|
+
open?: Dialog$1.DialogProps['open'];
|
|
16
|
+
/**
|
|
17
|
+
* Default open state.
|
|
18
|
+
*/
|
|
19
|
+
defaultOpen?: Dialog$1.DialogProps['defaultOpen'];
|
|
20
|
+
/**
|
|
21
|
+
* Handler executen on every dialog open state change.
|
|
22
|
+
*/
|
|
23
|
+
onOpenChange?: Dialog$1.DialogProps['onOpenChange'];
|
|
24
|
+
/**
|
|
25
|
+
* Specifies if the dialog is a modal.
|
|
26
|
+
*/
|
|
27
|
+
modal?: Dialog$1.DialogProps['modal'];
|
|
28
|
+
/**
|
|
29
|
+
* Specifies if the dialog should have a fade animation on its body (in case it is scrollable).
|
|
30
|
+
*/
|
|
31
|
+
withFade?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare const Dialog: {
|
|
34
|
+
({ children, withFade, ...rest }: DialogProps): ReactElement;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
interface BodyProps {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
tabIndex?: number;
|
|
42
|
+
ref?: Ref<HTMLDivElement>;
|
|
43
|
+
inset?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare const Body: {
|
|
46
|
+
({ children, className, inset, ref: forwardedRef, ...rest }: BodyProps): ReactElement;
|
|
47
|
+
displayName: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type CloseProps = Dialog$1.DialogCloseProps & {
|
|
51
|
+
ref?: Ref<HTMLButtonElement>;
|
|
52
|
+
};
|
|
53
|
+
declare const Close: {
|
|
54
|
+
(props: CloseProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
declare const dialogContentStyles: (props?: ({
|
|
59
|
+
size?: "sm" | "md" | "lg" | "fullscreen" | null | undefined;
|
|
60
|
+
isNarrow?: boolean | null | undefined;
|
|
61
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
62
|
+
type DialogContentStylesProps = VariantProps<typeof dialogContentStyles>;
|
|
63
|
+
|
|
64
|
+
interface ContentProps extends Dialog$1.DialogContentProps, DialogContentStylesProps {
|
|
65
|
+
/**
|
|
66
|
+
* When set to true, the content will adjust its width to fit the content rather than taking up the full available width.
|
|
67
|
+
*/
|
|
68
|
+
isNarrow?: boolean;
|
|
69
|
+
ref?: Ref<HTMLDivElement>;
|
|
70
|
+
}
|
|
71
|
+
declare const Content: {
|
|
72
|
+
({ children, className, isNarrow, size, onInteractOutside, ref, ...rest }: ContentProps): ReactElement;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type DescriptionProps = Dialog$1.DialogDescriptionProps & {
|
|
77
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
78
|
+
};
|
|
79
|
+
declare const Description: {
|
|
80
|
+
(props: DescriptionProps): react_jsx_runtime.JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
interface FooterProps {
|
|
85
|
+
children: ReactNode;
|
|
86
|
+
className?: string;
|
|
87
|
+
ref?: Ref<HTMLDivElement>;
|
|
88
|
+
}
|
|
89
|
+
declare const Footer: {
|
|
90
|
+
({ children, className, ref, ...rest }: FooterProps): ReactElement;
|
|
91
|
+
displayName: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
interface HeaderProps {
|
|
95
|
+
children: ReactNode;
|
|
96
|
+
className?: string;
|
|
97
|
+
ref?: Ref<HTMLDivElement>;
|
|
98
|
+
}
|
|
99
|
+
declare const Header: {
|
|
100
|
+
({ children, className, ref, ...rest }: HeaderProps): ReactElement;
|
|
101
|
+
displayName: string;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
type OverlayProps = Dialog$1.DialogOverlayProps & {
|
|
105
|
+
ref?: Ref<HTMLDivElement>;
|
|
106
|
+
};
|
|
107
|
+
declare const Overlay: {
|
|
108
|
+
({ className, ref, ...rest }: OverlayProps): ReactElement | null;
|
|
109
|
+
displayName: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
type PortalProps = Dialog$1.DialogPortalProps;
|
|
113
|
+
declare const Portal: {
|
|
114
|
+
({ children, ...rest }: PortalProps): ReactElement;
|
|
115
|
+
displayName: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type TitleProps = Dialog$1.DialogTitleProps & {
|
|
119
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
120
|
+
};
|
|
121
|
+
declare const Title: {
|
|
122
|
+
({ className, ref, ...others }: TitleProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
displayName: string;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
interface TriggerProps {
|
|
127
|
+
/**
|
|
128
|
+
* Children of the component.
|
|
129
|
+
*/
|
|
130
|
+
children?: ReactNode;
|
|
131
|
+
/**
|
|
132
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
133
|
+
*/
|
|
134
|
+
asChild?: Dialog$1.DialogTriggerProps['asChild'];
|
|
135
|
+
ref?: Ref<HTMLButtonElement>;
|
|
136
|
+
}
|
|
137
|
+
declare const Trigger: {
|
|
138
|
+
(props: TriggerProps): ReactElement;
|
|
139
|
+
displayName: string;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export { Body as B, type CloseProps as C, Dialog as D, Footer as F, Header as H, Overlay as O, Portal as P, Trigger as T, Content as a, Close as b, Title as c, Description as d, type DialogProps as e, type ContentProps as f, type HeaderProps as g, type BodyProps as h, type FooterProps as i, type TriggerProps as j, type OverlayProps as k, type PortalProps as l, type TitleProps as m, type DescriptionProps as n };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Dialog as Dialog$1 } from 'radix-ui';
|
|
2
|
+
import { ReactElement, ReactNode, Ref } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
interface DialogProps {
|
|
8
|
+
/**
|
|
9
|
+
* Children of the component.
|
|
10
|
+
*/
|
|
11
|
+
children?: Dialog$1.DialogProps['children'];
|
|
12
|
+
/**
|
|
13
|
+
* Specifies if the dialog is open or not.
|
|
14
|
+
*/
|
|
15
|
+
open?: Dialog$1.DialogProps['open'];
|
|
16
|
+
/**
|
|
17
|
+
* Default open state.
|
|
18
|
+
*/
|
|
19
|
+
defaultOpen?: Dialog$1.DialogProps['defaultOpen'];
|
|
20
|
+
/**
|
|
21
|
+
* Handler executen on every dialog open state change.
|
|
22
|
+
*/
|
|
23
|
+
onOpenChange?: Dialog$1.DialogProps['onOpenChange'];
|
|
24
|
+
/**
|
|
25
|
+
* Specifies if the dialog is a modal.
|
|
26
|
+
*/
|
|
27
|
+
modal?: Dialog$1.DialogProps['modal'];
|
|
28
|
+
/**
|
|
29
|
+
* Specifies if the dialog should have a fade animation on its body (in case it is scrollable).
|
|
30
|
+
*/
|
|
31
|
+
withFade?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare const Dialog: {
|
|
34
|
+
({ children, withFade, ...rest }: DialogProps): ReactElement;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
interface BodyProps {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
tabIndex?: number;
|
|
42
|
+
ref?: Ref<HTMLDivElement>;
|
|
43
|
+
inset?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare const Body: {
|
|
46
|
+
({ children, className, inset, ref: forwardedRef, ...rest }: BodyProps): ReactElement;
|
|
47
|
+
displayName: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type CloseProps = Dialog$1.DialogCloseProps & {
|
|
51
|
+
ref?: Ref<HTMLButtonElement>;
|
|
52
|
+
};
|
|
53
|
+
declare const Close: {
|
|
54
|
+
(props: CloseProps): react_jsx_runtime.JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
declare const dialogContentStyles: (props?: ({
|
|
59
|
+
size?: "sm" | "md" | "lg" | "fullscreen" | null | undefined;
|
|
60
|
+
isNarrow?: boolean | null | undefined;
|
|
61
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
62
|
+
type DialogContentStylesProps = VariantProps<typeof dialogContentStyles>;
|
|
63
|
+
|
|
64
|
+
interface ContentProps extends Dialog$1.DialogContentProps, DialogContentStylesProps {
|
|
65
|
+
/**
|
|
66
|
+
* When set to true, the content will adjust its width to fit the content rather than taking up the full available width.
|
|
67
|
+
*/
|
|
68
|
+
isNarrow?: boolean;
|
|
69
|
+
ref?: Ref<HTMLDivElement>;
|
|
70
|
+
}
|
|
71
|
+
declare const Content: {
|
|
72
|
+
({ children, className, isNarrow, size, onInteractOutside, ref, ...rest }: ContentProps): ReactElement;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type DescriptionProps = Dialog$1.DialogDescriptionProps & {
|
|
77
|
+
ref?: Ref<HTMLParagraphElement>;
|
|
78
|
+
};
|
|
79
|
+
declare const Description: {
|
|
80
|
+
(props: DescriptionProps): react_jsx_runtime.JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
interface FooterProps {
|
|
85
|
+
children: ReactNode;
|
|
86
|
+
className?: string;
|
|
87
|
+
ref?: Ref<HTMLDivElement>;
|
|
88
|
+
}
|
|
89
|
+
declare const Footer: {
|
|
90
|
+
({ children, className, ref, ...rest }: FooterProps): ReactElement;
|
|
91
|
+
displayName: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
interface HeaderProps {
|
|
95
|
+
children: ReactNode;
|
|
96
|
+
className?: string;
|
|
97
|
+
ref?: Ref<HTMLDivElement>;
|
|
98
|
+
}
|
|
99
|
+
declare const Header: {
|
|
100
|
+
({ children, className, ref, ...rest }: HeaderProps): ReactElement;
|
|
101
|
+
displayName: string;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
type OverlayProps = Dialog$1.DialogOverlayProps & {
|
|
105
|
+
ref?: Ref<HTMLDivElement>;
|
|
106
|
+
};
|
|
107
|
+
declare const Overlay: {
|
|
108
|
+
({ className, ref, ...rest }: OverlayProps): ReactElement | null;
|
|
109
|
+
displayName: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
type PortalProps = Dialog$1.DialogPortalProps;
|
|
113
|
+
declare const Portal: {
|
|
114
|
+
({ children, ...rest }: PortalProps): ReactElement;
|
|
115
|
+
displayName: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type TitleProps = Dialog$1.DialogTitleProps & {
|
|
119
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
120
|
+
};
|
|
121
|
+
declare const Title: {
|
|
122
|
+
({ className, ref, ...others }: TitleProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
displayName: string;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
interface TriggerProps {
|
|
127
|
+
/**
|
|
128
|
+
* Children of the component.
|
|
129
|
+
*/
|
|
130
|
+
children?: ReactNode;
|
|
131
|
+
/**
|
|
132
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
133
|
+
*/
|
|
134
|
+
asChild?: Dialog$1.DialogTriggerProps['asChild'];
|
|
135
|
+
ref?: Ref<HTMLButtonElement>;
|
|
136
|
+
}
|
|
137
|
+
declare const Trigger: {
|
|
138
|
+
(props: TriggerProps): ReactElement;
|
|
139
|
+
displayName: string;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export { Body as B, type CloseProps as C, Dialog as D, Footer as F, Header as H, Overlay as O, Portal as P, Trigger as T, Content as a, Close as b, Title as c, Description as d, type DialogProps as e, type ContentProps as f, type HeaderProps as g, type BodyProps as h, type FooterProps as i, type TriggerProps as j, type OverlayProps as k, type PortalProps as l, type TitleProps as m, type DescriptionProps as n };
|
|
@@ -1,104 +1,144 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import { Ref, MutableRefObject } from 'react';
|
|
4
|
-
import 'radix-ui';
|
|
5
|
-
import 'class-variance-authority/types';
|
|
6
|
-
import 'class-variance-authority';
|
|
2
|
+
import { AlertDialog as AlertDialog$2 } from '@base-ui-components/react/alert-dialog';
|
|
3
|
+
import { ComponentProps, Ref, ReactNode, ReactElement, MutableRefObject } from 'react';
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
interface AlertDialogProps extends Omit<ComponentProps<typeof AlertDialog$2.Root>, 'onOpenChange' | 'render'> {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies if the dialog is open or not.
|
|
8
|
+
*/
|
|
9
|
+
open?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Default open state.
|
|
12
|
+
*/
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Handler executed on every dialog open state change.
|
|
16
|
+
*/
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies if the dialog should have a fade animation on its body (in case it is scrollable).
|
|
20
|
+
*/
|
|
21
|
+
withFade?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
24
|
+
*/
|
|
25
|
+
asChild?: boolean;
|
|
26
|
+
ref?: Ref<HTMLDivElement>;
|
|
27
|
+
}
|
|
9
28
|
declare const AlertDialog$1: {
|
|
10
|
-
(props: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
({ onOpenChange, withFade, ...props }: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
11
30
|
displayName: string;
|
|
12
31
|
};
|
|
13
32
|
|
|
14
|
-
|
|
33
|
+
interface AlertDialogActionProps extends Omit<ComponentProps<typeof AlertDialog$2.Close>, 'render'> {
|
|
34
|
+
/**
|
|
35
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
36
|
+
*/
|
|
37
|
+
asChild?: boolean;
|
|
15
38
|
ref?: Ref<HTMLButtonElement>;
|
|
16
|
-
}
|
|
39
|
+
}
|
|
17
40
|
declare const AlertDialogAction: {
|
|
18
|
-
(props: AlertDialogActionProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
({ asChild, ...props }: AlertDialogActionProps): react_jsx_runtime.JSX.Element;
|
|
19
42
|
displayName: string;
|
|
20
43
|
};
|
|
21
44
|
|
|
22
|
-
|
|
45
|
+
interface AlertDialogBodyProps {
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
className?: string;
|
|
48
|
+
tabIndex?: number;
|
|
23
49
|
ref?: Ref<HTMLDivElement>;
|
|
24
|
-
|
|
50
|
+
inset?: boolean;
|
|
51
|
+
}
|
|
25
52
|
declare const AlertDialogBody: {
|
|
26
|
-
(
|
|
53
|
+
({ children, className, inset, ref: forwardedRef, ...rest }: AlertDialogBodyProps): ReactElement;
|
|
27
54
|
displayName: string;
|
|
28
55
|
};
|
|
29
56
|
|
|
30
|
-
|
|
57
|
+
interface AlertDialogCancelProps extends Omit<ComponentProps<typeof AlertDialog$2.Close>, 'render'> {
|
|
58
|
+
/**
|
|
59
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
60
|
+
*/
|
|
61
|
+
asChild?: boolean;
|
|
31
62
|
ref?: Ref<HTMLButtonElement>;
|
|
32
|
-
}
|
|
63
|
+
}
|
|
33
64
|
declare const AlertDialogCancel: {
|
|
34
|
-
({ ref: forwardedRef, ...props }: AlertDialogCancelProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
({ asChild, ref: forwardedRef, ...props }: AlertDialogCancelProps): react_jsx_runtime.JSX.Element;
|
|
35
66
|
displayName: string;
|
|
36
67
|
};
|
|
37
68
|
|
|
38
|
-
|
|
69
|
+
interface AlertDialogContentProps extends Omit<ComponentProps<typeof AlertDialog$2.Popup>, 'render'> {
|
|
39
70
|
ref?: Ref<HTMLDivElement>;
|
|
40
|
-
}
|
|
71
|
+
}
|
|
41
72
|
declare const AlertDialogContent: {
|
|
42
|
-
({ className,
|
|
73
|
+
({ className, ref, initialFocus, ...others }: AlertDialogContentProps): react_jsx_runtime.JSX.Element;
|
|
43
74
|
displayName: string;
|
|
44
75
|
};
|
|
45
76
|
|
|
46
|
-
|
|
77
|
+
interface AlertDialogDescriptionProps extends Omit<ComponentProps<typeof AlertDialog$2.Description>, 'render'> {
|
|
47
78
|
ref?: Ref<HTMLParagraphElement>;
|
|
48
|
-
}
|
|
79
|
+
}
|
|
49
80
|
declare const AlertDialogDescription: {
|
|
50
81
|
(props: AlertDialogDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
51
82
|
displayName: string;
|
|
52
83
|
};
|
|
53
84
|
|
|
54
|
-
|
|
85
|
+
interface AlertDialogFooterProps {
|
|
86
|
+
children: ReactNode;
|
|
87
|
+
className?: string;
|
|
55
88
|
ref?: Ref<HTMLDivElement>;
|
|
56
|
-
}
|
|
89
|
+
}
|
|
57
90
|
declare const AlertDialogFooter: {
|
|
58
|
-
(
|
|
91
|
+
({ children, className, ref, ...rest }: AlertDialogFooterProps): ReactElement;
|
|
59
92
|
displayName: string;
|
|
60
93
|
};
|
|
61
94
|
|
|
62
|
-
|
|
95
|
+
interface AlertDialogHeaderProps {
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
className?: string;
|
|
63
98
|
ref?: Ref<HTMLDivElement>;
|
|
64
|
-
}
|
|
99
|
+
}
|
|
65
100
|
declare const AlertDialogHeader: {
|
|
66
|
-
(
|
|
101
|
+
({ children, className, ref, ...rest }: AlertDialogHeaderProps): ReactElement;
|
|
67
102
|
displayName: string;
|
|
68
103
|
};
|
|
69
104
|
|
|
70
|
-
|
|
105
|
+
interface AlertDialogOverlayProps extends Omit<ComponentProps<typeof AlertDialog$2.Backdrop>, 'render'> {
|
|
71
106
|
ref?: Ref<HTMLDivElement>;
|
|
72
|
-
}
|
|
107
|
+
}
|
|
73
108
|
declare const AlertDialogOverlay: {
|
|
74
|
-
(props: AlertDialogOverlayProps): react_jsx_runtime.JSX.Element;
|
|
109
|
+
({ className, ...props }: AlertDialogOverlayProps): react_jsx_runtime.JSX.Element;
|
|
75
110
|
displayName: string;
|
|
76
111
|
};
|
|
77
112
|
|
|
78
|
-
type AlertDialogPortalProps =
|
|
113
|
+
type AlertDialogPortalProps = ComponentProps<typeof AlertDialog$2.Portal>;
|
|
79
114
|
declare const AlertDialogPortal: {
|
|
80
115
|
(props: AlertDialogPortalProps): react_jsx_runtime.JSX.Element;
|
|
81
116
|
displayName: string;
|
|
82
117
|
};
|
|
83
118
|
|
|
84
|
-
|
|
85
|
-
ref?: Ref<
|
|
86
|
-
}
|
|
119
|
+
interface AlertDialogTitleProps extends Omit<ComponentProps<typeof AlertDialog$2.Title>, 'render'> {
|
|
120
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
121
|
+
}
|
|
87
122
|
declare const AlertDialogTitle: {
|
|
88
|
-
(props: AlertDialogTitleProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
({ className, ...props }: AlertDialogTitleProps): react_jsx_runtime.JSX.Element;
|
|
89
124
|
displayName: string;
|
|
90
125
|
};
|
|
91
126
|
|
|
92
|
-
|
|
127
|
+
interface AlertDialogTriggerProps extends Omit<ComponentProps<typeof AlertDialog$2.Trigger>, 'render'> {
|
|
128
|
+
/**
|
|
129
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
130
|
+
*/
|
|
131
|
+
asChild?: boolean;
|
|
93
132
|
ref?: Ref<HTMLButtonElement>;
|
|
94
|
-
}
|
|
133
|
+
}
|
|
95
134
|
declare const AlertDialogTrigger: {
|
|
96
|
-
(props: AlertDialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
135
|
+
({ asChild, ...props }: AlertDialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
97
136
|
displayName: string;
|
|
98
137
|
};
|
|
99
138
|
|
|
100
139
|
interface AlertDialogContextValue {
|
|
101
140
|
cancelRef: MutableRefObject<HTMLButtonElement | null>;
|
|
141
|
+
withFade: boolean;
|
|
102
142
|
}
|
|
103
143
|
declare const useAlertDialog: () => AlertDialogContextValue;
|
|
104
144
|
|
|
@@ -1,104 +1,144 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import { Ref, MutableRefObject } from 'react';
|
|
4
|
-
import 'radix-ui';
|
|
5
|
-
import 'class-variance-authority/types';
|
|
6
|
-
import 'class-variance-authority';
|
|
2
|
+
import { AlertDialog as AlertDialog$2 } from '@base-ui-components/react/alert-dialog';
|
|
3
|
+
import { ComponentProps, Ref, ReactNode, ReactElement, MutableRefObject } from 'react';
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
interface AlertDialogProps extends Omit<ComponentProps<typeof AlertDialog$2.Root>, 'onOpenChange' | 'render'> {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies if the dialog is open or not.
|
|
8
|
+
*/
|
|
9
|
+
open?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Default open state.
|
|
12
|
+
*/
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Handler executed on every dialog open state change.
|
|
16
|
+
*/
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies if the dialog should have a fade animation on its body (in case it is scrollable).
|
|
20
|
+
*/
|
|
21
|
+
withFade?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
24
|
+
*/
|
|
25
|
+
asChild?: boolean;
|
|
26
|
+
ref?: Ref<HTMLDivElement>;
|
|
27
|
+
}
|
|
9
28
|
declare const AlertDialog$1: {
|
|
10
|
-
(props: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
({ onOpenChange, withFade, ...props }: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
11
30
|
displayName: string;
|
|
12
31
|
};
|
|
13
32
|
|
|
14
|
-
|
|
33
|
+
interface AlertDialogActionProps extends Omit<ComponentProps<typeof AlertDialog$2.Close>, 'render'> {
|
|
34
|
+
/**
|
|
35
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
36
|
+
*/
|
|
37
|
+
asChild?: boolean;
|
|
15
38
|
ref?: Ref<HTMLButtonElement>;
|
|
16
|
-
}
|
|
39
|
+
}
|
|
17
40
|
declare const AlertDialogAction: {
|
|
18
|
-
(props: AlertDialogActionProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
({ asChild, ...props }: AlertDialogActionProps): react_jsx_runtime.JSX.Element;
|
|
19
42
|
displayName: string;
|
|
20
43
|
};
|
|
21
44
|
|
|
22
|
-
|
|
45
|
+
interface AlertDialogBodyProps {
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
className?: string;
|
|
48
|
+
tabIndex?: number;
|
|
23
49
|
ref?: Ref<HTMLDivElement>;
|
|
24
|
-
|
|
50
|
+
inset?: boolean;
|
|
51
|
+
}
|
|
25
52
|
declare const AlertDialogBody: {
|
|
26
|
-
(
|
|
53
|
+
({ children, className, inset, ref: forwardedRef, ...rest }: AlertDialogBodyProps): ReactElement;
|
|
27
54
|
displayName: string;
|
|
28
55
|
};
|
|
29
56
|
|
|
30
|
-
|
|
57
|
+
interface AlertDialogCancelProps extends Omit<ComponentProps<typeof AlertDialog$2.Close>, 'render'> {
|
|
58
|
+
/**
|
|
59
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
60
|
+
*/
|
|
61
|
+
asChild?: boolean;
|
|
31
62
|
ref?: Ref<HTMLButtonElement>;
|
|
32
|
-
}
|
|
63
|
+
}
|
|
33
64
|
declare const AlertDialogCancel: {
|
|
34
|
-
({ ref: forwardedRef, ...props }: AlertDialogCancelProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
({ asChild, ref: forwardedRef, ...props }: AlertDialogCancelProps): react_jsx_runtime.JSX.Element;
|
|
35
66
|
displayName: string;
|
|
36
67
|
};
|
|
37
68
|
|
|
38
|
-
|
|
69
|
+
interface AlertDialogContentProps extends Omit<ComponentProps<typeof AlertDialog$2.Popup>, 'render'> {
|
|
39
70
|
ref?: Ref<HTMLDivElement>;
|
|
40
|
-
}
|
|
71
|
+
}
|
|
41
72
|
declare const AlertDialogContent: {
|
|
42
|
-
({ className,
|
|
73
|
+
({ className, ref, initialFocus, ...others }: AlertDialogContentProps): react_jsx_runtime.JSX.Element;
|
|
43
74
|
displayName: string;
|
|
44
75
|
};
|
|
45
76
|
|
|
46
|
-
|
|
77
|
+
interface AlertDialogDescriptionProps extends Omit<ComponentProps<typeof AlertDialog$2.Description>, 'render'> {
|
|
47
78
|
ref?: Ref<HTMLParagraphElement>;
|
|
48
|
-
}
|
|
79
|
+
}
|
|
49
80
|
declare const AlertDialogDescription: {
|
|
50
81
|
(props: AlertDialogDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
51
82
|
displayName: string;
|
|
52
83
|
};
|
|
53
84
|
|
|
54
|
-
|
|
85
|
+
interface AlertDialogFooterProps {
|
|
86
|
+
children: ReactNode;
|
|
87
|
+
className?: string;
|
|
55
88
|
ref?: Ref<HTMLDivElement>;
|
|
56
|
-
}
|
|
89
|
+
}
|
|
57
90
|
declare const AlertDialogFooter: {
|
|
58
|
-
(
|
|
91
|
+
({ children, className, ref, ...rest }: AlertDialogFooterProps): ReactElement;
|
|
59
92
|
displayName: string;
|
|
60
93
|
};
|
|
61
94
|
|
|
62
|
-
|
|
95
|
+
interface AlertDialogHeaderProps {
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
className?: string;
|
|
63
98
|
ref?: Ref<HTMLDivElement>;
|
|
64
|
-
}
|
|
99
|
+
}
|
|
65
100
|
declare const AlertDialogHeader: {
|
|
66
|
-
(
|
|
101
|
+
({ children, className, ref, ...rest }: AlertDialogHeaderProps): ReactElement;
|
|
67
102
|
displayName: string;
|
|
68
103
|
};
|
|
69
104
|
|
|
70
|
-
|
|
105
|
+
interface AlertDialogOverlayProps extends Omit<ComponentProps<typeof AlertDialog$2.Backdrop>, 'render'> {
|
|
71
106
|
ref?: Ref<HTMLDivElement>;
|
|
72
|
-
}
|
|
107
|
+
}
|
|
73
108
|
declare const AlertDialogOverlay: {
|
|
74
|
-
(props: AlertDialogOverlayProps): react_jsx_runtime.JSX.Element;
|
|
109
|
+
({ className, ...props }: AlertDialogOverlayProps): react_jsx_runtime.JSX.Element;
|
|
75
110
|
displayName: string;
|
|
76
111
|
};
|
|
77
112
|
|
|
78
|
-
type AlertDialogPortalProps =
|
|
113
|
+
type AlertDialogPortalProps = ComponentProps<typeof AlertDialog$2.Portal>;
|
|
79
114
|
declare const AlertDialogPortal: {
|
|
80
115
|
(props: AlertDialogPortalProps): react_jsx_runtime.JSX.Element;
|
|
81
116
|
displayName: string;
|
|
82
117
|
};
|
|
83
118
|
|
|
84
|
-
|
|
85
|
-
ref?: Ref<
|
|
86
|
-
}
|
|
119
|
+
interface AlertDialogTitleProps extends Omit<ComponentProps<typeof AlertDialog$2.Title>, 'render'> {
|
|
120
|
+
ref?: Ref<HTMLHeadingElement>;
|
|
121
|
+
}
|
|
87
122
|
declare const AlertDialogTitle: {
|
|
88
|
-
(props: AlertDialogTitleProps): react_jsx_runtime.JSX.Element;
|
|
123
|
+
({ className, ...props }: AlertDialogTitleProps): react_jsx_runtime.JSX.Element;
|
|
89
124
|
displayName: string;
|
|
90
125
|
};
|
|
91
126
|
|
|
92
|
-
|
|
127
|
+
interface AlertDialogTriggerProps extends Omit<ComponentProps<typeof AlertDialog$2.Trigger>, 'render'> {
|
|
128
|
+
/**
|
|
129
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
130
|
+
*/
|
|
131
|
+
asChild?: boolean;
|
|
93
132
|
ref?: Ref<HTMLButtonElement>;
|
|
94
|
-
}
|
|
133
|
+
}
|
|
95
134
|
declare const AlertDialogTrigger: {
|
|
96
|
-
(props: AlertDialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
135
|
+
({ asChild, ...props }: AlertDialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
97
136
|
displayName: string;
|
|
98
137
|
};
|
|
99
138
|
|
|
100
139
|
interface AlertDialogContextValue {
|
|
101
140
|
cancelRef: MutableRefObject<HTMLButtonElement | null>;
|
|
141
|
+
withFade: boolean;
|
|
102
142
|
}
|
|
103
143
|
declare const useAlertDialog: () => AlertDialogContextValue;
|
|
104
144
|
|