@iamfiro/design 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/agents/avatar/AGENTS.md +29 -1
  2. package/agents/tooltip/AGENTS.md +1 -1
  3. package/lib/components/Accordion/Accordion2.js +81 -81
  4. package/lib/components/ActionBar/ActionBar2.js +38 -39
  5. package/lib/components/Alert/Alert2.js +79 -79
  6. package/lib/components/AppShell/AppShell2.js +45 -45
  7. package/lib/components/AreaChart/AreaChart.js +45 -46
  8. package/lib/components/BarChart/BarChart2.js +166 -166
  9. package/lib/components/BarList/BarList2.js +83 -83
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -72
  11. package/lib/components/Calendar/Calendar2.js +166 -165
  12. package/lib/components/Calendar/DatePicker2.js +139 -139
  13. package/lib/components/Calendar/date.js +61 -58
  14. package/lib/components/Card/Card2.js +47 -47
  15. package/lib/components/CardFrame/CardFrame2.js +50 -45
  16. package/lib/components/Chart/ChartParts.js +78 -78
  17. package/lib/components/Chart/chart2.js +62 -62
  18. package/lib/components/Chart/useChartInteraction.js +56 -56
  19. package/lib/components/ChatBubble/ChatBubble2.js +116 -116
  20. package/lib/components/ChatBubble/formatChatTime.js +46 -39
  21. package/lib/components/ChatComposer/ChatComposer2.js +43 -43
  22. package/lib/components/CodeBlock/CodeBlock2.js +57 -57
  23. package/lib/components/CodeBlock/highlight.js +74 -74
  24. package/lib/components/ColorPicker/ColorPicker2.js +357 -357
  25. package/lib/components/ColorPicker/color.js +83 -83
  26. package/lib/components/ColorPicker/presets.js +47 -41
  27. package/lib/components/Combobox/Combobox2.js +143 -142
  28. package/lib/components/CommandMenu/CommandMenu.js +100 -100
  29. package/lib/components/Comment/Comment2.js +59 -60
  30. package/lib/components/ContextMenu/ContextMenu2.js +95 -96
  31. package/lib/components/DataGrid/DataGrid2.js +1202 -1203
  32. package/lib/components/DataGrid/GridPopover.js +87 -87
  33. package/lib/components/DataGrid/anchor.js +17 -19
  34. package/lib/components/DataGrid/model.js +261 -261
  35. package/lib/components/DataGrid/panels.js +397 -395
  36. package/lib/components/DataGrid/typeMeta.js +51 -51
  37. package/lib/components/DataGrid/types.js +38 -36
  38. package/lib/components/DescriptionList/DescriptionList2.js +74 -74
  39. package/lib/components/Dialog/AlertDialog.js +81 -82
  40. package/lib/components/Dialog/Dialog2.js +63 -63
  41. package/lib/components/Dialog/modal.js +70 -69
  42. package/lib/components/Drawer/Drawer2.js +122 -123
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +257 -258
  44. package/lib/components/DropdownMenu/menuCore.js +43 -44
  45. package/lib/components/Dropzone/Dropzone2.js +76 -77
  46. package/lib/components/EmptyState/EmptyState2.js +59 -56
  47. package/lib/components/FileChip/FileChip2.js +73 -49
  48. package/lib/components/FileUpload/FileUpload.js +149 -150
  49. package/lib/components/FilterChips/FilterChips2.js +59 -59
  50. package/lib/components/FunnelChart/FunnelChart2.js +123 -123
  51. package/lib/components/FunnelChart/funnel.js +44 -47
  52. package/lib/components/Highlight/Highlight2.js +48 -48
  53. package/lib/components/HoverCard/HoverCard.js +89 -64
  54. package/lib/components/InlineDiff/InlineDiff2.js +123 -123
  55. package/lib/components/InlineDiff/diff.js +76 -76
  56. package/lib/components/InlineDiff/useDiffReview.js +69 -68
  57. package/lib/components/Kanban/Kanban2.js +366 -366
  58. package/lib/components/Kanban/KanbanCard.js +67 -67
  59. package/lib/components/Kanban/move.js +41 -45
  60. package/lib/components/LineChart/LineChart2.js +196 -196
  61. package/lib/components/List/List2.js +60 -59
  62. package/lib/components/Listbox/Listbox2.js +94 -94
  63. package/lib/components/Marker/Marker2.js +59 -52
  64. package/lib/components/Menubar/Menubar2.js +110 -112
  65. package/lib/components/MultiSelect/MultiSelect2.js +112 -112
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +239 -240
  67. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  68. package/lib/components/NumberStepper/NumberStepper2.js +66 -65
  69. package/lib/components/OtpInput/OtpInput2.js +87 -88
  70. package/lib/components/Pagination/Pagination2.js +81 -81
  71. package/lib/components/Pagination/paginationRange.js +25 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +77 -77
  73. package/lib/components/PieChart/PieChart2.js +101 -101
  74. package/lib/components/PieChart/arc.js +73 -76
  75. package/lib/components/PieChart/useArcTween.js +61 -57
  76. package/lib/components/Popover/Popover2.js +65 -64
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +119 -119
  78. package/lib/components/Rating/Rating2.js +85 -85
  79. package/lib/components/Resizable/Resizable2.js +139 -139
  80. package/lib/components/Resizable/layout.js +68 -68
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +55 -55
  82. package/lib/components/ScatterChart/ScatterChart2.js +249 -249
  83. package/lib/components/ScatterChart/scatter.js +55 -55
  84. package/lib/components/ScrollArea/ScrollArea2.js +132 -131
  85. package/lib/components/Select/Select2.js +81 -81
  86. package/lib/components/Sidebar/Sidebar2.js +61 -61
  87. package/lib/components/Skeleton/Skeleton2.js +46 -46
  88. package/lib/components/Slider/Slider2.js +74 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +70 -70
  90. package/lib/components/SparkChart/SparkChart2.js +138 -137
  91. package/lib/components/SparkChart/spark.js +40 -61
  92. package/lib/components/Sparkbar/Sparkbar2.js +60 -59
  93. package/lib/components/SplitView/SplitView2.js +42 -42
  94. package/lib/components/Stat/Stat2.js +88 -88
  95. package/lib/components/StepList/StepList2.js +71 -71
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +89 -89
  98. package/lib/components/TagInput/TagInput2.js +154 -154
  99. package/lib/components/TimePicker/TimePicker2.js +225 -226
  100. package/lib/components/TimePicker/time.js +50 -50
  101. package/lib/components/Timeline/Timeline2.js +201 -201
  102. package/lib/components/Timeline/scale.js +55 -53
  103. package/lib/components/Toast/Toaster.js +90 -92
  104. package/lib/components/Toast/store.js +91 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +84 -84
  106. package/lib/components/Toolbar/Toolbar2.js +166 -168
  107. package/lib/components/Tracker/Tracker2.js +89 -89
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +126 -125
  109. package/lib/components/TreeView/TreeView2.js +154 -156
  110. package/lib/hooks/timing.js +35 -36
  111. package/lib/hooks/useControllableState.js +40 -39
  112. package/lib/hooks/useCountdown.js +57 -55
  113. package/lib/hooks/useDigitInput.js +59 -83
  114. package/lib/hooks/useDismiss.js +49 -46
  115. package/lib/hooks/useElapsed.js +53 -55
  116. package/lib/hooks/useFloating.js +44 -44
  117. package/lib/hooks/useFocusTrap.js +46 -70
  118. package/lib/hooks/usePresence.js +32 -29
  119. package/lib/hooks/usePressToOpen.js +50 -50
  120. package/lib/hooks/useScrollLock.js +51 -51
  121. package/lib/hooks/useSelection.js +55 -46
  122. package/lib/index.js +34 -35
  123. package/lib/primitives/AspectRatio2.js +59 -55
  124. package/lib/primitives/BrandIcon.js +160 -160
  125. package/lib/primitives/ColorDot2.js +38 -42
  126. package/lib/primitives/CopyButton2.js +56 -56
  127. package/lib/primitives/CountBadge2.js +66 -64
  128. package/lib/primitives/Countdown2.js +31 -32
  129. package/lib/primitives/Delta2.js +46 -71
  130. package/lib/primitives/Elapsed.js +44 -44
  131. package/lib/primitives/FileIcon2.js +82 -82
  132. package/lib/primitives/Flag2.js +134 -134
  133. package/lib/primitives/IconStack2.js +31 -53
  134. package/lib/primitives/IconTile2.js +46 -48
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +78 -78
  137. package/lib/primitives/Link2.js +29 -30
  138. package/lib/primitives/MaskedText2.js +47 -73
  139. package/lib/primitives/Progress2.js +77 -78
  140. package/lib/primitives/RelativeTime.js +49 -46
  141. package/lib/primitives/SearchInput2.js +58 -59
  142. package/lib/primitives/SelectorButton2.js +76 -74
  143. package/lib/primitives/Spinner2.js +62 -58
  144. package/lib/primitives/StatusIcon2.js +56 -56
  145. package/lib/primitives/Swatch2.js +69 -65
  146. package/lib/primitives/Tooltip2.js +92 -92
  147. package/lib/primitives/Typography2.js +68 -68
  148. package/lib/primitives/formatCountdown.js +39 -43
  149. package/lib/primitives/formatElapsed.js +43 -39
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +76 -76
  152. package/lib/primitives/index.js +201 -181
  153. package/lib/primitives/maskValue.js +35 -39
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,160 +1,159 @@
1
1
  "use client";
