@forsyteco/product-ui 0.0.11 → 0.0.13
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/{active-element-history-BJ1HYFpN.mjs → active-element-history-B7wA4w4L.mjs} +3 -3
- package/dist/autocomplete/autocomplete.d.ts +87 -0
- package/dist/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete/index.cjs +1 -0
- package/dist/autocomplete/index.d.ts +4 -0
- package/dist/autocomplete/index.d.ts.map +1 -0
- package/dist/autocomplete/index.mjs +4 -0
- package/dist/autocomplete/types.d.ts +7 -0
- package/dist/autocomplete/types.d.ts.map +1 -0
- package/dist/autocomplete-DqDP76nV.mjs +318 -0
- package/dist/autocomplete-DuGKfbQn.js +1 -0
- package/dist/avatar/index.mjs +1 -1
- package/dist/{avatar-CN9vtSKm.mjs → avatar-Br4ih6PQ.mjs} +2 -2
- package/dist/breadcrumb/index.cjs +1 -1
- package/dist/breadcrumb/index.mjs +1 -1
- package/dist/{breadcrumb-Bz_JVFcb.mjs → breadcrumb-C81R8CJz.mjs} +2 -2
- package/dist/{breadcrumb-y_RB72EG.js → breadcrumb-DJGlCCR1.js} +1 -1
- package/dist/{bugs-bn44RJ1Q.mjs → bugs-g7aYPtcD.mjs} +1 -1
- package/dist/calendar/calendar.d.ts.map +1 -1
- package/dist/calendar/index.cjs +1 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/{calendar-CAySGYDy.mjs → calendar-DQdo9vO-.mjs} +1058 -993
- package/dist/calendar-v2NOtsdr.js +1 -0
- package/dist/chevron-right-CIgI-iLu.js +1 -0
- package/dist/{chevron-right-DcjcIxI2.mjs → chevron-right-Ck5BtE5n.mjs} +11 -6
- package/dist/combobox/combobox.d.ts +72 -17
- package/dist/combobox/combobox.d.ts.map +1 -1
- package/dist/combobox/index.cjs +1 -1
- package/dist/combobox/index.d.ts +2 -1
- package/dist/combobox/index.d.ts.map +1 -1
- package/dist/combobox/index.mjs +1 -1
- package/dist/combobox/types.d.ts +7 -0
- package/dist/combobox/types.d.ts.map +1 -0
- package/dist/combobox-B1h2hn6a.js +4 -0
- package/dist/combobox-BHLjk9D9.mjs +293 -0
- package/dist/combobox-DxpuSWuM.js +1 -0
- package/dist/{combobox-Dyen_KC6.mjs → combobox-Umb1ZW9S.mjs} +358 -408
- package/dist/data-table/components/table-body.d.ts.map +1 -1
- package/dist/date-picker/date-picker.d.ts.map +1 -1
- package/dist/{description-CAH1nOgr.mjs → description-hiFZ303Y.mjs} +2 -2
- package/dist/dialog/index.mjs +1 -1
- package/dist/{dialog-nGcnK6o1.mjs → dialog-Cs7TMa7R.mjs} +53 -53
- package/dist/disclosure/index.cjs +1 -1
- package/dist/disclosure/index.mjs +1 -1
- package/dist/{disclosure-CA45jH3I.mjs → disclosure-DOWglOHy.mjs} +8 -12
- package/dist/{disclosure-CGxPdR-8.js → disclosure-qEQ_kll8.js} +1 -1
- package/dist/dropdown-menu/index.cjs +1 -1
- package/dist/dropdown-menu/index.mjs +1 -1
- package/dist/{dropdown-menu-Bj9ftuBZ.mjs → dropdown-menu--aGYYbJi.mjs} +22 -30
- package/dist/dropdown-menu-B9fTvSZe.js +1 -0
- package/dist/{element-movement-B3AVr940.mjs → element-movement-Bad2OqSj.mjs} +4 -4
- package/dist/floating-C1n3e5u7.js +1 -0
- package/dist/{floating-dEgEvBqv.mjs → floating-DQ2M2ViQ.mjs} +429 -425
- package/dist/{focus-management-DUVCz_zm.mjs → focus-management-BGuC9pKE.mjs} +2 -2
- package/dist/{form-fields-CXtJvVC5.mjs → form-fields-Bpp9kTvo.mjs} +2 -2
- package/dist/{frozen-Cpa22rmr.mjs → frozen-CXF36eio.mjs} +2 -2
- package/dist/{hidden-Blo8kfIB.mjs → hidden-H5tOTsXH.mjs} +1 -1
- package/dist/{index-CuNisU0H.mjs → index-Dh75VhI6.mjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +769 -776
- package/dist/{keyboard-Bi11Rnr0.mjs → keyboard-BzaAKRwG.mjs} +1 -1
- package/dist/{label-DAaE-vxI.mjs → label--pGndX3z.mjs} +3 -3
- package/dist/listbox/index.cjs +1 -1
- package/dist/listbox/index.mjs +1 -1
- package/dist/{listbox-DZ4v8TYt.mjs → listbox-3DAgC6_y.mjs} +17 -21
- package/dist/{listbox-BIwbzCji.js → listbox-cpJossI7.js} +1 -1
- package/dist/{open-closed-BkH8ZC7H.mjs → open-closed-Be5nD5U2.mjs} +4 -4
- package/dist/popover/index.cjs +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/{popover-BAm_8SCx.mjs → popover-CZO6Afya.mjs} +22 -22
- package/dist/{popover-B5-dVDC1.js → popover-CysmX396.js} +1 -1
- package/dist/{portal-BaBdcS83.mjs → portal-D-TZOwvF.mjs} +6 -6
- package/dist/radio-group/index.cjs +1 -1
- package/dist/radio-group/index.mjs +1 -1
- package/dist/{radio-group-CTf6mrDs.mjs → radio-group-BIQWXrVI.mjs} +8 -8
- package/dist/{radio-group-d2V69c7t.js → radio-group-CbQAsBFv.js} +1 -1
- package/dist/sonner/index.cjs +1 -1
- package/dist/sonner/index.mjs +1 -1
- package/dist/{sonner-CuPfwlK5.js → sonner-BRjN2nJD.js} +1 -1
- package/dist/{sonner-Ce9PJbum.mjs → sonner-Cgc0p6ph.mjs} +3 -5
- package/dist/switch/index.cjs +1 -1
- package/dist/switch/index.mjs +1 -1
- package/dist/{switch-DqAuXwa2.js → switch-D0OrcI50.js} +1 -1
- package/dist/{switch-DKcD0IFH.mjs → switch-Eoi1pTsi.mjs} +13 -13
- package/dist/tabs/index.cjs +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/{tabs-DLqfQ301.mjs → tabs-Cufnu60W.mjs} +15 -15
- package/dist/{tabs-X4sPQQYs.js → tabs-TTkcVq-Q.js} +1 -1
- package/dist/transition/index.mjs +1 -1
- package/dist/{transition-B0MGuDho.mjs → transition-B4KhhkrB.mjs} +4 -4
- package/dist/{transition-D0HuUd2-.mjs → transition-Dfxdl8Si.mjs} +1 -1
- package/dist/{use-event-listener-BjXsgSkG.mjs → use-event-listener-BUA2xXRr.mjs} +1 -1
- package/dist/{use-inert-others-BCB16FKE.mjs → use-inert-others-CgSXXC-d.mjs} +3 -3
- package/dist/{use-is-mounted-COmayWN0.mjs → use-is-mounted-DJc35WXO.mjs} +1 -1
- package/dist/{use-resolve-button-type-637wy6MK.mjs → use-resolve-button-type-BhmWA6Dl.mjs} +2 -2
- package/dist/{use-sync-refs-B0fmGxD4.mjs → use-sync-refs-CDCE8QtA.mjs} +2 -2
- package/dist/{use-tab-direction-BTonGsg0.mjs → use-tab-direction-tJsn3ckX.mjs} +8 -8
- package/dist/{use-text-value-BMXU9EaO.mjs → use-text-value-BKEvykNe.mjs} +2 -2
- package/dist/{use-tree-walker-D25YXIMY.mjs → use-tree-walker-CHC6ccbq.mjs} +2 -2
- package/dist/useFocusRing-BM96K_1O.js +1 -0
- package/dist/useFocusRing-Df1NuOsX.mjs +497 -0
- package/package.json +32 -22
- package/dist/calendar-BIhWkTtG.js +0 -1
- package/dist/chevron-right-HwlOajQy.js +0 -1
- package/dist/combobox-Cm_xVD4l.js +0 -4
- package/dist/dropdown-menu-BPMdVlet.js +0 -1
- package/dist/floating-CTjRm9bt.js +0 -1
- package/dist/useFocusRing-Bocdsy5M.mjs +0 -446
- package/dist/useFocusRing-uXUSOfAR.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-body.d.ts","sourceRoot":"","sources":["../../../src/data-table/components/table-body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAQvD,MAAM,MAAM,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,IAAI,QAAQ,CAAC;IACpE,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;IAClC,IAAI,EAAE,KAAK,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,QAAQ,EAAE,MAAM,CAAC;IAEjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,kBAAkB,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;IAClF,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC,CAAC,CAAC;AAEH,iBAAS,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,EAAE,EACjD,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAe,EACf,UAAU,EACV,cAAqC,EACrC,cAA0B,EAC1B,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAyB,EACzB,WAAW,EACX,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,GACZ,EAAE,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,+
|
|
1
|
+
{"version":3,"file":"table-body.d.ts","sourceRoot":"","sources":["../../../src/data-table/components/table-body.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAQvD,MAAM,MAAM,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,IAAI,QAAQ,CAAC;IACpE,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;IAClC,IAAI,EAAE,KAAK,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,MAAM,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,QAAQ,EAAE,MAAM,CAAC;IAEjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,kBAAkB,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;IAClF,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC,CAAC,CAAC;AAEH,iBAAS,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,EAAE,EACjD,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAe,EACf,UAAU,EACV,cAAqC,EACrC,cAA0B,EAC1B,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAyB,EACzB,WAAW,EACX,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,GACZ,EAAE,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,+BAwHtC;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/date-picker/date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAWvC,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAClB,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAClD,CAAC;CACH,CAAC;AAEF,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAA2B,EAC3B,UAA8B,EAC9B,QAAQ,EACR,SAAS,EACT,eAAe,EACf,aAAa,GACd,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/date-picker/date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAWvC,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,IAAI,CAClB,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAClD,CAAC;CACH,CAAC;AAEF,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,YAAY,EACZ,aAAa,EACb,WAA2B,EAC3B,UAA8B,EAC9B,QAAQ,EACR,SAAS,EACT,eAAe,EACf,aAAa,GACd,EAAE,eAAe,qBAgGjB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import d, { useContext as c, createContext as f, useId as h, useState as x, useMemo as p } from "react";
|
|
2
|
-
import { Y as E, y as b, n as C, K as P, a as $ } from "./use-sync-refs-
|
|
3
|
-
import { b as w } from "./keyboard-
|
|
2
|
+
import { Y as E, y as b, n as C, K as P, a as $ } from "./use-sync-refs-CDCE8QtA.mjs";
|
|
3
|
+
import { b as w } from "./keyboard-BzaAKRwG.mjs";
|
|
4
4
|
let m = f(void 0);
|
|
5
5
|
function D() {
|
|
6
6
|
return c(m);
|
package/dist/dialog/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as C, jsxs as Se } from "react/jsx-runtime";
|
|
2
|
-
import u, { useState as re, useRef as I, useId as W, useEffect as Ne, Fragment as de, useReducer as Re, createRef as Ae, useCallback as Oe, useMemo as Le,
|
|
2
|
+
import u, { useState as re, useRef as I, useId as W, useEffect as Ne, Fragment as de, useReducer as Re, createRef as Ae, useCallback as Oe, useMemo as Le, useContext as Be, createContext as je } from "react";
|
|
3
3
|
import { c as j } from "./tailwind-DtaLkIY8.mjs";
|
|
4
|
-
import { o as Ye, n as B,
|
|
5
|
-
import { E as fe } from "./use-event-listener-
|
|
6
|
-
import { I as q, u as pe, c as Ve, e as _e, x as ze, S as He, b as Ue, f as We, p as qe, l as oe, t as Ge, X as Qe } from "./portal-
|
|
7
|
-
import { n as me, Y as S, y as M, a as y, u as U, p as Xe, K as A, d as ge, A as ae } from "./use-sync-refs-
|
|
8
|
-
import { y as Je } from "./use-inert-others-
|
|
9
|
-
import { u as Ze, a as O, j as le, x as et, S as tt } from "./use-tab-direction-
|
|
10
|
-
import { l as ve, K as rt, O as we } from "./transition-
|
|
4
|
+
import { o as Ye, n as B, i as ne, t as Me, d as Ke, b as Y } from "./keyboard-BzaAKRwG.mjs";
|
|
5
|
+
import { E as fe } from "./use-event-listener-BUA2xXRr.mjs";
|
|
6
|
+
import { I as q, u as pe, c as Ve, e as _e, x as ze, S as He, b as Ue, f as We, p as qe, l as oe, t as Ge, X as Qe } from "./portal-D-TZOwvF.mjs";
|
|
7
|
+
import { n as me, Y as S, y as M, a as y, u as U, p as Xe, K as A, d as ge, A as ae } from "./use-sync-refs-CDCE8QtA.mjs";
|
|
8
|
+
import { y as Je } from "./use-inert-others-CgSXXC-d.mjs";
|
|
9
|
+
import { u as Ze, a as O, j as le, x as et, S as tt } from "./use-tab-direction-tJsn3ckX.mjs";
|
|
10
|
+
import { l as ve, K as rt, O as we } from "./transition-B4KhhkrB.mjs";
|
|
11
11
|
import { C as nt } from "./close-provider-CEutdhG8.mjs";
|
|
12
|
-
import { u as
|
|
13
|
-
import { M as at, H as lt } from "./description-
|
|
14
|
-
import { f as
|
|
15
|
-
import { m as G, n as H } from "./active-element-history-
|
|
16
|
-
import { f as ie, s as ue } from "./hidden-
|
|
17
|
-
import { v as R, T as
|
|
12
|
+
import { u as $e, i as L, s as ot } from "./open-closed-Be5nD5U2.mjs";
|
|
13
|
+
import { M as at, H as lt } from "./description-hiFZ303Y.mjs";
|
|
14
|
+
import { f as Ee } from "./use-is-mounted-DJc35WXO.mjs";
|
|
15
|
+
import { m as G, n as H } from "./active-element-history-B7wA4w4L.mjs";
|
|
16
|
+
import { f as ie, s as ue } from "./hidden-H5tOTsXH.mjs";
|
|
17
|
+
import { v as R, T as E, w, A as se } from "./focus-management-BGuC9pKE.mjs";
|
|
18
18
|
function it(e, t = typeof document < "u" ? document.defaultView : null, r) {
|
|
19
19
|
let n = q(e, "escape");
|
|
20
20
|
fe(t, "keydown", (o) => {
|
|
@@ -32,11 +32,11 @@ function ut() {
|
|
|
32
32
|
return t.addEventListener("change", o), () => t.removeEventListener("change", o);
|
|
33
33
|
}, [t]), r;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function he(e) {
|
|
36
36
|
if (!e) return /* @__PURE__ */ new Set();
|
|
37
37
|
if (typeof e == "function") return new Set(e());
|
|
38
38
|
let t = /* @__PURE__ */ new Set();
|
|
39
|
-
for (let r of e.current)
|
|
39
|
+
for (let r of e.current) Me(r.current) && t.add(r.current);
|
|
40
40
|
return t;
|
|
41
41
|
}
|
|
42
42
|
let st = "div";
|
|
@@ -48,28 +48,28 @@ function ct(e, t) {
|
|
|
48
48
|
mt(a, { ownerDocument: i });
|
|
49
49
|
let f = gt(a, { ownerDocument: i, container: r, initialFocus: o, initialFocusFallback: l });
|
|
50
50
|
vt(a, { ownerDocument: i, container: r, containers: s, previousActiveElement: f });
|
|
51
|
-
let k = Ze(),
|
|
51
|
+
let k = Ze(), h = y((p) => {
|
|
52
52
|
if (!B(r.current)) return;
|
|
53
53
|
let D = r.current;
|
|
54
54
|
((m) => m())(() => {
|
|
55
55
|
U(k.current, { [O.Forwards]: () => {
|
|
56
|
-
R(D,
|
|
56
|
+
R(D, E.First, { skipElements: [p.relatedTarget, l] });
|
|
57
57
|
}, [O.Backwards]: () => {
|
|
58
|
-
R(D,
|
|
58
|
+
R(D, E.Last, { skipElements: [p.relatedTarget, l] });
|
|
59
59
|
} });
|
|
60
60
|
});
|
|
61
|
-
}), v = q(!!(a & 2), "focus-trap#tab-lock"), g = Xe(),
|
|
62
|
-
p.key == "Tab" && (
|
|
63
|
-
|
|
61
|
+
}), v = q(!!(a & 2), "focus-trap#tab-lock"), g = Xe(), b = I(!1), F = { ref: n, onKeyDown(p) {
|
|
62
|
+
p.key == "Tab" && (b.current = !0, g.requestAnimationFrame(() => {
|
|
63
|
+
b.current = !1;
|
|
64
64
|
}));
|
|
65
65
|
}, onBlur(p) {
|
|
66
66
|
if (!(a & 4)) return;
|
|
67
|
-
let D =
|
|
67
|
+
let D = he(s);
|
|
68
68
|
B(r.current) && D.add(r.current);
|
|
69
69
|
let m = p.relatedTarget;
|
|
70
|
-
ne(m) && m.dataset.headlessuiFocusGuard !== "true" && (
|
|
71
|
-
} },
|
|
72
|
-
return u.createElement(u.Fragment, null, v && u.createElement(ie, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus:
|
|
70
|
+
ne(m) && m.dataset.headlessuiFocusGuard !== "true" && (be(D, m) || (b.current ? R(r.current, U(k.current, { [O.Forwards]: () => E.Next, [O.Backwards]: () => E.Previous }) | E.WrapAround, { relativeTo: p.target }) : ne(p.target) && w(p.target)));
|
|
71
|
+
} }, $ = A();
|
|
72
|
+
return u.createElement(u.Fragment, null, v && u.createElement(ie, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: h, features: ue.Focusable }), $({ ourProps: F, theirProps: c, defaultTag: st, name: "FocusTrap" }), v && u.createElement(ie, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: h, features: ue.Focusable }));
|
|
73
73
|
}
|
|
74
74
|
let dt = S(ct), ft = Object.assign(dt, { features: T });
|
|
75
75
|
function pt(e = !0) {
|
|
@@ -86,13 +86,13 @@ function pt(e = !0) {
|
|
|
86
86
|
function mt(e, { ownerDocument: t }) {
|
|
87
87
|
let r = !!(e & 8), n = pt(r);
|
|
88
88
|
G(() => {
|
|
89
|
-
r ||
|
|
89
|
+
r || Ke(t?.body) && w(n());
|
|
90
90
|
}, [r]), Ve(() => {
|
|
91
91
|
r && w(n());
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
function gt(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFallback: o }) {
|
|
95
|
-
let l = I(null), s = q(!!(e & 1), "focus-trap#initial-focus"), a =
|
|
95
|
+
let l = I(null), s = q(!!(e & 1), "focus-trap#initial-focus"), a = Ee();
|
|
96
96
|
return G(() => {
|
|
97
97
|
if (e === 0) return;
|
|
98
98
|
if (!s) {
|
|
@@ -115,8 +115,8 @@ function gt(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFa
|
|
|
115
115
|
if (n != null && n.current) w(n.current);
|
|
116
116
|
else {
|
|
117
117
|
if (e & 16) {
|
|
118
|
-
if (R(c,
|
|
119
|
-
} else if (R(c,
|
|
118
|
+
if (R(c, E.First | E.AutoFocus) !== se.Error) return;
|
|
119
|
+
} else if (R(c, E.First) !== se.Error) return;
|
|
120
120
|
if (o != null && o.current && (w(o.current), t?.activeElement === o.current)) return;
|
|
121
121
|
console.warn("There are no focusable elements inside the <FocusTrap />");
|
|
122
122
|
}
|
|
@@ -125,45 +125,45 @@ function gt(e, { ownerDocument: t, container: r, initialFocus: n, initialFocusFa
|
|
|
125
125
|
}, [o, s, e]), l;
|
|
126
126
|
}
|
|
127
127
|
function vt(e, { ownerDocument: t, container: r, containers: n, previousActiveElement: o }) {
|
|
128
|
-
let l =
|
|
128
|
+
let l = Ee(), s = !!(e & 4);
|
|
129
129
|
fe(t?.defaultView, "focus", (a) => {
|
|
130
130
|
if (!s || !l.current) return;
|
|
131
|
-
let c =
|
|
131
|
+
let c = he(n);
|
|
132
132
|
B(r.current) && c.add(r.current);
|
|
133
133
|
let i = o.current;
|
|
134
134
|
if (!i) return;
|
|
135
135
|
let f = a.target;
|
|
136
|
-
B(f) ?
|
|
136
|
+
B(f) ? be(c, f) ? (o.current = f, w(f)) : (a.preventDefault(), a.stopPropagation(), w(i)) : w(o.current);
|
|
137
137
|
}, !0);
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function be(e, t) {
|
|
140
140
|
for (let r of e) if (r.contains(t)) return !0;
|
|
141
141
|
return !1;
|
|
142
142
|
}
|
|
143
|
-
var wt = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(wt || {}),
|
|
144
|
-
let
|
|
143
|
+
var wt = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(wt || {}), $t = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))($t || {});
|
|
144
|
+
let Et = { 0(e, t) {
|
|
145
145
|
return e.titleId === t.id ? e : { ...e, titleId: t.id };
|
|
146
|
-
} }, Q =
|
|
146
|
+
} }, Q = je(null);
|
|
147
147
|
Q.displayName = "DialogContext";
|
|
148
148
|
function K(e) {
|
|
149
|
-
let t =
|
|
149
|
+
let t = Be(Q);
|
|
150
150
|
if (t === null) {
|
|
151
151
|
let r = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
|
|
152
152
|
throw Error.captureStackTrace && Error.captureStackTrace(r, K), r;
|
|
153
153
|
}
|
|
154
154
|
return t;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
return U(t.type,
|
|
156
|
+
function ht(e, t) {
|
|
157
|
+
return U(t.type, Et, e, t);
|
|
158
158
|
}
|
|
159
159
|
let ce = S(function(e, t) {
|
|
160
|
-
let r = W(), { id: n = `headlessui-dialog-${r}`, open: o, onClose: l, initialFocus: s, role: a = "dialog", autoFocus: c = !0, __demoMode: i = !1, unmount: f = !1, ...k } = e,
|
|
160
|
+
let r = W(), { id: n = `headlessui-dialog-${r}`, open: o, onClose: l, initialFocus: s, role: a = "dialog", autoFocus: c = !0, __demoMode: i = !1, unmount: f = !1, ...k } = e, h = I(!1);
|
|
161
161
|
a = (function() {
|
|
162
|
-
return a === "dialog" || a === "alertdialog" ? a : (
|
|
162
|
+
return a === "dialog" || a === "alertdialog" ? a : (h.current || (h.current = !0, console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
|
|
163
163
|
})();
|
|
164
|
-
let v =
|
|
164
|
+
let v = $e();
|
|
165
165
|
o === void 0 && v !== null && (o = (v & L.Open) === L.Open);
|
|
166
|
-
let g = I(null),
|
|
166
|
+
let g = I(null), b = M(g, t), F = pe(g.current), $ = o ? 0 : 1, [p, D] = Re(ht, { titleId: null, descriptionId: null, panelRef: Ae() }), m = y(() => l(!1)), X = y((d) => D({ type: 0, id: d })), P = ve() ? $ === 0 : !1, [Fe, De] = _e(), Te = { get current() {
|
|
167
167
|
var d;
|
|
168
168
|
return (d = p.panelRef.current) != null ? d : g.current;
|
|
169
169
|
} }, _ = et(), { resolveContainers: z } = tt({ mainTreeNode: _, portals: Fe, defaultContainers: [Te] }), J = v !== null ? (v & L.Closing) === L.Closing : !1;
|
|
@@ -184,13 +184,13 @@ let ce = S(function(e, t) {
|
|
|
184
184
|
}), it(Z, F?.defaultView, (d) => {
|
|
185
185
|
d.preventDefault(), d.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), m();
|
|
186
186
|
}), We(i || J ? !1 : P, F, z), qe(P, g, m);
|
|
187
|
-
let [ye, ke] = lt(), Pe = Le(() => [{ dialogState:
|
|
187
|
+
let [ye, ke] = lt(), Pe = Le(() => [{ dialogState: $, close: m, setTitleId: X, unmount: f }, p], [$, m, X, f, p]), ee = Y({ open: $ === 0 }), xe = { ref: b, id: n, role: a, tabIndex: -1, "aria-modal": i ? void 0 : $ === 0 ? !0 : void 0, "aria-labelledby": p.titleId, "aria-describedby": ye, unmount: f }, Ce = !ut(), N = T.None;
|
|
188
188
|
P && !i && (N |= T.RestoreFocus, N |= T.TabLock, c && (N |= T.AutoFocus), Ce && (N |= T.InitialFocus));
|
|
189
189
|
let Ie = A();
|
|
190
|
-
return u.createElement(ot, null, u.createElement(oe, { force: !0 }, u.createElement(Ge, null, u.createElement(Q.Provider, { value: Pe }, u.createElement(Qe, { target: g }, u.createElement(oe, { force: !1 }, u.createElement(ke, { slot: ee }, u.createElement(De, null, u.createElement(ft, { initialFocus: s, initialFocusFallback: g, containers: z, features: N }, u.createElement(nt, { value: m }, Ie({ ourProps: xe, theirProps: k, slot: ee, defaultTag:
|
|
191
|
-
}),
|
|
190
|
+
return u.createElement(ot, null, u.createElement(oe, { force: !0 }, u.createElement(Ge, null, u.createElement(Q.Provider, { value: Pe }, u.createElement(Qe, { target: g }, u.createElement(oe, { force: !1 }, u.createElement(ke, { slot: ee }, u.createElement(De, null, u.createElement(ft, { initialFocus: s, initialFocusFallback: g, containers: z, features: N }, u.createElement(nt, { value: m }, Ie({ ourProps: xe, theirProps: k, slot: ee, defaultTag: bt, features: Ft, visible: $ === 0, name: "Dialog" })))))))))));
|
|
191
|
+
}), bt = "div", Ft = ae.RenderStrategy | ae.Static;
|
|
192
192
|
function Dt(e, t) {
|
|
193
|
-
let { transition: r = !1, open: n, ...o } = e, l =
|
|
193
|
+
let { transition: r = !1, open: n, ...o } = e, l = $e(), s = e.hasOwnProperty("open") || l !== null, a = e.hasOwnProperty("onClose");
|
|
194
194
|
if (!s && !a) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
|
|
195
195
|
if (!s) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
|
|
196
196
|
if (!a) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
|
|
@@ -202,8 +202,8 @@ let Tt = "div";
|
|
|
202
202
|
function yt(e, t) {
|
|
203
203
|
let r = W(), { id: n = `headlessui-dialog-panel-${r}`, transition: o = !1, ...l } = e, [{ dialogState: s, unmount: a }, c] = K("Dialog.Panel"), i = M(t, c.panelRef), f = Y({ open: s === 0 }), k = y((F) => {
|
|
204
204
|
F.stopPropagation();
|
|
205
|
-
}),
|
|
206
|
-
return u.createElement(v, { ...g },
|
|
205
|
+
}), h = { ref: i, id: n, onClick: k }, v = o ? we : de, g = o ? { unmount: a } : {}, b = A();
|
|
206
|
+
return u.createElement(v, { ...g }, b({ ourProps: h, theirProps: l, slot: f, defaultTag: Tt, name: "Dialog.Panel" }));
|
|
207
207
|
}
|
|
208
208
|
let kt = "div";
|
|
209
209
|
function Pt(e, t) {
|
|
@@ -246,7 +246,7 @@ function Zt({ children: e, className: t }) {
|
|
|
246
246
|
}
|
|
247
247
|
export {
|
|
248
248
|
Qt as D,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
Zt as a,
|
|
250
|
+
Xt as b,
|
|
251
|
+
Jt as c
|
|
252
252
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../disclosure-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../disclosure-qEQ_kll8.js");exports.Disclosure=e.Disclosure;exports.DisclosureButton=e.DisclosureButton;exports.DisclosurePanel=e.DisclosurePanel;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
-
import b, { useRef as J, useReducer as Z, useMemo as ee,
|
|
2
|
+
import b, { useRef as J, useReducer as Z, useMemo as ee, Fragment as te, useId as L, useState as le, useEffect as Y, createContext as h, useContext as C } from "react";
|
|
3
3
|
import { c as T } from "./tailwind-DtaLkIY8.mjs";
|
|
4
|
-
import { $ as re, a as ne } from "./useFocusRing-
|
|
5
|
-
import { w as oe, e as se } from "./use-resolve-button-type-
|
|
6
|
-
import { Y as w, y as k, T as ae, c as ue, a as S, K as B, u as F, V as M, A as U } from "./use-sync-refs-
|
|
7
|
-
import { b as N, o as I, l as ie, i as X } from "./keyboard-
|
|
8
|
-
import { c as ce, u as pe, N as de, i as $, x as fe, s as me } from "./open-closed-
|
|
4
|
+
import { $ as re, a as ne } from "./useFocusRing-Df1NuOsX.mjs";
|
|
5
|
+
import { w as oe, e as se } from "./use-resolve-button-type-BhmWA6Dl.mjs";
|
|
6
|
+
import { Y as w, y as k, T as ae, c as ue, a as S, K as B, u as F, V as M, A as U } from "./use-sync-refs-CDCE8QtA.mjs";
|
|
7
|
+
import { b as N, o as I, l as ie, i as X } from "./keyboard-BzaAKRwG.mjs";
|
|
8
|
+
import { c as ce, u as pe, N as de, i as $, x as fe, s as me } from "./open-closed-Be5nD5U2.mjs";
|
|
9
9
|
import { C as be } from "./close-provider-CEutdhG8.mjs";
|
|
10
|
-
import { s as ye } from "./bugs-
|
|
10
|
+
import { s as ye } from "./bugs-g7aYPtcD.mjs";
|
|
11
11
|
var G;
|
|
12
12
|
let Ee = (G = b.startTransition) != null ? G : function(e) {
|
|
13
13
|
e();
|
|
@@ -89,11 +89,7 @@ function he(e, t) {
|
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
91
|
}), v = S((a) => {
|
|
92
|
-
|
|
93
|
-
case I.Space:
|
|
94
|
-
a.preventDefault();
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
92
|
+
a.key === I.Space && a.preventDefault();
|
|
97
93
|
}), s = S((a) => {
|
|
98
94
|
var D;
|
|
99
95
|
ye(a.currentTarget) || u || (o ? (r({ type: 0 }), (D = l.buttonElement) == null || D.focus()) : r({ type: 0 }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const x=require("react/jsx-runtime"),l=require("react"),C=require("./tailwind-D2U2F80P.js"),j=require("./useFocusRing-
|
|
1
|
+
"use strict";const x=require("react/jsx-runtime"),l=require("react"),C=require("./tailwind-D2U2F80P.js"),j=require("./useFocusRing-BM96K_1O.js"),N=require("./use-resolve-button-type-DDyWUJvM.js"),n=require("./use-sync-refs-DoZFQ57o.js"),d=require("./keyboard-DFJ4Xn4Y.js"),f=require("./open-closed-Blps4pTz.js"),H=require("./close-provider-DRYce3-3.js"),M=require("./bugs-CUXRbTY8.js");var O;let U=(O=l.startTransition)!=null?O:function(e){e()};var X=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(X||{}),G=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))(G||{});let J={0:e=>({...e,disclosureState:n.u(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},4(e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},5(e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},T=l.createContext(null);T.displayName="DisclosureContext";function h(e){let t=l.useContext(T);if(t===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,h),o}return t}let w=l.createContext(null);w.displayName="DisclosureAPIContext";function K(e){let t=l.useContext(w);if(t===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,K),o}return t}let k=l.createContext(null);k.displayName="DisclosurePanelContext";function L(){return l.useContext(k)}function _(e,t){return n.u(t.type,J,e,t)}let z=l.Fragment;function Q(e,t){let{defaultOpen:o=!1,...p}=e,i=l.useRef(null),m=n.y(t,n.T(a=>{i.current=a},e.as===void 0||n.b(e.as))),b=l.useReducer(_,{disclosureState:o?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:r,buttonId:s},g]=b,u=n.o$1(a=>{g({type:1});let E=d.l(i.current);if(!E||!s)return;let S=a?d.i(a)?a:"current"in a&&d.i(a.current)?a.current:E.getElementById(s):E.getElementById(s);S?.focus()}),D=l.useMemo(()=>({close:u}),[u]),y=d.n$1({open:r===0,close:u}),v={ref:m},P=n.K();return l.createElement(T.Provider,{value:b},l.createElement(w.Provider,{value:D},l.createElement(H.C,{value:u},l.createElement(f.c,{value:n.u(r,{0:f.i.Open,1:f.i.Closed})},P({ourProps:v,theirProps:p,slot:y,defaultTag:z,name:"Disclosure"})))))}let W="button";function Z(e,t){let o=l.useId(),{id:p=`headlessui-disclosure-button-${o}`,disabled:i=!1,autoFocus:m=!1,...b}=e,[r,s]=h("Disclosure.Button"),g=L(),u=g===null?!1:g===r.panelId,D=l.useRef(null),y=n.y(D,t,n.o$1(c=>{if(!u)return s({type:4,element:c})}));l.useEffect(()=>{if(!u)return s({type:2,buttonId:p}),()=>{s({type:2,buttonId:null})}},[p,s,u]);let v=n.o$1(c=>{var I;if(u){if(r.disclosureState===1)return;switch(c.key){case d.o.Space:case d.o.Enter:c.preventDefault(),c.stopPropagation(),s({type:0}),(I=r.buttonElement)==null||I.focus();break}}else switch(c.key){case d.o.Space:case d.o.Enter:c.preventDefault(),c.stopPropagation(),s({type:0});break}}),P=n.o$1(c=>{c.key===d.o.Space&&c.preventDefault()}),a=n.o$1(c=>{var I;M.s(c.currentTarget)||i||(u?(s({type:0}),(I=r.buttonElement)==null||I.focus()):s({type:0}))}),{isFocusVisible:E,focusProps:S}=j.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:m}),{isHovered:$,hoverProps:q}=j.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:i}),{pressed:A,pressProps:R}=N.w({disabled:i}),V=d.n$1({open:r.disclosureState===0,hover:$,active:A,disabled:i,focus:E,autofocus:m}),F=N.e(e,r.buttonElement),Y=u?n.V({ref:y,type:F,disabled:i||void 0,autoFocus:m,onKeyDown:v,onClick:a},S,q,R):n.V({ref:y,id:p,type:F,"aria-expanded":r.disclosureState===0,"aria-controls":r.panelElement?r.panelId:void 0,disabled:i||void 0,autoFocus:m,onKeyDown:v,onKeyUp:P,onClick:a},S,q,R);return n.K()({ourProps:Y,theirProps:b,slot:V,defaultTag:W,name:"Disclosure.Button"})}let ee="div",te=n.A.RenderStrategy|n.A.Static;function ne(e,t){let o=l.useId(),{id:p=`headlessui-disclosure-panel-${o}`,transition:i=!1,...m}=e,[b,r]=h("Disclosure.Panel"),{close:s}=K("Disclosure.Panel"),[g,u]=l.useState(null),D=n.y(t,n.o$1($=>{U(()=>r({type:5,element:$}))}),u);l.useEffect(()=>(r({type:3,panelId:p}),()=>{r({type:3,panelId:null})}),[p,r]);let y=f.u(),[v,P]=f.N(i,g,y!==null?(y&f.i.Open)===f.i.Open:b.disclosureState===0),a=d.n$1({open:b.disclosureState===0,close:s}),E={ref:D,id:p,...f.x(P)},S=n.K();return l.createElement(f.s,null,l.createElement(k.Provider,{value:b.panelId},S({ourProps:E,theirProps:m,slot:a,defaultTag:ee,features:te,visible:v,name:"Disclosure.Panel"})))}let le=n.Y(Q),re=n.Y(Z),se=n.Y(ne),B=Object.assign(le,{Button:re,Panel:se});function oe({children:e,defaultOpen:t=!1,className:o}){return x.jsx("div",{className:C.cn("w-full",o),children:x.jsx(B,{defaultOpen:t,children:e})})}function ue({children:e,className:t}){return x.jsx(B.Button,{className:C.cn("flex w-full justify-between rounded-lg bg-gray-100 px-4 py-2 text-left text-base font-medium text-gray-900 hover:bg-gray-200 focus:outline-none focus-visible:ring focus-visible:ring-gray-500 focus-visible:ring-opacity-75",t),children:e})}function ae({children:e,className:t}){return x.jsx(B.Panel,{className:C.cn("px-4 pb-2 pt-4 text-base text-gray-500",t),children:e})}exports.Disclosure=oe;exports.DisclosureButton=ue;exports.DisclosurePanel=ae;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../dropdown-menu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../dropdown-menu-B9fTvSZe.js");exports.DropdownMenu=o.DropdownMenu;exports.DropdownMenuButton=o.DropdownMenuButton;exports.DropdownMenuItem=o.DropdownMenuItem;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsxs as Ee, jsx as k } from "react/jsx-runtime";
|
|
2
|
-
import D, {
|
|
2
|
+
import D, { useMemo as Te, createContext as we, useContext as ke, useId as U, useCallback as K, Fragment as te, useRef as X, useState as De, useEffect as Oe } from "react";
|
|
3
3
|
import { B as me } from "./button-DiBXU5vv.mjs";
|
|
4
4
|
import { c as q } from "./tailwind-DtaLkIY8.mjs";
|
|
5
|
-
import { $ as Re, a as Ce } from "./useFocusRing-
|
|
5
|
+
import { $ as Re, a as Ce } from "./useFocusRing-Df1NuOsX.mjs";
|
|
6
6
|
import { flushSync as ee } from "react-dom";
|
|
7
|
-
import { w as Fe, e as _e } from "./use-resolve-button-type-
|
|
8
|
-
import { u as pe, Y as O, y as J, a as x, K as R, n as j, p as Ae, V as fe, A as ae, o as Ne } from "./use-sync-refs-
|
|
9
|
-
import { A as Be, y as Ge, R as Le, T as Ke, w as He, b as Ue, F as Qe } from "./floating-
|
|
10
|
-
import { p as Ve, c as z, a as f, f as Q, b as je, u as ze, L as qe, S as V, s as Ye } from "./element-movement-
|
|
11
|
-
import { y as Ze } from "./use-inert-others-
|
|
12
|
-
import { T as Je, k as le, x as ve, a as We, c as Xe, S as T, b as et, u as ie, p as tt, f as nt, t as rt } from "./portal-
|
|
13
|
-
import { b as W, d as st, n as ot, o as b } from "./keyboard-
|
|
14
|
-
import { s as at } from "./use-text-value-
|
|
15
|
-
import { c as lt,
|
|
16
|
-
import { F as ct } from "./use-tree-walker-
|
|
17
|
-
import { G as mt, R as pt, T as ue, K as Ie, H as ft, I as vt } from "./focus-management-
|
|
18
|
-
import { H as It } from "./description-
|
|
19
|
-
import { C as gt, V as ge } from "./label
|
|
20
|
-
import { K as bt } from "./transition-
|
|
7
|
+
import { w as Fe, e as _e } from "./use-resolve-button-type-BhmWA6Dl.mjs";
|
|
8
|
+
import { u as pe, Y as O, y as J, a as x, K as R, n as j, p as Ae, V as fe, A as ae, o as Ne } from "./use-sync-refs-CDCE8QtA.mjs";
|
|
9
|
+
import { A as Be, y as Ge, R as Le, T as Ke, w as He, b as Ue, F as Qe } from "./floating-DQ2M2ViQ.mjs";
|
|
10
|
+
import { p as Ve, c as z, a as f, f as Q, b as je, u as ze, L as qe, S as V, s as Ye } from "./element-movement-Bad2OqSj.mjs";
|
|
11
|
+
import { y as Ze } from "./use-inert-others-CgSXXC-d.mjs";
|
|
12
|
+
import { T as Je, k as le, x as ve, a as We, c as Xe, S as T, b as et, u as ie, p as tt, f as nt, t as rt } from "./portal-D-TZOwvF.mjs";
|
|
13
|
+
import { b as W, d as st, n as ot, o as b } from "./keyboard-BzaAKRwG.mjs";
|
|
14
|
+
import { s as at } from "./use-text-value-BKEvykNe.mjs";
|
|
15
|
+
import { c as lt, u as it, N as ut, x as dt, i as Y } from "./open-closed-Be5nD5U2.mjs";
|
|
16
|
+
import { F as ct } from "./use-tree-walker-CHC6ccbq.mjs";
|
|
17
|
+
import { G as mt, R as pt, T as ue, K as Ie, H as ft, I as vt } from "./focus-management-BGuC9pKE.mjs";
|
|
18
|
+
import { H as It } from "./description-hiFZ303Y.mjs";
|
|
19
|
+
import { C as gt, V as ge } from "./label--pGndX3z.mjs";
|
|
20
|
+
import { K as bt } from "./transition-B4KhhkrB.mjs";
|
|
21
21
|
var ht = Object.defineProperty, yt = (e, n, t) => n in e ? ht(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, de = (e, n, t) => (yt(e, typeof n != "symbol" ? n + "" : n, t), t), h = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(h || {}), Z = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Z || {}), u = ((e) => (e[e.OpenMenu = 0] = "OpenMenu", e[e.CloseMenu = 1] = "CloseMenu", e[e.GoToItem = 2] = "GoToItem", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.RegisterItems = 5] = "RegisterItems", e[e.UnregisterItems = 6] = "UnregisterItems", e[e.SetButtonElement = 7] = "SetButtonElement", e[e.SetItemsElement = 8] = "SetItemsElement", e[e.SortItems = 9] = "SortItems", e[e.MarkButtonAsMoved = 10] = "MarkButtonAsMoved", e))(u || {});
|
|
22
22
|
function ce(e, n = (t) => t) {
|
|
23
23
|
let t = e.activeItemIndex !== null ? e.items[e.activeItemIndex] : null, r = mt(n(e.items.slice()), (a) => a.dataRef.current.domRef.current), s = t ? r.indexOf(t) : null;
|
|
@@ -126,7 +126,7 @@ class ne extends Je {
|
|
|
126
126
|
return pe(t.type, St, n, t);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
const be =
|
|
129
|
+
const be = we(null);
|
|
130
130
|
function re(e) {
|
|
131
131
|
let n = ke(be);
|
|
132
132
|
if (n === null) {
|
|
@@ -136,7 +136,7 @@ function re(e) {
|
|
|
136
136
|
return n;
|
|
137
137
|
}
|
|
138
138
|
function he({ id: e, __demoMode: n = !1 }) {
|
|
139
|
-
let t =
|
|
139
|
+
let t = Te(() => ne.new({ id: e, __demoMode: n }), []);
|
|
140
140
|
return Xe(() => t.dispose()), t;
|
|
141
141
|
}
|
|
142
142
|
let $t = te;
|
|
@@ -165,11 +165,7 @@ function Pt(e, n) {
|
|
|
165
165
|
break;
|
|
166
166
|
}
|
|
167
167
|
}), I = x((d) => {
|
|
168
|
-
|
|
169
|
-
case b.Space:
|
|
170
|
-
d.preventDefault();
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
168
|
+
d.key === b.Space && d.preventDefault();
|
|
173
169
|
}), [c, g, E] = T(t, (d) => [d.menuState, d.buttonElement, d.itemsElement]), y = c === h.Open;
|
|
174
170
|
qe(y, { trigger: g, action: K((d) => {
|
|
175
171
|
if (g != null && g.contains(d.target)) return V.Ignore;
|
|
@@ -236,11 +232,7 @@ function wt(e, n) {
|
|
|
236
232
|
break;
|
|
237
233
|
}
|
|
238
234
|
}), Se = x((l) => {
|
|
239
|
-
|
|
240
|
-
case b.Space:
|
|
241
|
-
l.preventDefault();
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
235
|
+
l.key === b.Space && l.preventDefault();
|
|
244
236
|
}), $e = W({ open: S === h.Open }), xe = fe(M ? c() : {}, { "aria-activedescendant": T(o, o.selectors.activeDescendantId), "aria-labelledby": T(o, (l) => {
|
|
245
237
|
var L;
|
|
246
238
|
return (L = l.buttonElement) == null ? void 0 : L.id;
|
|
@@ -353,6 +345,6 @@ function pn({ children: e, className: n, ...t }) {
|
|
|
353
345
|
}
|
|
354
346
|
export {
|
|
355
347
|
cn as D,
|
|
356
|
-
|
|
357
|
-
|
|
348
|
+
pn as a,
|
|
349
|
+
mn as b
|
|
358
350
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const D=require("react/jsx-runtime"),d=require("react"),te=require("./button-aT0PtwWb.js"),L=require("./tailwind-D2U2F80P.js"),Z=require("./useFocusRing-BM96K_1O.js"),U=require("react-dom"),J=require("./use-resolve-button-type-DDyWUJvM.js"),l=require("./use-sync-refs-DoZFQ57o.js"),O=require("./floating-C1n3e5u7.js"),c=require("./element-movement-BjoSY4_c.js"),ce=require("./use-inert-others-CfJSV8X0.js"),I=require("./portal-BBLniC-d.js"),g=require("./keyboard-DFJ4Xn4Y.js"),de=require("./use-text-value-D3Jlcm8N.js"),R=require("./open-closed-Blps4pTz.js"),me=require("./use-tree-walker-FWwHzDNC.js"),C=require("./focus-management-DDD7qKjm.js"),pe=require("./description-DhdnQHiq.js"),H=require("./label-BZhmBT_0.js"),fe=require("./transition-D0lrFviR.js");var ve=Object.defineProperty,Ie=(e,n,t)=>n in e?ve(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,X=(e,n,t)=>(Ie(e,typeof n!="symbol"?n+"":n,t),t),x=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(x||{}),V=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(V||{}),m=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e[e.MarkButtonAsMoved=10]="MarkButtonAsMoved",e))(m||{});function ee(e,n=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=C.G(n(e.items.slice()),a=>a.dataRef.current.domRef.current),o=t?r.indexOf(t):null;return o===-1&&(o=null),{items:r,activeItemIndex:o}}let ge={1(e){if(e.menuState===1)return e;let n=e.buttonElement?c.c.Tracked(c.a(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:c.c$1.Nothing},menuState:1,buttonPositionState:n}},0(e,n){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:n.focus,menuState:0,buttonPositionState:c.c.Idle}},2:(e,n)=>{var t,r,o,a,u;if(e.menuState===1)return e;let b={...e,searchQuery:"",activationTrigger:(t=n.trigger)!=null?t:1,__demoMode:!1};if(n.focus===c.c$1.Nothing)return{...b,activeItemIndex:null};if(n.focus===c.c$1.Specific)return{...b,activeItemIndex:e.items.findIndex(s=>s.id===n.id)};if(n.focus===c.c$1.Previous){let s=e.activeItemIndex;if(s!==null){let T=e.items[s].dataRef.current.domRef,S=c.f(n,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(S!==null){let f=e.items[S].dataRef.current.domRef;if(((r=T.current)==null?void 0:r.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...b,activeItemIndex:S}}}}else if(n.focus===c.c$1.Next){let s=e.activeItemIndex;if(s!==null){let T=e.items[s].dataRef.current.domRef,S=c.f(n,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(S!==null){let f=e.items[S].dataRef.current.domRef;if(((a=T.current)==null?void 0:a.nextElementSibling)===f.current||((u=f.current)==null?void 0:u.nextElementSibling)===null)return{...b,activeItemIndex:S}}}}let h=ee(e),E=c.f(n,{resolveItems:()=>h.items,resolveActiveIndex:()=>h.activeItemIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});return{...b,...h,activeItemIndex:E}},3:(e,n)=>{let t=e.searchQuery!==""?0:1,r=e.searchQuery+n.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(u=>{var b;return((b=u.dataRef.current.textValue)==null?void 0:b.startsWith(r))&&!u.dataRef.current.disabled}),a=o?e.items.indexOf(o):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,n)=>{let t=e.items.concat(n.items.map(o=>o)),r=e.activeItemIndex;return e.pendingFocus.focus!==c.c$1.Nothing&&(r=c.f(e.pendingFocus,{resolveItems:()=>t,resolveActiveIndex:()=>e.activeItemIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),{...e,items:t,activeItemIndex:r,pendingFocus:{focus:c.c$1.Nothing},pendingShouldSort:!0}},6:(e,n)=>{let t=e.items,r=[],o=new Set(n.items);for(let[a,u]of t.entries())if(o.has(u.id)&&(r.push(a),o.delete(u.id),o.size===0))break;if(r.length>0){t=t.slice();for(let a of r.reverse())t.splice(a,1)}return{...e,items:t,activationTrigger:1}},7:(e,n)=>e.buttonElement===n.element?e:{...e,buttonElement:n.element},8:(e,n)=>e.itemsElement===n.element?e:{...e,itemsElement:n.element},9:e=>e.pendingShouldSort?{...e,...ee(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:c.c.Moved}}};class Q extends I.T{constructor(n){super(n),X(this,"actions",{registerItem:I.k(()=>{let t=[],r=new Set;return[(o,a)=>{r.has(a)||(r.add(a),t.push({id:o,dataRef:a}))},()=>(r.clear(),this.send({type:5,items:t.splice(0)}))]}),unregisterItem:I.k(()=>{let t=[];return[r=>t.push(r),()=>this.send({type:6,items:t.splice(0)})]})}),X(this,"selectors",{activeDescendantId(t){var r;let o=t.activeItemIndex,a=t.items;return o===null||(r=a[o])==null?void 0:r.id},isActive(t,r){var o;let a=t.activeItemIndex,u=t.items;return a!==null?((o=u[a])==null?void 0:o.id)===r:!1},shouldScrollIntoView(t,r){return t.__demoMode||t.menuState!==0||t.activationTrigger===0?!1:this.isActive(t,r)},didButtonMove(t){return t.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let t=this.state.id,r=I.x.get(null);this.disposables.add(r.on(I.k$1.Push,o=>{!r.selectors.isTop(o,t)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>r.actions.push(t)),this.on(1,()=>r.actions.pop(t))}this.disposables.group(t=>{this.on(1,r=>{r.buttonElement&&(t.dispose(),t.add(c.p(r.buttonElement,r.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:n,__demoMode:t=!1}){return new Q({id:n,__demoMode:t,menuState:t?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:c.c$1.Nothing},buttonPositionState:c.c.Idle})}reduce(n,t){return l.u(t.type,ge,n,t)}}const ne=d.createContext(null);function Y(e){let n=d.useContext(ne);if(n===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,re),t}return n}function re({id:e,__demoMode:n=!1}){let t=d.useMemo(()=>Q.new({id:e,__demoMode:n}),[]);return I.c(()=>t.dispose()),t}let be=d.Fragment;function he(e,n){let t=d.useId(),{__demoMode:r=!1,...o}=e,a=re({id:t,__demoMode:r}),[u,b,h]=I.S(a,M=>[M.menuState,M.itemsElement,M.buttonElement]),E=l.y(n),s=I.x.get(null),T=I.S(s,d.useCallback(M=>s.selectors.isTop(M,t),[s,t]));I.k$2(T,[h,b],(M,P)=>{var $;a.send({type:m.CloseMenu}),C.H(P,C.I.Loose)||(M.preventDefault(),($=a.state.buttonElement)==null||$.focus())});let S=l.o$1(()=>{a.send({type:m.CloseMenu})}),f=g.n$1({open:u===x.Open,close:S}),y={ref:E},w=l.K();return d.createElement(O.Ae,null,d.createElement(ne.Provider,{value:a},d.createElement(R.c,{value:l.u(u,{[x.Open]:R.i.Open,[x.Closed]:R.i.Closed})},w({ourProps:y,theirProps:o,slot:f,defaultTag:be,name:"Menu"}))))}let Se="button";function ye(e,n){let t=Y("Menu.Button"),r=d.useId(),{id:o=`headlessui-menu-button-${r}`,disabled:a=!1,autoFocus:u=!1,...b}=e,h=d.useRef(null),E=O.be(),s=l.y(n,h,O.Fe(),l.o$1(p=>t.send({type:m.SetButtonElement,element:p}))),T=l.o$1(p=>{switch(p.key){case g.o.Space:case g.o.Enter:case g.o.ArrowDown:p.preventDefault(),p.stopPropagation(),t.send({type:m.OpenMenu,focus:{focus:c.c$1.First}});break;case g.o.ArrowUp:p.preventDefault(),p.stopPropagation(),t.send({type:m.OpenMenu,focus:{focus:c.c$1.Last}});break}}),S=l.o$1(p=>{p.key===g.o.Space&&p.preventDefault()}),[f,y,w]=I.S(t,p=>[p.menuState,p.buttonElement,p.itemsElement]),M=f===x.Open;c.L(M,{trigger:y,action:d.useCallback(p=>{if(y!=null&&y.contains(p.target))return c.S.Ignore;let v=p.target.closest('[role="menuitem"]:not([data-disabled])');return g.n(v)?c.S.Select(v):w!=null&&w.contains(p.target)?c.S.Ignore:c.S.Close},[y,w]),close:d.useCallback(()=>t.send({type:m.CloseMenu}),[]),select:d.useCallback(p=>p.click(),[])});let P=c.s(p=>{var v;a||(f===x.Open?(U.flushSync(()=>t.send({type:m.CloseMenu})),(v=h.current)==null||v.focus({preventScroll:!0})):(p.preventDefault(),t.send({type:m.OpenMenu,focus:{focus:c.c$1.Nothing},trigger:V.Pointer})))}),{isFocusVisible:$,focusProps:F}=Z.$f7dceffc5ad7768b$export$4e328f61c538687f({autoFocus:u}),{isHovered:q,hoverProps:_}=Z.$6179b936705e76d3$export$ae780daf29e6d456({isDisabled:a}),{pressed:k,pressProps:N}=J.w({disabled:a}),A=g.n$1({open:f===x.Open,active:k||f===x.Open,disabled:a,hover:q,focus:$,autofocus:u}),B=l.V(E(),{ref:s,id:o,type:J.e(e,h.current),"aria-haspopup":"menu","aria-controls":w?.id,"aria-expanded":f===x.Open,disabled:a||void 0,autoFocus:u,onKeyDown:T,onKeyUp:S},P,F,_,N);return l.K()({ourProps:B,theirProps:b,slot:A,defaultTag:Se,name:"Menu.Button"})}let xe="div",Me=l.A.RenderStrategy|l.A.Static;function Pe(e,n){let t=d.useId(),{id:r=`headlessui-menu-items-${t}`,anchor:o,portal:a=!1,modal:u=!0,transition:b=!1,...h}=e,E=O.ye(o),s=Y("Menu.Items"),[T,S]=O.Re(E),f=O.Te(),[y,w]=d.useState(null),M=l.y(n,E?T:null,l.o$1(i=>s.send({type:m.SetItemsElement,element:i})),w),[P,$]=I.S(s,i=>[i.menuState,i.buttonElement]),F=I.u($),q=I.u(y);E&&(a=!0);let _=R.u(),[k,N]=R.N(b,y,_!==null?(_&R.i.Open)===R.i.Open:P===x.Open);I.p(k,$,()=>{s.send({type:m.CloseMenu})});let A=I.S(s,i=>i.__demoMode),B=A?!1:u&&P===x.Open;I.f(B,q);let p=A?!1:u&&P===x.Open;ce.y(p,{allowed:d.useCallback(()=>[$,y],[$,y])});let v=I.S(s,s.selectors.didButtonMove)?!1:k;d.useEffect(()=>{let i=y;i&&P===x.Open&&(g.d(i)||i.focus({preventScroll:!0}))},[P,y]),me.F(P===x.Open,{container:y,accept(i){return i.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:i.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(i){i.setAttribute("role","none")}});let K=l.p(),oe=l.o$1(i=>{var G,z,W;switch(K.dispose(),i.key){case g.o.Space:if(s.state.searchQuery!=="")return i.preventDefault(),i.stopPropagation(),s.send({type:m.Search,value:i.key});case g.o.Enter:if(i.preventDefault(),i.stopPropagation(),s.state.activeItemIndex!==null){let{dataRef:ue}=s.state.items[s.state.activeItemIndex];(z=(G=ue.current)==null?void 0:G.domRef.current)==null||z.click()}s.send({type:m.CloseMenu}),C.K(s.state.buttonElement);break;case g.o.ArrowDown:return i.preventDefault(),i.stopPropagation(),s.send({type:m.GoToItem,focus:c.c$1.Next});case g.o.ArrowUp:return i.preventDefault(),i.stopPropagation(),s.send({type:m.GoToItem,focus:c.c$1.Previous});case g.o.Home:case g.o.PageUp:return i.preventDefault(),i.stopPropagation(),s.send({type:m.GoToItem,focus:c.c$1.First});case g.o.End:case g.o.PageDown:return i.preventDefault(),i.stopPropagation(),s.send({type:m.GoToItem,focus:c.c$1.Last});case g.o.Escape:i.preventDefault(),i.stopPropagation(),U.flushSync(()=>s.send({type:m.CloseMenu})),(W=s.state.buttonElement)==null||W.focus({preventScroll:!0});break;case g.o.Tab:i.preventDefault(),i.stopPropagation(),U.flushSync(()=>s.send({type:m.CloseMenu})),C.R(s.state.buttonElement,i.shiftKey?C.T.Previous:C.T.Next);break;default:i.key.length===1&&(s.send({type:m.Search,value:i.key}),K.setTimeout(()=>s.send({type:m.ClearSearch}),350));break}}),se=l.o$1(i=>{i.key===g.o.Space&&i.preventDefault()}),ae=g.n$1({open:P===x.Open}),le=l.V(E?f():{},{"aria-activedescendant":I.S(s,s.selectors.activeDescendantId),"aria-labelledby":I.S(s,i=>{var G;return(G=i.buttonElement)==null?void 0:G.id}),id:r,onKeyDown:oe,onKeyUp:se,role:"menu",tabIndex:P===x.Open?0:void 0,ref:M,style:{...h.style,...S,"--button-width":O.w(k,$,!0).width},...R.x(N)}),ie=l.K();return d.createElement(I.te,{enabled:a?e.static||k:!1,ownerDocument:F},ie({ourProps:le,theirProps:h,slot:ae,defaultTag:xe,features:Me,visible:v,name:"Menu.Items"}))}let $e=d.Fragment;function Ee(e,n){let t=d.useId(),{id:r=`headlessui-menu-item-${t}`,disabled:o=!1,...a}=e,u=Y("Menu.Item"),b=I.S(u,v=>u.selectors.isActive(v,r)),h=d.useRef(null),E=l.y(n,h),s=I.S(u,v=>u.selectors.shouldScrollIntoView(v,r));l.n(()=>{if(s)return l.o().requestAnimationFrame(()=>{var v,K;(K=(v=h.current)==null?void 0:v.scrollIntoView)==null||K.call(v,{block:"nearest"})})},[s,h]);let T=de.s(h),S=d.useRef({disabled:o,domRef:h,get textValue(){return T()}});l.n(()=>{S.current.disabled=o},[S,o]),l.n(()=>(u.actions.registerItem(r,S),()=>u.actions.unregisterItem(r)),[S,r]);let f=l.o$1(()=>{u.send({type:m.CloseMenu})}),y=l.o$1(v=>{if(o)return v.preventDefault();u.send({type:m.CloseMenu}),C.K(u.state.buttonElement)}),w=l.o$1(()=>{if(o)return u.send({type:m.GoToItem,focus:c.c$1.Nothing});u.send({type:m.GoToItem,focus:c.c$1.Specific,id:r})}),M=c.u(),P=l.o$1(v=>M.update(v)),$=l.o$1(v=>{M.wasMoved(v)&&(o||b||u.send({type:m.GoToItem,focus:c.c$1.Specific,id:r,trigger:V.Pointer}))}),F=l.o$1(v=>{M.wasMoved(v)&&(o||b&&u.state.activationTrigger===V.Pointer&&u.send({type:m.GoToItem,focus:c.c$1.Nothing}))}),[q,_]=H.V(),[k,N]=pe.H(),A=g.n$1({active:b,focus:b,disabled:o,close:f}),B={id:r,ref:E,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-labelledby":q,"aria-describedby":k,disabled:void 0,onClick:y,onFocus:w,onPointerEnter:P,onMouseEnter:P,onPointerMove:$,onMouseMove:$,onPointerLeave:F,onMouseLeave:F},p=l.K();return d.createElement(_,null,d.createElement(N,null,p({ourProps:B,theirProps:a,slot:A,defaultTag:$e,name:"Menu.Item"})))}let Te="div";function we(e,n){let[t,r]=H.V(),o=e,a={ref:n,"aria-labelledby":t,role:"group"},u=l.K();return d.createElement(r,null,u({ourProps:a,theirProps:o,slot:{},defaultTag:Te,name:"Menu.Section"}))}let ke="header";function De(e,n){let t=d.useId(),{id:r=`headlessui-menu-heading-${t}`,...o}=e,a=H.C();l.n(()=>a.register(r),[r,a.register]);let u={id:r,ref:n,role:"presentation",...a.props};return l.K()({ourProps:u,theirProps:o,slot:{},defaultTag:ke,name:"Menu.Heading"})}let Re="div";function Ce(e,n){let t=e,r={ref:n,role:"separator"};return l.K()({ourProps:r,theirProps:t,slot:{},defaultTag:Re,name:"Menu.Separator"})}let Oe=l.Y(he),Fe=l.Y(ye),_e=l.Y(Pe),Ae=l.Y(Ee),qe=l.Y(we),Ne=l.Y(De),Be=l.Y(Ce),j=Object.assign(Oe,{Button:Fe,Items:_e,Item:Ae,Section:qe,Heading:Ne,Separator:Be});function Ke({trigger:e,children:n,className:t,align:r="right"}){return D.jsxs(j,{as:"div",className:L.cn("relative inline-block text-left",t),children:[D.jsx(j.Button,{as:d.Fragment,children:e}),D.jsx(fe.Ke,{enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:D.jsx(j.Items,{className:L.cn("absolute z-10 mt-2 w-56 origin-top-right rounded-md bg-background shadow-lg ring-1 ring-border focus:outline-none",r==="left"?"left-0":"right-0"),children:D.jsx("div",{className:"py-1",children:n})})})]})}function Ge({children:e,onClick:n,disabled:t,className:r}){return D.jsx(j.Item,{disabled:t,children:({active:o})=>D.jsx(te.Button,{type:"button",variant:"ghost",onClick:n,disabled:t,className:L.cn("w-full justify-start rounded-none px-4 py-2 text-left disabled:cursor-not-allowed",o&&"bg-accent text-accent-foreground hover:bg-accent",!o&&"hover:bg-muted",r),children:e})})}function je({children:e,className:n,...t}){return D.jsx(j.Button,{as:te.Button,variant:"outline",className:L.cn("w-full justify-center gap-x-1.5",n),...t,children:e})}exports.DropdownMenu=Ke;exports.DropdownMenuButton=je;exports.DropdownMenuItem=Ge;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useRef as i } from "react";
|
|
2
|
-
import { s as g } from "./bugs-
|
|
3
|
-
import { a as v, o as w } from "./use-sync-refs-
|
|
4
|
-
import { f as $, i as x } from "./keyboard-
|
|
5
|
-
import { i as m } from "./portal-
|
|
2
|
+
import { s as g } from "./bugs-g7aYPtcD.mjs";
|
|
3
|
+
import { a as v, o as w } from "./use-sync-refs-CDCE8QtA.mjs";
|
|
4
|
+
import { f as $, i as x } from "./keyboard-BzaAKRwG.mjs";
|
|
5
|
+
import { i as m } from "./portal-D-TZOwvF.mjs";
|
|
6
6
|
var b = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(b || {});
|
|
7
7
|
function E(e) {
|
|
8
8
|
let n = i(null), t = v((o) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const O=require("react"),U=require("./use-sync-refs-DoZFQ57o.js"),gt=require("react-dom"),ht=require("./keyboard-DFJ4Xn4Y.js");function Ge(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const v=Ge(O),ae=Ge(gt);function Le(e){if(e===null)return{width:0,height:0};let{width:t,height:o}=e.getBoundingClientRect();return{width:t,height:o}}function pt(e,t,o=!1){let[n,r]=O.useState(()=>Le(t));return U.n(()=>{if(!t||!e)return;let i=U.o();return i.requestAnimationFrame(function s(){i.requestAnimationFrame(s),r(l=>{let c=Le(t);return c.width===l.width&&c.height===l.height?l:c})}),()=>{i.dispose()}},[t,e]),o?{width:`${n.width}px`,height:`${n.height}px`}:n}function ge(){return typeof window<"u"}function ee(e){return Je(e)?(e.nodeName||"").toLowerCase():"#document"}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function q(e){var t;return(t=(Je(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Je(e){return ge()?e instanceof Node||e instanceof k(e).Node:!1}function H(e){return ge()?e instanceof Element||e instanceof k(e).Element:!1}function j(e){return ge()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function He(e){return!ge()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}const wt=new Set(["inline","contents"]);function se(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!wt.has(r)}const xt=new Set(["table","td","th"]);function vt(e){return xt.has(ee(e))}const yt=[":popover-open",":modal"];function he(e){return yt.some(t=>{try{return e.matches(t)}catch{return!1}})}const bt=["transform","translate","scale","rotate","perspective"],Rt=["transform","translate","scale","rotate","perspective","filter"],Ct=["paint","layout","strict","content"];function Ee(e){const t=Te(),o=H(e)?W(e):e;return bt.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||Rt.some(n=>(o.willChange||"").includes(n))||Ct.some(n=>(o.contain||"").includes(n))}function St(e){let t=X(e);for(;j(t)&&!Z(t);){if(Ee(t))return t;if(he(t))return null;t=X(t)}return null}function Te(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ot=new Set(["html","body","#document"]);function Z(e){return Ot.has(ee(e))}function W(e){return k(e).getComputedStyle(e)}function pe(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if(ee(e)==="html")return e;const t=e.assignedSlot||e.parentNode||He(e)&&e.host||q(e);return He(t)?t.host:t}function Qe(e){const t=X(e);return Z(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&se(t)?t:Qe(t)}function oe(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const r=Qe(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=k(r);if(i){const l=Se(s);return t.concat(s,s.visualViewport||[],se(r)?r:[],l&&o?oe(l):[])}return t.concat(r,oe(r,[],o))}function Se(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function At(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:o,version:n}=t;return o+"/"+n}).join(" "):navigator.userAgent}const G=Math.min,L=Math.max,re=Math.round,ce=Math.floor,_=e=>({x:e,y:e}),Et={left:"right",right:"left",bottom:"top",top:"bottom"},Tt={start:"end",end:"start"};function Ne(e,t,o){return L(e,G(t,o))}function te(e,t){return typeof e=="function"?e(t):e}function K(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function Ze(e){return e==="x"?"y":"x"}function et(e){return e==="y"?"height":"width"}const Mt=new Set(["top","bottom"]);function Y(e){return Mt.has(K(e))?"y":"x"}function tt(e){return Ze(Y(e))}function Ft(e,t,o){o===void 0&&(o=!1);const n=le(e),r=tt(e),i=et(r);let s=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ue(s)),[s,ue(s)]}function Pt(e){const t=ue(e);return[Oe(e),t,Oe(t)]}function Oe(e){return e.replace(/start|end/g,t=>Tt[t])}const $e=["left","right"],Ie=["right","left"],Dt=["top","bottom"],Lt=["bottom","top"];function Ht(e,t,o){switch(e){case"top":case"bottom":return o?t?Ie:$e:t?$e:Ie;case"left":case"right":return t?Dt:Lt;default:return[]}}function Nt(e,t,o,n){const r=le(e);let i=Ht(K(e),o==="start",n);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Oe)))),i}function ue(e){return e.replace(/left|right|bottom|top/g,t=>Et[t])}function $t(e){return{top:0,right:0,bottom:0,left:0,...e}}function It(e){return typeof e!="number"?$t(e):{top:e,right:e,bottom:e,left:e}}function de(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function Be(e,t,o){let{reference:n,floating:r}=e;const i=Y(t),s=tt(t),l=et(s),c=K(t),a=i==="y",u=n.x+n.width/2-r.width/2,m=n.y+n.height/2-r.height/2,g=n[l]/2-r[l]/2;let f;switch(c){case"top":f={x:u,y:n.y-r.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:m};break;case"left":f={x:n.x-r.width,y:m};break;default:f={x:n.x,y:n.y}}switch(le(t)){case"start":f[s]-=g*(o&&a?-1:1);break;case"end":f[s]+=g*(o&&a?-1:1);break}return f}async function nt(e,t){var o;t===void 0&&(t={});const{x:n,y:r,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:m="floating",altBoundary:g=!1,padding:f=0}=te(t,e),d=It(f),p=l[g?m==="floating"?"reference":"floating":m],x=de(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(p)))==null||o?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:c})),y=m==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},R=de(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:c}):y);return{top:(x.top-R.top+d.top)/b.y,bottom:(R.bottom-x.bottom+d.bottom)/b.y,left:(x.left-R.left+d.left)/b.x,right:(R.right-x.right+d.right)/b.x}}const Bt=async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:s}=o,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:m}=Be(a,n,c),g=n,f={},d=0;for(let p=0;p<l.length;p++){var h;const{name:x,fn:y}=l[p],{x:w,y:b,data:R,reset:C}=await y({x:u,y:m,initialPlacement:n,placement:g,strategy:r,middlewareData:f,rects:a,platform:{...s,detectOverflow:(h=s.detectOverflow)!=null?h:nt},elements:{reference:e,floating:t}});u=w??u,m=b??m,f={...f,[x]:{...f[x],...R}},C&&d<=50&&(d++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(a=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):C.rects),{x:u,y:m}=Be(a,g,c)),p=-1)}return{x:u,y:m,placement:g,strategy:r,middlewareData:f}},kt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:a}=t,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:h=!0,...p}=te(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};const x=K(r),y=Y(l),w=K(l)===l,b=await(c.isRTL==null?void 0:c.isRTL(a.floating)),R=g||(w||!h?[ue(l)]:Pt(l)),C=d!=="none";!g&&C&&R.push(...Nt(l,h,d,b));const A=[l,...R],N=await c.detectOverflow(t,p),V=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&V.push(N[x]),m){const F=Ft(r,s,b);V.push(N[F[0]],N[F[1]])}if(M=[...M,{placement:r,overflows:V}],!V.every(F=>F<=0)){var T,I;const F=(((T=i.flip)==null?void 0:T.index)||0)+1,z=A[F];if(z&&(!(m==="alignment"?y!==Y(z):!1)||M.every(S=>Y(S.placement)===y?S.overflows[0]>0:!0)))return{data:{index:F,overflows:M},reset:{placement:z}};let P=(I=M.filter(B=>B.overflows[0]<=0).sort((B,S)=>B.overflows[1]-S.overflows[1])[0])==null?void 0:I.placement;if(!P)switch(f){case"bestFit":{var D;const B=(D=M.filter(S=>{if(C){const E=Y(S.placement);return E===y||E==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(E=>E>0).reduce((E,$)=>E+$,0)]).sort((S,E)=>S[1]-E[1])[0])==null?void 0:D[0];B&&(P=B);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}},Vt=new Set(["left","top"]);async function Wt(e,t){const{placement:o,platform:n,elements:r}=e,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=K(o),l=le(o),c=Y(o)==="y",a=Vt.has(s)?-1:1,u=i&&c?-1:1,m=te(t,e);let{mainAxis:g,crossAxis:f,alignmentAxis:d}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof d=="number"&&(f=l==="end"?d*-1:d),c?{x:f*u,y:g*a}:{x:g*a,y:f*u}}const _t=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:i,placement:s,middlewareData:l}=t,c=await Wt(t,e);return s===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},jt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:y,y:w}=x;return{x:y,y:w}}},...a}=te(e,t),u={x:o,y:n},m=await i.detectOverflow(t,a),g=Y(K(r)),f=Ze(g);let d=u[f],h=u[g];if(s){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=d+m[x],b=d-m[y];d=Ne(w,d,b)}if(l){const x=g==="y"?"top":"left",y=g==="y"?"bottom":"right",w=h+m[x],b=h-m[y];h=Ne(w,h,b)}const p=c.fn({...t,[f]:d,[g]:h});return{...p,data:{x:p.x-o,y:p.y-n,enabled:{[f]:s,[g]:l}}}}}},qt=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,n;const{placement:r,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...a}=te(e,t),u=await s.detectOverflow(t,a),m=K(r),g=le(r),f=Y(r)==="y",{width:d,height:h}=i.floating;let p,x;m==="top"||m==="bottom"?(p=m,x=g===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(x=m,p=g==="end"?"top":"bottom");const y=h-u.top-u.bottom,w=d-u.left-u.right,b=G(h-u[p],y),R=G(d-u[x],w),C=!t.middlewareData.shift;let A=b,N=R;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(A=y),C&&!g){const M=L(u.left,0),T=L(u.right,0),I=L(u.top,0),D=L(u.bottom,0);f?N=d-2*(M!==0||T!==0?M+T:L(u.left,u.right)):A=h-2*(I!==0||D!==0?I+D:L(u.top,u.bottom))}await c({...t,availableWidth:N,availableHeight:A});const V=await s.getDimensions(l.floating);return d!==V.width||h!==V.height?{reset:{rects:!0}}:{}}}};function ot(e){const t=W(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=j(e),i=r?e.offsetWidth:o,s=r?e.offsetHeight:n,l=re(o)!==i||re(n)!==s;return l&&(o=i,n=s),{width:o,height:n,$:l}}function Me(e){return H(e)?e:e.contextElement}function Q(e){const t=Me(e);if(!j(t))return _(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:i}=ot(t);let s=(i?re(o.width):o.width)/n,l=(i?re(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const zt=_(0);function rt(e){const t=k(e);return!Te()||!t.visualViewport?zt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yt(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==k(e)?!1:t}function J(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),i=Me(e);let s=_(1);t&&(n?H(n)&&(s=Q(n)):s=Q(e));const l=Yt(i,o,n)?rt(i):_(0);let c=(r.left+l.x)/s.x,a=(r.top+l.y)/s.y,u=r.width/s.x,m=r.height/s.y;if(i){const g=k(i),f=n&&H(n)?k(n):n;let d=g,h=Se(d);for(;h&&n&&f!==d;){const p=Q(h),x=h.getBoundingClientRect(),y=W(h),w=x.left+(h.clientLeft+parseFloat(y.paddingLeft))*p.x,b=x.top+(h.clientTop+parseFloat(y.paddingTop))*p.y;c*=p.x,a*=p.y,u*=p.x,m*=p.y,c+=w,a+=b,d=k(h),h=Se(d)}}return de({width:u,height:m,x:c,y:a})}function we(e,t){const o=pe(e).scrollLeft;return t?t.left+o:J(q(e)).left+o}function it(e,t){const o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-we(e,o),r=o.top+t.scrollTop;return{x:n,y:r}}function Ut(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const i=r==="fixed",s=q(n),l=t?he(t.floating):!1;if(n===s||l&&i)return o;let c={scrollLeft:0,scrollTop:0},a=_(1);const u=_(0),m=j(n);if((m||!m&&!i)&&((ee(n)!=="body"||se(s))&&(c=pe(n)),j(n))){const f=J(n);a=Q(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}const g=s&&!m&&!i?it(s,c):_(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-c.scrollLeft*a.x+u.x+g.x,y:o.y*a.y-c.scrollTop*a.y+u.y+g.y}}function Xt(e){return Array.from(e.getClientRects())}function Kt(e){const t=q(e),o=pe(e),n=e.ownerDocument.body,r=L(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=L(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+we(e);const l=-o.scrollTop;return W(n).direction==="rtl"&&(s+=L(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:s,y:l}}const ke=25;function Gt(e,t){const o=k(e),n=q(e),r=o.visualViewport;let i=n.clientWidth,s=n.clientHeight,l=0,c=0;if(r){i=r.width,s=r.height;const u=Te();(!u||u&&t==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}const a=we(n);if(a<=0){const u=n.ownerDocument,m=u.body,g=getComputedStyle(m),f=u.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,d=Math.abs(n.clientWidth-m.clientWidth-f);d<=ke&&(i-=d)}else a<=ke&&(i+=a);return{width:i,height:s,x:l,y:c}}const Jt=new Set(["absolute","fixed"]);function Qt(e,t){const o=J(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=j(e)?Q(e):_(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=r*i.x,a=n*i.y;return{width:s,height:l,x:c,y:a}}function Ve(e,t,o){let n;if(t==="viewport")n=Gt(e,o);else if(t==="document")n=Kt(q(e));else if(H(t))n=Qt(t,o);else{const r=rt(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return de(n)}function st(e,t){const o=X(e);return o===t||!H(o)||Z(o)?!1:W(o).position==="fixed"||st(o,t)}function Zt(e,t){const o=t.get(e);if(o)return o;let n=oe(e,[],!1).filter(l=>H(l)&&ee(l)!=="body"),r=null;const i=W(e).position==="fixed";let s=i?X(e):e;for(;H(s)&&!Z(s);){const l=W(s),c=Ee(s);!c&&l.position==="fixed"&&(r=null),(i?!c&&!r:!c&&l.position==="static"&&!!r&&Jt.has(r.position)||se(s)&&!c&&st(e,s))?n=n.filter(u=>u!==s):r=l,s=X(s)}return t.set(e,n),n}function en(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const s=[...o==="clippingAncestors"?he(t)?[]:Zt(t,this._c):[].concat(o),n],l=s[0],c=s.reduce((a,u)=>{const m=Ve(t,u,r);return a.top=L(m.top,a.top),a.right=G(m.right,a.right),a.bottom=G(m.bottom,a.bottom),a.left=L(m.left,a.left),a},Ve(t,l,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function tn(e){const{width:t,height:o}=ot(e);return{width:t,height:o}}function nn(e,t,o){const n=j(t),r=q(t),i=o==="fixed",s=J(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=_(0);function a(){c.x=we(r)}if(n||!n&&!i)if((ee(t)!=="body"||se(r))&&(l=pe(t)),n){const f=J(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else r&&a();i&&!n&&r&&a();const u=r&&!n&&!i?it(r,l):_(0),m=s.left+l.scrollLeft-c.x-u.x,g=s.top+l.scrollTop-c.y-u.y;return{x:m,y:g,width:s.width,height:s.height}}function ve(e){return W(e).position==="static"}function We(e,t){if(!j(e)||W(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return q(e)===o&&(o=o.ownerDocument.body),o}function lt(e,t){const o=k(e);if(he(e))return o;if(!j(e)){let r=X(e);for(;r&&!Z(r);){if(H(r)&&!ve(r))return r;r=X(r)}return o}let n=We(e,t);for(;n&&vt(n)&&ve(n);)n=We(n,t);return n&&Z(n)&&ve(n)&&!Ee(n)?o:n||St(e)||o}const on=async function(e){const t=this.getOffsetParent||lt,o=this.getDimensions,n=await o(e.floating);return{reference:nn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function rn(e){return W(e).direction==="rtl"}const sn={convertOffsetParentRelativeRectToViewportRelativeRect:Ut,getDocumentElement:q,getClippingRect:en,getOffsetParent:lt,getElementRects:on,getClientRects:Xt,getDimensions:tn,getScale:Q,isElement:H,isRTL:rn};function ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ln(e,t){let o=null,n;const r=q(e);function i(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const a=e.getBoundingClientRect(),{left:u,top:m,width:g,height:f}=a;if(l||t(),!g||!f)return;const d=ce(m),h=ce(r.clientWidth-(u+g)),p=ce(r.clientHeight-(m+f)),x=ce(u),w={rootMargin:-d+"px "+-h+"px "+-p+"px "+-x+"px",threshold:L(0,G(1,c))||1};let b=!0;function R(C){const A=C[0].intersectionRatio;if(A!==c){if(!b)return s();A?s(!1,A):n=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!ct(a,e.getBoundingClientRect())&&s(),b=!1}try{o=new IntersectionObserver(R,{...w,root:r.ownerDocument})}catch{o=new IntersectionObserver(R,w)}o.observe(e)}return s(!0),i}function cn(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,a=Me(e),u=r||i?[...a?oe(a):[],...oe(t)]:[];u.forEach(x=>{r&&x.addEventListener("scroll",o,{passive:!0}),i&&x.addEventListener("resize",o)});const m=a&&l?ln(a,o):null;let g=-1,f=null;s&&(f=new ResizeObserver(x=>{let[y]=x;y&&y.target===a&&f&&(f.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),o()}),a&&!c&&f.observe(a),f.observe(t));let d,h=c?J(e):null;c&&p();function p(){const x=J(e);h&&!ct(h,x)&&o(),h=x,d=requestAnimationFrame(p)}return o(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",o),i&&y.removeEventListener("resize",o)}),m?.(),(x=f)==null||x.disconnect(),f=null,c&&cancelAnimationFrame(d)}}const ye=nt,fn=_t,an=jt,un=kt,dn=qt,mn=(e,t,o)=>{const n=new Map,r={platform:sn,...o},i={...r.platform,_c:n};return Bt(e,t,{...r,platform:i})};var gn=typeof document<"u",hn=function(){},fe=gn?O.useLayoutEffect:hn;function me(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!me(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const i=r[n];if(!(i==="_owner"&&e.$$typeof)&&!me(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ft(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _e(e,t){const o=ft(e);return Math.round(t*o)/o}function be(e){const t=v.useRef(e);return fe(()=>{t.current=e}),t}function pn(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:a}=e,[u,m]=v.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[g,f]=v.useState(n);me(g,n)||f(n);const[d,h]=v.useState(null),[p,x]=v.useState(null),y=v.useCallback(S=>{S!==C.current&&(C.current=S,h(S))},[]),w=v.useCallback(S=>{S!==A.current&&(A.current=S,x(S))},[]),b=i||d,R=s||p,C=v.useRef(null),A=v.useRef(null),N=v.useRef(u),V=c!=null,M=be(c),T=be(r),I=be(a),D=v.useCallback(()=>{if(!C.current||!A.current)return;const S={placement:t,strategy:o,middleware:g};T.current&&(S.platform=T.current),mn(C.current,A.current,S).then(E=>{const $={...E,isPositioned:I.current!==!1};F.current&&!me(N.current,$)&&(N.current=$,ae.flushSync(()=>{m($)}))})},[g,t,o,T,I]);fe(()=>{a===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,m(S=>({...S,isPositioned:!1})))},[a]);const F=v.useRef(!1);fe(()=>(F.current=!0,()=>{F.current=!1}),[]),fe(()=>{if(b&&(C.current=b),R&&(A.current=R),b&&R){if(M.current)return M.current(b,R,D);D()}},[b,R,D,M,V]);const z=v.useMemo(()=>({reference:C,floating:A,setReference:y,setFloating:w}),[y,w]),P=v.useMemo(()=>({reference:b,floating:R}),[b,R]),B=v.useMemo(()=>{const S={position:o,left:0,top:0};if(!P.floating)return S;const E=_e(P.floating,u.x),$=_e(P.floating,u.y);return l?{...S,transform:"translate("+E+"px, "+$+"px)",...ft(P.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:E,top:$}},[o,l,P.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:D,refs:z,elements:P,floatingStyles:B}),[u,D,z,P,B])}const at=(e,t)=>({...fn(e),options:[e,t]}),wn=(e,t)=>({...an(e),options:[e,t]}),xn=(e,t)=>({...un(e),options:[e,t]}),vn=(e,t)=>({...dn(e),options:[e,t]}),ut={...v},yn=ut.useInsertionEffect,bn=yn||(e=>e());function dt(e){const t=v.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return bn(()=>{t.current=e}),v.useCallback(function(){for(var o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}var Ae=typeof document<"u"?O.useLayoutEffect:O.useEffect;let je=!1,Rn=0;const qe=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Rn++;function Cn(){const[e,t]=v.useState(()=>je?qe():void 0);return Ae(()=>{e==null&&t(qe())},[]),v.useEffect(()=>{je=!0},[]),e}const Sn=ut.useId,On=Sn||Cn;let ie;process.env.NODE_ENV!=="production"&&(ie=new Set);function An(){for(var e,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];const r="Floating UI: "+o.join(" ");if(!((e=ie)!=null&&e.has(r))){var i;(i=ie)==null||i.add(r),console.warn(r)}}function En(){for(var e,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];const r="Floating UI: "+o.join(" ");if(!((e=ie)!=null&&e.has(r))){var i;(i=ie)==null||i.add(r),console.error(r)}}function Tn(){const e=new Map;return{emit(t,o){var n;(n=e.get(t))==null||n.forEach(r=>r(o))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(r=>r!==o))||[])}}}const Mn=v.createContext(null),Fn=v.createContext(null),Pn=()=>{var e;return((e=v.useContext(Mn))==null?void 0:e.id)||null},Dn=()=>v.useContext(Fn),Ln="data-floating-ui-focusable";function Hn(e){const{open:t=!1,onOpenChange:o,elements:n}=e,r=On(),i=v.useRef({}),[s]=v.useState(()=>Tn()),l=Pn()!=null;if(process.env.NODE_ENV!=="production"){const f=n.reference;f&&!H(f)&&En("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,a]=v.useState(n.reference),u=dt((f,d,h)=>{i.current.openEvent=f?d:void 0,s.emit("openchange",{open:f,event:d,reason:h,nested:l}),o?.(f,d,h)}),m=v.useMemo(()=>({setPositionReference:a}),[]),g=v.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return v.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:g,events:s,floatingId:r,refs:m}),[t,u,g,s,r,m])}function Nn(e){e===void 0&&(e={});const{nodeId:t}=e,o=Hn({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||o,r=n.elements,[i,s]=v.useState(null),[l,c]=v.useState(null),u=r?.domReference||i,m=v.useRef(null),g=Dn();Ae(()=>{u&&(m.current=u)},[u]);const f=pn({...e,elements:{...r,...l&&{reference:l}}}),d=v.useCallback(w=>{const b=H(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;c(b),f.refs.setReference(b)},[f.refs]),h=v.useCallback(w=>{(H(w)||w===null)&&(m.current=w,s(w)),(H(f.refs.reference.current)||f.refs.reference.current===null||w!==null&&!H(w))&&f.refs.setReference(w)},[f.refs]),p=v.useMemo(()=>({...f.refs,setReference:h,setPositionReference:d,domReference:m}),[f.refs,h,d]),x=v.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),y=v.useMemo(()=>({...f,...n,refs:p,elements:x,nodeId:t}),[f,p,x,t,n]);return Ae(()=>{n.dataRef.current.floatingContext=y;const w=g?.nodesRef.current.find(b=>b.id===t);w&&(w.context=y)}),v.useMemo(()=>({...f,context:y,refs:p,elements:x}),[f,p,x,y])}const ze="active",Ye="selected";function Re(e,t,o){const n=new Map,r=o==="item";let i=e;if(r&&e){const{[ze]:s,[Ye]:l,...c}=e;i=c}return{...o==="floating"&&{tabIndex:-1,[Ln]:""},...i,...t.map(s=>{const l=s?s[o]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((s,l)=>(l&&Object.entries(l).forEach(c=>{let[a,u]=c;if(!(r&&[ze,Ye].includes(a)))if(a.indexOf("on")===0){if(n.has(a)||n.set(a,[]),typeof u=="function"){var m;(m=n.get(a))==null||m.push(u),s[a]=function(){for(var g,f=arguments.length,d=new Array(f),h=0;h<f;h++)d[h]=arguments[h];return(g=n.get(a))==null?void 0:g.map(p=>p(...d)).find(p=>p!==void 0)}}}else s[a]=u}),s),{})}}function $n(e){e===void 0&&(e=[]);const t=e.map(l=>l?.reference),o=e.map(l=>l?.floating),n=e.map(l=>l?.item),r=v.useCallback(l=>Re(l,e,"reference"),t),i=v.useCallback(l=>Re(l,e,"floating"),o),s=v.useCallback(l=>Re(l,e,"item"),n);return v.useMemo(()=>({getReferenceProps:r,getFloatingProps:i,getItemProps:s}),[r,i,s])}function Ue(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const In=e=>({name:"inner",options:e,async fn(t){const{listRef:o,overflowRef:n,onFallbackChange:r,offset:i=0,index:s=0,minItemsVisible:l=4,referenceOverflowThreshold:c=0,scrollRef:a,...u}=te(e,t),{rects:m,elements:{floating:g}}=t,f=o.current[s],d=a?.current||g,h=g.clientTop||d.clientTop,p=g.clientTop!==0,x=d.clientTop!==0,y=g===d;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||An('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const w={...t,...await at(-f.offsetTop-g.clientTop-m.reference.height/2-f.offsetHeight/2-i).fn(t)},b=await ye(Ue(w,d.scrollHeight+h+g.clientTop),u),R=await ye(w,{...u,elementContext:"reference"}),C=L(0,b.top),A=w.y+C,M=(d.scrollHeight>d.clientHeight?T=>T:re)(L(0,d.scrollHeight+(p&&y||x?h*2:0)-C-L(0,b.bottom)));if(d.style.maxHeight=M+"px",d.scrollTop=C,r){const T=d.offsetHeight<f.offsetHeight*G(l,o.current.length)-1||R.top>=-c||R.bottom>=-c;ae.flushSync(()=>r(T))}return n&&(n.current=await ye(Ue({...w,y:A},d.offsetHeight+h+g.clientTop),u)),{y:A}}});function Bn(e,t){const{open:o,elements:n}=e,{enabled:r=!0,overflowRef:i,scrollRef:s,onChange:l}=t,c=dt(l),a=v.useRef(!1),u=v.useRef(null),m=v.useRef(null);v.useEffect(()=>{if(!r)return;function f(h){if(h.ctrlKey||!d||i.current==null)return;const p=h.deltaY,x=i.current.top>=-.5,y=i.current.bottom>=-.5,w=d.scrollHeight-d.clientHeight,b=p<0?-1:1,R=p<0?"max":"min";d.scrollHeight<=d.clientHeight||(!x&&p>0||!y&&p<0?(h.preventDefault(),ae.flushSync(()=>{c(C=>C+Math[R](p,w*b))})):/firefox/i.test(At())&&(d.scrollTop+=p))}const d=s?.current||n.floating;if(o&&d)return d.addEventListener("wheel",f),requestAnimationFrame(()=>{u.current=d.scrollTop,i.current!=null&&(m.current={...i.current})}),()=>{u.current=null,m.current=null,d.removeEventListener("wheel",f)}},[r,o,n.floating,i,s,c]);const g=v.useMemo(()=>({onKeyDown(){a.current=!0},onWheel(){a.current=!1},onPointerMove(){a.current=!1},onScroll(){const f=s?.current||n.floating;if(!(!i.current||!f||!a.current)){if(u.current!==null){const d=f.scrollTop-u.current;(i.current.bottom<-.5&&d<-1||i.current.top<-.5&&d>1)&&ae.flushSync(()=>c(h=>h+d))}requestAnimationFrame(()=>{u.current=f.scrollTop})}}}),[n.floating,c,i,s]);return v.useMemo(()=>r?{floating:g}:{},[r,g])}let ne=O.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ne.displayName="FloatingContext";let Fe=O.createContext(null);Fe.displayName="PlacementContext";function kn(e){return O.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Vn(){return O.useContext(ne).setReference}function Wn(){return O.useContext(ne).getReferenceProps}function _n(){let{getFloatingProps:e,slot:t}=O.useContext(ne);return O.useCallback((...o)=>Object.assign({},e(...o),{"data-anchor":t.anchor}),[e,t])}function jn(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=O.useContext(Fe),o=O.useMemo(()=>e,[JSON.stringify(e,(r,i)=>{var s;return(s=i?.outerHTML)!=null?s:i})]);U.n(()=>{t?.(o??null)},[t,o]);let n=O.useContext(ne);return O.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let Xe=4;function qn({children:e,enabled:t=!0}){let[o,n]=O.useState(null),[r,i]=O.useState(0),s=O.useRef(null),[l,c]=O.useState(null);zn(l);let a=t&&o!==null&&l!==null,{to:u="bottom",gap:m=0,offset:g=0,padding:f=0,inner:d}=Yn(o,l),[h,p="center"]=u.split(" ");U.n(()=>{a&&i(0)},[a]);let{refs:x,floatingStyles:y,context:w}=Nn({open:a,placement:h==="selection"?p==="center"?"bottom":`bottom-${p}`:p==="center"?`${h}`:`${h}-${p}`,strategy:"absolute",transform:!1,middleware:[at({mainAxis:h==="selection"?0:m,crossAxis:g}),wn({padding:f}),h!=="selection"&&xn({padding:f}),h==="selection"&&d?In({...d,padding:f,overflowRef:s,offset:r,minItemsVisible:Xe,referenceOverflowThreshold:f,onFallbackChange(T){var I,D;if(!T)return;let F=w.elements.floating;if(!F)return;let z=parseFloat(getComputedStyle(F).scrollPaddingBottom)||0,P=Math.min(Xe,F.childElementCount),B=0,S=0;for(let E of(D=(I=w.elements.floating)==null?void 0:I.childNodes)!=null?D:[])if(ht.n(E)){let $=E.offsetTop,Pe=$+E.clientHeight+z,xe=F.scrollTop,De=xe+F.clientHeight;if($>=xe&&Pe<=De)P--;else{S=Math.max(0,Math.min(Pe,De)-Math.max($,xe)),B=E.clientHeight;break}}P>=1&&i(E=>{let $=B*P-S+z;return E>=$?E:$})}}):null,vn({padding:f,apply({availableWidth:T,availableHeight:I,elements:D}){Object.assign(D.floating.style,{overflow:"auto",maxWidth:`${T}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${I}px)`})}})].filter(Boolean),whileElementsMounted:cn}),[b=h,R=p]=w.placement.split("-");h==="selection"&&(b="selection");let C=O.useMemo(()=>({anchor:[b,R].filter(Boolean).join(" ")}),[b,R]),A=Bn(w,{overflowRef:s,onChange:i}),{getReferenceProps:N,getFloatingProps:V}=$n([A]),M=U.o$1(T=>{c(T),x.setFloating(T)});return v.createElement(Fe.Provider,{value:n},v.createElement(ne.Provider,{value:{setFloating:M,setReference:x.setReference,styles:y,getReferenceProps:N,getFloatingProps:V,slot:C}},e))}function zn(e){U.n(()=>{if(!e)return;let t=new MutationObserver(()=>{let o=window.getComputedStyle(e).maxHeight,n=parseFloat(o);if(isNaN(n))return;let r=parseInt(o);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Yn(e,t){var o,n,r;let i=Ce((o=e?.gap)!=null?o:"var(--anchor-gap, 0)",t),s=Ce((n=e?.offset)!=null?n:"var(--anchor-offset, 0)",t),l=Ce((r=e?.padding)!=null?r:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:l}}function Ce(e,t,o=void 0){let n=U.p(),r=U.o$1((c,a)=>{if(c==null)return[o,null];if(typeof c=="number")return[c,null];if(typeof c=="string"){if(!a)return[o,null];let u=Ke(c,a);return[u,m=>{let g=mt(c);{let f=g.map(d=>window.getComputedStyle(a).getPropertyValue(d));n.requestAnimationFrame(function d(){n.nextFrame(d);let h=!1;for(let[x,y]of g.entries()){let w=window.getComputedStyle(a).getPropertyValue(y);if(f[x]!==w){f[x]=w,h=!0;break}}if(!h)return;let p=Ke(c,a);u!==p&&(m(p),u=p)})}return n.dispose}]}return[o,null]}),i=O.useMemo(()=>r(e,t)[0],[e,t]),[s=i,l]=O.useState();return U.n(()=>{let[c,a]=r(e,t);if(l(c),!!a)return a(l)},[e,t]),s}function mt(e){let t=/var\((.*)\)/.exec(e);if(t){let o=t[1].indexOf(",");if(o===-1)return[t[1]];let n=t[1].slice(0,o).trim(),r=t[1].slice(o+1).trim();return r?[n,...mt(r)]:[n]}return[]}function Ke(e,t){let o=document.createElement("div");t.appendChild(o),o.style.setProperty("margin-top","0px","important"),o.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(o).marginTop)||0;return t.removeChild(o),n}exports.Ae=qn;exports.Fe=Vn;exports.Re=jn;exports.Te=_n;exports.be=Wn;exports.w=pt;exports.ye=kn;
|