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