lizaui 7.0.8 → 7.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqE/F,eAAO,MAAM,KAAK,mHAuGjB,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,sFAAqG,eAAe,4CA4B/I,CAAC;AAEF,eAAO,MAAM,SAAS,0GAUpB,CAAC;AAGH,eAAO,MAAM,WAAW,GAAI,iCAAiC,eAAe,4CAS3E,CAAC"}
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAkF/F,eAAO,MAAM,KAAK,mHAyGjB,CAAC;AAGF,eAAO,MAAM,WAAW,GAAI,sFAAqG,eAAe,4CA4B/I,CAAC;AAEF,eAAO,MAAM,SAAS,0GAUpB,CAAC;AAGH,eAAO,MAAM,WAAW,GAAI,iCAAiC,eAAe,4CAS3E,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties, Ref } from 'react';
2
2
  export type SizeModalInterface = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "full";
3
3
  export type ShadowModalType = "none" | "sm" | "md" | "lg";
4
+ export type PlacementModalType = "top" | "center" | "bottom";
4
5
  export interface useModalInterface<T = any> {
5
6
  modalId: string;
6
7
  isModal: boolean;
@@ -31,6 +32,7 @@ export interface ModalType {
31
32
  backdrop?: "transparent" | "opaque" | "blur";
32
33
  shadow?: ShadowModalType;
33
34
  radius?: "none" | "sm" | "md" | "lg";
35
+ placement?: PlacementModalType;
34
36
  }
35
37
  export interface ModalBodyType {
36
38
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"modal.type.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAC3G,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAE;AAE3D,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,GAAG;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,CAAC,CAAC;IACb,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,aAAa,CAAC;IACt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const e=require("../chunks/jsx-runtime-BjzqJBtL.js"),z=require("react-dom"),i=require("react"),o=require("../chunks/utils-CxdrMFeI.js"),A=require("../chunks/button-DFrxQHAW.js"),x=require("../chunks/index-nwdlcB7h.js"),h=require("../chunks/index-lrI_r1ww.js"),v=require("../chunks/features-animation-BoXKk5t2.js"),m={ease:[.36,.66,.4,1]},y={scaleInOut:{enter:{transform:"scale(1)",opacity:1,transition:{duration:.4,ease:m.ease}},exit:{transform:"scale(1.03)",opacity:0,transition:{duration:.3,ease:m.ease}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:m.ease}},exit:{opacity:0,transition:{duration:.3,ease:m.ease}}}},L=x.cva("",{variants:{backdrop:{transparent:"bg-transparent",opaque:"bg-black/50",blur:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},defaultVariants:{backdrop:"opaque"}}),V=x.cva("",{variants:{size:{xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl",full:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},defaultVariants:{size:"md"}}),P=x.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),O=x.cva("",{variants:{shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"}},defaultVariants:{shadow:"md"}}),j=i.forwardRef(({modalId:n,isShow:t,isVisible:a,children:s,style:l,classNameOverlay:u="",styleContainer:c,onClickOutside:d,classNameDialog:w="modal-custom-dialog",classNameContent:R="",backdrop:b="opaque",size:E="md",isKeyboardDismissDisabled:f=!1,shadow:N="md",radius:M="lg"},k)=>{const q=i.useRef(null);if(i.useEffect(()=>(typeof window<"u"&&a&&document.body.classList.add("modal-open"),()=>{typeof window<"u"&&document.body.classList.remove("modal-open")}),[a]),i.useEffect(()=>{const r=I=>{I.key==="Escape"&&!f&&d?.()};return t&&document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t,f,d]),typeof window>"u")return null;const p=document.getElementById("modal-root");return p?z.createPortal(e.jsxRuntimeExports.jsx(h.AnimatePresence,{children:t&&e.jsxRuntimeExports.jsx(h.LazyMotion,{features:()=>Promise.resolve().then(()=>require("../chunks/index-CL73JQgs.js")).then(r=>r.domAnimation),children:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(v.m.div,{initial:"exit",animate:"enter",exit:"exit",variants:y.fade,className:o.cn("fixed inset-0 z-50",L({backdrop:b}),u),onClick:d,"aria-hidden":!t,role:"dialog","aria-modal":"true",tabIndex:-1,ref:q},"modal-overlay"),e.jsxRuntimeExports.jsx(v.m.div,{initial:"exit",animate:"enter",exit:"exit",variants:y.scaleInOut,ref:k,id:n,onClick:r=>r.stopPropagation(),className:o.cn("fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 w-full rounded-lg shadow-lg bg-content1",V({size:E}),P({radius:M}),O({shadow:N}),w),style:l,children:e.jsxRuntimeExports.jsx("div",{className:o.cn("modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]",R),style:c,children:s})},"modal-content")]})})}),p):null});j.displayName="ModalPortalComponent";const T=({title:n,showCloseButton:t=!0,disabled:a=!1,onClick:s,className:l,styled:u,children:c,...d})=>e.jsxRuntimeExports.jsxs("div",{className:o.cn("modal-custom-header-container w-full"),style:u,children:[e.jsxRuntimeExports.jsx("div",{className:o.cn("w-full flex py-4 px-6 flex-initial text-large font-semibold",l),...d,children:c||e.jsxRuntimeExports.jsx("header",{className:"modal-custom-title text-lg leading-none font-semibold",children:n})}),t&&e.jsxRuntimeExports.jsx("div",{className:"absolute top-2.5 right-2.5 disabled:pointer-events-none z-10",children:e.jsxRuntimeExports.jsxs(A.Button,{isIconOnly:!0,variant:"light",radius:"full","aria-label":"Close",onClick:s,disabled:a,className:"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none",children:[e.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",fill:"currentColor",role:"img","aria-hidden":"true",children:[e.jsxRuntimeExports.jsx("path",{fill:"none",d:"M0 0h21v21H0z"}),e.jsxRuntimeExports.jsx("path",{d:"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z"})]}),e.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})})]}),g=i.forwardRef(({children:n,className:t="",styled:a,height:s},l)=>e.jsxRuntimeExports.jsx("div",{className:o.cn("modal-custom-body flex flex-1 flex-col gap-3 px-6 overflow-y-auto",t),ref:l,style:{...a,height:s?`${s}px`:"auto"},children:n}));g.displayName="ModalBodyPortalComponent";const B=({children:n,className:t,styled:a})=>e.jsxRuntimeExports.jsx("div",{className:o.cn("modal-custom-footer flex flex-col-reverse px-6 py-3 gap-2 sm:flex-row sm:justify-end mt-auto",t),style:a,children:n});exports.Modal=j;exports.ModalBody=g;exports.ModalFooter=B;exports.ModalHeader=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/jsx-runtime-BjzqJBtL.js"),z=require("react-dom"),i=require("react"),o=require("../chunks/utils-CxdrMFeI.js"),A=require("../chunks/button-DFrxQHAW.js"),m=require("../chunks/index-nwdlcB7h.js"),v=require("../chunks/index-lrI_r1ww.js"),h=require("../chunks/features-animation-BoXKk5t2.js"),x={ease:[.36,.66,.4,1]},y={scaleInOut:{enter:{transform:"scale(1)",opacity:1,transition:{duration:.4,ease:x.ease}},exit:{transform:"scale(1.03)",opacity:0,transition:{duration:.3,ease:x.ease}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:x.ease}},exit:{opacity:0,transition:{duration:.3,ease:x.ease}}}},L=m.cva("",{variants:{backdrop:{transparent:"bg-transparent",opaque:"bg-black/50",blur:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},defaultVariants:{backdrop:"opaque"}}),P=m.cva("",{variants:{size:{xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl",full:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},defaultVariants:{size:"md"}}),O=m.cva("",{variants:{radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"}},defaultVariants:{radius:"lg"}}),T=m.cva("",{variants:{placement:{center:"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]",top:"fixed top-0 left-[50%] translate-x-[-50%] sm:mt-8",bottom:"fixed bottom-0 left-[50%] translate-x-[-50%] sm:mb-8"}},defaultVariants:{placement:"center"}}),B=m.cva("",{variants:{shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"}},defaultVariants:{shadow:"md"}}),j=i.forwardRef(({modalId:n,isShow:t,isVisible:a,children:s,style:l,classNameOverlay:u="",styleContainer:c,onClickOutside:d,classNameDialog:w="modal-custom-dialog",classNameContent:b="",backdrop:R="opaque",size:E="md",isKeyboardDismissDisabled:f=!1,shadow:N="md",radius:M="lg",placement:k="center"},q)=>{const I=i.useRef(null);if(i.useEffect(()=>(typeof window<"u"&&a&&document.body.classList.add("modal-open"),()=>{typeof window<"u"&&document.body.classList.remove("modal-open")}),[a]),i.useEffect(()=>{const r=V=>{V.key==="Escape"&&!f&&d?.()};return t&&document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t,f,d]),typeof window>"u")return null;const p=document.getElementById("modal-root");return p?z.createPortal(e.jsxRuntimeExports.jsx(v.AnimatePresence,{children:t&&e.jsxRuntimeExports.jsx(v.LazyMotion,{features:()=>Promise.resolve().then(()=>require("../chunks/index-CL73JQgs.js")).then(r=>r.domAnimation),children:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(h.m.div,{initial:"exit",animate:"enter",exit:"exit",variants:y.fade,className:o.cn("fixed inset-0 z-50",L({backdrop:R}),u),onClick:d,"aria-hidden":!t,role:"dialog","aria-modal":"true",tabIndex:-1,ref:I},"modal-overlay"),e.jsxRuntimeExports.jsx(h.m.div,{initial:"exit",animate:"enter",exit:"exit",variants:y.scaleInOut,ref:q,id:n,onClick:r=>r.stopPropagation(),className:o.cn(" z-50 w-full rounded-lg shadow-lg bg-content1",T({placement:k}),P({size:E}),O({radius:M}),B({shadow:N}),w),style:l,children:e.jsxRuntimeExports.jsx("div",{className:o.cn("modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]",b),style:c,children:s})},"modal-content")]})})}),p):null});j.displayName="ModalPortalComponent";const C=({title:n,showCloseButton:t=!0,disabled:a=!1,onClick:s,className:l,styled:u,children:c,...d})=>e.jsxRuntimeExports.jsxs("div",{className:o.cn("modal-custom-header-container w-full"),style:u,children:[e.jsxRuntimeExports.jsx("div",{className:o.cn("w-full flex py-4 px-6 flex-initial text-large font-semibold",l),...d,children:c||e.jsxRuntimeExports.jsx("header",{className:"modal-custom-title text-lg leading-none font-semibold",children:n})}),t&&e.jsxRuntimeExports.jsx("div",{className:"absolute top-2.5 right-2.5 disabled:pointer-events-none z-10",children:e.jsxRuntimeExports.jsxs(A.Button,{isIconOnly:!0,variant:"light",radius:"full","aria-label":"Close",onClick:s,disabled:a,className:"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none",children:[e.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",fill:"currentColor",role:"img","aria-hidden":"true",children:[e.jsxRuntimeExports.jsx("path",{fill:"none",d:"M0 0h21v21H0z"}),e.jsxRuntimeExports.jsx("path",{d:"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z"})]}),e.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})})]}),g=i.forwardRef(({children:n,className:t="",styled:a,height:s},l)=>e.jsxRuntimeExports.jsx("div",{className:o.cn("modal-custom-body flex flex-1 flex-col gap-3 px-6 overflow-y-auto",t),ref:l,style:{...a,height:s?`${s}px`:"auto"},children:n}));g.displayName="ModalBodyPortalComponent";const S=({children:n,className:t,styled:a})=>e.jsxRuntimeExports.jsx("div",{className:o.cn("modal-custom-footer flex flex-col-reverse px-6 py-3 gap-2 sm:flex-row sm:justify-end mt-auto",t),style:a,children:n});exports.Modal=j;exports.ModalBody=g;exports.ModalFooter=S;exports.ModalHeader=C;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../src/components/transition/transition-utils.ts","../../src/components/modal/modal.tsx"],"sourcesContent":["import type { Target, TargetAndTransition, Transition } from \"framer-motion\";\n\ntype WithMotionState<P> = Partial<Record<\"enter\" | \"exit\", P>>;\n\nexport type TransitionConfig = WithMotionState<Transition>;\n\nexport type TransitionEndConfig = WithMotionState<Target>;\n\nexport type TransitionProperties = {\n\t/**\n\t * Custom `transition` definition for `enter` and `exit`\n\t */\n\ttransition?: TransitionConfig;\n\t/**\n\t * Custom `transitionEnd` definition for `enter` and `exit`\n\t */\n\ttransitionEnd?: TransitionEndConfig;\n};\n\ntype TargetResolver<P = {}> = (props: P & TransitionProperties) => TargetAndTransition;\n\ntype Variant<P = {}> = TargetAndTransition | TargetResolver<P>;\n\nexport type Variants<P = {}> = Record<\n\tstring,\n\t{\n\t\tenter: Variant<P>;\n\t\texit: Variant<P>;\n\t\tinitial?: Variant<P>;\n\t}\n>;\n\nexport const TRANSITION_EASINGS = {\n\tease: [0.36, 0.66, 0.4, 1],\n\teaseIn: [0.4, 0, 1, 1],\n\teaseOut: [0, 0, 0.2, 1],\n\teaseInOut: [0.4, 0, 0.2, 1],\n\tspring: [0.155, 1.105, 0.295, 1.12],\n\tspringOut: [0.57, -0.15, 0.62, 0.07],\n\tsoftSpring: [0.16, 1.11, 0.3, 1.02],\n} as const;\n\nexport const TRANSITION_DEFAULTS = {\n\tenter: {\n\t\tduration: 0.2,\n\t\tease: TRANSITION_EASINGS.easeOut,\n\t},\n\texit: {\n\t\tduration: 0.1,\n\t\tease: TRANSITION_EASINGS.easeIn,\n\t},\n} as const;\n\nexport const TRANSITION_VARIANTS: Variants = {\n\tscaleSpring: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.2,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.85)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscaleSpringOpacity: {\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.8)\",\n\t\t},\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransform: \"scale(1)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.96)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscale: {\n\t\tenter: { scale: 1 },\n\t\texit: { scale: 0.95 },\n\t},\n\tscaleFadeIn: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.25,\n\t\t\t\tease: TRANSITION_EASINGS.easeIn,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.95)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.2,\n\t\t\t\tease: TRANSITION_EASINGS.easeOut,\n\t\t\t},\n\t\t},\n\t},\n\tscaleInOut: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(1.03)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tfade: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tcollapse: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\theight: \"auto\",\n\t\t\ttransition: {\n\t\t\t\theight: {\n\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\tbounce: 0,\n\t\t\t\t\tduration: 0.3,\n\t\t\t\t},\n\t\t\t\topacity: {\n\t\t\t\t\tease: \"ease\" as any,\n\t\t\t\t\tduration: 0.4,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\theight: 0,\n\t\t\ttransition: {\n\t\t\t\tease: \"ease\" as any,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t},\n};\n","\"use client\";\n\nimport ReactDOM from \"react-dom\";\nimport { forwardRef, type Ref, useEffect, useRef } from \"react\";\nimport type { ModalBodyType, ModalFooterType, ModalHeaderType, ModalType } from \"./modal.type\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"../button\";\nimport { AnimatePresence } from \"framer-motion\";\nimport { LazyMotion, m } from \"framer-motion\";\nimport { TRANSITION_VARIANTS } from \"../transition/transition-utils\";\nimport { cva } from \"class-variance-authority\";\n\nconst backdropVariants = cva(\"\", {\n\tvariants: {\n\t\tbackdrop: {\n\t\t\ttransparent: \"bg-transparent\",\n\t\t\topaque: \"bg-black/50\",\n\t\t\tblur: \"backdrop-blur-md backdrop-saturate-150 bg-overlay/30\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tbackdrop: \"opaque\",\n\t},\n});\n\nconst sizeVariants = cva(\"\", {\n\tvariants: {\n\t\tsize: {\n\t\t\t\"xs\": \"max-w-xs\",\n\t\t\t\"sm\": \"max-w-sm\",\n\t\t\t\"md\": \"max-w-md\",\n\t\t\t\"lg\": \"max-w-lg\",\n\t\t\t\"xl\": \"max-w-xl\",\n\t\t\t\"2xl\": \"max-w-2xl\",\n\t\t\t\"3xl\": \"max-w-3xl\",\n\t\t\t\"4xl\": \"max-w-4xl\",\n\t\t\t\"5xl\": \"max-w-5xl\",\n\t\t\t\"full\": \"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t},\n});\n\nconst radiusVariants = cva(\"\", {\n\tvariants: {\n\t\tradius: {\n\t\t\tnone: \"rounded-none\",\n\t\t\tsm: \"rounded-sm\",\n\t\t\tmd: \"rounded-md\",\n\t\t\tlg: \"rounded-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tradius: \"lg\",\n\t},\n});\n\nconst shadowVariants = cva(\"\", {\n\tvariants: {\n\t\tshadow: {\n\t\t\tnone: \"shadow-none\",\n\t\t\tsm: \"shadow-sm\",\n\t\t\tmd: \"shadow-md\",\n\t\t\tlg: \"shadow-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tshadow: \"md\",\n\t},\n});\n\nexport const Modal = forwardRef(\n\t(\n\t\t{\n\t\t\tmodalId,\n\t\t\tisShow,\n\t\t\tisVisible,\n\t\t\tchildren,\n\t\t\tstyle,\n\t\t\tclassNameOverlay = \"\",\n\t\t\tstyleContainer,\n\t\t\tonClickOutside,\n\t\t\tclassNameDialog = \"modal-custom-dialog\",\n\t\t\tclassNameContent = \"\",\n\t\t\tbackdrop = \"opaque\",\n\t\t\tsize = \"md\",\n\t\t\tisKeyboardDismissDisabled = false,\n\t\t\tshadow = \"md\",\n\t\t\tradius = \"lg\",\n\t\t}: ModalType,\n\t\tref: Ref<HTMLDivElement>,\n\t) => {\n\t\tconst modalOverlayRef = useRef<HTMLDivElement>(null);\n\t\tuseEffect(() => {\n\t\t\tif (typeof window !== \"undefined\" && isVisible) {\n\t\t\t\tdocument.body.classList.add(\"modal-open\");\n\t\t\t}\n\t\t\treturn () => {\n\t\t\t\tif (typeof window !== \"undefined\") {\n\t\t\t\t\tdocument.body.classList.remove(\"modal-open\");\n\t\t\t\t}\n\t\t\t};\n\t\t}, [isVisible]);\n\n\t\tuseEffect(() => {\n\t\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\t\tif (e.key === \"Escape\" && !isKeyboardDismissDisabled) {\n\t\t\t\t\tonClickOutside?.();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (isShow) {\n\t\t\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t\t};\n\t\t}, [isShow, isKeyboardDismissDisabled, onClickOutside]);\n\n\t\tif (typeof window === \"undefined\") return null;\n\n\t\tconst modalRoot = document.getElementById(\"modal-root\");\n\t\tif (!modalRoot) return null;\n\n\t\treturn ReactDOM.createPortal(\n\t\t\t<AnimatePresence>\n\t\t\t\t{isShow && (\n\t\t\t\t\t<LazyMotion features={() => import(\"framer-motion\").then((res) => res.domAnimation)}>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-overlay\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.fade}\n\t\t\t\t\t\t\t\tclassName={cn(\"fixed inset-0 z-50\", backdropVariants({ backdrop }), classNameOverlay)}\n\t\t\t\t\t\t\t\tonClick={onClickOutside}\n\t\t\t\t\t\t\t\taria-hidden={!isShow}\n\t\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t\tref={modalOverlayRef}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-content\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.scaleInOut}\n\t\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\t\tid={modalId}\n\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 w-full rounded-lg shadow-lg bg-content1\",\n\t\t\t\t\t\t\t\t\tsizeVariants({ size }),\n\t\t\t\t\t\t\t\t\tradiusVariants({ radius }),\n\t\t\t\t\t\t\t\t\tshadowVariants({ shadow }),\n\t\t\t\t\t\t\t\t\tclassNameDialog,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tstyle={style}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={cn(\"modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]\", classNameContent)} style={styleContainer}>\n\t\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</m.div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t</LazyMotion>\n\t\t\t\t)}\n\t\t\t</AnimatePresence>,\n\t\t\tmodalRoot,\n\t\t);\n\t},\n);\nModal.displayName = \"ModalPortalComponent\";\n\nexport const ModalHeader = ({ title, showCloseButton = true, disabled = false, onClick, className, styled, children, ...props }: ModalHeaderType) => {\n\treturn (\n\t\t<div className={cn(\"modal-custom-header-container w-full\")} style={styled}>\n\t\t\t<div className={cn(\"w-full flex py-4 px-6 flex-initial text-large font-semibold\", className)} {...props}>\n\t\t\t\t{children || <header className=\"modal-custom-title text-lg leading-none font-semibold\">{title}</header>}\n\t\t\t</div>\n\n\t\t\t{showCloseButton && (\n\t\t\t\t<div className=\"absolute top-2.5 right-2.5 disabled:pointer-events-none z-10\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisIconOnly\n\t\t\t\t\t\tvariant=\"light\"\n\t\t\t\t\t\tradius=\"full\"\n\t\t\t\t\t\taria-label=\"Close\"\n\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tclassName=\"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" fill=\"currentColor\" role=\"img\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path fill=\"none\" d=\"M0 0h21v21H0z\"></path>\n\t\t\t\t\t\t\t<path d=\"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport const ModalBody = forwardRef(({ children, className = \"\", styled, height }: ModalBodyType, ref: Ref<HTMLDivElement>) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-body flex flex-1 flex-col gap-3 px-6 overflow-y-auto\", className)}\n\t\t\tref={ref}\n\t\t\tstyle={{ ...styled, height: height ? `${height}px` : \"auto\" }}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nModalBody.displayName = \"ModalBodyPortalComponent\";\n\nexport const ModalFooter = ({ children, className, styled }: ModalFooterType) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-footer flex flex-col-reverse px-6 py-3 gap-2 sm:flex-row sm:justify-end mt-auto\", className)}\n\t\t\tstyle={styled}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"],"names":["TRANSITION_EASINGS","TRANSITION_VARIANTS","backdropVariants","cva","sizeVariants","radiusVariants","shadowVariants","Modal","forwardRef","modalId","isShow","isVisible","children","style","classNameOverlay","styleContainer","onClickOutside","classNameDialog","classNameContent","backdrop","size","isKeyboardDismissDisabled","shadow","radius","ref","modalOverlayRef","useRef","useEffect","handleKeyDown","e","modalRoot","ReactDOM","AnimatePresence","jsx","LazyMotion","res","jsxs","Fragment","m","cn","ModalHeader","title","showCloseButton","disabled","onClick","className","styled","props","Button","ModalBody","height","ModalFooter"],"mappings":"0YAgCaA,EAAqB,CACjC,KAAM,CAAC,IAAM,IAAM,GAAK,CAAC,CAO1B,EAaaC,EAAgC,CAkE5C,WAAY,CACX,MAAO,CACN,UAAW,WACX,QAAS,EACT,WAAY,CACX,SAAU,GACV,KAAMD,EAAmB,IAAA,CAC1B,EAED,KAAM,CACL,UAAW,cACX,QAAS,EACT,WAAY,CACX,SAAU,GACV,KAAMA,EAAmB,IAAA,CAC1B,CACD,EAED,KAAM,CACL,MAAO,CACN,QAAS,EACT,WAAY,CACX,SAAU,GACV,KAAMA,EAAmB,IAAA,CAC1B,EAED,KAAM,CACL,QAAS,EACT,WAAY,CACX,SAAU,GACV,KAAMA,EAAmB,IAAA,CAC1B,CACD,CA2BF,ECtKME,EAAmBC,EAAAA,IAAI,GAAI,CAChC,SAAU,CACT,SAAU,CACT,YAAa,iBACb,OAAQ,cACR,KAAM,sDAAA,CACP,EAED,gBAAiB,CAChB,SAAU,QAAA,CAEZ,CAAC,EAEKC,EAAeD,EAAAA,IAAI,GAAI,CAC5B,SAAU,CACT,KAAM,CACL,GAAM,WACN,GAAM,WACN,GAAM,WACN,GAAM,WACN,GAAM,WACN,MAAO,YACP,MAAO,YACP,MAAO,YACP,MAAO,YACP,KAAQ,8EAAA,CACT,EAED,gBAAiB,CAChB,KAAM,IAAA,CAER,CAAC,EAEKE,EAAiBF,EAAAA,IAAI,GAAI,C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.js","sources":["../../src/components/transition/transition-utils.ts","../../src/components/modal/modal.tsx"],"sourcesContent":["import type { Target, TargetAndTransition, Transition } from \"framer-motion\";\n\ntype WithMotionState<P> = Partial<Record<\"enter\" | \"exit\", P>>;\n\nexport type TransitionConfig = WithMotionState<Transition>;\n\nexport type TransitionEndConfig = WithMotionState<Target>;\n\nexport type TransitionProperties = {\n\t/**\n\t * Custom `transition` definition for `enter` and `exit`\n\t */\n\ttransition?: TransitionConfig;\n\t/**\n\t * Custom `transitionEnd` definition for `enter` and `exit`\n\t */\n\ttransitionEnd?: TransitionEndConfig;\n};\n\ntype TargetResolver<P = {}> = (props: P & TransitionProperties) => TargetAndTransition;\n\ntype Variant<P = {}> = TargetAndTransition | TargetResolver<P>;\n\nexport type Variants<P = {}> = Record<\n\tstring,\n\t{\n\t\tenter: Variant<P>;\n\t\texit: Variant<P>;\n\t\tinitial?: Variant<P>;\n\t}\n>;\n\nexport const TRANSITION_EASINGS = {\n\tease: [0.36, 0.66, 0.4, 1],\n\teaseIn: [0.4, 0, 1, 1],\n\teaseOut: [0, 0, 0.2, 1],\n\teaseInOut: [0.4, 0, 0.2, 1],\n\tspring: [0.155, 1.105, 0.295, 1.12],\n\tspringOut: [0.57, -0.15, 0.62, 0.07],\n\tsoftSpring: [0.16, 1.11, 0.3, 1.02],\n} as const;\n\nexport const TRANSITION_DEFAULTS = {\n\tenter: {\n\t\tduration: 0.2,\n\t\tease: TRANSITION_EASINGS.easeOut,\n\t},\n\texit: {\n\t\tduration: 0.1,\n\t\tease: TRANSITION_EASINGS.easeIn,\n\t},\n} as const;\n\nexport const TRANSITION_VARIANTS: Variants = {\n\tscaleSpring: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.2,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.85)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscaleSpringOpacity: {\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.8)\",\n\t\t},\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransform: \"scale(1)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.96)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscale: {\n\t\tenter: { scale: 1 },\n\t\texit: { scale: 0.95 },\n\t},\n\tscaleFadeIn: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.25,\n\t\t\t\tease: TRANSITION_EASINGS.easeIn,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.95)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.2,\n\t\t\t\tease: TRANSITION_EASINGS.easeOut,\n\t\t\t},\n\t\t},\n\t},\n\tscaleInOut: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(1.03)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tfade: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tcollapse: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\theight: \"auto\",\n\t\t\ttransition: {\n\t\t\t\theight: {\n\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\tbounce: 0,\n\t\t\t\t\tduration: 0.3,\n\t\t\t\t},\n\t\t\t\topacity: {\n\t\t\t\t\tease: \"ease\" as any,\n\t\t\t\t\tduration: 0.4,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\theight: 0,\n\t\t\ttransition: {\n\t\t\t\tease: \"ease\" as any,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t},\n};\n","\"use client\";\n\nimport ReactDOM from \"react-dom\";\nimport { forwardRef, type Ref, useEffect, useRef } from \"react\";\nimport type { ModalBodyType, ModalFooterType, ModalHeaderType, ModalType } from \"./modal.type\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"../button\";\nimport { AnimatePresence } from \"framer-motion\";\nimport { LazyMotion, m } from \"framer-motion\";\nimport { TRANSITION_VARIANTS } from \"../transition/transition-utils\";\nimport { cva } from \"class-variance-authority\";\n\nconst backdropVariants = cva(\"\", {\n\tvariants: {\n\t\tbackdrop: {\n\t\t\ttransparent: \"bg-transparent\",\n\t\t\topaque: \"bg-black/50\",\n\t\t\tblur: \"backdrop-blur-md backdrop-saturate-150 bg-overlay/30\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tbackdrop: \"opaque\",\n\t},\n});\n\nconst sizeVariants = cva(\"\", {\n\tvariants: {\n\t\tsize: {\n\t\t\t\"xs\": \"max-w-xs\",\n\t\t\t\"sm\": \"max-w-sm\",\n\t\t\t\"md\": \"max-w-md\",\n\t\t\t\"lg\": \"max-w-lg\",\n\t\t\t\"xl\": \"max-w-xl\",\n\t\t\t\"2xl\": \"max-w-2xl\",\n\t\t\t\"3xl\": \"max-w-3xl\",\n\t\t\t\"4xl\": \"max-w-4xl\",\n\t\t\t\"5xl\": \"max-w-5xl\",\n\t\t\t\"full\": \"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t},\n});\n\nconst radiusVariants = cva(\"\", {\n\tvariants: {\n\t\tradius: {\n\t\t\tnone: \"rounded-none\",\n\t\t\tsm: \"rounded-sm\",\n\t\t\tmd: \"rounded-md\",\n\t\t\tlg: \"rounded-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tradius: \"lg\",\n\t},\n});\n\nconst placementVariants = cva(\"\", {\n\tvariants: {\n\t\tplacement: {\n\t\t\tcenter: \"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]\",\n\t\t\ttop: \"fixed top-0 left-[50%] translate-x-[-50%] sm:mt-8\",\n bottom: \"fixed bottom-0 left-[50%] translate-x-[-50%] sm:mb-8\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tplacement: \"center\",\n\t},\n});\n\nconst shadowVariants = cva(\"\", {\n\tvariants: {\n\t\tshadow: {\n\t\t\tnone: \"shadow-none\",\n\t\t\tsm: \"shadow-sm\",\n\t\t\tmd: \"shadow-md\",\n\t\t\tlg: \"shadow-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tshadow: \"md\",\n\t},\n});\n\nexport const Modal = forwardRef(\n\t(\n\t\t{\n\t\t\tmodalId,\n\t\t\tisShow,\n\t\t\tisVisible,\n\t\t\tchildren,\n\t\t\tstyle,\n\t\t\tclassNameOverlay = \"\",\n\t\t\tstyleContainer,\n\t\t\tonClickOutside,\n\t\t\tclassNameDialog = \"modal-custom-dialog\",\n\t\t\tclassNameContent = \"\",\n\t\t\tbackdrop = \"opaque\",\n\t\t\tsize = \"md\",\n\t\t\tisKeyboardDismissDisabled = false,\n\t\t\tshadow = \"md\",\n\t\t\tradius = \"lg\",\n placement = \"center\",\n\t\t}: ModalType,\n\t\tref: Ref<HTMLDivElement>,\n\t) => {\n\t\tconst modalOverlayRef = useRef<HTMLDivElement>(null);\n\t\tuseEffect(() => {\n\t\t\tif (typeof window !== \"undefined\" && isVisible) {\n\t\t\t\tdocument.body.classList.add(\"modal-open\");\n\t\t\t}\n\t\t\treturn () => {\n\t\t\t\tif (typeof window !== \"undefined\") {\n\t\t\t\t\tdocument.body.classList.remove(\"modal-open\");\n\t\t\t\t}\n\t\t\t};\n\t\t}, [isVisible]);\n\n\t\tuseEffect(() => {\n\t\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\t\tif (e.key === \"Escape\" && !isKeyboardDismissDisabled) {\n\t\t\t\t\tonClickOutside?.();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (isShow) {\n\t\t\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t\t};\n\t\t}, [isShow, isKeyboardDismissDisabled, onClickOutside]);\n\n\t\tif (typeof window === \"undefined\") return null;\n\n\t\tconst modalRoot = document.getElementById(\"modal-root\");\n\t\tif (!modalRoot) return null;\n\n\t\treturn ReactDOM.createPortal(\n\t\t\t<AnimatePresence>\n\t\t\t\t{isShow && (\n\t\t\t\t\t<LazyMotion features={() => import(\"framer-motion\").then((res) => res.domAnimation)}>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-overlay\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.fade}\n\t\t\t\t\t\t\t\tclassName={cn(\"fixed inset-0 z-50\", backdropVariants({ backdrop }), classNameOverlay)}\n\t\t\t\t\t\t\t\tonClick={onClickOutside}\n\t\t\t\t\t\t\t\taria-hidden={!isShow}\n\t\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t\tref={modalOverlayRef}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-content\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.scaleInOut}\n\t\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\t\tid={modalId}\n\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\" z-50 w-full rounded-lg shadow-lg bg-content1\",\n placementVariants({ placement }),\n\t\t\t\t\t\t\t\t\tsizeVariants({ size }),\n\t\t\t\t\t\t\t\t\tradiusVariants({ radius }),\n\t\t\t\t\t\t\t\t\tshadowVariants({ shadow }),\n\t\t\t\t\t\t\t\t\tclassNameDialog,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tstyle={style}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={cn(\"modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]\", classNameContent)} style={styleContainer}>\n\t\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</m.div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t</LazyMotion>\n\t\t\t\t)}\n\t\t\t</AnimatePresence>,\n\t\t\tmodalRoot,\n\t\t);\n\t},\n);\nModal.displayName = \"ModalPortalComponent\";\n\nexport const ModalHeader = ({ title, showCloseButton = true, disabled = false, onClick, className, styled, children, ...props }: ModalHeaderType) => {\n\treturn (\n\t\t<div className={cn(\"modal-custom-header-container w-full\")} style={styled}>\n\t\t\t<div className={cn(\"w-full flex py-4 px-6 flex-initial text-large font-semibold\", className)} {...props}>\n\t\t\t\t{children || <header className=\"modal-custom-title text-lg leading-none font-semibold\">{title}</header>}\n\t\t\t</div>\n\n\t\t\t{showCloseButton && (\n\t\t\t\t<div className=\"absolute top-2.5 right-2.5 disabled:pointer-events-none z-10\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisIconOnly\n\t\t\t\t\t\tvariant=\"light\"\n\t\t\t\t\t\tradius=\"full\"\n\t\t\t\t\t\taria-label=\"Close\"\n\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tclassName=\"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" fill=\"currentColor\" role=\"img\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path fill=\"none\" d=\"M0 0h21v21H0z\"></path>\n\t\t\t\t\t\t\t<path d=\"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport const ModalBody = forwardRef(({ children, className = \"\", styled, height }: ModalBodyType, ref: Ref<HTMLDivElement>) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-body flex flex-1 flex-col gap-3 px-6 overflow-y-auto\", className)}\n\t\t\tref={ref}\n\t\t\tstyle={{ ...styled, height: height ? `${height}px` : \"auto\" }}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nModalBody.displayName = \"ModalBodyPortalComponent\";\n\nexport const ModalFooter = ({ children, className, styled }: ModalFooterType) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-footer flex flex-col-reverse px-6 py-3 gap-2 sm:flex-row sm:justify-end mt-auto\", className)}\n\t\t\tstyle={styled}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"],"names":["TRANSITION_EASINGS","TRANSITION_VARIANTS","backdropVariants","cva","sizeVariants","radiusVariants","placementVariants","shadowVariants","Modal","forwardRef","modalId","isShow","isVisible","children","style","classNameOverlay","styleContainer","onClickOutside","classNameDialog","classNameContent","backdrop","size","isKeyboardDismissDisabled","shadow","radius","placement","ref","modalOverlayRef","useRef","useEffect","handleKeyDown","e","modalRoot","ReactDOM","AnimatePresence","jsx","LazyMotion","res","jsxs","Fragment","m","cn","ModalHeader","title","showCloseButton","disabled","onClick","className","styled","props","Button","ModalBody","height","ModalFooter"],"mappings":"0YAgCaA,EAAqB,CACjC,KAAM,CAAC,IAAM,IAAM,GAAK,CAAC,CAO1B,EAaaC,EAAgC,CAkE5C,WAAY,CACX,MAAO,CACN,UAAW,WACX,QAAS,EACT,WAAY,CACX,SAAU,GACV,KAAMD,EAAmB,IAAA,CAC1B,EAED,KAAM,CACL,UAAW,cACX,QAAS,EACT,WAAY,CACX,SAAU,GACV,KAAMA,EAAmB,IAAA,CAC1B,CACD,EAED,KAAM,CACL,MAAO,CACN,QAAS,EACT,WAAY,CACX,SAAU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AAO,EAAE,gBAAgB,EACpCA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,EAAE,0NAAA,CAA2N,CAAA,EACpO,EACAA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,OAAA,CAAK,CAAA,CAAA,CAAA,CAChC,CACD,CAAA,EAEF,EAIWgB,EAAY1C,EAAAA,WAAW,CAAC,CAAE,SAAAI,EAAU,UAAAkC,EAAY,GAAI,OAAAC,EAAQ,OAAAI,CAAA,EAAyB1B,IAEhGS,EAAAA,kBAAAA,IAAC,MAAA,CACA,UAAWM,EAAAA,GAAG,oEAAqEM,CAAS,EAC5F,IAAArB,EACA,MAAO,CAAE,GAAGsB,EAAQ,OAAQI,EAAS,GAAGA,CAAM,KAAO,MAAA,EAEpD,SAAAvC,CAAA,CAAA,CAGH,EACDsC,EAAU,YAAc,2BAEjB,MAAME,EAAc,CAAC,CAAE,SAAAxC,EAAU,UAAAkC,EAAW,OAAAC,KAEjDb,EAAAA,kBAAAA,IAAC,MAAA,CACA,UAAWM,EAAAA,GAAG,gGAAiGM,CAAS,EACxH,MAAOC,EAEN,SAAAnC,CAAA,CAAA"}
@@ -3,10 +3,10 @@ import R from "react-dom";
3
3
  import { forwardRef as y, useRef as z, useEffect as p } from "react";
4
4
  import { c as n } from "../chunks/utils-CvyT6Z0O.js";
5
5
  import { B as A } from "../chunks/button-uo4_Xad_.js";
6
- import { c as m } from "../chunks/index-D29mdTf5.js";
7
- import { A as V, L as E } from "../chunks/index-DC9BfnBH.js";
6
+ import { c as i } from "../chunks/index-D29mdTf5.js";
7
+ import { A as E, L as _ } from "../chunks/index-DC9BfnBH.js";
8
8
  import { m as h } from "../chunks/features-animation-BRAvwYFN.js";
9
- const i = {
9
+ const m = {
10
10
  ease: [0.36, 0.66, 0.4, 1]
11
11
  }, v = {
12
12
  scaleInOut: {
@@ -15,7 +15,7 @@ const i = {
15
15
  opacity: 1,
16
16
  transition: {
17
17
  duration: 0.4,
18
- ease: i.ease
18
+ ease: m.ease
19
19
  }
20
20
  },
21
21
  exit: {
@@ -23,7 +23,7 @@ const i = {
23
23
  opacity: 0,
24
24
  transition: {
25
25
  duration: 0.3,
26
- ease: i.ease
26
+ ease: m.ease
27
27
  }
28
28
  }
29
29
  },
@@ -32,18 +32,18 @@ const i = {
32
32
  opacity: 1,
33
33
  transition: {
34
34
  duration: 0.4,
35
- ease: i.ease
35
+ ease: m.ease
36
36
  }
37
37
  },
38
38
  exit: {
39
39
  opacity: 0,
40
40
  transition: {
41
41
  duration: 0.3,
42
- ease: i.ease
42
+ ease: m.ease
43
43
  }
44
44
  }
45
45
  }
46
- }, _ = m("", {
46
+ }, B = i("", {
47
47
  variants: {
48
48
  backdrop: {
49
49
  transparent: "bg-transparent",
@@ -54,7 +54,7 @@ const i = {
54
54
  defaultVariants: {
55
55
  backdrop: "opaque"
56
56
  }
57
- }), B = m("", {
57
+ }), C = i("", {
58
58
  variants: {
59
59
  size: {
60
60
  xs: "max-w-xs",
@@ -72,7 +72,7 @@ const i = {
72
72
  defaultVariants: {
73
73
  size: "md"
74
74
  }
75
- }), C = m("", {
75
+ }), O = i("", {
76
76
  variants: {
77
77
  radius: {
78
78
  none: "rounded-none",
@@ -84,7 +84,18 @@ const i = {
84
84
  defaultVariants: {
85
85
  radius: "lg"
86
86
  }
87
- }), O = m("", {
87
+ }), P = i("", {
88
+ variants: {
89
+ placement: {
90
+ center: "fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]",
91
+ top: "fixed top-0 left-[50%] translate-x-[-50%] sm:mt-8",
92
+ bottom: "fixed bottom-0 left-[50%] translate-x-[-50%] sm:mb-8"
93
+ }
94
+ },
95
+ defaultVariants: {
96
+ placement: "center"
97
+ }
98
+ }), T = i("", {
88
99
  variants: {
89
100
  shadow: {
90
101
  none: "shadow-none",
@@ -96,38 +107,39 @@ const i = {
96
107
  defaultVariants: {
97
108
  shadow: "md"
98
109
  }
99
- }), P = y(
110
+ }), q = y(
100
111
  ({
101
112
  modalId: o,
102
113
  isShow: a,
103
114
  isVisible: t,
104
115
  children: l,
105
- style: d,
116
+ style: r,
106
117
  classNameOverlay: c = "",
107
- styleContainer: u,
108
- onClickOutside: r,
118
+ styleContainer: x,
119
+ onClickOutside: d,
109
120
  classNameDialog: w = "modal-custom-dialog",
110
121
  classNameContent: g = "",
111
122
  backdrop: b = "opaque",
112
123
  size: j = "md",
113
- isKeyboardDismissDisabled: x = !1,
124
+ isKeyboardDismissDisabled: u = !1,
114
125
  shadow: N = "md",
115
- radius: k = "lg"
116
- }, I) => {
126
+ radius: k = "lg",
127
+ placement: I = "center"
128
+ }, V) => {
117
129
  const L = z(null);
118
130
  if (p(() => (typeof window < "u" && t && document.body.classList.add("modal-open"), () => {
119
131
  typeof window < "u" && document.body.classList.remove("modal-open");
120
132
  }), [t]), p(() => {
121
133
  const s = (M) => {
122
- M.key === "Escape" && !x && r?.();
134
+ M.key === "Escape" && !u && d?.();
123
135
  };
124
136
  return a && document.addEventListener("keydown", s), () => {
125
137
  document.removeEventListener("keydown", s);
126
138
  };
127
- }, [a, x, r]), typeof window > "u") return null;
139
+ }, [a, u, d]), typeof window > "u") return null;
128
140
  const f = document.getElementById("modal-root");
129
141
  return f ? R.createPortal(
130
- /* @__PURE__ */ e.jsx(V, { children: a && /* @__PURE__ */ e.jsx(E, { features: () => import("../chunks/index-BbDfYVLO.js").then((s) => s.domAnimation), children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
142
+ /* @__PURE__ */ e.jsx(E, { children: a && /* @__PURE__ */ e.jsx(_, { features: () => import("../chunks/index-BbDfYVLO.js").then((s) => s.domAnimation), children: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
131
143
  /* @__PURE__ */ e.jsx(
132
144
  h.div,
133
145
  {
@@ -135,8 +147,8 @@ const i = {
135
147
  animate: "enter",
136
148
  exit: "exit",
137
149
  variants: v.fade,
138
- className: n("fixed inset-0 z-50", _({ backdrop: b }), c),
139
- onClick: r,
150
+ className: n("fixed inset-0 z-50", B({ backdrop: b }), c),
151
+ onClick: d,
140
152
  "aria-hidden": !a,
141
153
  role: "dialog",
142
154
  "aria-modal": "true",
@@ -152,18 +164,19 @@ const i = {
152
164
  animate: "enter",
153
165
  exit: "exit",
154
166
  variants: v.scaleInOut,
155
- ref: I,
167
+ ref: V,
156
168
  id: o,
157
169
  onClick: (s) => s.stopPropagation(),
158
170
  className: n(
159
- "fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 w-full rounded-lg shadow-lg bg-content1",
160
- B({ size: j }),
161
- C({ radius: k }),
162
- O({ shadow: N }),
171
+ " z-50 w-full rounded-lg shadow-lg bg-content1",
172
+ P({ placement: I }),
173
+ C({ size: j }),
174
+ O({ radius: k }),
175
+ T({ shadow: N }),
163
176
  w
164
177
  ),
165
- style: d,
166
- children: /* @__PURE__ */ e.jsx("div", { className: n("modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]", g), style: u, children: l })
178
+ style: r,
179
+ children: /* @__PURE__ */ e.jsx("div", { className: n("modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]", g), style: x, children: l })
167
180
  },
168
181
  "modal-content"
169
182
  )
@@ -172,9 +185,9 @@ const i = {
172
185
  ) : null;
173
186
  }
174
187
  );
175
- P.displayName = "ModalPortalComponent";
176
- const J = ({ title: o, showCloseButton: a = !0, disabled: t = !1, onClick: l, className: d, styled: c, children: u, ...r }) => /* @__PURE__ */ e.jsxs("div", { className: n("modal-custom-header-container w-full"), style: c, children: [
177
- /* @__PURE__ */ e.jsx("div", { className: n("w-full flex py-4 px-6 flex-initial text-large font-semibold", d), ...r, children: u || /* @__PURE__ */ e.jsx("header", { className: "modal-custom-title text-lg leading-none font-semibold", children: o }) }),
188
+ q.displayName = "ModalPortalComponent";
189
+ const Q = ({ title: o, showCloseButton: a = !0, disabled: t = !1, onClick: l, className: r, styled: c, children: x, ...d }) => /* @__PURE__ */ e.jsxs("div", { className: n("modal-custom-header-container w-full"), style: c, children: [
190
+ /* @__PURE__ */ e.jsx("div", { className: n("w-full flex py-4 px-6 flex-initial text-large font-semibold", r), ...d, children: x || /* @__PURE__ */ e.jsx("header", { className: "modal-custom-title text-lg leading-none font-semibold", children: o }) }),
178
191
  a && /* @__PURE__ */ e.jsx("div", { className: "absolute top-2.5 right-2.5 disabled:pointer-events-none z-10", children: /* @__PURE__ */ e.jsxs(
179
192
  A,
180
193
  {
@@ -194,17 +207,17 @@ const J = ({ title: o, showCloseButton: a = !0, disabled: t = !1, onClick: l, cl
194
207
  ]
195
208
  }
196
209
  ) })
197
- ] }), T = y(({ children: o, className: a = "", styled: t, height: l }, d) => /* @__PURE__ */ e.jsx(
210
+ ] }), F = y(({ children: o, className: a = "", styled: t, height: l }, r) => /* @__PURE__ */ e.jsx(
198
211
  "div",
199
212
  {
200
213
  className: n("modal-custom-body flex flex-1 flex-col gap-3 px-6 overflow-y-auto", a),
201
- ref: d,
214
+ ref: r,
202
215
  style: { ...t, height: l ? `${l}px` : "auto" },
203
216
  children: o
204
217
  }
205
218
  ));
206
- T.displayName = "ModalBodyPortalComponent";
207
- const K = ({ children: o, className: a, styled: t }) => /* @__PURE__ */ e.jsx(
219
+ F.displayName = "ModalBodyPortalComponent";
220
+ const U = ({ children: o, className: a, styled: t }) => /* @__PURE__ */ e.jsx(
208
221
  "div",
209
222
  {
210
223
  className: n("modal-custom-footer flex flex-col-reverse px-6 py-3 gap-2 sm:flex-row sm:justify-end mt-auto", a),
@@ -213,9 +226,9 @@ const K = ({ children: o, className: a, styled: t }) => /* @__PURE__ */ e.jsx(
213
226
  }
214
227
  );
215
228
  export {
216
- P as Modal,
217
- T as ModalBody,
218
- K as ModalFooter,
219
- J as ModalHeader
229
+ q as Modal,
230
+ F as ModalBody,
231
+ U as ModalFooter,
232
+ Q as ModalHeader
220
233
  };
221
234
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../src/components/transition/transition-utils.ts","../../src/components/modal/modal.tsx"],"sourcesContent":["import type { Target, TargetAndTransition, Transition } from \"framer-motion\";\n\ntype WithMotionState<P> = Partial<Record<\"enter\" | \"exit\", P>>;\n\nexport type TransitionConfig = WithMotionState<Transition>;\n\nexport type TransitionEndConfig = WithMotionState<Target>;\n\nexport type TransitionProperties = {\n\t/**\n\t * Custom `transition` definition for `enter` and `exit`\n\t */\n\ttransition?: TransitionConfig;\n\t/**\n\t * Custom `transitionEnd` definition for `enter` and `exit`\n\t */\n\ttransitionEnd?: TransitionEndConfig;\n};\n\ntype TargetResolver<P = {}> = (props: P & TransitionProperties) => TargetAndTransition;\n\ntype Variant<P = {}> = TargetAndTransition | TargetResolver<P>;\n\nexport type Variants<P = {}> = Record<\n\tstring,\n\t{\n\t\tenter: Variant<P>;\n\t\texit: Variant<P>;\n\t\tinitial?: Variant<P>;\n\t}\n>;\n\nexport const TRANSITION_EASINGS = {\n\tease: [0.36, 0.66, 0.4, 1],\n\teaseIn: [0.4, 0, 1, 1],\n\teaseOut: [0, 0, 0.2, 1],\n\teaseInOut: [0.4, 0, 0.2, 1],\n\tspring: [0.155, 1.105, 0.295, 1.12],\n\tspringOut: [0.57, -0.15, 0.62, 0.07],\n\tsoftSpring: [0.16, 1.11, 0.3, 1.02],\n} as const;\n\nexport const TRANSITION_DEFAULTS = {\n\tenter: {\n\t\tduration: 0.2,\n\t\tease: TRANSITION_EASINGS.easeOut,\n\t},\n\texit: {\n\t\tduration: 0.1,\n\t\tease: TRANSITION_EASINGS.easeIn,\n\t},\n} as const;\n\nexport const TRANSITION_VARIANTS: Variants = {\n\tscaleSpring: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.2,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.85)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscaleSpringOpacity: {\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.8)\",\n\t\t},\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransform: \"scale(1)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.96)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscale: {\n\t\tenter: { scale: 1 },\n\t\texit: { scale: 0.95 },\n\t},\n\tscaleFadeIn: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.25,\n\t\t\t\tease: TRANSITION_EASINGS.easeIn,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.95)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.2,\n\t\t\t\tease: TRANSITION_EASINGS.easeOut,\n\t\t\t},\n\t\t},\n\t},\n\tscaleInOut: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(1.03)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tfade: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tcollapse: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\theight: \"auto\",\n\t\t\ttransition: {\n\t\t\t\theight: {\n\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\tbounce: 0,\n\t\t\t\t\tduration: 0.3,\n\t\t\t\t},\n\t\t\t\topacity: {\n\t\t\t\t\tease: \"ease\" as any,\n\t\t\t\t\tduration: 0.4,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\theight: 0,\n\t\t\ttransition: {\n\t\t\t\tease: \"ease\" as any,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t},\n};\n","\"use client\";\n\nimport ReactDOM from \"react-dom\";\nimport { forwardRef, type Ref, useEffect, useRef } from \"react\";\nimport type { ModalBodyType, ModalFooterType, ModalHeaderType, ModalType } from \"./modal.type\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"../button\";\nimport { AnimatePresence } from \"framer-motion\";\nimport { LazyMotion, m } from \"framer-motion\";\nimport { TRANSITION_VARIANTS } from \"../transition/transition-utils\";\nimport { cva } from \"class-variance-authority\";\n\nconst backdropVariants = cva(\"\", {\n\tvariants: {\n\t\tbackdrop: {\n\t\t\ttransparent: \"bg-transparent\",\n\t\t\topaque: \"bg-black/50\",\n\t\t\tblur: \"backdrop-blur-md backdrop-saturate-150 bg-overlay/30\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tbackdrop: \"opaque\",\n\t},\n});\n\nconst sizeVariants = cva(\"\", {\n\tvariants: {\n\t\tsize: {\n\t\t\t\"xs\": \"max-w-xs\",\n\t\t\t\"sm\": \"max-w-sm\",\n\t\t\t\"md\": \"max-w-md\",\n\t\t\t\"lg\": \"max-w-lg\",\n\t\t\t\"xl\": \"max-w-xl\",\n\t\t\t\"2xl\": \"max-w-2xl\",\n\t\t\t\"3xl\": \"max-w-3xl\",\n\t\t\t\"4xl\": \"max-w-4xl\",\n\t\t\t\"5xl\": \"max-w-5xl\",\n\t\t\t\"full\": \"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t},\n});\n\nconst radiusVariants = cva(\"\", {\n\tvariants: {\n\t\tradius: {\n\t\t\tnone: \"rounded-none\",\n\t\t\tsm: \"rounded-sm\",\n\t\t\tmd: \"rounded-md\",\n\t\t\tlg: \"rounded-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tradius: \"lg\",\n\t},\n});\n\nconst shadowVariants = cva(\"\", {\n\tvariants: {\n\t\tshadow: {\n\t\t\tnone: \"shadow-none\",\n\t\t\tsm: \"shadow-sm\",\n\t\t\tmd: \"shadow-md\",\n\t\t\tlg: \"shadow-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tshadow: \"md\",\n\t},\n});\n\nexport const Modal = forwardRef(\n\t(\n\t\t{\n\t\t\tmodalId,\n\t\t\tisShow,\n\t\t\tisVisible,\n\t\t\tchildren,\n\t\t\tstyle,\n\t\t\tclassNameOverlay = \"\",\n\t\t\tstyleContainer,\n\t\t\tonClickOutside,\n\t\t\tclassNameDialog = \"modal-custom-dialog\",\n\t\t\tclassNameContent = \"\",\n\t\t\tbackdrop = \"opaque\",\n\t\t\tsize = \"md\",\n\t\t\tisKeyboardDismissDisabled = false,\n\t\t\tshadow = \"md\",\n\t\t\tradius = \"lg\",\n\t\t}: ModalType,\n\t\tref: Ref<HTMLDivElement>,\n\t) => {\n\t\tconst modalOverlayRef = useRef<HTMLDivElement>(null);\n\t\tuseEffect(() => {\n\t\t\tif (typeof window !== \"undefined\" && isVisible) {\n\t\t\t\tdocument.body.classList.add(\"modal-open\");\n\t\t\t}\n\t\t\treturn () => {\n\t\t\t\tif (typeof window !== \"undefined\") {\n\t\t\t\t\tdocument.body.classList.remove(\"modal-open\");\n\t\t\t\t}\n\t\t\t};\n\t\t}, [isVisible]);\n\n\t\tuseEffect(() => {\n\t\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\t\tif (e.key === \"Escape\" && !isKeyboardDismissDisabled) {\n\t\t\t\t\tonClickOutside?.();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (isShow) {\n\t\t\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t\t};\n\t\t}, [isShow, isKeyboardDismissDisabled, onClickOutside]);\n\n\t\tif (typeof window === \"undefined\") return null;\n\n\t\tconst modalRoot = document.getElementById(\"modal-root\");\n\t\tif (!modalRoot) return null;\n\n\t\treturn ReactDOM.createPortal(\n\t\t\t<AnimatePresence>\n\t\t\t\t{isShow && (\n\t\t\t\t\t<LazyMotion features={() => import(\"framer-motion\").then((res) => res.domAnimation)}>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-overlay\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.fade}\n\t\t\t\t\t\t\t\tclassName={cn(\"fixed inset-0 z-50\", backdropVariants({ backdrop }), classNameOverlay)}\n\t\t\t\t\t\t\t\tonClick={onClickOutside}\n\t\t\t\t\t\t\t\taria-hidden={!isShow}\n\t\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t\tref={modalOverlayRef}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-content\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.scaleInOut}\n\t\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\t\tid={modalId}\n\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] z-50 w-full rounded-lg shadow-lg bg-content1\",\n\t\t\t\t\t\t\t\t\tsizeVariants({ size }),\n\t\t\t\t\t\t\t\t\tradiusVariants({ radius }),\n\t\t\t\t\t\t\t\t\tshadowVariants({ shadow }),\n\t\t\t\t\t\t\t\t\tclassNameDialog,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tstyle={style}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={cn(\"modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]\", classNameContent)} style={styleContainer}>\n\t\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</m.div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t</LazyMotion>\n\t\t\t\t)}\n\t\t\t</AnimatePresence>,\n\t\t\tmodalRoot,\n\t\t);\n\t},\n);\nModal.displayName = \"ModalPortalComponent\";\n\nexport const ModalHeader = ({ title, showCloseButton = true, disabled = false, onClick, className, styled, children, ...props }: ModalHeaderType) => {\n\treturn (\n\t\t<div className={cn(\"modal-custom-header-container w-full\")} style={styled}>\n\t\t\t<div className={cn(\"w-full flex py-4 px-6 flex-initial text-large font-semibold\", className)} {...props}>\n\t\t\t\t{children || <header className=\"modal-custom-title text-lg leading-none font-semibold\">{title}</header>}\n\t\t\t</div>\n\n\t\t\t{showCloseButton && (\n\t\t\t\t<div className=\"absolute top-2.5 right-2.5 disabled:pointer-events-none z-10\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisIconOnly\n\t\t\t\t\t\tvariant=\"light\"\n\t\t\t\t\t\tradius=\"full\"\n\t\t\t\t\t\taria-label=\"Close\"\n\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tclassName=\"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" fill=\"currentColor\" role=\"img\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path fill=\"none\" d=\"M0 0h21v21H0z\"></path>\n\t\t\t\t\t\t\t<path d=\"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport const ModalBody = forwardRef(({ children, className = \"\", styled, height }: ModalBodyType, ref: Ref<HTMLDivElement>) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-body flex flex-1 flex-col gap-3 px-6 overflow-y-auto\", className)}\n\t\t\tref={ref}\n\t\t\tstyle={{ ...styled, height: height ? `${height}px` : \"auto\" }}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nModalBody.displayName = \"ModalBodyPortalComponent\";\n\nexport const ModalFooter = ({ children, className, styled }: ModalFooterType) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-footer flex flex-col-reverse px-6 py-3 gap-2 sm:flex-row sm:justify-end mt-auto\", className)}\n\t\t\tstyle={styled}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"],"names":["TRANSITION_EASINGS","TRANSITION_VARIANTS","backdropVariants","cva","sizeVariants","radiusVariants","shadowVariants","Modal","forwardRef","modalId","isShow","isVisible","children","style","classNameOverlay","styleContainer","onClickOutside","classNameDialog","classNameContent","backdrop","size","isKeyboardDismissDisabled","shadow","radius","ref","modalOverlayRef","useRef","useEffect","handleKeyDown","e","modalRoot","ReactDOM","AnimatePresence","jsx","LazyMotion","res","jsxs","Fragment","m","cn","ModalHeader","title","showCloseButton","disabled","onClick","className","styled","props","Button","ModalBody","height","ModalFooter"],"mappings":";;;;;;;;AAgCO,MAAMA,IAAqB;AAAA,EACjC,MAAM,CAAC,MAAM,MAAM,KAAK,CAAC;AAO1B,GAaaC,IAAgC;AAAA,EAkE5C,YAAY;AAAA,IACX,OAAO;AAAA,MACN,WAAW;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,QACX,UAAU;AAAA,QACV,MAAMD,EAAmB;AAAA,MAAA;AAAA,IAC1B;AAAA,IAED,MAAM;AAAA,MACL,WAAW;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,QACX,UAAU;AAAA,QACV,MAAMA,EAAmB;AAAA,MAAA;AAAA,IAC1B;AAAA,EACD;AAAA,EAED,MAAM;AAAA,IACL,OAAO;AAAA,MACN,SAAS;AAAA,MACT,YAAY;AAAA,QACX,UAAU;AAAA,QACV,MAAMA,EAAmB;AAAA,MAAA;AAAA,IAC1B;AAAA,IAED,MAAM;AAAA,MACL,SAAS;AAAA,MACT,YAAY;AAAA,QACX,UAAU;AAAA,QACV,MAAMA,EAAmB;AAA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EAAAA;AAAAA,IAACY;AAAA,IAAA;AAAA,MACA,YAAU;AAAA,MACV,SAAQ;AAAA,MACR,QAAO;AAAA,MACP,cAAW;AAAA,MACX,SAAAJ;AAAA,MACA,UAAAD;AAAA,MACA,WAAU;AAAA,MAEV,UAAA;AAAA,QAAAP,gBAAAA,EAAAA,KAAC,OAAA,EAAI,OAAM,MAAK,QAAO,MAAK,MAAK,gBAAe,MAAK,OAAM,eAAY,QACtE,UAAA;AAAA,UAAAH,gBAAAA,EAAAA,IAAC,QAAA,EAAK,MAAK,QAAO,GAAE,iBAAgB;AAAA,UACpCA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,GAAE,2NAAA,CAA2N;AAAA,QAAA,GACpO;AAAA,QACAA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,EAChC,CACD;AAAA,GAEF,GAIWgB,IAAYzC,EAAW,CAAC,EAAE,UAAAI,GAAU,WAAAiC,IAAY,IAAI,QAAAC,GAAQ,QAAAI,EAAA,GAAyB1B,MAEhGS,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWM,EAAG,qEAAqEM,CAAS;AAAA,IAC5F,KAAArB;AAAA,IACA,OAAO,EAAE,GAAGsB,GAAQ,QAAQI,IAAS,GAAGA,CAAM,OAAO,OAAA;AAAA,IAEpD,UAAAtC;AAAA,EAAA;AAAA,CAGH;AACDqC,EAAU,cAAc;AAEjB,MAAME,IAAc,CAAC,EAAE,UAAAvC,GAAU,WAAAiC,GAAW,QAAAC,QAEjDb,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWM,EAAG,iGAAiGM,CAAS;AAAA,IACxH,OAAOC;AAAA,IAEN,UAAAlC;AAAA,EAAA;AAAA;"}
1
+ {"version":3,"file":"index.es.js","sources":["../../src/components/transition/transition-utils.ts","../../src/components/modal/modal.tsx"],"sourcesContent":["import type { Target, TargetAndTransition, Transition } from \"framer-motion\";\n\ntype WithMotionState<P> = Partial<Record<\"enter\" | \"exit\", P>>;\n\nexport type TransitionConfig = WithMotionState<Transition>;\n\nexport type TransitionEndConfig = WithMotionState<Target>;\n\nexport type TransitionProperties = {\n\t/**\n\t * Custom `transition` definition for `enter` and `exit`\n\t */\n\ttransition?: TransitionConfig;\n\t/**\n\t * Custom `transitionEnd` definition for `enter` and `exit`\n\t */\n\ttransitionEnd?: TransitionEndConfig;\n};\n\ntype TargetResolver<P = {}> = (props: P & TransitionProperties) => TargetAndTransition;\n\ntype Variant<P = {}> = TargetAndTransition | TargetResolver<P>;\n\nexport type Variants<P = {}> = Record<\n\tstring,\n\t{\n\t\tenter: Variant<P>;\n\t\texit: Variant<P>;\n\t\tinitial?: Variant<P>;\n\t}\n>;\n\nexport const TRANSITION_EASINGS = {\n\tease: [0.36, 0.66, 0.4, 1],\n\teaseIn: [0.4, 0, 1, 1],\n\teaseOut: [0, 0, 0.2, 1],\n\teaseInOut: [0.4, 0, 0.2, 1],\n\tspring: [0.155, 1.105, 0.295, 1.12],\n\tspringOut: [0.57, -0.15, 0.62, 0.07],\n\tsoftSpring: [0.16, 1.11, 0.3, 1.02],\n} as const;\n\nexport const TRANSITION_DEFAULTS = {\n\tenter: {\n\t\tduration: 0.2,\n\t\tease: TRANSITION_EASINGS.easeOut,\n\t},\n\texit: {\n\t\tduration: 0.1,\n\t\tease: TRANSITION_EASINGS.easeIn,\n\t},\n} as const;\n\nexport const TRANSITION_VARIANTS: Variants = {\n\tscaleSpring: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.2,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.85)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscaleSpringOpacity: {\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.8)\",\n\t\t},\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransform: \"scale(1)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"spring\",\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransform: \"scale(0.96)\",\n\t\t\ttransition: {\n\t\t\t\ttype: \"easeOut\" as any,\n\t\t\t\tbounce: 0,\n\t\t\t\tduration: 0.15,\n\t\t\t},\n\t\t},\n\t},\n\tscale: {\n\t\tenter: { scale: 1 },\n\t\texit: { scale: 0.95 },\n\t},\n\tscaleFadeIn: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.25,\n\t\t\t\tease: TRANSITION_EASINGS.easeIn,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(0.95)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.2,\n\t\t\t\tease: TRANSITION_EASINGS.easeOut,\n\t\t\t},\n\t\t},\n\t},\n\tscaleInOut: {\n\t\tenter: {\n\t\t\ttransform: \"scale(1)\",\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\ttransform: \"scale(1.03)\",\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tfade: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.4,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tease: TRANSITION_EASINGS.ease,\n\t\t\t},\n\t\t},\n\t},\n\tcollapse: {\n\t\tenter: {\n\t\t\topacity: 1,\n\t\t\theight: \"auto\",\n\t\t\ttransition: {\n\t\t\t\theight: {\n\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\tbounce: 0,\n\t\t\t\t\tduration: 0.3,\n\t\t\t\t},\n\t\t\t\topacity: {\n\t\t\t\t\tease: \"ease\" as any,\n\t\t\t\t\tduration: 0.4,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\topacity: 0,\n\t\t\theight: 0,\n\t\t\ttransition: {\n\t\t\t\tease: \"ease\" as any,\n\t\t\t\tduration: 0.3,\n\t\t\t},\n\t\t},\n\t},\n};\n","\"use client\";\n\nimport ReactDOM from \"react-dom\";\nimport { forwardRef, type Ref, useEffect, useRef } from \"react\";\nimport type { ModalBodyType, ModalFooterType, ModalHeaderType, ModalType } from \"./modal.type\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"../button\";\nimport { AnimatePresence } from \"framer-motion\";\nimport { LazyMotion, m } from \"framer-motion\";\nimport { TRANSITION_VARIANTS } from \"../transition/transition-utils\";\nimport { cva } from \"class-variance-authority\";\n\nconst backdropVariants = cva(\"\", {\n\tvariants: {\n\t\tbackdrop: {\n\t\t\ttransparent: \"bg-transparent\",\n\t\t\topaque: \"bg-black/50\",\n\t\t\tblur: \"backdrop-blur-md backdrop-saturate-150 bg-overlay/30\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tbackdrop: \"opaque\",\n\t},\n});\n\nconst sizeVariants = cva(\"\", {\n\tvariants: {\n\t\tsize: {\n\t\t\t\"xs\": \"max-w-xs\",\n\t\t\t\"sm\": \"max-w-sm\",\n\t\t\t\"md\": \"max-w-md\",\n\t\t\t\"lg\": \"max-w-lg\",\n\t\t\t\"xl\": \"max-w-xl\",\n\t\t\t\"2xl\": \"max-w-2xl\",\n\t\t\t\"3xl\": \"max-w-3xl\",\n\t\t\t\"4xl\": \"max-w-4xl\",\n\t\t\t\"5xl\": \"max-w-5xl\",\n\t\t\t\"full\": \"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t},\n});\n\nconst radiusVariants = cva(\"\", {\n\tvariants: {\n\t\tradius: {\n\t\t\tnone: \"rounded-none\",\n\t\t\tsm: \"rounded-sm\",\n\t\t\tmd: \"rounded-md\",\n\t\t\tlg: \"rounded-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tradius: \"lg\",\n\t},\n});\n\nconst placementVariants = cva(\"\", {\n\tvariants: {\n\t\tplacement: {\n\t\t\tcenter: \"fixed top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%]\",\n\t\t\ttop: \"fixed top-0 left-[50%] translate-x-[-50%] sm:mt-8\",\n bottom: \"fixed bottom-0 left-[50%] translate-x-[-50%] sm:mb-8\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tplacement: \"center\",\n\t},\n});\n\nconst shadowVariants = cva(\"\", {\n\tvariants: {\n\t\tshadow: {\n\t\t\tnone: \"shadow-none\",\n\t\t\tsm: \"shadow-sm\",\n\t\t\tmd: \"shadow-md\",\n\t\t\tlg: \"shadow-lg\",\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tshadow: \"md\",\n\t},\n});\n\nexport const Modal = forwardRef(\n\t(\n\t\t{\n\t\t\tmodalId,\n\t\t\tisShow,\n\t\t\tisVisible,\n\t\t\tchildren,\n\t\t\tstyle,\n\t\t\tclassNameOverlay = \"\",\n\t\t\tstyleContainer,\n\t\t\tonClickOutside,\n\t\t\tclassNameDialog = \"modal-custom-dialog\",\n\t\t\tclassNameContent = \"\",\n\t\t\tbackdrop = \"opaque\",\n\t\t\tsize = \"md\",\n\t\t\tisKeyboardDismissDisabled = false,\n\t\t\tshadow = \"md\",\n\t\t\tradius = \"lg\",\n placement = \"center\",\n\t\t}: ModalType,\n\t\tref: Ref<HTMLDivElement>,\n\t) => {\n\t\tconst modalOverlayRef = useRef<HTMLDivElement>(null);\n\t\tuseEffect(() => {\n\t\t\tif (typeof window !== \"undefined\" && isVisible) {\n\t\t\t\tdocument.body.classList.add(\"modal-open\");\n\t\t\t}\n\t\t\treturn () => {\n\t\t\t\tif (typeof window !== \"undefined\") {\n\t\t\t\t\tdocument.body.classList.remove(\"modal-open\");\n\t\t\t\t}\n\t\t\t};\n\t\t}, [isVisible]);\n\n\t\tuseEffect(() => {\n\t\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\t\tif (e.key === \"Escape\" && !isKeyboardDismissDisabled) {\n\t\t\t\t\tonClickOutside?.();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (isShow) {\n\t\t\t\tdocument.addEventListener(\"keydown\", handleKeyDown);\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tdocument.removeEventListener(\"keydown\", handleKeyDown);\n\t\t\t};\n\t\t}, [isShow, isKeyboardDismissDisabled, onClickOutside]);\n\n\t\tif (typeof window === \"undefined\") return null;\n\n\t\tconst modalRoot = document.getElementById(\"modal-root\");\n\t\tif (!modalRoot) return null;\n\n\t\treturn ReactDOM.createPortal(\n\t\t\t<AnimatePresence>\n\t\t\t\t{isShow && (\n\t\t\t\t\t<LazyMotion features={() => import(\"framer-motion\").then((res) => res.domAnimation)}>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-overlay\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.fade}\n\t\t\t\t\t\t\t\tclassName={cn(\"fixed inset-0 z-50\", backdropVariants({ backdrop }), classNameOverlay)}\n\t\t\t\t\t\t\t\tonClick={onClickOutside}\n\t\t\t\t\t\t\t\taria-hidden={!isShow}\n\t\t\t\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\t\t\t\taria-modal=\"true\"\n\t\t\t\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\t\t\t\tref={modalOverlayRef}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<m.div\n\t\t\t\t\t\t\t\tkey=\"modal-content\"\n\t\t\t\t\t\t\t\tinitial=\"exit\"\n\t\t\t\t\t\t\t\tanimate=\"enter\"\n\t\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\t\tvariants={TRANSITION_VARIANTS.scaleInOut}\n\t\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\t\tid={modalId}\n\t\t\t\t\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\" z-50 w-full rounded-lg shadow-lg bg-content1\",\n placementVariants({ placement }),\n\t\t\t\t\t\t\t\t\tsizeVariants({ size }),\n\t\t\t\t\t\t\t\t\tradiusVariants({ radius }),\n\t\t\t\t\t\t\t\t\tshadowVariants({ shadow }),\n\t\t\t\t\t\t\t\t\tclassNameDialog,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tstyle={style}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={cn(\"modal-custom-content w-full flex flex-col max-h-[calc(100vh_-_4rem)]\", classNameContent)} style={styleContainer}>\n\t\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</m.div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t</LazyMotion>\n\t\t\t\t)}\n\t\t\t</AnimatePresence>,\n\t\t\tmodalRoot,\n\t\t);\n\t},\n);\nModal.displayName = \"ModalPortalComponent\";\n\nexport const ModalHeader = ({ title, showCloseButton = true, disabled = false, onClick, className, styled, children, ...props }: ModalHeaderType) => {\n\treturn (\n\t\t<div className={cn(\"modal-custom-header-container w-full\")} style={styled}>\n\t\t\t<div className={cn(\"w-full flex py-4 px-6 flex-initial text-large font-semibold\", className)} {...props}>\n\t\t\t\t{children || <header className=\"modal-custom-title text-lg leading-none font-semibold\">{title}</header>}\n\t\t\t</div>\n\n\t\t\t{showCloseButton && (\n\t\t\t\t<div className=\"absolute top-2.5 right-2.5 disabled:pointer-events-none z-10\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisIconOnly\n\t\t\t\t\t\tvariant=\"light\"\n\t\t\t\t\t\tradius=\"full\"\n\t\t\t\t\t\taria-label=\"Close\"\n\t\t\t\t\t\tonClick={onClick}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tclassName=\"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg width=\"20\" height=\"20\" fill=\"currentColor\" role=\"img\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t<path fill=\"none\" d=\"M0 0h21v21H0z\"></path>\n\t\t\t\t\t\t\t<path d=\"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z\"></path>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport const ModalBody = forwardRef(({ children, className = \"\", styled, height }: ModalBodyType, ref: Ref<HTMLDivElement>) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-body flex flex-1 flex-col gap-3 px-6 overflow-y-auto\", className)}\n\t\t\tref={ref}\n\t\t\tstyle={{ ...styled, height: height ? `${height}px` : \"auto\" }}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n});\nModalBody.displayName = \"ModalBodyPortalComponent\";\n\nexport const ModalFooter = ({ children, className, styled }: ModalFooterType) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"modal-custom-footer flex flex-col-reverse px-6 py-3 gap-2 sm:flex-row sm:justify-end mt-auto\", className)}\n\t\t\tstyle={styled}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n"],"names":["TRANSITION_EASINGS","TRANSITION_VARIANTS","backdropVariants","cva","sizeVariants","radiusVariants","placementVariants","shadowVariants","Modal","forwardRef","modalId","isShow","isVisible","children","style","classNameOverlay","styleContainer","onClickOutside","classNameDialog","classNameContent","backdrop","size","isKeyboardDismissDisabled","shadow","radius","placement","ref","modalOverlayRef","useRef","useEffect","handleKeyDown","e","modalRoot","ReactDOM","AnimatePresence","jsx","LazyMotion","res","jsxs","Fragment","m","cn","ModalHeader","title","showCloseButton","disabled","onClick","className","styled","props","Button","ModalBody","height","ModalFooter"],"mappings":";;;;;;;;AAgCO,MAAMA,IAAqB;AAAA,EACjC,MAAM,CAAC,MAAM,MAAM,KAAK,CAAC;AAO1B,GAaaC,IAAgC;AAAA,EAkE5C,YAAY;AAAA,IACX,OAAO;AAAA,MACN,WAAW;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,QACX,UAAU;AAAA,QACV,MAAMD,EAAmB;AAAA,MAAA;AAAA,IAC1B;AAAA,IAED,MAAM;AAAA,MACL,WAAW;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,QACX,UAAU;AAAA,QACV,MAAMA,EAAmB;AAAA,MAAA;AAAA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AAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWM,EAAG,qEAAqEM,CAAS;AAAA,IAC5F,KAAArB;AAAA,IACA,OAAO,EAAE,GAAGsB,GAAQ,QAAQI,IAAS,GAAGA,CAAM,OAAO,OAAA;AAAA,IAEpD,UAAAvC;AAAA,EAAA;AAAA,CAGH;AACDsC,EAAU,cAAc;AAEjB,MAAME,IAAc,CAAC,EAAE,UAAAxC,GAAU,WAAAkC,GAAW,QAAAC,QAEjDb,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACA,WAAWM,EAAG,iGAAiGM,CAAS;AAAA,IACxH,OAAOC;AAAA,IAEN,UAAAnC;AAAA,EAAA;AAAA;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "lizaui",
3
3
  "private": false,
4
4
  "license": "ISC",
5
- "version": "7.0.8",
5
+ "version": "7.0.9",
6
6
  "type": "module",
7
7
  "main": "dist/index.cjs.js",
8
8
  "module": "dist/index.es.js",