@iamfiro/design 0.3.0 → 0.3.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.
Files changed (153) hide show
  1. package/lib/components/Accordion/Accordion2.js +86 -86
  2. package/lib/components/ActionBar/ActionBar2.js +44 -43
  3. package/lib/components/Alert/Alert2.js +79 -79
  4. package/lib/components/AppShell/AppShell2.js +58 -58
  5. package/lib/components/AreaChart/AreaChart.js +41 -41
  6. package/lib/components/BarChart/BarChart2.js +110 -110
  7. package/lib/components/BarList/BarList2.js +95 -95
  8. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -59
  9. package/lib/components/Calendar/Calendar2.js +202 -202
  10. package/lib/components/Calendar/DatePicker2.js +122 -123
  11. package/lib/components/Calendar/date.js +57 -60
  12. package/lib/components/Card/Card2.js +62 -63
  13. package/lib/components/CardFrame/CardFrame2.js +43 -48
  14. package/lib/components/Chart/ChartParts.js +80 -80
  15. package/lib/components/Chart/chart2.js +57 -57
  16. package/lib/components/Chart/useChartInteraction.js +49 -49
  17. package/lib/components/ChatBubble/ChatBubble2.js +87 -87
  18. package/lib/components/ChatBubble/formatChatTime.js +34 -39
  19. package/lib/components/ChatComposer/ChatComposer2.js +97 -97
  20. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  21. package/lib/components/CodeBlock/highlight.js +75 -78
  22. package/lib/components/ColorPicker/ColorPicker2.js +383 -384
  23. package/lib/components/ColorPicker/color.js +74 -74
  24. package/lib/components/ColorPicker/presets.js +41 -46
  25. package/lib/components/Combobox/Combobox2.js +130 -131
  26. package/lib/components/CommandMenu/CommandMenu.js +137 -137
  27. package/lib/components/Comment/Comment2.js +64 -88
  28. package/lib/components/ContextMenu/ContextMenu2.js +87 -87
  29. package/lib/components/DataGrid/DataGrid2.js +911 -909
  30. package/lib/components/DataGrid/GridPopover.js +114 -114
  31. package/lib/components/DataGrid/anchor.js +25 -25
  32. package/lib/components/DataGrid/model.js +281 -282
  33. package/lib/components/DataGrid/panels.js +427 -429
  34. package/lib/components/DataGrid/typeMeta.js +50 -51
  35. package/lib/components/DataGrid/types.js +39 -40
  36. package/lib/components/DescriptionList/DescriptionList2.js +104 -104
  37. package/lib/components/Dialog/AlertDialog.js +85 -84
  38. package/lib/components/Dialog/Dialog2.js +72 -71
  39. package/lib/components/Dialog/modal.js +68 -68
  40. package/lib/components/Drawer/Drawer2.js +100 -100
  41. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -268
  42. package/lib/components/DropdownMenu/menuCore.js +36 -36
  43. package/lib/components/Dropzone/Dropzone2.js +66 -65
  44. package/lib/components/EmptyState/EmptyState2.js +52 -54
  45. package/lib/components/FileChip/FileChip2.js +42 -66
  46. package/lib/components/FileUpload/FileUpload.js +171 -170
  47. package/lib/components/FilterChips/FilterChips2.js +54 -54
  48. package/lib/components/FunnelChart/FunnelChart2.js +144 -144
  49. package/lib/components/FunnelChart/funnel.js +56 -53
  50. package/lib/components/Highlight/Highlight2.js +60 -60
  51. package/lib/components/HoverCard/HoverCard.js +72 -72
  52. package/lib/components/InlineDiff/InlineDiff2.js +112 -112
  53. package/lib/components/InlineDiff/diff.js +81 -81
  54. package/lib/components/InlineDiff/useDiffReview.js +54 -53
  55. package/lib/components/Kanban/Kanban2.js +372 -372
  56. package/lib/components/Kanban/KanbanCard.js +80 -80
  57. package/lib/components/Kanban/move.js +55 -55
  58. package/lib/components/LineChart/LineChart2.js +167 -167
  59. package/lib/components/List/List2.js +64 -65
  60. package/lib/components/Listbox/Listbox2.js +105 -105
  61. package/lib/components/Marker/Marker2.js +54 -54
  62. package/lib/components/Menubar/Menubar2.js +112 -113
  63. package/lib/components/MultiSelect/MultiSelect2.js +106 -106
  64. package/lib/components/NavigationMenu/NavigationMenu2.js +227 -227
  65. package/lib/components/NoticeStack/NoticeStack2.js +115 -115
  66. package/lib/components/NumberStepper/NumberStepper2.js +69 -70
  67. package/lib/components/OtpInput/OtpInput2.js +87 -87
  68. package/lib/components/Pagination/Pagination2.js +97 -97
  69. package/lib/components/Pagination/paginationRange.js +23 -24
  70. package/lib/components/PhoneInput/PhoneInput.js +85 -85
  71. package/lib/components/PieChart/PieChart2.js +116 -116
  72. package/lib/components/PieChart/arc.js +80 -56
  73. package/lib/components/PieChart/useArcTween.js +57 -59
  74. package/lib/components/Popover/Popover2.js +59 -60
  75. package/lib/components/ProgressTracker/ProgressTracker2.js +116 -116
  76. package/lib/components/Rating/Rating2.js +93 -93
  77. package/lib/components/Resizable/Resizable2.js +136 -134
  78. package/lib/components/Resizable/layout.js +73 -73
  79. package/lib/components/ScaledPreview/ScaledPreview2.js +57 -58
  80. package/lib/components/ScatterChart/ScatterChart2.js +252 -253
  81. package/lib/components/ScatterChart/scatter.js +58 -56
  82. package/lib/components/ScrollArea/ScrollArea2.js +133 -134
  83. package/lib/components/Select/Select2.js +89 -89
  84. package/lib/components/Sidebar/Sidebar2.js +76 -76
  85. package/lib/components/Skeleton/Skeleton2.js +67 -67
  86. package/lib/components/Slider/Slider2.js +67 -67
  87. package/lib/components/SocialLoginButton/SocialLoginButton.js +46 -47
  88. package/lib/components/SparkChart/SparkChart2.js +130 -130
  89. package/lib/components/SparkChart/spark.js +57 -62
  90. package/lib/components/Sparkbar/Sparkbar2.js +44 -44
  91. package/lib/components/SplitView/SplitView2.js +53 -53
  92. package/lib/components/Stat/Stat2.js +83 -83
  93. package/lib/components/StepList/StepList2.js +73 -73
  94. package/lib/components/Table/Table2.js +45 -45
  95. package/lib/components/Tabs/Tabs2.js +87 -87
  96. package/lib/components/TagInput/TagInput2.js +231 -234
  97. package/lib/components/TimePicker/TimePicker2.js +195 -195
  98. package/lib/components/TimePicker/time.js +60 -62
  99. package/lib/components/Timeline/Timeline2.js +199 -199
  100. package/lib/components/Timeline/scale.js +56 -58
  101. package/lib/components/Toast/Toaster.js +153 -152
  102. package/lib/components/Toast/store.js +57 -58
  103. package/lib/components/ToggleGroup/ToggleGroup2.js +74 -74
  104. package/lib/components/Toolbar/Toolbar2.js +135 -133
  105. package/lib/components/Tracker/Tracker2.js +83 -83
  106. package/lib/components/TreeDiagram/TreeDiagram2.js +103 -103
  107. package/lib/components/TreeView/TreeView2.js +165 -163
  108. package/lib/hooks/timing.js +33 -31
  109. package/lib/hooks/useControllableState.js +42 -42
  110. package/lib/hooks/useCountdown.js +58 -63
  111. package/lib/hooks/useDigitInput.js +75 -77
  112. package/lib/hooks/useDismiss.js +50 -52
  113. package/lib/hooks/useElapsed.js +58 -56
  114. package/lib/hooks/useFloating.js +44 -44
  115. package/lib/hooks/useFocusTrap.js +64 -40
  116. package/lib/hooks/usePresence.js +48 -50
  117. package/lib/hooks/usePressToOpen.js +52 -51
  118. package/lib/hooks/useScrollLock.js +49 -48
  119. package/lib/hooks/useSelection.js +37 -40
  120. package/lib/index.js +70 -69
  121. package/lib/primitives/AspectRatio2.js +50 -54
  122. package/lib/primitives/BrandIcon.js +153 -153
  123. package/lib/primitives/ColorDot2.js +49 -48
  124. package/lib/primitives/CopyButton2.js +59 -58
  125. package/lib/primitives/CountBadge2.js +57 -55
  126. package/lib/primitives/Countdown2.js +45 -49
  127. package/lib/primitives/Delta2.js +71 -46
  128. package/lib/primitives/Elapsed.js +43 -43
  129. package/lib/primitives/FileIcon2.js +93 -93
  130. package/lib/primitives/Flag2.js +95 -95
  131. package/lib/primitives/IconStack2.js +55 -55
  132. package/lib/primitives/IconTile2.js +46 -45
  133. package/lib/primitives/Kbd2.js +55 -55
  134. package/lib/primitives/Layout2.js +80 -80
  135. package/lib/primitives/Link2.js +36 -34
  136. package/lib/primitives/MaskedText2.js +65 -64
  137. package/lib/primitives/Progress2.js +80 -80
  138. package/lib/primitives/RelativeTime.js +52 -54
  139. package/lib/primitives/SearchInput2.js +55 -54
  140. package/lib/primitives/SelectorButton2.js +64 -65
  141. package/lib/primitives/Spinner2.js +55 -59
  142. package/lib/primitives/StatusIcon2.js +65 -65
  143. package/lib/primitives/Swatch2.js +50 -50
  144. package/lib/primitives/Tooltip2.js +85 -85
  145. package/lib/primitives/Typography2.js +66 -66
  146. package/lib/primitives/formatCountdown.js +43 -40
  147. package/lib/primitives/formatElapsed.js +24 -27
  148. package/lib/primitives/formatRelativeTime.js +43 -43
  149. package/lib/primitives/hotkey.js +71 -71
  150. package/lib/primitives/index.js +156 -157
  151. package/lib/primitives/maskValue.js +38 -34
  152. package/lib/style.css +1 -1
  153. package/package.json +1 -1
