reaxify 0.0.94 → 0.0.95

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
- "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:l=!1,anchor:u="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[u];return[c[u],D]},[u,t==null?void 0:t.anchor]),g=()=>{l||e()};return i.useImperativeHandle(a,()=>d.current),R.useHotkey("Escape",()=>e(),{conflictBehavior:"allow",ignoreInputs:!0,enabled:r&&!l}),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",l&&"[&:active~*]:scale-95")}),s.jsx(p.Provider,{value:{open:r,onClose:g,transitionState:c,duration:o,anchor:u,preventClose:l},children:b})]})})})}function k({children:n,className:a="",...r}){const e=x(t=>t.drawer.menu),{anchor:o,duration:l,transitionState:u,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:`${l}ms`},className:C.twMerge("relative flex flex-col transition-[translate,width] rounded-none",y&&"transition-transform",e==null?void 0:e.base,h[u],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 B({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 z({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=B;f.Footer=z;exports.DrawerContext=p;exports.default=f;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),x=require("../../hooks/useClasses.cjs.js"),u=require("react"),z=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),q=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),m=require("../../helpers/cn.cjs.js"),w=require("../Card/index.cjs.js"),F=require("../Portal/index.cjs.js"),$=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),j=u.createContext({open:!1,onClose:()=>{},duration:300,anchor:"start",transitionState:"unmounted",preventClose:!1});function f({as:r,ref:n,open:t=!1,onClose:e=()=>{},onEnter:i,onEntering:v,onEntered:y,onExit:b,onExiting:h,onExited:p,duration:s=300,preventClose:c=!1,anchor:l="end",className:D="",children:R,...H}){const a=x(d=>d.drawer),g=u.useRef(null),N=r||"div",k={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:""},S=u.useMemo(()=>{var M;const d={start:"flex-row-reverse",end:"flex-row",top:"flex-col-reverse",bottom:"flex-col"},B=(M=a==null?void 0:a.anchor)==null?void 0:M[l];return[d[l],B]},[l,a==null?void 0:a.anchor]),C=()=>{c||e()};return u.useImperativeHandle(n,()=>g.current),z.useHotkey("Escape",()=>e(),{conflictBehavior:"allow",ignoreInputs:!0,enabled:t&&!c}),o.jsx(F,{children:o.jsx($.default,{nodeRef:g,in:t,timeout:s,unmountOnExit:!0,onEnter:i,onEntering:v,onEntered:y,onExit:b,onExiting:h,onExited:p,children:d=>o.jsxs(N,{ref:g,style:{transitionDuration:`${s}ms`},"data-open":t,className:q.twMerge("fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",a==null?void 0:a.base,k[d],S,D),...H,children:[o.jsx("div",{onClick:C,className:m("absolute inset-0 size-full cursor-default opacity-0",c&&"[&:active~*]:scale-95")}),o.jsx(j.Provider,{value:{open:t,onClose:C,transitionState:d,duration:s,anchor:l,preventClose:c},children:R})]})})})}function E({children:r,className:n="",...t}){const e=x(s=>s.drawer.menu),{anchor:i,duration:v,transitionState:y,preventClose:b}=u.useContext(j),h=u.useMemo(()=>{var l;const s={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"},c=(l=e==null?void 0:e.anchor)==null?void 0:l[i];return[s[i],c]},[i,e==null?void 0:e.anchor]),p=u.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:""}})[i],[i]);return o.jsx(w,{as:"div",style:{transitionDuration:`${v}ms`},className:q.twMerge("relative flex flex-col transition-[translate,width] rounded-none",b&&"transition-transform",e==null?void 0:e.base,p[y],h,n),...t,children:r})}function I({className:r,...n}){const t=x(e=>e.drawer.header.base);return o.jsx(w.Header,{className:m(t,r),...n})}function O({className:r,...n}){const t=x(e=>e.drawer.body.base);return o.jsx(w.Body,{className:m("flex-1 overflow-auto",t,r),...n})}function P({className:r,...n}){const t=x(e=>e.drawer.footer.base);return o.jsx(w.Footer,{className:m(t,r),...n})}f.Menu=E;f.Header=I;f.Body=O;f.Footer=P;exports.DrawerContext=j;exports.default=f;
@@ -1,4 +1,4 @@
1
- import { ComponentPropsWithAs, ToggleProps } from '../../types';
1
+ import { ComponentPropsWithAs, ToggleEventProps, ToggleProps } from '../../types';
2
2
  import { ComponentProps, ElementType } from 'react';
3
3
  import { TransitionStatus } from 'react-transition-group';
4
4
  type Anchor = "start" | "end" | "top" | "bottom";
@@ -12,14 +12,14 @@ type DrawerBaseProps = {
12
12
  anchor?: Anchor;
13
13
  duration?: number;
14
14
  preventClose?: boolean;
15
- } & Partial<ToggleProps>;
15
+ } & Partial<ToggleEventProps> & Partial<ToggleProps>;
16
16
  type DrawerProps<E extends ElementType> = ComponentPropsWithAs<E, DrawerBaseProps>;
17
17
  type DrawerMenuProps = Omit<ComponentProps<"div">, "as" | "ref">;
18
18
  type DrawerHeaderProps = ComponentProps<"div">;
19
19
  type DrawerBodyProps = ComponentProps<"div">;
20
20
  type DrawerFooterProps = ComponentProps<"div">;
21
21
  export declare const DrawerContext: import('react').Context<Context>;
