@koide-labs/ui 0.0.15 → 0.1.1
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/-utils.d.ts +2 -2
- package/dist/-utils.js +1 -1
- package/dist/{Button-DrPFFzo7.js → Button-BmcVHRRW.js} +2 -2
- package/dist/{CompositeRoot-CVk5a-pR.js → CompositeRoot-CCgh2M64.js} +6 -6
- package/dist/{FloatingPortal-tWyuKRSN.js → FloatingPortal-BQsQhvIr.js} +27 -27
- package/dist/{FloatingPortalLite-DVyq6YhV.js → FloatingPortalLite-_ECdFE7b.js} +1 -1
- package/dist/{InternalBackdrop-jYAiOJ8v.js → InternalBackdrop-BSMKU-hc.js} +13 -13
- package/dist/{LabelableContext-BMvjVwor.js → LabelableContext-Be1u-eFg.js} +2 -2
- package/dist/accordion.css +1 -0
- package/dist/alert-dialog.css +1 -0
- package/dist/anchor.css +1 -0
- package/dist/avatar.css +1 -0
- package/dist/badge.css +1 -0
- package/dist/button.css +1 -0
- package/dist/checkbox.css +1 -0
- package/dist/code.css +1 -0
- package/dist/collapse.css +1 -0
- package/dist/command.css +1 -0
- package/dist/components/accordion/accordion.d.ts +19 -0
- package/dist/components/accordion/accordion.js +701 -0
- package/dist/components/accordion/index.d.ts +1 -12
- package/dist/components/accordion/index.js +2 -697
- package/dist/components/alert-dialog/alert-dialog.d.ts +36 -0
- package/dist/components/alert-dialog/alert-dialog.js +138 -0
- package/dist/components/alert-dialog/index.d.ts +1 -26
- package/dist/components/alert-dialog/index.js +2 -134
- package/dist/components/anchor/anchor.d.ts +12 -0
- package/dist/components/anchor/anchor.js +21 -0
- package/dist/components/anchor/index.d.ts +1 -8
- package/dist/components/anchor/index.js +2 -19
- package/dist/components/avatar/avatar.d.ts +25 -0
- package/dist/components/avatar/avatar.js +161 -0
- package/dist/components/avatar/index.d.ts +1 -21
- package/dist/components/avatar/index.js +2 -159
- package/dist/components/badge/badge.d.ts +20 -0
- package/dist/components/badge/badge.js +42 -0
- package/dist/components/badge/index.d.ts +1 -16
- package/dist/components/badge/index.js +2 -40
- package/dist/components/button/button.d.ts +27 -0
- package/dist/components/button/button.js +47 -0
- package/dist/components/button/index.d.ts +1 -24
- package/dist/components/button/index.js +2 -45
- package/dist/components/checkbox/checkbox.d.ts +13 -0
- package/dist/components/checkbox/checkbox.js +269 -0
- package/dist/components/checkbox/index.d.ts +1 -9
- package/dist/components/checkbox/index.js +2 -267
- package/dist/components/code/code.d.ts +13 -0
- package/dist/components/code/code.js +1206 -0
- package/dist/components/code/index.d.ts +1 -9
- package/dist/components/code/index.js +2 -1204
- package/dist/components/collapse/collapse.d.ts +14 -0
- package/dist/components/collapse/collapse.js +35 -0
- package/dist/components/collapse/index.d.ts +1 -11
- package/dist/components/collapse/index.js +2 -33
- package/dist/components/command/command.d.ts +36 -0
- package/dist/components/command/command.js +1695 -0
- package/dist/components/command/index.d.ts +1 -15
- package/dist/components/command/index.js +2 -1693
- package/dist/components/context-menu/context-menu.d.ts +82 -0
- package/dist/components/context-menu/context-menu.js +1445 -0
- package/dist/components/context-menu/index.d.ts +1 -42
- package/dist/components/context-menu/index.js +2 -1442
- package/dist/components/dialog/dialog.d.ts +22 -0
- package/dist/components/dialog/dialog.js +140 -0
- package/dist/components/dialog/dialog.types.d.ts +38 -0
- package/dist/components/dialog/index.d.ts +1 -48
- package/dist/components/dialog/index.js +2 -136
- package/dist/components/heading/heading.d.ts +25 -0
- package/dist/components/heading/heading.js +36 -0
- package/dist/components/heading/index.d.ts +1 -44
- package/dist/components/heading/index.js +2 -49
- package/dist/components/icon/icon.d.ts +28 -0
- package/dist/components/icon/icon.js +43 -0
- package/dist/components/icon/{icon-names.d.ts → icon.types.d.ts} +4 -0
- package/dist/components/icon/icon.types.js +1 -0
- package/dist/components/icon/index.d.ts +2 -24
- package/dist/components/icon/index.js +2 -41
- package/dist/components/icon-button/icon-button.d.ts +16 -0
- package/dist/components/icon-button/icon-button.js +46 -0
- package/dist/components/icon-button/index.d.ts +1 -12
- package/dist/components/icon-button/index.js +2 -44
- package/dist/components/inline-code/index.d.ts +1 -6
- package/dist/components/inline-code/index.js +2 -20
- package/dist/components/inline-code/inline-code.d.ts +10 -0
- package/dist/components/inline-code/inline-code.js +25 -0
- package/dist/components/input/index.d.ts +1 -3
- package/dist/components/input/index.js +2 -117
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/input/input.js +126 -0
- package/dist/components/meter/index.d.ts +1 -18
- package/dist/components/meter/index.js +2 -163
- package/dist/components/meter/meter.d.ts +22 -0
- package/dist/components/meter/meter.js +165 -0
- package/dist/components/multiline-input/index.d.ts +1 -6
- package/dist/components/multiline-input/index.js +2 -98
- package/dist/components/multiline-input/multiline-input.d.ts +10 -0
- package/dist/components/multiline-input/multiline-input.js +100 -0
- package/dist/components/number-input/index.d.ts +1 -10
- package/dist/components/number-input/index.js +2 -1167
- package/dist/components/number-input/number-input.d.ts +14 -0
- package/dist/components/number-input/number-input.js +1169 -0
- package/dist/components/password-input/index.d.ts +1 -2
- package/dist/components/password-input/index.js +2 -27
- package/dist/components/password-input/password-input.d.ts +7 -0
- package/dist/components/password-input/password-input.js +29 -0
- package/dist/components/pill/index.d.ts +1 -13
- package/dist/components/pill/index.js +2 -36
- package/dist/components/pill/pill.d.ts +17 -0
- package/dist/components/pill/pill.js +38 -0
- package/dist/components/popover/index.d.ts +1 -21
- package/dist/components/popover/index.js +2 -634
- package/dist/components/popover/popover.d.ts +22 -0
- package/dist/components/popover/popover.js +634 -0
- package/dist/components/preview-card/index.d.ts +1 -17
- package/dist/components/preview-card/index.js +2 -400
- package/dist/components/preview-card/preview-card.d.ts +21 -0
- package/dist/components/preview-card/preview-card.js +402 -0
- package/dist/components/radio-group/index.d.ts +1 -0
- package/dist/components/radio-group/index.js +5 -0
- package/dist/components/radio-group/radio-group.d.ts +25 -0
- package/dist/components/{radio/index.js → radio-group/radio-group.js} +91 -90
- package/dist/components/search-bar/index.d.ts +1 -12
- package/dist/components/search-bar/index.js +2 -46
- package/dist/components/search-bar/search-bar.d.ts +16 -0
- package/dist/components/search-bar/search-bar.js +43 -0
- package/dist/components/select/index.d.ts +1 -16
- package/dist/components/select/index.js +2 -1261
- package/dist/components/select/select.d.ts +22 -0
- package/dist/components/select/select.js +1263 -0
- package/dist/components/separator/index.d.ts +1 -7
- package/dist/components/separator/index.js +2 -4
- package/dist/components/separator/separator.d.ts +10 -0
- package/dist/components/separator/separator.js +6 -0
- package/dist/components/slider/index.d.ts +1 -5
- package/dist/components/slider/index.js +2 -900
- package/dist/components/slider/slider.d.ts +10 -0
- package/dist/components/slider/slider.js +899 -0
- package/dist/components/spinner/index.d.ts +1 -2
- package/dist/components/spinner/index.js +2 -11
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +13 -0
- package/dist/components/stacked-avatars/index.d.ts +1 -14
- package/dist/components/stacked-avatars/index.js +2 -90
- package/dist/components/stacked-avatars/stacked-avatars.d.ts +18 -0
- package/dist/components/stacked-avatars/stacked-avatars.js +92 -0
- package/dist/components/status-banner/index.d.ts +1 -17
- package/dist/components/status-banner/index.js +2 -69
- package/dist/components/status-banner/status-banner.d.ts +22 -0
- package/dist/components/status-banner/status-banner.js +71 -0
- package/dist/components/surface/index.d.ts +2 -27
- package/dist/components/surface/index.js +2 -39
- package/dist/components/surface/surface.d.ts +26 -0
- package/dist/components/surface/surface.js +36 -0
- package/dist/components/surface/surface.types.d.ts +1 -0
- package/dist/components/surface/surface.types.js +1 -0
- package/dist/components/switch/index.d.ts +1 -5
- package/dist/components/switch/index.js +2 -194
- package/dist/components/switch/switch.d.ts +10 -0
- package/dist/components/switch/switch.js +193 -0
- package/dist/components/tabs/index.d.ts +1 -18
- package/dist/components/tabs/index.js +2 -507
- package/dist/components/tabs/tabs.d.ts +28 -0
- package/dist/components/tabs/tabs.js +511 -0
- package/dist/components/text/index.d.ts +1 -26
- package/dist/components/text/index.js +2 -46
- package/dist/components/text/text.d.ts +29 -0
- package/dist/components/text/text.js +48 -0
- package/dist/components/theme-provider/index.d.ts +1 -1
- package/dist/components/theme-provider/theme-provider.d.ts +8 -4
- package/dist/components/theme-provider/theme-provider.js +3 -3
- package/dist/components/timestamp/index.d.ts +1 -23
- package/dist/components/timestamp/index.js +2 -1390
- package/dist/components/timestamp/timestamp.d.ts +26 -0
- package/dist/components/timestamp/timestamp.js +1391 -0
- package/dist/components/toaster/index.d.ts +2 -0
- package/dist/components/toaster/index.js +7 -0
- package/dist/components/toaster/toaster.d.ts +7 -0
- package/dist/components/toaster/toaster.js +923 -0
- package/dist/components/{toast → toaster}/use-toast-manager.d.ts +3 -3
- package/dist/components/tooltip/index.d.ts +1 -14
- package/dist/components/tooltip/index.js +2 -710
- package/dist/components/tooltip/tooltip.d.ts +24 -0
- package/dist/components/tooltip/tooltip.js +9 -0
- package/dist/components/view/index.d.ts +2 -30
- package/dist/components/view/index.js +2 -79
- package/dist/components/view/view.d.ts +31 -0
- package/dist/components/view/view.js +83 -0
- package/dist/components/view/view.types.d.ts +5 -0
- package/dist/components/view/view.types.js +1 -0
- package/dist/components/visually-hidden/index.d.ts +5 -1
- package/dist/{composite-Bx7Szd_T.js → composite-BZzP-LlG.js} +3 -3
- package/dist/{composite-C9L5QmZL.js → composite-BwEK5cWH.js} +1 -1
- package/dist/context-menu.css +1 -0
- package/dist/{createBaseUIEventDetails-D8M2Yl-a.js → createBaseUIEventDetails-CCSfZ2vM.js} +7 -7
- package/dist/{detectBrowser-I-s3yzIE.js → detectBrowser-Bl8Ki_1I.js} +2 -2
- package/dist/dialog.css +1 -1
- package/dist/{dialog.module-BeF-6XAo.js → dialog.module-DsbQRp-d.js} +55 -55
- package/dist/{element-CZEOj04G.js → element-u5WgOZX1.js} +7 -7
- package/dist/{event-CKoGyQEJ.js → event-B89-Ng5h.js} +4 -4
- package/dist/{floating-ui.utils-C7pRWMZ_.js → floating-ui.utils-DUVaIF3G.js} +7 -7
- package/dist/{floating-ui.utils.dom-C7FS5id0.js → floating-ui.utils.dom-cbi420Pg.js} +4 -4
- package/dist/{getDisabledMountTransitionStyles-YfHPge6T.js → getDisabledMountTransitionStyles-E2x-_lte.js} +7 -7
- package/dist/heading.css +1 -0
- package/dist/icon-button.css +1 -0
- package/dist/icon.css +1 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.js +86 -104
- package/dist/{inertValue-BCYGsdmf.js → inertValue-BTpPjX30.js} +1 -1
- package/dist/inline-code.css +1 -0
- package/dist/input.css +1 -1
- package/dist/input.module-CtE19OH8.js +8 -0
- package/dist/integrations/react-markdown/index.js +12 -12
- package/dist/meter.css +1 -0
- package/dist/number-input.css +1 -0
- package/dist/password-input.css +1 -0
- package/dist/pill.css +1 -0
- package/dist/popover.css +1 -0
- package/dist/preview-card.css +1 -0
- package/dist/radio-group.css +1 -0
- package/dist/safePolygon-DnkzOIur.js +558 -0
- package/dist/search-bar.css +1 -0
- package/dist/select.css +1 -0
- package/dist/{index-DVjyPAD4.js → separator-fh_wDZNf.js} +7 -11
- package/dist/separator.css +1 -0
- package/dist/slider.css +1 -0
- package/dist/spinner.css +1 -0
- package/dist/stacked-avatars.css +1 -0
- package/dist/status-banner.css +1 -0
- package/dist/styles/core.css +1 -1
- package/dist/surface.css +1 -0
- package/dist/switch.css +1 -0
- package/dist/tabs.css +1 -0
- package/dist/text.css +1 -0
- package/dist/timestamp.css +1 -0
- package/dist/toaster.css +1 -0
- package/dist/tooltip-oCp-elli.js +765 -0
- package/dist/tooltip.css +1 -0
- package/dist/transitions.css +1 -1
- package/dist/{transitions.module-CWX8e5cx.js → transitions.module-D9mMAtfI.js} +11 -11
- package/dist/{useAnimationFrame-451ugS_6.js → useAnimationFrame-DvK1s63A.js} +1 -1
- package/dist/{useButton-DfIwsdb8.js → useButton-d3_JgBNr.js} +3 -3
- package/dist/{useCompositeListItem-OkcAim_1.js → useCompositeListItem-CZp9WTnF.js} +2 -2
- package/dist/{useLabelableId-Ci_jDvmv.js → useLabelableId-CX4tcfzK.js} +3 -3
- package/dist/{useOpenChangeComplete-Dse9kY9E.js → useOpenChangeComplete-BHd-N7Ig.js} +5 -5
- package/dist/{useRender-CLx7dR_1.js → useRender-C3vlzS3t.js} +1 -1
- package/dist/{useRenderElement-DwToLA61.js → useRenderElement-DngNDu_P.js} +2 -2
- package/dist/{useRole-oDBdbuwQ.js → useRole-BD3OL1rr.js} +3 -3
- package/dist/{useStableCallback-CkTrVkNX.js → useStableCallback-DKZHlUAT.js} +1 -1
- package/dist/{useSyncedFloatingRootContext-Dorsv-jf.js → useSyncedFloatingRootContext-BB1vwkV-.js} +20 -20
- package/dist/{useTimeout-CflX-kz3.js → useTimeout-BNni6aw5.js} +1 -1
- package/dist/{useTransitionStatus-CUfcuGAV.js → useTransitionStatus-CmMyUh74.js} +1 -1
- package/dist/{useTypeahead-D85V2IUx.js → useTypeahead-BiL5IAVb.js} +11 -11
- package/dist/{useValueAsRef-HURLzret.js → useValueAsRef-B4EriRsI.js} +1 -1
- package/dist/{useValueChanged-DL757-yD.js → useValueChanged-MJRmEWz1.js} +1 -1
- package/dist/view.css +1 -1
- package/dist/view.module-Dj7wj0kk.js +6 -0
- package/dist/view2.css +1 -0
- package/package.json +1 -1
- package/dist/components/radio/index.d.ts +0 -13
- package/dist/components/toast/index.d.ts +0 -2
- package/dist/components/toast/index.js +0 -8
- package/dist/components/toast/toast.d.ts +0 -2
- package/dist/components/toast/toast.js +0 -921
- package/dist/components/tooltip/tooltip-arrow.d.ts +0 -3
- package/dist/components/tooltip/tooltip-arrow.js +0 -6
- package/dist/index10.css +0 -1
- package/dist/index11.css +0 -1
- package/dist/index12.css +0 -1
- package/dist/index13.css +0 -1
- package/dist/index14.css +0 -1
- package/dist/index15.css +0 -1
- package/dist/index16.css +0 -1
- package/dist/index17.css +0 -1
- package/dist/index18.css +0 -1
- package/dist/index19.css +0 -1
- package/dist/index20.css +0 -1
- package/dist/index21.css +0 -1
- package/dist/index22.css +0 -1
- package/dist/index23.css +0 -1
- package/dist/index24.css +0 -1
- package/dist/index25.css +0 -1
- package/dist/index26.css +0 -1
- package/dist/index27.css +0 -1
- package/dist/index28.css +0 -1
- package/dist/index29.css +0 -1
- package/dist/index3.css +0 -1
- package/dist/index30.css +0 -1
- package/dist/index31.css +0 -1
- package/dist/index32.css +0 -1
- package/dist/index33.css +0 -1
- package/dist/index34.css +0 -1
- package/dist/index35.css +0 -1
- package/dist/index36.css +0 -1
- package/dist/index37.css +0 -1
- package/dist/index4.css +0 -1
- package/dist/index5.css +0 -1
- package/dist/index6.css +0 -1
- package/dist/index7.css +0 -1
- package/dist/index8.css +0 -1
- package/dist/index9.css +0 -1
- package/dist/input.module-DDQY_Ij6.js +0 -7
- package/dist/safePolygon-DWy1dGKJ.js +0 -308
- package/dist/toast.css +0 -1
- package/dist/tooltip-arrow-cs6vjjqZ.js +0 -24
- package/dist/tooltip-arrow.css +0 -1
- package/dist/useHoverReferenceInteraction-SfOBPoXM.js +0 -264
- package/dist/usePopupAutoResize-CNR6Ekmx.js +0 -85
- package/dist/view.module-DfDLgJE0.js +0 -6
- /package/dist/components/{icon/icon-names.js → dialog/dialog.types.js} +0 -0
- /package/dist/components/{toast → toaster}/use-toast-manager.js +0 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import * as g from "react";
|
|
2
|
+
import { a as ne } from "./floating-ui.utils.dom-cbi420Pg.js";
|
|
3
|
+
import { u as V } from "./useStableCallback-DKZHlUAT.js";
|
|
4
|
+
import { u as oe } from "./useIsoLayoutEffect-CIDbvm3Q.js";
|
|
5
|
+
import { c as z, t as G } from "./createBaseUIEventDetails-CCSfZ2vM.js";
|
|
6
|
+
import { a as le, u as me, g as pe } from "./transitions.module-D9mMAtfI.js";
|
|
7
|
+
import { e as U, h as fe, f as K, T as ge } from "./element-u5WgOZX1.js";
|
|
8
|
+
import { b as te } from "./event-B89-Ng5h.js";
|
|
9
|
+
import * as he from "react-dom";
|
|
10
|
+
import { u as Z } from "./useValueAsRef-B4EriRsI.js";
|
|
11
|
+
import { u as se, T as Re } from "./useTimeout-BNni6aw5.js";
|
|
12
|
+
import { c as Ee } from "./FloatingPortal-BQsQhvIr.js";
|
|
13
|
+
const ae = Ee("safe-polygon"), be = `button,[role="button"],select,[tabindex]:not([tabindex="-1"]),${ge}`;
|
|
14
|
+
function Te(s) {
|
|
15
|
+
return s ? !!s.closest(be) : !1;
|
|
16
|
+
}
|
|
17
|
+
function ee(s, t, n) {
|
|
18
|
+
if (n && !te(n))
|
|
19
|
+
return 0;
|
|
20
|
+
if (typeof s == "number")
|
|
21
|
+
return s;
|
|
22
|
+
if (typeof s == "function") {
|
|
23
|
+
const u = s();
|
|
24
|
+
return typeof u == "number" ? u : u?.[t];
|
|
25
|
+
}
|
|
26
|
+
return s?.[t];
|
|
27
|
+
}
|
|
28
|
+
function ce(s) {
|
|
29
|
+
return typeof s == "function" ? s() : s;
|
|
30
|
+
}
|
|
31
|
+
function Ae(s, t = {}) {
|
|
32
|
+
const n = "rootStore" in s ? s.rootStore : s, u = n.useState("open"), d = n.useState("floatingElement"), R = n.useState("domReferenceElement"), {
|
|
33
|
+
dataRef: b,
|
|
34
|
+
events: k
|
|
35
|
+
} = n.context, {
|
|
36
|
+
enabled: v = !0,
|
|
37
|
+
delay: N = 0,
|
|
38
|
+
handleClose: X = null,
|
|
39
|
+
mouseOnly: m = !1,
|
|
40
|
+
restMs: F = 0,
|
|
41
|
+
move: x = !0,
|
|
42
|
+
triggerElement: Y = null,
|
|
43
|
+
externalTree: w
|
|
44
|
+
} = t, _ = le(w), W = me(), I = Z(X), H = Z(N), D = Z(F), L = g.useRef(void 0), O = g.useRef(!1), p = se(), j = g.useRef(void 0), P = se(), h = g.useRef(!0), S = g.useRef(!1), l = g.useRef(() => {
|
|
45
|
+
}), e = g.useRef(!1), T = V(() => {
|
|
46
|
+
const o = b.current.openEvent?.type;
|
|
47
|
+
return o?.includes("mouse") && o !== "mousedown";
|
|
48
|
+
}), M = V(() => O.current ? !0 : b.current.openEvent ? ["click", "mousedown"].includes(b.current.openEvent.type) : !1);
|
|
49
|
+
g.useEffect(() => {
|
|
50
|
+
if (!v)
|
|
51
|
+
return;
|
|
52
|
+
function o(a) {
|
|
53
|
+
a.open || (p.clear(), P.clear(), h.current = !0, e.current = !1);
|
|
54
|
+
}
|
|
55
|
+
return k.on("openchange", o), () => {
|
|
56
|
+
k.off("openchange", o);
|
|
57
|
+
};
|
|
58
|
+
}, [v, k, p, P]), g.useEffect(() => {
|
|
59
|
+
if (!v || !I.current || !u)
|
|
60
|
+
return;
|
|
61
|
+
function o(E) {
|
|
62
|
+
M() || T() && n.setOpen(!1, z(G, E, E.currentTarget ?? void 0));
|
|
63
|
+
}
|
|
64
|
+
const a = U(d).documentElement;
|
|
65
|
+
return a.addEventListener("mouseleave", o), () => {
|
|
66
|
+
a.removeEventListener("mouseleave", o);
|
|
67
|
+
};
|
|
68
|
+
}, [d, u, n, v, I, T, M]);
|
|
69
|
+
const $ = g.useCallback((o, a = !0) => {
|
|
70
|
+
const E = ee(H.current, "close", L.current);
|
|
71
|
+
E && !j.current ? p.start(E, () => n.setOpen(!1, z(G, o))) : a && (p.clear(), n.setOpen(!1, z(G, o)));
|
|
72
|
+
}, [H, n, p]), f = V(() => {
|
|
73
|
+
l.current(), j.current = void 0;
|
|
74
|
+
}), i = V(() => {
|
|
75
|
+
if (S.current) {
|
|
76
|
+
const o = U(d).body;
|
|
77
|
+
o.style.pointerEvents = "", o.removeAttribute(ae), S.current = !1;
|
|
78
|
+
}
|
|
79
|
+
}), y = V((o) => {
|
|
80
|
+
const a = fe(o);
|
|
81
|
+
if (!Te(a)) {
|
|
82
|
+
O.current = !1;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
O.current = !0;
|
|
86
|
+
});
|
|
87
|
+
g.useEffect(() => {
|
|
88
|
+
if (!v)
|
|
89
|
+
return;
|
|
90
|
+
function o(r) {
|
|
91
|
+
if (p.clear(), h.current = !1, m && !te(L.current) || ce(D.current) > 0 && !ee(H.current, "open"))
|
|
92
|
+
return;
|
|
93
|
+
const B = ee(H.current, "open", L.current), q = r.currentTarget ?? void 0, Q = n.select("domReferenceElement"), re = Q && q && !K(Q, q);
|
|
94
|
+
B ? p.start(B, () => {
|
|
95
|
+
n.select("open") || n.setOpen(!0, z(G, r, q));
|
|
96
|
+
}) : (!u || re) && n.setOpen(!0, z(G, r, q));
|
|
97
|
+
}
|
|
98
|
+
function a(r) {
|
|
99
|
+
if (M()) {
|
|
100
|
+
i();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
l.current();
|
|
104
|
+
const B = U(d);
|
|
105
|
+
P.clear(), e.current = !1;
|
|
106
|
+
const q = n.context.triggerElements;
|
|
107
|
+
if (r.relatedTarget && q.hasElement(r.relatedTarget))
|
|
108
|
+
return;
|
|
109
|
+
if (I.current && b.current.floatingContext) {
|
|
110
|
+
u || p.clear(), j.current = I.current({
|
|
111
|
+
...b.current.floatingContext,
|
|
112
|
+
tree: _,
|
|
113
|
+
x: r.clientX,
|
|
114
|
+
y: r.clientY,
|
|
115
|
+
onClose() {
|
|
116
|
+
i(), f(), M() || $(r, !0);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const re = j.current;
|
|
120
|
+
B.addEventListener("mousemove", re), l.current = () => {
|
|
121
|
+
B.removeEventListener("mousemove", re);
|
|
122
|
+
};
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
(L.current !== "touch" || !K(d, r.relatedTarget)) && $(r);
|
|
126
|
+
}
|
|
127
|
+
function E(r) {
|
|
128
|
+
if (M() || !b.current.floatingContext || !n.select("open"))
|
|
129
|
+
return;
|
|
130
|
+
const B = n.context.triggerElements;
|
|
131
|
+
r.relatedTarget && B.hasElement(r.relatedTarget) || I.current?.({
|
|
132
|
+
...b.current.floatingContext,
|
|
133
|
+
tree: _,
|
|
134
|
+
x: r.clientX,
|
|
135
|
+
y: r.clientY,
|
|
136
|
+
onClose() {
|
|
137
|
+
i(), f(), M() || $(r);
|
|
138
|
+
}
|
|
139
|
+
})(r);
|
|
140
|
+
}
|
|
141
|
+
function C() {
|
|
142
|
+
p.clear(), i();
|
|
143
|
+
}
|
|
144
|
+
function A(r) {
|
|
145
|
+
M() || $(r, !1);
|
|
146
|
+
}
|
|
147
|
+
const c = Y ?? R;
|
|
148
|
+
if (ne(c)) {
|
|
149
|
+
const r = d;
|
|
150
|
+
return u && c.addEventListener("mouseleave", E), x && c.addEventListener("mousemove", o, {
|
|
151
|
+
once: !0
|
|
152
|
+
}), c.addEventListener("mouseenter", o), c.addEventListener("mouseleave", a), r && (r.addEventListener("mouseleave", E), r.addEventListener("mouseenter", C), r.addEventListener("mouseleave", A), r.addEventListener("pointerdown", y, !0)), () => {
|
|
153
|
+
u && c.removeEventListener("mouseleave", E), x && c.removeEventListener("mousemove", o), c.removeEventListener("mouseenter", o), c.removeEventListener("mouseleave", a), r && (r.removeEventListener("mouseleave", E), r.removeEventListener("mouseenter", C), r.removeEventListener("mouseleave", A), r.removeEventListener("pointerdown", y, !0));
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}, [v, m, x, R, d, Y, n, $, f, i, u, _, H, I, b, M, D, p, P, y]), oe(() => {
|
|
157
|
+
if (v && u && I.current?.__options?.blockPointerEvents && T()) {
|
|
158
|
+
S.current = !0;
|
|
159
|
+
const o = d;
|
|
160
|
+
if (ne(R) && o) {
|
|
161
|
+
const a = U(d).body;
|
|
162
|
+
a.setAttribute(ae, "");
|
|
163
|
+
const E = R, C = _?.nodesRef.current.find((A) => A.id === W)?.context?.elements.floating;
|
|
164
|
+
return C && (C.style.pointerEvents = ""), a.style.pointerEvents = "none", E.style.pointerEvents = "auto", o.style.pointerEvents = "auto", () => {
|
|
165
|
+
a.style.pointerEvents = "", E.style.pointerEvents = "", o.style.pointerEvents = "";
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}, [v, u, W, _, I, T, R, d]), oe(() => {
|
|
170
|
+
u || (L.current = void 0, e.current = !1, O.current = !1, f(), i());
|
|
171
|
+
}, [u, f, i]), g.useEffect(() => () => {
|
|
172
|
+
f(), p.clear(), P.clear(), O.current = !1;
|
|
173
|
+
}, [v, R, f, p, P]), g.useEffect(() => i, [i]);
|
|
174
|
+
const J = g.useMemo(() => {
|
|
175
|
+
function o(a) {
|
|
176
|
+
L.current = a.pointerType;
|
|
177
|
+
}
|
|
178
|
+
return {
|
|
179
|
+
onPointerDown: o,
|
|
180
|
+
onPointerEnter: o,
|
|
181
|
+
onMouseMove(a) {
|
|
182
|
+
const {
|
|
183
|
+
nativeEvent: E
|
|
184
|
+
} = a, C = a.currentTarget, A = n.select("domReferenceElement") && !K(n.select("domReferenceElement"), a.target);
|
|
185
|
+
function c() {
|
|
186
|
+
!h.current && (!n.select("open") || A) && n.setOpen(!0, z(G, E, C));
|
|
187
|
+
}
|
|
188
|
+
m && !te(L.current) || n.select("open") && !A || ce(D.current) === 0 || !A && e.current && a.movementX ** 2 + a.movementY ** 2 < 2 || (P.clear(), L.current === "touch" || A ? c() : (e.current = !0, P.start(ce(D.current), c)));
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}, [m, n, D, P]);
|
|
192
|
+
return g.useMemo(() => v ? {
|
|
193
|
+
reference: J
|
|
194
|
+
} : {}, [v, J]);
|
|
195
|
+
}
|
|
196
|
+
const ue = Ee("safe-polygon"), Me = `button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${ge}`;
|
|
197
|
+
function ye(s) {
|
|
198
|
+
return s ? !!s.closest(Me) : !1;
|
|
199
|
+
}
|
|
200
|
+
function ve(s) {
|
|
201
|
+
const t = g.useRef(void 0), n = g.useRef(!1), u = g.useRef(void 0), d = g.useRef(!0), R = g.useRef(!1), b = g.useRef(() => {
|
|
202
|
+
}), k = g.useRef(!1), v = se(), N = se(), X = g.useRef(void 0);
|
|
203
|
+
return g.useMemo(() => {
|
|
204
|
+
const m = s.context.dataRef.current;
|
|
205
|
+
return m.hoverInteractionState || (m.hoverInteractionState = {
|
|
206
|
+
pointerTypeRef: t,
|
|
207
|
+
interactedInsideRef: n,
|
|
208
|
+
handlerRef: u,
|
|
209
|
+
blockMouseMoveRef: d,
|
|
210
|
+
performedPointerEventsMutationRef: R,
|
|
211
|
+
unbindMouseMoveRef: b,
|
|
212
|
+
restTimeoutPendingRef: k,
|
|
213
|
+
openChangeTimeout: v,
|
|
214
|
+
restTimeout: N,
|
|
215
|
+
handleCloseOptionsRef: X
|
|
216
|
+
}), m.hoverInteractionState;
|
|
217
|
+
}, [s, t, n, u, d, R, b, k, v, N, X]);
|
|
218
|
+
}
|
|
219
|
+
const Le = /* @__PURE__ */ new Set(["click", "mousedown"]);
|
|
220
|
+
function _e(s, t = {}) {
|
|
221
|
+
const n = "rootStore" in s ? s.rootStore : s, u = n.useState("open"), d = n.useState("floatingElement"), R = n.useState("domReferenceElement"), {
|
|
222
|
+
dataRef: b
|
|
223
|
+
} = n.context, {
|
|
224
|
+
enabled: k = !0,
|
|
225
|
+
closeDelay: v = 0,
|
|
226
|
+
externalTree: N
|
|
227
|
+
} = t, {
|
|
228
|
+
pointerTypeRef: X,
|
|
229
|
+
interactedInsideRef: m,
|
|
230
|
+
handlerRef: F,
|
|
231
|
+
performedPointerEventsMutationRef: x,
|
|
232
|
+
unbindMouseMoveRef: Y,
|
|
233
|
+
restTimeoutPendingRef: w,
|
|
234
|
+
openChangeTimeout: _,
|
|
235
|
+
handleCloseOptionsRef: W
|
|
236
|
+
} = ve(n), I = le(N), H = me(), D = V(() => m.current ? !0 : b.current.openEvent ? Le.has(b.current.openEvent.type) : !1), L = V(() => {
|
|
237
|
+
const h = b.current.openEvent?.type;
|
|
238
|
+
return h?.includes("mouse") && h !== "mousedown";
|
|
239
|
+
}), O = g.useCallback((h, S = !0) => {
|
|
240
|
+
const l = Pe(v, X.current);
|
|
241
|
+
l && !F.current ? _.start(l, () => n.setOpen(!1, z(G, h))) : S && (_.clear(), n.setOpen(!1, z(G, h)));
|
|
242
|
+
}, [v, F, n, X, _]), p = V(() => {
|
|
243
|
+
Y.current(), F.current = void 0;
|
|
244
|
+
}), j = V(() => {
|
|
245
|
+
if (x.current) {
|
|
246
|
+
const h = U(d).body;
|
|
247
|
+
h.style.pointerEvents = "", h.removeAttribute(ue), x.current = !1;
|
|
248
|
+
}
|
|
249
|
+
}), P = V((h) => {
|
|
250
|
+
const S = fe(h);
|
|
251
|
+
if (!ye(S)) {
|
|
252
|
+
m.current = !1;
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
m.current = !0;
|
|
256
|
+
});
|
|
257
|
+
oe(() => {
|
|
258
|
+
u || (X.current = void 0, w.current = !1, m.current = !1, p(), j());
|
|
259
|
+
}, [u, X, w, m, p, j]), g.useEffect(() => () => {
|
|
260
|
+
p();
|
|
261
|
+
}, [p]), g.useEffect(() => j, [j]), oe(() => {
|
|
262
|
+
if (k && u && W.current?.blockPointerEvents && L() && ne(R) && d) {
|
|
263
|
+
x.current = !0;
|
|
264
|
+
const h = U(d).body;
|
|
265
|
+
h.setAttribute(ue, "");
|
|
266
|
+
const S = R, l = d, e = I?.nodesRef.current.find((T) => T.id === H)?.context?.elements.floating;
|
|
267
|
+
return e && (e.style.pointerEvents = ""), h.style.pointerEvents = "none", S.style.pointerEvents = "auto", l.style.pointerEvents = "auto", () => {
|
|
268
|
+
h.style.pointerEvents = "", S.style.pointerEvents = "", l.style.pointerEvents = "";
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}, [k, u, R, d, W, L, I, H, x]), g.useEffect(() => {
|
|
272
|
+
if (!k)
|
|
273
|
+
return;
|
|
274
|
+
function h(T) {
|
|
275
|
+
if (D() || !b.current.floatingContext || !n.select("open"))
|
|
276
|
+
return;
|
|
277
|
+
const M = n.context.triggerElements;
|
|
278
|
+
T.relatedTarget && M.hasElement(T.relatedTarget) || (j(), p(), D() || O(T));
|
|
279
|
+
}
|
|
280
|
+
function S(T) {
|
|
281
|
+
_.clear(), j(), F.current?.(T), p();
|
|
282
|
+
}
|
|
283
|
+
function l(T) {
|
|
284
|
+
D() || O(T, !1);
|
|
285
|
+
}
|
|
286
|
+
const e = d;
|
|
287
|
+
return e && (e.addEventListener("mouseleave", h), e.addEventListener("mouseenter", S), e.addEventListener("mouseleave", l), e.addEventListener("pointerdown", P, !0)), () => {
|
|
288
|
+
e && (e.removeEventListener("mouseleave", h), e.removeEventListener("mouseenter", S), e.removeEventListener("mouseleave", l), e.removeEventListener("pointerdown", P, !0));
|
|
289
|
+
};
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
function Pe(s, t) {
|
|
293
|
+
return t && !te(t) ? 0 : typeof s == "function" ? s() : s;
|
|
294
|
+
}
|
|
295
|
+
function ie(s) {
|
|
296
|
+
return typeof s == "function" ? s() : s;
|
|
297
|
+
}
|
|
298
|
+
const Ce = {
|
|
299
|
+
current: null
|
|
300
|
+
};
|
|
301
|
+
function $e(s, t = {}) {
|
|
302
|
+
const n = "rootStore" in s ? s.rootStore : s, {
|
|
303
|
+
dataRef: u,
|
|
304
|
+
events: d
|
|
305
|
+
} = n.context, {
|
|
306
|
+
enabled: R = !0,
|
|
307
|
+
delay: b = 0,
|
|
308
|
+
handleClose: k = null,
|
|
309
|
+
mouseOnly: v = !1,
|
|
310
|
+
restMs: N = 0,
|
|
311
|
+
move: X = !0,
|
|
312
|
+
triggerElementRef: m = Ce,
|
|
313
|
+
externalTree: F,
|
|
314
|
+
isActiveTrigger: x = !0
|
|
315
|
+
} = t, Y = le(F), {
|
|
316
|
+
pointerTypeRef: w,
|
|
317
|
+
interactedInsideRef: _,
|
|
318
|
+
handlerRef: W,
|
|
319
|
+
blockMouseMoveRef: I,
|
|
320
|
+
performedPointerEventsMutationRef: H,
|
|
321
|
+
unbindMouseMoveRef: D,
|
|
322
|
+
restTimeoutPendingRef: L,
|
|
323
|
+
openChangeTimeout: O,
|
|
324
|
+
restTimeout: p,
|
|
325
|
+
handleCloseOptionsRef: j
|
|
326
|
+
} = ve(n), P = Z(k), h = Z(b), S = Z(N);
|
|
327
|
+
x && (j.current = P.current?.__options);
|
|
328
|
+
const l = V(() => _.current ? !0 : u.current.openEvent ? ["click", "mousedown"].includes(u.current.openEvent.type) : !1), e = g.useCallback((f, i = !0) => {
|
|
329
|
+
const y = ee(h.current, "close", w.current);
|
|
330
|
+
y && !W.current ? O.start(y, () => n.setOpen(!1, z(G, f))) : i && (O.clear(), n.setOpen(!1, z(G, f)));
|
|
331
|
+
}, [h, W, n, w, O]), T = V(() => {
|
|
332
|
+
D.current(), W.current = void 0;
|
|
333
|
+
}), M = V(() => {
|
|
334
|
+
if (H.current) {
|
|
335
|
+
const f = U(n.select("domReferenceElement")).body;
|
|
336
|
+
f.style.pointerEvents = "", f.removeAttribute(ue), H.current = !1;
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
g.useEffect(() => {
|
|
340
|
+
if (!R)
|
|
341
|
+
return;
|
|
342
|
+
function f(i) {
|
|
343
|
+
i.open || (O.clear(), p.clear(), I.current = !0, L.current = !1);
|
|
344
|
+
}
|
|
345
|
+
return d.on("openchange", f), () => {
|
|
346
|
+
d.off("openchange", f);
|
|
347
|
+
};
|
|
348
|
+
}, [R, d, O, p, I, L]);
|
|
349
|
+
const $ = V((f) => {
|
|
350
|
+
if (l() || !u.current.floatingContext)
|
|
351
|
+
return;
|
|
352
|
+
const i = n.context.triggerElements;
|
|
353
|
+
if (f.relatedTarget && i.hasElement(f.relatedTarget))
|
|
354
|
+
return;
|
|
355
|
+
const y = m.current;
|
|
356
|
+
P.current?.({
|
|
357
|
+
...u.current.floatingContext,
|
|
358
|
+
tree: Y,
|
|
359
|
+
x: f.clientX,
|
|
360
|
+
y: f.clientY,
|
|
361
|
+
onClose() {
|
|
362
|
+
M(), T(), !l() && y === n.select("domReferenceElement") && e(f);
|
|
363
|
+
}
|
|
364
|
+
})(f);
|
|
365
|
+
});
|
|
366
|
+
return g.useEffect(() => {
|
|
367
|
+
if (!R)
|
|
368
|
+
return;
|
|
369
|
+
const f = m.current ?? (x ? n.select("domReferenceElement") : null);
|
|
370
|
+
if (!ne(f))
|
|
371
|
+
return;
|
|
372
|
+
function i(o) {
|
|
373
|
+
if (O.clear(), I.current = !1, v && !te(w.current) || ie(S.current) > 0 && !ee(h.current, "open"))
|
|
374
|
+
return;
|
|
375
|
+
const a = ee(h.current, "open", w.current), E = n.select("domReferenceElement"), C = n.context.triggerElements, A = (C.hasElement(o.target) || C.hasMatchingElement((B) => K(B, o.target))) && (!E || !K(E, o.target)), c = o.currentTarget ?? null, r = !n.select("open") || A;
|
|
376
|
+
a ? O.start(a, () => {
|
|
377
|
+
r && n.setOpen(!0, z(G, o, c));
|
|
378
|
+
}) : r && n.setOpen(!0, z(G, o, c));
|
|
379
|
+
}
|
|
380
|
+
function y(o) {
|
|
381
|
+
if (l()) {
|
|
382
|
+
M();
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
D.current();
|
|
386
|
+
const a = n.select("domReferenceElement"), E = U(a);
|
|
387
|
+
p.clear(), L.current = !1;
|
|
388
|
+
const C = n.context.triggerElements;
|
|
389
|
+
if (o.relatedTarget && C.hasElement(o.relatedTarget))
|
|
390
|
+
return;
|
|
391
|
+
if (P.current && u.current.floatingContext) {
|
|
392
|
+
n.select("open") || O.clear();
|
|
393
|
+
const c = m.current;
|
|
394
|
+
W.current = P.current({
|
|
395
|
+
...u.current.floatingContext,
|
|
396
|
+
tree: Y,
|
|
397
|
+
x: o.clientX,
|
|
398
|
+
y: o.clientY,
|
|
399
|
+
onClose() {
|
|
400
|
+
M(), T(), !l() && c === n.select("domReferenceElement") && e(o, !0);
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
const r = W.current;
|
|
404
|
+
r(o), E.addEventListener("mousemove", r), D.current = () => {
|
|
405
|
+
E.removeEventListener("mousemove", r);
|
|
406
|
+
};
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
(w.current !== "touch" || !K(n.select("floatingElement"), o.relatedTarget)) && e(o);
|
|
410
|
+
}
|
|
411
|
+
function J(o) {
|
|
412
|
+
$(o);
|
|
413
|
+
}
|
|
414
|
+
return n.select("open") && f.addEventListener("mouseleave", J), X && f.addEventListener("mousemove", i, {
|
|
415
|
+
once: !0
|
|
416
|
+
}), f.addEventListener("mouseenter", i), f.addEventListener("mouseleave", y), () => {
|
|
417
|
+
f.removeEventListener("mouseleave", J), X && f.removeEventListener("mousemove", i), f.removeEventListener("mouseenter", i), f.removeEventListener("mouseleave", y);
|
|
418
|
+
};
|
|
419
|
+
}, [T, M, I, u, h, e, n, R, P, $, x, l, v, X, w, S, p, L, O, m, Y, D, W]), g.useMemo(() => {
|
|
420
|
+
function f(i) {
|
|
421
|
+
w.current = i.pointerType;
|
|
422
|
+
}
|
|
423
|
+
return {
|
|
424
|
+
onPointerDown: f,
|
|
425
|
+
onPointerEnter: f,
|
|
426
|
+
onMouseMove(i) {
|
|
427
|
+
const {
|
|
428
|
+
nativeEvent: y
|
|
429
|
+
} = i, J = i.currentTarget, o = n.select("domReferenceElement"), a = n.context.triggerElements, E = n.select("open"), C = (a.hasElement(i.target) || a.hasMatchingElement((c) => K(c, i.target))) && (!o || !K(o, i.target));
|
|
430
|
+
if (v && !te(w.current) || E && !C || ie(S.current) === 0 || !C && L.current && i.movementX ** 2 + i.movementY ** 2 < 2)
|
|
431
|
+
return;
|
|
432
|
+
p.clear();
|
|
433
|
+
function A() {
|
|
434
|
+
!I.current && (!E || C) && n.setOpen(!0, z(G, y, J));
|
|
435
|
+
}
|
|
436
|
+
w.current === "touch" ? he.flushSync(() => {
|
|
437
|
+
A();
|
|
438
|
+
}) : C && E ? A() : (L.current = !0, p.start(ie(S.current), A));
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
}, [I, v, n, w, S, p, L]);
|
|
442
|
+
}
|
|
443
|
+
function de(s, t) {
|
|
444
|
+
const [n, u] = s;
|
|
445
|
+
let d = !1;
|
|
446
|
+
const R = t.length;
|
|
447
|
+
for (let b = 0, k = R - 1; b < R; k = b++) {
|
|
448
|
+
const [v, N] = t[b] || [0, 0], [X, m] = t[k] || [0, 0];
|
|
449
|
+
N >= u != m >= u && n <= (X - v) * (u - N) / (m - N) + v && (d = !d);
|
|
450
|
+
}
|
|
451
|
+
return d;
|
|
452
|
+
}
|
|
453
|
+
function Oe(s, t) {
|
|
454
|
+
return s[0] >= t.x && s[0] <= t.x + t.width && s[1] >= t.y && s[1] <= t.y + t.height;
|
|
455
|
+
}
|
|
456
|
+
function Be(s = {}) {
|
|
457
|
+
const {
|
|
458
|
+
buffer: t = 0.5,
|
|
459
|
+
blockPointerEvents: n = !1,
|
|
460
|
+
requireIntent: u = !0
|
|
461
|
+
} = s, d = new Re();
|
|
462
|
+
let R = !1, b = null, k = null, v = typeof performance < "u" ? performance.now() : 0;
|
|
463
|
+
function N(m, F) {
|
|
464
|
+
const x = performance.now(), Y = x - v;
|
|
465
|
+
if (b === null || k === null || Y === 0)
|
|
466
|
+
return b = m, k = F, v = x, null;
|
|
467
|
+
const w = m - b, _ = F - k, I = Math.sqrt(w * w + _ * _) / Y;
|
|
468
|
+
return b = m, k = F, v = x, I;
|
|
469
|
+
}
|
|
470
|
+
const X = ({
|
|
471
|
+
x: m,
|
|
472
|
+
y: F,
|
|
473
|
+
placement: x,
|
|
474
|
+
elements: Y,
|
|
475
|
+
onClose: w,
|
|
476
|
+
nodeId: _,
|
|
477
|
+
tree: W
|
|
478
|
+
}) => function(H) {
|
|
479
|
+
function D() {
|
|
480
|
+
d.clear(), w();
|
|
481
|
+
}
|
|
482
|
+
if (d.clear(), !Y.domReference || !Y.floating || x == null || m == null || F == null)
|
|
483
|
+
return;
|
|
484
|
+
const {
|
|
485
|
+
clientX: L,
|
|
486
|
+
clientY: O
|
|
487
|
+
} = H, p = [L, O], j = fe(H), P = H.type === "mouseleave", h = K(Y.floating, j), S = K(Y.domReference, j), l = Y.domReference.getBoundingClientRect(), e = Y.floating.getBoundingClientRect(), T = x.split("-")[0], M = m > e.right - e.width / 2, $ = F > e.bottom - e.height / 2, f = Oe(p, l), i = e.width > l.width, y = e.height > l.height, J = (i ? l : e).left, o = (i ? l : e).right, a = (y ? l : e).top, E = (y ? l : e).bottom;
|
|
488
|
+
if (h && (R = !0, !P))
|
|
489
|
+
return;
|
|
490
|
+
if (S && (R = !1), S && !P) {
|
|
491
|
+
R = !0;
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
if (P && ne(H.relatedTarget) && K(Y.floating, H.relatedTarget) || W && pe(W.nodesRef.current, _).some(({
|
|
495
|
+
context: c
|
|
496
|
+
}) => c?.open))
|
|
497
|
+
return;
|
|
498
|
+
if (T === "top" && F >= l.bottom - 1 || T === "bottom" && F <= l.top + 1 || T === "left" && m >= l.right - 1 || T === "right" && m <= l.left + 1)
|
|
499
|
+
return D();
|
|
500
|
+
let C = [];
|
|
501
|
+
switch (T) {
|
|
502
|
+
case "top":
|
|
503
|
+
C = [[J, l.top + 1], [J, e.bottom - 1], [o, e.bottom - 1], [o, l.top + 1]];
|
|
504
|
+
break;
|
|
505
|
+
case "bottom":
|
|
506
|
+
C = [[J, e.top + 1], [J, l.bottom - 1], [o, l.bottom - 1], [o, e.top + 1]];
|
|
507
|
+
break;
|
|
508
|
+
case "left":
|
|
509
|
+
C = [[e.right - 1, E], [e.right - 1, a], [l.left + 1, a], [l.left + 1, E]];
|
|
510
|
+
break;
|
|
511
|
+
case "right":
|
|
512
|
+
C = [[l.right - 1, E], [l.right - 1, a], [e.left + 1, a], [e.left + 1, E]];
|
|
513
|
+
break;
|
|
514
|
+
}
|
|
515
|
+
function A([c, r]) {
|
|
516
|
+
switch (T) {
|
|
517
|
+
case "top": {
|
|
518
|
+
const B = [i ? c + t / 2 : M ? c + t * 4 : c - t * 4, r + t + 1], q = [i ? c - t / 2 : M ? c + t * 4 : c - t * 4, r + t + 1], Q = [[e.left, M || i ? e.bottom - t : e.top], [e.right, M ? i ? e.bottom - t : e.top : e.bottom - t]];
|
|
519
|
+
return [B, q, ...Q];
|
|
520
|
+
}
|
|
521
|
+
case "bottom": {
|
|
522
|
+
const B = [i ? c + t / 2 : M ? c + t * 4 : c - t * 4, r - t], q = [i ? c - t / 2 : M ? c + t * 4 : c - t * 4, r - t], Q = [[e.left, M || i ? e.top + t : e.bottom], [e.right, M ? i ? e.top + t : e.bottom : e.top + t]];
|
|
523
|
+
return [B, q, ...Q];
|
|
524
|
+
}
|
|
525
|
+
case "left": {
|
|
526
|
+
const B = [c + t + 1, y ? r + t / 2 : $ ? r + t * 4 : r - t * 4], q = [c + t + 1, y ? r - t / 2 : $ ? r + t * 4 : r - t * 4];
|
|
527
|
+
return [...[[$ || y ? e.right - t : e.left, e.top], [$ ? y ? e.right - t : e.left : e.right - t, e.bottom]], B, q];
|
|
528
|
+
}
|
|
529
|
+
case "right": {
|
|
530
|
+
const B = [c - t, y ? r + t / 2 : $ ? r + t * 4 : r - t * 4], q = [c - t, y ? r - t / 2 : $ ? r + t * 4 : r - t * 4], Q = [[$ || y ? e.left + t : e.right, e.top], [$ ? y ? e.left + t : e.right : e.left + t, e.bottom]];
|
|
531
|
+
return [B, q, ...Q];
|
|
532
|
+
}
|
|
533
|
+
default:
|
|
534
|
+
return [];
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
if (!de([L, O], C)) {
|
|
538
|
+
if (R && !f)
|
|
539
|
+
return D();
|
|
540
|
+
if (!P && u) {
|
|
541
|
+
const c = N(H.clientX, H.clientY);
|
|
542
|
+
if (c !== null && c < 0.1)
|
|
543
|
+
return D();
|
|
544
|
+
}
|
|
545
|
+
de([L, O], A([m, F])) ? !R && u && d.start(40, D) : D();
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
return X.__options = {
|
|
549
|
+
blockPointerEvents: n
|
|
550
|
+
}, X;
|
|
551
|
+
}
|
|
552
|
+
export {
|
|
553
|
+
$e as a,
|
|
554
|
+
_e as b,
|
|
555
|
+
ee as g,
|
|
556
|
+
Be as s,
|
|
557
|
+
Ae as u
|
|
558
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._search-bar_r8lqs_2{position:relative;height:var(--space-32)}._search-bar__input_r8lqs_7{position:relative;padding-right:var(--space-32);width:100%;height:100%;line-height:var(--line-height-input)}._search-bar__icon_r8lqs_15{display:flex;position:absolute!important;top:0;right:0;justify-content:center;align-items:center;padding:var(--space-8);height:100%;pointer-events:none}._search-bar__icon_close_r8lqs_27{padding:var(--space-4);pointer-events:auto}}
|
package/dist/select.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._select__trigger_4x1b0_2{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:var(--space-4);padding:0 var(--space-8);height:var(--space-32)}._select__trigger_4x1b0_2:not([disabled],[data-disabled]){color:var(--foreground-default)}[data-popup-open] ._select__trigger-icon_4x1b0_17{transform:rotate(180deg)}._select__list_4x1b0_21{position:relative;z-index:40;box-shadow:var(--shadow-1);border:1px solid var(--surface-interactive-border);border-radius:var(--border-radius-default);background-color:var(--surface-interactive-background);min-width:var(--anchor-width);max-height:var(--available-height);overflow:hidden}._select__item_4x1b0_33{display:grid;position:relative;grid-template-columns:var(--space-16) 1fr;align-items:center;gap:var(--space-4);cursor:default;cursor:not-allowed;outline:none;padding:0 var(--space-8);width:100%;height:var(--space-32);color:var(--foreground-dimmest);-webkit-user-select:none;-moz-user-select:none;user-select:none}._select__item_4x1b0_33:not([disabled],[data-disabled]){cursor:pointer;color:var(--foreground-default)}._select__item_4x1b0_33[data-highlighted]{background-color:var(--surface-interactive-background-active)}._select__item-indicator_4x1b0_58{grid-column-start:1}._select__item-text_4x1b0_62{grid-column-start:2}}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import { c as l } from "./clsx-OuTLNxxd.js";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { u as c } from "./useRenderElement-
|
|
5
|
-
import './
|
|
4
|
+
import { u as c } from "./useRenderElement-DngNDu_P.js";
|
|
5
|
+
import './separator.css';const s = /* @__PURE__ */ n.forwardRef(function(r, o) {
|
|
6
6
|
const {
|
|
7
|
-
className:
|
|
8
|
-
render:
|
|
7
|
+
className: v,
|
|
8
|
+
render: z,
|
|
9
9
|
orientation: t = "horizontal",
|
|
10
10
|
..._
|
|
11
11
|
} = r, i = n.useMemo(() => ({
|
|
@@ -21,18 +21,14 @@ import './index20.css';const s = /* @__PURE__ */ n.forwardRef(function(r, o) {
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
process.env.NODE_ENV !== "production" && (s.displayName = "Separator");
|
|
24
|
-
const u = "
|
|
24
|
+
const u = "_separator_un424_2", m = "_separator_color_default_un424_9", f = "_separator_color_stronger_un424_13", d = "_separator_orientation_horizontal_un424_17", h = "_separator_orientation_vertical_un424_22", a = {
|
|
25
25
|
separator: u,
|
|
26
26
|
separator_color_default: m,
|
|
27
27
|
separator_color_stronger: f,
|
|
28
28
|
separator_orientation_horizontal: d,
|
|
29
29
|
separator_orientation_vertical: h
|
|
30
30
|
};
|
|
31
|
-
function
|
|
32
|
-
color: e = "default",
|
|
33
|
-
className: r,
|
|
34
|
-
...o
|
|
35
|
-
}) {
|
|
31
|
+
function E({ color: e = "default", className: r, ...o }) {
|
|
36
32
|
return /* @__PURE__ */ p(
|
|
37
33
|
s,
|
|
38
34
|
{
|
|
@@ -47,6 +43,6 @@ function g({
|
|
|
47
43
|
);
|
|
48
44
|
}
|
|
49
45
|
export {
|
|
50
|
-
|
|
46
|
+
E as S,
|
|
51
47
|
s as a
|
|
52
48
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer base{._separator_un424_2{flex-grow:0;flex-shrink:0;outline:none;border:none}._separator_color_default_un424_9{background-color:var(--surface-interactive-border)}._separator_color_stronger_un424_13{background-color:var(--surface-interactive-border-hover)}._separator_orientation_horizontal_un424_17{height:1px;min-height:1px}._separator_orientation_vertical_un424_22{width:1px;min-width:1px}}
|
package/dist/slider.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._slider__control_q5h2z_2{display:flex;align-items:center;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._slider__track_q5h2z_9{border-radius:var(--border-radius-round);background-color:var(--surface-interactive-border);width:100%;height:var(--space-4);-webkit-user-select:none;-moz-user-select:none;user-select:none}._slider__indicator_q5h2z_17{border-color:var(--view-colorway-default);border-radius:var(--border-radius-round);background-color:var(--view-colorway-dimmer);-webkit-user-select:none;-moz-user-select:none;user-select:none}._slider__indicator_q5h2z_17:not([disabled],[data-disabled]){background-color:var(--view-colorway-default)}._slider__thumb_q5h2z_28{cursor:not-allowed;border-width:1px;border-style:solid;border-radius:var(--border-radius-round);background-color:var(--view-colorway-dimmer);aspect-ratio:1 / 1;width:var(--space-16);height:var(--space-16);-webkit-user-select:none;-moz-user-select:none;user-select:none}._slider__thumb_q5h2z_28:not([disabled],[data-disabled]){cursor:ew-resize;border-color:var(--view-colorway-default);background-color:var(--view-colorway-default)}._slider__thumb_q5h2z_28:not([disabled],[data-disabled]):hover{border-color:var(--view-colorway-stronger)}._slider__thumb_q5h2z_28[data-dragging]:not([disabled],[data-disabled]){border-color:var(--view-colorway-stronger);background-color:var(--view-colorway-default)}}
|
package/dist/spinner.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._spinner_16nxb_2{animation:_loading_16nxb_1 3s linear infinite}@keyframes _loading_16nxb_1{0%{rotate:0deg}to{rotate:360deg}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._stacked-avatars_qhxl3_2{flex-direction:row;transform:translate(0);padding-left:10px}._stacked-avatars__avatar_qhxl3_8{cursor:default;margin-left:-10px}._stacked-avatars__avatar_color_qhxl3_13{border-color:var(--view-colorway-default)}._stacked-avatars__visible_qhxl3_17{justify-content:center;align-items:center;cursor:pointer;margin-left:-10px;border:1px solid var(--outline-dimmest);border-radius:var(--border-radius-round);background-color:var(--background-default);aspect-ratio:1 / 1;width:var(--stacked-avatars-size);height:var(--stacked-avatars-size);overflow:hidden;color:var(--foreground-dimmer)}._stacked-avatars__visible_size_sm_qhxl3_35{--stacked-avatars-size: var(--space-24)}._stacked-avatars__visible_size_md_qhxl3_39{--stacked-avatars-size: var(--space-32)}._stacked-avatars__visible_size_lg_qhxl3_43{--stacked-avatars-size: var(--space-40)}._stacked-avatars__visible_size_xl_qhxl3_47{--stacked-avatars-size: var(--space-48)}._stacked-avatars__visible_size_2xl_qhxl3_51{--stacked-avatars-size: var(--space-56)}._stacked-avatars__visible_size_3xl_qhxl3_55{--stacked-avatars-size: var(--space-64)}._stacked-avatars__tooltip-content_qhxl3_60{display:flex;flex-direction:column;align-items:start;gap:var(--space-4);padding:var(--space-8);width:100%;max-width:var(--space-128)}._stacked-avatars__tooltip-user_qhxl3_70{flex-direction:row;justify-content:center;align-items:center;gap:var(--space-6);width:100%}._stacked-avatars__tooltip-text_qhxl3_78{flex:1 1 auto}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{._status-banner_1ci6y_2{flex-grow:1;flex-shrink:1;flex-direction:row;align-items:center;gap:var(--status-banner-gap);border-width:1px;border-style:solid;border-radius:var(--border-radius-default);padding:var(--status-banner-padding);width:-moz-fit-content;width:fit-content}._status-banner_variant_neutral_1ci6y_15{border-color:var(--surface-interactive-border);background:var(--surface-interactive-background);color:var(--foreground-default)}._status-banner_variant_colorway_1ci6y_21{border-color:var(--view-colorway-stronger);background:var(--view-colorway-dimmest);color:var(--view-colorway-strongest)}._status-banner_size_md_1ci6y_27{--status-banner-gap: var(--space-8);--status-banner-padding: var(--space-8);--status-banner-content-gap: 0}._status-banner_size_lg_1ci6y_33{--status-banner-gap: var(--space-12);--status-banner-padding: var(--space-12);--status-banner-content-gap: var(--space-2)}._status-banner__content_1ci6y_39{flex-grow:1;flex-shrink:1;gap:var(--status-banner-content-gap)}._status-banner__description_1ci6y_45{flex-grow:1;flex-shrink:1}._status-banner__close_1ci6y_50{flex-grow:0;background:transparent!important}}
|