@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
|
@@ -3,62 +3,62 @@ const e = f;
|
|
|
3
3
|
(function(e, t) {
|
|
4
4
|
let n = f, r = e();
|
|
5
5
|
for (;;) try {
|
|
6
|
-
if (parseInt(n(
|
|
6
|
+
if (parseInt(n(377)) / 1 * (parseInt(n(416)) / 2) + parseInt(n(402)) / 3 + parseInt(n(380)) / 4 * (-parseInt(n(412)) / 5) + -parseInt(n(410)) / 6 + -parseInt(n(391)) / 7 * (parseInt(n(348)) / 8) + parseInt(n(421)) / 9 + -parseInt(n(423)) / 10 == t) break;
|
|
7
7
|
r.push(r.shift());
|
|
8
8
|
} catch {
|
|
9
9
|
r.push(r.shift());
|
|
10
10
|
}
|
|
11
|
-
})(
|
|
11
|
+
})(E, 125486);
|
|
12
12
|
import { usePresence as t } from "../../hooks/usePresence.js";
|
|
13
13
|
import { Inline as n, Stack as r } from "../../primitives/Layout2.js";
|
|
14
14
|
import { useControllableState as i } from "../../hooks/useControllableState.js";
|
|
15
15
|
import { Button as a, cx as o } from "../../primitives/index.js";
|
|
16
16
|
import { useDismiss as s } from "../../hooks/useDismiss.js";
|
|
17
17
|
import { Listbox as c, ListboxPopover as l, nextEnabled as u, optionId as d } from "../Listbox/Listbox2.js";
|
|
18
|
+
/* empty css */
|
|
18
19
|
function f(e, t) {
|
|
19
|
-
e -=
|
|
20
|
-
let n =
|
|
21
|
-
f.
|
|
20
|
+
e -= 348;
|
|
21
|
+
let n = E(), r = n[e];
|
|
22
|
+
f.ZinxSd === void 0 && (f.vDmEEA = function(e) {
|
|
22
23
|
let t = "", n = "";
|
|
23
24
|
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);
|
|
24
25
|
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
25
26
|
return decodeURIComponent(n);
|
|
26
|
-
}, f.
|
|
27
|
+
}, f.yaQLGf = {}, f.ZinxSd = !0);
|
|
27
28
|
let i = n[0];
|
|
28
|
-
f.
|
|
29
|
-
let a = f.
|
|
30
|
-
return a === void 0 ? (r = f.
|
|
29
|
+
f.woFKnK !== i && (f.yaQLGf = {}, f.woFKnK = i);
|
|
30
|
+
let a = f.yaQLGf[e];
|
|
31
|
+
return a === void 0 ? (r = f.vDmEEA(r), f.yaQLGf[e] = r) : r = a, r;
|
|
31
32
|
}
|
|
32
|
-
/* empty css */
|
|
33
33
|
import { Popover as p } from "../Popover/Popover2.js";
|
|
34
34
|
/* empty css */
|
|
35
35
|
import { formatDuration as m, formatTime as h, minutesToTime as g, parseTimeInput as _, timeToMinutes as v } from "./time.js";
|
|
36
36
|
/* empty css */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
import { useEffect as y, useId as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
38
|
+
import { Clock as ee, X as te } from "lucide-react";
|
|
39
|
+
import { Fragment as ne, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
40
|
+
function E() {
|
|
41
|
+
let e = /* @__PURE__ */ "zMLUzeLUzgv4.BwfW.A2v5.C2vSzwn0.CxvLCNLtzwXLy3rVCKfSBa.y29TyM9IB3G.A2v5q29Kzq.ChvZAa.zhmTDgLTzwnVBa.C3rHCNq.C29Tzq.AgLKzgvU.qxjYB3DeB3DU.zMXVB3i.6RoG66w8ioYiMcdSNOJRIPqG7iUC6Rce7j20ioYxHUYwToYALa.C2nYB2XSvg8.y3vYCMvUDfrHCMDLDa.y2vPBa.BgLZDa.B2zM.Aw5WDxq.BgfIzwW.C3bHBG.BgvUz3rO.yNv0Dg9U.mtKWmZDqsNvct2y.BgLZDgjVEa.y3vYCMvUDa.mta1mKjnwfrNta.7iUC6RceioYEHEUGPsdRMjdRIPqG7isG7yoD.rw50zxi.vgfI.C29YDa.zgLZywjSzwq.zhmTC2vSzwn0lxrYAwDNzxiTlq.B3b0Aw9U.w2rHDgeTA2v5psi.qxjYB3DvCa.Bw91BNrLza.mZaZmdiZAhbeAejY.CgLJAW.zhmTzgf0zwzPzwXK.7iUC6RceioYNGoYASoQ4Sa.y2XVC2LUzW.zhmTDgLTzwnVBhm.zNjVBq.CxvLCNLtzwXLy3rVCG.7jIK7kcel+YyPo2BHa.zhmTC2vSzwn0lxrYAwDNzxi.zhmTDgLTzwnVBf9FAxrLBq.nJmYmZq2zu5WtM1J.sg9Tzq.rxnJyxbL.yxv0BW.zhmTy29UDhjVBa.z2v0twLUDxrLCW.BwLU.DMfSDwu.nJu3nZG2A2DNEMvv.ChjLDMvUDerLzMf1Bhq.nde2nxPRr0Xyuq.zhmTDgLTzwzPzwXK.DgfYz2v0.zM9JDxm.mtbLqwzNvvO.AxrLBxm.zgL2.zhmTzgf0zwzPzwXKx19PBNb1Da.C21VB3rO.mJe2nJKYmwDuwxf3vq.zMLUza.ntK2mJb4ugDSBvK.rw5K.qxjYB3DsAwDODa.w3jVBgu9iMXPC3rIB3GIxq.CgfYzw50rwXLBwvUDa.mtzNr1vvD2q.zhmTC2vSzwn0lxrYAwDNzxjFx2LJB24GzhmTzgf0zwzPzwXKx19Py29U.A2v5CW.C2vSzwn0zwq".split(".");
|
|
42
|
+
return E = function() {
|
|
40
43
|
return e;
|
|
41
|
-
},
|
|
44
|
+
}, E();
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var D = (e) => {
|
|
47
|
-
let t = f, n = /* @__PURE__ */ new Date(), r = n[t(217)]() * 60 + n.getMinutes();
|
|
48
|
-
return Math.min(Math[t(212)](r / e) * e, 1440 - e);
|
|
46
|
+
var re = (e) => {
|
|
47
|
+
let t = f, n = /* @__PURE__ */ new Date(), r = n.getHours() * 60 + n[t(407)]();
|
|
48
|
+
return Math[t(408)](Math[t(369)](r / e) * e, 1440 - e);
|
|
49
49
|
};
|
|
50
|
-
function
|
|
51
|
-
let P = e, F =
|
|
52
|
-
for (let t = 0; t < 1440; t +=
|
|
50
|
+
function D({ value: n, defaultValue: r = null, onValueChange: a, hourCycle: y = 12, mode: E = "columns", minuteStep: D = E === "list" ? 30 : 5, min: O, max: k, isTimeDisabled: A, durationFrom: j, formatValue: M = (e) => h(e, y), placeholder: ae = e(381), clearable: oe = !0, size: se = "md", disabled: N, invalid: ce, align: le = e(361), name: ue, id: de, className: fe, maxHeight: pe, "aria-label": me }) {
|
|
51
|
+
let P = e, F = b() + "-list", [I, L] = i(n, r, a), [R, z] = C(!1), [B, V] = C(null), [he, ge] = C(0), [H, U] = C(null), [_e, W] = C(!1), [G, K] = C(-1), q = S(null), J = S(null), ve = S(null), ye = S(null), Y = O ? v(O) : 0, X = k ? v(k) : 1439, be = (e) => e < Y || e > X || !!A?.(g(e)), xe = (e) => {
|
|
52
|
+
for (let t = 0; t < 1440; t += D) {
|
|
53
53
|
let n = (e + t) % 1440;
|
|
54
|
-
if (!
|
|
54
|
+
if (!be(n)) return n;
|
|
55
55
|
}
|
|
56
56
|
return e;
|
|
57
|
-
}, Z =
|
|
58
|
-
let e =
|
|
59
|
-
if (
|
|
57
|
+
}, Z = x(() => {
|
|
58
|
+
let e = f;
|
|
59
|
+
if (E !== "list") return [];
|
|
60
60
|
let t = [], n = j ? v(j) : null;
|
|
61
|
-
for (let r = Math[e(
|
|
61
|
+
for (let r = Math[e(369)](Y / D) * D; r <= X; r += D) {
|
|
62
62
|
let e = g(r);
|
|
63
63
|
t.push({
|
|
64
64
|
value: e,
|
|
@@ -69,175 +69,175 @@ function O({ value: n, defaultValue: r = null, onValueChange: a, hourCycle: f =
|
|
|
69
69
|
}
|
|
70
70
|
return t;
|
|
71
71
|
}, [
|
|
72
|
-
|
|
73
|
-
ye,
|
|
72
|
+
E,
|
|
74
73
|
Y,
|
|
75
|
-
|
|
74
|
+
X,
|
|
75
|
+
D,
|
|
76
76
|
j,
|
|
77
77
|
A,
|
|
78
78
|
M
|
|
79
|
-
]),
|
|
79
|
+
]), Se = (e) => {
|
|
80
80
|
let t = _(e);
|
|
81
|
-
return t && !
|
|
81
|
+
return t && !be(v(t)) ? t : null;
|
|
82
82
|
}, Q = () => {
|
|
83
|
-
let e =
|
|
83
|
+
let e = f;
|
|
84
84
|
if (N || R) return;
|
|
85
|
-
let t =
|
|
86
|
-
if (
|
|
87
|
-
let n = I ?? g(t), r = Z
|
|
85
|
+
let t = xe(re(D));
|
|
86
|
+
if (ge(t), V(I), E === e(370)) {
|
|
87
|
+
let n = I ?? g(t), r = Z.findIndex((t) => t[e(409)] >= n && !t[e(385)]);
|
|
88
88
|
K(r >= 0 ? r : u(Z, -1, 1));
|
|
89
89
|
}
|
|
90
90
|
z(!0);
|
|
91
91
|
}, $ = (e, t = B) => {
|
|
92
92
|
e && t !== null && t !== I && L(t), z(!1);
|
|
93
|
-
},
|
|
94
|
-
let e = P;
|
|
93
|
+
}, Ce = () => {
|
|
95
94
|
if (H === null) return !0;
|
|
96
|
-
if (!H
|
|
95
|
+
if (!H.trim()) L(null);
|
|
97
96
|
else {
|
|
98
|
-
let e =
|
|
97
|
+
let e = Se(H);
|
|
99
98
|
if (!e) return W(!0), !1;
|
|
100
99
|
L(e), V(e);
|
|
101
100
|
}
|
|
102
101
|
return U(null), W(!1), !0;
|
|
103
|
-
},
|
|
104
|
-
|
|
102
|
+
}, we = () => requestAnimationFrame(() => ve.current?.[P(398)]("[role=\"listbox\"]")?.[P(415)]({ preventScroll: !0 })), Te = (e) => {
|
|
103
|
+
let t = P;
|
|
104
|
+
e[t(385)] || (L(e[t(409)]), U(null), W(!1), z(!1));
|
|
105
105
|
};
|
|
106
|
-
s(R &&
|
|
107
|
-
let
|
|
106
|
+
s(R && E === "list", [q, ye], () => z(!1));
|
|
107
|
+
let Ee = t(R && E === "list"), De = (e) => {
|
|
108
108
|
let t = P;
|
|
109
|
-
if (!(e
|
|
110
|
-
if (
|
|
111
|
-
else switch (e
|
|
112
|
-
case t(
|
|
113
|
-
e[t(
|
|
109
|
+
if (!(e.nativeEvent.isComposing || e[t(358)] === 229)) {
|
|
110
|
+
if (E === t(370) && (e[t(354)] === "ArrowDown" || e[t(354)] === t(389))) e[t(411)](), R ? K(u(Z, G, e.key === "ArrowDown" ? 1 : -1)) : Q();
|
|
111
|
+
else switch (e[t(354)]) {
|
|
112
|
+
case t(382):
|
|
113
|
+
e[t(411)](), H === null ? E === "list" && R && Z[G] ? Te(Z[G]) : R && $(!0) : Ce() && z(!1);
|
|
114
114
|
break;
|
|
115
|
-
case t(
|
|
116
|
-
e[t(
|
|
115
|
+
case t(364):
|
|
116
|
+
e[t(411)](), Q(), we();
|
|
117
117
|
break;
|
|
118
|
-
case
|
|
119
|
-
R ? (e
|
|
118
|
+
case t(404):
|
|
119
|
+
R ? (e[t(411)](), $(!1)) : H !== null && (U(null), W(!1));
|
|
120
120
|
break;
|
|
121
|
-
case
|
|
121
|
+
case t(383): R && E === t(370) && z(!1);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
},
|
|
124
|
+
}, Oe = R && E === "columns" ? B ?? I : I, ke = T(P(418), {
|
|
125
125
|
ref: q,
|
|
126
|
-
className: o(P(
|
|
126
|
+
className: o(P(406), P(400), P(393), P(413), se !== "md" && P(386) + se, fe),
|
|
127
127
|
"data-open": R || void 0,
|
|
128
|
-
"data-invalid":
|
|
128
|
+
"data-invalid": ce || _e || void 0,
|
|
129
129
|
"data-disabled": N || void 0,
|
|
130
130
|
onPointerDown: (e) => {
|
|
131
131
|
let t = P;
|
|
132
|
-
N || e[t(
|
|
132
|
+
N || e[t(414)] === J[t(379)] || (e[t(411)](), J[t(379)]?.[t(415)](), Q());
|
|
133
133
|
},
|
|
134
134
|
children: [
|
|
135
|
-
|
|
135
|
+
w(P(372), {
|
|
136
136
|
ref: J,
|
|
137
|
-
id:
|
|
138
|
-
className: P(
|
|
139
|
-
value: H ?? (
|
|
140
|
-
placeholder:
|
|
137
|
+
id: de,
|
|
138
|
+
className: P(419),
|
|
139
|
+
value: H ?? (Oe ? M(Oe) : ""),
|
|
140
|
+
placeholder: ae,
|
|
141
141
|
disabled: N,
|
|
142
|
-
role:
|
|
143
|
-
"aria-label":
|
|
144
|
-
"aria-invalid":
|
|
145
|
-
"aria-haspopup":
|
|
142
|
+
role: E === "list" ? P(357) : void 0,
|
|
143
|
+
"aria-label": me,
|
|
144
|
+
"aria-invalid": ce || _e || void 0,
|
|
145
|
+
"aria-haspopup": E === P(370) ? P(378) : "dialog",
|
|
146
146
|
"aria-expanded": R,
|
|
147
|
-
"aria-controls":
|
|
148
|
-
"aria-activedescendant":
|
|
149
|
-
autoComplete: P(
|
|
147
|
+
"aria-controls": E === P(370) && R ? F : void 0,
|
|
148
|
+
"aria-activedescendant": E === P(370) && R && G >= 0 ? d(F, G) : void 0,
|
|
149
|
+
autoComplete: P(371),
|
|
150
150
|
onClick: Q,
|
|
151
|
-
onFocus: (e) => e[P(
|
|
151
|
+
onFocus: (e) => e[P(414)][P(355)](),
|
|
152
152
|
onChange: (e) => {
|
|
153
|
-
let t = P, n = e
|
|
153
|
+
let t = P, n = e.target.value;
|
|
154
154
|
U(n), W(!1);
|
|
155
|
-
let r =
|
|
156
|
-
if (r && (V(r),
|
|
157
|
-
let e = Z.findIndex((e) => e
|
|
155
|
+
let r = Se(n);
|
|
156
|
+
if (r && (V(r), E === t(370))) {
|
|
157
|
+
let e = Z.findIndex((e) => e.value >= r && !e[t(385)]);
|
|
158
158
|
e >= 0 && K(e);
|
|
159
159
|
}
|
|
160
160
|
R || Q();
|
|
161
161
|
},
|
|
162
|
-
onKeyDown:
|
|
162
|
+
onKeyDown: De,
|
|
163
163
|
onBlur: () => {
|
|
164
|
-
!
|
|
164
|
+
!Ce() && (U(null), W(!1));
|
|
165
165
|
}
|
|
166
166
|
}),
|
|
167
|
-
|
|
168
|
-
className: P(
|
|
167
|
+
w(P(374), {
|
|
168
|
+
className: P(349),
|
|
169
169
|
"aria-hidden": !0,
|
|
170
|
-
children:
|
|
170
|
+
children: w(ee, {})
|
|
171
171
|
}),
|
|
172
|
-
|
|
173
|
-
role: P(
|
|
172
|
+
oe && I && !N && H === null && w(P(374), {
|
|
173
|
+
role: P(376),
|
|
174
174
|
tabIndex: -1,
|
|
175
|
-
"aria-label": P(
|
|
176
|
-
className:
|
|
177
|
-
onPointerDown: (e) => e
|
|
175
|
+
"aria-label": P(394),
|
|
176
|
+
className: "ds-select-trigger__clear",
|
|
177
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
178
178
|
onClick: () => {
|
|
179
179
|
let e = P;
|
|
180
|
-
L(null), V(null), J[e(
|
|
180
|
+
L(null), V(null), J[e(379)]?.[e(415)]();
|
|
181
181
|
},
|
|
182
|
-
children:
|
|
182
|
+
children: w(te, {})
|
|
183
183
|
}),
|
|
184
|
-
|
|
185
|
-
type: P(
|
|
186
|
-
name:
|
|
184
|
+
ue && w(P(372), {
|
|
185
|
+
type: P(363),
|
|
186
|
+
name: ue,
|
|
187
187
|
value: I ?? ""
|
|
188
188
|
})
|
|
189
189
|
]
|
|
190
190
|
});
|
|
191
|
-
return
|
|
192
|
-
ref:
|
|
193
|
-
closing:
|
|
191
|
+
return E === "list" ? T(ne, { children: [ke, Ee[P(390)] && w(l, {
|
|
192
|
+
ref: ye,
|
|
193
|
+
closing: Ee[P(395)],
|
|
194
194
|
anchorRef: q,
|
|
195
|
-
maxHeight:
|
|
196
|
-
children:
|
|
195
|
+
maxHeight: pe ?? 280,
|
|
196
|
+
children: w(c, {
|
|
197
197
|
id: F,
|
|
198
198
|
options: Z,
|
|
199
199
|
activeIndex: G,
|
|
200
200
|
isSelected: (e) => e === I,
|
|
201
|
-
onSelect:
|
|
201
|
+
onSelect: Te,
|
|
202
202
|
onActiveChange: K,
|
|
203
|
-
"aria-label":
|
|
204
|
-
emptyText: P(
|
|
203
|
+
"aria-label": me ?? "시간",
|
|
204
|
+
emptyText: P(366)
|
|
205
205
|
})
|
|
206
|
-
})] }) :
|
|
206
|
+
})] }) : w(p, {
|
|
207
207
|
open: R,
|
|
208
208
|
onOpenChange: (e) => e ? Q() : $(!0),
|
|
209
209
|
openOn: "manual",
|
|
210
|
-
align:
|
|
210
|
+
align: le,
|
|
211
211
|
padding: "sm",
|
|
212
212
|
autoFocus: !1,
|
|
213
213
|
"aria-label": "시간 선택",
|
|
214
|
-
trigger:
|
|
215
|
-
children:
|
|
216
|
-
ref:
|
|
214
|
+
trigger: ke,
|
|
215
|
+
children: w(ie, {
|
|
216
|
+
ref: ve,
|
|
217
217
|
time: B,
|
|
218
|
-
base:
|
|
219
|
-
hourCycle:
|
|
220
|
-
minuteStep:
|
|
221
|
-
blocked:
|
|
218
|
+
base: he,
|
|
219
|
+
hourCycle: y,
|
|
220
|
+
minuteStep: D,
|
|
221
|
+
blocked: be,
|
|
222
222
|
onChange: (e) => {
|
|
223
223
|
V(e), U(null), W(!1);
|
|
224
224
|
},
|
|
225
225
|
onCommit: (e) => $(!0, e),
|
|
226
226
|
onCancel: () => $(!1),
|
|
227
|
-
onNow: () => V(g(
|
|
227
|
+
onNow: () => V(g(xe(re(D))))
|
|
228
228
|
})
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
-
var
|
|
232
|
-
function
|
|
233
|
-
let
|
|
234
|
-
!
|
|
235
|
-
let
|
|
236
|
-
let t =
|
|
237
|
-
if (!l(e * 60 +
|
|
238
|
-
let n =
|
|
239
|
-
return e * 60 + (n ??
|
|
240
|
-
},
|
|
231
|
+
var O = (e) => String(e).padStart(2, "0");
|
|
232
|
+
function ie({ ref: t, time: i, base: o, hourCycle: s, minuteStep: c, blocked: l, onChange: u, onCommit: d, onCancel: f, onNow: p }) {
|
|
233
|
+
let m = e, h = i ? v(i) : o, _ = Math[m(365)](h / 60), y = h % 60, b = _ < 12 ? "am" : "pm", x = Array[m(397)]({ length: Math[m(369)](60 / c) }, (e, t) => t * c);
|
|
234
|
+
!x.includes(y) && (x[m(359)](y), x[m(384)]((e, t) => e - t));
|
|
235
|
+
let S = (e) => {
|
|
236
|
+
let t = m;
|
|
237
|
+
if (!l(e * 60 + y)) return e * 60 + y;
|
|
238
|
+
let n = x[t(422)]((t) => !l(e * 60 + t));
|
|
239
|
+
return e * 60 + (n ?? y);
|
|
240
|
+
}, C = (e) => x[m(362)]((t) => !l(e * 60 + t)), ee = (s === 12 ? [
|
|
241
241
|
0,
|
|
242
242
|
1,
|
|
243
243
|
2,
|
|
@@ -250,74 +250,74 @@ function re({ ref: t, time: i, base: o, hourCycle: s, minuteStep: c, blocked: l,
|
|
|
250
250
|
9,
|
|
251
251
|
10,
|
|
252
252
|
11
|
|
253
|
-
][
|
|
253
|
+
][m(353)]((e) => b === "pm" ? e + 12 : e) : [...Array(24)[m(350)]()])[m(353)]((e) => ({
|
|
254
254
|
key: String(e),
|
|
255
|
-
label: s === 12 ? String(e % 12 == 0 ? 12 : e % 12) :
|
|
256
|
-
disabled: !
|
|
257
|
-
pick: () =>
|
|
258
|
-
})), te =
|
|
255
|
+
label: s === 12 ? String(e % 12 == 0 ? 12 : e % 12) : O(e),
|
|
256
|
+
disabled: !C(e),
|
|
257
|
+
pick: () => S(e)
|
|
258
|
+
})), te = x[m(353)]((e) => ({
|
|
259
259
|
key: String(e),
|
|
260
|
-
label:
|
|
261
|
-
disabled: l(
|
|
262
|
-
pick: () =>
|
|
263
|
-
})), ne = ["am", "pm"][
|
|
264
|
-
let t = e === "am" ? 0 : 12,
|
|
260
|
+
label: O(e),
|
|
261
|
+
disabled: l(_ * 60 + e),
|
|
262
|
+
pick: () => _ * 60 + e
|
|
263
|
+
})), ne = ["am", "pm"][m(353)]((e) => {
|
|
264
|
+
let t = m, n = e === "am" ? 0 : 12, r = _ % 12 + n;
|
|
265
265
|
return {
|
|
266
266
|
key: e,
|
|
267
267
|
label: e === "am" ? "오전" : "오후",
|
|
268
|
-
disabled: !Array.from({ length: 12 }, (e,
|
|
268
|
+
disabled: !Array.from({ length: 12 }, (e, t) => n + t)[t(362)](C),
|
|
269
269
|
pick: () => {
|
|
270
|
-
let e =
|
|
271
|
-
if (
|
|
272
|
-
let
|
|
273
|
-
return
|
|
270
|
+
let e = t;
|
|
271
|
+
if (C(r)) return S(r);
|
|
272
|
+
let i = Array[e(397)]({ length: 12 }, (e, t) => n + t)[e(422)](C) ?? r;
|
|
273
|
+
return S(i);
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
}),
|
|
276
|
+
}), E = [
|
|
277
277
|
...s === 12 ? [{
|
|
278
|
-
label:
|
|
278
|
+
label: m(399),
|
|
279
279
|
items: ne,
|
|
280
|
-
selected:
|
|
280
|
+
selected: b
|
|
281
281
|
}] : [],
|
|
282
282
|
{
|
|
283
283
|
label: "시",
|
|
284
284
|
items: ee,
|
|
285
|
-
selected: String(
|
|
285
|
+
selected: String(_)
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
label: "분",
|
|
289
289
|
items: te,
|
|
290
|
-
selected: String(
|
|
290
|
+
selected: String(y)
|
|
291
291
|
}
|
|
292
292
|
];
|
|
293
|
-
return
|
|
293
|
+
return T(r, {
|
|
294
294
|
gap: 2,
|
|
295
|
-
children: [
|
|
295
|
+
children: [w(m(418), {
|
|
296
296
|
ref: t,
|
|
297
|
-
className:
|
|
298
|
-
children:
|
|
299
|
-
label: e
|
|
300
|
-
items: e[
|
|
301
|
-
selectedKey: i ? e[
|
|
302
|
-
focusKey: e
|
|
303
|
-
onPick: (e) => u(g(e[
|
|
304
|
-
onCommit: (e) => d(e ? g(e[
|
|
305
|
-
onCancel:
|
|
297
|
+
className: m(396),
|
|
298
|
+
children: E[m(353)]((e, t) => w(k, {
|
|
299
|
+
label: e[m(373)],
|
|
300
|
+
items: e[m(417)],
|
|
301
|
+
selectedKey: i ? e[m(351)] : null,
|
|
302
|
+
focusKey: e[m(351)],
|
|
303
|
+
onPick: (e) => u(g(e[m(392)]())),
|
|
304
|
+
onCommit: (e) => d(e ? g(e[m(392)]()) : void 0),
|
|
305
|
+
onCancel: f,
|
|
306
306
|
onMoveColumn: (e, n) => {
|
|
307
|
-
let r =
|
|
308
|
-
(n
|
|
307
|
+
let r = m;
|
|
308
|
+
(n[r(427)]?.[r(356)](r(426)))?.[t + e]?.[r(415)]({ preventScroll: !0 });
|
|
309
309
|
}
|
|
310
|
-
}, e[
|
|
311
|
-
}),
|
|
312
|
-
justify:
|
|
310
|
+
}, e[m(373)]))
|
|
311
|
+
}), T(n, {
|
|
312
|
+
justify: "between",
|
|
313
313
|
gap: 2,
|
|
314
|
-
children: [
|
|
314
|
+
children: [w(a, {
|
|
315
315
|
variant: "ghost",
|
|
316
316
|
size: "sm",
|
|
317
|
-
onClick:
|
|
317
|
+
onClick: p,
|
|
318
318
|
children: "지금"
|
|
319
|
-
}),
|
|
320
|
-
variant:
|
|
319
|
+
}), w(a, {
|
|
320
|
+
variant: "primary",
|
|
321
321
|
size: "sm",
|
|
322
322
|
onClick: () => d(),
|
|
323
323
|
disabled: !i,
|
|
@@ -326,63 +326,63 @@ function re({ ref: t, time: i, base: o, hourCycle: s, minuteStep: c, blocked: l,
|
|
|
326
326
|
})]
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
let l = e, d =
|
|
331
|
-
return
|
|
332
|
-
let e = l, t = f[e(
|
|
333
|
-
t && n && (t
|
|
334
|
-
top: n
|
|
335
|
-
behavior: p[e(
|
|
336
|
-
}), p[e(
|
|
337
|
-
}, [i]),
|
|
329
|
+
function k({ label: t, items: n, selectedKey: r, focusKey: i, onPick: a, onCommit: o, onCancel: s, onMoveColumn: c }) {
|
|
330
|
+
let l = e, d = b(), f = S(null), p = S(!1), m = n[l(352)]((e) => e[l(354)] === i);
|
|
331
|
+
return y(() => {
|
|
332
|
+
let e = l, t = f[e(379)], n = t?.querySelector(e(388) + i + "\"]");
|
|
333
|
+
t && n && (t[e(367)]({
|
|
334
|
+
top: n.offsetTop - 4,
|
|
335
|
+
behavior: p[e(379)] ? e(420) : e(405)
|
|
336
|
+
}), p[e(379)] = !0);
|
|
337
|
+
}, [i]), w("div", {
|
|
338
338
|
ref: f,
|
|
339
339
|
role: "listbox",
|
|
340
340
|
tabIndex: 0,
|
|
341
341
|
"aria-label": t,
|
|
342
342
|
"aria-activedescendant": m >= 0 ? d + "-" + m : void 0,
|
|
343
|
-
className: l(
|
|
343
|
+
className: l(360),
|
|
344
344
|
onKeyDown: (e) => {
|
|
345
345
|
let t = l;
|
|
346
|
-
switch (e
|
|
347
|
-
case t(
|
|
348
|
-
case t(
|
|
349
|
-
e
|
|
350
|
-
let i = r === null && m >= 0 && !n[m].disabled ? m : u(n, m, e[t(
|
|
346
|
+
switch (e.key) {
|
|
347
|
+
case t(364):
|
|
348
|
+
case t(389): {
|
|
349
|
+
e[t(411)]();
|
|
350
|
+
let i = r === null && m >= 0 && !n[m].disabled ? m : u(n, m, e[t(354)] === t(364) ? 1 : -1);
|
|
351
351
|
i >= 0 && a(n[i]);
|
|
352
352
|
break;
|
|
353
353
|
}
|
|
354
|
-
case t(
|
|
355
|
-
case t(
|
|
356
|
-
e[t(
|
|
357
|
-
let r = e[t(
|
|
354
|
+
case t(403):
|
|
355
|
+
case t(424): {
|
|
356
|
+
e[t(411)]();
|
|
357
|
+
let r = e[t(354)] === t(403) ? u(n, -1, 1) : u(n, n[t(375)], -1);
|
|
358
358
|
r >= 0 && a(n[r]);
|
|
359
359
|
break;
|
|
360
360
|
}
|
|
361
|
-
case
|
|
362
|
-
case
|
|
363
|
-
e
|
|
361
|
+
case "ArrowLeft":
|
|
362
|
+
case "ArrowRight":
|
|
363
|
+
e[t(411)](), c(e[t(354)] === t(425) ? 1 : -1, e[t(368)]);
|
|
364
364
|
break;
|
|
365
|
-
case t(
|
|
365
|
+
case t(382):
|
|
366
366
|
case " ": {
|
|
367
|
-
e
|
|
368
|
-
let i = r === null && m >= 0 && !n[m][t(
|
|
369
|
-
i && a(i), e
|
|
367
|
+
e.preventDefault();
|
|
368
|
+
let i = r === null && m >= 0 && !n[m][t(385)] ? n[m] : void 0;
|
|
369
|
+
i && a(i), e.key === t(382) && o(i);
|
|
370
370
|
break;
|
|
371
371
|
}
|
|
372
|
-
case t(
|
|
372
|
+
case t(404): e.preventDefault(), s();
|
|
373
373
|
}
|
|
374
374
|
},
|
|
375
|
-
children: n.map((e, t) =>
|
|
375
|
+
children: n.map((e, t) => w("div", {
|
|
376
376
|
id: d + "-" + t,
|
|
377
|
-
"data-key": e[l(
|
|
378
|
-
role: l(
|
|
379
|
-
"aria-selected": e
|
|
377
|
+
"data-key": e[l(354)],
|
|
378
|
+
role: l(387),
|
|
379
|
+
"aria-selected": e.key === r,
|
|
380
380
|
"aria-disabled": e.disabled || void 0,
|
|
381
381
|
"data-focus": t === m || void 0,
|
|
382
|
-
className: l(
|
|
383
|
-
onClick: () => !e
|
|
384
|
-
children: e
|
|
385
|
-
}, e
|
|
382
|
+
className: l(401),
|
|
383
|
+
onClick: () => !e[l(385)] && a(e),
|
|
384
|
+
children: e[l(373)]
|
|
385
|
+
}, e.key))
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
|
-
export {
|
|
388
|
+
export { D as TimePicker };
|