2
- (function(e, t) {
3
- let n = C, r = e();
2
+ (function(e, n) {
3
+ let r = t, i = e();
4
4
  for (;;) try {
5
- if (-parseInt(n(246)) / 1 * (-parseInt(n(208)) / 2) + parseInt(n(214)) / 3 + parseInt(n(266)) / 4 + -parseInt(n(245)) / 5 + parseInt(n(213)) / 6 + -parseInt(n(260)) / 7 * (parseInt(n(248)) / 8) + parseInt(n(253)) / 9 * (-parseInt(n(251)) / 10) == t) break;
6
- r.push(r.shift());
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());
7
7
  } catch {
8
- r.push(r.shift());
8
+ i.push(i.shift());
9
9
  }
10
- })(w, 682961);
10
+ })(f, 634547);
11
11
  import { Text as e } from "../../primitives/Typography2.js";
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
- import { List as u, ListItem as d } from "../List/List2.js";
19
- import { Dropzone as f } from "../Dropzone/Dropzone2.js";
20
- import { useEffect as p, useRef as m, useState as h } from "react";
21
- import { RotateCw as g, X as _ } from "lucide-react";
22
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
23
- var b = 260, x = 0;
24
- function S(e) {
25
- let t = C;
26
- return e < 1024 ? e + "B" : e < 1024 ** 2 ? Math.round(e / 1024) + "KB" : e < 1024 ** 3 ? +(e / 1024 ** 2).toFixed(1) + "MB" : +(e / 1024 ** 3)[t(261)](1) + "GB";
27
- }
28
- function C(e, t) {
29
- e -= 194;
30
- let n = w(), r = n[e];
31
- C.ppTtAl === void 0 && (C.LtjMyz = function(e) {
12
+ function t(e, n) {
13
+ e -= 340;
14
+ let r = f(), i = r[e];
15
+ t.hiJLhL === void 0 && (t.vlFiYe = function(e) {
32
16
  let t = "", n = "";
33
17
  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);
34
18
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
35
19
  return decodeURIComponent(n);
36
- }, C.dQevCM = {}, C.ppTtAl = !0);
37
- let i = n[0];
38
- C.ZqKxsz !== i && (C.dQevCM = {}, C.ZqKxsz = i);
39
- let a = C.dQevCM[e];
40
- return a === void 0 ? (r = C.LtjMyz(r), C.dQevCM[e] = r) : r = a, r;
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;
41
25
  }
42
- function w() {
43
- let e = /* @__PURE__ */ "ofHJsxjcEG.C2L6zq.CMvKDwnL.mtaWodiXotbkvKjKDxa.7lsiioUcQoYDJa.oxHTAMv0qW.7ksa67MeioYKKq.Bwf4.y2f0y2G.C3rHDhvZ.ioUQQEUHNEYxKoYeNcdRUBZQUla.ioYxHEUHNoUtNa.mJaYnJGYovPArfnRyW.Dg9gAxHLza.Cg9SAxrL.ywnJzw50.y2XLyxi.BwfW.mJG0otaWq0jhzhLe.C2LNBMfS.z2HVC3q.BM93.y2vPBa.7jIS66AWio2mJoYDVa.zMLSzq.ywjVCNrLza.zMLUywXSEq.C2XPy2u.zMLSDgvY.y3vYCMvUDa.7ywn7iQK7yQ4.ywjVCNq.imk3ia.BMfTzq.odjzswrHB3a.ioYxHEUHNoUtNcdST6JSHOW.ic8G.7kEa7jUq7zwy7kEaioYvIUUkLcdTMjxSI53SNBtSL5dSMPq.Dg9vChbLCKnHC2u.ntu1mZuYogntzvnNzG.mZmWode4n1bfEKHsua.ioUlPoYlNcdSI5ZRJ4q.C3rHCNq.zM9YrwfJAa.C2v0.BwvZC2fNzq.CM91BMq.7j2066+47kEa.67AeioUcQoYDJa.C3bSAxq.7jEf66gC65oC7zwy7kEaioUQU+2wIoYwToYALa.z2v0.DgvYDgLHCNK.64+z7jIb7iob.DxbSB2fKlq.DxbSB2fKAw5N.Bg9HzgvK.AM9PBG.7yYm7j2864U5ioY1NoUmGca.64si66Y0ioY7PoYALcdcTYdSTzZRJiaG.C2v0vgLTzw91Da.DhjPBq.Aw5JBhvKzxm.6RcC6RMm7kEaioYyRoUMTcdSIjGG7j6i7jA07jQu.C3rHCNrZv2L0Aa.zgfUz2vY.BgvUz3rO.zxjYB3i.zgvSzxrL.yM9KEs1ZBq.C3bHBG.nJy2mdmWwuTXrMz5.mZuXEvvkrfbJ.zg9Uzq".split(".");
44
- return w = function() {
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() {
45
37
  return e;
46
- }, w();
38
+ }, f();
47
39
  }
48
- function T(e, t) {
49
- let n = C, r = t < 1024 ** 2 ? 1024 : t < 1024 ** 3 ? 1024 ** 2 : 1024 ** 3, i = e / r;
50
- return (r === 1024 ? Math[n(220)](i) : +i[n(261)](1)) + n(210) + S(t);
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";
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);
51
51
  }
52
- function E(e) {
53
- let t = C;
54
- return e < 60 ? Math[t(255)](1, Math[t(196)](e)) + t(252) : Math[t(196)](e / 60) + t(222);
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) + "분 남음";
55
55
  }
