@gv-tech/ui-web 2.19.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion-Be1vGv6M.js +1 -0
- package/dist/accordion-DXnU0LgU.mjs +221 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -259
- package/dist/alert-dialog-BXRY0Ghq.js +7 -0
- package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
- package/dist/alert-dialog.cjs +1 -7
- package/dist/alert-dialog.mjs +4 -171
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +35 -32
- package/dist/aspect-ratio-BP5HarYZ.js +1 -0
- package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +3 -43
- package/dist/avatar-klFl8Sqa.js +1 -0
- package/dist/avatar-vGm9JN1a.mjs +184 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +3 -205
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +21 -24
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +60 -68
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +40 -40
- package/dist/calendar-aIuSXzs7.js +1 -0
- package/dist/calendar-oitID53a.mjs +3154 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +4 -2976
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +42 -32
- package/dist/carousel-BjTSkVh9.js +1 -0
- package/dist/carousel-CENzZCXN.mjs +1178 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +4 -1403
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +3 -35
- package/dist/chart.mjs +123 -182
- package/dist/checkbox-Bwq7mXA2.mjs +170 -0
- package/dist/checkbox-DzEO1q4R.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +3 -258
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +6 -7
- package/dist/command-D7hksKY6.js +1 -0
- package/dist/command-Ws_iF1hM.mjs +531 -0
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +3 -396
- package/dist/context-menu-DJbgNJ7N.js +1 -0
- package/dist/context-menu-fu39gePi.mjs +292 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +3 -328
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +50 -66
- package/dist/dist-0FXx-pUX.js +1 -0
- package/dist/dist-4A0ut6a8.mjs +10 -0
- package/dist/dist-ALQAoSGx.mjs +10 -0
- package/dist/dist-B4N_7Tps.js +1 -0
- package/dist/dist-B5776DvK.js +5 -0
- package/dist/dist-B57mzJP3.mjs +28 -0
- package/dist/dist-B5VmV2K7.js +1 -0
- package/dist/dist-BBRD-Qfb.js +1 -0
- package/dist/dist-BC_VB6JL.mjs +25 -0
- package/dist/dist-BKFtvTm8.mjs +6 -0
- package/dist/dist-BUS_s_6N.js +1 -0
- package/dist/dist-BVKPqhkg.js +1 -0
- package/dist/dist-Ba7mQG9D.mjs +117 -0
- package/dist/dist-BeFCyPgD.js +1 -0
- package/dist/dist-Bf4P28CV.js +1 -0
- package/dist/dist-BfFVoFJN.js +1 -0
- package/dist/dist-BhtQH_6Z.js +1 -0
- package/dist/dist-BmjFh8i_.mjs +5 -0
- package/dist/dist-BrCTkQXt.mjs +62 -0
- package/dist/dist-BxmpAHsT.mjs +219 -0
- package/dist/dist-C2ArLRnq.js +1 -0
- package/dist/dist-C2pRTcV_.mjs +62 -0
- package/dist/dist-C9wnUiS4.mjs +27 -0
- package/dist/dist-CIRItnqs.js +1 -0
- package/dist/dist-CL1DhkaL.js +1 -0
- package/dist/dist-CRe7xawr.js +1 -0
- package/dist/dist-CUFjt0cI.js +1 -0
- package/dist/dist-CaaGWewc.mjs +557 -0
- package/dist/dist-Ci2whnVp.js +1 -0
- package/dist/dist-CmBtqW5f.js +1 -0
- package/dist/dist-CsEsK2jW.js +1 -0
- package/dist/dist-CscAxhT8.js +1 -0
- package/dist/dist-CvtF5JdF.mjs +95 -0
- package/dist/dist-Cvwtowos.mjs +77 -0
- package/dist/dist-D2f83VMO.mjs +73 -0
- package/dist/dist-Dh_jWJh-.mjs +11 -0
- package/dist/dist-DikyKBU3.mjs +12 -0
- package/dist/dist-DmmUjo_P.js +1 -0
- package/dist/dist-DqvQ5UFr.mjs +38 -0
- package/dist/dist-FGQAMrhH.mjs +29 -0
- package/dist/dist-Jtk3jeb9.mjs +18 -0
- package/dist/dist-Kqk0oQYU.js +1 -0
- package/dist/dist-VI9bl_Wk.mjs +45 -0
- package/dist/dist-Z7lEV5Nx.mjs +1282 -0
- package/dist/dist-_Osar3kp.js +1 -0
- package/dist/dist-bDoR0CBU.mjs +112 -0
- package/dist/dist-cRjbOZRf.js +1 -0
- package/dist/dist-d_pecHgw.mjs +66 -0
- package/dist/dist-r36zVVcK.js +1 -0
- package/dist/dist-sRlXdzvf.mjs +152 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +48 -54
- package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
- package/dist/dropdown-menu-uGMnmGL-.js +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +3 -316
- package/dist/es2015-Cx0gpR1a.js +41 -0
- package/dist/es2015-a1b8kENC.mjs +701 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +76 -67
- package/dist/hover-card-DdIYJP-Q.mjs +167 -0
- package/dist/hover-card-Ua-2KlY-.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +3 -188
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -35
- package/dist/index.mjs +56 -296
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +14 -19
- package/dist/jsx-runtime-CN3qjQQx.js +6 -0
- package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
- package/dist/label-8YSUv4kt.js +1 -0
- package/dist/label-Bur66PVg.mjs +22 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +3 -22
- package/dist/menubar-Bq1Sfbf5.js +1 -0
- package/dist/menubar-D2fY6zkQ.mjs +410 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +3 -473
- package/dist/navigation-menu-BuOakbgA.mjs +602 -0
- package/dist/navigation-menu-so6EvLAY.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +3 -673
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +63 -68
- package/dist/popover-BUADXRkO.mjs +201 -0
- package/dist/popover-nBrSPqHk.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +3 -242
- package/dist/progress-BTApMbqg.js +6 -0
- package/dist/progress-BbN-RNvs.mjs +81 -0
- package/dist/progress.cjs +1 -6
- package/dist/progress.mjs +3 -99
- package/dist/radio-group-C5oprOrt.mjs +193 -0
- package/dist/radio-group-FDXr6VLM.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +3 -253
- package/dist/resizable-ChdgCzzx.mjs +1534 -0
- package/dist/resizable-ztiFzq_y.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +3 -1990
- package/dist/scroll-area-3o0-cc3n.mjs +520 -0
- package/dist/scroll-area-DXZqIKXN.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +3 -546
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +71 -84
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +53 -63
- package/dist/select-B2qM503G.mjs +744 -0
- package/dist/select-BHCeW-MD.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +3 -908
- package/dist/separator-BZJ-SDvg.js +1 -0
- package/dist/separator-DJ_IwKUQ.mjs +31 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +3 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +59 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +13 -7
- package/dist/slider-CJJPQ0fH.mjs +366 -0
- package/dist/slider-DHccqrW2.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +3 -442
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.mjs +21 -24
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +81 -117
- package/dist/switch-BbcAUYjl.mjs +103 -0
- package/dist/switch-DZfRzgWs.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +3 -149
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +159 -155
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +58 -57
- package/dist/tabs-BEy0IIV0.js +1 -0
- package/dist/tabs-DqAKyl9T.mjs +136 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +3 -195
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +41 -42
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +12 -17
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.mjs +15 -7
- package/dist/theme-toggle-DKQmD-FO.js +1 -0
- package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +3 -8
- package/dist/toast-C84Cpidq.js +1 -0
- package/dist/toast-CQbUslcw.mjs +427 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +3 -494
- package/dist/toaster-BpcpNRz1.js +1 -0
- package/dist/toaster-i6giQYiq.mjs +126 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +3 -6
- package/dist/toggle-group-B2S7fkhA.mjs +155 -0
- package/dist/toggle-group-BNn6MNiJ.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +3 -170
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +19 -14
- package/dist/tooltip-CElrNodA.js +1 -0
- package/dist/tooltip-oKfTBTbv.mjs +364 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -342
- package/dist/utils-BxDanjP7.js +1 -0
- package/dist/utils-yc5uc46c.mjs +11 -0
- package/package.json +2 -2
- package/src/chart.tsx +7 -7
- package/src/setupTests.ts +5 -4
- package/dist/index-0ioNhtNM.mjs +0 -10
- package/dist/index-3j-XAIXT.mjs +0 -55
- package/dist/index-B2XtpfGY.js +0 -1
- package/dist/index-B39Lzq0v.js +0 -1
- package/dist/index-B7n6fy75.js +0 -1
- package/dist/index-B8dxbSWX.js +0 -41
- package/dist/index-BGIK9FQF.js +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -8
- package/dist/index-BoNjHhm4.js +0 -1
- package/dist/index-BtZvtDmp.js +0 -1
- package/dist/index-Bv7qrYW6.mjs +0 -180
- package/dist/index-ByiPJW53.js +0 -5
- package/dist/index-C0dlIQIi.js +0 -1
- package/dist/index-C1qb0595.mjs +0 -27
- package/dist/index-C7HEunrh.mjs +0 -15
- package/dist/index-C8ni3LLa.js +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -6
- package/dist/index-CD6_IrA-.mjs +0 -10
- package/dist/index-CRyCZJLa.mjs +0 -677
- package/dist/index-CVx1AgNG.mjs +0 -615
- package/dist/index-Ce5TOFAK.js +0 -1
- package/dist/index-CeSLNJ60.mjs +0 -32
- package/dist/index-CefEQe_4.js +0 -1
- package/dist/index-Cj5hzyBi.js +0 -1
- package/dist/index-Cjj_rUPu.js +0 -1
- package/dist/index-Cl3G0jzM.js +0 -1
- package/dist/index-CwfE56Ep.mjs +0 -1545
- package/dist/index-CwyAfCwY.js +0 -1
- package/dist/index-CzY-WZXL.js +0 -1
- package/dist/index-D2HnlO3y.js +0 -1
- package/dist/index-DFdF7K7v.mjs +0 -50
- package/dist/index-DIsg7zU7.js +0 -1
- package/dist/index-DKN_vhyX.mjs +0 -32
- package/dist/index-DLcqcWxM.mjs +0 -29
- package/dist/index-DSxf1gN6.mjs +0 -118
- package/dist/index-DYxWvftI.js +0 -1
- package/dist/index-DaILh3TV.mjs +0 -32
- package/dist/index-Dfzl8TxY.mjs +0 -136
- package/dist/index-Dko2XdTk.js +0 -1
- package/dist/index-DlY82G31.mjs +0 -245
- package/dist/index-DnFcfnA9.mjs +0 -13
- package/dist/index-IZ2gq03c.mjs +0 -68
- package/dist/index-K9FzbxYw.mjs +0 -93
- package/dist/index-Le8p9oP4.mjs +0 -60
- package/dist/index-MQ0c3ZX_.js +0 -1
- package/dist/index-_XxjJPRD.js +0 -1
- package/dist/index-_wdrnYim.js +0 -1
- package/dist/index-jv3B4mTd.js +0 -1
- package/dist/index-kaM0u2Q1.js +0 -1
- package/dist/index-p6xVFRb4.mjs +0 -52
- package/dist/index-rKs9bXHr.mjs +0 -6
- package/dist/index-vuPgkS0V.mjs +0 -70
- package/dist/jsx-runtime-nZSsnGb7.js +0 -6
- package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
- package/dist/theme-toggle-DXQGNfCe.js +0 -1
- package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
- package/dist/toaster-C_S9hnXa.js +0 -1
- package/dist/toaster-k5DnQSsh.mjs +0 -118
- package/dist/utils-DY6fhrgS.mjs +0 -12
- package/dist/utils-cdbZV8DZ.js +0 -1
package/dist/index-CwyAfCwY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("react"),l=require("react-dom"),f=require("./index-BtZvtDmp.js"),d=require("./index-MQ0c3ZX_.js"),p=require("./jsx-runtime-nZSsnGb7.js");function m(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=m(u);var P="Portal",c=a.forwardRef((e,r)=>{const{container:t,...n}=e,[s,i]=a.useState(!1);d.useLayoutEffect2(()=>i(!0),[]);const o=t||s&&globalThis?.document?.body;return o?l.createPortal(p.jsxRuntimeExports.jsx(f.Primitive.div,{...n,ref:r}),o):null});c.displayName=P;exports.Portal=c;
|
package/dist/index-CzY-WZXL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("react");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const n=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,n.get?n:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const r=a(u);function o(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...c)=>t.current?.(...c),[])}exports.useCallbackRef=o;
|
package/dist/index-D2HnlO3y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const b=require("react"),v=require("./jsx-runtime-nZSsnGb7.js");function j(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const i=j(b);function P(e,o){const t=i.createContext(o),s=c=>{const{children:n,...r}=c,u=i.useMemo(()=>r,Object.values(r));return v.jsxRuntimeExports.jsx(t.Provider,{value:u,children:n})};s.displayName=e+"Provider";function a(c){const n=i.useContext(t);if(n)return n;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[s,a]}function _(e,o=[]){let t=[];function s(c,n){const r=i.createContext(n),u=t.length;t=[...t,n];const d=p=>{const{scope:f,children:l,...x}=p,C=f?.[e]?.[u]||r,S=i.useMemo(()=>x,Object.values(x));return v.jsxRuntimeExports.jsx(C.Provider,{value:S,children:l})};d.displayName=c+"Provider";function m(p,f){const l=f?.[e]?.[u]||r,x=i.useContext(l);if(x)return x;if(n!==void 0)return n;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[d,m]}const a=()=>{const c=t.map(n=>i.createContext(n));return function(r){const u=r?.[e]||c;return i.useMemo(()=>({[`__scope${e}`]:{...r,[e]:u}}),[r,u])}};return a.scopeName=e,[s,h(a,...o)]}function h(...e){const o=e[0];if(e.length===1)return o;const t=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const n=s.reduce((r,{useScope:u,scopeName:d})=>{const p=u(c)[`__scope${d}`];return{...r,...p}},{});return i.useMemo(()=>({[`__scope${o.scopeName}`]:n}),[n])}};return t.scopeName=o.scopeName,t}exports.createContext2=P;exports.createContextScope=_;
|
package/dist/index-DFdF7K7v.mjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import { c as y } from "./index-IZ2gq03c.mjs";
|
|
3
|
-
import { u as S } from "./index-DLcqcWxM.mjs";
|
|
4
|
-
import { a as M } from "./index-K9FzbxYw.mjs";
|
|
5
|
-
import { j as d } from "./jsx-runtime-tc70JA_2.mjs";
|
|
6
|
-
function D(s) {
|
|
7
|
-
const m = s + "CollectionProvider", [A, E] = y(m), [N, a] = A(
|
|
8
|
-
m,
|
|
9
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
10
|
-
), p = (c) => {
|
|
11
|
-
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
12
|
-
return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
13
|
-
};
|
|
14
|
-
p.displayName = m;
|
|
15
|
-
const f = s + "CollectionSlot", _ = M(f), C = r.forwardRef(
|
|
16
|
-
(c, e) => {
|
|
17
|
-
const { scope: l, children: o } = c, t = a(f, l), n = S(e, t.collectionRef);
|
|
18
|
-
return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
C.displayName = f;
|
|
22
|
-
const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
|
|
23
|
-
(c, e) => {
|
|
24
|
-
const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = a(u, l);
|
|
25
|
-
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => {
|
|
26
|
-
i.itemMap.delete(n);
|
|
27
|
-
})), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
x.displayName = u;
|
|
31
|
-
function O(c) {
|
|
32
|
-
const e = a(s + "CollectionConsumer", c);
|
|
33
|
-
return r.useCallback(() => {
|
|
34
|
-
const o = e.collectionRef.current;
|
|
35
|
-
if (!o) return [];
|
|
36
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
37
|
-
return Array.from(e.itemMap.values()).sort(
|
|
38
|
-
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
39
|
-
);
|
|
40
|
-
}, [e.collectionRef, e.itemMap]);
|
|
41
|
-
}
|
|
42
|
-
return [
|
|
43
|
-
{ Provider: p, Slot: C, ItemSlot: x },
|
|
44
|
-
O,
|
|
45
|
-
E
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
D as c
|
|
50
|
-
};
|
package/dist/index-DIsg7zU7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const H=require("react"),d=require("./index-BtZvtDmp.js"),$=require("./index-BGIK9FQF.js"),B=require("./index-_XxjJPRD.js"),Y=require("./index-D2HnlO3y.js"),z=require("./index-CefEQe_4.js"),V=require("./index-CzY-WZXL.js"),J=require("./index-Ce5TOFAK.js"),Q=require("./index-Dko2XdTk.js"),p=require("./jsx-runtime-nZSsnGb7.js");function W(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const c=W(H);var y="rovingFocusGroup.onEntryFocus",X={bubbles:!1,cancelable:!0},b="RovingFocusGroup",[j,P,Z]=$.createCollection(b),[ee,te]=Y.createContextScope(b,[Z]),[oe,re]=ee(b),D=c.forwardRef((e,o)=>p.jsxRuntimeExports.jsx(j.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsxRuntimeExports.jsx(j.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsxRuntimeExports.jsx(ne,{...e,ref:o})})}));D.displayName=b;var ne=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:r,orientation:t,loop:F=!1,dir:S,currentTabStopId:v,defaultCurrentTabStopId:T,onCurrentTabStopIdChange:w,onEntryFocus:m,preventScrollOnEntryFocus:u=!1,...I}=e,R=c.useRef(null),g=B.useComposedRefs(o,R),x=Q.useDirection(S),[E,n]=J.useControllableState({prop:v,defaultProp:T??null,onChange:w,caller:b}),[a,C]=c.useState(!1),i=V.useCallbackRef(m),l=P(r),_=c.useRef(!1),[K,A]=c.useState(0);return c.useEffect(()=>{const s=R.current;if(s)return s.addEventListener(y,i),()=>s.removeEventListener(y,i)},[i]),p.jsxRuntimeExports.jsx(oe,{scope:r,orientation:t,dir:x,loop:F,currentTabStopId:E,onItemFocus:c.useCallback(s=>n(s),[n]),onItemShiftTab:c.useCallback(()=>C(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(s=>s+1),[]),onFocusableItemRemove:c.useCallback(()=>A(s=>s-1),[]),children:p.jsxRuntimeExports.jsx(d.Primitive.div,{tabIndex:a||K===0?-1:0,"data-orientation":t,...I,ref:g,style:{outline:"none",...e.style},onMouseDown:d.composeEventHandlers(e.onMouseDown,()=>{_.current=!0}),onFocus:d.composeEventHandlers(e.onFocus,s=>{const M=!_.current;if(s.target===s.currentTarget&&M&&!a){const O=new CustomEvent(y,X);if(s.currentTarget.dispatchEvent(O),!O.defaultPrevented){const h=l().filter(f=>f.focusable),k=h.find(f=>f.active),L=h.find(f=>f.id===E),U=[k,L,...h].filter(Boolean).map(f=>f.ref.current);q(U,u)}}_.current=!1}),onBlur:d.composeEventHandlers(e.onBlur,()=>C(!1))})})}),G="RovingFocusGroupItem",N=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:r,focusable:t=!0,active:F=!1,tabStopId:S,children:v,...T}=e,w=z.useId(),m=S||w,u=re(G,r),I=u.currentTabStopId===m,R=P(r),{onFocusableItemAdd:g,onFocusableItemRemove:x,currentTabStopId:E}=u;return c.useEffect(()=>{if(t)return g(),()=>x()},[t,g,x]),p.jsxRuntimeExports.jsx(j.ItemSlot,{scope:r,id:m,focusable:t,active:F,children:p.jsxRuntimeExports.jsx(d.Primitive.span,{tabIndex:I?0:-1,"data-orientation":u.orientation,...T,ref:o,onMouseDown:d.composeEventHandlers(e.onMouseDown,n=>{t?u.onItemFocus(m):n.preventDefault()}),onFocus:d.composeEventHandlers(e.onFocus,()=>u.onItemFocus(m)),onKeyDown:d.composeEventHandlers(e.onKeyDown,n=>{if(n.key==="Tab"&&n.shiftKey){u.onItemShiftTab();return}if(n.target!==n.currentTarget)return;const a=ue(n,u.orientation,u.dir);if(a!==void 0){if(n.metaKey||n.ctrlKey||n.altKey||n.shiftKey)return;n.preventDefault();let i=R().filter(l=>l.focusable).map(l=>l.ref.current);if(a==="last")i.reverse();else if(a==="prev"||a==="next"){a==="prev"&&i.reverse();const l=i.indexOf(n.currentTarget);i=u.loop?ie(i,l+1):i.slice(l+1)}setTimeout(()=>q(i))}}),children:typeof v=="function"?v({isCurrentTabStop:I,hasTabStop:E!=null}):v})})});N.displayName=G;var se={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ce(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ue(e,o,r){const t=ce(e.key,r);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return se[t]}function q(e,o=!1){const r=document.activeElement;for(const t of e)if(t===r||(t.focus({preventScroll:o}),document.activeElement!==r))return}function ie(e,o){return e.map((r,t)=>e[(o+t)%e.length])}var ae=D,le=N;exports.Item=le;exports.Root=ae;exports.createRovingFocusGroupScope=te;
|
package/dist/index-DKN_vhyX.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { P as o } from "./index-K9FzbxYw.mjs";
|
|
3
|
-
import { j as t } from "./jsx-runtime-tc70JA_2.mjs";
|
|
4
|
-
var s = Object.freeze({
|
|
5
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
6
|
-
position: "absolute",
|
|
7
|
-
border: 0,
|
|
8
|
-
width: 1,
|
|
9
|
-
height: 1,
|
|
10
|
-
padding: 0,
|
|
11
|
-
margin: -1,
|
|
12
|
-
overflow: "hidden",
|
|
13
|
-
clip: "rect(0, 0, 0, 0)",
|
|
14
|
-
whiteSpace: "nowrap",
|
|
15
|
-
wordWrap: "normal"
|
|
16
|
-
}), d = "VisuallyHidden", a = i.forwardRef(
|
|
17
|
-
(r, e) => /* @__PURE__ */ t.jsx(
|
|
18
|
-
o.span,
|
|
19
|
-
{
|
|
20
|
-
...r,
|
|
21
|
-
ref: e,
|
|
22
|
-
style: { ...s, ...r.style }
|
|
23
|
-
}
|
|
24
|
-
)
|
|
25
|
-
);
|
|
26
|
-
a.displayName = d;
|
|
27
|
-
var n = a;
|
|
28
|
-
export {
|
|
29
|
-
n as R,
|
|
30
|
-
s as V,
|
|
31
|
-
a
|
|
32
|
-
};
|
package/dist/index-DLcqcWxM.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as l from "react";
|
|
2
|
-
function s(n, o) {
|
|
3
|
-
if (typeof n == "function")
|
|
4
|
-
return n(o);
|
|
5
|
-
n != null && (n.current = o);
|
|
6
|
-
}
|
|
7
|
-
function f(...n) {
|
|
8
|
-
return (o) => {
|
|
9
|
-
let u = !1;
|
|
10
|
-
const c = n.map((t) => {
|
|
11
|
-
const e = s(t, o);
|
|
12
|
-
return !u && typeof e == "function" && (u = !0), e;
|
|
13
|
-
});
|
|
14
|
-
if (u)
|
|
15
|
-
return () => {
|
|
16
|
-
for (let t = 0; t < c.length; t++) {
|
|
17
|
-
const e = c[t];
|
|
18
|
-
typeof e == "function" ? e() : s(n[t], null);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function i(...n) {
|
|
24
|
-
return l.useCallback(f(...n), n);
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
f as c,
|
|
28
|
-
i as u
|
|
29
|
-
};
|
package/dist/index-DSxf1gN6.mjs
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import { P as v, c as I } from "./index-K9FzbxYw.mjs";
|
|
3
|
-
import { c as O } from "./index-IZ2gq03c.mjs";
|
|
4
|
-
import { u as S } from "./index-p6xVFRb4.mjs";
|
|
5
|
-
import { u as D } from "./index-CCKe-Mpx.mjs";
|
|
6
|
-
import { u as M } from "./index-DLcqcWxM.mjs";
|
|
7
|
-
import { P as L } from "./index-vuPgkS0V.mjs";
|
|
8
|
-
import { u as k } from "./index-DnFcfnA9.mjs";
|
|
9
|
-
import { j as c } from "./jsx-runtime-tc70JA_2.mjs";
|
|
10
|
-
var f = "Collapsible", [F, V] = O(f), [B, g] = F(f), T = o.forwardRef(
|
|
11
|
-
(e, s) => {
|
|
12
|
-
const {
|
|
13
|
-
__scopeCollapsible: r,
|
|
14
|
-
open: a,
|
|
15
|
-
defaultOpen: t,
|
|
16
|
-
disabled: l,
|
|
17
|
-
onOpenChange: i,
|
|
18
|
-
...m
|
|
19
|
-
} = e, [d, p] = S({
|
|
20
|
-
prop: a,
|
|
21
|
-
defaultProp: t ?? !1,
|
|
22
|
-
onChange: i,
|
|
23
|
-
caller: f
|
|
24
|
-
});
|
|
25
|
-
return /* @__PURE__ */ c.jsx(
|
|
26
|
-
B,
|
|
27
|
-
{
|
|
28
|
-
scope: r,
|
|
29
|
-
disabled: l,
|
|
30
|
-
contentId: k(),
|
|
31
|
-
open: d,
|
|
32
|
-
onOpenToggle: o.useCallback(() => p((C) => !C), [p]),
|
|
33
|
-
children: /* @__PURE__ */ c.jsx(
|
|
34
|
-
v.div,
|
|
35
|
-
{
|
|
36
|
-
"data-state": x(d),
|
|
37
|
-
"data-disabled": l ? "" : void 0,
|
|
38
|
-
...m,
|
|
39
|
-
ref: s
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
T.displayName = f;
|
|
47
|
-
var j = "CollapsibleTrigger", w = o.forwardRef(
|
|
48
|
-
(e, s) => {
|
|
49
|
-
const { __scopeCollapsible: r, ...a } = e, t = g(j, r);
|
|
50
|
-
return /* @__PURE__ */ c.jsx(
|
|
51
|
-
v.button,
|
|
52
|
-
{
|
|
53
|
-
type: "button",
|
|
54
|
-
"aria-controls": t.contentId,
|
|
55
|
-
"aria-expanded": t.open || !1,
|
|
56
|
-
"data-state": x(t.open),
|
|
57
|
-
"data-disabled": t.disabled ? "" : void 0,
|
|
58
|
-
disabled: t.disabled,
|
|
59
|
-
...a,
|
|
60
|
-
ref: s,
|
|
61
|
-
onClick: I(e.onClick, t.onOpenToggle)
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
w.displayName = j;
|
|
67
|
-
var R = "CollapsibleContent", A = o.forwardRef(
|
|
68
|
-
(e, s) => {
|
|
69
|
-
const { forceMount: r, ...a } = e, t = g(R, e.__scopeCollapsible);
|
|
70
|
-
return /* @__PURE__ */ c.jsx(L, { present: r || t.open, children: ({ present: l }) => /* @__PURE__ */ c.jsx(G, { ...a, ref: s, present: l }) });
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
A.displayName = R;
|
|
74
|
-
var G = o.forwardRef((e, s) => {
|
|
75
|
-
const { __scopeCollapsible: r, present: a, children: t, ...l } = e, i = g(R, r), [m, d] = o.useState(a), p = o.useRef(null), C = M(s, p), h = o.useRef(0), P = h.current, y = o.useRef(0), N = y.current, b = i.open || m, _ = o.useRef(b), u = o.useRef(void 0);
|
|
76
|
-
return o.useEffect(() => {
|
|
77
|
-
const n = requestAnimationFrame(() => _.current = !1);
|
|
78
|
-
return () => cancelAnimationFrame(n);
|
|
79
|
-
}, []), D(() => {
|
|
80
|
-
const n = p.current;
|
|
81
|
-
if (n) {
|
|
82
|
-
u.current = u.current || {
|
|
83
|
-
transitionDuration: n.style.transitionDuration,
|
|
84
|
-
animationName: n.style.animationName
|
|
85
|
-
}, n.style.transitionDuration = "0s", n.style.animationName = "none";
|
|
86
|
-
const E = n.getBoundingClientRect();
|
|
87
|
-
h.current = E.height, y.current = E.width, _.current || (n.style.transitionDuration = u.current.transitionDuration, n.style.animationName = u.current.animationName), d(a);
|
|
88
|
-
}
|
|
89
|
-
}, [i.open, a]), /* @__PURE__ */ c.jsx(
|
|
90
|
-
v.div,
|
|
91
|
-
{
|
|
92
|
-
"data-state": x(i.open),
|
|
93
|
-
"data-disabled": i.disabled ? "" : void 0,
|
|
94
|
-
id: i.contentId,
|
|
95
|
-
hidden: !b,
|
|
96
|
-
...l,
|
|
97
|
-
ref: C,
|
|
98
|
-
style: {
|
|
99
|
-
"--radix-collapsible-content-height": P ? `${P}px` : void 0,
|
|
100
|
-
"--radix-collapsible-content-width": N ? `${N}px` : void 0,
|
|
101
|
-
...e.style
|
|
102
|
-
},
|
|
103
|
-
children: b && t
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
});
|
|
107
|
-
function x(e) {
|
|
108
|
-
return e ? "open" : "closed";
|
|
109
|
-
}
|
|
110
|
-
var W = T, X = w, Y = A;
|
|
111
|
-
export {
|
|
112
|
-
A as C,
|
|
113
|
-
W as R,
|
|
114
|
-
X as T,
|
|
115
|
-
w as a,
|
|
116
|
-
Y as b,
|
|
117
|
-
V as c
|
|
118
|
-
};
|
package/dist/index-DYxWvftI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("react");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,u.get?u:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=o(c);function s(e){const r=n.useRef({value:e,previous:e});return n.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}exports.usePrevious=s;
|
package/dist/index-DaILh3TV.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import "react-dom";
|
|
3
|
-
import { c as f } from "./index-Le8p9oP4.mjs";
|
|
4
|
-
import { j as l } from "./jsx-runtime-tc70JA_2.mjs";
|
|
5
|
-
var u = [
|
|
6
|
-
"a",
|
|
7
|
-
"button",
|
|
8
|
-
"div",
|
|
9
|
-
"form",
|
|
10
|
-
"h2",
|
|
11
|
-
"h3",
|
|
12
|
-
"img",
|
|
13
|
-
"input",
|
|
14
|
-
"label",
|
|
15
|
-
"li",
|
|
16
|
-
"nav",
|
|
17
|
-
"ol",
|
|
18
|
-
"p",
|
|
19
|
-
"select",
|
|
20
|
-
"span",
|
|
21
|
-
"svg",
|
|
22
|
-
"ul"
|
|
23
|
-
], w = u.reduce((t, i) => {
|
|
24
|
-
const o = f(`Primitive.${i}`), r = n.forwardRef((e, a) => {
|
|
25
|
-
const { asChild: m, ...s } = e, p = m ? o : i;
|
|
26
|
-
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l.jsx(p, { ...s, ref: a });
|
|
27
|
-
});
|
|
28
|
-
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
-
}, {});
|
|
30
|
-
export {
|
|
31
|
-
w as P
|
|
32
|
-
};
|
package/dist/index-Dfzl8TxY.mjs
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { P as R, c as h, d as j } from "./index-K9FzbxYw.mjs";
|
|
3
|
-
import { u as g } from "./index-DLcqcWxM.mjs";
|
|
4
|
-
import { u as m } from "./index-0ioNhtNM.mjs";
|
|
5
|
-
import { j as x } from "./jsx-runtime-tc70JA_2.mjs";
|
|
6
|
-
function z(n, e = globalThis?.document) {
|
|
7
|
-
const t = m(n);
|
|
8
|
-
i.useEffect(() => {
|
|
9
|
-
const o = (s) => {
|
|
10
|
-
s.key === "Escape" && t(s);
|
|
11
|
-
};
|
|
12
|
-
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
13
|
-
}, [t, e]);
|
|
14
|
-
}
|
|
15
|
-
var H = "DismissableLayer", p = "dismissableLayer.update", K = "dismissableLayer.pointerDownOutside", M = "dismissableLayer.focusOutside", C, B = i.createContext({
|
|
16
|
-
layers: /* @__PURE__ */ new Set(),
|
|
17
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
18
|
-
branches: /* @__PURE__ */ new Set()
|
|
19
|
-
}), T = i.forwardRef(
|
|
20
|
-
(n, e) => {
|
|
21
|
-
const {
|
|
22
|
-
disableOutsidePointerEvents: t = !1,
|
|
23
|
-
onEscapeKeyDown: o,
|
|
24
|
-
onPointerDownOutside: s,
|
|
25
|
-
onFocusOutside: c,
|
|
26
|
-
onInteractOutside: f,
|
|
27
|
-
onDismiss: d,
|
|
28
|
-
...E
|
|
29
|
-
} = n, a = i.useContext(B), [u, S] = i.useState(null), l = u?.ownerDocument ?? globalThis?.document, [, W] = i.useState({}), k = g(e, (r) => S(r)), b = Array.from(a.layers), [A] = [...a.layersWithOutsidePointerEventsDisabled].slice(-1), N = b.indexOf(A), D = u ? b.indexOf(u) : -1, _ = a.layersWithOutsidePointerEventsDisabled.size > 0, P = D >= N, U = Y((r) => {
|
|
30
|
-
const v = r.target, L = [...a.branches].some((y) => y.contains(v));
|
|
31
|
-
!P || L || (s?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
32
|
-
}, l), O = q((r) => {
|
|
33
|
-
const v = r.target;
|
|
34
|
-
[...a.branches].some((y) => y.contains(v)) || (c?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
35
|
-
}, l);
|
|
36
|
-
return z((r) => {
|
|
37
|
-
D === a.layers.size - 1 && (o?.(r), !r.defaultPrevented && d && (r.preventDefault(), d()));
|
|
38
|
-
}, l), i.useEffect(() => {
|
|
39
|
-
if (u)
|
|
40
|
-
return t && (a.layersWithOutsidePointerEventsDisabled.size === 0 && (C = l.body.style.pointerEvents, l.body.style.pointerEvents = "none"), a.layersWithOutsidePointerEventsDisabled.add(u)), a.layers.add(u), w(), () => {
|
|
41
|
-
t && a.layersWithOutsidePointerEventsDisabled.size === 1 && (l.body.style.pointerEvents = C);
|
|
42
|
-
};
|
|
43
|
-
}, [u, l, t, a]), i.useEffect(() => () => {
|
|
44
|
-
u && (a.layers.delete(u), a.layersWithOutsidePointerEventsDisabled.delete(u), w());
|
|
45
|
-
}, [u, a]), i.useEffect(() => {
|
|
46
|
-
const r = () => W({});
|
|
47
|
-
return document.addEventListener(p, r), () => document.removeEventListener(p, r);
|
|
48
|
-
}, []), /* @__PURE__ */ x.jsx(
|
|
49
|
-
R.div,
|
|
50
|
-
{
|
|
51
|
-
...E,
|
|
52
|
-
ref: k,
|
|
53
|
-
style: {
|
|
54
|
-
pointerEvents: _ ? P ? "auto" : "none" : void 0,
|
|
55
|
-
...n.style
|
|
56
|
-
},
|
|
57
|
-
onFocusCapture: h(n.onFocusCapture, O.onFocusCapture),
|
|
58
|
-
onBlurCapture: h(n.onBlurCapture, O.onBlurCapture),
|
|
59
|
-
onPointerDownCapture: h(
|
|
60
|
-
n.onPointerDownCapture,
|
|
61
|
-
U.onPointerDownCapture
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
T.displayName = H;
|
|
68
|
-
var X = "DismissableLayerBranch", F = i.forwardRef((n, e) => {
|
|
69
|
-
const t = i.useContext(B), o = i.useRef(null), s = g(e, o);
|
|
70
|
-
return i.useEffect(() => {
|
|
71
|
-
const c = o.current;
|
|
72
|
-
if (c)
|
|
73
|
-
return t.branches.add(c), () => {
|
|
74
|
-
t.branches.delete(c);
|
|
75
|
-
};
|
|
76
|
-
}, [t.branches]), /* @__PURE__ */ x.jsx(R.div, { ...n, ref: s });
|
|
77
|
-
});
|
|
78
|
-
F.displayName = X;
|
|
79
|
-
function Y(n, e = globalThis?.document) {
|
|
80
|
-
const t = m(n), o = i.useRef(!1), s = i.useRef(() => {
|
|
81
|
-
});
|
|
82
|
-
return i.useEffect(() => {
|
|
83
|
-
const c = (d) => {
|
|
84
|
-
if (d.target && !o.current) {
|
|
85
|
-
let E = function() {
|
|
86
|
-
I(
|
|
87
|
-
K,
|
|
88
|
-
t,
|
|
89
|
-
a,
|
|
90
|
-
{ discrete: !0 }
|
|
91
|
-
);
|
|
92
|
-
};
|
|
93
|
-
const a = { originalEvent: d };
|
|
94
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", s.current), s.current = E, e.addEventListener("click", s.current, { once: !0 })) : E();
|
|
95
|
-
} else
|
|
96
|
-
e.removeEventListener("click", s.current);
|
|
97
|
-
o.current = !1;
|
|
98
|
-
}, f = window.setTimeout(() => {
|
|
99
|
-
e.addEventListener("pointerdown", c);
|
|
100
|
-
}, 0);
|
|
101
|
-
return () => {
|
|
102
|
-
window.clearTimeout(f), e.removeEventListener("pointerdown", c), e.removeEventListener("click", s.current);
|
|
103
|
-
};
|
|
104
|
-
}, [e, t]), {
|
|
105
|
-
// ensures we check React component tree (not just DOM tree)
|
|
106
|
-
onPointerDownCapture: () => o.current = !0
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
function q(n, e = globalThis?.document) {
|
|
110
|
-
const t = m(n), o = i.useRef(!1);
|
|
111
|
-
return i.useEffect(() => {
|
|
112
|
-
const s = (c) => {
|
|
113
|
-
c.target && !o.current && I(M, t, { originalEvent: c }, {
|
|
114
|
-
discrete: !1
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
return e.addEventListener("focusin", s), () => e.removeEventListener("focusin", s);
|
|
118
|
-
}, [e, t]), {
|
|
119
|
-
onFocusCapture: () => o.current = !0,
|
|
120
|
-
onBlurCapture: () => o.current = !1
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function w() {
|
|
124
|
-
const n = new CustomEvent(p);
|
|
125
|
-
document.dispatchEvent(n);
|
|
126
|
-
}
|
|
127
|
-
function I(n, e, t, { discrete: o }) {
|
|
128
|
-
const s = t.originalEvent.target, c = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: t });
|
|
129
|
-
e && s.addEventListener(n, e, { once: !0 }), o ? j(s, c) : s.dispatchEvent(c);
|
|
130
|
-
}
|
|
131
|
-
var Z = T, $ = F;
|
|
132
|
-
export {
|
|
133
|
-
$ as B,
|
|
134
|
-
T as D,
|
|
135
|
-
Z as R
|
|
136
|
-
};
|
package/dist/index-Dko2XdTk.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("react");require("./jsx-runtime-nZSsnGb7.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const o=i(c);var u=o.createContext(void 0);function a(e){const t=o.useContext(u);return e||t||"ltr"}exports.useDirection=a;
|
package/dist/index-DlY82G31.mjs
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { P as p, c as g, a as B } from "./index-K9FzbxYw.mjs";
|
|
3
|
-
import { u as R } from "./index-DLcqcWxM.mjs";
|
|
4
|
-
import { a as H, c as V } from "./index-IZ2gq03c.mjs";
|
|
5
|
-
import { u as C } from "./index-DnFcfnA9.mjs";
|
|
6
|
-
import { u as q } from "./index-p6xVFRb4.mjs";
|
|
7
|
-
import { D as K } from "./index-Dfzl8TxY.mjs";
|
|
8
|
-
import { R as U, h as Y, u as Z, F as z } from "./index-CRyCZJLa.mjs";
|
|
9
|
-
import { P as J } from "./index-C7HEunrh.mjs";
|
|
10
|
-
import { P as _ } from "./index-vuPgkS0V.mjs";
|
|
11
|
-
import { j as s } from "./jsx-runtime-tc70JA_2.mjs";
|
|
12
|
-
var D = "Dialog", [y, ve] = V(D), [Q, u] = y(D), N = (e) => {
|
|
13
|
-
const {
|
|
14
|
-
__scopeDialog: t,
|
|
15
|
-
children: n,
|
|
16
|
-
open: a,
|
|
17
|
-
defaultOpen: r,
|
|
18
|
-
onOpenChange: o,
|
|
19
|
-
modal: l = !0
|
|
20
|
-
} = e, c = i.useRef(null), f = i.useRef(null), [v, x] = q({
|
|
21
|
-
prop: a,
|
|
22
|
-
defaultProp: r ?? !1,
|
|
23
|
-
onChange: o,
|
|
24
|
-
caller: D
|
|
25
|
-
});
|
|
26
|
-
return /* @__PURE__ */ s.jsx(
|
|
27
|
-
Q,
|
|
28
|
-
{
|
|
29
|
-
scope: t,
|
|
30
|
-
triggerRef: c,
|
|
31
|
-
contentRef: f,
|
|
32
|
-
contentId: C(),
|
|
33
|
-
titleId: C(),
|
|
34
|
-
descriptionId: C(),
|
|
35
|
-
open: v,
|
|
36
|
-
onOpenChange: x,
|
|
37
|
-
onOpenToggle: i.useCallback(() => x(($) => !$), [x]),
|
|
38
|
-
modal: l,
|
|
39
|
-
children: n
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
N.displayName = D;
|
|
44
|
-
var O = "DialogTrigger", I = i.forwardRef(
|
|
45
|
-
(e, t) => {
|
|
46
|
-
const { __scopeDialog: n, ...a } = e, r = u(O, n), o = R(t, r.triggerRef);
|
|
47
|
-
return /* @__PURE__ */ s.jsx(
|
|
48
|
-
p.button,
|
|
49
|
-
{
|
|
50
|
-
type: "button",
|
|
51
|
-
"aria-haspopup": "dialog",
|
|
52
|
-
"aria-expanded": r.open,
|
|
53
|
-
"aria-controls": r.contentId,
|
|
54
|
-
"data-state": P(r.open),
|
|
55
|
-
...a,
|
|
56
|
-
ref: o,
|
|
57
|
-
onClick: g(e.onClick, r.onOpenToggle)
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
I.displayName = O;
|
|
63
|
-
var h = "DialogPortal", [X, A] = y(h, {
|
|
64
|
-
forceMount: void 0
|
|
65
|
-
}), T = (e) => {
|
|
66
|
-
const { __scopeDialog: t, forceMount: n, children: a, container: r } = e, o = u(h, t);
|
|
67
|
-
return /* @__PURE__ */ s.jsx(X, { scope: t, forceMount: n, children: i.Children.map(a, (l) => /* @__PURE__ */ s.jsx(_, { present: n || o.open, children: /* @__PURE__ */ s.jsx(J, { asChild: !0, container: r, children: l }) })) });
|
|
68
|
-
};
|
|
69
|
-
T.displayName = h;
|
|
70
|
-
var m = "DialogOverlay", j = i.forwardRef(
|
|
71
|
-
(e, t) => {
|
|
72
|
-
const n = A(m, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(m, e.__scopeDialog);
|
|
73
|
-
return o.modal ? /* @__PURE__ */ s.jsx(_, { present: a || o.open, children: /* @__PURE__ */ s.jsx(oe, { ...r, ref: t }) }) : null;
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
j.displayName = m;
|
|
77
|
-
var ee = B("DialogOverlay.RemoveScroll"), oe = i.forwardRef(
|
|
78
|
-
(e, t) => {
|
|
79
|
-
const { __scopeDialog: n, ...a } = e, r = u(m, n);
|
|
80
|
-
return (
|
|
81
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
82
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
83
|
-
/* @__PURE__ */ s.jsx(U, { as: ee, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ s.jsx(
|
|
84
|
-
p.div,
|
|
85
|
-
{
|
|
86
|
-
"data-state": P(r.open),
|
|
87
|
-
...a,
|
|
88
|
-
ref: t,
|
|
89
|
-
style: { pointerEvents: "auto", ...a.style }
|
|
90
|
-
}
|
|
91
|
-
) })
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
), d = "DialogContent", b = i.forwardRef(
|
|
95
|
-
(e, t) => {
|
|
96
|
-
const n = A(d, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(d, e.__scopeDialog);
|
|
97
|
-
return /* @__PURE__ */ s.jsx(_, { present: a || o.open, children: o.modal ? /* @__PURE__ */ s.jsx(te, { ...r, ref: t }) : /* @__PURE__ */ s.jsx(re, { ...r, ref: t }) });
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
b.displayName = d;
|
|
101
|
-
var te = i.forwardRef(
|
|
102
|
-
(e, t) => {
|
|
103
|
-
const n = u(d, e.__scopeDialog), a = i.useRef(null), r = R(t, n.contentRef, a);
|
|
104
|
-
return i.useEffect(() => {
|
|
105
|
-
const o = a.current;
|
|
106
|
-
if (o) return Y(o);
|
|
107
|
-
}, []), /* @__PURE__ */ s.jsx(
|
|
108
|
-
M,
|
|
109
|
-
{
|
|
110
|
-
...e,
|
|
111
|
-
ref: r,
|
|
112
|
-
trapFocus: n.open,
|
|
113
|
-
disableOutsidePointerEvents: !0,
|
|
114
|
-
onCloseAutoFocus: g(e.onCloseAutoFocus, (o) => {
|
|
115
|
-
o.preventDefault(), n.triggerRef.current?.focus();
|
|
116
|
-
}),
|
|
117
|
-
onPointerDownOutside: g(e.onPointerDownOutside, (o) => {
|
|
118
|
-
const l = o.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
|
|
119
|
-
(l.button === 2 || c) && o.preventDefault();
|
|
120
|
-
}),
|
|
121
|
-
onFocusOutside: g(
|
|
122
|
-
e.onFocusOutside,
|
|
123
|
-
(o) => o.preventDefault()
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
), re = i.forwardRef(
|
|
129
|
-
(e, t) => {
|
|
130
|
-
const n = u(d, e.__scopeDialog), a = i.useRef(!1), r = i.useRef(!1);
|
|
131
|
-
return /* @__PURE__ */ s.jsx(
|
|
132
|
-
M,
|
|
133
|
-
{
|
|
134
|
-
...e,
|
|
135
|
-
ref: t,
|
|
136
|
-
trapFocus: !1,
|
|
137
|
-
disableOutsidePointerEvents: !1,
|
|
138
|
-
onCloseAutoFocus: (o) => {
|
|
139
|
-
e.onCloseAutoFocus?.(o), o.defaultPrevented || (a.current || n.triggerRef.current?.focus(), o.preventDefault()), a.current = !1, r.current = !1;
|
|
140
|
-
},
|
|
141
|
-
onInteractOutside: (o) => {
|
|
142
|
-
e.onInteractOutside?.(o), o.defaultPrevented || (a.current = !0, o.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
143
|
-
const l = o.target;
|
|
144
|
-
n.triggerRef.current?.contains(l) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && r.current && o.preventDefault();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
), M = i.forwardRef(
|
|
150
|
-
(e, t) => {
|
|
151
|
-
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: o, ...l } = e, c = u(d, n), f = i.useRef(null), v = R(t, f);
|
|
152
|
-
return Z(), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
153
|
-
/* @__PURE__ */ s.jsx(
|
|
154
|
-
z,
|
|
155
|
-
{
|
|
156
|
-
asChild: !0,
|
|
157
|
-
loop: !0,
|
|
158
|
-
trapped: a,
|
|
159
|
-
onMountAutoFocus: r,
|
|
160
|
-
onUnmountAutoFocus: o,
|
|
161
|
-
children: /* @__PURE__ */ s.jsx(
|
|
162
|
-
K,
|
|
163
|
-
{
|
|
164
|
-
role: "dialog",
|
|
165
|
-
id: c.contentId,
|
|
166
|
-
"aria-describedby": c.descriptionId,
|
|
167
|
-
"aria-labelledby": c.titleId,
|
|
168
|
-
"data-state": P(c.open),
|
|
169
|
-
...l,
|
|
170
|
-
ref: v,
|
|
171
|
-
onDismiss: () => c.onOpenChange(!1)
|
|
172
|
-
}
|
|
173
|
-
)
|
|
174
|
-
}
|
|
175
|
-
),
|
|
176
|
-
/* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
177
|
-
/* @__PURE__ */ s.jsx(ne, { titleId: c.titleId }),
|
|
178
|
-
/* @__PURE__ */ s.jsx(se, { contentRef: f, descriptionId: c.descriptionId })
|
|
179
|
-
] })
|
|
180
|
-
] });
|
|
181
|
-
}
|
|
182
|
-
), E = "DialogTitle", F = i.forwardRef(
|
|
183
|
-
(e, t) => {
|
|
184
|
-
const { __scopeDialog: n, ...a } = e, r = u(E, n);
|
|
185
|
-
return /* @__PURE__ */ s.jsx(p.h2, { id: r.titleId, ...a, ref: t });
|
|
186
|
-
}
|
|
187
|
-
);
|
|
188
|
-
F.displayName = E;
|
|
189
|
-
var w = "DialogDescription", S = i.forwardRef(
|
|
190
|
-
(e, t) => {
|
|
191
|
-
const { __scopeDialog: n, ...a } = e, r = u(w, n);
|
|
192
|
-
return /* @__PURE__ */ s.jsx(p.p, { id: r.descriptionId, ...a, ref: t });
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
S.displayName = w;
|
|
196
|
-
var W = "DialogClose", k = i.forwardRef(
|
|
197
|
-
(e, t) => {
|
|
198
|
-
const { __scopeDialog: n, ...a } = e, r = u(W, n);
|
|
199
|
-
return /* @__PURE__ */ s.jsx(
|
|
200
|
-
p.button,
|
|
201
|
-
{
|
|
202
|
-
type: "button",
|
|
203
|
-
...a,
|
|
204
|
-
ref: t,
|
|
205
|
-
onClick: g(e.onClick, () => r.onOpenChange(!1))
|
|
206
|
-
}
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
);
|
|
210
|
-
k.displayName = W;
|
|
211
|
-
function P(e) {
|
|
212
|
-
return e ? "open" : "closed";
|
|
213
|
-
}
|
|
214
|
-
var G = "DialogTitleWarning", [xe, L] = H(G, {
|
|
215
|
-
contentName: d,
|
|
216
|
-
titleName: E,
|
|
217
|
-
docsSlug: "dialog"
|
|
218
|
-
}), ne = ({ titleId: e }) => {
|
|
219
|
-
const t = L(G), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
220
|
-
|
|
221
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
222
|
-
|
|
223
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
224
|
-
return i.useEffect(() => {
|
|
225
|
-
e && (document.getElementById(e) || console.error(n));
|
|
226
|
-
}, [n, e]), null;
|
|
227
|
-
}, ae = "DialogDescriptionWarning", se = ({ contentRef: e, descriptionId: t }) => {
|
|
228
|
-
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${L(ae).contentName}}.`;
|
|
229
|
-
return i.useEffect(() => {
|
|
230
|
-
const r = e.current?.getAttribute("aria-describedby");
|
|
231
|
-
t && r && (document.getElementById(t) || console.warn(a));
|
|
232
|
-
}, [a, e, t]), null;
|
|
233
|
-
}, Ce = N, Re = I, _e = T, he = j, Ee = b, Pe = F, ye = S, Ne = k;
|
|
234
|
-
export {
|
|
235
|
-
Ee as C,
|
|
236
|
-
ye as D,
|
|
237
|
-
he as O,
|
|
238
|
-
_e as P,
|
|
239
|
-
Ce as R,
|
|
240
|
-
Pe as T,
|
|
241
|
-
xe as W,
|
|
242
|
-
Ne as a,
|
|
243
|
-
Re as b,
|
|
244
|
-
ve as c
|
|
245
|
-
};
|