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.
@@ -1,8 +1,8 @@
1
1
  "use client";
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);
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
- m as default
7
+ a as default
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
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);
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
- a as default
7
+ x as default
8
8
  };
@@ -1,8 +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
+ import { __require as t } from "../node_modules/eventemitter3/index2.js";
4
+ var r = t();
5
+ const m = /* @__PURE__ */ e(r);
6
6
  export {
7
- x as default
7
+ m as default
8
8
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- var e = { exports: {} };
2
+ var e = {};
3
3
  export {
4
- e as __module
4
+ e as __exports
5
5
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- var e = {};
2
+ var e = { exports: {} };
3
3
  export {
4
- e as __exports
4
+ e as __module
5
5
  };
@@ -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: i,
18
+ options: a,
19
19
  value: n,
20
- onChange: s,
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
- filterPlaceholder: R = "Cerca...",
30
- filterable: j = !1,
29
+ searchPlaceholder: R = "Cerca...",
30
+ searchable: j = !0,
31
31
  cancelLabel: D = "Cancella selezione",
32
32
  cancelButtonLabel: O = "Cancella",
33
- maxSelectedItems: a
33
+ maxSelectedItems: i
34
34
  }) {
35
- const p = t.useId(), [o, S] = t.useState(!1), [d, v] = t.useState(""), [L, B] = t.useState(
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
- s(n.filter((c) => c !== e));
40
+ o(n.filter((c) => c !== e));
41
41
  else {
42
- if (a && n.length >= a)
42
+ if (i && n.length >= i)
43
43
  return;
44
- s([...n, e]);
44
+ o([...n, e]);
45
45
  }
46
46
  },
47
- [n, s, a]
47
+ [n, o, i]
48
48
  ), x = t.useCallback(() => {
49
- s([]), v(""), g && g();
50
- }, [s]), u = t.useMemo(() => i.filter((e) => n.includes(e.value)), [i, n]), W = t.useMemo(() => d ? i.filter(
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
- ) : i, [i, d]), C = t.useMemo(() => a ? n.length >= a : !1, [n, a]);
52
+ ) : a, [a, d]), C = t.useMemo(() => i ? n.length >= i : !1, [n, i]);
53
53
  return E(() => {
54
- if (o && h.current) {
54
+ if (s && h.current) {
55
55
  const e = h.current.getBoundingClientRect();
56
56
  B(e.width);
57
57
  }
58
- }, [o]), /* @__PURE__ */ r(ee.Provider, { value: { size: f, id: p }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
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: o, onOpenChange: S, children: [
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": o,
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
- o && "ring-d-ring ring-1",
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, filterPlaceholder, filterable, cancelLabel, cancelButtonLabel, maxSelectedItems, }: MultipleSelectDropdownProps): JSX.Element;
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
- filterPlaceholder?: string;
1209
- filterable?: boolean;
1208
+ searchPlaceholder?: string;
1209
+ searchable?: boolean;
1210
1210
  maxSelectedItems?: number;
1211
1211
  cancelLabel?: string;
1212
1212
  cancelButtonLabel?: string;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import e from "../../_virtual/index3.js";
2
+ import e from "../../_virtual/index5.js";
3
3
  export {
4
4
  e as EventEmitter,
5
5
  e as default
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { __module as x } from "../../_virtual/index6.js";
2
+ import { __module as x } from "../../_virtual/index7.js";
3
3
  var w;
4
4
  function O() {
5
5
  return w ? x.exports : (w = 1, function(d) {
@@ -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/index4.js";
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,5 +1,5 @@
1
1
  "use client";
2
- import e from "../../../../_virtual/index3.js";
2
+ import e from "../../../../_virtual/index5.js";
3
3
  var r = new e(), n = "recharts.syncEvent.tooltip";
4
4
  export {
5
5
  n as TOOLTIP_SYNC_EVENT,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { __exports as r } from "../../../_virtual/index7.js";
2
+ import { __exports as r } from "../../../_virtual/index6.js";
3
3
  import { __require as c } from "../../inline-style-parser/index.js";
4
4
  var f;
5
5
  function j() {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { bail as P } from "../../bail/index.js";
3
- import y from "../../../_virtual/index5.js";
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";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "laif-ds",
3
3
  "private": false,
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",