@@ -1,83 +1,81 @@
1
1
  "use client";
2
2
  (function(e, t) {
3
- let n = i, r = e();
3
+ let n = a, r = e();
4
4
  for (;;) try {
5
- if (-parseInt(n(229)) / 1 * (-parseInt(n(227)) / 2) + parseInt(n(222)) / 3 + -parseInt(n(223)) / 4 + -parseInt(n(224)) / 5 * (-parseInt(n(226)) / 6) + -parseInt(n(231)) / 7 * (-parseInt(n(217)) / 8) + -parseInt(n(215)) / 9 * (-parseInt(n(221)) / 10) + parseInt(n(228)) / 11 * (-parseInt(n(230)) / 12) == t) break;
5
+ if (parseInt(n(189)) / 1 + parseInt(n(193)) / 2 + parseInt(n(196)) / 3 + parseInt(n(190)) / 4 * (parseInt(n(182)) / 5) + -parseInt(n(183)) / 6 + -parseInt(n(195)) / 7 + -parseInt(n(188)) / 8 == t) break;
6
6
  r.push(r.shift());
7
7
  } catch {
8
8
  r.push(r.shift());
9
9
  }
10
- })(o, 684565);
10
+ })(l, 358209);
11
11
  import { createContext as e, useContext as t } from "react";
