laif-ds 0.1.85 → 0.1.88

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,151 +1,159 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as L, Fragment as K } from "react/jsx-runtime";
3
- import { Command as ie, useCommandState as ae } from "../../node_modules/cmdk/dist/index.js";
4
- import * as a from "react";
5
- import { useEffect as C, forwardRef as de } from "react";
6
- import { CommandPortal as ue } from "./command-portal.js";
7
- import { Badge as ce } from "./badge.js";
8
- import { CommandItem as V, Command as fe, CommandList as me, CommandGroup as ge } from "./command.js";
9
- import { cn as h } from "../../lib/utils.js";
10
- import { Label as he } from "./label.js";
11
- import q from "../../node_modules/lucide-react/dist/esm/icons/x.js";
12
- function ve(r, s) {
13
- const [l, u] = a.useState(r);
2
+ import { jsx as r, jsxs as L, Fragment as G } from "react/jsx-runtime";
3
+ import { Command as ue, useCommandState as ce } from "../../node_modules/cmdk/dist/index.js";
4
+ import * as o from "react";
5
+ import { useEffect as C, forwardRef as fe } from "react";
6
+ import { Popover as me, PopoverTrigger as he, PopoverContent as ge } from "./popover.js";
7
+ import { Badge as pe } from "./badge.js";
8
+ import { CommandItem as I, Command as q, CommandList as ve, CommandGroup as be } from "./command.js";
9
+ import { cn as p } from "../../lib/utils.js";
10
+ import { Label as xe } from "./label.js";
11
+ import { Icon as we } from "./icon.js";
12
+ import Ne from "../../node_modules/lucide-react/dist/esm/icons/x.js";
13
+ function ye(s, l) {
14
+ const [i, u] = o.useState(s);
14
15
  return C(() => {
15
- const d = setTimeout(() => u(r), s);
16
+ const a = setTimeout(() => u(s), l);
16
17
  return () => {
17
- clearTimeout(d);
18
+ clearTimeout(a);
18
19
  };
19
- }, [r, s]), l;
20
+ }, [s, l]), i;
20
21
  }
