@yamada-ui/modal 2.0.0-next-20240614140233 → 2.0.0-next-20240615233332
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{chunk-P42J3NK3.mjs → chunk-KRJ5OO5V.mjs} +5 -9
- package/dist/{chunk-P42J3NK3.mjs.map → chunk-KRJ5OO5V.mjs.map} +1 -1
- package/dist/dialog.js +4 -8
- package/dist/dialog.js.map +1 -1
- package/dist/dialog.mjs +1 -1
- package/dist/drawer.js +4 -8
- package/dist/drawer.js.map +1 -1
- package/dist/drawer.mjs +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modal-body.js +4 -8
- package/dist/modal-body.js.map +1 -1
- package/dist/modal-body.mjs +1 -1
- package/dist/modal-close-button.js +4 -8
- package/dist/modal-close-button.js.map +1 -1
- package/dist/modal-close-button.mjs +1 -1
- package/dist/modal-footer.js +4 -8
- package/dist/modal-footer.js.map +1 -1
- package/dist/modal-footer.mjs +1 -1
- package/dist/modal-header.js +4 -8
- package/dist/modal-header.js.map +1 -1
- package/dist/modal-header.mjs +1 -1
- package/dist/modal-overlay.js +4 -8
- package/dist/modal-overlay.js.map +1 -1
- package/dist/modal-overlay.mjs +1 -1
- package/dist/modal.js +4 -8
- package/dist/modal.js.map +1 -1
- package/dist/modal.mjs +1 -1
- package/package.json +10 -10
@@ -69,8 +69,7 @@ var ModalOverlay = forwardRef(
|
|
69
69
|
__css: css,
|
70
70
|
onClick: handlerAll(onClick, onOverlayClick, (ev) => {
|
71
71
|
ev.stopPropagation();
|
72
|
-
if (closeOnOverlay)
|
73
|
-
onClose == null ? void 0 : onClose();
|
72
|
+
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
74
73
|
}),
|
75
74
|
...props,
|
76
75
|
...rest
|
@@ -406,11 +405,9 @@ var Modal = forwardRef7(
|
|
406
405
|
} = omitThemeProps2(mergedProps);
|
407
406
|
const onKeyDown = useCallback(
|
408
407
|
(ev) => {
|
409
|
-
if (ev.key !== "Escape")
|
410
|
-
return;
|
408
|
+
if (ev.key !== "Escape") return;
|
411
409
|
ev.stopPropagation();
|
412
|
-
if (closeOnEsc)
|
413
|
-
onClose == null ? void 0 : onClose();
|
410
|
+
if (closeOnEsc) onClose == null ? void 0 : onClose();
|
414
411
|
onEsc == null ? void 0 : onEsc();
|
415
412
|
},
|
416
413
|
[closeOnEsc, onClose, onEsc]
|
@@ -781,8 +778,7 @@ var DrawerContent = forwardRef8(
|
|
781
778
|
dragSnapToOrigin: true,
|
782
779
|
dragMomentum: false,
|
783
780
|
onDragEnd: (_, info) => {
|
784
|
-
if (isCloseByDragInfo(info))
|
785
|
-
onClose == null ? void 0 : onClose();
|
781
|
+
if (isCloseByDragInfo(info)) onClose == null ? void 0 : onClose();
|
786
782
|
},
|
787
783
|
tabIndex: -1,
|
788
784
|
__css: css,
|
@@ -918,4 +914,4 @@ export {
|
|
918
914
|
DialogBody,
|
919
915
|
DialogFooter
|
920
916
|
};
|
921
|
-
//# sourceMappingURL=chunk-
|
917
|
+
//# sourceMappingURL=chunk-KRJ5OO5V.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/drawer.tsx","../src/modal.tsx","../src/modal-overlay.tsx","../src/modal-close-button.tsx","../src/modal-header.tsx","../src/modal-body.tsx","../src/modal-footer.tsx","../src/dialog.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n ui,\n forwardRef,\n useMultiComponentStyle,\n omitThemeProps,\n} from \"@yamada-ui/core\"\nimport type { MotionPanInfo } from \"@yamada-ui/motion\"\nimport type { SlideProps } from \"@yamada-ui/transitions\"\nimport { Slide } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport {\n createContext,\n getValidChildren,\n findChildren,\n cx,\n isArray,\n} from \"@yamada-ui/utils\"\nimport type { FC } from \"react\"\nimport { useCallback, useMemo } from \"react\"\nimport { useModal } from \"./modal\"\nimport type {\n ModalProps,\n ModalOverlayProps,\n ModalCloseButtonProps,\n ModalHeaderProps,\n ModalBodyProps,\n ModalFooterProps,\n} from \"./\"\nimport {\n Modal,\n ModalOverlay,\n ModalCloseButton,\n ModalHeader,\n ModalBody,\n ModalFooter,\n} from \"./\"\n\ntype DrawerOptions = {\n /**\n * The placement of the drawer.\n *\n * @default 'right'\n */\n placement?: SlideProps[\"placement\"]\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n */\n isFullHeight?: boolean\n /**\n * If `true`, then the drawer will close on drag.\n *\n * @default false\n */\n closeOnDrag?: boolean\n /**\n * If `true`, display the drag bar when `closeOnDrag` is `true`.\n *\n * @default true\n */\n withDragBar?: boolean\n /**\n * Applies constraints on the permitted draggable area.\n *\n * @default 0\n */\n dragConstraints?: number\n /**\n * The degree of movement allowed outside constraints. 0 = no movement, 1 = full movement.\n *\n * @default 0.1\n */\n dragElastic?: number\n /**\n * Offset from being dragged to closing.\n *\n * @default 80\n */\n dragOffset?: number\n /**\n * Velocity of the drag that triggers close.\n *\n * @default 100\n */\n dragVelocity?: number\n /**\n * Props for the blank area when `closeOnDrag` is `true`.\n */\n blankForDragProps?: CSSUIObject\n}\n\nexport type DrawerProps = Omit<\n ModalProps,\n | \"scrollBehavior\"\n | \"animation\"\n | \"outside\"\n | \"placement\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | keyof ThemeProps\n> &\n ThemeProps<\"Drawer\"> &\n DrawerOptions\n\ntype DrawerContext = Record<string, CSSUIObject>\n\nconst [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n\n/**\n * `Drawer` is a component for a panel that appears from the edge of the screen.\n *\n * @see Docs https://yamada-ui.com/components/overlay/drawer\n */\nexport const Drawer = forwardRef<DrawerProps, \"div\">(\n ({ size, placement = \"right\", closeOnDrag = false, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"Drawer\", {\n size,\n placement,\n closeOnDrag,\n ...props,\n })\n const {\n children,\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n withCloseButton = !closeOnDrag,\n withOverlay = true,\n withDragBar = true,\n allowPinchZoom,\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount,\n closeOnOverlay,\n closeOnEsc,\n lockFocusAcrossFrames,\n duration = { enter: 0.4, exit: 0.3 },\n dragConstraints = 0,\n dragElastic = 0.1,\n dragOffset = 80,\n dragVelocity = 100,\n blankForDragProps,\n portalProps,\n ...rest\n } = omitThemeProps(mergedProps, [\"isFullHeight\"])\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerOverlay, ...cloneChildren] = findChildren(\n validChildren,\n DrawerOverlay,\n )\n\n return (\n <DrawerProvider value={styles}>\n <Modal\n ref={ref}\n {...{\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n withCloseButton: false,\n withOverlay: false,\n allowPinchZoom,\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount,\n closeOnOverlay,\n closeOnEsc,\n lockFocusAcrossFrames,\n duration,\n portalProps,\n }}\n >\n {customDrawerOverlay ?? (withOverlay ? <DrawerOverlay /> : null)}\n\n <DrawerContent\n {...{\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest,\n placement,\n closeOnDrag,\n }}\n >\n {cloneChildren}\n </DrawerContent>\n </Modal>\n </DrawerProvider>\n )\n },\n)\n\ntype DrawerContentProps = Omit<\n DrawerProps,\n \"color\" | \"transition\" | \"isOpen\" | keyof ThemeProps\n> &\n Required<\n Pick<\n DrawerProps,\n | \"placement\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"dragOffset\"\n | \"dragVelocity\"\n >\n >\n\nexport const DrawerContent = forwardRef<DrawerContentProps, \"div\", false>(\n (\n {\n className,\n children,\n placement: _placement,\n withCloseButton,\n withDragBar,\n closeOnDrag,\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n blankForDragProps,\n ...rest\n },\n ref,\n ) => {\n const { isOpen, onClose, duration } = useModal()\n const styles = useDrawer()\n const placement = useValue(_placement)\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n DrawerCloseButton,\n )\n\n const blankForDragBg = useMemo(() => {\n const propBg =\n rest.backgroundColor ?? rest.bgColor ?? rest.background ?? rest.bg\n const styleBg =\n styles.container?.backgroundColor ??\n styles.container?.bgColor ??\n styles.container?.background ??\n styles.container?.bg\n const computedBg = propBg ?? styleBg\n\n return isArray(computedBg) ? computedBg : [computedBg]\n }, [rest, styles])\n\n const blankForDrag = useMemo<CSSUIObject>(() => {\n let position: CSSUIObject = {}\n\n switch (placement) {\n case \"top\":\n position = { top: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"bottom\":\n position = { bottom: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"left\":\n position = { left: \"calc(-100% + 1px)\", top: 0, bottom: 0 }\n break\n\n case \"right\":\n position = { right: \"calc(-100% + 1px)\", top: 0, bottom: 0 }\n break\n }\n\n const [lightBg, darkBg] = blankForDragBg\n\n return {\n _after: {\n content: '\"\"',\n display: \"block\",\n w: \"100%\",\n h: \"100dvh\",\n bg: lightBg,\n position: \"absolute\",\n ...position,\n ...blankForDragProps,\n },\n _dark: {\n _after: {\n bg: darkBg,\n },\n },\n }\n }, [placement, blankForDragBg, blankForDragProps])\n\n const css = useMemo<CSSUIObject>(\n () => ({\n display: \"flex\",\n flexDirection:\n placement === \"top\" || placement === \"bottom\" ? \"column\" : \"row\",\n outline: 0,\n ...(closeOnDrag ? blankForDrag : {}),\n ...styles.container,\n }),\n [blankForDrag, closeOnDrag, placement, styles],\n )\n\n const getDragDirectionRestriction = useCallback(\n (value: number) => {\n switch (placement) {\n case \"top\":\n return { bottom: value }\n case \"bottom\":\n return { top: value }\n case \"left\":\n return { right: value }\n case \"right\":\n return { left: value }\n }\n },\n [placement],\n )\n\n const getDragDirection = useCallback(() => {\n switch (placement) {\n case \"top\":\n case \"bottom\":\n return \"y\"\n case \"left\":\n case \"right\":\n return \"x\"\n }\n }, [placement])\n\n const isCloseByDragInfo = useCallback(\n (info: MotionPanInfo) => {\n switch (placement) {\n case \"top\":\n return (\n info.velocity.y <= dragVelocity * -1 ||\n info.offset.y <= dragOffset * -1\n )\n case \"bottom\":\n return (\n info.velocity.y >= dragVelocity || info.offset.y >= dragOffset\n )\n case \"left\":\n return (\n info.velocity.x <= dragVelocity * -1 ||\n info.offset.x <= dragOffset * -1\n )\n case \"right\":\n return (\n info.velocity.x >= dragVelocity || info.offset.x >= dragOffset\n )\n }\n },\n [placement, dragVelocity, dragOffset],\n )\n\n return (\n <Slide\n ref={ref}\n className={cx(\"ui-drawer\", className)}\n isOpen={isOpen}\n placement={placement}\n duration={duration}\n drag={closeOnDrag ? getDragDirection() : false}\n dragConstraints={getDragDirectionRestriction(dragConstraints)}\n dragElastic={getDragDirectionRestriction(dragElastic)}\n dragSnapToOrigin\n dragMomentum={false}\n onDragEnd={(_, info) => {\n if (isCloseByDragInfo(info)) onClose?.()\n }}\n tabIndex={-1}\n __css={css}\n {...rest}\n >\n {customDrawerCloseButton ??\n (withCloseButton && onClose ? <DrawerCloseButton /> : null)}\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"bottom\" || placement === \"right\") ? (\n <DrawerDragBar />\n ) : null}\n\n <ui.div\n className=\"ui-drawer__inner\"\n __css={{ display: \"flex\", flexDirection: \"column\", ...styles.inner }}\n >\n {cloneChildren}\n </ui.div>\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"top\" || placement === \"left\") ? (\n <DrawerDragBar />\n ) : null}\n </Slide>\n )\n },\n)\n\nexport type DrawerOverlayProps = ModalOverlayProps\n\nexport const DrawerOverlay = forwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerDragBarProps = HTMLUIProps<\"div\">\n\nexport const DrawerDragBar: FC<DrawerDragBarProps> = ({\n className,\n ...rest\n}) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.dragBar }\n\n return (\n <ui.div\n className={cx(\"ui-drawer__drag-bar\", className)}\n __css={css}\n {...rest}\n />\n )\n}\n\nexport type DrawerCloseButtonProps = ModalCloseButtonProps\n\nexport const DrawerCloseButton = forwardRef<DrawerCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-drawer__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerHeaderProps = ModalHeaderProps\n\nexport const DrawerHeader = forwardRef<DrawerHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.header }\n\n return (\n <ModalHeader\n ref={ref}\n className={cx(\"ui-drawer__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerBodyProps = ModalBodyProps\n\nexport const DrawerBody = forwardRef<DrawerBodyProps, \"main\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.body }\n\n return (\n <ModalBody\n ref={ref}\n className={cx(\"ui-drawer__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerFooterProps = ModalFooterProps\n\nexport const DrawerFooter = forwardRef<DrawerFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-drawer__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type {\n ThemeProps,\n CSSUIObject,\n CSSUIProps,\n Token,\n} from \"@yamada-ui/core\"\nimport {\n ui,\n forwardRef,\n omitThemeProps,\n useMultiComponentStyle,\n} from \"@yamada-ui/core\"\nimport type { FocusLockProps } from \"@yamada-ui/focus-lock\"\nimport { FocusLock } from \"@yamada-ui/focus-lock\"\nimport type { MotionProps, MotionTransitionProperties } from \"@yamada-ui/motion\"\nimport { AnimatePresence, Motion } from \"@yamada-ui/motion\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport {\n cx,\n createContext,\n getValidChildren,\n findChildren,\n} from \"@yamada-ui/utils\"\nimport type { KeyboardEvent } from \"react\"\nimport { cloneElement, useCallback } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport { DrawerContent } from \"./drawer\"\nimport {\n DrawerOverlay,\n DialogOverlay,\n DialogCloseButton,\n ModalOverlay,\n ModalCloseButton,\n} from \"./\"\n\ntype ModalContext = ModalOptions & {\n styles: Record<string, CSSUIObject>\n}\n\nconst [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\nexport { useModal }\n\ntype ModalOptions = Pick<\n FocusLockProps,\n | \"autoFocus\"\n | \"initialFocusRef\"\n | \"finalFocusRef\"\n | \"restoreFocus\"\n | \"lockFocusAcrossFrames\"\n> & {\n /**\n * If `true`, the open will be opened.\n */\n isOpen: boolean\n /**\n * Callback invoked to close the modal.\n */\n onClose?: () => void\n /**\n * Callback fired when the overlay is clicked.\n */\n onOverlayClick?: () => void\n /**\n * Callback fired when the escape key is pressed and focus is within modal.\n */\n onEsc?(): void\n /**\n * Callback function to run side effects after the modal has closed.\n */\n onCloseComplete?: () => void\n /**\n * The placement of the modal.\n *\n * @default 'center'\n */\n placement?: Token<\n | \"center\"\n | \"top\"\n | \"right\"\n | \"bottom\"\n | \"left\"\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n >\n /**\n * The CSS `padding` property.\n */\n outside?: CSSUIProps[\"p\"]\n /**\n * If `true`, display the modal close button.\n *\n * @default true\n */\n withCloseButton?: boolean\n /**\n * If `true`, display the modal overlay.\n *\n * @default true\n */\n withOverlay?: boolean\n /**\n * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.\n *\n * @default false.\n */\n allowPinchZoom?: boolean\n /**\n * Where scroll behavior should originate.\n *\n * - `inside`: scroll only occurs within the `ModalBody`.\n * - `outside`: the entire `ModalContent` will scroll within the viewport.\n *\n * @default 'inside'\n */\n scrollBehavior?: \"inside\" | \"outside\"\n /**\n * If `true`, scrolling will be disabled on the `body` when the modal opens.\n *\n * @default true\n */\n blockScrollOnMount?: boolean\n /**\n * If `true`, the modal will close when the overlay is clicked.\n *\n * @default true\n */\n closeOnOverlay?: boolean\n /**\n * If `true`, the modal will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * The animation of the tooltip.\n *\n * @default 'scale'\n */\n animation?: \"scale\" | \"top\" | \"right\" | \"left\" | \"bottom\" | \"none\"\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProperties[\"duration\"]\n /**\n * Props to be forwarded to the portal component.\n */\n portalProps?: Omit<PortalProps, \"children\">\n}\n\nexport type ModalProps = Omit<\n MotionProps<\"section\">,\n \"scrollBehavior\" | \"animation\" | \"color\" | \"transition\"\n> &\n ThemeProps<\"Modal\"> &\n ModalOptions\n\n/**\n * `Modal` is a component that is displayed over the main content to focus the user's attention solely on the information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/modal\n */\nexport const Modal = forwardRef<ModalProps, \"section\">(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"Modal\", {\n size,\n ...props,\n })\n const {\n className,\n children,\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n placement: _placement = \"center\",\n outside = \"fallback(4, 1rem)\",\n withCloseButton = true,\n withOverlay = true,\n allowPinchZoom = false,\n scrollBehavior = \"inside\",\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount = true,\n closeOnOverlay = true,\n closeOnEsc = true,\n lockFocusAcrossFrames = true,\n animation = \"scale\",\n duration,\n portalProps,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n ev.stopPropagation()\n\n if (closeOnEsc) onClose?.()\n\n onEsc?.()\n },\n [closeOnEsc, onClose, onEsc],\n )\n\n const validChildren = getValidChildren(children)\n\n const [customModalOverlay, ...cloneChildren] = findChildren(\n validChildren,\n ModalOverlay,\n DialogOverlay,\n DrawerOverlay,\n )\n\n let [drawerContent] = findChildren(validChildren, DrawerContent)\n\n if (drawerContent)\n drawerContent = cloneElement(drawerContent, { onKeyDown })\n\n const placement = useValue(_placement)\n\n const css: CSSUIObject = {\n position: \"fixed\",\n top: 0,\n left: 0,\n zIndex: \"fallback(jeice, 110)\",\n w: \"100vw\",\n h: \"100dvh\",\n p: size !== \"full\" ? outside : undefined,\n display: \"flex\",\n justifyContent: placement.includes(\"left\")\n ? \"flex-start\"\n : placement.includes(\"right\")\n ? \"flex-end\"\n : \"center\",\n alignItems: placement.includes(\"top\")\n ? \"flex-start\"\n : placement.includes(\"bottom\")\n ? \"flex-end\"\n : \"center\",\n }\n\n return (\n <ModalProvider\n value={{\n isOpen,\n onClose,\n onOverlayClick,\n withCloseButton,\n scrollBehavior,\n closeOnOverlay,\n animation,\n duration,\n styles,\n }}\n >\n <AnimatePresence onExitComplete={onCloseComplete}>\n {isOpen ? (\n <Portal {...portalProps}>\n <FocusLock\n autoFocus={autoFocus}\n initialFocusRef={initialFocusRef}\n finalFocusRef={finalFocusRef}\n restoreFocus={restoreFocus}\n lockFocusAcrossFrames={lockFocusAcrossFrames}\n >\n <RemoveScroll\n allowPinchZoom={allowPinchZoom}\n enabled={blockScrollOnMount}\n forwardProps\n >\n <ui.div __css={css}>\n {customModalOverlay ??\n (withOverlay && size !== \"full\" ? (\n <ModalOverlay />\n ) : null)}\n\n {drawerContent ?? (\n <ModalContent\n ref={ref}\n className={className}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {cloneChildren}\n </ModalContent>\n )}\n </ui.div>\n </RemoveScroll>\n </FocusLock>\n </Portal>\n ) : null}\n </AnimatePresence>\n </ModalProvider>\n )\n },\n)\n\ntype ModalContentProps = Omit<\n MotionProps<\"section\">,\n \"scrollBehavior\" | \"animation\" | \"color\" | \"transition\"\n>\n\nconst getModalContentProps = (\n animation: ModalProps[\"animation\"] = \"scale\",\n duration?: MotionTransitionProperties[\"duration\"],\n) => {\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { scale: 0.95, reverse: true, duration },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { offsetY: -16, reverse: true, duration },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { offsetX: 16, reverse: true, duration },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { offsetX: -16, reverse: true, duration },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { offsetY: 16, reverse: true, duration },\n }\n }\n}\n\nconst ModalContent = forwardRef<ModalContentProps, \"section\", false>(\n ({ className, children, __css, ...rest }, ref) => {\n const {\n styles,\n scrollBehavior,\n withCloseButton,\n onClose,\n animation,\n duration,\n } = useModal()\n\n const validChildren = getValidChildren(children)\n\n const [customModalCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n ModalCloseButton,\n DialogCloseButton,\n )\n\n const props =\n animation !== \"none\" ? getModalContentProps(animation, duration) : {}\n\n const css: CSSUIObject = {\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n ...(__css ? __css : styles.container),\n }\n\n return (\n <Motion\n as=\"section\"\n ref={ref}\n className={cx(\"ui-modal\", className)}\n tabIndex={-1}\n __css={css}\n {...props}\n {...rest}\n >\n {customModalCloseButton ??\n (withCloseButton && onClose ? <ModalCloseButton /> : null)}\n\n {cloneChildren}\n </Motion>\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { HTMLMotionProps } from \"@yamada-ui/motion\"\nimport { motion } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalOverlayProps = HTMLUIProps<\"div\"> &\n Omit<HTMLMotionProps<\"div\">, \"color\" | \"transition\">\n\nexport const ModalOverlay = forwardRef<ModalOverlayProps, \"div\">(\n ({ className, __css, onClick, ...rest }, ref) => {\n const {\n styles,\n closeOnOverlay,\n onOverlayClick,\n onClose,\n animation,\n duration,\n } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <ui.div\n as={motion.div}\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n custom={{ duration }}\n __css={css}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n {...props}\n {...rest}\n />\n )\n },\n)\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalCloseButtonProps = CloseButtonProps\n\nexport const ModalCloseButton = forwardRef<ModalCloseButtonProps, \"button\">(\n ({ onClick, __css, ...rest }, ref) => {\n const { styles, onClose } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.closeButton),\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-modal__close-button\")}\n __css={css}\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n {...rest}\n />\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalHeaderProps = HTMLUIProps<\"header\">\n\nexport const ModalHeader = forwardRef<ModalHeaderProps, \"header\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.header),\n }\n\n return (\n <ui.header\n ref={ref}\n className={cx(\"ui-modal__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalBodyProps = HTMLUIProps<\"main\">\n\nexport const ModalBody = forwardRef<ModalBodyProps, \"main\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles, scrollBehavior } = useModal()\n\n const css: CSSUIObject = {\n overflow: scrollBehavior === \"inside\" ? \"auto\" : undefined,\n ...(__css ? __css : styles.body),\n }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-modal__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalFooterProps = HTMLUIProps<\"footer\">\n\nexport const ModalFooter = forwardRef<ModalFooterProps, \"footer\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.footer),\n }\n\n return (\n <ui.footer\n ref={ref}\n className={cx(\"ui-modal__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n useMultiComponentStyle,\n omitThemeProps,\n} from \"@yamada-ui/core\"\nimport {\n createContext,\n getValidChildren,\n findChildren,\n omitChildren,\n isValidElement,\n isEmpty,\n cx,\n} from \"@yamada-ui/utils\"\nimport type { ReactNode } from \"react\"\nimport type {\n ModalProps,\n ModalOverlayProps,\n ModalHeaderProps,\n ModalBodyProps,\n ModalFooterProps,\n} from \"./\"\nimport {\n Modal,\n ModalOverlay,\n ModalCloseButton,\n ModalHeader,\n ModalBody,\n ModalFooter,\n} from \"./\"\n\ntype DialogOptions = {\n /**\n * The dialog header to use.\n */\n header?: ReactNode\n /**\n * The dialog footer to use.\n */\n footer?: ReactNode\n /**\n * The dialog cancel to use.\n */\n cancel?: ReactNode | ButtonProps\n /**\n * The dialog other to use.\n */\n other?: ReactNode | ButtonProps\n /**\n * The dialog success to use.\n */\n success?: ReactNode | ButtonProps\n /**\n * The callback invoked when cancel button clicked.\n */\n onCancel?: (onClose: (() => void) | undefined) => void\n /**\n * The callback invoked when other button clicked.\n */\n onOther?: (onClose: (() => void) | undefined) => void\n /**\n * The callback invoked when success button clicked.\n */\n onSuccess?: (onClose: (() => void) | undefined) => void\n}\n\nexport type DialogProps = Omit<ModalProps, keyof ThemeProps> &\n ThemeProps<\"Dialog\"> &\n DialogOptions\n\ntype DialogContext = Record<string, CSSUIObject>\n\nconst [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\n/**\n * `Dialog` is a component used to confirm or interrupt user actions.\n *\n * @see Docs https://yamada-ui.com/components/overlay/dialog\n */\nexport const Dialog = forwardRef<DialogProps, \"section\", false>(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"Dialog\", {\n size,\n ...props,\n })\n const {\n className,\n children,\n withOverlay = true,\n withCloseButton = true,\n header,\n footer,\n cancel,\n other,\n success,\n onClose,\n onCancel,\n onOther,\n onSuccess,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const validChildren = getValidChildren(children)\n\n const [customDialogOverlay] = findChildren(validChildren, DialogOverlay)\n const [customDialogCloseButton] = findChildren(\n validChildren,\n DialogCloseButton,\n )\n const [customDialogHeader] = findChildren(validChildren, DialogHeader)\n const [customDialogBody] = findChildren(validChildren, DialogBody)\n const [customDialogFooter] = findChildren(validChildren, DialogFooter)\n\n const cloneChildren = !isEmpty(validChildren)\n ? omitChildren(\n validChildren,\n DialogOverlay,\n DialogCloseButton,\n DialogHeader,\n DialogBody,\n DialogFooter,\n )\n : children\n\n const css: CSSUIObject = { ...styles.container }\n\n const cancelButtonProps: ButtonProps = isValidElement(cancel)\n ? { children: cancel }\n : cancel\n const otherButtonProps: ButtonProps = isValidElement(other)\n ? { children: other }\n : other\n const successButtonProps: ButtonProps = isValidElement(success)\n ? { children: success }\n : success\n\n if (cancelButtonProps && !cancelButtonProps.variant)\n cancelButtonProps.variant = \"ghost\"\n if (otherButtonProps && !otherButtonProps.colorScheme)\n otherButtonProps.colorScheme = \"secondary\"\n if (successButtonProps && !successButtonProps.colorScheme)\n successButtonProps.colorScheme = \"primary\"\n\n return (\n <DialogProvider value={styles}>\n <Modal\n ref={ref}\n className={cx(\"ui-dialog\", className)}\n __css={css}\n {...{\n size,\n onClose,\n withOverlay: false,\n withCloseButton: false,\n ...rest,\n }}\n >\n {customDialogOverlay ??\n (withOverlay && size !== \"full\" ? <DialogOverlay /> : null)}\n {customDialogCloseButton ??\n (withCloseButton && onClose ? <DialogCloseButton /> : null)}\n {customDialogHeader ??\n (header ? <DialogHeader>{header}</DialogHeader> : null)}\n {customDialogBody ??\n (cloneChildren ? <DialogBody>{cloneChildren}</DialogBody> : null)}\n {customDialogFooter ??\n (footer ||\n cancelButtonProps ||\n otherButtonProps ||\n successButtonProps ? (\n <DialogFooter>\n {footer ?? (\n <>\n {cancelButtonProps ? (\n <Button\n onClick={() => onCancel?.(onClose)}\n {...cancelButtonProps}\n />\n ) : null}\n {otherButtonProps ? (\n <Button\n onClick={() => onOther?.(onClose)}\n {...otherButtonProps}\n />\n ) : null}\n {successButtonProps ? (\n <Button\n onClick={() => onSuccess?.(onClose)}\n {...successButtonProps}\n />\n ) : null}\n </>\n )}\n </DialogFooter>\n ) : null)}\n </Modal>\n </DialogProvider>\n )\n },\n)\n\nexport type DialogOverlayProps = ModalOverlayProps\n\nexport const DialogOverlay = forwardRef<DialogOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-dialog__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogCloseButtonProps = CloseButtonProps\n\nexport const DialogCloseButton = forwardRef<DialogCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-dialog__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogHeaderProps = ModalHeaderProps\n\nexport const DialogHeader = forwardRef<DialogHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.header }\n\n return (\n <ModalHeader\n ref={ref}\n className={cx(\"ui-dialog__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogBodyProps = ModalBodyProps\n\nexport const DialogBody = forwardRef<DialogBodyProps, \"main\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.body }\n\n return (\n <ModalBody\n ref={ref}\n className={cx(\"ui-dialog__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogFooterProps = ModalFooterProps\n\nexport const DialogFooter = forwardRef<DialogFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-dialog__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n"],"mappings":";;;AACA;AAAA,EACE,MAAAA;AAAA,EACA,cAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,kBAAAC;AAAA,OACK;AAGP,SAAS,aAAa;AACtB,SAAS,YAAAC,iBAAgB;AACzB;AAAA,EACE,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,MAAAC;AAAA,EACA;AAAA,OACK;AAEP,SAAS,eAAAC,cAAa,eAAe;;;ACbrC;AAAA,EACE,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,0BAAAC;AAAA,OACK;AAEP,SAAS,iBAAiB;AAE1B,SAAS,iBAAiB,cAAc;AAExC,SAAS,cAAc;AACvB,SAAS,gBAAgB,sBAAsB;AAC/C,SAAS,gBAAgB;AACzB;AAAA,EACE,MAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,OACK;AAEP,SAAS,cAAc,mBAAmB;AAC1C,SAAS,oBAAoB;;;AC3B7B,SAAS,IAAI,kBAAkB;AAE/B,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,IAAI,kBAAkB;AAwBzB;AAlBC,IAAM,eAAe;AAAA,EAC1B,CAAC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N,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":["ui","forwardRef","useMultiComponentStyle","omitThemeProps","useValue","createContext","getValidChildren","findChildren","cx","useCallback","ui","forwardRef","omitThemeProps","useMultiComponentStyle","cx","createContext","getValidChildren","findChildren","forwardRef","cx","handlerAll","jsx","forwardRef","cx","handlerAll","ui","forwardRef","cx","jsx","forwardRef","ui","cx","ui","forwardRef","cx","jsx","forwardRef","ui","cx","ui","forwardRef","cx","jsx","forwardRef","ui","cx","forwardRef","cx","jsx","forwardRef","cx","jsx","jsxs","createContext","forwardRef","useMultiComponentStyle","omitThemeProps","getValidChildren","findChildren","jsx","jsxs","ui","cx","jsx","jsxs","createContext","forwardRef","useMultiComponentStyle","omitThemeProps","getValidChildren","findChildren","useValue","useCallback","cx","ui"]}
|
1
|
+
{"version":3,"sources":["../src/drawer.tsx","../src/modal.tsx","../src/modal-overlay.tsx","../src/modal-close-button.tsx","../src/modal-header.tsx","../src/modal-body.tsx","../src/modal-footer.tsx","../src/dialog.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n ui,\n forwardRef,\n useMultiComponentStyle,\n omitThemeProps,\n} from \"@yamada-ui/core\"\nimport type { MotionPanInfo } from \"@yamada-ui/motion\"\nimport type { SlideProps } from \"@yamada-ui/transitions\"\nimport { Slide } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport {\n createContext,\n getValidChildren,\n findChildren,\n cx,\n isArray,\n} from \"@yamada-ui/utils\"\nimport type { FC } from \"react\"\nimport { useCallback, useMemo } from \"react\"\nimport { useModal } from \"./modal\"\nimport type {\n ModalProps,\n ModalOverlayProps,\n ModalCloseButtonProps,\n ModalHeaderProps,\n ModalBodyProps,\n ModalFooterProps,\n} from \"./\"\nimport {\n Modal,\n ModalOverlay,\n ModalCloseButton,\n ModalHeader,\n ModalBody,\n ModalFooter,\n} from \"./\"\n\ntype DrawerOptions = {\n /**\n * The placement of the drawer.\n *\n * @default 'right'\n */\n placement?: SlideProps[\"placement\"]\n /**\n * If `true` and drawer's placement is `top` or `bottom`, the drawer will occupy the viewport height (100dvh).\n */\n isFullHeight?: boolean\n /**\n * If `true`, then the drawer will close on drag.\n *\n * @default false\n */\n closeOnDrag?: boolean\n /**\n * If `true`, display the drag bar when `closeOnDrag` is `true`.\n *\n * @default true\n */\n withDragBar?: boolean\n /**\n * Applies constraints on the permitted draggable area.\n *\n * @default 0\n */\n dragConstraints?: number\n /**\n * The degree of movement allowed outside constraints. 0 = no movement, 1 = full movement.\n *\n * @default 0.1\n */\n dragElastic?: number\n /**\n * Offset from being dragged to closing.\n *\n * @default 80\n */\n dragOffset?: number\n /**\n * Velocity of the drag that triggers close.\n *\n * @default 100\n */\n dragVelocity?: number\n /**\n * Props for the blank area when `closeOnDrag` is `true`.\n */\n blankForDragProps?: CSSUIObject\n}\n\nexport type DrawerProps = Omit<\n ModalProps,\n | \"scrollBehavior\"\n | \"animation\"\n | \"outside\"\n | \"placement\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | keyof ThemeProps\n> &\n ThemeProps<\"Drawer\"> &\n DrawerOptions\n\ntype DrawerContext = Record<string, CSSUIObject>\n\nconst [DrawerProvider, useDrawer] = createContext<DrawerContext>({\n name: `DrawerContext`,\n errorMessage: `useDrawer returned is 'undefined'. Seems you forgot to wrap the components in \"<Drawer />\" `,\n})\n\n/**\n * `Drawer` is a component for a panel that appears from the edge of the screen.\n *\n * @see Docs https://yamada-ui.com/components/overlay/drawer\n */\nexport const Drawer = forwardRef<DrawerProps, \"div\">(\n ({ size, placement = \"right\", closeOnDrag = false, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"Drawer\", {\n size,\n placement,\n closeOnDrag,\n ...props,\n })\n const {\n children,\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n withCloseButton = !closeOnDrag,\n withOverlay = true,\n withDragBar = true,\n allowPinchZoom,\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount,\n closeOnOverlay,\n closeOnEsc,\n lockFocusAcrossFrames,\n duration = { enter: 0.4, exit: 0.3 },\n dragConstraints = 0,\n dragElastic = 0.1,\n dragOffset = 80,\n dragVelocity = 100,\n blankForDragProps,\n portalProps,\n ...rest\n } = omitThemeProps(mergedProps, [\"isFullHeight\"])\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerOverlay, ...cloneChildren] = findChildren(\n validChildren,\n DrawerOverlay,\n )\n\n return (\n <DrawerProvider value={styles}>\n <Modal\n ref={ref}\n {...{\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n withCloseButton: false,\n withOverlay: false,\n allowPinchZoom,\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount,\n closeOnOverlay,\n closeOnEsc,\n lockFocusAcrossFrames,\n duration,\n portalProps,\n }}\n >\n {customDrawerOverlay ?? (withOverlay ? <DrawerOverlay /> : null)}\n\n <DrawerContent\n {...{\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n withCloseButton,\n withDragBar,\n blankForDragProps,\n ...rest,\n placement,\n closeOnDrag,\n }}\n >\n {cloneChildren}\n </DrawerContent>\n </Modal>\n </DrawerProvider>\n )\n },\n)\n\ntype DrawerContentProps = Omit<\n DrawerProps,\n \"color\" | \"transition\" | \"isOpen\" | keyof ThemeProps\n> &\n Required<\n Pick<\n DrawerProps,\n | \"placement\"\n | \"dragConstraints\"\n | \"dragElastic\"\n | \"dragOffset\"\n | \"dragVelocity\"\n >\n >\n\nexport const DrawerContent = forwardRef<DrawerContentProps, \"div\", false>(\n (\n {\n className,\n children,\n placement: _placement,\n withCloseButton,\n withDragBar,\n closeOnDrag,\n dragConstraints,\n dragElastic,\n dragOffset,\n dragVelocity,\n blankForDragProps,\n ...rest\n },\n ref,\n ) => {\n const { isOpen, onClose, duration } = useModal()\n const styles = useDrawer()\n const placement = useValue(_placement)\n\n const validChildren = getValidChildren(children)\n\n const [customDrawerCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n DrawerCloseButton,\n )\n\n const blankForDragBg = useMemo(() => {\n const propBg =\n rest.backgroundColor ?? rest.bgColor ?? rest.background ?? rest.bg\n const styleBg =\n styles.container?.backgroundColor ??\n styles.container?.bgColor ??\n styles.container?.background ??\n styles.container?.bg\n const computedBg = propBg ?? styleBg\n\n return isArray(computedBg) ? computedBg : [computedBg]\n }, [rest, styles])\n\n const blankForDrag = useMemo<CSSUIObject>(() => {\n let position: CSSUIObject = {}\n\n switch (placement) {\n case \"top\":\n position = { top: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"bottom\":\n position = { bottom: \"calc(-100dvh + 1px)\", left: 0, right: 0 }\n break\n\n case \"left\":\n position = { left: \"calc(-100% + 1px)\", top: 0, bottom: 0 }\n break\n\n case \"right\":\n position = { right: \"calc(-100% + 1px)\", top: 0, bottom: 0 }\n break\n }\n\n const [lightBg, darkBg] = blankForDragBg\n\n return {\n _after: {\n content: '\"\"',\n display: \"block\",\n w: \"100%\",\n h: \"100dvh\",\n bg: lightBg,\n position: \"absolute\",\n ...position,\n ...blankForDragProps,\n },\n _dark: {\n _after: {\n bg: darkBg,\n },\n },\n }\n }, [placement, blankForDragBg, blankForDragProps])\n\n const css = useMemo<CSSUIObject>(\n () => ({\n display: \"flex\",\n flexDirection:\n placement === \"top\" || placement === \"bottom\" ? \"column\" : \"row\",\n outline: 0,\n ...(closeOnDrag ? blankForDrag : {}),\n ...styles.container,\n }),\n [blankForDrag, closeOnDrag, placement, styles],\n )\n\n const getDragDirectionRestriction = useCallback(\n (value: number) => {\n switch (placement) {\n case \"top\":\n return { bottom: value }\n case \"bottom\":\n return { top: value }\n case \"left\":\n return { right: value }\n case \"right\":\n return { left: value }\n }\n },\n [placement],\n )\n\n const getDragDirection = useCallback(() => {\n switch (placement) {\n case \"top\":\n case \"bottom\":\n return \"y\"\n case \"left\":\n case \"right\":\n return \"x\"\n }\n }, [placement])\n\n const isCloseByDragInfo = useCallback(\n (info: MotionPanInfo) => {\n switch (placement) {\n case \"top\":\n return (\n info.velocity.y <= dragVelocity * -1 ||\n info.offset.y <= dragOffset * -1\n )\n case \"bottom\":\n return (\n info.velocity.y >= dragVelocity || info.offset.y >= dragOffset\n )\n case \"left\":\n return (\n info.velocity.x <= dragVelocity * -1 ||\n info.offset.x <= dragOffset * -1\n )\n case \"right\":\n return (\n info.velocity.x >= dragVelocity || info.offset.x >= dragOffset\n )\n }\n },\n [placement, dragVelocity, dragOffset],\n )\n\n return (\n <Slide\n ref={ref}\n className={cx(\"ui-drawer\", className)}\n isOpen={isOpen}\n placement={placement}\n duration={duration}\n drag={closeOnDrag ? getDragDirection() : false}\n dragConstraints={getDragDirectionRestriction(dragConstraints)}\n dragElastic={getDragDirectionRestriction(dragElastic)}\n dragSnapToOrigin\n dragMomentum={false}\n onDragEnd={(_, info) => {\n if (isCloseByDragInfo(info)) onClose?.()\n }}\n tabIndex={-1}\n __css={css}\n {...rest}\n >\n {customDrawerCloseButton ??\n (withCloseButton && onClose ? <DrawerCloseButton /> : null)}\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"bottom\" || placement === \"right\") ? (\n <DrawerDragBar />\n ) : null}\n\n <ui.div\n className=\"ui-drawer__inner\"\n __css={{ display: \"flex\", flexDirection: \"column\", ...styles.inner }}\n >\n {cloneChildren}\n </ui.div>\n\n {withDragBar &&\n closeOnDrag &&\n (placement === \"top\" || placement === \"left\") ? (\n <DrawerDragBar />\n ) : null}\n </Slide>\n )\n },\n)\n\nexport type DrawerOverlayProps = ModalOverlayProps\n\nexport const DrawerOverlay = forwardRef<DrawerOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-drawer__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerDragBarProps = HTMLUIProps<\"div\">\n\nexport const DrawerDragBar: FC<DrawerDragBarProps> = ({\n className,\n ...rest\n}) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.dragBar }\n\n return (\n <ui.div\n className={cx(\"ui-drawer__drag-bar\", className)}\n __css={css}\n {...rest}\n />\n )\n}\n\nexport type DrawerCloseButtonProps = ModalCloseButtonProps\n\nexport const DrawerCloseButton = forwardRef<DrawerCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-drawer__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerHeaderProps = ModalHeaderProps\n\nexport const DrawerHeader = forwardRef<DrawerHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.header }\n\n return (\n <ModalHeader\n ref={ref}\n className={cx(\"ui-drawer__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerBodyProps = ModalBodyProps\n\nexport const DrawerBody = forwardRef<DrawerBodyProps, \"main\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.body }\n\n return (\n <ModalBody\n ref={ref}\n className={cx(\"ui-drawer__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DrawerFooterProps = ModalFooterProps\n\nexport const DrawerFooter = forwardRef<DrawerFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDrawer()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-drawer__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type {\n ThemeProps,\n CSSUIObject,\n CSSUIProps,\n Token,\n} from \"@yamada-ui/core\"\nimport {\n ui,\n forwardRef,\n omitThemeProps,\n useMultiComponentStyle,\n} from \"@yamada-ui/core\"\nimport type { FocusLockProps } from \"@yamada-ui/focus-lock\"\nimport { FocusLock } from \"@yamada-ui/focus-lock\"\nimport type { MotionProps, MotionTransitionProperties } from \"@yamada-ui/motion\"\nimport { AnimatePresence, Motion } from \"@yamada-ui/motion\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport { scaleFadeProps, slideFadeProps } from \"@yamada-ui/transitions\"\nimport { useValue } from \"@yamada-ui/use-value\"\nimport {\n cx,\n createContext,\n getValidChildren,\n findChildren,\n} from \"@yamada-ui/utils\"\nimport type { KeyboardEvent } from \"react\"\nimport { cloneElement, useCallback } from \"react\"\nimport { RemoveScroll } from \"react-remove-scroll\"\nimport { DrawerContent } from \"./drawer\"\nimport {\n DrawerOverlay,\n DialogOverlay,\n DialogCloseButton,\n ModalOverlay,\n ModalCloseButton,\n} from \"./\"\n\ntype ModalContext = ModalOptions & {\n styles: Record<string, CSSUIObject>\n}\n\nconst [ModalProvider, useModal] = createContext<ModalContext>({\n name: `ModalContext`,\n errorMessage: `useModal returned is 'undefined'. Seems you forgot to wrap the components in \"<Modal />\" `,\n})\n\nexport { useModal }\n\ntype ModalOptions = Pick<\n FocusLockProps,\n | \"autoFocus\"\n | \"initialFocusRef\"\n | \"finalFocusRef\"\n | \"restoreFocus\"\n | \"lockFocusAcrossFrames\"\n> & {\n /**\n * If `true`, the open will be opened.\n */\n isOpen: boolean\n /**\n * Callback invoked to close the modal.\n */\n onClose?: () => void\n /**\n * Callback fired when the overlay is clicked.\n */\n onOverlayClick?: () => void\n /**\n * Callback fired when the escape key is pressed and focus is within modal.\n */\n onEsc?(): void\n /**\n * Callback function to run side effects after the modal has closed.\n */\n onCloseComplete?: () => void\n /**\n * The placement of the modal.\n *\n * @default 'center'\n */\n placement?: Token<\n | \"center\"\n | \"top\"\n | \"right\"\n | \"bottom\"\n | \"left\"\n | \"top-left\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-right\"\n >\n /**\n * The CSS `padding` property.\n */\n outside?: CSSUIProps[\"p\"]\n /**\n * If `true`, display the modal close button.\n *\n * @default true\n */\n withCloseButton?: boolean\n /**\n * If `true`, display the modal overlay.\n *\n * @default true\n */\n withOverlay?: boolean\n /**\n * Handle zoom or pinch gestures on iOS devices when scroll locking is enabled.\n *\n * @default false.\n */\n allowPinchZoom?: boolean\n /**\n * Where scroll behavior should originate.\n *\n * - `inside`: scroll only occurs within the `ModalBody`.\n * - `outside`: the entire `ModalContent` will scroll within the viewport.\n *\n * @default 'inside'\n */\n scrollBehavior?: \"inside\" | \"outside\"\n /**\n * If `true`, scrolling will be disabled on the `body` when the modal opens.\n *\n * @default true\n */\n blockScrollOnMount?: boolean\n /**\n * If `true`, the modal will close when the overlay is clicked.\n *\n * @default true\n */\n closeOnOverlay?: boolean\n /**\n * If `true`, the modal will close when the `Esc` key is pressed.\n *\n * @default true\n */\n closeOnEsc?: boolean\n /**\n * The animation of the tooltip.\n *\n * @default 'scale'\n */\n animation?: \"scale\" | \"top\" | \"right\" | \"left\" | \"bottom\" | \"none\"\n /**\n * The animation duration.\n */\n duration?: MotionTransitionProperties[\"duration\"]\n /**\n * Props to be forwarded to the portal component.\n */\n portalProps?: Omit<PortalProps, \"children\">\n}\n\nexport type ModalProps = Omit<\n MotionProps<\"section\">,\n \"scrollBehavior\" | \"animation\" | \"color\" | \"transition\"\n> &\n ThemeProps<\"Modal\"> &\n ModalOptions\n\n/**\n * `Modal` is a component that is displayed over the main content to focus the user's attention solely on the information.\n *\n * @see Docs https://yamada-ui.com/components/overlay/modal\n */\nexport const Modal = forwardRef<ModalProps, \"section\">(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"Modal\", {\n size,\n ...props,\n })\n const {\n className,\n children,\n isOpen,\n onClose,\n onOverlayClick,\n onEsc,\n onCloseComplete,\n placement: _placement = \"center\",\n outside = \"fallback(4, 1rem)\",\n withCloseButton = true,\n withOverlay = true,\n allowPinchZoom = false,\n scrollBehavior = \"inside\",\n autoFocus,\n restoreFocus,\n initialFocusRef,\n finalFocusRef,\n blockScrollOnMount = true,\n closeOnOverlay = true,\n closeOnEsc = true,\n lockFocusAcrossFrames = true,\n animation = \"scale\",\n duration,\n portalProps,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent) => {\n if (ev.key !== \"Escape\") return\n\n ev.stopPropagation()\n\n if (closeOnEsc) onClose?.()\n\n onEsc?.()\n },\n [closeOnEsc, onClose, onEsc],\n )\n\n const validChildren = getValidChildren(children)\n\n const [customModalOverlay, ...cloneChildren] = findChildren(\n validChildren,\n ModalOverlay,\n DialogOverlay,\n DrawerOverlay,\n )\n\n let [drawerContent] = findChildren(validChildren, DrawerContent)\n\n if (drawerContent)\n drawerContent = cloneElement(drawerContent, { onKeyDown })\n\n const placement = useValue(_placement)\n\n const css: CSSUIObject = {\n position: \"fixed\",\n top: 0,\n left: 0,\n zIndex: \"fallback(jeice, 110)\",\n w: \"100vw\",\n h: \"100dvh\",\n p: size !== \"full\" ? outside : undefined,\n display: \"flex\",\n justifyContent: placement.includes(\"left\")\n ? \"flex-start\"\n : placement.includes(\"right\")\n ? \"flex-end\"\n : \"center\",\n alignItems: placement.includes(\"top\")\n ? \"flex-start\"\n : placement.includes(\"bottom\")\n ? \"flex-end\"\n : \"center\",\n }\n\n return (\n <ModalProvider\n value={{\n isOpen,\n onClose,\n onOverlayClick,\n withCloseButton,\n scrollBehavior,\n closeOnOverlay,\n animation,\n duration,\n styles,\n }}\n >\n <AnimatePresence onExitComplete={onCloseComplete}>\n {isOpen ? (\n <Portal {...portalProps}>\n <FocusLock\n autoFocus={autoFocus}\n initialFocusRef={initialFocusRef}\n finalFocusRef={finalFocusRef}\n restoreFocus={restoreFocus}\n lockFocusAcrossFrames={lockFocusAcrossFrames}\n >\n <RemoveScroll\n allowPinchZoom={allowPinchZoom}\n enabled={blockScrollOnMount}\n forwardProps\n >\n <ui.div __css={css}>\n {customModalOverlay ??\n (withOverlay && size !== \"full\" ? (\n <ModalOverlay />\n ) : null)}\n\n {drawerContent ?? (\n <ModalContent\n ref={ref}\n className={className}\n onKeyDown={onKeyDown}\n {...rest}\n >\n {cloneChildren}\n </ModalContent>\n )}\n </ui.div>\n </RemoveScroll>\n </FocusLock>\n </Portal>\n ) : null}\n </AnimatePresence>\n </ModalProvider>\n )\n },\n)\n\ntype ModalContentProps = Omit<\n MotionProps<\"section\">,\n \"scrollBehavior\" | \"animation\" | \"color\" | \"transition\"\n>\n\nconst getModalContentProps = (\n animation: ModalProps[\"animation\"] = \"scale\",\n duration?: MotionTransitionProperties[\"duration\"],\n) => {\n switch (animation) {\n case \"scale\":\n return {\n ...scaleFadeProps,\n custom: { scale: 0.95, reverse: true, duration },\n }\n case \"top\":\n return {\n ...slideFadeProps,\n custom: { offsetY: -16, reverse: true, duration },\n }\n case \"right\":\n return {\n ...slideFadeProps,\n custom: { offsetX: 16, reverse: true, duration },\n }\n case \"left\":\n return {\n ...slideFadeProps,\n custom: { offsetX: -16, reverse: true, duration },\n }\n case \"bottom\":\n return {\n ...slideFadeProps,\n custom: { offsetY: 16, reverse: true, duration },\n }\n }\n}\n\nconst ModalContent = forwardRef<ModalContentProps, \"section\", false>(\n ({ className, children, __css, ...rest }, ref) => {\n const {\n styles,\n scrollBehavior,\n withCloseButton,\n onClose,\n animation,\n duration,\n } = useModal()\n\n const validChildren = getValidChildren(children)\n\n const [customModalCloseButton, ...cloneChildren] = findChildren(\n validChildren,\n ModalCloseButton,\n DialogCloseButton,\n )\n\n const props =\n animation !== \"none\" ? getModalContentProps(animation, duration) : {}\n\n const css: CSSUIObject = {\n overflow: scrollBehavior === \"inside\" ? \"hidden\" : \"auto\",\n ...(__css ? __css : styles.container),\n }\n\n return (\n <Motion\n as=\"section\"\n ref={ref}\n className={cx(\"ui-modal\", className)}\n tabIndex={-1}\n __css={css}\n {...props}\n {...rest}\n >\n {customModalCloseButton ??\n (withCloseButton && onClose ? <ModalCloseButton /> : null)}\n\n {cloneChildren}\n </Motion>\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport type { HTMLMotionProps } from \"@yamada-ui/motion\"\nimport { motion } from \"@yamada-ui/motion\"\nimport { fadeProps } from \"@yamada-ui/transitions\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalOverlayProps = HTMLUIProps<\"div\"> &\n Omit<HTMLMotionProps<\"div\">, \"color\" | \"transition\">\n\nexport const ModalOverlay = forwardRef<ModalOverlayProps, \"div\">(\n ({ className, __css, onClick, ...rest }, ref) => {\n const {\n styles,\n closeOnOverlay,\n onOverlayClick,\n onClose,\n animation,\n duration,\n } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.overlay),\n }\n\n const props = animation !== \"none\" ? fadeProps : {}\n\n return (\n <ui.div\n as={motion.div}\n ref={ref}\n className={cx(\"ui-modal__overlay\", className)}\n custom={{ duration }}\n __css={css}\n onClick={handlerAll(onClick, onOverlayClick, (ev) => {\n ev.stopPropagation()\n if (closeOnOverlay) onClose?.()\n })}\n {...props}\n {...rest}\n />\n )\n },\n)\n","import type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport { CloseButton } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject } from \"@yamada-ui/core\"\nimport { forwardRef } from \"@yamada-ui/core\"\nimport { cx, handlerAll } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalCloseButtonProps = CloseButtonProps\n\nexport const ModalCloseButton = forwardRef<ModalCloseButtonProps, \"button\">(\n ({ onClick, __css, ...rest }, ref) => {\n const { styles, onClose } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.closeButton),\n }\n\n return (\n <CloseButton\n ref={ref}\n className={cx(\"ui-modal__close-button\")}\n __css={css}\n onClick={handlerAll(onClick, (ev) => {\n ev.stopPropagation()\n onClose?.()\n })}\n {...rest}\n />\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalHeaderProps = HTMLUIProps<\"header\">\n\nexport const ModalHeader = forwardRef<ModalHeaderProps, \"header\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.header),\n }\n\n return (\n <ui.header\n ref={ref}\n className={cx(\"ui-modal__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalBodyProps = HTMLUIProps<\"main\">\n\nexport const ModalBody = forwardRef<ModalBodyProps, \"main\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles, scrollBehavior } = useModal()\n\n const css: CSSUIObject = {\n overflow: scrollBehavior === \"inside\" ? \"auto\" : undefined,\n ...(__css ? __css : styles.body),\n }\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-modal__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type { HTMLUIProps, CSSUIObject } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useModal } from \"./modal\"\n\nexport type ModalFooterProps = HTMLUIProps<\"footer\">\n\nexport const ModalFooter = forwardRef<ModalFooterProps, \"footer\">(\n ({ className, __css, ...rest }, ref) => {\n const { styles } = useModal()\n\n const css: CSSUIObject = {\n ...(__css ? __css : styles.footer),\n }\n\n return (\n <ui.footer\n ref={ref}\n className={cx(\"ui-modal__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n","import type { ButtonProps } from \"@yamada-ui/button\"\nimport { Button } from \"@yamada-ui/button\"\nimport type { CloseButtonProps } from \"@yamada-ui/close-button\"\nimport type { CSSUIObject, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n useMultiComponentStyle,\n omitThemeProps,\n} from \"@yamada-ui/core\"\nimport {\n createContext,\n getValidChildren,\n findChildren,\n omitChildren,\n isValidElement,\n isEmpty,\n cx,\n} from \"@yamada-ui/utils\"\nimport type { ReactNode } from \"react\"\nimport type {\n ModalProps,\n ModalOverlayProps,\n ModalHeaderProps,\n ModalBodyProps,\n ModalFooterProps,\n} from \"./\"\nimport {\n Modal,\n ModalOverlay,\n ModalCloseButton,\n ModalHeader,\n ModalBody,\n ModalFooter,\n} from \"./\"\n\ntype DialogOptions = {\n /**\n * The dialog header to use.\n */\n header?: ReactNode\n /**\n * The dialog footer to use.\n */\n footer?: ReactNode\n /**\n * The dialog cancel to use.\n */\n cancel?: ReactNode | ButtonProps\n /**\n * The dialog other to use.\n */\n other?: ReactNode | ButtonProps\n /**\n * The dialog success to use.\n */\n success?: ReactNode | ButtonProps\n /**\n * The callback invoked when cancel button clicked.\n */\n onCancel?: (onClose: (() => void) | undefined) => void\n /**\n * The callback invoked when other button clicked.\n */\n onOther?: (onClose: (() => void) | undefined) => void\n /**\n * The callback invoked when success button clicked.\n */\n onSuccess?: (onClose: (() => void) | undefined) => void\n}\n\nexport type DialogProps = Omit<ModalProps, keyof ThemeProps> &\n ThemeProps<\"Dialog\"> &\n DialogOptions\n\ntype DialogContext = Record<string, CSSUIObject>\n\nconst [DialogProvider, useDialog] = createContext<DialogContext>({\n name: `DialogContext`,\n errorMessage: `useDialog returned is 'undefined'. Seems you forgot to wrap the components in \"<Dialog />\" `,\n})\n\n/**\n * `Dialog` is a component used to confirm or interrupt user actions.\n *\n * @see Docs https://yamada-ui.com/components/overlay/dialog\n */\nexport const Dialog = forwardRef<DialogProps, \"section\", false>(\n ({ size, ...props }, ref) => {\n const [styles, mergedProps] = useMultiComponentStyle(\"Dialog\", {\n size,\n ...props,\n })\n const {\n className,\n children,\n withOverlay = true,\n withCloseButton = true,\n header,\n footer,\n cancel,\n other,\n success,\n onClose,\n onCancel,\n onOther,\n onSuccess,\n ...rest\n } = omitThemeProps(mergedProps)\n\n const validChildren = getValidChildren(children)\n\n const [customDialogOverlay] = findChildren(validChildren, DialogOverlay)\n const [customDialogCloseButton] = findChildren(\n validChildren,\n DialogCloseButton,\n )\n const [customDialogHeader] = findChildren(validChildren, DialogHeader)\n const [customDialogBody] = findChildren(validChildren, DialogBody)\n const [customDialogFooter] = findChildren(validChildren, DialogFooter)\n\n const cloneChildren = !isEmpty(validChildren)\n ? omitChildren(\n validChildren,\n DialogOverlay,\n DialogCloseButton,\n DialogHeader,\n DialogBody,\n DialogFooter,\n )\n : children\n\n const css: CSSUIObject = { ...styles.container }\n\n const cancelButtonProps: ButtonProps = isValidElement(cancel)\n ? { children: cancel }\n : cancel\n const otherButtonProps: ButtonProps = isValidElement(other)\n ? { children: other }\n : other\n const successButtonProps: ButtonProps = isValidElement(success)\n ? { children: success }\n : success\n\n if (cancelButtonProps && !cancelButtonProps.variant)\n cancelButtonProps.variant = \"ghost\"\n if (otherButtonProps && !otherButtonProps.colorScheme)\n otherButtonProps.colorScheme = \"secondary\"\n if (successButtonProps && !successButtonProps.colorScheme)\n successButtonProps.colorScheme = \"primary\"\n\n return (\n <DialogProvider value={styles}>\n <Modal\n ref={ref}\n className={cx(\"ui-dialog\", className)}\n __css={css}\n {...{\n size,\n onClose,\n withOverlay: false,\n withCloseButton: false,\n ...rest,\n }}\n >\n {customDialogOverlay ??\n (withOverlay && size !== \"full\" ? <DialogOverlay /> : null)}\n {customDialogCloseButton ??\n (withCloseButton && onClose ? <DialogCloseButton /> : null)}\n {customDialogHeader ??\n (header ? <DialogHeader>{header}</DialogHeader> : null)}\n {customDialogBody ??\n (cloneChildren ? <DialogBody>{cloneChildren}</DialogBody> : null)}\n {customDialogFooter ??\n (footer ||\n cancelButtonProps ||\n otherButtonProps ||\n successButtonProps ? (\n <DialogFooter>\n {footer ?? (\n <>\n {cancelButtonProps ? (\n <Button\n onClick={() => onCancel?.(onClose)}\n {...cancelButtonProps}\n />\n ) : null}\n {otherButtonProps ? (\n <Button\n onClick={() => onOther?.(onClose)}\n {...otherButtonProps}\n />\n ) : null}\n {successButtonProps ? (\n <Button\n onClick={() => onSuccess?.(onClose)}\n {...successButtonProps}\n />\n ) : null}\n </>\n )}\n </DialogFooter>\n ) : null)}\n </Modal>\n </DialogProvider>\n )\n },\n)\n\nexport type DialogOverlayProps = ModalOverlayProps\n\nexport const DialogOverlay = forwardRef<DialogOverlayProps, \"div\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.overlay }\n\n return (\n <ModalOverlay\n ref={ref}\n className={cx(\"ui-dialog__overlay\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogCloseButtonProps = CloseButtonProps\n\nexport const DialogCloseButton = forwardRef<DialogCloseButtonProps, \"button\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.closeButton }\n\n return (\n <ModalCloseButton\n ref={ref}\n className={cx(\"ui-dialog__close-button\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogHeaderProps = ModalHeaderProps\n\nexport const DialogHeader = forwardRef<DialogHeaderProps, \"header\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.header }\n\n return (\n <ModalHeader\n ref={ref}\n className={cx(\"ui-dialog__header\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogBodyProps = ModalBodyProps\n\nexport const DialogBody = forwardRef<DialogBodyProps, \"main\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.body }\n\n return (\n <ModalBody\n ref={ref}\n className={cx(\"ui-dialog__body\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n\nexport type DialogFooterProps = ModalFooterProps\n\nexport const DialogFooter = forwardRef<DialogFooterProps, \"footer\">(\n ({ className, ...rest }, ref) => {\n const styles = useDialog()\n\n const css: CSSUIObject = { ...styles.footer }\n\n return (\n <ModalFooter\n ref={ref}\n className={cx(\"ui-dialog__footer\", className)}\n __css={css}\n {...rest}\n />\n )\n },\n)\n"],"mappings":";;;AACA;AAAA,EACE,MAAAA;AAAA,EACA,cAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,kBAAAC;AAAA,OACK;AAGP,SAAS,aAAa;AACtB,SAAS,YAAAC,iBAAgB;AACzB;AAAA,EACE,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,MAAAC;AAAA,EACA;AAAA,OACK;AAEP,SAAS,eAAAC,cAAa,eAAe;;;ACbrC;AAAA,EACE,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,0BAAAC;AAAA,OACK;AAEP,SAAS,iBAAiB;AAE1B,SAAS,iBAAiB,cAAc;AAExC,SAAS,cAAc;AACvB,SAAS,gBAAgB,sBAAsB;AAC/C,SAAS,gBAAgB;AACzB;AAAA,EACE,MAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,OACK;AAEP,SAAS,cAAc,mBAAmB;AAC1C,SAAS,oBAAoB;;;AC3B7B,SAAS,IAAI,kBAAkB;AAE/B,SAAS,cAAc;AACvB,SAAS,iBAAiB;AAC1B,SAAS,IAAI,kBAAkB;AAwBzB;AAlBC,IAAM,eAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,OAAO,SAAS,GAAG,KAAK,GAAG,QAAQ;AAC/C,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI,SAAS;AAEb,UAAM,MAAmB;AAAA,MACvB,GAAI,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AG,OAAO,YAAY;AAEjD,WACE,gBAAAH;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAWU,IAAG,2BAA2B,SAAS;AAAA,QAClD,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,eAAeP;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE,gBAAAH;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAWU,IAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,aAAaP;AAAA,EACxB,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,KAAK;AAE1C,WACE,gBAAAH;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAWU,IAAG,mBAAmB,SAAS;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,eAAeP;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE,gBAAAH;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAWU,IAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":["ui","forwardRef","useMultiComponentStyle","omitThemeProps","useValue","createContext","getValidChildren","findChildren","cx","useCallback","ui","forwardRef","omitThemeProps","useMultiComponentStyle","cx","createContext","getValidChildren","findChildren","forwardRef","cx","handlerAll","jsx","forwardRef","cx","handlerAll","ui","forwardRef","cx","jsx","forwardRef","ui","cx","ui","forwardRef","cx","jsx","forwardRef","ui","cx","ui","forwardRef","cx","jsx","forwardRef","ui","cx","forwardRef","cx","jsx","forwardRef","cx","jsx","jsxs","createContext","forwardRef","useMultiComponentStyle","omitThemeProps","getValidChildren","findChildren","jsx","jsxs","ui","cx","jsx","jsxs","createContext","forwardRef","useMultiComponentStyle","omitThemeProps","getValidChildren","findChildren","useValue","useCallback","cx","ui"]}
|
package/dist/dialog.js
CHANGED
@@ -274,8 +274,7 @@ var DrawerContent = (0, import_core.forwardRef)(
|
|
274
274
|
dragSnapToOrigin: true,
|
275
275
|
dragMomentum: false,
|
276
276
|
onDragEnd: (_, info) => {
|
277
|
-
if (isCloseByDragInfo(info))
|
278
|
-
onClose == null ? void 0 : onClose();
|
277
|
+
if (isCloseByDragInfo(info)) onClose == null ? void 0 : onClose();
|
279
278
|
},
|
280
279
|
tabIndex: -1,
|
281
280
|
__css: css,
|
@@ -429,11 +428,9 @@ var Modal = (0, import_core2.forwardRef)(
|
|
429
428
|
} = (0, import_core2.omitThemeProps)(mergedProps);
|
430
429
|
const onKeyDown = (0, import_react2.useCallback)(
|
431
430
|
(ev) => {
|
432
|
-
if (ev.key !== "Escape")
|
433
|
-
return;
|
431
|
+
if (ev.key !== "Escape") return;
|
434
432
|
ev.stopPropagation();
|
435
|
-
if (closeOnEsc)
|
436
|
-
onClose == null ? void 0 : onClose();
|
433
|
+
if (closeOnEsc) onClose == null ? void 0 : onClose();
|
437
434
|
onEsc == null ? void 0 : onEsc();
|
438
435
|
},
|
439
436
|
[closeOnEsc, onClose, onEsc]
|
@@ -609,8 +606,7 @@ var ModalOverlay = (0, import_core3.forwardRef)(
|
|
609
606
|
__css: css,
|
610
607
|
onClick: (0, import_utils3.handlerAll)(onClick, onOverlayClick, (ev) => {
|
611
608
|
ev.stopPropagation();
|
612
|
-
if (closeOnOverlay)
|
613
|
-
onClose == null ? void 0 : onClose();
|
609
|
+
if (closeOnOverlay) onClose == null ? void 0 : onClose();
|
614
610
|
}),
|
615
611
|
...props,
|
616
612
|
...rest
|