@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.
Files changed (163) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/app-shell/AGENTS.md +99 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/lib/components/Accordion/Accordion2.js +74 -74
  6. package/lib/components/ActionBar/ActionBar2.js +44 -42
  7. package/lib/components/Alert/Alert2.js +67 -67
  8. package/lib/components/AppShell/AppShell2.js +72 -66
  9. package/lib/components/AreaChart/AreaChart.js +45 -45
  10. package/lib/components/BarChart/BarChart2.js +128 -128
  11. package/lib/components/BarList/BarList2.js +105 -105
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +63 -64
  13. package/lib/components/Calendar/Calendar2.js +197 -197
  14. package/lib/components/Calendar/DatePicker2.js +100 -100
  15. package/lib/components/Calendar/date.js +47 -70
  16. package/lib/components/Card/Card2.js +101 -74
  17. package/lib/components/CardFrame/CardFrame2.js +52 -56
  18. package/lib/components/Chart/ChartParts.js +88 -88
  19. package/lib/components/Chart/chart2.js +63 -63
  20. package/lib/components/Chart/useChartInteraction.js +43 -43
  21. package/lib/components/ChatBubble/ChatBubble2.js +111 -111
  22. package/lib/components/ChatBubble/formatChatTime.js +38 -43
  23. package/lib/components/ChatComposer/ChatComposer2.js +96 -96
  24. package/lib/components/CodeBlock/CodeBlock2.js +65 -65
  25. package/lib/components/CodeBlock/highlight.js +84 -84
  26. package/lib/components/ColorPicker/ColorPicker2.js +263 -263
  27. package/lib/components/ColorPicker/color.js +92 -92
  28. package/lib/components/ColorPicker/presets.js +35 -39
  29. package/lib/components/Combobox/Combobox2.js +134 -134
  30. package/lib/components/CommandMenu/CommandMenu.js +130 -131
  31. package/lib/components/Comment/Comment2.js +64 -63
  32. package/lib/components/ContextMenu/ContextMenu2.js +84 -84
  33. package/lib/components/DataGrid/DataGrid2.js +1182 -1180
  34. package/lib/components/DataGrid/GridPopover.js +84 -84
  35. package/lib/components/DataGrid/anchor.js +29 -28
  36. package/lib/components/DataGrid/model.js +308 -307
  37. package/lib/components/DataGrid/panels.js +398 -399
  38. package/lib/components/DataGrid/typeMeta.js +41 -40
  39. package/lib/components/DataGrid/types.js +39 -40
  40. package/lib/components/DescriptionList/DescriptionList2.js +105 -105
  41. package/lib/components/Dialog/AlertDialog.js +90 -89
  42. package/lib/components/Dialog/Dialog2.js +71 -72
  43. package/lib/components/Dialog/modal.js +62 -60
  44. package/lib/components/Drawer/Drawer2.js +167 -166
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +260 -258
  46. package/lib/components/DropdownMenu/menuCore.js +29 -28
  47. package/lib/components/Dropzone/Dropzone2.js +78 -77
  48. package/lib/components/EmptyState/EmptyState2.js +57 -57
  49. package/lib/components/FileChip/FileChip2.js +53 -77
  50. package/lib/components/FileUpload/FileUpload.js +168 -167
  51. package/lib/components/FilterChips/FilterChips2.js +60 -60
  52. package/lib/components/FunnelChart/FunnelChart2.js +174 -174
  53. package/lib/components/FunnelChart/funnel.js +44 -42
  54. package/lib/components/Highlight/Highlight2.js +55 -55
  55. package/lib/components/HoverCard/HoverCard.js +71 -96
  56. package/lib/components/InlineDiff/InlineDiff2.js +128 -129
  57. package/lib/components/InlineDiff/diff.js +79 -79
  58. package/lib/components/InlineDiff/useDiffReview.js +61 -62
  59. package/lib/components/Kanban/Kanban2.js +387 -389
  60. package/lib/components/Kanban/KanbanCard.js +84 -84
  61. package/lib/components/Kanban/move.js +32 -25
  62. package/lib/components/LineChart/LineChart2.js +228 -228
  63. package/lib/components/List/List2.js +62 -62
  64. package/lib/components/Listbox/Listbox2.js +92 -92
  65. package/lib/components/Marker/Marker2.js +50 -56
  66. package/lib/components/Menubar/Menubar2.js +117 -116
  67. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +231 -231
  69. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  70. package/lib/components/NumberStepper/NumberStepper2.js +60 -60
  71. package/lib/components/OtpInput/OtpInput2.js +90 -89
  72. package/lib/components/Pagination/Pagination2.js +105 -105
  73. package/lib/components/Pagination/paginationRange.js +37 -37
  74. package/lib/components/PhoneInput/PhoneInput.js +75 -76
  75. package/lib/components/PieChart/PieChart2.js +166 -166
  76. package/lib/components/PieChart/arc.js +71 -69
  77. package/lib/components/PieChart/useArcTween.js +60 -62
  78. package/lib/components/Popover/Popover2.js +85 -86
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +134 -134
  80. package/lib/components/Rating/Rating2.js +90 -89
  81. package/lib/components/Resizable/Resizable2.js +128 -129
  82. package/lib/components/Resizable/layout.js +51 -51
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -48
  84. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  85. package/lib/components/ScatterChart/scatter.js +49 -52
  86. package/lib/components/ScrollArea/ScrollArea2.js +115 -117
  87. package/lib/components/Select/Select2.js +82 -82
  88. package/lib/components/Sidebar/Sidebar2.js +91 -85
  89. package/lib/components/Sidebar/rail.js +43 -0
  90. package/lib/components/Skeleton/Skeleton2.js +63 -64
  91. package/lib/components/Slider/Slider2.js +65 -66
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -69
  93. package/lib/components/SparkChart/SparkChart2.js +126 -127
  94. package/lib/components/SparkChart/spark.js +66 -42
  95. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  96. package/lib/components/SplitView/SplitView2.js +51 -51
  97. package/lib/components/Stat/Stat2.js +79 -79
  98. package/lib/components/StepList/StepList2.js +75 -75
  99. package/lib/components/Table/Table2.js +71 -71
  100. package/lib/components/Tabs/Tabs2.js +74 -74
  101. package/lib/components/TagInput/TagInput2.js +223 -221
  102. package/lib/components/TimePicker/TimePicker2.js +197 -195
  103. package/lib/components/TimePicker/time.js +59 -56
  104. package/lib/components/Timeline/Timeline2.js +195 -195
  105. package/lib/components/Timeline/scale.js +64 -66
  106. package/lib/components/Toast/Toaster.js +139 -139
  107. package/lib/components/Toast/store.js +72 -76
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  109. package/lib/components/Toolbar/Toolbar2.js +165 -164
  110. package/lib/components/Tracker/Tracker2.js +72 -72
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +96 -97
  112. package/lib/components/TreeView/TreeView2.js +152 -151
  113. package/lib/hooks/timing.js +34 -36
  114. package/lib/hooks/useControllableState.js +29 -30
  115. package/lib/hooks/useCountdown.js +51 -53
  116. package/lib/hooks/useDigitInput.js +81 -55
  117. package/lib/hooks/useDismiss.js +53 -56
  118. package/lib/hooks/useElapsed.js +48 -49
  119. package/lib/hooks/useFloating.js +36 -36
  120. package/lib/hooks/useFocusTrap.js +32 -32
  121. package/lib/hooks/usePresence.js +49 -49
  122. package/lib/hooks/usePressToOpen.js +40 -40
  123. package/lib/hooks/useScrollLock.js +50 -49
  124. package/lib/hooks/useSelection.js +42 -47
  125. package/lib/index.js +138 -139
  126. package/lib/primitives/AspectRatio2.js +58 -57
  127. package/lib/primitives/BrandIcon.js +210 -179
  128. package/lib/primitives/ColorDot2.js +42 -41
  129. package/lib/primitives/CopyButton2.js +59 -58
  130. package/lib/primitives/CountBadge2.js +58 -63
  131. package/lib/primitives/Countdown2.js +38 -37
  132. package/lib/primitives/Delta2.js +37 -37
  133. package/lib/primitives/Elapsed.js +42 -40
  134. package/lib/primitives/FileIcon2.js +102 -102
  135. package/lib/primitives/Flag2.js +124 -124
  136. package/lib/primitives/IconStack2.js +45 -23
  137. package/lib/primitives/IconTile2.js +45 -41
  138. package/lib/primitives/Kbd2.js +48 -48
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +40 -42
  141. package/lib/primitives/MaskedText2.js +50 -50
  142. package/lib/primitives/Progress2.js +78 -77
  143. package/lib/primitives/RelativeTime.js +55 -58
  144. package/lib/primitives/SearchInput2.js +72 -68
  145. package/lib/primitives/SelectorButton2.js +60 -61
  146. package/lib/primitives/Spinner2.js +48 -49
  147. package/lib/primitives/StatusIcon2.js +69 -69
  148. package/lib/primitives/Swatch2.js +65 -69
  149. package/lib/primitives/Tooltip2.js +92 -92
  150. package/lib/primitives/Typography2.js +37 -37
  151. package/lib/primitives/formatCountdown.js +38 -38
  152. package/lib/primitives/formatElapsed.js +43 -45
  153. package/lib/primitives/formatRelativeTime.js +54 -54
  154. package/lib/primitives/hotkey.js +77 -77
  155. package/lib/primitives/index.js +162 -161
  156. package/lib/primitives/maskValue.js +54 -51
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  159. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  160. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  161. package/lib/types/components/index.d.ts +1 -0
  162. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  163. package/package.json +1 -1