12
12
  var n = e(null);
13
13
  function r() {
14
- let e = i, r = t(n);
15
- if (!r) throw Error(e(218));
14
+ let e = a, r = t(n);
15
+ if (!r) throw Error(e(197));
16
16
  return r;
17
17
  }
18
- function i(e, t) {
19
- e -= 213;
20
- let n = o(), r = n[e];
21
- i.OnHPhZ === void 0 && (i.ODxPnu = function(e) {
18
+ function i(e) {
19
+ let t = a, n = e < 0 ? "−" : "", r = Math[t(192)](Math[t(187)](e)), i = Math[t(186)](r / 3600), o = Math[t(186)](r % 3600 / 60), s = String(r % 60)[t(191)](2, "0");
20
+ return i > 0 ? "" + n + i + ":" + String(o)[t(191)](2, "0") + ":" + s : "" + n + o + ":" + s;
21
+ }
22
+ function a(e, t) {
23
+ e -= 181;
24
+ let n = l(), r = n[e];
25
+ a.ojOXNd === void 0 && (a.zqDDHp = function(e) {
22
26
  let t = "", n = "";
23
27
  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
28
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
25
29
  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;
30
+ }, a.XIIthi = {}, a.ojOXNd = !0);
31
+ let i = n[0];
32
+ a.tlETKq !== i && (a.XIIthi = {}, a.tlETKq = i);
33
+ let o = a.XIIthi[e];
34
+ return o === void 0 ? (r = a.zqDDHp(r), a.XIIthi[e] = r) : r = o, r;
35
+ }
36
+ function o(e, t) {
37
+ let n = a;
38
+ if (e <= 0) return 1;
39
+ let r = e / Math[n(194)](1, t), i = 10 ** Math[n(186)](Math.log10(r)), o = r / i;
40
+ return (o <= 1 ? 1 : o <= 2 ? 2 : o <= 5 ? 5 : 10) * i;
41
+ }
42
+ function s(e, t, n) {
43
+ let r = a, i = [];
44
+ if (n <= 0) return i;
45
+ let o = Math[r(184)](e / n) * n;
46
+ for (let e = 0; e < 200; e++) {
47
+ let a = Number((o + e * n)[r(185)](10));
48
+ if (a > t + n * 1e-9) break;
49
+ i[r(181)](a);
50
+ }
51
+ return i;
31
52
  }
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;
53
+ function c(e = "", t = "0") {
54
+ let n = a;
55
+ return (r) => r === 0 ? t : (r < 0 ? "−" : "+") + Math[n(187)](r) + e;
35
56
  }
36
- function o() {
57
+ export { n as TimelineScaleContext, s as buildTicks, i as formatClock, c as formatOffset, o as niceStep, r as useTimelineScale };
58
+ function l() {
37
59
  let e = [
60
+ "ndi3nMrPDwP1sa",
61
+ "CgfKu3rHCNq",
62
+ "CM91BMq",
63
+ "nZy1mJK0uhnss2vz",
64
+ "Bwf4",
65
+ "nZe2nZm3rwTpCwf3",
66
+ "mta3mdy5n0nhDunPzG",
38
67
  "vgLTzwXPBMvsB3CGlYbuAw1LBgLUzujHCIbTDxn0igjLihvZzwqGAw5ZAwrLidXuAw1LBgLUzt4U",
39
68
  "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",
53
- "CgfKu3rHCNq",
54
- "ou94v0XzqW",
69
+ "mta3nvrJvhLrrW",
70
+ "mJyZnZCWmMDoDunKua",
71
+ "y2vPBa",
55
72
  "Dg9gAxHLza",
56
- "mZi0mg9uAwTAqW"
73
+ "zMXVB3i",
74
+ "ywjZ",
75
+ "ndy3mZiXnLzTzMztAG",
76
+ "nte0otG4wwv1BNzT"
57
77
  ];
58
- return o = function() {
78
+ return l = function() {
59
79
  return e;
60
- }, o();
61
- }
62
- function s(e, t) {
63
- let n = i;
64
- if (e <= 0) return 1;
65
- let r = e / Math[n(213)](1, t), a = 10 ** Math[n(225)](Math.log10(r)), o = r / a;
66
- return (o <= 1 ? 1 : o <= 2 ? 2 : o <= 5 ? 5 : 10) * a;
67
- }
68
- function c(e, t, n) {
69
- let r = i, a = [];
70
- if (n <= 0) return a;
71
- let o = Math.ceil(e / n) * n;
72
- for (let e = 0; e < 200; e++) {
73
- let i = Number((o + e * n)[r(216)](10));
74
- if (i > t + n * 1e-9) break;
75
- a[r(219)](i);
76
- }
77
- return a;
78
- }
79
- function l(e = "", t = "0") {
80
- let n = i;
81
- return (r) => r === 0 ? t : (r < 0 ? "−" : "+") + Math[n(220)](r) + e;
80
+ }, l();
82
81
  }
83
- export { n as TimelineScaleContext, c as buildTicks, a as formatClock, l as formatOffset, s as niceStep, r as useTimelineScale };
@@ -1,212 +1,213 @@
1
1
  "use client";
2
+ function e() {
3
+ let t = /* @__PURE__ */ "nJa4nJiWnvLozePnzq.BM93.DMvYC2LVBG.ywXLCNq.zgL2.nde5nZmWzwzJshLR.B2zMC2v0sgvPz2H0.zM9YrwfJAa.AwnVBG.BwfW.Dw5KB2fIBgu.zgvZy3jPChrPB24.ywn0Aw9Ulq.mtv3DKzws0y.y3vYCMvUDa.BgfIzwW.DMLZAwjSzq.yM90Dg9TlxjPz2H0.yxnZzxj0AxzL.zhmTDg9HC3rFx2nSB3nL.zMLUza.otC3mte4CKPyDeT3.C2v0vgLTzw91Da.zxjYB3i.AxndB250zw50rwrPDgfIBgu.ywn0Aw9U.zxHPDgLUzW.DhLWzq.y2XLyxjuAw1LB3v0.y2XVC2vZDa.zhmTDg9HC3rFx2LUBMvY.zhmTDg9HC3q.Aw5WDxqSihrLEhrHCMvHlcbZzwXLy3q.Bwv0yuTLEq.mJrADeL4sNK.yNv0Dg9U.z2v0.Cg9SAxrL.yM9KEq.zhmTDg9HC3rFx3jPC2uTAw5Uzxi.zhmTDg9HC3rLCL9FBgLZDa.mtiXmteYsujuwePP.y29UDgfPBNm.odiYmZrQAKjluM8.otLfD2f4uwS.C3rHCNrZv2L0Aa.A2v5zg93BG.y3rYBeTLEq.DMLZAwjPBgL0EwnOyw5Nzq.ntzZweDjy04.y3vYCMvUDfrHCMDLDa.BgvUz3rO.Bwf4.mtqWodKYnLzJChvgCW.zgLZBwLZCW.ywX0s2v5.7jwm66A8ioUlQ+Q4Sa.Bg9HzgLUzW.DgL0Bgu.ywrKrxzLBNrmAxn0zw5LCG.Dg9W.zMLSDgvY.zhvYyxrPB24.DMLZAwjPBgL0Evn0yxrL.zhmTDg9HC3rFx3jPC2u.zgvMyxvSDa.CMvTB3zLrxzLBNrmAxn0zw5LCG.zgLZy29UBMvJDa.odu0nZj2wNrfEhy.zhmTDg9HC3rFx2LJB24.AxngAw5PDgu".split(".");
4
+ return e = function() {
5
+ return t;
6
+ }, e();
7
+ }
8
+ const t = w;
2
9
  (function(e, t) {
3
- let n = C, r = e();
10
+ let n = w, r = e();
4
11
  for (;;) try {
5
- if (-parseInt(n(321)) / 1 + -parseInt(n(353)) / 2 + -parseInt(n(327)) / 3 + parseInt(n(338)) / 4 * (-parseInt(n(318)) / 5) + -parseInt(n(359)) / 6 + -parseInt(n(383)) / 7 + parseInt(n(319)) / 8 == t) break;
12
+ if (parseInt(n(332)) / 1 + -parseInt(n(283)) / 2 * (-parseInt(n(345)) / 3) + -parseInt(n(352)) / 4 * (-parseInt(n(324)) / 5) + parseInt(n(293)) / 6 + parseInt(n(289)) / 7 * (-parseInt(n(308)) / 8) + -parseInt(n(311)) / 9 + parseInt(n(316)) / 10 * (-parseInt(n(284)) / 11) == t) break;
6
13
  r.push(r.shift());
7
14
  } catch {
8
15
  r.push(r.shift());
9
16
  }
10
- })(g, 168143);
11
- import { Spinner as e } from "../../primitives/Spinner2.js";
12
- import { cx as t } from "../../primitives/index.js";
13
- import { getToasts as n, subscribe as r, toast as i } from "./store.js";
17
+ })(e, 492235);
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 a, useEffect as o, useLayoutEffect as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
16
- import { AlertTriangle as d, CheckCircle2 as f, Info as p, X as m, XCircle as h } from "lucide-react";
17
- function g() {
18
- let e = /* @__PURE__ */ "zxjYB3i.B25dBgLJAW.DgfYz2v0.Bwf4.nte2mZK2vMDsB09U.C2vJDgLVBG.zhmTDg9HC3rFx2fJDgLVBG.zMLSDgvY.Bg9HzgLUzW.A2v5zg93BG.Dw5KB2fIBgu.yNv0Dg9U.zgLZy29UBMvJDa.DMLZAwjPBgL0Evn0yxrL.ywX0s2v5.zhmTDg9HC3rFx2nVBNrLBNq.yM9KEq.AxngAw5PDgu.DgL0Bgu.y2XVC2fIBgu.C3bHBG.zgL2.DhLWzq.DMvYC2LVBG.z2v0.zgvZy3jPChrPB24.DMLZAwjPBgL0EwnOyw5Nzq.B2zMC2v0sgvPz2H0.odq3nZq5yur1rvPO.ywrKrxzLBNrmAxn0zw5LCG.ywn0Aw9Ulq.zhmTDg9HC3rFx2nSB3nL.zhmTDg9HC3rFx2rLC2m.C2v0vgLTzw91Da.7jwm66A8ioUlQ+Q4Sa.AxndB250zw50rwrPDgfIBgu.Bwv0yuTLEq.mZu2ntvJz0rnAfG.nJG4mJi2nfnbsMPdBa.zgvMyxvSDa.mtq3odyXvxHttKjz.BwfW.C2HPzNrlzxK.zhmTDg9HC3rFx3jPC2uTAw5Uzxi.B2jZzxj2zq.y3vYCMvUDa.mZu5nJeWtwr0vwze.zxHPDgLUzW.zhmTDg9HC3q.Dw5KzwzPBMvK.Dg9mB3DLCKnHC2u.ChjLDMvUDerLzMf1Bhq.zhmTDg9HC3rFx3rPDgXL.zhmTDg9HC3rFx3jPC2u.y2XVC2vZDa.BgfIzwW.BgvUz3rO.mtjKvxvAzeS.ywXLCNq.y2XLyxjuAw1LB3v0.CMvSyxrLzfrHCMDLDa.Dg9W.CMvTB3zLrxzLBNrmAxn0zw5LCG.BM93.ywn0Aw9U.zgLZBwLZCW.zhmTDg9HC3rLCL9FBgLZDa.zhmTDg9HC3rFx2LJB24.A2v5.zhmTDg9HC3rFx2LUBMvY.y3rYBeTLEq.C3rHDhvZ.mZKXnJG2txL0werS.zhvYyxrPB24".split(".");
19
- return g = function() {
20
- return e;
21
- }, g();
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);
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
+ var x = {
27
+ success: v(m, {}),
28
+ error: v(_, {}),
29
+ warning: v(p, {}),
30
+ info: v(h, {}),
31
+ loading: v(n, { size: 16 })
32
+ }, S = 14, C = (e) => {
33
+ let t = w;
34
+ return document[t(299)](t(288), e), () => document[t(306)]("visibilitychange", e);
34
35
  };
35
- function C(e, t) {
36
- e -= 310;
37
- let n = g(), r = n[e];
38
- C.cnmEql === void 0 && (C.gfQmAq = function(e) {
36
+ function w(t, n) {
37
+ t -= 283;
38
+ let r = e(), i = r[t];
39
+ w.OnGEjp === void 0 && (w.dOmaPO = function(e) {
39
40
  let t = "", n = "";
40
41
  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
42
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
42
43
  return decodeURIComponent(n);
43
- }, C.pjrPRd = {}, C.cnmEql = !0);
44
- let i = n[0];
45
- C.SfEkzX !== i && (C.pjrPRd = {}, C.SfEkzX = i);
46
- let a = C.pjrPRd[e];
47
- return a === void 0 ? (r = C.gfQmAq(r), C.pjrPRd[e] = r) : r = a, r;
44
+ }, w.NxHILr = {}, w.OnGEjp = !0);
45
+ let a = r[0];
46
+ w.DnqELK !== a && (w.NxHILr = {}, w.DnqELK = a);
47
+ let o = w.NxHILr[t];
48
+ return o === void 0 ? (i = w.dOmaPO(i), w.NxHILr[t] = i) : i = o, i;
48
49
  }
49
- function w({ position: e = "bottom-right", visibleToasts: s = 3, duration: c = 4e3, gap: d = 10, expand: f, className: p }) {
50
- let m = C, h = u(r, n, n), [g, v] = l(!1), [b, w] = l({}), T = f || g && h.length > 0, D = e.startsWith(m(342)) ? 1 : -1, O = u(S, () => document[m(368)] === "visible", () => !0);
51
- o(() => {
52
- let e = m, t = (e) => {
53
- let t = C;
54
- if (e[t(349)][t(331)]() !== "z" || !(e[t(317)] || e[t(351)]) || e[t(323)] || e[t(369)]) return;
55
- let r = e[t(357)];
56
- if (r[t(316)] || r[t(335)]("input, textarea, select")) return;
57
- let a = n().find((e) => e[t(365)] && !e[t(328)]);
58
- a?.[t(345)] && (e[t(332)](), a.action[t(356)](), i.dismiss(a.id));
50
+ function T({ position: e = t(328), 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), [x, T] = d({}), E = p || _ && g[h(291)] > 0, O = e[h(285)](h(300)) ? 1 : -1, k = f(C, () => document[h(303)] === h(327), () => !0);
52
+ c(() => {
53
+ let e = h, t = (e) => {
54
+ let t = w;
55
+ if (e.key.toLowerCase() !== "z" || !(e[t(344)] || e[t(287)]) || e.shiftKey || e[t(295)]) return;
56
+ let n = e.target;
57
+ if (n[t(335)] || n[t(340)](t(343))) return;
58
+ let r = i()[t(331)]((e) => e[t(321)] && !e[t(337)]);
59
+ r?.action && (e.preventDefault(), r[t(336)].onClick(), o[t(294)](r.id));
59
60
  };
60
- return document[e(310)](e(364), t), () => document[e(343)](e(364), t);
61
+ return document.addEventListener("keydown", t), () => document.removeEventListener(e(286), t);
61
62
  }, []);
62
- let k = a((e, t) => {
63
- w((n) => n[e] === t ? n : {
63
+ let A = s((e, t) => {
64
+ T((n) => n[e] === t ? n : {
64
65
  ...n,
65
66
  [e]: t
66
67
  });
67
- }, []), A = h[m(362)]((e) => !e.exiting), j = b[A[0]?.id] ?? 0, M = 0, N = 0, P = /* @__PURE__ */ new Map();
68
- h.forEach((e) => {
69
- let t = m;
70
- P.set(e.id, {
71
- index: N,
72
- y: M
73
- }), !e[t(328)] && (N < s && (M += (b[e.id] ?? 0) + d), N++);
68
+ }, []), j = g[h(301)]((e) => !e[h(337)]), M = x[j[0]?.id] ?? 0, N = 0, P = 0, F = /* @__PURE__ */ new Map();
69
+ g[h(318)]((e) => {
70
+ let t = h;
71
+ F.set(e.id, {
72
+ index: P,
73
+ y: N
74
+ }), !e[t(337)] && (P < n && (N += (x[e.id] ?? 0) + u), P++);
74
75
  });
75
- let F = T ? Math[m(358)](0, M - d) : j + Math.min(A[m(337)] - 1, s - 1) * x;
76
- return typeof document === m(330) ? null : y(_(m(360), {
76
+ let I = E ? Math[h(292)](0, N - u) : M + Math.min(j[h(291)] - 1, n - 1) * S;
77
+ return typeof document > "u" ? null : b(v("section", {
77
78
  "aria-label": "알림",
78
- className: t("ds-toaster", p),
79
+ className: r("ds-toaster", m),
79
80
  "data-position": e,
80
- "data-expanded": T || void 0,
81
- onPointerEnter: () => v(!0),
82
- onPointerLeave: () => v(!1),
83
- onFocus: () => v(!0),
84
- onBlur: (e) => !e.currentTarget.contains(e[m(341)]) && v(!1),
85
- children: _("ol", {
86
- className: m(347),
87
- style: { height: F },
88
- children: h[m(322)]((e) => {
89
- let t = m, { index: n, y: r } = P[t(379)](e.id), i = !T && n > 0, a = T ? r * D : n * x * D;
90
- return _(E, {
81
+ "data-expanded": E || void 0,
82
+ onPointerEnter: () => y(!0),
83
+ onPointerLeave: () => y(!1),
84
+ onFocus: () => y(!0),
85
+ onBlur: (e) => !e[h(290)][h(353)](e.relatedTarget) && y(!1),
86
+ children: v("ol", {
87
+ className: h(351),
88
+ style: { height: I },
89
+ children: g[h(320)]((e) => {
90
+ let t = h, { index: r, y: i } = F[t(347)](e.id), a = !E && r > 0, o = E ? i * O : r * S * O;
91
+ return v(D, {
91
92
  toast: e,
92
- defaultDuration: c,
93
- paused: T || !O,
94
- onHeight: k,
95
- behind: i,
96
- hidden: n >= s,
93
+ defaultDuration: l,
94
+ paused: E || !k,
95
+ onHeight: A,
96
+ behind: a,
97
+ hidden: r >= n,
97
98
  style: {
98
- "--_y": a + "px",
99
- "--_scale": T ? 1 : 1 - n * .05,
100
- "--_z": h[t(337)] - n,
101
- "--_h": (i ? j : b[e.id] ?? 0) + "px",
102
- "--_enter": -D * 100 + "%"
99
+ "--_y": o + "px",
100
+ "--_scale": E ? 1 : 1 - r * .05,
101
+ "--_z": g[t(291)] - r,
102
+ "--_h": (a ? M : x[e.id] ?? 0) + "px",
103
+ "--_enter": -O * 100 + "%"
103
104
  }
104
105
  }, e.id);
105
106
  })
106
107
  })
107
- }), document[m(371)]);
108
+ }), document[h(349)]);
108
109
  }
109
- function T({ index: e, children: t }) {
110
- let n = C;
111
- return _("div", {
112
- className: n(334),
110
+ function E({ index: e, children: n }) {
111
+ let r = t;
112
+ return v(r(315), {
113
+ className: r(304),
113
114
  style: { "--_i": e },
114
- children: _("div", {
115
- className: n(324),
116
- children: t
115
+ children: v(r(315), {
116
+ className: r(350),
117
+ children: n
117
118
  })
118
119
  });
119
120
  }
120
- function E({ toast: e, defaultDuration: t, paused: n, onHeight: r, behind: a, hidden: u, style: d }) {
121
- let f = C, p = c(null), [h, g] = l(!1), y = e[f(377)] === f(363) ? Infinity : e[f(354)] ?? t;
122
- o(() => {
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.type === p(297) ? Infinity : e[p(302)] ?? n;
123
+ c(() => {
123
124
  let e = 0, t = requestAnimationFrame(() => {
124
- e = requestAnimationFrame(() => g(!0));
125
+ e = requestAnimationFrame(() => _(!0));
125
126
  });
126
127
  return () => {
127
128
  cancelAnimationFrame(t), cancelAnimationFrame(e);
128
129
  };
129
- }, []), s(() => {
130
- let t = f, n = p[t(326)];
130
+ }, []), l(() => {
131
+ let t = p, n = m[t(325)];
131
132
  if (!n) return;
132
- let i = () => r(e.id, n[t(382)]);
133
- i();
134
- let a = new ResizeObserver(i);
135
- return a[t(325)](n), () => a[t(367)]();
136
- }, [e.id, r]);
137
- let x = c(y);
138
- o(() => {
139
- let e = f;
140
- x[e(326)] = y;
141
- }, [e[f(378)], y]), o(() => {
142
- let t = f;
143
- if (n || e[t(328)] || !Number[t(372)](y)) return;
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(317)]);
134
+ r();
135
+ let a = new ResizeObserver(r);
136
+ return a.observe(n), () => a[t(307)]();
137
+ }, [e.id, i]);
138
+ let S = u(b);
139
+ c(() => {
140
+ let e = p;
141
+ S[e(325)] = b;
142
+ }, [e.version, b]), c(() => {
143
+ let t = p;
144
+ if (r || e.exiting || !Number[t(310)](b)) return;
145
+ let n = Date[t(312)](), i = window[t(333)](() => o[t(294)](e.id), S[t(325)]);
145
146
  return () => {
146
147
  let e = t;
147
- window[e(340)](a), x[e(326)] -= Date.now() - r;
148
+ window[e(339)](i), S[e(325)] -= Date[e(312)]() - n;
148
149
  };
149
150
  }, [
150
- n,
151
- e[f(328)],
151
+ r,
152
+ e.exiting,
152
153
  e.id,
153
- e[f(378)],
154
- y
154
+ e[p(313)],
155
+ b
155
156
  ]);
156
- let S = e.icon ?? (e.type === f(320) ? null : b[e.type]);
157
- return _("li", {
158
- role: e[f(377)] === "error" ? f(339) : f(352),
159
- "aria-live": e[f(377)] === f(355) ? "assertive" : "polite",
160
- className: f(329),
161
- "data-type": e[f(377)],
157
+ let C = e[p(319)] ?? (e.type === p(305) ? null : x[e[p(338)]]);
158
+ return v("li", {
159
+ role: e.type === p(334) ? p(314) : "status",
160
+ "aria-live": e[p(338)] === "error" ? p(329) : p(348),
161
+ className: p(342),
162
+ "data-type": e[p(338)],
162
163
  "data-mounted": h || void 0,
163
- "data-exiting": e[f(328)] || void 0,
164
+ "data-exiting": e[p(337)] || void 0,
164
165
  "data-behind": a || void 0,
165
- "data-hidden": u || void 0,
166
- style: d,
167
- children: v(f(376), {
168
- ref: p,
169
- className: f(350),
166
+ "data-hidden": s || void 0,
167
+ style: f,
168
+ children: y(p(315), {
169
+ ref: m,
170
+ className: p(341),
170
171
  children: [
171
- S && _(f(375), {
172
- className: f(348),
173
- children: S
174
- }, e[f(377)]),
175
- v("div", {
176
- className: f(370),
177
- children: [_(T, {
172
+ C && v("span", {
173
+ className: p(309),
174
+ children: C
175
+ }, e[p(338)]),
176
+ y(p(315), {
177
+ className: "ds-toast__content",
178
+ children: [v(E, {
178
179
  index: 0,
179
- children: _(f(376), {
180
- className: f(333),
181
- children: e[f(373)]
180
+ children: v("div", {
181
+ className: "ds-toast__title",
182
+ children: e[p(298)]
182
183
  })
183
- }), e[f(380)] && _(T, {
184
+ }), e[p(322)] && v(E, {
184
185
  index: 1,
185
- children: _(f(376), {
186
- className: f(313),
187
- children: e.description
186
+ children: v(p(315), {
187
+ className: "ds-toast__desc",
188
+ children: e[p(322)]
188
189
  })
189
190
  })]
190
- }, e.version),
191
- e[f(345)] && _(f(366), {
192
- type: f(366),
193
- className: f(361),
194
- style: { "--_i": e[f(380)] ? 2 : 1 },
191
+ }, e[p(313)]),
192
+ e.action && v(p(346), {
193
+ type: p(346),
194
+ className: "ds-toast__action",
195
+ style: { "--_i": e[p(322)] ? 2 : 1 },
195
196
  onClick: () => {
196
- let t = f;
197
- e[t(345)][t(356)](), i[t(346)](e.id);
197
+ let t = p;
198
+ e[t(336)].onClick(), o[t(294)](e.id);
198
199
  },
199
- children: e[f(345)][f(336)]
200
- }, f(311) + e[f(378)]),
201
- e[f(374)] !== !1 && _("button", {
202
- type: f(366),
203
- className: f(312),
204
- "aria-label": f(315),
205
- onClick: () => i[f(346)](e.id),
206
- children: _(m, {})
200
+ children: e.action[p(326)]
201
+ }, p(323) + e[p(313)]),
202
+ e.closable !== !1 && v(p(346), {
203
+ type: p(346),
204
+ className: p(330),
205
+ "aria-label": p(296),
206
+ onClick: () => o.dismiss(e.id),
207
+ children: v(g, {})
207
208
  })
208
209
  ]
209
210
  })
210
211
  });
211
212
  }
212
- export { w as Toaster };
213
+ export { T as Toaster };