@iamfiro/design 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/agents/avatar/AGENTS.md +29 -1
  2. package/agents/tooltip/AGENTS.md +1 -1
  3. package/lib/components/Accordion/Accordion2.js +81 -81
  4. package/lib/components/ActionBar/ActionBar2.js +38 -39
  5. package/lib/components/Alert/Alert2.js +79 -79
  6. package/lib/components/AppShell/AppShell2.js +45 -45
  7. package/lib/components/AreaChart/AreaChart.js +45 -46
  8. package/lib/components/BarChart/BarChart2.js +166 -166
  9. package/lib/components/BarList/BarList2.js +83 -83
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -72
  11. package/lib/components/Calendar/Calendar2.js +166 -165
  12. package/lib/components/Calendar/DatePicker2.js +139 -139
  13. package/lib/components/Calendar/date.js +61 -58
  14. package/lib/components/Card/Card2.js +47 -47
  15. package/lib/components/CardFrame/CardFrame2.js +50 -45
  16. package/lib/components/Chart/ChartParts.js +78 -78
  17. package/lib/components/Chart/chart2.js +62 -62
  18. package/lib/components/Chart/useChartInteraction.js +56 -56
  19. package/lib/components/ChatBubble/ChatBubble2.js +116 -116
  20. package/lib/components/ChatBubble/formatChatTime.js +46 -39
  21. package/lib/components/ChatComposer/ChatComposer2.js +43 -43
  22. package/lib/components/CodeBlock/CodeBlock2.js +57 -57
  23. package/lib/components/CodeBlock/highlight.js +74 -74
  24. package/lib/components/ColorPicker/ColorPicker2.js +357 -357
  25. package/lib/components/ColorPicker/color.js +83 -83
  26. package/lib/components/ColorPicker/presets.js +47 -41
  27. package/lib/components/Combobox/Combobox2.js +143 -142
  28. package/lib/components/CommandMenu/CommandMenu.js +100 -100
  29. package/lib/components/Comment/Comment2.js +59 -60
  30. package/lib/components/ContextMenu/ContextMenu2.js +95 -96
  31. package/lib/components/DataGrid/DataGrid2.js +1202 -1203
  32. package/lib/components/DataGrid/GridPopover.js +87 -87
  33. package/lib/components/DataGrid/anchor.js +17 -19
  34. package/lib/components/DataGrid/model.js +261 -261
  35. package/lib/components/DataGrid/panels.js +397 -395
  36. package/lib/components/DataGrid/typeMeta.js +51 -51
  37. package/lib/components/DataGrid/types.js +38 -36
  38. package/lib/components/DescriptionList/DescriptionList2.js +74 -74
  39. package/lib/components/Dialog/AlertDialog.js +81 -82
  40. package/lib/components/Dialog/Dialog2.js +63 -63
  41. package/lib/components/Dialog/modal.js +70 -69
  42. package/lib/components/Drawer/Drawer2.js +122 -123
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +257 -258
  44. package/lib/components/DropdownMenu/menuCore.js +43 -44
  45. package/lib/components/Dropzone/Dropzone2.js +76 -77
  46. package/lib/components/EmptyState/EmptyState2.js +59 -56
  47. package/lib/components/FileChip/FileChip2.js +73 -49
  48. package/lib/components/FileUpload/FileUpload.js +149 -150
  49. package/lib/components/FilterChips/FilterChips2.js +59 -59
  50. package/lib/components/FunnelChart/FunnelChart2.js +123 -123
  51. package/lib/components/FunnelChart/funnel.js +44 -47
  52. package/lib/components/Highlight/Highlight2.js +48 -48
  53. package/lib/components/HoverCard/HoverCard.js +89 -64
  54. package/lib/components/InlineDiff/InlineDiff2.js +123 -123
  55. package/lib/components/InlineDiff/diff.js +76 -76
  56. package/lib/components/InlineDiff/useDiffReview.js +69 -68
  57. package/lib/components/Kanban/Kanban2.js +366 -366
  58. package/lib/components/Kanban/KanbanCard.js +67 -67
  59. package/lib/components/Kanban/move.js +41 -45
  60. package/lib/components/LineChart/LineChart2.js +196 -196
  61. package/lib/components/List/List2.js +60 -59
  62. package/lib/components/Listbox/Listbox2.js +94 -94
  63. package/lib/components/Marker/Marker2.js +59 -52
  64. package/lib/components/Menubar/Menubar2.js +110 -112
  65. package/lib/components/MultiSelect/MultiSelect2.js +112 -112
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +239 -240
  67. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  68. package/lib/components/NumberStepper/NumberStepper2.js +66 -65
  69. package/lib/components/OtpInput/OtpInput2.js +87 -88
  70. package/lib/components/Pagination/Pagination2.js +81 -81
  71. package/lib/components/Pagination/paginationRange.js +25 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +77 -77
  73. package/lib/components/PieChart/PieChart2.js +101 -101
  74. package/lib/components/PieChart/arc.js +73 -76
  75. package/lib/components/PieChart/useArcTween.js +61 -57
  76. package/lib/components/Popover/Popover2.js +65 -64
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +119 -119
  78. package/lib/components/Rating/Rating2.js +85 -85
  79. package/lib/components/Resizable/Resizable2.js +139 -139
  80. package/lib/components/Resizable/layout.js +68 -68
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +55 -55
  82. package/lib/components/ScatterChart/ScatterChart2.js +249 -249
  83. package/lib/components/ScatterChart/scatter.js +55 -55
  84. package/lib/components/ScrollArea/ScrollArea2.js +132 -131
  85. package/lib/components/Select/Select2.js +81 -81
  86. package/lib/components/Sidebar/Sidebar2.js +61 -61
  87. package/lib/components/Skeleton/Skeleton2.js +46 -46
  88. package/lib/components/Slider/Slider2.js +74 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +70 -70
  90. package/lib/components/SparkChart/SparkChart2.js +138 -137
  91. package/lib/components/SparkChart/spark.js +40 -61
  92. package/lib/components/Sparkbar/Sparkbar2.js +60 -59
  93. package/lib/components/SplitView/SplitView2.js +42 -42
  94. package/lib/components/Stat/Stat2.js +88 -88
  95. package/lib/components/StepList/StepList2.js +71 -71
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +89 -89
  98. package/lib/components/TagInput/TagInput2.js +154 -154
  99. package/lib/components/TimePicker/TimePicker2.js +225 -226
  100. package/lib/components/TimePicker/time.js +50 -50
  101. package/lib/components/Timeline/Timeline2.js +201 -201
  102. package/lib/components/Timeline/scale.js +55 -53
  103. package/lib/components/Toast/Toaster.js +90 -92
  104. package/lib/components/Toast/store.js +91 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +84 -84
  106. package/lib/components/Toolbar/Toolbar2.js +166 -168
  107. package/lib/components/Tracker/Tracker2.js +89 -89
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +126 -125
  109. package/lib/components/TreeView/TreeView2.js +154 -156
  110. package/lib/hooks/timing.js +35 -36
  111. package/lib/hooks/useControllableState.js +40 -39
  112. package/lib/hooks/useCountdown.js +57 -55
  113. package/lib/hooks/useDigitInput.js +59 -83
  114. package/lib/hooks/useDismiss.js +49 -46
  115. package/lib/hooks/useElapsed.js +53 -55
  116. package/lib/hooks/useFloating.js +44 -44
  117. package/lib/hooks/useFocusTrap.js +46 -70
  118. package/lib/hooks/usePresence.js +32 -29
  119. package/lib/hooks/usePressToOpen.js +50 -50
  120. package/lib/hooks/useScrollLock.js +51 -51
  121. package/lib/hooks/useSelection.js +55 -46
  122. package/lib/index.js +34 -35
  123. package/lib/primitives/AspectRatio2.js +59 -55
  124. package/lib/primitives/BrandIcon.js +160 -160
  125. package/lib/primitives/ColorDot2.js +38 -42
  126. package/lib/primitives/CopyButton2.js +56 -56
  127. package/lib/primitives/CountBadge2.js +66 -64
  128. package/lib/primitives/Countdown2.js +31 -32
  129. package/lib/primitives/Delta2.js +46 -71
  130. package/lib/primitives/Elapsed.js +44 -44
  131. package/lib/primitives/FileIcon2.js +82 -82
  132. package/lib/primitives/Flag2.js +134 -134
  133. package/lib/primitives/IconStack2.js +31 -53
  134. package/lib/primitives/IconTile2.js +46 -48
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +78 -78
  137. package/lib/primitives/Link2.js +29 -30
  138. package/lib/primitives/MaskedText2.js +47 -73
  139. package/lib/primitives/Progress2.js +77 -78
  140. package/lib/primitives/RelativeTime.js +49 -46
  141. package/lib/primitives/SearchInput2.js +58 -59
  142. package/lib/primitives/SelectorButton2.js +76 -74
  143. package/lib/primitives/Spinner2.js +62 -58
  144. package/lib/primitives/StatusIcon2.js +56 -56
  145. package/lib/primitives/Swatch2.js +69 -65
  146. package/lib/primitives/Tooltip2.js +92 -92
  147. package/lib/primitives/Typography2.js +68 -68
  148. package/lib/primitives/formatCountdown.js +39 -43
  149. package/lib/primitives/formatElapsed.js +43 -39
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +76 -76
  152. package/lib/primitives/index.js +201 -181
  153. package/lib/primitives/maskValue.js +35 -39
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,72 +1,58 @@
1
1
  "use client";