22
- declare function Drawer<E extends ElementType = "div">({ as, ref, open, onClose, duration, preventClose, anchor, className, children, ...props }: DrawerProps<E>): import("react/jsx-runtime").JSX.Element;
22
+ declare function Drawer<E extends ElementType = "div">({ as, ref, open, onClose, onEnter, onEntering, onEntered, onExit, onExiting, onExited, duration, preventClose, anchor, className, children, ...props }: DrawerProps<E>): import("react/jsx-runtime").JSX.Element;
23
23
  declare namespace Drawer {
24
24
  var Menu: typeof DrawerMenu;
25
25
  var Header: typeof DrawerHeader;
@@ -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,KAA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,CAAC;AAEH,iBAAS,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG,KAAK,EAAE,EAC7C,EAAE,EACF,GAAG,EACH,IAAY,EACZ,OAAkB,EAClB,OAAO,EACP,UAAU,EACV,SAAS,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAc,EACd,YAAoB,EACpB,MAAc,EACd,SAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,CAAC,CAAC,2CAoFhB;kBArGQ,MAAM;;;;;;AAsGf,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"}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { jsx as s, jsxs as k } from "react/jsx-runtime";
2
+ import { jsx as s, jsxs as j } from "react/jsx-runtime";
3
3
  import d from "../../hooks/useClasses.es.js";
4
- import { createContext as B, useRef as M, useMemo as h, useImperativeHandle as z, useContext as F } from "react";
5
- import { useHotkey as S } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
6
- import { twMerge as C } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
- import f from "../../helpers/cn.es.js";
8
- import x from "../Card/index.es.js";
9
- import j from "../Portal/index.es.js";
10
- import E from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
- const D = B({
4
+ import { createContext as E, useRef as I, useMemo as g, useImperativeHandle as P, useContext as $ } from "react";
5
+ import { useHotkey as O } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
6
+ import { twMerge as R } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
+ import m from "../../helpers/cn.es.js";
8
+ import f from "../Card/index.es.js";
9
+ import T from "../Portal/index.es.js";
10
+ import q from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
+ const N = E({
12
12
  open: !1,
13
13
  onClose: () => {
14
14
  },
@@ -17,95 +17,116 @@ const D = B({
17
17
  transitionState: "unmounted",
18
18
  preventClose: !1
19
19
  });
20
- function w({
21
- as: n,
22
- ref: a,
23
- open: r = !1,
20
+ function x({
21
+ as: r,
22
+ ref: n,
23
+ open: t = !1,
24
24
  onClose: e = () => {
25
25
  },
26
+ onEnter: i,
27
+ onEntering: w,
28
+ onEntered: p,
29
+ onExit: v,
30
+ onExiting: y,
31
+ onExited: h,
26
32
  duration: o = 300,
27
- preventClose: i = !1,
33
+ preventClose: u = !1,
28
34
  anchor: l = "end",
29
- className: p = "",
30
- children: v,
31
- ...y
35
+ className: H = "",
36
+ children: k,
37
+ ...B
32
38
  }) {
33
- const t = d((u) => u.drawer), c = M(null), m = n || "div", R = {
39
+ const a = d((c) => c.drawer), b = I(null), M = r || "div", z = {
34
40
  entering: "active opacity-100 pointer-events-auto",
35
41
  entered: "active opacity-100 pointer-events-auto",
36
42
  exiting: "opacity-0 pointer-events-none",
37
43
  exited: "opacity-0 pointer-events-none",
38
44
  unmounted: ""
39
- }, N = h(() => {
40
- var g;
41
- const u = {
45
+ }, F = g(() => {
46
+ var D;
47
+ const c = {
42
48
  start: "flex-row-reverse",
43
49
  end: "flex-row",
44
50
  top: "flex-col-reverse",
45
51
  bottom: "flex-col"
46
- }, H = (g = t == null ? void 0 : t.anchor) == null ? void 0 : g[l];
47
- return [u[l], H];
48
- }, [l, t == null ? void 0 : t.anchor]), b = () => {
49
- i || e();
52
+ }, S = (D = a == null ? void 0 : a.anchor) == null ? void 0 : D[l];
53
+ return [c[l], S];
54
+ }, [l, a == null ? void 0 : a.anchor]), C = () => {
55
+ u || e();
50
56
  };
51
- return z(a, () => c.current), S("Escape", () => e(), {
57
+ return P(n, () => b.current), O("Escape", () => e(), {
52
58
  conflictBehavior: "allow",
53
59
  ignoreInputs: !0,
54
- enabled: r && !i
55
- }), /* @__PURE__ */ s(j, { children: /* @__PURE__ */ s(E, { nodeRef: c, in: r, timeout: o, unmountOnExit: !0, children: (u) => /* @__PURE__ */ k(
56
- m,
60
+ enabled: t && !u
61
+ }), /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(
62
+ q,
57
63
  {
58
- ref: c,
59
- style: { transitionDuration: `${o}ms` },
60
- "data-open": r,
61
- className: C(
62
- "fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",
63
- t == null ? void 0 : t.base,
64
- R[u],
65
- N,
66
- p
67
- ),
68
- ...y,
69
- children: [
70
- /* @__PURE__ */ s(
71
- "div",
72
- {
73
- onClick: b,
74
- className: f(
75
- "absolute inset-0 size-full cursor-default opacity-0",
76
- i && "[&:active~*]:scale-95"
64
+ nodeRef: b,
65
+ in: t,
66
+ timeout: o,
67
+ unmountOnExit: !0,
68
+ onEnter: i,
69
+ onEntering: w,
70
+ onEntered: p,
71
+ onExit: v,
72
+ onExiting: y,
73
+ onExited: h,
74
+ children: (c) => /* @__PURE__ */ j(
75
+ M,
76
+ {
77
+ ref: b,
78
+ style: { transitionDuration: `${o}ms` },
79
+ "data-open": t,
80
+ className: R(
81
+ "fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",
82
+ a == null ? void 0 : a.base,
83
+ z[c],
84
+ F,
85
+ H
86
+ ),
87
+ ...B,
88
+ children: [
89
+ /* @__PURE__ */ s(
90
+ "div",
91
+ {
92
+ onClick: C,
93
+ className: m(
94
+ "absolute inset-0 size-full cursor-default opacity-0",
95
+ u && "[&:active~*]:scale-95"
96
+ )
97
+ }
98
+ ),
99
+ /* @__PURE__ */ s(
100
+ N.Provider,
101
+ {
102
+ value: {
103
+ open: t,
104
+ onClose: C,
105
+ transitionState: c,
106
+ duration: o,
107
+ anchor: l,
108
+ preventClose: u
109
+ },
110
+ children: k
111
+ }
77
112
  )
78
- }
79
- ),
80
- /* @__PURE__ */ s(
81
- D.Provider,
82
- {
83
- value: {
84
- open: r,
85
- onClose: b,
86
- transitionState: u,
87
- duration: o,
88
- anchor: l,
89
- preventClose: i
90
- },
91
- children: v
92
- }
93
- )
94
- ]
113
+ ]
114
+ }
115
+ )
95
116
  }
96
- ) }) });
117
+ ) });
97
118
  }
98
- function I({ children: n, className: a = "", ...r }) {
99
- const e = d((t) => t.drawer.menu), { anchor: o, duration: i, transitionState: l, preventClose: p } = F(D), v = h(() => {
100
- var m;
101
- const t = {
119
+ function A({ children: r, className: n = "", ...t }) {
120
+ const e = d((o) => o.drawer.menu), { anchor: i, duration: w, transitionState: p, preventClose: v } = $(N), y = g(() => {
121
+ var l;
122
+ const o = {
102
123
  start: "w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",
103
124
  end: "w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",
104
125
  top: "w-full max-h-[92.5%] rounded-b mb-auto",
105
126
  bottom: "w-full max-h-[92.5%] rounded-t mt-auto"
106
- }, c = (m = e == null ? void 0 : e.anchor) == null ? void 0 : m[o];
107
- return [t[o], c];
108
- }, [o, e == null ? void 0 : e.anchor]), y = h(() => ({
127
+ }, u = (l = e == null ? void 0 : e.anchor) == null ? void 0 : l[i];
128
+ return [o[i], u];
129
+ }, [i, e == null ? void 0 : e.anchor]), h = g(() => ({
109
130
  start: {
110
131
  entering: "translate-x-0",
111
132
  entered: "translate-x-0",
@@ -134,48 +155,48 @@ function I({ children: n, className: a = "", ...r }) {
134
155
  exited: "translate-y-full",
135
156
  unmounted: ""
136
157
  }
137
- })[o], [o]);
158
+ })[i], [i]);
138
159
  return /* @__PURE__ */ s(
139
- x,
160
+ f,
140
161
  {
141
162
  as: "div",
142
- style: { transitionDuration: `${i}ms` },
143
- className: C(
163
+ style: { transitionDuration: `${w}ms` },
164
+ className: R(
144
165
  "relative flex flex-col transition-[translate,width] rounded-none",
145
- p && "transition-transform",
166
+ v && "transition-transform",
146
167
  e == null ? void 0 : e.base,
147
- y[l],
148
- v,
149
- a
168
+ h[p],
169
+ y,
170
+ n
150
171
  ),
151
- ...r,
152
- children: n
172
+ ...t,
173
+ children: r
153
174
  }
154
175
  );
155
176
  }
156
- function P({ className: n, ...a }) {
157
- const r = d((e) => e.drawer.header.base);
158
- return /* @__PURE__ */ s(x.Header, { className: f(r, n), ...a });
177
+ function G({ className: r, ...n }) {
178
+ const t = d((e) => e.drawer.header.base);
179
+ return /* @__PURE__ */ s(f.Header, { className: m(t, r), ...n });
159
180
  }
160
- function $({ className: n, ...a }) {
161
- const r = d((e) => e.drawer.body.base);
181
+ function J({ className: r, ...n }) {
182
+ const t = d((e) => e.drawer.body.base);
162
183
  return /* @__PURE__ */ s(
163
- x.Body,
184
+ f.Body,
164
185
  {
165
- className: f("flex-1 overflow-auto", r, n),
166
- ...a
186
+ className: m("flex-1 overflow-auto", t, r),
187
+ ...n
167
188
  }
168
189
  );
169
190
  }
170
- function O({ className: n, ...a }) {
171
- const r = d((e) => e.drawer.footer.base);
172
- return /* @__PURE__ */ s(x.Footer, { className: f(r, n), ...a });
191
+ function K({ className: r, ...n }) {
192
+ const t = d((e) => e.drawer.footer.base);
193
+ return /* @__PURE__ */ s(f.Footer, { className: m(t, r), ...n });
173
194
  }
174
- w.Menu = I;
175
- w.Header = P;
176
- w.Body = $;
177
- w.Footer = O;
195
+ x.Menu = A;
196
+ x.Header = G;
197
+ x.Body = J;
198
+ x.Footer = K;
178
199
  export {
179
- D as DrawerContext,
180
- w as default
200
+ N as DrawerContext,
201
+ x as default
181
202
  };
@@ -1 +1 @@
1
- "use client";"use strict";const i=require("react/jsx-runtime"),W=require("../../helpers/cn.cjs.js"),z=require("../../hooks/useClasses.cjs.js"),t=require("react"),$=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),B=require("../Button/index.cjs.js"),S=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:o,ref:l,open:n,onClose:a,closeOnClick:d=!1,preventClose:f=!1,anchorEl:p=null,className:C,children:c,...b}){const M=z(e=>e.menu.base),m=o||"ul",s=16,r=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=r.current)==null||u.style.setProperty("--left",`${e.left}px`),(h=r.current)==null||h.style.setProperty("--right",`${e.right}px`),(x=r.current)==null||x.style.setProperty("--top",`${e.top}px`)},[]),g=t.useCallback(()=>{var H,P;if(!n||!p)return;const e=p.getBoundingClientRect(),u=window.innerWidth,h=window.innerHeight,x=((H=r.current)==null?void 0:H.offsetWidth)||150,N=((P=r.current)==null?void 0:P.offsetHeight)||200;let w=e.left,j=e.right,v=e.bottom;w=Math.min(Math.max(w,s),u-x-s),j=Math.min(Math.max(u-e.right,s),u-x-s),v=Math.min(Math.max(v,s),h-N-s),q({left:w,right:j,top:v}),R({left:w,right:j,top:v})},[n,p,q,R]),I=()=>{f||a==null||a()};return t.useEffect(()=>{g()},[g,c]),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(l,()=>r.current),$.useHotkey("Escape",()=>a(),{conflictBehavior:"allow",ignoreInputs:!0,enabled:n&&!f}),i.jsx(S,{children:i.jsx(F.default,{nodeRef:r,in:n,timeout:300,unmountOnExit:!0,children:e=>i.jsx(y.Provider,{value:{open:n,onClose:I,transitionState:e,closeOnClick:d,preventClose:f},children:i.jsxs(T,{children:[i.jsx(A,{}),i.jsx(m,{ref:r,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",M,L[e],C),...b,children:c})]})})})})}function T({children:o}){const{transitionState:l}=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[l]),children:o})}function A(){const{onClose:o,preventClose:l}=t.useContext(y);return i.jsx("div",{className:W("w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",l&&"[&:active~*]:scale-95"),onClick:o})}function D({as:o,closeOnClick:l,className:n,children:a,onClick:d,...f}){const p=z(m=>m.menu.item.base),{closeOnClick:C,onClose:c}=t.useContext(y),b=l??C,M=m=>{b&&(c==null||c()),d==null||d(m)};return i.jsx(B,{as:o??"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",p,n),onClick:M,...f,children:a})}E.Item=D;module.exports=E;
1
+ "use client";"use strict";const i=require("react/jsx-runtime"),A=require("../../helpers/cn.cjs.js"),L=require("../../hooks/useClasses.cjs.js"),t=require("react"),G=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),R=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),J=require("../Button/index.cjs.js"),K=require("../Portal/index.cjs.js"),Q=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),w=t.createContext({open:!1,onClose:()=>{},transitionState:"unmounted",closeOnClick:!1,preventClose:!1});function $({as:l,ref:a,open:n,duration:m=300,onClose:r,onEnter:v,onEntering:y,onEntered:C,onExit:u,onExiting:b,onExited:M,closeOnClick:f=!1,preventClose:j=!1,anchorEl:k=null,className:I,children:H,...N}){const W=L(e=>e.menu.base),B=l||"ul",s=16,o=t.useRef(null),S=t.useRef({left:s,right:s,top:s}),D={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-90 opacity-0",exited:"scale-90 opacity-0",unmounted:""},P=t.useCallback(e=>{S.current=e},[]),z=t.useCallback(e=>{var c,x,d;(c=o.current)==null||c.style.setProperty("--left",`${e.left}px`),(x=o.current)==null||x.style.setProperty("--right",`${e.right}px`),(d=o.current)==null||d.style.setProperty("--top",`${e.top}px`)},[]),p=t.useCallback(()=>{var E,O;if(!n||!k)return;const e=k.getBoundingClientRect(),c=window.innerWidth,x=window.innerHeight,d=((E=o.current)==null?void 0:E.offsetWidth)||150,T=((O=o.current)==null?void 0:O.offsetHeight)||200;let g=e.left,q=e.right,h=e.bottom;g=Math.min(Math.max(g,s),c-d-s),q=Math.min(Math.max(c-e.right,s),c-d-s),h=Math.min(Math.max(h,s),x-T-s),P({left:g,right:q,top:h}),z({left:g,right:q,top:h})},[n,k,P,z]),F=()=>{j||r==null||r()};return t.useEffect(()=>{p()},[p,H]),t.useEffect(()=>{const e=()=>{p()};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[p]),t.useImperativeHandle(a,()=>o.current),G.useHotkey("Escape",()=>r(),{conflictBehavior:"allow",ignoreInputs:!0,enabled:n&&!j}),i.jsx(K,{children:i.jsx(Q.default,{nodeRef:o,in:n,timeout:m,unmountOnExit:!0,onEnter:v,onEntering:y,onEntered:C,onExit:u,onExiting:b,onExited:M,children:e=>i.jsx(w.Provider,{value:{open:n,onClose:F,transitionState:e,closeOnClick:f,preventClose:j},children:i.jsxs(U,{children:[i.jsx(V,{}),i.jsx(B,{ref:o,autoFocus:!0,"data-open":n,role:"menu",style:{transitionDuration:`${m}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",W,D[e],I),...N,children:H})]})})})})}function U({children:l}){const{transitionState:a}=t.useContext(w),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:R.twMerge("fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",n[a]),children:l})}function V(){const{onClose:l,preventClose:a}=t.useContext(w);return i.jsx("div",{className:A("w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",a&&"[&:active~*]:scale-95"),onClick:l})}function X({as:l,closeOnClick:a,className:n,children:m,onClick:r,...v}){const y=L(f=>f.menu.item.base),{closeOnClick:C,onClose:u}=t.useContext(w),b=a??C,M=f=>{b&&(u==null||u()),r==null||r(f)};return i.jsx(J,{as:l??"li",color:"light",variant:"text",role:"menuitem",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",y,n),onClick:M,...v,children:m})}$.Item=X;module.exports=$;
@@ -1,14 +1,15 @@
1
- import { ComponentPropsWithAs, ToggleProps } from '../../types';
1
+ import { ComponentPropsWithAs, ToggleEventProps, ToggleProps } from '../../types';
2
2
  import { ElementType } from 'react';
3
3
  type MenuProps = {
4
4
  anchorEl?: HTMLElement | null;
5
5
  closeOnClick?: boolean;
6
6
  preventClose?: boolean;
7
- } & ToggleProps;
7
+ duration?: number;
8
+ } & Partial<ToggleEventProps> & ToggleProps;
8
9
  type MenuItemProps = {
9
10
  closeOnClick?: boolean;
10
11
  };
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
+ 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;
12
13
  declare namespace Menu {
13
14
  var Item: typeof MenuItem;
14
15
  }
@@ -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;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,2CA+GpC;kBA1HQ,IAAI;;;AA2Jb,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
+ {"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;AAGjB,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;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,gBAAgB,CAAC,GAC3B,WAAW,CAAC;AACd,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,QAAc,EACd,OAAO,EACP,OAAO,EACP,UAAU,EACV,SAAS,EACT,MAAM,EACN,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,YAAoB,EACpB,QAAe,EACf,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,EAAE,SAAS,CAAC,2CA2HpC;kBA7IQ,IAAI;;;AA8Kb,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,14 +1,14 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as $ } from "react/jsx-runtime";
3
- import F from "../../helpers/cn.es.js";
4
- import I from "../../hooks/useClasses.es.js";
5
- import { createContext as T, useRef as L, useCallback as k, useEffect as B, useImperativeHandle as q, useContext as P } from "react";
6
- import { useHotkey as A } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
7
- import { twMerge as H } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
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({
2
+ import { jsx as r, jsxs as J } from "react/jsx-runtime";
3
+ import K from "../../helpers/cn.es.js";
4
+ import $ from "../../hooks/useClasses.es.js";
5
+ import { createContext as Q, useRef as N, useCallback as H, useEffect as W, useImperativeHandle as U, useContext as z } from "react";
6
+ import { useHotkey as V } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
7
+ import { twMerge as O } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
8
+ import X from "../Button/index.es.js";
9
+ import Y from "../Portal/index.es.js";
10
+ import Z from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
+ const w = Q({
12
12
  open: !1,
13
13
  onClose: () => {
14
14
  },
@@ -16,97 +16,120 @@ const v = T({
16
16
  closeOnClick: !1,
17
17
  preventClose: !1
18
18
  });
19
- function K({
20
- as: r,
21
- ref: s,
19
+ function _({
20
+ as: s,
21
+ ref: l,
22
22
  open: e,
23
- onClose: l,
23
+ duration: m = 300,
24
+ onClose: o,
25
+ onEnter: x,
26
+ onEntering: v,
27
+ onEntered: y,
28
+ onExit: c,
29
+ onExiting: b,
30
+ onExited: C,
24
31
  closeOnClick: u = !1,
25
- preventClose: f = !1,
26
- anchorEl: m = null,
27
- className: y,
28
- children: a,
29
- ...b
32
+ preventClose: M = !1,
33
+ anchorEl: k = null,
34
+ className: j,
35
+ children: R,
36
+ ...S
30
37
  }) {
31
- const C = I((t) => t.menu.base), d = r || "ul", n = 16, o = L(null), N = L({
38
+ const D = $((t) => t.menu.base), F = s || "ul", n = 16, i = N(null), T = N({
32
39
  left: n,
33
40
  right: n,
34
41
  top: n
35
- }), W = {
42
+ }), q = {
36
43
  entering: "scale-100 opacity-100",
37
44
  entered: "scale-100 opacity-100",
38
45
  exiting: "scale-90 opacity-0",
39
46
  exited: "scale-90 opacity-0",
40
47
  unmounted: ""
41
- }, z = k((t) => {
42
- N.current = t;
43
- }, []), O = k((t) => {
44
- var c, g, p;
45
- (c = o.current) == null || c.style.setProperty("--left", `${t.left}px`), (g = o.current) == null || g.style.setProperty("--right", `${t.right}px`), (p = o.current) == null || p.style.setProperty("--top", `${t.top}px`);
46
- }, []), h = k(() => {
47
- var R, E;
48
- if (!e || !m) return;
49
- const t = m.getBoundingClientRect(), c = window.innerWidth, g = window.innerHeight, p = ((R = o.current) == null ? void 0 : R.offsetWidth) || 150, S = ((E = o.current) == null ? void 0 : E.offsetHeight) || 200;
50
- let w = t.left, M = t.right, x = t.bottom;
51
- w = Math.min(Math.max(w, n), c - p - n), M = Math.min(
52
- Math.max(c - t.right, n),
53
- c - p - n
54
- ), x = Math.min(Math.max(x, n), g - S - n), z({ left: w, right: M, top: x }), O({ left: w, right: M, top: x });
55
- }, [e, m, z, O]), j = () => {
56
- f || l == null || l();
48
+ }, E = H((t) => {
49
+ T.current = t;
50
+ }, []), L = H((t) => {
51
+ var a, p, f;
52
+ (a = i.current) == null || a.style.setProperty("--left", `${t.left}px`), (p = i.current) == null || p.style.setProperty("--right", `${t.right}px`), (f = i.current) == null || f.style.setProperty("--top", `${t.top}px`);
53
+ }, []), d = H(() => {
54
+ var B, I;
55
+ if (!e || !k) return;
56
+ const t = k.getBoundingClientRect(), a = window.innerWidth, p = window.innerHeight, f = ((B = i.current) == null ? void 0 : B.offsetWidth) || 150, G = ((I = i.current) == null ? void 0 : I.offsetHeight) || 200;
57
+ let h = t.left, P = t.right, g = t.bottom;
58
+ h = Math.min(Math.max(h, n), a - f - n), P = Math.min(
59
+ Math.max(a - t.right, n),
60
+ a - f - n
61
+ ), g = Math.min(Math.max(g, n), p - G - n), E({ left: h, right: P, top: g }), L({ left: h, right: P, top: g });
62
+ }, [e, k, E, L]), A = () => {
63
+ M || o == null || o();
57
64
  };
58
- return B(() => {
59
- h();
60
- }, [h, a]), B(() => {
65
+ return W(() => {
66
+ d();
67
+ }, [d, R]), W(() => {
61
68
  const t = () => {
62
- h();
69
+ d();
63
70
  };
64
71
  return window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
65
72
  window.removeEventListener("scroll", t), window.removeEventListener("resize", t);
66
73
  };
67
- }, [h]), q(s, () => o.current), A("Escape", () => l(), {
74
+ }, [d]), U(l, () => i.current), V("Escape", () => o(), {
68
75
  conflictBehavior: "allow",
69
76
  ignoreInputs: !0,
70
- enabled: e && !f
71
- }), /* @__PURE__ */ i(G, { children: /* @__PURE__ */ i(J, { nodeRef: o, in: e, timeout: 300, unmountOnExit: !0, children: (t) => /* @__PURE__ */ i(
72
- v.Provider,
77
+ enabled: e && !M
78
+ }), /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(
79
+ Z,
73
80
  {
74
- value: {
75
- open: e,
76
- onClose: j,
77
- transitionState: t,
78
- closeOnClick: u,
79
- preventClose: f
80
- },
81
- children: /* @__PURE__ */ $(Q, { children: [
82
- /* @__PURE__ */ i(U, {}),
83
- /* @__PURE__ */ i(
84
- d,
85
- {
86
- ref: o,
87
- autoFocus: !0,
88
- "data-open": e,
89
- role: "menu",
90
- className: H(
91
- "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",
92
- C,
93
- W[t],
94
- y
95
- ),
96
- ...b,
97
- children: a
98
- }
99
- )
100
- ] })
81
+ nodeRef: i,
82
+ in: e,
83
+ timeout: m,
84
+ unmountOnExit: !0,
85
+ onEnter: x,
86
+ onEntering: v,
87
+ onEntered: y,
88
+ onExit: c,
89
+ onExiting: b,
90
+ onExited: C,
91
+ children: (t) => /* @__PURE__ */ r(
92
+ w.Provider,
93
+ {
94
+ value: {
95
+ open: e,
96
+ onClose: A,
97
+ transitionState: t,
98
+ closeOnClick: u,
99
+ preventClose: M
100
+ },
101
+ children: /* @__PURE__ */ J(tt, { children: [
102
+ /* @__PURE__ */ r(et, {}),
103
+ /* @__PURE__ */ r(
104
+ F,
105
+ {
106
+ ref: i,
107
+ autoFocus: !0,
108
+ "data-open": e,
109
+ role: "menu",
110
+ style: { transitionDuration: `${m}ms` },
111
+ className: O(
112
+ "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
+ D,
114
+ q[t],
115
+ j
116
+ ),
117
+ ...S,
118
+ children: R
119
+ }
120
+ )
121
+ ] })
122
+ }
123
+ )
101
124
  }
102
- ) }) });
125
+ ) });
103
126
  }
104
- function Q({ children: r }) {
105
- const { transitionState: s } = P(v);
106
- return /* @__PURE__ */ i(
127
+ function tt({ children: s }) {
128
+ const { transitionState: l } = z(w);
129
+ return /* @__PURE__ */ r(
107
130
  "div",
108
131
  {
109
- className: H(
132
+ className: O(
110
133
  "fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",
111
134
  {
112
135
  entering: "active pointer-events-auto",
@@ -114,55 +137,55 @@ function Q({ children: r }) {
114
137
  exiting: "pointer-events-none",
115
138
  exited: "pointer-events-none",
116
139
  unmounted: ""
117
- }[s]
140
+ }[l]
118
141
  ),
119
- children: r
142
+ children: s
120
143
  }
121
144
  );
122
145
  }
123
- function U() {
124
- const { onClose: r, preventClose: s } = P(v);
125
- return /* @__PURE__ */ i(
146
+ function et() {
147
+ const { onClose: s, preventClose: l } = z(w);
148
+ return /* @__PURE__ */ r(
126
149
  "div",
127
150
  {
128
- className: F(
151
+ className: K(
129
152
  "w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",
130
- s && "[&:active~*]:scale-95"
153
+ l && "[&:active~*]:scale-95"
131
154
  ),
132
- onClick: r
155
+ onClick: s
133
156
  }
134
157
  );
135
158
  }
136
- function V({
137
- as: r,
138
- closeOnClick: s,
159
+ function nt({
160
+ as: s,
161
+ closeOnClick: l,
139
162
  className: e,
140
- children: l,
141
- onClick: u,
142
- ...f
163
+ children: m,
164
+ onClick: o,
165
+ ...x
143
166
  }) {
144
- const m = I((d) => d.menu.item.base), { closeOnClick: y, onClose: a } = P(v), b = s ?? y, C = (d) => {
145
- b && (a == null || a()), u == null || u(d);
167
+ const v = $((u) => u.menu.item.base), { closeOnClick: y, onClose: c } = z(w), b = l ?? y, C = (u) => {
168
+ b && (c == null || c()), o == null || o(u);
146
169
  };
147
- return /* @__PURE__ */ i(
148
- D,
170
+ return /* @__PURE__ */ r(
171
+ X,
149
172
  {
150
- as: r ?? "li",
173
+ as: s ?? "li",
151
174
  color: "light",
152
175
  variant: "text",
153
176
  role: "menuitem",
154
- className: H(
177
+ className: O(
155
178
  "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",
156
- m,
179
+ v,
157
180
  e
158
181
  ),
159
182
  onClick: C,
160
- ...f,
161
- children: l
183
+ ...x,
184
+ children: m
162
185
  }
163
186
  );
164
187
  }
165
- K.Item = V;
188
+ _.Item = nt;
166
189
  export {
167
- K as default
190
+ _ as default
168
191
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=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:o="md",open:e=!1,onClose:a=()=>{},duration:i=300,preventClose:r=!1,className:b,children:v,...d}){const m=u(x=>x.modal.base),y=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,()=>y.current),C.useHotkey("Escape",()=>a(),{conflictBehavior:"allow",ignoreInputs:!0,enabled:e&&!r}),s.jsx(h,{children:s.jsx(w.default,{nodeRef:y,in:e,timeout:i,unmountOnExit:!0,children:x=>s.jsxs(q,{ref:y,"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:[s.jsx("div",{onClick:M,className:f("absolute inset-0 cursor-default opacity-0",r&&"[&:active~*]:scale-95")}),s.jsx(g.Provider,{value:{size:o,open:e,onClose:M,transitionState:x,duration:i},children:v})]})})})}function H({className:t,children:n,...o}){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:""},v=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 s.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,v,b[i],t),...o,children:n})}function N({className:t,...n}){const o=u(e=>e.modal.header.base);return s.jsx(p.Header,{className:f(o,t),...n})}function S({className:t,...n}){const o=u(e=>e.modal.body.base);return s.jsx(p.Body,{className:f(o,t),...n})}function k({className:t,...n}){const o=u(e=>e.modal.footer.base);return s.jsx(p.Footer,{className:f(o,t),...n})}c.Dialog=H;c.Header=N;c.Body=S;c.Footer=k;exports.ModalContext=g;exports.default=c;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),m=require("../../helpers/cn.cjs.js"),r=require("../../hooks/useClasses.cjs.js"),i=require("react"),k=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),z=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),x=require("../Card/index.cjs.js"),R=require("../Portal/index.cjs.js"),B=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),j=i.createContext({size:"md",open:!1,onClose:()=>{},transitionState:"unmounted",duration:300});function l({as:t,ref:n,size:o="md",open:e=!1,onClose:a=()=>{},onEnter:f,onEntering:p,onEntered:b,onExit:v,onExiting:u,onExited:c,duration:y=300,preventClose:g=!1,className:C,children:h,...w}){const H=r(d=>d.modal.base),M=i.useRef(null),N=t||"div",S={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=()=>{g||a()};return i.useImperativeHandle(n,()=>M.current),k.useHotkey("Escape",()=>a(),{conflictBehavior:"allow",ignoreInputs:!0,enabled:e&&!g}),s.jsx(R,{children:s.jsx(B.default,{nodeRef:M,in:e,timeout:y,unmountOnExit:!0,onEnter:f,onEntering:p,onEntered:b,onExit:v,onExiting:u,onExited:c,children:d=>s.jsxs(N,{ref:M,"data-open":e,style:{transitionDuration:`${y}ms`},className:z.twMerge("modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",H,S[d],C),...w,children:[s.jsx("div",{onClick:q,className:m("absolute inset-0 cursor-default opacity-0",g&&"[&:active~*]:scale-95")}),s.jsx(j.Provider,{value:{size:o,open:e,onClose:q,transitionState:d,duration:y},children:h})]})})})}function D({className:t,children:n,...o}){const e=r(u=>u.modal.dialog),{size:a,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]"}[a],(c=e==null?void 0:e.size)==null?void 0:c[a]]},[a,e==null?void 0:e.size]);return s.jsx(x,{as:"div",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),...o,children:n})}function F({className:t,...n}){const o=r(e=>e.modal.header.base);return s.jsx(x.Header,{className:m(o,t),...n})}function $({className:t,...n}){const o=r(e=>e.modal.body.base);return s.jsx(x.Body,{className:m(o,t),...n})}function E({className:t,...n}){const o=r(e=>e.modal.footer.base);return s.jsx(x.Footer,{className:m(o,t),...n})}l.Dialog=D;l.Header=F;l.Body=$;l.Footer=E;exports.ModalContext=j;exports.default=l;
@@ -1,4 +1,4 @@
1
- import { ComponentPropsWithAs, Size, ToggleProps } from '../../types';
1
+ import { ComponentPropsWithAs, Size, ToggleEventProps, ToggleProps } from '../../types';
2
2
  import { ComponentProps, ElementType } from 'react';
3
3
  import { TransitionStatus } from 'react-transition-group';
4
4
  type Context = {
@@ -10,13 +10,13 @@ type ModalProps = {
10
10
  size?: Size;
11
11
  duration?: number;
12
12
  preventClose?: boolean;
13
- } & Partial<ToggleProps>;
13
+ } & Partial<ToggleEventProps> & Partial<ToggleProps>;
14
14
  type ModalDialogProps = Omit<ComponentProps<"div">, "as" | "ref">;
15
15
  type ModalHeaderProps = ComponentProps<"div">;
16
16
  type ModalBodyProps = ComponentProps<"div">;
17
17
  type ModalFooterProps = ComponentProps<"div">;
18
18
  export declare const ModalContext: import('react').Context<Context>;
19
- declare function Modal<E extends ElementType = "div">({ as, ref, size, open, onClose, duration, preventClose, className, children, ...props }: ComponentPropsWithAs<E, ModalProps>): import("react/jsx-runtime").JSX.Element;
19
+ declare function Modal<E extends ElementType = "div">({ as, ref, size, open, onClose, onEnter, onEntering, onEntered, onExit, onExiting, onExited, duration, preventClose, className, children, ...props }: ComponentPropsWithAs<E, ModalProps>): import("react/jsx-runtime").JSX.Element;
20
20
  declare namespace Modal {
21
21
  var Dialog: typeof ModalDialog;
22
22
  var Header: typeof ModalHeader;
@@ -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,EAC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;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,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,2CAuErC;kBAxFQ,KAAK;;;;;;AAyFd,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"}
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { jsx as a, jsxs as h } from "react/jsx-runtime";
3
- import u from "../../helpers/cn.es.js";
4
- import l from "../../hooks/useClasses.es.js";
5
- import { createContext as w, useRef as N, useImperativeHandle as H, useContext as k, useMemo as B } from "react";
6
- import { useHotkey as D } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
7
- import { twMerge as g } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
8
- import f from "../Card/index.es.js";
9
- import S from "../Portal/index.es.js";
10
- import F from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
- const z = w({
2
+ import { jsx as a, jsxs as D } from "react/jsx-runtime";
3
+ import m from "../../helpers/cn.es.js";
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";
7
+ import { twMerge as C } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
8
+ import d from "../Card/index.es.js";
9
+ import P from "../Portal/index.es.js";
10
+ import $ from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
+ const M = S({
12
12
  size: "md",
13
13
  open: !1,
14
14
  onClose: () => {
@@ -16,98 +16,119 @@ const z = w({
16
16
  transitionState: "unmounted",
17
17
  duration: 300
18
18
  });
19
- function p({
19
+ function u({
20
20
  as: t,
21
21
  ref: o,
22
22
  size: n = "md",
23
23
  open: e = !1,
24
24
  onClose: i = () => {
25
25
  },
26
- duration: s = 300,
27
- preventClose: r = !1,
28
- className: x,
29
- children: v,
30
- ...c
26
+ onEnter: f,
27
+ onEntering: p,
28
+ onEntered: x,
29
+ onExit: v,
30
+ onExiting: r,
31
+ onExited: l,
32
+ duration: y = 300,
33
+ preventClose: b = !1,
34
+ className: h,
35
+ children: w,
36
+ ...N
31
37
  }) {
32
- const m = l((d) => d.modal.base), y = N(null), C = t || "div", M = {
38
+ const H = s((c) => c.modal.base), g = F(null), k = t || "div", B = {
33
39
  entering: "active opacity-100 pointer-events-auto",
34
40
  entered: "active opacity-100 pointer-events-auto",
35
41
  exiting: "opacity-0 pointer-events-none",
36
42
  exited: "opacity-0 pointer-events-none",
37
43
  unmounted: ""
38
- }, b = () => {
39
- r || i();
44
+ }, z = () => {
45
+ b || i();
40
46
  };
41
- return H(o, () => y.current), D("Escape", () => i(), {
47
+ return R(o, () => g.current), I("Escape", () => i(), {
42
48
  conflictBehavior: "allow",
43
49
  ignoreInputs: !0,
44
- enabled: e && !r
45
- }), /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(F, { nodeRef: y, in: e, timeout: s, unmountOnExit: !0, children: (d) => /* @__PURE__ */ h(
46
- C,
50
+ enabled: e && !b
51
+ }), /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a(
52
+ $,
47
53
  {
48
- ref: y,
49
- "data-open": e,
50
- style: { transitionDuration: `${s}ms` },
51
- className: g(
52
- "modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",
53
- m,
54
- M[d],
55
- x
56
- ),
57
- ...c,
58
- children: [
59
- /* @__PURE__ */ a(
60
- "div",
61
- {
62
- onClick: b,
63
- className: u(
64
- "absolute inset-0 cursor-default opacity-0",
65
- r && "[&:active~*]:scale-95"
54
+ nodeRef: g,
55
+ in: e,
56
+ timeout: y,
57
+ unmountOnExit: !0,
58
+ onEnter: f,
59
+ onEntering: p,
60
+ onEntered: x,
61
+ onExit: v,
62
+ onExiting: r,
63
+ onExited: l,
64
+ children: (c) => /* @__PURE__ */ D(
65
+ k,
66
+ {
67
+ ref: g,
68
+ "data-open": e,
69
+ style: { transitionDuration: `${y}ms` },
70
+ className: C(
71
+ "modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",
72
+ H,
73
+ B[c],
74
+ h
75
+ ),
76
+ ...N,
77
+ children: [
78
+ /* @__PURE__ */ a(
79
+ "div",
80
+ {
81
+ onClick: z,
82
+ className: m(
83
+ "absolute inset-0 cursor-default opacity-0",
84
+ b && "[&:active~*]:scale-95"
85
+ )
86
+ }
87
+ ),
88
+ /* @__PURE__ */ a(
89
+ M.Provider,
90
+ {
91
+ value: {
92
+ size: n,
93
+ open: e,
94
+ onClose: z,
95
+ transitionState: c,
96
+ duration: y
97
+ },
98
+ children: w
99
+ }
66
100
  )
67
- }
68
- ),
69
- /* @__PURE__ */ a(
70
- z.Provider,
71
- {
72
- value: {
73
- size: n,
74
- open: e,
75
- onClose: b,
76
- transitionState: d,
77
- duration: s
78
- },
79
- children: v
80
- }
81
- )
82
- ]
101
+ ]
102
+ }
103
+ )
83
104
  }
84
- ) }) });
105
+ ) });
85
106
  }
86
- function R({ className: t, children: o, ...n }) {
87
- const e = l((c) => c.modal.dialog), { size: i, transitionState: s, duration: r } = k(z), x = {
107
+ function O({ className: t, children: o, ...n }) {
108
+ const e = s((r) => r.modal.dialog), { size: i, transitionState: f, duration: p } = j(M), x = {
88
109
  entering: "scale-100",
89
110
  entered: "scale-100",
90
111
  exiting: "scale-75",
91
112
  exited: "scale-75",
92
113
  unmounted: ""
93
- }, v = B(() => {
94
- var m;
114
+ }, v = E(() => {
115
+ var l;
95
116
  return [{
96
117
  sm: "min-[576px]:w-[300px]",
97
118
  md: "min-[576px]:w-[500px]",
98
119
  lg: "min-[992px]:w-[800px]"
99
- }[i], (m = e == null ? void 0 : e.size) == null ? void 0 : m[i]];
120
+ }[i], (l = e == null ? void 0 : e.size) == null ? void 0 : l[i]];
100
121
  }, [i, e == null ? void 0 : e.size]);
101
122
  return /* @__PURE__ */ a(
102
- f,
123
+ d,
103
124
  {
104
125
  as: "div",
105
- style: { transitionDuration: `${r}ms` },
106
- className: g(
126
+ style: { transitionDuration: `${p}ms` },
127
+ className: C(
107
128
  "max-w-full max-h-full m-auto transition-transform",
108
129
  e == null ? void 0 : e.base,
109
130
  v,
110
- x[s],
131
+ x[f],
111
132
  t
112
133
  ),
113
134
  ...n,
@@ -115,23 +136,23 @@ function R({ className: t, children: o, ...n }) {
115
136
  }
116
137
  );
117
138
  }
118
- function j({ className: t, ...o }) {
119
- const n = l((e) => e.modal.header.base);
120
- return /* @__PURE__ */ a(f.Header, { className: u(n, t), ...o });
139
+ function T({ className: t, ...o }) {
140
+ const n = s((e) => e.modal.header.base);
141
+ return /* @__PURE__ */ a(d.Header, { className: m(n, t), ...o });
121
142
  }
122
- function E({ className: t, ...o }) {
123
- const n = l((e) => e.modal.body.base);
124
- return /* @__PURE__ */ a(f.Body, { className: u(n, t), ...o });
143
+ function q({ className: t, ...o }) {
144
+ const n = s((e) => e.modal.body.base);
145
+ return /* @__PURE__ */ a(d.Body, { className: m(n, t), ...o });
125
146
  }
126
- function I({ className: t, ...o }) {
127
- const n = l((e) => e.modal.footer.base);
128
- return /* @__PURE__ */ a(f.Footer, { className: u(n, t), ...o });
147
+ function A({ className: t, ...o }) {
148
+ const n = s((e) => e.modal.footer.base);
149
+ return /* @__PURE__ */ a(d.Footer, { className: m(n, t), ...o });
129
150
  }
130
- p.Dialog = R;
131
- p.Header = j;
132
- p.Body = E;
133
- p.Footer = I;
151
+ u.Dialog = O;
152
+ u.Header = T;
153
+ u.Body = q;
154
+ u.Footer = A;
134
155
  export {
135
- z as ModalContext,
136
- p as default
156
+ M as ModalContext,
157
+ u as default
137
158
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Accordion/index.cjs.js"),r=require("./Alert/index.cjs.js"),i=require("./Avatar/index.cjs.js"),n=require("./Badge/index.cjs.js"),t=require("./Button/index.cjs.js"),o=require("./ButtonGroup/index.cjs.js"),u=require("./Card/index.cjs.js"),d=require("./Divider/index.cjs.js"),c=require("./Drawer/index.cjs.js"),s=require("./Fill/index.cjs.js"),q=require("./InputGroup/index.cjs.js"),x=require("./Menu/index.cjs.js"),$=require("./Modal/index.cjs.js"),a=require("./Portal/index.cjs.js"),l=require("./Progress/index.cjs.js"),p=require("./Skeleton/index.cjs.js"),f=require("./Spacer/index.cjs.js"),S=require("./Spinner/index.cjs.js"),g=require("./Stack/index.cjs.js"),b=require("./Switch/index.cjs.js"),T=require("./Table/index.cjs.js"),y=require("./Tabs/index.cjs.js"),h=require("./Tooltip/index.cjs.js"),k=require("./Typography/index.cjs.js");;/* empty css */exports.Accordion=e;exports.Alert=r.default;exports.Avatar=i;exports.Badge=n;exports.Button=t;exports.ButtonGroup=o.default;exports.Card=u;exports.Divider=d;exports.Drawer=c.default;exports.Fill=s;exports.InputGroup=q;exports.Menu=x;exports.Modal=$.default;exports.Portal=a;exports.Progress=l;exports.Skeleton=p;exports.Spacer=f;exports.Spinner=S;exports.Stack=g;exports.Switch=b;exports.Table=T;exports.Tabs=y.default;exports.Tooltip=h;exports.Typography=k;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Accordion/index.cjs.js"),r=require("./Alert/index.cjs.js"),i=require("./Avatar/index.cjs.js"),n=require("./Badge/index.cjs.js"),t=require("./Button/index.cjs.js"),o=require("./ButtonGroup/index.cjs.js"),u=require("./Card/index.cjs.js"),d=require("./Divider/index.cjs.js"),c=require("./Drawer/index.cjs.js"),s=require("./Fill/index.cjs.js"),q=require("./InputGroup/index.cjs.js"),x=require("./Menu/index.cjs.js"),$=require("./Modal/index.cjs.js"),a=require("./Portal/index.cjs.js"),l=require("./Progress/index.cjs.js"),p=require("./Skeleton/index.cjs.js"),f=require("./Spacer/index.cjs.js"),S=require("./Spinner/index.cjs.js"),g=require("./Stack/index.cjs.js"),b=require("./Switch/index.cjs.js"),T=require("./Table/index.cjs.js"),y=require("./Tabs/index.cjs.js"),h=require("./Tooltip/index.cjs.js"),k=require("./Typography/index.cjs.js");exports.Accordion=e;exports.Alert=r.default;exports.Avatar=i;exports.Badge=n;exports.Button=t;exports.ButtonGroup=o.default;exports.Card=u;exports.Divider=d;exports.Drawer=c.default;exports.Fill=s;exports.InputGroup=q;exports.Menu=x;exports.Modal=$.default;exports.Portal=a;exports.Progress=l;exports.Skeleton=p;exports.Spacer=f;exports.Spinner=S;exports.Stack=g;exports.Switch=b;exports.Table=T;exports.Tabs=y.default;exports.Tooltip=h;exports.Typography=k;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE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AC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,52 +1,51 @@
1
1
  "use client";
2
- import { default as e } from "./Accordion/index.es.js";
3
- import { default as f } from "./Alert/index.es.js";
4
- import { default as p } from "./Avatar/index.es.js";
5
- import { default as d } from "./Badge/index.es.js";
6
- import { default as m } from "./Button/index.es.js";
7
- import { default as i } from "./ButtonGroup/index.es.js";
8
- import { default as c } from "./Card/index.es.js";
9
- import { default as T } from "./Divider/index.es.js";
10
- import { default as A } from "./Drawer/index.es.js";
11
- import { default as b } from "./Fill/index.es.js";
12
- import { default as k } from "./InputGroup/index.es.js";
13
- import { default as w } from "./Menu/index.es.js";
14
- import { default as D } from "./Modal/index.es.js";
15
- import { default as M } from "./Portal/index.es.js";
16
- import { default as C } from "./Progress/index.es.js";
17
- import { default as I } from "./Skeleton/index.es.js";
18
- import { default as q } from "./Spacer/index.es.js";
19
- import { default as E } from "./Spinner/index.es.js";
20
- import { default as J } from "./Stack/index.es.js";
21
- import { default as L } from "./Switch/index.es.js";
22
- import { default as O } from "./Table/index.es.js";
23
- import { default as R } from "./Tabs/index.es.js";
24
- import { default as V } from "./Tooltip/index.es.js";
25
- import { default as X } from "./Typography/index.es.js";
26
- /* empty css */
2
+ import { default as o } from "./Accordion/index.es.js";
3
+ import { default as a } from "./Alert/index.es.js";
4
+ import { default as l } from "./Avatar/index.es.js";
5
+ import { default as u } from "./Badge/index.es.js";
6
+ import { default as s } from "./Button/index.es.js";
7
+ import { default as x } from "./ButtonGroup/index.es.js";
8
+ import { default as i } from "./Card/index.es.js";
9
+ import { default as S } from "./Divider/index.es.js";
10
+ import { default as g } from "./Drawer/index.es.js";
11
+ import { default as B } from "./Fill/index.es.js";
12
+ import { default as h } from "./InputGroup/index.es.js";
13
+ import { default as v } from "./Menu/index.es.js";
14
+ import { default as y } from "./Modal/index.es.js";
15
+ import { default as G } from "./Portal/index.es.js";
16
+ import { default as P } from "./Progress/index.es.js";
17
+ import { default as F } from "./Skeleton/index.es.js";
18
+ import { default as j } from "./Spacer/index.es.js";
19
+ import { default as z } from "./Spinner/index.es.js";
20
+ import { default as H } from "./Stack/index.es.js";
21
+ import { default as K } from "./Switch/index.es.js";
22
+ import { default as N } from "./Table/index.es.js";
23
+ import { default as Q } from "./Tabs/index.es.js";
24
+ import { default as U } from "./Tooltip/index.es.js";
25
+ import { default as W } from "./Typography/index.es.js";
27
26
  export {
28
- e as Accordion,
29
- f as Alert,
30
- p as Avatar,
31
- d as Badge,
32
- m as Button,
33
- i as ButtonGroup,
34
- c as Card,
35
- T as Divider,
36
- A as Drawer,
37
- b as Fill,
38
- k as InputGroup,
39
- w as Menu,
40
- D as Modal,
41
- M as Portal,
42
- C as Progress,
43
- I as Skeleton,
44
- q as Spacer,
45
- E as Spinner,
46
- J as Stack,
47
- L as Switch,
48
- O as Table,
49
- R as Tabs,
50
- V as Tooltip,
51
- X as Typography
27
+ o as Accordion,
28
+ a as Alert,
29
+ l as Avatar,
30
+ u as Badge,
31
+ s as Button,
32
+ x as ButtonGroup,
33
+ i as Card,
34
+ S as Divider,
35
+ g as Drawer,
36
+ B as Fill,
37
+ h as InputGroup,
38
+ v as Menu,
39
+ y as Modal,
40
+ G as Portal,
41
+ P as Progress,
42
+ F as Skeleton,
43
+ j as Spacer,
44
+ z as Spinner,
45
+ H as Stack,
46
+ K as Switch,
47
+ N as Table,
48
+ Q as Tabs,
49
+ U as Tooltip,
50
+ W as Typography
52
51
  };
@@ -38,6 +38,14 @@ export type ToggleProps = {
38
38
  open: boolean;
39
39
  onClose: VoidFunction;
40
40
  };
41
+ export type ToggleEventProps = {
42
+ onEnter: VoidFunction;
43
+ onEntering: VoidFunction;
44
+ onEntered: VoidFunction;
45
+ onExit: VoidFunction;
46
+ onExiting: VoidFunction;
47
+ onExited: VoidFunction;
48
+ };
41
49
  export type RecursivePartial<T> = {
42
50
  [P in keyof T]?: RecursivePartial<T[P]>;
43
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D,MAAM,MAAM,uBAAuB,CACjC,CAAC,SAAS,WAAW,EAErB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,IACpC,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AACzC,MAAM,MAAM,oBAAoB,CAC9B,CAAC,SAAS,WAAW,EAErB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,IACpC,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC;AAE7D,MAAM,WAAW,kBAAkB;CAAG;AACtC,MAAM,WAAW,mBAAmB;CAAG;AACvC,MAAM,WAAW,kBAAkB;CAAG;AACtC,MAAM,WAAW,uBAAuB;CAAG;AAC3C,MAAM,WAAW,WAAW;CAAG;AAC/B,MAAM,WAAW,UAAU;CAAG;AAE9B,KAAK,gBAAgB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACrD,KAA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C;IACrB,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC;CACxB,CAAC;AACF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;KAC/B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACxC,CAAC;AACF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reaxify",
3
3
  "private": false,
4
- "version": "0.0.94",
4
+ "version": "0.0.95",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [
package/dist/reaxify.css DELETED
@@ -1 +0,0 @@
1
- /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */html:has([role=menu][data-open=true]){scrollbar-gutter:stable}body:has([data-open=true]){overscroll-behavior:none;overflow:hidden}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=password]::-ms-reveal{display:none!important}input[type=password]::-ms-clear{display:none!important}input[type=password]::-webkit-clear-button{display:none!important}input[type=password]::-webkit-credentials-auto-fill-button{display:none!important}input[type=password]{-webkit-text-security:disc}textarea::-webkit-scrollbar{display:none}textarea{-ms-overflow-style:none;scrollbar-width:none}strong,b{font-weight:700}.animate-linear-progress-1{animation:3.2s cubic-bezier(.65,.815,.735,.395) infinite linear-progress-1}.animate-linear-progress-2{animation:3.2s cubic-bezier(.165,.84,.44,1) 1.2s infinite linear-progress-2}@keyframes linear-progress-1{0%{width:35%;inset-inline-start:-35%}60%{width:100%;inset-inline-start:100%}to{width:100%;inset-inline-start:100%}}@keyframes linear-progress-2{0%{width:100%;inset-inline-start:-200%}60%{width:10%;inset-inline-start:107%}to{width:10%;inset-inline-start:107%}}