laif-ds 0.1.80 → 0.1.81
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/index.js +3 -5
- package/dist/_virtual/index2.js +2 -5
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -2
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index7.js +2 -3
- package/dist/components/ui/app-multiple-select-dropdown.js +70 -69
- package/dist/index.d.ts +2 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +1 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.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/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/package.json +1 -1
package/dist/_virtual/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var r = t();
|
|
5
|
-
const m = /* @__PURE__ */ e(r);
|
|
2
|
+
import { __require as r } from "../node_modules/use-sync-external-store/shim/index.js";
|
|
3
|
+
var i = r();
|
|
6
4
|
export {
|
|
7
|
-
|
|
5
|
+
i as s
|
|
8
6
|
};
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
-
var t = e();
|
|
5
|
-
const a = /* @__PURE__ */ r(t);
|
|
2
|
+
var e = { exports: {} };
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
e as __module
|
|
8
5
|
};
|
package/dist/_virtual/index3.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/index4.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
4
|
+
var t = r();
|
|
5
|
+
const x = /* @__PURE__ */ e(t);
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
x as default
|
|
5
8
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
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);
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
m as default
|
|
5
8
|
};
|
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as l, Fragment as
|
|
2
|
+
import { jsx as r, jsxs as l, Fragment as B } from "react/jsx-runtime";
|
|
3
3
|
import * as n from "react";
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Label as
|
|
6
|
-
import { Badge as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Command as
|
|
9
|
-
import { inputVariants as
|
|
10
|
-
import { Checkbox as
|
|
11
|
-
import { Icon as
|
|
12
|
-
import { CommandPortal as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
16
|
-
function
|
|
4
|
+
import { cn as C } from "../../lib/utils.js";
|
|
5
|
+
import { Label as F } from "./label.js";
|
|
6
|
+
import { Badge as E } from "./badge.js";
|
|
7
|
+
import { Button as y } from "./button.js";
|
|
8
|
+
import { Command as G, CommandList as V, CommandEmpty as X, CommandGroup as $, CommandItem as q } from "./command.js";
|
|
9
|
+
import { inputVariants as H } from "./input.js";
|
|
10
|
+
import { Checkbox as I } from "./checkbox.js";
|
|
11
|
+
import { Icon as J } from "./icon.js";
|
|
12
|
+
import { CommandPortal as K } from "./command-portal.js";
|
|
13
|
+
import Q from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
14
|
+
import T from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
15
|
+
const U = n.createContext({ size: "default" });
|
|
16
|
+
function ie({
|
|
17
17
|
options: s,
|
|
18
18
|
value: a,
|
|
19
19
|
onChange: o,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
onClear: f,
|
|
21
|
+
placeholder: k = "Seleziona...",
|
|
22
|
+
disabled: z = !1,
|
|
23
|
+
size: p = "default",
|
|
24
|
+
label: h,
|
|
25
|
+
labelClassName: M,
|
|
26
|
+
emptyMessage: j = "Nessun risultato trovato",
|
|
27
|
+
className: P,
|
|
28
|
+
filterPlaceholder: D = "Cerca...",
|
|
29
|
+
filterable: L = !1,
|
|
30
|
+
cancelLabel: R = "Cancella selezione",
|
|
31
|
+
cancelButtonLabel: S = "Cancella",
|
|
31
32
|
maxSelectedItems: t
|
|
32
33
|
}) {
|
|
33
|
-
const m = n.useId(), [u,
|
|
34
|
+
const m = n.useId(), [u, b] = n.useState(!1), [d, g] = n.useState(""), v = n.useRef(null), w = n.useCallback(
|
|
34
35
|
(e) => {
|
|
35
36
|
if (a.includes(e))
|
|
36
37
|
o(a.filter((i) => i !== e));
|
|
@@ -41,40 +42,40 @@ function oe({
|
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
[a, o, t]
|
|
44
|
-
),
|
|
45
|
-
o([]),
|
|
46
|
-
}, [o]), c = n.useMemo(() => s.filter((e) => a.includes(e.value)), [s, a]),
|
|
45
|
+
), x = n.useCallback(() => {
|
|
46
|
+
o([]), g(""), f && f();
|
|
47
|
+
}, [o]), c = n.useMemo(() => s.filter((e) => a.includes(e.value)), [s, a]), O = n.useMemo(() => d ? s.filter(
|
|
47
48
|
(e) => e.label.toLowerCase().includes(d.toLowerCase())
|
|
48
|
-
) : s, [s, d]),
|
|
49
|
-
return /* @__PURE__ */ r(
|
|
50
|
-
|
|
49
|
+
) : s, [s, d]), N = n.useMemo(() => t ? a.length >= t : !1, [a, t]);
|
|
50
|
+
return /* @__PURE__ */ r(U.Provider, { value: { size: p, id: m }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
51
|
+
h && /* @__PURE__ */ r(F, { htmlFor: m, className: M, children: h }),
|
|
51
52
|
/* @__PURE__ */ l(
|
|
52
53
|
"div",
|
|
53
54
|
{
|
|
54
|
-
ref:
|
|
55
|
+
ref: v,
|
|
55
56
|
className: "relative w-full",
|
|
56
57
|
"data-slot": "app-multiple-select-dropdown",
|
|
57
58
|
children: [
|
|
58
59
|
/* @__PURE__ */ l(
|
|
59
|
-
|
|
60
|
+
y,
|
|
60
61
|
{
|
|
61
62
|
id: m,
|
|
62
63
|
type: "button",
|
|
63
64
|
variant: "outline",
|
|
64
65
|
role: "combobox",
|
|
65
66
|
"aria-expanded": u,
|
|
66
|
-
disabled:
|
|
67
|
-
className:
|
|
67
|
+
disabled: z,
|
|
68
|
+
className: C(
|
|
68
69
|
"!bg-d-input relative w-full justify-between border font-normal",
|
|
69
70
|
"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",
|
|
70
71
|
"aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
|
|
71
|
-
|
|
72
|
+
P
|
|
72
73
|
),
|
|
73
|
-
onClick: () =>
|
|
74
|
+
onClick: () => b(!u),
|
|
74
75
|
children: [
|
|
75
|
-
/* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children: c.length > 0 ? /* @__PURE__ */ l(
|
|
76
|
+
/* @__PURE__ */ r("div", { className: "flex w-full items-center gap-2 overflow-hidden", children: c.length > 0 ? /* @__PURE__ */ l(B, { children: [
|
|
76
77
|
/* @__PURE__ */ l(
|
|
77
|
-
|
|
78
|
+
E,
|
|
78
79
|
{
|
|
79
80
|
variant: "secondary",
|
|
80
81
|
className: "flex items-center gap-1",
|
|
@@ -89,74 +90,74 @@ function oe({
|
|
|
89
90
|
{
|
|
90
91
|
className: "hover:bg-d-secondary flex h-5 w-5 items-center justify-center gap-1 rounded-full p-0",
|
|
91
92
|
onClick: (e) => {
|
|
92
|
-
e.stopPropagation(), e.preventDefault(),
|
|
93
|
+
e.stopPropagation(), e.preventDefault(), x();
|
|
93
94
|
},
|
|
94
95
|
children: [
|
|
95
|
-
/* @__PURE__ */ r(
|
|
96
|
-
/* @__PURE__ */ r("span", { className: "sr-only", children:
|
|
96
|
+
/* @__PURE__ */ r(Q, { className: "h-3 w-3" }),
|
|
97
|
+
/* @__PURE__ */ r("span", { className: "sr-only", children: R })
|
|
97
98
|
]
|
|
98
99
|
}
|
|
99
100
|
)
|
|
100
|
-
] }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground", children:
|
|
101
|
-
/* @__PURE__ */ r(
|
|
101
|
+
] }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground", children: k }) }),
|
|
102
|
+
/* @__PURE__ */ r(T, { className: "ml-1 h-4 w-4 shrink-0 opacity-50" })
|
|
102
103
|
]
|
|
103
104
|
}
|
|
104
105
|
),
|
|
105
106
|
/* @__PURE__ */ r(
|
|
106
|
-
|
|
107
|
+
K,
|
|
107
108
|
{
|
|
108
109
|
open: u,
|
|
109
|
-
triggerRef:
|
|
110
|
-
onClose: () =>
|
|
111
|
-
children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ l(
|
|
112
|
-
|
|
110
|
+
triggerRef: v,
|
|
111
|
+
onClose: () => b(!1),
|
|
112
|
+
children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ l(G, { className: "bg-d-popover border-d-border w-full rounded-md border shadow-md", children: [
|
|
113
|
+
L && /* @__PURE__ */ l("div", { className: "border-d-border flex items-center justify-between border-b px-3", children: [
|
|
113
114
|
/* @__PURE__ */ l("div", { className: "flex items-center", children: [
|
|
114
|
-
/* @__PURE__ */ r(
|
|
115
|
+
/* @__PURE__ */ r(J, { name: "Search", className: "text-d-accent", size: "sm" }),
|
|
115
116
|
/* @__PURE__ */ r(
|
|
116
117
|
"input",
|
|
117
118
|
{
|
|
118
119
|
id: "app-multiple-select-dropdown-filter",
|
|
119
|
-
placeholder:
|
|
120
|
+
placeholder: D,
|
|
120
121
|
value: d,
|
|
121
|
-
onChange: (e) =>
|
|
122
|
-
className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${
|
|
122
|
+
onChange: (e) => g(e.target.value),
|
|
123
|
+
className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${H({ size: p })} !shadow-none`
|
|
123
124
|
}
|
|
124
125
|
)
|
|
125
126
|
] }),
|
|
126
127
|
c.length > 0 && /* @__PURE__ */ r(
|
|
127
|
-
|
|
128
|
+
y,
|
|
128
129
|
{
|
|
129
130
|
variant: "ghost",
|
|
130
131
|
size: "sm",
|
|
131
132
|
className: "h-6 px-2 text-xs",
|
|
132
|
-
onClick:
|
|
133
|
-
children:
|
|
133
|
+
onClick: x,
|
|
134
|
+
children: S
|
|
134
135
|
}
|
|
135
136
|
)
|
|
136
137
|
] }),
|
|
137
|
-
/* @__PURE__ */ l(
|
|
138
|
-
/* @__PURE__ */ r(
|
|
139
|
-
/* @__PURE__ */ r(
|
|
138
|
+
/* @__PURE__ */ l(V, { className: "max-h-60 w-full overflow-auto", children: [
|
|
139
|
+
/* @__PURE__ */ r(X, { children: j }),
|
|
140
|
+
/* @__PURE__ */ r($, { children: O.map((e) => {
|
|
140
141
|
const i = a.includes(e.value);
|
|
141
142
|
return /* @__PURE__ */ l(
|
|
142
|
-
|
|
143
|
+
q,
|
|
143
144
|
{
|
|
144
145
|
value: e.value,
|
|
145
|
-
disabled: e.disabled || !i &&
|
|
146
|
-
onSelect: () =>
|
|
147
|
-
className:
|
|
146
|
+
disabled: e.disabled || !i && N,
|
|
147
|
+
onSelect: () => w(e.value),
|
|
148
|
+
className: C(
|
|
148
149
|
"aria-selected:bg-d-accent aria-selected:text-d-accent-foreground flex cursor-pointer items-center gap-2 px-2 py-1.5",
|
|
149
|
-
(e.disabled || !i &&
|
|
150
|
+
(e.disabled || !i && N) && "cursor-not-allowed opacity-50"
|
|
150
151
|
),
|
|
151
|
-
onPointerDown: (
|
|
152
|
+
onPointerDown: (A) => A.stopPropagation(),
|
|
152
153
|
children: [
|
|
153
154
|
/* @__PURE__ */ r(
|
|
154
|
-
|
|
155
|
+
I,
|
|
155
156
|
{
|
|
156
157
|
checked: i,
|
|
157
158
|
className: "mr-2 flex-shrink-0",
|
|
158
159
|
onCheckedChange: () => {
|
|
159
|
-
console.log("checkbox change for:", e.value),
|
|
160
|
+
console.log("checkbox change for:", e.value), w(e.value);
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
),
|
|
@@ -176,5 +177,5 @@ function oe({
|
|
|
176
177
|
] }) });
|
|
177
178
|
}
|
|
178
179
|
export {
|
|
179
|
-
|
|
180
|
+
ie as AppMultipleSelectDropdown
|
|
180
181
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ declare interface AppEditorProps {
|
|
|
142
142
|
|
|
143
143
|
declare type AppEditorToolbar = "block-format" | "font-format" | "history";
|
|
144
144
|
|
|
145
|
-
export declare function AppMultipleSelectDropdown({ options, value, onChange, placeholder, disabled, size, label, labelClassName, emptyMessage, className, filterPlaceholder, filterable, cancelLabel, cancelButtonLabel, maxSelectedItems, }: MultipleSelectDropdownProps): JSX.Element;
|
|
145
|
+
export declare function AppMultipleSelectDropdown({ options, value, onChange, onClear, placeholder, disabled, size, label, labelClassName, emptyMessage, className, filterPlaceholder, filterable, cancelLabel, cancelButtonLabel, maxSelectedItems, }: MultipleSelectDropdownProps): JSX.Element;
|
|
146
146
|
|
|
147
147
|
export declare interface AppMultipleSelectOption {
|
|
148
148
|
value: string;
|
|
@@ -1143,6 +1143,7 @@ declare interface MultipleSelectDropdownProps {
|
|
|
1143
1143
|
options: AppMultipleSelectOption[];
|
|
1144
1144
|
value: string[];
|
|
1145
1145
|
onChange: (value: string[]) => void;
|
|
1146
|
+
onClear?: () => void;
|
|
1146
1147
|
placeholder?: string;
|
|
1147
1148
|
disabled?: boolean;
|
|
1148
1149
|
size?: MultipleSelectSizeType;
|
|
@@ -3,7 +3,7 @@ import { stringify as w } from "../../comma-separated-tokens/index.js";
|
|
|
3
3
|
import { ok as u } from "../../devlop/lib/default.js";
|
|
4
4
|
import { svg as m, html as C } from "../../property-information/index.js";
|
|
5
5
|
import { stringify as N } from "../../space-separated-tokens/index.js";
|
|
6
|
-
import S from "../../../_virtual/
|
|
6
|
+
import S from "../../../_virtual/index3.js";
|
|
7
7
|
import { whitespace as j } from "../../hast-util-whitespace/lib/index.js";
|
|
8
8
|
import { name as x } from "../../estree-util-is-identifier-name/lib/index.js";
|
|
9
9
|
import { VFileMessage as h } from "../../vfile-message/lib/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { bail as P } from "../../bail/index.js";
|
|
3
|
-
import y from "../../../_virtual/
|
|
3
|
+
import y from "../../../_virtual/index4.js";
|
|
4
4
|
import z from "../../is-plain-obj/index.js";
|
|
5
5
|
import { CallableInstance as C } from "./callable-instance.js";
|
|
6
6
|
import { trough as A } from "../../trough/lib/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { __module as e } from "../../../_virtual/
|
|
2
|
+
import { __module as e } from "../../../_virtual/index2.js";
|
|
3
3
|
import { __require as i } from "../cjs/use-sync-external-store-shim.production.js";
|
|
4
4
|
import { __require as o } from "../cjs/use-sync-external-store-shim.development.js";
|
|
5
5
|
var r;
|