@sytechui/modal 2.2.29
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/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/chunk-6UNMARUO.mjs +112 -0
- package/dist/chunk-IYHOL6KG.mjs +37 -0
- package/dist/chunk-MZ2TEFDD.mjs +37 -0
- package/dist/chunk-NQ34YL6U.mjs +31 -0
- package/dist/chunk-NQV4LXOC.mjs +25 -0
- package/dist/chunk-PN5RGUFB.mjs +133 -0
- package/dist/chunk-S6FNYUYS.mjs +41 -0
- package/dist/chunk-ULX4JIBE.mjs +13 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +433 -0
- package/dist/index.mjs +40 -0
- package/dist/modal-body.d.mts +8 -0
- package/dist/modal-body.d.ts +8 -0
- package/dist/modal-body.js +62 -0
- package/dist/modal-body.mjs +8 -0
- package/dist/modal-content.d.mts +15 -0
- package/dist/modal-content.d.ts +15 -0
- package/dist/modal-content.js +180 -0
- package/dist/modal-content.mjs +9 -0
- package/dist/modal-context.d.mts +310 -0
- package/dist/modal-context.d.ts +310 -0
- package/dist/modal-context.js +37 -0
- package/dist/modal-context.mjs +9 -0
- package/dist/modal-footer.d.mts +8 -0
- package/dist/modal-footer.d.ts +8 -0
- package/dist/modal-footer.js +56 -0
- package/dist/modal-footer.mjs +8 -0
- package/dist/modal-header.d.mts +13 -0
- package/dist/modal-header.d.ts +13 -0
- package/dist/modal-header.js +62 -0
- package/dist/modal-header.mjs +8 -0
- package/dist/modal-transition.d.mts +35 -0
- package/dist/modal-transition.d.ts +35 -0
- package/dist/modal-transition.js +64 -0
- package/dist/modal-transition.mjs +7 -0
- package/dist/modal.d.mts +19 -0
- package/dist/modal.d.ts +19 -0
- package/dist/modal.js +175 -0
- package/dist/modal.mjs +9 -0
- package/dist/use-modal.d.mts +227 -0
- package/dist/use-modal.d.ts +227 -0
- package/dist/use-modal.js +156 -0
- package/dist/use-modal.mjs +7 -0
- package/package.json +68 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import * as _sytechui_theme from '@sytechui/theme';
|
|
2
|
+
import * as framer_motion from 'framer-motion';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
5
|
+
import * as _sytechui_system from '@sytechui/system';
|
|
6
|
+
|
|
7
|
+
declare const ModalProvider: react.Provider<{
|
|
8
|
+
Component: _sytechui_system.As<any>;
|
|
9
|
+
slots: {
|
|
10
|
+
wrapper: (slotProps?: ({
|
|
11
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
12
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
13
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
14
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
15
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
16
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
17
|
+
disableAnimation?: boolean | undefined;
|
|
18
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
19
|
+
base: (slotProps?: ({
|
|
20
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
21
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
22
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
23
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
24
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
25
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
26
|
+
disableAnimation?: boolean | undefined;
|
|
27
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
28
|
+
backdrop: (slotProps?: ({
|
|
29
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
30
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
31
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
32
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
33
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
34
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
35
|
+
disableAnimation?: boolean | undefined;
|
|
36
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
37
|
+
header: (slotProps?: ({
|
|
38
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
39
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
40
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
41
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
42
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
43
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
44
|
+
disableAnimation?: boolean | undefined;
|
|
45
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
46
|
+
body: (slotProps?: ({
|
|
47
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
48
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
49
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
50
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
51
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
52
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
53
|
+
disableAnimation?: boolean | undefined;
|
|
54
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
55
|
+
footer: (slotProps?: ({
|
|
56
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
57
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
58
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
59
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
60
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
61
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
62
|
+
disableAnimation?: boolean | undefined;
|
|
63
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
64
|
+
closeButton: (slotProps?: ({
|
|
65
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
66
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
67
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
68
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
69
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
70
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
71
|
+
disableAnimation?: boolean | undefined;
|
|
72
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
73
|
+
} & {
|
|
74
|
+
wrapper: (slotProps?: ({
|
|
75
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
76
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
77
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
78
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
79
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
80
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
81
|
+
disableAnimation?: boolean | undefined;
|
|
82
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
83
|
+
base: (slotProps?: ({
|
|
84
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
85
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
86
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
87
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
88
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
89
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
90
|
+
disableAnimation?: boolean | undefined;
|
|
91
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
92
|
+
backdrop: (slotProps?: ({
|
|
93
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
94
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
95
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
96
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
97
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
98
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
99
|
+
disableAnimation?: boolean | undefined;
|
|
100
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
101
|
+
header: (slotProps?: ({
|
|
102
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
103
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
104
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
105
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
106
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
107
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
108
|
+
disableAnimation?: boolean | undefined;
|
|
109
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
110
|
+
body: (slotProps?: ({
|
|
111
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
112
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
113
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
114
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
115
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
116
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
117
|
+
disableAnimation?: boolean | undefined;
|
|
118
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
119
|
+
footer: (slotProps?: ({
|
|
120
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
121
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
122
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
123
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
124
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
125
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
126
|
+
disableAnimation?: boolean | undefined;
|
|
127
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
128
|
+
closeButton: (slotProps?: ({
|
|
129
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
130
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
131
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
132
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
133
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
134
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
135
|
+
disableAnimation?: boolean | undefined;
|
|
136
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
137
|
+
} & {};
|
|
138
|
+
domRef: react.RefObject<HTMLElement>;
|
|
139
|
+
headerId: string;
|
|
140
|
+
bodyId: string;
|
|
141
|
+
motionProps: Omit<framer_motion.HTMLMotionProps<"section">, "ref"> | undefined;
|
|
142
|
+
classNames: _sytechui_theme.SlotsToClasses<"base" | "body" | "footer" | "header" | "backdrop" | "wrapper" | "closeButton"> | undefined;
|
|
143
|
+
isDismissable: boolean;
|
|
144
|
+
closeButton: react.ReactNode;
|
|
145
|
+
hideCloseButton: boolean;
|
|
146
|
+
portalContainer: Element | undefined;
|
|
147
|
+
shouldBlockScroll: boolean;
|
|
148
|
+
backdrop: "opaque" | "blur" | "transparent";
|
|
149
|
+
isOpen: boolean;
|
|
150
|
+
onClose: () => void;
|
|
151
|
+
disableAnimation: boolean;
|
|
152
|
+
setBodyMounted: react.Dispatch<react.SetStateAction<boolean>>;
|
|
153
|
+
setHeaderMounted: react.Dispatch<react.SetStateAction<boolean>>;
|
|
154
|
+
getDialogProps: _sytechui_system.PropGetter;
|
|
155
|
+
getBackdropProps: _sytechui_system.PropGetter;
|
|
156
|
+
getCloseButtonProps: _sytechui_system.PropGetter;
|
|
157
|
+
}>;
|
|
158
|
+
declare const useModalContext: () => {
|
|
159
|
+
Component: _sytechui_system.As<any>;
|
|
160
|
+
slots: {
|
|
161
|
+
wrapper: (slotProps?: ({
|
|
162
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
163
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
164
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
165
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
166
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
167
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
168
|
+
disableAnimation?: boolean | undefined;
|
|
169
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
170
|
+
base: (slotProps?: ({
|
|
171
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
172
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
173
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
174
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
175
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
176
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
177
|
+
disableAnimation?: boolean | undefined;
|
|
178
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
179
|
+
backdrop: (slotProps?: ({
|
|
180
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
181
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
182
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
183
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
184
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
185
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
186
|
+
disableAnimation?: boolean | undefined;
|
|
187
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
188
|
+
header: (slotProps?: ({
|
|
189
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
190
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
191
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
192
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
193
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
194
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
195
|
+
disableAnimation?: boolean | undefined;
|
|
196
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
197
|
+
body: (slotProps?: ({
|
|
198
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
199
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
200
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
201
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
202
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
203
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
204
|
+
disableAnimation?: boolean | undefined;
|
|
205
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
206
|
+
footer: (slotProps?: ({
|
|
207
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
208
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
209
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
210
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
211
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
212
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
213
|
+
disableAnimation?: boolean | undefined;
|
|
214
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
215
|
+
closeButton: (slotProps?: ({
|
|
216
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
217
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
218
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
219
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
220
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
221
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
222
|
+
disableAnimation?: boolean | undefined;
|
|
223
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
224
|
+
} & {
|
|
225
|
+
wrapper: (slotProps?: ({
|
|
226
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
227
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
228
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
229
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
230
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
231
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
232
|
+
disableAnimation?: boolean | undefined;
|
|
233
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
234
|
+
base: (slotProps?: ({
|
|
235
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
236
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
237
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
238
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
239
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
240
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
241
|
+
disableAnimation?: boolean | undefined;
|
|
242
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
243
|
+
backdrop: (slotProps?: ({
|
|
244
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
245
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
246
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
247
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
248
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
249
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
250
|
+
disableAnimation?: boolean | undefined;
|
|
251
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
252
|
+
header: (slotProps?: ({
|
|
253
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
254
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
255
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
256
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
257
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
258
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
259
|
+
disableAnimation?: boolean | undefined;
|
|
260
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
261
|
+
body: (slotProps?: ({
|
|
262
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
263
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
264
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
265
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
266
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
267
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
268
|
+
disableAnimation?: boolean | undefined;
|
|
269
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
270
|
+
footer: (slotProps?: ({
|
|
271
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
272
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
273
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
274
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
275
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
276
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
277
|
+
disableAnimation?: boolean | undefined;
|
|
278
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
279
|
+
closeButton: (slotProps?: ({
|
|
280
|
+
size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
|
|
281
|
+
backdrop?: "opaque" | "blur" | "transparent" | undefined;
|
|
282
|
+
radius?: "md" | "lg" | "sm" | "none" | undefined;
|
|
283
|
+
shadow?: "md" | "lg" | "sm" | "none" | undefined;
|
|
284
|
+
placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
|
|
285
|
+
scrollBehavior?: "normal" | "inside" | "outside" | undefined;
|
|
286
|
+
disableAnimation?: boolean | undefined;
|
|
287
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
288
|
+
} & {};
|
|
289
|
+
domRef: react.RefObject<HTMLElement>;
|
|
290
|
+
headerId: string;
|
|
291
|
+
bodyId: string;
|
|
292
|
+
motionProps: Omit<framer_motion.HTMLMotionProps<"section">, "ref"> | undefined;
|
|
293
|
+
classNames: _sytechui_theme.SlotsToClasses<"base" | "body" | "footer" | "header" | "backdrop" | "wrapper" | "closeButton"> | undefined;
|
|
294
|
+
isDismissable: boolean;
|
|
295
|
+
closeButton: react.ReactNode;
|
|
296
|
+
hideCloseButton: boolean;
|
|
297
|
+
portalContainer: Element | undefined;
|
|
298
|
+
shouldBlockScroll: boolean;
|
|
299
|
+
backdrop: "opaque" | "blur" | "transparent";
|
|
300
|
+
isOpen: boolean;
|
|
301
|
+
onClose: () => void;
|
|
302
|
+
disableAnimation: boolean;
|
|
303
|
+
setBodyMounted: react.Dispatch<react.SetStateAction<boolean>>;
|
|
304
|
+
setHeaderMounted: react.Dispatch<react.SetStateAction<boolean>>;
|
|
305
|
+
getDialogProps: _sytechui_system.PropGetter;
|
|
306
|
+
getBackdropProps: _sytechui_system.PropGetter;
|
|
307
|
+
getCloseButtonProps: _sytechui_system.PropGetter;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
export { ModalProvider, useModalContext };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/modal-context.ts
|
|
22
|
+
var modal_context_exports = {};
|
|
23
|
+
__export(modal_context_exports, {
|
|
24
|
+
ModalProvider: () => ModalProvider,
|
|
25
|
+
useModalContext: () => useModalContext
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(modal_context_exports);
|
|
28
|
+
var import_react_utils = require("@sytechui/react-utils");
|
|
29
|
+
var [ModalProvider, useModalContext] = (0, import_react_utils.createContext)({
|
|
30
|
+
name: "ModalContext",
|
|
31
|
+
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
|
|
32
|
+
});
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
ModalProvider,
|
|
36
|
+
useModalContext
|
|
37
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _sytechui_system from '@sytechui/system';
|
|
2
|
+
import { HTMLHeroUIProps } from '@sytechui/system';
|
|
3
|
+
|
|
4
|
+
interface ModalFooterProps extends HTMLHeroUIProps<"footer"> {
|
|
5
|
+
}
|
|
6
|
+
declare const ModalFooter: _sytechui_system.InternalForwardRefRenderFunction<"footer", ModalFooterProps, never>;
|
|
7
|
+
|
|
8
|
+
export { type ModalFooterProps, ModalFooter as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as _sytechui_system from '@sytechui/system';
|
|
2
|
+
import { HTMLHeroUIProps } from '@sytechui/system';
|
|
3
|
+
|
|
4
|
+
interface ModalFooterProps extends HTMLHeroUIProps<"footer"> {
|
|
5
|
+
}
|
|
6
|
+
declare const ModalFooter: _sytechui_system.InternalForwardRefRenderFunction<"footer", ModalFooterProps, never>;
|
|
7
|
+
|
|
8
|
+
export { type ModalFooterProps, ModalFooter as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/modal-footer.tsx
|
|
22
|
+
var modal_footer_exports = {};
|
|
23
|
+
__export(modal_footer_exports, {
|
|
24
|
+
default: () => modal_footer_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(modal_footer_exports);
|
|
27
|
+
var import_system = require("@sytechui/system");
|
|
28
|
+
var import_react_utils2 = require("@sytechui/react-utils");
|
|
29
|
+
var import_theme = require("@sytechui/theme");
|
|
30
|
+
|
|
31
|
+
// src/modal-context.ts
|
|
32
|
+
var import_react_utils = require("@sytechui/react-utils");
|
|
33
|
+
var [ModalProvider, useModalContext] = (0, import_react_utils.createContext)({
|
|
34
|
+
name: "ModalContext",
|
|
35
|
+
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// src/modal-footer.tsx
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var ModalFooter = (0, import_system.forwardRef)((props, ref) => {
|
|
41
|
+
const { as, children, className, ...otherProps } = props;
|
|
42
|
+
const { slots, classNames } = useModalContext();
|
|
43
|
+
const domRef = (0, import_react_utils2.useDOMRef)(ref);
|
|
44
|
+
const Component = as || "footer";
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
Component,
|
|
47
|
+
{
|
|
48
|
+
ref: domRef,
|
|
49
|
+
className: slots.footer({ class: (0, import_theme.cn)(classNames == null ? void 0 : classNames.footer, className) }),
|
|
50
|
+
...otherProps,
|
|
51
|
+
children
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
ModalFooter.displayName = "HeroUI.ModalFooter";
|
|
56
|
+
var modal_footer_default = ModalFooter;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _sytechui_system from '@sytechui/system';
|
|
2
|
+
import { HTMLHeroUIProps } from '@sytechui/system';
|
|
3
|
+
import { ReactRef } from '@sytechui/react-utils';
|
|
4
|
+
|
|
5
|
+
interface ModalHeaderProps extends HTMLHeroUIProps<"header"> {
|
|
6
|
+
/**
|
|
7
|
+
* Ref to the DOM node.
|
|
8
|
+
*/
|
|
9
|
+
ref?: ReactRef<HTMLElement | null>;
|
|
10
|
+
}
|
|
11
|
+
declare const ModalHeader: _sytechui_system.InternalForwardRefRenderFunction<"header", ModalHeaderProps, never>;
|
|
12
|
+
|
|
13
|
+
export { type ModalHeaderProps, ModalHeader as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _sytechui_system from '@sytechui/system';
|
|
2
|
+
import { HTMLHeroUIProps } from '@sytechui/system';
|
|
3
|
+
import { ReactRef } from '@sytechui/react-utils';
|
|
4
|
+
|
|
5
|
+
interface ModalHeaderProps extends HTMLHeroUIProps<"header"> {
|
|
6
|
+
/**
|
|
7
|
+
* Ref to the DOM node.
|
|
8
|
+
*/
|
|
9
|
+
ref?: ReactRef<HTMLElement | null>;
|
|
10
|
+
}
|
|
11
|
+
declare const ModalHeader: _sytechui_system.InternalForwardRefRenderFunction<"header", ModalHeaderProps, never>;
|
|
12
|
+
|
|
13
|
+
export { type ModalHeaderProps, ModalHeader as default };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/modal-header.tsx
|
|
22
|
+
var modal_header_exports = {};
|
|
23
|
+
__export(modal_header_exports, {
|
|
24
|
+
default: () => modal_header_default
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(modal_header_exports);
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_system = require("@sytechui/system");
|
|
29
|
+
var import_react_utils2 = require("@sytechui/react-utils");
|
|
30
|
+
var import_theme = require("@sytechui/theme");
|
|
31
|
+
|
|
32
|
+
// src/modal-context.ts
|
|
33
|
+
var import_react_utils = require("@sytechui/react-utils");
|
|
34
|
+
var [ModalProvider, useModalContext] = (0, import_react_utils.createContext)({
|
|
35
|
+
name: "ModalContext",
|
|
36
|
+
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// src/modal-header.tsx
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
var ModalHeader = (0, import_system.forwardRef)((props, ref) => {
|
|
42
|
+
const { as, children, className, ...otherProps } = props;
|
|
43
|
+
const { slots, classNames, headerId, setHeaderMounted } = useModalContext();
|
|
44
|
+
const domRef = (0, import_react_utils2.useDOMRef)(ref);
|
|
45
|
+
const Component = as || "header";
|
|
46
|
+
(0, import_react.useEffect)(() => {
|
|
47
|
+
setHeaderMounted(true);
|
|
48
|
+
return () => setHeaderMounted(false);
|
|
49
|
+
}, [setHeaderMounted]);
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
Component,
|
|
52
|
+
{
|
|
53
|
+
ref: domRef,
|
|
54
|
+
className: slots.header({ class: (0, import_theme.cn)(classNames == null ? void 0 : classNames.header, className) }),
|
|
55
|
+
id: headerId,
|
|
56
|
+
...otherProps,
|
|
57
|
+
children
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
ModalHeader.displayName = "HeroUI.ModalHeader";
|
|
62
|
+
var modal_header_default = ModalHeader;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const scaleInOut: {
|
|
2
|
+
enter: {
|
|
3
|
+
scale: string;
|
|
4
|
+
y: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
willChange: string;
|
|
7
|
+
transition: {
|
|
8
|
+
scale: {
|
|
9
|
+
duration: number;
|
|
10
|
+
ease: readonly [0.36, 0.66, 0.4, 1];
|
|
11
|
+
};
|
|
12
|
+
opacity: {
|
|
13
|
+
duration: number;
|
|
14
|
+
ease: readonly [0.36, 0.66, 0.4, 1];
|
|
15
|
+
};
|
|
16
|
+
y: {
|
|
17
|
+
type: string;
|
|
18
|
+
bounce: number;
|
|
19
|
+
duration: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exit: {
|
|
24
|
+
scale: string;
|
|
25
|
+
y: string;
|
|
26
|
+
opacity: number;
|
|
27
|
+
willChange: string;
|
|
28
|
+
transition: {
|
|
29
|
+
duration: number;
|
|
30
|
+
ease: readonly [0.36, 0.66, 0.4, 1];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { scaleInOut };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const scaleInOut: {
|
|
2
|
+
enter: {
|
|
3
|
+
scale: string;
|
|
4
|
+
y: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
willChange: string;
|
|
7
|
+
transition: {
|
|
8
|
+
scale: {
|
|
9
|
+
duration: number;
|
|
10
|
+
ease: readonly [0.36, 0.66, 0.4, 1];
|
|
11
|
+
};
|
|
12
|
+
opacity: {
|
|
13
|
+
duration: number;
|
|
14
|
+
ease: readonly [0.36, 0.66, 0.4, 1];
|
|
15
|
+
};
|
|
16
|
+
y: {
|
|
17
|
+
type: string;
|
|
18
|
+
bounce: number;
|
|
19
|
+
duration: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
exit: {
|
|
24
|
+
scale: string;
|
|
25
|
+
y: string;
|
|
26
|
+
opacity: number;
|
|
27
|
+
willChange: string;
|
|
28
|
+
transition: {
|
|
29
|
+
duration: number;
|
|
30
|
+
ease: readonly [0.36, 0.66, 0.4, 1];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { scaleInOut };
|