@iamfiro/design 0.3.2 → 0.3.4

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 (158) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/brand-icon/AGENTS.md +1 -1
  3. package/agents/social-login-button/AGENTS.md +4 -3
  4. package/lib/components/Accordion/Accordion2.js +87 -87
  5. package/lib/components/ActionBar/ActionBar2.js +42 -44
  6. package/lib/components/Alert/Alert2.js +61 -61
  7. package/lib/components/AppShell/AppShell2.js +70 -71
  8. package/lib/components/AreaChart/AreaChart.js +38 -40
  9. package/lib/components/BarChart/BarChart2.js +126 -126
  10. package/lib/components/BarList/BarList2.js +95 -95
  11. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -66
  12. package/lib/components/Calendar/Calendar2.js +164 -164
  13. package/lib/components/Calendar/DatePicker2.js +103 -102
  14. package/lib/components/Calendar/date.js +64 -66
  15. package/lib/components/Card/Card2.js +67 -67
  16. package/lib/components/CardFrame/CardFrame2.js +43 -51
  17. package/lib/components/Chart/ChartParts.js +94 -94
  18. package/lib/components/Chart/chart2.js +52 -52
  19. package/lib/components/Chart/useChartInteraction.js +54 -54
  20. package/lib/components/ChatBubble/ChatBubble2.js +92 -92
  21. package/lib/components/ChatBubble/formatChatTime.js +35 -41
  22. package/lib/components/ChatComposer/ChatComposer2.js +63 -63
  23. package/lib/components/CodeBlock/CodeBlock2.js +61 -61
  24. package/lib/components/CodeBlock/highlight.js +84 -84
  25. package/lib/components/ColorPicker/ColorPicker2.js +387 -386
  26. package/lib/components/ColorPicker/color.js +71 -71
  27. package/lib/components/ColorPicker/presets.js +41 -46
  28. package/lib/components/Combobox/Combobox2.js +117 -118
  29. package/lib/components/CommandMenu/CommandMenu.js +127 -127
  30. package/lib/components/Comment/Comment2.js +86 -60
  31. package/lib/components/ContextMenu/ContextMenu2.js +77 -75
  32. package/lib/components/DataGrid/DataGrid2.js +1192 -1190
  33. package/lib/components/DataGrid/GridPopover.js +94 -94
  34. package/lib/components/DataGrid/anchor.js +34 -31
  35. package/lib/components/DataGrid/model.js +284 -283
  36. package/lib/components/DataGrid/panels.js +398 -399
  37. package/lib/components/DataGrid/typeMeta.js +51 -50
  38. package/lib/components/DataGrid/types.js +38 -39
  39. package/lib/components/DescriptionList/DescriptionList2.js +103 -103
  40. package/lib/components/Dialog/AlertDialog.js +79 -78
  41. package/lib/components/Dialog/Dialog2.js +59 -59
  42. package/lib/components/Dialog/modal.js +44 -46
  43. package/lib/components/Drawer/Drawer2.js +130 -129
  44. package/lib/components/DropdownMenu/DropdownMenu2.js +235 -233
  45. package/lib/components/DropdownMenu/menuCore.js +69 -42
  46. package/lib/components/Dropzone/Dropzone2.js +79 -78
  47. package/lib/components/EmptyState/EmptyState2.js +34 -35
  48. package/lib/components/FileChip/FileChip2.js +73 -73
  49. package/lib/components/FileUpload/FileUpload.js +159 -159
  50. package/lib/components/FilterChips/FilterChips2.js +61 -61
  51. package/lib/components/FunnelChart/FunnelChart2.js +161 -161
  52. package/lib/components/FunnelChart/funnel.js +48 -44
  53. package/lib/components/Highlight/Highlight2.js +43 -43
  54. package/lib/components/HoverCard/HoverCard.js +59 -84
  55. package/lib/components/InlineDiff/InlineDiff2.js +112 -112
  56. package/lib/components/InlineDiff/diff.js +90 -90
  57. package/lib/components/InlineDiff/useDiffReview.js +64 -63
  58. package/lib/components/Kanban/Kanban2.js +386 -387
  59. package/lib/components/Kanban/KanbanCard.js +70 -95
  60. package/lib/components/Kanban/move.js +50 -46
  61. package/lib/components/LineChart/LineChart2.js +211 -211
  62. package/lib/components/List/List2.js +53 -54
  63. package/lib/components/Listbox/Listbox2.js +115 -115
  64. package/lib/components/Marker/Marker2.js +56 -61
  65. package/lib/components/Menubar/Menubar2.js +144 -141
  66. package/lib/components/MultiSelect/MultiSelect2.js +108 -108
  67. package/lib/components/NavigationMenu/NavigationMenu2.js +298 -299
  68. package/lib/components/NoticeStack/NoticeStack2.js +84 -84
  69. package/lib/components/NumberStepper/NumberStepper2.js +65 -66
  70. package/lib/components/OtpInput/OtpInput2.js +70 -69
  71. package/lib/components/Pagination/Pagination2.js +106 -106
  72. package/lib/components/Pagination/paginationRange.js +37 -39
  73. package/lib/components/PhoneInput/PhoneInput.js +87 -88
  74. package/lib/components/PieChart/PieChart2.js +160 -160
  75. package/lib/components/PieChart/arc.js +65 -62
  76. package/lib/components/PieChart/useArcTween.js +53 -60
  77. package/lib/components/Popover/Popover2.js +62 -62
  78. package/lib/components/ProgressTracker/ProgressTracker2.js +121 -121
  79. package/lib/components/Rating/Rating2.js +82 -81
  80. package/lib/components/Resizable/Resizable2.js +126 -127
  81. package/lib/components/Resizable/layout.js +73 -73
  82. package/lib/components/ScaledPreview/ScaledPreview2.js +68 -67
  83. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  84. package/lib/components/ScatterChart/scatter.js +47 -49
  85. package/lib/components/ScrollArea/ScrollArea2.js +117 -118
  86. package/lib/components/Select/Select2.js +78 -79
  87. package/lib/components/Sidebar/Sidebar2.js +69 -69
  88. package/lib/components/Skeleton/Skeleton2.js +57 -57
  89. package/lib/components/Slider/Slider2.js +73 -74
  90. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -68
  91. package/lib/components/SparkChart/SparkChart2.js +145 -145
  92. package/lib/components/SparkChart/spark.js +64 -42
  93. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  94. package/lib/components/SplitView/SplitView2.js +51 -52
  95. package/lib/components/Stat/Stat2.js +90 -90
  96. package/lib/components/StepList/StepList2.js +70 -70
  97. package/lib/components/Table/Table2.js +70 -70
  98. package/lib/components/Tabs/Tabs2.js +81 -81
  99. package/lib/components/TagInput/TagInput2.js +220 -217
  100. package/lib/components/TimePicker/TimePicker2.js +187 -186
  101. package/lib/components/TimePicker/time.js +63 -62
  102. package/lib/components/Timeline/Timeline2.js +199 -199
  103. package/lib/components/Timeline/scale.js +67 -64
  104. package/lib/components/Toast/Toaster.js +100 -98
  105. package/lib/components/Toast/store.js +90 -94
  106. package/lib/components/ToggleGroup/ToggleGroup2.js +76 -76
  107. package/lib/components/Toolbar/Toolbar2.js +163 -161
  108. package/lib/components/Tracker/Tracker2.js +82 -82
  109. package/lib/components/TreeDiagram/TreeDiagram2.js +123 -124
  110. package/lib/components/TreeView/TreeView2.js +154 -152
  111. package/lib/hooks/timing.js +31 -30
  112. package/lib/hooks/useControllableState.js +37 -38
  113. package/lib/hooks/useCountdown.js +53 -56
  114. package/lib/hooks/useDigitInput.js +66 -41
  115. package/lib/hooks/useDismiss.js +55 -58
  116. package/lib/hooks/useElapsed.js +57 -55
  117. package/lib/hooks/useFloating.js +44 -44
  118. package/lib/hooks/useFocusTrap.js +70 -46
  119. package/lib/hooks/usePresence.js +23 -22
  120. package/lib/hooks/usePressToOpen.js +51 -51
  121. package/lib/hooks/useScrollLock.js +57 -58
  122. package/lib/hooks/useSelection.js +49 -52
  123. package/lib/index.js +65 -65
  124. package/lib/primitives/AspectRatio2.js +57 -57
  125. package/lib/primitives/BrandIcon.js +189 -158
  126. package/lib/primitives/ColorDot2.js +50 -45
  127. package/lib/primitives/CopyButton2.js +52 -50
  128. package/lib/primitives/CountBadge2.js +53 -55
  129. package/lib/primitives/Countdown2.js +28 -25
  130. package/lib/primitives/Delta2.js +41 -41
  131. package/lib/primitives/Elapsed.js +47 -47
  132. package/lib/primitives/FileIcon2.js +86 -86
  133. package/lib/primitives/Flag2.js +122 -122
  134. package/lib/primitives/IconStack2.js +55 -31
  135. package/lib/primitives/IconTile2.js +43 -43
  136. package/lib/primitives/Kbd2.js +55 -55
  137. package/lib/primitives/Layout2.js +78 -78
  138. package/lib/primitives/Link2.js +39 -36
  139. package/lib/primitives/MaskedText2.js +74 -52
  140. package/lib/primitives/Progress2.js +67 -66
  141. package/lib/primitives/RelativeTime.js +54 -61
  142. package/lib/primitives/SearchInput2.js +45 -45
  143. package/lib/primitives/SelectorButton2.js +72 -76
  144. package/lib/primitives/Spinner2.js +56 -56
  145. package/lib/primitives/StatusIcon2.js +63 -63
  146. package/lib/primitives/Swatch2.js +55 -61
  147. package/lib/primitives/Tooltip2.js +78 -78
  148. package/lib/primitives/Typography2.js +53 -53
  149. package/lib/primitives/formatCountdown.js +30 -29
  150. package/lib/primitives/formatElapsed.js +46 -49
  151. package/lib/primitives/formatRelativeTime.js +76 -50
  152. package/lib/primitives/hotkey.js +80 -80
  153. package/lib/primitives/index.js +169 -168
  154. package/lib/primitives/maskValue.js +55 -50
  155. package/lib/style.css +1 -1
  156. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  157. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  158. package/package.json +1 -1
