@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,243 +1,244 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e =
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
let r = f(), i = r[e];
|
|
6
|
-
t.iIaTPT === void 0 && (t.LpjfRB = function(e) {
|
|
7
|
-
let t = "", n = "";
|
|
8
|
-
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);
|
|
9
|
-
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
10
|
-
return decodeURIComponent(n);
|
|
11
|
-
}, t.eWFpWb = {}, t.iIaTPT = !0);
|
|
12
|
-
let a = r[0];
|
|
13
|
-
t.BDBxYh !== a && (t.eWFpWb = {}, t.BDBxYh = a);
|
|
14
|
-
let o = t.eWFpWb[e];
|
|
15
|
-
return o === void 0 ? (i = t.LpjfRB(i), t.eWFpWb[e] = i) : i = o, i;
|
|
16
|
-
}
|
|
17
|
-
(function(e, n) {
|
|
18
|
-
let r = t, i = e();
|
|
2
|
+
const e = l;
|
|
3
|
+
(function(e, t) {
|
|
4
|
+
let n = l, r = e();
|
|
19
5
|
for (;;) try {
|
|
20
|
-
if (parseInt(
|
|
21
|
-
|
|
6
|
+
if (-parseInt(n(466)) / 1 + -parseInt(n(461)) / 2 + parseInt(n(435)) / 3 * (-parseInt(n(387)) / 4) + -parseInt(n(451)) / 5 * (-parseInt(n(402)) / 6) + parseInt(n(456)) / 7 + parseInt(n(464)) / 8 * (parseInt(n(410)) / 9) + parseInt(n(400)) / 10 == t) break;
|
|
7
|
+
r.push(r.shift());
|
|
22
8
|
} catch {
|
|
23
|
-
|
|
9
|
+
r.push(r.shift());
|
|
24
10
|
}
|
|
25
|
-
})(
|
|
26
|
-
import { TIMING as
|
|
27
|
-
import { useControllableState as
|
|
11
|
+
})(r, 606128);
|
|
12
|
+
import { TIMING as t } from "../../hooks/timing.js";
|
|
13
|
+
import { useControllableState as n } from "../../hooks/useControllableState.js";
|
|
14
|
+
function r() {
|
|
15
|
+
let e = /* @__PURE__ */ "rxnJyxbL.7iUC7yQ4io2oVoY5MoQ4Sa.yNv0Dg9UlcbHlcbPBNb1DcWGDgv4DgfYzweSihnLBgvJDcWGw3jVBgu9iMj1DhrVBIjD.lxrPDgXL.Aw5KzxHpzG.CMLNAhq.zMLSDgvY.C2L6zq.A2v5zg93BG.BwLU.y3vYCMvUDa.zhmTzhjHD2vYx19Oyw5KBgu.Cg9PBNrLCKLK.zhmTzhjHD2vYx190AxrSzq.mta1mZu5n3P1Ew1lzq.y2XPzw50wq.Bw92zwq.zhmTzhjHD2vYx19Wyw5LBc0TC25HChm.zhmTzhjHD2vYx19IB2r5igrZlxnJCM9SBa.CMvKDwnL.zNjVBuHHBMrSzq.zgv0ywLS.Bw91BNrLza.zxHW.y2XVC2vZDa.zhmTzhjHD2vY.zhmTzhjHD2vYx19Wyw5LBa.z2HVC3q.BgvUz3rO.y2XPzw50wa.mJC2odKWnxH0qKTvrq.CMvTB3zLuhjVCgvYDhK.B3bLBG.Cg9Z.ywjZ.mJK4nJG2nufgqxnoDW.C3r5Bgu.zgL2.yM90Dg9T.zgLHBg9N.mtmWnZi2mgXxB0TPDG.ywn0AxzLrwXLBwvUDa.C2v0ug9PBNrLCKnHChr1CMu.mZKXotm2ohPKuxfpwq.AgfZug9PBNrLCKnHChr1CMu.ntC1mJiYs2rwseXs.zhmTzhjHD2vYls0.zhmTzhjHD2vYls1PBNnLDa.zhjHz1rOCMvZAg9Sza.B2zMC2v0.C29YDa.ofHSsgXyDq.C2fTCgXLCW.Dg9W.zhmTzhjHD2vYx19OzwfKzxi.y29UDgfPBNm.DgLTzvn0yw1W.lMrZlwrYyxDLCL9FAgfUzgXL.zhmTzhjHD2vYx19Wyw5LBc0TAgLKzs10AxrSzq.zhmTzhjHD2vYx19Wyw5LBc0T.zhmTzhjHD2vYx19JBg9Zzq.ls1FzhjHzW.C3rVCfbYB3bHz2f0Aw9U.zhmTzhjHD2vYx19Wyw5LBc0TAgfUzgXL.ntC3mdyWmejhq3z4sq.lwrLC2m.nNzvBgjrrG.A2v5.Bwf4.y3vYCMvUDfrHCMDLDa.zhmTzhjHD2vYx19MB290zxi.zM9JDxm.7iUC7yQ4ioYKHoYDToQ4Sa.yNv0Dg9U.mtHfEK5Mreq.ywrKrxzLBNrmAxn0zw5LCG.B3bHy2L0Eq.y2XVC2vK.C3rHCNq.y2XVC2LUzW.zhjHz2DPBMC.yMfZzq.Dhj1zq.zgf0yxnLDa.zhmTC3iTB25SEq".split(".");
|
|
16
|
+
return r = function() {
|
|
17
|
+
return e;
|
|
18
|
+
}, r();
|
|
19
|
+
}
|
|
28
20
|
import { Button as i, cx as a } from "../../primitives/index.js";
|
|
29
21
|
import { focusableIn as o } from "../../hooks/useFocusTrap.js";
|
|
30
22
|
import { modalTrigger as s, useModalLayer as c } from "../Dialog/modal.js";
|
|
31
23
|
/* empty css */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
function l(e, t) {
|
|
25
|
+
e -= 382;
|
|
26
|
+
let n = r(), i = n[e];
|
|
27
|
+
l.herDcv === void 0 && (l.GKBwIK = function(e) {
|
|
28
|
+
let t = "", n = "";
|
|
29
|
+
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);
|
|
30
|
+
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
31
|
+
return decodeURIComponent(n);
|
|
32
|
+
}, l.DhpGcs = {}, l.herDcv = !0);
|
|
33
|
+
let a = n[0];
|
|
34
|
+
l.XHuYpo !== a && (l.DhpGcs = {}, l.XHuYpo = a);
|
|
35
|
+
let o = l.DhpGcs[e];
|
|
36
|
+
return o === void 0 ? (i = l.GKBwIK(i), l.DhpGcs[e] = i) : i = o, i;
|
|
38
37
|
}
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
A
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
import { useEffect as u, useId as ee, useRef as d, useState as te } from "react";
|
|
39
|
+
import { X as ne } from "lucide-react";
|
|
40
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
41
|
+
import { createPortal as re } from "react-dom";
|
|
42
|
+
var ie = 260, ae = .4, oe = 180, se = .35, h = (t) => 72 * (1 - Math[e(444)](-t / 140));
|
|
43
|
+
function g({ open: r, defaultOpen: l = !1, onOpenChange: g, trigger: _, title: v, description: y, children: b, footer: x, side: S = e(426), size: ce = "md", dismissible: C = !0, showClose: le = !0, initialFocus: w, hideTitle: T = !1, modal: E = !0, inset: ue = !1, handle: de, snapPoints: fe, snap: D, defaultSnap: pe, onSnapChange: me, className: he }) {
|
|
44
|
+
let O = e, [k, A] = n(r, l, g), j = d(null), M = d(null), N = ee(), { presence: P, close: ge, onKeyDown: _e, outsideProps: ve } = c({
|
|
45
|
+
open: k,
|
|
46
|
+
setOpen: A,
|
|
47
|
+
dismissible: C,
|
|
48
|
+
exitMs: ie,
|
|
49
|
+
panelRef: j,
|
|
50
|
+
initialFocus: w,
|
|
51
|
+
modal: E
|
|
52
|
+
}), ye = s(_, k, () => A(!0)), F = S === "top" || S === O(459), I = F && (de ?? S === "bottom"), L = F && fe?.length ? [...fe][O(386)]((e, t) => e - t) : [1], R = pe ?? L[L[O(449)] - 1], [be, z] = te(R), [xe, Se] = te(k);
|
|
53
|
+
k !== xe && (Se(k), k && z(R));
|
|
54
|
+
let B = D ?? be, V = (e) => {
|
|
55
|
+
D === void 0 && z(e), me?.(e);
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
let e =
|
|
59
|
-
if (
|
|
60
|
-
let n = document
|
|
57
|
+
u(() => {
|
|
58
|
+
let e = O, t = j[e(431)];
|
|
59
|
+
if (E || !k || !t) return;
|
|
60
|
+
let n = document[e(462)], r = requestAnimationFrame(() => (w?.[e(431)] ?? o(t)[0] ?? t)[e(407)]({ preventScroll: !0 }));
|
|
61
61
|
return () => {
|
|
62
62
|
let i = e;
|
|
63
|
-
cancelAnimationFrame(r), t[i(
|
|
63
|
+
cancelAnimationFrame(r), t[i(391)](document[i(462)]) && n?.focus({ preventScroll: !0 });
|
|
64
64
|
};
|
|
65
65
|
}, [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
]),
|
|
70
|
-
let e =
|
|
71
|
-
|
|
72
|
-
}, [
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
let
|
|
76
|
-
let n =
|
|
66
|
+
E,
|
|
67
|
+
k,
|
|
68
|
+
w
|
|
69
|
+
]), u(() => {
|
|
70
|
+
let e = O, t = j[e(431)];
|
|
71
|
+
k && t && (t.style.removeProperty(e(397)), delete t[e(419)][e(416)], M[e(431)] && (M.current[e(457)].opacity = ""));
|
|
72
|
+
}, [k]);
|
|
73
|
+
let H = d(null), U = d(!1), W = d(() => {});
|
|
74
|
+
u(() => () => W[O(431)](), []);
|
|
75
|
+
let G = (e, t) => (1 - e) * t, K = (e, t) => {
|
|
76
|
+
let n = O, r = j[n(431)];
|
|
77
77
|
if (!r) return;
|
|
78
78
|
if (e === null) {
|
|
79
|
-
r[n(
|
|
79
|
+
r[n(457)][n(452)](n(397)), delete r[n(419)][n(416)], M.current && (M[n(431)].style[n(412)] = "");
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
r[n(
|
|
83
|
-
let i =
|
|
84
|
-
|
|
82
|
+
r[n(419)][n(416)] = "", r[n(457)].setProperty("--_drag", e - G(B, t) + "px");
|
|
83
|
+
let i = G(L[L[n(449)] - 1], t);
|
|
84
|
+
M[n(431)] && (M[n(431)][n(457)][n(412)] = String(Math[n(430)](1, Math[n(404)](0, 1 - (e - i) / (t - i)))));
|
|
85
|
+
}, q = () => {
|
|
86
|
+
let e = O, t = H[e(431)];
|
|
87
|
+
H.current = null, W.current(), t?.el[e(465)]?.(t[e(433)]) && t.el.releasePointerCapture(t.pointerId);
|
|
85
88
|
}, J = () => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, Y = () => {
|
|
89
|
-
J(), q(null, 0);
|
|
90
|
-
}, X = (e) => I ? e[k(194)] : e.clientX, Se = C === k(139) || C === k(188) ? 1 : -1, Z = L ? {
|
|
89
|
+
q(), K(null, 0);
|
|
90
|
+
}, Y = (e) => F ? e[O(436)] : e[O(450)], X = S === "bottom" || S === O(426) ? 1 : -1, Z = I ? {
|
|
91
91
|
onPointerDown: (e) => {
|
|
92
|
-
let t =
|
|
93
|
-
if (!
|
|
94
|
-
let n = e
|
|
95
|
-
if (!n
|
|
96
|
-
let r =
|
|
92
|
+
let t = O;
|
|
93
|
+
if (!I || e.button !== 0 || P.closing) return;
|
|
94
|
+
let n = e.target;
|
|
95
|
+
if (!n.closest(t(393)) && n[t(445)](t(423))) return;
|
|
96
|
+
let r = j[t(431)];
|
|
97
97
|
if (!r) return;
|
|
98
|
-
let i =
|
|
99
|
-
|
|
100
|
-
pointerId: e[t(
|
|
98
|
+
let i = F ? r.offsetHeight : r.offsetWidth, a = Y(e);
|
|
99
|
+
H.current = {
|
|
100
|
+
pointerId: e[t(433)],
|
|
101
101
|
el: e.currentTarget,
|
|
102
|
-
fromHandle: !!n
|
|
102
|
+
fromHandle: !!n.closest(".ds-drawer__handle"),
|
|
103
103
|
start: a,
|
|
104
|
-
base:
|
|
104
|
+
base: G(B, i),
|
|
105
105
|
size: i,
|
|
106
|
-
offset:
|
|
106
|
+
offset: G(B, i),
|
|
107
107
|
moved: !1,
|
|
108
108
|
samples: [{
|
|
109
109
|
pos: a,
|
|
110
|
-
t: e[t(
|
|
110
|
+
t: e[t(392)]
|
|
111
111
|
}]
|
|
112
|
-
},
|
|
112
|
+
}, U[t(431)] = !1, e[t(405)][t(463)]?.(e.pointerId);
|
|
113
113
|
let o = (e) => {
|
|
114
114
|
let n = t;
|
|
115
|
-
e[n(
|
|
115
|
+
e[n(403)] === n(421) && (e.preventDefault(), e[n(398)](), U[n(431)] = !!H[n(431)]?.fromHandle, J());
|
|
116
116
|
};
|
|
117
|
-
window[t(
|
|
118
|
-
|
|
117
|
+
window[t(411)](t(429), o, !0), W[t(431)] = () => {
|
|
118
|
+
let e = t;
|
|
119
|
+
window.removeEventListener(e(429), o, !0), W[e(431)] = () => {};
|
|
119
120
|
};
|
|
120
121
|
},
|
|
121
122
|
onPointerMove: (e) => {
|
|
122
|
-
let
|
|
123
|
-
if (!r || e[
|
|
124
|
-
let i =
|
|
125
|
-
if (!r[
|
|
126
|
-
r[
|
|
123
|
+
let n = O, r = H[n(431)];
|
|
124
|
+
if (!r || e[n(433)] !== r[n(433)]) return;
|
|
125
|
+
let i = Y(e), a = (i - r[n(414)]) * X;
|
|
126
|
+
if (!r[n(437)] && Math[n(455)](a) < t[n(384)]) return;
|
|
127
|
+
r[n(437)] = !0, r[n(388)] = [...r[n(388)][n(427)]((t) => e.timeStamp - t.t < 100), {
|
|
127
128
|
pos: i,
|
|
128
|
-
t: e[
|
|
129
|
+
t: e[n(392)]
|
|
129
130
|
}];
|
|
130
|
-
let o =
|
|
131
|
-
c < o ? c = o -
|
|
131
|
+
let o = G(L[L.length - 1], r[n(428)]), s = G(L[0], r[n(428)]), c = r[n(417)] + a;
|
|
132
|
+
c < o ? c = o - h(o - c) : !C && c > s && (c = s + h(c - s)), r.offset = c, K(c, r[n(428)]);
|
|
132
133
|
},
|
|
133
134
|
onPointerUp: (e) => {
|
|
134
|
-
let t =
|
|
135
|
-
if (!n || e
|
|
136
|
-
if (
|
|
137
|
-
|
|
135
|
+
let t = O, n = H[t(431)];
|
|
136
|
+
if (!n || e[t(433)] !== n[t(433)]) return;
|
|
137
|
+
if (q(), !n[t(437)]) {
|
|
138
|
+
K(null, 0);
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
140
|
-
|
|
141
|
-
let r = n[t(
|
|
142
|
-
if (
|
|
143
|
-
|
|
141
|
+
U[t(431)] = n[t(441)];
|
|
142
|
+
let r = n[t(388)][0], i = n[t(388)][n[t(388)][t(449)] - 1], a = i.t > r.t ? (i[t(454)] - r[t(454)]) * X / (i.t - r.t) : 0, o = n.offset + a * oe, s = G(L[0], n[t(428)]);
|
|
143
|
+
if (C && (o > s + (n[t(428)] - s) * se || a > ae && n[t(385)] > s)) {
|
|
144
|
+
A(!1);
|
|
144
145
|
return;
|
|
145
146
|
}
|
|
146
|
-
let c =
|
|
147
|
-
|
|
147
|
+
let c = L[t(440)]((e, r) => Math[t(455)](G(r, n[t(428)]) - o) < Math[t(455)](G(e, n[t(428)]) - o) ? r : e);
|
|
148
|
+
K(null, 0), c !== B && V(c);
|
|
148
149
|
},
|
|
149
150
|
onPointerCancel: (e) => {
|
|
150
|
-
let t =
|
|
151
|
-
|
|
151
|
+
let t = O;
|
|
152
|
+
H[t(431)]?.pointerId === e[t(433)] && J();
|
|
152
153
|
}
|
|
153
|
-
} : {}, Ce =
|
|
154
|
-
type:
|
|
155
|
-
className:
|
|
156
|
-
"aria-label":
|
|
154
|
+
} : {}, Ce = I && (L.length > 1 ? p(O(409), {
|
|
155
|
+
type: O(409),
|
|
156
|
+
className: O(432),
|
|
157
|
+
"aria-label": B === L[L[O(449)] - 1] ? O(408) : O(422),
|
|
157
158
|
onClick: (e) => {
|
|
158
|
-
let t =
|
|
159
|
-
if (
|
|
160
|
-
|
|
159
|
+
let t = O;
|
|
160
|
+
if (U[t(431)] && e[t(442)] !== 0) {
|
|
161
|
+
U[t(431)] = !1;
|
|
161
162
|
return;
|
|
162
163
|
}
|
|
163
|
-
let n =
|
|
164
|
-
|
|
164
|
+
let n = L[t(425)](B);
|
|
165
|
+
V(L[(n + 1) % L[t(449)]]);
|
|
165
166
|
},
|
|
166
167
|
...Z
|
|
167
|
-
}) :
|
|
168
|
-
className:
|
|
168
|
+
}) : p(O(458), {
|
|
169
|
+
className: O(432),
|
|
169
170
|
"aria-hidden": !0,
|
|
170
171
|
...Z
|
|
171
|
-
})), Q =
|
|
172
|
-
return
|
|
173
|
-
className: a(
|
|
174
|
-
"data-state":
|
|
175
|
-
onKeyDown:
|
|
176
|
-
children: [
|
|
177
|
-
ref: N,
|
|
178
|
-
className: k(195),
|
|
179
|
-
"aria-hidden": !0,
|
|
180
|
-
..._e
|
|
181
|
-
}), h(k(214), {
|
|
172
|
+
})), Q = N + O(424), $ = N + O(401);
|
|
173
|
+
return m(f, { children: [ye, P[O(443)] && re(m("div", {
|
|
174
|
+
className: a(O(446), O(382) + S, !E && "ds-drawer--modeless", ue && O(383)),
|
|
175
|
+
"data-state": P[O(415)] ? O(413) : O(453),
|
|
176
|
+
onKeyDown: _e,
|
|
177
|
+
children: [E && p(O(458), {
|
|
182
178
|
ref: M,
|
|
183
|
-
|
|
184
|
-
"aria-
|
|
179
|
+
className: "ds-drawer__overlay",
|
|
180
|
+
"aria-hidden": !0,
|
|
181
|
+
...ve
|
|
182
|
+
}), m(O(458), {
|
|
183
|
+
ref: j,
|
|
184
|
+
role: O(460),
|
|
185
|
+
"aria-modal": E ? O(418) : void 0,
|
|
185
186
|
"aria-labelledby": Q,
|
|
186
|
-
"aria-describedby":
|
|
187
|
+
"aria-describedby": y ? $ : void 0,
|
|
187
188
|
tabIndex: -1,
|
|
188
|
-
"data-side":
|
|
189
|
-
className: a(
|
|
190
|
-
style: { "--_snap": (1 -
|
|
189
|
+
"data-side": S,
|
|
190
|
+
className: a(O(447), O(395) + ce, I && O(399), L[O(449)] > 1 && O(438), T && O(394), he),
|
|
191
|
+
style: { "--_snap": (1 - B) * 100 + "%" },
|
|
191
192
|
children: [
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
S === O(459) && Ce,
|
|
194
|
+
T ? m(f, { children: [p("h2", {
|
|
194
195
|
id: Q,
|
|
195
|
-
className:
|
|
196
|
-
children:
|
|
197
|
-
}),
|
|
196
|
+
className: O(420),
|
|
197
|
+
children: v
|
|
198
|
+
}), y && p("p", {
|
|
198
199
|
id: $,
|
|
199
|
-
className:
|
|
200
|
-
children:
|
|
201
|
-
})] }) :
|
|
202
|
-
className:
|
|
203
|
-
...
|
|
204
|
-
children: [
|
|
200
|
+
className: O(420),
|
|
201
|
+
children: y
|
|
202
|
+
})] }) : m(O(458), {
|
|
203
|
+
className: O(390),
|
|
204
|
+
...S === O(459) ? Z : {},
|
|
205
|
+
children: [p("h2", {
|
|
205
206
|
id: Q,
|
|
206
|
-
className:
|
|
207
|
-
children:
|
|
208
|
-
}),
|
|
207
|
+
className: O(434),
|
|
208
|
+
children: v
|
|
209
|
+
}), y && p("p", {
|
|
209
210
|
id: $,
|
|
210
211
|
className: "ds-drawer__desc",
|
|
211
|
-
children:
|
|
212
|
+
children: y
|
|
212
213
|
})]
|
|
213
214
|
}),
|
|
214
|
-
|
|
215
|
-
className:
|
|
216
|
-
children:
|
|
215
|
+
b != null && p("div", {
|
|
216
|
+
className: O(439),
|
|
217
|
+
children: b
|
|
217
218
|
}),
|
|
218
|
-
|
|
219
|
-
className:
|
|
220
|
-
children:
|
|
219
|
+
x && p(O(458), {
|
|
220
|
+
className: O(406),
|
|
221
|
+
children: x
|
|
221
222
|
}),
|
|
222
|
-
|
|
223
|
-
|
|
223
|
+
S === O(389) && Ce,
|
|
224
|
+
le && C && p(i, {
|
|
224
225
|
iconOnly: !0,
|
|
225
|
-
variant:
|
|
226
|
+
variant: O(448),
|
|
226
227
|
size: "sm",
|
|
227
|
-
icon:
|
|
228
|
+
icon: p(ne, {}),
|
|
228
229
|
"aria-label": "닫기",
|
|
229
|
-
className:
|
|
230
|
-
onClick:
|
|
230
|
+
className: O(396),
|
|
231
|
+
onClick: ge
|
|
231
232
|
})
|
|
232
233
|
]
|
|
233
234
|
})]
|
|
234
235
|
}), document.body)] });
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
+
function _(t) {
|
|
237
238
|
let n = e;
|
|
238
|
-
return
|
|
239
|
+
return p(g, {
|
|
239
240
|
...t,
|
|
240
|
-
side: n(
|
|
241
|
+
side: n(459)
|
|
241
242
|
});
|
|
242
243
|
}
|
|
243
|
-
export {
|
|
244
|
+
export { g as Drawer, _ as Sheet };
|