@iamfiro/design 0.1.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/AGENTS.md +1 -0
- package/agents/INDEX.md +1 -0
- package/agents/brand-icon/AGENTS.md +2 -2
- package/agents/social-login-button/AGENTS.md +156 -0
- package/lib/components/Accordion/Accordion2.js +135 -0
- package/lib/components/ActionBar/ActionBar2.js +66 -0
- package/lib/components/Alert/Alert2.js +131 -0
- package/lib/components/AppShell/AppShell2.js +94 -0
- package/lib/components/AreaChart/AreaChart.js +59 -0
- package/lib/components/BarChart/BarChart2.js +243 -0
- package/lib/components/BarList/BarList2.js +172 -0
- package/lib/components/Breadcrumb/Breadcrumb2.js +90 -0
- package/lib/components/Calendar/Calendar2.js +309 -0
- package/lib/components/Calendar/DatePicker2.js +228 -0
- package/lib/components/Calendar/date.js +118 -0
- package/lib/components/Card/Card2.js +103 -0
- package/lib/components/CardFrame/CardFrame2.js +67 -0
- package/lib/components/Chart/ChartParts.js +150 -0
- package/lib/components/Chart/chart2.js +96 -0
- package/lib/components/Chart/useChartInteraction.js +94 -0
- package/lib/components/ChatBubble/ChatBubble2.js +174 -0
- package/lib/components/ChatBubble/formatChatTime.js +48 -0
- package/lib/components/ChatComposer/ChatComposer2.js +153 -0
- package/lib/components/CodeBlock/CodeBlock2.js +93 -0
- package/lib/components/CodeBlock/highlight.js +111 -0
- package/lib/components/ColorPicker/ColorPicker2.js +609 -0
- package/lib/components/ColorPicker/color.js +180 -0
- package/lib/components/ColorPicker/presets.js +70 -0
- package/lib/components/Combobox/Combobox2.js +228 -0
- package/lib/components/CommandMenu/CommandMenu.js +267 -0
- package/lib/components/Comment/Comment2.js +110 -0
- package/lib/components/ContextMenu/ContextMenu2.js +168 -0
- package/lib/components/DataGrid/DataGrid2.js +1998 -0
- package/lib/components/DataGrid/GridPopover.js +154 -0
- package/lib/components/DataGrid/anchor.js +50 -0
- package/lib/components/DataGrid/model.js +557 -0
- package/lib/components/DataGrid/panels.js +701 -0
- package/lib/components/DataGrid/typeMeta.js +75 -0
- package/lib/components/DataGrid/types.js +53 -0
- package/lib/components/DescriptionList/DescriptionList2.js +180 -0
- package/lib/components/Dialog/AlertDialog.js +119 -0
- package/lib/components/Dialog/Dialog2.js +110 -0
- package/lib/components/Dialog/modal.js +92 -0
- package/lib/components/Drawer/Drawer2.js +244 -0
- package/lib/components/DropdownMenu/DropdownMenu2.js +393 -0
- package/lib/components/DropdownMenu/menuCore.js +63 -0
- package/lib/components/Dropzone/Dropzone2.js +145 -0
- package/lib/components/EmptyState/EmptyState2.js +70 -0
- package/lib/components/FileChip/FileChip2.js +94 -0
- package/lib/components/FileUpload/FileUpload.js +259 -0
- package/lib/components/FilterChips/FilterChips2.js +101 -0
- package/lib/components/FunnelChart/FunnelChart2.js +283 -0
- package/lib/components/FunnelChart/funnel.js +72 -0
- package/lib/components/Highlight/Highlight2.js +100 -0
- package/lib/components/HoverCard/HoverCard.js +134 -0
- package/lib/components/InlineDiff/InlineDiff2.js +215 -0
- package/lib/components/InlineDiff/diff.js +126 -0
- package/lib/components/InlineDiff/useDiffReview.js +110 -0
- package/lib/components/Kanban/Kanban2.js +691 -0
- package/lib/components/Kanban/KanbanCard.js +159 -0
- package/lib/components/Kanban/move.js +69 -0
- package/lib/components/LineChart/LineChart2.js +342 -0
- package/lib/components/List/List2.js +132 -0
- package/lib/components/Listbox/Listbox2.js +163 -0
- package/lib/components/Marker/Marker2.js +82 -0
- package/lib/components/Menubar/Menubar2.js +222 -0
- package/lib/components/MultiSelect/MultiSelect2.js +204 -0
- package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
- package/lib/components/NoticeStack/NoticeStack2.js +178 -0
- package/lib/components/NumberStepper/NumberStepper2.js +128 -0
- package/lib/components/OtpInput/OtpInput2.js +122 -0
- package/lib/components/Pagination/Pagination2.js +210 -0
- package/lib/components/Pagination/paginationRange.js +52 -0
- package/lib/components/PhoneInput/PhoneInput.js +175 -0
- package/lib/components/PieChart/PieChart2.js +246 -0
- package/lib/components/PieChart/arc.js +90 -0
- package/lib/components/PieChart/useArcTween.js +92 -0
- package/lib/components/Popover/Popover2.js +111 -0
- package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
- package/lib/components/Rating/Rating2.js +186 -0
- package/lib/components/Resizable/Resizable2.js +238 -0
- package/lib/components/Resizable/layout.js +115 -0
- package/lib/components/ScaledPreview/ScaledPreview2.js +99 -0
- package/lib/components/ScatterChart/ScatterChart2.js +355 -0
- package/lib/components/ScatterChart/scatter.js +85 -0
- package/lib/components/ScrollArea/ScrollArea2.js +217 -0
- package/lib/components/Select/Select2.js +153 -0
- package/lib/components/Sidebar/Sidebar2.js +127 -0
- package/lib/components/Skeleton/Skeleton2.js +91 -0
- package/lib/components/Slider/Slider2.js +142 -0
- package/lib/components/SocialLoginButton/SocialLoginButton.js +84 -0
- package/lib/components/SparkChart/SparkChart2.js +217 -0
- package/lib/components/SparkChart/spark.js +71 -0
- package/lib/components/Sparkbar/Sparkbar2.js +111 -0
- package/lib/components/SplitView/SplitView2.js +95 -0
- package/lib/components/Stat/Stat2.js +164 -0
- package/lib/components/StepList/StepList2.js +131 -0
- package/lib/components/Table/Table2.js +104 -0
- package/lib/components/Tabs/Tabs2.js +131 -0
- package/lib/components/TagInput/TagInput2.js +357 -0
- package/lib/components/TimePicker/TimePicker2.js +388 -0
- package/lib/components/TimePicker/time.js +81 -0
- package/lib/components/Timeline/Timeline2.js +369 -0
- package/lib/components/Timeline/scale.js +81 -0
- package/lib/components/Toast/Toaster.js +213 -0
- package/lib/components/Toast/store.js +128 -0
- package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
- package/lib/components/Toolbar/Toolbar2.js +283 -0
- package/lib/components/Tracker/Tracker2.js +172 -0
- package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
- package/lib/components/TreeView/TreeView2.js +286 -0
- package/lib/hooks/timing.js +57 -0
- package/lib/hooks/useControllableState.js +49 -0
- package/lib/hooks/useCountdown.js +75 -0
- package/lib/hooks/useDigitInput.js +103 -0
- package/lib/hooks/useDismiss.js +69 -0
- package/lib/hooks/useElapsed.js +85 -0
- package/lib/hooks/useFloating.js +70 -0
- package/lib/hooks/useFocusTrap.js +85 -0
- package/lib/hooks/usePresence.js +58 -0
- package/lib/hooks/usePressToOpen.js +70 -0
- package/lib/hooks/useScrollLock.js +71 -0
- package/lib/hooks/useSelection.js +65 -0
- package/lib/index.js +176 -17911
- package/lib/primitives/AspectRatio2.js +76 -0
- package/lib/primitives/BrandIcon.js +245 -0
- package/lib/primitives/ColorDot2.js +71 -0
- package/lib/primitives/CopyButton2.js +86 -0
- package/lib/primitives/CountBadge2.js +80 -0
- package/lib/primitives/Countdown2.js +61 -0
- package/lib/primitives/Delta2.js +92 -0
- package/lib/primitives/Elapsed.js +62 -0
- package/lib/primitives/FileIcon2.js +125 -0
- package/lib/primitives/Flag2.js +263 -0
- package/lib/primitives/IconStack2.js +85 -0
- package/lib/primitives/IconTile2.js +69 -0
- package/lib/primitives/Kbd2.js +88 -0
- package/lib/primitives/Layout2.js +118 -0
- package/lib/primitives/Link2.js +55 -0
- package/lib/primitives/MaskedText2.js +121 -0
- package/lib/primitives/Progress2.js +137 -0
- package/lib/primitives/RelativeTime.js +82 -0
- package/lib/primitives/SearchInput2.js +85 -0
- package/lib/primitives/SelectorButton2.js +96 -0
- package/lib/primitives/Spinner2.js +94 -0
- package/lib/primitives/StatusIcon2.js +126 -0
- package/lib/primitives/Swatch2.js +79 -0
- package/lib/primitives/Tooltip2.js +132 -0
- package/lib/primitives/Typography2.js +97 -0
- package/lib/primitives/formatCountdown.js +54 -0
- package/lib/primitives/formatElapsed.js +63 -0
- package/lib/primitives/formatRelativeTime.js +64 -0
- package/lib/primitives/hotkey.js +94 -0
- package/lib/primitives/index.js +351 -0
- package/lib/primitives/maskValue.js +69 -0
- package/lib/style.css +1 -1
- package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
- package/lib/types/components/index.d.ts +2 -0
- package/lib/types/primitives/BrandIcon.d.ts +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = f;
|
|
3
|
+
(function(e, t) {
|
|
4
|
+
let n = f, r = e();
|
|
5
|
+
for (;;) try {
|
|
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
|
+
r.push(r.shift());
|
|
8
|
+
} catch {
|
|
9
|
+
r.push(r.shift());
|
|
10
|
+
}
|
|
11
|
+
})(E, 125486);
|
|
12
|
+
import { usePresence as t } from "../../hooks/usePresence.js";
|
|
13
|
+
import { Inline as n, Stack as r } from "../../primitives/Layout2.js";
|
|
14
|
+
import { useControllableState as i } from "../../hooks/useControllableState.js";
|
|
15
|
+
import { Button as a, cx as o } from "../../primitives/index.js";
|
|
16
|
+
import { useDismiss as s } from "../../hooks/useDismiss.js";
|
|
17
|
+
import { Listbox as c, ListboxPopover as l, nextEnabled as u, optionId as d } from "../Listbox/Listbox2.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
function f(e, t) {
|
|
20
|
+
e -= 348;
|
|
21
|
+
let n = E(), r = n[e];
|
|
22
|
+
f.ZinxSd === void 0 && (f.vDmEEA = function(e) {
|
|
23
|
+
let t = "", n = "";
|
|
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);
|
|
25
|
+
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
26
|
+
return decodeURIComponent(n);
|
|
27
|
+
}, f.yaQLGf = {}, f.ZinxSd = !0);
|
|
28
|
+
let i = n[0];
|
|
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;
|
|
32
|
+
}
|
|
33
|
+
import { Popover as p } from "../Popover/Popover2.js";
|
|
34
|
+
/* empty css */
|
|
35
|
+
import { formatDuration as m, formatTime as h, minutesToTime as g, parseTimeInput as _, timeToMinutes as v } from "./time.js";
|
|
36
|
+
/* empty css */
|
|
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() {
|
|
43
|
+
return e;
|
|
44
|
+
}, E();
|
|
45
|
+
}
|
|
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
|
+
};
|
|
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
|
+
let n = (e + t) % 1440;
|
|
54
|
+
if (!be(n)) return n;
|
|
55
|
+
}
|
|
56
|
+
return e;
|
|
57
|
+
}, Z = x(() => {
|
|
58
|
+
let e = f;
|
|
59
|
+
if (E !== "list") return [];
|
|
60
|
+
let t = [], n = j ? v(j) : null;
|
|
61
|
+
for (let r = Math[e(369)](Y / D) * D; r <= X; r += D) {
|
|
62
|
+
let e = g(r);
|
|
63
|
+
t.push({
|
|
64
|
+
value: e,
|
|
65
|
+
label: M(e),
|
|
66
|
+
description: n !== null && r > n ? m(r - n) : void 0,
|
|
67
|
+
disabled: !!A?.(e) || n !== null && r <= n
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return t;
|
|
71
|
+
}, [
|
|
72
|
+
E,
|
|
73
|
+
Y,
|
|
74
|
+
X,
|
|
75
|
+
D,
|
|
76
|
+
j,
|
|
77
|
+
A,
|
|
78
|
+
M
|
|
79
|
+
]), Se = (e) => {
|
|
80
|
+
let t = _(e);
|
|
81
|
+
return t && !be(v(t)) ? t : null;
|
|
82
|
+
}, Q = () => {
|
|
83
|
+
let e = f;
|
|
84
|
+
if (N || R) return;
|
|
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
|
+
K(r >= 0 ? r : u(Z, -1, 1));
|
|
89
|
+
}
|
|
90
|
+
z(!0);
|
|
91
|
+
}, $ = (e, t = B) => {
|
|
92
|
+
e && t !== null && t !== I && L(t), z(!1);
|
|
93
|
+
}, Ce = () => {
|
|
94
|
+
if (H === null) return !0;
|
|
95
|
+
if (!H.trim()) L(null);
|
|
96
|
+
else {
|
|
97
|
+
let e = Se(H);
|
|
98
|
+
if (!e) return W(!0), !1;
|
|
99
|
+
L(e), V(e);
|
|
100
|
+
}
|
|
101
|
+
return U(null), W(!1), !0;
|
|
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
|
+
};
|
|
106
|
+
s(R && E === "list", [q, ye], () => z(!1));
|
|
107
|
+
let Ee = t(R && E === "list"), De = (e) => {
|
|
108
|
+
let t = P;
|
|
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
|
+
break;
|
|
115
|
+
case t(364):
|
|
116
|
+
e[t(411)](), Q(), we();
|
|
117
|
+
break;
|
|
118
|
+
case t(404):
|
|
119
|
+
R ? (e[t(411)](), $(!1)) : H !== null && (U(null), W(!1));
|
|
120
|
+
break;
|
|
121
|
+
case t(383): R && E === t(370) && z(!1);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}, Oe = R && E === "columns" ? B ?? I : I, ke = T(P(418), {
|
|
125
|
+
ref: q,
|
|
126
|
+
className: o(P(406), P(400), P(393), P(413), se !== "md" && P(386) + se, fe),
|
|
127
|
+
"data-open": R || void 0,
|
|
128
|
+
"data-invalid": ce || _e || void 0,
|
|
129
|
+
"data-disabled": N || void 0,
|
|
130
|
+
onPointerDown: (e) => {
|
|
131
|
+
let t = P;
|
|
132
|
+
N || e[t(414)] === J[t(379)] || (e[t(411)](), J[t(379)]?.[t(415)](), Q());
|
|
133
|
+
},
|
|
134
|
+
children: [
|
|
135
|
+
w(P(372), {
|
|
136
|
+
ref: J,
|
|
137
|
+
id: de,
|
|
138
|
+
className: P(419),
|
|
139
|
+
value: H ?? (Oe ? M(Oe) : ""),
|
|
140
|
+
placeholder: ae,
|
|
141
|
+
disabled: N,
|
|
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
|
+
"aria-expanded": R,
|
|
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
|
+
onClick: Q,
|
|
151
|
+
onFocus: (e) => e[P(414)][P(355)](),
|
|
152
|
+
onChange: (e) => {
|
|
153
|
+
let t = P, n = e.target.value;
|
|
154
|
+
U(n), W(!1);
|
|
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
|
+
e >= 0 && K(e);
|
|
159
|
+
}
|
|
160
|
+
R || Q();
|
|
161
|
+
},
|
|
162
|
+
onKeyDown: De,
|
|
163
|
+
onBlur: () => {
|
|
164
|
+
!Ce() && (U(null), W(!1));
|
|
165
|
+
}
|
|
166
|
+
}),
|
|
167
|
+
w(P(374), {
|
|
168
|
+
className: P(349),
|
|
169
|
+
"aria-hidden": !0,
|
|
170
|
+
children: w(ee, {})
|
|
171
|
+
}),
|
|
172
|
+
oe && I && !N && H === null && w(P(374), {
|
|
173
|
+
role: P(376),
|
|
174
|
+
tabIndex: -1,
|
|
175
|
+
"aria-label": P(394),
|
|
176
|
+
className: "ds-select-trigger__clear",
|
|
177
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
178
|
+
onClick: () => {
|
|
179
|
+
let e = P;
|
|
180
|
+
L(null), V(null), J[e(379)]?.[e(415)]();
|
|
181
|
+
},
|
|
182
|
+
children: w(te, {})
|
|
183
|
+
}),
|
|
184
|
+
ue && w(P(372), {
|
|
185
|
+
type: P(363),
|
|
186
|
+
name: ue,
|
|
187
|
+
value: I ?? ""
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
});
|
|
191
|
+
return E === "list" ? T(ne, { children: [ke, Ee[P(390)] && w(l, {
|
|
192
|
+
ref: ye,
|
|
193
|
+
closing: Ee[P(395)],
|
|
194
|
+
anchorRef: q,
|
|
195
|
+
maxHeight: pe ?? 280,
|
|
196
|
+
children: w(c, {
|
|
197
|
+
id: F,
|
|
198
|
+
options: Z,
|
|
199
|
+
activeIndex: G,
|
|
200
|
+
isSelected: (e) => e === I,
|
|
201
|
+
onSelect: Te,
|
|
202
|
+
onActiveChange: K,
|
|
203
|
+
"aria-label": me ?? "시간",
|
|
204
|
+
emptyText: P(366)
|
|
205
|
+
})
|
|
206
|
+
})] }) : w(p, {
|
|
207
|
+
open: R,
|
|
208
|
+
onOpenChange: (e) => e ? Q() : $(!0),
|
|
209
|
+
openOn: "manual",
|
|
210
|
+
align: le,
|
|
211
|
+
padding: "sm",
|
|
212
|
+
autoFocus: !1,
|
|
213
|
+
"aria-label": "시간 선택",
|
|
214
|
+
trigger: ke,
|
|
215
|
+
children: w(ie, {
|
|
216
|
+
ref: ve,
|
|
217
|
+
time: B,
|
|
218
|
+
base: he,
|
|
219
|
+
hourCycle: y,
|
|
220
|
+
minuteStep: D,
|
|
221
|
+
blocked: be,
|
|
222
|
+
onChange: (e) => {
|
|
223
|
+
V(e), U(null), W(!1);
|
|
224
|
+
},
|
|
225
|
+
onCommit: (e) => $(!0, e),
|
|
226
|
+
onCancel: () => $(!1),
|
|
227
|
+
onNow: () => V(g(xe(re(D))))
|
|
228
|
+
})
|
|
229
|
+
});
|
|
230
|
+
}
|
|
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
|
+
0,
|
|
242
|
+
1,
|
|
243
|
+
2,
|
|
244
|
+
3,
|
|
245
|
+
4,
|
|
246
|
+
5,
|
|
247
|
+
6,
|
|
248
|
+
7,
|
|
249
|
+
8,
|
|
250
|
+
9,
|
|
251
|
+
10,
|
|
252
|
+
11
|
|
253
|
+
][m(353)]((e) => b === "pm" ? e + 12 : e) : [...Array(24)[m(350)]()])[m(353)]((e) => ({
|
|
254
|
+
key: String(e),
|
|
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
|
+
key: String(e),
|
|
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
|
+
return {
|
|
266
|
+
key: e,
|
|
267
|
+
label: e === "am" ? "오전" : "오후",
|
|
268
|
+
disabled: !Array.from({ length: 12 }, (e, t) => n + t)[t(362)](C),
|
|
269
|
+
pick: () => {
|
|
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
|
+
}
|
|
275
|
+
};
|
|
276
|
+
}), E = [
|
|
277
|
+
...s === 12 ? [{
|
|
278
|
+
label: m(399),
|
|
279
|
+
items: ne,
|
|
280
|
+
selected: b
|
|
281
|
+
}] : [],
|
|
282
|
+
{
|
|
283
|
+
label: "시",
|
|
284
|
+
items: ee,
|
|
285
|
+
selected: String(_)
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
label: "분",
|
|
289
|
+
items: te,
|
|
290
|
+
selected: String(y)
|
|
291
|
+
}
|
|
292
|
+
];
|
|
293
|
+
return T(r, {
|
|
294
|
+
gap: 2,
|
|
295
|
+
children: [w(m(418), {
|
|
296
|
+
ref: t,
|
|
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
|
+
onMoveColumn: (e, n) => {
|
|
307
|
+
let r = m;
|
|
308
|
+
(n[r(427)]?.[r(356)](r(426)))?.[t + e]?.[r(415)]({ preventScroll: !0 });
|
|
309
|
+
}
|
|
310
|
+
}, e[m(373)]))
|
|
311
|
+
}), T(n, {
|
|
312
|
+
justify: "between",
|
|
313
|
+
gap: 2,
|
|
314
|
+
children: [w(a, {
|
|
315
|
+
variant: "ghost",
|
|
316
|
+
size: "sm",
|
|
317
|
+
onClick: p,
|
|
318
|
+
children: "지금"
|
|
319
|
+
}), w(a, {
|
|
320
|
+
variant: "primary",
|
|
321
|
+
size: "sm",
|
|
322
|
+
onClick: () => d(),
|
|
323
|
+
disabled: !i,
|
|
324
|
+
children: "확인"
|
|
325
|
+
})]
|
|
326
|
+
})]
|
|
327
|
+
});
|
|
328
|
+
}
|
|
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
|
+
ref: f,
|
|
339
|
+
role: "listbox",
|
|
340
|
+
tabIndex: 0,
|
|
341
|
+
"aria-label": t,
|
|
342
|
+
"aria-activedescendant": m >= 0 ? d + "-" + m : void 0,
|
|
343
|
+
className: l(360),
|
|
344
|
+
onKeyDown: (e) => {
|
|
345
|
+
let t = l;
|
|
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
|
+
i >= 0 && a(n[i]);
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
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
|
+
r >= 0 && a(n[r]);
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
case "ArrowLeft":
|
|
362
|
+
case "ArrowRight":
|
|
363
|
+
e[t(411)](), c(e[t(354)] === t(425) ? 1 : -1, e[t(368)]);
|
|
364
|
+
break;
|
|
365
|
+
case t(382):
|
|
366
|
+
case " ": {
|
|
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
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
case t(404): e.preventDefault(), s();
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
children: n.map((e, t) => w("div", {
|
|
376
|
+
id: d + "-" + t,
|
|
377
|
+
"data-key": e[l(354)],
|
|
378
|
+
role: l(387),
|
|
379
|
+
"aria-selected": e.key === r,
|
|
380
|
+
"aria-disabled": e.disabled || void 0,
|
|
381
|
+
"data-focus": t === m || void 0,
|
|
382
|
+
className: l(401),
|
|
383
|
+
onClick: () => !e[l(385)] && a(e),
|
|
384
|
+
children: e[l(373)]
|
|
385
|
+
}, e.key))
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
export { D as TimePicker };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = t;
|
|
3
|
+
function t(e, r) {
|
|
4
|
+
e -= 354;
|
|
5
|
+
let i = n(), a = i[e];
|
|
6
|
+
t.MeyaFk === void 0 && (t.zijrkB = 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.qUbQnf = {}, t.MeyaFk = !0);
|
|
12
|
+
let o = i[0];
|
|
13
|
+
t.ZKwvbM !== o && (t.qUbQnf = {}, t.ZKwvbM = o);
|
|
14
|
+
let s = t.qUbQnf[e];
|
|
15
|
+
return s === void 0 ? (a = t.zijrkB(a), t.qUbQnf[e] = a) : a = s, a;
|
|
16
|
+
}
|
|
17
|
+
(function(e, n) {
|
|
18
|
+
let r = t, i = e();
|
|
19
|
+
for (;;) try {
|
|
20
|
+
if (-parseInt(r(358)) / 1 + parseInt(r(363)) / 2 + -parseInt(r(366)) / 3 + -parseInt(r(367)) / 4 * (parseInt(r(357)) / 5) + -parseInt(r(361)) / 6 + -parseInt(r(355)) / 7 * (parseInt(r(369)) / 8) + -parseInt(r(360)) / 9 * (-parseInt(r(359)) / 10) == n) break;
|
|
21
|
+
i.push(i.shift());
|
|
22
|
+
} catch {
|
|
23
|
+
i.push(i.shift());
|
|
24
|
+
}
|
|
25
|
+
})(n, 463007);
|
|
26
|
+
function n() {
|
|
27
|
+
let e = [
|
|
28
|
+
"DgvZDa",
|
|
29
|
+
"mJrmtenhyue",
|
|
30
|
+
"AM9PBG",
|
|
31
|
+
"mda6mda",
|
|
32
|
+
"C3bSAxq",
|
|
33
|
+
"zMXVB3i",
|
|
34
|
+
"nZa1ntu4y3noBKTK",
|
|
35
|
+
"DhjPBq",
|
|
36
|
+
"mJeXntqWzhf2CxDP",
|
|
37
|
+
"mti0mJmWzg13D3L6",
|
|
38
|
+
"mJbyCwrZtg0",
|
|
39
|
+
"nZyXmtmYn1vyBKHiDa",
|
|
40
|
+
"mZG0mZy1nfnqzvzvAW",
|
|
41
|
+
"7iUCmZa",
|
|
42
|
+
"mta2otiXogXmuwvHtq",
|
|
43
|
+
"CMvWBgfJzq",
|
|
44
|
+
"zMLSDgvY",
|
|
45
|
+
"mtu3oty2nuzwyKzlEG",
|
|
46
|
+
"mtzIyw51weO"
|
|
47
|
+
];
|
|
48
|
+
return n = function() {
|
|
49
|
+
return e;
|
|
50
|
+
}, n();
|
|
51
|
+
}
|
|
52
|
+
var r = (e) => String(e).padStart(2, "0"), i = (e) => {
|
|
53
|
+
let [n, r] = e[t(372)](":").map(Number);
|
|
54
|
+
return n * 60 + r;
|
|
55
|
+
}, a = (t) => r(Math[e(354)](t / 60) % 24) + ":" + r(t % 60);
|
|
56
|
+
function o(t, n = 12) {
|
|
57
|
+
let a = e, o = i(t), s = Math[a(354)](o / 60), c = o % 60;
|
|
58
|
+
return n === 24 ? r(s) + ":" + r(c) : (s < 12 ? "오전" : "오후") + " " + (s % 12 == 0 ? 12 : s % 12) + ":" + r(c);
|
|
59
|
+
}
|
|
60
|
+
function s(t) {
|
|
61
|
+
let n = e, r = Math[n(354)](t / 60), i = t % 60;
|
|
62
|
+
return [r && r + "시간", i && i + "분"][n(365)](Boolean)[n(370)](" ") || "0분";
|
|
63
|
+
}
|
|
64
|
+
function c(t) {
|
|
65
|
+
let n = e, i = t[n(356)]().toLowerCase()[n(364)](/\s+/g, "");
|
|
66
|
+
if (!i) return null;
|
|
67
|
+
if (i === "정오") return "12:00";
|
|
68
|
+
if (i === "자정") return n(371);
|
|
69
|
+
let a = null;
|
|
70
|
+
/오후|pm|p\.m\.?/[n(368)](i) ? a = "pm" : /오전|am|a\.m\.?/[n(368)](i) && (a = "am"), i = i[n(364)](/오후|오전|p\.m\.?|a\.m\.?|pm|am/g, "").replace(/시반$/, n(362));
|
|
71
|
+
let o = i.match(/^(\d{1,2})(?:(?:[:.시h])(\d{1,2})?분?|(\d{2}))?$/);
|
|
72
|
+
if (!o) return null;
|
|
73
|
+
let s = Number(o[1]), c = Number(o[2] ?? o[3] ?? 0);
|
|
74
|
+
if (c > 59) return null;
|
|
75
|
+
if (a) {
|
|
76
|
+
if (s < 1 || s > 12) return null;
|
|
77
|
+
a === "am" && s === 12 && (s = 0), a === "pm" && s < 12 && (s += 12);
|
|
78
|
+
} else if (s > 23) return null;
|
|
79
|
+
return r(s) + ":" + r(c);
|
|
80
|
+
}
|
|
81
|
+
export { s as formatDuration, o as formatTime, a as minutesToTime, c as parseTimeInput, i as timeToMinutes };
|