@iamfiro/design 0.3.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.
- package/lib/components/Accordion/Accordion2.js +86 -86
- package/lib/components/ActionBar/ActionBar2.js +44 -43
- package/lib/components/Alert/Alert2.js +79 -79
- package/lib/components/AppShell/AppShell2.js +58 -58
- package/lib/components/AreaChart/AreaChart.js +41 -41
- package/lib/components/BarChart/BarChart2.js +110 -110
- package/lib/components/BarList/BarList2.js +95 -95
- package/lib/components/Breadcrumb/Breadcrumb2.js +62 -59
- package/lib/components/Calendar/Calendar2.js +202 -202
- package/lib/components/Calendar/DatePicker2.js +122 -123
- package/lib/components/Calendar/date.js +57 -60
- package/lib/components/Card/Card2.js +62 -63
- package/lib/components/CardFrame/CardFrame2.js +43 -48
- package/lib/components/Chart/ChartParts.js +80 -80
- package/lib/components/Chart/chart2.js +57 -57
- package/lib/components/Chart/useChartInteraction.js +49 -49
- package/lib/components/ChatBubble/ChatBubble2.js +87 -87
- package/lib/components/ChatBubble/formatChatTime.js +34 -39
- package/lib/components/ChatComposer/ChatComposer2.js +97 -97
- package/lib/components/CodeBlock/CodeBlock2.js +60 -60
- package/lib/components/CodeBlock/highlight.js +75 -78
- package/lib/components/ColorPicker/ColorPicker2.js +383 -384
- package/lib/components/ColorPicker/color.js +74 -74
- package/lib/components/ColorPicker/presets.js +41 -46
- package/lib/components/Combobox/Combobox2.js +130 -131
- package/lib/components/CommandMenu/CommandMenu.js +137 -137
- package/lib/components/Comment/Comment2.js +64 -88
- package/lib/components/ContextMenu/ContextMenu2.js +87 -87
- package/lib/components/DataGrid/DataGrid2.js +911 -909
- package/lib/components/DataGrid/GridPopover.js +114 -114
- package/lib/components/DataGrid/anchor.js +25 -25
- package/lib/components/DataGrid/model.js +281 -282
- package/lib/components/DataGrid/panels.js +427 -429
- package/lib/components/DataGrid/typeMeta.js +50 -51
- package/lib/components/DataGrid/types.js +39 -40
- package/lib/components/DescriptionList/DescriptionList2.js +104 -104
- package/lib/components/Dialog/AlertDialog.js +85 -84
- package/lib/components/Dialog/Dialog2.js +72 -71
- package/lib/components/Dialog/modal.js +68 -68
- package/lib/components/Drawer/Drawer2.js +100 -100
- package/lib/components/DropdownMenu/DropdownMenu2.js +267 -268
- package/lib/components/DropdownMenu/menuCore.js +36 -36
- package/lib/components/Dropzone/Dropzone2.js +66 -65
- package/lib/components/EmptyState/EmptyState2.js +52 -54
- package/lib/components/FileChip/FileChip2.js +42 -66
- package/lib/components/FileUpload/FileUpload.js +171 -170
- package/lib/components/FilterChips/FilterChips2.js +54 -54
- package/lib/components/FunnelChart/FunnelChart2.js +144 -144
- package/lib/components/FunnelChart/funnel.js +56 -53
- package/lib/components/Highlight/Highlight2.js +60 -60
- package/lib/components/HoverCard/HoverCard.js +72 -72
- package/lib/components/InlineDiff/InlineDiff2.js +112 -112
- package/lib/components/InlineDiff/diff.js +81 -81
- package/lib/components/InlineDiff/useDiffReview.js +54 -53
- package/lib/components/Kanban/Kanban2.js +372 -372
- package/lib/components/Kanban/KanbanCard.js +80 -80
- package/lib/components/Kanban/move.js +55 -55
- package/lib/components/LineChart/LineChart2.js +167 -167
- package/lib/components/List/List2.js +64 -65
- package/lib/components/Listbox/Listbox2.js +105 -105
- package/lib/components/Marker/Marker2.js +54 -54
- package/lib/components/Menubar/Menubar2.js +112 -113
- package/lib/components/MultiSelect/MultiSelect2.js +106 -106
- package/lib/components/NavigationMenu/NavigationMenu2.js +227 -227
- package/lib/components/NoticeStack/NoticeStack2.js +115 -115
- package/lib/components/NumberStepper/NumberStepper2.js +69 -70
- package/lib/components/OtpInput/OtpInput2.js +87 -87
- package/lib/components/Pagination/Pagination2.js +97 -97
- package/lib/components/Pagination/paginationRange.js +23 -24
- package/lib/components/PhoneInput/PhoneInput.js +85 -85
- package/lib/components/PieChart/PieChart2.js +116 -116
- package/lib/components/PieChart/arc.js +80 -56
- package/lib/components/PieChart/useArcTween.js +57 -59
- package/lib/components/Popover/Popover2.js +59 -60
- package/lib/components/ProgressTracker/ProgressTracker2.js +116 -116
- package/lib/components/Rating/Rating2.js +93 -93
- package/lib/components/Resizable/Resizable2.js +136 -134
- package/lib/components/Resizable/layout.js +73 -73
- package/lib/components/ScaledPreview/ScaledPreview2.js +57 -58
- package/lib/components/ScatterChart/ScatterChart2.js +252 -253
- package/lib/components/ScatterChart/scatter.js +58 -56
- package/lib/components/ScrollArea/ScrollArea2.js +133 -134
- package/lib/components/Select/Select2.js +89 -89
- package/lib/components/Sidebar/Sidebar2.js +76 -76
- package/lib/components/Skeleton/Skeleton2.js +67 -67
- package/lib/components/Slider/Slider2.js +67 -67
- package/lib/components/SocialLoginButton/SocialLoginButton.js +46 -47
- package/lib/components/SparkChart/SparkChart2.js +130 -130
- package/lib/components/SparkChart/spark.js +57 -62
- package/lib/components/Sparkbar/Sparkbar2.js +44 -44
- package/lib/components/SplitView/SplitView2.js +53 -53
- package/lib/components/Stat/Stat2.js +83 -83
- package/lib/components/StepList/StepList2.js +73 -73
- package/lib/components/Table/Table2.js +45 -45
- package/lib/components/Tabs/Tabs2.js +87 -87
- package/lib/components/TagInput/TagInput2.js +231 -234
- package/lib/components/TimePicker/TimePicker2.js +195 -195
- package/lib/components/TimePicker/time.js +60 -62
- package/lib/components/Timeline/Timeline2.js +199 -199
- package/lib/components/Timeline/scale.js +56 -58
- package/lib/components/Toast/Toaster.js +153 -152
- package/lib/components/Toast/store.js +57 -58
- package/lib/components/ToggleGroup/ToggleGroup2.js +74 -74
- package/lib/components/Toolbar/Toolbar2.js +135 -133
- package/lib/components/Tracker/Tracker2.js +83 -83
- package/lib/components/TreeDiagram/TreeDiagram2.js +103 -103
- package/lib/components/TreeView/TreeView2.js +165 -163
- package/lib/hooks/timing.js +33 -31
- package/lib/hooks/useControllableState.js +42 -42
- package/lib/hooks/useCountdown.js +58 -63
- package/lib/hooks/useDigitInput.js +75 -77
- package/lib/hooks/useDismiss.js +50 -52
- package/lib/hooks/useElapsed.js +58 -56
- package/lib/hooks/useFloating.js +44 -44
- package/lib/hooks/useFocusTrap.js +64 -40
- package/lib/hooks/usePresence.js +48 -50
- package/lib/hooks/usePressToOpen.js +52 -51
- package/lib/hooks/useScrollLock.js +49 -48
- package/lib/hooks/useSelection.js +37 -40
- package/lib/index.js +70 -69
- package/lib/primitives/AspectRatio2.js +50 -54
- package/lib/primitives/BrandIcon.js +153 -153
- package/lib/primitives/ColorDot2.js +49 -48
- package/lib/primitives/CopyButton2.js +59 -58
- package/lib/primitives/CountBadge2.js +57 -55
- package/lib/primitives/Countdown2.js +45 -49
- package/lib/primitives/Delta2.js +71 -46
- package/lib/primitives/Elapsed.js +43 -43
- package/lib/primitives/FileIcon2.js +93 -93
- package/lib/primitives/Flag2.js +95 -95
- package/lib/primitives/IconStack2.js +55 -55
- package/lib/primitives/IconTile2.js +46 -45
- package/lib/primitives/Kbd2.js +55 -55
- package/lib/primitives/Layout2.js +80 -80
- package/lib/primitives/Link2.js +36 -34
- package/lib/primitives/MaskedText2.js +65 -64
- package/lib/primitives/Progress2.js +80 -80
- package/lib/primitives/RelativeTime.js +52 -54
- package/lib/primitives/SearchInput2.js +55 -54
- package/lib/primitives/SelectorButton2.js +64 -65
- package/lib/primitives/Spinner2.js +55 -59
- package/lib/primitives/StatusIcon2.js +65 -65
- package/lib/primitives/Swatch2.js +50 -50
- package/lib/primitives/Tooltip2.js +85 -85
- package/lib/primitives/Typography2.js +66 -66
- package/lib/primitives/formatCountdown.js +43 -40
- package/lib/primitives/formatElapsed.js +24 -27
- package/lib/primitives/formatRelativeTime.js +43 -43
- package/lib/primitives/hotkey.js +71 -71
- package/lib/primitives/index.js +156 -157
- package/lib/primitives/maskValue.js +38 -34
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,360 +1,357 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e =
|
|
3
|
-
(function(e,
|
|
4
|
-
let
|
|
2
|
+
const e = r;
|
|
3
|
+
(function(e, t) {
|
|
4
|
+
let n = r, i = e();
|
|
5
5
|
for (;;) try {
|
|
6
|
-
if (parseInt(
|
|
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
7
|
i.push(i.shift());
|
|
8
8
|
} catch {
|
|
9
9
|
i.push(i.shift());
|
|
10
10
|
}
|
|
11
|
-
})(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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) {
|
|
16
18
|
let t = "", n = "";
|
|
17
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);
|
|
18
20
|
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
19
21
|
return decodeURIComponent(n);
|
|
20
|
-
},
|
|
21
|
-
let a =
|
|
22
|
-
|
|
23
|
-
let o =
|
|
24
|
-
return o === void 0 ? (i =
|
|
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;
|
|
25
27
|
}
|
|
26
|
-
import { usePresence as n } from "../../hooks/usePresence.js";
|
|
27
|
-
import { useControllableState as r } from "../../hooks/useControllableState.js";
|
|
28
28
|
import { cx as i } from "../../primitives/index.js";
|
|
29
|
-
import { Listbox as a, ListboxPopover as o, nextEnabled as s, optionId as
|
|
29
|
+
import { Listbox as a, ListboxPopover as o, nextEnabled as s, optionId as c } from "../Listbox/Listbox2.js";
|
|
30
30
|
/* empty css */
|
|
31
|
-
import { useEffect as
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return e;
|
|
36
|
-
}, d();
|
|
37
|
-
}
|
|
38
|
-
import { X as re } from "lucide-react";
|
|
39
|
-
import { Fragment as ie, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
40
|
-
var ae = 220, m = (t) => t.trim()[e(563)](), oe = (t) => t[e(552)](/[.*+?^${}()|[\]\\]/g, "\\$&"), se = (t) => {
|
|
31
|
+
import { useEffect as l, useId as ee, useMemo as te, useRef as u, useState as d } from "react";
|
|
32
|
+
import { X as ne } from "lucide-react";
|
|
33
|
+
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) => {
|
|
41
35
|
let n = e, r = /* @__PURE__ */ new Map();
|
|
42
|
-
return t[n(
|
|
43
|
-
let t = n, i = r[t(
|
|
44
|
-
return r[t(
|
|
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;
|
|
45
39
|
});
|
|
46
40
|
};
|
|
47
|
-
function h({
|
|
48
|
-
e(
|
|
49
|
-
|
|
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),
|
|
50
50
|
","
|
|
51
|
-
], validate:
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
let e =
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
let
|
|
60
|
-
let r =
|
|
61
|
-
if (!n &&
|
|
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;
|
|
55
|
+
l(() => {
|
|
56
|
+
let e = T;
|
|
57
|
+
Me < 0 || (H[e(505)]?.focus(), H[e(505)]?.[e(458)]());
|
|
58
|
+
}, [Me]);
|
|
59
|
+
let Ne = (e, t) => v ? v(e, t) !== !0 : !1, Pe = (e, t, n = !1) => {
|
|
60
|
+
let r = T;
|
|
61
|
+
if (!n && b !== void 0 && t[r(456)] >= b) return {
|
|
62
62
|
ok: !1,
|
|
63
63
|
reason: "max"
|
|
64
64
|
};
|
|
65
|
-
if (!
|
|
66
|
-
let n = t[r(
|
|
65
|
+
if (!se) {
|
|
66
|
+
let n = t[r(487)]((t) => m(t) === m(e));
|
|
67
67
|
if (n >= 0) return {
|
|
68
68
|
ok: !1,
|
|
69
|
-
reason:
|
|
69
|
+
reason: "duplicate",
|
|
70
70
|
dup: n
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
if (
|
|
74
|
-
let n =
|
|
75
|
-
if (n !== !0) return
|
|
73
|
+
if (v) {
|
|
74
|
+
let n = v(e, t);
|
|
75
|
+
if (n !== !0) return y ? {
|
|
76
76
|
ok: !0,
|
|
77
77
|
danger: !0
|
|
78
78
|
} : {
|
|
79
79
|
ok: !1,
|
|
80
|
-
reason: r(
|
|
81
|
-
message: typeof n
|
|
80
|
+
reason: r(482),
|
|
81
|
+
message: typeof n === r(483) ? n : void 0
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
return {
|
|
85
85
|
ok: !0,
|
|
86
86
|
danger: !1
|
|
87
87
|
};
|
|
88
|
-
},
|
|
89
|
-
let t =
|
|
90
|
-
window[t(
|
|
88
|
+
}, Fe = (e) => {
|
|
89
|
+
let t = T;
|
|
90
|
+
window[t(459)](U.current), xe((t) => ({
|
|
91
91
|
target: e,
|
|
92
92
|
n: (t?.n ?? 0) + 1
|
|
93
|
-
})),
|
|
94
|
-
},
|
|
95
|
-
let t =
|
|
93
|
+
})), U[t(505)] = window[t(438)](() => xe(null), 480);
|
|
94
|
+
}, Ie = (e) => ce(e[T(494)]())[T(494)](), q = (e) => {
|
|
95
|
+
let t = T, n = [...D], r = [], i = null, a = !1;
|
|
96
96
|
for (let o of e) {
|
|
97
|
-
let e =
|
|
97
|
+
let e = Ie(o);
|
|
98
98
|
if (!e) continue;
|
|
99
|
-
let s =
|
|
100
|
-
s.ok ? n[t(
|
|
99
|
+
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)));
|
|
101
101
|
}
|
|
102
|
-
let o = n.slice(
|
|
103
|
-
return o[t(
|
|
104
|
-
},
|
|
105
|
-
let t =
|
|
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;
|
|
104
|
+
}, J = (e) => {
|
|
105
|
+
let t = T, n = D[e];
|
|
106
106
|
if (n === void 0) return;
|
|
107
107
|
let r = {
|
|
108
|
-
key:
|
|
108
|
+
key: G[e],
|
|
109
109
|
text: n,
|
|
110
110
|
index: e,
|
|
111
|
-
danger:
|
|
111
|
+
danger: y ? Ne(n, D) : !1
|
|
112
112
|
};
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
de && !x && (N(-1), U[t(566)] = !1, F({
|
|
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) => {
|
|
115
|
+
ue && !S && (P(-1), W.current = !1, I({
|
|
117
116
|
index: e,
|
|
118
|
-
text:
|
|
117
|
+
text: D[e]
|
|
119
118
|
}));
|
|
120
|
-
},
|
|
121
|
-
let t =
|
|
122
|
-
if (!
|
|
123
|
-
let { index: n } =
|
|
124
|
-
if (!r) return
|
|
125
|
-
if (r !==
|
|
126
|
-
let e =
|
|
127
|
-
if (!i.ok) return
|
|
128
|
-
let a = [...
|
|
129
|
-
a[n] = r,
|
|
119
|
+
}, Re = (e = !0) => {
|
|
120
|
+
let t = T;
|
|
121
|
+
if (!F) return !0;
|
|
122
|
+
let { index: n } = F, r = Ie(F[t(415)]);
|
|
123
|
+
if (!r) return I(null), J(n), e && Y(), !0;
|
|
124
|
+
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;
|
|
127
|
+
let a = [...D];
|
|
128
|
+
a[n] = r, O(a);
|
|
130
129
|
}
|
|
131
|
-
return
|
|
132
|
-
},
|
|
133
|
-
let e =
|
|
134
|
-
return !
|
|
130
|
+
return I(null), e && Y(), !0;
|
|
131
|
+
}, X = te(() => {
|
|
132
|
+
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);
|
|
135
134
|
}, [
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
]),
|
|
140
|
-
|
|
141
|
-
let
|
|
135
|
+
x,
|
|
136
|
+
k,
|
|
137
|
+
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) => ({
|
|
142
141
|
value: e,
|
|
143
142
|
label: e
|
|
144
|
-
})),
|
|
145
|
-
let t =
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
e[t(548)](), z(s(He, R, e.key === "ArrowDown" ? 1 : -1));
|
|
143
|
+
})), He = (e) => {
|
|
144
|
+
let t = T;
|
|
145
|
+
q([e])[t(456)] || A(""), B(-1);
|
|
146
|
+
}, Ue = () => {
|
|
147
|
+
q([k]).length || A("");
|
|
148
|
+
}, We = (e) => {
|
|
149
|
+
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;
|
|
152
|
+
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));
|
|
157
155
|
return;
|
|
158
156
|
}
|
|
159
|
-
if (e[t(
|
|
160
|
-
e.preventDefault(),
|
|
157
|
+
if (e[t(465)] === t(468) && z >= 0 && Q[z]) {
|
|
158
|
+
e.preventDefault(), He(Q[z]);
|
|
161
159
|
return;
|
|
162
160
|
}
|
|
163
|
-
if (e
|
|
164
|
-
e
|
|
161
|
+
if (e.key === t(412)) {
|
|
162
|
+
e.preventDefault(), De(!0), B(-1);
|
|
165
163
|
return;
|
|
166
164
|
}
|
|
167
165
|
}
|
|
168
|
-
switch (e
|
|
169
|
-
case
|
|
170
|
-
|
|
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));
|
|
171
169
|
break;
|
|
172
|
-
case t(
|
|
173
|
-
|
|
170
|
+
case t(418):
|
|
171
|
+
N >= 0 && (e[t(452)](), P(N + 1 >= D[t(456)] ? -1 : N + 1));
|
|
174
172
|
break;
|
|
175
|
-
case t(
|
|
176
|
-
(
|
|
173
|
+
case t(422):
|
|
174
|
+
(N >= 0 || r && D.length) && (e[t(452)](), P(D[t(456)] ? 0 : -1));
|
|
177
175
|
break;
|
|
178
|
-
case
|
|
179
|
-
|
|
176
|
+
case t(416):
|
|
177
|
+
N >= 0 && (e[t(452)](), P(-1));
|
|
180
178
|
break;
|
|
181
|
-
case t(
|
|
182
|
-
case t(
|
|
183
|
-
|
|
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));
|
|
184
182
|
break;
|
|
185
183
|
case "Escape":
|
|
186
|
-
|
|
184
|
+
N >= 0 && (e[t(452)](), P(-1));
|
|
187
185
|
break;
|
|
188
|
-
case t(
|
|
189
|
-
|
|
186
|
+
case t(468):
|
|
187
|
+
N >= 0 ? (e[t(452)](), Le(N)) : _[t(497)](t(468)) && k[t(494)]() && (e[t(452)](), Ue());
|
|
190
188
|
break;
|
|
191
|
-
case t(
|
|
192
|
-
|
|
189
|
+
case t(498):
|
|
190
|
+
_.includes("Tab") && k[t(494)]() && !e[t(453)] && (e[t(452)](), Ue());
|
|
193
191
|
break;
|
|
194
|
-
default:
|
|
192
|
+
default: N >= 0 && e[t(465)].length === 1 && !e[t(435)] && !e[t(481)] && P(-1);
|
|
195
193
|
}
|
|
196
|
-
},
|
|
197
|
-
let t =
|
|
198
|
-
return n
|
|
194
|
+
}, Ge = (e) => {
|
|
195
|
+
let t = T, n = [...K, ...e];
|
|
196
|
+
return n.length ? new RegExp(n.map(ae)[t(491)]("|")) : null;
|
|
199
197
|
}, Ke = (e) => {
|
|
200
|
-
let t =
|
|
201
|
-
|
|
202
|
-
let r = e[t(
|
|
203
|
-
if (i &&
|
|
204
|
-
let e = n.split(i), r = e[t(
|
|
205
|
-
|
|
206
|
-
} else
|
|
198
|
+
let t = T, n = e[t(490)].value;
|
|
199
|
+
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] + " "));
|
|
204
|
+
} else A(n);
|
|
207
205
|
}, qe = (e) => {
|
|
208
|
-
let t =
|
|
206
|
+
let t = T, n = e[t(489)][t(444)](t(415)), r = [..._.includes(t(468)) ? [
|
|
209
207
|
"\r\n",
|
|
210
208
|
"\n",
|
|
211
209
|
"\r"
|
|
212
|
-
] : [], ...
|
|
213
|
-
if (!i || !i
|
|
210
|
+
] : [], ..._.includes("Tab") ? [" "] : []], i = Ge(r);
|
|
211
|
+
if (!i || !i[t(485)](n)) return;
|
|
214
212
|
e.preventDefault();
|
|
215
|
-
let a = e
|
|
216
|
-
|
|
217
|
-
}, $ =
|
|
218
|
-
key:
|
|
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));
|
|
214
|
+
A(c.join((K[0] ?? ",") + " "));
|
|
215
|
+
}, $ = D[T(492)]((e, t) => ({
|
|
216
|
+
key: G[t],
|
|
219
217
|
text: e,
|
|
220
218
|
index: t,
|
|
221
219
|
leaving: !1,
|
|
222
|
-
danger:
|
|
220
|
+
danger: y ? Ne(e, D) : !1
|
|
223
221
|
}));
|
|
224
|
-
for (let e of [...
|
|
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, {
|
|
225
223
|
...e,
|
|
226
224
|
index: -1,
|
|
227
225
|
leaving: !0
|
|
228
226
|
});
|
|
229
|
-
let Je =
|
|
230
|
-
return p(
|
|
231
|
-
p(
|
|
232
|
-
ref:
|
|
233
|
-
className: i(
|
|
234
|
-
"data-tags":
|
|
235
|
-
"data-invalid":
|
|
236
|
-
"data-disabled":
|
|
227
|
+
let Je = R?.[T(428)] === -1 ? R.n % 2 ? "a" : "b" : void 0;
|
|
228
|
+
return p(re, { children: [
|
|
229
|
+
p(T(411), {
|
|
230
|
+
ref: Oe,
|
|
231
|
+
className: i(T(431), T(432), fe !== "md" && T(451) + fe, ge),
|
|
232
|
+
"data-tags": D[T(456)] > 0 || void 0,
|
|
233
|
+
"data-invalid": pe || j || void 0,
|
|
234
|
+
"data-disabled": S || void 0,
|
|
237
235
|
"data-shake": Je,
|
|
238
236
|
onPointerDown: (e) => {
|
|
239
|
-
let t =
|
|
240
|
-
|
|
237
|
+
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)]());
|
|
241
239
|
},
|
|
242
240
|
children: [
|
|
243
|
-
|
|
244
|
-
className:
|
|
245
|
-
children:
|
|
241
|
+
me && f(T(429), {
|
|
242
|
+
className: T(424),
|
|
243
|
+
children: me
|
|
246
244
|
}),
|
|
247
|
-
$[
|
|
248
|
-
let t =
|
|
249
|
-
return f(t(
|
|
250
|
-
className: t(
|
|
251
|
-
"data-leaving": e
|
|
252
|
-
"data-new": !
|
|
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,
|
|
253
251
|
"data-shake": r,
|
|
254
|
-
children: n &&
|
|
252
|
+
children: n && F ? f(t(429), {
|
|
255
253
|
className: t(500),
|
|
256
|
-
"data-value":
|
|
257
|
-
children: f(t(
|
|
258
|
-
ref:
|
|
259
|
-
"aria-label": e[t(
|
|
260
|
-
value:
|
|
254
|
+
"data-value": F[t(415)],
|
|
255
|
+
children: f(t(495), {
|
|
256
|
+
ref: H,
|
|
257
|
+
"aria-label": e[t(415)] + t(457),
|
|
258
|
+
value: F.text,
|
|
261
259
|
size: 1,
|
|
262
|
-
onChange: (
|
|
260
|
+
onChange: (n) => I({
|
|
263
261
|
index: e.index,
|
|
264
|
-
text: t
|
|
262
|
+
text: n[t(428)][t(414)]
|
|
265
263
|
}),
|
|
266
264
|
onKeyDown: (e) => {
|
|
267
265
|
let n = t;
|
|
268
|
-
e[n(
|
|
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()));
|
|
269
267
|
},
|
|
270
268
|
onBlur: () => {
|
|
271
|
-
|
|
269
|
+
W[t(505)] || Re(!1) || I(null);
|
|
272
270
|
}
|
|
273
271
|
})
|
|
274
|
-
}) : p(t(
|
|
275
|
-
className: t(
|
|
276
|
-
"data-active": !e
|
|
277
|
-
"data-tone": e[t(
|
|
278
|
-
title: e
|
|
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,
|
|
279
277
|
onPointerDown: (n) => {
|
|
280
278
|
let r = t;
|
|
281
|
-
|
|
279
|
+
S || e[r(434)] || (n[r(452)](), V[r(505)]?.[r(484)](), P(e[r(454)]));
|
|
282
280
|
},
|
|
283
|
-
onDoubleClick: () => !e
|
|
284
|
-
children: [f(t(
|
|
285
|
-
className:
|
|
286
|
-
children: e
|
|
287
|
-
}), !
|
|
288
|
-
type:
|
|
281
|
+
onDoubleClick: () => !e.leaving && Le(e[t(454)]),
|
|
282
|
+
children: [f(t(429), {
|
|
283
|
+
className: "ds-taginput__label",
|
|
284
|
+
children: e.text
|
|
285
|
+
}), !S && f(t(464), {
|
|
286
|
+
type: t(464),
|
|
289
287
|
tabIndex: -1,
|
|
290
|
-
"aria-label": e[t(
|
|
291
|
-
className:
|
|
288
|
+
"aria-label": e[t(415)] + " 삭제",
|
|
289
|
+
className: "ds-taginput__remove",
|
|
292
290
|
onPointerDown: (e) => {
|
|
293
|
-
|
|
294
|
-
e[n(548)](), e[n(554)]();
|
|
291
|
+
e[t(452)](), e.stopPropagation();
|
|
295
292
|
},
|
|
296
293
|
onClick: () => {
|
|
297
294
|
let n = t;
|
|
298
|
-
e[n(
|
|
295
|
+
e[n(434)] || (J(e[n(454)]), P(-1), V[n(505)]?.focus());
|
|
299
296
|
},
|
|
300
|
-
children: f(
|
|
297
|
+
children: f(ne, {})
|
|
301
298
|
})]
|
|
302
299
|
})
|
|
303
|
-
}, e[t(
|
|
300
|
+
}, e[t(465)]);
|
|
304
301
|
}),
|
|
305
|
-
f(
|
|
306
|
-
ref:
|
|
307
|
-
id:
|
|
308
|
-
className:
|
|
309
|
-
role:
|
|
310
|
-
"aria-expanded":
|
|
311
|
-
"aria-controls":
|
|
312
|
-
"aria-autocomplete":
|
|
313
|
-
"aria-activedescendant":
|
|
314
|
-
"aria-invalid":
|
|
315
|
-
"aria-label":
|
|
316
|
-
"aria-labelledby":
|
|
317
|
-
"aria-describedby":
|
|
302
|
+
f(T(495), {
|
|
303
|
+
ref: V,
|
|
304
|
+
id: he,
|
|
305
|
+
className: T(436),
|
|
306
|
+
role: x ? T(474) : void 0,
|
|
307
|
+
"aria-expanded": x ? Z : void 0,
|
|
308
|
+
"aria-controls": Z ? E : void 0,
|
|
309
|
+
"aria-autocomplete": x ? "list" : void 0,
|
|
310
|
+
"aria-activedescendant": Z && z >= 0 ? c(E, z) : void 0,
|
|
311
|
+
"aria-invalid": pe || j || void 0,
|
|
312
|
+
"aria-label": w,
|
|
313
|
+
"aria-labelledby": ve,
|
|
314
|
+
"aria-describedby": ye,
|
|
318
315
|
autoComplete: "off",
|
|
319
|
-
disabled:
|
|
320
|
-
value:
|
|
321
|
-
placeholder:
|
|
322
|
-
"data-error":
|
|
316
|
+
disabled: S,
|
|
317
|
+
value: k,
|
|
318
|
+
placeholder: D.length ? "" : de,
|
|
319
|
+
"data-error": j || void 0,
|
|
323
320
|
onChange: Ke,
|
|
324
|
-
onKeyDown:
|
|
321
|
+
onKeyDown: We,
|
|
325
322
|
onPaste: qe,
|
|
326
|
-
onFocus: () =>
|
|
323
|
+
onFocus: () => Te(!0),
|
|
327
324
|
onBlur: () => {
|
|
328
|
-
|
|
325
|
+
Te(!1), P(-1);
|
|
329
326
|
}
|
|
330
327
|
}),
|
|
331
|
-
f(
|
|
332
|
-
className:
|
|
333
|
-
"aria-live":
|
|
334
|
-
children:
|
|
328
|
+
f(T(429), {
|
|
329
|
+
className: T(441),
|
|
330
|
+
"aria-live": "polite",
|
|
331
|
+
children: Se
|
|
335
332
|
})
|
|
336
333
|
]
|
|
337
334
|
}),
|
|
338
|
-
|
|
339
|
-
type:
|
|
340
|
-
name:
|
|
335
|
+
C && D[T(492)]((e, t) => f(T(495), {
|
|
336
|
+
type: T(470),
|
|
337
|
+
name: C,
|
|
341
338
|
value: e
|
|
342
|
-
},
|
|
343
|
-
|
|
344
|
-
ref:
|
|
345
|
-
closing:
|
|
346
|
-
anchorRef:
|
|
347
|
-
maxHeight:
|
|
339
|
+
}, G[t])),
|
|
340
|
+
x && ze[T(473)] && f(o, {
|
|
341
|
+
ref: ke,
|
|
342
|
+
closing: ze[T(475)],
|
|
343
|
+
anchorRef: Oe,
|
|
344
|
+
maxHeight: _e,
|
|
348
345
|
children: f(a, {
|
|
349
|
-
id:
|
|
350
|
-
options:
|
|
351
|
-
activeIndex:
|
|
346
|
+
id: E,
|
|
347
|
+
options: Ve,
|
|
348
|
+
activeIndex: z,
|
|
352
349
|
isSelected: () => !1,
|
|
353
|
-
onSelect: (e) =>
|
|
354
|
-
onActiveChange:
|
|
355
|
-
"aria-label":
|
|
350
|
+
onSelect: (e) => He(e[T(414)]),
|
|
351
|
+
onActiveChange: B,
|
|
352
|
+
"aria-label": w ? w + T(449) : "추천"
|
|
356
353
|
})
|
|
357
354
|
})
|
|
358
355
|
] });
|
|
359
356
|
}
|
|
360
|
-
export {
|
|
357
|
+
export { g as TagInput };
|