laif-ds 0.1.85 → 0.1.88
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/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/components/ui/app-editor.js +58 -58
- package/dist/components/ui/app-multiple-select-dropdown.js +111 -88
- package/dist/components/ui/async-select.js +182 -151
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/checkbox.js +5 -5
- package/dist/components/ui/multiple-selector.js +202 -190
- package/dist/components/ui/navigation-menu.js +2 -2
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/switch.js +5 -5
- package/dist/components/ui/weekly-calendar/appointment-card.js +39 -39
- package/dist/components/ui/weekly-calendar/calendar-header.js +2 -2
- package/dist/components/ui/weekly-calendar/day-column.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
- package/dist/components/ui/command-portal.js +0 -67
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as t } from "../node_modules/eventemitter3/index2.js";
|
|
4
|
+
var r = t();
|
|
5
|
+
const m = /* @__PURE__ */ e(r);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var t =
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
+
var t = e();
|
|
5
|
+
const a = /* @__PURE__ */ r(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
3
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
4
|
+
var t = r();
|
|
5
|
+
const x = /* @__PURE__ */ e(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
x as default
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as r, jsxs as t, Fragment as s } from "react/jsx-runtime";
|
|
3
3
|
import { LexicalComposer as w } from "../../node_modules/@lexical/react/LexicalComposer.prod.js";
|
|
4
4
|
import { OnChangePlugin as L } from "../../node_modules/@lexical/react/LexicalOnChangePlugin.prod.js";
|
|
5
5
|
import { LexicalErrorBoundary as S } from "../../node_modules/@lexical/react/LexicalErrorBoundary.prod.js";
|
|
@@ -26,125 +26,125 @@ import { FormatQuote as X } from "../editor/plugins/toolbar/block-format/format-
|
|
|
26
26
|
import { FontFormatToolbarPlugin as l } from "../editor/plugins/toolbar/font-format-toolbar-plugin.js";
|
|
27
27
|
import { ListPlugin as Y } from "../../node_modules/@lexical/react/LexicalListPlugin.prod.js";
|
|
28
28
|
import { CheckListPlugin as Z } from "../../node_modules/@lexical/react/LexicalCheckListPlugin.prod.js";
|
|
29
|
-
import { ListNode as V, ListItemNode as
|
|
30
|
-
import { editorTheme as
|
|
31
|
-
import { TooltipProvider as
|
|
32
|
-
import { HistoryToolbarPlugin as
|
|
33
|
-
const
|
|
34
|
-
function
|
|
35
|
-
defaultValue:
|
|
29
|
+
import { ListNode as V, ListItemNode as rr } from "../../node_modules/@lexical/list/LexicalList.prod.js";
|
|
30
|
+
import { editorTheme as or } from "../editor/themes/editor-theme.js";
|
|
31
|
+
import { TooltipProvider as tr } from "./tooltip.js";
|
|
32
|
+
import { HistoryToolbarPlugin as er } from "../editor/plugins/toolbar/history-toolbar-plugin.js";
|
|
33
|
+
const ir = "Start typing...";
|
|
34
|
+
function nr({
|
|
35
|
+
defaultValue: o,
|
|
36
36
|
onlyMarkdown: i
|
|
37
37
|
}) {
|
|
38
38
|
const [n] = O();
|
|
39
39
|
return $(() => {
|
|
40
|
-
|
|
41
|
-
i ? H(
|
|
42
|
-
new d().append(new p(
|
|
40
|
+
o && n.update(() => {
|
|
41
|
+
i ? H(o, C) : f().append(
|
|
42
|
+
new d().append(new p(o))
|
|
43
43
|
);
|
|
44
44
|
const a = f();
|
|
45
45
|
(a.getFirstChild() ?? a).selectStart();
|
|
46
46
|
});
|
|
47
|
-
}, [n,
|
|
47
|
+
}, [n, o, i]), null;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
defaultValue:
|
|
49
|
+
function zr({
|
|
50
|
+
defaultValue: o,
|
|
51
51
|
onMarkdownEdit: i,
|
|
52
52
|
plugins: n = [],
|
|
53
53
|
toolbars: a = [],
|
|
54
|
-
placeholder:
|
|
54
|
+
placeholder: N = ir,
|
|
55
55
|
onlyMarkdown: h = !0,
|
|
56
|
-
className:
|
|
56
|
+
className: F = "overflow-hidden rounded-lg border border-d-border"
|
|
57
57
|
}) {
|
|
58
|
-
const [
|
|
58
|
+
const [ar, P] = R(null), y = {
|
|
59
59
|
namespace: "AppEditor",
|
|
60
|
-
theme:
|
|
60
|
+
theme: or,
|
|
61
61
|
nodes: [
|
|
62
62
|
j,
|
|
63
63
|
d,
|
|
64
64
|
p,
|
|
65
65
|
A,
|
|
66
66
|
V,
|
|
67
|
-
|
|
67
|
+
rr
|
|
68
68
|
],
|
|
69
69
|
onError: (e) => {
|
|
70
70
|
console.error(e);
|
|
71
71
|
},
|
|
72
|
-
...
|
|
72
|
+
...o && !h ? {
|
|
73
73
|
editorState: () => {
|
|
74
74
|
f().append(
|
|
75
|
-
new d().append(new p(
|
|
75
|
+
new d().append(new p(o))
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
} : {}
|
|
79
|
-
},
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
}, u = (e) => n.includes(e), m = (e) => a.includes(e), g = u("clear"), v = u("counter"), b = m("block-format"), E = m("font-format"), x = m("history");
|
|
80
|
+
return /* @__PURE__ */ r("div", { className: "bg-d-background", children: /* @__PURE__ */ r(w, { initialConfig: y, children: /* @__PURE__ */ t(tr, { children: [
|
|
81
|
+
o && /* @__PURE__ */ r(
|
|
82
|
+
nr,
|
|
83
83
|
{
|
|
84
|
-
defaultValue:
|
|
84
|
+
defaultValue: o,
|
|
85
85
|
onlyMarkdown: h
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
/* @__PURE__ */ t("div", { className: "flex items-center", children: [
|
|
89
|
-
x && /* @__PURE__ */
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ t("div", { className: "border-d-border flex items-center border-b", children: [
|
|
89
|
+
x && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ r(er, {}) }) }),
|
|
90
|
+
b && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: /* @__PURE__ */ t(J, { children: [
|
|
91
|
+
/* @__PURE__ */ r(U, {}),
|
|
92
|
+
/* @__PURE__ */ r(q, { levels: ["h1", "h2", "h3"] }),
|
|
93
|
+
/* @__PURE__ */ r(G, {}),
|
|
94
|
+
/* @__PURE__ */ r(K, {}),
|
|
95
|
+
/* @__PURE__ */ r(W, {}),
|
|
96
|
+
/* @__PURE__ */ r(X, {})
|
|
97
97
|
] }) }) }) }),
|
|
98
|
-
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
98
|
+
E && /* @__PURE__ */ r(c, { children: () => /* @__PURE__ */ t("div", { className: "vertical-align-middle sticky top-0 z-10 flex gap-2 overflow-auto p-1", children: [
|
|
99
|
+
/* @__PURE__ */ r(l, { format: "bold" }),
|
|
100
|
+
/* @__PURE__ */ r(l, { format: "italic" }),
|
|
101
|
+
/* @__PURE__ */ r(l, { format: "underline" }),
|
|
102
|
+
/* @__PURE__ */ r(l, { format: "strikethrough" })
|
|
103
103
|
] }) })
|
|
104
104
|
] }),
|
|
105
105
|
/* @__PURE__ */ t("div", { className: "relative", children: [
|
|
106
|
-
x && /* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
106
|
+
x && /* @__PURE__ */ r(z, {}),
|
|
107
|
+
/* @__PURE__ */ r(
|
|
108
108
|
T,
|
|
109
109
|
{
|
|
110
110
|
ErrorBoundary: S,
|
|
111
|
-
contentEditable: /* @__PURE__ */
|
|
111
|
+
contentEditable: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("div", { ref: P, children: /* @__PURE__ */ r(
|
|
112
112
|
D,
|
|
113
113
|
{
|
|
114
|
-
placeholder:
|
|
115
|
-
className: `ContentEditable__root relative block h-72 min-h-full overflow-auto px-8 py-4 focus:outline-none ${
|
|
114
|
+
placeholder: N,
|
|
115
|
+
className: `ContentEditable__root relative block h-72 min-h-full overflow-auto px-8 py-4 focus:outline-none ${F}`
|
|
116
116
|
}
|
|
117
117
|
) }) })
|
|
118
118
|
}
|
|
119
119
|
),
|
|
120
|
-
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
120
|
+
b && /* @__PURE__ */ t(s, { children: [
|
|
121
|
+
/* @__PURE__ */ r(Y, {}),
|
|
122
|
+
/* @__PURE__ */ r(Z, {})
|
|
123
123
|
] }),
|
|
124
|
-
(
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
124
|
+
(g || v) && /* @__PURE__ */ r(I, { children: /* @__PURE__ */ t("div", { className: "clear-both flex items-center justify-between gap-2 p-1", children: [
|
|
125
|
+
/* @__PURE__ */ r("div", { className: "flex flex-1 justify-start" }),
|
|
126
|
+
/* @__PURE__ */ r("div", { children: v && /* @__PURE__ */ r(Q, { charset: "UTF-16" }) }),
|
|
127
|
+
/* @__PURE__ */ r("div", { className: "flex flex-1 justify-end gap-2", children: g && /* @__PURE__ */ t(s, { children: [
|
|
128
|
+
/* @__PURE__ */ r(_, {}),
|
|
129
|
+
/* @__PURE__ */ r(M, {})
|
|
130
130
|
] }) })
|
|
131
131
|
] }) })
|
|
132
132
|
] }),
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ r(
|
|
134
134
|
L,
|
|
135
135
|
{
|
|
136
136
|
ignoreSelectionChange: !0,
|
|
137
137
|
onChange: (e) => {
|
|
138
138
|
if (!i) return;
|
|
139
|
-
const
|
|
139
|
+
const k = e.read(
|
|
140
140
|
() => B(C)
|
|
141
141
|
);
|
|
142
|
-
i(
|
|
142
|
+
i(k);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
)
|
|
146
146
|
] }) }) });
|
|
147
147
|
}
|
|
148
148
|
export {
|
|
149
|
-
|
|
149
|
+
zr as AppEditor
|
|
150
150
|
};
|
|
@@ -1,131 +1,155 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as l, Fragment as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
16
|
-
function
|
|
2
|
+
import { jsx as r, jsxs as l, Fragment as F } from "react/jsx-runtime";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { useEffect as T } from "react";
|
|
5
|
+
import { cn as p } from "../../lib/utils.js";
|
|
6
|
+
import { Label as G } from "./label.js";
|
|
7
|
+
import { Badge as V } from "./badge.js";
|
|
8
|
+
import { Button as N } from "./button.js";
|
|
9
|
+
import { Popover as X, PopoverTrigger as $, PopoverContent as q } from "./popover.js";
|
|
10
|
+
import { Command as H, CommandList as I, CommandEmpty as J, CommandGroup as K, CommandItem as Q } from "./command.js";
|
|
11
|
+
import { inputVariants as U } from "./input.js";
|
|
12
|
+
import { Checkbox as Y } from "./checkbox.js";
|
|
13
|
+
import { Icon as y } from "./icon.js";
|
|
14
|
+
import Z from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
15
|
+
const _ = t.createContext({ size: "default" });
|
|
16
|
+
function me({
|
|
17
17
|
options: s,
|
|
18
|
-
value:
|
|
18
|
+
value: n,
|
|
19
19
|
onChange: o,
|
|
20
|
-
onClear:
|
|
20
|
+
onClear: h,
|
|
21
21
|
placeholder: k = "Seleziona...",
|
|
22
22
|
disabled: z = !1,
|
|
23
|
-
size:
|
|
24
|
-
label:
|
|
23
|
+
size: g = "default",
|
|
24
|
+
label: b,
|
|
25
25
|
labelClassName: M,
|
|
26
|
-
emptyMessage:
|
|
27
|
-
className:
|
|
28
|
-
filterPlaceholder:
|
|
29
|
-
filterable:
|
|
30
|
-
cancelLabel:
|
|
26
|
+
emptyMessage: P = "Nessun risultato trovato",
|
|
27
|
+
className: R,
|
|
28
|
+
filterPlaceholder: j = "Cerca...",
|
|
29
|
+
filterable: D = !1,
|
|
30
|
+
cancelLabel: O = "Cancella selezione",
|
|
31
31
|
cancelButtonLabel: S = "Cancella",
|
|
32
|
-
maxSelectedItems:
|
|
32
|
+
maxSelectedItems: a
|
|
33
33
|
}) {
|
|
34
|
-
const m =
|
|
34
|
+
const m = t.useId(), [d, L] = t.useState(!1), [c, v] = t.useState(""), [B, W] = t.useState(
|
|
35
|
+
void 0
|
|
36
|
+
), A = t.useRef(null), f = t.useRef(null), w = t.useCallback(
|
|
35
37
|
(e) => {
|
|
36
|
-
if (
|
|
37
|
-
o(
|
|
38
|
+
if (n.includes(e))
|
|
39
|
+
o(n.filter((i) => i !== e));
|
|
38
40
|
else {
|
|
39
|
-
if (
|
|
41
|
+
if (a && n.length >= a)
|
|
40
42
|
return;
|
|
41
|
-
o([...
|
|
43
|
+
o([...n, e]);
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
|
-
[
|
|
45
|
-
), x =
|
|
46
|
-
o([]),
|
|
47
|
-
}, [o]),
|
|
48
|
-
(e) => e.label.toLowerCase().includes(
|
|
49
|
-
) : s, [s,
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
[n, o, a]
|
|
47
|
+
), x = t.useCallback(() => {
|
|
48
|
+
o([]), v(""), h && h();
|
|
49
|
+
}, [o]), u = t.useMemo(() => s.filter((e) => n.includes(e.value)), [s, n]), E = t.useMemo(() => c ? s.filter(
|
|
50
|
+
(e) => e.label.toLowerCase().includes(c.toLowerCase())
|
|
51
|
+
) : s, [s, c]), C = t.useMemo(() => a ? n.length >= a : !1, [n, a]);
|
|
52
|
+
return T(() => {
|
|
53
|
+
if (d && f.current) {
|
|
54
|
+
const e = f.current.getBoundingClientRect();
|
|
55
|
+
W(e.width);
|
|
56
|
+
}
|
|
57
|
+
}, [d]), /* @__PURE__ */ r(_.Provider, { value: { size: g, id: m }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
58
|
+
b && /* @__PURE__ */ r(G, { htmlFor: m, className: M, children: b }),
|
|
59
|
+
/* @__PURE__ */ r(
|
|
53
60
|
"div",
|
|
54
61
|
{
|
|
55
|
-
ref:
|
|
62
|
+
ref: A,
|
|
56
63
|
className: "relative w-full",
|
|
57
64
|
"data-slot": "app-multiple-select-dropdown",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ l(
|
|
60
|
-
|
|
65
|
+
children: /* @__PURE__ */ l(X, { open: d, onOpenChange: L, children: [
|
|
66
|
+
/* @__PURE__ */ r($, { asChild: !0, children: /* @__PURE__ */ l(
|
|
67
|
+
N,
|
|
61
68
|
{
|
|
62
69
|
id: m,
|
|
63
70
|
type: "button",
|
|
64
71
|
variant: "outline",
|
|
65
72
|
role: "combobox",
|
|
66
|
-
"aria-expanded":
|
|
73
|
+
"aria-expanded": d,
|
|
67
74
|
disabled: z,
|
|
68
|
-
|
|
75
|
+
ref: f,
|
|
76
|
+
className: p(
|
|
69
77
|
"!bg-d-input relative w-full justify-between border font-normal",
|
|
70
78
|
"border-d-input ring-offset-background focus:ring-ring flex items-center rounded-md border whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
71
79
|
"aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
|
|
72
|
-
|
|
80
|
+
R
|
|
73
81
|
),
|
|
74
|
-
onClick: () => b(!u),
|
|
75
82
|
children: [
|
|
76
|
-
/* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children:
|
|
83
|
+
/* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between gap-2 overflow-hidden", children: u.length > 0 ? /* @__PURE__ */ l(F, { children: [
|
|
77
84
|
/* @__PURE__ */ l(
|
|
78
|
-
|
|
85
|
+
V,
|
|
79
86
|
{
|
|
80
87
|
variant: "secondary",
|
|
81
|
-
className: "flex items-center gap-1",
|
|
88
|
+
className: "!bg-d-accent flex items-center gap-1",
|
|
82
89
|
children: [
|
|
83
|
-
/* @__PURE__ */ r("span", { children:
|
|
84
|
-
|
|
90
|
+
/* @__PURE__ */ r("span", { children: u.length }),
|
|
91
|
+
u.length === 1 ? " elemento selezionato" : " elementi selezionati"
|
|
85
92
|
]
|
|
86
93
|
}
|
|
87
94
|
),
|
|
88
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ r(
|
|
89
96
|
"div",
|
|
90
97
|
{
|
|
91
|
-
className: "
|
|
98
|
+
className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
92
99
|
onClick: (e) => {
|
|
93
100
|
e.stopPropagation(), e.preventDefault(), x();
|
|
94
101
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
102
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
103
|
+
"aria-label": O,
|
|
104
|
+
children: /* @__PURE__ */ r(
|
|
105
|
+
y,
|
|
106
|
+
{
|
|
107
|
+
name: "X",
|
|
108
|
+
size: "xs",
|
|
109
|
+
className: "!text-d-foreground opacity-50"
|
|
110
|
+
}
|
|
111
|
+
)
|
|
99
112
|
}
|
|
100
113
|
)
|
|
101
114
|
] }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground", children: k }) }),
|
|
102
|
-
/* @__PURE__ */ r(
|
|
115
|
+
/* @__PURE__ */ r(Z, { className: "ml-1 h-4 w-4 shrink-0 opacity-50" })
|
|
103
116
|
]
|
|
104
117
|
}
|
|
105
|
-
),
|
|
118
|
+
) }),
|
|
106
119
|
/* @__PURE__ */ r(
|
|
107
|
-
|
|
120
|
+
q,
|
|
108
121
|
{
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
className: p("p-0"),
|
|
123
|
+
style: { width: B },
|
|
124
|
+
align: "start",
|
|
125
|
+
side: "bottom",
|
|
126
|
+
sideOffset: 4,
|
|
127
|
+
onWheel: (e) => e.stopPropagation(),
|
|
128
|
+
avoidCollisions: !1,
|
|
129
|
+
children: /* @__PURE__ */ l(H, { className: "bg-d-popover w-full rounded-md border border-none shadow-lg", children: [
|
|
130
|
+
D && /* @__PURE__ */ l("div", { className: "border-d-border flex items-center justify-between border-b px-3", children: [
|
|
114
131
|
/* @__PURE__ */ l("div", { className: "flex items-center", children: [
|
|
115
|
-
/* @__PURE__ */ r(
|
|
132
|
+
/* @__PURE__ */ r(
|
|
133
|
+
y,
|
|
134
|
+
{
|
|
135
|
+
name: "Search",
|
|
136
|
+
className: "text-d-accent-foreground",
|
|
137
|
+
size: "sm"
|
|
138
|
+
}
|
|
139
|
+
),
|
|
116
140
|
/* @__PURE__ */ r(
|
|
117
141
|
"input",
|
|
118
142
|
{
|
|
119
143
|
id: "app-multiple-select-dropdown-filter",
|
|
120
|
-
placeholder:
|
|
121
|
-
value:
|
|
122
|
-
onChange: (e) =>
|
|
123
|
-
className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${
|
|
144
|
+
placeholder: j,
|
|
145
|
+
value: c,
|
|
146
|
+
onChange: (e) => v(e.target.value),
|
|
147
|
+
className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${U({ size: g })} !shadow-none`
|
|
124
148
|
}
|
|
125
149
|
)
|
|
126
150
|
] }),
|
|
127
|
-
|
|
128
|
-
|
|
151
|
+
u.length > 0 && /* @__PURE__ */ r(
|
|
152
|
+
N,
|
|
129
153
|
{
|
|
130
154
|
variant: "ghost",
|
|
131
155
|
size: "sm",
|
|
@@ -135,27 +159,26 @@ function ie({
|
|
|
135
159
|
}
|
|
136
160
|
)
|
|
137
161
|
] }),
|
|
138
|
-
/* @__PURE__ */ l(
|
|
139
|
-
/* @__PURE__ */ r(
|
|
140
|
-
/* @__PURE__ */ r(
|
|
141
|
-
const i =
|
|
162
|
+
/* @__PURE__ */ l(I, { className: "max-h-60 w-full", children: [
|
|
163
|
+
/* @__PURE__ */ r(J, { children: P }),
|
|
164
|
+
/* @__PURE__ */ r(K, { children: E.map((e) => {
|
|
165
|
+
const i = n.includes(e.value);
|
|
142
166
|
return /* @__PURE__ */ l(
|
|
143
|
-
|
|
167
|
+
Q,
|
|
144
168
|
{
|
|
145
169
|
value: e.value,
|
|
146
|
-
disabled: e.disabled || !i &&
|
|
170
|
+
disabled: e.disabled || !i && C,
|
|
147
171
|
onSelect: () => w(e.value),
|
|
148
|
-
className:
|
|
149
|
-
"aria-selected
|
|
150
|
-
(e.disabled || !i &&
|
|
172
|
+
className: p(
|
|
173
|
+
"aria-selected:!bg-d-accent aria-selected:text-d-accent-foreground flex cursor-pointer items-center gap-2 px-2 py-1.5",
|
|
174
|
+
(e.disabled || !i && C) && "cursor-not-allowed opacity-50"
|
|
151
175
|
),
|
|
152
|
-
onPointerDown: (A) => A.stopPropagation(),
|
|
153
176
|
children: [
|
|
154
177
|
/* @__PURE__ */ r(
|
|
155
|
-
|
|
178
|
+
Y,
|
|
156
179
|
{
|
|
157
180
|
checked: i,
|
|
158
|
-
className: "mr-2 flex-shrink-0",
|
|
181
|
+
className: "z-10 mr-2 flex-shrink-0",
|
|
159
182
|
onCheckedChange: () => {
|
|
160
183
|
console.log("checkbox change for:", e.value), w(e.value);
|
|
161
184
|
}
|
|
@@ -168,14 +191,14 @@ function ie({
|
|
|
168
191
|
);
|
|
169
192
|
}) })
|
|
170
193
|
] })
|
|
171
|
-
] })
|
|
194
|
+
] })
|
|
172
195
|
}
|
|
173
196
|
)
|
|
174
|
-
]
|
|
197
|
+
] })
|
|
175
198
|
}
|
|
176
199
|
)
|
|
177
200
|
] }) });
|
|
178
201
|
}
|
|
179
202
|
export {
|
|
180
|
-
|
|
203
|
+
me as AppMultipleSelectDropdown
|
|
181
204
|
};
|