@iamfiro/design 0.1.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +66 -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 +90 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +228 -0
  15. package/lib/components/Calendar/date.js +118 -0
  16. package/lib/components/Card/Card2.js +103 -0
  17. package/lib/components/CardFrame/CardFrame2.js +67 -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 +48 -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 +111 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +609 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +70 -0
  29. package/lib/components/Combobox/Combobox2.js +228 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +110 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1998 -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 +557 -0
  37. package/lib/components/DataGrid/panels.js +701 -0
  38. package/lib/components/DataGrid/typeMeta.js +75 -0
  39. package/lib/components/DataGrid/types.js +53 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +119 -0
  42. package/lib/components/Dialog/Dialog2.js +110 -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 +393 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +145 -0
  48. package/lib/components/EmptyState/EmptyState2.js +70 -0
  49. package/lib/components/FileChip/FileChip2.js +94 -0
  50. package/lib/components/FileUpload/FileUpload.js +259 -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 +72 -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 +110 -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 +132 -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 +222 -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 +128 -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 +52 -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 +90 -0
  77. package/lib/components/PieChart/useArcTween.js +92 -0
  78. package/lib/components/Popover/Popover2.js +111 -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 +238 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +99 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +355 -0
  85. package/lib/components/ScatterChart/scatter.js +85 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +217 -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 +84 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +71 -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 +357 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +81 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +81 -0
  105. package/lib/components/Toast/Toaster.js +213 -0
  106. package/lib/components/Toast/store.js +128 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +283 -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 +286 -0
  112. package/lib/hooks/timing.js +57 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +75 -0
  115. package/lib/hooks/useDigitInput.js +103 -0
  116. package/lib/hooks/useDismiss.js +69 -0
  117. package/lib/hooks/useElapsed.js +85 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +85 -0
  120. package/lib/hooks/usePresence.js +58 -0
  121. package/lib/hooks/usePressToOpen.js +70 -0
  122. package/lib/hooks/useScrollLock.js +71 -0
  123. package/lib/hooks/useSelection.js +65 -0
  124. package/lib/index.js +176 -17911
  125. package/lib/primitives/AspectRatio2.js +76 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +71 -0
  128. package/lib/primitives/CopyButton2.js +86 -0
  129. package/lib/primitives/CountBadge2.js +80 -0
  130. package/lib/primitives/Countdown2.js +61 -0
  131. package/lib/primitives/Delta2.js +92 -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 +69 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +55 -0
  140. package/lib/primitives/MaskedText2.js +121 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +82 -0
  143. package/lib/primitives/SearchInput2.js +85 -0
  144. package/lib/primitives/SelectorButton2.js +96 -0
  145. package/lib/primitives/Spinner2.js +94 -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 +54 -0
  151. package/lib/primitives/formatElapsed.js +63 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +351 -0
  155. package/lib/primitives/maskValue.js +69 -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 = D;
