@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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dialog.tsx","../src/modal.tsx","../src/drawer.tsx","../src/modal-overlay.tsx","../src/modal-close-button.tsx","../src/modal-header.tsx","../src/modal-body.tsx","../src/modal-footer.tsx"],"sourcesContent":["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","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 { 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 { 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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAuB;AAGvB,IAAAA,eAIO;AACP,IAAAC,gBAQO;;;ACX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BAAG,2BAA2B,SAAS;AAAA,QAClD,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,iBAAa;AAAA,EACxB,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,KAAK;AAE1C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,mBAAmB,SAAS;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":["import_core","import_utils","import_core","import_transitions","import_use_value","import_utils","import_react","import_jsx_runtime","import_core","import_motion","import_transitions","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../src/dialog.tsx","../src/modal.tsx","../src/drawer.tsx","../src/modal-overlay.tsx","../src/modal-close-button.tsx","../src/modal-header.tsx","../src/modal-body.tsx","../src/modal-footer.tsx"],"sourcesContent":["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","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 { 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 { 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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAuB;AAGvB,IAAAA,eAIO;AACP,IAAAC,gBAQO;;;ACXP,IAAAC,eAKO;AAEP,wBAA0B;AAE1B,oBAAwC;AAExC,oBAAuB;AACvB,IAAAC,sBAA+C;AAC/C,IAAAC,oBAAyB;AACzB,IAAAC,gBAKO;AAEP,IAAAC,gBAA0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G,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,iBAAa;AAAA,EACxB,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,KAAK;AAE1C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,mBAAmB,SAAS;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":["import_core","import_utils","import_core","import_transitions","import_use_value","import_utils","import_react","import_jsx_runtime","import_core","import_motion","import_transitions","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime"]}
package/dist/dialog.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  DialogFooter,
7
7
  DialogHeader,
8
8
  DialogOverlay
9
- } from "./chunk-P42J3NK3.mjs";
9
+ } from "./chunk-KRJ5OO5V.mjs";
10
10
  export {
11
11
  Dialog,
12
12
  DialogBody,
package/dist/drawer.js CHANGED
@@ -78,8 +78,7 @@ var ModalOverlay = (0, import_core.forwardRef)(
78
78
  __css: css,
79
79
  onClick: (0, import_utils.handlerAll)(onClick, onOverlayClick, (ev) => {
80
80
  ev.stopPropagation();
81
- if (closeOnOverlay)
82
- onClose == null ? void 0 : onClose();
81
+ if (closeOnOverlay) onClose == null ? void 0 : onClose();
83
82
  }),
84
83
  ...props,
85
84
  ...rest
@@ -403,11 +402,9 @@ var Modal = (0, import_core7.forwardRef)(
403
402
  } = (0, import_core7.omitThemeProps)(mergedProps);
404
403
  const onKeyDown = (0, import_react.useCallback)(
405
404
  (ev) => {
406
- if (ev.key !== "Escape")
407
- return;
405
+ if (ev.key !== "Escape") return;
408
406
  ev.stopPropagation();
409
- if (closeOnEsc)
410
- onClose == null ? void 0 : onClose();
407
+ if (closeOnEsc) onClose == null ? void 0 : onClose();
411
408
  onEsc == null ? void 0 : onEsc();
412
409
  },
413
410
  [closeOnEsc, onClose, onEsc]
@@ -778,8 +775,7 @@ var DrawerContent = (0, import_core8.forwardRef)(
778
775
  dragSnapToOrigin: true,
779
776
  dragMomentum: false,
780
777
  onDragEnd: (_, info) => {
781
- if (isCloseByDragInfo(info))
782
- onClose == null ? void 0 : onClose();
778
+ if (isCloseByDragInfo(info)) onClose == null ? void 0 : onClose();
783
779
  },
784
780
  tabIndex: -1,
785
781
  __css: css,
@@ -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":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,IAAAA,eAKO;AAGP,IAAAC,sBAAsB;AACtB,IAAAC,oBAAyB;AACzB,IAAAC,gBAMO;AAEP,IAAAC,gBAAqC;;;ACbrC,IAAAC,eAKO;AAEP,wBAA0B;AAE1B,IAAAC,iBAAwC;AAExC,oBAAuB;AACvB,IAAAC,sBAA+C;AAC/C,uBAAyB;AACzB,IAAAC,gBAKO;AAEP,mBAA0C;AAC1C,iCAA6B;;;AC3B7B,kBAA+B;AAE/B,oBAAuB;AACvB,yBAA0B;AAC1B,mBAA+B;AAwBzB;AAlBC,IAAM,mBAAe;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;AA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AAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,KAAK;AAE1C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,mBAAmB,SAAS;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":["import_core","import_transitions","import_use_value","import_utils","import_react","import_core","import_motion","import_transitions","import_utils","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
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":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,IAAAA,eAKO;AAGP,IAAAC,sBAAsB;AACtB,IAAAC,oBAAyB;AACzB,IAAAC,gBAMO;AAEP,IAAAC,gBAAqC;;;ACbrC,IAAAC,eAKO;AAEP,wBAA0B;AAE1B,IAAAC,iBAAwC;AAExC,oBAAuB;AACvB,IAAAC,sBAA+C;AAC/C,uBAAyB;AACzB,IAAAC,gBAKO;AAEP,mBAA0C;AAC1C,iCAA6B;;;AC3B7B,kBAA+B;AAE/B,oBAAuB;AACvB,yBAA0B;AAC1B,mBAA+B;AAwBzB;AAlBC,IAAM,mBAAe;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,QAAQ,QAAQ,OAAO;AAAA,IAC7B;AAEA,UAAM,QAAQ,cAAc,SAAS,+BAAY,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ACA,eAAW,kBAAG,mBAAmB,SAAS;AAAA,QAC1C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAIO,IAAM,mBAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AAC/B,UAAM,SAAS,UAAU;AAEzB,UAAM,MAAmB,EAAE,GAAG,OAAO,OAAO;AAE5C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,kBAAG,qBAAqB,SAAS;AAAA,QAC5C,OAAO;AAAA,QACN,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;","names":["import_core","import_transitions","import_use_value","import_utils","import_react","import_core","import_motion","import_transitions","import_utils","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_core","import_utils","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
package/dist/drawer.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  DrawerFooter,
9
9
  DrawerHeader,
10
10
  DrawerOverlay
11
- } from "./chunk-P42J3NK3.mjs";
11
+ } from "./chunk-KRJ5OO5V.mjs";
12
12
  export {
13
13
  Drawer,
14
14
  DrawerBody,