laif-ds 0.2.69 → 0.2.71
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/dist/agent-docs/components/AppForm.md +4 -1
- package/dist/agent-docs/components/AppTimePicker.md +304 -0
- package/dist/agent-docs/components/DatePicker.md +178 -43
- package/dist/agent-docs/components-list.md +2 -1
- package/dist/components/ui/app-kanban.js +155 -112
- package/dist/components/ui/app-time-picker.js +244 -0
- package/dist/components/ui/date-picker.js +221 -125
- package/dist/components/ui/kanban.js +414 -285
- package/dist/components/ui/textarea.js +21 -20
- package/dist/index.d.ts +89 -0
- package/dist/index.js +41 -39
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,151 +1,194 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { KanbanBoardProvider as
|
|
5
|
-
import { stringToHexColor as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { jsx as o, jsxs as l, Fragment as H } from "react/jsx-runtime";
|
|
3
|
+
import { useState as I, useMemo as P } from "react";
|
|
4
|
+
import { KanbanBoardProvider as A, KanbanBoard as F, KanbanBoardColumn as J, KanbanBoardColumnHeader as R, KanbanBoardColumnList as W, KanbanBoardColumnListItem as q, KanbanBoardCard as E, KanbanBoardCardTitle as G, KanbanBoardCardDescription as Q } from "./kanban.js";
|
|
5
|
+
import { stringToHexColor as U, cn as B, hexToRgba as K } from "../../lib/utils.js";
|
|
6
|
+
import { Button as V } from "./button.js";
|
|
7
|
+
import { Icon as X } from "./icon.js";
|
|
8
|
+
import Y from "../../node_modules/lucide-react/dist/esm/icons/lock.js";
|
|
9
|
+
import Z from "../../node_modules/lucide-react/dist/esm/icons/plus.js";
|
|
10
|
+
function ne({
|
|
11
|
+
columns: p,
|
|
12
|
+
initialTasks: w,
|
|
12
13
|
onTaskMove: m,
|
|
13
14
|
onTaskEdit: x,
|
|
14
|
-
onTaskCreate:
|
|
15
|
-
taskActions:
|
|
16
|
-
renderTaskContent:
|
|
17
|
-
className:
|
|
18
|
-
allowTaskCreate:
|
|
15
|
+
onTaskCreate: h,
|
|
16
|
+
taskActions: D,
|
|
17
|
+
renderTaskContent: g,
|
|
18
|
+
className: j,
|
|
19
|
+
allowTaskCreate: z = !0
|
|
19
20
|
}) {
|
|
20
|
-
const [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
const [N, C] = I(w), b = P(
|
|
22
|
+
() => new Set(p.filter((e) => e.disabled).map((e) => e.id)),
|
|
23
|
+
[p]
|
|
24
|
+
), y = (e) => {
|
|
25
|
+
const i = {};
|
|
26
|
+
for (const r of Object.keys(e))
|
|
27
|
+
i[r] = [...e[r]];
|
|
28
|
+
return i;
|
|
29
|
+
}, O = (e, i) => {
|
|
30
|
+
C((r) => {
|
|
31
|
+
const d = y(r);
|
|
32
|
+
let a, n;
|
|
33
|
+
for (const s of Object.keys(d)) {
|
|
34
|
+
const c = d[s].findIndex((f) => f.id === e);
|
|
31
35
|
if (c !== -1) {
|
|
32
|
-
n = s, [
|
|
36
|
+
n = s, [a] = d[s].splice(c, 1);
|
|
33
37
|
break;
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
|
-
return !
|
|
40
|
+
return !a || n === i || n && b.has(n) || b.has(i) ? r : (d[i] || (d[i] = []), d[i].push(a), n && m && m(e, n, i), d);
|
|
37
41
|
});
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
const n =
|
|
41
|
-
(
|
|
42
|
+
}, L = (e, i, r, d) => {
|
|
43
|
+
C((a) => {
|
|
44
|
+
const n = y(a), s = Object.keys(n).find(
|
|
45
|
+
(t) => n[t].some((S) => S.id === e)
|
|
42
46
|
);
|
|
43
|
-
if (!s) return
|
|
47
|
+
if (!s) return a;
|
|
44
48
|
const c = n[s].findIndex(
|
|
45
|
-
(
|
|
49
|
+
(t) => t.id === e
|
|
46
50
|
);
|
|
47
|
-
if (c === -1)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
if (c === -1 || b.has(s) || b.has(r))
|
|
52
|
+
return a;
|
|
53
|
+
const [f] = n[s].splice(c, 1);
|
|
54
|
+
n[r] || (n[r] = []);
|
|
55
|
+
const u = n[r].findIndex(
|
|
56
|
+
(t) => t.id === i
|
|
52
57
|
);
|
|
53
|
-
if (
|
|
54
|
-
n[
|
|
58
|
+
if (u === -1)
|
|
59
|
+
n[r].push(f);
|
|
55
60
|
else {
|
|
56
|
-
const
|
|
57
|
-
n[
|
|
61
|
+
const t = d === "top" ? u : u + 1;
|
|
62
|
+
n[r].splice(t, 0, f);
|
|
58
63
|
}
|
|
59
|
-
return s !==
|
|
64
|
+
return s !== r && m && m(e, s, r), n;
|
|
60
65
|
});
|
|
61
|
-
},
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
const
|
|
66
|
+
}, v = (e) => JSON.parse(e);
|
|
67
|
+
return /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(F, { className: j, children: p.map((e) => {
|
|
68
|
+
const i = U(e.label), r = !!e.disabled;
|
|
64
69
|
return /* @__PURE__ */ l(
|
|
65
|
-
|
|
70
|
+
J,
|
|
66
71
|
{
|
|
67
|
-
columnId:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
columnId: e.id,
|
|
73
|
+
disabled: r,
|
|
74
|
+
onDropOverColumn: (d) => {
|
|
75
|
+
if (r) return;
|
|
76
|
+
const a = v(d);
|
|
77
|
+
O(a.id, e.id);
|
|
71
78
|
},
|
|
72
|
-
className:
|
|
79
|
+
className: B(
|
|
80
|
+
"group/column relative transition-all duration-200",
|
|
81
|
+
!r && "hover:-translate-y-0.5 hover:shadow-lg"
|
|
82
|
+
),
|
|
73
83
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ o(R, { className: "sticky top-0 z-10 mb-2 rounded-xl border border-d-border/60 bg-d-sidebar/90 px-2.5 py-2 backdrop-blur", children: /* @__PURE__ */ l("div", { className: "flex w-full items-center justify-between", children: [
|
|
75
85
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
76
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ l(
|
|
77
87
|
"div",
|
|
78
88
|
{
|
|
79
|
-
className: "flex items-center gap-1.5 rounded-
|
|
89
|
+
className: "flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-semibold shadow-sm",
|
|
80
90
|
style: {
|
|
81
|
-
backgroundColor:
|
|
82
|
-
color:
|
|
91
|
+
backgroundColor: K(i, 0.15),
|
|
92
|
+
color: i,
|
|
93
|
+
borderColor: K(i, 0.35)
|
|
83
94
|
},
|
|
84
|
-
children:
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ o(
|
|
97
|
+
"span",
|
|
98
|
+
{
|
|
99
|
+
className: "size-1.5 rounded-full",
|
|
100
|
+
style: { backgroundColor: i }
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ o("span", { className: "max-w-[150px] truncate", children: e.label })
|
|
104
|
+
]
|
|
85
105
|
}
|
|
86
106
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ o("span", { className: "text-d-muted-foreground inline-flex items-center rounded-full border border-d-border/60 bg-d-muted/40 px-2 py-0.5 text-[11px] font-medium", children: N[e.id]?.length ?? 0 })
|
|
88
108
|
] }),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
109
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-1", children: [
|
|
110
|
+
r && /* @__PURE__ */ o(
|
|
111
|
+
"span",
|
|
112
|
+
{
|
|
113
|
+
className: "text-d-muted-foreground inline-flex size-6 items-center justify-center",
|
|
114
|
+
title: "Colonna bloccata",
|
|
115
|
+
"aria-label": "Colonna bloccata",
|
|
116
|
+
children: /* @__PURE__ */ o(Y, { className: "size-3.5" })
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
z && h && /* @__PURE__ */ o(
|
|
120
|
+
V,
|
|
121
|
+
{
|
|
122
|
+
variant: "ghost",
|
|
123
|
+
size: "icon",
|
|
124
|
+
className: "text-d-muted-foreground hover:text-d-foreground h-6 w-6",
|
|
125
|
+
onClick: () => h(e.id),
|
|
126
|
+
children: /* @__PURE__ */ o(Z, { className: "size-3.5" })
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] })
|
|
99
130
|
] }) }),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
131
|
+
/* @__PURE__ */ o(
|
|
132
|
+
W,
|
|
102
133
|
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const n = C(o);
|
|
108
|
-
O(
|
|
109
|
-
n.id,
|
|
110
|
-
e.id,
|
|
111
|
-
r.id,
|
|
112
|
-
t
|
|
113
|
-
);
|
|
114
|
-
},
|
|
115
|
-
children: /* @__PURE__ */ i(
|
|
116
|
-
J,
|
|
134
|
+
className: "px-1.5 pb-3",
|
|
135
|
+
dropDisabled: r,
|
|
136
|
+
children: N[e.id]?.map((d) => /* @__PURE__ */ o(
|
|
137
|
+
q,
|
|
117
138
|
{
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
cardId: d.id,
|
|
140
|
+
dropDisabled: r,
|
|
141
|
+
className: "mb-2 border-0 last:mb-0",
|
|
142
|
+
onDropOverListItem: (a, n) => {
|
|
143
|
+
if (r || n === "none") return;
|
|
144
|
+
const s = v(a);
|
|
145
|
+
L(
|
|
146
|
+
s.id,
|
|
147
|
+
d.id,
|
|
148
|
+
e.id,
|
|
149
|
+
n
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
children: /* @__PURE__ */ o(
|
|
153
|
+
E,
|
|
154
|
+
{
|
|
155
|
+
data: d,
|
|
156
|
+
dragDisabled: r,
|
|
157
|
+
className: B(
|
|
158
|
+
"group/card relative rounded-xl border border-transparent shadow-sm transition-all duration-200",
|
|
159
|
+
!r && "hover:-translate-y-0.5 hover:border-d-border/60 hover:shadow-lg"
|
|
133
160
|
),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
161
|
+
backgroundColor: i,
|
|
162
|
+
onEdit: x ? () => x(d, e.id) : void 0,
|
|
163
|
+
actions: D?.(d, e.id),
|
|
164
|
+
meta: d.meta,
|
|
165
|
+
children: g ? g(d, e.id) : /* @__PURE__ */ l(H, { children: [
|
|
166
|
+
/* @__PURE__ */ l("div", { className: "mb-1 flex items-start gap-2", children: [
|
|
167
|
+
d.icon && /* @__PURE__ */ o(
|
|
168
|
+
X,
|
|
169
|
+
{
|
|
170
|
+
name: d.icon,
|
|
171
|
+
size: "sm",
|
|
172
|
+
className: "text-d-muted-foreground mt-0.5 shrink-0"
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ o(G, { className: "flex-1 text-sm leading-snug font-semibold", children: d.title })
|
|
176
|
+
] }),
|
|
177
|
+
d.description && /* @__PURE__ */ o(Q, { className: "text-d-muted-foreground mt-1.5 line-clamp-2 text-xs leading-relaxed", children: d.description })
|
|
178
|
+
] })
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
},
|
|
182
|
+
d.id
|
|
183
|
+
))
|
|
184
|
+
}
|
|
185
|
+
)
|
|
143
186
|
]
|
|
144
187
|
},
|
|
145
|
-
|
|
188
|
+
e.id
|
|
146
189
|
);
|
|
147
190
|
}) }) });
|
|
148
191
|
}
|
|
149
192
|
export {
|
|
150
|
-
|
|
193
|
+
ne as AppKanban
|
|
151
194
|
};
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { designTokens as f } from "../design-tokens.js";
|
|
4
|
+
import { Icon as A } from "./icon.js";
|
|
5
|
+
import { Label as ne } from "./label.js";
|
|
6
|
+
import { Popover as oe, PopoverTrigger as re, PopoverContent as ie } from "./popover.js";
|
|
7
|
+
import { cn as z } from "../../lib/utils.js";
|
|
8
|
+
import { useState as I, useRef as _, useCallback as U, useMemo as S, useLayoutEffect as ae } from "react";
|
|
9
|
+
import { Button as L } from "./button.js";
|
|
10
|
+
const de = {
|
|
11
|
+
sm: f.sizes.sm,
|
|
12
|
+
default: f.sizes.default,
|
|
13
|
+
lg: f.sizes.lg
|
|
14
|
+
}, le = {
|
|
15
|
+
default: "bg-d-input border-d-border/50",
|
|
16
|
+
destructive: "bg-d-destructive/10 border-d-destructive/50 text-d-destructive",
|
|
17
|
+
outline: "bg-transparent border-d-foreground",
|
|
18
|
+
secondary: "bg-d-secondary border-d-border text-d-secondary-foreground",
|
|
19
|
+
ghost: "bg-transparent border-transparent hover:bg-d-accent",
|
|
20
|
+
link: "bg-transparent border-transparent text-d-primary underline-offset-4 hover:underline"
|
|
21
|
+
};
|
|
22
|
+
function k({
|
|
23
|
+
options: a,
|
|
24
|
+
value: l,
|
|
25
|
+
onChange: g,
|
|
26
|
+
type: b,
|
|
27
|
+
className: T,
|
|
28
|
+
disabledValues: w
|
|
29
|
+
}) {
|
|
30
|
+
const m = _(null);
|
|
31
|
+
return ae(() => {
|
|
32
|
+
m.current && l !== void 0 && m.current.scrollIntoView({
|
|
33
|
+
behavior: "instant",
|
|
34
|
+
block: "center"
|
|
35
|
+
});
|
|
36
|
+
}, [l]), /* @__PURE__ */ u(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: z(
|
|
40
|
+
"flex min-h-0 w-14 flex-col items-center overflow-hidden sm:w-16",
|
|
41
|
+
T
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ i("div", { className: "text-d-muted-foreground py-2 text-[10px] font-semibold tracking-wider uppercase", children: b === "hour" ? "HH" : b === "minute" ? "MM" : "SS" }),
|
|
45
|
+
/* @__PURE__ */ i("div", { className: "flex min-h-0 w-full flex-1 flex-col overflow-auto overscroll-contain px-1.5", children: a.map((c) => {
|
|
46
|
+
const N = w?.has(c) ?? !1;
|
|
47
|
+
return /* @__PURE__ */ i(
|
|
48
|
+
L,
|
|
49
|
+
{
|
|
50
|
+
ref: l !== void 0 && c === l ? m : void 0,
|
|
51
|
+
variant: l !== void 0 && c === l ? "default" : "ghost",
|
|
52
|
+
size: "sm",
|
|
53
|
+
disabled: N,
|
|
54
|
+
onClick: () => g(c),
|
|
55
|
+
children: c.toString().padStart(2, "0")
|
|
56
|
+
},
|
|
57
|
+
c
|
|
58
|
+
);
|
|
59
|
+
}) })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function ve(a) {
|
|
65
|
+
const {
|
|
66
|
+
value: l,
|
|
67
|
+
onChange: g,
|
|
68
|
+
onClear: b,
|
|
69
|
+
label: T,
|
|
70
|
+
placeholder: w = "Seleziona orario",
|
|
71
|
+
disabled: m = !1,
|
|
72
|
+
clearable: c = !1,
|
|
73
|
+
className: N,
|
|
74
|
+
labelClassName: B,
|
|
75
|
+
wrpClassName: E,
|
|
76
|
+
size: W = "default",
|
|
77
|
+
variant: X = "default",
|
|
78
|
+
useUtc: d = !1,
|
|
79
|
+
withSeconds: H = !1,
|
|
80
|
+
id: q,
|
|
81
|
+
"data-testid": F
|
|
82
|
+
} = a, [G, D] = I(
|
|
83
|
+
void 0
|
|
84
|
+
), [V, J] = I(!1), K = _(null), p = a.hasOwnProperty("value"), s = p ? l : G, P = U(() => {
|
|
85
|
+
p || D(void 0), g?.(void 0), b?.();
|
|
86
|
+
}, [p, g, b]), O = U(() => {
|
|
87
|
+
if (!s) return "";
|
|
88
|
+
let e, n, o;
|
|
89
|
+
d ? (e = s.getUTCHours(), n = s.getUTCMinutes(), o = s.getUTCSeconds()) : (e = s.getHours(), n = s.getMinutes(), o = s.getSeconds());
|
|
90
|
+
const v = [
|
|
91
|
+
e.toString().padStart(2, "0"),
|
|
92
|
+
n.toString().padStart(2, "0")
|
|
93
|
+
];
|
|
94
|
+
return H && v.push(o.toString().padStart(2, "0")), v.join(":");
|
|
95
|
+
}, [s, d, H])(), M = U(
|
|
96
|
+
(e, n) => {
|
|
97
|
+
const o = s ? new Date(s) : /* @__PURE__ */ new Date();
|
|
98
|
+
d ? (s || o.setUTCHours(0, 0, 0, 0), e === "hour" ? o.setUTCHours(n) : e === "minute" ? o.setUTCMinutes(n) : e === "second" && o.setUTCSeconds(n)) : (s || o.setHours(0, 0, 0, 0), e === "hour" ? o.setHours(n) : e === "minute" ? o.setMinutes(n) : e === "second" && o.setSeconds(n)), p || D(o), g?.(o);
|
|
99
|
+
},
|
|
100
|
+
[s, g, d, p]
|
|
101
|
+
), h = d ? s?.getUTCHours() : s?.getHours(), x = d ? s?.getUTCMinutes() : s?.getMinutes(), Q = d ? s?.getUTCSeconds() : s?.getSeconds(), Y = S(
|
|
102
|
+
() => Array.from({ length: 24 }, (e, n) => n),
|
|
103
|
+
[]
|
|
104
|
+
), Z = S(
|
|
105
|
+
() => Array.from({ length: 60 }, (e, n) => n),
|
|
106
|
+
[]
|
|
107
|
+
), $ = S(
|
|
108
|
+
() => Array.from({ length: 60 }, (e, n) => n),
|
|
109
|
+
[]
|
|
110
|
+
), { disabledHours: ee, disabledMinutes: te, disabledSeconds: se } = S(() => {
|
|
111
|
+
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), v = d ? (r) => r.getUTCHours() : (r) => r.getHours(), j = d ? (r) => r.getUTCMinutes() : (r) => r.getMinutes(), R = d ? (r) => r.getUTCSeconds() : (r) => r.getSeconds();
|
|
112
|
+
if (a.minTime) {
|
|
113
|
+
const r = v(a.minTime), C = j(a.minTime), y = R(a.minTime);
|
|
114
|
+
for (let t = 0; t < r; t++) e.add(t);
|
|
115
|
+
if (h !== void 0 && h === r) {
|
|
116
|
+
for (let t = 0; t < C; t++) n.add(t);
|
|
117
|
+
if (x !== void 0 && x === C)
|
|
118
|
+
for (let t = 0; t < y; t++) o.add(t);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (a.maxTime) {
|
|
122
|
+
const r = v(a.maxTime), C = j(a.maxTime), y = R(a.maxTime);
|
|
123
|
+
for (let t = r + 1; t < 24; t++) e.add(t);
|
|
124
|
+
if (h !== void 0 && h === r) {
|
|
125
|
+
for (let t = C + 1; t < 60; t++) n.add(t);
|
|
126
|
+
if (x !== void 0 && x === C)
|
|
127
|
+
for (let t = y + 1; t < 60; t++) o.add(t);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return { disabledHours: e, disabledMinutes: n, disabledSeconds: o };
|
|
131
|
+
}, [a.minTime, a.maxTime, h, x, d]);
|
|
132
|
+
return /* @__PURE__ */ u("div", { className: z("flex flex-col gap-1.5", E), children: [
|
|
133
|
+
T && /* @__PURE__ */ i(ne, { className: B, children: T }),
|
|
134
|
+
/* @__PURE__ */ u(
|
|
135
|
+
oe,
|
|
136
|
+
{
|
|
137
|
+
open: m ? !1 : V,
|
|
138
|
+
onOpenChange: (e) => !m && J(e),
|
|
139
|
+
modal: !0,
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ i(re, { asChild: !0, children: /* @__PURE__ */ u(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
ref: K,
|
|
145
|
+
id: q,
|
|
146
|
+
"data-testid": F,
|
|
147
|
+
className: z(
|
|
148
|
+
f.input.base,
|
|
149
|
+
f.radius.default,
|
|
150
|
+
f.focusRingWithin,
|
|
151
|
+
"flex w-fit min-w-[120px] cursor-pointer items-center justify-between gap-3 transition-colors",
|
|
152
|
+
V && f.activeRing,
|
|
153
|
+
de[W],
|
|
154
|
+
le[X],
|
|
155
|
+
m && "cursor-not-allowed opacity-50",
|
|
156
|
+
N
|
|
157
|
+
),
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-2 overflow-hidden", children: [
|
|
160
|
+
/* @__PURE__ */ i(A, { name: "Clock", size: "xs", className: "opacity-50" }),
|
|
161
|
+
O ? /* @__PURE__ */ i("span", { className: "text-d-foreground truncate font-medium tabular-nums", children: O }) : /* @__PURE__ */ i("span", { className: "text-d-muted-foreground whitespace-nowrap", children: w })
|
|
162
|
+
] }),
|
|
163
|
+
/* @__PURE__ */ u("div", { className: "text-d-muted-foreground/30 flex items-center gap-1.5", children: [
|
|
164
|
+
c && s && /* @__PURE__ */ i(
|
|
165
|
+
"div",
|
|
166
|
+
{
|
|
167
|
+
role: "button",
|
|
168
|
+
className: "bg-d-accent hover:bg-d-accent/80 border-d-border flex cursor-pointer items-center justify-center rounded-full border p-1 transition-colors",
|
|
169
|
+
onClick: (e) => {
|
|
170
|
+
e.stopPropagation(), e.preventDefault(), P();
|
|
171
|
+
},
|
|
172
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
173
|
+
"aria-label": "Clear selection",
|
|
174
|
+
children: /* @__PURE__ */ i(
|
|
175
|
+
A,
|
|
176
|
+
{
|
|
177
|
+
name: "X",
|
|
178
|
+
size: "xs",
|
|
179
|
+
className: "!text-d-foreground opacity-50"
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
d && /* @__PURE__ */ i("span", { className: "text-[10px] font-bold", children: "UTC" })
|
|
185
|
+
] })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
) }),
|
|
189
|
+
/* @__PURE__ */ u(ie, { className: "flex w-auto flex-col p-0", align: "start", children: [
|
|
190
|
+
/* @__PURE__ */ u("div", { className: "divide-d-border flex min-h-0 flex-1 items-start divide-x", children: [
|
|
191
|
+
/* @__PURE__ */ i(
|
|
192
|
+
k,
|
|
193
|
+
{
|
|
194
|
+
type: "hour",
|
|
195
|
+
value: h,
|
|
196
|
+
options: Y,
|
|
197
|
+
onChange: (e) => M("hour", e),
|
|
198
|
+
disabledValues: ee,
|
|
199
|
+
className: "flex max-h-64 flex-1"
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
/* @__PURE__ */ i(
|
|
203
|
+
k,
|
|
204
|
+
{
|
|
205
|
+
type: "minute",
|
|
206
|
+
value: x,
|
|
207
|
+
options: Z,
|
|
208
|
+
onChange: (e) => M("minute", e),
|
|
209
|
+
disabledValues: te,
|
|
210
|
+
className: "flex max-h-64 flex-1"
|
|
211
|
+
}
|
|
212
|
+
),
|
|
213
|
+
H && /* @__PURE__ */ i(
|
|
214
|
+
k,
|
|
215
|
+
{
|
|
216
|
+
type: "second",
|
|
217
|
+
value: Q,
|
|
218
|
+
options: $,
|
|
219
|
+
onChange: (e) => M("second", e),
|
|
220
|
+
disabledValues: se,
|
|
221
|
+
className: "flex max-h-64 flex-1"
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
] }),
|
|
225
|
+
s && /* @__PURE__ */ i("div", { className: "border-d-border flex border-t p-1", children: /* @__PURE__ */ i(
|
|
226
|
+
L,
|
|
227
|
+
{
|
|
228
|
+
size: "sm",
|
|
229
|
+
variant: "ghost",
|
|
230
|
+
className: "w-full",
|
|
231
|
+
onClick: P,
|
|
232
|
+
children: "Clear"
|
|
233
|
+
}
|
|
234
|
+
) })
|
|
235
|
+
] })
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
] });
|
|
240
|
+
}
|
|
241
|
+
export {
|
|
242
|
+
ve as AppTimePicker,
|
|
243
|
+
k as TimePickerColumn
|
|
244
|
+
};
|