laif-ds 0.1.89 → 0.1.91

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,5 @@
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
+ var e = { exports: {} };
6
3
  export {
7
- m as default
4
+ e as __module
8
5
  };
@@ -1,5 +1,8 @@
1
1
  "use client";
2
- var e = { exports: {} };
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
- e as __module
7
+ m as default
5
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
  };
@@ -1,42 +1,43 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as l, Fragment as F } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as l, Fragment as A } from "react/jsx-runtime";
3
3
  import * as t from "react";
4
- import { useEffect as T } from "react";
5
- import { cn as p } from "../../lib/utils.js";
6
- import { Label as G } from "./label.js";
4
+ import { useEffect as E } from "react";
5
+ import { cn as m } from "../../lib/utils.js";
6
+ import { Label as F } from "./label.js";
7
7
  import { Badge as V } from "./badge.js";
8
- import { Button as N } from "./button.js";
8
+ import { Button as G } from "./button.js";
9
9
  import { Popover as X, PopoverTrigger as $, PopoverContent as q } from "./popover.js";
10
10
  import { Command as H, CommandList as I, CommandEmpty as J, CommandGroup as K, CommandItem as Q } from "./command.js";
11
11
  import { inputVariants as U } from "./input.js";
12
12
  import { Checkbox as Y } from "./checkbox.js";