21
- function I(r, s) {
22
- if (r.length === 0)
22
+ function T(s, l) {
23
+ if (s.length === 0)
23
24
  return {};
24
- if (!s)
25
+ if (!l)
25
26
  return {
26
- "": r
27
+ "": s
27
28
  };
28
- const l = {};
29
- return r.forEach((u) => {
30
- const d = u[s] || "";
31
- l[d] || (l[d] = []), l[d].push(u);
32
- }), l;
29
+ const i = {};
30
+ return s.forEach((u) => {
31
+ const a = u[l] || "";
32
+ i[a] || (i[a] = []), i[a].push(u);
33
+ }), i;
33
34
  }
34
- function pe(r, s) {
35
- const l = JSON.parse(JSON.stringify(r));
36
- for (const [u, d] of Object.entries(l))
37
- l[u] = d.filter(
38
- (F) => !s.find((c) => c.value === F.value)
35
+ function Ce(s, l) {
36
+ const i = JSON.parse(JSON.stringify(s));
37
+ for (const [u, a] of Object.entries(i))
38
+ i[u] = a.filter(
39
+ (V) => !l.find((c) => c.value === V.value)
39
40
  );
40
- return l;
41
+ return i;
41
42
  }
42
- function be(r, s) {
43
- for (const [, l] of Object.entries(r))
44
- if (l.some((u) => s.find((d) => d.value === u.value)))
43
+ function Ee(s, l) {
44
+ for (const [, i] of Object.entries(s))
45
+ if (i.some((u) => l.find((a) => a.value === u.value)))
45
46
  return !0;
46
47
  return !1;
47
48
  }
48
- const Q = de(({ className: r, ...s }, l) => ae((d) => d.filtered.count === 0) ? /* @__PURE__ */ o(
49
+ const Q = fe(({ className: s, ...l }, i) => ce((a) => a.filtered.count === 0) ? /* @__PURE__ */ r(
49
50
  "div",
50
51
  {
51
- ref: l,
52
- className: h("py-6 text-center text-sm", r),
52
+ ref: i,
53
+ className: p("py-6 text-center text-sm", s),
53
54
  "cmdk-empty": "",
54
55
  role: "presentation",
55
- ...s
56
+ ...l
56
57
  }
57
58
  ) : null);
58
59
  Q.displayName = "CommandEmpty";
59
- const xe = a.forwardRef(
60
+ const Oe = o.forwardRef(
60
61
  ({
61
- value: r,
62
- onChange: s,
63
- placeholder: l,
62
+ value: s,
63
+ onChange: l,
64
+ placeholder: i,
64
65
  defaultOptions: u = [],
65
- options: d,
66
- delay: F,
66
+ options: a,
67
+ delay: V,
67
68
  onSearch: c,
68
- onSearchSync: G,
69
+ onSearchSync: X,
69
70
  loadingIndicator: Y,
70
71
  emptyIndicator: D,
71
72
  maxSelected: _ = Number.MAX_SAFE_INTEGER,
72
- onMaxSelected: z,
73
- hidePlaceholderWhenSelected: A,
74
- disabled: v,
75
- groupBy: p,
73
+ onMaxSelected: A,
74
+ hidePlaceholderWhenSelected: U,
75
+ disabled: N,
76
+ groupBy: v,
76
77
  className: Z,
77
- badgeClassName: W,
78
- selectFirstItem: B = !0,
79
- creatable: k = !1,
80
- triggerSearchOnFocus: S = !1,
78
+ badgeClassName: B,
79
+ selectFirstItem: P = !0,
80
+ creatable: E = !1,
81
+ triggerSearchOnFocus: R = !1,
81
82
  commandProps: m,
82
- inputProps: E,
83
- hideClearAllButton: P = !1,
84
- label: U
85
- }, ee) => {
86
- const f = a.useRef(null), [b, M] = a.useState(!1), [te, X] = a.useState(!1), [H, $] = a.useState(!1), R = a.useRef(null), [t, N] = a.useState(r || []), [x, T] = a.useState(
87
- I(u, p)
88
- ), [g, J] = a.useState(""), w = ve(g, F || 500);
89
- a.useImperativeHandle(
90
- ee,
83
+ inputProps: O,
84
+ hideClearAllButton: ee = !1,
85
+ label: W
86
+ }, te) => {
87
+ const h = o.useRef(null), [f, S] = o.useState(!1), [ne, z] = o.useState(!1), [H, $] = o.useState(!1), [re, oe] = o.useState(
88
+ void 0
89
+ ), j = o.useRef(null), F = o.useRef(null), [t, y] = o.useState(s || []), [b, J] = o.useState(
90
+ T(u, v)
91
+ ), [g, K] = o.useState(""), x = ye(g, V || 500);
92
+ o.useImperativeHandle(
93
+ te,
91
94
  () => ({
92
95
  selectedValue: [...t],
93
- input: f.current,
94
- focus: () => f?.current?.focus(),
95
- reset: () => N([])
96
+ input: h.current,
97
+ focus: () => h?.current?.focus(),
98
+ reset: () => y([])
96
99
  }),
97
100
  [t]
98
101
  );
99
- const y = (e) => {
100
- R.current && !R.current.contains(e.target) && f.current && !f.current.contains(e.target) && (M(!1), f.current.blur());
101
- }, j = a.useCallback(
102
+ const w = (e) => {
103
+ j.current && !j.current.contains(e.target) && h.current && !h.current.contains(e.target) && (S(!1), h.current.blur());
104
+ }, M = o.useCallback(
102
105
  (e) => {
103
- const n = t.filter((i) => i.value !== e.value);
104
- N(n), s?.(n);
106
+ const n = t.filter((d) => d.value !== e.value);
107
+ y(n), l?.(n);
105
108
  },
106
- [s, t]
107
- ), ne = a.useCallback(
109
+ [l, t]
110
+ ), se = o.useCallback(
108
111
  (e) => {
109
- const n = f.current;
110
- n && ((e.key === "Delete" || e.key === "Backspace") && n.value === "" && t.length > 0 && (t[t.length - 1].fixed || j(t[t.length - 1])), e.key === "Escape" && n.blur());
112
+ const n = h.current;
113
+ n && ((e.key === "Delete" || e.key === "Backspace") && n.value === "" && t.length > 0 && (t[t.length - 1].fixed || M(t[t.length - 1])), e.key === "Escape" && n.blur());
111
114
  },
112
- [j, t]
115
+ [M, t]
113
116
  );
114
117
  C(() => {
115
118
  if (typeof document < "u")
116
- return b ? (document.addEventListener("mousedown", y), document.addEventListener("touchend", y)) : (document.removeEventListener("mousedown", y), document.removeEventListener("touchend", y)), () => {
117
- document.removeEventListener("mousedown", y), document.removeEventListener("touchend", y);
119
+ return f ? (document.addEventListener("mousedown", w), document.addEventListener("touchend", w)) : (document.removeEventListener("mousedown", w), document.removeEventListener("touchend", w)), () => {
120
+ document.removeEventListener("mousedown", w), document.removeEventListener("touchend", w);
118
121
  };
119
- }, [b, y]), C(() => {
120
- r && N(r);
121
- }, [r]), C(() => {
122
- if (!d || c)
122
+ }, [f, w]), C(() => {
123
+ s && y(s);
124
+ }, [s]), C(() => {
125
+ if (!a || c)
123
126
  return;
124
- const e = I(d || [], p);
125
- JSON.stringify(e) !== JSON.stringify(x) && T(e);
126
- }, [u, d, p, c, x]), C(() => {
127
+ const e = T(a || [], v);
128
+ JSON.stringify(e) !== JSON.stringify(b) && J(e);
129
+ }, [u, a, v, c, b]), C(() => {
127
130
  const e = () => {
128
- const i = G?.(w);
129
- T(I(i || [], p));
131
+ const d = X?.(x);
132
+ J(T(d || [], v));
130
133
  };
131
134
  (async () => {
132
- !G || !b || (S && e(), w && e());
135
+ !X || !f || (R && e(), x && e());
133
136
  })();
134
- }, [w, p, b, S]), C(() => {
137
+ }, [x, v, f, R]), C(() => {
135
138
  const e = async () => {
136
139
  $(!0);
137
- const i = await c?.(w);
138
- T(I(i || [], p)), $(!1);
140
+ const d = await c?.(x);
141
+ J(T(d || [], v)), $(!1);
139
142
  };
140
143
  (async () => {
141
- !c || !b || (S && await e(), w && await e());
144
+ !c || !f || (R && await e(), x && await e());
142
145
  })();
143
- }, [w, p, b, S]);
144
- const re = () => {
145
- if (!k || be(x, [{ value: g, label: g }]) || t.find((n) => n.value === g))
146
+ }, [x, v, f, R]), o.useEffect(() => {
147
+ if (f && F.current) {
148
+ const e = F.current.getBoundingClientRect();
149
+ oe(e.width);
150
+ }
151
+ }, [f]);
152
+ const le = () => {
153
+ if (!E || Ee(b, [{ value: g, label: g }]) || t.find((n) => n.value === g))
146
154
  return;
147
- const e = /* @__PURE__ */ o(
148
- V,
155
+ const e = /* @__PURE__ */ r(
156
+ I,
149
157
  {
150
158
  value: g,
151
159
  className: "cursor-pointer",
@@ -154,213 +162,217 @@ const xe = a.forwardRef(
154
162
  },
155
163
  onSelect: (n) => {
156
164
  if (t.length >= _) {
157
- z?.(t.length);
165
+ A?.(t.length);
158
166
  return;
159
167
  }
160
- J("");
161
- const i = [...t, { value: n, label: n }];
162
- N(i), s?.(i);
168
+ K("");
169
+ const d = [...t, { value: n, label: n }];
170
+ y(d), l?.(d);
163
171
  },
164
172
  children: `Create "${g}"`
165
173
  }
166
174
  );
167
- if (!c && g.length > 0 || c && w.length > 0 && !H)
175
+ if (!c && g.length > 0 || c && x.length > 0 && !H)
168
176
  return e;
169
- }, oe = a.useCallback(() => {
177
+ }, ie = o.useCallback(() => {
170
178
  if (D)
171
- return c && !k && Object.keys(x).length === 0 ? /* @__PURE__ */ o(V, { value: "-", disabled: !0, children: D }) : /* @__PURE__ */ o(Q, { children: D });
172
- }, [k, D, c, x]), se = a.useMemo(
173
- () => pe(x, t),
174
- [x, t]
175
- ), le = a.useCallback(() => {
179
+ return c && !E && Object.keys(b).length === 0 ? /* @__PURE__ */ r(I, { value: "-", disabled: !0, children: D }) : /* @__PURE__ */ r(Q, { children: D });
180
+ }, [E, D, c, b]), de = o.useMemo(
181
+ () => Ce(b, t),
182
+ [b, t]
183
+ ), ae = o.useCallback(() => {
176
184
  if (m?.filter)
177
185
  return m.filter;
178
- if (k)
186
+ if (E)
179
187
  return (e, n) => e.toLowerCase().includes(n.toLowerCase()) ? 1 : -1;
180
- }, [k, m?.filter]);
188
+ }, [E, m?.filter]);
181
189
  return /* @__PURE__ */ L("div", { className: "flex flex-col space-y-1.5", children: [
182
- U && /* @__PURE__ */ o(he, { children: U }),
183
- /* @__PURE__ */ L(
184
- fe,
190
+ W && /* @__PURE__ */ r(xe, { children: W }),
191
+ /* @__PURE__ */ r(
192
+ q,
185
193
  {
186
- ref: R,
194
+ ref: j,
187
195
  ...m,
188
196
  onKeyDown: (e) => {
189
- ne(e), m?.onKeyDown?.(e);
197
+ se(e), m?.onKeyDown?.(e);
190
198
  },
191
- className: h(
192
- "h-auto overflow-visible bg-transparent shadow-sm",
199
+ className: p(
200
+ "bg-d-input border-d-border h-auto overflow-visible shadow-sm",
193
201
  m?.className
194
202
  ),
195
203
  shouldFilter: m?.shouldFilter !== void 0 ? m.shouldFilter : !c,
196
- filter: le(),
197
- children: [
198
- /* @__PURE__ */ o(
204
+ filter: ae(),
205
+ children: /* @__PURE__ */ L(me, { open: f, onOpenChange: S, children: [
206
+ /* @__PURE__ */ r(he, { asChild: !0, children: /* @__PURE__ */ r(
199
207
  "div",
200
208
  {
201
- className: h(
209
+ ref: F,
210
+ className: p(
211
+ // asyncSelectTriggerVariants({ size: "default" }),
202
212
  "border-d-input ring-offset-d-background focus-within:ring-d-ring min-h-10 rounded-md border text-base focus-within:ring-1 md:text-sm",
203
213
  {
204
214
  "px-3 py-2": t.length !== 0,
205
- "cursor-text": !v && t.length !== 0,
206
- "disabled:cursor-not-allowed disabled:opacity-50": v
215
+ "cursor-text": !N && t.length !== 0,
216
+ "disabled:cursor-not-allowed disabled:opacity-50": N
207
217
  },
208
218
  Z
209
219
  ),
210
- onClick: () => {
211
- v || f?.current?.focus();
212
- },
213
220
  children: /* @__PURE__ */ L("div", { className: "relative flex flex-wrap gap-1", children: [
214
221
  t.map((e) => /* @__PURE__ */ L(
215
- ce,
222
+ pe,
216
223
  {
217
- className: h(
224
+ className: p(
218
225
  "data-[disabled]:bg-d-secondary-foreground data-[disabled]:text-d-secondary data-[disabled]:hover:bg-d-secondary-foreground",
219
226
  "data-[fixed]:bg-d-secondary-foreground data-[fixed]:text-d-secondary data-[fixed]:hover:bg-d-secondary-foreground",
220
- W
227
+ B
221
228
  ),
222
229
  "data-fixed": e.fixed,
223
- "data-disabled": v || void 0,
230
+ "data-disabled": N || void 0,
224
231
  children: [
225
232
  e.label,
226
- /* @__PURE__ */ o(
233
+ /* @__PURE__ */ r(
227
234
  "button",
228
235
  {
229
236
  type: "button",
230
- className: h(
237
+ className: p(
231
238
  "text-d-secondary-foreground ring-offset-d-background focus:ring-d-ring ml-1 rounded-full outline-none focus:ring-1 focus:ring-offset-2",
232
- (v || e.fixed) && "hidden"
239
+ (N || e.fixed) && "hidden"
233
240
  ),
234
241
  onKeyDown: (n) => {
235
- n.key === "Enter" && j(e);
242
+ n.key === "Enter" && M(e);
236
243
  },
237
244
  onMouseDown: (n) => {
238
245
  n.preventDefault(), n.stopPropagation();
239
246
  },
240
- onClick: () => j(e),
241
- children: /* @__PURE__ */ o(q, { className: "text-d-secondary-foreground hover:text-d-foreground h-3 w-3" })
247
+ onClick: () => M(e),
248
+ children: /* @__PURE__ */ r(Ne, { className: "text-d-secondary-foreground hover:text-d-foreground h-3 w-3 cursor-pointer" })
242
249
  }
243
250
  )
244
251
  ]
245
252
  },
246
253
  e.value
247
254
  )),
248
- /* @__PURE__ */ o(
249
- ie.Input,
255
+ /* @__PURE__ */ r(
256
+ ue.Input,
250
257
  {
251
- ...E,
252
- ref: f,
258
+ ...O,
259
+ ref: h,
253
260
  value: g,
254
- disabled: v,
261
+ disabled: N,
255
262
  onValueChange: (e) => {
256
- J(e), E?.onValueChange?.(e);
263
+ K(e), O?.onValueChange?.(e);
257
264
  },
258
265
  onBlur: (e) => {
259
- te || M(!1), E?.onBlur?.(e);
266
+ ne || S(!1), O?.onBlur?.(e);
260
267
  },
261
268
  onFocus: (e) => {
262
- M(!0), E?.onFocus?.(e);
269
+ S(!0), O?.onFocus?.(e);
263
270
  },
264
- placeholder: A && t.length !== 0 ? "" : l,
265
- className: h(
271
+ placeholder: U && t.length !== 0 ? "" : i,
272
+ className: p(
266
273
  "placeholder:text-d-muted-foreground flex-1 bg-transparent outline-none",
267
274
  {
268
- "w-full": A,
275
+ "w-full": U,
269
276
  "px-3 py-2": t.length === 0,
270
277
  "ml-1": t.length !== 0
271
278
  },
272
- E?.className
279
+ O?.className
273
280
  )
274
281
  }
275
282
  ),
276
- /* @__PURE__ */ o(
283
+ /* @__PURE__ */ r(
277
284
  "div",
278
285
  {
279
- className: h(
280
- "bg-d-secondary/20 hover:bg-d-secondary/30 absolute top-0 right-0 z-20 flex cursor-pointer items-center justify-center rounded-full border p-1",
281
- (P || v || t.length < 1 || t.filter((e) => e.fixed).length === t.length) && "hidden"
286
+ className: p(
287
+ "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
288
+ (ee || N || t.length < 1 || t.filter((e) => e.fixed).length === t.length) && "hidden"
282
289
  ),
283
290
  onClick: () => {
284
- N(t.filter((e) => e.fixed)), s?.(t.filter((e) => e.fixed));
291
+ y(t.filter((e) => e.fixed)), l?.(t.filter((e) => e.fixed));
285
292
  },
286
293
  "aria-label": "Clear selection",
287
- children: /* @__PURE__ */ o(q, { size: 12, className: "text-d-foreground" })
294
+ children: /* @__PURE__ */ r(
295
+ we,
296
+ {
297
+ name: "X",
298
+ size: "xs",
299
+ className: "!text-d-foreground opacity-50"
300
+ }
301
+ )
288
302
  }
289
303
  )
290
304
  ] })
291
305
  }
292
- ),
293
- /* @__PURE__ */ o(
294
- ue,
306
+ ) }),
307
+ /* @__PURE__ */ r(
308
+ ge,
295
309
  {
296
- open: b,
297
- triggerRef: R,
298
- onClose: () => {
299
- M(!1), f.current?.blur();
300
- },
301
- children: /* @__PURE__ */ o(
302
- me,
310
+ className: "border-none p-0 shadow-lg",
311
+ style: { width: re },
312
+ onWheel: (e) => e.stopPropagation(),
313
+ children: /* @__PURE__ */ r(q, { shouldFilter: !1, className: "w-full", children: /* @__PURE__ */ r(
314
+ ve,
303
315
  {
304
316
  className: "bg-d-popover text-d-popover-foreground animate-in border-d-border w-full rounded-md border shadow-md outline-none",
305
317
  onMouseLeave: () => {
306
- X(!1);
318
+ z(!1);
307
319
  },
308
320
  onMouseEnter: () => {
309
- X(!0);
321
+ z(!0);
310
322
  },
311
323
  onMouseUp: () => {
312
- f?.current?.focus();
324
+ h?.current?.focus();
313
325
  },
314
- children: H ? /* @__PURE__ */ o(K, { children: Y }) : /* @__PURE__ */ L(K, { children: [
315
- oe(),
316
- re(),
317
- !B && /* @__PURE__ */ o(V, { value: "-", className: "hidden" }),
318
- Object.entries(se).map(([e, n]) => /* @__PURE__ */ o(
319
- ge,
326
+ children: H ? /* @__PURE__ */ r(G, { children: Y }) : /* @__PURE__ */ L(G, { children: [
327
+ ie(),
328
+ le(),
329
+ !P && /* @__PURE__ */ r(I, { value: "-", className: "hidden" }),
330
+ Object.entries(de).map(([e, n]) => /* @__PURE__ */ r(
331
+ be,
320
332
  {
321
333
  heading: e,
322
334
  className: "h-full overflow-auto",
323
- children: /* @__PURE__ */ o(K, { children: n.map((i) => /* @__PURE__ */ o(
324
- V,
335
+ children: /* @__PURE__ */ r(G, { children: n.map((d) => /* @__PURE__ */ r(
336
+ I,
325
337
  {
326
- value: i.label,
327
- disabled: i.disable,
328
- onMouseDown: (O) => {
329
- O.preventDefault(), O.stopPropagation();
338
+ value: d.label,
339
+ disabled: d.disable,
340
+ onMouseDown: (k) => {
341
+ k.preventDefault(), k.stopPropagation();
330
342
  },
331
343
  onSelect: () => {
332
344
  if (t.length >= _) {
333
- z?.(t.length);
345
+ A?.(t.length);
334
346
  return;
335
347
  }
336
- J("");
337
- const O = [...t, i];
338
- N(O), s?.(O);
348
+ K("");
349
+ const k = [...t, d];
350
+ y(k), l?.(k);
339
351
  },
340
- className: h(
352
+ className: p(
341
353
  "cursor-pointer",
342
- i.disable && "text-d-secondary-foreground cursor-default"
354
+ d.disable && "text-d-secondary-foreground cursor-default"
343
355
  ),
344
- children: i.label
356
+ children: d.label
345
357
  },
346
- i.value
358
+ d.value
347
359
  )) })
348
360
  },
349
361
  e
350
362
  ))
351
363
  ] })
352
364
  }
353
- )
365
+ ) })
354
366
  }
355
367
  )
356
- ]
368
+ ] })
357
369
  }
358
370
  )
359
371
  ] });
360
372
  }
361
373
  );
362
- xe.displayName = "MultipleSelector";
374
+ Oe.displayName = "MultipleSelector";
363
375
  export {
364
- xe as MultipleSelector,
365
- ve as useDebounce
376
+ Oe as MultipleSelector,
377
+ ye as useDebounce
366
378
  };
@@ -57,7 +57,7 @@ function k({
57
57
  );
58
58
  }
59
59
  const w = f(
60
- "group inline-flex h-9 w-max items-center justify-center rounded-md bg-d-background px-4 py-2 text-sm font-medium hover:bg-d-accent hover:text-d-accent-foreground focus:bg-d-accent focus:text-d-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-d-accent data-[state=open]:text-d-accent-foreground data-[state=open]:focus:bg-d-accent data-[state=open]:bg-d-accent/50 focus-visible:ring-d-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
60
+ "group inline-flex h-9 w-max items-center justify-center rounded-md bg-d-background px-4 py-2 text-sm font-medium hover:bg-d-accent hover:text-d-accent-foreground focus:bg-d-accent focus:text-d-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-d-accent data-[state=open]:text-d-accent-foreground data-[state=open]:focus:bg-d-accent data-[state=open]:bg-d-accent focus-visible:ring-d-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
61
61
  );
62
62
  function I({
63
63
  className: t,
@@ -134,7 +134,7 @@ function C({
134
134
  {
135
135
  "data-slot": "navigation-menu-link",
136
136
  className: o(
137
- "data-[active=true]:focus:bg-d-accent data-[active=true]:hover:bg-d-accent data-[active=true]:bg-d-accent/50 data-[active=true]:text-d-accent-foreground hover:bg-d-accent hover:text-d-accent-foreground focus:bg-d-accent focus:text-d-accent-foreground focus-visible:ring-d-ring/50 [&_svg:not([class*='text-'])]:text-d-secondary-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
137
+ "data-[active=true]:focus:bg-d-accent data-[active=true]:hover:bg-d-accent data-[active=true]:bg-d-accent data-[active=true]:text-d-accent-foreground hover:bg-d-accent hover:text-d-accent-foreground focus:bg-d-accent focus:text-d-accent-foreground focus-visible:ring-d-ring/50 [&_svg:not([class*='text-'])]:text-d-secondary-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
138
138
  t
139
139
  ),
140
140
  ...a
@@ -73,7 +73,7 @@ function J({
73
73
  {
74
74
  "data-slot": "select-content",
75
75
  className: o(
76
- "bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
76
+ "bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-d-border relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
77
77
  s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
78
78
  t
79
79
  ),
@@ -3,18 +3,18 @@ import { jsx as e } from "react/jsx-runtime";
3
3
  import { Root as d, Thumb as n } from "../../node_modules/@radix-ui/react-switch/dist/index.js";
4
4
  import { cn as t } from "../../lib/utils.js";
5
5
  function c({
6
- className: a,
7
- ...r
6
+ className: r,
7
+ ...a
8
8
  }) {
9
9
  return /* @__PURE__ */ e(
10
10
  d,
11
11
  {
12
12
  "data-slot": "switch",
13
13
  className: t(
14
- "peer data-[state=checked]:bg-d-primary data-[state=unchecked]:bg-d-input focus-visible:border-d-ring focus-visible:ring-d-ring/50 dark:data-[state=unchecked]:bg-d-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
15
- a
14
+ "peer data-[state=checked]:bg-d-primary data-[state=unchecked]:bg-d-input focus-visible:border-d-ring focus-visible:ring-d-ring/50 dark:data-[state=unchecked]:bg-d-foreground/20 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
15
+ r
16
16
  ),
17
- ...r,
17
+ ...a,
18
18
  children: /* @__PURE__ */ e(
19
19
  n,
20
20
  {