laif-ds 0.1.20 → 0.1.22

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.
Files changed (36) hide show
  1. package/README.md +84 -3
  2. package/dist/components/ui/app-sidebar.js +113 -63
  3. package/dist/components/ui/data-table.js +26 -26
  4. package/dist/components/ui/date-picker.js +24 -24
  5. package/dist/components/ui/multiple-selector.js +80 -79
  6. package/dist/components/ui/sidebar.js +2 -2
  7. package/dist/index.d.ts +4 -1
  8. package/dist/styles.css +1 -1
  9. package/dist/styles.v3.css +1 -1
  10. package/package.json +1 -1
  11. package/dist/dist/components/ui/checkbox.js +0 -32
  12. package/dist/dist/components/ui/scroll-area.js +0 -61
  13. package/dist/dist/components/ui/table.js +0 -87
  14. package/dist/dist/lib/utils.js +0 -9
  15. package/dist/dist/node_modules/@radix-ui/number/dist/index.js +0 -7
  16. package/dist/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -10
  17. package/dist/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -136
  18. package/dist/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -30
  19. package/dist/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -56
  20. package/dist/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -11
  21. package/dist/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -72
  22. package/dist/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -32
  23. package/dist/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +0 -534
  24. package/dist/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -50
  25. package/dist/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -14
  26. package/dist/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -33
  27. package/dist/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -7
  28. package/dist/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -9
  29. package/dist/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -28
  30. package/dist/dist/node_modules/clsx/dist/clsx.js +0 -18
  31. package/dist/dist/node_modules/lucide-react/dist/esm/Icon.js +0 -41
  32. package/dist/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -28
  33. package/dist/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -21
  34. package/dist/dist/node_modules/lucide-react/dist/esm/icons/check.js +0 -13
  35. package/dist/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -20
  36. package/dist/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2732
package/README.md CHANGED
@@ -1,6 +1,87 @@
1
- PUBBLICARE:
1
+ ## PUBBLICARE:
2
2
  npm login
3
+ npm whoami (verifica se sei loggato con accoutn corretto)
4
+ yarn build (farà partire build per tailwindv3 e tailwindv4)
3
5
  npm publish --access public
4
6
 