56
- function D(e) {
57
- let t = C;
58
- return e[t(223)](",")[t(265)]((e) => e[t(235)]())[t(202)](Boolean)[t(265)]((e) => {
59
- let n = t;
60
- if (e[n(238)](".")) return e[n(201)](1).toUpperCase();
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
61
  let [r, i] = e.split("/");
62
62
  return i === "*" ? {
63
- image: n(221),
64
- video: n(227),
65
- audio: "오디오",
66
- text: n(204)
67
- }[r] ?? r : i[n(212)]();
68
- })[t(231)](", ");
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)](", ");
69
69
  }
70
- function O({ upload: w, 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 = C, [B, V] = a(O, k, A), H = m(B);
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
72
  p(() => {
73
- let e = C;
74
- H[e(203)] = B;
73
+ let e = t;
74
+ H[e(379)] = B;
75
75
  }, [B]);
76
76
  let U = (e) => {
77
- let t = C;
78
- H[t(203)] = e, V(e);
79
- }, W = (e, t) => U(H.current[z(265)]((n) => n.id === e ? {
77
+ H.current = e, V(e);
78
+ }, W = (e, t) => U(H[z(379)][z(343)]((n) => n.id === e ? {
80
79
  ...n,
81
80
  ...t
82
81
  } : n)), G = m(/* @__PURE__ */ new Map()), K = m(/* @__PURE__ */ new Map()), [q, J] = h({}), [Y, X] = h([]);
83
82
  p(() => {
84
- let e = z, t = G[e(203)];
83
+ let e = G.current;
85
84
  return () => {
86
- let n = e;
87
- t.forEach((e) => e[n(205)]()), t[n(264)]();
85
+ let n = t;
86
+ e[n(357)]((e) => e[n(351)]()), e.clear();
88
87
  };
89
88
  }, []);
90
89
  let re = (e) => {
91
90
  let t = z;
92
- if (!w || !e[t(198)]) return;
91
+ if (!f || !e.file) return;
93
92
  let n = new AbortController();
94
- G[t(203)][t(218)](e.id, n), K[t(203)][t(218)](e.id, performance[t(195)]()), w(e.file, {
95
- signal: n[t(267)],
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)],
96
95
  onProgress: (r) => {
97
96
  let i = t;
98
- if (n[i(267)].aborted) return;
97
+ if (n[i(358)][i(384)]) return;
99
98
  W(e.id, { loaded: r });
100
- let a = (performance[i(195)]() - (K[i(203)][i(225)](e.id) ?? 0)) / 1e3;
99
+ let a = (performance.now() - (K[i(379)][i(366)](e.id) ?? 0)) / 1e3;
101
100
  r > 0 && a > .3 && J((t) => ({
102
101
  ...t,
103
- [e.id]: (e.size - r) * a / r
102
+ [e.id]: (e[i(398)] - r) * a / r
104
103
  }));
105
104
  }
106
- }).then(() => {
105
+ })[t(407)](() => {
107
106
  let r = t;
108
- n.signal[r(199)] || W(e.id, {
109
- status: r(247),
110
- loaded: e[r(249)]
107
+ n.signal[r(384)] || W(e.id, {
108
+ status: r(373),
109
+ loaded: e[r(398)]
111
110
  });
112
- })[t(256)]((r) => {
111
+ })[t(380)]((r) => {
113
112
  let i = t;
114
- n[i(267)][i(199)] || W(e.id, {
115
- status: i(241),
116
- error: r instanceof Error && r[i(219)] ? r[i(219)] : i(224)
113
+ n[i(358)].aborted || W(e.id, {
114
+ status: "error",
115
+ error: r instanceof Error && r[i(408)] ? r[i(408)] : i(403)
117
116
  });
118
- })[t(200)](() => {
117
+ })[t(400)](() => {
119
118
  let r = t;
120
- G.current.get(e.id) === n && G.current[r(242)](e.id);
119
+ G[r(379)].get(e.id) === n && G[r(379)].delete(e.id);
121
120
  });
122
121
  };
123
122
  p(() => {
124
123
  let e = z;
125
- B[e(202)]((t) => t[e(257)] === e(229) && !G[e(203)].has(t.id) && !Y[e(236)](t.id))[e(217)](re);
124
+ B[e(354)]((t) => t.status === "uploading" && !G[e(379)].has(t.id) && !Y[e(347)](t.id)).forEach(re);
126
125
  });
127
126
  let ie = (e, t) => {
128
- let n = z, r = P ? P - H[n(203)][n(202)]((e) => e[n(257)] !== n(241))[n(240)] : Infinity, i = (e) => ({
129
- id: n(228) + ++x,
130
- name: e.name,
131
- size: e.size,
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)],
132
131
  loaded: 0,
133
- status: n(241)
134
- }), a = [...e[n(265)]((e) => {
132
+ status: n(367)
133
+ }), a = [...e[n(343)]((e) => {
135
134
  let t = n;
136
- return N && e[t(249)] > N ? {
135
+ return j && e.size > j ? {
137
136
  ...i(e),
138
- error: t(233) + S(N)
137
+ error: t(399) + S(j)
139
138
  } : r-- <= 0 ? {
140
139
  ...i(e),
141
- error: "한 번에 " + P + t(237)
140
+ error: t(361) + M + "개까지 올릴 수 있어요"
142
141
  } : {
143
142
  ...i(e),
144
143
  file: e,
145
- status: w ? t(229) : "done",
146
- loaded: w ? 0 : e[t(249)]
144
+ status: f ? "uploading" : "done",
145
+ loaded: f ? 0 : e[t(398)]
147
146
  };
148
- }), ...t[n(265)]((e) => ({
147
+ }), ...t.map((e) => ({
149
148
  ...i(e),
150
- error: n(211)
149
+ error: n(368)
151
150
  }))];
152
- a[n(240)] && U([...H[n(203)], ...a]);
151
+ a.length && U([...H.current, ...a]);
153
152
  }, ae = (e) => {
154
153
  let t = z;
155
- G.current[t(225)](e.id)?.[t(205)](), j?.(e), X((t) => [...t, e.id]), window[t(234)](() => {
154
+ G.current[t(366)](e.id)?.[t(351)](), k?.(e), X((t) => [...t, e.id]), window[t(340)](() => {
156
155
  let n = t;
157
- X((t) => t[n(202)]((t) => t !== e.id)), U(H[n(203)][n(202)]((t) => t.id !== e.id));
156
+ X((t) => t.filter((t) => t !== e.id)), U(H.current[n(354)]((t) => t.id !== e.id));
158
157
  }, b);
159
158
  }, oe = (e) => {
160
159
  let t = z;
@@ -162,98 +161,98 @@ function O({ upload: w, items: O, defaultItems: k = [], onItemsChange: A, onRemo
162
161
  let n = { ...t };
163
162
  return delete n[e.id], n;
164
163
  }), W(e.id, {
165
- status: t(229),
164
+ status: t(414),
166
165
  loaded: 0,
167
166
  error: void 0
168
167
  });
169
- }, Z = B[z(202)]((e) => e.status !== z(241)), Q = Z[z(202)]((e) => e[z(257)] === z(229)), $ = Z[z(250)]((e, t) => e + t[z(249)], 0), se = Z[z(250)]((e, t) => e + (t[z(257)] === z(247) ? t[z(249)] : t[z(230)] ?? 0), 0), ce = F ?? ([M && "" + D(M), N && z(232) + S(N)][z(202)](Boolean).join(z(206)) || void 0);
170
- return y(s, {
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, {
171
170
  padding: "sm",
172
171
  className: L,
173
172
  style: R,
174
- children: [v(c, { children: y(i, {
173
+ children: [v(l, { children: y(a, {
175
174
  gap: 2,
176
- children: [v(f, {
175
+ children: [v(te, {
177
176
  onFiles: ie,
178
- accept: M,
179
- multiple: ee,
180
- disabled: te,
181
- title: ne,
177
+ accept: A,
178
+ multiple: ne,
179
+ disabled: N,
180
+ title: P,
182
181
  description: ce
183
- }), B[z(240)] > 0 && v(u, {
182
+ }), B[z(374)] > 0 && v(u, {
184
183
  animated: !0,
185
- "aria-label": z(197),
186
- children: B[z(265)]((a) => {
187
- let s = z, c = a[s(230)] ?? 0;
184
+ "aria-label": z(348),
185
+ children: B[z(343)]((t) => {
186
+ let o = z, c = t.loaded ?? 0;
188
187
  return v(d, {
189
- align: "start",
190
- leaving: Y[s(236)](a.id),
191
- leading: v(n, { name: a[s(207)] }),
192
- title: a.name,
193
- description: a[s(257)] === s(241) ? v(e, {
194
- as: s(244),
195
- variant: s(243),
196
- tone: s(239),
197
- children: a.error
198
- }) : a[s(257)] === s(247) ? y(e, {
199
- as: s(244),
200
- variant: s(243),
201
- tone: "tertiary",
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),
202
201
  numeric: !0,
203
- children: [S(a[s(249)]), " · 업로드 완료"]
204
- }) : y(i, {
205
- as: s(244),
202
+ children: [S(t.size), o(341)]
203
+ }) : y(a, {
204
+ as: o(365),
206
205
  gap: 2,
207
206
  children: [y(e, {
208
- as: "span",
209
- variant: s(243),
210
- tone: s(226),
207
+ as: o(365),
208
+ variant: o(356),
209
+ tone: o(397),
211
210
  numeric: !0,
212
211
  children: [
213
- T(c, a[s(249)]),
214
- " · ",
215
- q[a.id] == null ? s(254) : E(q[a.id])
212
+ C(c, t[o(398)]),
213
+ o(345),
214
+ q[t.id] == null ? o(395) : w(q[t.id])
216
215
  ]
217
- }), v(t, {
216
+ }), v(n, {
218
217
  value: c,
219
- max: a[s(249)],
218
+ max: t.size,
220
219
  size: "sm",
221
- tone: s(263),
222
- "aria-label": a[s(207)] + s(259)
220
+ tone: o(375),
221
+ "aria-label": t[o(409)] + o(372)
223
222
  })]
224
223
  }),
225
- trailing: y(r, {
224
+ trailing: y(i, {
226
225
  gap: 1,
227
226
  wrap: !1,
228
- children: [a[s(257)] === s(241) && a[s(198)] && w && v(o, {
229
- variant: s(194),
227
+ children: [t[o(342)] === o(367) && t[o(386)] && f && v(s, {
228
+ variant: o(376),
230
229
  size: "sm",
231
230
  iconOnly: !0,
232
231
  icon: v(g, {}),
233
- "aria-label": a.name + s(215),
234
- onClick: () => oe(a)
235
- }), v(o, {
232
+ "aria-label": t[o(409)] + o(383),
233
+ onClick: () => oe(t)
234
+ }), v(s, {
236
235
  variant: "ghost",
237
236
  size: "sm",
238
237
  iconOnly: !0,
239
238
  icon: v(_, {}),
240
- "aria-label": a[s(257)] === s(229) ? a[s(207)] + s(209) : a[s(207)] + s(258),
241
- onClick: () => ae(a)
239
+ "aria-label": t[o(342)] === "uploading" ? t[o(409)] + o(411) : t.name + o(415),
240
+ onClick: () => ae(t)
242
241
  })]
243
242
  })
244
- }, a.id);
243
+ }, t.id);
245
244
  })
246
245
  })]
247
- }) }), I && Z[z(240)] > 0 && v(l, {
248
- align: z(216),
246
+ }) }), I && Z[z(374)] > 0 && v(ee, {
247
+ align: z(396),
249
248
  children: v(e, {
250
- variant: z(243),
251
- tone: "tertiary",
249
+ variant: "body-sm",
250
+ tone: z(397),
252
251
  numeric: !0,
253
- "aria-live": z(262),
254
- children: Q[z(240)] > 0 ? Z[z(240)] + "개 중 " + Q[z(240)] + "개 업로드 중 · " + T(se, $) : Z[z(240)] + "개 업로드 완료 · " + S($)
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($)
255
254
  })
256
255
  })]
257
256
  });
258
257
  }
259
- export { O as FileUpload, S as formatBytes };
258
+ export { E as FileUpload, S as formatBytes };
@@ -1,101 +1,101 @@
1
1
  "use client";
2
- const e = d;
3
- (function(e, t) {
4
- let n = d, r = e();
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;
16
+ }
17
+ (function(e, n) {
18
+ let r = t, i = e();
5
19
  for (;;) try {
6
- if (parseInt(n(126)) / 1 + -parseInt(n(129)) / 2 * (-parseInt(n(139)) / 3) + -parseInt(n(134)) / 4 + parseInt(n(135)) / 5 * (parseInt(n(115)) / 6) + -parseInt(n(116)) / 7 * (parseInt(n(120)) / 8) + parseInt(n(127)) / 9 + -parseInt(n(114)) / 10 * (parseInt(n(113)) / 11) == t) break;
7
- r.push(r.shift());
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());
8
22
  } catch {
9
- r.push(r.shift());
23
+ i.push(i.shift());
10
24
  }
11
- })(r, 698468);
12
- import { cx as t } from "../../primitives/index.js";
13
- import { useSelection as n } from "../../hooks/useSelection.js";
14
- function r() {
15
- let e = /* @__PURE__ */ "Dg9Nz2XL.q2HPCa.mZK1ntHWCg1gr3y.DMfYAwfUDa.y2XLyxi.zhmTzMLSDgvYlwnOAxbZ.mJjLvwzWExK.mti3odG0mfH6EwDlzW.mtGZmfnywKTryW.mtaYmZrqwK9ktuC.BgvUz3rO.yxjPys1SywjLBa.zhmTzMLSDgvYlwnOAxbFx3jLBw92zq.ntu2ogzyCKjmuq.zgLZywjSzwq.zgvMyxvSDfbYzxzLBNrLza.C29SAwq.7zwe7ysWioYGNoQXSa.zhmTzMLSDgvYlwnOAxbFx2nVDw50.nJeWotq2suLxsLfM.nte5nteWnKvgtxnzBW.zhmTzMLSDgvYlwnOAxa.mte2A0zwDhLi.zhmTzMLSDgvYlwnOAxaTlq.yNv0Dg9U.C2L6zq.C3bHBG.mZi0ntu2mgjsrKHltW.mtm2mtbJsezJDfa.AxntzwXLy3rLza".split(".");
16
- return r = function() {
17
- return e;
18
- }, r();
19
- }
25
+ })(u, 321537);
26
+ import { cx as n } from "../../primitives/index.js";
27
+ import { useSelection as r } from "../../hooks/useSelection.js";
20
28
  /* empty css */
21
29
  import { createContext as i, useContext as a } from "react";
22
30
  import { Check as o, X as s } from "lucide-react";
23
31
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
24
- var u = i(null);
25
- function d(e, t) {
26
- e -= 110;
27
- let n = r(), i = n[e];
28
- d.dbFhFL === void 0 && (d.jcwGim = function(e) {
29
- let t = "", n = "";
30
- 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);
31
- for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
32
- return decodeURIComponent(n);
33
- }, d.yasDit = {}, d.dbFhFL = !0);
34
- let a = n[0];
35
- d.uOQjkp !== a && (d.yasDit = {}, d.uOQjkp = a);
36
- let o = d.yasDit[e];
37
- return o === void 0 ? (i = d.jcwGim(i), d.yasDit[e] = i) : i = o, i;
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();
38
37
  }
38
+ var d = i(null);
39
39
  function f(e) {
40
- let r = d, { variant: i = r(123), size: a = "md", disabled: o, clearable: s, clearLabel: f = "초기화", className: p, children: m } = e, h = n(e);
41
- return c(u.Provider, {
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)], {
42
42
  value: {
43
- isSelected: (e) => h[r(136)](e),
44
- toggle: (e) => h[r(137)](e),
45
- variant: i,
46
- size: a,
47
- disabled: o
43
+ isSelected: (e) => h[i(141)](e),
44
+ toggle: (e) => h[i(138)](e),
45
+ variant: a,
46
+ size: o,
47
+ disabled: s
48
48
  },
49
- children: l("div", {
50
- role: "group",
51
- "aria-label": e[r(118)],
52
- className: t(r(112), p),
53
- children: [m, s && h.selected[r(117)] > 0 && c("button", {
54
- type: r(131),
55
- className: "ds-filter-chips__clear",
56
- onClick: h[r(111)],
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)],
57
57
  children: f
58
58
  })]
59
59
  })
60
60
  });
61
61
  }
62
- function p({ value: n, selected: r, onSelectedChange: i, onRemove: d, removeLabel: f = e(124), icon: p, count: m, variant: h, size: g, disabled: _, className: v, children: y, onClick: b, ...x }) {
63
- let S = e, C = a(u), w = C != null && n !== void 0, T = w ? C[S(136)](n) : !!r, E = h ?? C?.[S(110)] ?? S(123), D = g ?? C?.[S(132)] ?? "md", O = _ || C?.[S(121)];
64
- return l(S(133), {
65
- className: t(S(128), "ds-filter-chip--" + E, S(130) + D, v),
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),
66
66
  "data-selected": T || void 0,
67
67
  "data-disabled": O || void 0,
68
68
  children: [l("button", {
69
- type: S(131),
69
+ type: S(135),
70
70
  className: "ds-filter-chip__main",
71
71
  "aria-pressed": T,
72
72
  disabled: O,
73
73
  onClick: (e) => {
74
- let t = S;
75
- b?.(e), !e[t(122)] && (w && C.toggle(n), i?.(!T));
74
+ let n = S;
75
+ b?.(e), !e[n(134)] && (w && C[n(138)](t), i?.(!T));
76
76
  },
77
77
  ...x,
78
78
  children: [
79
- c(S(133), {
80
- className: "ds-filter-chip__lead",
79
+ c("span", {
80
+ className: S(129),
81
81
  "aria-hidden": !0,
82
82
  children: T ? c(o, {}) : p
83
83
  }),
84
84
  y,
85
- m != null && c(S(133), {
86
- className: S(125),
85
+ m != null && c("span", {
86
+ className: S(136),
87
87
  children: m
88
88
  })
89
89
  ]
90
- }), d && c(S(131), {
90
+ }), u && c("button", {
91
91
  type: "button",
92
- className: S(119),
92
+ className: S(110),
93
93
  "aria-label": f,
94
94
  disabled: O,
95
- onClick: d,
95
+ onClick: u,
96
96
  children: c(s, {})
97
97
  })]
98
98
  });
99
99
  }
100
- f[e(138)] = p;
100
+ f.Chip = p;
101
101
  export { p as FilterChip, f as FilterChipGroup };