@iamfiro/design 0.3.0 → 0.3.2
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/avatar/AGENTS.md +29 -1
- package/agents/tooltip/AGENTS.md +1 -1
- package/lib/components/Accordion/Accordion2.js +76 -76
- package/lib/components/ActionBar/ActionBar2.js +43 -43
- package/lib/components/Alert/Alert2.js +46 -46
- package/lib/components/AppShell/AppShell2.js +58 -58
- package/lib/components/AreaChart/AreaChart.js +39 -40
- package/lib/components/BarChart/BarChart2.js +169 -169
- package/lib/components/BarList/BarList2.js +99 -99
- package/lib/components/Breadcrumb/Breadcrumb2.js +65 -66
- package/lib/components/Calendar/Calendar2.js +172 -171
- package/lib/components/Calendar/DatePicker2.js +101 -102
- package/lib/components/Calendar/date.js +71 -71
- package/lib/components/Card/Card2.js +55 -56
- package/lib/components/CardFrame/CardFrame2.js +52 -52
- package/lib/components/Chart/ChartParts.js +90 -90
- package/lib/components/Chart/chart2.js +52 -52
- package/lib/components/Chart/useChartInteraction.js +44 -44
- package/lib/components/ChatBubble/ChatBubble2.js +112 -112
- package/lib/components/ChatBubble/formatChatTime.js +44 -42
- package/lib/components/ChatComposer/ChatComposer2.js +94 -94
- package/lib/components/CodeBlock/CodeBlock2.js +66 -66
- package/lib/components/CodeBlock/highlight.js +67 -70
- package/lib/components/ColorPicker/ColorPicker2.js +404 -405
- package/lib/components/ColorPicker/color.js +81 -81
- package/lib/components/ColorPicker/presets.js +44 -43
- package/lib/components/Combobox/Combobox2.js +128 -128
- package/lib/components/CommandMenu/CommandMenu.js +137 -137
- package/lib/components/Comment/Comment2.js +55 -80
- package/lib/components/ContextMenu/ContextMenu2.js +93 -94
- package/lib/components/DataGrid/DataGrid2.js +1181 -1180
- package/lib/components/DataGrid/GridPopover.js +112 -112
- package/lib/components/DataGrid/anchor.js +23 -25
- package/lib/components/DataGrid/model.js +274 -275
- package/lib/components/DataGrid/panels.js +423 -423
- package/lib/components/DataGrid/typeMeta.js +21 -22
- package/lib/components/DataGrid/types.js +38 -37
- package/lib/components/DescriptionList/DescriptionList2.js +107 -107
- package/lib/components/Dialog/AlertDialog.js +53 -53
- package/lib/components/Dialog/Dialog2.js +71 -70
- package/lib/components/Dialog/modal.js +59 -58
- package/lib/components/Drawer/Drawer2.js +123 -124
- package/lib/components/DropdownMenu/DropdownMenu2.js +198 -200
- package/lib/components/DropdownMenu/menuCore.js +46 -47
- package/lib/components/Dropzone/Dropzone2.js +77 -77
- package/lib/components/EmptyState/EmptyState2.js +57 -56
- package/lib/components/FileChip/FileChip2.js +71 -71
- package/lib/components/FileUpload/FileUpload.js +119 -119
- package/lib/components/FilterChips/FilterChips2.js +61 -61
- package/lib/components/FunnelChart/FunnelChart2.js +141 -141
- package/lib/components/FunnelChart/funnel.js +51 -51
- package/lib/components/Highlight/Highlight2.js +54 -54
- package/lib/components/HoverCard/HoverCard.js +108 -83
- package/lib/components/InlineDiff/InlineDiff2.js +126 -126
- package/lib/components/InlineDiff/diff.js +82 -82
- package/lib/components/InlineDiff/useDiffReview.js +62 -60
- package/lib/components/Kanban/Kanban2.js +382 -382
- package/lib/components/Kanban/KanbanCard.js +92 -92
- package/lib/components/Kanban/move.js +45 -49
- package/lib/components/LineChart/LineChart2.js +207 -207
- package/lib/components/List/List2.js +71 -71
- package/lib/components/Listbox/Listbox2.js +115 -115
- package/lib/components/Marker/Marker2.js +67 -60
- package/lib/components/Menubar/Menubar2.js +130 -133
- package/lib/components/MultiSelect/MultiSelect2.js +104 -104
- package/lib/components/NavigationMenu/NavigationMenu2.js +261 -262
- package/lib/components/NoticeStack/NoticeStack2.js +105 -105
- package/lib/components/NumberStepper/NumberStepper2.js +67 -67
- package/lib/components/OtpInput/OtpInput2.js +66 -67
- package/lib/components/Pagination/Pagination2.js +90 -90
- package/lib/components/Pagination/paginationRange.js +24 -24
- package/lib/components/PhoneInput/PhoneInput.js +74 -74
- package/lib/components/PieChart/PieChart2.js +119 -119
- package/lib/components/PieChart/arc.js +63 -42
- package/lib/components/PieChart/useArcTween.js +56 -54
- package/lib/components/Popover/Popover2.js +61 -61
- package/lib/components/ProgressTracker/ProgressTracker2.js +127 -127
- package/lib/components/Rating/Rating2.js +81 -81
- package/lib/components/Resizable/Resizable2.js +112 -110
- package/lib/components/Resizable/layout.js +50 -50
- package/lib/components/ScaledPreview/ScaledPreview2.js +49 -50
- package/lib/components/ScatterChart/ScatterChart2.js +226 -227
- package/lib/components/ScatterChart/scatter.js +59 -57
- package/lib/components/ScrollArea/ScrollArea2.js +112 -112
- package/lib/components/Select/Select2.js +79 -79
- package/lib/components/Sidebar/Sidebar2.js +79 -79
- package/lib/components/Skeleton/Skeleton2.js +68 -68
- package/lib/components/Slider/Slider2.js +78 -77
- package/lib/components/SocialLoginButton/SocialLoginButton.js +65 -66
- package/lib/components/SparkChart/SparkChart2.js +146 -145
- package/lib/components/SparkChart/spark.js +41 -67
- package/lib/components/Sparkbar/Sparkbar2.js +61 -60
- package/lib/components/SplitView/SplitView2.js +53 -53
- package/lib/components/Stat/Stat2.js +94 -94
- package/lib/components/StepList/StepList2.js +70 -70
- package/lib/components/Table/Table2.js +63 -63
- package/lib/components/Tabs/Tabs2.js +70 -70
- package/lib/components/TagInput/TagInput2.js +236 -239
- package/lib/components/TimePicker/TimePicker2.js +231 -232
- package/lib/components/TimePicker/time.js +63 -65
- package/lib/components/Timeline/Timeline2.js +167 -167
- package/lib/components/Timeline/scale.js +55 -55
- package/lib/components/Toast/Toaster.js +151 -152
- package/lib/components/Toast/store.js +90 -87
- package/lib/components/ToggleGroup/ToggleGroup2.js +91 -91
- package/lib/components/Toolbar/Toolbar2.js +145 -145
- package/lib/components/Tracker/Tracker2.js +76 -76
- package/lib/components/TreeDiagram/TreeDiagram2.js +112 -111
- package/lib/components/TreeView/TreeView2.js +124 -124
- package/lib/hooks/timing.js +30 -29
- package/lib/hooks/useControllableState.js +37 -36
- package/lib/hooks/useCountdown.js +56 -59
- package/lib/hooks/useDigitInput.js +52 -78
- package/lib/hooks/useDismiss.js +58 -57
- package/lib/hooks/useElapsed.js +54 -54
- package/lib/hooks/useFloating.js +26 -26
- package/lib/hooks/useFocusTrap.js +42 -42
- package/lib/hooks/usePresence.js +49 -48
- package/lib/hooks/usePressToOpen.js +42 -41
- package/lib/hooks/useScrollLock.js +45 -44
- package/lib/hooks/useSelection.js +45 -39
- package/lib/index.js +71 -71
- package/lib/primitives/AspectRatio2.js +60 -60
- package/lib/primitives/BrandIcon.js +161 -161
- package/lib/primitives/ColorDot2.js +42 -45
- package/lib/primitives/CopyButton2.js +57 -56
- package/lib/primitives/CountBadge2.js +55 -51
- package/lib/primitives/Countdown2.js +41 -46
- package/lib/primitives/Delta2.js +36 -36
- package/lib/primitives/Elapsed.js +49 -49
- package/lib/primitives/FileIcon2.js +96 -96
- package/lib/primitives/Flag2.js +135 -135
- package/lib/primitives/IconStack2.js +38 -60
- package/lib/primitives/IconTile2.js +28 -29
- package/lib/primitives/Kbd2.js +50 -50
- package/lib/primitives/Layout2.js +71 -71
- package/lib/primitives/Link2.js +32 -31
- package/lib/primitives/MaskedText2.js +49 -74
- package/lib/primitives/Progress2.js +65 -66
- package/lib/primitives/RelativeTime.js +58 -57
- package/lib/primitives/SearchInput2.js +65 -65
- package/lib/primitives/SelectorButton2.js +74 -73
- package/lib/primitives/Spinner2.js +50 -50
- package/lib/primitives/StatusIcon2.js +68 -68
- package/lib/primitives/Swatch2.js +59 -55
- package/lib/primitives/Tooltip2.js +81 -81
- package/lib/primitives/Typography2.js +53 -53
- package/lib/primitives/formatCountdown.js +21 -22
- package/lib/primitives/formatElapsed.js +43 -42
- package/lib/primitives/formatRelativeTime.js +50 -50
- package/lib/primitives/hotkey.js +82 -82
- package/lib/primitives/index.js +193 -174
- package/lib/primitives/maskValue.js +28 -28
- package/lib/style.css +1 -1
- package/lib/types/primitives/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,83 +1,83 @@
|
|
|
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(158)) / 1 * (-parseInt(n(154)) / 2) + -parseInt(n(152)) / 3 + parseInt(n(163)) / 4 + parseInt(n(161)) / 5 * (parseInt(n(149)) / 6) + -parseInt(n(159)) / 7 + parseInt(n(147)) / 8 + -parseInt(n(153)) / 9 * (-parseInt(n(165)) / 10) == t) break;
|
|
6
6
|
r.push(r.shift());
|
|
7
7
|
} catch {
|
|
8
8
|
r.push(r.shift());
|
|
9
9
|
}
|
|
10
|
-
})(
|
|
10
|
+
})(a, 822330);
|
|
11
11
|
import { createContext as e, useContext as t } from "react";
|
|
12
12
|
var n = e(null);
|
|
13
13
|
function r() {
|
|
14
|
-
let e =
|
|
15
|
-
if (!r) throw Error(e(
|
|
14
|
+
let e = o, r = t(n);
|
|
15
|
+
if (!r) throw Error(e(162));
|
|
16
16
|
return r;
|
|
17
17
|
}
|
|
18
|
-
function i(e
|
|
19
|
-
e
|
|
20
|
-
|
|
21
|
-
i.OnHPhZ === void 0 && (i.ODxPnu = function(e) {
|
|
22
|
-
let t = "", n = "";
|
|
23
|
-
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);
|
|
24
|
-
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
25
|
-
return decodeURIComponent(n);
|
|
26
|
-
}, i.IGkDrz = {}, i.OnHPhZ = !0);
|
|
27
|
-
let a = n[0];
|
|
28
|
-
i.iLFQeq !== a && (i.IGkDrz = {}, i.iLFQeq = a);
|
|
29
|
-
let s = i.IGkDrz[e];
|
|
30
|
-
return s === void 0 ? (r = i.ODxPnu(r), i.IGkDrz[e] = r) : r = s, r;
|
|
31
|
-
}
|
|
32
|
-
function a(e) {
|
|
33
|
-
let t = i, n = e < 0 ? "−" : "", r = Math.round(Math.abs(e)), a = Math[t(225)](r / 3600), o = Math[t(225)](r % 3600 / 60), s = String(r % 60)[t(214)](2, "0");
|
|
34
|
-
return a > 0 ? "" + n + a + ":" + String(o)[t(214)](2, "0") + ":" + s : "" + n + o + ":" + s;
|
|
18
|
+
function i(e) {
|
|
19
|
+
let t = o, n = e < 0 ? "−" : "", r = Math[t(150)](Math[t(160)](e)), i = Math.floor(r / 3600), a = Math.floor(r % 3600 / 60), s = String(r % 60)[t(148)](2, "0");
|
|
20
|
+
return i > 0 ? "" + n + i + ":" + String(a).padStart(2, "0") + ":" + s : "" + n + a + ":" + s;
|
|
35
21
|
}
|
|
36
|
-
function
|
|
22
|
+
function a() {
|
|
37
23
|
let e = [
|
|
38
|
-
"
|
|
39
|
-
"ChvZAa",
|
|
40
|
-
"ywjZ",
|
|
41
|
-
"odq1ntyZmgzrwuvJBq",
|
|
42
|
-
"ody5mtbvD25cvfi",
|
|
43
|
-
"mJm5mdiZmNPguffAAG",
|
|
44
|
-
"nda0otvOufzmrwq",
|
|
45
|
-
"zMXVB3i",
|
|
46
|
-
"oteYuefsve1l",
|
|
47
|
-
"mJK0ExHiEejU",
|
|
48
|
-
"mJq0mLfju1ziDq",
|
|
49
|
-
"mZCZn25XDvzeBG",
|
|
50
|
-
"nZu2nZjwEgn1Bee",
|
|
51
|
-
"ndy5s1HsAen0",
|
|
52
|
-
"Bwf4",
|
|
24
|
+
"mZC0mti0ogfhAeLqwG",
|
|
53
25
|
"CgfKu3rHCNq",
|
|
54
|
-
"
|
|
26
|
+
"nLHhB01ywG",
|
|
27
|
+
"CM91BMq",
|
|
55
28
|
"Dg9gAxHLza",
|
|
56
|
-
"
|
|
29
|
+
"mZm2mZC5mNrOzgLlDW",
|
|
30
|
+
"ntCZmJK4mKTfEwrrva",
|
|
31
|
+
"mtGWnZCWA1DUr2DA",
|
|
32
|
+
"Bg9Nmta",
|
|
33
|
+
"y2vPBa",
|
|
34
|
+
"Bwf4",
|
|
35
|
+
"ow9vCgvJrG",
|
|
36
|
+
"mte2ntm2mgTXBe5HEa",
|
|
37
|
+
"ywjZ",
|
|
38
|
+
"mtqWmdiWwxrisMHm",
|
|
39
|
+
"vgLTzwXPBMvsB3CGlYbuAw1LBgLUzujHCIbTDxn0igjLihvZzwqGAw5ZAwrLidXuAw1LBgLUzt4U",
|
|
40
|
+
"nJu1oda0sKDhv2Hp",
|
|
41
|
+
"ChvZAa",
|
|
42
|
+
"mtbKEeflB2i",
|
|
43
|
+
"zMXVB3i"
|
|
57
44
|
];
|
|
58
|
-
return
|
|
45
|
+
return a = function() {
|
|
59
46
|
return e;
|
|
60
|
-
},
|
|
47
|
+
}, a();
|
|
48
|
+
}
|
|
49
|
+
function o(e, t) {
|
|
50
|
+
e -= 146;
|
|
51
|
+
let n = a(), r = n[e];
|
|
52
|
+
o.HFyWqG === void 0 && (o.EOzXTX = function(e) {
|
|
53
|
+
let t = "", n = "";
|
|
54
|
+
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);
|
|
55
|
+
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
56
|
+
return decodeURIComponent(n);
|
|
57
|
+
}, o.WexXBW = {}, o.HFyWqG = !0);
|
|
58
|
+
let i = n[0];
|
|
59
|
+
o.TMbYIN !== i && (o.WexXBW = {}, o.TMbYIN = i);
|
|
60
|
+
let s = o.WexXBW[e];
|
|
61
|
+
return s === void 0 ? (r = o.EOzXTX(r), o.WexXBW[e] = r) : r = s, r;
|
|
61
62
|
}
|
|
62
63
|
function s(e, t) {
|
|
63
|
-
let n =
|
|
64
|
+
let n = o;
|
|
64
65
|
if (e <= 0) return 1;
|
|
65
|
-
let r = e / Math[n(
|
|
66
|
-
return (
|
|
66
|
+
let r = e / Math[n(157)](1, t), i = 10 ** Math[n(146)](Math[n(155)](r)), a = r / i;
|
|
67
|
+
return (a <= 1 ? 1 : a <= 2 ? 2 : a <= 5 ? 5 : 10) * i;
|
|
67
68
|
}
|
|
68
69
|
function c(e, t, n) {
|
|
69
|
-
let r =
|
|
70
|
-
if (n <= 0) return
|
|
71
|
-
let
|
|
70
|
+
let r = o, i = [];
|
|
71
|
+
if (n <= 0) return i;
|
|
72
|
+
let a = Math[r(156)](e / n) * n;
|
|
72
73
|
for (let e = 0; e < 200; e++) {
|
|
73
|
-
let
|
|
74
|
-
if (
|
|
75
|
-
|
|
74
|
+
let o = Number((a + e * n)[r(151)](10));
|
|
75
|
+
if (o > t + n * 1e-9) break;
|
|
76
|
+
i[r(164)](o);
|
|
76
77
|
}
|
|
77
|
-
return
|
|
78
|
+
return i;
|
|
78
79
|
}
|
|
79
80
|
function l(e = "", t = "0") {
|
|
80
|
-
|
|
81
|
-
return (r) => r === 0 ? t : (r < 0 ? "−" : "+") + Math[n(220)](r) + e;
|
|
81
|
+
return (n) => n === 0 ? t : (n < 0 ? "−" : "+") + Math.abs(n) + e;
|
|
82
82
|
}
|
|
83
|
-
export { n as TimelineScaleContext, c as buildTicks,
|
|
83
|
+
export { n as TimelineScaleContext, c as buildTicks, i as formatClock, l as formatOffset, s as niceStep, r as useTimelineScale };
|
|
@@ -1,212 +1,211 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
function e() {
|
|
3
|
+
let t = /* @__PURE__ */ "mteXotq4nLniCgXcBW.mvbzD0v5uq.BgfIzwW.DMvYC2LVBG.C2v0vgLTzw91Da.Dg9mB3DLCKnHC2u.zMLUza.C3rHCNrZv2L0Aa.ywrKrxzLBNrmAxn0zw5LCG.B2zMC2v0sgvPz2H0.ywX0s2v5.mtKZmJuXmu96ywPAra.yM90Dg9TlxjPz2H0.BM93.C2vJDgLVBG.A2v5zg93BG.ywn0Aw9Ulq.BwLU.y3vYCMvUDa.Dw5KB2fIBgu.zhmTDg9HC3rLCL9FBgLZDa.C3rHDhvZ.zhmTDg9HC3rFx2nVBNrLBNq.zhmTDg9HC3rFx2nSB3nL.DhLWzq.7jwm66A8ioUlQ+Q4Sa.Bg9HzgLUzW.ywn0Aw9U.zgL2.Cg9SAxrL.nJC1ndj4D1vyv2C.zMLSDgvY.zgvZy3jPChrPB24.A2v5.BgvUz3rO.zhmTDg9HC3rFx3jPC2uTAw5Uzxi.zhmTDg9HC3q.zgLZBwLZCW.AxngAw5PDgu.DgL0Bgu.ntjsz3LVuLi.DMLZAwjPBgL0EwnOyw5Nzq.DMLZAwjPBgL0Evn0yxrL.yM9KEq.CMvSyxrLzfrHCMDLDa.ChjLDMvUDerLzMf1Bhq.AwnVBG.Bwf4.mZi2mJa2nezssLbMCW.mJqXotG1z1Drvfzb.zhmTDg9HC3rFx2LUBMvY.zhvYyxrPB24.zxHPDgLUzW.mJiZnJm0vNzsAvPM.yxnZzxj0AxzL.C2HPzNrlzxK.y2XLyxjuAw1LB3v0.mtGZotC1m29zz2XXCq.y3vYCMvUDfrHCMDLDa.Dg9W.DgfYz2v0.yNv0Dg9U.y29UDgfPBNm.B2jZzxj2zq.zxjYB3i.B25dBgLJAW.y2XVC2fIBgu.zhmTDg9HC3rLCG.zhmTDg9HC3rFx2fJDgLVBG.CMvTB3zLrxzLBNrmAxn0zw5LCG".split(".");
|
|
4
|
+
return e = function() {
|
|
5
|
+
return t;
|
|
6
|
+
}, e();
|
|
7
|
+
}
|
|
8
|
+
const t = x;
|
|
2
9
|
(function(e, t) {
|
|
3
|
-
let n =
|
|
10
|
+
let n = x, r = e();
|
|
4
11
|
for (;;) try {
|
|
5
|
-
if (
|
|
12
|
+
if (parseInt(n(352)) / 1 * (-parseInt(n(404)) / 2) + parseInt(n(381)) / 3 * (-parseInt(n(391)) / 4) + -parseInt(n(400)) / 5 + -parseInt(n(421)) / 6 + parseInt(n(362)) / 7 + parseInt(n(399)) / 8 + parseInt(n(408)) / 9 == t) break;
|
|
6
13
|
r.push(r.shift());
|
|
7
14
|
} catch {
|
|
8
15
|
r.push(r.shift());
|
|
9
16
|
}
|
|
10
|
-
})(
|
|
11
|
-
import { Spinner as
|
|
12
|
-
import { cx as
|
|
13
|
-
import { getToasts as
|
|
17
|
+
})(e, 248771);
|
|
18
|
+
import { Spinner as n } from "../../primitives/Spinner2.js";
|
|
19
|
+
import { cx as r } from "../../primitives/index.js";
|
|
20
|
+
import { getToasts as i, subscribe as a, toast as o } from "./store.js";
|
|
14
21
|
/* empty css */
|
|
15
|
-
import { useCallback as
|
|
16
|
-
import { AlertTriangle as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
24
|
-
import { createPortal as y } from "react-dom";
|
|
25
|
-
var b = {
|
|
26
|
-
success: _(f, {}),
|
|
27
|
-
error: _(h, {}),
|
|
28
|
-
warning: _(d, {}),
|
|
29
|
-
info: _(p, {}),
|
|
30
|
-
loading: _(e, { size: 16 })
|
|
31
|
-
}, x = 14, S = (e) => {
|
|
32
|
-
let t = C;
|
|
33
|
-
return document[t(310)](t(381), e), () => document[t(343)]("visibilitychange", e);
|
|
34
|
-
};
|
|
35
|
-
function C(e, t) {
|
|
36
|
-
e -= 310;
|
|
37
|
-
let n = g(), r = n[e];
|
|
38
|
-
C.cnmEql === void 0 && (C.gfQmAq = function(e) {
|
|
22
|
+
import { useCallback as s, useEffect as c, useLayoutEffect as l, useRef as u, useState as d, useSyncExternalStore as f } from "react";
|
|
23
|
+
import { AlertTriangle as p, CheckCircle2 as m, Info as h, X as g, XCircle as _ } from "lucide-react";
|
|
24
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
25
|
+
import { createPortal as b } from "react-dom";
|
|
26
|
+
function x(t, n) {
|
|
27
|
+
t -= 352;
|
|
28
|
+
let r = e(), i = r[t];
|
|
29
|
+
x.PVtjWF === void 0 && (x.CHClPC = function(e) {
|
|
39
30
|
let t = "", n = "";
|
|
40
31
|
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);
|
|
41
32
|
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
42
33
|
return decodeURIComponent(n);
|
|
43
|
-
},
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
return
|
|
34
|
+
}, x.UrFJQI = {}, x.PVtjWF = !0);
|
|
35
|
+
let a = r[0];
|
|
36
|
+
x.ljkxGH !== a && (x.UrFJQI = {}, x.ljkxGH = a);
|
|
37
|
+
let o = x.UrFJQI[t];
|
|
38
|
+
return o === void 0 ? (i = x.CHClPC(i), x.UrFJQI[t] = i) : i = o, i;
|
|
48
39
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
var S = {
|
|
41
|
+
success: v(m, {}),
|
|
42
|
+
error: v(_, {}),
|
|
43
|
+
warning: v(p, {}),
|
|
44
|
+
info: v(h, {}),
|
|
45
|
+
loading: v(n, { size: 16 })
|
|
46
|
+
}, C = 14, w = (e) => {
|
|
47
|
+
let t = x;
|
|
48
|
+
return document[t(359)]("visibilitychange", e), () => document[t(420)](t(392), e);
|
|
49
|
+
};
|
|
50
|
+
function T({ position: e = t(363), visibleToasts: n = 3, duration: l = 4e3, gap: u = 10, expand: p, className: m }) {
|
|
51
|
+
let h = t, g = f(a, i, i), [_, y] = d(!1), [S, T] = d({}), E = p || _ && g[h(385)] > 0, O = e[h(358)](h(410)) ? 1 : -1, k = f(w, () => document[h(393)] === "visible", () => !0);
|
|
52
|
+
c(() => {
|
|
53
|
+
let e = h, t = (e) => {
|
|
54
|
+
let t = x;
|
|
55
|
+
if (e[t(384)][t(356)]() !== "z" || !(e.metaKey || e.ctrlKey) || e[t(406)] || e[t(361)]) return;
|
|
56
|
+
let n = e[t(411)];
|
|
57
|
+
if (n.isContentEditable || n.closest("input, textarea, select")) return;
|
|
58
|
+
let r = i()[t(357)]((e) => e[t(370)] && !e.exiting);
|
|
59
|
+
r?.[t(378)] && (e[t(396)](), r[t(378)][t(416)](), o[t(388)](r.id));
|
|
59
60
|
};
|
|
60
|
-
return document[e(
|
|
61
|
+
return document[e(359)](e(366), t), () => document.removeEventListener(e(366), t);
|
|
61
62
|
}, []);
|
|
62
|
-
let
|
|
63
|
-
|
|
63
|
+
let A = s((e, t) => {
|
|
64
|
+
T((n) => n[e] === t ? n : {
|
|
64
65
|
...n,
|
|
65
66
|
[e]: t
|
|
66
67
|
});
|
|
67
|
-
}, []),
|
|
68
|
-
|
|
69
|
-
let t =
|
|
70
|
-
|
|
71
|
-
index:
|
|
72
|
-
y:
|
|
73
|
-
}), !e[t(
|
|
68
|
+
}, []), j = g[h(382)]((e) => !e.exiting), M = S[j[0]?.id] ?? 0, N = 0, P = 0, F = /* @__PURE__ */ new Map();
|
|
69
|
+
g.forEach((e) => {
|
|
70
|
+
let t = h;
|
|
71
|
+
F.set(e.id, {
|
|
72
|
+
index: P,
|
|
73
|
+
y: N
|
|
74
|
+
}), !e[t(403)] && (P < n && (N += (S[e.id] ?? 0) + u), P++);
|
|
74
75
|
});
|
|
75
|
-
let
|
|
76
|
-
return typeof document
|
|
76
|
+
let I = E ? Math[h(398)](0, N - u) : M + Math[h(368)](j[h(385)] - 1, n - 1) * C;
|
|
77
|
+
return typeof document > "u" ? null : b(v(h(365), {
|
|
77
78
|
"aria-label": "알림",
|
|
78
|
-
className:
|
|
79
|
+
className: r(h(418), m),
|
|
79
80
|
"data-position": e,
|
|
80
|
-
"data-expanded":
|
|
81
|
-
onPointerEnter: () =>
|
|
82
|
-
onPointerLeave: () =>
|
|
83
|
-
onFocus: () =>
|
|
84
|
-
onBlur: (e) => !e
|
|
85
|
-
children:
|
|
86
|
-
className:
|
|
87
|
-
style: { height:
|
|
88
|
-
children:
|
|
89
|
-
let t =
|
|
90
|
-
return
|
|
81
|
+
"data-expanded": E || void 0,
|
|
82
|
+
onPointerEnter: () => y(!0),
|
|
83
|
+
onPointerLeave: () => y(!1),
|
|
84
|
+
onFocus: () => y(!0),
|
|
85
|
+
onBlur: (e) => !e[h(409)][h(413)](e[h(395)]) && y(!1),
|
|
86
|
+
children: v("ol", {
|
|
87
|
+
className: h(371),
|
|
88
|
+
style: { height: I },
|
|
89
|
+
children: g.map((e) => {
|
|
90
|
+
let t = h, { index: r, y: i } = F.get(e.id), a = !E && r > 0, o = E ? i * O : r * C * O;
|
|
91
|
+
return v(D, {
|
|
91
92
|
toast: e,
|
|
92
|
-
defaultDuration:
|
|
93
|
-
paused:
|
|
94
|
-
onHeight:
|
|
95
|
-
behind:
|
|
96
|
-
hidden:
|
|
93
|
+
defaultDuration: l,
|
|
94
|
+
paused: E || !k,
|
|
95
|
+
onHeight: A,
|
|
96
|
+
behind: a,
|
|
97
|
+
hidden: r >= n,
|
|
97
98
|
style: {
|
|
98
|
-
"--_y":
|
|
99
|
-
"--_scale":
|
|
100
|
-
"--_z":
|
|
101
|
-
"--_h": (
|
|
102
|
-
"--_enter": -
|
|
99
|
+
"--_y": o + "px",
|
|
100
|
+
"--_scale": E ? 1 : 1 - r * .05,
|
|
101
|
+
"--_z": g[t(385)] - r,
|
|
102
|
+
"--_h": (a ? M : S[e.id] ?? 0) + "px",
|
|
103
|
+
"--_enter": -O * 100 + "%"
|
|
103
104
|
}
|
|
104
105
|
}, e.id);
|
|
105
106
|
})
|
|
106
107
|
})
|
|
107
|
-
}), document[
|
|
108
|
+
}), document[h(394)]);
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
-
let
|
|
111
|
-
return
|
|
112
|
-
className:
|
|
110
|
+
function E({ index: e, children: n }) {
|
|
111
|
+
let r = t;
|
|
112
|
+
return v(r(379), {
|
|
113
|
+
className: "ds-toast__rise",
|
|
113
114
|
style: { "--_i": e },
|
|
114
|
-
children:
|
|
115
|
-
className:
|
|
116
|
-
children:
|
|
115
|
+
children: v(r(379), {
|
|
116
|
+
className: r(386),
|
|
117
|
+
children: n
|
|
117
118
|
})
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
-
let
|
|
122
|
-
|
|
121
|
+
function D({ toast: e, defaultDuration: n, paused: r, onHeight: i, behind: a, hidden: s, style: f }) {
|
|
122
|
+
let p = t, m = u(null), [h, _] = d(!1), b = e[p(375)] === p(377) ? Infinity : e[p(402)] ?? n;
|
|
123
|
+
c(() => {
|
|
123
124
|
let e = 0, t = requestAnimationFrame(() => {
|
|
124
|
-
e = requestAnimationFrame(() =>
|
|
125
|
+
e = requestAnimationFrame(() => _(!0));
|
|
125
126
|
});
|
|
126
127
|
return () => {
|
|
127
128
|
cancelAnimationFrame(t), cancelAnimationFrame(e);
|
|
128
129
|
};
|
|
129
|
-
}, []),
|
|
130
|
-
let t =
|
|
130
|
+
}, []), l(() => {
|
|
131
|
+
let t = p, n = m[t(369)];
|
|
131
132
|
if (!n) return;
|
|
132
|
-
let
|
|
133
|
-
|
|
134
|
-
let a = new ResizeObserver(
|
|
135
|
-
return a[t(
|
|
136
|
-
}, [e.id,
|
|
137
|
-
let x =
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
let r = Date[t(344)](), a = window[t(314)](() => i[t(346)](e.id), x[t(326)]);
|
|
133
|
+
let r = () => i(e.id, n[t(360)]);
|
|
134
|
+
r();
|
|
135
|
+
let a = new ResizeObserver(r);
|
|
136
|
+
return a[t(414)](n), () => a.disconnect();
|
|
137
|
+
}, [e.id, i]);
|
|
138
|
+
let x = u(b);
|
|
139
|
+
c(() => {
|
|
140
|
+
x.current = b;
|
|
141
|
+
}, [e[p(354)], b]), c(() => {
|
|
142
|
+
let t = p;
|
|
143
|
+
if (r || e[t(403)] || !Number[t(389)](b)) return;
|
|
144
|
+
let n = Date.now(), i = window[t(355)](() => o.dismiss(e.id), x.current);
|
|
145
145
|
return () => {
|
|
146
146
|
let e = t;
|
|
147
|
-
window[e(
|
|
147
|
+
window[e(407)](i), x[e(369)] -= Date[e(364)]() - n;
|
|
148
148
|
};
|
|
149
149
|
}, [
|
|
150
|
-
|
|
151
|
-
e[
|
|
150
|
+
r,
|
|
151
|
+
e[p(403)],
|
|
152
152
|
e.id,
|
|
153
|
-
e[
|
|
154
|
-
|
|
153
|
+
e[p(354)],
|
|
154
|
+
b
|
|
155
155
|
]);
|
|
156
|
-
let
|
|
157
|
-
return
|
|
158
|
-
role: e[
|
|
159
|
-
"aria-live": e[
|
|
160
|
-
className:
|
|
161
|
-
"data-type": e[
|
|
156
|
+
let C = e[p(397)] ?? (e.type === "default" ? null : S[e[p(375)]]);
|
|
157
|
+
return v("li", {
|
|
158
|
+
role: e[p(375)] === p(415) ? "alert" : p(372),
|
|
159
|
+
"aria-live": e[p(375)] === p(415) ? p(405) : p(380),
|
|
160
|
+
className: p(387),
|
|
161
|
+
"data-type": e[p(375)],
|
|
162
162
|
"data-mounted": h || void 0,
|
|
163
|
-
"data-exiting": e
|
|
163
|
+
"data-exiting": e.exiting || void 0,
|
|
164
164
|
"data-behind": a || void 0,
|
|
165
|
-
"data-hidden":
|
|
166
|
-
style:
|
|
167
|
-
children:
|
|
168
|
-
ref:
|
|
169
|
-
className:
|
|
165
|
+
"data-hidden": s || void 0,
|
|
166
|
+
style: f,
|
|
167
|
+
children: y(p(379), {
|
|
168
|
+
ref: m,
|
|
169
|
+
className: p(401),
|
|
170
170
|
children: [
|
|
171
|
-
|
|
172
|
-
className:
|
|
173
|
-
children:
|
|
174
|
-
}, e
|
|
175
|
-
|
|
176
|
-
className:
|
|
177
|
-
children: [
|
|
171
|
+
C && v("span", {
|
|
172
|
+
className: "ds-toast__icon",
|
|
173
|
+
children: C
|
|
174
|
+
}, e.type),
|
|
175
|
+
y(p(379), {
|
|
176
|
+
className: p(373),
|
|
177
|
+
children: [v(E, {
|
|
178
178
|
index: 0,
|
|
179
|
-
children:
|
|
180
|
-
className:
|
|
181
|
-
children: e[
|
|
179
|
+
children: v(p(379), {
|
|
180
|
+
className: "ds-toast__title",
|
|
181
|
+
children: e[p(390)]
|
|
182
182
|
})
|
|
183
|
-
}), e[
|
|
183
|
+
}), e[p(383)] && v(E, {
|
|
184
184
|
index: 1,
|
|
185
|
-
children:
|
|
186
|
-
className:
|
|
185
|
+
children: v("div", {
|
|
186
|
+
className: "ds-toast__desc",
|
|
187
187
|
children: e.description
|
|
188
188
|
})
|
|
189
189
|
})]
|
|
190
|
-
}, e
|
|
191
|
-
e
|
|
192
|
-
type:
|
|
193
|
-
className:
|
|
194
|
-
style: { "--_i": e[
|
|
190
|
+
}, e[p(354)]),
|
|
191
|
+
e.action && v(p(412), {
|
|
192
|
+
type: p(412),
|
|
193
|
+
className: p(419),
|
|
194
|
+
style: { "--_i": e[p(383)] ? 2 : 1 },
|
|
195
195
|
onClick: () => {
|
|
196
|
-
|
|
197
|
-
e[t(345)][t(356)](), i[t(346)](e.id);
|
|
196
|
+
e.action.onClick(), o.dismiss(e.id);
|
|
198
197
|
},
|
|
199
|
-
children: e[
|
|
200
|
-
},
|
|
201
|
-
e[
|
|
202
|
-
type:
|
|
203
|
-
className:
|
|
204
|
-
"aria-label":
|
|
205
|
-
onClick: () =>
|
|
206
|
-
children:
|
|
198
|
+
children: e[p(378)][p(353)]
|
|
199
|
+
}, p(367) + e.version),
|
|
200
|
+
e[p(417)] !== !1 && v(p(412), {
|
|
201
|
+
type: "button",
|
|
202
|
+
className: p(374),
|
|
203
|
+
"aria-label": p(376),
|
|
204
|
+
onClick: () => o[p(388)](e.id),
|
|
205
|
+
children: v(g, {})
|
|
207
206
|
})
|
|
208
207
|
]
|
|
209
208
|
})
|
|
210
209
|
});
|
|
211
210
|
}
|
|
212
|
-
export {
|
|
211
|
+
export { T as Toaster };
|