laif-ds 0.1.97 → 0.1.98

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 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 t } from "../node_modules/eventemitter3/index2.js";
4
+ var r = t();
5
+ const m = /* @__PURE__ */ e(r);
6
6
  export {
7
- a as default
7
+ m as default
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
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);
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
- x as default
7
+ a 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 t } from "../node_modules/eventemitter3/index2.js";
4
- var r = t();
5
- const m = /* @__PURE__ */ e(r);
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
- m as default
7
+ x as default
8
8
  };
@@ -1,17 +1,18 @@
1
1
  "use client";
2
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
3
- import * as h from "react";
4
- import { useState as p, useEffect as C, useCallback as O } from "react";
5
- import { useDebounce as te } from "../../hooks/use-debounce.js";
6
- import { cva as ne } from "../../node_modules/class-variance-authority/dist/index.js";
7
- import { cn as v } from "../../lib/utils.js";
8
- import { Label as re } from "./label.js";
9
- import { Popover as se, PopoverTrigger as ae, PopoverContent as oe } from "./popover.js";
10
- import { Command as le, CommandInput as ie, CommandList as ce, CommandEmpty as de, CommandGroup as $, CommandItem as A } from "./command.js";
11
- import { Icon as K } from "./icon.js";
12
- import fe from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
13
- import me from "../../node_modules/lucide-react/dist/esm/icons/check.js";
14
- const ue = ne(
2
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
3
+ import * as A from "react";
4
+ import { useState as N, useEffect as j, useCallback as $ } from "react";
5
+ import { useDebounce as ae } from "../../hooks/use-debounce.js";
6
+ import { cva as ce } from "../../node_modules/class-variance-authority/dist/index.js";
7
+ import { cn as L } from "../../lib/utils.js";
8
+ import { Label as le } from "./label.js";
9
+ import { Popover as ie, PopoverTrigger as de, PopoverContent as fe } from "./popover.js";
10
+ import { Command as me, CommandInput as ue, CommandList as he, CommandEmpty as pe, CommandGroup as q, CommandItem as H } from "./command.js";
11
+ import { Icon as X } from "./icon.js";
12
+ import { Checkbox as ge } from "./checkbox.js";
13
+ import xe from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
14
+ import we from "../../node_modules/lucide-react/dist/esm/icons/check.js";
15
+ const ye = ce(
15
16
  "flex items-center justify-between whitespace-nowrap rounded-md border border-d-input bg-d-input px-3 py-2 data-[placeholder]:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",
16
17
  {
17
18
  variants: {
@@ -26,141 +27,157 @@ const ue = ne(
26
27
  }
27
28
  }
28
29
  );
29
- function _e({
30
- fetcher: i,
31
- preload: g,
32
- filterFn: S,
33
- renderOption: M,
34
- getOptionValue: x,
35
- getDisplayValue: N,
36
- notFound: B,
37
- loadingSkeleton: G,
38
- label: T,
39
- labelClassName: U,
40
- placeholder: P = "Select...",
41
- value: c = "",
42
- onChange: y,
43
- disabled: z = !1,
44
- width: w = "200px",
45
- triggerClassName: X,
46
- noResultsMessage: q,
47
- clearable: R = !0,
48
- size: H
30
+ function De({
31
+ fetcher: a,
32
+ preload: c,
33
+ filterFn: f,
34
+ renderOption: k,
35
+ getOptionValue: m,
36
+ getDisplayValue: s,
37
+ notFound: u,
38
+ loadingSkeleton: M,
39
+ label: h,
40
+ labelClassName: p,
41
+ placeholder: _ = "Select...",
42
+ value: r,
43
+ onChange: i,
44
+ disabled: T = !1,
45
+ width: x = "200px",
46
+ triggerClassName: z,
47
+ noResultsMessage: D,
48
+ clearable: b = !0,
49
+ multiple: l = !1,
50
+ size: J
49
51
  }) {
50
- const [a, _] = p(!1), d = w === "auto", j = h.useRef(null), L = h.useRef(null), J = h.useRef(null), Q = h.useRef(null), [o, f] = p({ loading: !1, error: null }), [E, Y] = p(""), m = te(E, g ? 0 : 300), [b, k] = p(/* @__PURE__ */ new Map()), [l, u] = p([]), [F, Z] = p(
52
+ const [g, O] = N(!1), C = x === "auto", P = A.useRef(null), E = A.useRef(null), Q = A.useRef(null), Y = A.useRef(null), [Z, v] = N({ loading: !1, error: null }), [K, V] = N(""), S = ae(K, c ? 0 : 300), [I, F] = N(/* @__PURE__ */ new Map()), [w, R] = N([]), [B, ee] = N(
51
53
  void 0
52
- ), D = h.useMemo(() => !c || l.length === 0 ? null : l.find((e) => x(e) === c) || null, [c, l, x]);
53
- C(() => ((async () => {
54
+ ), [G, ne] = N([]), W = A.useMemo(() => l || !r || w.length === 0 ? null : w.find((n) => m(n) === r) || null, [r, w, m, l]);
55
+ j(() => {
56
+ if (l && Array.isArray(r) && w.length > 0) {
57
+ const n = w.filter(
58
+ (t) => r.includes(m(t))
59
+ );
60
+ ne(n);
61
+ }
62
+ }, [r, w, m, l]), j(() => ((async () => {
54
63
  try {
55
- f({ loading: !0, error: null });
56
- const r = g ? "__preload__" : "", n = await i("");
57
- k((I) => new Map(I).set(r, n)), u(n);
58
- } catch (r) {
59
- f({
64
+ v({ loading: !0, error: null });
65
+ const t = c ? "__preload__" : "", o = await a("");
66
+ F((y) => new Map(y).set(t, o)), R(o);
67
+ } catch (t) {
68
+ v({
60
69
  loading: !1,
61
- error: r instanceof Error ? r.message : "Failed to fetch options"
70
+ error: t instanceof Error ? t.message : "Failed to fetch options"
62
71
  });
63
72
  } finally {
64
- f((r) => ({ ...r, loading: !1 }));
73
+ v((t) => ({ ...t, loading: !1 }));
65
74
  }
66
75
  })(), () => {
67
- u([]), k(/* @__PURE__ */ new Map());
68
- }), [i, g]), C(() => {
69
- if (a)
70
- if (g) {
71
- const e = b.get("__preload__") || [];
72
- if (m) {
73
- const r = e.filter(
74
- (n) => S ? S(n, m) : String(N(n)).toLowerCase().includes(m.toLowerCase())
76
+ R([]), F(/* @__PURE__ */ new Map());
77
+ }), [a, c]), j(() => {
78
+ if (g)
79
+ if (c) {
80
+ const n = I.get("__preload__") || [];
81
+ if (S) {
82
+ const t = n.filter(
83
+ (o) => f ? f(o, S) : String(s(o)).toLowerCase().includes(S.toLowerCase())
75
84
  );
76
- u(r);
85
+ R(t);
77
86
  } else
78
- u(e);
87
+ R(n);
79
88
  } else {
80
- const e = m || "";
81
- if (b.has(e)) {
82
- const r = b.get(e);
83
- u(r);
89
+ const n = S || "";
90
+ if (I.has(n)) {
91
+ const t = I.get(n);
92
+ R(t);
84
93
  } else
85
94
  (async () => {
86
95
  try {
87
- f({ loading: !0, error: null });
88
- const n = await i(m);
89
- k((I) => new Map(I).set(e, n)), u(n);
90
- } catch (n) {
91
- f({
96
+ v({ loading: !0, error: null });
97
+ const o = await a(S);
98
+ F((y) => new Map(y).set(n, o)), R(o);
99
+ } catch (o) {
100
+ v({
92
101
  loading: !1,
93
- error: n instanceof Error ? n.message : "Failed to fetch options"
102
+ error: o instanceof Error ? o.message : "Failed to fetch options"
94
103
  });
95
104
  } finally {
96
- f((n) => ({ ...n, loading: !1 }));
105
+ v((o) => ({ ...o, loading: !1 }));
97
106
  }
98
107
  })();
99
108
  }
100
109
  }, [
101
- a,
102
- m,
103
110
  g,
104
111
  S,
105
- b,
106
- N,
107
- i
108
- ]), C(() => {
109
- a && j.current && j.current.focus();
110
- }, [a]), C(() => {
111
- if (a && L.current && d) {
112
- const e = L.current.getBoundingClientRect();
113
- Z(e.width);
112
+ c,
113
+ f,
114
+ I,
115
+ s,
116
+ a
117
+ ]), j(() => {
118
+ g && P.current && P.current.focus();
119
+ }, [g]), j(() => {
120
+ if (g && E.current && C) {
121
+ const n = E.current.getBoundingClientRect();
122
+ ee(n.width);
114
123
  }
115
- }, [a, d]);
116
- const V = O(
117
- (e) => {
118
- y?.(R && e === c ? "" : e), _(!1);
124
+ }, [g, C]);
125
+ const re = $(
126
+ (n) => {
127
+ i?.(b && n === r ? "" : n), O(!1);
128
+ },
129
+ [r, i, b]
130
+ ), te = $(
131
+ (n) => {
132
+ if (!l) return;
133
+ const t = r, o = t.includes(n);
134
+ let y;
135
+ o ? y = t.filter((oe) => oe !== n) : y = [...t, n], i?.(y);
119
136
  },
120
- [c, y, R]
121
- ), ee = O(
122
- (e) => {
123
- e.stopPropagation(), e.preventDefault(), y?.(""), _(!1);
137
+ [r, i, l]
138
+ ), se = $(
139
+ (n) => {
140
+ n.stopPropagation(), n.preventDefault(), i?.(l ? [] : ""), O(!1);
124
141
  },
125
- [y]
126
- ), W = h.useId();
127
- return /* @__PURE__ */ s(
142
+ [i]
143
+ ), U = A.useId();
144
+ return /* @__PURE__ */ d(
128
145
  "div",
129
146
  {
130
- className: v("grid grid-cols-1 space-y-1.5", d && "w-full"),
147
+ className: L("grid grid-cols-1 space-y-1.5", C && "w-full"),
131
148
  children: [
132
- T && /* @__PURE__ */ t(re, { htmlFor: W, className: v(U, "w-fit"), children: T }),
133
- /* @__PURE__ */ t("div", { ref: J, className: "relative", "data-slot": "async-select", children: /* @__PURE__ */ s(se, { open: a, onOpenChange: _, children: [
134
- /* @__PURE__ */ t(ae, { asChild: !0, children: /* @__PURE__ */ t(
149
+ h && /* @__PURE__ */ e(le, { htmlFor: U, className: L(p, "w-fit"), children: h }),
150
+ /* @__PURE__ */ e("div", { ref: Q, className: "relative", "data-slot": "async-select", children: /* @__PURE__ */ d(ie, { open: g, onOpenChange: O, children: [
151
+ /* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ e(
135
152
  "button",
136
153
  {
137
- id: W,
138
- ref: L,
154
+ id: U,
155
+ ref: E,
139
156
  type: "button",
140
- disabled: z,
141
- className: v(
142
- ue({ size: H }),
157
+ disabled: T,
158
+ className: L(
159
+ ye({ size: J }),
143
160
  "!border-d-border/50 border !shadow-none",
144
- z && "cursor-not-allowed opacity-50",
145
- X,
161
+ T && "cursor-not-allowed opacity-50",
162
+ z,
146
163
  "font-normal",
147
- d && "w-full",
164
+ C && "w-full",
148
165
  "focus-visible:ring-d-ring focus-visible:ring-1",
149
- a && "ring-d-ring ring-1"
166
+ g && "ring-d-ring ring-1"
150
167
  ),
151
- style: d ? void 0 : { width: w },
152
- children: /* @__PURE__ */ s("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
153
- D ? /* @__PURE__ */ t("div", { className: "min-w-0 flex-1 truncate text-left", children: N(D) }) : /* @__PURE__ */ t("span", { className: "text-d-muted-foreground truncate text-left", children: P }),
154
- /* @__PURE__ */ s("div", { className: "flex flex-shrink-0 items-center justify-end gap-1", children: [
155
- R && D && /* @__PURE__ */ t(
168
+ style: C ? void 0 : { width: x },
169
+ children: /* @__PURE__ */ d("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
170
+ l ? Array.isArray(r) && r.length > 0 ? /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 truncate text-left", children: r.length === 1 ? G[0] && s(G[0]) : `${r.length} elementi selezionati` }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground truncate text-left", children: _ }) : W ? /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 truncate text-left", children: s(W) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground truncate text-left", children: _ }),
171
+ /* @__PURE__ */ d("div", { className: "flex flex-shrink-0 items-center justify-end gap-1", children: [
172
+ b && (l && Array.isArray(r) && r.length > 0 || !l && W) && /* @__PURE__ */ e(
156
173
  "div",
157
174
  {
158
175
  className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
159
- onClick: ee,
160
- onMouseDown: (e) => e.preventDefault(),
176
+ onClick: se,
177
+ onMouseDown: (n) => n.preventDefault(),
161
178
  "aria-label": "Clear selection",
162
- children: /* @__PURE__ */ t(
163
- K,
179
+ children: /* @__PURE__ */ e(
180
+ X,
164
181
  {
165
182
  name: "X",
166
183
  size: "xs",
@@ -169,8 +186,8 @@ function _e({
169
186
  )
170
187
  }
171
188
  ),
172
- /* @__PURE__ */ t(
173
- K,
189
+ /* @__PURE__ */ e(
190
+ X,
174
191
  {
175
192
  name: "ChevronsUpDown",
176
193
  size: "xs",
@@ -181,62 +198,38 @@ function _e({
181
198
  ] })
182
199
  }
183
200
  ) }),
184
- /* @__PURE__ */ t(
185
- oe,
201
+ /* @__PURE__ */ e(
202
+ fe,
186
203
  {
187
- className: v("p-0"),
204
+ className: L("p-0"),
188
205
  style: {
189
- width: d ? F ? `${F}px` : void 0 : typeof w == "number" ? `${w}px` : w
206
+ width: C ? B ? `${B}px` : void 0 : typeof x == "number" ? `${x}px` : x
190
207
  },
191
208
  align: "start",
192
209
  side: "bottom",
193
210
  sideOffset: 4,
194
- onWheel: (e) => e.stopPropagation(),
211
+ onWheel: (n) => n.stopPropagation(),
195
212
  avoidCollisions: !1,
196
- children: /* @__PURE__ */ s(
197
- le,
213
+ children: /* @__PURE__ */ e(
214
+ be,
198
215
  {
199
- shouldFilter: !1,
200
- className: "w-full border-none shadow-sm",
201
- children: [
202
- /* @__PURE__ */ t(
203
- ie,
204
- {
205
- ref: j,
206
- placeholder: P,
207
- className: "placeholder:text-d-muted-foreground",
208
- value: E,
209
- onValueChange: Y
210
- }
211
- ),
212
- o.loading && l.length > 0 && /* @__PURE__ */ t("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ t(fe, { className: "h-4 w-4 animate-spin" }) }),
213
- /* @__PURE__ */ s(ce, { ref: Q, children: [
214
- o.error && /* @__PURE__ */ t("div", { className: "text-d-destructive p-3 text-center", children: o.error }),
215
- o.loading && l.length === 0 && (G || /* @__PURE__ */ t(he, {})),
216
- !o.loading && !o.error && l.length === 0 && (B || /* @__PURE__ */ t(de, { children: q || "No results found." })),
217
- !o.loading && !o.error && l.length > 0 && /* @__PURE__ */ t($, { children: l.map((e) => /* @__PURE__ */ t(
218
- A,
219
- {
220
- value: x(e),
221
- onSelect: V,
222
- className: "cursor-pointer",
223
- children: /* @__PURE__ */ s("div", { className: "flex w-full items-center justify-between overflow-hidden", children: [
224
- /* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: M ? /* @__PURE__ */ t("div", { className: "truncate", children: M(e) }) : /* @__PURE__ */ t("span", { className: "truncate", children: N(e) }) }),
225
- /* @__PURE__ */ t(
226
- me,
227
- {
228
- className: v(
229
- "ml-2 h-4 w-4 flex-shrink-0",
230
- c === x(e) ? "opacity-100" : "opacity-0"
231
- )
232
- }
233
- )
234
- ] })
235
- },
236
- x(e)
237
- )) })
238
- ] })
239
- ]
216
+ inputRef: P,
217
+ commandListRef: Y,
218
+ placeholder: _,
219
+ searchTerm: K,
220
+ onSearchTermChange: V,
221
+ fetchState: Z,
222
+ options: w,
223
+ loadingSkeleton: M,
224
+ notFound: u,
225
+ noResultsMessage: D,
226
+ multiple: l,
227
+ value: r,
228
+ getOptionValue: m,
229
+ getDisplayValue: s,
230
+ renderOption: k,
231
+ onSelect: re,
232
+ onSelectMultiple: te
240
233
  }
241
234
  )
242
235
  }
@@ -246,16 +239,105 @@ function _e({
246
239
  }
247
240
  );
248
241
  }
249
- function he() {
250
- return /* @__PURE__ */ t($, { children: [1, 2, 3].map((i) => /* @__PURE__ */ t(A, { disabled: !0, children: /* @__PURE__ */ s("div", { className: "flex w-full items-center gap-2", children: [
251
- /* @__PURE__ */ t("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
252
- /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col gap-1", children: [
253
- /* @__PURE__ */ t("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
254
- /* @__PURE__ */ t("div", { className: "bg-d-secondary h-3 w-16 animate-pulse rounded" })
242
+ function Ne({
243
+ option: a,
244
+ multiple: c,
245
+ value: f,
246
+ getOptionValue: k,
247
+ getDisplayValue: m,
248
+ renderOption: s,
249
+ onSelect: u,
250
+ onSelectMultiple: M
251
+ }) {
252
+ const h = k(a);
253
+ let p = !1;
254
+ return c ? p = Array.isArray(f) && f.includes(h) : p = f === h, /* @__PURE__ */ e(
255
+ H,
256
+ {
257
+ value: h,
258
+ onSelect: c ? M : u,
259
+ className: "cursor-pointer",
260
+ children: /* @__PURE__ */ d("div", { className: "flex w-full items-center justify-between overflow-hidden", children: [
261
+ /* @__PURE__ */ d("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
262
+ c && /* @__PURE__ */ e(ge, { checked: p }),
263
+ s ? /* @__PURE__ */ e("div", { className: "truncate", children: s(a) }) : /* @__PURE__ */ e("span", { className: "truncate", children: m(a) })
264
+ ] }),
265
+ /* @__PURE__ */ e(
266
+ we,
267
+ {
268
+ className: L(
269
+ "ml-2 h-4 w-4 flex-shrink-0",
270
+ p ? "opacity-100" : "opacity-0"
271
+ )
272
+ }
273
+ )
274
+ ] })
275
+ },
276
+ h
277
+ );
278
+ }
279
+ function be({
280
+ inputRef: a,
281
+ commandListRef: c,
282
+ placeholder: f,
283
+ searchTerm: k,
284
+ onSearchTermChange: m,
285
+ fetchState: s,
286
+ options: u,
287
+ loadingSkeleton: M,
288
+ notFound: h,
289
+ noResultsMessage: p,
290
+ multiple: _,
291
+ value: r,
292
+ getOptionValue: i,
293
+ getDisplayValue: T,
294
+ renderOption: x,
295
+ onSelect: z,
296
+ onSelectMultiple: D
297
+ }) {
298
+ return /* @__PURE__ */ d(me, { shouldFilter: !1, className: "w-full border-none shadow-sm", children: [
299
+ /* @__PURE__ */ e(
300
+ ue,
301
+ {
302
+ ref: a,
303
+ placeholder: f,
304
+ className: "placeholder:text-d-muted-foreground",
305
+ value: k,
306
+ onValueChange: m
307
+ }
308
+ ),
309
+ s.loading && u.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ e(xe, { className: "h-4 w-4 animate-spin" }) }),
310
+ /* @__PURE__ */ d(he, { ref: c, children: [
311
+ s.error && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: s.error }),
312
+ s.loading && u.length === 0 && (M || /* @__PURE__ */ e(Ce, {})),
313
+ !s.loading && !s.error && u.length === 0 && (h || /* @__PURE__ */ e(pe, { children: p || "No results found." })),
314
+ !s.loading && !s.error && u.length > 0 && /* @__PURE__ */ e(q, { children: u.map((b) => /* @__PURE__ */ e(
315
+ Ne,
316
+ {
317
+ option: b,
318
+ multiple: _,
319
+ value: r,
320
+ getOptionValue: i,
321
+ getDisplayValue: T,
322
+ renderOption: x,
323
+ onSelect: z,
324
+ onSelectMultiple: D
325
+ },
326
+ i(b)
327
+ )) })
328
+ ] })
329
+ ] });
330
+ }
331
+ function Ce() {
332
+ return /* @__PURE__ */ e(q, { children: [1, 2, 3].map((a) => /* @__PURE__ */ e(H, { disabled: !0, children: /* @__PURE__ */ d("div", { className: "flex w-full items-center gap-2", children: [
333
+ /* @__PURE__ */ e("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
334
+ /* @__PURE__ */ d("div", { className: "flex flex-1 flex-col gap-1", children: [
335
+ /* @__PURE__ */ e("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
336
+ /* @__PURE__ */ e("div", { className: "bg-d-secondary h-3 w-16 animate-pulse rounded" })
255
337
  ] })
256
- ] }) }, i)) });
338
+ ] }) }, a)) });
257
339
  }
258
340
  export {
259
- _e as AsyncSelect,
260
- ue as selectTriggerVariants
341
+ De as AsyncSelect,
342
+ ye as selectTriggerVariants
261
343
  };
package/dist/index.d.ts CHANGED
@@ -189,9 +189,34 @@ export declare function AspectRatio({ ...props }: AspectRatioProps): JSX.Element
189
189
 
190
190
  declare type AspectRatioProps = React.ComponentProps<typeof AspectRatioPrimitive.Root>;
191
191
 
192
- export declare function AsyncSelect<T>({ fetcher, preload, filterFn, renderOption, getOptionValue, getDisplayValue, notFound, loadingSkeleton, label, labelClassName, placeholder, value, onChange, disabled, width, triggerClassName, noResultsMessage, clearable, size, }: AsyncSelectProps<T>): JSX.Element;
192
+ export declare function AsyncSelect<T>({ fetcher, preload, filterFn, renderOption, getOptionValue, getDisplayValue, notFound, loadingSkeleton, label, labelClassName, placeholder, value, onChange, disabled, width, triggerClassName, noResultsMessage, clearable, multiple, size, }: AsyncSelectProps<T>): JSX.Element;
193
193
 
194
- declare interface AsyncSelectProps<T> extends VariantProps<typeof selectTriggerVariants> {
194
+ declare interface AsyncSelectMultipleProps<T> extends VariantProps<typeof selectTriggerVariants> {
195
+ multiple: true;
196
+ fetcher: (query?: string) => Promise<T[]>;
197
+ preload?: boolean;
198
+ filterFn?: (option: T, query: string) => boolean;
199
+ renderOption: (option: T) => React_2.ReactNode;
200
+ getOptionValue: (option: T) => string;
201
+ getDisplayValue: (option: T) => React_2.ReactNode;
202
+ notFound?: React_2.ReactNode;
203
+ loadingSkeleton?: React_2.ReactNode;
204
+ value?: string[];
205
+ onChange?: (value: string[]) => void;
206
+ label?: string | React_2.ReactNode;
207
+ labelClassName?: string;
208
+ placeholder?: string;
209
+ disabled?: boolean;
210
+ width?: string | number | "auto";
211
+ triggerClassName?: string;
212
+ noResultsMessage?: string;
213
+ clearable?: boolean;
214
+ }
215
+
216
+ declare type AsyncSelectProps<T> = AsyncSelectSingleProps<T> | AsyncSelectMultipleProps<T>;
217
+
218
+ declare interface AsyncSelectSingleProps<T> extends VariantProps<typeof selectTriggerVariants> {
219
+ multiple?: false;
195
220
  fetcher: (query?: string) => Promise<T[]>;
196
221
  preload?: boolean;
197
222
  filterFn?: (option: T, query: string) => boolean;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import e from "../../_virtual/index5.js";
2
+ import e from "../../_virtual/index3.js";
3
3
  export {
4
4
  e as EventEmitter,
5
5
  e as default
@@ -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/index3.js";
6
+ import S from "../../../_virtual/index4.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/index5.js";
2
+ import e from "../../../../_virtual/index3.js";
3
3
  var r = new e(), n = "recharts.syncEvent.tooltip";
4
4
  export {
5
5
  n as TOOLTIP_SYNC_EVENT,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { bail as P } from "../../bail/index.js";
3
- import y from "../../../_virtual/index4.js";
3
+ import y from "../../../_virtual/index5.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.1.97",
4
+ "version": "0.1.98",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",