laif-ds 0.2.2 → 0.2.3
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/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/ui/app-multiple-select-dropdown.js +18 -18
- package/dist/index.d.ts +3 -3
- 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/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/package.json +1 -1
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 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,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var t =
|
|
5
|
-
const
|
|
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);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
x 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 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/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -15,9 +15,9 @@ import { selectTriggerVariants as Z } from "./async-select.js";
|
|
|
15
15
|
import _ from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
16
16
|
const ee = t.createContext({ size: "default" });
|
|
17
17
|
function pe({
|
|
18
|
-
options:
|
|
18
|
+
options: a,
|
|
19
19
|
value: n,
|
|
20
|
-
onChange:
|
|
20
|
+
onChange: o,
|
|
21
21
|
onClear: g,
|
|
22
22
|
placeholder: y = "Seleziona...",
|
|
23
23
|
disabled: k = !1,
|
|
@@ -26,36 +26,36 @@ function pe({
|
|
|
26
26
|
labelClassName: z,
|
|
27
27
|
emptyMessage: M = "Nessun risultato trovato",
|
|
28
28
|
className: P,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
searchPlaceholder: R = "Cerca...",
|
|
30
|
+
searchable: j = !0,
|
|
31
31
|
cancelLabel: D = "Cancella selezione",
|
|
32
32
|
cancelButtonLabel: O = "Cancella",
|
|
33
|
-
maxSelectedItems:
|
|
33
|
+
maxSelectedItems: i
|
|
34
34
|
}) {
|
|
35
|
-
const p = t.useId(), [
|
|
35
|
+
const p = t.useId(), [s, S] = t.useState(!1), [d, v] = t.useState(""), [L, B] = t.useState(
|
|
36
36
|
void 0
|
|
37
37
|
), T = t.useRef(null), h = t.useRef(null), w = t.useCallback(
|
|
38
38
|
(e) => {
|
|
39
39
|
if (n.includes(e))
|
|
40
|
-
|
|
40
|
+
o(n.filter((c) => c !== e));
|
|
41
41
|
else {
|
|
42
|
-
if (
|
|
42
|
+
if (i && n.length >= i)
|
|
43
43
|
return;
|
|
44
|
-
|
|
44
|
+
o([...n, e]);
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
[n,
|
|
47
|
+
[n, o, i]
|
|
48
48
|
), x = t.useCallback(() => {
|
|
49
|
-
|
|
50
|
-
}, [
|
|
49
|
+
o([]), v(""), g && g();
|
|
50
|
+
}, [o]), u = t.useMemo(() => a.filter((e) => n.includes(e.value)), [a, n]), W = t.useMemo(() => d ? a.filter(
|
|
51
51
|
(e) => e.label.toLowerCase().includes(d.toLowerCase())
|
|
52
|
-
) :
|
|
52
|
+
) : a, [a, d]), C = t.useMemo(() => i ? n.length >= i : !1, [n, i]);
|
|
53
53
|
return E(() => {
|
|
54
|
-
if (
|
|
54
|
+
if (s && h.current) {
|
|
55
55
|
const e = h.current.getBoundingClientRect();
|
|
56
56
|
B(e.width);
|
|
57
57
|
}
|
|
58
|
-
}, [
|
|
58
|
+
}, [s]), /* @__PURE__ */ r(ee.Provider, { value: { size: f, id: p }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
|
|
59
59
|
b && /* @__PURE__ */ r(F, { htmlFor: p, className: m(z, "w-fit"), children: b }),
|
|
60
60
|
/* @__PURE__ */ r(
|
|
61
61
|
"div",
|
|
@@ -63,14 +63,14 @@ function pe({
|
|
|
63
63
|
ref: T,
|
|
64
64
|
className: "relative w-full",
|
|
65
65
|
"data-slot": "app-multiple-select-dropdown",
|
|
66
|
-
children: /* @__PURE__ */ l(X, { open:
|
|
66
|
+
children: /* @__PURE__ */ l(X, { open: s, onOpenChange: S, children: [
|
|
67
67
|
/* @__PURE__ */ r($, { asChild: !0, children: /* @__PURE__ */ l(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
id: p,
|
|
71
71
|
type: "button",
|
|
72
72
|
role: "combobox",
|
|
73
|
-
"aria-expanded":
|
|
73
|
+
"aria-expanded": s,
|
|
74
74
|
disabled: k,
|
|
75
75
|
ref: h,
|
|
76
76
|
className: m(
|
|
@@ -79,7 +79,7 @@ function pe({
|
|
|
79
79
|
"ring-offset-background border-d-border/50 flex items-center rounded-md border whitespace-nowrap focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
80
80
|
"aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
|
|
81
81
|
"focus-visible:ring-d-ring focus-visible:ring-1",
|
|
82
|
-
|
|
82
|
+
s && "ring-d-ring ring-1",
|
|
83
83
|
P
|
|
84
84
|
),
|
|
85
85
|
children: [
|
package/dist/index.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ declare interface AppEditorProps {
|
|
|
143
143
|
|
|
144
144
|
declare type AppEditorToolbar = "block-format" | "font-format" | "history";
|
|
145
145
|
|
|
146
|
-
export declare function AppMultipleSelectDropdown({ options, value, onChange, onClear, placeholder, disabled, size, label, labelClassName, emptyMessage, className,
|
|
146
|
+
export declare function AppMultipleSelectDropdown({ options, value, onChange, onClear, placeholder, disabled, size, label, labelClassName, emptyMessage, className, searchPlaceholder, searchable, cancelLabel, cancelButtonLabel, maxSelectedItems, }: MultipleSelectDropdownProps): JSX.Element;
|
|
147
147
|
|
|
148
148
|
export declare interface AppMultipleSelectOption {
|
|
149
149
|
value: string;
|
|
@@ -1205,8 +1205,8 @@ declare interface MultipleSelectDropdownProps {
|
|
|
1205
1205
|
labelClassName?: string;
|
|
1206
1206
|
emptyMessage?: string;
|
|
1207
1207
|
className?: string;
|
|
1208
|
-
|
|
1209
|
-
|
|
1208
|
+
searchPlaceholder?: string;
|
|
1209
|
+
searchable?: boolean;
|
|
1210
1210
|
maxSelectedItems?: number;
|
|
1211
1211
|
cancelLabel?: string;
|
|
1212
1212
|
cancelButtonLabel?: string;
|
|
@@ -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";
|