@@ -1,258 +1,258 @@
1
1
  "use client";
2
- (function(e, n) {
3
- let r = t, i = e();
2
+ (function(e, t) {
3
+ let n = u, r = e();
4
4
  for (;;) try {
5
- if (-parseInt(r(377)) / 1 * (parseInt(r(410)) / 2) + -parseInt(r(406)) / 3 + -parseInt(r(369)) / 4 + -parseInt(r(402)) / 5 * (parseInt(r(346)) / 6) + parseInt(r(362)) / 7 * (-parseInt(r(413)) / 8) + parseInt(r(350)) / 9 * (-parseInt(r(381)) / 10) + -parseInt(r(405)) / 11 * (-parseInt(r(389)) / 12) == n) break;
6
- i.push(i.shift());
5
+ if (-parseInt(n(193)) / 1 * (-parseInt(n(209)) / 2) + parseInt(n(177)) / 3 + parseInt(n(183)) / 4 + -parseInt(n(178)) / 5 + -parseInt(n(191)) / 6 + parseInt(n(153)) / 7 * (parseInt(n(176)) / 8) + -parseInt(n(216)) / 9 * (parseInt(n(201)) / 10) == t) break;
6
+ r.push(r.shift());
7
7
  } catch {
8
- i.push(i.shift());
8
+ r.push(r.shift());
9
9
  }
10
- })(f, 634547);
10
+ })(m, 372053);
11
11
  import { Text as e } from "../../primitives/Typography2.js";
