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