13
- import { Icon as y } from "./icon.js";
14
- import Z from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
15
- const _ = t.createContext({ size: "default" });
16
- function me({
13
+ import { Icon as N } from "./icon.js";
14
+ import { selectTriggerVariants as Z } from "./async-select.js";
15
+ import _ from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
16
+ const ee = t.createContext({ size: "default" });
17
+ function pe({
17
18
  options: i,
18
19
  value: n,
19
20
  onChange: s,
20
- onClear: h,
21
- placeholder: k = "Seleziona...",
22
- disabled: z = !1,
23
- size: g = "default",
21
+ onClear: g,
22
+ placeholder: y = "Seleziona...",
23
+ disabled: k = !1,
24
+ size: f = "default",
24
25
  label: b,
25
- labelClassName: M,
26
- emptyMessage: P = "Nessun risultato trovato",
27
- className: R,
28
- filterPlaceholder: j = "Cerca...",
29
- filterable: D = !1,
30
- cancelLabel: O = "Cancella selezione",
31
- cancelButtonLabel: S = "Cancella",
26
+ labelClassName: z,
27
+ emptyMessage: M = "Nessun risultato trovato",
28
+ className: P,
29
+ filterPlaceholder: R = "Cerca...",
30
+ filterable: j = !1,
31
+ cancelLabel: D = "Cancella selezione",
32
+ cancelButtonLabel: O = "Cancella",
32
33
  maxSelectedItems: a
33
34
  }) {
34
- const m = t.useId(), [o, L] = t.useState(!1), [c, v] = t.useState(""), [B, W] = t.useState(
35
+ const p = t.useId(), [o, S] = t.useState(!1), [d, v] = t.useState(""), [L, B] = t.useState(
35
36
  void 0
36
- ), A = t.useRef(null), f = t.useRef(null), w = t.useCallback(
37
+ ), T = t.useRef(null), h = t.useRef(null), w = t.useCallback(
37
38
  (e) => {
38
39
  if (n.includes(e))
39
- s(n.filter((d) => d !== e));
40
+ s(n.filter((c) => c !== e));
40
41
  else {
41
42
  if (a && n.length >= a)
42
43
  return;
@@ -45,44 +46,44 @@ function me({
45
46
  },
46
47
  [n, s, a]
47
48
  ), x = t.useCallback(() => {
48
- s([]), v(""), h && h();
49
- }, [s]), u = t.useMemo(() => i.filter((e) => n.includes(e.value)), [i, n]), E = t.useMemo(() => c ? i.filter(
50
- (e) => e.label.toLowerCase().includes(c.toLowerCase())
51
- ) : i, [i, c]), C = t.useMemo(() => a ? n.length >= a : !1, [n, a]);
52
- return T(() => {
53
- if (o && f.current) {
54
- const e = f.current.getBoundingClientRect();
55
- W(e.width);
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(
51
+ (e) => e.label.toLowerCase().includes(d.toLowerCase())
52
+ ) : i, [i, d]), C = t.useMemo(() => a ? n.length >= a : !1, [n, a]);
53
+ return E(() => {
54
+ if (o && h.current) {
55
+ const e = h.current.getBoundingClientRect();
56
+ B(e.width);
56
57
  }
57
- }, [o]), /* @__PURE__ */ r(_.Provider, { value: { size: g, id: m }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
58
- b && /* @__PURE__ */ r(G, { htmlFor: m, className: M, children: b }),
58
+ }, [o]), /* @__PURE__ */ r(ee.Provider, { value: { size: f, id: p }, children: /* @__PURE__ */ l("div", { className: "space-y-1.5", children: [
59
+ b && /* @__PURE__ */ r(F, { htmlFor: p, className: m(z, "w-fit"), children: b }),
59
60
  /* @__PURE__ */ r(
60
61
  "div",
61
62
  {
62
- ref: A,
63
+ ref: T,
63
64
  className: "relative w-full",
64
65
  "data-slot": "app-multiple-select-dropdown",
65
- children: /* @__PURE__ */ l(X, { open: o, onOpenChange: L, children: [
66
+ children: /* @__PURE__ */ l(X, { open: o, onOpenChange: S, children: [
66
67
  /* @__PURE__ */ r($, { asChild: !0, children: /* @__PURE__ */ l(
67
- N,
68
+ "button",
68
69
  {
69
- id: m,
70
+ id: p,
70
71
  type: "button",
71
- variant: "outline",
72
72
  role: "combobox",
73
73
  "aria-expanded": o,
74
- disabled: z,
75
- ref: f,
76
- className: p(
77
- "!bg-d-input relative w-full justify-between border font-normal",
78
- "border-d-input ring-offset-background flex items-center rounded-md border whitespace-nowrap shadow-sm focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
74
+ disabled: k,
75
+ ref: h,
76
+ className: m(
77
+ Z({ size: f }),
78
+ "!bg-d-input hover:bg-d-input/50 relative w-full justify-between font-normal",
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",
79
80
  "aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
80
81
  "focus-visible:ring-d-ring focus-visible:ring-1",
81
82
  o && "ring-d-ring ring-1",
82
- R
83
+ P
83
84
  ),
84
85
  children: [
85
- /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between gap-2 overflow-hidden", children: u.length > 0 ? /* @__PURE__ */ l(F, { children: [
86
+ /* @__PURE__ */ r("div", { className: "flex w-full items-center justify-between gap-2 overflow-hidden", children: u.length > 0 ? /* @__PURE__ */ l(A, { children: [
86
87
  /* @__PURE__ */ l(
87
88
  V,
88
89
  {
@@ -102,9 +103,9 @@ function me({
102
103
  e.stopPropagation(), e.preventDefault(), x();
103
104
  },
104
105
  onMouseDown: (e) => e.preventDefault(),
105
- "aria-label": O,
106
+ "aria-label": D,
106
107
  children: /* @__PURE__ */ r(
107
- y,
108
+ N,
108
109
  {
109
110
  name: "X",
110
111
  size: "xs",
@@ -113,29 +114,29 @@ function me({
113
114
  )
114
115
  }
115
116
  )
116
- ] }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground", children: k }) }),
117
- /* @__PURE__ */ r(Z, { className: "ml-1 h-4 w-4 shrink-0 opacity-50" })
117
+ ] }) : /* @__PURE__ */ r("span", { className: "text-d-muted-foreground", children: y }) }),
118
+ /* @__PURE__ */ r(_, { className: "ml-1 h-4 w-4 shrink-0 opacity-50" })
118
119
  ]
119
120
  }
120
121
  ) }),
121
122
  /* @__PURE__ */ r(
122
123
  q,
123
124
  {
124
- className: p("p-0"),
125
- style: { width: B },
125
+ className: m("p-0"),
126
+ style: { width: L },
126
127
  align: "start",
127
128
  side: "bottom",
128
129
  sideOffset: 4,
129
130
  onWheel: (e) => e.stopPropagation(),
130
131
  avoidCollisions: !1,
131
- children: /* @__PURE__ */ l(H, { className: "bg-d-popover w-full rounded-md border border-none shadow-lg", children: [
132
- D && /* @__PURE__ */ l("div", { className: "border-d-border flex items-center justify-between border-b px-3", children: [
132
+ children: /* @__PURE__ */ l(H, { className: "bg-d-popover w-full rounded-md border border-none", children: [
133
+ j && /* @__PURE__ */ l("div", { className: "border-d-border flex items-center justify-between border-b px-3", children: [
133
134
  /* @__PURE__ */ l("div", { className: "flex items-center", children: [
134
135
  /* @__PURE__ */ r(
135
- y,
136
+ N,
136
137
  {
137
138
  name: "Search",
138
- className: "text-d-accent-foreground",
139
+ className: "text-d-accent-foreground opacity-50",
139
140
  size: "sm"
140
141
  }
141
142
  ),
@@ -143,43 +144,43 @@ function me({
143
144
  "input",
144
145
  {
145
146
  id: "app-multiple-select-dropdown-filter",
146
- placeholder: j,
147
- value: c,
147
+ placeholder: R,
148
+ value: d,
148
149
  onChange: (e) => v(e.target.value),
149
- className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${U({ size: g })} !shadow-none`
150
+ className: `focus-visible:ring-none border-none focus-visible:border-none disabled:opacity-50 ${U({ size: f })} !shadow-none`
150
151
  }
151
152
  )
152
153
  ] }),
153
154
  u.length > 0 && /* @__PURE__ */ r(
154
- N,
155
+ G,
155
156
  {
156
157
  variant: "ghost",
157
158
  size: "sm",
158
159
  className: "h-6 px-2 text-xs",
159
160
  onClick: x,
160
- children: S
161
+ children: O
161
162
  }
162
163
  )
163
164
  ] }),
164
165
  /* @__PURE__ */ l(I, { className: "max-h-60 w-full", children: [
165
- /* @__PURE__ */ r(J, { children: P }),
166
- /* @__PURE__ */ r(K, { children: E.map((e) => {
167
- const d = n.includes(e.value);
166
+ /* @__PURE__ */ r(J, { children: M }),
167
+ /* @__PURE__ */ r(K, { children: W.map((e) => {
168
+ const c = n.includes(e.value);
168
169
  return /* @__PURE__ */ l(
169
170
  Q,
170
171
  {
171
172
  value: e.value,
172
- disabled: e.disabled || !d && C,
173
+ disabled: e.disabled || !c && C,
173
174
  onSelect: () => w(e.value),
174
- className: p(
175
+ className: m(
175
176
  "aria-selected:!bg-d-accent aria-selected:text-d-accent-foreground flex cursor-pointer items-center gap-2 px-2 py-1.5",
176
- (e.disabled || !d && C) && "cursor-not-allowed opacity-50"
177
+ (e.disabled || !c && C) && "cursor-not-allowed opacity-50"
177
178
  ),
178
179
  children: [
179
180
  /* @__PURE__ */ r(
180
181
  Y,
181
182
  {
182
- checked: d,
183
+ checked: c,
183
184
  className: "z-10 mr-2 flex-shrink-0",
184
185
  onCheckedChange: () => {
185
186
  console.log("checkbox change for:", e.value), w(e.value);
@@ -202,5 +203,5 @@ function me({
202
203
  ] }) });
203
204
  }
204
205
  export {
205
- me as AppMultipleSelectDropdown
206
+ pe as AppMultipleSelectDropdown
206
207
  };
@@ -4,7 +4,7 @@ import * as p from "react";
4
4
  import { useState as a, useEffect as h, useCallback as A } from "react";
5
5
  import { useDebounce as re } from "../../hooks/use-debounce.js";
6
6
  import { cva as oe } from "../../node_modules/class-variance-authority/dist/index.js";
7
- import { cn as S } from "../../lib/utils.js";
7
+ import { cn as g } from "../../lib/utils.js";
8
8
  import { Label as le } from "./label.js";
9
9
  import { Popover as ae, PopoverTrigger as ie, PopoverContent as ce } from "./popover.js";
10
10
  import { Command as de, CommandInput as fe, CommandList as me, CommandEmpty as ue, CommandGroup as G, CommandItem as M } from "./command.js";
@@ -12,7 +12,7 @@ import { Icon as B } from "./icon.js";
12
12
  import pe from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
13
13
  import he from "../../node_modules/lucide-react/dist/esm/icons/check.js";
14
14
  const ge = oe(
15
- "flex items-center justify-between whitespace-nowrap rounded-md border border-d-input bg-d-input px-3 py-2 shadow-sm data-[placeholder]:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",
15
+ "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
16
  {
17
17
  variants: {
18
18
  size: {
@@ -29,17 +29,17 @@ const ge = oe(
29
29
  function Te({
30
30
  fetcher: c,
31
31
  preload: f,
32
- filterFn: R,
32
+ filterFn: S,
33
33
  renderOption: k,
34
34
  getOptionValue: i,
35
- getDisplayValue: g,
35
+ getDisplayValue: x,
36
36
  notFound: U,
37
37
  loadingSkeleton: X,
38
38
  label: z,
39
39
  labelClassName: $,
40
40
  placeholder: O = "Select...",
41
41
  value: r = "",
42
- onChange: x,
42
+ onChange: w,
43
43
  disabled: W = !1,
44
44
  width: m = "200px",
45
45
  triggerClassName: q,
@@ -47,12 +47,12 @@ function Te({
47
47
  clearable: L = !0,
48
48
  size: J
49
49
  }) {
50
- const [l, j] = a(!1), w = m === "auto", I = p.useRef(null), T = p.useRef(null), K = p.useRef(null), Q = p.useRef(null), [y, v] = a(!1), [N, b] = a(null), [E, C] = a(null), [D, Y] = a(""), u = re(D, f ? 0 : 300), [P, F] = a([]), [n, d] = a([]), [Z, _] = a(
50
+ const [l, j] = a(!1), y = m === "auto", I = p.useRef(null), T = p.useRef(null), K = p.useRef(null), Q = p.useRef(null), [N, b] = a(!1), [v, C] = a(null), [E, R] = a(null), [D, Y] = a(""), u = re(D, f ? 0 : 300), [P, F] = a([]), [n, d] = a([]), [Z, _] = a(
51
51
  void 0
52
52
  );
53
53
  h(() => ((async () => {
54
54
  try {
55
- if (v(!0), b(null), f) {
55
+ if (b(!0), C(null), f) {
56
56
  const s = await c("");
57
57
  F(s), d(s);
58
58
  } else {
@@ -60,11 +60,11 @@ function Te({
60
60
  d(s);
61
61
  }
62
62
  } catch (s) {
63
- b(
63
+ C(
64
64
  s instanceof Error ? s.message : "Failed to fetch options"
65
65
  );
66
66
  } finally {
67
- v(!1);
67
+ b(!1);
68
68
  }
69
69
  })(), () => {
70
70
  d([]), F([]);
@@ -73,7 +73,7 @@ function Te({
73
73
  if (f)
74
74
  if (u) {
75
75
  const t = P.filter(
76
- (s) => R ? R(s, u) : String(g(s)).toLowerCase().includes(u.toLowerCase())
76
+ (s) => S ? S(s, u) : String(x(s)).toLowerCase().includes(u.toLowerCase())
77
77
  );
78
78
  d(t);
79
79
  } else
@@ -81,29 +81,29 @@ function Te({
81
81
  else
82
82
  (async () => {
83
83
  try {
84
- v(!0), b(null);
84
+ b(!0), C(null);
85
85
  const s = await c(u);
86
86
  d(s);
87
87
  } catch (s) {
88
- b(
88
+ C(
89
89
  s instanceof Error ? s.message : "Failed to fetch options"
90
90
  );
91
91
  } finally {
92
- v(!1);
92
+ b(!1);
93
93
  }
94
94
  })();
95
95
  }, [
96
96
  l,
97
97
  u,
98
98
  f,
99
- R,
99
+ S,
100
100
  P,
101
- g
101
+ x
102
102
  ]), h(() => {
103
103
  if (r && n.length > 0) {
104
104
  const t = n.find((s) => i(s) === r);
105
- C(t || null);
106
- } else r || C(null);
105
+ R(t || null);
106
+ } else r || R(null);
107
107
  }, [r, n, i]), h(() => {
108
108
  l && I.current && I.current.focus();
109
109
  }, [l]), h(() => {
@@ -115,37 +115,38 @@ function Te({
115
115
  const V = A(
116
116
  (t) => {
117
117
  const s = L && t === r ? "" : t, se = n.find((ne) => i(ne) === s) || null;
118
- C(se), x(s), j(!1);
118
+ R(se), w(s), j(!1);
119
119
  },
120
- [r, x, L, n, i]
120
+ [r, w, L, n, i]
121
121
  ), ee = A(
122
122
  (t) => {
123
- t.stopPropagation(), t.preventDefault(), C(null), x(""), j(!1);
123
+ t.stopPropagation(), t.preventDefault(), R(null), w(""), j(!1);
124
124
  },
125
- [x]
125
+ [w]
126
126
  ), te = p.useId();
127
- return /* @__PURE__ */ o("div", { className: S("space-y-1.5", w && "w-full"), children: [
128
- z && /* @__PURE__ */ e(le, { className: $, children: z }),
127
+ return /* @__PURE__ */ o("div", { className: g("space-y-1.5", y && "w-full"), children: [
128
+ z && /* @__PURE__ */ e(le, { className: g($, "w-fit"), children: z }),
129
129
  /* @__PURE__ */ e("div", { ref: K, className: "relative", "data-slot": "async-select", children: /* @__PURE__ */ o(ae, { open: l, onOpenChange: j, children: [
130
130
  /* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ e(
131
131
  "button",
132
132
  {
133
133
  id: te,
134
+ ref: T,
134
135
  type: "button",
135
136
  disabled: W,
136
- className: S(
137
+ className: g(
137
138
  ge({ size: J }),
139
+ "!border-d-border/50 border !shadow-none",
138
140
  W && "cursor-not-allowed opacity-50",
139
141
  q,
140
142
  "font-normal",
141
- w && "w-full",
143
+ y && "w-full",
142
144
  "focus-visible:ring-d-ring focus-visible:ring-1",
143
145
  l && "ring-d-ring ring-1"
144
146
  ),
145
- style: w ? void 0 : { width: m },
146
- ref: T,
147
+ style: y ? void 0 : { width: m },
147
148
  children: /* @__PURE__ */ o("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
148
- E ? /* @__PURE__ */ e("div", { className: "truncate", children: g(E) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground hover:text-d-foreground", children: O }),
149
+ E ? /* @__PURE__ */ e("div", { className: "truncate", children: x(E) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground", children: O }),
149
150
  /* @__PURE__ */ o("div", { className: "flex w-full items-center justify-end gap-1", children: [
150
151
  L && E && /* @__PURE__ */ e(
151
152
  "div",
@@ -179,9 +180,9 @@ function Te({
179
180
  /* @__PURE__ */ e(
180
181
  ce,
181
182
  {
182
- className: S("p-0"),
183
+ className: g("p-0"),
183
184
  style: {
184
- width: w ? Z : typeof m == "number" ? `${m}px` : m
185
+ width: y ? Z : typeof m == "number" ? `${m}px` : m
185
186
  },
186
187
  align: "start",
187
188
  side: "bottom",
@@ -192,34 +193,35 @@ function Te({
192
193
  de,
193
194
  {
194
195
  shouldFilter: !1,
195
- className: "w-full border-none shadow-lg",
196
+ className: "w-full border-none shadow-sm",
196
197
  children: [
197
198
  /* @__PURE__ */ e(
198
199
  fe,
199
200
  {
200
201
  ref: I,
201
202
  placeholder: O,
203
+ className: "placeholder:text-d-muted-foreground",
202
204
  value: D,
203
205
  onValueChange: Y
204
206
  }
205
207
  ),
206
- y && n.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ e(pe, { className: "h-4 w-4 animate-spin" }) }),
208
+ N && n.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ e(pe, { className: "h-4 w-4 animate-spin" }) }),
207
209
  /* @__PURE__ */ o(me, { ref: Q, children: [
208
- N && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: N }),
209
- y && n.length === 0 && (X || /* @__PURE__ */ e(xe, {})),
210
- !y && !N && n.length === 0 && (U || /* @__PURE__ */ e(ue, { children: H || "No results found." })),
211
- !y && !N && n.length > 0 && /* @__PURE__ */ e(G, { children: n.map((t) => /* @__PURE__ */ o(
210
+ v && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: v }),
211
+ N && n.length === 0 && (X || /* @__PURE__ */ e(xe, {})),
212
+ !N && !v && n.length === 0 && (U || /* @__PURE__ */ e(ue, { children: H || "No results found." })),
213
+ !N && !v && n.length > 0 && /* @__PURE__ */ e(G, { children: n.map((t) => /* @__PURE__ */ o(
212
214
  M,
213
215
  {
214
216
  value: i(t),
215
217
  onSelect: V,
216
218
  className: "cursor-pointer",
217
219
  children: [
218
- k ? k(t) : /* @__PURE__ */ e("span", { children: g(t) }),
220
+ k ? k(t) : /* @__PURE__ */ e("span", { children: x(t) }),
219
221
  /* @__PURE__ */ e(
220
222
  he,
221
223
  {
222
- className: S(
224
+ className: g(
223
225
  "ml-auto h-4 w-4",
224
226
  r === i(t) ? "opacity-100" : "opacity-0"
225
227
  )
@@ -249,5 +251,5 @@ function xe() {
249
251
  }
250
252
  export {
251
253
  Te as AsyncSelect,
252
- ge as asyncSelectTriggerVariants
254
+ ge as selectTriggerVariants
253
255
  };
@@ -9,8 +9,8 @@ const b = m(
9
9
  {
10
10
  variants: {
11
11
  variant: {
12
- default: "bg-d-primary text-d-primary-foreground shadow-xs hover:bg-d-primary/90 hover:shadow-d-primary/25 before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700 before:ease-out",
13
- destructive: "bg-d-destructive text-white shadow-xs hover:bg-d-destructive/90 hover:shadow-d-destructive/25 focus-visible:ring-d-destructive/20 dark:focus-visible:ring-d-destructive/40 dark:bg-d-destructive/60 before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700 before:ease-out",
12
+ default: "bg-d-primary text-d-primary-foreground shadow-xs hover:bg-d-primary/90 hover:shadow-d-primary/25 [clip-path:inset(0_round_0.375rem)] before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700 before:ease-out",
13
+ destructive: "bg-d-destructive text-white shadow-xs hover:bg-d-destructive/90 hover:shadow-d-destructive/25 focus-visible:ring-d-destructive/20 dark:focus-visible:ring-d-destructive/40 dark:bg-d-destructive/60 [clip-path:inset(0_round_0.375rem)] before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700 before:ease-out",
14
14
  outline: "border bg-d-background shadow-xs hover:bg-d-accent hover:text-d-accent-foreground hover:border-d-accent dark:bg-d-input/30 dark:border-d-input dark:hover:bg-d-input/50",
15
15
  "outline-primary": "border !border-d-primary bg-d-background shadow-xs text-d-primary/80 hover:!text-d-primary hover:bg-d-primary/5 hover:border-d-primary/80 ",
16
16
  secondary: "bg-d-secondary text-d-secondary-foreground shadow-xs hover:bg-d-secondary/80 hover:text-d-secondary-foreground ",
@@ -34,22 +34,22 @@ function w({
34
34
  className: o,
35
35
  variant: a,
36
36
  size: e,
37
- asChild: d = !1,
38
- iconLeft: n,
39
- iconRight: s,
37
+ asChild: n = !1,
38
+ iconLeft: d,
39
+ iconRight: i,
40
40
  isLoading: f = !1,
41
41
  ...t
42
42
  }) {
43
- const i = d ? v : "button";
44
- return d ? /* @__PURE__ */ r(
45
- i,
43
+ const s = n ? v : "button";
44
+ return n ? /* @__PURE__ */ r(
45
+ s,
46
46
  {
47
47
  "data-slot": "button",
48
48
  className: l(b({ variant: a, size: e, className: o })),
49
49
  ...t
50
50
  }
51
51
  ) : /* @__PURE__ */ c(
52
- i,
52
+ s,
53
53
  {
54
54
  "data-slot": "button",
55
55
  className: l(b({ variant: a, size: e, className: o }), "relative"),
@@ -86,18 +86,18 @@ function w({
86
86
  )
87
87
  ]
88
88
  }
89
- ) : n && /* @__PURE__ */ r(
89
+ ) : d && /* @__PURE__ */ r(
90
90
  u,
91
91
  {
92
- name: n,
92
+ name: d,
93
93
  size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
94
94
  }
95
95
  ),
96
96
  t.children,
97
- s && /* @__PURE__ */ r(
97
+ i && /* @__PURE__ */ r(
98
98
  u,
99
99
  {
100
- name: s,
100
+ name: i,
101
101
  size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
102
102
  }
103
103
  )
@@ -242,7 +242,7 @@ function Ue({
242
242
  ),
243
243
  /* @__PURE__ */ n("div", { className: "flex h-full max-w-full min-w-0 flex-1 items-center", children: d && d.length > 0 && /* @__PURE__ */ h(W, { className: "h-full w-full", children: [
244
244
  /* @__PURE__ */ n(F, { orientation: "horizontal" }),
245
- /* @__PURE__ */ n("div", { className: "flex w-full max-w-full min-w-0 items-center justify-start gap-2 sm:justify-end", children: d.map((e, t) => {
245
+ /* @__PURE__ */ n("div", { className: "flex w-full max-w-full min-w-0 items-center justify-start gap-2 p-0.5 sm:justify-end", children: d.map((e, t) => {
246
246
  const l = I[e.column] ?? [];
247
247
  return /* @__PURE__ */ n(
248
248
  Re,
@@ -2,11 +2,11 @@
2
2
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
3
3
  import * as x from "react";
4
4
  import { cva as g } from "../../node_modules/class-variance-authority/dist/index.js";
5
- import { cn as s } from "../../lib/utils.js";
5
+ import { cn as l } from "../../lib/utils.js";
6
6
  import { Label as v } from "./label.js";
7
- import { Icon as l } from "./icon.js";
7
+ import { Icon as s } from "./icon.js";
8
8
  const b = g(
9
- "file:text-d-foreground placeholder:text-d-muted-foreground selection:bg-d-primary selection:text-d-primary-foreground border-d-input flex w-full min-w-0 rounded-md border bg-d-input px-3 py-1 text-base shadow-sm transition-all duration-200 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50 md:text-sm hover:shadow-md",
9
+ "file:text-d-foreground placeholder:text-d-muted-foreground shadow-none selection:bg-d-primary selection:text-d-primary-foreground flex w-full min-w-0 rounded-md bg-d-input border border-d-border/50 px-3 py-1 text-base transition-all duration-200 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
10
10
  {
11
11
  variants: {
12
12
  size: {
@@ -27,33 +27,33 @@ const b = g(
27
27
  labelClassName: u,
28
28
  id: p,
29
29
  iconLeft: i,
30
- iconRight: d,
30
+ iconRight: n,
31
31
  size: t,
32
32
  ...f
33
33
  }, c) => {
34
- const n = p || (r ? `input-${Math.random().toString(36).substring(2, 9)}` : void 0);
35
- return /* @__PURE__ */ a("div", { className: s("space-y-1.5", o), children: [
36
- r && /* @__PURE__ */ e(v, { htmlFor: n, className: u, children: r }),
34
+ const d = p || (r ? `input-${Math.random().toString(36).substring(2, 9)}` : void 0);
35
+ return /* @__PURE__ */ a("div", { className: l("space-y-1.5", o), children: [
36
+ r && /* @__PURE__ */ e(v, { htmlFor: d, className: u, children: r }),
37
37
  /* @__PURE__ */ a("div", { className: "relative w-full", children: [
38
- i && /* @__PURE__ */ e("div", { className: "text-d-muted-foreground pointer-events-none absolute top-1/2 left-3 -translate-y-1/2", children: /* @__PURE__ */ e(l, { name: i, size: t === "lg" ? "sm" : "xs" }) }),
38
+ i && /* @__PURE__ */ e("div", { className: "text-d-muted-foreground pointer-events-none absolute top-1/2 left-3 -translate-y-1/2", children: /* @__PURE__ */ e(s, { name: i, size: t === "lg" ? "sm" : "xs" }) }),
39
39
  /* @__PURE__ */ e(
40
40
  "input",
41
41
  {
42
- id: n,
42
+ id: d,
43
43
  type: m,
44
44
  "data-slot": "input",
45
- className: s(
45
+ className: l(
46
46
  b({ size: t }),
47
47
  "focus-visible:ring-d-ring focus-visible:ring-1 focus-visible:outline-none",
48
48
  "aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive",
49
49
  i ? t !== "lg" ? "pl-9" : "pl-10" : "",
50
- d ? t !== "lg" ? "pr-9" : "pr-10" : ""
50
+ n ? t !== "lg" ? "pr-9" : "pr-10" : ""
51
51
  ),
52
52
  ref: c,
53
53
  ...f
54
54
  }
55
55
  ),
56
- d && /* @__PURE__ */ e("div", { className: "text-d-muted-foreground pointer-events-none absolute top-1/2 right-3 -translate-y-1/2", children: /* @__PURE__ */ e(l, { name: d, size: t === "lg" ? "sm" : "xs" }) })
56
+ n && /* @__PURE__ */ e("div", { className: "text-d-muted-foreground pointer-events-none absolute top-1/2 right-3 -translate-y-1/2", children: /* @__PURE__ */ e(s, { name: n, size: t === "lg" ? "sm" : "xs" }) })
57
57
  ] })
58
58
  ] });
59
59
  }