laif-ds 0.1.50 → 0.1.52

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,6 +1,3 @@
1
1
  "use client";
2
- import { __require as r } from "../node_modules/use-sync-external-store/shim/index.js";
3
- var i = r();
4
- export {
5
- i as s
6
- };
2
+ import { __require as e } from "../node_modules/react-is/index.js";
3
+ e();
@@ -1,3 +1,6 @@
1
1
  "use client";
2
- import { __require as e } from "../node_modules/react-is/index.js";
3
- e();
2
+ import { __require as r } from "../node_modules/use-sync-external-store/shim/index.js";
3
+ var i = r();
4
+ export {
5
+ i as s
6
+ };
@@ -7,7 +7,7 @@ import { cva as _ } from "../../node_modules/class-variance-authority/dist/index
7
7
  import { cn as k } from "../../lib/utils.js";
8
8
  import { Button as V } from "./button.js";
9
9
  import { Label as ee } from "./label.js";
10
- import { Command as te, CommandInput as oe, CommandList as se, CommandEmpty as ne, CommandGroup as O, CommandItem as A } from "./command.js";
10
+ import { Command as te, CommandInput as oe, CommandList as se, CommandEmpty as ne, CommandGroup as O, CommandItem as R } from "./command.js";
11
11
  import { Popover as re, PopoverTrigger as ae, PopoverContent as ce } from "./popover.js";
12
12
  import ie from "../../node_modules/lucide-react/dist/esm/icons/x.js";
13
13
  import le from "../../node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js";
@@ -32,10 +32,10 @@ function ke({
32
32
  fetcher: i,
33
33
  preload: m,
34
34
  filterFn: x,
35
- renderOption: F,
35
+ renderOption: A,
36
36
  getOptionValue: a,
37
37
  getDisplayValue: w,
38
- notFound: R,
38
+ notFound: F,
39
39
  loadingSkeleton: $,
40
40
  label: l,
41
41
  labelClassName: B,
@@ -50,7 +50,7 @@ function ke({
50
50
  clearable: v = !0,
51
51
  size: q
52
52
  }) {
53
- const [u, N] = c(!1), [r, d] = c([]), [C, h] = c(!1), [b, g] = c(null), [S, y] = c(null), [I, H] = c(""), f = Z(I, m ? 0 : 300), [L, P] = c([]);
53
+ const [u, N] = c(!1), [r, d] = c([]), [b, h] = c(!1), [C, g] = c(null), [S, y] = c(null), [I, H] = c(""), f = Z(I, m ? 0 : 300), [L, P] = c([]);
54
54
  j(() => ((async () => {
55
55
  try {
56
56
  if (h(!0), g(null), m) {
@@ -75,9 +75,7 @@ function ke({
75
75
  }), [i, n, m]), j(() => {
76
76
  if (u)
77
77
  if (m)
78
- if (console.log(
79
- "[AsyncSelect] Filtraggio locale dei dati con preload attivo"
80
- ), f) {
78
+ if (f) {
81
79
  const t = L.filter(
82
80
  (o) => x ? x(o, f) : String(w(o)).toLowerCase().includes(f.toLowerCase())
83
81
  );
@@ -126,10 +124,11 @@ function ke({
126
124
  return /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
127
125
  l && /* @__PURE__ */ e(ee, { htmlFor: T, className: B, children: l }),
128
126
  /* @__PURE__ */ s(re, { open: u, onOpenChange: N, children: [
129
- /* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
127
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
130
128
  V,
131
129
  {
132
130
  id: T,
131
+ type: "button",
133
132
  variant: "ghost",
134
133
  role: "combobox",
135
134
  "aria-expanded": u,
@@ -176,19 +175,19 @@ function ke({
176
175
  }
177
176
  }
178
177
  ),
179
- C && r.length > 0 && /* @__PURE__ */ e("div", { className: "absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center", children: /* @__PURE__ */ e(de, { className: "h-4 w-4 animate-spin" }) })
178
+ b && r.length > 0 && /* @__PURE__ */ e("div", { className: "absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center", children: /* @__PURE__ */ e(de, { className: "h-4 w-4 animate-spin" }) })
180
179
  ] }),
181
180
  /* @__PURE__ */ s(se, { children: [
182
- b && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: b }),
183
- C && r.length === 0 && ($ || /* @__PURE__ */ e(pe, {})),
184
- !C && !b && r.length === 0 && (R || /* @__PURE__ */ e(ne, { children: X ?? `No ${typeof l == "string" ? l.toLowerCase() : "options"} found.` })),
181
+ C && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: C }),
182
+ b && r.length === 0 && ($ || /* @__PURE__ */ e(pe, {})),
183
+ !b && !C && r.length === 0 && (F || /* @__PURE__ */ e(ne, { children: X ?? `No ${typeof l == "string" ? l.toLowerCase() : "options"} found.` })),
185
184
  /* @__PURE__ */ e(O, { children: r.map((t) => /* @__PURE__ */ s(
186
- A,
185
+ R,
187
186
  {
188
187
  value: a(t),
189
188
  onSelect: J,
190
189
  children: [
191
- F(t),
190
+ A(t),
192
191
  /* @__PURE__ */ e(
193
192
  me,
194
193
  {
@@ -210,7 +209,7 @@ function ke({
210
209
  ] });
211
210
  }
212
211
  function pe() {
213
- return /* @__PURE__ */ e(O, { children: [1, 2, 3].map((i) => /* @__PURE__ */ e(A, { disabled: !0, children: /* @__PURE__ */ s("div", { className: "flex w-full items-center gap-2", children: [
212
+ return /* @__PURE__ */ e(O, { children: [1, 2, 3].map((i) => /* @__PURE__ */ e(R, { disabled: !0, children: /* @__PURE__ */ s("div", { className: "flex w-full items-center gap-2", children: [
214
213
  /* @__PURE__ */ e("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
215
214
  /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col gap-1", children: [
216
215
  /* @__PURE__ */ e("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { s as e } from "../../../../_virtual/index.js";
2
+ import { s as e } from "../../../../_virtual/index3.js";
3
3
  function s() {
4
4
  return e.useSyncExternalStore(
5
5
  r,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { __module as e } from "../../_virtual/index4.js";
2
+ import { __module as e } from "../../_virtual/index2.js";
3
3
  import { __require as t } from "./cjs/react-is.production.min.js";
4
4
  import { __require as o } from "./cjs/react-is.development.js";
5
5
  var r;
@@ -5,7 +5,7 @@ import "../../../../_virtual/isString.js";
5
5
  import f from "../../../../_virtual/isFunction.js";
6
6
  import s from "../../../../_virtual/isObject.js";
7
7
  import { isValidElement as d } from "react";
8
- import "../../../../_virtual/index3.js";
8
+ import "../../../../_virtual/index.js";
9
9
  import { SVGElementPropKeys as m, EventKeys as p, FilteredElementKeyMap as o } from "./types.js";
10
10
  var h = function(i) {
11
11
  return typeof i == "string" ? i : i ? i.displayName || i.name || "Component" : "";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { __module as e } from "../../../_virtual/index2.js";
2
+ import { __module as e } from "../../../_virtual/index4.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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "laif-ds",
3
3
  "private": false,
4
- "version": "0.1.50",
4
+ "version": "0.1.52",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",