@iamfiro/design 0.3.2 → 0.3.5
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/agents/INDEX.md +1 -1
- package/agents/app-shell/AGENTS.md +99 -1
- package/agents/brand-icon/AGENTS.md +1 -1
- package/agents/social-login-button/AGENTS.md +4 -3
- package/lib/components/Accordion/Accordion2.js +74 -74
- package/lib/components/ActionBar/ActionBar2.js +44 -42
- package/lib/components/Alert/Alert2.js +67 -67
- package/lib/components/AppShell/AppShell2.js +72 -66
- package/lib/components/AreaChart/AreaChart.js +45 -45
- package/lib/components/BarChart/BarChart2.js +128 -128
- package/lib/components/BarList/BarList2.js +105 -105
- package/lib/components/Breadcrumb/Breadcrumb2.js +63 -64
- package/lib/components/Calendar/Calendar2.js +197 -197
- package/lib/components/Calendar/DatePicker2.js +100 -100
- package/lib/components/Calendar/date.js +47 -70
- package/lib/components/Card/Card2.js +101 -74
- package/lib/components/CardFrame/CardFrame2.js +52 -56
- package/lib/components/Chart/ChartParts.js +88 -88
- package/lib/components/Chart/chart2.js +63 -63
- package/lib/components/Chart/useChartInteraction.js +43 -43
- package/lib/components/ChatBubble/ChatBubble2.js +111 -111
- package/lib/components/ChatBubble/formatChatTime.js +38 -43
- package/lib/components/ChatComposer/ChatComposer2.js +96 -96
- package/lib/components/CodeBlock/CodeBlock2.js +65 -65
- package/lib/components/CodeBlock/highlight.js +84 -84
- package/lib/components/ColorPicker/ColorPicker2.js +263 -263
- package/lib/components/ColorPicker/color.js +92 -92
- package/lib/components/ColorPicker/presets.js +35 -39
- package/lib/components/Combobox/Combobox2.js +134 -134
- package/lib/components/CommandMenu/CommandMenu.js +130 -131
- package/lib/components/Comment/Comment2.js +64 -63
- package/lib/components/ContextMenu/ContextMenu2.js +84 -84
- package/lib/components/DataGrid/DataGrid2.js +1182 -1180
- package/lib/components/DataGrid/GridPopover.js +84 -84
- package/lib/components/DataGrid/anchor.js +29 -28
- package/lib/components/DataGrid/model.js +308 -307
- package/lib/components/DataGrid/panels.js +398 -399
- package/lib/components/DataGrid/typeMeta.js +41 -40
- package/lib/components/DataGrid/types.js +39 -40
- package/lib/components/DescriptionList/DescriptionList2.js +105 -105
- package/lib/components/Dialog/AlertDialog.js +90 -89
- package/lib/components/Dialog/Dialog2.js +71 -72
- package/lib/components/Dialog/modal.js +62 -60
- package/lib/components/Drawer/Drawer2.js +167 -166
- package/lib/components/DropdownMenu/DropdownMenu2.js +260 -258
- package/lib/components/DropdownMenu/menuCore.js +29 -28
- package/lib/components/Dropzone/Dropzone2.js +78 -77
- package/lib/components/EmptyState/EmptyState2.js +57 -57
- package/lib/components/FileChip/FileChip2.js +53 -77
- package/lib/components/FileUpload/FileUpload.js +168 -167
- package/lib/components/FilterChips/FilterChips2.js +60 -60
- package/lib/components/FunnelChart/FunnelChart2.js +174 -174
- package/lib/components/FunnelChart/funnel.js +44 -42
- package/lib/components/Highlight/Highlight2.js +55 -55
- package/lib/components/HoverCard/HoverCard.js +71 -96
- package/lib/components/InlineDiff/InlineDiff2.js +128 -129
- package/lib/components/InlineDiff/diff.js +79 -79
- package/lib/components/InlineDiff/useDiffReview.js +61 -62
- package/lib/components/Kanban/Kanban2.js +387 -389
- package/lib/components/Kanban/KanbanCard.js +84 -84
- package/lib/components/Kanban/move.js +32 -25
- package/lib/components/LineChart/LineChart2.js +228 -228
- package/lib/components/List/List2.js +62 -62
- package/lib/components/Listbox/Listbox2.js +92 -92
- package/lib/components/Marker/Marker2.js +50 -56
- package/lib/components/Menubar/Menubar2.js +117 -116
- package/lib/components/MultiSelect/MultiSelect2.js +111 -111
- package/lib/components/NavigationMenu/NavigationMenu2.js +231 -231
- package/lib/components/NoticeStack/NoticeStack2.js +99 -99
- package/lib/components/NumberStepper/NumberStepper2.js +60 -60
- package/lib/components/OtpInput/OtpInput2.js +90 -89
- package/lib/components/Pagination/Pagination2.js +105 -105
- package/lib/components/Pagination/paginationRange.js +37 -37
- package/lib/components/PhoneInput/PhoneInput.js +75 -76
- package/lib/components/PieChart/PieChart2.js +166 -166
- package/lib/components/PieChart/arc.js +71 -69
- package/lib/components/PieChart/useArcTween.js +60 -62
- package/lib/components/Popover/Popover2.js +85 -86
- package/lib/components/ProgressTracker/ProgressTracker2.js +134 -134
- package/lib/components/Rating/Rating2.js +90 -89
- package/lib/components/Resizable/Resizable2.js +128 -129
- package/lib/components/Resizable/layout.js +51 -51
- package/lib/components/ScaledPreview/ScaledPreview2.js +49 -48
- package/lib/components/ScatterChart/ScatterChart2.js +214 -213
- package/lib/components/ScatterChart/scatter.js +49 -52
- package/lib/components/ScrollArea/ScrollArea2.js +115 -117
- package/lib/components/Select/Select2.js +82 -82
- package/lib/components/Sidebar/Sidebar2.js +91 -85
- package/lib/components/Sidebar/rail.js +43 -0
- package/lib/components/Skeleton/Skeleton2.js +63 -64
- package/lib/components/Slider/Slider2.js +65 -66
- package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -69
- package/lib/components/SparkChart/SparkChart2.js +126 -127
- package/lib/components/SparkChart/spark.js +66 -42
- package/lib/components/Sparkbar/Sparkbar2.js +60 -60
- package/lib/components/SplitView/SplitView2.js +51 -51
- package/lib/components/Stat/Stat2.js +79 -79
- package/lib/components/StepList/StepList2.js +75 -75
- package/lib/components/Table/Table2.js +71 -71
- package/lib/components/Tabs/Tabs2.js +74 -74
- package/lib/components/TagInput/TagInput2.js +223 -221
- package/lib/components/TimePicker/TimePicker2.js +197 -195
- package/lib/components/TimePicker/time.js +59 -56
- package/lib/components/Timeline/Timeline2.js +195 -195
- package/lib/components/Timeline/scale.js +64 -66
- package/lib/components/Toast/Toaster.js +139 -139
- package/lib/components/Toast/store.js +72 -76
- package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
- package/lib/components/Toolbar/Toolbar2.js +165 -164
- package/lib/components/Tracker/Tracker2.js +72 -72
- package/lib/components/TreeDiagram/TreeDiagram2.js +96 -97
- package/lib/components/TreeView/TreeView2.js +152 -151
- package/lib/hooks/timing.js +34 -36
- package/lib/hooks/useControllableState.js +29 -30
- package/lib/hooks/useCountdown.js +51 -53
- package/lib/hooks/useDigitInput.js +81 -55
- package/lib/hooks/useDismiss.js +53 -56
- package/lib/hooks/useElapsed.js +48 -49
- package/lib/hooks/useFloating.js +36 -36
- package/lib/hooks/useFocusTrap.js +32 -32
- package/lib/hooks/usePresence.js +49 -49
- package/lib/hooks/usePressToOpen.js +40 -40
- package/lib/hooks/useScrollLock.js +50 -49
- package/lib/hooks/useSelection.js +42 -47
- package/lib/index.js +138 -139
- package/lib/primitives/AspectRatio2.js +58 -57
- package/lib/primitives/BrandIcon.js +210 -179
- package/lib/primitives/ColorDot2.js +42 -41
- package/lib/primitives/CopyButton2.js +59 -58
- package/lib/primitives/CountBadge2.js +58 -63
- package/lib/primitives/Countdown2.js +38 -37
- package/lib/primitives/Delta2.js +37 -37
- package/lib/primitives/Elapsed.js +42 -40
- package/lib/primitives/FileIcon2.js +102 -102
- package/lib/primitives/Flag2.js +124 -124
- package/lib/primitives/IconStack2.js +45 -23
- package/lib/primitives/IconTile2.js +45 -41
- package/lib/primitives/Kbd2.js +48 -48
- package/lib/primitives/Layout2.js +71 -71
- package/lib/primitives/Link2.js +40 -42
- package/lib/primitives/MaskedText2.js +50 -50
- package/lib/primitives/Progress2.js +78 -77
- package/lib/primitives/RelativeTime.js +55 -58
- package/lib/primitives/SearchInput2.js +72 -68
- package/lib/primitives/SelectorButton2.js +60 -61
- package/lib/primitives/Spinner2.js +48 -49
- package/lib/primitives/StatusIcon2.js +69 -69
- package/lib/primitives/Swatch2.js +65 -69
- package/lib/primitives/Tooltip2.js +92 -92
- package/lib/primitives/Typography2.js +37 -37
- package/lib/primitives/formatCountdown.js +38 -38
- package/lib/primitives/formatElapsed.js +43 -45
- package/lib/primitives/formatRelativeTime.js +54 -54
- package/lib/primitives/hotkey.js +77 -77
- package/lib/primitives/index.js +162 -161
- package/lib/primitives/maskValue.js +54 -51
- package/lib/style.css +1 -1
- package/lib/types/components/AppShell/AppShell.d.ts +9 -2
- package/lib/types/components/Sidebar/rail.d.ts +4 -0
- package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
- package/lib/types/components/index.d.ts +1 -0
- package/lib/types/primitives/BrandIcon.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,95 +1,93 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
(function(e, t) {
|
|
3
|
-
let n =
|
|
3
|
+
let n = o, r = e();
|
|
4
4
|
for (;;) try {
|
|
5
|
-
if (parseInt(n(
|
|
5
|
+
if (-parseInt(n(200)) / 1 * (parseInt(n(214)) / 2) + parseInt(n(210)) / 3 * (-parseInt(n(218)) / 4) + -parseInt(n(205)) / 5 + parseInt(n(215)) / 6 + -parseInt(n(216)) / 7 * (parseInt(n(212)) / 8) + parseInt(n(204)) / 9 * (-parseInt(n(202)) / 10) + parseInt(n(206)) / 11 == t) break;
|
|
6
6
|
r.push(r.shift());
|
|
7
7
|
} catch {
|
|
8
8
|
r.push(r.shift());
|
|
9
9
|
}
|
|
10
|
-
})(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"mtu4ntGZmeTWtLbeza",
|
|
19
|
-
"A2v5",
|
|
20
|
-
"y3vYCMvUDa",
|
|
21
|
-
"nZm0vLbnCevI",
|
|
22
|
-
"Dg9gAxHLza",
|
|
23
|
-
"mtu1nJe1mKnUENnOsG",
|
|
24
|
-
"nZi4uhLhCNLK",
|
|
25
|
-
"BwLU",
|
|
26
|
-
"mty4rK1nDKLm",
|
|
27
|
-
"BwfW",
|
|
28
|
-
"AgfZ",
|
|
29
|
-
"y29SB3i",
|
|
30
|
-
"mJe5oda2n3DitLrcrW",
|
|
31
|
-
"oty5mdvcuuDmvKi",
|
|
32
|
-
"mZe0mNHoCKzsuG",
|
|
33
|
-
"nZK0ntC5mhzry050uq",
|
|
34
|
-
"mte2C0riswvd"
|
|
35
|
-
];
|
|
36
|
-
return e = function() {
|
|
37
|
-
return t;
|
|
38
|
-
}, e();
|
|
39
|
-
}
|
|
40
|
-
import { cubicBezier as t } from "./arc.js";
|
|
41
|
-
import { useEffect as n, useLayoutEffect as r, useRef as i, useState as a } from "react";
|
|
42
|
-
var o = t(.32, .72, 0, 1);
|
|
43
|
-
function s(t, n) {
|
|
44
|
-
t -= 372;
|
|
45
|
-
let r = e(), i = r[t];
|
|
46
|
-
s.cDwQPG === void 0 && (s.sJNwYK = function(e) {
|
|
10
|
+
})(s, 991816);
|
|
11
|
+
import { cubicBezier as e } from "./arc.js";
|
|
12
|
+
import { useEffect as t, useLayoutEffect as n, useRef as r, useState as i } from "react";
|
|
13
|
+
var a = e(.32, .72, 0, 1);
|
|
14
|
+
function o(e, t) {
|
|
15
|
+
e -= 199;
|
|
16
|
+
let n = s(), r = n[e];
|
|
17
|
+
o.pcCtIJ === void 0 && (o.pGzJEH = function(e) {
|
|
47
18
|
let t = "", n = "";
|
|
48
19
|
for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
|
|
49
20
|
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
50
21
|
return decodeURIComponent(n);
|
|
51
|
-
},
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
return
|
|
22
|
+
}, o.YfHxwi = {}, o.pcCtIJ = !0);
|
|
23
|
+
let i = n[0];
|
|
24
|
+
o.usfbGm !== i && (o.YfHxwi = {}, o.usfbGm = i);
|
|
25
|
+
let a = o.YfHxwi[e];
|
|
26
|
+
return a === void 0 ? (r = o.pGzJEH(r), o.YfHxwi[e] = r) : r = a, r;
|
|
27
|
+
}
|
|
28
|
+
function s() {
|
|
29
|
+
let e = [
|
|
30
|
+
"zMLSDgvY",
|
|
31
|
+
"mty1nZi5mhHdu1vlrq",
|
|
32
|
+
"Dg9gAxHLza",
|
|
33
|
+
"mZzOqLLrCgW",
|
|
34
|
+
"mJG1mdq0nvrRvgfWAG",
|
|
35
|
+
"nJm5mJG4ntrcEe5WEK0",
|
|
36
|
+
"y29SB3i",
|
|
37
|
+
"z2v0",
|
|
38
|
+
"AgfZ",
|
|
39
|
+
"ndK2mJmWnLLHDLPdrq",
|
|
40
|
+
"A2v5",
|
|
41
|
+
"ntm5mdq4ofbAtLHeua",
|
|
42
|
+
"BwfW",
|
|
43
|
+
"ntGYnte2Dun3zg96",
|
|
44
|
+
"mJKZmtqWoe5hAuPHsG",
|
|
45
|
+
"n2jxvM5yqG",
|
|
46
|
+
"AM9PBG",
|
|
47
|
+
"nfL2u3PQyW",
|
|
48
|
+
"y3vYCMvUDa",
|
|
49
|
+
"nNHJr0rmEG"
|
|
50
|
+
];
|
|
51
|
+
return s = function() {
|
|
52
|
+
return e;
|
|
53
|
+
}, s();
|
|
56
54
|
}
|
|
57
|
-
function c(e, { enter:
|
|
58
|
-
let l =
|
|
55
|
+
function c(e, { enter: s = 900, update: c = 600 } = {}) {
|
|
56
|
+
let l = o, [u, d] = i(() => e.map((e) => ({
|
|
59
57
|
...e,
|
|
60
58
|
a0: 0,
|
|
61
59
|
a1: 0
|
|
62
|
-
}))), f =
|
|
63
|
-
|
|
64
|
-
let t =
|
|
65
|
-
p[t(
|
|
60
|
+
}))), f = r(u), p = r(e);
|
|
61
|
+
n(() => {
|
|
62
|
+
let t = o;
|
|
63
|
+
p[t(199)] = e;
|
|
66
64
|
});
|
|
67
|
-
let m =
|
|
68
|
-
return
|
|
69
|
-
let e = l,
|
|
65
|
+
let m = r(!1), h = e[l(213)]((e) => e[l(211)] + ":" + e.a0[l(203)](5) + ":" + e.a1.toFixed(5) + ":" + e[l(207)])[l(217)]("|");
|
|
66
|
+
return t(() => {
|
|
67
|
+
let e = l, t = p[e(199)], n = !m[e(199)], r = new Map(f[e(199)][e(213)]((e) => [e.key, e])), i = new Set(t[e(213)]((t) => t[e(211)])), o = f[e(199)][e(201)]((t) => !i[e(209)](t[e(211)]) && t.a1 - t.a0 > 1e-4)[e(213)]((e) => {
|
|
70
68
|
let t = (e.a0 + e.a1) / 2;
|
|
71
69
|
return {
|
|
72
70
|
...e,
|
|
73
71
|
a0: t,
|
|
74
72
|
a1: t
|
|
75
73
|
};
|
|
76
|
-
}), u = [...
|
|
74
|
+
}), u = [...t, ...o], h = u[e(213)]((t) => r[e(208)](t[e(211)]) ?? {
|
|
77
75
|
...t,
|
|
78
76
|
a1: t.a0
|
|
79
|
-
}), g =
|
|
77
|
+
}), g = n ? s : c, _ = 0, v = 0, y = (n) => {
|
|
80
78
|
let r = e;
|
|
81
|
-
v ||=
|
|
82
|
-
let i = Math
|
|
79
|
+
v ||= n;
|
|
80
|
+
let i = Math.min(1, (n - v) / g), o = a(i), s = i < 1 ? u[r(213)]((e, t) => ({
|
|
83
81
|
...e,
|
|
84
|
-
a0: h[t].a0 + (e.a0 - h[t].a0) *
|
|
85
|
-
a1: h[t].a1 + (e.a1 - h[t].a1) *
|
|
86
|
-
})) :
|
|
87
|
-
f[r(
|
|
82
|
+
a0: h[t].a0 + (e.a0 - h[t].a0) * o,
|
|
83
|
+
a1: h[t].a1 + (e.a1 - h[t].a1) * o
|
|
84
|
+
})) : t;
|
|
85
|
+
f[r(199)] = s, d(s), i < 1 ? _ = requestAnimationFrame(y) : m[r(199)] = !0;
|
|
88
86
|
};
|
|
89
87
|
return _ = requestAnimationFrame(() => _ = requestAnimationFrame(y)), () => cancelAnimationFrame(_);
|
|
90
88
|
}, [
|
|
91
89
|
h,
|
|
92
|
-
|
|
90
|
+
s,
|
|
93
91
|
c
|
|
94
92
|
]), u;
|
|
95
93
|
}
|
|
@@ -1,112 +1,111 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
let
|
|
5
|
-
|
|
2
|
+
const e = c;
|
|
3
|
+
(function(e, t) {
|
|
4
|
+
let n = c, r = e();
|
|
5
|
+
for (;;) try {
|
|
6
|
+
if (parseInt(n(489)) / 1 + -parseInt(n(477)) / 2 + parseInt(n(493)) / 3 + parseInt(n(504)) / 4 + parseInt(n(513)) / 5 + -parseInt(n(507)) / 6 + -parseInt(n(480)) / 7 * (parseInt(n(500)) / 8) == t) break;
|
|
7
|
+
r.push(r.shift());
|
|
8
|
+
} catch {
|
|
9
|
+
r.push(r.shift());
|
|
10
|
+
}
|
|
11
|
+
})(m, 990844);
|
|
12
|
+
import { TIMING as t } from "../../hooks/timing.js";
|
|
13
|
+
import { usePresence as n } from "../../hooks/usePresence.js";
|
|
14
|
+
import { useControllableState as r } from "../../hooks/useControllableState.js";
|
|
15
|
+
import { cx as i } from "../../primitives/index.js";
|
|
16
|
+
import { useFloating as a } from "../../hooks/useFloating.js";
|
|
17
|
+
import { useDismiss as o } from "../../hooks/useDismiss.js";
|
|
18
|
+
import { focusableIn as s } from "../../hooks/useFocusTrap.js";
|
|
19
|
+
/* empty css */
|
|
20
|
+
function c(e, t) {
|
|
21
|
+
e -= 477;
|
|
22
|
+
let n = m(), r = n[e];
|
|
23
|
+
c.yWUstq === void 0 && (c.jMMUEJ = function(e) {
|
|
6
24
|
let t = "", n = "";
|
|
7
25
|
for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
|
|
8
26
|
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
9
27
|
return decodeURIComponent(n);
|
|
10
|
-
},
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
return
|
|
28
|
+
}, c.RjRSAU = {}, c.yWUstq = !0);
|
|
29
|
+
let i = n[0];
|
|
30
|
+
c.OEmOUg !== i && (c.RjRSAU = {}, c.OEmOUg = i);
|
|
31
|
+
let a = c.RjRSAU[e];
|
|
32
|
+
return a === void 0 ? (r = c.jMMUEJ(r), c.RjRSAU[e] = r) : r = a, r;
|
|
15
33
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
i.push(i.shift());
|
|
22
|
-
} catch {
|
|
23
|
-
i.push(i.shift());
|
|
24
|
-
}
|
|
25
|
-
})(s, 470261);
|
|
26
|
-
import { TIMING as n } from "../../hooks/timing.js";
|
|
27
|
-
import { usePresence as r } from "../../hooks/usePresence.js";
|
|
28
|
-
import { useControllableState as i } from "../../hooks/useControllableState.js";
|
|
29
|
-
import { cx as a } from "../../primitives/index.js";
|
|
30
|
-
import { useFloating as o } from "../../hooks/useFloating.js";
|
|
31
|
-
function s() {
|
|
32
|
-
let e = /* @__PURE__ */ "Cg9PBNrLCLr5Cgu.zgLHBg9N.mZu4mhz5senMuG.y29UDgfPBNm.DgfYz2v0.ntiWmw93vuXntG.mtaYodrAwejfzeK.y2XPy2S.C2v0vgLTzw91Da.Bw91C2u.ouTcBhnJrq.ywn0AxzLrwXLBwvUDa.Bw91BNrLza.Ag92zxi.zgvMyxvSDfbYzxzLBNrLza.ote4ngv3q1vJva.A2v5.CMvSyxrLzfrHCMDLDa.oMzVy3vZlxzPC2LIBgu.y2fSyYGXmdb2DYaTide2ChGP.owTey3fgqW.Ag92zxjhCMfJzq.zM9JDxm.zhmTzMXVyxrPBMCTlxbHzc0.mtKXndy1nejirw9ryW.zhmTC2nYB2XS.y2XLyxjuAw1LB3v0.mZC1mZHSyLfACw0.C3bHBG.rxnJyxbL.ndqZodmYmgvWz0vNzW.B3bLBG.zhmTzMXVyxrPBMC.C3rHCNq.mta2n0XWwwjJuG.ntiWnez5C1bksG.nty0ntiZmgLNseDiBG.y3vYCMvUDa".split(".");
|
|
33
|
-
return s = function() {
|
|
34
|
+
import { useEffect as l, useRef as u } from "react";
|
|
35
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
36
|
+
function m() {
|
|
37
|
+
let e = /* @__PURE__ */ "zNvUy3rPB24.zgvMyxvSDfbYzxzLBNrLza.odu2mZe2zM1uC2ze.zhmTC2nYB2XS.Cg9PBNrLCLr5Cgu.otuZnJiZohn3uhv3wa.zgLHBg9N.ywn0AxzLrwXLBwvUDa.ChjLDMvUDerLzMf1Bhq.zgL2.y2XPy2S.mJqXntCZmgfoDez2zG.CMvSyxrLzfrHCMDLDa.Ag92zxjjBNrLBNq.nZCWmdG2D1bQrLPx.C2v0vgLTzw91Da.rxnJyxbL.mtG5s3zns2fw.y3vYCMvUDa.B3bLBG.zM9JDxm.y29UDgfPBNm.y2XLyxjuAw1LB3v0.Bwf0y2HLCW.zhmTzMXVyxrPBMCTlxbHzc0.Ag92zxjhCMfJzq.mtm3nJm1nfbTEffrzq.y2XVC2LUzW.A2v5.yM9KEq.mZi0mJiWnwP5Ag5htG.Bw91C2u.y2fSyYGXmdb2DYaTide2ChGP.C3rHCNq.Ag92zxi.y2XVC2vK.oMzVy3vZlxzPC2LIBgu.ntyWmtzrs0nXzvG.Bw91BNrLza".split(".");
|
|
38
|
+
return m = function() {
|
|
34
39
|
return e;
|
|
35
|
-
},
|
|
40
|
+
}, m();
|
|
36
41
|
}
|
|
37
|
-
import { useDismiss as c } from "../../hooks/useDismiss.js";
|
|
38
|
-
import { focusableIn as l } from "../../hooks/useFocusTrap.js";
|
|
39
|
-
/* empty css */
|
|
40
|
-
import { useEffect as u, useRef as d } from "react";
|
|
41
|
-
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
42
42
|
import { createPortal as h } from "react-dom";
|
|
43
43
|
var g = 160;
|
|
44
|
-
function _({ trigger:
|
|
45
|
-
let
|
|
44
|
+
function _({ trigger: m, children: _, open: v, defaultOpen: y = !1, onOpenChange: b, openOn: x = "click", align: S = e(496), width: C, padding: w = "md", autoFocus: T = !0, className: E, "aria-label": D }) {
|
|
45
|
+
let O = e, [k, A] = r(v, y, b), j = n(k, g), M = u(null), N = u(null), P = u(0), { style: F, side: I } = a(M, j[O(501)], {
|
|
46
46
|
matchWidth: !1,
|
|
47
|
-
align:
|
|
48
|
-
panelRef:
|
|
47
|
+
align: S,
|
|
48
|
+
panelRef: N,
|
|
49
49
|
maxHeight: 560
|
|
50
50
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
n && (l(n)[0] ?? n)[t(395)]({ preventScroll: !0 });
|
|
51
|
+
o(k, [M, N], () => A(!1)), l(() => () => window.clearTimeout(P[O(481)]), []), l(() => {
|
|
52
|
+
if (!k || x !== "click" || !T) return;
|
|
53
|
+
let e = requestAnimationFrame(() => {
|
|
54
|
+
let e = c, t = N[e(481)];
|
|
55
|
+
t && (s(t)[0] ?? t)[e(483)]({ preventScroll: !0 });
|
|
57
56
|
});
|
|
58
|
-
return () => cancelAnimationFrame(
|
|
57
|
+
return () => cancelAnimationFrame(e);
|
|
59
58
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
]),
|
|
64
|
-
let e =
|
|
65
|
-
!
|
|
66
|
-
}, [
|
|
67
|
-
let
|
|
68
|
-
let t =
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
let t =
|
|
72
|
-
e[t(
|
|
73
|
-
},
|
|
59
|
+
k,
|
|
60
|
+
x,
|
|
61
|
+
T
|
|
62
|
+
]), l(() => {
|
|
63
|
+
let e = O;
|
|
64
|
+
!k && N[e(481)]?.[e(484)](document[e(509)]) && M[e(481)] && s(M.current)[0]?.focus({ preventScroll: !0 });
|
|
65
|
+
}, [k]);
|
|
66
|
+
let L = () => A(!1), R = (e) => {
|
|
67
|
+
let t = O, n = e[t(514)];
|
|
68
|
+
M.current?.contains(n) || N[t(481)]?.[t(484)](n) || A(!1);
|
|
69
|
+
}, z = (e) => {
|
|
70
|
+
let t = O;
|
|
71
|
+
e[t(491)] === t(479) && k && !e[t(503)] && (e[t(510)](), L());
|
|
72
|
+
}, B = x === O(497) ? {
|
|
74
73
|
onPointerEnter: (e) => {
|
|
75
|
-
let
|
|
76
|
-
e[
|
|
74
|
+
let n = O;
|
|
75
|
+
e[n(506)] === n(494) && (window[n(485)](P[n(481)]), P[n(481)] = window[n(478)](() => A(!0), k ? 0 : t[n(515)]));
|
|
77
76
|
},
|
|
78
77
|
onPointerLeave: (e) => {
|
|
79
|
-
let
|
|
80
|
-
e
|
|
78
|
+
let n = O;
|
|
79
|
+
e[n(506)] === n(494) && (window.clearTimeout(P[n(481)]), P.current = window[n(478)](() => A(!1), t[n(488)]));
|
|
81
80
|
}
|
|
82
81
|
} : {};
|
|
83
|
-
return
|
|
84
|
-
ref: j,
|
|
85
|
-
className: "ds-popover-anchor",
|
|
86
|
-
onClick: b === "click" ? () => k(!O) : void 0,
|
|
87
|
-
onFocus: b === D(424) ? (e) => e[D(415)].matches(D(391)) && k(!0) : void 0,
|
|
88
|
-
onBlur: b === "hover" ? L : void 0,
|
|
89
|
-
onKeyDown: R,
|
|
90
|
-
"aria-expanded": O,
|
|
91
|
-
...z,
|
|
92
|
-
children: e
|
|
93
|
-
}), A[D(423)] && h(p("div", {
|
|
82
|
+
return p(d, { children: [f("span", {
|
|
94
83
|
ref: M,
|
|
95
|
-
|
|
96
|
-
|
|
84
|
+
className: "ds-popover-anchor",
|
|
85
|
+
onClick: x === O(512) ? () => A(!k) : void 0,
|
|
86
|
+
onFocus: x === O(497) ? (e) => e.target[O(486)](O(499)) && A(!0) : void 0,
|
|
87
|
+
onBlur: x === O(497) ? R : void 0,
|
|
88
|
+
onKeyDown: z,
|
|
89
|
+
"aria-expanded": k,
|
|
90
|
+
...B,
|
|
91
|
+
children: m
|
|
92
|
+
}), j[O(501)] && h(f(O(511), {
|
|
93
|
+
ref: N,
|
|
94
|
+
role: O(508),
|
|
95
|
+
"aria-label": D,
|
|
97
96
|
tabIndex: -1,
|
|
98
|
-
className:
|
|
99
|
-
"data-side":
|
|
100
|
-
"data-state":
|
|
97
|
+
className: i("ds-floating", O(505), O(487) + w, E),
|
|
98
|
+
"data-side": I,
|
|
99
|
+
"data-state": j[O(490)] ? O(498) : O(482),
|
|
101
100
|
style: {
|
|
102
|
-
...
|
|
103
|
-
width:
|
|
104
|
-
maxWidth:
|
|
101
|
+
...F,
|
|
102
|
+
width: C,
|
|
103
|
+
maxWidth: O(495)
|
|
105
104
|
},
|
|
106
|
-
onKeyDown:
|
|
107
|
-
onBlur:
|
|
108
|
-
...
|
|
109
|
-
children: typeof
|
|
110
|
-
}), document
|
|
105
|
+
onKeyDown: z,
|
|
106
|
+
onBlur: x === O(497) ? R : void 0,
|
|
107
|
+
...B,
|
|
108
|
+
children: typeof _ === O(502) ? _(() => L()) : _
|
|
109
|
+
}), document[O(492)])] });
|
|
111
110
|
}
|
|
112
111
|
export { _ as Popover };
|