2
- const e = r;
2
+ function e() {
3
+ let t = /* @__PURE__ */ "mJC4mZqXnM1MBwPksq.C29YDa.C2vSzwn0.zhmTDgfNAw5WDxrFx2vKAxrVCG.Cg9W.BgvHDMLUzW.y3vYCMvUDfrHCMDLDa.rw50zxi.7j6f66cLio2BHcbfBNrLCG.C3bHBG.qxjYB3DvCa.mJbhAhzmzva.otq5nZHIzwzJugG.zMLUzeLUzgv4.zhvWBgLJyxrL.zhmTDgfNAw5WDxrFx2LJB24.mZK0otyXBLzPyvfK.y2XLyxjuAw1LB3v0.C3bSAwnL.yNv0Dg9U.A2v5.C2vSzwn0Aw9Urw5K.C2v0.z2v0rgf0yq.zMLSDgvY.AM9PBG.DMfSDwu.C2v0vgLTzw91Da.lMrZlxrHz2LUChv0x19ZBg90.zhmTy29UDhjVBa.Bw91BNrLza.zM9JDxm.ChvZAa.y29TyM9IB3G.qxjYB3DeB3DU.otq4EuXeDgfo.Bwv0yuTLEq.zhmTDgfNAw5WDxq.C2vSzwn0Aw9Uu3rHCNq.y3rYBeTLEq.ntfevwHAEwW.C3rYAw5N.mJu0ntyZofL4yM9IEq.BwfW.AgLKzgvU.y2XVC2vZDa.rw5K.y3vYCMvUDa.zhmTDgfNAw5WDxqTlq.qxjYB3DsAwDODa.BgvUz3rO.zhvW.ofDLv1D0qW.zgfUz2vY.AxndB21WB3nPBMC.CMvHC29U.zhmTDgfNAw5WDxrFx3nSB3q.Aw5WDxq.zhmTC3iTB25SEq.vgfI.Dgv4Da.ChjLDMvUDerLzMf1Bhq.DhjPBq.BMf0AxzLrxzLBNq.zhmTDgfNAw5WDxrFx3jLBw92zq.rxnJyxbL.mJeYnJuYmg90Dhrvzq.ioY2LoQWGoUqQa.Bwf4.mZK2nZq5n3L4Ew5byG.DgfYz2v0.A2v5q29Kzq.qMfJA3nWywnL.y2XPCgjVyxjKrgf0yq.zgf0yq.BwvZC2fNzq.Aw5JBhvKzxm.BgLZDa.Dg9mB3DLCKnHC2u.xcqM.Aw5KzxG.C2HPzNrlzxK.Aw52ywXPza.C2XPy2u".split(".");
4
+ return e = function() {
5
+ return t;
6
+ }, e();
7
+ }
8
+ const t = g;
3
9
  (function(e, t) {
4
- let n = r, i = e();
10
+ let n = g, r = e();
5
11
  for (;;) try {
6
- if (parseInt(n(471)) / 1 * (-parseInt(n(493)) / 2) + -parseInt(n(486)) / 3 + -parseInt(n(420)) / 4 * (-parseInt(n(455)) / 5) + parseInt(n(469)) / 6 * (-parseInt(n(426)) / 7) + -parseInt(n(461)) / 8 + -parseInt(n(423)) / 9 * (parseInt(n(417)) / 10) + parseInt(n(477)) / 11 == t) break;
7
- i.push(i.shift());
12
+ if (-parseInt(n(525)) / 1 * (parseInt(n(569)) / 2) + -parseInt(n(513)) / 3 * (-parseInt(n(508)) / 4) + parseInt(n(539)) / 5 + -parseInt(n(515)) / 6 + parseInt(n(573)) / 7 + -parseInt(n(557)) / 8 + -parseInt(n(542)) / 9 * (-parseInt(n(568)) / 10) == t) break;
13
+ r.push(r.shift());
8
14
  } catch {
9
- i.push(i.shift());
15
+ r.push(r.shift());
10
16
  }
11
- })(h, 700971);
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 -= 409;
16
- let n = h(), i = n[e];
17
- r.aSwKMj === void 0 && (r.UobRwK = 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.Njmdrq = {}, r.aSwKMj = !0);
23
- let a = n[0];
24
- r.OkyHDZ !== a && (r.Njmdrq = {}, r.OkyHDZ = a);
25
- let o = r.Njmdrq[e];
26
- return o === void 0 ? (i = r.UobRwK(i), r.Njmdrq[e] = i) : i = o, i;
27
- }
17
+ })(e, 215310);
18
+ import { usePresence as n } from "../../hooks/usePresence.js";
19
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
28
20
  import { cx as i } from "../../primitives/index.js";
