@iamfiro/design 0.1.0 → 0.3.0
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 +65 -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 +87 -0
- package/lib/components/Calendar/Calendar2.js +309 -0
- package/lib/components/Calendar/DatePicker2.js +229 -0
- package/lib/components/Calendar/date.js +121 -0
- package/lib/components/Card/Card2.js +104 -0
- package/lib/components/CardFrame/CardFrame2.js +72 -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 +53 -0
- package/lib/components/ChatComposer/ChatComposer2.js +153 -0
- package/lib/components/CodeBlock/CodeBlock2.js +93 -0
- package/lib/components/CodeBlock/highlight.js +114 -0
- package/lib/components/ColorPicker/ColorPicker2.js +610 -0
- package/lib/components/ColorPicker/color.js +180 -0
- package/lib/components/ColorPicker/presets.js +75 -0
- package/lib/components/Combobox/Combobox2.js +229 -0
- package/lib/components/CommandMenu/CommandMenu.js +267 -0
- package/lib/components/Comment/Comment2.js +134 -0
- package/lib/components/ContextMenu/ContextMenu2.js +168 -0
- package/lib/components/DataGrid/DataGrid2.js +1996 -0
- package/lib/components/DataGrid/GridPopover.js +154 -0
- package/lib/components/DataGrid/anchor.js +50 -0
- package/lib/components/DataGrid/model.js +558 -0
- package/lib/components/DataGrid/panels.js +703 -0
- package/lib/components/DataGrid/typeMeta.js +76 -0
- package/lib/components/DataGrid/types.js +54 -0
- package/lib/components/DescriptionList/DescriptionList2.js +180 -0
- package/lib/components/Dialog/AlertDialog.js +118 -0
- package/lib/components/Dialog/Dialog2.js +109 -0
- package/lib/components/Dialog/modal.js +92 -0
- package/lib/components/Drawer/Drawer2.js +244 -0
- package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
- package/lib/components/DropdownMenu/menuCore.js +63 -0
- package/lib/components/Dropzone/Dropzone2.js +144 -0
- package/lib/components/EmptyState/EmptyState2.js +72 -0
- package/lib/components/FileChip/FileChip2.js +118 -0
- package/lib/components/FileUpload/FileUpload.js +258 -0
- package/lib/components/FilterChips/FilterChips2.js +101 -0
- package/lib/components/FunnelChart/FunnelChart2.js +283 -0
- package/lib/components/FunnelChart/funnel.js +69 -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 +109 -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 +133 -0
- package/lib/components/Listbox/Listbox2.js +163 -0
- package/lib/components/Marker/Marker2.js +82 -0
- package/lib/components/Menubar/Menubar2.js +223 -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 +129 -0
- package/lib/components/OtpInput/OtpInput2.js +122 -0
- package/lib/components/Pagination/Pagination2.js +210 -0
- package/lib/components/Pagination/paginationRange.js +53 -0
- package/lib/components/PhoneInput/PhoneInput.js +175 -0
- package/lib/components/PieChart/PieChart2.js +246 -0
- package/lib/components/PieChart/arc.js +66 -0
- package/lib/components/PieChart/useArcTween.js +94 -0
- package/lib/components/Popover/Popover2.js +112 -0
- package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
- package/lib/components/Rating/Rating2.js +186 -0
- package/lib/components/Resizable/Resizable2.js +236 -0
- package/lib/components/Resizable/layout.js +115 -0
- package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
- package/lib/components/ScatterChart/ScatterChart2.js +356 -0
- package/lib/components/ScatterChart/scatter.js +83 -0
- package/lib/components/ScrollArea/ScrollArea2.js +218 -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 +85 -0
- package/lib/components/SparkChart/SparkChart2.js +217 -0
- package/lib/components/SparkChart/spark.js +76 -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 +360 -0
- package/lib/components/TimePicker/TimePicker2.js +388 -0
- package/lib/components/TimePicker/time.js +83 -0
- package/lib/components/Timeline/Timeline2.js +369 -0
- package/lib/components/Timeline/scale.js +83 -0
- package/lib/components/Toast/Toaster.js +212 -0
- package/lib/components/Toast/store.js +129 -0
- package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
- package/lib/components/Toolbar/Toolbar2.js +281 -0
- package/lib/components/Tracker/Tracker2.js +172 -0
- package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
- package/lib/components/TreeView/TreeView2.js +284 -0
- package/lib/hooks/timing.js +55 -0
- package/lib/hooks/useControllableState.js +49 -0
- package/lib/hooks/useCountdown.js +80 -0
- package/lib/hooks/useDigitInput.js +105 -0
- package/lib/hooks/useDismiss.js +71 -0
- package/lib/hooks/useElapsed.js +83 -0
- package/lib/hooks/useFloating.js +70 -0
- package/lib/hooks/useFocusTrap.js +61 -0
- package/lib/hooks/usePresence.js +60 -0
- package/lib/hooks/usePressToOpen.js +69 -0
- package/lib/hooks/useScrollLock.js +70 -0
- package/lib/hooks/useSelection.js +68 -0
- package/lib/index.js +175 -17911
- package/lib/primitives/AspectRatio2.js +80 -0
- package/lib/primitives/BrandIcon.js +245 -0
- package/lib/primitives/ColorDot2.js +70 -0
- package/lib/primitives/CopyButton2.js +85 -0
- package/lib/primitives/CountBadge2.js +78 -0
- package/lib/primitives/Countdown2.js +65 -0
- package/lib/primitives/Delta2.js +67 -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 +68 -0
- package/lib/primitives/Kbd2.js +88 -0
- package/lib/primitives/Layout2.js +118 -0
- package/lib/primitives/Link2.js +53 -0
- package/lib/primitives/MaskedText2.js +120 -0
- package/lib/primitives/Progress2.js +137 -0
- package/lib/primitives/RelativeTime.js +84 -0
- package/lib/primitives/SearchInput2.js +84 -0
- package/lib/primitives/SelectorButton2.js +97 -0
- package/lib/primitives/Spinner2.js +98 -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 +51 -0
- package/lib/primitives/formatElapsed.js +66 -0
- package/lib/primitives/formatRelativeTime.js +64 -0
- package/lib/primitives/hotkey.js +94 -0
- package/lib/primitives/index.js +352 -0
- package/lib/primitives/maskValue.js +65 -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(210)) / 1 + -parseInt(n(226)) / 2 + parseInt(n(218)) / 3 + -parseInt(n(233)) / 4 + -parseInt(n(177)) / 5 + -parseInt(n(231)) / 6 * (parseInt(n(181)) / 7) + parseInt(n(227)) / 8 == t) break;
|
|
7
|
+
r.push(r.shift());
|
|
8
|
+
} catch {
|
|
9
|
+
r.push(r.shift());
|
|
10
|
+
}
|
|
11
|
+
})(y, 896109);
|
|
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
|
+
function f(e, t) {
|
|
19
|
+
e -= 161;
|
|
20
|
+
let n = y(), r = n[e];
|
|
21
|
+
f.gidOCo === void 0 && (f.ijmTZQ = function(e) {
|
|
22
|
+
let t = "", n = "";
|
|
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);
|
|
24
|
+
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
25
|
+
return decodeURIComponent(n);
|
|
26
|
+
}, f.DpxqmF = {}, f.gidOCo = !0);
|
|
27
|
+
let i = n[0];
|
|
28
|
+
f.GLCqHh !== i && (f.DpxqmF = {}, f.GLCqHh = i);
|
|
29
|
+
let a = f.DpxqmF[e];
|
|
30
|
+
return a === void 0 ? (r = f.ijmTZQ(r), f.DpxqmF[e] = r) : r = a, r;
|
|
31
|
+
}
|
|
32
|
+
/* empty css */
|
|
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
|
+
function y() {
|
|
38
|
+
let e = /* @__PURE__ */ "w3jVBgu9iMXPC3rIB3GIxq.ChjPBwfYEq.w2rHDgeTA2v5psi.y29TyM9IB3G.qxjYB3DeB3DU.C29YDa.BMf0AxzLrxzLBNq.A2v5q29Kzq.Aw5WDxq.BgLZDa.zhmTC2vSzwn0lxrYAwDNzxjFx2LJB24GzhmTzgf0zwzPzwXKx19Py29U.zhmTzgf0zwzPzwXKx19PBNb1Da.zhmTDgLTzwnVBf9FAxrLBq.A2v5.y2XVC2LUzW.qxjYB3DvCa.rw50zxi.C3rHCNq.7iUC6RceioYEHEUGPsdRMjdRIPqG7isG7yoD.C3bHBG.AxrLBxm.zhmTDgLTzwnVBa.mtK3mtG1nwLSvNLhuW.lwXPC3q.zNjVBq.zhmTDgLTzwzPzwXK.ntzWEe1Xr24.zMLUza.C21VB3rO.Aw5JBhvKzxm.C2vSzwn0zwq.qxjYB3Dmzwz0.A2v5CW.Bw91BNrLza.zgLHBg9N.y3vYCMvUDa.zgL2.zhmTC2vSzwn0lxrYAwDNzxjFx2nSzwfY.zgLZywjSzwq.qxjYB3DsAwDODa.zhmTC2vSzwn0lxrYAwDNzxi.ChvZAa.CxvLCNLtzwXLy3rVCG.zMLUzeLUzgv4.AgLKzgvU.7iUC6RceioYNGoYASoQ4Sa.DMfSDwu.ChjLDMvUDerLzMf1Bhq.B2zMC2v0vg9W.zMXVB3i.B2zM.zhmTy29UDhjVBa.yNv0Dg9U.BgLZDgjVEa.rw5K.otu3nta3zeP2Cujr.DgfYz2v0.y2vPBa.rxnJyxbL.CgLJAW.DhjPBq.zhmTDgLTzwnVBhm.z2v0sg91CNm.mtaWndi5nxPVze1twG.B3b0Aw9U.sg9Tzq.6RoG66w8ioYiMcdSNOJRIPqG7iUC6Rce7j20ioYxHUYwToYALa.BgvUz3rO.C3rVCfbYB3bHz2f0Aw9U.BgfIzwW.yMv0D2vLBG.mta5mJC2D1DxCLbt.mtGYnde5ndrWD1LQyMC.AxndB21WB3nPBMC.CxvLCNLtzwXLy3rVCKfSBa.BwfW.nZmWmdaYtxD2rwDx.zM9JDxm.ntaXnJi0nhf6D2jZsa.C29Tzq".split(".");
|
|
39
|
+
return y = function() {
|
|
40
|
+
return e;
|
|
41
|
+
}, y();
|
|
42
|
+
}
|
|
43
|
+
import { useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
44
|
+
import { Clock as ee, X as te } from "lucide-react";
|
|
45
|
+
import { Fragment as ne, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
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);
|
|
49
|
+
};
|
|
50
|
+
function O({ value: n, defaultValue: r = null, onValueChange: a, hourCycle: f = 12, mode: y = "columns", minuteStep: b = y === e(164) ? 30 : 5, min: O, max: k, isTimeDisabled: A, durationFrom: j, formatValue: M = (e) => h(e, f), placeholder: ie = e(173), clearable: ae = !0, size: oe = "md", disabled: N, invalid: se, align: ce = e(172), name: le, id: ue, className: de, maxHeight: fe, "aria-label": pe }) {
|
|
51
|
+
let P = e, F = x() + P(178), [I, L] = i(n, r, a), [R, z] = w(!1), [B, V] = w(null), [me, he] = w(0), [H, U] = w(null), [ge, W] = w(!1), [G, K] = w(-1), q = C(null), J = C(null), _e = C(null), ve = C(null), ye = O ? v(O) : 0, Y = k ? v(k) : 1439, X = (e) => e < ye || e > Y || !!A?.(g(e)), be = (e) => {
|
|
52
|
+
for (let t = 0; t < 1440; t += b) {
|
|
53
|
+
let n = (e + t) % 1440;
|
|
54
|
+
if (!X(n)) return n;
|
|
55
|
+
}
|
|
56
|
+
return e;
|
|
57
|
+
}, Z = S(() => {
|
|
58
|
+
let e = P;
|
|
59
|
+
if (y !== "list") return [];
|
|
60
|
+
let t = [], n = j ? v(j) : null;
|
|
61
|
+
for (let r = Math[e(212)](ye / b) * b; r <= Y; r += b) {
|
|
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
|
+
y,
|
|
73
|
+
ye,
|
|
74
|
+
Y,
|
|
75
|
+
b,
|
|
76
|
+
j,
|
|
77
|
+
A,
|
|
78
|
+
M
|
|
79
|
+
]), xe = (e) => {
|
|
80
|
+
let t = _(e);
|
|
81
|
+
return t && !X(v(t)) ? t : null;
|
|
82
|
+
}, Q = () => {
|
|
83
|
+
let e = P;
|
|
84
|
+
if (N || R) return;
|
|
85
|
+
let t = be(D(b));
|
|
86
|
+
if (he(t), V(I), y === e(164)) {
|
|
87
|
+
let n = I ?? g(t), r = Z[e(198)]((t) => t[e(201)] >= n && !t[e(193)]);
|
|
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
|
+
}, Se = () => {
|
|
94
|
+
let e = P;
|
|
95
|
+
if (H === null) return !0;
|
|
96
|
+
if (!H[e(215)]()) L(null);
|
|
97
|
+
else {
|
|
98
|
+
let e = xe(H);
|
|
99
|
+
if (!e) return W(!0), !1;
|
|
100
|
+
L(e), V(e);
|
|
101
|
+
}
|
|
102
|
+
return U(null), W(!1), !0;
|
|
103
|
+
}, Ce = () => requestAnimationFrame(() => _e[P(190)]?.[P(197)](P(235))?.focus({ preventScroll: !0 })), we = (e) => {
|
|
104
|
+
e[P(193)] || (L(e.value), U(null), W(!1), z(!1));
|
|
105
|
+
};
|
|
106
|
+
s(R && y === P(164), [q, ve], () => z(!1));
|
|
107
|
+
let Te = t(R && y === P(164)), Ee = (e) => {
|
|
108
|
+
let t = P;
|
|
109
|
+
if (!(e[t(161)][t(228)] || e[t(162)] === 229)) {
|
|
110
|
+
if (y === t(164) && (e.key === "ArrowDown" || e[t(168)] === t(170))) e[t(202)](), R ? K(u(Z, G, e[t(168)] === t(239) ? 1 : -1)) : Q();
|
|
111
|
+
else switch (e.key) {
|
|
112
|
+
case t(171):
|
|
113
|
+
e[t(202)](), H === null ? y === "list" && R && Z[G] ? we(Z[G]) : R && $(!0) : Se() && z(!1);
|
|
114
|
+
break;
|
|
115
|
+
case t(239):
|
|
116
|
+
e[t(202)](), Q(), Ce();
|
|
117
|
+
break;
|
|
118
|
+
case "Escape":
|
|
119
|
+
R ? (e.preventDefault(), $(!1)) : H !== null && (U(null), W(!1));
|
|
120
|
+
break;
|
|
121
|
+
case "Tab": R && y === "list" && z(!1);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}, De = R && y === "columns" ? B ?? I : I, Oe = E(P(191), {
|
|
125
|
+
ref: q,
|
|
126
|
+
className: o(P(206), P(195), "ds-datefield", P(180), oe !== "md" && "ds-select-trigger--" + oe, de),
|
|
127
|
+
"data-open": R || void 0,
|
|
128
|
+
"data-invalid": se || ge || void 0,
|
|
129
|
+
"data-disabled": N || void 0,
|
|
130
|
+
onPointerDown: (e) => {
|
|
131
|
+
let t = P;
|
|
132
|
+
N || e[t(211)] === J[t(190)] || (e[t(202)](), J[t(190)]?.[t(232)](), Q());
|
|
133
|
+
},
|
|
134
|
+
children: [
|
|
135
|
+
T("input", {
|
|
136
|
+
ref: J,
|
|
137
|
+
id: ue,
|
|
138
|
+
className: P(166),
|
|
139
|
+
value: H ?? (De ? M(De) : ""),
|
|
140
|
+
placeholder: ie,
|
|
141
|
+
disabled: N,
|
|
142
|
+
role: y === P(164) ? P(238) : void 0,
|
|
143
|
+
"aria-label": pe,
|
|
144
|
+
"aria-invalid": se || ge || void 0,
|
|
145
|
+
"aria-haspopup": y === P(164) ? P(208) : P(189),
|
|
146
|
+
"aria-expanded": R,
|
|
147
|
+
"aria-controls": y === P(164) && R ? F : void 0,
|
|
148
|
+
"aria-activedescendant": y === "list" && R && G >= 0 ? d(F, G) : void 0,
|
|
149
|
+
autoComplete: P(205),
|
|
150
|
+
onClick: Q,
|
|
151
|
+
onFocus: (e) => e[P(211)].select(),
|
|
152
|
+
onChange: (e) => {
|
|
153
|
+
let t = P, n = e[t(211)][t(201)];
|
|
154
|
+
U(n), W(!1);
|
|
155
|
+
let r = xe(n);
|
|
156
|
+
if (r && (V(r), y === "list")) {
|
|
157
|
+
let e = Z.findIndex((e) => e[t(201)] >= r && !e.disabled);
|
|
158
|
+
e >= 0 && K(e);
|
|
159
|
+
}
|
|
160
|
+
R || Q();
|
|
161
|
+
},
|
|
162
|
+
onKeyDown: Ee,
|
|
163
|
+
onBlur: () => {
|
|
164
|
+
!Se() && (U(null), W(!1));
|
|
165
|
+
}
|
|
166
|
+
}),
|
|
167
|
+
T(P(174), {
|
|
168
|
+
className: P(165),
|
|
169
|
+
"aria-hidden": !0,
|
|
170
|
+
children: T(ee, {})
|
|
171
|
+
}),
|
|
172
|
+
ae && I && !N && H === null && T(P(174), {
|
|
173
|
+
role: P(207),
|
|
174
|
+
tabIndex: -1,
|
|
175
|
+
"aria-label": P(200),
|
|
176
|
+
className: P(192),
|
|
177
|
+
onPointerDown: (e) => e[P(223)](),
|
|
178
|
+
onClick: () => {
|
|
179
|
+
let e = P;
|
|
180
|
+
L(null), V(null), J[e(190)]?.[e(232)]();
|
|
181
|
+
},
|
|
182
|
+
children: T(te, {})
|
|
183
|
+
}),
|
|
184
|
+
le && T(P(163), {
|
|
185
|
+
type: P(199),
|
|
186
|
+
name: le,
|
|
187
|
+
value: I ?? ""
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
});
|
|
191
|
+
return y === P(164) ? E(ne, { children: [Oe, Te[P(188)] && T(l, {
|
|
192
|
+
ref: ve,
|
|
193
|
+
closing: Te[P(169)],
|
|
194
|
+
anchorRef: q,
|
|
195
|
+
maxHeight: fe ?? 280,
|
|
196
|
+
children: T(c, {
|
|
197
|
+
id: F,
|
|
198
|
+
options: Z,
|
|
199
|
+
activeIndex: G,
|
|
200
|
+
isSelected: (e) => e === I,
|
|
201
|
+
onSelect: we,
|
|
202
|
+
onActiveChange: K,
|
|
203
|
+
"aria-label": pe ?? "시간",
|
|
204
|
+
emptyText: P(221)
|
|
205
|
+
})
|
|
206
|
+
})] }) : T(p, {
|
|
207
|
+
open: R,
|
|
208
|
+
onOpenChange: (e) => e ? Q() : $(!0),
|
|
209
|
+
openOn: "manual",
|
|
210
|
+
align: ce,
|
|
211
|
+
padding: "sm",
|
|
212
|
+
autoFocus: !1,
|
|
213
|
+
"aria-label": "시간 선택",
|
|
214
|
+
trigger: Oe,
|
|
215
|
+
children: T(re, {
|
|
216
|
+
ref: _e,
|
|
217
|
+
time: B,
|
|
218
|
+
base: me,
|
|
219
|
+
hourCycle: f,
|
|
220
|
+
minuteStep: b,
|
|
221
|
+
blocked: X,
|
|
222
|
+
onChange: (e) => {
|
|
223
|
+
V(e), U(null), W(!1);
|
|
224
|
+
},
|
|
225
|
+
onCommit: (e) => $(!0, e),
|
|
226
|
+
onCancel: () => $(!1),
|
|
227
|
+
onNow: () => V(g(be(D(b))))
|
|
228
|
+
})
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
var k = (e) => String(e).padStart(2, "0");
|
|
232
|
+
function re({ ref: t, time: i, base: o, hourCycle: s, minuteStep: c, blocked: l, onChange: u, onCommit: d, onCancel: p, onNow: m }) {
|
|
233
|
+
let h = e, _ = i ? v(i) : o, y = Math[h(204)](_ / 60), b = _ % 60, x = y < 12 ? "am" : "pm", S = Array.from({ length: Math[h(212)](60 / c) }, (e, t) => t * c);
|
|
234
|
+
!S[h(184)](b) && (S[h(196)](b), S[h(240)]((e, t) => e - t));
|
|
235
|
+
let C = (e) => {
|
|
236
|
+
let t = h;
|
|
237
|
+
if (!l(e * 60 + b)) return e * 60 + b;
|
|
238
|
+
let n = S[t(182)]((t) => !l(e * 60 + t));
|
|
239
|
+
return e * 60 + (n ?? b);
|
|
240
|
+
}, w = (e) => S[h(234)]((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
|
+
][h(230)]((e) => x === "pm" ? e + 12 : e) : [...Array(24)[h(187)]()])[h(230)]((e) => ({
|
|
254
|
+
key: String(e),
|
|
255
|
+
label: s === 12 ? String(e % 12 == 0 ? 12 : e % 12) : k(e),
|
|
256
|
+
disabled: !w(e),
|
|
257
|
+
pick: () => C(e)
|
|
258
|
+
})), te = S[h(230)]((e) => ({
|
|
259
|
+
key: String(e),
|
|
260
|
+
label: k(e),
|
|
261
|
+
disabled: l(y * 60 + e),
|
|
262
|
+
pick: () => y * 60 + e
|
|
263
|
+
})), ne = ["am", "pm"][h(230)]((e) => {
|
|
264
|
+
let t = e === "am" ? 0 : 12, n = y % 12 + t;
|
|
265
|
+
return {
|
|
266
|
+
key: e,
|
|
267
|
+
label: e === "am" ? "오전" : "오후",
|
|
268
|
+
disabled: !Array.from({ length: 12 }, (e, n) => t + n).some(w),
|
|
269
|
+
pick: () => {
|
|
270
|
+
let e = f;
|
|
271
|
+
if (w(n)) return C(n);
|
|
272
|
+
let r = Array[e(179)]({ length: 12 }, (e, n) => t + n).find(w) ?? n;
|
|
273
|
+
return C(r);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
}), D = [
|
|
277
|
+
...s === 12 ? [{
|
|
278
|
+
label: "오전/오후",
|
|
279
|
+
items: ne,
|
|
280
|
+
selected: x
|
|
281
|
+
}] : [],
|
|
282
|
+
{
|
|
283
|
+
label: "시",
|
|
284
|
+
items: ee,
|
|
285
|
+
selected: String(y)
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
label: "분",
|
|
289
|
+
items: te,
|
|
290
|
+
selected: String(b)
|
|
291
|
+
}
|
|
292
|
+
];
|
|
293
|
+
return E(r, {
|
|
294
|
+
gap: 2,
|
|
295
|
+
children: [T(h(191), {
|
|
296
|
+
ref: t,
|
|
297
|
+
className: h(216),
|
|
298
|
+
children: D.map((e, t) => T(A, {
|
|
299
|
+
label: e.label,
|
|
300
|
+
items: e[h(175)],
|
|
301
|
+
selectedKey: i ? e[h(185)] : null,
|
|
302
|
+
focusKey: e.selected,
|
|
303
|
+
onPick: (e) => u(g(e[h(214)]())),
|
|
304
|
+
onCommit: (e) => d(e ? g(e[h(214)]()) : void 0),
|
|
305
|
+
onCancel: p,
|
|
306
|
+
onMoveColumn: (e, n) => {
|
|
307
|
+
let r = h;
|
|
308
|
+
(n.parentElement?.[r(229)](r(235)))?.[t + e]?.focus({ preventScroll: !0 });
|
|
309
|
+
}
|
|
310
|
+
}, e[h(224)]))
|
|
311
|
+
}), E(n, {
|
|
312
|
+
justify: h(225),
|
|
313
|
+
gap: 2,
|
|
314
|
+
children: [T(a, {
|
|
315
|
+
variant: "ghost",
|
|
316
|
+
size: "sm",
|
|
317
|
+
onClick: m,
|
|
318
|
+
children: "지금"
|
|
319
|
+
}), T(a, {
|
|
320
|
+
variant: h(236),
|
|
321
|
+
size: "sm",
|
|
322
|
+
onClick: () => d(),
|
|
323
|
+
disabled: !i,
|
|
324
|
+
children: "확인"
|
|
325
|
+
})]
|
|
326
|
+
})]
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
function A({ label: t, items: n, selectedKey: r, focusKey: i, onPick: a, onCommit: o, onCancel: s, onMoveColumn: c }) {
|
|
330
|
+
let l = e, d = x(), f = C(null), p = C(!1), m = n[l(198)]((e) => e.key === i);
|
|
331
|
+
return b(() => {
|
|
332
|
+
let e = l, t = f[e(190)], n = t?.querySelector(e(237) + i + "\"]");
|
|
333
|
+
t && n && (t.scrollTo({
|
|
334
|
+
top: n[e(203)] - 4,
|
|
335
|
+
behavior: p[e(190)] ? e(183) : "auto"
|
|
336
|
+
}), p[e(190)] = !0);
|
|
337
|
+
}, [i]), T("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(176),
|
|
344
|
+
onKeyDown: (e) => {
|
|
345
|
+
let t = l;
|
|
346
|
+
switch (e[t(168)]) {
|
|
347
|
+
case t(239):
|
|
348
|
+
case t(170): {
|
|
349
|
+
e.preventDefault();
|
|
350
|
+
let i = r === null && m >= 0 && !n[m].disabled ? m : u(n, m, e[t(168)] === "ArrowDown" ? 1 : -1);
|
|
351
|
+
i >= 0 && a(n[i]);
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
case t(220):
|
|
355
|
+
case t(209): {
|
|
356
|
+
e[t(202)]();
|
|
357
|
+
let r = e[t(168)] === t(220) ? u(n, -1, 1) : u(n, n[t(222)], -1);
|
|
358
|
+
r >= 0 && a(n[r]);
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
case t(186):
|
|
362
|
+
case t(194):
|
|
363
|
+
e.preventDefault(), c(e.key === t(194) ? 1 : -1, e.currentTarget);
|
|
364
|
+
break;
|
|
365
|
+
case t(171):
|
|
366
|
+
case " ": {
|
|
367
|
+
e[t(202)]();
|
|
368
|
+
let i = r === null && m >= 0 && !n[m][t(193)] ? n[m] : void 0;
|
|
369
|
+
i && a(i), e[t(168)] === t(171) && o(i);
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
case t(213): e[t(202)](), s();
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
children: n.map((e, t) => T(l(191), {
|
|
376
|
+
id: d + "-" + t,
|
|
377
|
+
"data-key": e[l(168)],
|
|
378
|
+
role: l(219),
|
|
379
|
+
"aria-selected": e[l(168)] === r,
|
|
380
|
+
"aria-disabled": e.disabled || void 0,
|
|
381
|
+
"data-focus": t === m || void 0,
|
|
382
|
+
className: l(167),
|
|
383
|
+
onClick: () => !e.disabled && a(e),
|
|
384
|
+
children: e.label
|
|
385
|
+
}, e[l(168)]))
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
export { O as TimePicker };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const e = c;
|
|
3
|
+
(function(e, t) {
|
|
4
|
+
let n = c, r = e();
|
|
5
|
+
for (;;) try {
|
|
6
|
+
if (parseInt(n(229)) / 1 + parseInt(n(232)) / 2 * (parseInt(n(243)) / 3) + parseInt(n(226)) / 4 * (-parseInt(n(239)) / 5) + parseInt(n(240)) / 6 + -parseInt(n(231)) / 7 + -parseInt(n(237)) / 8 * (parseInt(n(225)) / 9) + parseInt(n(233)) / 10 == t) break;
|
|
7
|
+
r.push(r.shift());
|
|
8
|
+
} catch {
|
|
9
|
+
r.push(r.shift());
|
|
10
|
+
}
|
|
11
|
+
})(o, 613434);
|
|
12
|
+
var t = (t) => String(t)[e(238)](2, "0"), n = (t) => {
|
|
13
|
+
let n = e, [r, i] = t[n(235)](":")[n(224)](Number);
|
|
14
|
+
return r * 60 + i;
|
|
15
|
+
}, r = (n) => t(Math[e(228)](n / 60) % 24) + ":" + t(n % 60);
|
|
16
|
+
function i(r, i = 12) {
|
|
17
|
+
let a = e, o = n(r), s = Math[a(228)](o / 60), c = o % 60;
|
|
18
|
+
return i === 24 ? t(s) + ":" + t(c) : (s < 12 ? "오전" : "오후") + " " + (s % 12 == 0 ? 12 : s % 12) + ":" + t(c);
|
|
19
|
+
}
|
|
20
|
+
function a(t) {
|
|
21
|
+
let n = e, r = Math[n(228)](t / 60), i = t % 60;
|
|
22
|
+
return [r && r + "시간", i && i + "분"][n(241)](Boolean)[n(227)](" ") || "0분";
|
|
23
|
+
}
|
|
24
|
+
function o() {
|
|
25
|
+
let e = [
|
|
26
|
+
"mJC1ndi0ofHSDhvhBG",
|
|
27
|
+
"CgfKu3rHCNq",
|
|
28
|
+
"mtaZotbmD1ntufi",
|
|
29
|
+
"ndGYndm5mfbmzNfnvG",
|
|
30
|
+
"zMLSDgvY",
|
|
31
|
+
"mti6mda",
|
|
32
|
+
"ovHNCMHiwa",
|
|
33
|
+
"Bwf0y2G",
|
|
34
|
+
"BwfW",
|
|
35
|
+
"mJDRzxvQA2u",
|
|
36
|
+
"mtG2oeLJweXntq",
|
|
37
|
+
"AM9PBG",
|
|
38
|
+
"zMXVB3i",
|
|
39
|
+
"odGYntGYCLb4qKrr",
|
|
40
|
+
"CMvWBgfJzq",
|
|
41
|
+
"ndaYodqXnKzsBNvcCG",
|
|
42
|
+
"ndGZntC0txffEfzZ",
|
|
43
|
+
"nZGWmtGZmfrdA2Hfza",
|
|
44
|
+
"mda6mda",
|
|
45
|
+
"C3bSAxq",
|
|
46
|
+
"DhjPBq"
|
|
47
|
+
];
|
|
48
|
+
return o = function() {
|
|
49
|
+
return e;
|
|
50
|
+
}, o();
|
|
51
|
+
}
|
|
52
|
+
function s(n) {
|
|
53
|
+
let r = e, i = n[r(236)]().toLowerCase()[r(230)](/\s+/g, "");
|
|
54
|
+
if (!i) return null;
|
|
55
|
+
if (i === "정오") return r(242);
|
|
56
|
+
if (i === "자정") return r(234);
|
|
57
|
+
let a = null;
|
|
58
|
+
/오후|pm|p\.m\.?/.test(i) ? a = "pm" : /오전|am|a\.m\.?/.test(i) && (a = "am"), i = i[r(230)](/오후|오전|p\.m\.?|a\.m\.?|pm|am/g, "")[r(230)](/시반$/, "시30");
|
|
59
|
+
let o = i[r(223)](/^(\d{1,2})(?:(?:[:.시h])(\d{1,2})?분?|(\d{2}))?$/);
|
|
60
|
+
if (!o) return null;
|
|
61
|
+
let s = Number(o[1]), c = Number(o[2] ?? o[3] ?? 0);
|
|
62
|
+
if (c > 59) return null;
|
|
63
|
+
if (a) {
|
|
64
|
+
if (s < 1 || s > 12) return null;
|
|
65
|
+
a === "am" && s === 12 && (s = 0), a === "pm" && s < 12 && (s += 12);
|
|
66
|
+
} else if (s > 23) return null;
|
|
67
|
+
return t(s) + ":" + t(c);
|
|
68
|
+
}
|
|
69
|
+
function c(e, t) {
|
|
70
|
+
e -= 223;
|
|
71
|
+
let n = o(), r = n[e];
|
|
72
|
+
c.RsbMpr === void 0 && (c.WgSAPO = function(e) {
|
|
73
|
+
let t = "", n = "";
|
|
74
|
+
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);
|
|
75
|
+
for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
|
|
76
|
+
return decodeURIComponent(n);
|
|
77
|
+
}, c.OaHvvF = {}, c.RsbMpr = !0);
|
|
78
|
+
let i = n[0];
|
|
79
|
+
c.CHLJvu !== i && (c.OaHvvF = {}, c.CHLJvu = i);
|
|
80
|
+
let a = c.OaHvvF[e];
|
|
81
|
+
return a === void 0 ? (r = c.WgSAPO(r), c.OaHvvF[e] = r) : r = a, r;
|
|
82
|
+
}
|
|
83
|
+
export { a as formatDuration, i as formatTime, r as minutesToTime, s as parseTimeInput, n as timeToMinutes };
|