@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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/dist/chunk-6UNMARUO.mjs +112 -0
  4. package/dist/chunk-IYHOL6KG.mjs +37 -0
  5. package/dist/chunk-MZ2TEFDD.mjs +37 -0
  6. package/dist/chunk-NQ34YL6U.mjs +31 -0
  7. package/dist/chunk-NQV4LXOC.mjs +25 -0
  8. package/dist/chunk-PN5RGUFB.mjs +133 -0
  9. package/dist/chunk-S6FNYUYS.mjs +41 -0
  10. package/dist/chunk-ULX4JIBE.mjs +13 -0
  11. package/dist/index.d.mts +19 -0
  12. package/dist/index.d.ts +19 -0
  13. package/dist/index.js +433 -0
  14. package/dist/index.mjs +40 -0
  15. package/dist/modal-body.d.mts +8 -0
  16. package/dist/modal-body.d.ts +8 -0
  17. package/dist/modal-body.js +62 -0
  18. package/dist/modal-body.mjs +8 -0
  19. package/dist/modal-content.d.mts +15 -0
  20. package/dist/modal-content.d.ts +15 -0
  21. package/dist/modal-content.js +180 -0
  22. package/dist/modal-content.mjs +9 -0
  23. package/dist/modal-context.d.mts +310 -0
  24. package/dist/modal-context.d.ts +310 -0
  25. package/dist/modal-context.js +37 -0
  26. package/dist/modal-context.mjs +9 -0
  27. package/dist/modal-footer.d.mts +8 -0
  28. package/dist/modal-footer.d.ts +8 -0
  29. package/dist/modal-footer.js +56 -0
  30. package/dist/modal-footer.mjs +8 -0
  31. package/dist/modal-header.d.mts +13 -0
  32. package/dist/modal-header.d.ts +13 -0
  33. package/dist/modal-header.js +62 -0
  34. package/dist/modal-header.mjs +8 -0
  35. package/dist/modal-transition.d.mts +35 -0
  36. package/dist/modal-transition.d.ts +35 -0
  37. package/dist/modal-transition.js +64 -0
  38. package/dist/modal-transition.mjs +7 -0
  39. package/dist/modal.d.mts +19 -0
  40. package/dist/modal.d.ts +19 -0
  41. package/dist/modal.js +175 -0
  42. package/dist/modal.mjs +9 -0
  43. package/dist/use-modal.d.mts +227 -0
  44. package/dist/use-modal.d.ts +227 -0
  45. package/dist/use-modal.js +156 -0
  46. package/dist/use-modal.mjs +7 -0
  47. package/package.json +68 -0