@@ -1,83 +1,81 @@
1
1
  "use client";
2
- (function(e, t) {
3
- let n = o, r = e();
4
- for (;;) try {
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
- r.push(r.shift());
7
- } catch {
8
- r.push(r.shift());
9
- }
10
- })(a, 822330);
11
- import { createContext as e, useContext as t } from "react";
12
- var n = e(null);
13
- function r() {
14
- let e = o, r = t(n);
15
- if (!r) throw Error(e(162));
16
- return r;
17
- }
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;
21
- }
22
- function a() {
23
- let e = [
24
- "mZC0mti0ogfhAeLqwG",
2
+ function e() {
3
+ let t = [
4
+ "ndu5mde4s2n6sLj5",
5
+ "ChvZAa",
6
+ "mtu1nti5nNHPCu1hAq",
7
+ "mJuYntb3ENzbrNO",
8
+ "ndmWntmWntbwvvf4rvK",
9
+ "mJK2mdeWmKvAwfjZvG",
25
10
  "CgfKu3rHCNq",
26
- "nLHhB01ywG",
27
- "CM91BMq",
28
- "Dg9gAxHLza",
29
- "mZm2mZC5mNrOzgLlDW",
30
- "ntCZmJK4mKTfEwrrva",
31
- "mtGWnZCWA1DUr2DA",
32
- "Bg9Nmta",
33
- "y2vPBa",
34
- "Bwf4",
35
- "ow9vCgvJrG",
36
- "mte2ntm2mgTXBe5HEa",
37
11
  "ywjZ",
38
- "mtqWmdiWwxrisMHm",
12
+ "mJbSshrcEfO",
13
+ "zMXVB3i",
14
+ "n2DZwwjRza",
15
+ "Dg9gAxHLza",
39
16
  "vgLTzwXPBMvsB3CGlYbuAw1LBgLUzujHCIbTDxn0igjLihvZzwqGAw5ZAwrLidXuAw1LBgLUzt4U",
40
- "nJu1oda0sKDhv2Hp",
41
- "ChvZAa",
42
- "mtbKEeflB2i",
43
- "zMXVB3i"
17
+ "mJrQs3fYtxa",
18
+ "nZK4mJGYB3fWvxzj",
19
+ "mti4ntaYnuDwC0j1rW",
20
+ "y2vPBa"
44
21
  ];
45
- return a = function() {
46
- return e;
47
- }, a();
22
+ return e = function() {
23
+ return t;
24
+ }, e();
48
25
  }
49
- function o(e, t) {
50
- e -= 146;
51
- let n = a(), r = n[e];
52
- o.HFyWqG === void 0 && (o.EOzXTX = function(e) {
26
+ (function(e, n) {
27
+ let r = t, i = e();
28
+ for (;;) try {
29
+ if (-parseInt(r(419)) / 1 + -parseInt(r(409)) / 2 + -parseInt(r(423)) / 3 + parseInt(r(412)) / 4 * (parseInt(r(424)) / 5) + -parseInt(r(418)) / 6 * (parseInt(r(414)) / 7) + -parseInt(r(417)) / 8 * (parseInt(r(421)) / 9) + parseInt(r(425)) / 10 == n) break;
30
+ i.push(i.shift());
31
+ } catch {
32
+ i.push(i.shift());
33
+ }
34
+ })(e, 760994);
35
+ function t(n, r) {
36
+ n -= 409;
37
+ let i = e(), a = i[n];
38
+ t.ELUUyY === void 0 && (t.OeWHVp = function(e) {
53
39
  let t = "", n = "";
54
40
  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
41
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
56
42
  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;
43
+ }, t.HqYWTb = {}, t.ELUUyY = !0);
44
+ let o = i[0];
45
+ t.rcfBiU !== o && (t.HqYWTb = {}, t.rcfBiU = o);
46
+ let s = t.HqYWTb[n];
47
+ return s === void 0 ? (a = t.OeWHVp(a), t.HqYWTb[n] = a) : a = s, a;
48
+ }
49
+ import { createContext as n, useContext as r } from "react";
50
+ var i = n(null);
51
+ function a() {
52
+ let e = t, n = r(i);
53
+ if (!n) throw Error(e(416));
54
+ return n;
55
+ }
56
+ function o(e) {
57
+ let n = t, r = e < 0 ? "−" : "", i = Math.round(Math[n(411)](e)), a = Math[n(413)](i / 3600), o = Math[n(413)](i % 3600 / 60), s = String(i % 60).padStart(2, "0");
58
+ return a > 0 ? "" + r + a + ":" + String(o)[n(410)](2, "0") + ":" + s : "" + r + o + ":" + s;
62
59
  }
63
- function s(e, t) {
64
- let n = o;
60
+ function s(e, n) {
61
+ let r = t;
65
62
  if (e <= 0) return 1;
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;
63
+ let i = e / Math.max(1, n), a = 10 ** Math[r(413)](Math.log10(i)), o = i / a;
64
+ return (o <= 1 ? 1 : o <= 2 ? 2 : o <= 5 ? 5 : 10) * a;
68
65
  }
69
- function c(e, t, n) {
70
- let r = o, i = [];
71
- if (n <= 0) return i;
72
- let a = Math[r(156)](e / n) * n;
66
+ function c(e, n, r) {
67
+ let i = t, a = [];
68
+ if (r <= 0) return a;
69
+ let o = Math[i(420)](e / r) * r;
73
70
  for (let e = 0; e < 200; e++) {
74
- let o = Number((a + e * n)[r(151)](10));
75
- if (o > t + n * 1e-9) break;
76
- i[r(164)](o);
71
+ let t = Number((o + e * r)[i(415)](10));
72
+ if (t > n + r * 1e-9) break;
73
+ a[i(422)](t);
77
74
  }
78
- return i;
75
+ return a;
79
76
  }
80
- function l(e = "", t = "0") {
81
- return (n) => n === 0 ? t : (n < 0 ? "−" : "+") + Math.abs(n) + e;
77
+ function l(e = "", n = "0") {
78
+ let r = t;
79
+ return (t) => t === 0 ? n : (t < 0 ? "−" : "+") + Math[r(411)](t) + e;
82
80
  }
83
- export { n as TimelineScaleContext, c as buildTicks, i as formatClock, l as formatOffset, s as niceStep, r as useTimelineScale };
81
+ export { i as TimelineScaleContext, c as buildTicks, o as formatClock, l as formatOffset, s as niceStep, a as useTimelineScale };
@@ -1,211 +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;
9
2
  (function(e, t) {
10
- let n = x, r = e();
3
+ let n = _, r = e();
11
4
  for (;;) try {
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;
5
+ if (-parseInt(n(517)) / 1 * (parseInt(n(474)) / 2) + -parseInt(n(481)) / 3 + -parseInt(n(538)) / 4 * (-parseInt(n(539)) / 5) + parseInt(n(536)) / 6 + parseInt(n(510)) / 7 + parseInt(n(480)) / 8 + -parseInt(n(521)) / 9 * (-parseInt(n(493)) / 10) == t) break;
13
6
  r.push(r.shift());
14
7
  } catch {
15
8
  r.push(r.shift());
16
9
  }
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";
10
+ })(n, 932117);
11
+ import { Spinner as e } from "../../primitives/Spinner2.js";
12
+ import { cx as t } from "../../primitives/index.js";
13
+ function n() {
14
+ let e = /* @__PURE__ */ "C3rHDhvZ.DMLZAwjPBgL0Evn0yxrL.ywn0Aw9U.Cg9SAxrL.ywrKrxzLBNrmAxn0zw5LCG.DMLZAwjPBgL0EwnOyw5Nzq.y3vYCMvUDa.nZm5mJy0oezzEeXZAa.DhLWzq.nde4ntmYAefdreLn.mZbruLzRA3C.BgfIzwW.DMvYC2LVBG.zhmTDg9HC3rFx3jPC2uTAw5Uzxi.zhmTDg9HC3rFx2nVBNrLBNq.ywn0Aw9Ulq.zhmTDg9HC3rLCG.Bwf4.ote3mZziB3LJv3m.zhmTDg9HC3rFx2rLC2m.y29UDgfPBNm.y2XVC2fIBgu.zMLSDgvY.C2v0.mtiYnZe3nM5lyxzvBW.nta3nZC1ohrHt1PXtq.yNv0Dg9U.y3vYCMvUDfrHCMDLDa.y3rYBeTLEq.BwfW.CMvTB3zLrxzLBNrmAxn0zw5LCG.Dg9mB3DLCKnHC2u.zgvMyxvSDa.zxHPDgLUzW.DMLZAwjSzq.zhvYyxrPB24.DgL0Bgu.mJuYnZKWz2POq3Hg.Dw5KzwzPBMvK.zxjYB3i.yxnZzxj0AxzL.y2XLyxjuAw1LB3v0.AwnVBG.B2zMC2v0sgvPz2H0.zhmTDg9HC3q.B2jZzxj2zq.Aw5WDxqSihrLEhrHCMvHlcbZzwXLy3q.B25dBgLJAW.Dw5KB2fIBgu.zgLZBwLZCW.BM93.A2v5.C3rHCNrZv2L0Aa.zhmTDg9HC3rFx2fJDgLVBG.nZC5mtyWoxPgq2vNsG.DgfYz2v0.A2v5zg93BG.ywXLCNq.AxngAw5PDgu.CMvSyxrLzfrHCMDLDa.zM9YrwfJAa.mtDztvLkswW.ywX0s2v5.ChjLDMvUDerLzMf1Bhq.C2HPzNrlzxK.otLABLHuBwm.zgL2.zgvZy3jPChrPB24.BgvUz3rO.AxndB250zw50rwrPDgfIBgu.Bg9HzgLUzW.C3bHBG.zhmTDg9HC3rFx2LJB24".split(".");
15
+ return n = function() {
16
+ return e;
17
+ }, n();
18
+ }
19
+ import { getToasts as r, subscribe as i, toast as a } from "./store.js";
21
20
  /* empty css */
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) {
21
+ import { useCallback as o, useEffect as s, useLayoutEffect as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
22
+ import { AlertTriangle as f, CheckCircle2 as p, Info as m, X as h, XCircle as g } from "lucide-react";
23
+ function _(e, t) {
24
+ e -= 469;
25
+ let r = n(), i = r[e];
26
+ _.lroJQR === void 0 && (_.sNDAJX = function(e) {
30
27
  let t = "", n = "";
31
28
  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);
32
29
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
33
30
  return decodeURIComponent(n);
34
- }, x.UrFJQI = {}, x.PVtjWF = !0);
31
+ }, _.MUMrXi = {}, _.lroJQR = !0);
35
32
  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;
33
+ _.YKkqPS !== a && (_.MUMrXi = {}, _.YKkqPS = a);
34
+ let o = _.MUMrXi[e];
35
+ return o === void 0 ? (i = _.sNDAJX(i), _.MUMrXi[e] = i) : i = o, i;
39
36
  }
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);
37
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
38
+ import { createPortal as b } from "react-dom";
39
+ var x = {
40
+ success: v(p, {}),
41
+ error: v(g, {}),
42
+ warning: v(f, {}),
43
+ info: v(m, {}),
44
+ loading: v(e, { size: 16 })
45
+ }, S = 14, C = (e) => {
46
+ let t = _;
47
+ return document[t(533)](t(534), e), () => document.removeEventListener(t(534), e);
49
48
  };
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));
49
+ function w({ position: e = "bottom-right", visibleToasts: n = 3, duration: c = 4e3, gap: l = 10, expand: f, className: p }) {
50
+ let m = _, h = d(i, r, r), [g, y] = u(!1), [x, w] = u({}), T = f || g && h[m(524)] > 0, D = e[m(508)]("top") ? 1 : -1, O = d(C, () => document[m(530)] === m(490), () => !0);
51
+ s(() => {
52
+ let e = m, t = (e) => {
53
+ let t = _;
54
+ if (e[t(507)][t(487)]() !== "z" || !(e.metaKey || e[t(484)]) || e[t(520)] || e[t(518)]) return;
55
+ let n = e[t(511)];
56
+ if (n[t(525)] || n.closest(t(502))) return;
57
+ let i = r().find((e) => e[t(504)] && !e.exiting);
58
+ i?.[t(531)] && (e[t(519)](), i[t(531)][t(503)](), a[t(505)](i.id));
60
59
  };
61
- return document[e(359)](e(366), t), () => document.removeEventListener(e(366), t);
60
+ return document[e(533)]("keydown", t), () => document[e(486)](e(512), t);
62
61
  }, []);
63
- let A = s((e, t) => {
64
- T((n) => n[e] === t ? n : {
62
+ let k = o((e, t) => {
63
+ w((n) => n[e] === t ? n : {
65
64
  ...n,
66
65
  [e]: t
67
66
  });
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++);
67
+ }, []), A = h[m(478)]((e) => !e.exiting), j = x[A[0]?.id] ?? 0, M = 0, N = 0, P = /* @__PURE__ */ new Map();
68
+ h[m(516)]((e) => {
69
+ let t = m;
70
+ P[t(479)](e.id, {
71
+ index: N,
72
+ y: M
73
+ }), !e[t(489)] && (N < n && (M += (x[e.id] ?? 0) + l), N++);
75
74
  });
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), {
75
+ let F = T ? Math[m(473)](0, M - l) : j + Math.min(A[m(524)] - 1, n - 1) * S;
76
+ return typeof document === m(494) ? null : b(v("section", {
78
77
  "aria-label": "알림",
79
- className: r(h(418), m),
78
+ className: t(m(472), p),
80
79
  "data-position": e,
81
- "data-expanded": E || void 0,
80
+ "data-expanded": T || void 0,
82
81
  onPointerEnter: () => y(!0),
83
82
  onPointerLeave: () => y(!1),
84
83
  onFocus: () => y(!0),
85
- onBlur: (e) => !e[h(409)][h(413)](e[h(395)]) && y(!1),
84
+ onBlur: (e) => !e[m(483)][m(476)](e[m(515)]) && y(!1),
86
85
  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, {
86
+ className: "ds-toaster__list",
87
+ style: { height: F },
88
+ children: h[m(485)]((e) => {
89
+ let t = m, { index: r, y: i } = P.get(e.id), a = !T && r > 0, o = T ? i * D : r * S * D;
90
+ return v(E, {
92
91
  toast: e,
93
- defaultDuration: l,
94
- paused: E || !k,
95
- onHeight: A,
92
+ defaultDuration: c,
93
+ paused: T || !O,
94
+ onHeight: k,
96
95
  behind: a,
97
96
  hidden: r >= n,
98
97
  style: {
99
98
  "--_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 + "%"
99
+ "--_scale": T ? 1 : 1 - r * .05,
100
+ "--_z": h[t(524)] - r,
101
+ "--_h": (a ? j : x[e.id] ?? 0) + "px",
102
+ "--_enter": -D * 100 + "%"
104
103
  }
105
104
  }, e.id);
106
105
  })
107
106
  })
108
- }), document[h(394)]);
107
+ }), document.body);
109
108
  }
110
- function E({ index: e, children: n }) {
111
- let r = t;
112
- return v(r(379), {
109
+ function T({ index: e, children: t }) {
110
+ let n = _;
111
+ return v(n(522), {
113
112
  className: "ds-toast__rise",
114
113
  style: { "--_i": e },
115
- children: v(r(379), {
116
- className: r(386),
117
- children: n
114
+ children: v(n(522), {
115
+ className: n(469),
116
+ children: t
118
117
  })
119
118
  });
120
119
  }
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(() => {
120
+ function E({ toast: e, defaultDuration: t, paused: n, onHeight: r, behind: i, hidden: o, style: d }) {
121
+ let f = _, p = l(null), [m, g] = u(!1), b = e.type === f(526) ? Infinity : e[f(491)] ?? t;
122
+ s(() => {
124
123
  let e = 0, t = requestAnimationFrame(() => {
125
- e = requestAnimationFrame(() => _(!0));
124
+ e = requestAnimationFrame(() => g(!0));
126
125
  });
127
126
  return () => {
128
127
  cancelAnimationFrame(t), cancelAnimationFrame(e);
129
128
  };
130
- }, []), l(() => {
131
- let t = p, n = m[t(369)];
129
+ }, []), c(() => {
130
+ let t = f, n = p[t(535)];
132
131
  if (!n) return;
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);
132
+ let i = () => r(e.id, n[t(499)]);
133
+ i();
134
+ let a = new ResizeObserver(i);
135
+ return a[t(501)](n), () => a.disconnect();
136
+ }, [e.id, r]);
137
+ let S = l(b);
138
+ s(() => {
139
+ S.current = b;
140
+ }, [e[f(541)], b]), s(() => {
141
+ let t = f;
142
+ if (n || e.exiting || !Number[t(514)](b)) return;
143
+ let r = Date[t(506)](), i = window.setTimeout(() => a[t(505)](e.id), S[t(535)]);
145
144
  return () => {
146
145
  let e = t;
147
- window[e(407)](i), x[e(369)] -= Date[e(364)]() - n;
146
+ window[e(497)](i), S[e(535)] -= Date.now() - r;
148
147
  };
149
148
  }, [
150
- r,
151
- e[p(403)],
149
+ n,
150
+ e.exiting,
152
151
  e.id,
153
- e[p(354)],
152
+ e[f(541)],
154
153
  b
155
154
  ]);
156
- let C = e[p(397)] ?? (e.type === "default" ? null : S[e[p(375)]]);
155
+ let C = e[f(498)] ?? (e[f(537)] === f(488) ? null : x[e[f(537)]]);
157
156
  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
- "data-mounted": h || void 0,
163
- "data-exiting": e.exiting || void 0,
164
- "data-behind": a || void 0,
165
- "data-hidden": s || void 0,
166
- style: f,
167
- children: y(p(379), {
168
- ref: m,
169
- className: p(401),
157
+ role: e[f(537)] === f(495) ? f(513) : f(529),
158
+ "aria-live": e[f(537)] === f(495) ? f(496) : f(532),
159
+ className: f(500),
160
+ "data-type": e[f(537)],
161
+ "data-mounted": m || void 0,
162
+ "data-exiting": e[f(489)] || void 0,
163
+ "data-behind": i || void 0,
164
+ "data-hidden": o || void 0,
165
+ style: d,
166
+ children: y("div", {
167
+ ref: p,
168
+ className: "ds-toast__inner",
170
169
  children: [
171
- C && v("span", {
172
- className: "ds-toast__icon",
170
+ C && v(f(527), {
171
+ className: f(528),
173
172
  children: C
174
173
  }, e.type),
175
- y(p(379), {
176
- className: p(373),
177
- children: [v(E, {
174
+ y(f(522), {
175
+ className: f(470),
176
+ children: [v(T, {
178
177
  index: 0,
179
- children: v(p(379), {
178
+ children: v("div", {
180
179
  className: "ds-toast__title",
181
- children: e[p(390)]
180
+ children: e[f(492)]
182
181
  })
183
- }), e[p(383)] && v(E, {
182
+ }), e.description && v(T, {
184
183
  index: 1,
185
- children: v("div", {
186
- className: "ds-toast__desc",
187
- children: e.description
184
+ children: v(f(522), {
185
+ className: f(475),
186
+ children: e[f(523)]
188
187
  })
189
188
  })]
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 },
189
+ }, e.version),
190
+ e[f(531)] && v(f(482), {
191
+ type: f(482),
192
+ className: f(509),
193
+ style: { "--_i": e.description ? 2 : 1 },
195
194
  onClick: () => {
196
- e.action.onClick(), o.dismiss(e.id);
195
+ let t = f;
196
+ e[t(531)][t(503)](), a[t(505)](e.id);
197
197
  },
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, {})
198
+ children: e[f(531)][f(540)]
199
+ }, f(471) + e[f(541)]),
200
+ e[f(477)] !== !1 && v(f(482), {
201
+ type: f(482),
202
+ className: "ds-toast__close",
203
+ "aria-label": "알림 닫기",
204
+ onClick: () => a[f(505)](e.id),
205
+ children: v(h, {})
206
206
  })
207
207
  ]
208
208
  })
209
209
  });
210
210
  }
211
- export { T as Toaster };
211
+ export { w as Toaster };