12
- function t(e, n) {
13
- e -= 340;
14
- let r = f(), i = r[e];
15
- t.hiJLhL === void 0 && (t.vlFiYe = function(e) {
12
+ import { Progress as t } from "../../primitives/Progress2.js";
13
+ import { FileIcon as n } from "../../primitives/FileIcon2.js";
14
+ import { Inline as r, Stack as i } from "../../primitives/Layout2.js";
15
+ import { useControllableState as a } from "../../hooks/useControllableState.js";
16
+ import { Button as o } from "../../primitives/index.js";
17
+ import { Card as s, CardBody as c, CardFooter as l } from "../Card/Card2.js";
18
+ function u(e, t) {
19
+ e -= 153;
20
+ let n = m(), r = n[e];
21
+ u.MKEZBm === void 0 && (u.aYxuSV = function(e) {
16
22
  let t = "", n = "";
17
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);
18
24
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
19
25
  return decodeURIComponent(n);
20
- }, t.OcimWI = {}, t.hiJLhL = !0);
21
- let a = r[0];
22
- t.GbonbX !== a && (t.OcimWI = {}, t.GbonbX = a);
23
- let o = t.OcimWI[e];
24
- return o === void 0 ? (i = t.vlFiYe(i), t.OcimWI[e] = i) : i = o, i;
26
+ }, u.UuYfCx = {}, u.MKEZBm = !0);
27
+ let i = n[0];
28
+ u.PdTTQR !== i && (u.UuYfCx = {}, u.PdTTQR = i);
29
+ let a = u.UuYfCx[e];
30
+ return a === void 0 ? (r = u.aYxuSV(r), u.UuYfCx[e] = r) : r = a, r;
25
31
  }
