@murumets-ee/ui 0.1.5 → 0.3.0
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.
- package/dist/index.d.mts +75 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -7
- package/LICENSE +0 -94
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,8 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
4
4
|
import * as _$_radix_ui_react_slot0 from "@radix-ui/react-slot";
|
|
5
5
|
import * as _$react from "react";
|
|
6
6
|
import { ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes } from "react";
|
|
7
|
+
import * as RechartsPrimitive from "recharts";
|
|
8
|
+
import { TooltipValueType } from "recharts";
|
|
7
9
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
8
10
|
import { Column, ColumnDef, Table as Table$1 } from "@tanstack/react-table";
|
|
9
11
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
@@ -41,6 +43,78 @@ declare const CardDescription: _$react.ForwardRefExoticComponent<HTMLAttributes<
|
|
|
41
43
|
declare const CardContent: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
42
44
|
declare const CardFooter: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
43
45
|
//#endregion
|
|
46
|
+
//#region src/chart.d.ts
|
|
47
|
+
declare const THEMES: {
|
|
48
|
+
readonly light: "";
|
|
49
|
+
readonly dark: ".dark";
|
|
50
|
+
};
|
|
51
|
+
type TooltipNameType = number | string;
|
|
52
|
+
type ChartConfig = Record<string, {
|
|
53
|
+
label?: _$react.ReactNode;
|
|
54
|
+
icon?: _$react.ComponentType;
|
|
55
|
+
} & ({
|
|
56
|
+
color?: string;
|
|
57
|
+
theme?: never;
|
|
58
|
+
} | {
|
|
59
|
+
color?: never;
|
|
60
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
61
|
+
})>;
|
|
62
|
+
declare function ChartContainer({
|
|
63
|
+
id,
|
|
64
|
+
className,
|
|
65
|
+
children,
|
|
66
|
+
config,
|
|
67
|
+
initialDimension,
|
|
68
|
+
...props
|
|
69
|
+
}: _$react.ComponentProps<"div"> & {
|
|
70
|
+
config: ChartConfig;
|
|
71
|
+
children: _$react.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
72
|
+
initialDimension?: {
|
|
73
|
+
width: number;
|
|
74
|
+
height: number;
|
|
75
|
+
};
|
|
76
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
77
|
+
declare const ChartStyle: ({
|
|
78
|
+
id,
|
|
79
|
+
config
|
|
80
|
+
}: {
|
|
81
|
+
id: string;
|
|
82
|
+
config: ChartConfig;
|
|
83
|
+
}) => _$react_jsx_runtime0.JSX.Element | null;
|
|
84
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
85
|
+
declare function ChartTooltipContent({
|
|
86
|
+
active,
|
|
87
|
+
payload,
|
|
88
|
+
className,
|
|
89
|
+
indicator,
|
|
90
|
+
hideLabel,
|
|
91
|
+
hideIndicator,
|
|
92
|
+
label,
|
|
93
|
+
labelFormatter,
|
|
94
|
+
labelClassName,
|
|
95
|
+
formatter,
|
|
96
|
+
color,
|
|
97
|
+
nameKey,
|
|
98
|
+
labelKey
|
|
99
|
+
}: _$react.ComponentProps<typeof RechartsPrimitive.Tooltip> & _$react.ComponentProps<"div"> & {
|
|
100
|
+
hideLabel?: boolean;
|
|
101
|
+
hideIndicator?: boolean;
|
|
102
|
+
indicator?: "line" | "dot" | "dashed";
|
|
103
|
+
nameKey?: string;
|
|
104
|
+
labelKey?: string;
|
|
105
|
+
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, "accessibilityLayer">): _$react_jsx_runtime0.JSX.Element | null;
|
|
106
|
+
declare const ChartLegend: _$react.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => _$react.ReactPortal | null>;
|
|
107
|
+
declare function ChartLegendContent({
|
|
108
|
+
className,
|
|
109
|
+
hideIcon,
|
|
110
|
+
payload,
|
|
111
|
+
verticalAlign,
|
|
112
|
+
nameKey
|
|
113
|
+
}: _$react.ComponentProps<"div"> & {
|
|
114
|
+
hideIcon?: boolean;
|
|
115
|
+
nameKey?: string;
|
|
116
|
+
} & RechartsPrimitive.DefaultLegendContentProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
117
|
+
//#endregion
|
|
44
118
|
//#region src/checkbox.d.ts
|
|
45
119
|
declare const Checkbox: _$react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & _$react.RefAttributes<HTMLButtonElement>, "ref"> & _$react.RefAttributes<HTMLButtonElement>>;
|
|
46
120
|
//#endregion
|
|
@@ -200,5 +274,5 @@ declare const TableCaption: _$react.ForwardRefExoticComponent<HTMLAttributes<HTM
|
|
|
200
274
|
//#region src/textarea.d.ts
|
|
201
275
|
declare const Textarea: _$react.ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & _$react.RefAttributes<HTMLTextAreaElement>>;
|
|
202
276
|
//#endregion
|
|
203
|
-
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DataTable, type DataTableClassNames, DataTableColumnHeader, DataTablePagination, type DataTableProps, DataTableViewOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Label, Select, Separator, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Toaster, cn, toast, useFormField };
|
|
277
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, DataTable, type DataTableClassNames, DataTableColumnHeader, DataTablePagination, type DataTableProps, DataTableViewOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Label, Select, Separator, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Toaster, cn, toast, useFormField };
|
|
204
278
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/checkbox.tsx","../src/data-table/data-table.tsx","../src/data-table/data-table-column-header.tsx","../src/data-table/data-table-pagination.tsx","../src/data-table/data-table-view-options.tsx","../src/dialog.tsx","../src/dropdown-menu.tsx","../src/form.tsx","../src/input.tsx","../src/label.tsx","../src/lib/cn.ts","../src/select.tsx","../src/separator.tsx","../src/skeleton.tsx","../src/sonner.tsx","../src/table.tsx","../src/textarea.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/chart.tsx","../src/checkbox.tsx","../src/data-table/data-table.tsx","../src/data-table/data-table-column-header.tsx","../src/data-table/data-table-pagination.tsx","../src/data-table/data-table-view-options.tsx","../src/dialog.tsx","../src/dropdown-menu.tsx","../src/form.tsx","../src/input.tsx","../src/label.tsx","../src/lib/cn.ts","../src/select.tsx","../src/separator.tsx","../src/skeleton.tsx","../src/sonner.tsx","../src/table.tsx","../src/textarea.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;UAGiB,UAAA,SAAmB,cAAA,CAAe,cAAA;EACjD,OAAA;AAAA;AAAA,iBAUc,KAAA,CAAA;EAAQ,SAAA;EAAW,OAAA;EAAA,GAAwB;AAAA,GAAS,UAAA,GAAU,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UCT7D,WAAA,SAAoB,oBAAA,CAAqB,iBAAA;EACxD,OAAA;EACA,IAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,cAoBW,MAAA,EAAM,OAAA,CAAA,yBAAA,CAAA,WAAA,GAAA,OAAA,CAAA,aAAA,CAAA,iBAAA;;;cC1BN,IAAA,EAAI,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,cAAA,IAAA,OAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAWJ,UAAA,EAAU,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,cAAA,IAAA,OAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAOV,SAAA,EAAS,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,cAAA,IAAA,OAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAWT,eAAA,EAAe,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,cAAA,IAAA,OAAA,CAAA,aAAA,CAAA,cAAA;AAAA,cAOf,WAAA,EAAW,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,cAAA,IAAA,OAAA,CAAA,aAAA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AA,EAAS,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,uBAAA,IAAA,OAAA,CAAA,aAAA,CAAA,uBAAA;AAAA,cAQT,WAAA,EAAW,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,uBAAA,IAAA,OAAA,CAAA,aAAA,CAAA,uBAAA;AAAA,cAYX,QAAA,EAAQ,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,mBAAA,IAAA,OAAA,CAAA,aAAA,CAAA,mBAAA;AAAA,cAcR,SAAA,EAAS,OAAA,CAAA,yBAAA,CAAA,gBAAA,CAAA,oBAAA,IAAA,OAAA,CAAA,aAAA,CAAA,oBAAA;AAAA,cAeT,SAAA,EAAS,OAAA,CAAA,yBAAA,CAAA,gBAAA,CAAA,oBAAA,IAAA,OAAA,CAAA,aAAA,CAAA,oBAAA;AAAA,cAcT,YAAA,EAAY,OAAA,CAAA,yBAAA,CAAA,cAAA,CAAA,uBAAA,IAAA,OAAA,CAAA,aAAA,CAAA,uBAAA;;;cCrFZ,QAAA,EAAQ,OAAA,CAAA,yBAAA,CAAA,sBAAA,CAAA,mBAAA,IAAA,OAAA,CAAA,aAAA,CAAA,mBAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{Slot as a}from"@radix-ui/react-slot";import{ArrowDown as o,ArrowUp as s,Check as c,ChevronLeft as l,ChevronRight as u,ChevronsLeft as d,ChevronsRight as f,ChevronsUpDown as p,EyeOff as ee,Loader2 as m,Settings2 as h,X as g}from"lucide-react";import{createContext as _,forwardRef as v,useContext as y,useId as te,useState as b}from"react";import*as x from"@radix-ui/react-checkbox";import{flexRender as S,getCoreRowModel as ne,getFilteredRowModel as re,getPaginationRowModel as ie,getSortedRowModel as ae,useReactTable as oe}from"@tanstack/react-table";import*as C from"@radix-ui/react-dropdown-menu";import*as w from"@radix-ui/react-dialog";import{Controller as se,FormProvider as ce,useFormContext as le}from"react-hook-form";import*as ue from"@radix-ui/react-label";import*as de from"@radix-ui/react-separator";import{Toaster as fe,toast as pe}from"sonner";function T(...n){return t(e(n))}const me={default:`border-transparent bg-primary text-primary-foreground shadow-xs`,secondary:`border-transparent bg-secondary text-secondary-foreground`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow-xs`,outline:`text-foreground`};function he({className:e,variant:t=`default`,...n}){return r(`div`,{className:T(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold`,`transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,me[t],e),...n})}const ge={default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90`,outline:`border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},_e={default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`},E=v(({className:e,variant:t=`default`,size:n=`default`,loading:o=!1,asChild:s=!1,disabled:c,children:l,type:u=`button`,...d},f)=>{let p=T(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium`,`transition-colors cursor-pointer`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:pointer-events-none disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,ge[t],_e[n],e);return s?r(a,{ref:f,className:p,...d,children:l}):i(`button`,{ref:f,disabled:c||o,className:p,type:u,...d,children:[o&&r(m,{className:`h-4 w-4 animate-spin`}),l]})});E.displayName=`Button`;const D=v(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`rounded-xl border bg-card text-card-foreground shadow-sm`,e),...t}));D.displayName=`Card`;const O=v(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`flex flex-col space-y-1.5 p-6`,e),...t}));O.displayName=`CardHeader`;const k=v(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`font-semibold leading-none tracking-tight`,e),...t}));k.displayName=`CardTitle`;const A=v(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`text-sm text-muted-foreground`,e),...t}));A.displayName=`CardDescription`;const j=v(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`p-6 pt-0`,e),...t}));j.displayName=`CardContent`;const ve=v(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`flex items-center p-6 pt-0`,e),...t}));ve.displayName=`CardFooter`;const ye=v(({className:e,...t},n)=>r(x.Root,{ref:n,className:T(`peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-xs`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,`data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:r(x.Indicator,{className:`flex items-center justify-center text-current`,children:r(c,{className:`h-3.5 w-3.5`})})}));ye.displayName=`Checkbox`;const M=v(({className:e,type:t,...n},i)=>r(`input`,{type:t,ref:i,className:T(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs`,`transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground`,`placeholder:text-muted-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n}));M.displayName=`Input`;const N=v(({className:e,...t},n)=>r(`div`,{className:`relative w-full overflow-auto`,children:r(`table`,{ref:n,className:T(`w-full caption-bottom text-sm`,e),...t})}));N.displayName=`Table`;const P=v(({className:e,...t},n)=>r(`thead`,{ref:n,className:T(`[&_tr]:border-b`,e),...t}));P.displayName=`TableHeader`;const F=v(({className:e,...t},n)=>r(`tbody`,{ref:n,className:T(`[&_tr:last-child]:border-0`,e),...t}));F.displayName=`TableBody`;const I=v(({className:e,...t},n)=>r(`tfoot`,{ref:n,className:T(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));I.displayName=`TableFooter`;const L=v(({className:e,...t},n)=>r(`tr`,{ref:n,className:T(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t}));L.displayName=`TableRow`;const R=v(({className:e,...t},n)=>r(`th`,{ref:n,className:T(`h-10 px-2 text-left align-middle font-medium text-muted-foreground`,`[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));R.displayName=`TableHead`;const z=v(({className:e,...t},n)=>r(`td`,{ref:n,className:T(`p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));z.displayName=`TableCell`;const B=v(({className:e,...t},n)=>r(`caption`,{ref:n,className:T(`mt-4 text-sm text-muted-foreground`,e),...t}));B.displayName=`TableCaption`;function V({table:e,className:t}){let n=e.getFilteredSelectedRowModel().rows.length,a=e.getFilteredRowModel().rows.length;return i(`div`,{className:T(`flex items-center justify-between px-2`,t),children:[r(`div`,{className:`flex-1 text-sm text-muted-foreground`,children:n>0&&i(`span`,{children:[n,` of `,a,` row(s) selected`]})}),i(`div`,{className:`flex items-center space-x-6 lg:space-x-8`,children:[r(`div`,{className:`flex items-center space-x-2`,children:i(`p`,{className:`text-sm font-medium`,children:[`Page `,e.getState().pagination.pageIndex+1,` of `,e.getPageCount()]})}),i(`div`,{className:`flex items-center space-x-2`,children:[i(E,{variant:`outline`,size:`icon`,className:`hidden h-8 w-8 lg:flex`,onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[r(`span`,{className:`sr-only`,children:`Go to first page`}),r(d,{className:`h-4 w-4`})]}),i(E,{variant:`outline`,size:`icon`,className:`h-8 w-8`,onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[r(`span`,{className:`sr-only`,children:`Go to previous page`}),r(l,{className:`h-4 w-4`})]}),i(E,{variant:`outline`,size:`icon`,className:`h-8 w-8`,onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[r(`span`,{className:`sr-only`,children:`Go to next page`}),r(u,{className:`h-4 w-4`})]}),i(E,{variant:`outline`,size:`icon`,className:`hidden h-8 w-8 lg:flex`,onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[r(`span`,{className:`sr-only`,children:`Go to last page`}),r(f,{className:`h-4 w-4`})]})]})]})]})}const H=C.Root,U=C.Trigger,be=C.Group,xe=C.Portal,Se=C.Sub,W=v(({className:e,sideOffset:t=4,...n},i)=>r(C.Portal,{children:r(C.Content,{ref:i,sideOffset:t,className:T(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md`,`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`,e),...n})}));W.displayName=`DropdownMenuContent`;const G=v(({className:e,inset:t,...n},i)=>r(C.Item,{ref:i,className:T(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none`,`transition-colors focus:bg-accent focus:text-accent-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,t&&`pl-8`,e),...n}));G.displayName=`DropdownMenuItem`;const K=v(({className:e,children:t,checked:n,...a},o)=>i(C.CheckboxItem,{ref:o,className:T(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none`,`transition-colors focus:bg-accent focus:text-accent-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,...a,children:[r(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:r(C.ItemIndicator,{children:r(c,{className:`h-4 w-4`})})}),t]}));K.displayName=`DropdownMenuCheckboxItem`;const q=v(({className:e,inset:t,...n},i)=>r(C.Label,{ref:i,className:T(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));q.displayName=`DropdownMenuLabel`;const J=v(({className:e,...t},n)=>r(C.Separator,{ref:n,className:T(`-mx-1 my-1 h-px bg-muted`,e),...t}));J.displayName=`DropdownMenuSeparator`;const Y=v(({className:e,inset:t,children:n,...a},o)=>i(C.SubTrigger,{ref:o,className:T(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none`,`focus:bg-accent data-[state=open]:bg-accent`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,t&&`pl-8`,e),...a,children:[n,r(u,{className:`ml-auto h-4 w-4`})]}));Y.displayName=`DropdownMenuSubTrigger`;const Ce=v(({className:e,...t},n)=>r(C.SubContent,{ref:n,className:T(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg`,`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`,e),...t}));Ce.displayName=`DropdownMenuSubContent`;function we({className:e,...t}){return r(`span`,{className:T(`ml-auto text-xs tracking-widest opacity-60`,e),...t})}function Te({table:e}){return i(H,{children:[r(U,{asChild:!0,children:i(E,{variant:`outline`,size:`sm`,className:`ml-auto hidden h-8 lg:flex`,children:[r(h,{className:`mr-2 h-4 w-4`}),`View`]})}),i(W,{align:`end`,className:`w-[150px]`,children:[r(q,{children:`Toggle columns`}),r(J,{}),e.getAllColumns().filter(e=>e.accessorFn!==void 0&&e.getCanHide()).map(e=>r(K,{className:`capitalize`,checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.id},e.id))]})]})}function Ee({columns:e,data:t,searchKey:n,searchPlaceholder:a=`Filter...`,pageSize:o=10,emptyMessage:s=`No results.`,classNames:c}){let[l,u]=b([]),[d,f]=b([]),[p,ee]=b({}),[m,h]=b({}),g=oe({data:t,columns:e,state:{sorting:l,columnFilters:d,columnVisibility:p,rowSelection:m},onSortingChange:u,onColumnFiltersChange:f,onColumnVisibilityChange:ee,onRowSelectionChange:h,getCoreRowModel:ne(),getSortedRowModel:ae(),getFilteredRowModel:re(),getPaginationRowModel:ie(),initialState:{pagination:{pageSize:o}}});return i(`div`,{className:T(`space-y-4`,c?.root),children:[i(`div`,{className:T(`flex items-center justify-between`,c?.toolbar),children:[r(`div`,{className:`flex flex-1 items-center space-x-2`,children:n&&r(M,{placeholder:a,value:g.getColumn(n)?.getFilterValue()??``,onChange:e=>g.getColumn(n)?.setFilterValue(e.target.value),className:`h-8 w-[150px] lg:w-[250px]`})}),r(Te,{table:g})]}),r(`div`,{className:T(`rounded-md border`,c?.table),children:i(N,{children:[r(P,{children:g.getHeaderGroups().map(e=>r(L,{children:e.headers.map(e=>r(R,{colSpan:e.colSpan,children:e.isPlaceholder?null:S(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),r(F,{children:g.getRowModel().rows.length>0?g.getRowModel().rows.map(e=>r(L,{"data-state":e.getIsSelected()&&`selected`,children:e.getVisibleCells().map(e=>r(z,{children:S(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):r(L,{children:r(z,{colSpan:e.length,className:`h-24 text-center`,children:s})})})]})}),r(V,{table:g,className:c?.pagination})]})}function De({column:e,title:t,className:a}){return e.getCanSort()?r(`div`,{className:T(`flex items-center space-x-2`,a),children:i(H,{children:[r(U,{asChild:!0,children:i(E,{variant:`ghost`,size:`sm`,className:`-ml-3 h-8 data-[state=open]:bg-accent`,children:[r(`span`,{children:t}),e.getIsSorted()===`desc`?r(o,{className:`ml-2 h-4 w-4`}):e.getIsSorted()===`asc`?r(s,{className:`ml-2 h-4 w-4`}):r(p,{className:`ml-2 h-4 w-4`})]})}),i(W,{align:`start`,children:[i(G,{onClick:()=>e.toggleSorting(!1),children:[r(s,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Asc`]}),i(G,{onClick:()=>e.toggleSorting(!0),children:[r(o,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Desc`]}),e.getCanHide()&&i(n,{children:[r(J,{}),i(G,{onClick:()=>e.toggleVisibility(!1),children:[r(ee,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Hide`]})]})]})]})}):r(`div`,{className:T(a),children:t})}const Oe=w.Root,ke=w.Trigger,Ae=w.Close,je=w.Portal,X=v(({className:e,...t},n)=>r(w.Overlay,{ref:n,className:T(`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));X.displayName=`DialogOverlay`;const Me=v(({className:e,children:t,...n},a)=>i(je,{children:[r(X,{}),i(w.Content,{ref:a,className:T(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]`,`gap-4 border bg-background p-6 shadow-lg sm:rounded-lg`,`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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]`,`data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]`,e),...n,children:[t,i(w.Close,{className:T(`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity`,`hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,`disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,`cursor-pointer`),children:[r(g,{className:`h-4 w-4`}),r(`span`,{className:`sr-only`,children:`Close`})]})]})]}));Me.displayName=`DialogContent`;function Ne({className:e,...t}){return r(`div`,{className:T(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t})}function Pe({className:e,...t}){return r(`div`,{className:T(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t})}const Fe=v(({className:e,...t},n)=>r(w.Title,{ref:n,className:T(`text-lg font-semibold leading-none tracking-tight`,e),...t}));Fe.displayName=`DialogTitle`;const Ie=v(({className:e,...t},n)=>r(w.Description,{ref:n,className:T(`text-sm text-muted-foreground`,e),...t}));Ie.displayName=`DialogDescription`;const Z=v(({className:e,...t},n)=>r(ue.Root,{ref:n,className:T(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,e),...t}));Z.displayName=`Label`;const Le=ce,Re=_({});function ze(e){return r(Re.Provider,{value:{name:e.name},children:r(se,{...e})})}const Be=_({});function Q(){let e=y(Re),t=y(Be),{getFieldState:n,formState:r}=le(),i=n(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}}const Ve=v(({className:e,...t},n)=>{let i=te();return r(Be.Provider,{value:{id:i},children:r(`div`,{ref:n,className:T(`space-y-2`,e),...t})})});Ve.displayName=`FormItem`;const He=v(({className:e,...t},n)=>{let{error:i,formItemId:a}=Q();return r(Z,{ref:n,className:T(i&&`text-destructive`,e),htmlFor:a,...t})});He.displayName=`FormLabel`;const Ue=v(({...e},t)=>{let{error:n,formItemId:i,formDescriptionId:o,formMessageId:s}=Q();return r(a,{ref:t,id:i,"aria-describedby":n?`${o} ${s}`:o,"aria-invalid":!!n,...e})});Ue.displayName=`FormControl`;const We=v(({className:e,...t},n)=>{let{formDescriptionId:i}=Q();return r(`p`,{ref:n,id:i,className:T(`text-[0.8rem] text-muted-foreground`,e),...t})});We.displayName=`FormDescription`;const Ge=v(({className:e,children:t,...n},i)=>{let{error:a,formMessageId:o}=Q(),s=a?String(a.message):t;return s?r(`p`,{ref:i,id:o,className:T(`text-[0.8rem] font-medium text-destructive`,e),...n,children:s}):null});Ge.displayName=`FormMessage`;const Ke=v(({className:e,children:t,...n},i)=>r(`select`,{ref:i,className:T(`flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-sm shadow-xs`,`transition-colors`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:t}));Ke.displayName=`Select`;const qe=v(({className:e,orientation:t=`horizontal`,decorative:n=!0,...i},a)=>r(de.Root,{ref:a,decorative:n,orientation:t,className:T(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...i}));qe.displayName=`Separator`;function Je({className:e,...t}){return r(`div`,{className:T(`animate-pulse rounded-md bg-muted`,e),...t})}function Ye(){return r(fe,{position:`bottom-right`,toastOptions:{style:{background:`var(--color-background)`,color:`var(--color-foreground)`,border:`1px solid var(--color-border)`},classNames:{error:`sonner-error`,success:`sonner-success`}}})}const $=v(({className:e,...t},n)=>r(`textarea`,{ref:n,className:T(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs`,`placeholder:text-muted-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));$.displayName=`Textarea`;export{he as Badge,E as Button,D as Card,j as CardContent,A as CardDescription,ve as CardFooter,O as CardHeader,k as CardTitle,ye as Checkbox,Ee as DataTable,De as DataTableColumnHeader,V as DataTablePagination,Te as DataTableViewOptions,Oe as Dialog,Ae as DialogClose,Me as DialogContent,Ie as DialogDescription,Pe as DialogFooter,Ne as DialogHeader,X as DialogOverlay,je as DialogPortal,Fe as DialogTitle,ke as DialogTrigger,H as DropdownMenu,K as DropdownMenuCheckboxItem,W as DropdownMenuContent,be as DropdownMenuGroup,G as DropdownMenuItem,q as DropdownMenuLabel,xe as DropdownMenuPortal,J as DropdownMenuSeparator,we as DropdownMenuShortcut,Se as DropdownMenuSub,Ce as DropdownMenuSubContent,Y as DropdownMenuSubTrigger,U as DropdownMenuTrigger,Le as Form,Ue as FormControl,We as FormDescription,ze as FormField,Ve as FormItem,He as FormLabel,Ge as FormMessage,M as Input,Z as Label,Ke as Select,qe as Separator,Je as Skeleton,N as Table,F as TableBody,B as TableCaption,z as TableCell,I as TableFooter,R as TableHead,P as TableHeader,L as TableRow,$ as Textarea,Ye as Toaster,T as cn,pe as toast,Q as useFormField};
|
|
2
|
+
import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{Slot as a}from"@radix-ui/react-slot";import{ArrowDown as o,ArrowUp as s,Check as c,ChevronLeft as l,ChevronRight as u,ChevronsLeft as d,ChevronsRight as f,ChevronsUpDown as p,EyeOff as m,Loader2 as h,Settings2 as g,X as _}from"lucide-react";import*as v from"react";import{createContext as y,forwardRef as b,useContext as ee,useId as te,useState as x}from"react";import*as S from"recharts";import*as ne from"@radix-ui/react-checkbox";import{flexRender as re,getCoreRowModel as ie,getFilteredRowModel as ae,getPaginationRowModel as oe,getSortedRowModel as se,useReactTable as ce}from"@tanstack/react-table";import*as C from"@radix-ui/react-dropdown-menu";import*as w from"@radix-ui/react-dialog";import{Controller as le,FormProvider as ue,useFormContext as de}from"react-hook-form";import*as fe from"@radix-ui/react-label";import*as pe from"@radix-ui/react-separator";import{Toaster as me,toast as he}from"sonner";function T(...n){return t(e(n))}const ge={default:`border-transparent bg-primary text-primary-foreground shadow-xs`,secondary:`border-transparent bg-secondary text-secondary-foreground`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow-xs`,outline:`text-foreground`};function _e({className:e,variant:t=`default`,...n}){return r(`div`,{className:T(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold`,`transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,ge[t],e),...n})}const ve={default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90`,outline:`border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},ye={default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`},E=b(({className:e,variant:t=`default`,size:n=`default`,loading:o=!1,asChild:s=!1,disabled:c,children:l,type:u=`button`,...d},f)=>{let p=T(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium`,`transition-colors cursor-pointer`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:pointer-events-none disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,ve[t],ye[n],e);return s?r(a,{ref:f,className:p,...d,children:l}):i(`button`,{ref:f,disabled:c||o,className:p,type:u,...d,children:[o&&r(h,{className:`h-4 w-4 animate-spin`}),l]})});E.displayName=`Button`;const D=b(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`rounded-xl border bg-card text-card-foreground shadow-sm`,e),...t}));D.displayName=`Card`;const O=b(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`flex flex-col space-y-1.5 p-6`,e),...t}));O.displayName=`CardHeader`;const k=b(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`font-semibold leading-none tracking-tight`,e),...t}));k.displayName=`CardTitle`;const A=b(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`text-sm text-muted-foreground`,e),...t}));A.displayName=`CardDescription`;const j=b(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`p-6 pt-0`,e),...t}));j.displayName=`CardContent`;const M=b(({className:e,...t},n)=>r(`div`,{ref:n,className:T(`flex items-center p-6 pt-0`,e),...t}));M.displayName=`CardFooter`;const be={light:``,dark:`.dark`},xe={width:320,height:200},N=v.createContext(null);function P(){let e=v.useContext(N);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function Se({id:e,className:t,children:n,config:a,initialDimension:o=xe,...s}){let c=v.useId(),l=`chart-${e??c.replace(/:/g,``)}`;return r(N.Provider,{value:{config:a},children:i(`div`,{"data-slot":`chart`,"data-chart":l,className:T(`flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,t),...s,children:[r(F,{id:l,config:a}),r(S.ResponsiveContainer,{initialDimension:o,children:n})]})})}const F=({id:e,config:t})=>{let n=Object.entries(t).filter(([,e])=>e.theme??e.color);return n.length?r(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(be).map(([t,r])=>`
|
|
3
|
+
${r} [data-chart=${e}] {
|
|
4
|
+
${n.map(([e,n])=>{let r=n.theme?.[t]??n.color;return r?` --color-${e}: ${r};`:null}).join(`
|
|
5
|
+
`)}
|
|
6
|
+
}
|
|
7
|
+
`).join(`
|
|
8
|
+
`)}}):null},Ce=S.Tooltip;function we({active:e,payload:t,className:a,indicator:o=`dot`,hideLabel:s=!1,hideIndicator:c=!1,label:l,labelFormatter:u,labelClassName:d,formatter:f,color:p,nameKey:m,labelKey:h}){let{config:g}=P(),_=v.useMemo(()=>{if(s||!t?.length)return null;let[e]=t,n=I(g,e,`${h??e?.dataKey??e?.name??`value`}`),i=!h&&typeof l==`string`?g[l]?.label??l:n?.label;return u?r(`div`,{className:T(`font-medium`,d),children:u(i,t)}):i?r(`div`,{className:T(`font-medium`,d),children:i}):null},[l,u,t,s,d,g,h]);if(!e||!t?.length)return null;let y=t.length===1&&o!==`dot`;return i(`div`,{className:T(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,a),children:[y?null:_,r(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let a=I(g,e,`${m??e.name??e.dataKey??`value`}`),s=p??e.payload?.fill??e.color;return r(`div`,{className:T(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,o===`dot`&&`items-center`),children:f&&e?.value!==void 0&&e.name?f(e.value,e.name,e,t,e.payload):i(n,{children:[a?.icon?r(a.icon,{}):!c&&r(`div`,{className:T(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":o===`dot`,"w-1":o===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":o===`dashed`,"my-0.5":y&&o===`dashed`}),style:{"--color-bg":s,"--color-border":s}}),i(`div`,{className:T(`flex flex-1 justify-between leading-none`,y?`items-end`:`items-center`),children:[i(`div`,{className:`grid gap-1.5`,children:[y?_:null,r(`span`,{className:`text-muted-foreground`,children:a?.label??e.name})]}),e.value!=null&&r(`span`,{className:`font-mono font-medium text-foreground tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},t)})})]})}const Te=S.Legend;function Ee({className:e,hideIcon:t=!1,payload:n,verticalAlign:a=`bottom`,nameKey:o}){let{config:s}=P();return n?.length?r(`div`,{className:T(`flex items-center justify-center gap-4`,a===`top`?`pb-3`:`pt-3`,e),children:n.filter(e=>e.type!==`none`).map((e,n)=>{let a=I(s,e,`${o??e.dataKey??`value`}`);return i(`div`,{className:T(`flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground`),children:[a?.icon&&!t?r(a.icon,{}):r(`div`,{className:`h-2 w-2 shrink-0 rounded-[2px]`,style:{backgroundColor:e.color}}),a?.label]},n)})}):null}function I(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}const De=b(({className:e,...t},n)=>r(ne.Root,{ref:n,className:T(`peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-xs`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,`data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:r(ne.Indicator,{className:`flex items-center justify-center text-current`,children:r(c,{className:`h-3.5 w-3.5`})})}));De.displayName=`Checkbox`;const L=b(({className:e,type:t,...n},i)=>r(`input`,{type:t,ref:i,className:T(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs`,`transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground`,`placeholder:text-muted-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n}));L.displayName=`Input`;const R=b(({className:e,...t},n)=>r(`div`,{className:`relative w-full overflow-auto`,children:r(`table`,{ref:n,className:T(`w-full caption-bottom text-sm`,e),...t})}));R.displayName=`Table`;const z=b(({className:e,...t},n)=>r(`thead`,{ref:n,className:T(`[&_tr]:border-b`,e),...t}));z.displayName=`TableHeader`;const B=b(({className:e,...t},n)=>r(`tbody`,{ref:n,className:T(`[&_tr:last-child]:border-0`,e),...t}));B.displayName=`TableBody`;const Oe=b(({className:e,...t},n)=>r(`tfoot`,{ref:n,className:T(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));Oe.displayName=`TableFooter`;const V=b(({className:e,...t},n)=>r(`tr`,{ref:n,className:T(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t}));V.displayName=`TableRow`;const H=b(({className:e,...t},n)=>r(`th`,{ref:n,className:T(`h-10 px-2 text-left align-middle font-medium text-muted-foreground`,`[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));H.displayName=`TableHead`;const U=b(({className:e,...t},n)=>r(`td`,{ref:n,className:T(`p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));U.displayName=`TableCell`;const ke=b(({className:e,...t},n)=>r(`caption`,{ref:n,className:T(`mt-4 text-sm text-muted-foreground`,e),...t}));ke.displayName=`TableCaption`;function Ae({table:e,className:t}){let n=e.getFilteredSelectedRowModel().rows.length,a=e.getFilteredRowModel().rows.length;return i(`div`,{className:T(`flex items-center justify-between px-2`,t),children:[r(`div`,{className:`flex-1 text-sm text-muted-foreground`,children:n>0&&i(`span`,{children:[n,` of `,a,` row(s) selected`]})}),i(`div`,{className:`flex items-center space-x-6 lg:space-x-8`,children:[r(`div`,{className:`flex items-center space-x-2`,children:i(`p`,{className:`text-sm font-medium`,children:[`Page `,e.getState().pagination.pageIndex+1,` of `,e.getPageCount()]})}),i(`div`,{className:`flex items-center space-x-2`,children:[i(E,{variant:`outline`,size:`icon`,className:`hidden h-8 w-8 lg:flex`,onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[r(`span`,{className:`sr-only`,children:`Go to first page`}),r(d,{className:`h-4 w-4`})]}),i(E,{variant:`outline`,size:`icon`,className:`h-8 w-8`,onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[r(`span`,{className:`sr-only`,children:`Go to previous page`}),r(l,{className:`h-4 w-4`})]}),i(E,{variant:`outline`,size:`icon`,className:`h-8 w-8`,onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[r(`span`,{className:`sr-only`,children:`Go to next page`}),r(u,{className:`h-4 w-4`})]}),i(E,{variant:`outline`,size:`icon`,className:`hidden h-8 w-8 lg:flex`,onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[r(`span`,{className:`sr-only`,children:`Go to last page`}),r(f,{className:`h-4 w-4`})]})]})]})]})}const W=C.Root,G=C.Trigger,je=C.Group,Me=C.Portal,Ne=C.Sub,K=b(({className:e,sideOffset:t=4,...n},i)=>r(C.Portal,{children:r(C.Content,{ref:i,sideOffset:t,className:T(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md`,`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`,e),...n})}));K.displayName=`DropdownMenuContent`;const q=b(({className:e,inset:t,...n},i)=>r(C.Item,{ref:i,className:T(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none`,`transition-colors focus:bg-accent focus:text-accent-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,t&&`pl-8`,e),...n}));q.displayName=`DropdownMenuItem`;const J=b(({className:e,children:t,checked:n,...a},o)=>i(C.CheckboxItem,{ref:o,className:T(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none`,`transition-colors focus:bg-accent focus:text-accent-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),checked:n,...a,children:[r(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:r(C.ItemIndicator,{children:r(c,{className:`h-4 w-4`})})}),t]}));J.displayName=`DropdownMenuCheckboxItem`;const Y=b(({className:e,inset:t,...n},i)=>r(C.Label,{ref:i,className:T(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));Y.displayName=`DropdownMenuLabel`;const X=b(({className:e,...t},n)=>r(C.Separator,{ref:n,className:T(`-mx-1 my-1 h-px bg-muted`,e),...t}));X.displayName=`DropdownMenuSeparator`;const Pe=b(({className:e,inset:t,children:n,...a},o)=>i(C.SubTrigger,{ref:o,className:T(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none`,`focus:bg-accent data-[state=open]:bg-accent`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,t&&`pl-8`,e),...a,children:[n,r(u,{className:`ml-auto h-4 w-4`})]}));Pe.displayName=`DropdownMenuSubTrigger`;const Fe=b(({className:e,...t},n)=>r(C.SubContent,{ref:n,className:T(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg`,`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`,e),...t}));Fe.displayName=`DropdownMenuSubContent`;function Ie({className:e,...t}){return r(`span`,{className:T(`ml-auto text-xs tracking-widest opacity-60`,e),...t})}function Le({table:e}){return i(W,{children:[r(G,{asChild:!0,children:i(E,{variant:`outline`,size:`sm`,className:`ml-auto hidden h-8 lg:flex`,children:[r(g,{className:`mr-2 h-4 w-4`}),`View`]})}),i(K,{align:`end`,className:`w-[150px]`,children:[r(Y,{children:`Toggle columns`}),r(X,{}),e.getAllColumns().filter(e=>e.accessorFn!==void 0&&e.getCanHide()).map(e=>r(J,{className:`capitalize`,checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.id},e.id))]})]})}function Re({columns:e,data:t,searchKey:n,searchPlaceholder:a=`Filter...`,pageSize:o=10,emptyMessage:s=`No results.`,classNames:c}){let[l,u]=x([]),[d,f]=x([]),[p,m]=x({}),[h,g]=x({}),_=ce({data:t,columns:e,state:{sorting:l,columnFilters:d,columnVisibility:p,rowSelection:h},onSortingChange:u,onColumnFiltersChange:f,onColumnVisibilityChange:m,onRowSelectionChange:g,getCoreRowModel:ie(),getSortedRowModel:se(),getFilteredRowModel:ae(),getPaginationRowModel:oe(),initialState:{pagination:{pageSize:o}}});return i(`div`,{className:T(`space-y-4`,c?.root),children:[i(`div`,{className:T(`flex items-center justify-between`,c?.toolbar),children:[r(`div`,{className:`flex flex-1 items-center space-x-2`,children:n&&r(L,{placeholder:a,value:_.getColumn(n)?.getFilterValue()??``,onChange:e=>_.getColumn(n)?.setFilterValue(e.target.value),className:`h-8 w-[150px] lg:w-[250px]`})}),r(Le,{table:_})]}),r(`div`,{className:T(`rounded-md border`,c?.table),children:i(R,{children:[r(z,{children:_.getHeaderGroups().map(e=>r(V,{children:e.headers.map(e=>r(H,{colSpan:e.colSpan,children:e.isPlaceholder?null:re(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),r(B,{children:_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>r(V,{"data-state":e.getIsSelected()&&`selected`,children:e.getVisibleCells().map(e=>r(U,{children:re(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):r(V,{children:r(U,{colSpan:e.length,className:`h-24 text-center`,children:s})})})]})}),r(Ae,{table:_,className:c?.pagination})]})}function ze({column:e,title:t,className:a}){return e.getCanSort()?r(`div`,{className:T(`flex items-center space-x-2`,a),children:i(W,{children:[r(G,{asChild:!0,children:i(E,{variant:`ghost`,size:`sm`,className:`-ml-3 h-8 data-[state=open]:bg-accent`,children:[r(`span`,{children:t}),e.getIsSorted()===`desc`?r(o,{className:`ml-2 h-4 w-4`}):e.getIsSorted()===`asc`?r(s,{className:`ml-2 h-4 w-4`}):r(p,{className:`ml-2 h-4 w-4`})]})}),i(K,{align:`start`,children:[i(q,{onClick:()=>e.toggleSorting(!1),children:[r(s,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Asc`]}),i(q,{onClick:()=>e.toggleSorting(!0),children:[r(o,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Desc`]}),e.getCanHide()&&i(n,{children:[r(X,{}),i(q,{onClick:()=>e.toggleVisibility(!1),children:[r(m,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Hide`]})]})]})]})}):r(`div`,{className:T(a),children:t})}const Be=w.Root,Ve=w.Trigger,He=w.Close,Ue=w.Portal,Z=b(({className:e,...t},n)=>r(w.Overlay,{ref:n,className:T(`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));Z.displayName=`DialogOverlay`;const We=b(({className:e,children:t,...n},a)=>i(Ue,{children:[r(Z,{}),i(w.Content,{ref:a,className:T(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]`,`gap-4 border bg-background p-6 shadow-lg sm:rounded-lg`,`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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]`,`data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]`,e),...n,children:[t,i(w.Close,{className:T(`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity`,`hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,`disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,`cursor-pointer`),children:[r(_,{className:`h-4 w-4`}),r(`span`,{className:`sr-only`,children:`Close`})]})]})]}));We.displayName=`DialogContent`;function Ge({className:e,...t}){return r(`div`,{className:T(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t})}function Ke({className:e,...t}){return r(`div`,{className:T(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t})}const qe=b(({className:e,...t},n)=>r(w.Title,{ref:n,className:T(`text-lg font-semibold leading-none tracking-tight`,e),...t}));qe.displayName=`DialogTitle`;const Je=b(({className:e,...t},n)=>r(w.Description,{ref:n,className:T(`text-sm text-muted-foreground`,e),...t}));Je.displayName=`DialogDescription`;const Q=b(({className:e,...t},n)=>r(fe.Root,{ref:n,className:T(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,e),...t}));Q.displayName=`Label`;const Ye=ue,Xe=y({});function Ze(e){return r(Xe.Provider,{value:{name:e.name},children:r(le,{...e})})}const Qe=y({});function $(){let e=ee(Xe),t=ee(Qe),{getFieldState:n,formState:r}=de(),i=n(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}}const $e=b(({className:e,...t},n)=>{let i=te();return r(Qe.Provider,{value:{id:i},children:r(`div`,{ref:n,className:T(`space-y-2`,e),...t})})});$e.displayName=`FormItem`;const et=b(({className:e,...t},n)=>{let{error:i,formItemId:a}=$();return r(Q,{ref:n,className:T(i&&`text-destructive`,e),htmlFor:a,...t})});et.displayName=`FormLabel`;const tt=b(({...e},t)=>{let{error:n,formItemId:i,formDescriptionId:o,formMessageId:s}=$();return r(a,{ref:t,id:i,"aria-describedby":n?`${o} ${s}`:o,"aria-invalid":!!n,...e})});tt.displayName=`FormControl`;const nt=b(({className:e,...t},n)=>{let{formDescriptionId:i}=$();return r(`p`,{ref:n,id:i,className:T(`text-[0.8rem] text-muted-foreground`,e),...t})});nt.displayName=`FormDescription`;const rt=b(({className:e,children:t,...n},i)=>{let{error:a,formMessageId:o}=$(),s=a?String(a.message):t;return s?r(`p`,{ref:i,id:o,className:T(`text-[0.8rem] font-medium text-destructive`,e),...n,children:s}):null});rt.displayName=`FormMessage`;const it=b(({className:e,children:t,...n},i)=>r(`select`,{ref:i,className:T(`flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-sm shadow-xs`,`transition-colors`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:t}));it.displayName=`Select`;const at=b(({className:e,orientation:t=`horizontal`,decorative:n=!0,...i},a)=>r(pe.Root,{ref:a,decorative:n,orientation:t,className:T(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...i}));at.displayName=`Separator`;function ot({className:e,...t}){return r(`div`,{className:T(`animate-pulse rounded-md bg-muted`,e),...t})}function st(){return r(me,{position:`bottom-right`,toastOptions:{style:{background:`var(--color-background)`,color:`var(--color-foreground)`,border:`1px solid var(--color-border)`},classNames:{error:`sonner-error`,success:`sonner-success`}}})}const ct=b(({className:e,...t},n)=>r(`textarea`,{ref:n,className:T(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs`,`placeholder:text-muted-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));ct.displayName=`Textarea`;export{_e as Badge,E as Button,D as Card,j as CardContent,A as CardDescription,M as CardFooter,O as CardHeader,k as CardTitle,Se as ChartContainer,Te as ChartLegend,Ee as ChartLegendContent,F as ChartStyle,Ce as ChartTooltip,we as ChartTooltipContent,De as Checkbox,Re as DataTable,ze as DataTableColumnHeader,Ae as DataTablePagination,Le as DataTableViewOptions,Be as Dialog,He as DialogClose,We as DialogContent,Je as DialogDescription,Ke as DialogFooter,Ge as DialogHeader,Z as DialogOverlay,Ue as DialogPortal,qe as DialogTitle,Ve as DialogTrigger,W as DropdownMenu,J as DropdownMenuCheckboxItem,K as DropdownMenuContent,je as DropdownMenuGroup,q as DropdownMenuItem,Y as DropdownMenuLabel,Me as DropdownMenuPortal,X as DropdownMenuSeparator,Ie as DropdownMenuShortcut,Ne as DropdownMenuSub,Fe as DropdownMenuSubContent,Pe as DropdownMenuSubTrigger,G as DropdownMenuTrigger,Ye as Form,tt as FormControl,nt as FormDescription,Ze as FormField,$e as FormItem,et as FormLabel,rt as FormMessage,L as Input,Q as Label,it as Select,at as Separator,ot as Skeleton,R as Table,B as TableBody,ke as TableCaption,U as TableCell,Oe as TableFooter,H as TableHead,z as TableHeader,V as TableRow,ct as Textarea,st as Toaster,T as cn,he as toast,$ as useFormField};
|
|
3
9
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["variantClasses","SonnerToaster"],"sources":["../src/lib/cn.ts","../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/checkbox.tsx","../src/input.tsx","../src/table.tsx","../src/data-table/data-table-pagination.tsx","../src/dropdown-menu.tsx","../src/data-table/data-table-view-options.tsx","../src/data-table/data-table.tsx","../src/data-table/data-table-column-header.tsx","../src/dialog.tsx","../src/label.tsx","../src/form.tsx","../src/select.tsx","../src/separator.tsx","../src/skeleton.tsx","../src/sonner.tsx","../src/textarea.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import type { HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface BadgeProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'secondary' | 'destructive' | 'outline'\n}\n\nconst variantClasses: Record<NonNullable<BadgeProps['variant']>, string> = {\n default: 'border-transparent bg-primary text-primary-foreground shadow-xs',\n secondary: 'border-transparent bg-secondary text-secondary-foreground',\n destructive: 'border-transparent bg-destructive text-destructive-foreground shadow-xs',\n outline: 'text-foreground',\n}\n\nexport function Badge({ className, variant = 'default', ...props }: BadgeProps) {\n return (\n <div\n className={cn(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold',\n 'transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n variantClasses[variant],\n className,\n )}\n {...props}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport { Loader2 } from 'lucide-react'\nimport { type ButtonHTMLAttributes, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'\n size?: 'default' | 'sm' | 'lg' | 'icon'\n loading?: boolean\n asChild?: boolean\n}\n\nconst variantClasses: Record<NonNullable<ButtonProps['variant']>, string> = {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n}\n\nconst sizeClasses: Record<NonNullable<ButtonProps['size']>, string> = {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = 'default',\n size = 'default',\n loading = false,\n asChild = false,\n disabled,\n children,\n type = 'button',\n ...props\n },\n ref,\n ) => {\n const classes = cn(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-colors cursor-pointer',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n variantClasses[variant],\n sizeClasses[size],\n className,\n )\n\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} {...props}>\n {children}\n </Slot>\n )\n }\n\n return (\n <button ref={ref} disabled={disabled || loading} className={classes} type={type} {...props}>\n {loading && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {children}\n </button>\n )\n },\n)\n\nButton.displayName = 'Button'\n","import { forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('rounded-xl border bg-card text-card-foreground shadow-sm', className)}\n {...props}\n />\n ),\n)\nCard.displayName = 'Card'\n\nexport const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n)\nCardHeader.displayName = 'CardHeader'\n\nexport const CardTitle = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n ),\n)\nCardTitle.displayName = 'CardTitle'\n\nexport const CardDescription = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n ),\n)\nCardDescription.displayName = 'CardDescription'\n\nexport const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />\n ),\n)\nCardContent.displayName = 'CardContent'\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n)\nCardFooter.displayName = 'CardFooter'\n","import * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Checkbox = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-xs',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"h-3.5 w-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\n\nCheckbox.displayName = 'Checkbox'\n","import { forwardRef, type InputHTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Input = forwardRef<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n ref={ref}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs',\n 'transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n 'placeholder:text-muted-foreground',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n },\n)\n\nInput.displayName = 'Input'\n","import {\n forwardRef,\n type HTMLAttributes,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n} from 'react'\nimport { cn } from './lib/cn'\n\nexport const Table = forwardRef<HTMLTableElement, HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n ),\n)\nTable.displayName = 'Table'\n\nexport const TableHeader = forwardRef<\n HTMLTableSectionElement,\n HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />\n))\nTableHeader.displayName = 'TableHeader'\n\nexport const TableBody = forwardRef<\n HTMLTableSectionElement,\n HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />\n))\nTableBody.displayName = 'TableBody'\n\nexport const TableFooter = forwardRef<\n HTMLTableSectionElement,\n HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n))\nTableFooter.displayName = 'TableFooter'\n\nexport const TableRow = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n 'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',\n className,\n )}\n {...props}\n />\n ),\n)\nTableRow.displayName = 'TableRow'\n\nexport const TableHead = forwardRef<HTMLTableCellElement, ThHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n 'h-10 px-2 text-left align-middle font-medium text-muted-foreground',\n '[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n ),\n)\nTableHead.displayName = 'TableHead'\n\nexport const TableCell = forwardRef<HTMLTableCellElement, TdHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n 'p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n ),\n)\nTableCell.displayName = 'TableCell'\n\nexport const TableCaption = forwardRef<\n HTMLTableCaptionElement,\n HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />\n))\nTableCaption.displayName = 'TableCaption'\n","import type { Table } from '@tanstack/react-table'\nimport { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react'\nimport { Button } from '../button'\nimport { cn } from '../lib/cn'\n\ninterface DataTablePaginationProps<TData> {\n table: Table<TData>\n className?: string\n}\n\nexport function DataTablePagination<TData>({ table, className }: DataTablePaginationProps<TData>) {\n const selectedCount = table.getFilteredSelectedRowModel().rows.length\n const totalCount = table.getFilteredRowModel().rows.length\n\n return (\n <div className={cn('flex items-center justify-between px-2', className)}>\n <div className=\"flex-1 text-sm text-muted-foreground\">\n {selectedCount > 0 && (\n <span>\n {selectedCount} of {totalCount} row(s) selected\n </span>\n )}\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </p>\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"hidden h-8 w-8 lg:flex\"\n onClick={() => table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <ChevronsLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-8 w-8\"\n onClick={() => table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-8 w-8\"\n onClick={() => table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"hidden h-8 w-8 lg:flex\"\n onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <ChevronsRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n </div>\n )\n}\n","import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nexport const DropdownMenuContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = 'DropdownMenuContent'\n\nexport const DropdownMenuItem = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none',\n 'transition-colors focus:bg-accent focus:text-accent-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = 'DropdownMenuItem'\n\nexport const DropdownMenuCheckboxItem = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none',\n 'transition-colors focus:bg-accent focus:text-accent-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem'\n\nexport const DropdownMenuLabel = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = 'DropdownMenuLabel'\n\nexport const DropdownMenuSeparator = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator'\n\nexport const DropdownMenuSubTrigger = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none',\n 'focus:bg-accent data-[state=open]:bg-accent',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger'\n\nexport const DropdownMenuSubContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent'\n\nexport function DropdownMenuShortcut({ className, ...props }: HTMLAttributes<HTMLSpanElement>) {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n}\n","import type { Table } from '@tanstack/react-table'\nimport { Settings2 } from 'lucide-react'\nimport { Button } from '../button'\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../dropdown-menu'\n\ninterface DataTableViewOptionsProps<TData> {\n table: Table<TData>\n}\n\nexport function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"ml-auto hidden h-8 lg:flex\">\n <Settings2 className=\"mr-2 h-4 w-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => column.toggleVisibility(!!value)}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import {\n type ColumnDef,\n type ColumnFiltersState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n type RowSelectionState,\n type SortingState,\n useReactTable,\n type VisibilityState,\n} from '@tanstack/react-table'\nimport { useState } from 'react'\nimport { Input } from '../input'\nimport { cn } from '../lib/cn'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../table'\nimport { DataTablePagination } from './data-table-pagination'\nimport { DataTableViewOptions } from './data-table-view-options'\n\nexport interface DataTableClassNames {\n root?: string\n toolbar?: string\n table?: string\n pagination?: string\n}\n\nexport interface DataTableProps<TData, TValue> {\n columns: ColumnDef<TData, TValue>[]\n data: TData[]\n searchKey?: string\n searchPlaceholder?: string\n pageSize?: number\n emptyMessage?: string\n classNames?: DataTableClassNames\n}\n\nexport function DataTable<TData, TValue>({\n columns,\n data,\n searchKey,\n searchPlaceholder = 'Filter...',\n pageSize = 10,\n emptyMessage = 'No results.',\n classNames,\n}: DataTableProps<TData, TValue>) {\n const [sorting, setSorting] = useState<SortingState>([])\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])\n const [columnVisibility, setColumnVisibility] = useState<VisibilityState>({})\n const [rowSelection, setRowSelection] = useState<RowSelectionState>({})\n\n const table = useReactTable({\n data,\n columns,\n state: { sorting, columnFilters, columnVisibility, rowSelection },\n onSortingChange: setSorting,\n onColumnFiltersChange: setColumnFilters,\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: { pagination: { pageSize } },\n })\n\n return (\n <div className={cn('space-y-4', classNames?.root)}>\n {/* Toolbar */}\n <div className={cn('flex items-center justify-between', classNames?.toolbar)}>\n <div className=\"flex flex-1 items-center space-x-2\">\n {searchKey && (\n <Input\n placeholder={searchPlaceholder}\n value={(table.getColumn(searchKey)?.getFilterValue() as string) ?? ''}\n onChange={(event) => table.getColumn(searchKey)?.setFilterValue(event.target.value)}\n className=\"h-8 w-[150px] lg:w-[250px]\"\n />\n )}\n </div>\n <DataTableViewOptions table={table} />\n </div>\n\n {/* Table */}\n <div className={cn('rounded-md border', classNames?.table)}>\n <Table>\n <TableHeader>\n {table.getHeaderGroups().map((headerGroup) => (\n <TableRow key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <TableHead key={header.id} colSpan={header.colSpan}>\n {header.isPlaceholder\n ? null\n : flexRender(header.column.columnDef.header, header.getContext())}\n </TableHead>\n ))}\n </TableRow>\n ))}\n </TableHeader>\n <TableBody>\n {table.getRowModel().rows.length > 0 ? (\n table.getRowModel().rows.map((row) => (\n <TableRow key={row.id} data-state={row.getIsSelected() && 'selected'}>\n {row.getVisibleCells().map((cell) => (\n <TableCell key={cell.id}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </TableCell>\n ))}\n </TableRow>\n ))\n ) : (\n <TableRow>\n <TableCell colSpan={columns.length} className=\"h-24 text-center\">\n {emptyMessage}\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </div>\n\n {/* Pagination */}\n <DataTablePagination table={table} className={classNames?.pagination} />\n </div>\n )\n}\n","import type { Column } from '@tanstack/react-table'\nimport { ArrowDown, ArrowUp, ChevronsUpDown, EyeOff } from 'lucide-react'\nimport { Button } from '../button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../dropdown-menu'\nimport { cn } from '../lib/cn'\n\ninterface DataTableColumnHeaderProps<TData, TValue> {\n column: Column<TData, TValue>\n title: string\n className?: string\n}\n\nexport function DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>) {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"sm\" className=\"-ml-3 h-8 data-[state=open]:bg-accent\">\n <span>{title}</span>\n {column.getIsSorted() === 'desc' ? (\n <ArrowDown className=\"ml-2 h-4 w-4\" />\n ) : column.getIsSorted() === 'asc' ? (\n <ArrowUp className=\"ml-2 h-4 w-4\" />\n ) : (\n <ChevronsUpDown className=\"ml-2 h-4 w-4\" />\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem onClick={() => column.toggleSorting(false)}>\n <ArrowUp className=\"mr-2 h-3.5 w-3.5 text-muted-foreground/70\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => column.toggleSorting(true)}>\n <ArrowDown className=\"mr-2 h-3.5 w-3.5 text-muted-foreground/70\" />\n Desc\n </DropdownMenuItem>\n {column.getCanHide() && (\n <>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={() => column.toggleVisibility(false)}>\n <EyeOff className=\"mr-2 h-3.5 w-3.5 text-muted-foreground/70\" />\n Hide\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n )\n}\n","import * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Dialog = DialogPrimitive.Root\nexport const DialogTrigger = DialogPrimitive.Trigger\nexport const DialogClose = DialogPrimitive.Close\nexport const DialogPortal = DialogPrimitive.Portal\n\nexport const DialogOverlay = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = 'DialogOverlay'\n\nexport const DialogContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]',\n 'gap-4 border bg-background p-6 shadow-lg sm:rounded-lg',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n 'data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]',\n 'data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className={cn(\n 'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity',\n 'hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n 'disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'cursor-pointer',\n )}\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = 'DialogContent'\n\nexport function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)}\n {...props}\n />\n )\n}\n\nexport function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n )\n}\n\nexport const DialogTitle = forwardRef<\n HTMLHeadingElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = 'DialogTitle'\n\nexport const DialogDescription = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDialogDescription.displayName = 'DialogDescription'\n","import * as LabelPrimitive from '@radix-ui/react-label'\nimport { type ComponentPropsWithoutRef, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Label = forwardRef<\n HTMLLabelElement,\n ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className,\n )}\n {...props}\n />\n))\n\nLabel.displayName = 'Label'\n","import type * as LabelPrimitive from '@radix-ui/react-label'\nimport { Slot } from '@radix-ui/react-slot'\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n forwardRef,\n type HTMLAttributes,\n useContext,\n useId,\n} from 'react'\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from 'react-hook-form'\nimport { Label } from './label'\nimport { cn } from './lib/cn'\n\n/* ---------- Form (re-export of FormProvider) ---------- */\n\nexport const Form = FormProvider\n\n/* ---------- FormField context ---------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName\n}\n\nconst FormFieldContext = createContext<FormFieldContextValue>({} as FormFieldContextValue)\n\nexport function FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(props: ControllerProps<TFieldValues, TName>) {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\n/* ---------- FormItem context ---------- */\n\ninterface FormItemContextValue {\n id: string\n}\n\nconst FormItemContext = createContext<FormItemContextValue>({} as FormItemContextValue)\n\n/* ---------- useFormField hook ---------- */\n\nexport function useFormField() {\n const fieldContext = useContext(FormFieldContext)\n const itemContext = useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\n/* ---------- FormItem ---------- */\n\nexport const FormItem = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = useId()\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n )\n },\n)\nFormItem.displayName = 'FormItem'\n\n/* ---------- FormLabel ---------- */\n\nexport const FormLabel = forwardRef<\n HTMLLabelElement,\n ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = 'FormLabel'\n\n/* ---------- FormControl ---------- */\n\nexport const FormControl = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof Slot>>(\n ({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n )\n },\n)\nFormControl.displayName = 'FormControl'\n\n/* ---------- FormDescription ---------- */\n\nexport const FormDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-[0.8rem] text-muted-foreground', className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = 'FormDescription'\n\n/* ---------- FormMessage ---------- */\n\nexport const FormMessage = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(\n ({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error.message) : children\n\n if (!body) return null\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-[0.8rem] font-medium text-destructive', className)}\n {...props}\n >\n {body}\n </p>\n )\n },\n)\nFormMessage.displayName = 'FormMessage'\n","import { forwardRef, type SelectHTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Select = forwardRef<HTMLSelectElement, SelectHTMLAttributes<HTMLSelectElement>>(\n ({ className, children, ...props }, ref) => {\n return (\n <select\n ref={ref}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-sm shadow-xs',\n 'transition-colors',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n </select>\n )\n },\n)\n\nSelect.displayName = 'Select'\n","import * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport { type ComponentPropsWithoutRef, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Separator = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-border',\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n className,\n )}\n {...props}\n />\n))\n\nSeparator.displayName = 'Separator'\n","import type { HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport function Skeleton({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />\n}\n","/**\n * Toast notifications — wraps sonner with toolkit token styling.\n *\n * Usage:\n * import { Toaster, toast } from '@murumets-ee/ui'\n *\n * // In layout (once):\n * <Toaster />\n *\n * // Anywhere:\n * toast.success('Saved')\n * toast.error('Cannot delete: referenced by article')\n */\n\nimport { Toaster as SonnerToaster, toast } from 'sonner'\n\nfunction Toaster() {\n return (\n <SonnerToaster\n position=\"bottom-right\"\n toastOptions={{\n style: {\n background: 'var(--color-background)',\n color: 'var(--color-foreground)',\n border: '1px solid var(--color-border)',\n },\n classNames: {\n error: 'sonner-error',\n success: 'sonner-success',\n },\n }}\n />\n )\n}\n\nexport { Toaster, toast }\n","import { forwardRef, type TextareaHTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Textarea = forwardRef<\n HTMLTextAreaElement,\n TextareaHTMLAttributes<HTMLTextAreaElement>\n>(({ className, ...props }, ref) => {\n return (\n <textarea\n ref={ref}\n className={cn(\n 'flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs',\n 'placeholder:text-muted-foreground',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n})\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";u+BAGA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAO,EAAQ,EAAK,EAAO,CAAC,CCG9B,MAAMA,GAAqE,CACzE,QAAS,kEACT,UAAW,4DACX,YAAa,0EACb,QAAS,kBACV,CAED,SAAgB,GAAM,CAAE,YAAW,UAAU,UAAW,GAAG,GAAqB,CAC9E,OACE,EAAC,MAAD,CACE,UAAW,EACT,iFACA,wFACAA,GAAe,GACf,EACD,CACD,GAAI,EACJ,CAAA,CCZN,MAAM,GAAsE,CAC1E,QAAS,mEACT,YAAa,+EACb,QACE,2FACF,UAAW,yEACX,MAAO,+CACP,KAAM,kDACP,CAEK,GAAgE,CACpE,QAAS,gBACT,GAAI,8BACJ,GAAI,uBACJ,KAAM,UACP,CAEY,EAAS,GAElB,CACE,YACA,UAAU,UACV,OAAO,UACP,UAAU,GACV,UAAU,GACV,WACA,WACA,OAAO,SACP,GAAG,GAEL,IACG,CACH,IAAM,EAAU,EACd,iGACA,mCACA,0EACA,mDACA,+CACA,GAAe,GACf,GAAY,GACZ,EACD,CAUD,OARI,EAEA,EAAC,EAAD,CAAW,MAAK,UAAW,EAAS,GAAI,EACrC,WACI,CAAA,CAKT,EAAC,SAAD,CA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file":"index.mjs","names":["variantClasses","SonnerToaster"],"sources":["../src/lib/cn.ts","../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/chart.tsx","../src/checkbox.tsx","../src/input.tsx","../src/table.tsx","../src/data-table/data-table-pagination.tsx","../src/dropdown-menu.tsx","../src/data-table/data-table-view-options.tsx","../src/data-table/data-table.tsx","../src/data-table/data-table-column-header.tsx","../src/dialog.tsx","../src/label.tsx","../src/form.tsx","../src/select.tsx","../src/separator.tsx","../src/skeleton.tsx","../src/sonner.tsx","../src/textarea.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import type { HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface BadgeProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'secondary' | 'destructive' | 'outline'\n}\n\nconst variantClasses: Record<NonNullable<BadgeProps['variant']>, string> = {\n default: 'border-transparent bg-primary text-primary-foreground shadow-xs',\n secondary: 'border-transparent bg-secondary text-secondary-foreground',\n destructive: 'border-transparent bg-destructive text-destructive-foreground shadow-xs',\n outline: 'text-foreground',\n}\n\nexport function Badge({ className, variant = 'default', ...props }: BadgeProps) {\n return (\n <div\n className={cn(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold',\n 'transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n variantClasses[variant],\n className,\n )}\n {...props}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport { Loader2 } from 'lucide-react'\nimport { type ButtonHTMLAttributes, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'\n size?: 'default' | 'sm' | 'lg' | 'icon'\n loading?: boolean\n asChild?: boolean\n}\n\nconst variantClasses: Record<NonNullable<ButtonProps['variant']>, string> = {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n}\n\nconst sizeClasses: Record<NonNullable<ButtonProps['size']>, string> = {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = 'default',\n size = 'default',\n loading = false,\n asChild = false,\n disabled,\n children,\n type = 'button',\n ...props\n },\n ref,\n ) => {\n const classes = cn(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-colors cursor-pointer',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n variantClasses[variant],\n sizeClasses[size],\n className,\n )\n\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} {...props}>\n {children}\n </Slot>\n )\n }\n\n return (\n <button ref={ref} disabled={disabled || loading} className={classes} type={type} {...props}>\n {loading && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {children}\n </button>\n )\n },\n)\n\nButton.displayName = 'Button'\n","import { forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('rounded-xl border bg-card text-card-foreground shadow-sm', className)}\n {...props}\n />\n ),\n)\nCard.displayName = 'Card'\n\nexport const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n)\nCardHeader.displayName = 'CardHeader'\n\nexport const CardTitle = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n ),\n)\nCardTitle.displayName = 'CardTitle'\n\nexport const CardDescription = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n ),\n)\nCardDescription.displayName = 'CardDescription'\n\nexport const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />\n ),\n)\nCardContent.displayName = 'CardContent'\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n)\nCardFooter.displayName = 'CardFooter'\n","\"use client\"\n\n/**\n * Chart primitives for dashboard widgets.\n *\n * Based on shadcn/ui chart component (Recharts under the hood).\n * Provides ChartContainer (responsive wrapper), ChartTooltip,\n * ChartTooltipContent, ChartLegend, ChartLegendContent.\n *\n * Usage: import Recharts components directly (Bar, BarChart, XAxis, etc.)\n * and wrap them in ChartContainer with a ChartConfig for theming.\n */\n\nimport * as React from \"react\"\nimport * as RechartsPrimitive from \"recharts\"\nimport type { TooltipValueType } from \"recharts\"\n\nimport { cn } from \"./lib/cn\"\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const\ntype TooltipNameType = number | string\n\nexport type ChartConfig = Record<\n string,\n {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n )\n>\n\ntype ChartContextProps = {\n config: ChartConfig\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error(\"useChart must be used within a <ChartContainer />\")\n }\n\n return context\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: React.ComponentProps<\"div\"> & {\n config: ChartConfig\n children: React.ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >[\"children\"]\n initialDimension?: {\n width: number\n height: number\n }\n}) {\n const uniqueId = React.useId()\n const chartId = `chart-${id ?? uniqueId.replace(/:/g, \"\")}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer\n initialDimension={initialDimension}\n >\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n const colorConfig = Object.entries(config).filter(\n ([, config]) => config.theme ?? config.color\n )\n\n if (!colorConfig.length) {\n return null\n }\n\n return (\n <style\n dangerouslySetInnerHTML={{\n __html: Object.entries(THEMES)\n .map(\n ([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n .map(([key, itemConfig]) => {\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ??\n itemConfig.color\n return color ? ` --color-${key}: ${color};` : null\n })\n .join(\"\\n\")}\n}\n`\n )\n .join(\"\\n\"),\n }}\n />\n )\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = \"dot\",\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<\"div\"> & {\n hideLabel?: boolean\n hideIndicator?: boolean\n indicator?: \"line\" | \"dot\" | \"dashed\"\n nameKey?: string\n labelKey?: string\n } & Omit<\n RechartsPrimitive.DefaultTooltipContentProps<\n TooltipValueType,\n TooltipNameType\n >,\n \"accessibilityLayer\"\n >) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value =\n !labelKey && typeof label === \"string\"\n ? (config[label]?.label ?? label)\n : itemConfig?.label\n\n if (labelFormatter) {\n return (\n <div className={cn(\"font-medium\", labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n )\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>\n }, [\n label,\n labelFormatter,\n payload,\n hideLabel,\n labelClassName,\n config,\n labelKey,\n ])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== \"dot\"\n\n return (\n <div\n className={cn(\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl\",\n className\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const indicatorColor = color ?? item.payload?.fill ?? item.color\n\n return (\n <div\n key={index}\n className={cn(\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground\",\n indicator === \"dot\" && \"items-center\"\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n \"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)\",\n {\n \"h-2.5 w-2.5\": indicator === \"dot\",\n \"w-1\": indicator === \"line\",\n \"w-0 border-[1.5px] border-dashed bg-transparent\":\n indicator === \"dashed\",\n \"my-0.5\": nestLabel && indicator === \"dashed\",\n }\n )}\n style={\n {\n \"--color-bg\": indicatorColor,\n \"--color-border\": indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n \"flex flex-1 justify-between leading-none\",\n nestLabel ? \"items-end\" : \"items-center\"\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label ?? item.name}\n </span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === \"number\"\n ? item.value.toLocaleString()\n : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nconst ChartLegend = RechartsPrimitive.Legend\n\nfunction ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = \"bottom\",\n nameKey,\n}: React.ComponentProps<\"div\"> & {\n hideIcon?: boolean\n nameKey?: string\n} & RechartsPrimitive.DefaultLegendContentProps) {\n const { config } = useChart()\n\n if (!payload?.length) {\n return null\n }\n\n return (\n <div\n className={cn(\n \"flex items-center justify-center gap-4\",\n verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n className\n )}\n >\n {payload\n .filter((item) => item.type !== \"none\")\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? \"value\"}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n\n return (\n <div\n key={index}\n className={cn(\n \"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground\"\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n )\n })}\n </div>\n )\n}\n\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string\n) {\n if (typeof payload !== \"object\" || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n \"payload\" in payload &&\n typeof payload.payload === \"object\" &&\n payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (\n key in payload &&\n typeof payload[key as keyof typeof payload] === \"string\"\n ) {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n ) {\n configLabelKey = payloadPayload[\n key as keyof typeof payloadPayload\n ] as string\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key]\n}\n\nexport {\n ChartContainer,\n ChartTooltip,\n ChartTooltipContent,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n}\n","import * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Checkbox = forwardRef<\n HTMLButtonElement,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-xs',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"h-3.5 w-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\n\nCheckbox.displayName = 'Checkbox'\n","import { forwardRef, type InputHTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Input = forwardRef<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n ref={ref}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs',\n 'transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n 'placeholder:text-muted-foreground',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n },\n)\n\nInput.displayName = 'Input'\n","import {\n forwardRef,\n type HTMLAttributes,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n} from 'react'\nimport { cn } from './lib/cn'\n\nexport const Table = forwardRef<HTMLTableElement, HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n ),\n)\nTable.displayName = 'Table'\n\nexport const TableHeader = forwardRef<\n HTMLTableSectionElement,\n HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />\n))\nTableHeader.displayName = 'TableHeader'\n\nexport const TableBody = forwardRef<\n HTMLTableSectionElement,\n HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />\n))\nTableBody.displayName = 'TableBody'\n\nexport const TableFooter = forwardRef<\n HTMLTableSectionElement,\n HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className)}\n {...props}\n />\n))\nTableFooter.displayName = 'TableFooter'\n\nexport const TableRow = forwardRef<HTMLTableRowElement, HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n 'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',\n className,\n )}\n {...props}\n />\n ),\n)\nTableRow.displayName = 'TableRow'\n\nexport const TableHead = forwardRef<HTMLTableCellElement, ThHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n 'h-10 px-2 text-left align-middle font-medium text-muted-foreground',\n '[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n ),\n)\nTableHead.displayName = 'TableHead'\n\nexport const TableCell = forwardRef<HTMLTableCellElement, TdHTMLAttributes<HTMLTableCellElement>>(\n ({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n 'p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n ),\n)\nTableCell.displayName = 'TableCell'\n\nexport const TableCaption = forwardRef<\n HTMLTableCaptionElement,\n HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />\n))\nTableCaption.displayName = 'TableCaption'\n","import type { Table } from '@tanstack/react-table'\nimport { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react'\nimport { Button } from '../button'\nimport { cn } from '../lib/cn'\n\ninterface DataTablePaginationProps<TData> {\n table: Table<TData>\n className?: string\n}\n\nexport function DataTablePagination<TData>({ table, className }: DataTablePaginationProps<TData>) {\n const selectedCount = table.getFilteredSelectedRowModel().rows.length\n const totalCount = table.getFilteredRowModel().rows.length\n\n return (\n <div className={cn('flex items-center justify-between px-2', className)}>\n <div className=\"flex-1 text-sm text-muted-foreground\">\n {selectedCount > 0 && (\n <span>\n {selectedCount} of {totalCount} row(s) selected\n </span>\n )}\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </p>\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"hidden h-8 w-8 lg:flex\"\n onClick={() => table.setPageIndex(0)}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to first page</span>\n <ChevronsLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-8 w-8\"\n onClick={() => table.previousPage()}\n disabled={!table.getCanPreviousPage()}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-8 w-8\"\n onClick={() => table.nextPage()}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRight className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"hidden h-8 w-8 lg:flex\"\n onClick={() => table.setPageIndex(table.getPageCount() - 1)}\n disabled={!table.getCanNextPage()}\n >\n <span className=\"sr-only\">Go to last page</span>\n <ChevronsRight className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n </div>\n )\n}\n","import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { Check, ChevronRight } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nexport const DropdownMenuContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = 'DropdownMenuContent'\n\nexport const DropdownMenuItem = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none',\n 'transition-colors focus:bg-accent focus:text-accent-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = 'DropdownMenuItem'\n\nexport const DropdownMenuCheckboxItem = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none',\n 'transition-colors focus:bg-accent focus:text-accent-foreground',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem'\n\nexport const DropdownMenuLabel = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = 'DropdownMenuLabel'\n\nexport const DropdownMenuSeparator = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator'\n\nexport const DropdownMenuSubTrigger = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none',\n 'focus:bg-accent data-[state=open]:bg-accent',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger'\n\nexport const DropdownMenuSubContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent'\n\nexport function DropdownMenuShortcut({ className, ...props }: HTMLAttributes<HTMLSpanElement>) {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n}\n","import type { Table } from '@tanstack/react-table'\nimport { Settings2 } from 'lucide-react'\nimport { Button } from '../button'\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../dropdown-menu'\n\ninterface DataTableViewOptionsProps<TData> {\n table: Table<TData>\n}\n\nexport function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"ml-auto hidden h-8 lg:flex\">\n <Settings2 className=\"mr-2 h-4 w-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-[150px]\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => (\n <DropdownMenuCheckboxItem\n key={column.id}\n className=\"capitalize\"\n checked={column.getIsVisible()}\n onCheckedChange={(value) => column.toggleVisibility(!!value)}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import {\n type ColumnDef,\n type ColumnFiltersState,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n type RowSelectionState,\n type SortingState,\n useReactTable,\n type VisibilityState,\n} from '@tanstack/react-table'\nimport { useState } from 'react'\nimport { Input } from '../input'\nimport { cn } from '../lib/cn'\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../table'\nimport { DataTablePagination } from './data-table-pagination'\nimport { DataTableViewOptions } from './data-table-view-options'\n\nexport interface DataTableClassNames {\n root?: string\n toolbar?: string\n table?: string\n pagination?: string\n}\n\nexport interface DataTableProps<TData, TValue> {\n columns: ColumnDef<TData, TValue>[]\n data: TData[]\n searchKey?: string\n searchPlaceholder?: string\n pageSize?: number\n emptyMessage?: string\n classNames?: DataTableClassNames\n}\n\nexport function DataTable<TData, TValue>({\n columns,\n data,\n searchKey,\n searchPlaceholder = 'Filter...',\n pageSize = 10,\n emptyMessage = 'No results.',\n classNames,\n}: DataTableProps<TData, TValue>) {\n const [sorting, setSorting] = useState<SortingState>([])\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([])\n const [columnVisibility, setColumnVisibility] = useState<VisibilityState>({})\n const [rowSelection, setRowSelection] = useState<RowSelectionState>({})\n\n const table = useReactTable({\n data,\n columns,\n state: { sorting, columnFilters, columnVisibility, rowSelection },\n onSortingChange: setSorting,\n onColumnFiltersChange: setColumnFilters,\n onColumnVisibilityChange: setColumnVisibility,\n onRowSelectionChange: setRowSelection,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n initialState: { pagination: { pageSize } },\n })\n\n return (\n <div className={cn('space-y-4', classNames?.root)}>\n {/* Toolbar */}\n <div className={cn('flex items-center justify-between', classNames?.toolbar)}>\n <div className=\"flex flex-1 items-center space-x-2\">\n {searchKey && (\n <Input\n placeholder={searchPlaceholder}\n value={(table.getColumn(searchKey)?.getFilterValue() as string) ?? ''}\n onChange={(event) => table.getColumn(searchKey)?.setFilterValue(event.target.value)}\n className=\"h-8 w-[150px] lg:w-[250px]\"\n />\n )}\n </div>\n <DataTableViewOptions table={table} />\n </div>\n\n {/* Table */}\n <div className={cn('rounded-md border', classNames?.table)}>\n <Table>\n <TableHeader>\n {table.getHeaderGroups().map((headerGroup) => (\n <TableRow key={headerGroup.id}>\n {headerGroup.headers.map((header) => (\n <TableHead key={header.id} colSpan={header.colSpan}>\n {header.isPlaceholder\n ? null\n : flexRender(header.column.columnDef.header, header.getContext())}\n </TableHead>\n ))}\n </TableRow>\n ))}\n </TableHeader>\n <TableBody>\n {table.getRowModel().rows.length > 0 ? (\n table.getRowModel().rows.map((row) => (\n <TableRow key={row.id} data-state={row.getIsSelected() && 'selected'}>\n {row.getVisibleCells().map((cell) => (\n <TableCell key={cell.id}>\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </TableCell>\n ))}\n </TableRow>\n ))\n ) : (\n <TableRow>\n <TableCell colSpan={columns.length} className=\"h-24 text-center\">\n {emptyMessage}\n </TableCell>\n </TableRow>\n )}\n </TableBody>\n </Table>\n </div>\n\n {/* Pagination */}\n <DataTablePagination table={table} className={classNames?.pagination} />\n </div>\n )\n}\n","import type { Column } from '@tanstack/react-table'\nimport { ArrowDown, ArrowUp, ChevronsUpDown, EyeOff } from 'lucide-react'\nimport { Button } from '../button'\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '../dropdown-menu'\nimport { cn } from '../lib/cn'\n\ninterface DataTableColumnHeaderProps<TData, TValue> {\n column: Column<TData, TValue>\n title: string\n className?: string\n}\n\nexport function DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>) {\n if (!column.getCanSort()) {\n return <div className={cn(className)}>{title}</div>\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"sm\" className=\"-ml-3 h-8 data-[state=open]:bg-accent\">\n <span>{title}</span>\n {column.getIsSorted() === 'desc' ? (\n <ArrowDown className=\"ml-2 h-4 w-4\" />\n ) : column.getIsSorted() === 'asc' ? (\n <ArrowUp className=\"ml-2 h-4 w-4\" />\n ) : (\n <ChevronsUpDown className=\"ml-2 h-4 w-4\" />\n )}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem onClick={() => column.toggleSorting(false)}>\n <ArrowUp className=\"mr-2 h-3.5 w-3.5 text-muted-foreground/70\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem onClick={() => column.toggleSorting(true)}>\n <ArrowDown className=\"mr-2 h-3.5 w-3.5 text-muted-foreground/70\" />\n Desc\n </DropdownMenuItem>\n {column.getCanHide() && (\n <>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={() => column.toggleVisibility(false)}>\n <EyeOff className=\"mr-2 h-3.5 w-3.5 text-muted-foreground/70\" />\n Hide\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n )\n}\n","import * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport { type ComponentPropsWithoutRef, forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Dialog = DialogPrimitive.Root\nexport const DialogTrigger = DialogPrimitive.Trigger\nexport const DialogClose = DialogPrimitive.Close\nexport const DialogPortal = DialogPrimitive.Portal\n\nexport const DialogOverlay = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = 'DialogOverlay'\n\nexport const DialogContent = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]',\n 'gap-4 border bg-background p-6 shadow-lg sm:rounded-lg',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out',\n 'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n 'data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]',\n 'data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className={cn(\n 'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity',\n 'hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n 'disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'cursor-pointer',\n )}\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = 'DialogContent'\n\nexport function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)}\n {...props}\n />\n )\n}\n\nexport function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n )\n}\n\nexport const DialogTitle = forwardRef<\n HTMLHeadingElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = 'DialogTitle'\n\nexport const DialogDescription = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n))\nDialogDescription.displayName = 'DialogDescription'\n","import * as LabelPrimitive from '@radix-ui/react-label'\nimport { type ComponentPropsWithoutRef, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Label = forwardRef<\n HTMLLabelElement,\n ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className,\n )}\n {...props}\n />\n))\n\nLabel.displayName = 'Label'\n","import type * as LabelPrimitive from '@radix-ui/react-label'\nimport { Slot } from '@radix-ui/react-slot'\nimport {\n type ComponentPropsWithoutRef,\n createContext,\n forwardRef,\n type HTMLAttributes,\n useContext,\n useId,\n} from 'react'\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n useFormContext,\n} from 'react-hook-form'\nimport { Label } from './label'\nimport { cn } from './lib/cn'\n\n/* ---------- Form (re-export of FormProvider) ---------- */\n\nexport const Form = FormProvider\n\n/* ---------- FormField context ---------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName\n}\n\nconst FormFieldContext = createContext<FormFieldContextValue>({} as FormFieldContextValue)\n\nexport function FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(props: ControllerProps<TFieldValues, TName>) {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\n/* ---------- FormItem context ---------- */\n\ninterface FormItemContextValue {\n id: string\n}\n\nconst FormItemContext = createContext<FormItemContextValue>({} as FormItemContextValue)\n\n/* ---------- useFormField hook ---------- */\n\nexport function useFormField() {\n const fieldContext = useContext(FormFieldContext)\n const itemContext = useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\n/* ---------- FormItem ---------- */\n\nexport const FormItem = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = useId()\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n )\n },\n)\nFormItem.displayName = 'FormItem'\n\n/* ---------- FormLabel ---------- */\n\nexport const FormLabel = forwardRef<\n HTMLLabelElement,\n ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n return (\n <Label\n ref={ref}\n className={cn(error && 'text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = 'FormLabel'\n\n/* ---------- FormControl ---------- */\n\nexport const FormControl = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof Slot>>(\n ({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n )\n },\n)\nFormControl.displayName = 'FormControl'\n\n/* ---------- FormDescription ---------- */\n\nexport const FormDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn('text-[0.8rem] text-muted-foreground', className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = 'FormDescription'\n\n/* ---------- FormMessage ---------- */\n\nexport const FormMessage = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(\n ({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error.message) : children\n\n if (!body) return null\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn('text-[0.8rem] font-medium text-destructive', className)}\n {...props}\n >\n {body}\n </p>\n )\n },\n)\nFormMessage.displayName = 'FormMessage'\n","import { forwardRef, type SelectHTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Select = forwardRef<HTMLSelectElement, SelectHTMLAttributes<HTMLSelectElement>>(\n ({ className, children, ...props }, ref) => {\n return (\n <select\n ref={ref}\n className={cn(\n 'flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-sm shadow-xs',\n 'transition-colors',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n </select>\n )\n },\n)\n\nSelect.displayName = 'Select'\n","import * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport { type ComponentPropsWithoutRef, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Separator = forwardRef<\n HTMLDivElement,\n ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-border',\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n className,\n )}\n {...props}\n />\n))\n\nSeparator.displayName = 'Separator'\n","import type { HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport function Skeleton({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />\n}\n","/**\n * Toast notifications — wraps sonner with toolkit token styling.\n *\n * Usage:\n * import { Toaster, toast } from '@murumets-ee/ui'\n *\n * // In layout (once):\n * <Toaster />\n *\n * // Anywhere:\n * toast.success('Saved')\n * toast.error('Cannot delete: referenced by article')\n */\n\nimport { Toaster as SonnerToaster, toast } from 'sonner'\n\nfunction Toaster() {\n return (\n <SonnerToaster\n position=\"bottom-right\"\n toastOptions={{\n style: {\n background: 'var(--color-background)',\n color: 'var(--color-foreground)',\n border: '1px solid var(--color-border)',\n },\n classNames: {\n error: 'sonner-error',\n success: 'sonner-success',\n },\n }}\n />\n )\n}\n\nexport { Toaster, toast }\n","import { forwardRef, type TextareaHTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Textarea = forwardRef<\n HTMLTextAreaElement,\n TextareaHTMLAttributes<HTMLTextAreaElement>\n>(({ className, ...props }, ref) => {\n return (\n <textarea\n ref={ref}\n className={cn(\n 'flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs',\n 'placeholder:text-muted-foreground',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n})\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";4hCAGA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAO,EAAQ,EAAK,EAAO,CAAC,CCG9B,MAAMA,GAAqE,CACzE,QAAS,kEACT,UAAW,4DACX,YAAa,0EACb,QAAS,kBACV,CAED,SAAgB,GAAM,CAAE,YAAW,UAAU,UAAW,GAAG,GAAqB,CAC9E,OACE,EAAC,MAAD,CACE,UAAW,EACT,iFACA,wFACAA,GAAe,GACf,EACD,CACD,GAAI,EACJ,CAAA,CCZN,MAAM,GAAsE,CAC1E,QAAS,mEACT,YAAa,+EACb,QACE,2FACF,UAAW,yEACX,MAAO,+CACP,KAAM,kDACP,CAEK,GAAgE,CACpE,QAAS,gBACT,GAAI,8BACJ,GAAI,uBACJ,KAAM,UACP,CAEY,EAAS,GAElB,CACE,YACA,UAAU,UACV,OAAO,UACP,UAAU,GACV,UAAU,GACV,WACA,WACA,OAAO,SACP,GAAG,GAEL,IACG,CACH,IAAM,EAAU,EACd,iGACA,mCACA,0EACA,mDACA,+CACA,GAAe,GACf,GAAY,GACZ,EACD,CAUD,OARI,EAEA,EAAC,EAAD,CAAW,MAAK,UAAW,EAAS,GAAI,EACrC,WACI,CAAA,CAKT,EAAC,SAAD,CAAa,MAAK,SAAU,GAAY,EAAS,UAAW,EAAe,OAAM,GAAI,WAArF,CACG,GAAW,EAAC,EAAD,CAAS,UAAU,uBA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C,WAAD,CACO,MACL,UAAW,EACT,qGACA,oCACA,0EACA,kDACA,EACD,CACD,GAAI,EACJ,CAAA,CAEJ,CAEF,GAAS,YAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@murumets-ee/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsdown",
|
|
17
|
+
"dev": "tsdown --watch",
|
|
18
|
+
"test": "vitest"
|
|
19
|
+
},
|
|
15
20
|
"dependencies": {
|
|
16
21
|
"@radix-ui/react-checkbox": "^1.1.0",
|
|
17
22
|
"@radix-ui/react-dialog": "^1.1.0",
|
|
@@ -21,6 +26,7 @@
|
|
|
21
26
|
"@radix-ui/react-slot": "^1.1.0",
|
|
22
27
|
"@radix-ui/react-visually-hidden": "^1.1.0",
|
|
23
28
|
"clsx": "^2.1.0",
|
|
29
|
+
"recharts": "^3.8.0",
|
|
24
30
|
"sonner": "^2.0.7",
|
|
25
31
|
"tailwind-merge": "^2.6.0"
|
|
26
32
|
},
|
|
@@ -60,10 +66,5 @@
|
|
|
60
66
|
"typescript": "^5.7.3",
|
|
61
67
|
"vitest": "^2.1.8",
|
|
62
68
|
"zod": "^3.24.0"
|
|
63
|
-
},
|
|
64
|
-
"scripts": {
|
|
65
|
-
"build": "tsdown",
|
|
66
|
-
"dev": "tsdown --watch",
|
|
67
|
-
"test": "vitest"
|
|
68
69
|
}
|
|
69
|
-
}
|
|
70
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
Elastic License 2.0 (ELv2)
|
|
2
|
-
|
|
3
|
-
URL: https://www.elastic.co/licensing/elastic-license
|
|
4
|
-
|
|
5
|
-
## Acceptance
|
|
6
|
-
|
|
7
|
-
By using the software, you agree to all of the terms and conditions below.
|
|
8
|
-
|
|
9
|
-
## Copyright License
|
|
10
|
-
|
|
11
|
-
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
12
|
-
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
13
|
-
available, and prepare derivative works of the software, in each case subject
|
|
14
|
-
to the limitations and conditions below.
|
|
15
|
-
|
|
16
|
-
## Limitations
|
|
17
|
-
|
|
18
|
-
You may not provide the software to third parties as a hosted or managed
|
|
19
|
-
service, where the service provides users with access to any substantial set
|
|
20
|
-
of the features or functionality of the software.
|
|
21
|
-
|
|
22
|
-
You may not move, change, disable, or circumvent the license key functionality
|
|
23
|
-
in the software, and you may not remove or obscure any functionality in the
|
|
24
|
-
software that is protected by the license key.
|
|
25
|
-
|
|
26
|
-
You may not alter, remove, or obscure any licensing, copyright, or other
|
|
27
|
-
notices of the licensor in the software. Any use of the licensor's trademarks
|
|
28
|
-
is subject to applicable law.
|
|
29
|
-
|
|
30
|
-
## Patents
|
|
31
|
-
|
|
32
|
-
The licensor grants you a license, under any patent claims the licensor can
|
|
33
|
-
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
34
|
-
sale, import and have imported the software, in each case subject to the
|
|
35
|
-
limitations and conditions in this license. This license does not cover any
|
|
36
|
-
patent claims that you cause to be infringed by modifications or additions to
|
|
37
|
-
the software. If you or your company make any written claim that the software
|
|
38
|
-
infringes or contributes to infringement of any patent, your patent license
|
|
39
|
-
for the software granted under these terms ends immediately. If your company
|
|
40
|
-
makes such a claim, your patent license ends immediately for work on behalf
|
|
41
|
-
of your company.
|
|
42
|
-
|
|
43
|
-
## Notices
|
|
44
|
-
|
|
45
|
-
You must ensure that anyone who gets a copy of any part of the software from
|
|
46
|
-
you also gets a copy of these terms.
|
|
47
|
-
|
|
48
|
-
If you modify the software, you must include in any modified copies of the
|
|
49
|
-
software prominent notices stating that you have modified the software.
|
|
50
|
-
|
|
51
|
-
## No Other Rights
|
|
52
|
-
|
|
53
|
-
These terms do not imply any licenses other than those expressly granted in
|
|
54
|
-
these terms.
|
|
55
|
-
|
|
56
|
-
## Termination
|
|
57
|
-
|
|
58
|
-
If you use the software in violation of these terms, such use is not licensed,
|
|
59
|
-
and your licenses will automatically terminate. If the licensor provides you
|
|
60
|
-
with a notice of your violation, and you cease all violation of this license
|
|
61
|
-
no later than 30 days after you receive that notice, your licenses will be
|
|
62
|
-
reinstated retroactively. However, if you violate these terms after such
|
|
63
|
-
reinstatement, any additional violation of these terms will cause your
|
|
64
|
-
licenses to terminate automatically and permanently.
|
|
65
|
-
|
|
66
|
-
## No Liability
|
|
67
|
-
|
|
68
|
-
As far as the law allows, the software comes as is, without any warranty or
|
|
69
|
-
condition, and the licensor will not be liable to you for any damages arising
|
|
70
|
-
out of these terms or the use or nature of the software, under any kind of
|
|
71
|
-
legal claim.
|
|
72
|
-
|
|
73
|
-
## Definitions
|
|
74
|
-
|
|
75
|
-
The **licensor** is the entity offering these terms, and the **software** is
|
|
76
|
-
the software the licensor makes available under these terms, including any
|
|
77
|
-
portion of it.
|
|
78
|
-
|
|
79
|
-
**you** refers to the individual or entity agreeing to these terms.
|
|
80
|
-
|
|
81
|
-
**your company** is any legal entity, sole proprietorship, or other kind of
|
|
82
|
-
organization that you work for, plus all organizations that have control over,
|
|
83
|
-
are under the control of, or are under common control with that organization.
|
|
84
|
-
**control** means ownership of substantially all the assets of an entity, or
|
|
85
|
-
the power to direct the management and policies of an entity (for example, by
|
|
86
|
-
voting right, contract, or otherwise). Control can be direct or indirect.
|
|
87
|
-
|
|
88
|
-
**your licenses** are all the licenses granted to you for the software under
|
|
89
|
-
these terms.
|
|
90
|
-
|
|
91
|
-
**use** means anything you do with the software requiring one of your
|
|
92
|
-
licenses.
|
|
93
|
-
|
|
94
|
-
**trademark** means trademarks, service marks, and similar rights.
|