@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,226 @@
1
+ "use client";
2
+ const e = _;
3
+ (function(e, t) {
4
+ let n = _, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(174)) / 1 + parseInt(n(123)) / 2 + -parseInt(n(161)) / 3 * (-parseInt(n(170)) / 4) + -parseInt(n(124)) / 5 * (parseInt(n(172)) / 6) + -parseInt(n(140)) / 7 + parseInt(n(151)) / 8 + parseInt(n(155)) / 9 * (parseInt(n(160)) / 10) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(C, 539838);
12
+ import { Text as t } from "../../primitives/Typography2.js";
13
+ import { Progress as n } from "../../primitives/Progress2.js";
14
+ import { Box as r, Grid as i, Inline as a, Stack as o } from "../../primitives/Layout2.js";
15
+ import { StatusIcon as ee } from "../../primitives/StatusIcon2.js";
16
+ import { useControllableState as s } from "../../hooks/useControllableState.js";
17
+ import { Button as te, Checkbox as c } from "../../primitives/index.js";
18
+ import { useSelection as ne } from "../../hooks/useSelection.js";
19
+ import { Card as l, CardBody as u, CardHeader as d } from "../Card/Card2.js";
20
+ import { List as f, ListItem as p } from "../List/List2.js";
21
+ import { Accordion as m, AccordionItem as h } from "../Accordion/Accordion2.js";
22
+ /* empty css */
23
+ import { useId as g } from "react";
24
+ function _(e, t) {
25
+ e -= 119;
26
+ let n = C(), r = n[e];
27
+ _.SZSZCf === void 0 && (_.CoXJAr = function(e) {
28
+ let t = "", n = "";
29
+ 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);
30
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
31
+ return decodeURIComponent(n);
32
+ }, _.pCtLRo = {}, _.SZSZCf = !0);
33
+ let i = n[0];
34
+ _.AbCmPp !== i && (_.pCtLRo = {}, _.AbCmPp = i);
35
+ let a = _.pCtLRo[e];
36
+ return a === void 0 ? (r = _.CoXJAr(r), _.pCtLRo[e] = r) : r = a, r;
37
+ }
38
+ import { ChevronDown as re } from "lucide-react";
39
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
40
+ var b = (e) => e.stopPropagation(), x = {
41
+ pending: e(136),
42
+ active: e(147),
43
+ done: "완료",
44
+ error: "오류",
45
+ warning: e(137)
46
+ };
47
+ function S({ title: _, steps: S, groups: C, groupMode: w = e(120), openGroups: ie, defaultOpenGroups: ae, onOpenGroupsChange: T, actions: E, completed: oe, defaultCompleted: se, onCompletedChange: ce, readOnly: D, doneMessage: O = e(152), collapsible: k, open: le, defaultOpen: ue = !1, onOpenChange: A, summary: j, className: M, style: N }) {
48
+ let P = e, F = ne({
49
+ type: P(162),
50
+ value: oe,
51
+ defaultValue: se,
52
+ onValueChange: ce
53
+ }), I = C ? C[P(131)]((e) => e[P(166)]) : S ?? [], L = I.filter((e) => F[P(133)](e.id))[P(154)], R = I[P(154)], z = R > 0 && L === R, [B, V] = s(le, ue, A), H = !k || B, U = g(), de = R > 0 ? Math[P(138)](L / R * 100) : 0, W = typeof j == "function" ? j(L, R) : j ?? (k ? de + "% 완료" : null), G = (e, t = F[P(133)]) => e[P(166)][P(154)] > 0 && e[P(166)][P(130)]((e) => t(e.id)), K = C?.[P(119)]((e) => !G(e))?.id, [q, J] = s(ie, ae ?? (K ? [K] : []), T), Y = (e) => {
54
+ let t = P, n = F[t(133)](e);
55
+ if (F[t(167)](e), !C || n || w !== t(120)) return;
56
+ let r = new Set(F[t(149)])[t(158)](e), i = (e) => r[t(128)](e), a = C.findIndex((n) => n[t(166)][t(125)]((t) => t.id === e));
57
+ if (a < 0 || !G(C[a], i) || !q[t(139)](C[a].id)) return;
58
+ let o = [...C[t(134)](a + 1), ...C[t(134)](0, a)][t(119)]((e) => !G(e, i));
59
+ J(o ? [o.id] : []);
60
+ }, fe = I.find((e) => !F.isSelected(e.id) && !e[P(122)])?.id, X = k ? v(te, {
61
+ className: P(145),
62
+ variant: P(157),
63
+ size: "sm",
64
+ iconOnly: !0,
65
+ icon: v(re, {}),
66
+ "aria-label": H ? "단계 접기" : P(150),
67
+ "aria-expanded": H,
68
+ "aria-controls": U,
69
+ onClick: () => V(!H)
70
+ }) : null, Z = (e) => y(t, {
71
+ variant: P(165),
72
+ tone: e,
73
+ numeric: !0,
74
+ "aria-label": R + P(127) + L + P(175),
75
+ children: [L, y(t, {
76
+ as: P(146),
77
+ variant: P(165),
78
+ tone: "tertiary",
79
+ children: ["/", R]
80
+ })]
81
+ }), Q = C ? X : X ?? Z(P(148)), pe = E == null ? Q ?? void 0 : y(a, {
82
+ gap: 1,
83
+ wrap: !1,
84
+ children: [E, Q]
85
+ }), $ = v(n, {
86
+ value: L,
87
+ max: R,
88
+ size: "sm",
89
+ tone: z ? "success" : P(129),
90
+ "aria-label": P(169)
91
+ }), me = (e) => {
92
+ let n = P, r = F[n(133)](e.id), i = D || e[n(122)] ? void 0 : () => Y(e.id);
93
+ return v(p, {
94
+ disabled: e[n(122)],
95
+ onClick: i,
96
+ leading: v("span", {
97
+ onClick: b,
98
+ children: v(c, {
99
+ shape: n(163),
100
+ checked: r,
101
+ disabled: e[n(122)],
102
+ readOnly: !i,
103
+ onChange: i,
104
+ tabIndex: -1,
105
+ "aria-hidden": !0
106
+ })
107
+ }),
108
+ title: v(t, {
109
+ as: n(146),
110
+ variant: "body-md",
111
+ tone: n(r ? 144 : 148),
112
+ strike: r,
113
+ children: e[n(164)]
114
+ }),
115
+ description: e[n(126)],
116
+ trailing: r ? void 0 : e.action
117
+ }, e.id);
118
+ }, he = (e) => {
119
+ let n = P, r = F.isSelected(e.id), i = r ? "done" : e.id === fe ? n(135) : "pending", a = D || e[n(122)] ? void 0 : () => Y(e.id);
120
+ return v(p, {
121
+ variant: n(142),
122
+ disabled: e.disabled,
123
+ onClick: a,
124
+ leading: v(ee, {
125
+ status: i,
126
+ progress: i === "active" ? 0 : void 0,
127
+ size: "lg",
128
+ label: x[i]
129
+ }),
130
+ title: v(t, {
131
+ as: n(146),
132
+ variant: n(132),
133
+ tone: i === n(135) ? n(148) : n(144),
134
+ strike: r,
135
+ children: e[n(164)]
136
+ }),
137
+ description: e[n(126)],
138
+ trailing: r ? void 0 : e.action
139
+ }, e.id);
140
+ }, ge = w === P(120) ? {
141
+ type: "single",
142
+ value: q[0] ?? null,
143
+ onValueChange: (e) => J(e ? [e] : [])
144
+ } : {
145
+ type: P(162),
146
+ value: q,
147
+ onValueChange: J
148
+ };
149
+ return y(l, {
150
+ padding: C ? "md" : "sm",
151
+ className: M,
152
+ style: N,
153
+ children: [
154
+ v(d, {
155
+ title: _,
156
+ actions: pe
157
+ }),
158
+ v(u, { children: y(o, {
159
+ gap: 3,
160
+ children: [
161
+ C ? y(i, {
162
+ columns: "minmax(0, 1fr) auto",
163
+ gap: 3,
164
+ align: P(121),
165
+ children: [$, Z(P(144))]
166
+ }) : $,
167
+ W != null && !z && v(t, {
168
+ variant: "caption",
169
+ tone: P(144),
170
+ numeric: !0,
171
+ children: W
172
+ }),
173
+ z && O && v(t, {
174
+ variant: "body-sm",
175
+ tone: P(173),
176
+ children: O
177
+ })
178
+ ]
179
+ }) }),
180
+ v(P(171), {
181
+ id: U,
182
+ className: P(143),
183
+ "data-open": H || void 0,
184
+ inert: !H || void 0,
185
+ children: v("div", {
186
+ className: P(168),
187
+ children: C ? v(r, {
188
+ padding: 1,
189
+ children: v(m, {
190
+ variant: P(159),
191
+ ...ge,
192
+ children: C.map((e) => {
193
+ let n = P, r = G(e);
194
+ return v(h, {
195
+ value: e.id,
196
+ flush: !0,
197
+ title: v(t, {
198
+ as: n(146),
199
+ variant: n(141),
200
+ tone: n(r ? 144 : 148),
201
+ strike: r,
202
+ children: e[n(153)]
203
+ }),
204
+ children: v(f, {
205
+ "aria-label": "단계",
206
+ children: e[n(166)].map(he)
207
+ })
208
+ }, e.id);
209
+ })
210
+ })
211
+ }) : v(f, {
212
+ "aria-label": "단계",
213
+ children: I[P(156)](me)
214
+ })
215
+ })
216
+ })
217
+ ]
218
+ });
219
+ }
220
+ export { S as ProgressTracker };
221
+ function C() {
222
+ let e = /* @__PURE__ */ "DgvYDgLHCNK.zhmTDhjHy2TLCL9FDg9Nz2XL.C3bHBG.7kEa6RIiio2vOcdRI6JQS4q.zgvMyxvSDa.C2vSzwn0zwq.64UO6Roeio2oVoY5MoQ4Sa.mJqXndu2ogzcDurXEG.66QO65gqioUbNEUdIoYwToYALce.DgL0Bgu.BgvUz3rO.mJa3mgP5ALnVrq.BwfW.z2HVC3q.ywrK.zMLSBgvK.ndm3mZbjs29xwe8.ntG5nwrtqNfOsW.BxvSDgLWBgu.y2LYy2XL.BgfIzwW.BgfIzwWTBwq.C3rLChm.Dg9Nz2XL.zhmTDhjHy2TLCL9FzM9Szc1PBM5LCG.7kEe7zAj66wG.nJb5vuf2ANu.zgL2.mte0A1jvwwzt.C3vJy2vZCW.ntaXmJa4Exf4AwLP.64UO6RoeioYzHoUJJa.zMLUza.C2LUz2XL.y2vUDgvY.zgLZywjSzwq.mtGXmJiYogvND3zhBq.otm4nJvVtwrHvMK.C29Tzq.zgvZy3jPChrPB24.64UO6RoeioYKKsa.AgfZ.ywnJzw50.zxzLCNK.zMXHDe1HCa.yM9KEs1Tza.AxntzwXLy3rLza.C2XPy2u.ywn0AxzL.64Ya6RIWioYKKq.7zMv7j24io2vHoYALa.CM91BMq.Aw5JBhvKzxm.ntKXodi2oufcwM92AG.BgfIzwWTBgC.CMfPC2vK.zhmTDhjHy2TLCL9FzM9Sza".split(".");
223
+ return C = function() {
224
+ return e;
225
+ }, C();
226
+ }
@@ -0,0 +1,186 @@
1
+ "use client";
2
+ const e = r;
3
+ (function(e, t) {
4
+ let n = r, i = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(417)) / 1 + parseInt(n(414)) / 2 + parseInt(n(457)) / 3 + -parseInt(n(415)) / 4 + -parseInt(n(424)) / 5 + parseInt(n(431)) / 6 * (parseInt(n(426)) / 7) + parseInt(n(439)) / 8 == t) break;
7
+ i.push(i.shift());
8
+ } catch {
9
+ i.push(i.shift());
10
+ }
11
+ })(m, 663245);
12
+ import { Text as t } from "../../primitives/Typography2.js";
13
+ import { Inline as n } from "../../primitives/Layout2.js";
14
+ function r(e, t) {
15
+ e -= 411;
16
+ let n = m(), i = n[e];
17
+ r.QpPjXN === void 0 && (r.wdZwZv = function(e) {
18
+ let t = "", n = "";
19
+ 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);
20
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
21
+ return decodeURIComponent(n);
22
+ }, r.aViBcf = {}, r.QpPjXN = !0);
23
+ let a = n[0];
24
+ r.KDyBFV !== a && (r.aViBcf = {}, r.KDyBFV = a);
25
+ let o = r.aViBcf[e];
26
+ return o === void 0 ? (i = r.wdZwZv(i), r.aViBcf[e] = i) : i = o, i;
27
+ }
28
+ import { useControllableState as i } from "../../hooks/useControllableState.js";
29
+ import { cx as a } from "../../primitives/index.js";
30
+ /* empty css */
31
+ import { useRef as o, useState as s } from "react";
32
+ import { Star as c } from "lucide-react";
33
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
34
+ var d = {
35
+ sm: e(416),
36
+ md: e(453),
37
+ lg: e(466)
38
+ }, f = (t) => Number[e(413)](t) ? String(t) : t[e(448)](1);
39
+ function p({ value: r, defaultValue: p = null, onValueChange: m, max: h = 5, allowHalf: g = !1, allowClear: _ = !0, readOnly: v = !1, disabled: y = !1, size: b = "md", tone: x = e(449), icon: S, labels: C, showValue: w = !1, count: T, name: E, id: D, className: O, "aria-label": k = "별점", "aria-labelledby": A }) {
40
+ let j = e, [M, N] = i(r, p, m), [P, F] = s(null), [I, L] = s(null), [R, z] = s({
41
+ n: 0,
42
+ upTo: 0
43
+ }), B = o(/* @__PURE__ */ new Map()), V = !v && !y, H = g ? .5 : 1, U = V && P !== null && P !== I ? P : null, W = U ?? M ?? 0, G = (e) => e && C ? C[Math[j(454)](e) - 1] : void 0, K = G(U ?? M), q = (e) => {
44
+ V && (_ && e === M ? (N(null), L(e)) : (N(e), L(null), z((t) => ({
45
+ n: t.n + 1,
46
+ upTo: Math.ceil(e)
47
+ }))));
48
+ }, J = (e) => {
49
+ let t = j;
50
+ N(e), z((n) => ({
51
+ n: n.n + 1,
52
+ upTo: Math[t(454)](e)
53
+ })), B[t(421)][t(471)](e)?.[t(435)]();
54
+ }, Y = (e) => {
55
+ let t = j;
56
+ if (!V) return;
57
+ let n = M ?? 0;
58
+ switch (e[t(423)]) {
59
+ case t(462):
60
+ case t(470):
61
+ J(Math[t(443)](h, n + H));
62
+ break;
63
+ case t(461):
64
+ case t(468):
65
+ J(Math[t(451)](H, n - H));
66
+ break;
67
+ case t(472):
68
+ J(H);
69
+ break;
70
+ case t(442):
71
+ J(h);
72
+ break;
73
+ case "Backspace":
74
+ case t(432):
75
+ if (!_ || M === null) return;
76
+ N(null);
77
+ break;
78
+ case " ":
79
+ case t(463): {
80
+ let n = Number(e[t(425)][t(440)].value);
81
+ if (Number[t(446)](n)) return;
82
+ q(n);
83
+ break;
84
+ }
85
+ default: return;
86
+ }
87
+ e[t(465)]();
88
+ }, X = Array[j(437)]({ length: h * (g ? 2 : 1) }, (e, t) => (t + 1) * H), Z = M !== null && X[j(441)](M) ? M : X[0], Q = S ?? l(c, {}), $ = Array[j(437)]({ length: h }, (e, t) => {
89
+ let n = j, r = Math.min(1, Math[n(451)](0, W - t)), i = R.n > 0 && t < R.upTo, o = X.filter((e) => e > t && e <= t + 1);
90
+ return u(n(469), {
91
+ className: n(459),
92
+ style: { "--_i": t },
93
+ children: [u(n(469), {
94
+ className: n(467),
95
+ "data-pop": i || void 0,
96
+ children: [l(n(469), {
97
+ className: n(427),
98
+ "aria-hidden": !0,
99
+ children: Q
100
+ }), l(n(469), {
101
+ className: n(455),
102
+ "aria-hidden": !0,
103
+ style: { clipPath: n(450) + (1 - r) * 100 + n(444) },
104
+ children: Q
105
+ })]
106
+ }, i ? n(438) + R.n : n(447)), !v && o[n(452)]((e) => l(n(469), {
107
+ ref: (t) => {
108
+ let r = n;
109
+ t ? B[r(421)].set(e, t) : B[r(421)][r(428)](e);
110
+ },
111
+ role: "radio",
112
+ "aria-checked": e === M,
113
+ "aria-label": G(e) ? f(e) + n(433) + G(e) : f(e) + "점",
114
+ "aria-disabled": y || void 0,
115
+ tabIndex: V && e === Z ? 0 : -1,
116
+ "data-value": e,
117
+ "data-half": g && !Number.isInteger(e) || void 0,
118
+ className: a(n(436), g && n(Number.isInteger(e) ? 419 : 412)),
119
+ onPointerEnter: () => {
120
+ V && (F(e), e !== I && L(null));
121
+ },
122
+ onClick: () => q(e)
123
+ }, e))]
124
+ }, t);
125
+ });
126
+ return u(n, {
127
+ gap: 2,
128
+ wrap: !1,
129
+ id: D,
130
+ className: a(j(434), j(464) + b, j(464) + x, O),
131
+ "data-disabled": y || void 0,
132
+ children: [
133
+ v ? l(j(469), {
134
+ className: "ds-rating__stars",
135
+ role: j(429),
136
+ "aria-label": M === null ? k + j(475) : h + j(474) + f(M) + "점",
137
+ children: $
138
+ }) : l(j(456), {
139
+ className: j(418),
140
+ role: j(476),
141
+ "aria-label": A ? void 0 : k,
142
+ "aria-labelledby": A,
143
+ "aria-disabled": y || void 0,
144
+ "data-previewing": U !== null || void 0,
145
+ onKeyDown: Y,
146
+ onPointerLeave: () => {
147
+ F(null), L(null);
148
+ },
149
+ children: $
150
+ }),
151
+ w && M !== null && l(t, {
152
+ variant: d[b],
153
+ weight: j(458),
154
+ numeric: !0,
155
+ children: f(M)
156
+ }),
157
+ K && l(t, {
158
+ variant: d[b],
159
+ tone: j(U === null ? 422 : 473),
160
+ children: K
161
+ }),
162
+ T !== void 0 && u(t, {
163
+ variant: j(411),
164
+ tone: j(445),
165
+ numeric: !0,
166
+ children: [
167
+ "(",
168
+ T[j(420)](j(430)),
169
+ ")"
170
+ ]
171
+ }),
172
+ E && l(j(460), {
173
+ type: "hidden",
174
+ name: E,
175
+ value: M ?? ""
176
+ })
177
+ ]
178
+ });
179
+ }
180
+ function m() {
181
+ let e = /* @__PURE__ */ "BgfIzwWTBgC.zhmTCMf0Aw5Nx19Py29U.qxjYB3DeB3DU.C3bHBG.qxjYB3DvCa.z2v0.sg9Tzq.C2vJB25Kyxj5.7kcqioUNJoYGKoYxKca.ioYxHUYDJa.CMfKAw9NCM91Ca.yM9KEs1ZBq.zhmTCMf0Aw5Nx19OAxqTlwXLzNq.AxnjBNrLz2vY.mtG0mJu0ng9sD1HqCq.mZK2mZCZmNP4tKrzDG.BgfIzwWTC20.mte2mta4mevhweT5tW.zhmTCMf0Aw5Nx19ZDgfYCW.zhmTCMf0Aw5Nx19OAxqTlxjPz2H0.Dg9mB2nHBgvtDhjPBMC.y3vYCMvUDa.zgvMyxvSDa.A2v5.nda1ntu2mhLQv1jyAa.DgfYz2v0.mtmZotq4nufhCw1YuW.zhmTCMf0Aw5Nx19IyxnL.zgvSzxrL.Aw1N.A28Ts1i.mtjsAeHjAxq.rgvSzxrL.7kcqlca.zhmTCMf0Aw5N.zM9JDxm.zhmTCMf0Aw5Nx19OAxq.zNjVBq.Cg9Wlq.mtC5nJq3nJbhsgjuBxC.zgf0yxnLDa.Aw5JBhvKzxm.rw5K.BwLU.jsaWidaP.DgvYDgLHCNK.Axnoyu4.C3rPBgW.Dg9gAxHLza.yw1Izxi.Aw5ZzxqOmca.Bwf4.BwfW.BgfIzwWTBwq.y2vPBa.zhmTCMf0Aw5Nx19MAwXS.zgL2.mJmWmZC5BMTQrK5x.C2vTAwjVBgq.zhmTCMf0Aw5Nx19ZDgfY.Aw5WDxq.qxjYB3Dmzwz0.qxjYB3DsAwDODa.rw50zxi.zhmTCMf0Aw5Nls0.ChjLDMvUDerLzMf1Bhq".split(".");
182
+ return m = function() {
183
+ return e;
184
+ }, m();
185
+ }
186
+ export { p as Rating };
@@ -0,0 +1,238 @@
1
+ "use client";
2
+ const e = t;
3
+ function t(e, n) {
4
+ e -= 343;
5
+ let r = O(), i = r[e];
6
+ t.eZIuno === void 0 && (t.GNRDbt = 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.AGWsTK = {}, t.eZIuno = !0);
12
+ let a = r[0];
13
+ t.AmWtMV !== a && (t.AGWsTK = {}, t.AmWtMV = a);
14
+ let o = t.AGWsTK[e];
15
+ return o === void 0 ? (i = t.GNRDbt(i), t.AGWsTK[e] = i) : i = o, i;
16
+ }
17
+ (function(e, n) {
18
+ let r = t, i = e();
19
+ for (;;) try {
20
+ if (parseInt(r(343)) / 1 * (parseInt(r(401)) / 2) + parseInt(r(357)) / 3 + parseInt(r(348)) / 4 * (-parseInt(r(361)) / 5) + -parseInt(r(362)) / 6 * (parseInt(r(344)) / 7) + parseInt(r(397)) / 8 * (parseInt(r(370)) / 9) + -parseInt(r(391)) / 10 + parseInt(r(368)) / 11 == n) break;
21
+ i.push(i.shift());
22
+ } catch {
23
+ i.push(i.shift());
24
+ }
25
+ })(O, 698292);
26
+ import { cx as n } from "../../primitives/index.js";
27
+ import { collapseLayout as r, expandLayout as i, initialLayout as a, isCollapsed as o, loadLayout as s, resetPair as c, resizeLayout as l, sameLayout as u, saveLayout as d } from "./layout.js";
28
+ /* empty css */
29
+ import { Children as f, Fragment as p, createContext as m, isValidElement as h, useContext as g, useEffect as _, useId as v, useRef as y, useState as b } from "react";
30
+ import { jsx as x } from "react/jsx-runtime";
31
+ var S = m(null), C = m(-1), w = (e) => {
32
+ let t = g(S);
33
+ if (!t) throw Error(e + " must be inside a ResizablePanelGroup");
34
+ return t;
35
+ }, T = (t, n = "") => f.toArray(t)[e(390)]((t) => {
36
+ let r = e;
37
+ if (!h(t)) return [];
38
+ let i = "" + n + String(t[r(355)]);
39
+ return t[r(345)] === p ? T(t[r(374)][r(403)], i + "/") : [{
40
+ el: t,
41
+ key: i
42
+ }];
43
+ }), ee = 16, E = (t) => {
44
+ let n = e, r = t.collapsedSize ?? 0, i = Math[n(371)](t.minSize ?? 10, r);
45
+ return {
46
+ min: i,
47
+ max: Math[n(371)](i, t[n(381)] ?? 100),
48
+ collapsible: !!t[n(395)],
49
+ collapsedSize: r,
50
+ defaultSize: t[n(376)]
51
+ };
52
+ };
53
+ function D({ direction: t = e(396), children: f, autoSaveId: p, onLayoutChange: m, onLayout: h, className: g, style: w, ...D }) {
54
+ let O = e, j = y(null), M = v(), N = T(f), P = N[O(356)](({ el: e }) => e[O(345)] === k).map(({ el: e }) => e), F = P[O(359)]((e) => E(e[O(374)])), I = P[O(359)]((e, t) => e.props.id ?? M + "-panel-" + t), L = F[O(359)]((e, t) => I[t] + ":" + (e.defaultSize ?? "") + ":" + e[O(358)] + ":" + e.max).join("|"), R = () => a(F, P[O(359)]((e) => !!(e[O(374)][O(372)] ?? e[O(374)][O(409)]))), [z, B] = b(() => ({
55
+ signature: L,
56
+ sizes: p && s(p, F[O(366)]) || R()
57
+ })), V = z[O(379)];
58
+ z[O(402)] !== L && (V = R(), B({
59
+ signature: L,
60
+ sizes: V
61
+ }));
62
+ let [H, U] = b(null), W = y(null), G = y({}), K = y({
63
+ sizes: V,
64
+ panels: F,
65
+ panelEls: P,
66
+ onLayoutChange: m,
67
+ onLayout: h,
68
+ autoSaveId: p
69
+ });
70
+ _(() => {
71
+ let e = O;
72
+ K[e(382)] = {
73
+ sizes: V,
74
+ panels: F,
75
+ panelEls: P,
76
+ onLayoutChange: m,
77
+ onLayout: h,
78
+ autoSaveId: p
79
+ };
80
+ });
81
+ let q = (e) => B((t) => ({
82
+ ...t,
83
+ sizes: e
84
+ })), J = (e, t, n = !0) => {
85
+ let r = O, { panels: i, panelEls: a, onLayout: s, autoSaveId: c } = K[r(382)];
86
+ q(e), !u(e, t) && (i[r(387)]((s, c) => {
87
+ let l = r, u = o(t, i, c), d = o(e, i, c);
88
+ d && !u && (G[l(382)][c] = t[c]), d !== u && n && a[c]?.[l(374)][l(394)]?.(d);
89
+ }), s?.(e), c && d(c, e));
90
+ }, Y = () => {
91
+ let e = O, n = j[e(382)]?.[e(398)]();
92
+ return Math[e(371)](1, (t === "horizontal" ? n?.[e(369)] : n?.[e(349)]) ?? 1);
93
+ }, te = (e) => G[O(382)][e] ?? F[e][O(376)] ?? F[e][O(358)], X = (e, t, n) => n ? r(e, F, t) : i(e, F, t, te(t)), Z = y({
94
+ commit: J,
95
+ foldOrOpen: X
96
+ });
97
+ _(() => {
98
+ let e = O;
99
+ Z[e(382)] = {
100
+ commit: J,
101
+ foldOrOpen: X
102
+ };
103
+ });
104
+ let ne = P[O(359)]((e) => e[O(374)][O(372)] === void 0 ? "" : e[O(374)][O(372)] ? "1" : "0")[O(392)]("");
105
+ _(() => {
106
+ let e = O;
107
+ if (W[e(382)]) return;
108
+ let { sizes: t, panels: n, panelEls: r } = K.current, i = t;
109
+ r[e(387)]((t, r) => {
110
+ let a = e, s = t[a(374)][a(372)];
111
+ s !== void 0 && n[r].collapsible && s !== o(i, n, r) && (i = Z[a(382)][a(389)](i, r, s));
112
+ }), i !== t && Z.current[e(365)](i, t, !1);
113
+ }, [ne, H]);
114
+ let re = (e, n) => {
115
+ let r = O;
116
+ n.button === 0 && (n.preventDefault(), n.currentTarget[r(375)](n[r(393)]), n[r(350)][r(415)]({ preventScroll: !0 }), W[r(382)] = {
117
+ handle: e,
118
+ pointer: t === r(396) ? n[r(411)] : n[r(367)],
119
+ start: V,
120
+ last: V,
121
+ px: Y()
122
+ }, U(e));
123
+ }, ie = (e) => {
124
+ let n = O, r = W[n(382)];
125
+ if (!r) return;
126
+ let i = ((t === "horizontal" ? e[n(411)] : e[n(367)]) - r.pointer) / r.px * 100, a = l(r.start, F, r[n(405)], i, .5);
127
+ u(a, r[n(378)]) || (r[n(378)] = a, q(a), m?.(a));
128
+ }, ae = () => {
129
+ let e = O, t = W[e(382)];
130
+ t && (W[e(382)] = null, U(null), J(t[e(378)], t[e(385)]));
131
+ }, oe = () => {
132
+ let e = O, t = W[e(382)];
133
+ t && (W[e(382)] = null, U(null), q(t.start), m?.(t.start));
134
+ }, Q = (e) => {
135
+ let t = O, n = F[e].collapsible ? e : F[e + 1]?.[t(395)] ? e + 1 : -1;
136
+ J(n >= 0 ? X(V, n, !o(V, F, n)) : c(V, F, e, R()), V);
137
+ }, se = (e, n) => {
138
+ let r = O;
139
+ if (n[r(355)] === r(377) && W[r(382)]) {
140
+ n.preventDefault(), oe();
141
+ return;
142
+ }
143
+ if (W.current) return;
144
+ let i = t === r(396) ? r(351) : r(347), a = t === r(396) ? "ArrowRight" : r(353), o = (n[r(412)] ? 64 : ee) / Y() * 100, s = F[e], c = F[e + 1], u = null;
145
+ if (n[r(355)] === i) u = -o;
146
+ else if (n.key === a) u = o;
147
+ else if (n[r(355)] === r(407)) u = -Math[r(371)](0, V[e] - s[r(358)]);
148
+ else if (n[r(355)] === "End") u = Math.max(0, Math[r(358)](s[r(371)] - V[e], V[e + 1] - c[r(358)]));
149
+ else if (n[r(355)] === r(360)) {
150
+ n[r(354)](), Q(e);
151
+ return;
152
+ }
153
+ u !== null && (n[r(354)](), J(l(V, F, e, u, 0), V));
154
+ }, $ = -1, ce = N[O(359)](({ el: e, key: t }) => {
155
+ let n = O, r = -1;
156
+ return e.type === k ? r = ++$ : e[n(345)] === A && (r = $), x(C[n(346)], {
157
+ value: r,
158
+ children: e
159
+ }, t);
160
+ });
161
+ return x(S[O(346)], {
162
+ value: {
163
+ direction: t,
164
+ sizes: V,
165
+ panels: F,
166
+ panelIds: I,
167
+ dragging: H,
168
+ startDrag: re,
169
+ moveDrag: ie,
170
+ endDrag: ae,
171
+ onHandleKey: se,
172
+ toggle: Q
173
+ },
174
+ children: x(O(400), {
175
+ ref: j,
176
+ className: n(O(364), g),
177
+ "data-direction": t,
178
+ "data-dragging": H !== null || void 0,
179
+ style: w,
180
+ ...D,
181
+ children: ce
182
+ })
183
+ });
184
+ }
185
+ function O() {
186
+ let e = /* @__PURE__ */ "CgfUzwXZ.C3rHCNq.zhmTCMvZAxPHyMXLx19NCMLW.zM9YrwfJAa.zgLYzwn0Aw9U.zM9Sze9Yt3bLBG.zMXHDe1HCa.mtiZmJa3otbIquHfDfG.AM9PBG.Cg9PBNrLCKLK.B25dB2XSyxbZzwrdAgfUz2u.y29SBgfWC2LIBgu.Ag9YAxPVBNrHBa.mJmYqvjICxzK.z2v0qM91BMrPBMDdBgLLBNrszwn0.zw5KrhjHzW.zgL2.mMDjt21fwa.C2LNBMf0DxjL.y2HPBgrYzw4.zhmTCMvZAxPHyMXLx19Oyw5KBgu.AgfUzgXL.uMvZAxPHyMXLsgfUzgXL.sg9Tzq.CM91BMq.zgvMyxvSDenVBgXHChnLza.C3bHBG.y2XPzw50wa.C2HPzNrlzxK.7yYO64sqio2bRoQ4ScdSOBdSOiG.B25iyw5KBgvlzxK.zM9JDxm.mteWmZC3r3DXD2f6.mtrgtNjpEwG.DhLWzq.uhjVDMLKzxi.qxjYB3DvCa.mJuWnhb5tePmDq.AgvPz2H0.y3vYCMvUDfrHCMDLDa.qxjYB3Dmzwz0.C2vWyxjHDg9Y.qxjYB3DeB3DU.ChjLDMvUDerLzMf1Bhq.A2v5.zMLSDgvY.mZq4mtu1neXXsfDnuW.BwLU.BwfW.rw50zxi.ode1mer5sK1IDG.mte3ndm0nejLqurkva.DMvYDgLJywW.zhmTCMvZAxPHyMXL.y29TBwL0.BgvUz3rO.y2XPzw50wq.mtuYnde1odLzu0jdtM8.D2LKDgG.mJeYoda1D2vNv1vs.Bwf4.y29SBgfWC2vK.y29SBgfWC2vKu2L6zq.ChjVChm.C2v0ug9PBNrLCKnHChr1CMu.zgvMyxvSDfnPEMu.rxnJyxbL.BgfZDa.C2L6zxm.CgfUzwXjzhm.Bwf4u2L6zq.y3vYCMvUDa.uMvZAxPHyMXLugfUzwW".split(".");
187
+ return O = function() {
188
+ return e;
189
+ }, O();
190
+ }
191
+ function k({ defaultSize: t, minSize: r, maxSize: i, collapsible: a, collapsedSize: s, collapsed: c, defaultCollapsed: l, onCollapsedChange: u, id: d, className: f, style: p, children: m, ...h }) {
192
+ let _ = e, v = w(_(383)), y = g(C), b = v.sizes[y] ?? 0, S = v[_(384)][y], T = !!S && o(v[_(379)], v[_(384)], y);
193
+ return x("div", {
194
+ id: v.panelIds[y],
195
+ className: n("ds-resizable__panel", f),
196
+ "data-collapsed": T || void 0,
197
+ "data-size": Math[_(408)](b),
198
+ inert: T && S[_(373)] === 0 ? !0 : void 0,
199
+ style: {
200
+ flexGrow: b,
201
+ ...p
202
+ },
203
+ ...h,
204
+ children: m
205
+ });
206
+ }
207
+ function A({ withGrip: t, disabled: r, className: i, "aria-label": a, ...o }) {
208
+ let s = e, c = w(s(406)), l = g(C), u = c[s(384)][l];
209
+ if (!u || !c[s(384)][l + 1]) return null;
210
+ let d = c[s(379)][l], f = c.dragging === l;
211
+ return x("div", {
212
+ role: s(352),
213
+ tabIndex: r ? void 0 : 0,
214
+ "aria-orientation": c[s(388)] === s(396) ? s(363) : "horizontal",
215
+ "aria-label": a ?? s(413),
216
+ "aria-controls": c[s(380)][l],
217
+ "aria-valuenow": Math.round(d),
218
+ "aria-valuemin": Math[s(408)](u[s(395)] ? u[s(373)] : u.min),
219
+ "aria-valuemax": Math[s(408)](u[s(371)]),
220
+ "aria-disabled": r || void 0,
221
+ className: n(s(404), i),
222
+ "data-dragging": f || void 0,
223
+ "data-disabled": r || void 0,
224
+ onPointerDown: r ? void 0 : (e) => c.startDrag(l, e),
225
+ onPointerMove: c.moveDrag,
226
+ onPointerUp: c[s(399)],
227
+ onPointerCancel: c[s(399)],
228
+ onLostPointerCapture: c[s(399)],
229
+ onDoubleClick: r ? void 0 : () => c.toggle(l),
230
+ onKeyDown: r ? void 0 : (e) => c[s(414)](l, e),
231
+ ...o,
232
+ children: t && x(s(410), {
233
+ className: s(386),
234
+ "aria-hidden": !0
235
+ })
236
+ });
237
+ }
238
+ export { A as ResizableHandle, k as ResizablePanel, D as ResizablePanelGroup };