3
+ (function(e, t) {
4
+ let n = D, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(561)) / 1 * (parseInt(n(646)) / 2) + -parseInt(n(499)) / 3 * (-parseInt(n(628)) / 4) + -parseInt(n(512)) / 5 + -parseInt(n(580)) / 6 * (-parseInt(n(518)) / 7) + parseInt(n(574)) / 8 * (-parseInt(n(495)) / 9) + -parseInt(n(496)) / 10 + parseInt(n(534)) / 11 * (parseInt(n(542)) / 12) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(c, 706866);
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
+ function c() {
19
+ let e = /* @__PURE__ */ "mJCYogL2tuj2rW.w2rHDgeTA2fUyMfUlwTLEv0.yw5PBwf0zq.CgHHC2u.642uioYyRUQ4UcdSL7tSNBqG7jEg7jA07jQul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5yM9HCMq.otG0u1PzCxDp.rw50zxi.zhjHz1rOCMvZAg9Sza.A2fUyMfUs2v5.Cg9PBNrLCLr5Cgu.Dg91y2HTB3zL.y2XLyxjuAw1LB3v0.B3zLCG.DgfYz2v0.DhjPBq.zhmTA2fUyMfUx19SAxn0igrZlxnJCM9SBa.lwHPBNq.A2v5.C2vJDgLVBG.y3vYCMvUDa.AxrLBq.CMvNAw9U.zhmTA2fUyMfUx19WBgfJzwHVBgrLCG.A2fUyMfUlwzSAxa.mta4nwzkruLNwq.C3rYAw5N.BgvMDa.6RcClcdTLzZRJ4qG.C21VB3rO.zMLUza.C3rHDhvZ.yNv0Dg9U.z2v0sxrLBuXHyMvS.lIdTMztSGRtTKzZROzWG7jIU6RIW6RoGioYkPo2oMoYDToYkPoUHNcdRHPpSLytSMPqUioY3QoYgJoUkLcbfC2mU.qxjYB3DsAwDODa.C2nYB2XStgvMDa.AhLWB3q".split(".");
20
+ return c = function() {
21
+ return e;
22
+ }, c();
23
+ }
24
+ import { Badge as l, Button as u, Textarea as d, cx as f } from "../../primitives/index.js";
25
+ import { KanbanCard as p } from "./KanbanCard.js";
26
+ import { locateKanbanItem as m, moveKanbanItem as h } from "./move.js";
27
+ /* empty css */
28
+ import { useCallback as g, useEffect as _, useId as v, useLayoutEffect as y, useRef as b, useState as x } from "react";
29
+ import { Plus as S } from "lucide-react";
30
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
31
+ import { createPortal as ee } from "react-dom";
32
+ var T = e(517), te = e(531), E = 64, ne = 22, re = {};
33
+ function ie(t, n, r) {
34
+ let i = e, a = {}, o = r ? m(n, r.id)?.item : void 0;
35
+ for (let e of t) {
36
+ let t = n[e.id] ?? [];
37
+ if (!r || !o || r.phase === i(638)) {
38
+ a[e.id] = t[i(489)]((e) => ({
39
+ type: i(557),
40
+ item: e,
41
+ hidden: r?.[i(577)] === i(638) && e.id === r.id
42
+ }));
43
+ continue;
44
+ }
45
+ let s = t[i(601)]((e) => e.id !== r.id).map((e) => ({
46
+ type: "item",
47
+ item: e
48
+ })), c = r[i(549)] ?? r[i(630)];
49
+ c[i(511)] === e.id && s.splice(c.index, 0, r[i(523)] === i(596) ? { type: i(649) } : {
50
+ type: i(557),
51
+ item: o,
52
+ lifted: !0
53
+ }), a[e.id] = s;
54
+ }
55
+ return a;
56
+ }
57
+ function D(e, t) {
58
+ e -= 484;
59
+ let n = c(), r = n[e];
60
+ D.eEsyPZ === void 0 && (D.PAaVry = function(e) {
61
+ let t = "", n = "";
62
+ 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);
63
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
64
+ return decodeURIComponent(n);
65
+ }, D.bouHFp = {}, D.eEsyPZ = !0);
66
+ let i = n[0];
67
+ D.ZCmBmi !== i && (D.bouHFp = {}, D.ZCmBmi = i);
68
+ let a = D.bouHFp[e];
69
+ return a === void 0 ? (r = D.PAaVry(r), D.bouHFp[e] = r) : r = a, r;
70
+ }
71
+ var O = (t) => typeof CSS !== e(640) && CSS[e(635)] ? CSS[e(635)](t) : t.replace(/"/g, "\\\""), k = (t) => Math[e(617)](Math[e(505)](1, Math[e(515)](0, t / E)) ** 2 * ne), ae = (e, t, n) => e < t + E ? -k(t + E - e) : e > n - E ? k(e - (n - E)) : 0, oe = (t) => {
72
+ let n = e, r = t[n(592)];
73
+ return typeof r === n(562) ? r : t.id;
74
+ }, A = (t) => t?.[e(610)] ?? (typeof t?.[e(592)] === e(562) ? t[e(592)] : t?.id ?? "");
75
+ function j({ columns: c, value: u, defaultValue: d, onValueChange: S, canMove: E, renderCard: ne, onCardOpen: k, onCardAdd: j, columnActions: ce, getItemLabel: M = oe, columnWidth: le = 288, emptyLabel: ue = e(526), "aria-label": de = e(598), className: fe, style: pe }) {
76
+ let N = e, [P, me] = s(u, d ?? re), [F, he] = x(null), [I, ge] = x(null), [_e, ve] = x(""), L = v(), R = b(null), z = b(null), B = b(/* @__PURE__ */ new Map()), V = b(/* @__PURE__ */ new Map()), H = b(null), U = b({
77
+ x: 0,
78
+ y: 0,
79
+ offsetX: 0,
80
+ offsetY: 0
81
+ }), W = b(null), G = b(!1), K = b(!1), ye = b(/* @__PURE__ */ new Map()), q = b({
82
+ value: P,
83
+ columns: c,
84
+ canMove: E,
85
+ onValueChange: S,
86
+ getItemLabel: M
87
+ });
88
+ y(() => {
89
+ let e = D;
90
+ q[e(556)] = {
91
+ value: P,
92
+ columns: c,
93
+ canMove: E,
94
+ onValueChange: S,
95
+ getItemLabel: M
96
+ };
97
+ });
98
+ let J = g((e) => {
99
+ let t = D;
100
+ H[t(556)] = e, he(e);
101
+ }, []), Y = g((e) => ve(e), []), X = g((e) => {
102
+ let { value: t, onValueChange: n } = q[D(556)], r = h(t, e.item.id, e.to);
103
+ me(r), n?.(r, e);
104
+ }, [me]), Z = g((e) => {
105
+ let t = D, { value: n, columns: r, canMove: i } = q[t(556)];
106
+ if (e[t(630)][t(511)] === e.to[t(511)]) return !0;
107
+ let a = r[t(566)]((n) => n.id === e.to[t(511)]), o = n[e.to[t(511)]]?.[t(625)] ?? 0;
108
+ if (a?.[t(626)] != null && a[t(639)] === t(620) && o >= a[t(626)]) return t(654) + a[t(626)] + "개가 찼어요";
109
+ let s = i?.(e) ?? !0;
110
+ return s === !0 ? !0 : typeof s == "string" ? s : "이 열로 옮길 수 없어요";
111
+ }, []);
112
+ y(() => {
113
+ let e = D, t = R.current;
114
+ if (!t) return;
115
+ let n = ye.current, r = /* @__PURE__ */ new Map(), i = (t) => V[e(556)][e(589)](t)?.[e(514)] ?? 0;
116
+ if (t.querySelectorAll(e(575))[e(487)]((t) => {
117
+ let a = e, o = t[a(540)], s = o[a(484)][a(586)] ?? "", c = t[a(484)][a(545)] ?? "", l = o[a(522)] + t[a(522)], u = o[a(492)] + t[a(492)];
118
+ r.set(c, {
119
+ col: s,
120
+ x: l,
121
+ y: u
122
+ });
123
+ let d = n[a(589)](c);
124
+ if (!d || c === T) return;
125
+ let f = 0, p = 0, m = t[a(661)]()[a(601)]((e) => e.id === a(560));
126
+ if (m[a(625)]) {
127
+ let e = new DOMMatrixReadOnly(getComputedStyle(t)[a(501)]);
128
+ f = e[a(532)], p = e.m42, m[a(487)]((e) => e[a(584)]());
129
+ }
130
+ let h = d.x - l + f, g = d.y - i(d.col) - (u - i(s)) + p;
131
+ if (Math[a(583)](h) < .5 && Math[a(583)](g) < .5) return;
132
+ let _ = t[a(576)]([{ transform: a(603) + h + a(579) + g + a(486) }, { transform: "translate(0, 0)" }], {
133
+ duration: 320,
134
+ easing: te
135
+ });
136
+ _.id = "kanban-flip";
137
+ }), ye[e(556)] = r, K[e(556)]) {
138
+ K[e(556)] = !1;
139
+ let n = H.current?.id ?? I, r = n ? t[e(510)]("[data-kanban-key=\"" + O(n) + "\"]") : null;
140
+ r && document[e(612)] !== r && r[e(503)]({ preventScroll: !0 }), r?.[e(527)]({
141
+ block: e(595),
142
+ inline: e(595)
143
+ });
144
+ }
145
+ });
146
+ let Q = g(() => {
147
+ let e = D, t = z.current;
148
+ if (!t) return;
149
+ let n = U.current;
150
+ t[e(613)][e(501)] = e(605) + (n.x - n[e(502)]) + e(579) + (n.y - n.offsetY) + "px, 0)";
151
+ }, []), be = g((e) => {
152
+ let t = D, n = null, r = Infinity;
153
+ for (let i of q[t(556)].columns) {
154
+ let a = B.current[t(589)](i.id);
155
+ if (!a) continue;
156
+ let o = a.getBoundingClientRect(), s = e < o[t(563)] ? o[t(563)] - e : e > o.right ? e - o.right : 0;
157
+ s < r && (n = i.id, r = s);
158
+ }
159
+ return n;
160
+ }, []), xe = g((e, t) => {
161
+ let n = D, r = V[n(556)][n(589)](e);
162
+ if (!r) return 0;
163
+ let i = t - r.getBoundingClientRect()[n(528)] + r[n(514)], a = 0;
164
+ return r[n(629)](n(621)).forEach((e) => {
165
+ let t = n;
166
+ e[t(484)][t(545)] !== T && e[t(492)] + e[t(490)] / 2 < i && a++;
167
+ }), a;
168
+ }, []), Se = g(() => {
169
+ let e = D, t = H[e(556)];
170
+ if (!t || t.mode !== "pointer" || t[e(577)] !== e(593)) return;
171
+ let { x: n, y: r } = U[e(556)], i = be(n);
172
+ if (!i) return;
173
+ let a = m(q[e(556)][e(498)], t.id);
174
+ if (!a) return;
175
+ let o = {
176
+ columnId: i,
177
+ index: xe(i, r)
178
+ }, s = Z({
179
+ item: a.item,
180
+ from: t[e(630)],
181
+ to: o
182
+ }), c = s === !0 ? o : null, l = s === !0 ? null : {
183
+ columnId: i,
184
+ reason: s
185
+ };
186
+ (t[e(549)]?.columnId !== c?.[e(511)] || t[e(549)]?.[e(637)] !== c?.[e(637)] || t[e(591)]?.[e(511)] !== l?.[e(511)]) && J({
187
+ ...t,
188
+ over: c,
189
+ blocked: l
190
+ });
191
+ }, [
192
+ Z,
193
+ be,
194
+ xe,
195
+ J
196
+ ]), $ = g((e) => {
197
+ let t = D, n = H[t(556)];
198
+ if (!n) return;
199
+ W.current?.();
200
+ let r = m(q.current[t(498)], n.id), i = r ? q[t(556)][t(569)](r.item) : "";
201
+ if (e && r && n.over && (n.over.columnId !== n[t(630)][t(511)] || n[t(549)][t(637)] !== n[t(630)].index)) {
202
+ X({
203
+ item: r[t(557)],
204
+ from: n[t(630)],
205
+ to: n.over
206
+ });
207
+ let e = q[t(556)][t(494)][t(566)]((e) => e.id === n[t(549)]?.[t(511)]);
208
+ Y("‘" + i + "’ 카드를 " + A(e) + t(497) + (n[t(549)].index + 1) + t(516));
209
+ } else e || Y(t(658) + i + "’ 카드는 제자리에 있어요.");
210
+ J({
211
+ ...n,
212
+ phase: t(638)
213
+ });
214
+ }, [
215
+ Y,
216
+ X,
217
+ J
218
+ ]), Ce = (e, n, r, i) => {
219
+ let a = D;
220
+ if (e[a(568)] !== 0 || H.current) return;
221
+ let o = e[a(550)][a(504)]("button, a[href], input, textarea, select, [contenteditable=\"true\"], [data-kanban-no-drag]");
222
+ if (o && o !== e[a(485)] && e[a(485)].contains(o)) return;
223
+ let s = e[a(485)], c = e.pointerId, l = e[a(546)] === a(619), u = {
224
+ x: e[a(659)],
225
+ y: e[a(491)]
226
+ }, d = u, f = !1, p = 0, m = 0, h = () => {
227
+ let e = a, t = H[e(556)];
228
+ if (!t || t.phase !== e(593)) return;
229
+ let { x: n, y: r } = U[e(556)], i = !1, o = R[e(556)];
230
+ if (o) {
231
+ let t = o[e(530)](), r = ae(n, t[e(563)], t.right), a = o[e(572)];
232
+ r && (o[e(572)] += r), i ||= o[e(572)] !== a;
233
+ }
234
+ let s = V[e(556)][e(589)](t[e(549)]?.columnId ?? t[e(591)]?.[e(511)] ?? t.from[e(511)]);
235
+ if (s) {
236
+ let t = s.getBoundingClientRect();
237
+ if (n >= t[e(563)] && n <= t.right) {
238
+ let n = ae(r, t.top, t.bottom), a = s.scrollTop;
239
+ n && (s.scrollTop += n), i ||= s[e(514)] !== a;
240
+ }
241
+ }
242
+ i && Se(), p = requestAnimationFrame(h);
243
+ }, g = () => {
244
+ let e = a;
245
+ f = !0, G[e(556)] = !0;
246
+ let t = s[e(530)]();
247
+ U[e(556)] = {
248
+ x: d.x,
249
+ y: d.y,
250
+ offsetX: u.x - t[e(563)],
251
+ offsetY: u.y - t[e(528)]
252
+ };
253
+ let o = {
254
+ columnId: n,
255
+ index: r
256
+ };
257
+ J({
258
+ id: i,
259
+ mode: e(596),
260
+ phase: e(593),
261
+ from: o,
262
+ over: o,
263
+ blocked: null,
264
+ width: t[e(488)],
265
+ height: t.height
266
+ }), p = requestAnimationFrame(h);
267
+ }, _ = (e) => {
268
+ let n = a;
269
+ if (e.pointerId === c) {
270
+ if (d = {
271
+ x: e[n(659)],
272
+ y: e.clientY
273
+ }, !f) {
274
+ if (Math[n(573)](d.x - u.x, d.y - u.y) < t[n(544)]) return;
275
+ if (l) return S();
276
+ g();
277
+ }
278
+ e[n(506)](), U[n(556)].x = d.x, U.current.y = d.y, Q(), Se();
279
+ }
280
+ }, v = (e) => {
281
+ let t = a;
282
+ e[t(520)] === c && (f && ($(!0), window[t(493)](() => G[t(556)] = !1)), S());
283
+ }, y = (e) => {
284
+ e[a(520)] === c && (f && $(!1), S());
285
+ }, b = (e) => {
286
+ let t = a;
287
+ e[t(554)] === t(615) && f && (e[t(506)](), e[t(660)](), $(!1));
288
+ }, x = (e) => {
289
+ f && e.preventDefault();
290
+ };
291
+ function S() {
292
+ let e = a;
293
+ window[e(548)](m), cancelAnimationFrame(p), window[e(632)](e(643), _), window[e(632)](e(631), v), window[e(632)](e(623), y), window[e(632)](e(656), b, !0), window.removeEventListener("touchmove", x), W[e(556)] = null;
294
+ }
295
+ W.current = S, window[a(600)](a(643), _), window.addEventListener(a(631), v), window[a(600)]("pointercancel", y), window[a(600)](a(656), b, !0), window[a(600)](a(547), x, { passive: !1 }), l && (m = window.setTimeout(() => {
296
+ g(), Q(), navigator.vibrate?.(10);
297
+ }, t.longPress));
298
+ };
299
+ _(() => () => W[N(556)]?.(), []);
300
+ let we = F?.[N(523)] === N(596) && F[N(577)] === N(593);
301
+ _(() => {
302
+ let e = N;
303
+ if (!we) return;
304
+ let t = document.documentElement;
305
+ return t[e(484)][e(525)] = "", () => {
306
+ let n = e;
307
+ delete t[n(484)][n(525)];
308
+ };
309
+ }, [we]);
310
+ let Te = F?.[N(523)] === "pointer" ? F.id : null;
311
+ y(() => {
312
+ Te && Q();
313
+ }, [Te, Q]);
314
+ let Ee = F?.phase === N(638) ? F.id : null;
315
+ y(() => {
316
+ let e = N;
317
+ if (!Ee) return;
318
+ let t = z[e(556)], n = R[e(556)]?.[e(510)](e(634) + O(Ee) + "\"]");
319
+ if (!t || !n) {
320
+ J(null);
321
+ return;
322
+ }
323
+ let r = n[e(530)](), i = t[e(576)]([{ transform: t.style[e(501)] }, { transform: e(605) + r[e(563)] + e(579) + r[e(528)] + e(622) }], {
324
+ duration: 280,
325
+ easing: te,
326
+ fill: "forwards"
327
+ });
328
+ return i[e(597)] = () => J(null), () => i[e(584)]();
329
+ }, [Ee, J]);
330
+ let De = (e) => {
331
+ let t = N;
332
+ G[t(556)] ? G[t(556)] = !1 : k?.(e);
333
+ }, Oe = (e) => {
334
+ let t = N;
335
+ e && (ge(e), (R[t(556)]?.[t(510)](t(634) + O(e) + "\"]"))?.[t(503)]());
336
+ }, ke = (e, t) => {
337
+ let n = N, r = c.find((t) => t.id === e[n(511)]), i = (P[e[n(511)]] ?? [])[n(601)]((e) => e.id !== t).length + 1;
338
+ return A(r) + n(607) + i + "개 중 " + (e[n(637)] + 1) + "번째";
339
+ }, Ae = (e, t, n, r) => {
340
+ let i = N;
341
+ if (e[i(550)] !== e[i(485)] || e[i(664)][i(521)]) return;
342
+ let a = H[i(556)], o = c[i(585)]((e) => e.id === n);
343
+ if (a?.mode === i(541) && a[i(577)] === i(593)) {
344
+ let n = a.over ?? a[i(630)], r = (e) => (P[e] ?? [])[i(601)]((e) => e.id !== a.id)[i(625)], o = (e) => {
345
+ let t = i;
346
+ K[t(556)] = !0, J({
347
+ ...a,
348
+ over: e
349
+ }), Y(ke(e, a.id));
350
+ };
351
+ switch (e.key) {
352
+ case i(590):
353
+ case "ArrowDown": {
354
+ e[i(506)]();
355
+ let t = Math[i(515)](0, Math[i(505)](r(n.columnId), n[i(637)] + (e[i(554)] === i(590) ? -1 : 1)));
356
+ t !== n[i(637)] && o({
357
+ columnId: n.columnId,
358
+ index: t
359
+ });
360
+ return;
361
+ }
362
+ case i(529):
363
+ case i(624):
364
+ e[i(506)](), o({
365
+ columnId: n.columnId,
366
+ index: e[i(554)] === i(529) ? 0 : r(n[i(511)])
367
+ });
368
+ return;
369
+ case i(608):
370
+ case i(571): {
371
+ e[i(506)]();
372
+ let s = e.key === i(608) ? -1 : 1, l = c.findIndex((e) => e.id === n[i(511)]), u = null;
373
+ for (let e = l + s; e >= 0 && e < c.length; e += s) {
374
+ let s = {
375
+ columnId: c[e].id,
376
+ index: Math[i(505)](n[i(637)], r(c[e].id))
377
+ }, l = Z({
378
+ item: t,
379
+ from: a[i(630)],
380
+ to: s
381
+ });
382
+ if (l === !0) return o(s);
383
+ u ??= A(c[e]) + i(663) + l;
384
+ }
385
+ Y(u ?? i(578));
386
+ return;
387
+ }
388
+ case " ":
389
+ case "Enter": {
390
+ e.preventDefault();
391
+ let r = n[i(511)] !== a.from.columnId || n[i(637)] !== a[i(630)][i(637)];
392
+ r && X({
393
+ item: t,
394
+ from: a.from,
395
+ to: n
396
+ }), K[i(556)] = !0, J(null), Y(r ? "‘" + M(t) + "’ 카드를 놓았어요. " + ke(n, a.id) + "." : i(644));
397
+ return;
398
+ }
399
+ case i(615):
400
+ case i(606):
401
+ e[i(554)] === i(615) && e[i(506)](), K.current = e[i(554)] === i(615), J(null), Y(i(658) + M(t) + i(500));
402
+ return;
403
+ }
404
+ return;
405
+ }
406
+ let s = P[n] ?? [];
407
+ switch (e[i(554)]) {
408
+ case "ArrowUp":
409
+ case i(611):
410
+ e[i(506)](), Oe(s[r + (e[i(554)] === "ArrowUp" ? -1 : 1)]?.id);
411
+ return;
412
+ case i(529):
413
+ case "End":
414
+ e[i(506)](), Oe(e.key === i(529) ? s[0]?.id : s[s[i(625)] - 1]?.id);
415
+ return;
416
+ case "ArrowLeft":
417
+ case i(571): {
418
+ e[i(506)]();
419
+ let t = e[i(554)] === i(608) ? -1 : 1;
420
+ for (let e = o + t; e >= 0 && e < c[i(625)]; e += t) {
421
+ let t = P[c[e].id] ?? [];
422
+ if (t[i(625)]) return Oe(t[Math[i(505)](r, t[i(625)] - 1)].id);
423
+ }
424
+ return;
425
+ }
426
+ case i(543):
427
+ if (!k) break;
428
+ e[i(506)](), k(t);
429
+ return;
430
+ }
431
+ if (e[i(554)] === " " || e[i(554)] === "Enter" && !k) {
432
+ e[i(506)]();
433
+ let a = {
434
+ columnId: n,
435
+ index: r
436
+ };
437
+ J({
438
+ id: t.id,
439
+ mode: "keyboard",
440
+ phase: i(593),
441
+ from: a,
442
+ over: a,
443
+ blocked: null,
444
+ width: 0,
445
+ height: 0
446
+ }), Y("‘" + M(t) + i(645) + ke(a, t.id) + i(570));
447
+ }
448
+ }, je = ie(c, P, F), Me = c[N(535)]((e) => P[e.id] ?? []), Ne = I && Me.some((e) => e.id === I) ? I : Me[0]?.id, Pe = F?.mode === "pointer" ? m(P, F.id)?.[N(557)] : void 0, Fe = ne ?? ((e, t) => C(p, {
449
+ ...e,
450
+ dragging: t.dragging
451
+ }));
452
+ return w("div", {
453
+ ref: R,
454
+ className: f("ds-kanban", N(519), fe),
455
+ style: {
456
+ "--_col": le + "px",
457
+ ...pe
458
+ },
459
+ role: N(558),
460
+ "aria-label": de,
461
+ "data-dragging": F?.[N(577)] === N(593) ? F[N(523)] : void 0,
462
+ children: [
463
+ C(N(636), {
464
+ className: N(587),
465
+ children: c[N(489)]((e) => {
466
+ let t = N, s = je[e.id] ?? [], c = P[e.id]?.[t(625)] ?? 0, u = F?.phase === t(593) && F[t(549)]?.[t(511)] === e.id && F.from[t(511)] !== e.id, d = F?.[t(577)] === t(593) && F.blocked?.[t(511)] === e.id ? F.blocked[t(508)] : null, f = e[t(626)] == null ? void 0 : c > e[t(626)] ? t(616) : c === e[t(626)] ? "warning" : t(582);
467
+ return w(t(555), {
468
+ ref: (n) => {
469
+ let r = t;
470
+ n ? B[r(556)].set(e.id, n) : B[r(556)][r(604)](e.id);
471
+ },
472
+ className: t(650),
473
+ "aria-labelledby": L + "-" + e.id,
474
+ "data-drop": d ? t(591) : u ? t(550) : void 0,
475
+ children: [
476
+ w("div", {
477
+ className: t(513),
478
+ children: [w(a, {
479
+ gap: 0,
480
+ className: t(509),
481
+ children: [w(i, {
482
+ gap: 2,
483
+ wrap: !1,
484
+ children: [
485
+ e[t(642)] && C(r, {
486
+ color: e[t(642)],
487
+ shape: t(648),
488
+ size: 8
489
+ }),
490
+ C(n, {
491
+ id: L + "-" + e.id,
492
+ variant: t(609),
493
+ weight: "semibold",
494
+ truncate: !0,
495
+ children: e[t(592)]
496
+ }),
497
+ e[t(626)] == null ? C(o, {
498
+ count: c,
499
+ showZero: !0,
500
+ variant: t(538),
501
+ tone: t(582),
502
+ size: "sm",
503
+ label: c + "개"
504
+ }) : w(l, {
505
+ size: "sm",
506
+ tone: f,
507
+ className: t(651),
508
+ "aria-label": c + t(564) + e[t(626)] + "개",
509
+ children: [
510
+ c,
511
+ "/",
512
+ e[t(626)]
513
+ ]
514
+ })
515
+ ]
516
+ }), e[t(599)] != null && C(n, {
517
+ variant: "caption",
518
+ tone: "tertiary",
519
+ truncate: !0,
520
+ children: e[t(599)]
521
+ })]
522
+ }), ce && C("div", {
523
+ className: t(627),
524
+ children: ce(e)
525
+ })]
526
+ }),
527
+ w("ul", {
528
+ ref: (n) => {
529
+ let r = t;
530
+ n ? V.current[r(633)](e.id, n) : V.current[r(604)](e.id);
531
+ },
532
+ className: t(552),
533
+ "data-kanban-list": e.id,
534
+ "aria-labelledby": L + "-" + e.id,
535
+ children: [
536
+ s[t(489)]((n) => n.type === t(649) ? C("li", {
537
+ className: t(559),
538
+ "data-kanban-key": T,
539
+ style: { height: F?.height },
540
+ "aria-hidden": !0
541
+ }, T) : C("li", {
542
+ className: t(641),
543
+ "data-kanban-key": n[t(557)].id,
544
+ "data-lifted": n[t(618)] || void 0,
545
+ "data-hidden": n[t(657)] || void 0,
546
+ tabIndex: n[t(557)].id === Ne ? 0 : -1,
547
+ "aria-describedby": L + "-hint",
548
+ "aria-roledescription": "옮길 수 있는 카드",
549
+ onFocus: (e) => {
550
+ let r = t;
551
+ e[r(550)] === e[r(485)] && ge(n.item.id);
552
+ },
553
+ onPointerDown: (r) => {
554
+ let i = t, a = (P[e.id] ?? [])[i(585)]((e) => e.id === n[i(557)].id);
555
+ Ce(r, e.id, a, n[i(557)].id);
556
+ },
557
+ onClick: () => De(n[t(557)]),
558
+ onKeyDown: (r) => {
559
+ let i = t, a = (P[e.id] ?? [])[i(585)]((e) => e.id === n[i(557)].id);
560
+ Ae(r, n[i(557)], e.id, a);
561
+ },
562
+ children: Fe(n[t(557)], {
563
+ dragging: !1,
564
+ lifted: !!n[t(618)]
565
+ })
566
+ }, n[t(557)].id)),
567
+ s[t(625)] === 0 && C("li", {
568
+ className: "ds-kanban__empty",
569
+ "aria-hidden": !0,
570
+ children: C(n, {
571
+ variant: t(533),
572
+ tone: t(662),
573
+ children: ue
574
+ })
575
+ }),
576
+ d && C("li", {
577
+ className: "ds-kanban__blocked",
578
+ role: t(652),
579
+ children: C(n, {
580
+ variant: t(533),
581
+ tone: "danger",
582
+ children: d
583
+ })
584
+ })
585
+ ]
586
+ }),
587
+ j && C(se, { onAdd: (t) => {
588
+ j(e.id, t), requestAnimationFrame(() => requestAnimationFrame(() => {
589
+ let t = D, n = V[t(556)].get(e.id);
590
+ n?.[t(602)]({
591
+ top: n.scrollHeight,
592
+ behavior: t(565)
593
+ });
594
+ }));
595
+ } })
596
+ ]
597
+ }, e.id);
598
+ })
599
+ }),
600
+ C("span", {
601
+ id: L + N(553),
602
+ className: N(594),
603
+ children: "스페이스로 들어 올리고 화살표로 옮긴 뒤 스페이스로 놓아요. Esc로 취소해요."
604
+ }),
605
+ C(N(636), {
606
+ className: N(594),
607
+ role: N(567),
608
+ "aria-live": "assertive",
609
+ children: _e
610
+ }),
611
+ F && Pe && ee(C(N(636), {
612
+ ref: z,
613
+ className: N(655),
614
+ style: { width: F.width },
615
+ "data-state": F[N(577)],
616
+ "data-blocked": F[N(591)] ? "" : void 0,
617
+ "aria-hidden": !0,
618
+ children: C(N(636), {
619
+ className: N(581),
620
+ children: Fe(Pe, {
621
+ dragging: !0,
622
+ lifted: !0
623
+ })
624
+ })
625
+ }), document.body)
626
+ ]
627
+ });
628
+ }
629
+ function se({ onAdd: t }) {
630
+ let n = e, [r, o] = x(!1), [s, c] = x(""), l = b(null);
631
+ _(() => {
632
+ let e = D;
633
+ r && l[e(556)]?.[e(503)]();
634
+ }, [r]);
635
+ let f = () => {
636
+ o(!1), c("");
637
+ }, p = () => {
638
+ let e = D, n = s[e(551)]();
639
+ n && (t(n), c(""), l[e(556)]?.[e(503)]());
640
+ };
641
+ return r ? C(n(636), {
642
+ className: n(614),
643
+ children: w(a, {
644
+ gap: 2,
645
+ children: [C(d, {
646
+ ref: l,
647
+ autoResize: !0,
648
+ maxRows: 5,
649
+ value: s,
650
+ placeholder: n(507),
651
+ "aria-label": "새 카드 제목",
652
+ onChange: (e) => c(e[n(550)].value),
653
+ onKeyDown: (e) => {
654
+ let t = n;
655
+ e[t(664)][t(521)] || e.keyCode === 229 || (e.key === "Enter" && !e[t(524)] ? (e[t(506)](), p()) : e[t(554)] === t(615) && (e.preventDefault(), f()));
656
+ },
657
+ onBlur: (e) => {
658
+ let t = n, r = e.relatedTarget;
659
+ !s[t(551)]() && !e[t(485)][t(504)](t(536))?.contains(r) && f();
660
+ }
661
+ }), w(i, {
662
+ gap: 2,
663
+ children: [C(u, {
664
+ variant: n(537),
665
+ size: "sm",
666
+ shortcut: n(588),
667
+ disabled: !s.trim(),
668
+ onClick: p,
669
+ children: "추가"
670
+ }), C(u, {
671
+ variant: n(653),
672
+ size: "sm",
673
+ onClick: f,
674
+ children: "취소"
675
+ })]
676
+ })]
677
+ })
678
+ }) : C(n(636), {
679
+ className: "ds-kanban__foot",
680
+ children: C(u, {
681
+ variant: "ghost",
682
+ size: "sm",
683
+ icon: C(S, {}),
684
+ block: !0,
685
+ className: n(539),
686
+ onClick: () => o(!0),
687
+ children: n(647)
688
+ })
689
+ });
690
+ }
691
+ export { j as KanbanBoard };