@murumets-ee/ui 0.1.4 → 0.1.5
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 +204 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +6 -6
- package/dist/index.d.ts +0 -149
- package/dist/index.js +0 -2
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
|
|
2
|
+
import { ClassValue } from "clsx";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as _$_radix_ui_react_slot0 from "@radix-ui/react-slot";
|
|
5
|
+
import * as _$react from "react";
|
|
6
|
+
import { ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes } from "react";
|
|
7
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
8
|
+
import { Column, ColumnDef, Table as Table$1 } from "@tanstack/react-table";
|
|
9
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
10
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
11
|
+
import * as _$react_hook_form0 from "react-hook-form";
|
|
12
|
+
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
13
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
14
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
15
|
+
import { toast } from "sonner";
|
|
16
|
+
|
|
17
|
+
//#region src/badge.d.ts
|
|
18
|
+
interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
variant?: 'default' | 'secondary' | 'destructive' | 'outline';
|
|
20
|
+
}
|
|
21
|
+
declare function Badge({
|
|
22
|
+
className,
|
|
23
|
+
variant,
|
|
24
|
+
...props
|
|
25
|
+
}: BadgeProps): _$react_jsx_runtime0.JSX.Element;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/button.d.ts
|
|
28
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
29
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
30
|
+
size?: 'default' | 'sm' | 'lg' | 'icon';
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
asChild?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const Button: _$react.ForwardRefExoticComponent<ButtonProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/card.d.ts
|
|
37
|
+
declare const Card: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
declare const CardHeader: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
39
|
+
declare const CardTitle: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
declare const CardDescription: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const CardContent: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
declare const CardFooter: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/checkbox.d.ts
|
|
45
|
+
declare const Checkbox: _$react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & _$react.RefAttributes<HTMLButtonElement>, "ref"> & _$react.RefAttributes<HTMLButtonElement>>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/data-table/data-table.d.ts
|
|
48
|
+
interface DataTableClassNames {
|
|
49
|
+
root?: string;
|
|
50
|
+
toolbar?: string;
|
|
51
|
+
table?: string;
|
|
52
|
+
pagination?: string;
|
|
53
|
+
}
|
|
54
|
+
interface DataTableProps<TData, TValue> {
|
|
55
|
+
columns: ColumnDef<TData, TValue>[];
|
|
56
|
+
data: TData[];
|
|
57
|
+
searchKey?: string;
|
|
58
|
+
searchPlaceholder?: string;
|
|
59
|
+
pageSize?: number;
|
|
60
|
+
emptyMessage?: string;
|
|
61
|
+
classNames?: DataTableClassNames;
|
|
62
|
+
}
|
|
63
|
+
declare function DataTable<TData, TValue>({
|
|
64
|
+
columns,
|
|
65
|
+
data,
|
|
66
|
+
searchKey,
|
|
67
|
+
searchPlaceholder,
|
|
68
|
+
pageSize,
|
|
69
|
+
emptyMessage,
|
|
70
|
+
classNames
|
|
71
|
+
}: DataTableProps<TData, TValue>): _$react_jsx_runtime0.JSX.Element;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/data-table/data-table-column-header.d.ts
|
|
74
|
+
interface DataTableColumnHeaderProps<TData, TValue> {
|
|
75
|
+
column: Column<TData, TValue>;
|
|
76
|
+
title: string;
|
|
77
|
+
className?: string;
|
|
78
|
+
}
|
|
79
|
+
declare function DataTableColumnHeader<TData, TValue>({
|
|
80
|
+
column,
|
|
81
|
+
title,
|
|
82
|
+
className
|
|
83
|
+
}: DataTableColumnHeaderProps<TData, TValue>): _$react_jsx_runtime0.JSX.Element;
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/data-table/data-table-pagination.d.ts
|
|
86
|
+
interface DataTablePaginationProps<TData> {
|
|
87
|
+
table: Table$1<TData>;
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
declare function DataTablePagination<TData>({
|
|
91
|
+
table,
|
|
92
|
+
className
|
|
93
|
+
}: DataTablePaginationProps<TData>): _$react_jsx_runtime0.JSX.Element;
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/data-table/data-table-view-options.d.ts
|
|
96
|
+
interface DataTableViewOptionsProps<TData> {
|
|
97
|
+
table: Table$1<TData>;
|
|
98
|
+
}
|
|
99
|
+
declare function DataTableViewOptions<TData>({
|
|
100
|
+
table
|
|
101
|
+
}: DataTableViewOptionsProps<TData>): _$react_jsx_runtime0.JSX.Element;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/dialog.d.ts
|
|
104
|
+
declare const Dialog: _$react.FC<DialogPrimitive.DialogProps>;
|
|
105
|
+
declare const DialogTrigger: _$react.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
106
|
+
declare const DialogClose: _$react.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
107
|
+
declare const DialogPortal: _$react.FC<DialogPrimitive.DialogPortalProps>;
|
|
108
|
+
declare const DialogOverlay: _$react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
109
|
+
declare const DialogContent: _$react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
110
|
+
declare function DialogHeader({
|
|
111
|
+
className,
|
|
112
|
+
...props
|
|
113
|
+
}: HTMLAttributes<HTMLDivElement>): _$react_jsx_runtime0.JSX.Element;
|
|
114
|
+
declare function DialogFooter({
|
|
115
|
+
className,
|
|
116
|
+
...props
|
|
117
|
+
}: HTMLAttributes<HTMLDivElement>): _$react_jsx_runtime0.JSX.Element;
|
|
118
|
+
declare const DialogTitle: _$react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & _$react.RefAttributes<HTMLHeadingElement>, "ref"> & _$react.RefAttributes<HTMLHeadingElement>>;
|
|
119
|
+
declare const DialogDescription: _$react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & _$react.RefAttributes<HTMLParagraphElement>, "ref"> & _$react.RefAttributes<HTMLParagraphElement>>;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/dropdown-menu.d.ts
|
|
122
|
+
declare const DropdownMenu: _$react.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
123
|
+
declare const DropdownMenuTrigger: _$react.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
124
|
+
declare const DropdownMenuGroup: _$react.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
125
|
+
declare const DropdownMenuPortal: _$react.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
126
|
+
declare const DropdownMenuSub: _$react.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
127
|
+
declare const DropdownMenuContent: _$react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
128
|
+
declare const DropdownMenuItem: _$react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
129
|
+
inset?: boolean;
|
|
130
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
131
|
+
declare const DropdownMenuCheckboxItem: _$react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
132
|
+
declare const DropdownMenuLabel: _$react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
133
|
+
inset?: boolean;
|
|
134
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
135
|
+
declare const DropdownMenuSeparator: _$react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
136
|
+
declare const DropdownMenuSubTrigger: _$react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
137
|
+
inset?: boolean;
|
|
138
|
+
} & _$react.RefAttributes<HTMLDivElement>>;
|
|
139
|
+
declare const DropdownMenuSubContent: _$react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
140
|
+
declare function DropdownMenuShortcut({
|
|
141
|
+
className,
|
|
142
|
+
...props
|
|
143
|
+
}: HTMLAttributes<HTMLSpanElement>): _$react_jsx_runtime0.JSX.Element;
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/form.d.ts
|
|
146
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: _$react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
147
|
+
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: ControllerProps<TFieldValues, TName>): _$react_jsx_runtime0.JSX.Element;
|
|
148
|
+
declare function useFormField(): {
|
|
149
|
+
invalid: boolean;
|
|
150
|
+
isDirty: boolean;
|
|
151
|
+
isTouched: boolean;
|
|
152
|
+
isValidating: boolean;
|
|
153
|
+
error?: _$react_hook_form0.FieldError;
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
formItemId: string;
|
|
157
|
+
formDescriptionId: string;
|
|
158
|
+
formMessageId: string;
|
|
159
|
+
};
|
|
160
|
+
declare const FormItem: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & _$react.RefAttributes<HTMLDivElement>>;
|
|
161
|
+
declare const FormLabel: _$react.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & _$react.RefAttributes<HTMLLabelElement>, "ref"> & _$react.RefAttributes<HTMLLabelElement>>;
|
|
162
|
+
declare const FormControl: _$react.ForwardRefExoticComponent<Omit<_$_radix_ui_react_slot0.SlotProps & _$react.RefAttributes<HTMLElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
163
|
+
declare const FormDescription: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & _$react.RefAttributes<HTMLParagraphElement>>;
|
|
164
|
+
declare const FormMessage: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & _$react.RefAttributes<HTMLParagraphElement>>;
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/input.d.ts
|
|
167
|
+
declare const Input: _$react.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & _$react.RefAttributes<HTMLInputElement>>;
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/label.d.ts
|
|
170
|
+
declare const Label: _$react.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & _$react.RefAttributes<HTMLLabelElement>, "ref"> & _$react.RefAttributes<HTMLLabelElement>>;
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/lib/cn.d.ts
|
|
173
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/select.d.ts
|
|
176
|
+
declare const Select: _$react.ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & _$react.RefAttributes<HTMLSelectElement>>;
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/separator.d.ts
|
|
179
|
+
declare const Separator: _$react.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & _$react.RefAttributes<HTMLDivElement>, "ref"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/skeleton.d.ts
|
|
182
|
+
declare function Skeleton({
|
|
183
|
+
className,
|
|
184
|
+
...props
|
|
185
|
+
}: HTMLAttributes<HTMLDivElement>): _$react_jsx_runtime0.JSX.Element;
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/sonner.d.ts
|
|
188
|
+
declare function Toaster(): _$react_jsx_runtime0.JSX.Element;
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/table.d.ts
|
|
191
|
+
declare const Table: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & _$react.RefAttributes<HTMLTableElement>>;
|
|
192
|
+
declare const TableHeader: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & _$react.RefAttributes<HTMLTableSectionElement>>;
|
|
193
|
+
declare const TableBody: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & _$react.RefAttributes<HTMLTableSectionElement>>;
|
|
194
|
+
declare const TableFooter: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & _$react.RefAttributes<HTMLTableSectionElement>>;
|
|
195
|
+
declare const TableRow: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & _$react.RefAttributes<HTMLTableRowElement>>;
|
|
196
|
+
declare const TableHead: _$react.ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & _$react.RefAttributes<HTMLTableCellElement>>;
|
|
197
|
+
declare const TableCell: _$react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & _$react.RefAttributes<HTMLTableCellElement>>;
|
|
198
|
+
declare const TableCaption: _$react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & _$react.RefAttributes<HTMLTableCaptionElement>>;
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/textarea.d.ts
|
|
201
|
+
declare const Textarea: _$react.ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & _$react.RefAttributes<HTMLTextAreaElement>>;
|
|
202
|
+
//#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 };
|
|
204
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;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;EAC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ge 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};
|
|
3
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +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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jB,OACE,EAACC,GAAD,CACE,SAAS,eACT,aAAc,CACZ,MAAO,CACL,WAAY,0BACZ,MAAO,0BACP,OAAQ,gCACT,CACD,WAAY,CACV,MAAO,eACP,QAAS,iBACV,CACF,CACD,CAAA,CC5BN,MAAa,EAAW,GAGrB,CAAE,YAAW,GAAG,GAAS,IAExB,EAAC,WAAD,CACO,MACL,UAAW,EACT,qGACA,oCACA,0EACA,kDACA,EACD,CACD,GAAI,EACJ,CAAA,CAEJ,CAEF,EAAS,YAAc"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@murumets-ee/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"types": "./dist/index.d.
|
|
9
|
-
"import": "./dist/index.
|
|
8
|
+
"types": "./dist/index.d.mts",
|
|
9
|
+
"import": "./dist/index.mjs"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"react": "^19.0.0",
|
|
57
57
|
"react-dom": "^19.0.0",
|
|
58
58
|
"react-hook-form": "^7.71.1",
|
|
59
|
-
"
|
|
59
|
+
"tsdown": "^0.21.7",
|
|
60
60
|
"typescript": "^5.7.3",
|
|
61
61
|
"vitest": "^2.1.8",
|
|
62
62
|
"zod": "^3.24.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
|
-
"build": "
|
|
66
|
-
"dev": "
|
|
65
|
+
"build": "tsdown",
|
|
66
|
+
"dev": "tsdown --watch",
|
|
67
67
|
"test": "vitest"
|
|
68
68
|
}
|
|
69
69
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
4
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
5
|
-
import { ColumnDef, Column, Table as Table$1 } from '@tanstack/react-table';
|
|
6
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
7
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
8
|
-
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
9
|
-
import * as react_hook_form from 'react-hook-form';
|
|
10
|
-
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
11
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
12
|
-
import { ClassValue } from 'clsx';
|
|
13
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
14
|
-
export { toast } from 'sonner';
|
|
15
|
-
|
|
16
|
-
interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
-
variant?: 'default' | 'secondary' | 'destructive' | 'outline';
|
|
18
|
-
}
|
|
19
|
-
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
20
|
-
|
|
21
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
22
|
-
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
23
|
-
size?: 'default' | 'sm' | 'lg' | 'icon';
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
asChild?: boolean;
|
|
26
|
-
}
|
|
27
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
28
|
-
|
|
29
|
-
declare const Card: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
declare const CardHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
31
|
-
declare const CardTitle: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
declare const CardDescription: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
declare const CardContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
declare const CardFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
35
|
-
|
|
36
|
-
declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
37
|
-
|
|
38
|
-
interface DataTableClassNames {
|
|
39
|
-
root?: string;
|
|
40
|
-
toolbar?: string;
|
|
41
|
-
table?: string;
|
|
42
|
-
pagination?: string;
|
|
43
|
-
}
|
|
44
|
-
interface DataTableProps<TData, TValue> {
|
|
45
|
-
columns: ColumnDef<TData, TValue>[];
|
|
46
|
-
data: TData[];
|
|
47
|
-
searchKey?: string;
|
|
48
|
-
searchPlaceholder?: string;
|
|
49
|
-
pageSize?: number;
|
|
50
|
-
emptyMessage?: string;
|
|
51
|
-
classNames?: DataTableClassNames;
|
|
52
|
-
}
|
|
53
|
-
declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, pageSize, emptyMessage, classNames, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
54
|
-
|
|
55
|
-
interface DataTableColumnHeaderProps<TData, TValue> {
|
|
56
|
-
column: Column<TData, TValue>;
|
|
57
|
-
title: string;
|
|
58
|
-
className?: string;
|
|
59
|
-
}
|
|
60
|
-
declare function DataTableColumnHeader<TData, TValue>({ column, title, className, }: DataTableColumnHeaderProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
61
|
-
|
|
62
|
-
interface DataTablePaginationProps<TData> {
|
|
63
|
-
table: Table$1<TData>;
|
|
64
|
-
className?: string;
|
|
65
|
-
}
|
|
66
|
-
declare function DataTablePagination<TData>({ table, className }: DataTablePaginationProps<TData>): react_jsx_runtime.JSX.Element;
|
|
67
|
-
|
|
68
|
-
interface DataTableViewOptionsProps<TData> {
|
|
69
|
-
table: Table$1<TData>;
|
|
70
|
-
}
|
|
71
|
-
declare function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): react_jsx_runtime.JSX.Element;
|
|
72
|
-
|
|
73
|
-
declare const Dialog: react.FC<DialogPrimitive.DialogProps>;
|
|
74
|
-
declare const DialogTrigger: react.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
75
|
-
declare const DialogClose: react.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
|
|
76
|
-
declare const DialogPortal: react.FC<DialogPrimitive.DialogPortalProps>;
|
|
77
|
-
declare const DialogOverlay: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
78
|
-
declare const DialogContent: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
79
|
-
declare function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
80
|
-
declare function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
81
|
-
declare const DialogTitle: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
|
|
82
|
-
declare const DialogDescription: react.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
|
|
83
|
-
|
|
84
|
-
declare const DropdownMenu: react.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
85
|
-
declare const DropdownMenuTrigger: react.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
|
86
|
-
declare const DropdownMenuGroup: react.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
87
|
-
declare const DropdownMenuPortal: react.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
88
|
-
declare const DropdownMenuSub: react.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
89
|
-
declare const DropdownMenuContent: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
90
|
-
declare const DropdownMenuItem: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
91
|
-
inset?: boolean;
|
|
92
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
93
|
-
declare const DropdownMenuCheckboxItem: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
94
|
-
declare const DropdownMenuLabel: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
95
|
-
inset?: boolean;
|
|
96
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
97
|
-
declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
98
|
-
declare const DropdownMenuSubTrigger: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
99
|
-
inset?: boolean;
|
|
100
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
101
|
-
declare const DropdownMenuSubContent: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
102
|
-
declare function DropdownMenuShortcut({ className, ...props }: HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
103
|
-
|
|
104
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
105
|
-
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: ControllerProps<TFieldValues, TName>): react_jsx_runtime.JSX.Element;
|
|
106
|
-
declare function useFormField(): {
|
|
107
|
-
invalid: boolean;
|
|
108
|
-
isDirty: boolean;
|
|
109
|
-
isTouched: boolean;
|
|
110
|
-
isValidating: boolean;
|
|
111
|
-
error?: react_hook_form.FieldError;
|
|
112
|
-
id: string;
|
|
113
|
-
name: string;
|
|
114
|
-
formItemId: string;
|
|
115
|
-
formDescriptionId: string;
|
|
116
|
-
formMessageId: string;
|
|
117
|
-
};
|
|
118
|
-
declare const FormItem: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
119
|
-
declare const FormLabel: react.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & react.RefAttributes<HTMLLabelElement>, "ref"> & react.RefAttributes<HTMLLabelElement>>;
|
|
120
|
-
declare const FormControl: react.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & react.RefAttributes<HTMLElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
121
|
-
declare const FormDescription: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
122
|
-
declare const FormMessage: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
|
|
123
|
-
|
|
124
|
-
declare const Input: react.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & react.RefAttributes<HTMLInputElement>>;
|
|
125
|
-
|
|
126
|
-
declare const Label: react.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & react.RefAttributes<HTMLLabelElement>, "ref"> & react.RefAttributes<HTMLLabelElement>>;
|
|
127
|
-
|
|
128
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
129
|
-
|
|
130
|
-
declare const Select: react.ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & react.RefAttributes<HTMLSelectElement>>;
|
|
131
|
-
|
|
132
|
-
declare const Separator: react.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
133
|
-
|
|
134
|
-
declare function Skeleton({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
135
|
-
|
|
136
|
-
declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
137
|
-
|
|
138
|
-
declare const Table: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & react.RefAttributes<HTMLTableElement>>;
|
|
139
|
-
declare const TableHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
140
|
-
declare const TableBody: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
141
|
-
declare const TableFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & react.RefAttributes<HTMLTableSectionElement>>;
|
|
142
|
-
declare const TableRow: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & react.RefAttributes<HTMLTableRowElement>>;
|
|
143
|
-
declare const TableHead: react.ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
|
|
144
|
-
declare const TableCell: react.ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & react.RefAttributes<HTMLTableCellElement>>;
|
|
145
|
-
declare const TableCaption: react.ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & react.RefAttributes<HTMLTableCaptionElement>>;
|
|
146
|
-
|
|
147
|
-
declare const Textarea: react.ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & react.RefAttributes<HTMLTextAreaElement>>;
|
|
148
|
-
|
|
149
|
-
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, useFormField };
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{clsx as Ue}from"clsx";import{twMerge as Xe}from"tailwind-merge";function r(...e){return Xe(Ue(e))}import{jsx as Qe}from"react/jsx-runtime";var qe={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 Je({className:e,variant:t="default",...o}){return Qe("div",{className:r("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",qe[t],e),...o})}import{Slot as Ye}from"@radix-ui/react-slot";import{Loader2 as Ze}from"lucide-react";import{forwardRef as Ke}from"react";import{jsx as ne,jsxs as tt}from"react/jsx-runtime";var je={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"},et={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"},m=Ke(({className:e,variant:t="default",size:o="default",loading:a=!1,asChild:i=!1,disabled:d,children:c,type:j="button",...A},B)=>{let z=r("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",je[t],et[o],e);return i?ne(Ye,{ref:B,className:z,...A,children:c}):tt("button",{ref:B,disabled:d||a,className:z,type:j,...A,children:[a&&ne(Ze,{className:"h-4 w-4 animate-spin"}),c]})});m.displayName="Button";import{forwardRef as h}from"react";import{jsx as P}from"react/jsx-runtime";var ie=h(({className:e,...t},o)=>P("div",{ref:o,className:r("rounded-xl border bg-card text-card-foreground shadow-sm",e),...t}));ie.displayName="Card";var se=h(({className:e,...t},o)=>P("div",{ref:o,className:r("flex flex-col space-y-1.5 p-6",e),...t}));se.displayName="CardHeader";var le=h(({className:e,...t},o)=>P("div",{ref:o,className:r("font-semibold leading-none tracking-tight",e),...t}));le.displayName="CardTitle";var de=h(({className:e,...t},o)=>P("div",{ref:o,className:r("text-sm text-muted-foreground",e),...t}));de.displayName="CardDescription";var me=h(({className:e,...t},o)=>P("div",{ref:o,className:r("p-6 pt-0",e),...t}));me.displayName="CardContent";var pe=h(({className:e,...t},o)=>P("div",{ref:o,className:r("flex items-center p-6 pt-0",e),...t}));pe.displayName="CardFooter";import*as W from"@radix-ui/react-checkbox";import{Check as ot}from"lucide-react";import{forwardRef as rt}from"react";import{jsx as ee}from"react/jsx-runtime";var ue=rt(({className:e,...t},o)=>ee(W.Root,{ref:o,className:r("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:ee(W.Indicator,{className:"flex items-center justify-center text-current",children:ee(ot,{className:"h-3.5 w-3.5"})})}));ue.displayName="Checkbox";import{flexRender as xe,getCoreRowModel as Tt,getFilteredRowModel as xt,getPaginationRowModel as vt,getSortedRowModel as Dt,useReactTable as Mt}from"@tanstack/react-table";import{useState as Y}from"react";import{forwardRef as at}from"react";import{jsx as nt}from"react/jsx-runtime";var O=at(({className:e,type:t,...o},a)=>nt("input",{type:t,ref:a,className:r("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),...o}));O.displayName="Input";import{forwardRef as v}from"react";import{jsx as b}from"react/jsx-runtime";var _=v(({className:e,...t},o)=>b("div",{className:"relative w-full overflow-auto",children:b("table",{ref:o,className:r("w-full caption-bottom text-sm",e),...t})}));_.displayName="Table";var G=v(({className:e,...t},o)=>b("thead",{ref:o,className:r("[&_tr]:border-b",e),...t}));G.displayName="TableHeader";var $=v(({className:e,...t},o)=>b("tbody",{ref:o,className:r("[&_tr:last-child]:border-0",e),...t}));$.displayName="TableBody";var ce=v(({className:e,...t},o)=>b("tfoot",{ref:o,className:r("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ce.displayName="TableFooter";var N=v(({className:e,...t},o)=>b("tr",{ref:o,className:r("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));N.displayName="TableRow";var U=v(({className:e,...t},o)=>b("th",{ref:o,className:r("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}));U.displayName="TableHead";var F=v(({className:e,...t},o)=>b("td",{ref:o,className:r("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));F.displayName="TableCell";var fe=v(({className:e,...t},o)=>b("caption",{ref:o,className:r("mt-4 text-sm text-muted-foreground",e),...t}));fe.displayName="TableCaption";import{ChevronLeft as it,ChevronRight as st,ChevronsLeft as lt,ChevronsRight as dt}from"lucide-react";import{jsx as f,jsxs as T}from"react/jsx-runtime";function X({table:e,className:t}){let o=e.getFilteredSelectedRowModel().rows.length,a=e.getFilteredRowModel().rows.length;return T("div",{className:r("flex items-center justify-between px-2",t),children:[f("div",{className:"flex-1 text-sm text-muted-foreground",children:o>0&&T("span",{children:[o," of ",a," row(s) selected"]})}),T("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[f("div",{className:"flex items-center space-x-2",children:T("p",{className:"text-sm font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of ",e.getPageCount()]})}),T("div",{className:"flex items-center space-x-2",children:[T(m,{variant:"outline",size:"icon",className:"hidden h-8 w-8 lg:flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[f("span",{className:"sr-only",children:"Go to first page"}),f(lt,{className:"h-4 w-4"})]}),T(m,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[f("span",{className:"sr-only",children:"Go to previous page"}),f(it,{className:"h-4 w-4"})]}),T(m,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[f("span",{className:"sr-only",children:"Go to next page"}),f(st,{className:"h-4 w-4"})]}),T(m,{variant:"outline",size:"icon",className:"hidden h-8 w-8 lg:flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[f("span",{className:"sr-only",children:"Go to last page"}),f(dt,{className:"h-4 w-4"})]})]})]})]})}import{Settings2 as bt}from"lucide-react";import*as n from"@radix-ui/react-dropdown-menu";import{Check as mt,ChevronRight as pt}from"lucide-react";import{forwardRef as C}from"react";import{jsx as p,jsxs as Te}from"react/jsx-runtime";var R=n.Root,E=n.Trigger,ut=n.Group,ct=n.Portal,ft=n.Sub,H=C(({className:e,sideOffset:t=4,...o},a)=>p(n.Portal,{children:p(n.Content,{ref:a,sideOffset:t,className:r("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),...o})}));H.displayName="DropdownMenuContent";var L=C(({className:e,inset:t,...o},a)=>p(n.Item,{ref:a,className:r("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),...o}));L.displayName="DropdownMenuItem";var q=C(({className:e,children:t,checked:o,...a},i)=>Te(n.CheckboxItem,{ref:i,className:r("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:o,...a,children:[p("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p(n.ItemIndicator,{children:p(mt,{className:"h-4 w-4"})})}),t]}));q.displayName="DropdownMenuCheckboxItem";var J=C(({className:e,inset:t,...o},a)=>p(n.Label,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));J.displayName="DropdownMenuLabel";var S=C(({className:e,...t},o)=>p(n.Separator,{ref:o,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));S.displayName="DropdownMenuSeparator";var ge=C(({className:e,inset:t,children:o,...a},i)=>Te(n.SubTrigger,{ref:i,className:r("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:[o,p(pt,{className:"ml-auto h-4 w-4"})]}));ge.displayName="DropdownMenuSubTrigger";var be=C(({className:e,...t},o)=>p(n.SubContent,{ref:o,className:r("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}));be.displayName="DropdownMenuSubContent";function gt({className:e,...t}){return p("span",{className:r("ml-auto text-xs tracking-widest opacity-60",e),...t})}import{jsx as k,jsxs as te}from"react/jsx-runtime";function Q({table:e}){return te(R,{children:[k(E,{asChild:!0,children:te(m,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[k(bt,{className:"mr-2 h-4 w-4"}),"View"]})}),te(H,{align:"end",className:"w-[150px]",children:[k(J,{children:"Toggle columns"}),k(S,{}),e.getAllColumns().filter(t=>typeof t.accessorFn<"u"&&t.getCanHide()).map(t=>k(q,{className:"capitalize",checked:t.getIsVisible(),onCheckedChange:o=>t.toggleVisibility(!!o),children:t.id},t.id))]})]})}import{jsx as l,jsxs as oe}from"react/jsx-runtime";function ve({columns:e,data:t,searchKey:o,searchPlaceholder:a="Filter...",pageSize:i=10,emptyMessage:d="No results.",classNames:c}){let[j,A]=Y([]),[B,z]=Y([]),[Oe,_e]=Y({}),[Ge,$e]=Y({}),w=Mt({data:t,columns:e,state:{sorting:j,columnFilters:B,columnVisibility:Oe,rowSelection:Ge},onSortingChange:A,onColumnFiltersChange:z,onColumnVisibilityChange:_e,onRowSelectionChange:$e,getCoreRowModel:Tt(),getSortedRowModel:Dt(),getFilteredRowModel:xt(),getPaginationRowModel:vt(),initialState:{pagination:{pageSize:i}}});return oe("div",{className:r("space-y-4",c?.root),children:[oe("div",{className:r("flex items-center justify-between",c?.toolbar),children:[l("div",{className:"flex flex-1 items-center space-x-2",children:o&&l(O,{placeholder:a,value:w.getColumn(o)?.getFilterValue()??"",onChange:x=>w.getColumn(o)?.setFilterValue(x.target.value),className:"h-8 w-[150px] lg:w-[250px]"})}),l(Q,{table:w})]}),l("div",{className:r("rounded-md border",c?.table),children:oe(_,{children:[l(G,{children:w.getHeaderGroups().map(x=>l(N,{children:x.headers.map(g=>l(U,{colSpan:g.colSpan,children:g.isPlaceholder?null:xe(g.column.columnDef.header,g.getContext())},g.id))},x.id))}),l($,{children:w.getRowModel().rows.length>0?w.getRowModel().rows.map(x=>l(N,{"data-state":x.getIsSelected()&&"selected",children:x.getVisibleCells().map(g=>l(F,{children:xe(g.column.columnDef.cell,g.getContext())},g.id))},x.id)):l(N,{children:l(F,{colSpan:e.length,className:"h-24 text-center",children:d})})})]})}),l(X,{table:w,className:c?.pagination})]})}import{ArrowDown as De,ArrowUp as Me,ChevronsUpDown as wt,EyeOff as Ct}from"lucide-react";import{Fragment as yt,jsx as u,jsxs as y}from"react/jsx-runtime";function we({column:e,title:t,className:o}){return e.getCanSort()?u("div",{className:r("flex items-center space-x-2",o),children:y(R,{children:[u(E,{asChild:!0,children:y(m,{variant:"ghost",size:"sm",className:"-ml-3 h-8 data-[state=open]:bg-accent",children:[u("span",{children:t}),e.getIsSorted()==="desc"?u(De,{className:"ml-2 h-4 w-4"}):e.getIsSorted()==="asc"?u(Me,{className:"ml-2 h-4 w-4"}):u(wt,{className:"ml-2 h-4 w-4"})]})}),y(H,{align:"start",children:[y(L,{onClick:()=>e.toggleSorting(!1),children:[u(Me,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Asc"]}),y(L,{onClick:()=>e.toggleSorting(!0),children:[u(De,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Desc"]}),e.getCanHide()&&y(yt,{children:[u(S,{}),y(L,{onClick:()=>e.toggleVisibility(!1),children:[u(Ct,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Hide"]})]})]})]})}):u("div",{className:r(o),children:t})}import*as s from"@radix-ui/react-dialog";import{X as ht}from"lucide-react";import{forwardRef as Z}from"react";import{jsx as D,jsxs as re}from"react/jsx-runtime";var Pt=s.Root,Nt=s.Trigger,Ht=s.Close,Ce=s.Portal,ae=Z(({className:e,...t},o)=>D(s.Overlay,{ref:o,className:r("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}));ae.displayName="DialogOverlay";var ye=Z(({className:e,children:t,...o},a)=>re(Ce,{children:[D(ae,{}),re(s.Content,{ref:a,className:r("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),...o,children:[t,re(s.Close,{className:r("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:[D(ht,{className:"h-4 w-4"}),D("span",{className:"sr-only",children:"Close"})]})]})]}));ye.displayName="DialogContent";function Lt({className:e,...t}){return D("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function St({className:e,...t}){return D("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t})}var he=Z(({className:e,...t},o)=>D(s.Title,{ref:o,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));he.displayName="DialogTitle";var Pe=Z(({className:e,...t},o)=>D(s.Description,{ref:o,className:r("text-sm text-muted-foreground",e),...t}));Pe.displayName="DialogDescription";import{Slot as Et}from"@radix-ui/react-slot";import{createContext as Le,forwardRef as I,useContext as He,useId as kt}from"react";import{Controller as It,FormProvider as Vt,useFormContext as At}from"react-hook-form";import*as Ne from"@radix-ui/react-label";import{forwardRef as Ft}from"react";import{jsx as Rt}from"react/jsx-runtime";var K=Ft(({className:e,...t},o)=>Rt(Ne.Root,{ref:o,className:r("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));K.displayName="Label";import{jsx as M}from"react/jsx-runtime";var Bt=Vt,Se=Le({});function zt(e){return M(Se.Provider,{value:{name:e.name},children:M(It,{...e})})}var Fe=Le({});function V(){let e=He(Se),t=He(Fe),{getFieldState:o,formState:a}=At(),i=o(e.name,a),{id:d}=t;return{id:d,name:e.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...i}}var Re=I(({className:e,...t},o)=>{let a=kt();return M(Fe.Provider,{value:{id:a},children:M("div",{ref:o,className:r("space-y-2",e),...t})})});Re.displayName="FormItem";var Ee=I(({className:e,...t},o)=>{let{error:a,formItemId:i}=V();return M(K,{ref:o,className:r(a&&"text-destructive",e),htmlFor:i,...t})});Ee.displayName="FormLabel";var ke=I(({...e},t)=>{let{error:o,formItemId:a,formDescriptionId:i,formMessageId:d}=V();return M(Et,{ref:t,id:a,"aria-describedby":o?`${i} ${d}`:i,"aria-invalid":!!o,...e})});ke.displayName="FormControl";var Ie=I(({className:e,...t},o)=>{let{formDescriptionId:a}=V();return M("p",{ref:o,id:a,className:r("text-[0.8rem] text-muted-foreground",e),...t})});Ie.displayName="FormDescription";var Ve=I(({className:e,children:t,...o},a)=>{let{error:i,formMessageId:d}=V(),c=i?String(i.message):t;return c?M("p",{ref:a,id:d,className:r("text-[0.8rem] font-medium text-destructive",e),...o,children:c}):null});Ve.displayName="FormMessage";import{forwardRef as Wt}from"react";import{jsx as Ot}from"react/jsx-runtime";var Ae=Wt(({className:e,children:t,...o},a)=>Ot("select",{ref:a,className:r("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),...o,children:t}));Ae.displayName="Select";import*as Be from"@radix-ui/react-separator";import{forwardRef as _t}from"react";import{jsx as Gt}from"react/jsx-runtime";var ze=_t(({className:e,orientation:t="horizontal",decorative:o=!0,...a},i)=>Gt(Be.Root,{ref:i,decorative:o,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...a}));ze.displayName="Separator";import{jsx as Ut}from"react/jsx-runtime";function $t({className:e,...t}){return Ut("div",{className:r("animate-pulse rounded-md bg-muted",e),...t})}import{Toaster as Xt,toast as qt}from"sonner";import{jsx as Qt}from"react/jsx-runtime";function Jt(){return Qt(Xt,{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"}}})}import{forwardRef as Yt}from"react";import{jsx as Zt}from"react/jsx-runtime";var We=Yt(({className:e,...t},o)=>Zt("textarea",{ref:o,className:r("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}));We.displayName="Textarea";export{Je as Badge,m as Button,ie as Card,me as CardContent,de as CardDescription,pe as CardFooter,se as CardHeader,le as CardTitle,ue as Checkbox,ve as DataTable,we as DataTableColumnHeader,X as DataTablePagination,Q as DataTableViewOptions,Pt as Dialog,Ht as DialogClose,ye as DialogContent,Pe as DialogDescription,St as DialogFooter,Lt as DialogHeader,ae as DialogOverlay,Ce as DialogPortal,he as DialogTitle,Nt as DialogTrigger,R as DropdownMenu,q as DropdownMenuCheckboxItem,H as DropdownMenuContent,ut as DropdownMenuGroup,L as DropdownMenuItem,J as DropdownMenuLabel,ct as DropdownMenuPortal,S as DropdownMenuSeparator,gt as DropdownMenuShortcut,ft as DropdownMenuSub,be as DropdownMenuSubContent,ge as DropdownMenuSubTrigger,E as DropdownMenuTrigger,Bt as Form,ke as FormControl,Ie as FormDescription,zt as FormField,Re as FormItem,Ee as FormLabel,Ve as FormMessage,O as Input,K as Label,Ae as Select,ze as Separator,$t as Skeleton,_ as Table,$ as TableBody,fe as TableCaption,F as TableCell,ce as TableFooter,U as TableHead,G as TableHeader,N as TableRow,We as Textarea,Jt as Toaster,r as cn,qt as toast,V as useFormField};
|