reaxify 0.0.98 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axios/useAxios.cjs.js +1 -1
- package/dist/axios/useAxios.es.js +7 -7
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.d.ts +2 -2
- package/dist/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/Accordion/index.es.js +78 -97
- package/dist/components/Alert/index.cjs.js +1 -1
- package/dist/components/Alert/index.d.ts +1 -6
- package/dist/components/Alert/index.d.ts.map +1 -1
- package/dist/components/Alert/index.es.js +111 -95
- package/dist/components/Avatar/index.cjs.js +1 -1
- package/dist/components/Avatar/index.d.ts.map +1 -1
- package/dist/components/Avatar/index.es.js +62 -55
- package/dist/components/Badge/index.cjs.js +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.es.js +33 -34
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.es.js +95 -98
- package/dist/components/ButtonGroup/index.cjs.js +1 -1
- package/dist/components/ButtonGroup/index.d.ts +0 -4
- package/dist/components/ButtonGroup/index.d.ts.map +1 -1
- package/dist/components/ButtonGroup/index.es.js +40 -37
- package/dist/components/Card/index.cjs.js +1 -1
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/index.es.js +48 -38
- package/dist/components/Collapse/index.cjs.js +1 -0
- package/dist/components/Collapse/index.d.ts +14 -0
- package/dist/components/Collapse/index.d.ts.map +1 -0
- package/dist/components/Collapse/index.es.js +56 -0
- package/dist/components/Divider/index.cjs.js +1 -1
- package/dist/components/Divider/index.d.ts.map +1 -1
- package/dist/components/Divider/index.es.js +16 -14
- package/dist/components/Drawer/index.cjs.js +1 -1
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.es.js +72 -56
- package/dist/components/Fill/index.cjs.js +1 -1
- package/dist/components/Fill/index.d.ts.map +1 -1
- package/dist/components/Fill/index.es.js +14 -8
- package/dist/components/InputGroup/index.cjs.js +1 -1
- package/dist/components/InputGroup/index.d.ts.map +1 -1
- package/dist/components/InputGroup/index.es.js +49 -38
- package/dist/components/Menu/index.cjs.js +1 -1
- package/dist/components/Menu/index.d.ts +3 -2
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.es.js +115 -99
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.es.js +83 -59
- package/dist/components/Portal/index.cjs.js +1 -1
- package/dist/components/Portal/index.d.ts.map +1 -1
- package/dist/components/Portal/index.es.js +5 -4
- package/dist/components/Progress/index.cjs.js +1 -1
- package/dist/components/Progress/index.d.ts +1 -1
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.es.js +27 -22
- package/dist/components/Skeleton/index.cjs.js +1 -1
- package/dist/components/Skeleton/index.d.ts.map +1 -1
- package/dist/components/Skeleton/index.es.js +8 -8
- package/dist/components/Spacer/index.cjs.js +1 -1
- package/dist/components/Spacer/index.d.ts.map +1 -1
- package/dist/components/Spacer/index.es.js +5 -5
- package/dist/components/Spinner/index.cjs.js +1 -1
- package/dist/components/Spinner/index.d.ts +3 -2
- package/dist/components/Spinner/index.d.ts.map +1 -1
- package/dist/components/Spinner/index.es.js +17 -16
- package/dist/components/Stack/index.cjs.js +1 -1
- package/dist/components/Stack/index.d.ts.map +1 -1
- package/dist/components/Stack/index.es.js +25 -24
- package/dist/components/Switch/index.cjs.js +1 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.es.js +17 -13
- package/dist/components/Table/index.cjs.js +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.es.js +72 -58
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.es.js +58 -48
- package/dist/components/Toggle/index.cjs.js +1 -0
- package/dist/components/Toggle/index.d.ts +48 -0
- package/dist/components/Toggle/index.d.ts.map +1 -0
- package/dist/components/Toggle/index.es.js +115 -0
- package/dist/components/Tooltip/index.cjs.js +1 -1
- package/dist/components/Tooltip/index.d.ts +16 -9
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.es.js +191 -114
- package/dist/components/Typography/index.cjs.js +1 -1
- package/dist/components/Typography/index.d.ts +2 -2
- package/dist/components/Typography/index.d.ts.map +1 -1
- package/dist/components/Typography/index.es.js +13 -12
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.es.js +48 -43
- package/dist/helpers/anchorPointer.cjs.js +1 -0
- package/dist/helpers/anchorPointer.d.ts +8 -0
- package/dist/helpers/anchorPointer.d.ts.map +1 -0
- package/dist/helpers/anchorPointer.es.js +12 -0
- package/dist/helpers/index.cjs.js +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.es.js +25 -22
- package/dist/hooks/index.cjs.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.es.js +6 -4
- package/dist/hooks/usePreventableClose.cjs.js +1 -0
- package/dist/hooks/usePreventableClose.d.ts +8 -0
- package/dist/hooks/usePreventableClose.d.ts.map +1 -0
- package/dist/hooks/usePreventableClose.es.js +21 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.es.js +1 -1
- package/dist/node_modules/prop-types/index.es.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.es.js +1 -1
- package/dist/providers/ThemeProvider.d.ts +13 -1
- package/dist/providers/ThemeProvider.d.ts.map +1 -1
- package/dist/providers/index.cjs.js +1 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.es.js +3 -2
- package/dist/stores/portalElement.cjs.js +1 -1
- package/dist/stores/portalElement.d.ts.map +1 -1
- package/dist/stores/portalElement.es.js +13 -9
- package/dist/style.css +1 -0
- package/package.json +7 -3
- package/dist/reaxify.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const i=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";const i=require("react/jsx-runtime"),n=require("react"),R=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),G=require("../Button/index.cjs.js"),J=require("../Portal/index.cjs.js"),W=require("../../hooks/useClasses.cjs.js"),K=require("../../helpers/anchorPointer.cjs.js"),Q=require("../../hooks/usePreventableClose.cjs.js"),U=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),V=require("../../helpers/cn.cjs.js"),y=n.createContext({open:!1,onClose:()=>{},transitionState:"unmounted",closeOnClick:!1,preventClose:!1,dismiss:()=>{},anchorPointer:!1});function I({as:l,ref:c,open:t,duration:u=300,onClose:o,onEnter:b,onEntering:M,onEntered:j,onExit:x,onExiting:P,onExited:k,closeOnClick:p=!1,preventClose:z=!1,anchorEl:g=null,anchorPointer:q=!1,className:S,children:H,...$}){const B=W(e=>e.menu.base),D=l||"ul",s=16,r=n.useRef(null),A=n.useRef({left:s,right:s,top:s}),F={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-90 opacity-0",exited:"scale-90 opacity-0",unmounted:""},O=n.useCallback(e=>{A.current=e},[]),E=n.useCallback(e=>{var w,h,C;(w=r.current)==null||w.style.setProperty("--left",`${e.left}px`),(h=r.current)==null||h.style.setProperty("--right",`${e.right}px`),(C=r.current)==null||C.style.setProperty("--top",`${e.top}px`)},[]),v=n.useCallback(()=>{var L,N;if(!t||!g)return;const e=window.innerWidth,w=window.innerHeight,h=((L=r.current)==null?void 0:L.offsetWidth)||150,C=((N=r.current)==null?void 0:N.offsetHeight)||200;let d,f,m;if(q){const a=K.getAnchorPointer(g);if(!a)return;d=a.x,f=e-a.x,m=a.y}else{const a=g.getBoundingClientRect();d=a.left,f=e-a.right,m=a.bottom}d=Math.min(Math.max(d,s),e-h-s),f=Math.min(Math.max(f,s),e-h-s),m=Math.min(Math.max(m,s),w-C-s),O({left:d,right:f,top:m}),E({left:d,right:f,top:m})},[t,g,q,O,E]),T=Q({preventClose:z,open:t,onClose:o});return n.useEffect(()=>{v()},[v,H]),n.useEffect(()=>{const e=()=>{v()};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[v]),n.useImperativeHandle(c,()=>r.current),i.jsx(J,{children:i.jsx(U.default,{nodeRef:r,in:t,timeout:u,unmountOnExit:!0,onEnter:b,onEntering:M,onEntered:j,onExit:x,onExiting:P,onExited:k,children:e=>i.jsx(y.Provider,{value:{open:t,onClose:o,dismiss:T,transitionState:e,closeOnClick:p,preventClose:z,anchorPointer:q},children:i.jsxs(X,{children:[i.jsx(Y,{}),i.jsx(D,{ref:r,autoFocus:!0,"data-open":t,role:"menu","data-name":"menu",style:{transitionDuration:`${u}ms`},className:R.twMerge("w-fit min-w-52 bg-white shadow-lg rounded py-2 transition-[scale,opacity] absolute top-(--top) left-(--left) right-auto origin-top-left rtl:left-auto rtl:right-(--right) rtl:origin-top-right",B,F[e],S),...$,children:H})]})})})})}function X({children:l}){const{transitionState:c}=n.useContext(y),t={entering:"active pointer-events-auto",entered:"active pointer-events-auto",exiting:"pointer-events-none",exited:"pointer-events-none",unmounted:""};return i.jsx("div",{"data-name":"menu-container",className:R.twMerge("fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",t[c]),children:l})}function Y(){const{dismiss:l,preventClose:c,anchorPointer:t}=n.useContext(y),u=o=>{t&&o.preventDefault()};return i.jsx("div",{"data-name":"menu-backdrop",className:V("w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",c&&"[&:active~*]:scale-95"),onContextMenu:u,onClick:l})}function Z({as:l,closeOnClick:c,className:t,children:u,onClick:o,...b}){const M=W(p=>p.menu.item.base),{closeOnClick:j,onClose:x}=n.useContext(y),P=c??j,k=p=>{P&&(x==null||x()),o==null||o(p)};return i.jsx(G,{as:l??"li",color:"light",variant:"text",role:"menuitem","data-name":"menu-item",className:R.twMerge("w-full flex items-center justify-start align-middle px-4 py-1.5 bg-transparent text-base font-normal rounded-none whitespace-nowrap transition-colors hover:bg-dark/5",M,t),onClick:k,...b,children:u})}I.Item=Z;module.exports=I;
|
|
@@ -2,14 +2,15 @@ import { ComponentPropsWithAs, ToggleEventProps, ToggleProps } from '../../types
|
|
|
2
2
|
import { ElementType } from 'react';
|
|
3
3
|
type MenuProps = {
|
|
4
4
|
anchorEl?: HTMLElement | null;
|
|
5
|
+
anchorPointer?: boolean;
|
|
5
6
|
closeOnClick?: boolean;
|
|
6
7
|
preventClose?: boolean;
|
|
7
8
|
duration?: number;
|
|
8
|
-
} & Partial<ToggleEventProps> & ToggleProps
|
|
9
|
+
} & Partial<ToggleEventProps> & Partial<ToggleProps>;
|
|
9
10
|
type MenuItemProps = {
|
|
10
11
|
closeOnClick?: boolean;
|
|
11
12
|
};
|
|
12
|
-
declare function Menu<E extends ElementType = "ul">({ as, ref, open, duration, onClose, onEnter, onEntering, onEntered, onExit, onExiting, onExited, closeOnClick, preventClose, anchorEl, className, children, ...props }: ComponentPropsWithAs<E, MenuProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function Menu<E extends ElementType = "ul">({ as, ref, open, duration, onClose, onEnter, onEntering, onEntered, onExit, onExiting, onExited, closeOnClick, preventClose, anchorEl, anchorPointer, className, children, ...props }: ComponentPropsWithAs<E, MenuProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
declare namespace Menu {
|
|
14
15
|
var Item: typeof MenuItem;
|
|
15
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EAEL,WAAW,EAOZ,MAAM,OAAO,CAAC;AAOf,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,gBAAgB,CAAC,GAC3B,OAAO,CAAC,WAAW,CAAC,CAAC;AACvB,KAAK,aAAa,GAAG;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAoBF,iBAAS,IAAI,CAAC,CAAC,SAAS,WAAW,GAAG,IAAI,EAAE,EAC1C,EAAE,EACF,GAAG,EACH,IAAI,EACJ,QAAc,EACd,OAAO,EACP,OAAO,EACP,UAAU,EACV,SAAS,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,YAAoB,EACpB,QAAe,EACf,aAAqB,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,EAAE,SAAS,CAAC,2CAmIpC;kBAtJQ,IAAI;;;AA6Lb,iBAAS,QAAQ,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,EAAE,EAClD,EAAE,EACF,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,EAAE,aAAa,CAAC,2CA0BxC;AAID,eAAe,IAAI,CAAC"}
|
|
@@ -1,121 +1,131 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
2
|
+
import { jsx as r, jsxs as K } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as E, useCallback as H, useEffect as I, useImperativeHandle as Q, createContext as U, useContext as O } from "react";
|
|
4
|
+
import { twMerge as R } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
5
|
+
import V from "../Button/index.es.js";
|
|
6
|
+
import X from "../Portal/index.es.js";
|
|
7
|
+
import S from "../../hooks/useClasses.es.js";
|
|
8
|
+
import { getAnchorPointer as Y } from "../../helpers/anchorPointer.es.js";
|
|
9
|
+
import Z from "../../hooks/usePreventableClose.es.js";
|
|
10
|
+
import _ from "../../node_modules/react-transition-group/esm/Transition.es.js";
|
|
11
|
+
import tt from "../../helpers/cn.es.js";
|
|
12
|
+
const y = U({
|
|
12
13
|
open: !1,
|
|
13
14
|
onClose: () => {
|
|
14
15
|
},
|
|
15
16
|
transitionState: "unmounted",
|
|
16
17
|
closeOnClick: !1,
|
|
17
|
-
preventClose: !1
|
|
18
|
+
preventClose: !1,
|
|
19
|
+
dismiss: () => {
|
|
20
|
+
},
|
|
21
|
+
anchorPointer: !1
|
|
18
22
|
});
|
|
19
|
-
function
|
|
20
|
-
as:
|
|
23
|
+
function et({
|
|
24
|
+
as: a,
|
|
21
25
|
ref: l,
|
|
22
26
|
open: e,
|
|
23
|
-
duration:
|
|
27
|
+
duration: c = 300,
|
|
24
28
|
onClose: o,
|
|
25
|
-
onEnter:
|
|
26
|
-
onEntering:
|
|
27
|
-
onEntered:
|
|
28
|
-
onExit:
|
|
29
|
-
onExiting:
|
|
30
|
-
onExited:
|
|
31
|
-
closeOnClick:
|
|
32
|
-
preventClose:
|
|
33
|
-
anchorEl:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
onEnter: C,
|
|
30
|
+
onEntering: b,
|
|
31
|
+
onEntered: M,
|
|
32
|
+
onExit: d,
|
|
33
|
+
onExiting: P,
|
|
34
|
+
onExited: k,
|
|
35
|
+
closeOnClick: p = !1,
|
|
36
|
+
preventClose: L = !1,
|
|
37
|
+
anchorEl: h = null,
|
|
38
|
+
anchorPointer: z = !1,
|
|
39
|
+
className: D,
|
|
40
|
+
children: N,
|
|
41
|
+
...A
|
|
37
42
|
}) {
|
|
38
|
-
const
|
|
43
|
+
const F = S((t) => t.menu.base), T = a || "ul", n = 16, i = E(null), q = E({
|
|
39
44
|
left: n,
|
|
40
45
|
right: n,
|
|
41
46
|
top: n
|
|
42
|
-
}),
|
|
47
|
+
}), G = {
|
|
43
48
|
entering: "scale-100 opacity-100",
|
|
44
49
|
entered: "scale-100 opacity-100",
|
|
45
50
|
exiting: "scale-90 opacity-0",
|
|
46
51
|
exited: "scale-90 opacity-0",
|
|
47
52
|
unmounted: ""
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
}, []),
|
|
51
|
-
var
|
|
52
|
-
(
|
|
53
|
-
}, []),
|
|
54
|
-
var
|
|
55
|
-
if (!e || !
|
|
56
|
-
const t =
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
}, W = H((t) => {
|
|
54
|
+
q.current = t;
|
|
55
|
+
}, []), $ = H((t) => {
|
|
56
|
+
var v, g, w;
|
|
57
|
+
(v = i.current) == null || v.style.setProperty("--left", `${t.left}px`), (g = i.current) == null || g.style.setProperty("--right", `${t.right}px`), (w = i.current) == null || w.style.setProperty("--top", `${t.top}px`);
|
|
58
|
+
}, []), x = H(() => {
|
|
59
|
+
var j, B;
|
|
60
|
+
if (!e || !h) return;
|
|
61
|
+
const t = window.innerWidth, v = window.innerHeight, g = ((j = i.current) == null ? void 0 : j.offsetWidth) || 150, w = ((B = i.current) == null ? void 0 : B.offsetHeight) || 200;
|
|
62
|
+
let u, m, f;
|
|
63
|
+
if (z) {
|
|
64
|
+
const s = Y(h);
|
|
65
|
+
if (!s) return;
|
|
66
|
+
u = s.x, m = t - s.x, f = s.y;
|
|
67
|
+
} else {
|
|
68
|
+
const s = h.getBoundingClientRect();
|
|
69
|
+
u = s.left, m = t - s.right, f = s.bottom;
|
|
70
|
+
}
|
|
71
|
+
u = Math.min(Math.max(u, n), t - g - n), m = Math.min(
|
|
72
|
+
Math.max(m, n),
|
|
73
|
+
t - g - n
|
|
74
|
+
), f = Math.min(Math.max(f, n), v - w - n), W({ left: u, right: m, top: f }), $({ left: u, right: m, top: f });
|
|
75
|
+
}, [e, h, z, W, $]), J = Z({ preventClose: L, open: e, onClose: o });
|
|
76
|
+
return I(() => {
|
|
77
|
+
x();
|
|
78
|
+
}, [x, N]), I(() => {
|
|
68
79
|
const t = () => {
|
|
69
|
-
|
|
80
|
+
x();
|
|
70
81
|
};
|
|
71
82
|
return window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
72
83
|
window.removeEventListener("scroll", t), window.removeEventListener("resize", t);
|
|
73
84
|
};
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
ignoreInputs: !0,
|
|
77
|
-
enabled: e && !M
|
|
78
|
-
}), /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(
|
|
79
|
-
Z,
|
|
85
|
+
}, [x]), Q(l, () => i.current), /* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(
|
|
86
|
+
_,
|
|
80
87
|
{
|
|
81
88
|
nodeRef: i,
|
|
82
89
|
in: e,
|
|
83
|
-
timeout:
|
|
90
|
+
timeout: c,
|
|
84
91
|
unmountOnExit: !0,
|
|
85
|
-
onEnter:
|
|
86
|
-
onEntering:
|
|
87
|
-
onEntered:
|
|
88
|
-
onExit:
|
|
89
|
-
onExiting:
|
|
90
|
-
onExited:
|
|
92
|
+
onEnter: C,
|
|
93
|
+
onEntering: b,
|
|
94
|
+
onEntered: M,
|
|
95
|
+
onExit: d,
|
|
96
|
+
onExiting: P,
|
|
97
|
+
onExited: k,
|
|
91
98
|
children: (t) => /* @__PURE__ */ r(
|
|
92
|
-
|
|
99
|
+
y.Provider,
|
|
93
100
|
{
|
|
94
101
|
value: {
|
|
95
102
|
open: e,
|
|
96
|
-
onClose:
|
|
103
|
+
onClose: o,
|
|
104
|
+
dismiss: J,
|
|
97
105
|
transitionState: t,
|
|
98
|
-
closeOnClick:
|
|
99
|
-
preventClose:
|
|
106
|
+
closeOnClick: p,
|
|
107
|
+
preventClose: L,
|
|
108
|
+
anchorPointer: z
|
|
100
109
|
},
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */ r(
|
|
110
|
+
children: /* @__PURE__ */ K(nt, { children: [
|
|
111
|
+
/* @__PURE__ */ r(ot, {}),
|
|
103
112
|
/* @__PURE__ */ r(
|
|
104
|
-
|
|
113
|
+
T,
|
|
105
114
|
{
|
|
106
115
|
ref: i,
|
|
107
116
|
autoFocus: !0,
|
|
108
117
|
"data-open": e,
|
|
109
118
|
role: "menu",
|
|
110
|
-
|
|
111
|
-
|
|
119
|
+
"data-name": "menu",
|
|
120
|
+
style: { transitionDuration: `${c}ms` },
|
|
121
|
+
className: R(
|
|
112
122
|
"w-fit min-w-52 bg-white shadow-lg rounded py-2 transition-[scale,opacity] absolute top-(--top) left-(--left) right-auto origin-top-left rtl:left-auto rtl:right-(--right) rtl:origin-top-right",
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
123
|
+
F,
|
|
124
|
+
G[t],
|
|
125
|
+
D
|
|
116
126
|
),
|
|
117
|
-
...
|
|
118
|
-
children:
|
|
127
|
+
...A,
|
|
128
|
+
children: N
|
|
119
129
|
}
|
|
120
130
|
)
|
|
121
131
|
] })
|
|
@@ -124,12 +134,13 @@ function _({
|
|
|
124
134
|
}
|
|
125
135
|
) });
|
|
126
136
|
}
|
|
127
|
-
function
|
|
128
|
-
const { transitionState: l } =
|
|
137
|
+
function nt({ children: a }) {
|
|
138
|
+
const { transitionState: l } = O(y);
|
|
129
139
|
return /* @__PURE__ */ r(
|
|
130
140
|
"div",
|
|
131
141
|
{
|
|
132
|
-
|
|
142
|
+
"data-name": "menu-container",
|
|
143
|
+
className: R(
|
|
133
144
|
"fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",
|
|
134
145
|
{
|
|
135
146
|
entering: "active pointer-events-auto",
|
|
@@ -139,53 +150,58 @@ function tt({ children: s }) {
|
|
|
139
150
|
unmounted: ""
|
|
140
151
|
}[l]
|
|
141
152
|
),
|
|
142
|
-
children:
|
|
153
|
+
children: a
|
|
143
154
|
}
|
|
144
155
|
);
|
|
145
156
|
}
|
|
146
|
-
function
|
|
147
|
-
const {
|
|
157
|
+
function ot() {
|
|
158
|
+
const { dismiss: a, preventClose: l, anchorPointer: e } = O(y), c = (o) => {
|
|
159
|
+
e && o.preventDefault();
|
|
160
|
+
};
|
|
148
161
|
return /* @__PURE__ */ r(
|
|
149
162
|
"div",
|
|
150
163
|
{
|
|
151
|
-
|
|
164
|
+
"data-name": "menu-backdrop",
|
|
165
|
+
className: tt(
|
|
152
166
|
"w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",
|
|
153
167
|
l && "[&:active~*]:scale-95"
|
|
154
168
|
),
|
|
155
|
-
|
|
169
|
+
onContextMenu: c,
|
|
170
|
+
onClick: a
|
|
156
171
|
}
|
|
157
172
|
);
|
|
158
173
|
}
|
|
159
|
-
function
|
|
160
|
-
as:
|
|
174
|
+
function it({
|
|
175
|
+
as: a,
|
|
161
176
|
closeOnClick: l,
|
|
162
177
|
className: e,
|
|
163
|
-
children:
|
|
178
|
+
children: c,
|
|
164
179
|
onClick: o,
|
|
165
|
-
...
|
|
180
|
+
...C
|
|
166
181
|
}) {
|
|
167
|
-
const
|
|
168
|
-
|
|
182
|
+
const b = S((p) => p.menu.item.base), { closeOnClick: M, onClose: d } = O(y), P = l ?? M, k = (p) => {
|
|
183
|
+
P && (d == null || d()), o == null || o(p);
|
|
169
184
|
};
|
|
170
185
|
return /* @__PURE__ */ r(
|
|
171
|
-
|
|
186
|
+
V,
|
|
172
187
|
{
|
|
173
|
-
as:
|
|
188
|
+
as: a ?? "li",
|
|
174
189
|
color: "light",
|
|
175
190
|
variant: "text",
|
|
176
191
|
role: "menuitem",
|
|
177
|
-
|
|
192
|
+
"data-name": "menu-item",
|
|
193
|
+
className: R(
|
|
178
194
|
"w-full flex items-center justify-start align-middle px-4 py-1.5 bg-transparent text-base font-normal rounded-none whitespace-nowrap transition-colors hover:bg-dark/5",
|
|
179
|
-
|
|
195
|
+
b,
|
|
180
196
|
e
|
|
181
197
|
),
|
|
182
|
-
onClick:
|
|
183
|
-
...
|
|
184
|
-
children:
|
|
198
|
+
onClick: k,
|
|
199
|
+
...C,
|
|
200
|
+
children: c
|
|
185
201
|
}
|
|
186
202
|
);
|
|
187
203
|
}
|
|
188
|
-
|
|
204
|
+
et.Item = it;
|
|
189
205
|
export {
|
|
190
|
-
|
|
206
|
+
et as default
|
|
191
207
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),i=require("react"),z=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),m=require("../Card/index.cjs.js"),k=require("../Portal/index.cjs.js"),r=require("../../hooks/useClasses.cjs.js"),D=require("../../hooks/usePreventableClose.cjs.js"),H=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),x=require("../../helpers/cn.cjs.js"),j=i.createContext({size:"md",open:!1,onClose:()=>{},transitionState:"unmounted",duration:300,preventClose:!1,dismiss:()=>{}});function l({as:t,ref:a,size:n="md",open:e=!1,onClose:s=()=>{},onEnter:f,onEntering:p,onEntered:b,onExit:v,onExiting:d,onExited:c,duration:g=300,preventClose:y=!1,className:C,children:h,...w}){const N=r(u=>u.modal.base),M=i.useRef(null),S=t||"div",R={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""},q=D({preventClose:y,open:e,onClose:s});return i.useImperativeHandle(a,()=>M.current),o.jsx(k,{children:o.jsx(H.default,{nodeRef:M,in:e,timeout:g,unmountOnExit:!0,onEnter:f,onEntering:p,onEntered:b,onExit:v,onExiting:d,onExited:c,children:u=>o.jsxs(S,{ref:M,"data-open":e,role:"dialog","data-name":"modal",style:{transitionDuration:`${g}ms`},className:z.twMerge("modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",N,R[u],C),...w,children:[o.jsx("div",{"data-name":"modal-backdrop",onClick:q,className:x("absolute inset-0 cursor-default opacity-0",y&&"[&:active~*]:scale-95")}),o.jsx(j.Provider,{value:{size:n,open:e,onClose:s,dismiss:q,transitionState:u,duration:g,preventClose:y},children:h})]})})})}function B({className:t,children:a,...n}){const e=r(d=>d.modal.dialog),{size:s,transitionState:f,duration:p}=i.useContext(j),b={entering:"scale-100",entered:"scale-100",exiting:"scale-75",exited:"scale-75",unmounted:""},v=i.useMemo(()=>{var c;return[{sm:"min-[576px]:w-[300px]",md:"min-[576px]:w-[500px]",lg:"min-[992px]:w-[800px]"}[s],(c=e==null?void 0:e.size)==null?void 0:c[s]]},[s,e==null?void 0:e.size]);return o.jsx(m,{as:"div","data-name":"modal-dialog",style:{transitionDuration:`${p}ms`},className:z.twMerge("max-w-full max-h-full m-auto transition-transform",e==null?void 0:e.base,v,b[f],t),...n,children:a})}function F({className:t,...a}){const n=r(e=>e.modal.header.base);return o.jsx(m.Header,{"data-name":"modal-header",className:x(n,t),...a})}function P({className:t,...a}){const n=r(e=>e.modal.body.base);return o.jsx(m.Body,{"data-name":"modal-body",className:x(n,t),...a})}function $({className:t,...a}){const n=r(e=>e.modal.footer.base);return o.jsx(m.Footer,{"data-name":"modal-footer",className:x(n,t),...a})}l.Dialog=B;l.Header=F;l.Body=P;l.Footer=$;exports.ModalContext=j;exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,IAAI,EACJ,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,IAAI,EACJ,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,cAAc,EAEd,WAAW,EAKZ,MAAM,OAAO,CAAC;AACf,OAAO,EAAc,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAKtE,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,IAAI,CAAC;IACX,eAAe,EAAE,gBAAgB,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,YAAY,CAAC;CACvB,GAAG,WAAW,CAAC;AAChB,KAAK,UAAU,GAAG;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,OAAO,CAAC,gBAAgB,CAAC,GAC3B,OAAO,CAAC,WAAW,CAAC,CAAC;AACvB,KAAK,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC;AAClE,KAAK,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC9C,KAAK,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC5C,KAAK,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE9C,eAAO,MAAM,YAAY,kCAQvB,CAAC;AAEH,iBAAS,KAAK,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAC5C,EAAE,EACF,GAAG,EACH,IAAW,EACX,IAAY,EACZ,OAAkB,EAClB,OAAO,EACP,UAAU,EACV,SAAS,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAc,EACd,YAAoB,EACpB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,EAAE,UAAU,CAAC,2CAoErC;kBArFQ,KAAK;;;;;;AAsFd,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAmCvE;AACD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAS7D;AACD,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CASzD;AACD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAS7D;AAOD,eAAe,KAAK,CAAC"}
|
|
@@ -1,101 +1,103 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
import s from "../../hooks/useClasses.es.js";
|
|
5
|
-
import { createContext as S, useRef as F, useImperativeHandle as R, useContext as j, useMemo as E } from "react";
|
|
6
|
-
import { useHotkey as I } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
|
|
2
|
+
import { jsx as n, jsxs as S } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as B, useRef as F, useImperativeHandle as P, useContext as R, useMemo as j } from "react";
|
|
7
4
|
import { twMerge as C } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
5
|
+
import m from "../Card/index.es.js";
|
|
6
|
+
import $ from "../Portal/index.es.js";
|
|
7
|
+
import i from "../../hooks/useClasses.es.js";
|
|
8
|
+
import E from "../../hooks/usePreventableClose.es.js";
|
|
9
|
+
import I from "../../node_modules/react-transition-group/esm/Transition.es.js";
|
|
10
|
+
import c from "../../helpers/cn.es.js";
|
|
11
|
+
const M = B({
|
|
12
12
|
size: "md",
|
|
13
13
|
open: !1,
|
|
14
14
|
onClose: () => {
|
|
15
15
|
},
|
|
16
16
|
transitionState: "unmounted",
|
|
17
|
-
duration: 300
|
|
17
|
+
duration: 300,
|
|
18
|
+
preventClose: !1,
|
|
19
|
+
dismiss: () => {
|
|
20
|
+
}
|
|
18
21
|
});
|
|
19
22
|
function u({
|
|
20
23
|
as: t,
|
|
21
24
|
ref: o,
|
|
22
|
-
size:
|
|
25
|
+
size: a = "md",
|
|
23
26
|
open: e = !1,
|
|
24
|
-
onClose:
|
|
27
|
+
onClose: s = () => {
|
|
25
28
|
},
|
|
26
29
|
onEnter: f,
|
|
27
30
|
onEntering: p,
|
|
28
31
|
onEntered: x,
|
|
29
|
-
onExit:
|
|
32
|
+
onExit: b,
|
|
30
33
|
onExiting: r,
|
|
31
34
|
onExited: l,
|
|
32
|
-
duration:
|
|
33
|
-
preventClose:
|
|
35
|
+
duration: v = 300,
|
|
36
|
+
preventClose: y = !1,
|
|
34
37
|
className: h,
|
|
35
|
-
children:
|
|
36
|
-
...
|
|
38
|
+
children: N,
|
|
39
|
+
...w
|
|
37
40
|
}) {
|
|
38
|
-
const
|
|
41
|
+
const k = i((d) => d.modal.base), g = F(null), D = t || "div", H = {
|
|
39
42
|
entering: "active opacity-100 pointer-events-auto",
|
|
40
43
|
entered: "active opacity-100 pointer-events-auto",
|
|
41
44
|
exiting: "opacity-0 pointer-events-none",
|
|
42
45
|
exited: "opacity-0 pointer-events-none",
|
|
43
46
|
unmounted: ""
|
|
44
|
-
}, z = (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return R(o, () => g.current), I("Escape", () => i(), {
|
|
48
|
-
conflictBehavior: "allow",
|
|
49
|
-
ignoreInputs: !0,
|
|
50
|
-
enabled: e && !b
|
|
51
|
-
}), /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(
|
|
52
|
-
$,
|
|
47
|
+
}, z = E({ preventClose: y, open: e, onClose: s });
|
|
48
|
+
return P(o, () => g.current), /* @__PURE__ */ n($, { children: /* @__PURE__ */ n(
|
|
49
|
+
I,
|
|
53
50
|
{
|
|
54
51
|
nodeRef: g,
|
|
55
52
|
in: e,
|
|
56
|
-
timeout:
|
|
53
|
+
timeout: v,
|
|
57
54
|
unmountOnExit: !0,
|
|
58
55
|
onEnter: f,
|
|
59
56
|
onEntering: p,
|
|
60
57
|
onEntered: x,
|
|
61
|
-
onExit:
|
|
58
|
+
onExit: b,
|
|
62
59
|
onExiting: r,
|
|
63
60
|
onExited: l,
|
|
64
|
-
children: (
|
|
65
|
-
|
|
61
|
+
children: (d) => /* @__PURE__ */ S(
|
|
62
|
+
D,
|
|
66
63
|
{
|
|
67
64
|
ref: g,
|
|
68
65
|
"data-open": e,
|
|
69
|
-
|
|
66
|
+
role: "dialog",
|
|
67
|
+
"data-name": "modal",
|
|
68
|
+
style: { transitionDuration: `${v}ms` },
|
|
70
69
|
className: C(
|
|
71
70
|
"modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
k,
|
|
72
|
+
H[d],
|
|
74
73
|
h
|
|
75
74
|
),
|
|
76
|
-
...
|
|
75
|
+
...w,
|
|
77
76
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ n(
|
|
79
78
|
"div",
|
|
80
79
|
{
|
|
80
|
+
"data-name": "modal-backdrop",
|
|
81
81
|
onClick: z,
|
|
82
|
-
className:
|
|
82
|
+
className: c(
|
|
83
83
|
"absolute inset-0 cursor-default opacity-0",
|
|
84
|
-
|
|
84
|
+
y && "[&:active~*]:scale-95"
|
|
85
85
|
)
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ n(
|
|
89
89
|
M.Provider,
|
|
90
90
|
{
|
|
91
91
|
value: {
|
|
92
|
-
size:
|
|
92
|
+
size: a,
|
|
93
93
|
open: e,
|
|
94
|
-
onClose:
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
onClose: s,
|
|
95
|
+
dismiss: z,
|
|
96
|
+
transitionState: d,
|
|
97
|
+
duration: v,
|
|
98
|
+
preventClose: y
|
|
97
99
|
},
|
|
98
|
-
children:
|
|
100
|
+
children: N
|
|
99
101
|
}
|
|
100
102
|
)
|
|
101
103
|
]
|
|
@@ -104,49 +106,71 @@ function u({
|
|
|
104
106
|
}
|
|
105
107
|
) });
|
|
106
108
|
}
|
|
107
|
-
function O({ className: t, children: o, ...
|
|
108
|
-
const e =
|
|
109
|
+
function O({ className: t, children: o, ...a }) {
|
|
110
|
+
const e = i((r) => r.modal.dialog), { size: s, transitionState: f, duration: p } = R(M), x = {
|
|
109
111
|
entering: "scale-100",
|
|
110
112
|
entered: "scale-100",
|
|
111
113
|
exiting: "scale-75",
|
|
112
114
|
exited: "scale-75",
|
|
113
115
|
unmounted: ""
|
|
114
|
-
},
|
|
116
|
+
}, b = j(() => {
|
|
115
117
|
var l;
|
|
116
118
|
return [{
|
|
117
119
|
sm: "min-[576px]:w-[300px]",
|
|
118
120
|
md: "min-[576px]:w-[500px]",
|
|
119
121
|
lg: "min-[992px]:w-[800px]"
|
|
120
|
-
}[
|
|
121
|
-
}, [
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
|
|
122
|
+
}[s], (l = e == null ? void 0 : e.size) == null ? void 0 : l[s]];
|
|
123
|
+
}, [s, e == null ? void 0 : e.size]);
|
|
124
|
+
return /* @__PURE__ */ n(
|
|
125
|
+
m,
|
|
124
126
|
{
|
|
125
127
|
as: "div",
|
|
128
|
+
"data-name": "modal-dialog",
|
|
126
129
|
style: { transitionDuration: `${p}ms` },
|
|
127
130
|
className: C(
|
|
128
131
|
"max-w-full max-h-full m-auto transition-transform",
|
|
129
132
|
e == null ? void 0 : e.base,
|
|
130
|
-
|
|
133
|
+
b,
|
|
131
134
|
x[f],
|
|
132
135
|
t
|
|
133
136
|
),
|
|
134
|
-
...
|
|
137
|
+
...a,
|
|
135
138
|
children: o
|
|
136
139
|
}
|
|
137
140
|
);
|
|
138
141
|
}
|
|
139
142
|
function T({ className: t, ...o }) {
|
|
140
|
-
const
|
|
141
|
-
return /* @__PURE__ */
|
|
143
|
+
const a = i((e) => e.modal.header.base);
|
|
144
|
+
return /* @__PURE__ */ n(
|
|
145
|
+
m.Header,
|
|
146
|
+
{
|
|
147
|
+
"data-name": "modal-header",
|
|
148
|
+
className: c(a, t),
|
|
149
|
+
...o
|
|
150
|
+
}
|
|
151
|
+
);
|
|
142
152
|
}
|
|
143
153
|
function q({ className: t, ...o }) {
|
|
144
|
-
const
|
|
145
|
-
return /* @__PURE__ */
|
|
154
|
+
const a = i((e) => e.modal.body.base);
|
|
155
|
+
return /* @__PURE__ */ n(
|
|
156
|
+
m.Body,
|
|
157
|
+
{
|
|
158
|
+
"data-name": "modal-body",
|
|
159
|
+
className: c(a, t),
|
|
160
|
+
...o
|
|
161
|
+
}
|
|
162
|
+
);
|
|
146
163
|
}
|
|
147
164
|
function A({ className: t, ...o }) {
|
|
148
|
-
const
|
|
149
|
-
return /* @__PURE__ */
|
|
165
|
+
const a = i((e) => e.modal.footer.base);
|
|
166
|
+
return /* @__PURE__ */ n(
|
|
167
|
+
m.Footer,
|
|
168
|
+
{
|
|
169
|
+
"data-name": "modal-footer",
|
|
170
|
+
className: c(a, t),
|
|
171
|
+
...o
|
|
172
|
+
}
|
|
173
|
+
);
|
|
150
174
|
}
|
|
151
175
|
u.Dialog = O;
|
|
152
176
|
u.Header = T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const n=require("react"),c=require("react-dom"),t=require("../../stores/portalElement.cjs.js");function o({children:r}){const e=n.useSyncExternalStore(t.subscribe,t.getElement,void 0);return e?c.createPortal(r,e):null}module.exports=o;
|