@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.
- package/agents/avatar/AGENTS.md +29 -1
- package/agents/tooltip/AGENTS.md +1 -1
- package/lib/components/Accordion/Accordion2.js +81 -81
- package/lib/components/ActionBar/ActionBar2.js +38 -39
- package/lib/components/Alert/Alert2.js +79 -79
- package/lib/components/AppShell/AppShell2.js +45 -45
- package/lib/components/AreaChart/AreaChart.js +45 -46
- package/lib/components/BarChart/BarChart2.js +166 -166
- package/lib/components/BarList/BarList2.js +83 -83
- package/lib/components/Breadcrumb/Breadcrumb2.js +68 -72
- package/lib/components/Calendar/Calendar2.js +166 -165
- package/lib/components/Calendar/DatePicker2.js +139 -139
- package/lib/components/Calendar/date.js +61 -58
- package/lib/components/Card/Card2.js +47 -47
- package/lib/components/CardFrame/CardFrame2.js +50 -45
- package/lib/components/Chart/ChartParts.js +78 -78
- package/lib/components/Chart/chart2.js +62 -62
- package/lib/components/Chart/useChartInteraction.js +56 -56
- package/lib/components/ChatBubble/ChatBubble2.js +116 -116
- package/lib/components/ChatBubble/formatChatTime.js +46 -39
- package/lib/components/ChatComposer/ChatComposer2.js +43 -43
- package/lib/components/CodeBlock/CodeBlock2.js +57 -57
- package/lib/components/CodeBlock/highlight.js +74 -74
- package/lib/components/ColorPicker/ColorPicker2.js +357 -357
- package/lib/components/ColorPicker/color.js +83 -83
- package/lib/components/ColorPicker/presets.js +47 -41
- package/lib/components/Combobox/Combobox2.js +143 -142
- package/lib/components/CommandMenu/CommandMenu.js +100 -100
- package/lib/components/Comment/Comment2.js +59 -60
- package/lib/components/ContextMenu/ContextMenu2.js +95 -96
- package/lib/components/DataGrid/DataGrid2.js +1202 -1203
- package/lib/components/DataGrid/GridPopover.js +87 -87
- package/lib/components/DataGrid/anchor.js +17 -19
- package/lib/components/DataGrid/model.js +261 -261
- package/lib/components/DataGrid/panels.js +397 -395
- package/lib/components/DataGrid/typeMeta.js +51 -51
- package/lib/components/DataGrid/types.js +38 -36
- package/lib/components/DescriptionList/DescriptionList2.js +74 -74
- package/lib/components/Dialog/AlertDialog.js +81 -82
- package/lib/components/Dialog/Dialog2.js +63 -63
- package/lib/components/Dialog/modal.js +70 -69
- package/lib/components/Drawer/Drawer2.js +122 -123
- package/lib/components/DropdownMenu/DropdownMenu2.js +257 -258
- package/lib/components/DropdownMenu/menuCore.js +43 -44
- package/lib/components/Dropzone/Dropzone2.js +76 -77
- package/lib/components/EmptyState/EmptyState2.js +59 -56
- package/lib/components/FileChip/FileChip2.js +73 -49
- package/lib/components/FileUpload/FileUpload.js +149 -150
- package/lib/components/FilterChips/FilterChips2.js +59 -59
- package/lib/components/FunnelChart/FunnelChart2.js +123 -123
- package/lib/components/FunnelChart/funnel.js +44 -47
- package/lib/components/Highlight/Highlight2.js +48 -48
- package/lib/components/HoverCard/HoverCard.js +89 -64
- package/lib/components/InlineDiff/InlineDiff2.js +123 -123
- package/lib/components/InlineDiff/diff.js +76 -76
- package/lib/components/InlineDiff/useDiffReview.js +69 -68
- package/lib/components/Kanban/Kanban2.js +366 -366
- package/lib/components/Kanban/KanbanCard.js +67 -67
- package/lib/components/Kanban/move.js +41 -45
- package/lib/components/LineChart/LineChart2.js +196 -196
- package/lib/components/List/List2.js +60 -59
- package/lib/components/Listbox/Listbox2.js +94 -94
- package/lib/components/Marker/Marker2.js +59 -52
- package/lib/components/Menubar/Menubar2.js +110 -112
- package/lib/components/MultiSelect/MultiSelect2.js +112 -112
- package/lib/components/NavigationMenu/NavigationMenu2.js +239 -240
- package/lib/components/NoticeStack/NoticeStack2.js +99 -99
- package/lib/components/NumberStepper/NumberStepper2.js +66 -65
- package/lib/components/OtpInput/OtpInput2.js +87 -88
- package/lib/components/Pagination/Pagination2.js +81 -81
- package/lib/components/Pagination/paginationRange.js +25 -24
- package/lib/components/PhoneInput/PhoneInput.js +77 -77
- package/lib/components/PieChart/PieChart2.js +101 -101
- package/lib/components/PieChart/arc.js +73 -76
- package/lib/components/PieChart/useArcTween.js +61 -57
- package/lib/components/Popover/Popover2.js +65 -64
- package/lib/components/ProgressTracker/ProgressTracker2.js +119 -119
- package/lib/components/Rating/Rating2.js +85 -85
- package/lib/components/Resizable/Resizable2.js +139 -139
- package/lib/components/Resizable/layout.js +68 -68
- package/lib/components/ScaledPreview/ScaledPreview2.js +55 -55
- package/lib/components/ScatterChart/ScatterChart2.js +249 -249
- package/lib/components/ScatterChart/scatter.js +55 -55
- package/lib/components/ScrollArea/ScrollArea2.js +132 -131
- package/lib/components/Select/Select2.js +81 -81
- package/lib/components/Sidebar/Sidebar2.js +61 -61
- package/lib/components/Skeleton/Skeleton2.js +46 -46
- package/lib/components/Slider/Slider2.js +74 -73
- package/lib/components/SocialLoginButton/SocialLoginButton.js +70 -70
- package/lib/components/SparkChart/SparkChart2.js +138 -137
- package/lib/components/SparkChart/spark.js +40 -61
- package/lib/components/Sparkbar/Sparkbar2.js +60 -59
- package/lib/components/SplitView/SplitView2.js +42 -42
- package/lib/components/Stat/Stat2.js +88 -88
- package/lib/components/StepList/StepList2.js +71 -71
- package/lib/components/Table/Table2.js +70 -70
- package/lib/components/Tabs/Tabs2.js +89 -89
- package/lib/components/TagInput/TagInput2.js +154 -154
- package/lib/components/TimePicker/TimePicker2.js +225 -226
- package/lib/components/TimePicker/time.js +50 -50
- package/lib/components/Timeline/Timeline2.js +201 -201
- package/lib/components/Timeline/scale.js +55 -53
- package/lib/components/Toast/Toaster.js +90 -92
- package/lib/components/Toast/store.js +91 -87
- package/lib/components/ToggleGroup/ToggleGroup2.js +84 -84
- package/lib/components/Toolbar/Toolbar2.js +166 -168
- package/lib/components/Tracker/Tracker2.js +89 -89
- package/lib/components/TreeDiagram/TreeDiagram2.js +126 -125
- package/lib/components/TreeView/TreeView2.js +154 -156
- package/lib/hooks/timing.js +35 -36
- package/lib/hooks/useControllableState.js +40 -39
- package/lib/hooks/useCountdown.js +57 -55
- package/lib/hooks/useDigitInput.js +59 -83
- package/lib/hooks/useDismiss.js +49 -46
- package/lib/hooks/useElapsed.js +53 -55
- package/lib/hooks/useFloating.js +44 -44
- package/lib/hooks/useFocusTrap.js +46 -70
- package/lib/hooks/usePresence.js +32 -29
- package/lib/hooks/usePressToOpen.js +50 -50
- package/lib/hooks/useScrollLock.js +51 -51
- package/lib/hooks/useSelection.js +55 -46
- package/lib/index.js +34 -35
- package/lib/primitives/AspectRatio2.js +59 -55
- package/lib/primitives/BrandIcon.js +160 -160
- package/lib/primitives/ColorDot2.js +38 -42
- package/lib/primitives/CopyButton2.js +56 -56
- package/lib/primitives/CountBadge2.js +66 -64
- package/lib/primitives/Countdown2.js +31 -32
- package/lib/primitives/Delta2.js +46 -71
- package/lib/primitives/Elapsed.js +44 -44
- package/lib/primitives/FileIcon2.js +82 -82
- package/lib/primitives/Flag2.js +134 -134
- package/lib/primitives/IconStack2.js +31 -53
- package/lib/primitives/IconTile2.js +46 -48
- package/lib/primitives/Kbd2.js +57 -57
- package/lib/primitives/Layout2.js +78 -78
- package/lib/primitives/Link2.js +29 -30
- package/lib/primitives/MaskedText2.js +47 -73
- package/lib/primitives/Progress2.js +77 -78
- package/lib/primitives/RelativeTime.js +49 -46
- package/lib/primitives/SearchInput2.js +58 -59
- package/lib/primitives/SelectorButton2.js +76 -74
- package/lib/primitives/Spinner2.js +62 -58
- package/lib/primitives/StatusIcon2.js +56 -56
- package/lib/primitives/Swatch2.js +69 -65
- package/lib/primitives/Tooltip2.js +92 -92
- package/lib/primitives/Typography2.js +68 -68
- package/lib/primitives/formatCountdown.js +39 -43
- package/lib/primitives/formatElapsed.js +43 -39
- package/lib/primitives/formatRelativeTime.js +50 -50
- package/lib/primitives/hotkey.js +76 -76
- package/lib/primitives/index.js +201 -181
- package/lib/primitives/maskValue.js +35 -39
- package/lib/style.css +1 -1
- package/lib/types/primitives/index.d.ts +6 -2
- package/package.json +1 -1
|
@@ -1,72 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
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 =
|
|
10
|
+
let n = g, r = e();
|
|
5
11
|
for (;;) try {
|
|
6
|
-
if (parseInt(n(
|
|
7
|
-
|
|
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
|
-
|
|
15
|
+
r.push(r.shift());
|
|
10
16
|
}
|
|
11
|
-
})(
|
|
12
|
-
import { usePresence as
|
|
13
|
-
import { useControllableState as
|
|
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 = (
|
|
35
|
-
let n =
|
|
36
|
-
return
|
|
37
|
-
let t = n, i = r
|
|
38
|
-
return r[t(
|
|
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
|
-
|
|
43
|
-
|
|
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 =
|
|
52
|
-
let T =
|
|
53
|
-
l(() => () => window[T(
|
|
54
|
-
let Me = F?.[T(
|
|
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(
|
|
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(
|
|
47
|
+
if (!n && b !== void 0 && t[r(523)] >= b) return {
|
|
62
48
|
ok: !1,
|
|
63
|
-
reason:
|
|
49
|
+
reason: r(541)
|
|
64
50
|
};
|
|
65
51
|
if (!se) {
|
|
66
|
-
let n = t[r(
|
|
52
|
+
let n = t[r(570)]((t) => m(t) === m(e));
|
|
67
53
|
if (n >= 0) return {
|
|
68
54
|
ok: !1,
|
|
69
|
-
reason:
|
|
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(
|
|
81
|
-
message: typeof n === r(
|
|
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(
|
|
76
|
+
window[t(574)](U[t(520)]), xe((t) => ({
|
|
91
77
|
target: e,
|
|
92
78
|
n: (t?.n ?? 0) + 1
|
|
93
|
-
})), U[t(
|
|
94
|
-
}, Ie = (e) => ce(e[T(
|
|
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
|
|
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
|
|
103
|
-
return o[t(
|
|
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(
|
|
114
|
-
}, Y = () => requestAnimationFrame(() => V[T(
|
|
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(
|
|
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(
|
|
126
|
-
if (!i.ok) return le?.(r, i
|
|
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(
|
|
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
|
|
139
|
-
Z && Q[T(
|
|
140
|
-
let Ve = Q
|
|
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(
|
|
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(
|
|
151
|
-
let n = e
|
|
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(
|
|
154
|
-
e[t(
|
|
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
|
|
158
|
-
e
|
|
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
|
|
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(
|
|
167
|
-
case
|
|
168
|
-
N >= 0 ? (e
|
|
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(
|
|
171
|
-
N >= 0 && (e[t(
|
|
156
|
+
case t(522):
|
|
157
|
+
N >= 0 && (e[t(534)](), P(N + 1 >= D.length ? -1 : N + 1));
|
|
172
158
|
break;
|
|
173
|
-
case
|
|
174
|
-
(N >= 0 || r && D
|
|
159
|
+
case "Home":
|
|
160
|
+
(N >= 0 || r && D[t(523)]) && (e[t(534)](), P(D.length ? 0 : -1));
|
|
175
161
|
break;
|
|
176
|
-
case t(
|
|
177
|
-
N >= 0 && (e[t(
|
|
162
|
+
case t(519):
|
|
163
|
+
N >= 0 && (e[t(534)](), P(-1));
|
|
178
164
|
break;
|
|
179
|
-
case t(
|
|
180
|
-
case
|
|
181
|
-
N >= 0 ? (e[t(
|
|
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(
|
|
170
|
+
N >= 0 && (e[t(534)](), P(-1));
|
|
185
171
|
break;
|
|
186
|
-
case t(
|
|
187
|
-
N >= 0 ? (e
|
|
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(
|
|
190
|
-
_
|
|
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(
|
|
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
|
|
182
|
+
return n[t(523)] ? new RegExp(n.map(ae)[t(498)]("|")) : null;
|
|
197
183
|
}, Ke = (e) => {
|
|
198
|
-
let t = T, n = e[t(
|
|
184
|
+
let t = T, n = e.currentTarget[t(499)];
|
|
199
185
|
P(-1), M(!1), De(!1), B(-1);
|
|
200
|
-
let r = e[t(
|
|
201
|
-
if (i && K
|
|
202
|
-
let e = n.split(i), r = e[t(
|
|
203
|
-
A([...a, r]
|
|
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(
|
|
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
|
-
] : [], ..._
|
|
211
|
-
if (!i || !i
|
|
212
|
-
e
|
|
213
|
-
let a = e
|
|
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
|
|
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]
|
|
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(
|
|
213
|
+
let Je = R?.[T(543)] === -1 ? R.n % 2 ? "a" : "b" : void 0;
|
|
228
214
|
return p(re, { children: [
|
|
229
|
-
p(
|
|
215
|
+
p("div", {
|
|
230
216
|
ref: Oe,
|
|
231
|
-
className: i(T(
|
|
232
|
-
"data-tags": D[T(
|
|
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(
|
|
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(
|
|
242
|
-
className: T(
|
|
227
|
+
me && f(T(566), {
|
|
228
|
+
className: T(572),
|
|
243
229
|
children: me
|
|
244
230
|
}),
|
|
245
|
-
$[T(
|
|
246
|
-
let t = T, n = !e[t(
|
|
247
|
-
return f(t(
|
|
248
|
-
className: t(
|
|
249
|
-
"data-leaving": e
|
|
250
|
-
"data-new": !Ae
|
|
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(
|
|
253
|
-
className: t(
|
|
254
|
-
"data-value": F[t(
|
|
255
|
-
children: f(t(
|
|
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(
|
|
258
|
-
value: F
|
|
243
|
+
"aria-label": e[t(533)] + " 수정",
|
|
244
|
+
value: F[t(533)],
|
|
259
245
|
size: 1,
|
|
260
246
|
onChange: (n) => I({
|
|
261
|
-
index: e
|
|
262
|
-
text: n[t(
|
|
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(
|
|
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(
|
|
255
|
+
W[t(520)] || Re(!1) || I(null);
|
|
270
256
|
}
|
|
271
257
|
})
|
|
272
|
-
}) : p(t(
|
|
273
|
-
className:
|
|
274
|
-
"data-active": !e[t(
|
|
275
|
-
"data-tone": e[t(
|
|
276
|
-
title: e
|
|
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(
|
|
265
|
+
S || e[r(562)] || (n.preventDefault(), V[r(520)]?.focus(), P(e[r(553)]));
|
|
280
266
|
},
|
|
281
|
-
onDoubleClick: () => !e
|
|
282
|
-
children: [f(t(
|
|
267
|
+
onDoubleClick: () => !e[t(562)] && Le(e[t(553)]),
|
|
268
|
+
children: [f(t(566), {
|
|
283
269
|
className: "ds-taginput__label",
|
|
284
|
-
children: e
|
|
285
|
-
}), !S && f(t(
|
|
286
|
-
type: t(
|
|
270
|
+
children: e[t(533)]
|
|
271
|
+
}), !S && f(t(492), {
|
|
272
|
+
type: t(492),
|
|
287
273
|
tabIndex: -1,
|
|
288
|
-
"aria-label": e[t(
|
|
289
|
-
className:
|
|
274
|
+
"aria-label": e[t(533)] + " 삭제",
|
|
275
|
+
className: t(537),
|
|
290
276
|
onPointerDown: (e) => {
|
|
291
|
-
e[t(
|
|
277
|
+
e[t(534)](), e.stopPropagation();
|
|
292
278
|
},
|
|
293
279
|
onClick: () => {
|
|
294
280
|
let n = t;
|
|
295
|
-
e
|
|
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(
|
|
286
|
+
}, e[t(493)]);
|
|
301
287
|
}),
|
|
302
|
-
f(T(
|
|
288
|
+
f(T(530), {
|
|
303
289
|
ref: V,
|
|
304
290
|
id: he,
|
|
305
|
-
className:
|
|
306
|
-
role: x ? T(
|
|
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 ?
|
|
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
|
|
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(
|
|
329
|
-
className: T(
|
|
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
|
|
336
|
-
type: T(
|
|
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(
|
|
326
|
+
x && ze[T(503)] && f(o, {
|
|
341
327
|
ref: ke,
|
|
342
|
-
closing: ze
|
|
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(
|
|
336
|
+
onSelect: (e) => He(e[T(499)]),
|
|
351
337
|
onActiveChange: B,
|
|
352
|
-
"aria-label": w ? w +
|
|
338
|
+
"aria-label": w ? w + " 추천" : "추천"
|
|
353
339
|
})
|
|
354
340
|
})
|
|
355
341
|
] });
|
|
356
342
|
}
|
|
357
|
-
|
|
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 };
|