@spark-ui/components 12.2.0 → 13.0.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/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-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 +1017 -888
- package/dist/spinner/index.d.mts +1 -1
- package/dist/spinner/index.d.ts +1 -1
- package/package.json +5 -5
- package/dist/DialogTrigger-woU7vsJi.d.mts +0 -142
- package/dist/DialogTrigger-woU7vsJi.d.ts +0 -142
- package/dist/chunk-WLI4EPS6.mjs +0 -358
- package/dist/chunk-WLI4EPS6.mjs.map +0 -1
|
@@ -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
|
|