@@ -0,0 +1,64 @@
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-transition.ts
22
+ var modal_transition_exports = {};
23
+ __export(modal_transition_exports, {
24
+ scaleInOut: () => scaleInOut
25
+ });
26
+ module.exports = __toCommonJS(modal_transition_exports);
27
+ var import_framer_utils = require("@sytechui/framer-utils");
28
+ var scaleInOut = {
29
+ enter: {
30
+ scale: "var(--scale-enter)",
31
+ y: "var(--slide-enter)",
32
+ opacity: 1,
33
+ willChange: "auto",
34
+ transition: {
35
+ scale: {
36
+ duration: 0.4,
37
+ ease: import_framer_utils.TRANSITION_EASINGS.ease
38
+ },
39
+ opacity: {
40
+ duration: 0.4,
41
+ ease: import_framer_utils.TRANSITION_EASINGS.ease
42
+ },
43
+ y: {
44
+ type: "spring",
45
+ bounce: 0,
46
+ duration: 0.6
47
+ }
48
+ }
49
+ },
50
+ exit: {
51
+ scale: "var(--scale-exit)",
52
+ y: "var(--slide-exit)",
53
+ opacity: 0,
54
+ willChange: "transform",
55
+ transition: {
56
+ duration: 0.3,
57
+ ease: import_framer_utils.TRANSITION_EASINGS.ease
58
+ }
59
+ }
60
+ };
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ scaleInOut
64
+ });
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import {
3
+ scaleInOut
4
+ } from "./chunk-S6FNYUYS.mjs";
5
+ export {
6
+ scaleInOut
7
+ };
@@ -0,0 +1,19 @@
1
+ import * as _sytechui_system from '@sytechui/system';
2
+ import { ReactNode } from 'react';
3
+ import { UseModalProps } from './use-modal.mjs';
4
+ import 'tailwind-variants';
5
+ import '@sytechui/theme';
6
+ import 'framer-motion';
7
+ import '@react-aria/overlays';
8
+ import '@sytechui/react-utils';
9
+ import '@react-stately/overlays';
10
+
11
+ interface ModalProps extends UseModalProps {
12
+ /**
13
+ * The content of the modal. Usually the ModalContent
14
+ */
15
+ children: ReactNode;
16
+ }
17
+ declare const Modal: _sytechui_system.InternalForwardRefRenderFunction<"div", ModalProps, never>;
18
+
19
+ export { type ModalProps, Modal as default };
@@ -0,0 +1,19 @@
1
+ import * as _sytechui_system from '@sytechui/system';
2
+ import { ReactNode } from 'react';
3
+ import { UseModalProps } from './use-modal.js';
4
+ import 'tailwind-variants';
5
+ import '@sytechui/theme';
6
+ import 'framer-motion';
7
+ import '@react-aria/overlays';
8
+ import '@sytechui/react-utils';
9
+ import '@react-stately/overlays';
10
+
11
+ interface ModalProps extends UseModalProps {
12
+ /**
13
+ * The content of the modal. Usually the ModalContent
14
+ */
15
+ children: ReactNode;
16
+ }
17
+ declare const Modal: _sytechui_system.InternalForwardRefRenderFunction<"div", ModalProps, never>;
18
+
19
+ export { type ModalProps, Modal as default };
package/dist/modal.js ADDED
@@ -0,0 +1,175 @@
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.tsx
22
+ var modal_exports = {};
23
+ __export(modal_exports, {
24
+ default: () => modal_default
25
+ });
26
+ module.exports = __toCommonJS(modal_exports);
27
+ var import_framer_motion = require("framer-motion");
28
+ var import_overlays2 = require("@react-aria/overlays");
29
+ var import_system2 = require("@sytechui/system");
30
+
31
+ // src/use-modal.ts
32
+ var import_use_aria_modal_overlay = require("@sytechui/use-aria-modal-overlay");
33
+ var import_react = require("react");
34
+ var import_theme = require("@sytechui/theme");
35
+ var import_system = require("@sytechui/system");
36
+ var import_use_aria_button = require("@sytechui/use-aria-button");
37
+ var import_focus = require("@react-aria/focus");
38
+ var import_shared_utils = require("@sytechui/shared-utils");
39
+ var import_react_utils = require("@sytechui/react-utils");
40
+ var import_overlays = require("@react-stately/overlays");
41
+ function useModal(originalProps) {
42
+ var _a, _b, _c;
43
+ const globalContext = (0, import_system.useProviderContext)();
44
+ const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.modal.variantKeys);
45
+ const {
46
+ ref,
47
+ as,
48
+ className,
49
+ classNames,
50
+ isOpen,
51
+ defaultOpen,
52
+ onOpenChange,
53
+ motionProps,
54
+ closeButton,
55
+ isDismissable = true,
56
+ hideCloseButton = false,
57
+ shouldBlockScroll = true,
58
+ portalContainer,
59
+ isKeyboardDismissDisabled = false,
60
+ onClose,
61
+ ...otherProps
62
+ } = props;
63
+ const Component = as || "section";
64
+ const domRef = (0, import_react_utils.useDOMRef)(ref);
65
+ const closeButtonRef = (0, import_react.useRef)(null);
66
+ const [headerMounted, setHeaderMounted] = (0, import_react.useState)(false);
67
+ const [bodyMounted, setBodyMounted] = (0, import_react.useState)(false);
68
+ const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
69
+ const dialogId = (0, import_react.useId)();
70
+ const headerId = (0, import_react.useId)();
71
+ const bodyId = (0, import_react.useId)();
72
+ const state = (0, import_overlays.useOverlayTriggerState)({
73
+ isOpen,
74
+ defaultOpen,
75
+ onOpenChange: (isOpen2) => {
76
+ onOpenChange == null ? void 0 : onOpenChange(isOpen2);
77
+ if (!isOpen2) {
78
+ onClose == null ? void 0 : onClose();
79
+ }
80
+ }
81
+ });
82
+ const { modalProps, underlayProps } = (0, import_use_aria_modal_overlay.useAriaModalOverlay)(
83
+ {
84
+ isDismissable,
85
+ shouldBlockScroll,
86
+ isKeyboardDismissDisabled
87
+ },
88
+ state,
89
+ domRef
90
+ );
91
+ const { buttonProps: closeButtonProps } = (0, import_use_aria_button.useAriaButton)({ onPress: state.close }, closeButtonRef);
92
+ const { isFocusVisible: isCloseButtonFocusVisible, focusProps: closeButtonFocusProps } = (0, import_focus.useFocusRing)();
93
+ const baseStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className);
94
+ const slots = (0, import_react.useMemo)(
95
+ () => (0, import_theme.modal)({
96
+ ...variantProps,
97
+ disableAnimation
98
+ }),
99
+ [(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation]
100
+ );
101
+ const getDialogProps = (props2 = {}, ref2 = null) => {
102
+ var _a2;
103
+ return {
104
+ ref: (0, import_shared_utils.mergeRefs)(ref2, domRef),
105
+ ...(0, import_shared_utils.mergeProps)(modalProps, otherProps, props2),
106
+ className: slots.base({ class: (0, import_theme.cn)(baseStyles, props2.className) }),
107
+ id: dialogId,
108
+ "data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
109
+ "data-dismissable": (0, import_shared_utils.dataAttr)(isDismissable),
110
+ "aria-modal": (0, import_shared_utils.dataAttr)(true),
111
+ "data-placement": (_a2 = originalProps == null ? void 0 : originalProps.placement) != null ? _a2 : "right",
112
+ "aria-labelledby": headerMounted ? headerId : void 0,
113
+ "aria-describedby": bodyMounted ? bodyId : void 0
114
+ };
115
+ };
116
+ const getBackdropProps = (0, import_react.useCallback)(
117
+ (props2 = {}) => ({
118
+ className: slots.backdrop({ class: classNames == null ? void 0 : classNames.backdrop }),
119
+ ...underlayProps,
120
+ ...props2
121
+ }),
122
+ [slots, classNames, underlayProps]
123
+ );
124
+ const getCloseButtonProps = () => {
125
+ return {
126
+ role: "button",
127
+ tabIndex: 0,
128
+ "aria-label": "Close",
129
+ "data-focus-visible": (0, import_shared_utils.dataAttr)(isCloseButtonFocusVisible),
130
+ className: slots.closeButton({ class: classNames == null ? void 0 : classNames.closeButton }),
131
+ ...(0, import_shared_utils.mergeProps)(closeButtonProps, closeButtonFocusProps)
132
+ };
133
+ };
134
+ return {
135
+ Component,
136
+ slots,
137
+ domRef,
138
+ headerId,
139
+ bodyId,
140
+ motionProps,
141
+ classNames,
142
+ isDismissable,
143
+ closeButton,
144
+ hideCloseButton,
145
+ portalContainer,
146
+ shouldBlockScroll,
147
+ backdrop: (_c = originalProps.backdrop) != null ? _c : "opaque",
148
+ isOpen: state.isOpen,
149
+ onClose: state.close,
150
+ disableAnimation,
151
+ setBodyMounted,
152
+ setHeaderMounted,
153
+ getDialogProps,
154
+ getBackdropProps,
155
+ getCloseButtonProps
156
+ };
157
+ }
158
+
159
+ // src/modal-context.ts
160
+ var import_react_utils2 = require("@sytechui/react-utils");
161
+ var [ModalProvider, useModalContext] = (0, import_react_utils2.createContext)({
162
+ name: "ModalContext",
163
+ errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
164
+ });
165
+
166
+ // src/modal.tsx
167
+ var import_jsx_runtime = require("react/jsx-runtime");
168
+ var Modal = (0, import_system2.forwardRef)((props, ref) => {
169
+ const { children, ...otherProps } = props;
170
+ const context = useModal({ ...otherProps, ref });
171
+ const overlay = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.Overlay, { portalContainer: context.portalContainer, children });
172
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalProvider, { value: context, children: context.disableAnimation && context.isOpen ? overlay : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: context.isOpen ? overlay : null }) });
173
+ });
174
+ Modal.displayName = "HeroUI.Modal";
175
+ var modal_default = Modal;
package/dist/modal.mjs ADDED
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ modal_default
4
+ } from "./chunk-NQV4LXOC.mjs";
5
+ import "./chunk-PN5RGUFB.mjs";
6
+ import "./chunk-ULX4JIBE.mjs";
7
+ export {
8
+ modal_default as default
9
+ };
@@ -0,0 +1,227 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import * as tailwind_variants from 'tailwind-variants';
4
+ import * as _sytechui_system from '@sytechui/system';
5
+ import { HTMLHeroUIProps, PropGetter } from '@sytechui/system';
6
+ import { SlotsToClasses, ModalSlots, ModalVariantProps } from '@sytechui/theme';
7
+ import { HTMLMotionProps } from 'framer-motion';
8
+ import { AriaModalOverlayProps } from '@react-aria/overlays';
9
+ import { ReactRef } from '@sytechui/react-utils';
10
+ import { OverlayTriggerProps } from '@react-stately/overlays';
11
+
12
+ interface Props extends HTMLHeroUIProps<"section"> {
13
+ /**
14
+ * Ref to the DOM node.
15
+ */
16
+ ref?: ReactRef<HTMLElement | null>;
17
+ /**
18
+ * The props to modify the framer motion animation. Use the `variants` API to create your own animation.
19
+ */
20
+ motionProps?: Omit<HTMLMotionProps<"section">, "ref">;
21
+ /**
22
+ * Determines whether to hide the modal close button.
23
+ * @default false
24
+ */
25
+ hideCloseButton?: boolean;
26
+ /**
27
+ * Custom modal close button element.
28
+ */
29
+ closeButton?: ReactNode;
30
+ /**
31
+ * Whether the animation should be disabled.
32
+ * @default false
33
+ */
34
+ disableAnimation?: boolean;
35
+ /**
36
+ * The container element in which the overlay portal will be placed.
37
+ * @default document.body
38
+ */
39
+ portalContainer?: Element;
40
+ /**
41
+ * Whether the scroll should be blocked when the modal is open.
42
+ * @default true
43
+ */
44
+ shouldBlockScroll?: boolean;
45
+ /**
46
+ * Callback fired when the modal is closed.
47
+ */
48
+ onClose?: () => void;
49
+ /**
50
+ * Classname or List of classes to change the classNames of the element.
51
+ * if `className` is passed, it will be added to the base slot.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * <Modal classNames={{
56
+ * wrapper: "wrapper-classes", // main modal wrapper
57
+ * backdrop: "backdrop-classes",
58
+ * base:"base-classes", // modal content wrapper
59
+ * header: "header-classes", // modal header
60
+ * body: "body-classes", // modal body
61
+ * footer: "footer-classes", // modal footer
62
+ * closeButton: "close-button-classes", // modal close button
63
+ * }} />
64
+ * ```
65
+ */
66
+ classNames?: SlotsToClasses<ModalSlots>;
67
+ /**
68
+ * Whether to close the overlay when the user interacts outside it.
69
+ * @default true
70
+ */
71
+ isDismissable?: boolean;
72
+ }
73
+ type UseModalProps = Props & OverlayTriggerProps & Omit<AriaModalOverlayProps, "isDismissable"> & ModalVariantProps;
74
+ declare function useModal(originalProps: UseModalProps): {
75
+ Component: _sytechui_system.As<any>;
76
+ slots: {
77
+ wrapper: (slotProps?: ({
78
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
79
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
80
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
81
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
82
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
83
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
84
+ disableAnimation?: boolean | undefined;
85
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
86
+ base: (slotProps?: ({
87
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
88
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
89
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
90
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
91
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
92
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
93
+ disableAnimation?: boolean | undefined;
94
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
95
+ backdrop: (slotProps?: ({
96
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
97
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
98
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
99
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
100
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
101
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
102
+ disableAnimation?: boolean | undefined;
103
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
104
+ header: (slotProps?: ({
105
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
106
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
107
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
108
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
109
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
110
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
111
+ disableAnimation?: boolean | undefined;
112
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
113
+ body: (slotProps?: ({
114
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
115
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
116
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
117
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
118
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
119
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
120
+ disableAnimation?: boolean | undefined;
121
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
122
+ footer: (slotProps?: ({
123
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
124
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
125
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
126
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
127
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
128
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
129
+ disableAnimation?: boolean | undefined;
130
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
131
+ closeButton: (slotProps?: ({
132
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
133
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
134
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
135
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
136
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
137
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
138
+ disableAnimation?: boolean | undefined;
139
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
140
+ } & {
141
+ wrapper: (slotProps?: ({
142
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
143
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
144
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
145
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
146
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
147
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
148
+ disableAnimation?: boolean | undefined;
149
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
150
+ base: (slotProps?: ({
151
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
152
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
153
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
154
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
155
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
156
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
157
+ disableAnimation?: boolean | undefined;
158
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
159
+ backdrop: (slotProps?: ({
160
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
161
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
162
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
163
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
164
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
165
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
166
+ disableAnimation?: boolean | undefined;
167
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
168
+ header: (slotProps?: ({
169
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
170
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
171
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
172
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
173
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
174
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
175
+ disableAnimation?: boolean | undefined;
176
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
177
+ body: (slotProps?: ({
178
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
179
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
180
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
181
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
182
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
183
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
184
+ disableAnimation?: boolean | undefined;
185
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
186
+ footer: (slotProps?: ({
187
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
188
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
189
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
190
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
191
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
192
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
193
+ disableAnimation?: boolean | undefined;
194
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
195
+ closeButton: (slotProps?: ({
196
+ size?: "md" | "lg" | "sm" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full" | undefined;
197
+ backdrop?: "opaque" | "blur" | "transparent" | undefined;
198
+ radius?: "md" | "lg" | "sm" | "none" | undefined;
199
+ shadow?: "md" | "lg" | "sm" | "none" | undefined;
200
+ placement?: "center" | "auto" | "top" | "top-center" | "bottom" | "bottom-center" | undefined;
201
+ scrollBehavior?: "normal" | "inside" | "outside" | undefined;
202
+ disableAnimation?: boolean | undefined;
203
+ } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
204
+ } & {};
205
+ domRef: react.RefObject<HTMLElement>;
206
+ headerId: string;
207
+ bodyId: string;
208
+ motionProps: Omit<HTMLMotionProps<"section">, "ref"> | undefined;
209
+ classNames: SlotsToClasses<"base" | "body" | "footer" | "header" | "backdrop" | "wrapper" | "closeButton"> | undefined;
210
+ isDismissable: boolean;
211
+ closeButton: ReactNode;
212
+ hideCloseButton: boolean;
213
+ portalContainer: Element | undefined;
214
+ shouldBlockScroll: boolean;
215
+ backdrop: "opaque" | "blur" | "transparent";
216
+ isOpen: boolean;
217
+ onClose: () => void;
218
+ disableAnimation: boolean;
219
+ setBodyMounted: react.Dispatch<react.SetStateAction<boolean>>;
220
+ setHeaderMounted: react.Dispatch<react.SetStateAction<boolean>>;
221
+ getDialogProps: PropGetter;
222
+ getBackdropProps: PropGetter;
223
+ getCloseButtonProps: PropGetter;
224
+ };
225
+ type UseModalReturn = ReturnType<typeof useModal>;
226
+
227
+ export { type UseModalProps, type UseModalReturn, useModal };