29
21
  import { Listbox as a, ListboxPopover as o, nextEnabled as s, optionId as c } from "../Listbox/Listbox2.js";
30
22
  /* empty css */
31
23
  import { useEffect as l, useId as ee, useMemo as te, useRef as u, useState as d } from "react";
32
24
  import { X as ne } from "lucide-react";
33
25
  import { Fragment as re, jsx as f, jsxs as p } from "react/jsx-runtime";
34
- var ie = 220, m = (t) => t[e(494)]().toLowerCase(), ae = (t) => t[e(499)](/[.*+?^${}()|[\]\\]/g, e(427)), oe = (t) => {
35
- let n = e, r = /* @__PURE__ */ new Map();
36
- return t[n(492)]((e) => {
37
- let t = n, i = r[t(421)](e) ?? 0;
38
- return r[t(419)](e, i + 1), e + "\0" + i;
26
+ var ie = 220, m = (e) => e[t(535)]()[t(551)](), ae = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, t(552)), oe = (e) => {
27
+ let n = t, r = /* @__PURE__ */ new Map();
28
+ return e[n(516)]((e) => {
29
+ let t = n, i = r.get(e) ?? 0;
30
+ return r[t(495)](e, i + 1), e + "\0" + i;
39
31
  });
40
32
  };
41
- function h() {
42
- let e = /* @__PURE__ */ "mJGYmtm2nJLRAKDswLi.qxjYB3DeB3DU.zhvWBgLJyxrL.BwvZC2fNzq.Bwv0yuTLEq.Aw52ywXPza.C3rYAw5N.zM9JDxm.DgvZDa.mta5nde2m2rysKvkBq.zMLUzeLUzgv4.C29Tzq.y2XPCgjVyxjKrgf0yq.y3vYCMvUDfrHCMDLDa.AM9PBG.BwfW.mKjwtKTwCq.DhjPBq.Aw5WDxq.Bwf4.Aw5JBhvKzxm.vgfI.CMvWBgfJzq.zhmTDgfNAw5WDxrFx2vKAxrVCG.AgfZ.zhmTDgfNAw5WDxrFx3nSB3q.C3bSAwnL.ioY2LoQWGoUqQa.y3vYCMvUDa.CMvHC29U.zhvW.zgL2.rxnJyxbL.ioYcREYGNoUqQa.DMfSDwu.Dgv4Da.rw5K.nJbUwenSENu.qxjYB3DsAwDODa.C2v0.nev3tLnowq.z2v0.sg9Tzq.mtiXodmWm2HQC0nUAG.zhmTDgfNAw5WDxrFx2LJB24.BwLU.mZCYndD4EwrxyNm.xcqM.DgfYz2v0.C3bHBG.zgfUz2vY.zhmTy29UDhjVBa.zhmTDgfNAw5WDxq.A2v5q29Kzq.BgvHDMLUzW.y3rYBeTLEq.zhmTDgfNAw5WDxrFx2LUChv0.BMf0AxzLrxzLBNq.C2v0vgLTzw91Da.AxndB21WB3nPBMC.qxjYB3DvCa.zhmTC3iTB25SEq.zgf0yq.qxjYB3Dmzwz0.z2v0rgf0yq.C2vSzwn0Aw9Uu3rHCNq.rgvSzxrL.zMLSDgvY.qMfJA3nWywnL.ioY2LoYYNa.Cg9W.zhmTDgfNAw5WDxqTlq.ChjLDMvUDerLzMf1Bhq.C2HPzNrlzxK.Aw5KzxG.otu4nJK1u2Tht2nz.BgvUz3rO.ioYiMoYGLq.C2vSzwn0.y2XLyxjuAw1LB3v0.ChvZAa.ntq4mZiWqK1yDe9r.zhmTDgfNAw5WDxrFx3rHzW.lMrZlxrHz2LUChv0x19ZBg90.yNv0Dg9U.A2v5.C2vSzwn0Aw9Urw5K.7j6f66cLio2BHcbfBNrLCG.rw50zxi.odm0AgHethPL.AgLKzgvU.nZa1nJvmtg95AhG.C3bSAxq.Bw91BNrLza.y29TyM9IB3G.y2XVC2LUzW.C2XPy2u".split(".");
43
- return h = function() {
44
- return e;
45
- }, h();
46
- }
47
- function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
48
- e(468),
49
- e(498),
33
+ function h({ value: e, defaultValue: h = [], onValueChange: g, delimiters: _ = [
34
+ "Enter",
35
+ "Tab",
50
36
  ","
51
- ], validate: v, allowInvalid: y, allowDuplicates: se, transform: ce = (e) => e, max: b, suggestions: x, onReject: le, editable: ue = !0, placeholder: de = e(467), size: fe = "md", disabled: S, invalid: pe, leading: me, name: C, id: he, className: ge, maxHeight: _e, "aria-label": w, "aria-labelledby": ve, "aria-describedby": ye }) {
52
- let T = e, E = ee() + "-list", [D, O] = n(r, h, g), [k, A] = d(""), [j, M] = d(!1), [N, P] = d(-1), [F, I] = d(null), [be, L] = d([]), [R, xe] = d(null), [Se, Ce] = d(""), [we, Te] = d(!1), [z, B] = d(-1), [Ee, De] = d(!1), Oe = u(null), V = u(null), H = u(null), ke = u(null), U = u(0), W = u(!1), G = oe(D), [Ae] = d(() => new Set(G)), K = _[T(447)]((e) => e[T(456)] === 1), je = b !== void 0 && D.length >= b;
53
- l(() => () => window[T(459)](U[T(505)]), []);
54
- let Me = F?.[T(454)] ?? -1;
37
+ ], validate: v, allowInvalid: y, allowDuplicates: se, transform: ce = (e) => e, max: b, suggestions: x, onReject: le, editable: ue = !0, placeholder: de = t(565), size: fe = "md", disabled: S, invalid: pe, leading: me, name: C, id: he, className: ge, maxHeight: _e, "aria-label": w, "aria-labelledby": ve, "aria-describedby": ye }) {
38
+ let T = t, E = ee() + "-list", [D, O] = r(e, h, g), [k, A] = d(""), [j, M] = d(!1), [N, P] = d(-1), [F, I] = d(null), [be, L] = d([]), [R, xe] = d(null), [Se, Ce] = d(""), [we, Te] = d(!1), [z, B] = d(-1), [Ee, De] = d(!1), Oe = u(null), V = u(null), H = u(null), ke = u(null), U = u(0), W = u(!1), G = oe(D), [Ae] = d(() => new Set(G)), K = _[T(497)]((e) => e.length === 1), je = b !== void 0 && D[T(523)] >= b;
39
+ l(() => () => window[T(574)](U[T(520)]), []);
40
+ let Me = F?.[T(553)] ?? -1;
55
41
  l(() => {
56
42
  let e = T;
57
- Me < 0 || (H[e(505)]?.focus(), H[e(505)]?.[e(458)]());
43
+ Me < 0 || (H[e(520)]?.[e(504)](), H[e(520)]?.[e(559)]());
58
44
  }, [Me]);
59
45
  let Ne = (e, t) => v ? v(e, t) !== !0 : !1, Pe = (e, t, n = !1) => {
60
46
  let r = T;
61
- if (!n && b !== void 0 && t[r(456)] >= b) return {
47
+ if (!n && b !== void 0 && t[r(523)] >= b) return {
62
48
  ok: !1,
63
- reason: "max"
49
+ reason: r(541)
64
50
  };
65
51
  if (!se) {
66
- let n = t[r(487)]((t) => m(t) === m(e));
52
+ let n = t[r(570)]((t) => m(t) === m(e));
67
53
  if (n >= 0) return {
68
54
  ok: !1,
69
- reason: "duplicate",
55
+ reason: r(571),
70
56
  dup: n
71
57
  };
72
58
  }
@@ -77,8 +63,8 @@ function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
77
63
  danger: !0
78
64
  } : {
79
65
  ok: !1,
80
- reason: r(482),
81
- message: typeof n === r(483) ? n : void 0
66
+ reason: r(555),
67
+ message: typeof n === r(514) ? n : void 0
82
68
  };
83
69
  }
84
70
  return {
@@ -87,20 +73,20 @@ function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
87
73
  };
88
74
  }, Fe = (e) => {
89
75
  let t = T;
90
- window[t(459)](U.current), xe((t) => ({
76
+ window[t(574)](U[t(520)]), xe((t) => ({
91
77
  target: e,
92
78
  n: (t?.n ?? 0) + 1
93
- })), U[t(505)] = window[t(438)](() => xe(null), 480);
94
- }, Ie = (e) => ce(e[T(494)]())[T(494)](), q = (e) => {
79
+ })), U[t(520)] = window.setTimeout(() => xe(null), 480);
80
+ }, Ie = (e) => ce(e[T(535)]())[T(535)](), q = (e) => {
95
81
  let t = T, n = [...D], r = [], i = null, a = !1;
96
82
  for (let o of e) {
97
83
  let e = Ie(o);
98
84
  if (!e) continue;
99
85
  let s = Pe(e, n);
100
- s.ok ? n[t(460)](e) : (r[t(460)](o[t(494)]()), le?.(e, s[t(409)], s[t(480)]), s[t(409)] === t(479) ? i = s.dup ?? -1 : (i = -1, s[t(409)] === "invalid" && (a = !0)));
86
+ s.ok ? n.push(e) : (r[t(505)](o[t(535)]()), le?.(e, s.reason, s[t(548)]), s[t(528)] === t(571) ? i = s[t(524)] ?? -1 : (i = -1, s[t(528)] === t(555) && (a = !0)));
101
87
  }
102
- let o = n.slice(D.length);
103
- return o[t(456)] && (O(n), Ce(o[t(491)](", ") + t(504))), i !== null && Fe(i), M(a), r;
88
+ let o = n[t(556)](D[t(523)]);
89
+ return o[t(523)] && (O(n), Ce(o.join(", ") + t(540))), i !== null && Fe(i), M(a), r;
104
90
  }, J = (e) => {
105
91
  let t = T, n = D[e];
106
92
  if (n === void 0) return;
@@ -110,8 +96,8 @@ function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
110
96
  index: e,
111
97
  danger: y ? Ne(n, D) : !1
112
98
  };
