laif-ds 0.2.78 → 0.2.80
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/CHANGELOG.md +25 -0
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/agent-docs/adoption-report.json +10 -10
- package/dist/agent-docs/components/AppEditor.md +4 -4
- package/dist/agent-docs/components/AppSelect.md +46 -0
- package/dist/agent-docs/manifest.json +5 -3
- package/dist/components/editor/editor-ui/content-editable.js +15 -8
- package/dist/components/ui/app-editor.js +88 -76
- package/dist/components/ui/app-select.js +232 -143
- package/dist/components/ui/date-picker.js +184 -153
- package/dist/components/ui/markdown-renderer.js +40 -30
- package/dist/index.d.ts +3 -1
- package/dist/node_modules/comma-separated-tokens/index.js +16 -5
- package/dist/node_modules/entities/dist/esm/decode-codepoint.js +39 -0
- package/dist/node_modules/entities/dist/esm/decode.js +246 -0
- package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +8 -0
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-from-parse5/lib/index.js +146 -0
- package/dist/node_modules/hast-util-parse-selector/lib/index.js +21 -0
- package/dist/node_modules/hast-util-raw/lib/index.js +218 -0
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/hast-util-to-parse5/lib/index.js +119 -0
- package/dist/node_modules/hastscript/lib/create-h.js +113 -0
- package/dist/node_modules/hastscript/lib/index.js +9 -0
- package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +45 -0
- package/dist/node_modules/parse5/dist/common/doctype.js +99 -0
- package/dist/node_modules/parse5/dist/common/error-codes.js +8 -0
- package/dist/node_modules/parse5/dist/common/foreign-content.js +211 -0
- package/dist/node_modules/parse5/dist/common/html.js +251 -0
- package/dist/node_modules/parse5/dist/common/token.js +15 -0
- package/dist/node_modules/parse5/dist/common/unicode.js +74 -0
- package/dist/node_modules/parse5/dist/parser/formatting-element-list.js +85 -0
- package/dist/node_modules/parse5/dist/parser/index.js +2272 -0
- package/dist/node_modules/parse5/dist/parser/open-element-stack.js +241 -0
- package/dist/node_modules/parse5/dist/serializer/index.js +3 -0
- package/dist/node_modules/parse5/dist/tokenizer/index.js +1941 -0
- package/dist/node_modules/parse5/dist/tokenizer/preprocessor.js +89 -0
- package/dist/node_modules/parse5/dist/tree-adapters/default.js +163 -0
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/rehype-raw/lib/index.js +13 -0
- package/dist/node_modules/space-separated-tokens/index.js +8 -3
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/vfile-location/lib/index.js +43 -0
- package/dist/node_modules/web-namespaces/index.js +12 -0
- package/dist/styles.v3.css +1 -1
- package/package.json +2 -1
|
@@ -1,149 +1,197 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { designTokens as
|
|
5
|
-
import { Badge as
|
|
6
|
-
import { Command as
|
|
7
|
-
import { Label as
|
|
8
|
-
import { cn as
|
|
9
|
-
import {
|
|
2
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as S, useRef as X, useCallback as k, useMemo as b, useEffect as pe, useLayoutEffect as ge } from "react";
|
|
4
|
+
import { designTokens as m } from "../design-tokens.js";
|
|
5
|
+
import { Badge as ve } from "./badge.js";
|
|
6
|
+
import { Command as be, CommandInput as xe, CommandList as Ce, CommandEmpty as ye, CommandGroup as $, CommandItem as _ } from "./command.js";
|
|
7
|
+
import { Label as we } from "./label.js";
|
|
8
|
+
import { cn as C } from "../../lib/utils.js";
|
|
9
|
+
import { Button as Ne } from "./button.js";
|
|
10
|
+
import { Checkbox as Se } from "./checkbox.js";
|
|
10
11
|
import { Icon as A } from "./icon.js";
|
|
11
|
-
import { Popover as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
sm:
|
|
15
|
-
default:
|
|
16
|
-
lg:
|
|
12
|
+
import { Popover as ke, PopoverTrigger as Ae, PopoverContent as De } from "./popover.js";
|
|
13
|
+
import ze from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
14
|
+
const Pe = {
|
|
15
|
+
sm: m.sizes.sm,
|
|
16
|
+
default: m.sizes.default,
|
|
17
|
+
lg: m.sizes.lg
|
|
17
18
|
};
|
|
18
|
-
function
|
|
19
|
+
function Ge(y) {
|
|
19
20
|
const {
|
|
20
|
-
multiple:
|
|
21
|
-
options:
|
|
22
|
-
value:
|
|
23
|
-
defaultValue:
|
|
24
|
-
renderValue:
|
|
25
|
-
onValueChange:
|
|
26
|
-
onClear:
|
|
27
|
-
placeholder:
|
|
28
|
-
emptyPlaceholder:
|
|
29
|
-
searchPlaceholder:
|
|
30
|
-
addItemPlaceholder:
|
|
31
|
-
itemCountMessage:
|
|
32
|
-
maxSelectedMessage:
|
|
33
|
-
label:
|
|
34
|
-
className:
|
|
35
|
-
labelClassName:
|
|
36
|
-
wrpClassName:
|
|
37
|
-
searchable:
|
|
38
|
-
creatable:
|
|
39
|
-
noGroupLabel:
|
|
40
|
-
maxSelected:
|
|
41
|
-
showChipsInsteadOfCount:
|
|
42
|
-
disabled:
|
|
43
|
-
size:
|
|
44
|
-
isSingleSelectClearable:
|
|
45
|
-
id:
|
|
46
|
-
"data-testid":
|
|
47
|
-
} =
|
|
21
|
+
multiple: r = !1,
|
|
22
|
+
options: d,
|
|
23
|
+
value: H,
|
|
24
|
+
defaultValue: J,
|
|
25
|
+
renderValue: w,
|
|
26
|
+
onValueChange: D,
|
|
27
|
+
onClear: z,
|
|
28
|
+
placeholder: K = "Seleziona...",
|
|
29
|
+
emptyPlaceholder: Q = "Nessun risultato",
|
|
30
|
+
searchPlaceholder: U = "Cerca...",
|
|
31
|
+
addItemPlaceholder: Y = "Aggiungi",
|
|
32
|
+
itemCountMessage: Z = (e) => `${e} elementi selezionati`,
|
|
33
|
+
maxSelectedMessage: ee = (e) => `Puoi selezionare fino a ${e} elementi`,
|
|
34
|
+
label: T,
|
|
35
|
+
className: le = "",
|
|
36
|
+
labelClassName: te = "",
|
|
37
|
+
wrpClassName: ae = "",
|
|
38
|
+
searchable: P = !1,
|
|
39
|
+
creatable: re = !1,
|
|
40
|
+
noGroupLabel: q = "Nessun gruppo",
|
|
41
|
+
maxSelected: s,
|
|
42
|
+
showChipsInsteadOfCount: ne = !1,
|
|
43
|
+
disabled: I,
|
|
44
|
+
size: se = "default",
|
|
45
|
+
isSingleSelectClearable: oe = !1,
|
|
46
|
+
id: ie,
|
|
47
|
+
"data-testid": ce
|
|
48
|
+
} = y, N = y.multiple ? y.selectableAll ?? !0 : !1, [x, L] = S(!1), [h, O] = S(""), V = X(null), M = X(null), [B, de] = S(0), j = Object.prototype.hasOwnProperty.call(y, "value"), [ue, fe] = S(J), p = j ? H : ue, u = k(
|
|
48
49
|
(e) => {
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
j || fe(e), D?.(
|
|
51
|
+
r ? Array.isArray(e) ? e : [] : Array.isArray(e) ? e[0] : e
|
|
51
52
|
);
|
|
52
53
|
},
|
|
53
|
-
[
|
|
54
|
-
), n =
|
|
55
|
-
const e =
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
return [...e, ...
|
|
54
|
+
[j, r, D]
|
|
55
|
+
), n = b(() => r ? Array.isArray(p) ? p : [] : p != null ? [p] : [], [p, r]), g = b(() => {
|
|
56
|
+
const e = d.filter((t) => n.includes(t.value));
|
|
57
|
+
if (r) {
|
|
58
|
+
const t = n.filter((l) => !e.find((o) => o.value === l)).map((l) => ({ value: l, label: l }));
|
|
59
|
+
return [...e, ...t];
|
|
59
60
|
} else if (n.length && !e.length)
|
|
60
61
|
return [{ value: n[0], label: n[0] }];
|
|
61
62
|
return e;
|
|
62
|
-
}, [
|
|
63
|
+
}, [d, n, r]), E = (e) => {
|
|
63
64
|
if (!e.disabled)
|
|
64
|
-
if (
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
65
|
+
if (r) {
|
|
66
|
+
const t = n.includes(e.value);
|
|
67
|
+
if (!t && s !== void 0 && n.length >= s)
|
|
67
68
|
return;
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
u(
|
|
70
|
+
t ? n.filter((l) => l !== e.value) : [...n, e.value]
|
|
70
71
|
);
|
|
71
72
|
} else
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
u(e.value), L(!1);
|
|
74
|
+
}, G = k(() => {
|
|
75
|
+
u(r ? [] : void 0), O(""), z && z();
|
|
76
|
+
}, [u, z, r]), W = k(
|
|
77
|
+
(e) => {
|
|
78
|
+
const t = h.toLocaleLowerCase();
|
|
79
|
+
return t ? (typeof e.label == "string" ? e.label : String(e.value)).toLocaleLowerCase().includes(t) : !0;
|
|
80
|
+
},
|
|
81
|
+
[h]
|
|
82
|
+
), f = b(
|
|
83
|
+
() => d.filter((e) => !e.disabled && W(e)),
|
|
84
|
+
[d, W]
|
|
85
|
+
), R = b(
|
|
86
|
+
() => f.filter((e) => n.includes(e.value)).length,
|
|
87
|
+
[f, n]
|
|
88
|
+
), v = b(() => {
|
|
89
|
+
if (R === 0) return "none";
|
|
90
|
+
const e = s !== void 0 && n.length >= s;
|
|
91
|
+
return R >= f.length || e ? "all" : "some";
|
|
92
|
+
}, [
|
|
93
|
+
R,
|
|
94
|
+
f.length,
|
|
95
|
+
n.length,
|
|
96
|
+
s
|
|
97
|
+
]), me = k(() => {
|
|
98
|
+
if (!r) return;
|
|
99
|
+
if (v === "all") {
|
|
100
|
+
const l = new Set(f.map((i) => i.value)), o = new Set(
|
|
101
|
+
d.filter((i) => i.fixed).map((i) => i.value)
|
|
102
|
+
), F = n.filter(
|
|
103
|
+
(i) => !l.has(i) || o.has(i)
|
|
104
|
+
);
|
|
105
|
+
u(F);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const e = new Set(n), t = [...n];
|
|
109
|
+
for (const l of f)
|
|
110
|
+
if (!e.has(l.value)) {
|
|
111
|
+
if (s !== void 0 && t.length >= s) break;
|
|
112
|
+
t.push(l.value), e.add(l.value);
|
|
113
|
+
}
|
|
114
|
+
u(t);
|
|
115
|
+
}, [
|
|
116
|
+
r,
|
|
117
|
+
v,
|
|
118
|
+
d,
|
|
119
|
+
n,
|
|
120
|
+
f,
|
|
121
|
+
s,
|
|
122
|
+
u
|
|
123
|
+
]), he = b(() => {
|
|
124
|
+
const e = d.some((t) => t.group);
|
|
125
|
+
return d.reduce((t, l) => {
|
|
126
|
+
const o = e ? l.group || q : "";
|
|
127
|
+
return t[o] = t[o] || [], t[o].push(l), t;
|
|
80
128
|
}, {});
|
|
81
|
-
}, [
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
}, [
|
|
85
|
-
if (!
|
|
129
|
+
}, [d, q]);
|
|
130
|
+
return pe(() => {
|
|
131
|
+
V.current && de(V.current.getBoundingClientRect().width);
|
|
132
|
+
}, [x, n, d]), ge(() => {
|
|
133
|
+
if (!x) return;
|
|
86
134
|
const e = requestAnimationFrame(() => {
|
|
87
|
-
|
|
135
|
+
M.current && M.current?.scrollIntoView({
|
|
88
136
|
behavior: "instant",
|
|
89
137
|
block: "center"
|
|
90
138
|
});
|
|
91
139
|
});
|
|
92
140
|
return () => cancelAnimationFrame(e);
|
|
93
|
-
}, [
|
|
94
|
-
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
141
|
+
}, [x]), /* @__PURE__ */ c("div", { className: C("flex flex-col gap-1.5", ae), children: [
|
|
142
|
+
T && /* @__PURE__ */ a(we, { className: te, children: T }),
|
|
143
|
+
/* @__PURE__ */ c(
|
|
144
|
+
ke,
|
|
97
145
|
{
|
|
98
|
-
open:
|
|
99
|
-
onOpenChange: (e) => !
|
|
146
|
+
open: I ? !1 : x,
|
|
147
|
+
onOpenChange: (e) => !I && L(e),
|
|
100
148
|
modal: !0,
|
|
101
149
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ a(Ae, { asChild: !0, children: /* @__PURE__ */ c(
|
|
103
151
|
"div",
|
|
104
152
|
{
|
|
105
|
-
ref:
|
|
106
|
-
id:
|
|
107
|
-
"data-testid":
|
|
108
|
-
className:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
153
|
+
ref: V,
|
|
154
|
+
id: ie,
|
|
155
|
+
"data-testid": ce,
|
|
156
|
+
className: C(
|
|
157
|
+
m.input.base,
|
|
158
|
+
m.radius.default,
|
|
159
|
+
m.focusRingWithin,
|
|
112
160
|
"flex w-full min-w-[100px] cursor-pointer items-center justify-between gap-2",
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
161
|
+
x && m.activeRing,
|
|
162
|
+
Pe[se],
|
|
163
|
+
I && "cursor-not-allowed opacity-50",
|
|
164
|
+
le
|
|
117
165
|
),
|
|
118
166
|
children: [
|
|
119
|
-
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
(e) =>
|
|
122
|
-
|
|
167
|
+
g.length === 0 ? /* @__PURE__ */ a("span", { className: "text-d-muted-foreground", children: K }) : r ? /* @__PURE__ */ c("div", { className: "flex h-full w-full min-w-0 items-center justify-between gap-2", children: [
|
|
168
|
+
/* @__PURE__ */ a("div", { className: "flex min-w-0 flex-nowrap gap-1 overflow-auto", children: ne ? g.map(
|
|
169
|
+
(e) => w ? w(e) : /* @__PURE__ */ c(
|
|
170
|
+
ve,
|
|
123
171
|
{
|
|
124
172
|
variant: "secondary",
|
|
125
173
|
className: "hover:bg-d-secondary/100 bg-d-secondary/50 border-d-border flex cursor-pointer items-center gap-1 border",
|
|
126
|
-
onClick: (
|
|
127
|
-
|
|
174
|
+
onClick: (t) => {
|
|
175
|
+
t.stopPropagation(), E(e);
|
|
128
176
|
},
|
|
129
177
|
children: [
|
|
130
178
|
e.label,
|
|
131
|
-
!e.fixed && /* @__PURE__ */
|
|
179
|
+
!e.fixed && /* @__PURE__ */ a(A, { name: "X", size: "xs" })
|
|
132
180
|
]
|
|
133
181
|
},
|
|
134
182
|
e.value
|
|
135
183
|
)
|
|
136
|
-
) : /* @__PURE__ */
|
|
137
|
-
|
|
184
|
+
) : /* @__PURE__ */ a("div", { children: Z(g.length) }) }),
|
|
185
|
+
r && /* @__PURE__ */ a(
|
|
138
186
|
"div",
|
|
139
187
|
{
|
|
140
188
|
className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
141
189
|
onClick: (e) => {
|
|
142
|
-
e.stopPropagation(), e.preventDefault(),
|
|
190
|
+
e.stopPropagation(), e.preventDefault(), G();
|
|
143
191
|
},
|
|
144
192
|
onMouseDown: (e) => e.preventDefault(),
|
|
145
193
|
"aria-label": "Clear selection",
|
|
146
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ a(
|
|
147
195
|
A,
|
|
148
196
|
{
|
|
149
197
|
name: "X",
|
|
@@ -153,19 +201,19 @@ function Ve(O) {
|
|
|
153
201
|
)
|
|
154
202
|
}
|
|
155
203
|
)
|
|
156
|
-
] }) : /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
|
|
204
|
+
] }) : /* @__PURE__ */ c("div", { className: "flex h-full w-full min-w-0 items-center justify-between gap-2", children: [
|
|
205
|
+
/* @__PURE__ */ a("div", { className: "min-w-0 flex-1 truncate", children: w ? w(g[0]) : typeof g[0]?.label == "string" ? /* @__PURE__ */ a("span", { children: g[0]?.label }) : g[0]?.label }),
|
|
206
|
+
oe && p !== void 0 && p !== null && /* @__PURE__ */ a(
|
|
159
207
|
"div",
|
|
160
208
|
{
|
|
161
209
|
role: "button",
|
|
162
210
|
className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
163
211
|
onClick: (e) => {
|
|
164
|
-
e.stopPropagation(), e.preventDefault(),
|
|
212
|
+
e.stopPropagation(), e.preventDefault(), G();
|
|
165
213
|
},
|
|
166
214
|
onMouseDown: (e) => e.preventDefault(),
|
|
167
215
|
"aria-label": "Clear selection",
|
|
168
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ a(
|
|
169
217
|
A,
|
|
170
218
|
{
|
|
171
219
|
name: "X",
|
|
@@ -176,76 +224,117 @@ function Ve(O) {
|
|
|
176
224
|
}
|
|
177
225
|
)
|
|
178
226
|
] }),
|
|
179
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ a(ze, { className: "h-4 w-4 opacity-50" })
|
|
180
228
|
]
|
|
181
229
|
}
|
|
182
230
|
) }),
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
|
|
231
|
+
/* @__PURE__ */ a(
|
|
232
|
+
De,
|
|
185
233
|
{
|
|
186
234
|
className: "p-0",
|
|
187
|
-
style: { width:
|
|
235
|
+
style: { width: B > 0 ? B : "auto" },
|
|
188
236
|
align: "start",
|
|
189
237
|
sideOffset: 4,
|
|
190
238
|
avoidCollisions: !0,
|
|
191
239
|
collisionPadding: 8,
|
|
192
|
-
|
|
193
|
-
|
|
240
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
241
|
+
children: /* @__PURE__ */ c(
|
|
242
|
+
be,
|
|
194
243
|
{
|
|
195
|
-
shouldFilter:
|
|
196
|
-
filter: (e,
|
|
244
|
+
shouldFilter: P,
|
|
245
|
+
filter: (e, t) => e.toLocaleLowerCase().includes(t.toLocaleLowerCase()) ? 1 : 0,
|
|
197
246
|
className: "w-full",
|
|
198
247
|
children: [
|
|
199
|
-
|
|
200
|
-
|
|
248
|
+
(P || r && N) && /* @__PURE__ */ c(
|
|
249
|
+
"div",
|
|
201
250
|
{
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
251
|
+
className: C(
|
|
252
|
+
"relative",
|
|
253
|
+
r && N && "[&_[data-slot=command-d-input-wrapper]>svg]:hidden"
|
|
254
|
+
),
|
|
255
|
+
children: [
|
|
256
|
+
P ? /* @__PURE__ */ a(
|
|
257
|
+
xe,
|
|
258
|
+
{
|
|
259
|
+
placeholder: U,
|
|
260
|
+
className: C(
|
|
261
|
+
"placeholder:text-d-muted-foreground",
|
|
262
|
+
r && N && "pl-7"
|
|
263
|
+
),
|
|
264
|
+
value: h,
|
|
265
|
+
onValueChange: O
|
|
266
|
+
}
|
|
267
|
+
) : /* @__PURE__ */ a("div", { className: "border-d-border h-9 border-b" }),
|
|
268
|
+
r && N && /* @__PURE__ */ a(
|
|
269
|
+
Ne,
|
|
270
|
+
{
|
|
271
|
+
type: "button",
|
|
272
|
+
variant: "ghost",
|
|
273
|
+
size: "sm",
|
|
274
|
+
disabled: f.length === 0,
|
|
275
|
+
"aria-label": v === "all" ? "Deselect all" : "Select all",
|
|
276
|
+
"aria-checked": v === "all" ? !0 : v === "some" ? "mixed" : !1,
|
|
277
|
+
role: "checkbox",
|
|
278
|
+
className: "text-d-muted-foreground hover:text-d-foreground absolute top-1/2 left-2 size-6 -translate-y-1/2 px-0",
|
|
279
|
+
onMouseDown: (e) => {
|
|
280
|
+
e.stopPropagation(), e.preventDefault();
|
|
281
|
+
},
|
|
282
|
+
onClick: (e) => {
|
|
283
|
+
e.stopPropagation(), e.preventDefault(), me();
|
|
284
|
+
},
|
|
285
|
+
children: /* @__PURE__ */ a(
|
|
286
|
+
A,
|
|
287
|
+
{
|
|
288
|
+
name: f.length === 0 ? "SquareDot" : v === "all" ? "SquareCheck" : v === "some" ? "SquareMinus" : "Square",
|
|
289
|
+
size: "xs"
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
]
|
|
206
295
|
}
|
|
207
296
|
),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
|
|
211
|
-
|
|
297
|
+
/* @__PURE__ */ c(Ce, { className: "max-h-60 overflow-auto overscroll-contain", children: [
|
|
298
|
+
/* @__PURE__ */ a(ye, { children: Q }),
|
|
299
|
+
re && h && /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(
|
|
300
|
+
_,
|
|
212
301
|
{
|
|
213
302
|
className: "cursor-pointer",
|
|
214
303
|
onSelect: () => {
|
|
215
|
-
|
|
304
|
+
h && (u(r ? [...n, h] : h), O(""), r || L(!1));
|
|
216
305
|
},
|
|
217
|
-
children: /* @__PURE__ */
|
|
218
|
-
|
|
306
|
+
children: /* @__PURE__ */ c("div", { className: "text-d-foreground text-xs", children: [
|
|
307
|
+
Y,
|
|
219
308
|
" “",
|
|
220
|
-
|
|
309
|
+
h,
|
|
221
310
|
"”"
|
|
222
311
|
] })
|
|
223
312
|
}
|
|
224
313
|
) }),
|
|
225
|
-
Object.entries(
|
|
226
|
-
const
|
|
227
|
-
return /* @__PURE__ */
|
|
228
|
-
|
|
314
|
+
Object.entries(he).map(([e, t]) => /* @__PURE__ */ a($, { heading: e || void 0, children: t.map((l) => {
|
|
315
|
+
const o = n.includes(l.value), F = r && s !== void 0 && !o && n.length >= s, i = l.disabled || F;
|
|
316
|
+
return /* @__PURE__ */ c(
|
|
317
|
+
_,
|
|
229
318
|
{
|
|
230
|
-
ref:
|
|
231
|
-
value: typeof
|
|
232
|
-
onSelect: () => !
|
|
233
|
-
className:
|
|
319
|
+
ref: o ? M : null,
|
|
320
|
+
value: typeof l.label == "string" ? l.label : String(l.value),
|
|
321
|
+
onSelect: () => !i && E(l),
|
|
322
|
+
className: C(
|
|
234
323
|
"cursor-pointer",
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
!
|
|
324
|
+
m.dropdownItem.hover,
|
|
325
|
+
i && "cursor-not-allowed opacity-50",
|
|
326
|
+
!r && o && m.dropdownItem.selected
|
|
238
327
|
),
|
|
239
328
|
children: [
|
|
240
|
-
|
|
241
|
-
typeof
|
|
329
|
+
r && /* @__PURE__ */ a(Se, { checked: o, className: "mr-1" }),
|
|
330
|
+
typeof l.label == "string" ? /* @__PURE__ */ a("span", { children: l.label }) : l.label
|
|
242
331
|
]
|
|
243
332
|
},
|
|
244
|
-
|
|
333
|
+
l.value
|
|
245
334
|
);
|
|
246
335
|
}) }, e))
|
|
247
336
|
] }),
|
|
248
|
-
|
|
337
|
+
r && s !== void 0 && n.length >= s && /* @__PURE__ */ a("div", { className: "border-d-border text-d-muted-foreground border-t px-2 py-1 text-xs", children: ee(s) })
|
|
249
338
|
]
|
|
250
339
|
}
|
|
251
340
|
)
|
|
@@ -257,5 +346,5 @@ function Ve(O) {
|
|
|
257
346
|
] });
|
|
258
347
|
}
|
|
259
348
|
export {
|
|
260
|
-
|
|
349
|
+
Ge as AppSelect
|
|
261
350
|
};
|