@iamfiro/design 0.1.0 → 0.3.0

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 (160) hide show
  1. package/AGENTS.md +1 -0
  2. package/agents/INDEX.md +1 -0
  3. package/agents/brand-icon/AGENTS.md +2 -2
  4. package/agents/social-login-button/AGENTS.md +156 -0
  5. package/lib/components/Accordion/Accordion2.js +135 -0
  6. package/lib/components/ActionBar/ActionBar2.js +65 -0
  7. package/lib/components/Alert/Alert2.js +131 -0
  8. package/lib/components/AppShell/AppShell2.js +94 -0
  9. package/lib/components/AreaChart/AreaChart.js +59 -0
  10. package/lib/components/BarChart/BarChart2.js +243 -0
  11. package/lib/components/BarList/BarList2.js +172 -0
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +87 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +229 -0
  15. package/lib/components/Calendar/date.js +121 -0
  16. package/lib/components/Card/Card2.js +104 -0
  17. package/lib/components/CardFrame/CardFrame2.js +72 -0
  18. package/lib/components/Chart/ChartParts.js +150 -0
  19. package/lib/components/Chart/chart2.js +96 -0
  20. package/lib/components/Chart/useChartInteraction.js +94 -0
  21. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  22. package/lib/components/ChatBubble/formatChatTime.js +53 -0
  23. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  24. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  25. package/lib/components/CodeBlock/highlight.js +114 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +610 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +75 -0
  29. package/lib/components/Combobox/Combobox2.js +229 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +134 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1996 -0
  34. package/lib/components/DataGrid/GridPopover.js +154 -0
  35. package/lib/components/DataGrid/anchor.js +50 -0
  36. package/lib/components/DataGrid/model.js +558 -0
  37. package/lib/components/DataGrid/panels.js +703 -0
  38. package/lib/components/DataGrid/typeMeta.js +76 -0
  39. package/lib/components/DataGrid/types.js +54 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +118 -0
  42. package/lib/components/Dialog/Dialog2.js +109 -0
  43. package/lib/components/Dialog/modal.js +92 -0
  44. package/lib/components/Drawer/Drawer2.js +244 -0
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +144 -0
  48. package/lib/components/EmptyState/EmptyState2.js +72 -0
  49. package/lib/components/FileChip/FileChip2.js +118 -0
  50. package/lib/components/FileUpload/FileUpload.js +258 -0
  51. package/lib/components/FilterChips/FilterChips2.js +101 -0
  52. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  53. package/lib/components/FunnelChart/funnel.js +69 -0
  54. package/lib/components/Highlight/Highlight2.js +100 -0
  55. package/lib/components/HoverCard/HoverCard.js +134 -0
  56. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  57. package/lib/components/InlineDiff/diff.js +126 -0
  58. package/lib/components/InlineDiff/useDiffReview.js +109 -0
  59. package/lib/components/Kanban/Kanban2.js +691 -0
  60. package/lib/components/Kanban/KanbanCard.js +159 -0
  61. package/lib/components/Kanban/move.js +69 -0
  62. package/lib/components/LineChart/LineChart2.js +342 -0
  63. package/lib/components/List/List2.js +133 -0
  64. package/lib/components/Listbox/Listbox2.js +163 -0
  65. package/lib/components/Marker/Marker2.js +82 -0
  66. package/lib/components/Menubar/Menubar2.js +223 -0
  67. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  69. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  70. package/lib/components/NumberStepper/NumberStepper2.js +129 -0
  71. package/lib/components/OtpInput/OtpInput2.js +122 -0
  72. package/lib/components/Pagination/Pagination2.js +210 -0
  73. package/lib/components/Pagination/paginationRange.js +53 -0
  74. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  75. package/lib/components/PieChart/PieChart2.js +246 -0
  76. package/lib/components/PieChart/arc.js +66 -0
  77. package/lib/components/PieChart/useArcTween.js +94 -0
  78. package/lib/components/Popover/Popover2.js +112 -0
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  80. package/lib/components/Rating/Rating2.js +186 -0
  81. package/lib/components/Resizable/Resizable2.js +236 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +356 -0
  85. package/lib/components/ScatterChart/scatter.js +83 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +218 -0
  87. package/lib/components/Select/Select2.js +153 -0
  88. package/lib/components/Sidebar/Sidebar2.js +127 -0
  89. package/lib/components/Skeleton/Skeleton2.js +91 -0
  90. package/lib/components/Slider/Slider2.js +142 -0
  91. package/lib/components/SocialLoginButton/SocialLoginButton.js +85 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +76 -0
  94. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  95. package/lib/components/SplitView/SplitView2.js +95 -0
  96. package/lib/components/Stat/Stat2.js +164 -0
  97. package/lib/components/StepList/StepList2.js +131 -0
  98. package/lib/components/Table/Table2.js +104 -0
  99. package/lib/components/Tabs/Tabs2.js +131 -0
  100. package/lib/components/TagInput/TagInput2.js +360 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +83 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +83 -0
  105. package/lib/components/Toast/Toaster.js +212 -0
  106. package/lib/components/Toast/store.js +129 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +281 -0
  109. package/lib/components/Tracker/Tracker2.js +172 -0
  110. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  111. package/lib/components/TreeView/TreeView2.js +284 -0
  112. package/lib/hooks/timing.js +55 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +80 -0
  115. package/lib/hooks/useDigitInput.js +105 -0
  116. package/lib/hooks/useDismiss.js +71 -0
  117. package/lib/hooks/useElapsed.js +83 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +61 -0
  120. package/lib/hooks/usePresence.js +60 -0
  121. package/lib/hooks/usePressToOpen.js +69 -0
  122. package/lib/hooks/useScrollLock.js +70 -0
  123. package/lib/hooks/useSelection.js +68 -0
  124. package/lib/index.js +175 -17911
  125. package/lib/primitives/AspectRatio2.js +80 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +70 -0
  128. package/lib/primitives/CopyButton2.js +85 -0
  129. package/lib/primitives/CountBadge2.js +78 -0
  130. package/lib/primitives/Countdown2.js +65 -0
  131. package/lib/primitives/Delta2.js +67 -0
  132. package/lib/primitives/Elapsed.js +62 -0
  133. package/lib/primitives/FileIcon2.js +125 -0
  134. package/lib/primitives/Flag2.js +263 -0
  135. package/lib/primitives/IconStack2.js +85 -0
  136. package/lib/primitives/IconTile2.js +68 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +53 -0
  140. package/lib/primitives/MaskedText2.js +120 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +84 -0
  143. package/lib/primitives/SearchInput2.js +84 -0
  144. package/lib/primitives/SelectorButton2.js +97 -0
  145. package/lib/primitives/Spinner2.js +98 -0
  146. package/lib/primitives/StatusIcon2.js +126 -0
  147. package/lib/primitives/Swatch2.js +79 -0
  148. package/lib/primitives/Tooltip2.js +132 -0
  149. package/lib/primitives/Typography2.js +97 -0
  150. package/lib/primitives/formatCountdown.js +51 -0
  151. package/lib/primitives/formatElapsed.js +66 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +352 -0
  155. package/lib/primitives/maskValue.js +65 -0
  156. package/lib/style.css +1 -1
  157. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  158. package/lib/types/components/index.d.ts +2 -0
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,691 @@
1
+ "use client";
2
+ const e = m;
3
+ (function(e, t) {
4
+ let n = m, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(341)) / 1 * (-parseInt(n(290)) / 2) + -parseInt(n(301)) / 3 * (parseInt(n(316)) / 4) + parseInt(n(372)) / 5 * (-parseInt(n(364)) / 6) + -parseInt(n(288)) / 7 + -parseInt(n(337)) / 8 + -parseInt(n(212)) / 9 * (-parseInt(n(362)) / 10) + parseInt(n(276)) / 11 == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(p, 945763);
12
+ import { TIMING as t } from "../../hooks/timing.js";
13
+ import { Text as n } from "../../primitives/Typography2.js";
14
+ import { ColorDot as r } from "../../primitives/ColorDot2.js";
15
+ import { Inline as i, Stack as a } from "../../primitives/Layout2.js";
16
+ import { CountBadge as o } from "../../primitives/CountBadge2.js";
17
+ import { useControllableState as s } from "../../hooks/useControllableState.js";
18
+ import { Badge as c, Button as l, Textarea as u, cx as d } from "../../primitives/index.js";
19
+ import { KanbanCard as f } from "./KanbanCard.js";
20
+ function p() {
21
+ let e = /* @__PURE__ */ "7kEe7zAjio2vNoUpHca.rw50zxi.CgHHC2u.y2f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KzZROzWG7jIU6RIW6RoGioYkPo2oMoYDToYkPoUHNcdRHPpSLytSMPqUioY3QoYgJoUkLcbfC2mU.C3r5Bgu.B2zMC2v0wq.CMvSyxrLzfrHCMDLDa.C2vJDgLVBG.AgLKzgvU.mtq0ote0nJzWzhjPs00.rxnJyxbL.ywjZ.yNv0Dg9U.zg9JDw1LBNrfBgvTzw50.C2v0vgLTzw91Da.7kcC7j6q66AS7jEqioUgK+YvMoYwToYALc4.zM9YrwfJAa.y2fUy2vS.DgL0Bgu.zhmTA2fUyMfUx190CMfJAW.Aw5KzxG.mteXnde2mJDrvMzrBgq.y2LYy2XL.ngnYs3ryCq.zw50zxi.zhmTA2fUyMfUx19IBg9JA2vK.zgf0yxnLDa.lMrZlwTHBMjHBL9FzM9VDa.7jIU6RIW6RIW66w8ioY3QoYgJo2wIoYwToYALc4G4Ocy.A2v5.BgvUz3rO.DhjHBNnMB3jT.rw5K.qxjYB3DvCa.otqYuuLor05U.zhmTA2fUyMfUx19SAxn0igrZlxnJCM9SBa.CM91BMq.Dg91y2G.BtqY.6RcC6RcaioYWVoYwToYALa.Cg9PBNrLCLr5Cgu.ioYxTdOG.Cg9PBNrLCMnHBMnLBa.zNjVBq.BgfIzwW.A2v5yM9HCMq.qxjYB3DeB3DU.C2nYB2XStgvMDa.yxnZzxj0AxzL.odu3mK92AuTMta.zhmTA2fUyMfUx19MB290".split(".");
22
+ return p = function() {
23
+ return e;
24
+ }, p();
25
+ }
26
+ function m(e, t) {
27
+ e -= 197;
28
+ let n = p(), r = n[e];
29
+ m.fjagDV === void 0 && (m.IHYJOB = function(e) {
30
+ let t = "", n = "";
31
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
32
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
33
+ return decodeURIComponent(n);
34
+ }, m.QvlvSh = {}, m.fjagDV = !0);
35
+ let i = n[0];
36
+ m.ygTMut !== i && (m.QvlvSh = {}, m.ygTMut = i);
37
+ let a = m.QvlvSh[e];
38
+ return a === void 0 ? (r = m.IHYJOB(r), m.QvlvSh[e] = r) : r = a, r;
39
+ }
40
+ import { locateKanbanItem as h, moveKanbanItem as g } from "./move.js";
41
+ /* empty css */
42
+ import { useCallback as _, useEffect as v, useId as y, useLayoutEffect as b, useRef as x, useState as S } from "react";
43
+ import { Plus as C } from "lucide-react";
44
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
45
+ import { createPortal as ee } from "react-dom";
46
+ var E = e(353), te = "cubic-bezier(0.32, 0.72, 0, 1)", D = 64, ne = 22, re = {};
47
+ function ie(t, n, r) {
48
+ let i = e, a = {}, o = r ? h(n, r.id)?.item : void 0;
49
+ for (let e of t) {
50
+ let t = n[e.id] ?? [];
51
+ if (!r || !o || r[i(320)] === i(334)) {
52
+ a[e.id] = t[i(253)]((e) => ({
53
+ type: i(211),
54
+ item: e,
55
+ hidden: r?.[i(320)] === i(334) && e.id === r.id
56
+ }));
57
+ continue;
58
+ }
59
+ let s = t[i(269)]((e) => e.id !== r.id)[i(253)]((e) => ({
60
+ type: i(211),
61
+ item: e
62
+ })), c = r[i(221)] ?? r.from;
63
+ c.columnId === e.id && s.splice(c[i(287)], 0, r[i(361)] === i(255) ? { type: i(218) } : {
64
+ type: i(211),
65
+ item: o,
66
+ lifted: !0
67
+ }), a[e.id] = s;
68
+ }
69
+ return a;
70
+ }
71
+ var O = (t) => typeof CSS !== e(349) && CSS[e(200)] ? CSS[e(200)](t) : t[e(369)](/"/g, "\\\""), k = (t) => Math[e(303)](Math.min(1, Math[e(230)](0, t / D)) ** 2 * ne), ae = (e, t, n) => e < t + D ? -k(t + D - e) : e > n - D ? k(e - (n - D)) : 0, oe = (t) => {
72
+ let n = e, r = t[n(285)];
73
+ return typeof r === n(355) ? r : t.id;
74
+ }, A = (t) => t?.[e(311)] ?? (typeof t?.[e(285)] == "string" ? t.title : t?.id ?? "");
75
+ function j({ columns: l, value: u, defaultValue: p, onValueChange: C, canMove: D, renderCard: ne, onCardOpen: k, onCardAdd: j, columnActions: ce, getItemLabel: M = oe, columnWidth: le = 288, emptyLabel: ue = "비어 있어요", "aria-label": de = "칸반 보드", className: fe, style: pe }) {
76
+ let N = e, [P, me] = s(u, p ?? re), [F, he] = S(null), [I, ge] = S(null), [_e, ve] = S(""), L = y(), R = x(null), z = x(null), B = x(/* @__PURE__ */ new Map()), V = x(/* @__PURE__ */ new Map()), H = x(null), U = x({
77
+ x: 0,
78
+ y: 0,
79
+ offsetX: 0,
80
+ offsetY: 0
81
+ }), W = x(null), G = x(!1), K = x(!1), ye = x(/* @__PURE__ */ new Map()), q = x({
82
+ value: P,
83
+ columns: l,
84
+ canMove: D,
85
+ onValueChange: C,
86
+ getItemLabel: M
87
+ });
88
+ b(() => {
89
+ let e = m;
90
+ q[e(248)] = {
91
+ value: P,
92
+ columns: l,
93
+ canMove: D,
94
+ onValueChange: C,
95
+ getItemLabel: M
96
+ };
97
+ });
98
+ let J = _((e) => {
99
+ let t = m;
100
+ H[t(248)] = e, he(e);
101
+ }, []), Y = _((e) => ve(e), []), X = _((e) => {
102
+ let t = m, { value: n, onValueChange: r } = q[t(248)], i = g(n, e[t(211)].id, e.to);
103
+ me(i), r?.(i, e);
104
+ }, [me]), Z = _((e) => {
105
+ let t = m, { value: n, columns: r, canMove: i } = q[t(248)];
106
+ if (e[t(310)].columnId === e.to[t(363)]) return !0;
107
+ let a = r[t(365)]((n) => n.id === e.to[t(363)]), o = n[e.to[t(363)]]?.[t(297)] ?? 0;
108
+ if (a?.[t(205)] != null && a.limitMode === t(333) && o >= a[t(205)]) return t(318) + a[t(205)] + t(306);
109
+ let s = i?.(e) ?? !0;
110
+ return s === !0 ? !0 : typeof s === t(355) ? s : t(225);
111
+ }, []);
112
+ b(() => {
113
+ let e = m, t = R.current;
114
+ if (!t) return;
115
+ let n = ye[e(248)], r = /* @__PURE__ */ new Map(), i = (t) => V[e(248)][e(202)](t)?.scrollTop ?? 0;
116
+ if (t[e(206)]("[data-kanban-key]").forEach((t) => {
117
+ let a = e, o = t[a(332)], s = o[a(293)][a(250)] ?? "", c = t[a(293)][a(213)] ?? "", l = o.offsetLeft + t[a(368)], u = o[a(219)] + t[a(219)];
118
+ r[a(358)](c, {
119
+ col: s,
120
+ x: l,
121
+ y: u
122
+ });
123
+ let d = n.get(c);
124
+ if (!d || c === E) return;
125
+ let f = 0, p = 0, m = t.getAnimations()[a(269)]((e) => e.id === "kanban-flip");
126
+ if (m[a(297)]) {
127
+ let e = new DOMMatrixReadOnly(getComputedStyle(t)[a(298)]);
128
+ f = e.m41, p = e[a(305)], m[a(283)]((e) => e[a(284)]());
129
+ }
130
+ let h = d.x - l + f, g = d.y - i(d.col) - (u - i(s)) + p;
131
+ if (Math.abs(h) < .5 && Math[a(278)](g) < .5) return;
132
+ let _ = t.animate([{ transform: a(266) + h + a(258) + g + a(352) }, { transform: "translate(0, 0)" }], {
133
+ duration: 320,
134
+ easing: te
135
+ });
136
+ _.id = a(199);
137
+ }), ye.current = r, K.current) {
138
+ K.current = !1;
139
+ let n = H[e(248)]?.id ?? I, r = n ? t[e(325)](e(340) + O(n) + "\"]") : null;
140
+ r && document[e(201)] !== r && r[e(210)]({ preventScroll: !0 }), r?.scrollIntoView({
141
+ block: "nearest",
142
+ inline: e(339)
143
+ });
144
+ }
145
+ });
146
+ let Q = _(() => {
147
+ let e = m, t = z[e(248)];
148
+ if (!t) return;
149
+ let n = U[e(248)];
150
+ t.style[e(298)] = e(324) + (n.x - n.offsetX) + e(258) + (n.y - n[e(272)]) + e(346);
151
+ }, []), be = _((e) => {
152
+ let t = m, n = null, r = Infinity;
153
+ for (let i of q[t(248)][t(220)]) {
154
+ let a = B.current[t(202)](i.id);
155
+ if (!a) continue;
156
+ let o = a[t(197)](), s = e < o[t(254)] ? o[t(254)] - e : e > o[t(370)] ? e - o[t(370)] : 0;
157
+ s < r && (n = i.id, r = s);
158
+ }
159
+ return n;
160
+ }, []), xe = _((e, t) => {
161
+ let n = m, r = V[n(248)][n(202)](e);
162
+ if (!r) return 0;
163
+ let i = t - r.getBoundingClientRect()[n(246)] + r.scrollTop, a = 0;
164
+ return r[n(206)](n(235))[n(283)]((e) => {
165
+ let t = n;
166
+ e[t(293)][t(213)] !== E && e[t(219)] + e[t(229)] / 2 < i && a++;
167
+ }), a;
168
+ }, []), Se = _(() => {
169
+ let e = m, t = H[e(248)];
170
+ if (!t || t[e(361)] !== e(255) || t[e(320)] !== e(373)) return;
171
+ let { x: n, y: r } = U.current, i = be(n);
172
+ if (!i) return;
173
+ let a = h(q[e(248)][e(264)], t.id);
174
+ if (!a) return;
175
+ let o = {
176
+ columnId: i,
177
+ index: xe(i, r)
178
+ }, s = Z({
179
+ item: a[e(211)],
180
+ from: t[e(310)],
181
+ to: o
182
+ }), c = s === !0 ? o : null, l = s === !0 ? null : {
183
+ columnId: i,
184
+ reason: s
185
+ };
186
+ (t[e(221)]?.columnId !== c?.[e(363)] || t.over?.index !== c?.index || t[e(227)]?.[e(363)] !== l?.columnId) && J({
187
+ ...t,
188
+ over: c,
189
+ blocked: l
190
+ });
191
+ }, [
192
+ Z,
193
+ be,
194
+ xe,
195
+ J
196
+ ]), $ = _((e) => {
197
+ let t = m, n = H.current;
198
+ if (!n) return;
199
+ W[t(248)]?.();
200
+ let r = h(q[t(248)][t(264)], n.id), i = r ? q[t(248)].getItemLabel(r[t(211)]) : "";
201
+ if (e && r && n.over && (n.over.columnId !== n.from[t(363)] || n[t(221)][t(287)] !== n[t(310)][t(287)])) {
202
+ X({
203
+ item: r[t(211)],
204
+ from: n[t(310)],
205
+ to: n[t(221)]
206
+ });
207
+ let e = q[t(248)][t(220)][t(365)]((e) => e.id === n[t(221)]?.columnId);
208
+ Y("‘" + i + "’ 카드를 " + A(e) + " 열 " + (n[t(221)][t(287)] + 1) + "번째에 놓았어요.");
209
+ } else e || Y(t(295) + i + t(342));
210
+ J({
211
+ ...n,
212
+ phase: t(334)
213
+ });
214
+ }, [
215
+ Y,
216
+ X,
217
+ J
218
+ ]), Ce = (e, n, r, i) => {
219
+ let a = m;
220
+ if (e[a(279)] !== 0 || H.current) return;
221
+ let o = e.target.closest(a(366));
222
+ if (o && o !== e[a(223)] && e.currentTarget[a(260)](o)) return;
223
+ let s = e[a(223)], c = e[a(203)], l = e[a(307)] === a(304), u = {
224
+ x: e[a(348)],
225
+ y: e[a(217)]
226
+ }, d = u, f = !1, p = 0, h = 0, g = () => {
227
+ let e = a, t = H[e(248)];
228
+ if (!t || t[e(320)] !== e(373)) return;
229
+ let { x: n, y: r } = U.current, i = !1, o = R[e(248)];
230
+ if (o) {
231
+ let t = o[e(197)](), r = ae(n, t[e(254)], t[e(370)]), a = o[e(314)];
232
+ r && (o[e(314)] += r), i ||= o.scrollLeft !== a;
233
+ }
234
+ let s = V[e(248)][e(202)](t[e(221)]?.columnId ?? t[e(227)]?.[e(363)] ?? t[e(310)].columnId);
235
+ if (s) {
236
+ let t = s[e(197)]();
237
+ if (n >= t[e(254)] && n <= t.right) {
238
+ let n = ae(r, t[e(246)], t.bottom), a = s[e(262)];
239
+ n && (s.scrollTop += n), i ||= s[e(262)] !== a;
240
+ }
241
+ }
242
+ i && Se(), p = requestAnimationFrame(g);
243
+ }, _ = () => {
244
+ let e = a;
245
+ f = !0, G.current = !0;
246
+ let t = s[e(197)]();
247
+ U[e(248)] = {
248
+ x: d.x,
249
+ y: d.y,
250
+ offsetX: u.x - t.left,
251
+ offsetY: u.y - t[e(246)]
252
+ };
253
+ let o = {
254
+ columnId: n,
255
+ index: r
256
+ };
257
+ J({
258
+ id: i,
259
+ mode: e(255),
260
+ phase: e(373),
261
+ from: o,
262
+ over: o,
263
+ blocked: null,
264
+ width: t.width,
265
+ height: t[e(360)]
266
+ }), p = requestAnimationFrame(g);
267
+ }, v = (e) => {
268
+ let n = a;
269
+ if (e[n(203)] === c) {
270
+ if (d = {
271
+ x: e[n(348)],
272
+ y: e[n(217)]
273
+ }, !f) {
274
+ if (Math.hypot(d.x - u.x, d.y - u.y) < t.dragThreshold) return;
275
+ if (l) return C();
276
+ _();
277
+ }
278
+ e[n(367)](), U[n(248)].x = d.x, U[n(248)].y = d.y, Q(), Se();
279
+ }
280
+ }, y = (e) => {
281
+ let t = a;
282
+ e.pointerId === c && (f && ($(!0), window[t(281)](() => G[t(248)] = !1)), C());
283
+ }, b = (e) => {
284
+ e.pointerId === c && (f && $(!1), C());
285
+ }, x = (e) => {
286
+ let t = a;
287
+ e.key === t(277) && f && (e.preventDefault(), e.stopPropagation(), $(!1));
288
+ }, S = (e) => {
289
+ f && e[a(367)]();
290
+ };
291
+ function C() {
292
+ let e = a;
293
+ window.clearTimeout(h), cancelAnimationFrame(p), window[e(257)]("pointermove", v), window.removeEventListener(e(347), y), window[e(257)](e(309), b), window[e(257)](e(238), x, !0), window[e(257)]("touchmove", S), W[e(248)] = null;
294
+ }
295
+ W[a(248)] = C, window[a(330)](a(228), v), window.addEventListener(a(347), y), window[a(330)](a(309), b), window.addEventListener(a(238), x, !0), window[a(330)](a(232), S, { passive: !1 }), l && (h = window[a(281)](() => {
296
+ let e = a;
297
+ _(), Q(), navigator[e(356)]?.(10);
298
+ }, t[a(263)]));
299
+ };
300
+ v(() => () => W[N(248)]?.(), []);
301
+ let we = F?.mode === N(255) && F[N(320)] === N(373);
302
+ v(() => {
303
+ let e = N;
304
+ if (!we) return;
305
+ let t = document[e(280)];
306
+ return t[e(293)][e(249)] = "", () => {
307
+ let n = e;
308
+ delete t[n(293)][n(249)];
309
+ };
310
+ }, [we]);
311
+ let Te = F?.[N(361)] === "pointer" ? F.id : null;
312
+ b(() => {
313
+ Te && Q();
314
+ }, [Te, Q]);
315
+ let Ee = F?.[N(320)] === "settling" ? F.id : null;
316
+ b(() => {
317
+ let e = N;
318
+ if (!Ee) return;
319
+ let t = z.current, n = R[e(248)]?.querySelector("[data-kanban-key=\"" + O(Ee) + "\"]");
320
+ if (!t || !n) {
321
+ J(null);
322
+ return;
323
+ }
324
+ let r = n.getBoundingClientRect(), i = t.animate([{ transform: t[e(271)][e(298)] }, { transform: e(324) + r[e(254)] + e(258) + r.top + e(346) }], {
325
+ duration: 280,
326
+ easing: te,
327
+ fill: e(351)
328
+ });
329
+ return i.onfinish = () => J(null), () => i.cancel();
330
+ }, [Ee, J]);
331
+ let De = (e) => {
332
+ let t = N;
333
+ G[t(248)] ? G[t(248)] = !1 : k?.(e);
334
+ }, Oe = (e) => {
335
+ let t = N;
336
+ e && (ge(e), (R.current?.[t(325)](t(340) + O(e) + "\"]"))?.[t(210)]());
337
+ }, ke = (e, t) => {
338
+ let n = N, r = l[n(365)]((t) => t.id === e[n(363)]), i = (P[e[n(363)]] ?? [])[n(269)]((e) => e.id !== t)[n(297)] + 1;
339
+ return A(r) + n(247) + i + n(207) + (e[n(287)] + 1) + "번째";
340
+ }, Ae = (e, t, n, r) => {
341
+ let i = N;
342
+ if (e.target !== e[i(223)] || e[i(252)].isComposing) return;
343
+ let a = H.current, o = l[i(244)]((e) => e.id === n);
344
+ if (a?.mode === "keyboard" && a.phase === i(373)) {
345
+ let n = a[i(221)] ?? a[i(310)], r = (e) => (P[e] ?? [])[i(269)]((e) => e.id !== a.id)[i(297)], o = (e) => {
346
+ K.current = !0, J({
347
+ ...a,
348
+ over: e
349
+ }), Y(ke(e, a.id));
350
+ };
351
+ switch (e[i(296)]) {
352
+ case "ArrowUp":
353
+ case i(313): {
354
+ e.preventDefault();
355
+ let t = Math[i(230)](0, Math[i(240)](r(n[i(363)]), n[i(287)] + (e[i(296)] === i(300) ? -1 : 1)));
356
+ t !== n.index && o({
357
+ columnId: n.columnId,
358
+ index: t
359
+ });
360
+ return;
361
+ }
362
+ case i(208):
363
+ case i(299):
364
+ e[i(367)](), o({
365
+ columnId: n.columnId,
366
+ index: e.key === i(208) ? 0 : r(n.columnId)
367
+ });
368
+ return;
369
+ case i(209):
370
+ case i(328): {
371
+ e[i(367)]();
372
+ let s = e.key === i(209) ? -1 : 1, c = l[i(244)]((e) => e.id === n[i(363)]), u = null;
373
+ for (let e = c + s; e >= 0 && e < l[i(297)]; e += s) {
374
+ let s = {
375
+ columnId: l[e].id,
376
+ index: Math[i(240)](n[i(287)], r(l[e].id))
377
+ }, c = Z({
378
+ item: t,
379
+ from: a[i(310)],
380
+ to: s
381
+ });
382
+ if (c === !0) return o(s);
383
+ u ??= A(l[e]) + i(308) + c;
384
+ }
385
+ Y(u ?? i(345));
386
+ return;
387
+ }
388
+ case " ":
389
+ case i(319): {
390
+ e[i(367)]();
391
+ let r = n[i(363)] !== a[i(310)].columnId || n[i(287)] !== a[i(310)].index;
392
+ r && X({
393
+ item: t,
394
+ from: a.from,
395
+ to: n
396
+ }), K[i(248)] = !0, J(null), Y(r ? "‘" + M(t) + i(214) + ke(n, a.id) + "." : i(282));
397
+ return;
398
+ }
399
+ case i(277):
400
+ case "Tab":
401
+ e[i(296)] === i(277) && e.preventDefault(), K[i(248)] = e.key === "Escape", J(null), Y("옮기기를 취소했어요. ‘" + M(t) + i(342));
402
+ return;
403
+ }
404
+ return;
405
+ }
406
+ let s = P[n] ?? [];
407
+ switch (e[i(296)]) {
408
+ case i(300):
409
+ case i(313):
410
+ e.preventDefault(), Oe(s[r + (e[i(296)] === "ArrowUp" ? -1 : 1)]?.id);
411
+ return;
412
+ case "Home":
413
+ case i(299):
414
+ e[i(367)](), Oe(e[i(296)] === i(208) ? s[0]?.id : s[s[i(297)] - 1]?.id);
415
+ return;
416
+ case i(209):
417
+ case "ArrowRight": {
418
+ e.preventDefault();
419
+ let t = e[i(296)] === i(209) ? -1 : 1;
420
+ for (let e = o + t; e >= 0 && e < l.length; e += t) {
421
+ let t = P[l[e].id] ?? [];
422
+ if (t[i(297)]) return Oe(t[Math[i(240)](r, t[i(297)] - 1)].id);
423
+ }
424
+ return;
425
+ }
426
+ case i(319):
427
+ if (!k) break;
428
+ e[i(367)](), k(t);
429
+ return;
430
+ }
431
+ if (e[i(296)] === " " || e[i(296)] === i(319) && !k) {
432
+ e.preventDefault();
433
+ let a = {
434
+ columnId: n,
435
+ index: r
436
+ };
437
+ J({
438
+ id: t.id,
439
+ mode: i(312),
440
+ phase: i(373),
441
+ from: a,
442
+ over: a,
443
+ blocked: null,
444
+ width: 0,
445
+ height: 0
446
+ }), Y("‘" + M(t) + "’ 카드를 들었어요. " + ke(a, t.id) + i(270));
447
+ }
448
+ }, je = ie(l, P, F), Me = l[N(259)]((e) => P[e.id] ?? []), Ne = I && Me.some((e) => e.id === I) ? I : Me[0]?.id, Pe = F?.mode === N(255) ? h(P, F.id)?.[N(211)] : void 0, Fe = ne ?? ((e, t) => w(f, {
449
+ ...e,
450
+ dragging: t[N(373)]
451
+ }));
452
+ return T("div", {
453
+ ref: R,
454
+ className: d("ds-kanban", N(374), fe),
455
+ style: {
456
+ "--_col": le + "px",
457
+ ...pe
458
+ },
459
+ role: "region",
460
+ "aria-label": de,
461
+ "data-dragging": F?.[N(320)] === N(373) ? F[N(361)] : void 0,
462
+ children: [
463
+ w(N(327), {
464
+ className: N(286),
465
+ children: l[N(253)]((e) => {
466
+ let t = N, s = je[e.id] ?? [], l = P[e.id]?.[t(297)] ?? 0, u = F?.[t(320)] === t(373) && F.over?.[t(363)] === e.id && F[t(310)][t(363)] !== e.id, d = F?.[t(320)] === "dragging" && F[t(227)]?.[t(363)] === e.id ? F[t(227)][t(322)] : null, f = e[t(205)] == null ? void 0 : l > e.limit ? "danger" : l === e.limit ? "warning" : t(226);
467
+ return T(t(274), {
468
+ ref: (n) => {
469
+ let r = t;
470
+ n ? B[r(248)].set(e.id, n) : B[r(248)].delete(e.id);
471
+ },
472
+ className: t(198),
473
+ "aria-labelledby": L + "-" + e.id,
474
+ "data-drop": d ? "blocked" : u ? t(236) : void 0,
475
+ children: [
476
+ T(t(327), {
477
+ className: "ds-kanban__head",
478
+ children: [T(a, {
479
+ gap: 0,
480
+ className: t(242),
481
+ children: [T(i, {
482
+ gap: 2,
483
+ wrap: !1,
484
+ children: [
485
+ e.color && w(r, {
486
+ color: e[t(359)],
487
+ shape: t(289),
488
+ size: 8
489
+ }),
490
+ w(n, {
491
+ id: L + "-" + e.id,
492
+ variant: "label-md",
493
+ weight: t(237),
494
+ truncate: !0,
495
+ children: e[t(285)]
496
+ }),
497
+ e[t(205)] == null ? w(o, {
498
+ count: l,
499
+ showZero: !0,
500
+ variant: t(234),
501
+ tone: t(226),
502
+ size: "sm",
503
+ label: l + "개"
504
+ }) : T(c, {
505
+ size: "sm",
506
+ tone: f,
507
+ className: t(335),
508
+ "aria-label": l + t(224) + e[t(205)] + "개",
509
+ children: [
510
+ l,
511
+ "/",
512
+ e[t(205)]
513
+ ]
514
+ })
515
+ ]
516
+ }), e.description != null && w(n, {
517
+ variant: t(321),
518
+ tone: t(245),
519
+ truncate: !0,
520
+ children: e[t(222)]
521
+ })]
522
+ }), ce && w(t(327), {
523
+ className: t(239),
524
+ children: ce(e)
525
+ })]
526
+ }),
527
+ T("ul", {
528
+ ref: (n) => {
529
+ let r = t;
530
+ n ? V.current[r(358)](e.id, n) : V[r(248)][r(375)](e.id);
531
+ },
532
+ className: t(302),
533
+ "data-kanban-list": e.id,
534
+ "aria-labelledby": L + "-" + e.id,
535
+ children: [
536
+ s[t(253)]((n) => n[t(265)] === t(218) ? w("li", {
537
+ className: t(326),
538
+ "data-kanban-key": E,
539
+ style: { height: F?.[t(360)] },
540
+ "aria-hidden": !0
541
+ }, E) : w("li", {
542
+ className: t(256),
543
+ "data-kanban-key": n.item.id,
544
+ "data-lifted": n[t(338)] || void 0,
545
+ "data-hidden": n[t(275)] || void 0,
546
+ tabIndex: n[t(211)].id === Ne ? 0 : -1,
547
+ "aria-describedby": L + "-hint",
548
+ "aria-roledescription": t(241),
549
+ onFocus: (e) => {
550
+ let r = t;
551
+ e[r(236)] === e[r(223)] && ge(n[r(211)].id);
552
+ },
553
+ onPointerDown: (r) => {
554
+ let i = t, a = (P[e.id] ?? [])[i(244)]((e) => e.id === n[i(211)].id);
555
+ Ce(r, e.id, a, n[i(211)].id);
556
+ },
557
+ onClick: () => De(n[t(211)]),
558
+ onKeyDown: (r) => {
559
+ let i = t, a = (P[e.id] ?? [])[i(244)]((e) => e.id === n[i(211)].id);
560
+ Ae(r, n[i(211)], e.id, a);
561
+ },
562
+ children: Fe(n[t(211)], {
563
+ dragging: !1,
564
+ lifted: !!n[t(338)]
565
+ })
566
+ }, n.item.id)),
567
+ s.length === 0 && w("li", {
568
+ className: t(231),
569
+ "aria-hidden": !0,
570
+ children: w(n, {
571
+ variant: t(321),
572
+ tone: t(245),
573
+ children: ue
574
+ })
575
+ }),
576
+ d && w("li", {
577
+ className: t(292),
578
+ role: "presentation",
579
+ children: w(n, {
580
+ variant: "caption",
581
+ tone: t(331),
582
+ children: d
583
+ })
584
+ })
585
+ ]
586
+ }),
587
+ j && w(se, { onAdd: (t) => {
588
+ j(e.id, t), requestAnimationFrame(() => requestAnimationFrame(() => {
589
+ let t = m, n = V[t(248)][t(202)](e.id);
590
+ n?.scrollTo({
591
+ top: n[t(323)],
592
+ behavior: "smooth"
593
+ });
594
+ }));
595
+ } })
596
+ ]
597
+ }, e.id);
598
+ })
599
+ }),
600
+ w(N(329), {
601
+ id: L + N(371),
602
+ className: "ds-sr-only",
603
+ children: N(357)
604
+ }),
605
+ w(N(327), {
606
+ className: N(215),
607
+ role: "status",
608
+ "aria-live": N(315),
609
+ children: _e
610
+ }),
611
+ F && Pe && ee(w(N(327), {
612
+ ref: z,
613
+ className: N(344),
614
+ style: { width: F[N(243)] },
615
+ "data-state": F[N(320)],
616
+ "data-blocked": F[N(227)] ? "" : void 0,
617
+ "aria-hidden": !0,
618
+ children: w(N(327), {
619
+ className: N(204),
620
+ children: Fe(Pe, {
621
+ dragging: !0,
622
+ lifted: !0
623
+ })
624
+ })
625
+ }), document[N(261)])
626
+ ]
627
+ });
628
+ }
629
+ function se({ onAdd: t }) {
630
+ let n = e, [r, o] = S(!1), [s, c] = S(""), d = x(null);
631
+ v(() => {
632
+ let e = m;
633
+ r && d[e(248)]?.[e(210)]();
634
+ }, [r]);
635
+ let f = () => {
636
+ o(!1), c("");
637
+ }, p = () => {
638
+ let e = m, n = s[e(233)]();
639
+ n && (t(n), c(""), d[e(248)]?.focus());
640
+ };
641
+ return r ? w(n(327), {
642
+ className: n(317),
643
+ children: T(a, {
644
+ gap: 2,
645
+ children: [w(u, {
646
+ ref: d,
647
+ autoResize: !0,
648
+ maxRows: 5,
649
+ value: s,
650
+ placeholder: n(354),
651
+ "aria-label": "새 카드 제목",
652
+ onChange: (e) => c(e[n(236)][n(264)]),
653
+ onKeyDown: (e) => {
654
+ let t = n;
655
+ e[t(252)][t(343)] || e[t(268)] === 229 || (e[t(296)] === t(319) && !e[t(267)] ? (e[t(367)](), p()) : e[t(296)] === "Escape" && (e.preventDefault(), f()));
656
+ },
657
+ onBlur: (e) => {
658
+ let t = n, r = e[t(273)];
659
+ !s[t(233)]() && !e[t(223)].closest(t(294))?.[t(260)](r) && f();
660
+ }
661
+ }), T(i, {
662
+ gap: 2,
663
+ children: [w(l, {
664
+ variant: n(350),
665
+ size: "sm",
666
+ shortcut: n(291),
667
+ disabled: !s.trim(),
668
+ onClick: p,
669
+ children: "추가"
670
+ }), w(l, {
671
+ variant: n(336),
672
+ size: "sm",
673
+ onClick: f,
674
+ children: "취소"
675
+ })]
676
+ })]
677
+ })
678
+ }) : w(n(327), {
679
+ className: n(317),
680
+ children: w(l, {
681
+ variant: n(336),
682
+ size: "sm",
683
+ icon: w(C, {}),
684
+ block: !0,
685
+ className: n(251),
686
+ onClick: () => o(!0),
687
+ children: n(216)
688
+ })
689
+ });
690
+ }
691
+ export { j as KanbanBoard };