@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,180 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/modal-content.tsx
|
|
32
|
+
var modal_content_exports = {};
|
|
33
|
+
__export(modal_content_exports, {
|
|
34
|
+
default: () => modal_content_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(modal_content_exports);
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_overlays = require("@react-aria/overlays");
|
|
39
|
+
var import_framer_utils2 = require("@sytechui/framer-utils");
|
|
40
|
+
var import_shared_icons = require("@sytechui/shared-icons");
|
|
41
|
+
var import_framer_motion = require("framer-motion");
|
|
42
|
+
var import_dialog = require("@react-aria/dialog");
|
|
43
|
+
var import_shared_utils = require("@sytechui/shared-utils");
|
|
44
|
+
var import_use_viewport_size = require("@sytechui/use-viewport-size");
|
|
45
|
+
|
|
46
|
+
// src/modal-context.ts
|
|
47
|
+
var import_react_utils = require("@sytechui/react-utils");
|
|
48
|
+
var [ModalProvider, useModalContext] = (0, import_react_utils.createContext)({
|
|
49
|
+
name: "ModalContext",
|
|
50
|
+
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// src/modal-transition.ts
|
|
54
|
+
var import_framer_utils = require("@sytechui/framer-utils");
|
|
55
|
+
var scaleInOut = {
|
|
56
|
+
enter: {
|
|
57
|
+
scale: "var(--scale-enter)",
|
|
58
|
+
y: "var(--slide-enter)",
|
|
59
|
+
opacity: 1,
|
|
60
|
+
willChange: "auto",
|
|
61
|
+
transition: {
|
|
62
|
+
scale: {
|
|
63
|
+
duration: 0.4,
|
|
64
|
+
ease: import_framer_utils.TRANSITION_EASINGS.ease
|
|
65
|
+
},
|
|
66
|
+
opacity: {
|
|
67
|
+
duration: 0.4,
|
|
68
|
+
ease: import_framer_utils.TRANSITION_EASINGS.ease
|
|
69
|
+
},
|
|
70
|
+
y: {
|
|
71
|
+
type: "spring",
|
|
72
|
+
bounce: 0,
|
|
73
|
+
duration: 0.6
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
exit: {
|
|
78
|
+
scale: "var(--scale-exit)",
|
|
79
|
+
y: "var(--slide-exit)",
|
|
80
|
+
opacity: 0,
|
|
81
|
+
willChange: "transform",
|
|
82
|
+
transition: {
|
|
83
|
+
duration: 0.3,
|
|
84
|
+
ease: import_framer_utils.TRANSITION_EASINGS.ease
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// src/modal-content.tsx
|
|
90
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
91
|
+
var domAnimation = () => import("@sytechui/dom-animation").then((res) => res.default);
|
|
92
|
+
var ModalContent = (props) => {
|
|
93
|
+
const { as, children, role = "dialog", ...otherProps } = props;
|
|
94
|
+
const {
|
|
95
|
+
Component: DialogComponent,
|
|
96
|
+
domRef,
|
|
97
|
+
slots,
|
|
98
|
+
classNames,
|
|
99
|
+
motionProps,
|
|
100
|
+
backdrop,
|
|
101
|
+
closeButton,
|
|
102
|
+
hideCloseButton,
|
|
103
|
+
disableAnimation,
|
|
104
|
+
getDialogProps,
|
|
105
|
+
getBackdropProps,
|
|
106
|
+
getCloseButtonProps,
|
|
107
|
+
onClose
|
|
108
|
+
} = useModalContext();
|
|
109
|
+
const Component = as || DialogComponent || "div";
|
|
110
|
+
const viewport = (0, import_use_viewport_size.useViewportSize)();
|
|
111
|
+
const { dialogProps } = (0, import_dialog.useDialog)(
|
|
112
|
+
{
|
|
113
|
+
role
|
|
114
|
+
},
|
|
115
|
+
domRef
|
|
116
|
+
);
|
|
117
|
+
const closeButtonContent = (0, import_react.isValidElement)(closeButton) ? (0, import_react.cloneElement)(closeButton, getCloseButtonProps()) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ...getCloseButtonProps(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_shared_icons.CloseIcon, {}) });
|
|
118
|
+
const onKeyDown = (0, import_react.useCallback)((e) => {
|
|
119
|
+
if (e.key === "Tab" && e.nativeEvent.isComposing) {
|
|
120
|
+
e.stopPropagation();
|
|
121
|
+
e.preventDefault();
|
|
122
|
+
}
|
|
123
|
+
}, []);
|
|
124
|
+
const contentProps = getDialogProps((0, import_shared_utils.mergeProps)(dialogProps, otherProps));
|
|
125
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Component, { ...contentProps, onKeyDown: (0, import_shared_utils.chain)(contentProps.onKeyDown, onKeyDown), children: [
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays.DismissButton, { onDismiss: onClose }),
|
|
127
|
+
!hideCloseButton && closeButtonContent,
|
|
128
|
+
typeof children === "function" ? children(onClose) : children,
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays.DismissButton, { onDismiss: onClose })
|
|
130
|
+
] });
|
|
131
|
+
const backdropContent = (0, import_react.useMemo)(() => {
|
|
132
|
+
if (backdrop === "transparent") {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
if (disableAnimation) {
|
|
136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getBackdropProps() });
|
|
137
|
+
}
|
|
138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
+
import_framer_motion.m.div,
|
|
140
|
+
{
|
|
141
|
+
animate: "enter",
|
|
142
|
+
exit: "exit",
|
|
143
|
+
initial: "exit",
|
|
144
|
+
variants: import_framer_utils2.TRANSITION_VARIANTS.fade,
|
|
145
|
+
...getBackdropProps()
|
|
146
|
+
}
|
|
147
|
+
) });
|
|
148
|
+
}, [backdrop, disableAnimation, getBackdropProps]);
|
|
149
|
+
const viewportStyle = {
|
|
150
|
+
"--visual-viewport-height": viewport.height + "px"
|
|
151
|
+
};
|
|
152
|
+
const contents = disableAnimation ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
|
|
156
|
+
"data-slot": "wrapper",
|
|
157
|
+
style: viewportStyle,
|
|
158
|
+
children: content
|
|
159
|
+
}
|
|
160
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
161
|
+
import_framer_motion.m.div,
|
|
162
|
+
{
|
|
163
|
+
animate: "enter",
|
|
164
|
+
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
|
|
165
|
+
"data-slot": "wrapper",
|
|
166
|
+
exit: "exit",
|
|
167
|
+
initial: "exit",
|
|
168
|
+
variants: scaleInOut,
|
|
169
|
+
...motionProps,
|
|
170
|
+
style: viewportStyle,
|
|
171
|
+
children: content
|
|
172
|
+
}
|
|
173
|
+
) });
|
|
174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { tabIndex: -1, children: [
|
|
175
|
+
backdropContent,
|
|
176
|
+
contents
|
|
177
|
+
] });
|
|
178
|
+
};
|
|
179
|
+
ModalContent.displayName = "HeroUI.ModalContent";
|
|
180
|
+
var modal_content_default = ModalContent;
|
|
@@ -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 };
|