113
- L((e) => [...e[t(447)]((e) => e[t(465)] !== r[t(465)]), r]), window[t(438)](() => L((e) => e[t(447)]((e) => e !== r)), ie), O(D[t(447)]((t, n) => n !== e)), Ce(n + t(413));
114
- }, Y = () => requestAnimationFrame(() => V[T(505)]?.[T(484)]()), Le = (e) => {
99
+ L((e) => [...e[t(497)]((e) => e[t(493)] !== r[t(493)]), r]), window[t(500)](() => L((e) => e[t(497)]((e) => e !== r)), ie), O(D[t(497)]((t, n) => n !== e)), Ce(n + " 삭제됨");
100
+ }, Y = () => requestAnimationFrame(() => V[T(520)]?.[T(504)]()), Le = (e) => {
115
101
  ue && !S && (P(-1), W.current = !1, I({
116
102
  index: e,
117
103
  text: D[e]
@@ -119,194 +105,194 @@ function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
119
105
  }, Re = (e = !0) => {
120
106
  let t = T;
121
107
  if (!F) return !0;
122
- let { index: n } = F, r = Ie(F[t(415)]);
108
+ let { index: n } = F, r = Ie(F[t(533)]);
123
109
  if (!r) return I(null), J(n), e && Y(), !0;
124
110
  if (r !== D[n]) {
125
- let e = D[t(447)]((e, t) => t !== n), i = Pe(r, e, !0);
126
- if (!i.ok) return le?.(r, i.reason, i[t(480)]), Fe(i[t(409)] === t(479) && i[t(410)] !== void 0 ? i[t(410)] >= n ? i[t(410)] + 1 : i[t(410)] : n), !1;
111
+ let e = D[t(497)]((e, t) => t !== n), i = Pe(r, e, !0);
112
+ if (!i.ok) return le?.(r, i[t(528)], i[t(548)]), Fe(i[t(528)] === t(571) && i[t(524)] !== void 0 ? i.dup >= n ? i[t(524)] + 1 : i[t(524)] : n), !1;
127
113
  let a = [...D];
128
114
  a[n] = r, O(a);
129
115
  }
130
116
  return I(null), e && Y(), !0;
131
117
  }, X = te(() => {
132
118
  let e = T, t = m(k);
133
- return !x || !t ? [] : x[e(447)]((n) => m(n).includes(t) && !D[e(488)]((e) => m(e) === m(n))).slice(0, 50);
119
+ return !x || !t ? [] : x[e(497)]((n) => m(n)[e(549)](t) && !D.some((e) => m(e) === m(n)))[e(556)](0, 50);
134
120
  }, [
135
121
  x,
136
122
  k,
137
123
  D
138
- ]), Z = we && !Ee && !F && !je && X[T(456)] > 0, ze = t(Z), [Q, Be] = d([]);
139
- Z && Q[T(491)]("\0") !== X.join("\0") && Be(X);
140
- let Ve = Q.map((e) => ({
124
+ ]), Z = we && !Ee && !F && !je && X.length > 0, ze = n(Z), [Q, Be] = d([]);
125
+ Z && Q[T(498)]("\0") !== X[T(498)]("\0") && Be(X);
126
+ let Ve = Q[T(516)]((e) => ({
141
127
  value: e,
142
128
  label: e
143
129
  })), He = (e) => {
144
130
  let t = T;
145
- q([e])[t(456)] || A(""), B(-1);
131
+ q([e])[t(523)] || A(""), B(-1);
146
132
  }, Ue = () => {
147
133
  q([k]).length || A("");
148
134
  }, We = (e) => {
149
135
  let t = T;
150
- if (e[t(437)][t(439)] || e[t(433)] === 229) return;
151
- let n = e[t(490)], r = n[t(445)] === 0 && n[t(466)] === 0;
136
+ if (e[t(536)][t(527)] || e[t(544)] === 229) return;
137
+ let n = e.currentTarget, r = n[t(511)] === 0 && n[t(494)] === 0;
152
138
  if (Z) {
153
- if (e[t(465)] === t(478) || e[t(465)] === t(440)) {
154
- e[t(452)](), B(s(Ve, z, e[t(465)] === t(478) ? 1 : -1));
139
+ if (e[t(493)] === t(507) || e[t(493)] === t(567)) {
140
+ e[t(534)](), B(s(Ve, z, e[t(493)] === t(507) ? 1 : -1));
155
141
  return;
156
142
  }
157
- if (e[t(465)] === t(468) && z >= 0 && Q[z]) {
158
- e.preventDefault(), He(Q[z]);
143
+ if (e.key === t(564) && z >= 0 && Q[z]) {
144
+ e[t(534)](), He(Q[z]);
159
145
  return;
160
146
  }
161
- if (e.key === t(412)) {
147
+ if (e[t(493)] === t(538)) {
162
148
  e.preventDefault(), De(!0), B(-1);
163
149
  return;
164
150
  }
165
151
  }
166
- switch (e[t(465)]) {
167
- case t(443):
168
- N >= 0 ? (e[t(452)](), P(Math[t(496)](0, N - 1))) : r && D.length && (e.preventDefault(), P(D[t(456)] - 1));
152
+ switch (e[t(493)]) {
153
+ case "ArrowLeft":
154
+ N >= 0 ? (e.preventDefault(), P(Math.max(0, N - 1))) : r && D[t(523)] && (e[t(534)](), P(D[t(523)] - 1));
169
155
  break;
170
- case t(418):
171
- N >= 0 && (e[t(452)](), P(N + 1 >= D[t(456)] ? -1 : N + 1));
156
+ case t(522):
157
+ N >= 0 && (e[t(534)](), P(N + 1 >= D.length ? -1 : N + 1));
172
158
  break;
173
- case t(422):
174
- (N >= 0 || r && D.length) && (e[t(452)](), P(D[t(456)] ? 0 : -1));
159
+ case "Home":
160
+ (N >= 0 || r && D[t(523)]) && (e[t(534)](), P(D.length ? 0 : -1));
175
161
  break;
176
- case t(416):
177
- N >= 0 && (e[t(452)](), P(-1));
162
+ case t(519):
163
+ N >= 0 && (e[t(534)](), P(-1));
178
164
  break;
179
- case t(448):
180
- case t(446):
181
- N >= 0 ? (e[t(452)](), J(N), P(-1)) : e[t(465)] === t(448) && !k && D[t(456)] && (e[t(452)](), P(D[t(456)] - 1));
165
+ case t(545):
166
+ case "Delete":
167
+ N >= 0 ? (e[t(534)](), J(N), P(-1)) : e[t(493)] === t(545) && !k && D[t(523)] && (e[t(534)](), P(D[t(523)] - 1));
182
168
  break;
183
169
  case "Escape":
184
- N >= 0 && (e[t(452)](), P(-1));
170
+ N >= 0 && (e[t(534)](), P(-1));
185
171
  break;
186
- case t(468):
187
- N >= 0 ? (e[t(452)](), Le(N)) : _[t(497)](t(468)) && k[t(494)]() && (e[t(452)](), Ue());
172
+ case t(564):
173
+ N >= 0 ? (e.preventDefault(), Le(N)) : _[t(549)](t(564)) && k[t(535)]() && (e[t(534)](), Ue());
188
174
  break;
189
- case t(498):
190
- _.includes("Tab") && k[t(494)]() && !e[t(453)] && (e[t(452)](), Ue());
175
+ case t(532):
176
+ _[t(549)]("Tab") && k[t(535)]() && !e[t(554)] && (e.preventDefault(), Ue());
191
177
  break;
192
- default: N >= 0 && e[t(465)].length === 1 && !e[t(435)] && !e[t(481)] && P(-1);
178
+ default: N >= 0 && e[t(493)][t(523)] === 1 && !e[t(512)] && !e[t(509)] && P(-1);
193
179
  }
194
180
  }, Ge = (e) => {
195
181
  let t = T, n = [...K, ...e];
196
- return n.length ? new RegExp(n.map(ae)[t(491)]("|")) : null;
182
+ return n[t(523)] ? new RegExp(n.map(ae)[t(498)]("|")) : null;
197
183
  }, Ke = (e) => {
198
- let t = T, n = e[t(490)].value;
184
+ let t = T, n = e.currentTarget[t(499)];
199
185
  P(-1), M(!1), De(!1), B(-1);
200
- let r = e[t(437)][t(442)] ?? "", i = Ge([]);
201
- if (i && K[t(488)]((e) => r[t(497)](e))) {
202
- let e = n.split(i), r = e[t(450)]() ?? "", a = q(e);
203
- A([...a, r][t(447)](Boolean)[t(491)](K[0] + " "));
186
+ let r = e[t(536)][t(547)] ?? "", i = Ge([]);
187
+ if (i && K.some((e) => r[t(549)](e))) {
188
+ let e = n.split(i), r = e[t(561)]() ?? "", a = q(e);
189
+ A([...a, r].filter(Boolean)[t(498)](K[0] + " "));
204
190
  } else A(n);
205
191
  }, qe = (e) => {
206
- let t = T, n = e[t(489)][t(444)](t(415)), r = [..._.includes(t(468)) ? [
192
+ let t = T, n = e[t(546)][t(496)](t(533)), r = [..._[t(549)](t(564)) ? [
207
193
  "\r\n",
208
194
  "\n",
209
195
  "\r"
210
- ] : [], ..._.includes("Tab") ? [" "] : []], i = Ge(r);
211
- if (!i || !i[t(485)](n)) return;
212
- e.preventDefault();
213
- let a = e.currentTarget, o = k[t(476)](0, a[t(445)] ?? k.length), s = k[t(476)](a.selectionEnd ?? k[t(456)]), c = q(("" + o + n + s)[t(472)](i));
196
+ ] : [], ..._[t(549)](t(532)) ? [" "] : []], i = Ge(r);
197
+ if (!i || !i.test(n)) return;
198
+ e[t(534)]();
199
+ let a = e[t(563)], o = k.slice(0, a.selectionStart ?? k.length), s = k[t(556)](a[t(494)] ?? k[t(523)]), c = q(("" + o + n + s).split(i));
214
200
  A(c.join((K[0] ?? ",") + " "));
215
- }, $ = D[T(492)]((e, t) => ({
201
+ }, $ = D.map((e, t) => ({
216
202
  key: G[t],
217
203
  text: e,
218
204
  index: t,
219
205
  leaving: !1,
220
206
  danger: y ? Ne(e, D) : !1
221
207
  }));
222
- for (let e of [...be].sort((e, t) => e[T(454)] - t.index)) $.some((t) => t[T(465)] === e[T(465)]) || $[T(503)](Math[T(425)](e.index, $.length), 0, {
208
+ for (let e of [...be][T(558)]((e, t) => e[T(553)] - t[T(553)])) $.some((t) => t[T(493)] === e[T(493)]) || $[T(575)](Math.min(e[T(553)], $[T(523)]), 0, {
223
209
  ...e,
224
210
  index: -1,
225
211
  leaving: !0
226
212
  });
227
- let Je = R?.[T(428)] === -1 ? R.n % 2 ? "a" : "b" : void 0;
213
+ let Je = R?.[T(543)] === -1 ? R.n % 2 ? "a" : "b" : void 0;
228
214
  return p(re, { children: [
229
- p(T(411), {
215
+ p("div", {
230
216
  ref: Oe,
231
- className: i(T(431), T(432), fe !== "md" && T(451) + fe, ge),
232
- "data-tags": D[T(456)] > 0 || void 0,
217
+ className: i(T(502), T(510), fe !== "md" && T(521) + fe, ge),
218
+ "data-tags": D[T(523)] > 0 || void 0,
233
219
  "data-invalid": pe || j || void 0,
234
220
  "data-disabled": S || void 0,
235
221
  "data-shake": Je,
236
222
  onPointerDown: (e) => {
237
223
  let t = T;
238
- S || e[t(428)] === V.current || e[t(428)].closest(t(463)) || (e[t(452)](), P(-1), V[t(505)]?.[t(484)]());
224
+ S || e[t(543)] === V[t(520)] || e[t(543)][t(518)](t(501)) || (e[t(534)](), P(-1), V[t(520)]?.[t(504)]());
239
225
  },
240
226
  children: [
241
- me && f(T(429), {
242
- className: T(424),
227
+ me && f(T(566), {
228
+ className: T(572),
243
229
  children: me
244
230
  }),
245
- $[T(492)]((e) => {
246
- let t = T, n = !e[t(434)] && F?.index === e.index, r = R && R[t(428)] === e[t(454)] && !e[t(434)] ? R.n % 2 ? "a" : "b" : void 0;
247
- return f(t(429), {
248
- className: t(502),
249
- "data-leaving": e.leaving || void 0,
250
- "data-new": !Ae[t(501)](e[t(465)]) || void 0,
231
+ $[T(516)]((e) => {
232
+ let t = T, n = !e[t(562)] && F?.[t(553)] === e.index, r = R && R[t(543)] === e[t(553)] && !e.leaving ? R.n % 2 ? "a" : "b" : void 0;
233
+ return f(t(566), {
234
+ className: t(529),
235
+ "data-leaving": e[t(562)] || void 0,
236
+ "data-new": !Ae.has(e.key) || void 0,
251
237
  "data-shake": r,
252
- children: n && F ? f(t(429), {
253
- className: t(500),
254
- "data-value": F[t(415)],
255
- children: f(t(495), {
238
+ children: n && F ? f("span", {
239
+ className: t(560),
240
+ "data-value": F[t(533)],
241
+ children: f(t(530), {
256
242
  ref: H,
257
- "aria-label": e[t(415)] + t(457),
258
- value: F.text,
243
+ "aria-label": e[t(533)] + " 수정",
244
+ value: F[t(533)],
259
245
  size: 1,
260
246
  onChange: (n) => I({
261
- index: e.index,
262
- text: n[t(428)][t(414)]
247
+ index: e[t(553)],
248
+ text: n[t(543)][t(499)]
263
249
  }),
264
250
  onKeyDown: (e) => {
265
251
  let n = t;
266
- e[n(437)][n(439)] || e.keyCode === 229 || (e[n(465)] === "Enter" ? (e[n(452)](), Re() && (W.current = !0)) : e[n(465)] === "Escape" && (e.preventDefault(), W[n(505)] = !0, I(null), Y()));
252
+ e[n(536)][n(527)] || e.keyCode === 229 || (e[n(493)] === n(564) ? (e[n(534)](), Re() && (W[n(520)] = !0)) : e[n(493)] === n(538) && (e[n(534)](), W.current = !0, I(null), Y()));
267
253
  },
268
254
  onBlur: () => {
269
- W[t(505)] || Re(!1) || I(null);
255
+ W[t(520)] || Re(!1) || I(null);
270
256
  }
271
257
  })
272
- }) : p(t(429), {
273
- className: t(462),
274
- "data-active": !e[t(434)] && e[t(454)] === N || void 0,
275
- "data-tone": e[t(430)] ? "danger" : void 0,
276
- title: e[t(430)] && v && typeof v(e.text, D) === t(483) ? String(v(e[t(415)], D)) : void 0,
258
+ }) : p(t(566), {
259
+ className: "ds-taginput__tag",
260
+ "data-active": !e[t(562)] && e[t(553)] === N || void 0,
261
+ "data-tone": e[t(526)] ? "danger" : void 0,
262
+ title: e.danger && v && typeof v(e[t(533)], D) === t(514) ? String(v(e.text, D)) : void 0,
277
263
  onPointerDown: (n) => {
278
264
  let r = t;
279
- S || e[r(434)] || (n[r(452)](), V[r(505)]?.[r(484)](), P(e[r(454)]));
265
+ S || e[r(562)] || (n.preventDefault(), V[r(520)]?.focus(), P(e[r(553)]));
280
266
  },
281
- onDoubleClick: () => !e.leaving && Le(e[t(454)]),
282
- children: [f(t(429), {
267
+ onDoubleClick: () => !e[t(562)] && Le(e[t(553)]),
268
+ children: [f(t(566), {
283
269
  className: "ds-taginput__label",
284
- children: e.text
285
- }), !S && f(t(464), {
286
- type: t(464),
270
+ children: e[t(533)]
271
+ }), !S && f(t(492), {
272
+ type: t(492),
287
273
  tabIndex: -1,
288
- "aria-label": e[t(415)] + " 삭제",
289
- className: "ds-taginput__remove",
274
+ "aria-label": e[t(533)] + " 삭제",
275
+ className: t(537),
290
276
  onPointerDown: (e) => {
291
- e[t(452)](), e.stopPropagation();
277
+ e[t(534)](), e.stopPropagation();
292
278
  },
293
279
  onClick: () => {
294
280
  let n = t;
295
- e[n(434)] || (J(e[n(454)]), P(-1), V[n(505)]?.focus());
281
+ e.leaving || (J(e[n(553)]), P(-1), V[n(520)]?.[n(504)]());
296
282
  },
297
283
  children: f(ne, {})
298
284
  })]
299
285
  })
300
- }, e[t(465)]);
286
+ }, e[t(493)]);
301
287
  }),
302
- f(T(495), {
288
+ f(T(530), {
303
289
  ref: V,
304
290
  id: he,
305
- className: T(436),
306
- role: x ? T(474) : void 0,
291
+ className: "ds-taginput__input",
292
+ role: x ? T(506) : void 0,
307
293
  "aria-expanded": x ? Z : void 0,
308
294
  "aria-controls": Z ? E : void 0,
309
- "aria-autocomplete": x ? "list" : void 0,
295
+ "aria-autocomplete": x ? T(550) : void 0,
310
296
  "aria-activedescendant": Z && z >= 0 ? c(E, z) : void 0,
311
297
  "aria-invalid": pe || j || void 0,
312
298
  "aria-label": w,
@@ -315,7 +301,7 @@ function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
315
301
  autoComplete: "off",
316
302
  disabled: S,
317
303
  value: k,
318
- placeholder: D.length ? "" : de,
304
+ placeholder: D[T(523)] ? "" : de,
319
305
  "data-error": j || void 0,
320
306
  onChange: Ke,
321
307
  onKeyDown: We,
@@ -325,21 +311,21 @@ function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
325
311
  Te(!1), P(-1);
326
312
  }
327
313
  }),
328
- f(T(429), {
329
- className: T(441),
314
+ f(T(566), {
315
+ className: T(531),
330
316
  "aria-live": "polite",
331
317
  children: Se
332
318
  })
333
319
  ]
334
320
  }),
335
- C && D[T(492)]((e, t) => f(T(495), {
336
- type: T(470),
321
+ C && D.map((e, t) => f(T(530), {
322
+ type: T(517),
337
323
  name: C,
338
324
  value: e
339
325
  }, G[t])),
340
- x && ze[T(473)] && f(o, {
326
+ x && ze[T(503)] && f(o, {
341
327
  ref: ke,
342
- closing: ze[T(475)],
328
+ closing: ze.closing,
343
329
  anchorRef: Oe,
344
330
  maxHeight: _e,
345
331
  children: f(a, {
@@ -347,11 +333,25 @@ function g({ value: r, defaultValue: h = [], onValueChange: g, delimiters: _ = [
347
333
  options: Ve,
348
334
  activeIndex: z,
349
335
  isSelected: () => !1,
350
- onSelect: (e) => He(e[T(414)]),
336
+ onSelect: (e) => He(e[T(499)]),
351
337
  onActiveChange: B,
352
- "aria-label": w ? w + T(449) : "추천"
338
+ "aria-label": w ? w + " 추천" : "추천"
353
339
  })
354
340
  })
355
341
  ] });
356
342
  }
357
- export { g as TagInput };
343
+ function g(t, n) {
344
+ t -= 492;
345
+ let r = e(), i = r[t];
346
+ g.NQnejF === void 0 && (g.zvCLPh = function(e) {
347
+ let t = "", n = "";
348
+ 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);
349
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
350
+ return decodeURIComponent(n);
351
+ }, g.eipuqo = {}, g.NQnejF = !0);
352
+ let a = r[0];
353
+ g.nRTzLY !== a && (g.eipuqo = {}, g.nRTzLY = a);
354
+ let o = g.eipuqo[t];
355
+ return o === void 0 ? (i = g.zvCLPh(i), g.eipuqo[t] = i) : i = o, i;
356
+ }
357
+ export { h as TagInput };