5
- USO:
6
- npm i @laif/ds
7
+ ## INSTALL:
8
+ npm i @laif/ds
9
+
10
+ ## HOW IT WORKS
11
+ Per vedere i componenti con storybook:
12
+ ```
13
+ yarn storybook
14
+ ```
15
+
16
+ Il comando esegue due operazioni in sequenza: prima compila il CSS con tailwindcss v4 salvandolo in un file output.css, poi avvia Storybook che utilizza questo file CSS precompilato.
17
+ Questo approccio è necessario con Tailwind CSS v4 perché, a differenza delle versioni precedenti, v4 utilizza un'architettura "zero-runtime" che non si integra più direttamente con Storybook. La generazione separata del CSS è quindi la soluzione raccomandata per utilizzare Tailwind v4 con Storybook.
18
+
19
+ ## COME FUNZIONANO LE STORIES
20
+
21
+ Le stories in Storybook sono il modo in cui documentiamo e testiamo visivamente i nostri componenti. Ogni story rappresenta uno stato specifico di un componente.
22
+
23
+ ### Struttura di una Story
24
+
25
+ Una story è definita in un file con estensione `.stories.tsx` (o `.stories.jsx` per JavaScript) e segue questa struttura:
26
+
27
+ ```tsx
28
+ // button.stories.tsx
29
+ import type { Meta, StoryObj } from '@storybook/react';
30
+ import { Button } from '../ui/button';
31
+
32
+ // Metadati del componente
33
+ const meta = {
34
+ title: 'UI/Button', // Categoria/Nome nella sidebar di Storybook
35
+ component: Button, // Il componente da documentare
36
+ parameters: {
37
+ layout: 'centered', // Layout della preview
38
+ },
39
+ tags: ['autodocs'], // Genera automaticamente la documentazione
40
+ argTypes: {
41
+ // Definizione dei controlli per i props
42
+ variant: {
43
+ control: 'select',
44
+ options: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'],
45
+ description: 'La variante visiva del bottone',
46
+ },
47
+ // Altri argTypes...
48
+ },
49
+ } satisfies Meta<typeof Button>;
50
+
51
+ export default meta;
52
+ type Story = StoryObj<typeof meta>;
53
+
54
+ // Definizione delle singole stories
55
+ export const Default: Story = {
56
+ args: {
57
+ children: 'Button',
58
+ variant: 'default',
59
+ size: 'default',
60
+ },
61
+ };
62
+
63
+ export const Secondary: Story = {
64
+ args: {
65
+ children: 'Button',
66
+ variant: 'secondary',
67
+ size: 'default',
68
+ },
69
+ };
70
+
71
+ // Altre stories...
72
+ ```
73
+
74
+ ### Come creare una nuova Story
75
+
76
+ 1. Crea un nuovo file nella directory `src/components/stories/` con nome `nome-componente.stories.tsx`
77
+ 2. Importa il componente e le dipendenze necessarie
78
+ 3. Definisci i metadati con `const meta = {...}`
79
+ 4. Esporta i metadati con `export default meta`
80
+ 5. Definisci il tipo Story con `type Story = StoryObj<typeof meta>`
81
+ 6. Crea le diverse varianti del componente esportando costanti di tipo Story
82
+
83
+
84
+ ### Colors
85
+ Qui è definito il tema base di laif. Sovrascrivibile nel progetto che lo implementa.
86
+ Per farlo basta cambiare i valori delle variabili.
87
+ Di seguito sono importati 3 temi per demostrazione generati con (https://tweakcn.com/editor/theme)
@@ -1,70 +1,120 @@
1
1
  "use client";
2
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
3
- import * as f from "react";
4
- import { Sidebar as x, SidebarHeader as v, SidebarContent as N, SidebarGroup as C, SidebarGroupLabel as M, SidebarGroupContent as A, SidebarMenu as I, SidebarMenuItem as g, SidebarMenuButton as w, SidebarMenuSub as j, SidebarMenuSubItem as G, SidebarMenuSubButton as R, SidebarRail as k } from "./sidebar.js";
5
- import { Icon as t } from "./icon.js";
6
- function H({
7
- navigation: o,
8
- versions: z,
9
- defaultVersion: B,
10
- headerContent: s,
11
- footerContent: h,
12
- showRail: u = !0,
13
- ...m
2
+ import { jsxs as r, jsx as t, Fragment as x } from "react/jsx-runtime";
3
+ import * as v from "react";
4
+ import { Sidebar as z, SidebarHeader as B, SidebarContent as H, SidebarGroup as A, SidebarGroupLabel as N, SidebarGroupContent as w, SidebarMenu as C, SidebarMenuItem as E, SidebarMenuSub as M, SidebarMenuSubItem as j, SidebarRail as V, SidebarMenuButton as D, SidebarMenuSubButton as G } from "./sidebar.js";
5
+ import { Icon as h } from "./icon.js";
6
+ function T({
7
+ navigation: u,
8
+ navigationFooter: f,
9
+ versions: q,
10
+ defaultVersion: J,
11
+ headerContent: b,
12
+ footerContent: R,
13
+ showRail: k = !0,
14
+ linkComponent: a,
15
+ linkProps: S = {},
16
+ ...y
14
17
  }) {
15
- const [p, S] = f.useState({});
16
- return /* @__PURE__ */ r(x, { ...m, children: [
17
- s && /* @__PURE__ */ e(v, { children: s }),
18
- /* @__PURE__ */ e(N, { children: o.map((l) => /* @__PURE__ */ r(C, { children: [
19
- /* @__PURE__ */ e(M, { children: l.title }),
20
- /* @__PURE__ */ e(A, { children: /* @__PURE__ */ e(I, { children: l.items.map((i) => {
21
- const a = i.subItems && i.subItems.length > 0, d = p[i.title] || !1, b = (n) => {
22
- a && (n.preventDefault(), S((c) => ({
23
- ...c,
24
- [i.title]: !c[i.title]
25
- })));
26
- };
27
- return /* @__PURE__ */ r(g, { children: [
28
- /* @__PURE__ */ e(
29
- w,
30
- {
31
- asChild: !0,
32
- isActive: i.isActive,
33
- children: /* @__PURE__ */ r(
34
- "a",
35
- {
36
- href: a ? "#" : i.url,
37
- className: "flex items-center justify-between gap-2",
38
- onClick: a ? b : void 0,
39
- children: [
40
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
41
- i.iconName && /* @__PURE__ */ e(t, { name: i.iconName, size: "sm" }),
42
- /* @__PURE__ */ e("span", { children: i.title })
43
- ] }),
44
- a && /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: d ? /* @__PURE__ */ e(t, { name: "ChevronDown", className: "h-4 w-4" }) : /* @__PURE__ */ e(t, { name: "ChevronRight", className: "h-4 w-4" }) })
45
- ]
46
- }
47
- )
48
- }
49
- ),
50
- a && d && /* @__PURE__ */ e(j, { children: i.subItems.map((n) => /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
51
- R,
52
- {
53
- asChild: !0,
54
- isActive: n.isActive,
55
- children: /* @__PURE__ */ r("a", { href: n.url, className: "flex items-center gap-2", children: [
56
- n.iconName && /* @__PURE__ */ e(t, { name: n.iconName, size: "xs" }),
57
- /* @__PURE__ */ e("span", { children: n.title })
58
- ] })
59
- }
60
- ) }, n.title)) })
61
- ] }, i.title);
18
+ const [m, o] = v.useState({});
19
+ v.useEffect(() => {
20
+ const e = { ...m };
21
+ u.forEach((s) => {
22
+ s.items.some(
23
+ (l) => l.isActive || l.subItems && l.subItems.some((c) => c.isActive)
24
+ ) && (e[s.title] = !0);
25
+ }), o(e);
26
+ }, [u]);
27
+ const p = (e, s, n) => {
28
+ const l = e.subItems && e.subItems.length > 0, c = /* @__PURE__ */ r(x, { children: [
29
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
30
+ e.iconName && /* @__PURE__ */ t(h, { name: e.iconName, size: "sm" }),
31
+ /* @__PURE__ */ t("span", { children: e.title })
32
+ ] }),
33
+ l && /* @__PURE__ */ t("div", { className: "text-d-muted-foreground", children: s ? /* @__PURE__ */ t(h, { name: "ChevronDown", className: "h-4 w-4" }) : /* @__PURE__ */ t(h, { name: "ChevronRight", className: "h-4 w-4" }) })
34
+ ] });
35
+ return a ? /* @__PURE__ */ t(D, { isActive: e.isActive, children: /* @__PURE__ */ t(
36
+ a,
37
+ {
38
+ href: l ? "#" : e.url,
39
+ className: "flex items-center justify-between gap-2 w-full",
40
+ onClick: l ? n : void 0,
41
+ ...S,
42
+ children: c
43
+ }
44
+ ) }) : /* @__PURE__ */ t(D, { isActive: e.isActive, children: /* @__PURE__ */ t(
45
+ "a",
46
+ {
47
+ href: l ? "#" : e.url,
48
+ className: "flex items-center justify-between gap-2 w-full",
49
+ onClick: l ? n : void 0,
50
+ children: c
51
+ }
52
+ ) });
53
+ }, I = (e) => {
54
+ const s = /* @__PURE__ */ r(x, { children: [
55
+ e.iconName && /* @__PURE__ */ t(h, { name: e.iconName, size: "xs" }),
56
+ /* @__PURE__ */ t("span", { children: e.title })
57
+ ] });
58
+ return a ? /* @__PURE__ */ t(
59
+ G,
60
+ {
61
+ isActive: e.isActive,
62
+ asChild: !0,
63
+ children: /* @__PURE__ */ t(
64
+ a,
65
+ {
66
+ href: e.url,
67
+ className: "flex items-center gap-2 w-full",
68
+ ...S,
69
+ children: s
70
+ }
71
+ )
72
+ }
73
+ ) : /* @__PURE__ */ t(
74
+ G,
75
+ {
76
+ isActive: e.isActive,
77
+ asChild: !0,
78
+ children: /* @__PURE__ */ t("a", { href: e.url, className: "flex items-center gap-2 w-full", children: s })
79
+ }
80
+ );
81
+ };
82
+ return /* @__PURE__ */ r(z, { ...y, children: [
83
+ b && /* @__PURE__ */ t(B, { children: b }),
84
+ /* @__PURE__ */ t(H, { children: u.map((e) => /* @__PURE__ */ r(A, { children: [
85
+ e.title && /* @__PURE__ */ t(N, { children: e.title }),
86
+ /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(C, { children: e.items.map((s) => {
87
+ const n = s.subItems && s.subItems.length > 0, l = m[s.title] || !1;
88
+ return /* @__PURE__ */ r(E, { children: [
89
+ p(s, l, (i) => {
90
+ n && (i.preventDefault(), o((d) => ({
91
+ ...d,
92
+ [s.title]: !d[s.title]
93
+ })));
94
+ }),
95
+ n && l && /* @__PURE__ */ t(M, { children: s.subItems.map((i) => /* @__PURE__ */ t(j, { children: I(i) }, i.title)) })
96
+ ] }, s.title);
62
97
  }) }) })
63
- ] }, l.title)) }),
64
- h,
65
- u && /* @__PURE__ */ e(k, {})
98
+ ] }, e.title)) }),
99
+ f == null ? void 0 : f.map((e) => /* @__PURE__ */ r(A, { children: [
100
+ e.title && /* @__PURE__ */ t(N, { children: e.title }),
101
+ /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(C, { children: e.items.map((s) => {
102
+ const n = s.subItems && s.subItems.length > 0, l = m[s.title] || !1;
103
+ return /* @__PURE__ */ r(E, { children: [
104
+ p(s, l, (i) => {
105
+ n && (i.preventDefault(), o((d) => ({
106
+ ...d,
107
+ [s.title]: !d[s.title]
108
+ })));
109
+ }),
110
+ n && l && /* @__PURE__ */ t(M, { children: s.subItems.map((i) => /* @__PURE__ */ t(j, { children: I(i) }, i.title)) })
111
+ ] }, s.title);
112
+ }) }) })
113
+ ] }, e.title)),
114
+ R,
115
+ k && /* @__PURE__ */ t(V, {})
66
116
  ] });