26
- import { Progress as n } from "../../primitives/Progress2.js";
27
- import { FileIcon as r } from "../../primitives/FileIcon2.js";
28
- import { Inline as i, Stack as a } from "../../primitives/Layout2.js";
29
- import { useControllableState as o } from "../../hooks/useControllableState.js";
30
- import { Button as s } from "../../primitives/index.js";
31
- import { Card as c, CardBody as l, CardFooter as ee } from "../Card/Card2.js";
32
- import { List as u, ListItem as d } from "../List/List2.js";
33
- import { Dropzone as te } from "../Dropzone/Dropzone2.js";
34
- function f() {
35
- let e = /* @__PURE__ */ "Bwf4.AM9PBG.7zwCioUYIoYxKca.ndiWqNnTDxLe.Dg9vChbLCKnHC2u.7yYm7j2864U5ioY1NoUmGca.C3bHBG.z2v0.zxjYB3i.7kEa7jUq7zwy7kEaioYvIUUkLcdTMjxSI53SNBtSL5dSMPq.mJq0nZaWngP3r2jtqq.Cg9SAxrL.7jIK65su7jIK.ioYxHEUHNoUtNa.zg9Uzq.BgvUz3rO.ywnJzw50.z2HVC3q.mty0nJmZr05jC1jS.64+z7jIb7iob.y3vYCMvUDa.y2f0y2G.nJa5oduWCxbIzhfA.Dg9gAxHLza.ioUlPoYlNcdSI5ZRJ4q.ywjVCNrLza.ic8G.zMLSzq.Bg9HzgvK.C3rHCNrZv2L0Aa.mJm3nJK5nMj3C3nMqq.7ywn7iQK7yQ4.C2v0.6RcCioYKKsa.CMvKDwnL.6RcCioYxHEUHNoUtNcdSMytRO4WGWRCG.7ksa67MeioYKKq.C3rHCNq.DgvYDgLHCNK.C2L6zq.64si66Y0ioY7PoYALcdcTYdSTzZRJiaG.zMLUywXSEq.DhjPBq.mJC3meDJDwTrCq.7jEf66gC65oC7zwy7kEaioUQU+2wIoYwToYALa.CM91BMq.mtC2C25or1jz.mJu2mdG1mwndA3nfvW.DgHLBG.BwvZC2fNzq.BMfTzq.nhjJt2L1vq.ioYxHEUHNoUtNcdST6JSHOW.6RcCioYxHEUHNoUtNcdSPjeGWRCG.mJKWmJrzufLArgu.DxbSB2fKAw5N.ioUQQEUHNEYxKoYeNcdRUBZQUla.C2v0vgLTzw91Da.imk3ioYxHEUHNoUtNcdSMytRO4W.C3rHDhvZ.BwfW.C2XPy2u.imk3ia.ndK5oe5hwwvfzW.Aw5JBhvKzxm.7jIS66AWio2mJoYDVa.7lsiioUcQoYDJa.oxHLrefXDW.ywjVCNq.y2vPBa.7j2066+47kEa.zMLSDgvY.zgfUz2vY.yM9KEs1ZBq.zM9YrwfJAa.C2LNBMfS".split(".");
36
- return f = function() {
32
+ import { List as d, ListItem as f } from "../List/List2.js";
33
+ import { Dropzone as p } from "../Dropzone/Dropzone2.js";
34
+ function m() {
35
+ let e = /* @__PURE__ */ "ywjVCNrLza.6RcCioYxHEUHNoUtNcdSPjeGWRCG.DxbSB2fKAw5N.7kEa7jUq7zwy7kEaioYvIUUkLcdTMjxSI53SNBtSL5dSMPq.BgvUz3rO.zMLSDgvY.7lsiioUcQoYDJa.67AeioUcQoYDJa.ic8G.Aw5JBhvKzxm.7j2066+47kEa.6RcC6RMm7kEaioYyRoUMTcdSIjGG7j6i7jA07jQu.z2HVC3q.BwvZC2fNzq.AgfZ.DgvYDgLHCNK.C2L6zq.zMLSzq.7jIK65su7jIK.ioUQQEUHNEYxKoYeNcdRUBZQUla.ntaZmdK2CgfoCLzp.odiZmK9fzvPpsG.ode5mZvoDgTitvG.ywnJzw50.BwfW.yM9KEs1ZBq.y2vPBa.mJqXmJe2oePetwfruG.Dg9gAxHLza.CM91BMq.DhjPBq.7jIS66AWio2mJoYDVa.DgHLBG.zM9YrwfJAa.C3bSAxq.mtqWmtGWngzSuwX1Aa.C2LNBMfS.mMT1whL4tq.zgfUz2vY.y3vYCMvUDa.zg9Uzq.C3rHCNq.C3bHBG.CMvKDwnL.C3rHCNrZv2L0Aa.mJq3mZbxzeL1yuK.7ywn7iQK7yQ4.6RcCioYxHEUHNoUtNcdSMytRO4WGWRCG.Dg9vChbLCKnHC2u.zMLUywXSEq.7ksa67MeioYKKq.C3rHDhvZ.BM93.mZa0ote2rw5crgrZ.BMfTzq.y2f0y2G.C2XPy2u.ioUlPoYlNcdSI5ZRJ4q.zxjYB3i.ioYxHEUHNoUtNcdST6JSHOW.mtCZn3zXCgPprW.64+z7jIb7iob.z2v0.imk3ia.7jEf66gC65oC7zwy7kEaioUQU+2wIoYwToYALa.AM9PBG.mJfpugfyz2O.Cg9SAxrL.6RcCioYKKsa".split(".");
36
+ return m = function() {
37
37
  return e;
38
- }, f();
38
+ }, m();
39
39
  }
40
- import { useEffect as p, useRef as m, useState as h } from "react";
41
- import { RotateCw as g, X as _ } from "lucide-react";
42
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
43
- var b = 260, x = 0;
44
- function S(e) {
45
- let n = t;
46
- return e < 1024 ? e + "B" : e < 1024 ** 2 ? Math[n(404)](e / 1024) + "KB" : e < 1024 ** 3 ? +(e / 1024 ** 2).toFixed(1) + "MB" : +(e / 1024 ** 3)[n(382)](1) + "GB";
40
+ import { useEffect as h, useRef as g, useState as _ } from "react";
41
+ import { RotateCw as v, X as y } from "lucide-react";
42
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
43
+ var S = 260, C = 0;
44
+ function w(e) {
45
+ let t = u;
46
+ return e < 1024 ? e + "B" : e < 1024 ** 2 ? Math[t(185)](e / 1024) + "KB" : e < 1024 ** 3 ? +(e / 1024 ** 2)[t(184)](1) + "MB" : +(e / 1024 ** 3)[t(184)](1) + "GB";
47
47
  }
48
- function C(e, n) {
49
- let r = t, i = n < 1024 ** 2 ? 1024 : n < 1024 ** 3 ? 1024 ** 2 : 1024 ** 3, a = e / i;
50
- return (i === 1024 ? Math[r(404)](a) : +a[r(382)](1)) + r(385) + S(n);
48
+ function T(e, t) {
49
+ let n = u, r = t < 1024 ** 2 ? 1024 : t < 1024 ** 3 ? 1024 ** 2 : 1024 ** 3, i = e / r;
50
+ return (r === 1024 ? Math.round(i) : +i[n(184)](1)) + n(164) + w(t);
51
51
  }
52
- function w(e) {
53
- let n = t;
54
- return e < 60 ? Math[n(359)](1, Math[n(352)](e)) + n(349) : Math[n(352)](e / 60) + "분 남음";
52
+ function E(e) {
53
+ let t = u;
54
+ return e < 60 ? Math.max(1, Math[t(182)](e)) + t(162) : Math.ceil(e / 60) + t(163);
55
55
  }
56
- function T(e) {
57
- let n = t;
58
- return e.split(",")[n(343)]((e) => e[n(401)]())[n(354)](Boolean)[n(343)]((e) => {
59
- let t = n;
60
- if (e[t(388)](".")) return e[t(344)](1)[t(363)]();
61
- let [r, i] = e.split("/");
56
+ function D(e) {
57
+ let t = u;
58
+ return e.split(",")[t(180)]((e) => e[t(186)]())[t(161)](Boolean).map((e) => {
59
+ let n = t;
60
+ if (e[n(200)](".")) return e[n(212)](1)[n(204)]();
61
+ let [r, i] = e[n(190)]("/");
62
62
  return i === "*" ? {
63
- image: t(353),
64
- video: t(378),
65
- audio: t(371),
66
- text: t(390)
67
- }[r] ?? r : i[t(363)]();
68
- })[n(360)](", ");
63
+ image: n(166),
64
+ video: n(217),
65
+ audio: n(174),
66
+ text: n(202)
67
+ }[r] ?? r : i[n(204)]();
68
+ })[t(221)](", ");
69
69
  }
70
- function E({ upload: f, items: E, defaultItems: D = [], onItemsChange: O, onRemove: k, accept: A, maxSize: j, maxFiles: M, multiple: ne = !0, disabled: N, title: P, description: F, showSummary: I = !0, className: L, style: R }) {
71
- let z = t, [B, V] = o(E, D, O), H = m(B);
72
- p(() => {
73
- let e = t;
74
- H[e(379)] = B;
70
+ function O({ upload: m, items: O, defaultItems: k = [], onItemsChange: A, onRemove: j, accept: M, maxSize: N, maxFiles: P, multiple: ee = !0, disabled: te, title: ne, description: F, showSummary: I = !0, className: L, style: R }) {
71
+ let z = u, [B, V] = a(O, k, A), H = g(B);
72
+ h(() => {
73
+ let e = u;
74
+ H[e(195)] = B;
75
75
  }, [B]);
76
76
  let U = (e) => {
77
- H.current = e, V(e);
78
- }, W = (e, t) => U(H[z(379)][z(343)]((n) => n.id === e ? {
77
+ let t = u;
78
+ H[t(195)] = e, V(e);
79
+ }, W = (e, t) => U(H[z(195)][z(180)]((n) => n.id === e ? {
79
80
  ...n,
80
81
  ...t
81
- } : n)), G = m(/* @__PURE__ */ new Map()), K = m(/* @__PURE__ */ new Map()), [q, J] = h({}), [Y, X] = h([]);
82
- p(() => {
83
- let e = G.current;
82
+ } : n)), G = g(/* @__PURE__ */ new Map()), K = g(/* @__PURE__ */ new Map()), [q, J] = _({}), [Y, X] = _([]);
83
+ h(() => {
84
+ let e = z, t = G[e(195)];
84
85
  return () => {
85
- let n = t;
86
- e[n(357)]((e) => e[n(351)]()), e.clear();
86
+ t[e(189)]((e) => e.abort()), t.clear();
87
87
  };
88
88
  }, []);
89
89
  let re = (e) => {
90
90
  let t = z;
91
- if (!f || !e.file) return;
91
+ if (!m || !e.file) return;
92
92
  let n = new AbortController();
93
- G[t(379)][t(391)](e.id, n), K[t(379)][t(391)](e.id, performance.now()), f(e[t(386)], {
94
- signal: n[t(358)],
93
+ G.current.set(e.id, n), K[t(195)].set(e.id, performance[t(208)]()), m(e[t(173)], {
94
+ signal: n[t(192)],
95
95
  onProgress: (r) => {
96
96
  let i = t;
97
- if (n[i(358)][i(384)]) return;
97
+ if (n[i(192)][i(156)]) return;
98
98
  W(e.id, { loaded: r });
99
- let a = (performance.now() - (K[i(379)][i(366)](e.id) ?? 0)) / 1e3;
99
+ let a = (performance[i(208)]() - (K[i(195)][i(218)](e.id) ?? 0)) / 1e3;
100
100
  r > 0 && a > .3 && J((t) => ({
101
101
  ...t,
102
- [e.id]: (e[i(398)] - r) * a / r
102
+ [e.id]: (e.size - r) * a / r
103
103
  }));
104
104
  }
105
- })[t(407)](() => {
105
+ })[t(188)](() => {
106
106
  let r = t;
107
- n.signal[r(384)] || W(e.id, {
108
- status: r(373),
109
- loaded: e[r(398)]
107
+ n[r(192)][r(156)] || W(e.id, {
108
+ status: r(196),
109
+ loaded: e[r(172)]
110
110
  });
111
- })[t(380)]((r) => {
111
+ })[t(211)]((r) => {
112
112
  let i = t;
113
- n[i(358)].aborted || W(e.id, {
114
- status: "error",
115
- error: r instanceof Error && r[i(408)] ? r[i(408)] : i(403)
113
+ n.signal[i(156)] || W(e.id, {
114
+ status: i(214),
115
+ error: r instanceof Error && r[i(169)] ? r[i(169)] : i(220)
116
116
  });
117
- })[t(400)](() => {
117
+ })[t(205)](() => {
118
118
  let r = t;
119
- G[r(379)].get(e.id) === n && G[r(379)].delete(e.id);
119
+ G.current[r(218)](e.id) === n && G.current.delete(e.id);
120
120
  });
121
121
  };
122
- p(() => {
122
+ h(() => {
123
123
  let e = z;
124
- B[e(354)]((t) => t.status === "uploading" && !G[e(379)].has(t.id) && !Y[e(347)](t.id)).forEach(re);
124
+ B[e(161)]((t) => t[e(207)] === e(158) && !G[e(195)][e(170)](t.id) && !Y[e(165)](t.id)).forEach(re);
125
125
  });
126
126
  let ie = (e, t) => {
127
- let n = z, r = M ? M - H[n(379)][n(354)]((e) => e[n(342)] !== "error")[n(374)] : Infinity, i = (e) => ({
128
- id: "upload-" + ++x,
129
- name: e[n(409)],
130
- size: e[n(398)],
127
+ let n = z, r = P ? P - H[n(195)].filter((e) => e.status !== n(214))[n(160)] : Infinity, i = (e) => ({
128
+ id: "upload-" + ++C,
129
+ name: e.name,
130
+ size: e[n(172)],
131
131
  loaded: 0,
132
- status: n(367)
133
- }), a = [...e[n(343)]((e) => {
132
+ status: n(214)
133
+ }), a = [...e.map((e) => {
134
134
  let t = n;
135
- return j && e.size > j ? {
135
+ return N && e[t(172)] > N ? {
136
136
  ...i(e),
137
- error: t(399) + S(j)
137
+ error: "너무 커요 · 최대 " + w(N)
138
138
  } : r-- <= 0 ? {
139
139
  ...i(e),
140
- error: t(361) + M + "개까지 올릴 수 있어요"
140
+ error: "한 번에 " + P + t(167)
141
141
  } : {
142
142
  ...i(e),
143
143
  file: e,
144
- status: f ? "uploading" : "done",
145
- loaded: f ? 0 : e[t(398)]
144
+ status: t(m ? 158 : 196),
145
+ loaded: m ? 0 : e[t(172)]
146
146
  };
147
- }), ...t.map((e) => ({
147
+ }), ...t[n(180)]((e) => ({
148
148
  ...i(e),
149
- error: n(368)
149
+ error: n(159)
150
150
  }))];
151
- a.length && U([...H.current, ...a]);
151
+ a[n(160)] && U([...H[n(195)], ...a]);
152
152
  }, ae = (e) => {
153
153
  let t = z;
154
- G.current[t(366)](e.id)?.[t(351)](), k?.(e), X((t) => [...t, e.id]), window[t(340)](() => {
154
+ G[t(195)][t(218)](e.id)?.abort(), j?.(e), X((t) => [...t, e.id]), window.setTimeout(() => {
155
155
  let n = t;
156
- X((t) => t.filter((t) => t !== e.id)), U(H.current[n(354)]((t) => t.id !== e.id));
157
- }, b);
156
+ X((t) => t.filter((t) => t !== e.id)), U(H.current[n(161)]((t) => t.id !== e.id));
157
+ }, S);
158
158
  }, oe = (e) => {
159
159
  let t = z;
160
160
  J((t) => {
161
161
  let n = { ...t };
162
162
  return delete n[e.id], n;
163
163
  }), W(e.id, {
164
- status: t(414),
164
+ status: t(158),
165
165
  loaded: 0,
166
166
  error: void 0
167
167
  });
168
- }, Z = B[z(354)]((e) => e[z(342)] !== z(367)), Q = Z[z(354)]((e) => e.status === z(414)), $ = Z.reduce((e, t) => e + t[z(398)], 0), se = Z[z(393)]((e, t) => e + (t[z(342)] === "done" ? t[z(398)] : t[z(387)] ?? 0), 0), ce = F ?? ([A && "" + T(A), j && z(364) + S(j)][z(354)](Boolean)[z(360)](z(345)) || void 0);
169
- return y(c, {
168
+ }, Z = B.filter((e) => e[z(207)] !== z(214)), Q = Z[z(161)]((e) => e.status === z(158)), $ = Z[z(199)]((e, t) => e + t.size, 0), se = Z[z(199)]((e, t) => e + (t[z(207)] === "done" ? t[z(172)] : t.loaded ?? 0), 0), ce = F ?? ([M && "" + D(M), N && "파일당 최대 " + w(N)][z(161)](Boolean).join(z(219)) || void 0);
169
+ return x(s, {
170
170
  padding: "sm",
171
171
  className: L,
172
172
  style: R,
173
- children: [v(l, { children: y(a, {
173
+ children: [b(c, { children: x(i, {
174
174
  gap: 2,
175
- children: [v(te, {
175
+ children: [b(p, {
176
176
  onFiles: ie,
177
- accept: A,
178
- multiple: ne,
179
- disabled: N,
180
- title: P,
177
+ accept: M,
178
+ multiple: ee,
179
+ disabled: te,
180
+ title: ne,
181
181
  description: ce
182
- }), B[z(374)] > 0 && v(u, {
182
+ }), B[z(160)] > 0 && b(d, {
183
183
  animated: !0,
184
- "aria-label": z(348),
185
- children: B[z(343)]((t) => {
186
- let o = z, c = t.loaded ?? 0;
187
- return v(d, {
188
- align: o(396),
189
- leaving: Y.includes(t.id),
190
- leading: v(r, { name: t[o(409)] }),
191
- title: t[o(409)],
192
- description: t.status === o(367) ? v(e, {
193
- as: o(365),
194
- variant: "body-sm",
195
- tone: o(355),
196
- children: t.error
197
- }) : t.status === o(373) ? y(e, {
198
- as: o(365),
199
- variant: o(356),
200
- tone: o(397),
184
+ "aria-label": z(187),
185
+ children: B[z(180)]((a) => {
186
+ let s = z, c = a.loaded ?? 0;
187
+ return b(f, {
188
+ align: "start",
189
+ leaving: Y[s(165)](a.id),
190
+ leading: b(n, { name: a[s(210)] }),
191
+ title: a[s(210)],
192
+ description: a[s(207)] === "error" ? b(e, {
193
+ as: s(198),
194
+ variant: s(181),
195
+ tone: s(194),
196
+ children: a[s(214)]
197
+ }) : a[s(207)] === s(196) ? x(e, {
198
+ as: s(198),
199
+ variant: s(181),
200
+ tone: s(171),
201
201
  numeric: !0,
202
- children: [S(t.size), o(341)]
203
- }) : y(a, {
204
- as: o(365),
202
+ children: [w(a[s(172)]), " · 업로드 완료"]
203
+ }) : x(i, {
204
+ as: "span",
205
205
  gap: 2,
206
- children: [y(e, {
207
- as: o(365),
208
- variant: o(356),
209
- tone: o(397),
206
+ children: [x(e, {
207
+ as: s(198),
208
+ variant: s(181),
209
+ tone: s(171),
210
210
  numeric: !0,
211
211
  children: [
212
- C(c, t[o(398)]),
213
- o(345),
214
- q[t.id] == null ? o(395) : w(q[t.id])
212
+ T(c, a[s(172)]),
213
+ s(219),
214
+ q[a.id] == null ? s(206) : E(q[a.id])
215
215
  ]
216
- }), v(n, {
216
+ }), b(t, {
217
217
  value: c,
218
- max: t.size,
218
+ max: a[s(172)],
219
219
  size: "sm",
220
- tone: o(375),
221
- "aria-label": t[o(409)] + o(372)
220
+ tone: s(179),
221
+ "aria-label": a.name + " 업로드"
222
222
  })]
223
223
  }),
224
- trailing: y(i, {
224
+ trailing: x(r, {
225
225
  gap: 1,
226
226
  wrap: !1,
227
- children: [t[o(342)] === o(367) && t[o(386)] && f && v(s, {
228
- variant: o(376),
227
+ children: [a[s(207)] === s(214) && a[s(173)] && m && b(o, {
228
+ variant: s(168),
229
229
  size: "sm",
230
230
  iconOnly: !0,
231
- icon: v(g, {}),
232
- "aria-label": t[o(409)] + o(383),
233
- onClick: () => oe(t)
234
- }), v(s, {
235
- variant: "ghost",
231
+ icon: b(v, {}),
232
+ "aria-label": a[s(210)] + s(213),
233
+ onClick: () => oe(a)
234
+ }), b(o, {
235
+ variant: s(168),
236
236
  size: "sm",
237
237
  iconOnly: !0,
238
- icon: v(_, {}),
239
- "aria-label": t[o(342)] === "uploading" ? t[o(409)] + o(411) : t.name + o(415),
240
- onClick: () => ae(t)
238
+ icon: b(y, {}),
239
+ "aria-label": a.status === s(158) ? a[s(210)] + s(215) : a.name + s(175),
240
+ onClick: () => ae(a)
241
241
  })]
242
242
  })
243
- }, t.id);
243
+ }, a.id);
244
244
  })
245
245
  })]
246
- }) }), I && Z[z(374)] > 0 && v(ee, {
247
- align: z(396),
248
- children: v(e, {
246
+ }) }), I && Z[z(160)] > 0 && b(l, {
247
+ align: z(197),
248
+ children: b(e, {
249
249
  variant: "body-sm",
250
- tone: z(397),
250
+ tone: z(171),
251
251
  numeric: !0,
252
- "aria-live": z(370),
253
- children: Q[z(374)] > 0 ? Z[z(374)] + z(392) + Q.length + z(412) + C(se, $) : Z[z(374)] + z(394) + S($)
252
+ "aria-live": z(154),
253
+ children: Q.length > 0 ? Z[z(160)] + z(155) + Q[z(160)] + z(157) + T(se, $) : Z[z(160)] + z(203) + w($)
254
254
  })
255
255
  })]
256
256
  });
257
257
  }
258
- export { E as FileUpload, S as formatBytes };
258
+ export { O as FileUpload, w as formatBytes };
@@ -1,101 +1,101 @@
1
1
  "use client";
2
- const e = t;
3
- function t(e, n) {
4
- e -= 108;
5
- let r = u(), i = r[e];
6
- t.zkpGVa === void 0 && (t.DTSHhh = 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.CzpABh = {}, t.zkpGVa = !0);
12
- let a = r[0];
13
- t.JWAncm !== a && (t.CzpABh = {}, t.JWAncm = a);
14
- let o = t.CzpABh[e];
15
- return o === void 0 ? (i = t.DTSHhh(i), t.CzpABh[e] = i) : i = o, i;
2
+ function e() {
3
+ let t = /* @__PURE__ */ "C3bHBG.z3jVDxa.zhmTzMLSDgvYlwnOAxbFx2XLywq.AxntzwXLy3rLza.mtf6t0HQz1a.zhmTzMLSDgvYlwnOAxa.mtHVC25Pu1y.C29SAwq.odyWnty1nNfds3zIDG.zhmTzMLSDgvYlwnOAxbZ.nZeWodb6D3fmree.zgL2.uhjVDMLKzxi.q2HPCa.yNv0Dg9U.oda0ohvwqMfwBq.ntiXnJaYmMzmCKnkvW.zgvMyxvSDfbYzxzLBNrLza.mtG4nhjNreDftW.zhmTzMLSDgvYlwnOAxbZx19JBgvHCG.zhmTzMLSDgvYlwnOAxbFx21HAw4.ntiWnwDbDLPjza.7lsi6RIW7zMu.n0T4EKLuAG.C2L6zq.mJqXndKWngfiEeD0Bq.7zwe7ysWioYGNoQXSa.zhmTzMLSDgvYlwnOAxbFx3jLBw92zq.zgLZywjSzwq.BgvUz3rO.y2XLyxi.zhmTzMLSDgvYlwnOAxaTlq.nJiXnti0mhPOBwnMwa.Dg9Nz2XL.yxjPys1SywjLBa.mte2t3vzwMLN".split(".");
4
+ return e = function() {
5
+ return t;
6
+ }, e();
16
7
  }
17
- (function(e, n) {
18
- let r = t, i = e();
8
+ const t = i;
9
+ (function(e, t) {
10
+ let n = i, r = e();
19
11
  for (;;) try {
20
- if (parseInt(r(128)) / 1 * (parseInt(r(131)) / 2) + parseInt(r(114)) / 3 * (-parseInt(r(137)) / 4) + -parseInt(r(132)) / 5 * (-parseInt(r(126)) / 6) + parseInt(r(116)) / 7 + parseInt(r(124)) / 8 * (-parseInt(r(117)) / 9) + -parseInt(r(125)) / 10 + parseInt(r(122)) / 11 * (-parseInt(r(127)) / 12) == n) break;
21
- i.push(i.shift());
12
+ if (-parseInt(n(157)) / 1 * (-parseInt(n(141)) / 2) + parseInt(n(148)) / 3 * (-parseInt(n(152)) / 4) + parseInt(n(163)) / 5 * (-parseInt(n(160)) / 6) + parseInt(n(165)) / 7 * (-parseInt(n(167)) / 8) + -parseInt(n(158)) / 9 + -parseInt(n(138)) / 10 * (-parseInt(n(146)) / 11) + parseInt(n(150)) / 12 == t) break;
13
+ r.push(r.shift());
22
14
  } catch {
23
- i.push(i.shift());
15
+ r.push(r.shift());
24
16
  }
25
- })(u, 321537);
17
+ })(e, 490531);
26
18
  import { cx as n } from "../../primitives/index.js";
27
19
  import { useSelection as r } from "../../hooks/useSelection.js";
28
20
  /* empty css */
29
- import { createContext as i, useContext as a } from "react";
30
- import { Check as o, X as s } from "lucide-react";
31
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
32
- function u() {
33
- let e = /* @__PURE__ */ "C29SAwq.zgL2.7zwe7ysWioYGNoQXSa.BgvUz3rO.mJu1mJK5C2zwC1zL.zhmTzMLSDgvYlwnOAxbZx19JBgvHCG.otG5nda4EuvHuwzx.ndCWnJu5mfLcv25zrW.nti5mM1AB2n5sa.mtiWr2T5q3jv.mtbrv0nZrwi.zhmTzMLSDgvYlwnOAxbFx2XLywq.z3jVDxa.otCYotrNu0PNAKi.mJmXmfnSD2LTtG.uhjVDMLKzxi.zgvMyxvSDfbYzxzLBNrLza.yNv0Dg9U.zhmTzMLSDgvYlwnOAxbFx2nVDw50.mtzZs2zwyNC.Dg9Nz2XL.C3bHBG.zhmTzMLSDgvYlwnOAxbZ.AxntzwXLy3rLza.zhmTzMLSDgvYlwnOAxa.yxjPys1SywjLBa.zhmTzMLSDgvYlwnOAxbFx3jLBw92zq.DMfYAwfUDa.C2vSzwn0zwq.y2XLyxi.mJGWmdyYB0HIqvv4.zhmTzMLSDgvYlwnOAxaTlq.ndm5mtK2oeTpDfzzqq.oxLsq29VAG".split(".");
34
- return u = function() {
35
- return e;
36
- }, u();
21
+ function i(t, n) {
22
+ t -= 138;
23
+ let r = e(), a = r[t];
24
+ i.jjGqCH === void 0 && (i.UYSZie = function(e) {
25
+ let t = "", n = "";
26
+ 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);
27
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
28
+ return decodeURIComponent(n);
29
+ }, i.ItIuie = {}, i.jjGqCH = !0);
30
+ let o = r[0];
31
+ i.muPSKV !== o && (i.ItIuie = {}, i.muPSKV = o);
32
+ let s = i.ItIuie[t];
33
+ return s === void 0 ? (a = i.UYSZie(a), i.ItIuie[t] = a) : a = s, a;
37
34
  }
38
- var d = i(null);
35
+ import { createContext as a, useContext as o } from "react";
36
+ import { Check as s, X as c } from "lucide-react";
37
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
38
+ var d = a(null);
39
39
  function f(e) {
40
- let i = t, { variant: a = "solid", size: o = "md", disabled: s, clearable: u, clearLabel: f = "초기화", className: p, children: m } = e, h = r(e);
41
- return c(d[i(133)], {
40
+ let t = i, { variant: a = t(149), size: o = "md", disabled: s, clearable: c, clearLabel: f = t(164), className: p, children: m } = e, h = r(e);
41
+ return l(d[t(154)], {
42
42
  value: {
43
- isSelected: (e) => h[i(141)](e),
44
- toggle: (e) => h[i(138)](e),
43
+ isSelected: (e) => h[t(145)](e),
44
+ toggle: (e) => h[t(139)](e),
45
45
  variant: a,
46
46
  size: o,
47
47
  disabled: s
48
48
  },
49
- children: l(i(119), {
50
- role: i(130),
51
- "aria-label": e[i(109)],
52
- className: n(i(140), p),
53
- children: [m, u && h[i(112)][i(121)] > 0 && c(i(135), {
54
- type: i(135),
55
- className: i(123),
56
- onClick: h[i(113)],
49
+ children: u(t(153), {
50
+ role: t(143),
51
+ "aria-label": e[t(140)],
52
+ className: n(t(151), p),
53
+ children: [m, c && h.selected[t(171)] > 0 && l(t(156), {
54
+ type: "button",
55
+ className: t(161),
56
+ onClick: h[t(172)],
57
57
  children: f
58
58
  })]
59
59
  })
60
60
  });
61
61
  }
62
- function p({ value: t, selected: r, onSelectedChange: i, onRemove: u, removeLabel: f = e(120), icon: p, count: m, variant: h, size: g, disabled: _, className: v, children: y, onClick: b, ...x }) {
63
- let S = e, C = a(d), w = C != null && t !== void 0, T = w ? C[S(141)](t) : !!r, E = h ?? C?.[S(111)] ?? S(118), D = g ?? C?.size ?? "md", O = _ || C?.disabled;
64
- return l(S(139), {
65
- className: n(S(108), S(115) + E, S(115) + D, v),
62
+ function p({ value: e, selected: r, onSelectedChange: i, onRemove: a, removeLabel: f = t(168), icon: p, count: m, variant: h, size: g, disabled: _, className: v, children: y, onClick: b, ...x }) {
63
+ let S = t, C = o(d), w = C != null && e !== void 0, T = w ? C[S(145)](e) : !!r, E = h ?? C?.variant ?? S(149), D = g ?? C?.[S(166)] ?? "md", O = _ || C?.[S(170)];
64
+ return u(S(142), {
65
+ className: n(S(147), S(173) + E, S(173) + D, v),
66
66
  "data-selected": T || void 0,
67
67
  "data-disabled": O || void 0,
68
- children: [l("button", {
69
- type: S(135),
70
- className: "ds-filter-chip__main",
68
+ children: [u(S(156), {
69
+ type: S(156),
70
+ className: S(162),
71
71
  "aria-pressed": T,
72
72
  disabled: O,
73
- onClick: (e) => {
73
+ onClick: (t) => {
74
74
  let n = S;
75
- b?.(e), !e[n(134)] && (w && C[n(138)](t), i?.(!T));
75
+ b?.(t), !t[n(159)] && (w && C[n(139)](e), i?.(!T));
76
76
  },
77
77
  ...x,
78
78
  children: [
79
- c("span", {
80
- className: S(129),
79
+ l("span", {
80
+ className: S(144),
81
81
  "aria-hidden": !0,
82
- children: T ? c(o, {}) : p
82
+ children: T ? l(s, {}) : p
83
83
  }),
84
84
  y,
85
- m != null && c("span", {
86
- className: S(136),
85
+ m != null && l(S(142), {
86
+ className: "ds-filter-chip__count",
87
87
  children: m
88
88
  })
89
89
  ]
90
- }), u && c("button", {
91
- type: "button",
92
- className: S(110),
90
+ }), a && l(S(156), {
91
+ type: S(156),
92
+ className: S(169),
93
93
  "aria-label": f,
94
94
  disabled: O,
95
- onClick: u,
96
- children: c(s, {})
95
+ onClick: a,
96
+ children: l(c, {})
97
97
  })]
98
98
  });
99
99
  }
100
- f.Chip = p;
100
+ f[t(155)] = p;
101
101
  export { p as FilterChip, f as FilterChipGroup };