laif-ds 0.2.71 → 0.2.73
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/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/agent-docs/components/AppForm.md +2 -0
- package/dist/agent-docs/components/AppTimePicker.md +3 -1
- package/dist/agent-docs/components/DatePicker.md +6 -0
- package/dist/agent-docs/components/FilePreview.md +142 -99
- package/dist/components/ui/app-kanban.js +149 -118
- package/dist/components/ui/app-time-picker.js +117 -99
- package/dist/components/ui/app-tooltip.js +49 -68
- package/dist/components/ui/chat-message.js +1 -1
- package/dist/components/ui/date-picker.js +219 -202
- package/dist/components/ui/dropdown-menu.js +50 -49
- package/dist/components/ui/file-preview/index.js +460 -0
- package/dist/components/ui/file-uploader.js +1 -1
- package/dist/components/ui/message-input.js +1 -1
- package/dist/index.d.ts +100 -10
- package/dist/index.js +1 -1
- package/dist/lib/file-preview.js +100 -21
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +2 -1
- package/dist/components/ui/file-preview.js +0 -263
|
@@ -1,231 +1,248 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { designTokens as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { cn as E } from "../../lib/utils.js";
|
|
2
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { designTokens as r } from "../design-tokens.js";
|
|
4
|
+
import { Calendar as L } from "./calendar.js";
|
|
5
|
+
import { Icon as X } from "./icon.js";
|
|
6
|
+
import { Label as ue } from "./label.js";
|
|
7
|
+
import { Popover as fe, PopoverTrigger as he, PopoverContent as ge } from "./popover.js";
|
|
8
|
+
import { cn as B } from "../../lib/utils.js";
|
|
10
9
|
import * as f from "react";
|
|
11
|
-
import { useCallback as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
10
|
+
import { useCallback as G, useMemo as p, useEffect as ve } from "react";
|
|
11
|
+
import { TimePickerColumn as k } from "./app-time-picker.js";
|
|
12
|
+
import { it as be } from "../../node_modules/date-fns/locale/it.js";
|
|
13
|
+
import { formatDate as H } from "../../node_modules/date-fns/format.js";
|
|
14
|
+
import { isSameDay as Ce } from "../../node_modules/date-fns/isSameDay.js";
|
|
15
|
+
const J = (t) => {
|
|
16
|
+
if (!Number.isFinite(t)) return 1;
|
|
17
|
+
const x = Math.trunc(t);
|
|
18
|
+
return Math.min(59, Math.max(1, x));
|
|
19
|
+
};
|
|
20
|
+
function Oe(t) {
|
|
16
21
|
const {
|
|
17
|
-
placeholder:
|
|
18
|
-
dateFormat:
|
|
19
|
-
className:
|
|
20
|
-
disabled:
|
|
22
|
+
placeholder: x = "Seleziona data",
|
|
23
|
+
dateFormat: K,
|
|
24
|
+
className: Q,
|
|
25
|
+
disabled: d = !1,
|
|
21
26
|
size: h = "default",
|
|
22
|
-
firstDate:
|
|
23
|
-
lastDate:
|
|
24
|
-
availableDates:
|
|
25
|
-
locale: u =
|
|
27
|
+
firstDate: P,
|
|
28
|
+
lastDate: z,
|
|
29
|
+
availableDates: O,
|
|
30
|
+
locale: u = be,
|
|
26
31
|
initialCalendarMonth: g,
|
|
27
|
-
customCalendarProps:
|
|
28
|
-
label:
|
|
29
|
-
labelClassName:
|
|
30
|
-
wrpClassName:
|
|
31
|
-
id:
|
|
32
|
-
"data-testid":
|
|
33
|
-
minDate:
|
|
34
|
-
maxDate:
|
|
35
|
-
numberOfMonths:
|
|
36
|
-
clearable:
|
|
37
|
-
onClear:
|
|
38
|
-
} = t,
|
|
39
|
-
|
|
40
|
-
), [
|
|
41
|
-
|
|
42
|
-
), [
|
|
32
|
+
customCalendarProps: F,
|
|
33
|
+
label: I,
|
|
34
|
+
labelClassName: U,
|
|
35
|
+
wrpClassName: W,
|
|
36
|
+
id: Y,
|
|
37
|
+
"data-testid": Z,
|
|
38
|
+
minDate: T,
|
|
39
|
+
maxDate: j,
|
|
40
|
+
numberOfMonths: $,
|
|
41
|
+
clearable: ee = !1,
|
|
42
|
+
onClear: A
|
|
43
|
+
} = t, n = t.mode === "range", v = !n && t.showTime === !0, w = !n && t.withSeconds === !0, M = n ? 1 : J(t.minuteStep), y = n ? 1 : J(t.secondStep), D = K ?? (v ? w ? "dd/MM/yyyy HH:mm:ss" : "dd/MM/yyyy HH:mm" : "dd/MM/yyyy"), [s, b] = f.useState(
|
|
44
|
+
n ? void 0 : t.value
|
|
45
|
+
), [i, N] = f.useState(
|
|
46
|
+
n ? t.value : void 0
|
|
47
|
+
), [R, C] = f.useState(
|
|
43
48
|
g
|
|
44
|
-
), [
|
|
49
|
+
), [_, V] = f.useState(!1), te = (e) => {
|
|
45
50
|
const a = e ? new Date(e) : void 0;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
), b(a), a &&
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
}, [
|
|
51
|
+
v && a && s && a.setHours(
|
|
52
|
+
s.getHours(),
|
|
53
|
+
s.getMinutes(),
|
|
54
|
+
s.getSeconds()
|
|
55
|
+
), b(a), a && C(a), !n && t.onChange && t.onChange(a), !v && a && V(!1);
|
|
56
|
+
}, ae = G(() => {
|
|
57
|
+
n ? (N(void 0), t.onChange && t.onChange(void 0)) : (b(void 0), t.onChange && t.onChange(void 0)), A?.();
|
|
58
|
+
}, [n, t.onChange, A]), ne = s?.getHours(), oe = s?.getMinutes(), se = s?.getSeconds(), ie = p(
|
|
54
59
|
() => Array.from({ length: 24 }, (e, a) => a),
|
|
55
60
|
[]
|
|
56
|
-
),
|
|
57
|
-
() => Array.from(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
[]
|
|
62
|
-
),
|
|
61
|
+
), re = p(
|
|
62
|
+
() => Array.from(
|
|
63
|
+
{ length: Math.floor(59 / M) + 1 },
|
|
64
|
+
(e, a) => a * M
|
|
65
|
+
),
|
|
66
|
+
[M]
|
|
67
|
+
), le = p(
|
|
68
|
+
() => Array.from(
|
|
69
|
+
{ length: Math.floor(59 / y) + 1 },
|
|
70
|
+
(e, a) => a * y
|
|
71
|
+
),
|
|
72
|
+
[y]
|
|
73
|
+
), S = G(
|
|
63
74
|
(e, a) => {
|
|
64
|
-
const
|
|
65
|
-
|
|
75
|
+
const m = s ? new Date(s) : /* @__PURE__ */ new Date();
|
|
76
|
+
s || m.setHours(0, 0, 0, 0), e === "hour" ? m.setHours(a) : e === "minute" ? m.setMinutes(a) : e === "second" && m.setSeconds(a), b(m), !n && t.onChange && t.onChange(m);
|
|
66
77
|
},
|
|
67
|
-
[
|
|
68
|
-
),
|
|
69
|
-
|
|
78
|
+
[s, n, t.onChange]
|
|
79
|
+
), de = (e) => {
|
|
80
|
+
N(e), e?.from && C(e.from), n && t.onChange && t.onChange(e);
|
|
70
81
|
};
|
|
71
|
-
let
|
|
72
|
-
|
|
73
|
-
(e) => !
|
|
74
|
-
(a) =>
|
|
82
|
+
let c = [];
|
|
83
|
+
P && c.push({ before: P }), z && c.push({ after: z }), O?.length && c.push(
|
|
84
|
+
(e) => !O.some(
|
|
85
|
+
(a) => Ce(a, e)
|
|
75
86
|
)
|
|
76
|
-
),
|
|
77
|
-
if (
|
|
78
|
-
|
|
87
|
+
), d && (c = [!0]), ve(() => {
|
|
88
|
+
if (n) {
|
|
89
|
+
N(t.value);
|
|
79
90
|
const e = t.value?.from;
|
|
80
|
-
|
|
91
|
+
C(e ?? g);
|
|
81
92
|
} else
|
|
82
|
-
b(t.value),
|
|
93
|
+
b(t.value), C(
|
|
83
94
|
t.value ?? g
|
|
84
95
|
);
|
|
85
|
-
}, [t.value,
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
] }) : !
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
96
|
+
}, [t.value, n, g]);
|
|
97
|
+
const ce = f.useId(), q = Y ?? ce, E = n ? !!i?.from : !!s, me = () => n && i ? /* @__PURE__ */ l("span", { children: [
|
|
98
|
+
i.from && H(i.from, D, { locale: u }),
|
|
99
|
+
i.from && i.to && " - ",
|
|
100
|
+
i.to && H(i.to, D, { locale: u })
|
|
101
|
+
] }) : !n && s ? /* @__PURE__ */ o("span", { children: H(s, D, { locale: u }) }) : /* @__PURE__ */ o("span", { className: "text-d-muted-foreground", children: x });
|
|
102
|
+
return /* @__PURE__ */ l("div", { className: B("flex flex-col gap-1.5", W), children: [
|
|
103
|
+
I && /* @__PURE__ */ o(ue, { htmlFor: q, className: U, children: I }),
|
|
104
|
+
/* @__PURE__ */ l(fe, { open: d ? !1 : _, onOpenChange: V, modal: !0, children: [
|
|
105
|
+
/* @__PURE__ */ o(he, { asChild: !0, children: /* @__PURE__ */ l(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
id: q,
|
|
109
|
+
"data-testid": Z,
|
|
110
|
+
className: B(
|
|
111
|
+
r.input.base,
|
|
112
|
+
r.radius.default,
|
|
113
|
+
r.text.base,
|
|
114
|
+
r.interaction.disabled,
|
|
115
|
+
"flex items-center gap-2 font-normal whitespace-nowrap [&>span]:line-clamp-1",
|
|
116
|
+
r.focusRing,
|
|
117
|
+
_ && r.activeRing,
|
|
118
|
+
"hover:border-d-ring cursor-pointer transition-colors",
|
|
119
|
+
!E && "text-d-muted-foreground",
|
|
120
|
+
d && "cursor-not-allowed opacity-50",
|
|
121
|
+
h === "default" && r.sizes.default,
|
|
122
|
+
h === "sm" && r.sizes.sm,
|
|
123
|
+
h === "lg" && r.sizes.lg,
|
|
124
|
+
Q
|
|
125
|
+
),
|
|
126
|
+
"aria-disabled": d,
|
|
127
|
+
role: "button",
|
|
128
|
+
tabIndex: d ? -1 : 0,
|
|
129
|
+
onClick: d ? void 0 : () => {
|
|
130
|
+
},
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ o(X, { name: "Calendar", size: h === "lg" ? "sm" : "xs" }),
|
|
133
|
+
/* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: me() }),
|
|
134
|
+
ee && E && /* @__PURE__ */ o(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
role: "button",
|
|
138
|
+
className: "bg-d-accent hover:bg-d-accent/80 border-d-border flex shrink-0 cursor-pointer items-center justify-center rounded-full border p-1 transition-colors",
|
|
139
|
+
onClick: (e) => {
|
|
140
|
+
e.stopPropagation(), e.preventDefault(), ae();
|
|
141
|
+
},
|
|
142
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
143
|
+
"aria-label": "Clear selection",
|
|
144
|
+
children: /* @__PURE__ */ o(
|
|
145
|
+
X,
|
|
131
146
|
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
e.stopPropagation(), e.preventDefault(), $();
|
|
136
|
-
},
|
|
137
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
138
|
-
"aria-label": "Clear selection",
|
|
139
|
-
children: /* @__PURE__ */ s(
|
|
140
|
-
q,
|
|
141
|
-
{
|
|
142
|
-
name: "X",
|
|
143
|
-
size: "xs",
|
|
144
|
-
className: "!text-d-foreground opacity-50"
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
+
name: "X",
|
|
148
|
+
size: "xs",
|
|
149
|
+
className: "!text-d-foreground opacity-50"
|
|
147
150
|
}
|
|
148
151
|
)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
) }),
|
|
157
|
+
" ",
|
|
158
|
+
/* @__PURE__ */ l(
|
|
159
|
+
ge,
|
|
160
|
+
{
|
|
161
|
+
className: "flex max-h-[500px] min-h-0 w-auto flex-row p-0 shadow",
|
|
162
|
+
align: "start",
|
|
163
|
+
children: [
|
|
164
|
+
n ? /* @__PURE__ */ o(
|
|
165
|
+
L,
|
|
166
|
+
{
|
|
167
|
+
...F || {},
|
|
168
|
+
mode: "range",
|
|
169
|
+
selected: i,
|
|
170
|
+
onSelect: de,
|
|
171
|
+
autoFocus: !0,
|
|
172
|
+
disabled: c,
|
|
173
|
+
locale: u,
|
|
174
|
+
defaultMonth: R,
|
|
175
|
+
numberOfMonths: $ ?? 1,
|
|
176
|
+
minDate: T,
|
|
177
|
+
maxDate: j
|
|
178
|
+
}
|
|
179
|
+
) : /* @__PURE__ */ o(
|
|
180
|
+
L,
|
|
181
|
+
{
|
|
182
|
+
...F || {},
|
|
183
|
+
mode: "single",
|
|
184
|
+
selected: s,
|
|
185
|
+
onSelect: te,
|
|
186
|
+
autoFocus: !0,
|
|
187
|
+
disabled: c,
|
|
188
|
+
locale: u,
|
|
189
|
+
defaultMonth: R,
|
|
190
|
+
minDate: T,
|
|
191
|
+
maxDate: j
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
v && /* @__PURE__ */ l("div", { className: "border-d-border/50 relative flex shrink-0 flex-row overflow-hidden border-l", children: [
|
|
195
|
+
/* @__PURE__ */ l(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
className: "invisible flex h-0 flex-row overflow-hidden opacity-0 select-none",
|
|
199
|
+
"aria-hidden": "true",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" }),
|
|
202
|
+
/* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" }),
|
|
203
|
+
w && /* @__PURE__ */ o("div", { className: "w-12 shrink-0 sm:w-14" })
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
/* @__PURE__ */ l("div", { className: "absolute inset-0 flex h-full w-full flex-row overflow-y-auto", children: [
|
|
208
|
+
/* @__PURE__ */ o(
|
|
209
|
+
k,
|
|
161
210
|
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
disabled: d,
|
|
168
|
-
locale: u,
|
|
169
|
-
defaultMonth: F,
|
|
170
|
-
numberOfMonths: W ?? 1,
|
|
171
|
-
minDate: O,
|
|
172
|
-
maxDate: z
|
|
211
|
+
type: "hour",
|
|
212
|
+
value: ne,
|
|
213
|
+
options: ie,
|
|
214
|
+
onChange: (e) => S("hour", e),
|
|
215
|
+
className: "flex flex-1"
|
|
173
216
|
}
|
|
174
|
-
)
|
|
175
|
-
|
|
217
|
+
),
|
|
218
|
+
/* @__PURE__ */ o(
|
|
219
|
+
k,
|
|
176
220
|
{
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
disabled: d,
|
|
183
|
-
locale: u,
|
|
184
|
-
defaultMonth: F,
|
|
185
|
-
minDate: O,
|
|
186
|
-
maxDate: z
|
|
221
|
+
type: "minute",
|
|
222
|
+
value: oe,
|
|
223
|
+
options: re,
|
|
224
|
+
onChange: (e) => S("minute", e),
|
|
225
|
+
className: "flex flex-1"
|
|
187
226
|
}
|
|
188
227
|
),
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
options: ne,
|
|
206
|
-
onChange: (e) => D("minute", e),
|
|
207
|
-
className: "flex flex-1"
|
|
208
|
-
}
|
|
209
|
-
),
|
|
210
|
-
T && /* @__PURE__ */ s(
|
|
211
|
-
M,
|
|
212
|
-
{
|
|
213
|
-
type: "second",
|
|
214
|
-
value: ae,
|
|
215
|
-
options: se,
|
|
216
|
-
onChange: (e) => D("second", e),
|
|
217
|
-
className: "flex flex-1"
|
|
218
|
-
}
|
|
219
|
-
)
|
|
220
|
-
] })
|
|
221
|
-
]
|
|
222
|
-
}
|
|
223
|
-
)
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
)
|
|
228
|
+
w && /* @__PURE__ */ o(
|
|
229
|
+
k,
|
|
230
|
+
{
|
|
231
|
+
type: "second",
|
|
232
|
+
value: se,
|
|
233
|
+
options: le,
|
|
234
|
+
onChange: (e) => S("second", e),
|
|
235
|
+
className: "flex flex-1"
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
] })
|
|
239
|
+
] })
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
] })
|
|
227
244
|
] });
|
|
228
245
|
}
|
|
229
246
|
export {
|
|
230
|
-
|
|
247
|
+
Oe as DatePicker
|
|
231
248
|
};
|
|
@@ -1,130 +1,131 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { Root as v, Group as h, Portal as c, RadioGroup as N, Sub as y, Trigger as R, CheckboxItem as l, ItemIndicator as m, Content as p, Item as u, Label as f, RadioItem as b, Separator as g, SubContent as w, SubTrigger as x } from "../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
|
|
4
|
+
import * as n from "react";
|
|
5
5
|
import { cn as r } from "../../lib/utils.js";
|
|
6
6
|
import D from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
7
7
|
import M from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
|
|
8
8
|
import S from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
9
|
-
const H =
|
|
10
|
-
|
|
9
|
+
const H = v, J = R, K = h, O = c, Q = y, U = N, I = n.forwardRef(({ className: e, inset: t, children: o, ...d }, s) => /* @__PURE__ */ i(
|
|
10
|
+
x,
|
|
11
11
|
{
|
|
12
|
-
ref:
|
|
12
|
+
ref: s,
|
|
13
13
|
className: r(
|
|
14
|
-
"focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
15
|
-
|
|
14
|
+
"focus:bg-d-accent data-[state=open]:bg-d-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
15
|
+
t && "pl-8",
|
|
16
16
|
e
|
|
17
17
|
),
|
|
18
|
-
...
|
|
18
|
+
...d,
|
|
19
19
|
children: [
|
|
20
|
-
|
|
20
|
+
o,
|
|
21
21
|
/* @__PURE__ */ a(S, { className: "ml-auto" })
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
));
|
|
25
|
-
I.displayName =
|
|
26
|
-
const C =
|
|
25
|
+
I.displayName = x.displayName;
|
|
26
|
+
const C = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a(
|
|
27
27
|
w,
|
|
28
28
|
{
|
|
29
|
-
ref:
|
|
29
|
+
ref: o,
|
|
30
30
|
className: r(
|
|
31
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-d-border z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",
|
|
31
|
+
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-d-border z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",
|
|
32
32
|
e
|
|
33
33
|
),
|
|
34
|
-
...
|
|
34
|
+
...t
|
|
35
35
|
}
|
|
36
36
|
));
|
|
37
37
|
C.displayName = w.displayName;
|
|
38
|
-
const z =
|
|
38
|
+
const z = n.forwardRef(({ className: e, sideOffset: t = 4, ...o }, d) => /* @__PURE__ */ a(c, { children: /* @__PURE__ */ a(
|
|
39
39
|
p,
|
|
40
40
|
{
|
|
41
|
-
ref:
|
|
42
|
-
sideOffset:
|
|
41
|
+
ref: d,
|
|
42
|
+
sideOffset: t,
|
|
43
43
|
className: r(
|
|
44
|
-
"bg-popover text-popover-foreground border-d-border z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
44
|
+
"bg-d-popover text-d-popover-foreground border-d-border z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
45
45
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
46
46
|
e
|
|
47
47
|
),
|
|
48
|
-
...
|
|
48
|
+
...o
|
|
49
49
|
}
|
|
50
50
|
) }));
|
|
51
51
|
z.displayName = p.displayName;
|
|
52
|
-
const k =
|
|
52
|
+
const k = n.forwardRef(({ className: e, inset: t, variant: o = "default", ...d }, s) => /* @__PURE__ */ a(
|
|
53
53
|
u,
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
55
|
+
ref: s,
|
|
56
|
+
"data-variant": o,
|
|
56
57
|
className: r(
|
|
57
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
58
|
-
|
|
58
|
+
"focus:bg-d-accent focus:text-d-accent-foreground data-[variant=destructive]:text-d-destructive data-[variant=destructive]:focus:bg-d-destructive/10 data-[variant=destructive]:focus:text-d-destructive data-[variant=destructive]:*:[svg]:!text-d-destructive relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
59
|
+
t && "pl-8",
|
|
59
60
|
e
|
|
60
61
|
),
|
|
61
|
-
...
|
|
62
|
+
...d
|
|
62
63
|
}
|
|
63
64
|
));
|
|
64
65
|
k.displayName = u.displayName;
|
|
65
|
-
const G =
|
|
66
|
-
|
|
66
|
+
const G = n.forwardRef(({ className: e, children: t, checked: o, ...d }, s) => /* @__PURE__ */ i(
|
|
67
|
+
l,
|
|
67
68
|
{
|
|
68
|
-
ref:
|
|
69
|
+
ref: s,
|
|
69
70
|
className: r(
|
|
70
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
71
|
+
"focus:bg-d-accent focus:text-d-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
71
72
|
e
|
|
72
73
|
),
|
|
73
|
-
checked:
|
|
74
|
-
...
|
|
74
|
+
checked: o,
|
|
75
|
+
...d,
|
|
75
76
|
children: [
|
|
76
|
-
/* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(
|
|
77
|
-
|
|
77
|
+
/* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(D, { className: "h-4 w-4" }) }) }),
|
|
78
|
+
t
|
|
78
79
|
]
|
|
79
80
|
}
|
|
80
81
|
));
|
|
81
|
-
G.displayName =
|
|
82
|
-
const T =
|
|
82
|
+
G.displayName = l.displayName;
|
|
83
|
+
const T = n.forwardRef(({ className: e, children: t, ...o }, d) => /* @__PURE__ */ i(
|
|
83
84
|
b,
|
|
84
85
|
{
|
|
85
|
-
ref:
|
|
86
|
+
ref: d,
|
|
86
87
|
className: r(
|
|
87
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
88
|
+
"focus:bg-d-accent focus:text-d-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
88
89
|
e
|
|
89
90
|
),
|
|
90
|
-
...
|
|
91
|
+
...o,
|
|
91
92
|
children: [
|
|
92
|
-
/* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(
|
|
93
|
-
|
|
93
|
+
/* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(M, { className: "h-2 w-2 fill-current" }) }) }),
|
|
94
|
+
t
|
|
94
95
|
]
|
|
95
96
|
}
|
|
96
97
|
));
|
|
97
98
|
T.displayName = b.displayName;
|
|
98
|
-
const j =
|
|
99
|
+
const j = n.forwardRef(({ className: e, inset: t, ...o }, d) => /* @__PURE__ */ a(
|
|
99
100
|
f,
|
|
100
101
|
{
|
|
101
|
-
ref:
|
|
102
|
+
ref: d,
|
|
102
103
|
className: r(
|
|
103
104
|
"px-2 py-1.5 text-sm font-semibold",
|
|
104
|
-
|
|
105
|
+
t && "pl-8",
|
|
105
106
|
e
|
|
106
107
|
),
|
|
107
|
-
...
|
|
108
|
+
...o
|
|
108
109
|
}
|
|
109
110
|
));
|
|
110
111
|
j.displayName = f.displayName;
|
|
111
|
-
const L =
|
|
112
|
+
const L = n.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a(
|
|
112
113
|
g,
|
|
113
114
|
{
|
|
114
|
-
ref:
|
|
115
|
-
className: r("bg-
|
|
116
|
-
...
|
|
115
|
+
ref: o,
|
|
116
|
+
className: r("bg-d-border -mx-1 my-1 h-px", e),
|
|
117
|
+
...t
|
|
117
118
|
}
|
|
118
119
|
));
|
|
119
120
|
L.displayName = g.displayName;
|
|
120
121
|
const P = ({
|
|
121
122
|
className: e,
|
|
122
|
-
...
|
|
123
|
+
...t
|
|
123
124
|
}) => /* @__PURE__ */ a(
|
|
124
125
|
"span",
|
|
125
126
|
{
|
|
126
127
|
className: r("ml-auto text-xs tracking-widest opacity-60", e),
|
|
127
|
-
...
|
|
128
|
+
...t
|
|
128
129
|
}
|
|
129
130
|
);
|
|
130
131
|
P.displayName = "DropdownMenuShortcut";
|