@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,180 @@
1
+ "use client";
2
+ const e = _;
3
+ (function(e, t) {
4
+ let n = _, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(396)) / 1 * (-parseInt(n(413)) / 2) + parseInt(n(403)) / 3 * (parseInt(n(388)) / 4) + -parseInt(n(400)) / 5 + parseInt(n(390)) / 6 + -parseInt(n(414)) / 7 + parseInt(n(407)) / 8 * (parseInt(n(412)) / 9) + -parseInt(n(409)) / 10 == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(l, 496293);
12
+ var t = (t, n, r) => Math[e(397)](r, Math[e(410)](n, t)), n = (t, n = 0) => {
13
+ let r = e, i = 10 ** n;
14
+ return Math[r(392)](t * i) / i;
15
+ }, r = /^#?([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
16
+ function i(t) {
17
+ let i = e, a = r.exec(t.trim());
18
+ if (!a) return null;
19
+ let o = a[1];
20
+ o[i(387)] <= 4 && (o = [...o].map((e) => e + e)[i(401)](""));
21
+ let s = (e) => parseInt(o[i(406)](e, e + 2), 16);
22
+ return {
23
+ r: s(0),
24
+ g: s(2),
25
+ b: s(4),
26
+ a: o.length === 8 ? n(s(6) / 255, 3) : 1
27
+ };
28
+ }
29
+ var a = (t, n) => {
30
+ let r = e, i = t[r(394)]();
31
+ return /^-?\d*\.?\d+%?$/[r(391)](i) ? i[r(417)]("%") ? parseFloat(i) / 100 * n : parseFloat(i) : NaN;
32
+ }, o = (t) => t[e(418)](/[\s,/]+/)[e(419)](Boolean), s = (e) => e === void 0 ? 1 : a(e, 1);
33
+ function c(t) {
34
+ let n = e, r = /^(?:rgba?\()?\s*([^)]*?)\s*\)?$/i.exec(t[n(394)]());
35
+ if (!r) return null;
36
+ let i = o(r[1]);
37
+ if (i[n(387)] < 3 || i[n(387)] > 4) return null;
38
+ let [c, l, u] = i[n(406)](0, 3)[n(411)]((e) => a(e, 255)), d = s(i[3]);
39
+ return [
40
+ c,
41
+ l,
42
+ u,
43
+ d
44
+ ].some((e) => Number.isNaN(e)) || [
45
+ c,
46
+ l,
47
+ u
48
+ ][n(416)]((e) => e < 0 || e > 255) || d < 0 || d > 1 ? null : {
49
+ r: c,
50
+ g: l,
51
+ b: u,
52
+ a: d
53
+ };
54
+ }
55
+ function l() {
56
+ let e = /* @__PURE__ */ "Axnoyu4.jsWG.C2XPy2u.ndqWELLLAfzt.CMDIka.nte0odq0mefcuxj5tW.Bwf4.BwfW.odK3ntD3uNPLuKK.mta4EMz2C0fu.ntG1ota3v21xq09W.AhnSka.C29Tzq.zw5KC1DPDgG.C3bSAxq.zMLSDgvY.BgvUz3rO.mZmYndiYmhPhz1n6sG.CMDI.mJa5mJy3ngLPs1LUzG.DgvZDa.CM91BMq.CgfKu3rHCNq.DhjPBq.CMDIysG.oteZr2HfA2Lv.BwLU.Dg9tDhjPBMC.zxHLyW.mZqXnda2nuPlsxzvuG.AM9PBG.AhnS.m3vSs2X1vW".split(".");
57
+ return l = function() {
58
+ return e;
59
+ }, l();
60
+ }
61
+ function u(t) {
62
+ let n = e, r = /^(?:hsla?\()?\s*([^)]*?)\s*\)?$/i[n(399)](t[n(394)]());
63
+ if (!r) return null;
64
+ let i = o(r[1].replace(/deg/gi, ""));
65
+ if (i[n(387)] < 3 || i[n(387)] > 4) return null;
66
+ let c = a(i[0], 360), l = a(i[1].endsWith("%") ? i[1] : i[1] + "%", 1), u = a(i[2][n(417)]("%") ? i[2] : i[2] + "%", 1), d = s(i[3]);
67
+ return [
68
+ c,
69
+ l,
70
+ u,
71
+ d
72
+ ][n(416)]((e) => Number[n(404)](e)) || l < 0 || l > 1 || u < 0 || u > 1 || d < 0 || d > 1 ? null : h({
73
+ h: (c % 360 + 360) % 360,
74
+ s: l,
75
+ l: u,
76
+ a: d
77
+ });
78
+ }
79
+ function d(t) {
80
+ let n = e, r = t.trim();
81
+ return /^hsla?\(/i[n(391)](r) ? u(r) : /^rgba?\(/i[n(391)](r) ? c(r) : i(r);
82
+ }
83
+ function f({ r: t, g: n, b: r, a: i }) {
84
+ let a = e, o = t / 255, s = n / 255, c = r / 255, l = Math[a(410)](o, s, c), u = l - Math[a(397)](o, s, c), d = 0;
85
+ return u && (d = l === o ? (s - c) / u % 6 : l === s ? (c - o) / u + 2 : (o - s) / u + 4, d = (d * 60 + 360) % 360), {
86
+ h: d,
87
+ s: l ? u / l : 0,
88
+ v: l,
89
+ a: i
90
+ };
91
+ }
92
+ function p({ h: e, s: t, v: n, a: r }) {
93
+ let i = (r) => {
94
+ let i = (r + e / 60) % 6;
95
+ return (n - n * t * Math.max(0, Math.min(i, 4 - i, 1))) * 255;
96
+ };
97
+ return {
98
+ r: i(5),
99
+ g: i(3),
100
+ b: i(1),
101
+ a: r
102
+ };
103
+ }
104
+ function m({ r: e, g: t, b: n, a: r }) {
105
+ let { h: i, s: a, v: o } = f({
106
+ r: e,
107
+ g: t,
108
+ b: n,
109
+ a: r
110
+ }), s = o * (1 - a / 2);
111
+ return {
112
+ h: i,
113
+ s: s === 0 || s === 1 ? 0 : (o - s) / Math.min(s, 1 - s),
114
+ l: s,
115
+ a: r
116
+ };
117
+ }
118
+ function h({ h: t, s: n, l: r, a: i }) {
119
+ let a = e, o = (e) => (e + t / 30) % 12, s = n * Math[a(397)](r, 1 - r), c = (e) => (r - s * Math.max(-1, Math[a(397)](o(e) - 3, 9 - o(e), 1))) * 255;
120
+ return {
121
+ r: c(0),
122
+ g: c(8),
123
+ b: c(4),
124
+ a: i
125
+ };
126
+ }
127
+ var g = (n) => t(Math[e(392)](n), 0, 255)[e(398)](16)[e(393)](2, "0");
128
+ function _(e, t) {
129
+ e -= 387;
130
+ let n = l(), r = n[e];
131
+ _.IABDxO === void 0 && (_.MZbnbF = function(e) {
132
+ let t = "", n = "";
133
+ 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);
134
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
135
+ return decodeURIComponent(n);
136
+ }, _.oVUulQ = {}, _.IABDxO = !0);
137
+ let i = n[0];
138
+ _.TaCrhE !== i && (_.oVUulQ = {}, _.TaCrhE = i);
139
+ let a = _.oVUulQ[e];
140
+ return a === void 0 ? (r = _.MZbnbF(r), _.oVUulQ[e] = r) : r = a, r;
141
+ }
142
+ function v({ r: e, g: t, b: n, a: r }, i = !0) {
143
+ let a = "#" + g(e) + g(t) + g(n);
144
+ return i && r < 1 ? a + g(r * 255) : a;
145
+ }
146
+ function y({ r, g: i, b: a, a: o }) {
147
+ let s = e, c = [
148
+ r,
149
+ i,
150
+ a
151
+ ].map((e) => t(Math.round(e), 0, 255))[s(401)](", ");
152
+ return o < 1 ? s(395) + c + ", " + n(o, 2) + ")" : s(408) + c + ")";
153
+ }
154
+ function b(t) {
155
+ let r = e, { h: i, s: a, l: o, a: s } = m(t), c = Math[r(392)](i) % 360 + ", " + Math.round(a * 100) + r(405) + Math[r(392)](o * 100) + "%";
156
+ return s < 1 ? "hsla(" + c + ", " + n(s, 2) + ")" : r(415) + c + ")";
157
+ }
158
+ function x(t, n, r = !0) {
159
+ let i = e;
160
+ return n === i(389) ? y(r ? t : {
161
+ ...t,
162
+ a: 1
163
+ }) : n === i(402) ? b(r ? t : {
164
+ ...t,
165
+ a: 1
166
+ }) : v(t, r);
167
+ }
168
+ function S(e, t = !0) {
169
+ let n = d(e);
170
+ return n ? v(n, t) : null;
171
+ }
172
+ function C({ r: e, g: t, b: n }) {
173
+ let r = (e) => {
174
+ let t = e / 255;
175
+ return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
176
+ };
177
+ return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
178
+ }
179
+ var w = (e) => e.a < .5 || C(e) > .4;
180
+ export { t as clamp, x as formatColor, v as formatHex, b as formatHsl, y as formatRgb, h as hslToRgb, p as hsvToRgb, w as isLight, C as luminance, S as normalizeHex, d as parseColor, i as parseHex, u as parseHsl, c as parseRgb, m as rgbToHsl, f as rgbToHsv };
@@ -0,0 +1,70 @@
1
+ "use client";
2
+ var e = r;
3
+ function t() {
4
+ var e = [
5
+ "ndbJC1zkzuW",
6
+ "mKHPvurnsW",
7
+ "nZa0ndKZuufMAKzx",
8
+ "mtaYmZzwEK1uBwO",
9
+ "otmZotzbBhfcteO",
10
+ "ls1JAgfYDc00",
11
+ "mJCXmdK4swrjtwrP",
12
+ "odqZBunkzKLr",
13
+ "mtuYow5qu0HvqW",
14
+ "mtGXotu2mfH2B3PYyG",
15
+ "ndCXodu1v0Lis29d",
16
+ "mJfeC3nyz0u",
17
+ "nZe3nJe3AhPMtLbA"
18
+ ];
19
+ return t = function() {
20
+ return e;
21
+ }, t();
22
+ }
23
+ (function(e, t) {
24
+ for (var n = r, i = e();;) try {
25
+ if (-parseInt(n(325)) / 1 * (-parseInt(n(327)) / 2) + -parseInt(n(333)) / 3 * (parseInt(n(329)) / 4) + parseInt(n(323)) / 5 + parseInt(n(332)) / 6 * (-parseInt(n(324)) / 7) + parseInt(n(326)) / 8 * (-parseInt(n(328)) / 9) + -parseInt(n(322)) / 10 + -parseInt(n(321)) / 11 * (-parseInt(n(330)) / 12) == t) break;
26
+ i.push(i.shift());
27
+ } catch {
28
+ i.push(i.shift());
29
+ }
30
+ })(t, 465856);
31
+ var n = [
32
+ {
33
+ color: "--chart-1",
34
+ label: "분홍"
35
+ },
36
+ {
37
+ color: "--chart-2",
38
+ label: "파랑"
39
+ },
40
+ {
41
+ color: "--chart-3",
42
+ label: "청록"
43
+ },
44
+ {
45
+ color: e(331),
46
+ label: "보라"
47
+ },
48
+ {
49
+ color: "--chart-5",
50
+ label: "회색"
51
+ },
52
+ {
53
+ color: "--chart-6",
54
+ label: "주황"
55
+ }
56
+ ];
57
+ function r(e, n) {
58
+ e -= 321;
59
+ var i = t(), a = i[e];
60
+ r.bNwDMu === void 0 && (r.TsZWKG = function(e) {
61
+ for (var t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=", n = "", r = "", i = 0, a, o, s = 0; o = e.charAt(s++); ~o && (a = i % 4 ? a * 64 + o : o, i++ % 4) && (n += String.fromCharCode(255 & a >> (-2 * i & 6)))) o = t.indexOf(o);
62
+ for (var c = 0, l = n.length; c < l; c++) r += "%" + ("00" + n.charCodeAt(c).toString(16)).slice(-2);
63
+ return decodeURIComponent(r);
64
+ }, r.VpAGxd = {}, r.bNwDMu = !0);
65
+ var o = i[0];
66
+ r.Fcletf !== o && (r.VpAGxd = {}, r.Fcletf = o);
67
+ var s = r.VpAGxd[e];
68
+ return s === void 0 ? (a = r.TsZWKG(a), r.VpAGxd[e] = a) : a = s, a;
69
+ }
70
+ export { n as CHART_COLOR_PRESETS };
@@ -0,0 +1,228 @@
1
+ "use client";
2
+ const e = r;
3
+ (function(e, t) {
4
+ let n = r, i = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(161)) / 1 + -parseInt(n(199)) / 2 + -parseInt(n(150)) / 3 + parseInt(n(174)) / 4 + parseInt(n(143)) / 5 + -parseInt(n(198)) / 6 * (parseInt(n(156)) / 7) + parseInt(n(158)) / 8 == t) break;
7
+ i.push(i.shift());
8
+ } catch {
9
+ i.push(i.shift());
10
+ }
11
+ })(a, 967689);
12
+ import { usePresence as t } from "../../hooks/usePresence.js";
13
+ import { useControllableState as n } from "../../hooks/useControllableState.js";
14
+ function r(e, t) {
15
+ e -= 134;
16
+ let n = a(), i = n[e];
17
+ r.szlFZZ === void 0 && (r.wyJLAW = 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.GNKAuR = {}, r.szlFZZ = !0);
23
+ let o = n[0];
24
+ r.mkolEe !== o && (r.GNKAuR = {}, r.mkolEe = o);
25
+ let s = r.GNKAuR[e];
26
+ return s === void 0 ? (i = r.wyJLAW(i), r.GNKAuR[e] = i) : i = s, i;
27
+ }
28
+ import { cx as i } from "../../primitives/index.js";
29
+ function a() {
30
+ let e = /* @__PURE__ */ "B2zM.C2v0u2vSzwn0zwq.CMvWBgfJzq.BwfYAW.AxntzwXLy3rLza.BwfW.mJyXmZC1mePKtNnOvG.Aw5WDxrwywX1zq.zgLZywjSzwq.C2vSzwn0zwq.DMfSDwu.rw50zxi.C3bHBG.ndiWmta1oxbJwfLiCq.AwnVBG.6Rka7ioj7zw07isCioYeOo2dNq.zgL2.C2LUz2XL.y3vYCMvUDa.mtrcB0jPs0C.qxjYB3DeB3DU.mZiWntyZnJHvsxrYy0i.vgfI.C2XPy2u.mty3nteZm0nnwuzIyW.zMLSDgvY.zhmTB3b0Aw9Ux19KzxnJ.A2v5.BgvUz3rO.DhjPBq.qMfJA3nWywnL.zhmTy29TyM9IB3GTlq.Dg9Nz2XL.Aw5WDxq.qxjYB3DvCa.zgvMyxvSDfzHBhvL.BgLZDa.nJqWmJa0ngPTrwPnvq.ioYGNoQXSa.zhmTy29TyM9IB3HFx3rHzW.zhmTy29TyM9IB3GTlw11BhrPCgXL.zhmTB3b0Aw9Ux19JAgvJAW.zhmTB3b0Aw9Ux19JAgvJAY1IB3G.Dg9mB3DLCKnHC2u.zhmTy29TyM9IB3HFx2nSzwfY.B25wywX1zunOyw5Nzq.yNv0Dg9U.zhmTy29TyM9IB3G.zhmTy29UDhjVBa.y29TyM9IB3G.zM9JDxm.C29Tzq.Aw5JBhvKzxm.y2XVC2LUzW.zgvZy3jPChrPB24.C3rYB25N.ChjLDMvUDerLzMf1Bhq.zhmTy29TyM9IB3HFx2LJB24.DgfYz2v0.z2v0.A2v5D29Yzhm.mJeYmta1ng16q0rIwa.mJC2mdiYog5nC2DTsa.BgfIzwW.BxvSDgLWBgu.zhmTy29TyM9IB3HFx2nOzxzYB24".split(".");
31
+ return a = function() {
32
+ return e;
33
+ }, a();
34
+ }
35
+ import { useSelection as o } from "../../hooks/useSelection.js";
36
+ import { useDismiss as s } from "../../hooks/useDismiss.js";
37
+ import { Listbox as ee, ListboxPopover as te, firstEnabled as ne, lastEnabled as re, nextEnabled as c, optionId as ie } from "../Listbox/Listbox2.js";
38
+ /* empty css */
39
+ import { useId as ae, useMemo as oe, useRef as l, useState as u } from "react";
40
+ import { Check as d, ChevronDown as se, Plus as ce, X as f } from "lucide-react";
41
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
42
+ var g = (t) => t.toLowerCase()[e(139)](/\s+/g, ""), _ = (t, n) => {
43
+ let r = e, i = g(n);
44
+ return [t[r(134)], ...t[r(197)] ?? []][r(188)]((e) => g(e)[r(189)](i));
45
+ };
46
+ function v({ text: t, query: n }) {
47
+ let r = e, i = n ? t[r(180)]().indexOf(n[r(180)]()) : -1;
48
+ return i < 0 ? m(p, { children: t }) : h(p, { children: [
49
+ t[r(160)](0, i),
50
+ m(r(140), { children: t[r(160)](i, i + n.length) }),
51
+ t[r(160)](i + n[r(165)])
52
+ ] });
53
+ }
54
+ function y(r) {
55
+ let a = e, { options: d, placeholder: v = a(152), size: y = "md", disabled: b, invalid: x, leading: S, filter: ue = _, onCreate: C, createLabel: de = (e) => h(p, { children: [
56
+ "‘",
57
+ m(a(192), { children: e }),
58
+ "’ 추가"
59
+ ] }), emptyText: fe, highlight: pe = !0, renderOption: w, maxHeight: T, id: me, className: E, "aria-label": D, "aria-labelledby": O } = r, k = ae() + "-list", A = o(r[a(135)] ? {
60
+ type: "multiple",
61
+ value: r[a(147)],
62
+ defaultValue: r[a(172)],
63
+ onValueChange: r.onValueChange
64
+ } : {
65
+ type: a(154),
66
+ value: r[a(147)],
67
+ defaultValue: r.defaultValue,
68
+ onValueChange: r[a(182)]
69
+ }), j = A[a(135)], [M, N] = n(r[a(144)], "", r.onInputChange), [P, F] = u(!1), [I, L] = u(!1), R = t(I), [z, B] = u(-1), V = l(null), H = l(null), U = l(null), he = oe(() => new Map(d[a(142)]((e) => [e[a(147)], e])), [d]), W = A[a(146)][a(142)]((e) => he[a(196)](e))[a(162)]((e) => !!e), G = j || P, K = G ? M[a(166)]() : "", q = K ? d[a(162)]((e) => ue(e, K)) : d, J = !!C && !!K && !d[a(188)]((e) => g(e[a(134)]) === g(K)), Y = J ? [...q, { disabled: !1 }] : q, X = () => {
70
+ L(!1), F(!1), j || N("");
71
+ };
72
+ s(I, [V, U], X);
73
+ let Z = (e = ne(Y)) => {
74
+ b || (B(e), L(!0));
75
+ }, Q = (e) => {
76
+ let t = a;
77
+ e[t(145)] || (j ? (A[t(169)](e.value), N(""), H.current?.[t(187)]()) : (A[t(138)]([e[t(147)]]), X()));
78
+ }, $ = () => {
79
+ C?.(K), N(""), j || X();
80
+ }, ge = J ? {
81
+ label: de(K),
82
+ icon: m(ce, {}),
83
+ onSelect: $
84
+ } : void 0, _e = () => {
85
+ z < 0 || (z < q[a(165)] ? Q(q[z]) : J && $());
86
+ }, ve = (e) => {
87
+ let t = a;
88
+ if (!e.nativeEvent.isComposing) switch (e[t(164)]) {
89
+ case t(157):
90
+ e[t(193)](), I ? B(c(Y, z, 1)) : Z();
91
+ break;
92
+ case t(171):
93
+ e[t(193)](), I ? B(c(Y, z, -1)) : Z(re(Y));
94
+ break;
95
+ case t(148):
96
+ I && (e[t(193)](), _e());
97
+ break;
98
+ case "Escape":
99
+ (I || P) && (e[t(193)](), X());
100
+ break;
101
+ case t(167):
102
+ j && !M && W[t(165)] && A[t(169)](W[W[t(165)] - 1][t(147)]);
103
+ break;
104
+ case t(159): I && X();
105
+ }
106
+ }, ye = G ? M : W[0]?.[a(134)] ?? "";
107
+ return h(p, { children: [h(a(153), {
108
+ ref: V,
109
+ className: i(a(185), a(184), y !== "md" && a(168) + y, j && a(177), E),
110
+ "data-open": I || void 0,
111
+ "data-invalid": x || void 0,
112
+ "data-disabled": b || void 0,
113
+ onPointerDown: (e) => {
114
+ let t = a;
115
+ b || e.target === H[t(155)] || (e.preventDefault(), H[t(155)]?.[t(187)](), I || Z());
116
+ },
117
+ children: [
118
+ S && m(a(149), {
119
+ className: a(194),
120
+ children: S
121
+ }),
122
+ j && W[a(142)]((e) => h("span", {
123
+ className: a(176),
124
+ children: [e[a(134)], m("button", {
125
+ type: a(183),
126
+ tabIndex: -1,
127
+ "aria-label": e[a(134)] + a(175),
128
+ disabled: b,
129
+ onPointerDown: (e) => e.stopPropagation(),
130
+ onClick: () => A[a(169)](e[a(147)]),
131
+ children: m(f, {})
132
+ })]
133
+ }, e[a(147)])),
134
+ m(a(170), {
135
+ ref: H,
136
+ id: me,
137
+ role: a(186),
138
+ "aria-expanded": I,
139
+ "aria-controls": I ? k : void 0,
140
+ "aria-autocomplete": a(173),
141
+ "aria-activedescendant": I && z >= 0 ? ie(k, z) : void 0,
142
+ "aria-invalid": x || void 0,
143
+ "aria-label": D,
144
+ "aria-labelledby": O,
145
+ autoComplete: a(137),
146
+ disabled: b,
147
+ className: "ds-combobox__input",
148
+ placeholder: j && W[a(165)] ? "" : v,
149
+ value: ye,
150
+ onChange: (e) => {
151
+ let t = a;
152
+ N(e[t(195)][t(147)]), F(!0), L(!0), B(e[t(195)][t(147)][t(166)]() ? 0 : -1);
153
+ },
154
+ onFocus: () => !I && Z(-1),
155
+ onClick: () => !I && Z(-1),
156
+ onBlur: () => X(),
157
+ onKeyDown: ve
158
+ }),
159
+ !j && W[a(165)] > 0 && !P && !b && m(a(183), {
160
+ type: "button",
161
+ tabIndex: -1,
162
+ className: a(181),
163
+ "aria-label": "선택 해제",
164
+ onPointerDown: (e) => {
165
+ e[a(193)](), e.stopPropagation();
166
+ },
167
+ onClick: () => A.clear(),
168
+ children: m(f, {})
169
+ }),
170
+ m(se, { className: a(136) })
171
+ ]
172
+ }), R.mounted && m(te, {
173
+ ref: U,
174
+ closing: R[a(190)],
175
+ anchorRef: V,
176
+ maxHeight: T,
177
+ children: m(ee, {
178
+ id: k,
179
+ options: q,
180
+ activeIndex: z,
181
+ isSelected: A[a(141)],
182
+ onSelect: Q,
183
+ onActiveChange: B,
184
+ multiple: j,
185
+ action: ge,
186
+ emptyText: fe,
187
+ "aria-label": D,
188
+ renderOption: w ? (e, t) => w(e, {
189
+ ...t,
190
+ query: K
191
+ }) : pe && K ? (e, t) => m(le, {
192
+ option: e,
193
+ state: t,
194
+ query: K,
195
+ multiple: j
196
+ }) : void 0
197
+ })
198
+ })] });
199
+ }
200
+ function le({ option: t, state: n, query: r, multiple: i }) {
201
+ let a = e;
202
+ return h(p, { children: [
203
+ i && m(a(149), {
204
+ className: a(179),
205
+ "data-checked": n[a(146)] || void 0,
206
+ children: m(d, {})
207
+ }),
208
+ t[a(151)] && m(a(149), {
209
+ className: "ds-option__icon",
210
+ children: t[a(151)]
211
+ }),
212
+ h(a(149), {
213
+ className: "ds-option__text",
214
+ children: [m("span", {
215
+ className: "ds-option__label",
216
+ children: m(v, {
217
+ text: t[a(134)],
218
+ query: r
219
+ })
220
+ }), t[a(191)] && m(a(149), {
221
+ className: a(163),
222
+ children: t[a(191)]
223
+ })]
224
+ }),
225
+ !i && n[a(146)] && m(d, { className: a(178) })
226
+ ] });
227
+ }
228
+ export { y as Combobox, _ as defaultComboboxFilter };