reaxify 0.0.89 → 0.0.91
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/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.es.js +24 -24
- package/dist/components/Badge/index.cjs.js +1 -1
- package/dist/components/Badge/index.es.js +1 -1
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.es.js +46 -44
- package/dist/components/ButtonGroup/index.cjs.js +1 -1
- package/dist/components/ButtonGroup/index.d.ts.map +1 -1
- package/dist/components/ButtonGroup/index.es.js +21 -23
- package/dist/components/Card/index.cjs.js +1 -1
- package/dist/components/Card/index.es.js +25 -25
- package/dist/components/Divider/index.cjs.js +1 -0
- package/dist/components/Divider/index.d.ts +13 -0
- package/dist/components/Divider/index.d.ts.map +1 -0
- package/dist/components/Divider/index.es.js +47 -0
- package/dist/components/Drawer/index.cjs.js +1 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.es.js +23 -24
- package/dist/components/InputGroup/index.cjs.js +1 -1
- package/dist/components/InputGroup/index.es.js +19 -19
- package/dist/components/Menu/index.cjs.js +1 -1
- package/dist/components/Menu/index.d.ts +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.es.js +66 -61
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.es.js +8 -9
- 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 +35 -35
- package/dist/components/Table/index.cjs.js +1 -1
- package/dist/components/Table/index.es.js +1 -1
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.d.ts +10 -5
- package/dist/components/Tabs/index.d.ts.map +1 -1
- package/dist/components/Tabs/index.es.js +64 -48
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.es.js +36 -34
- package/dist/hooks/useCreateRipple.cjs.js +1 -1
- package/dist/hooks/useCreateRipple.d.ts.map +1 -1
- package/dist/hooks/useCreateRipple.es.js +2 -2
- package/dist/providers/ThemeProvider.d.ts +12 -3
- package/dist/providers/ThemeProvider.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),x=require("../../hooks/useClasses.cjs.js"),i=require("react"),R=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),C=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),w=require("../../helpers/cn.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),x=require("../../hooks/useClasses.cjs.js"),i=require("react"),R=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),C=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),w=require("../../helpers/cn.cjs.js"),v=require("../Card/index.cjs.js"),H=require("../Portal/index.cjs.js"),N=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),p=i.createContext({open:!1,onClose:()=>{},duration:300,anchor:"start",transitionState:"unmounted",preventClose:!1});function f({as:n,ref:a,open:r=!1,onClose:e=()=>{},duration:o=300,preventClose:u=!1,anchor:l="end",className:y="",children:b,...h}){const t=x(c=>c.drawer),d=i.useRef(null),m=n||"div",M={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=i.useMemo(()=>{var j;const c={start:"flex-row-reverse",end:"flex-row",top:"flex-col-reverse",bottom:"flex-col"},D=(j=t==null?void 0:t.anchor)==null?void 0:j[l];return[c[l],D]},[l,t==null?void 0:t.anchor]),g=()=>{u||e()};return i.useImperativeHandle(a,()=>d.current),R.useHotkey("Escape",()=>e(),{enabled:r&&!u}),s.jsx(H,{children:s.jsx(N.default,{nodeRef:d,in:r,timeout:o,unmountOnExit:!0,children:c=>s.jsxs(m,{ref:d,style:{transitionDuration:`${o}ms`},"data-open":r,className:C.twMerge("fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",t==null?void 0:t.base,M[c],q,y),...h,children:[s.jsx("div",{onClick:g,className:w("absolute inset-0 size-full cursor-default opacity-0",u&&"[&:active~*]:scale-95")}),s.jsx(p.Provider,{value:{open:r,onClose:g,transitionState:c,duration:o,anchor:l,preventClose:u},children:b})]})})})}function k({children:n,className:a="",...r}){const e=x(t=>t.drawer.menu),{anchor:o,duration:u,transitionState:l,preventClose:y}=i.useContext(p),b=i.useMemo(()=>{var m;const t={start:"w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",end:"w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",top:"w-full max-h-[92.5%] rounded-b mb-auto",bottom:"w-full max-h-[92.5%] rounded-t mt-auto"},d=(m=e==null?void 0:e.anchor)==null?void 0:m[o];return[t[o],d]},[o,e==null?void 0:e.anchor]),h=i.useMemo(()=>({start:{entering:"translate-x-0",entered:"translate-x-0",exiting:"-translate-x-[calc(100%*var(--drawer-ratio))]",exited:"-translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},end:{entering:"translate-x-0",entered:"translate-x-0",exiting:"translate-x-[calc(100%*var(--drawer-ratio))]",exited:"translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},top:{entering:"translate-y-0",entered:"translate-y-0",exiting:"-translate-y-full",exited:"-translate-y-full",unmounted:""},bottom:{entering:"translate-y-0",entered:"translate-y-0",exiting:"translate-y-full",exited:"translate-y-full",unmounted:""}})[o],[o]);return s.jsx(v,{as:"div",style:{transitionDuration:`${u}ms`},className:C.twMerge("relative flex flex-col transition-[translate,width] rounded-none",y&&"transition-transform",e==null?void 0:e.base,h[l],b,a),...r,children:n})}function S({className:n,...a}){const r=x(e=>e.drawer.header.base);return s.jsx(v.Header,{className:w(r,n),...a})}function z({className:n,...a}){const r=x(e=>e.drawer.body.base);return s.jsx(v.Body,{className:w("flex-1 overflow-auto",r,n),...a})}function B({className:n,...a}){const r=x(e=>e.drawer.footer.base);return s.jsx(v.Footer,{className:w(r,n),...a})}f.Menu=k;f.Header=S;f.Body=z;f.Footer=B;exports.DrawerContext=p;exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG5D,OAAO,EACL,cAAc,EAEd,WAAW,EAKZ,MAAM,OAAO,CAAC;AACf,OAAO,EAAc,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAMtE,KAAK,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AACjD,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,gBAAgB,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;CACvB,GAAG,WAAW,CAAC;AAChB,KAAK,eAAe,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACzB,KAAK,WAAW,CAAC,CAAC,SAAS,WAAW,IAAI,oBAAoB,CAC5D,CAAC,EACD,eAAe,CAChB,CAAC;AACF,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC;AACjE,KAAK,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC7C,KAAK,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAG/C,eAAO,MAAM,aAAa,kCAOxB,CAAC;AAEH,iBAAS,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAC7C,EAAE,EACF,GAAG,EACH,IAAY,EACZ,OAAkB,EAClB,QAAc,EACd,YAAoB,EACpB,MAAc,EACd,SAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG5D,OAAO,EACL,cAAc,EAEd,WAAW,EAKZ,MAAM,OAAO,CAAC;AACf,OAAO,EAAc,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAMtE,KAAK,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AACjD,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,gBAAgB,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;CACvB,GAAG,WAAW,CAAC;AAChB,KAAK,eAAe,GAAG;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACzB,KAAK,WAAW,CAAC,CAAC,SAAS,WAAW,IAAI,oBAAoB,CAC5D,CAAC,EACD,eAAe,CAChB,CAAC;AACF,KAAK,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC;AACjE,KAAK,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC7C,KAAK,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAG/C,eAAO,MAAM,aAAa,kCAOxB,CAAC;AAEH,iBAAS,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAC7C,EAAE,EACF,GAAG,EACH,IAAY,EACZ,OAAkB,EAClB,QAAc,EACd,YAAoB,EACpB,MAAc,EACd,SAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,CAAC,CAAC,2CAqEhB;kBAhFQ,MAAM;;;;;;AAiFf,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAc,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAgE1E;AACD,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAG/D;AACD,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAQ3D;AACD,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAG/D;AAOD,eAAe,MAAM,CAAC"}
|
|
@@ -21,16 +21,16 @@ function w({
|
|
|
21
21
|
as: n,
|
|
22
22
|
ref: a,
|
|
23
23
|
open: r = !1,
|
|
24
|
-
onClose:
|
|
24
|
+
onClose: e = () => {
|
|
25
25
|
},
|
|
26
26
|
duration: o = 300,
|
|
27
27
|
preventClose: i = !1,
|
|
28
28
|
anchor: l = "end",
|
|
29
29
|
className: p = "",
|
|
30
|
-
children:
|
|
31
|
-
...
|
|
30
|
+
children: v,
|
|
31
|
+
...y
|
|
32
32
|
}) {
|
|
33
|
-
const
|
|
33
|
+
const t = c((u) => u.drawer), d = z(null), m = n || "div", R = {
|
|
34
34
|
entering: "active opacity-100 pointer-events-auto",
|
|
35
35
|
entered: "active opacity-100 pointer-events-auto",
|
|
36
36
|
exiting: "opacity-0 pointer-events-none",
|
|
@@ -43,12 +43,12 @@ function w({
|
|
|
43
43
|
end: "flex-row",
|
|
44
44
|
top: "flex-col-reverse",
|
|
45
45
|
bottom: "flex-col"
|
|
46
|
-
}, H = (g =
|
|
46
|
+
}, H = (g = t == null ? void 0 : t.anchor) == null ? void 0 : g[l];
|
|
47
47
|
return [u[l], H];
|
|
48
|
-
}, [l,
|
|
49
|
-
i ||
|
|
48
|
+
}, [l, t == null ? void 0 : t.anchor]), h = () => {
|
|
49
|
+
i || e();
|
|
50
50
|
};
|
|
51
|
-
return B(a, () => d.current), S("Escape", () =>
|
|
51
|
+
return B(a, () => d.current), S("Escape", () => e(), { enabled: r && !i }), /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s(E, { nodeRef: d, in: r, timeout: o, unmountOnExit: !0, children: (u) => /* @__PURE__ */ k(
|
|
52
52
|
m,
|
|
53
53
|
{
|
|
54
54
|
ref: d,
|
|
@@ -56,17 +56,16 @@ function w({
|
|
|
56
56
|
"data-open": r,
|
|
57
57
|
className: C(
|
|
58
58
|
"fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",
|
|
59
|
-
|
|
59
|
+
t == null ? void 0 : t.base,
|
|
60
60
|
R[u],
|
|
61
61
|
N,
|
|
62
62
|
p
|
|
63
63
|
),
|
|
64
|
-
...
|
|
64
|
+
...y,
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ s(
|
|
67
|
-
"
|
|
67
|
+
"div",
|
|
68
68
|
{
|
|
69
|
-
type: "button",
|
|
70
69
|
onClick: h,
|
|
71
70
|
className: f(
|
|
72
71
|
"absolute inset-0 size-full cursor-default opacity-0",
|
|
@@ -85,7 +84,7 @@ function w({
|
|
|
85
84
|
anchor: l,
|
|
86
85
|
preventClose: i
|
|
87
86
|
},
|
|
88
|
-
children:
|
|
87
|
+
children: v
|
|
89
88
|
}
|
|
90
89
|
)
|
|
91
90
|
]
|
|
@@ -93,16 +92,16 @@ function w({
|
|
|
93
92
|
) }) });
|
|
94
93
|
}
|
|
95
94
|
function P({ children: n, className: a = "", ...r }) {
|
|
96
|
-
const
|
|
95
|
+
const e = c((t) => t.drawer.menu), { anchor: o, duration: i, transitionState: l, preventClose: p } = F(D), v = b(() => {
|
|
97
96
|
var m;
|
|
98
|
-
const
|
|
97
|
+
const t = {
|
|
99
98
|
start: "w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",
|
|
100
99
|
end: "w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",
|
|
101
100
|
top: "w-full max-h-[92.5%] rounded-b mb-auto",
|
|
102
101
|
bottom: "w-full max-h-[92.5%] rounded-t mt-auto"
|
|
103
|
-
}, d = (m =
|
|
104
|
-
return [
|
|
105
|
-
}, [o,
|
|
102
|
+
}, d = (m = e == null ? void 0 : e.anchor) == null ? void 0 : m[o];
|
|
103
|
+
return [t[o], d];
|
|
104
|
+
}, [o, e == null ? void 0 : e.anchor]), y = b(() => ({
|
|
106
105
|
start: {
|
|
107
106
|
entering: "translate-x-0",
|
|
108
107
|
entered: "translate-x-0",
|
|
@@ -140,9 +139,9 @@ function P({ children: n, className: a = "", ...r }) {
|
|
|
140
139
|
className: C(
|
|
141
140
|
"relative flex flex-col transition-[translate,width] rounded-none",
|
|
142
141
|
p && "transition-transform",
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
e == null ? void 0 : e.base,
|
|
143
|
+
y[l],
|
|
144
|
+
v,
|
|
146
145
|
a
|
|
147
146
|
),
|
|
148
147
|
...r,
|
|
@@ -151,11 +150,11 @@ function P({ children: n, className: a = "", ...r }) {
|
|
|
151
150
|
);
|
|
152
151
|
}
|
|
153
152
|
function $({ className: n, ...a }) {
|
|
154
|
-
const r = c((
|
|
153
|
+
const r = c((e) => e.drawer.header.base);
|
|
155
154
|
return /* @__PURE__ */ s(x.Header, { className: f(r, n), ...a });
|
|
156
155
|
}
|
|
157
156
|
function I({ className: n, ...a }) {
|
|
158
|
-
const r = c((
|
|
157
|
+
const r = c((e) => e.drawer.body.base);
|
|
159
158
|
return /* @__PURE__ */ s(
|
|
160
159
|
x.Body,
|
|
161
160
|
{
|
|
@@ -165,7 +164,7 @@ function I({ className: n, ...a }) {
|
|
|
165
164
|
);
|
|
166
165
|
}
|
|
167
166
|
function O({ className: n, ...a }) {
|
|
168
|
-
const r = c((
|
|
167
|
+
const r = c((e) => e.drawer.footer.base);
|
|
169
168
|
return /* @__PURE__ */ s(x.Footer, { className: f(r, n), ...a });
|
|
170
169
|
}
|
|
171
170
|
w.Menu = P;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const a=require("react/jsx-runtime"),i=require("../../hooks/useClasses.cjs.js");require("react");const c=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function p({as:e,children:t,className:n,...s}){const r=e||"div",o=i(u=>u.inputGroup.base);return a.jsx(r,{className:c.twMerge("w-full",o,n),...s,children:t})}function d({as:e,children:t,className:n,...s}){const r=e||"h6",o=i(u=>u.inputGroup.label.base);return a.jsx(r,{className:c.twMerge("block font-normal text-start mb-0.5 px-0.5 text-sm",o,n),...s,children:t})}function x({as:e,children:t,className:n,...s}){const r=e||"div",o=i(u=>u.inputGroup.stack.base);return a.jsx(r,{className:c.twMerge("flex items-stretch border border-border rounded divide-x divide-border transition-[border-color,box-shadow] [&>*:first-child]:rounded-s [&>*:last-child]:rounded-e focus-within:border-primary focus-within:divide-primary",o,n),...s,children:t})}function m({as:e,children:t,className:n,...s}){const r=e||"span",o=i(u=>u.inputGroup.text.base);return a.jsx(r,{className:c.twMerge("flex items-center text-base py-1.5 px-3 font-normal text-center whitespace-nowrap",o,n),...s,children:t})}function b({as:e,children:t,className:n,...s}){const r=e||"input",o=e==="textarea",u=i(l=>l.inputGroup.formControl.base);return a.jsx(r,{className:c.twMerge("text-start flex-1 leading-10 text-base py-1.5 px-3 focus:outline-none bg-transparent border-0",o?"min-h-[7.5rem] field-sizing-content":"h-10",u,n),...s,children:t})}p.Label=d;p.Stack=x;p.Text=m;p.FormControl=b;module.exports=p;
|
|
@@ -9,8 +9,8 @@ function u({
|
|
|
9
9
|
className: o,
|
|
10
10
|
...n
|
|
11
11
|
}) {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */ i(
|
|
12
|
+
const r = t || "div", s = c((a) => a.inputGroup.base);
|
|
13
|
+
return /* @__PURE__ */ i(r, { className: p("w-full", s, o), ...n, children: e });
|
|
14
14
|
}
|
|
15
15
|
function m({
|
|
16
16
|
as: t,
|
|
@@ -18,13 +18,13 @@ function m({
|
|
|
18
18
|
className: o,
|
|
19
19
|
...n
|
|
20
20
|
}) {
|
|
21
|
-
const
|
|
21
|
+
const r = t || "h6", s = c((a) => a.inputGroup.label.base);
|
|
22
22
|
return /* @__PURE__ */ i(
|
|
23
|
-
|
|
23
|
+
r,
|
|
24
24
|
{
|
|
25
25
|
className: p(
|
|
26
26
|
"block font-normal text-start mb-0.5 px-0.5 text-sm",
|
|
27
|
-
|
|
27
|
+
s,
|
|
28
28
|
o
|
|
29
29
|
),
|
|
30
30
|
...n,
|
|
@@ -38,13 +38,13 @@ function d({
|
|
|
38
38
|
className: o,
|
|
39
39
|
...n
|
|
40
40
|
}) {
|
|
41
|
-
const
|
|
41
|
+
const r = t || "div", s = c((a) => a.inputGroup.stack.base);
|
|
42
42
|
return /* @__PURE__ */ i(
|
|
43
|
-
|
|
43
|
+
r,
|
|
44
44
|
{
|
|
45
45
|
className: p(
|
|
46
|
-
"flex items-stretch border border-
|
|
47
|
-
|
|
46
|
+
"flex items-stretch border border-border rounded divide-x divide-border transition-[border-color,box-shadow] [&>*:first-child]:rounded-s [&>*:last-child]:rounded-e focus-within:border-primary focus-within:divide-primary",
|
|
47
|
+
s,
|
|
48
48
|
o
|
|
49
49
|
),
|
|
50
50
|
...n,
|
|
@@ -52,19 +52,19 @@ function d({
|
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function b({
|
|
56
56
|
as: t,
|
|
57
57
|
children: e,
|
|
58
58
|
className: o,
|
|
59
59
|
...n
|
|
60
60
|
}) {
|
|
61
|
-
const
|
|
61
|
+
const r = t || "span", s = c((a) => a.inputGroup.text.base);
|
|
62
62
|
return /* @__PURE__ */ i(
|
|
63
|
-
|
|
63
|
+
r,
|
|
64
64
|
{
|
|
65
65
|
className: p(
|
|
66
66
|
"flex items-center text-base py-1.5 px-3 font-normal text-center whitespace-nowrap",
|
|
67
|
-
|
|
67
|
+
s,
|
|
68
68
|
o
|
|
69
69
|
),
|
|
70
70
|
...n,
|
|
@@ -72,19 +72,19 @@ function f({
|
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function f({
|
|
76
76
|
as: t,
|
|
77
77
|
children: e,
|
|
78
78
|
className: o,
|
|
79
79
|
...n
|
|
80
80
|
}) {
|
|
81
|
-
const
|
|
81
|
+
const r = t || "input", s = t === "textarea", a = c((l) => l.inputGroup.formControl.base);
|
|
82
82
|
return /* @__PURE__ */ i(
|
|
83
|
-
|
|
83
|
+
r,
|
|
84
84
|
{
|
|
85
85
|
className: p(
|
|
86
86
|
"text-start flex-1 leading-10 text-base py-1.5 px-3 focus:outline-none bg-transparent border-0",
|
|
87
|
-
|
|
87
|
+
s ? "min-h-[7.5rem] field-sizing-content" : "h-10",
|
|
88
88
|
a,
|
|
89
89
|
o
|
|
90
90
|
),
|
|
@@ -95,8 +95,8 @@ function x({
|
|
|
95
95
|
}
|
|
96
96
|
u.Label = m;
|
|
97
97
|
u.Stack = d;
|
|
98
|
-
u.Text =
|
|
99
|
-
u.FormControl =
|
|
98
|
+
u.Text = b;
|
|
99
|
+
u.FormControl = f;
|
|
100
100
|
export {
|
|
101
101
|
u as default
|
|
102
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const i=require("react/jsx-runtime"),$=require("../../helpers/cn.cjs.js"),z=require("../../hooks/useClasses.cjs.js"),t=require("react"),I=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),S=require("../Button/index.cjs.js"),B=require("../Portal/index.cjs.js"),F=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),y=t.createContext({open:!1,onClose:()=>{},transitionState:"unmounted",closeOnClick:!1,preventClose:!1});function E({as:a,ref:c,open:n,onClose:r,closeOnClick:d=!1,preventClose:f=!1,anchorEl:m=null,className:b,children:l,...M}){const j=z(e=>e.menu.base),p=a||"ul",s=16,o=t.useRef(null),O=t.useRef({left:s,right:s,top:s}),L={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-90 opacity-0",exited:"scale-90 opacity-0",unmounted:""},q=t.useCallback(e=>{O.current=e},[]),R=t.useCallback(e=>{var u,h,x;(u=o.current)==null||u.style.setProperty("--left",`${e.left}px`),(h=o.current)==null||h.style.setProperty("--right",`${e.right}px`),(x=o.current)==null||x.style.setProperty("--top",`${e.top}px`)},[]),g=t.useCallback(()=>{var H,P;if(!n||!m)return;const e=m.getBoundingClientRect(),u=window.innerWidth,h=window.innerHeight,x=((H=o.current)==null?void 0:H.offsetWidth)||150,W=((P=o.current)==null?void 0:P.offsetHeight)||200;let w=e.left,C=e.right,v=e.bottom;w=Math.min(Math.max(w,s),u-x-s),C=Math.min(Math.max(u-e.right,s),u-x-s),v=Math.min(Math.max(v,s),h-W-s),q({left:w,right:C,top:v}),R({left:w,right:C,top:v})},[n,m,q,R]),N=()=>{f||r==null||r()};return t.useEffect(()=>{g()},[g,l]),t.useEffect(()=>{const e=()=>{g()};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[g]),t.useImperativeHandle(c,()=>o.current),I.useHotkey("Escape",()=>r==null?void 0:r(),{enabled:n&&!f}),i.jsx(B,{children:i.jsx(F.default,{nodeRef:o,in:n,timeout:300,unmountOnExit:!0,children:e=>i.jsx(y.Provider,{value:{open:n,onClose:N,transitionState:e,closeOnClick:d,preventClose:f},children:i.jsxs(T,{children:[i.jsx(A,{}),i.jsx(p,{ref:o,autoFocus:!0,"data-open":n,role:"menu",className:k.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",j,L[e],b),...M,children:l})]})})})})}function T({children:a}){const{transitionState:c}=t.useContext(y),n={entering:"active pointer-events-auto",entered:"active pointer-events-auto",exiting:"pointer-events-none",exited:"pointer-events-none",unmounted:""};return i.jsx("div",{className:k.twMerge("fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",n[c]),children:a})}function A(){const{onClose:a,preventClose:c}=t.useContext(y);return i.jsx("div",{className:$("w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",c&&"[&:active~*]:scale-95"),onClick:a})}function D({as:a,closeOnClick:c,className:n,children:r,onClick:d,...f}){const m=z(p=>p.menu.item.base),{closeOnClick:b,onClose:l}=t.useContext(y),M=c??b,j=p=>{M&&(l==null||l()),d==null||d(p)};return i.jsx(S,{as:a??"li",color:"light",variant:"text",role:"menuitem",className:k.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,n),onClick:j,...f,children:r})}E.Item=D;module.exports=E;
|
|
@@ -8,7 +8,7 @@ type MenuProps = {
|
|
|
8
8
|
type MenuItemProps = {
|
|
9
9
|
closeOnClick?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare function Menu<E extends ElementType = "
|
|
11
|
+
declare function Menu<E extends ElementType = "ul">({ as, ref, open, onClose, closeOnClick, preventClose, anchorEl, className, children, ...props }: ComponentPropsWithAs<E, MenuProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare namespace Menu {
|
|
13
13
|
var Item: typeof MenuItem;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3E,OAAO,EAEL,WAAW,EAOZ,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3E,OAAO,EAEL,WAAW,EAOZ,MAAM,OAAO,CAAC;AAOf,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,WAAW,CAAC;AAChB,KAAK,aAAa,GAAG;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAgBF,iBAAS,IAAI,CAAC,CAAC,SAAS,WAAW,GAAG,IAAI,EAAE,EAC1C,EAAE,EACF,GAAG,EACH,IAAI,EACJ,OAAO,EACP,YAAoB,EACpB,YAAoB,EACpB,QAAe,EACf,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,EAAE,SAAS,CAAC,2CA2GpC;kBAtHQ,IAAI;;;AAuJb,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,2CAyBxC;AAID,eAAe,IAAI,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
2
|
+
import { jsx as o, jsxs as $ } from "react/jsx-runtime";
|
|
3
|
+
import F from "../../helpers/cn.es.js";
|
|
4
4
|
import W from "../../hooks/useClasses.es.js";
|
|
5
|
-
import { createContext as
|
|
6
|
-
import { useHotkey as
|
|
5
|
+
import { createContext as T, useRef as L, useCallback as C, useEffect as N, useImperativeHandle as q, useContext as P } from "react";
|
|
6
|
+
import { useHotkey as A } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
|
|
7
7
|
import { twMerge as H } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
8
|
-
import
|
|
9
|
-
import G from "
|
|
10
|
-
|
|
8
|
+
import D from "../Button/index.es.js";
|
|
9
|
+
import G from "../Portal/index.es.js";
|
|
10
|
+
import J from "../../node_modules/react-transition-group/esm/Transition.es.js";
|
|
11
|
+
const v = T({
|
|
11
12
|
open: !1,
|
|
12
13
|
onClose: () => {
|
|
13
14
|
},
|
|
@@ -15,88 +16,90 @@ const w = q({
|
|
|
15
16
|
closeOnClick: !1,
|
|
16
17
|
preventClose: !1
|
|
17
18
|
});
|
|
18
|
-
function
|
|
19
|
+
function K({
|
|
19
20
|
as: s,
|
|
20
21
|
ref: a,
|
|
21
|
-
open:
|
|
22
|
+
open: e,
|
|
22
23
|
onClose: i,
|
|
23
24
|
closeOnClick: u = !1,
|
|
24
25
|
preventClose: f = !1,
|
|
25
|
-
anchorEl:
|
|
26
|
+
anchorEl: m = null,
|
|
26
27
|
className: y,
|
|
27
|
-
children:
|
|
28
|
+
children: l,
|
|
28
29
|
...b
|
|
29
30
|
}) {
|
|
30
|
-
const
|
|
31
|
+
const M = W((t) => t.menu.base), d = s || "ul", n = 16, r = L(null), j = L({
|
|
31
32
|
left: n,
|
|
32
33
|
right: n,
|
|
33
34
|
top: n
|
|
34
|
-
}),
|
|
35
|
+
}), B = {
|
|
35
36
|
entering: "scale-100 opacity-100",
|
|
36
37
|
entered: "scale-100 opacity-100",
|
|
37
38
|
exiting: "scale-90 opacity-0",
|
|
38
39
|
exited: "scale-90 opacity-0",
|
|
39
40
|
unmounted: ""
|
|
40
41
|
}, z = C((t) => {
|
|
41
|
-
|
|
42
|
+
j.current = t;
|
|
42
43
|
}, []), O = C((t) => {
|
|
43
|
-
var
|
|
44
|
-
(
|
|
44
|
+
var c, g, p;
|
|
45
|
+
(c = r.current) == null || c.style.setProperty("--left", `${t.left}px`), (g = r.current) == null || g.style.setProperty("--right", `${t.right}px`), (p = r.current) == null || p.style.setProperty("--top", `${t.top}px`);
|
|
45
46
|
}, []), h = C(() => {
|
|
46
47
|
var R, E;
|
|
47
|
-
if (!
|
|
48
|
-
const t =
|
|
49
|
-
let x = t.left, k = t.right,
|
|
50
|
-
x = Math.min(Math.max(x, n),
|
|
51
|
-
Math.max(
|
|
52
|
-
|
|
53
|
-
),
|
|
54
|
-
}, [
|
|
48
|
+
if (!e || !m) return;
|
|
49
|
+
const t = m.getBoundingClientRect(), c = window.innerWidth, g = window.innerHeight, p = ((R = r.current) == null ? void 0 : R.offsetWidth) || 150, S = ((E = r.current) == null ? void 0 : E.offsetHeight) || 200;
|
|
50
|
+
let x = t.left, k = t.right, w = t.bottom;
|
|
51
|
+
x = Math.min(Math.max(x, n), c - p - n), k = Math.min(
|
|
52
|
+
Math.max(c - t.right, n),
|
|
53
|
+
c - p - n
|
|
54
|
+
), w = Math.min(Math.max(w, n), g - S - n), z({ left: x, right: k, top: w }), O({ left: x, right: k, top: w });
|
|
55
|
+
}, [e, m, z, O]), I = () => {
|
|
55
56
|
f || i == null || i();
|
|
56
57
|
};
|
|
57
58
|
return N(() => {
|
|
58
59
|
h();
|
|
59
|
-
}, [h,
|
|
60
|
+
}, [h, l]), N(() => {
|
|
60
61
|
const t = () => {
|
|
61
62
|
h();
|
|
62
63
|
};
|
|
63
64
|
return window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
|
|
64
65
|
window.removeEventListener("scroll", t), window.removeEventListener("resize", t);
|
|
65
66
|
};
|
|
66
|
-
}, [h]),
|
|
67
|
-
|
|
67
|
+
}, [h]), q(a, () => r.current), A("Escape", () => i == null ? void 0 : i(), { enabled: e && !f }), /* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(J, { nodeRef: r, in: e, timeout: 300, unmountOnExit: !0, children: (t) => /* @__PURE__ */ o(
|
|
68
|
+
v.Provider,
|
|
68
69
|
{
|
|
69
70
|
value: {
|
|
70
|
-
open:
|
|
71
|
-
onClose:
|
|
71
|
+
open: e,
|
|
72
|
+
onClose: I,
|
|
72
73
|
transitionState: t,
|
|
73
74
|
closeOnClick: u,
|
|
74
75
|
preventClose: f
|
|
75
76
|
},
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
77
|
+
children: /* @__PURE__ */ $(Q, { children: [
|
|
78
|
+
/* @__PURE__ */ o(U, {}),
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
d,
|
|
80
81
|
{
|
|
81
|
-
ref:
|
|
82
|
-
|
|
82
|
+
ref: r,
|
|
83
|
+
autoFocus: !0,
|
|
84
|
+
"data-open": e,
|
|
85
|
+
role: "menu",
|
|
83
86
|
className: H(
|
|
84
|
-
"w-fit min-w-52 bg-white shadow rounded
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
"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",
|
|
88
|
+
M,
|
|
89
|
+
B[t],
|
|
87
90
|
y
|
|
88
91
|
),
|
|
89
92
|
...b,
|
|
90
|
-
children:
|
|
93
|
+
children: l
|
|
91
94
|
}
|
|
92
95
|
)
|
|
93
96
|
] })
|
|
94
97
|
}
|
|
95
98
|
) }) });
|
|
96
99
|
}
|
|
97
|
-
function
|
|
98
|
-
const { transitionState: a } = P(
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
+
function Q({ children: s }) {
|
|
101
|
+
const { transitionState: a } = P(v);
|
|
102
|
+
return /* @__PURE__ */ o(
|
|
100
103
|
"div",
|
|
101
104
|
{
|
|
102
105
|
className: H(
|
|
@@ -113,13 +116,12 @@ function K({ children: s }) {
|
|
|
113
116
|
}
|
|
114
117
|
);
|
|
115
118
|
}
|
|
116
|
-
function
|
|
117
|
-
const { onClose: s, preventClose: a } = P(
|
|
118
|
-
return /* @__PURE__ */
|
|
119
|
-
"
|
|
119
|
+
function U() {
|
|
120
|
+
const { onClose: s, preventClose: a } = P(v);
|
|
121
|
+
return /* @__PURE__ */ o(
|
|
122
|
+
"div",
|
|
120
123
|
{
|
|
121
|
-
|
|
122
|
-
className: T(
|
|
124
|
+
className: F(
|
|
123
125
|
"w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",
|
|
124
126
|
a && "[&:active~*]:scale-95"
|
|
125
127
|
),
|
|
@@ -127,33 +129,36 @@ function Q() {
|
|
|
127
129
|
}
|
|
128
130
|
);
|
|
129
131
|
}
|
|
130
|
-
function
|
|
132
|
+
function V({
|
|
131
133
|
as: s,
|
|
132
134
|
closeOnClick: a,
|
|
133
|
-
className:
|
|
135
|
+
className: e,
|
|
134
136
|
children: i,
|
|
135
137
|
onClick: u,
|
|
136
138
|
...f
|
|
137
139
|
}) {
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
+
const m = W((d) => d.menu.item.base), { closeOnClick: y, onClose: l } = P(v), b = a ?? y, M = (d) => {
|
|
141
|
+
b && (l == null || l()), u == null || u(d);
|
|
140
142
|
};
|
|
141
|
-
return /* @__PURE__ */
|
|
142
|
-
|
|
143
|
+
return /* @__PURE__ */ o(
|
|
144
|
+
D,
|
|
143
145
|
{
|
|
144
|
-
|
|
146
|
+
as: s ?? "li",
|
|
147
|
+
color: "light",
|
|
148
|
+
variant: "text",
|
|
149
|
+
role: "menuitem",
|
|
145
150
|
className: H(
|
|
146
|
-
"flex items-center px-
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
"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",
|
|
152
|
+
m,
|
|
153
|
+
e
|
|
149
154
|
),
|
|
150
|
-
onClick:
|
|
155
|
+
onClick: M,
|
|
151
156
|
...f,
|
|
152
157
|
children: i
|
|
153
158
|
}
|
|
154
159
|
);
|
|
155
160
|
}
|
|
156
|
-
|
|
161
|
+
K.Item = V;
|
|
157
162
|
export {
|
|
158
|
-
|
|
163
|
+
K as default
|
|
159
164
|
};
|
|
@@ -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"),f=require("../../helpers/cn.cjs.js"),u=require("../../hooks/useClasses.cjs.js"),l=require("react"),C=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),j=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),p=require("../Card/index.cjs.js"),h=require("../Portal/index.cjs.js"),w=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),g=l.createContext({size:"md",open:!1,onClose:()=>{},transitionState:"unmounted",duration:300});function c({as:t,ref:n,size:s="md",open:e=!1,onClose:a=()=>{},duration:i=300,preventClose:r=!1,className:b,children:y,...d}){const m=u(x=>x.modal.base),v=l.useRef(null),q=t||"div",z={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:""},M=()=>{r||a()};return l.useImperativeHandle(n,()=>v.current),C.useHotkey("Escape",()=>a(),{enabled:e&&!r}),o.jsx(h,{children:o.jsx(w.default,{nodeRef:v,in:e,timeout:i,unmountOnExit:!0,children:x=>o.jsxs(q,{ref:v,"data-open":e,style:{transitionDuration:`${i}ms`},className:j.twMerge("modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",m,z[x],b),...d,children:[o.jsx("div",{onClick:M,className:f("absolute inset-0 cursor-default opacity-0",r&&"[&:active~*]:scale-95")}),o.jsx(g.Provider,{value:{size:s,open:e,onClose:M,transitionState:x,duration:i},children:y})]})})})}function H({className:t,children:n,...s}){const e=u(d=>d.modal.dialog),{size:a,transitionState:i,duration:r}=l.useContext(g),b={entering:"scale-100",entered:"scale-100",exiting:"scale-75",exited:"scale-75",unmounted:""},y=l.useMemo(()=>{var m;return[{sm:"min-[576px]:w-[300px]",md:"min-[576px]:w-[500px]",lg:"min-[992px]:w-[800px]"}[a],(m=e==null?void 0:e.size)==null?void 0:m[a]]},[a,e==null?void 0:e.size]);return o.jsx(p,{as:"div",style:{transitionDuration:`${r}ms`},className:j.twMerge("max-w-full max-h-full m-auto transition-transform",e==null?void 0:e.base,y,b[i],t),...s,children:n})}function N({className:t,...n}){const s=u(e=>e.modal.header.base);return o.jsx(p.Header,{className:f(s,t),...n})}function S({className:t,...n}){const s=u(e=>e.modal.body.base);return o.jsx(p.Body,{className:f(s,t),...n})}function k({className:t,...n}){const s=u(e=>e.modal.footer.base);return o.jsx(p.Footer,{className:f(s,t),...n})}c.Dialog=H;c.Header=N;c.Body=S;c.Footer=k;exports.ModalContext=g;exports.default=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAIlE,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;CAClB,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,WAAW,CAAC,CAAC;AACzB,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,kCAMvB,CAAC;AAEH,iBAAS,KAAK,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAC5C,EAAE,EACF,GAAG,EACH,IAAW,EACX,IAAY,EACZ,OAAkB,EAClB,QAAc,EACd,YAAoB,EACpB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,EAAE,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAIlE,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;CAClB,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,WAAW,CAAC,CAAC;AACzB,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,kCAMvB,CAAC;AAEH,iBAAS,KAAK,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAC5C,EAAE,EACF,GAAG,EACH,IAAW,EACX,IAAY,EACZ,OAAkB,EAClB,QAAc,EACd,YAAoB,EACpB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,EAAE,UAAU,CAAC,2CAwDrC;kBAnEQ,KAAK;;;;;;AAoEd,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAkCvE;AACD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAG7D;AACD,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAGzD;AACD,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAG7D;AAOD,eAAe,KAAK,CAAC"}
|
|
@@ -26,10 +26,10 @@ function p({
|
|
|
26
26
|
duration: i = 300,
|
|
27
27
|
preventClose: r = !1,
|
|
28
28
|
className: x,
|
|
29
|
-
children:
|
|
29
|
+
children: y,
|
|
30
30
|
...m
|
|
31
31
|
}) {
|
|
32
|
-
const c = l((d) => d.modal.base),
|
|
32
|
+
const c = l((d) => d.modal.base), b = w(null), C = t || "div", M = {
|
|
33
33
|
entering: "active opacity-100 pointer-events-auto",
|
|
34
34
|
entered: "active opacity-100 pointer-events-auto",
|
|
35
35
|
exiting: "opacity-0 pointer-events-none",
|
|
@@ -38,10 +38,10 @@ function p({
|
|
|
38
38
|
}, v = () => {
|
|
39
39
|
r || s();
|
|
40
40
|
};
|
|
41
|
-
return H(o, () =>
|
|
41
|
+
return H(o, () => b.current), S("Escape", () => s(), { enabled: e && !r }), /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(F, { nodeRef: b, in: e, timeout: i, unmountOnExit: !0, children: (d) => /* @__PURE__ */ h(
|
|
42
42
|
C,
|
|
43
43
|
{
|
|
44
|
-
ref:
|
|
44
|
+
ref: b,
|
|
45
45
|
"data-open": e,
|
|
46
46
|
style: { transitionDuration: `${i}ms` },
|
|
47
47
|
className: g(
|
|
@@ -53,9 +53,8 @@ function p({
|
|
|
53
53
|
...m,
|
|
54
54
|
children: [
|
|
55
55
|
/* @__PURE__ */ a(
|
|
56
|
-
"
|
|
56
|
+
"div",
|
|
57
57
|
{
|
|
58
|
-
type: "button",
|
|
59
58
|
onClick: v,
|
|
60
59
|
className: u(
|
|
61
60
|
"absolute inset-0 cursor-default opacity-0",
|
|
@@ -73,7 +72,7 @@ function p({
|
|
|
73
72
|
transitionState: d,
|
|
74
73
|
duration: i
|
|
75
74
|
},
|
|
76
|
-
children:
|
|
75
|
+
children: y
|
|
77
76
|
}
|
|
78
77
|
)
|
|
79
78
|
]
|
|
@@ -87,7 +86,7 @@ function R({ className: t, children: o, ...n }) {
|
|
|
87
86
|
exiting: "scale-75",
|
|
88
87
|
exited: "scale-75",
|
|
89
88
|
unmounted: ""
|
|
90
|
-
},
|
|
89
|
+
}, y = D(() => {
|
|
91
90
|
var c;
|
|
92
91
|
return [{
|
|
93
92
|
sm: "min-[576px]:w-[300px]",
|
|
@@ -103,7 +102,7 @@ function R({ className: t, children: o, ...n }) {
|
|
|
103
102
|
className: g(
|
|
104
103
|
"max-w-full max-h-full m-auto transition-transform",
|
|
105
104
|
e == null ? void 0 : e.base,
|
|
106
|
-
|
|
105
|
+
y,
|
|
107
106
|
x[i],
|
|
108
107
|
t
|
|
109
108
|
),
|