67
117
  }
68
118
  export {
69
- H as AppSidebar
119
+ T as AppSidebar
70
120
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as h } from "react/jsx-runtime";
3
- import { useReactTable as H, flexRender as f } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
4
- import { Checkbox as S } from "../../dist/components/ui/checkbox.js";
5
- import { ScrollArea as V, ScrollBar as b } from "../../dist/components/ui/scroll-area.js";
6
- import { Table as I, TableHeader as j, TableRow as i, TableHead as B, TableBody as _, TableCell as c } from "../../dist/components/ui/table.js";
7
- import E, { useState as s, useEffect as L } from "react";
3
+ import { useReactTable as V, flexRender as f } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
4
+ import I, { useState as c, useEffect as $ } from "react";
5
+ import { Checkbox as S } from "./checkbox.js";
6
+ import { ScrollArea as j, ScrollBar as b } from "./scroll-area.js";
7
+ import { Table as B, TableHeader as _, TableRow as n, TableHead as E, TableBody as L, TableCell as r } from "./table.js";
8
8
  import { getFilteredRowModel as W, getSortedRowModel as q, getPaginationRowModel as G, getCoreRowModel as J } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
9
9
  function ee({
10
10
  columns: o,
@@ -15,13 +15,13 @@ function ee({
15
15
  className: C,
16
16
  rowSelection: x = {},
17
17
  onRowSelectionChange: m,
18
- checkable: n = !1,
19
- onCheckedRowsChange: r,
18
+ checkable: a = !1,
19
+ onCheckedRowsChange: s,
20
20
  notFoundMessage: M = "Nessun risultato trovato.",
21
21
  loadingMessage: N = "Caricamento in corso..."
22
22
  }) {
23
23
  var u;
24
- const [y, T] = s([]), [k, v] = s([]), [F, z] = s({}), [D, P] = s({}), g = m ? x : D, $ = m || P, A = E.useMemo(() => n ? [
24
+ const [y, T] = c([]), [k, v] = c([]), [F, z] = c({}), [D, P] = c({}), g = m ? x : D, A = m || P, H = I.useMemo(() => a ? [
25
25
  {
26
26
  id: "select",
27
27
  header: ({ table: t }) => /* @__PURE__ */ e("div", { className: "text-center", children: /* @__PURE__ */ e(
@@ -44,9 +44,9 @@ function ee({
44
44
  enableHiding: !1
45
45
  },
46
46
  ...o
47
- ] : o, [o, n]), a = H({
47
+ ] : o, [o, a]), i = V({
48
48
  data: w,
49
- columns: A,
49
+ columns: H,
50
50
  getCoreRowModel: J(),
51
51
  getPaginationRowModel: G(),
52
52
  onSortingChange: T,
@@ -54,7 +54,7 @@ function ee({
54
54
  onColumnFiltersChange: v,
55
55
  getFilteredRowModel: W(),
56
56
  onColumnVisibilityChange: z,
57
- onRowSelectionChange: $,
57
+ onRowSelectionChange: A,
58
58
  state: {
59
59
  sorting: y,
60
60
  columnFilters: k,
@@ -62,17 +62,17 @@ function ee({
62
62
  rowSelection: g
63
63
  }
64
64
  });
65
- return L(() => {
66
- if (r && n) {
67
- const t = a.getFilteredSelectedRowModel().rows.map((l) => l.original);
68
- r(t);
65
+ return $(() => {
66
+ if (s && a) {
67
+ const t = i.getFilteredSelectedRowModel().rows.map((l) => l.original);
68
+ s(t);
69
69
  }
70
- }, [a, r, n, g]), /* @__PURE__ */ e("div", { className: `w-full ${C}`, children: /* @__PURE__ */ e("div", { className: "rounded-md border", children: /* @__PURE__ */ h(V, { className: "h-full w-full", children: [
70
+ }, [i, s, a, g]), /* @__PURE__ */ e("div", { className: `w-full ${C}`, children: /* @__PURE__ */ e("div", { className: "rounded-md border", children: /* @__PURE__ */ h(j, { className: "h-full w-full", children: [
71
71
  /* @__PURE__ */ e(b, { orientation: "horizontal" }),
72
72
  /* @__PURE__ */ e(b, { orientation: "vertical" }),
73
- /* @__PURE__ */ h(I, { children: [
74
- /* @__PURE__ */ e(j, { children: a.getHeaderGroups().map((t) => /* @__PURE__ */ e(i, { children: t.headers.map((l) => /* @__PURE__ */ e(
75
- B,
73
+ /* @__PURE__ */ h(B, { children: [
74
+ /* @__PURE__ */ e(_, { children: i.getHeaderGroups().map((t) => /* @__PURE__ */ e(n, { children: t.headers.map((l) => /* @__PURE__ */ e(
75
+ E,
76
76
  {
77
77
  className: `${l.column.columnDef.sticky ? "sticky left-0 z-10 bg-d-background" : ""}`,
78
78
  children: l.isPlaceholder ? null : f(
@@ -82,19 +82,19 @@ function ee({
82
82
  },
83
83
  l.id
84
84
  )) }, t.id)) }),
85
- /* @__PURE__ */ e(_, { children: R ? d ? /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(c, { colSpan: 1e3, className: "h-24", children: d }) }) : /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
86
- c,
85
+ /* @__PURE__ */ e(L, { children: R ? d ? /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(r, { colSpan: 1e3, className: "h-24", children: d }) }) : /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
86
+ r,
87
87
  {
88
88
  colSpan: o.length,
89
89
  className: "h-24 text-center",
90
90
  children: N
91
91
  }
92
- ) }) : (u = a.getRowModel().rows) != null && u.length ? a.getRowModel().rows.map((t) => /* @__PURE__ */ e(
93
- i,
92
+ ) }) : (u = i.getRowModel().rows) != null && u.length ? i.getRowModel().rows.map((t) => /* @__PURE__ */ e(
93
+ n,
94
94
  {
95
95
  "data-state": t.getIsSelected() && "selected",
96
96
  children: t.getVisibleCells().map((l) => /* @__PURE__ */ e(
97
- c,
97
+ r,
98
98
  {
99
99
  className: `${l.column.columnDef.sticky ? "sticky left-0 z-10 bg-d-background" : ""}`,
100
100
  children: f(
@@ -106,8 +106,8 @@ function ee({
106
106
  ))
107
107
  },
108
108
  t.id
109
- )) : /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
110
- c,
109
+ )) : /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
110
+ r,
111
111
  {
112
112
  colSpan: o.length,
113
113
  className: "h-24 text-center",
@@ -1,37 +1,37 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
3
- import * as c from "react";
2
+ import { jsxs as p, jsx as e } from "react/jsx-runtime";
3
+ import * as i from "react";
4
4
  import { cn as g } from "../../lib/utils.js";
5
- import { Button as h } from "./button.js";
6
- import { Calendar as x } from "./calendar.js";
7
- import { Popover as P, PopoverTrigger as w, PopoverContent as y } from "./popover.js";
8
- import { formatDate as b } from "../../node_modules/date-fns/format.js";
9
- function N({
5
+ import { Button as x } from "./button.js";
6
+ import { Calendar as h } from "./calendar.js";
7
+ import { Popover as P, PopoverTrigger as w, PopoverContent as b } from "./popover.js";
8
+ import { formatDate as v } from "../../node_modules/date-fns/format.js";
9
+ function k({
10
10
  value: r,
11
11
  onChange: a,
12
- placeholder: l = "Seleziona data",
13
- dateFormat: d = "PPP",
12
+ placeholder: c = "Seleziona data",
13
+ dateFormat: l = "PPP",
14
14
  className: f,
15
- buttonVariant: m = "outline",
15
+ buttonVariant: m = "default",
16
16
  disabled: t = !1,
17
17
  size: n = "default"
18
18
  }) {
19
- const [o, i] = c.useState(r);
20
- c.useEffect(() => {
21
- i(r);
19
+ const [o, d] = i.useState(r);
20
+ i.useEffect(() => {
21
+ d(r);
22
22
  }, [r]);
23
- const p = (s) => {
24
- i(s), a && a(s);
23
+ const u = (s) => {
24
+ d(s), a && a(s);
25
25
  };
26
- return /* @__PURE__ */ u(P, { open: t ? !1 : void 0, children: [
26
+ return /* @__PURE__ */ p(P, { open: t ? !1 : void 0, children: [
27
27
  /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
28
- h,
28
+ x,
29
29
  {
30
30
  variant: m,
31
31
  size: n,
32
32
  className: g(
33
- "flex items-center justify-between whitespace-nowrap border border-d-input bg-d-transparent px-3 py-2 shadow-sm ring-offset-background data-[placeholder]:text-d-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-normal",
34
- !o && "text-d-secondary-foreground",
33
+ "flex items-center justify-between whitespace-nowrap border border-d-input text-d-foreground hover:bg-d-accent bg-d-transparent px-3 py-2 shadow-sm ring-offset-background data-[placeholder]:text-d-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-normal",
34
+ !o && "text-d-muted-foreground",
35
35
  t && "opacity-50 cursor-not-allowed",
36
36
  f,
37
37
  n === "sm" && "text-xs",
@@ -39,15 +39,15 @@ function N({
39
39
  ),
40
40
  disabled: t,
41
41
  iconLeft: "Calendar",
42
- children: o ? b(o, d) : /* @__PURE__ */ e("span", { children: l })
42
+ children: o ? v(o, l) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground", children: c })
43
43
  }
44
44
  ) }),
45
- /* @__PURE__ */ e(y, { className: "w-auto p-0", children: /* @__PURE__ */ e(
46
- x,
45
+ /* @__PURE__ */ e(b, { className: "w-auto p-0", children: /* @__PURE__ */ e(
46
+ h,
47
47
  {
48
48
  mode: "single",
49
49
  selected: o,
50
- onSelect: p,
50
+ onSelect: u,
51
51
  initialFocus: !0,
52
52
  disabled: t
53
53
  }
@@ -55,5 +55,5 @@ function N({
55
55
  ] });
56
56
  }
57
57
  export {
58
- N as DatePicker
58
+ k as DatePicker
59
59
  };