@murumets-ee/ui 0.34.1 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +61 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import { ClassValue } from "clsx";
|
|
3
|
-
import * as React from "react";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
4
|
import { ButtonHTMLAttributes, ComponentProps, HTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes } from "react";
|
|
5
5
|
import * as RechartsPrimitive from "recharts";
|
|
6
6
|
import { TooltipValueType } from "recharts";
|
|
7
7
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
8
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
8
9
|
import { Column, ColumnDef, Table as Table$1 } from "@tanstack/react-table";
|
|
9
10
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
10
11
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
@@ -47,8 +48,8 @@ declare const THEMES: {
|
|
|
47
48
|
};
|
|
48
49
|
type TooltipNameType = number | string;
|
|
49
50
|
type ChartConfig = Record<string, {
|
|
50
|
-
label?: React.ReactNode;
|
|
51
|
-
icon?: React.ComponentType;
|
|
51
|
+
label?: React$1.ReactNode;
|
|
52
|
+
icon?: React$1.ComponentType;
|
|
52
53
|
} & ({
|
|
53
54
|
color?: string;
|
|
54
55
|
theme?: never;
|
|
@@ -64,9 +65,9 @@ declare function ChartContainer({
|
|
|
64
65
|
initialDimension,
|
|
65
66
|
nonce,
|
|
66
67
|
...props
|
|
67
|
-
}: React.ComponentProps<'div'> & {
|
|
68
|
+
}: React$1.ComponentProps<'div'> & {
|
|
68
69
|
config: ChartConfig;
|
|
69
|
-
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
|
|
70
|
+
children: React$1.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
|
|
70
71
|
initialDimension?: {
|
|
71
72
|
width: number;
|
|
72
73
|
height: number;
|
|
@@ -88,7 +89,7 @@ declare function ChartTooltipContent({
|
|
|
88
89
|
color,
|
|
89
90
|
nameKey,
|
|
90
91
|
labelKey
|
|
91
|
-
}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<'div'> & {
|
|
92
|
+
}: React$1.ComponentProps<typeof RechartsPrimitive.Tooltip> & React$1.ComponentProps<'div'> & {
|
|
92
93
|
hideLabel?: boolean;
|
|
93
94
|
hideIndicator?: boolean;
|
|
94
95
|
indicator?: 'line' | 'dot' | 'dashed';
|
|
@@ -99,6 +100,20 @@ declare function ChartTooltipContent({
|
|
|
99
100
|
//#region src/checkbox.d.ts
|
|
100
101
|
declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
101
102
|
//#endregion
|
|
103
|
+
//#region src/collapsible.d.ts
|
|
104
|
+
/**
|
|
105
|
+
* Collapsible primitive (Radix). Used by the admin sidebar to fold nav groups
|
|
106
|
+
* away (plan/config phase 03 §9). Controlled via `open` / `onOpenChange`, or
|
|
107
|
+
* uncontrolled via `defaultOpen`.
|
|
108
|
+
*
|
|
109
|
+
* Minimal re-export (shadcn convention) — the consumer styles the trigger and
|
|
110
|
+
* content. `CollapsibleContent` exposes the `--radix-collapsible-content-height`
|
|
111
|
+
* CSS var for height-animated reveals when the consumer opts in.
|
|
112
|
+
*/
|
|
113
|
+
declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
114
|
+
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
115
|
+
declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
116
|
+
//#endregion
|
|
102
117
|
//#region src/data-table/data-table.d.ts
|
|
103
118
|
interface DataTableClassNames {
|
|
104
119
|
root?: string;
|
|
@@ -183,6 +198,45 @@ declare const FormControl: import("react").ForwardRefExoticComponent<Omit<import
|
|
|
183
198
|
declare const FormDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
184
199
|
declare const FormMessage: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
185
200
|
//#endregion
|
|
201
|
+
//#region src/icon.d.ts
|
|
202
|
+
/** Override the icon endpoint base (default `/api/admin/icons`). Call once at app boot. */
|
|
203
|
+
declare function setIconEndpoint(base: string): void;
|
|
204
|
+
interface IconProps {
|
|
205
|
+
/** Lucide kebab-case name (e.g. `panel-left`). Unknown/empty → renders nothing. */
|
|
206
|
+
name?: string | null | undefined;
|
|
207
|
+
/** Sizing class applied to the wrapper (e.g. `h-4 w-4`). The SVG fills it. */
|
|
208
|
+
className?: string | undefined;
|
|
209
|
+
/** Explicit pixel size (alternative to `className`). */
|
|
210
|
+
size?: number | undefined;
|
|
211
|
+
}
|
|
212
|
+
declare function Icon({
|
|
213
|
+
name,
|
|
214
|
+
className,
|
|
215
|
+
size
|
|
216
|
+
}: IconProps): React.ReactElement | null;
|
|
217
|
+
//#endregion
|
|
218
|
+
//#region src/icon-picker.d.ts
|
|
219
|
+
interface IconPickerProps {
|
|
220
|
+
/** Current Lucide icon name, or empty. */
|
|
221
|
+
value?: string | null | undefined;
|
|
222
|
+
/** Called with the chosen name, or `undefined` when cleared. */
|
|
223
|
+
onChange: (name: string | undefined) => void;
|
|
224
|
+
/** Trigger text when no icon is selected. Default "Pick icon". */
|
|
225
|
+
placeholder?: string;
|
|
226
|
+
/** Extra classes for the trigger button. */
|
|
227
|
+
className?: string;
|
|
228
|
+
/** Disable the trigger. */
|
|
229
|
+
disabled?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* a11y props a form wrapper (e.g. shadcn `FormControl`) injects into the
|
|
232
|
+
* trigger so the field stays linked to its label + validation message.
|
|
233
|
+
*/
|
|
234
|
+
id?: string;
|
|
235
|
+
'aria-describedby'?: string;
|
|
236
|
+
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
237
|
+
}
|
|
238
|
+
declare const IconPicker: import("react").ForwardRefExoticComponent<IconPickerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
239
|
+
//#endregion
|
|
186
240
|
//#region src/input.d.ts
|
|
187
241
|
declare const Input: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
|
|
188
242
|
//#endregion
|
|
@@ -221,5 +275,5 @@ declare const TableCell: import("react").ForwardRefExoticComponent<TdHTMLAttribu
|
|
|
221
275
|
//#region src/textarea.d.ts
|
|
222
276
|
declare const Textarea: import("react").ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
223
277
|
//#endregion
|
|
224
|
-
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, Checkbox, DataTable, DataTableColumnHeader, DataTableViewOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Label, Select, Separator, Skeleton, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Textarea, Toaster, cn, toast };
|
|
278
|
+
export { Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, DataTable, DataTableColumnHeader, DataTableViewOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Icon, IconPicker, type IconPickerProps, type IconProps, Input, Label, Select, Separator, Skeleton, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Textarea, Toaster, cn, setIconEndpoint, toast };
|
|
225
279
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/chart.tsx","../src/checkbox.tsx","../src/data-table/data-table.tsx","../src/data-table/data-table-column-header.tsx","../src/data-table/data-table-view-options.tsx","../src/dialog.tsx","../src/dropdown-menu.tsx","../src/form.tsx","../src/input.tsx","../src/label.tsx","../src/lib/cn.ts","../src/select.tsx","../src/separator.tsx","../src/skeleton.tsx","../src/sonner.tsx","../src/table.tsx","../src/textarea.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/chart.tsx","../src/checkbox.tsx","../src/collapsible.tsx","../src/data-table/data-table.tsx","../src/data-table/data-table-column-header.tsx","../src/data-table/data-table-view-options.tsx","../src/dialog.tsx","../src/dropdown-menu.tsx","../src/form.tsx","../src/icon.tsx","../src/icon-picker.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,cAAc,CAAC,cAAA;EACjD,OAAA;AAAA;AAAA,iBAUc,KAAA,CAAA;EAAQ,SAAA;EAAW,OAAA;EAAA,GAAwB;AAAA,GAAS,UAAA,+BAAU,GAAA,CAAA,OAAA;;;UCT7D,WAAA,SAAoB,oBAAoB,CAAC,iBAAA;EACxD,OAAA;EACA,IAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,cAoBW,MAAA,kBAAM,yBAAA,CAAA,WAAA,mBAAA,aAAA,CAAA,iBAAA;;;cC1BN,IAAA,kBAAI,yBAAA,CAAA,cAAA,CAAA,cAAA,oBAAA,aAAA,CAAA,cAAA;AAAA,cAWJ,UAAA,kBAAU,yBAAA,CAAA,cAAA,CAAA,cAAA,oBAAA,aAAA,CAAA,cAAA;AAAA,cAOV,SAAA,kBAAS,yBAAA,CAAA,cAAA,CAAA,cAAA,oBAAA,aAAA,CAAA,cAAA;AAAA,cAWT,eAAA,kBAAe,yBAAA,CAAA,cAAA,CAAA,cAAA,oBAAA,aAAA,CAAA,cAAA;AAAA,cAOf,WAAA,kBAAW,yBAAA,CAAA,cAAA,CAAA,cAAA,oBAAA,aAAA,CAAA,cAAA;AAAA,cAOX,UAAA,kBAAU,yBAAA,CAAA,cAAA,CAAA,cAAA,oBAAA,aAAA,CAAA,cAAA;;;cCrBjB,MAAA;EAAA,SAA8C,KAAA;EAAA,SAAA,IAAA;AAAA;AAAA,KAG/C,eAAA;AAAA,KA4BO,WAAA,GAAc,MAAA;EAGtB,KAAA,GAAQ,OAAA,CAAM,SAAA;EACd,IAAA,GAAO,OAAA,CAAM,aAAA;AAAA;EAET,KAAA;EAAgB,KAAA;AAAA;EAChB,KAAA;EAAe,KAAA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A,aAAA,CAAA,cAAA,4BAAA,aAAA,CAAA,cAAA;;;iBCDN,QAAA,CAAA;EAAW,SAAA;EAAA,GAAc;AAAA,GAAS,cAAA,CAAe,cAAA,gCAAe,GAAA,CAAA,OAAA;;;iBC8BvE,OAAA,CAAA;EAAU,YAAA;EAAA,GAAiB;AAAA,GAAS,cAAA,QAAsB,SAAA,gCAAc,GAAA,CAAA,OAAA;;;cCzBpE,KAAA,kBAAK,yBAAA,CAAA,cAAA,CAAA,gBAAA,oBAAA,aAAA,CAAA,gBAAA;AAAA,cASL,WAAA,kBAAW,yBAAA,CAAA,cAAA,CAAA,uBAAA,oBAAA,aAAA,CAAA,uBAAA;AAAA,cAQX,SAAA,kBAAS,yBAAA,CAAA,cAAA,CAAA,uBAAA,oBAAA,aAAA,CAAA,uBAAA;AAAA,cAoBT,QAAA,kBAAQ,yBAAA,CAAA,cAAA,CAAA,mBAAA,oBAAA,aAAA,CAAA,mBAAA;AAAA,cAcR,SAAA,kBAAS,yBAAA,CAAA,gBAAA,CAAA,oBAAA,oBAAA,aAAA,CAAA,oBAAA;AAAA,cAeT,SAAA,kBAAS,yBAAA,CAAA,gBAAA,CAAA,oBAAA,oBAAA,aAAA,CAAA,oBAAA;;;cCvET,QAAA,kBAAQ,yBAAA,CAAA,sBAAA,CAAA,mBAAA,oBAAA,aAAA,CAAA,mBAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{Slot as a}from"@radix-ui/react-slot";import{ArrowDown as o,ArrowUp as s,Check as c,ChevronLeft as l,ChevronRight as u,ChevronsLeft as d,ChevronsRight as f,ChevronsUpDown as p,EyeOff as m,Loader2 as h,Settings2 as g,X as _}from"lucide-react";import*as v from"react";import{createContext as y,forwardRef as b,useContext as x,useId as ee,useState as
|
|
2
|
+
import{clsx as e}from"clsx";import{twMerge as t}from"tailwind-merge";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{Slot as a}from"@radix-ui/react-slot";import{ArrowDown as o,ArrowUp as s,Check as c,ChevronLeft as l,ChevronRight as u,ChevronsLeft as d,ChevronsRight as f,ChevronsUpDown as p,EyeOff as m,Loader2 as h,Settings2 as g,X as _}from"lucide-react";import*as v from"react";import{createContext as y,forwardRef as b,useContext as x,useEffect as S,useId as ee,useMemo as C,useState as w}from"react";import*as te from"recharts";import*as ne from"@radix-ui/react-checkbox";import*as T from"@radix-ui/react-collapsible";import{flexRender as re,getCoreRowModel as ie,getFilteredRowModel as ae,getPaginationRowModel as oe,getSortedRowModel as se,useReactTable as ce}from"@tanstack/react-table";import*as E from"@radix-ui/react-dropdown-menu";import*as D from"@radix-ui/react-dialog";import{Controller as le,FormProvider as ue,useFormContext as de}from"react-hook-form";import*as fe from"@radix-ui/react-label";import*as pe from"@radix-ui/react-separator";import{Toaster as me,toast as he}from"sonner";function O(...n){return t(e(n))}const ge={default:`border-transparent bg-primary text-primary-foreground shadow-xs`,secondary:`border-transparent bg-secondary text-secondary-foreground`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow-xs`,outline:`text-foreground`};function _e({className:e,variant:t=`default`,...n}){return r(`div`,{className:O(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold`,`transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,ge[t],e),...n})}const ve={default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90`,outline:`border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},ye={default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`},k=b(({className:e,variant:t=`default`,size:n=`default`,loading:o=!1,asChild:s=!1,disabled:c,children:l,type:u=`button`,...d},f)=>{let p=O(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium`,`transition-colors cursor-pointer`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:pointer-events-none disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,ve[t],ye[n],e);return s?r(a,{ref:f,className:p,...d,children:l}):i(`button`,{ref:f,disabled:c||o,className:p,type:u,...d,children:[o&&r(h,{className:`h-4 w-4 animate-spin`}),l]})});k.displayName=`Button`;const be=b(({className:e,...t},n)=>r(`div`,{ref:n,className:O(`rounded-xl border bg-card text-card-foreground shadow-sm`,e),...t}));be.displayName=`Card`;const xe=b(({className:e,...t},n)=>r(`div`,{ref:n,className:O(`flex flex-col space-y-1.5 p-6`,e),...t}));xe.displayName=`CardHeader`;const Se=b(({className:e,...t},n)=>r(`div`,{ref:n,className:O(`font-semibold leading-none tracking-tight`,e),...t}));Se.displayName=`CardTitle`;const Ce=b(({className:e,...t},n)=>r(`div`,{ref:n,className:O(`text-sm text-muted-foreground`,e),...t}));Ce.displayName=`CardDescription`;const we=b(({className:e,...t},n)=>r(`div`,{ref:n,className:O(`p-6 pt-0`,e),...t}));we.displayName=`CardContent`;const A=b(({className:e,...t},n)=>r(`div`,{ref:n,className:O(`flex items-center p-6 pt-0`,e),...t}));A.displayName=`CardFooter`;const Te={light:``,dark:`.dark`},Ee={width:320,height:200},j=/^[a-zA-Z0-9_-]+$/,De=/^[#a-zA-Z0-9 ,.()/%-]+$/,Oe=/\burl\s*\(/i,ke=v.createContext(null);function Ae(){let e=v.useContext(ke);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function je(e,t){if(!j.test(e))return null;let n=Object.entries(t).filter(([,e])=>e.theme??e.color);if(!n.length)return null;let r=Object.entries(Te).map(([t,r])=>{let i=n.map(([e,n])=>{if(!j.test(e))return null;let r=n.theme?.[t]??n.color;return!r||!De.test(r)||Oe.test(r)?null:` --color-${e}: ${r};`}).filter(e=>e!==null);return i.length?`${r} [data-chart=${e}] {\n${i.join(`
|
|
3
3
|
`)}\n}`:null}).filter(e=>e!==null);return r.length?r.join(`
|
|
4
|
-
`):null}function De(e){if(e&&typeof e==`object`&&`fill`in e&&typeof e.fill==`string`)return e.fill}function Oe({id:e,className:t,children:n,config:a,initialDimension:o=Se,nonce:s,...c}){let l=v.useId(),u=`chart-${(e&&M.test(e)?e:null)??l.replace(/:/g,``)}`;return r(N.Provider,{value:{config:a},children:i(`div`,{"data-slot":`chart`,"data-chart":u,className:T(`flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,t),...c,children:[r(ke,{id:u,config:a,nonce:s}),r(te.ResponsiveContainer,{initialDimension:o,children:n})]})})}const ke=({id:e,config:t,nonce:n})=>{let i=Ee(e,t);return i?r(`style`,{nonce:n,dangerouslySetInnerHTML:{__html:i}}):null},Ae=te.Tooltip;function je({active:e,payload:t,className:a,indicator:o=`dot`,hideLabel:s=!1,hideIndicator:c=!1,label:l,labelFormatter:u,labelClassName:d,formatter:f,color:p,nameKey:m,labelKey:h}){let{config:g}=Te(),_=v.useMemo(()=>{if(s||!t?.length)return null;let[e]=t,n=P(g,e,`${h??e?.dataKey??e?.name??`value`}`),i=!h&&typeof l==`string`?g[l]?.label??l:n?.label;return u?r(`div`,{className:T(`font-medium`,d),children:u(i,t)}):i?r(`div`,{className:T(`font-medium`,d),children:i}):null},[l,u,t,s,d,g,h]);if(!e||!t?.length)return null;let y=t.length===1&&o!==`dot`;return i(`div`,{className:T(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,a),children:[y?null:_,r(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let a=`${m??e.name??e.dataKey??`value`}`,s=P(g,e,a),l=p??De(e.payload)??e.color;return r(`div`,{className:T(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,o===`dot`&&`items-center`),children:f&&e?.value!==void 0&&e.name?f(e.value,e.name,e,t,e.payload):i(n,{children:[s?.icon?r(s.icon,{}):!c&&r(`div`,{className:T(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":o===`dot`,"w-1":o===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":o===`dashed`,"my-0.5":y&&o===`dashed`}),style:{"--color-bg":l,"--color-border":l}}),i(`div`,{className:T(`flex flex-1 justify-between leading-none`,y?`items-end`:`items-center`),children:[i(`div`,{className:`grid gap-1.5`,children:[y?_:null,r(`span`,{className:`text-muted-foreground`,children:s?.label??e.name})]}),e.value!=null&&r(`span`,{className:`font-mono font-medium text-foreground tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},a)})})]})}function P(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}const F=b(({className:e,...t},n)=>r(ne.Root,{ref:n,className:T(`peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-xs`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,`data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:r(ne.Indicator,{className:`flex items-center justify-center text-current`,children:r(c,{className:`h-3.5 w-3.5`})})}));F.displayName=`Checkbox`;const I=b(({className:e,type:t,...n},i)=>r(`input`,{type:t,ref:i,className:T(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs`,`transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground`,`placeholder:text-muted-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n}));I.displayName=`Input`;const L=b(({className:e,...t},n)=>r(`div`,{className:`relative w-full overflow-auto`,children:r(`table`,{ref:n,className:T(`w-full caption-bottom text-sm`,e),...t})}));L.displayName=`Table`;const R=b(({className:e,...t},n)=>r(`thead`,{ref:n,className:T(`[&_tr]:border-b`,e),...t}));R.displayName=`TableHeader`;const z=b(({className:e,...t},n)=>r(`tbody`,{ref:n,className:T(`[&_tr:last-child]:border-0`,e),...t}));z.displayName=`TableBody`;const Me=b(({className:e,...t},n)=>r(`tfoot`,{ref:n,className:T(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));Me.displayName=`TableFooter`;const B=b(({className:e,...t},n)=>r(`tr`,{ref:n,className:T(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t}));B.displayName=`TableRow`;const V=b(({className:e,...t},n)=>r(`th`,{ref:n,className:T(`h-10 px-2 text-left align-middle font-medium text-muted-foreground`,`[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));V.displayName=`TableHead`;const H=b(({className:e,...t},n)=>r(`td`,{ref:n,className:T(`p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));H.displayName=`TableCell`;const Ne=b(({className:e,...t},n)=>r(`caption`,{ref:n,className:T(`mt-4 text-sm text-muted-foreground`,e),...t}));Ne.displayName=`TableCaption`;function Pe({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 U=C.Root,W=C.Trigger,Fe=C.Portal,G=b(({className:e,sideOffset:t=4,...n},i)=>r(C.Portal,{children:r(C.Content,{ref:i,sideOffset:t,className:T(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...n})}));G.displayName=`DropdownMenuContent`;const K=b(({className:e,inset:t,...n},i)=>r(C.Item,{ref:i,className:T(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none`,`transition-colors focus:bg-accent focus:text-accent-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,t&&`pl-8`,e),...n}));K.displayName=`DropdownMenuItem`;const q=b(({className:e,children:t,checked:n,...a},o)=>i(C.CheckboxItem,{ref:o,className:T(`relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none`,`transition-colors focus:bg-accent focus:text-accent-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n!==void 0&&{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]}));q.displayName=`DropdownMenuCheckboxItem`;const J=b(({className:e,inset:t,...n},i)=>r(C.Label,{ref:i,className:T(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));J.displayName=`DropdownMenuLabel`;const Y=b(({className:e,...t},n)=>r(C.Separator,{ref:n,className:T(`-mx-1 my-1 h-px bg-muted`,e),...t}));Y.displayName=`DropdownMenuSeparator`;const Ie=b(({className:e,inset:t,children:n,...a},o)=>i(C.SubTrigger,{ref:o,className:T(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none`,`focus:bg-accent data-[state=open]:bg-accent`,`[&_svg]:pointer-events-none [&_svg]:shrink-0`,t&&`pl-8`,e),...a,children:[n,r(u,{className:`ml-auto h-4 w-4`})]}));Ie.displayName=`DropdownMenuSubTrigger`;const Le=b(({className:e,...t},n)=>r(C.SubContent,{ref:n,className:T(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...t}));Le.displayName=`DropdownMenuSubContent`;function X({table:e}){return i(U,{children:[r(W,{asChild:!0,children:i(E,{variant:`outline`,size:`sm`,className:`ml-auto hidden h-8 lg:flex`,children:[r(g,{className:`mr-2 h-4 w-4`}),`View`]})}),i(G,{align:`end`,className:`w-[150px]`,children:[r(J,{children:`Toggle columns`}),r(Y,{}),e.getAllColumns().filter(e=>e.accessorFn!==void 0&&e.getCanHide()).map(e=>r(q,{className:`capitalize`,checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.id},e.id))]})]})}function Re({columns:e,data:t,searchKey:n,searchPlaceholder:a=`Filter...`,pageSize:o=10,emptyMessage:s=`No results.`,classNames:c}){let[l,u]=S([]),[d,f]=S([]),[p,m]=S({}),[h,g]=S({}),_=ce({data:t,columns:e,state:{sorting:l,columnFilters:d,columnVisibility:p,rowSelection:h},onSortingChange:u,onColumnFiltersChange:f,onColumnVisibilityChange:m,onRowSelectionChange:g,getCoreRowModel:ie(),getSortedRowModel:se(),getFilteredRowModel:ae(),getPaginationRowModel:oe(),initialState:{pagination:{pageSize:o}}});return i(`div`,{className:T(`space-y-4`,c?.root),children:[i(`div`,{className:T(`flex items-center justify-between`,c?.toolbar),children:[r(`div`,{className:`flex flex-1 items-center space-x-2`,children:n&&r(I,{placeholder:a,value:_.getColumn(n)?.getFilterValue()??``,onChange:e=>_.getColumn(n)?.setFilterValue(e.target.value),className:`h-8 w-[150px] lg:w-[250px]`})}),r(X,{table:_})]}),r(`div`,{className:T(`rounded-md border`,c?.table),children:i(L,{children:[r(R,{children:_.getHeaderGroups().map(e=>r(B,{children:e.headers.map(e=>r(V,{colSpan:e.colSpan,children:e.isPlaceholder?null:re(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),r(z,{children:_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>r(B,{"data-state":e.getIsSelected()&&`selected`,children:e.getVisibleCells().map(e=>r(H,{children:re(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):r(B,{children:r(H,{colSpan:e.length,className:`h-24 text-center`,children:s})})})]})}),r(Pe,{table:_,className:c?.pagination})]})}function ze({column:e,title:t,className:a}){return e.getCanSort()?r(`div`,{className:T(`flex items-center space-x-2`,a),children:i(U,{children:[r(W,{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(G,{align:`start`,children:[i(K,{onClick:()=>e.toggleSorting(!1),children:[r(s,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Asc`]}),i(K,{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(Y,{}),i(K,{onClick:()=>e.toggleVisibility(!1),children:[r(m,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Hide`]})]})]})]})}):r(`div`,{className:T(a),children:t})}const Be=w.Root,Ve=w.Trigger,He=w.Close,Ue=w.Portal,We=b(({className:e,...t},n)=>r(w.Overlay,{ref:n,className:T(`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));We.displayName=`DialogOverlay`;const Ge=b(({className:e,children:t,...n},a)=>i(Ue,{children:[r(We,{}),i(w.Content,{ref:a,className:T(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]`,`gap-4 border bg-background p-6 shadow-lg sm:rounded-lg`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]`,`data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]`,e),...n,children:[t,i(w.Close,{className:T(`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity`,`hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,`disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,`cursor-pointer`),children:[r(_,{className:`h-4 w-4`}),r(`span`,{className:`sr-only`,children:`Close`})]})]})]}));Ge.displayName=`DialogContent`;function Ke({className:e,...t}){return r(`div`,{className:T(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t})}function qe({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 Je=b(({className:e,...t},n)=>r(w.Title,{ref:n,className:T(`text-lg font-semibold leading-none tracking-tight`,e),...t}));Je.displayName=`DialogTitle`;const Ye=b(({className:e,...t},n)=>r(w.Description,{ref:n,className:T(`text-sm text-muted-foreground`,e),...t}));Ye.displayName=`DialogDescription`;const Z=b(({className:e,...t},n)=>r(fe.Root,{ref:n,className:T(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,e),...t}));Z.displayName=`Label`;const Xe=ue,Q=y({});function Ze(e){return r(Q.Provider,{value:{name:e.name},children:r(le,{...e})})}const Qe=y({});function $(){let e=x(Q),t=x(Qe),{getFieldState:n,formState:r}=de(),i=n(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}}const $e=b(({className:e,...t},n)=>{let i=ee();return r(Qe.Provider,{value:{id:i},children:r(`div`,{ref:n,className:T(`space-y-2`,e),...t})})});$e.displayName=`FormItem`;const et=b(({className:e,...t},n)=>{let{error:i,formItemId:a}=$();return r(Z,{ref:n,className:T(i&&`text-destructive`,e),htmlFor:a,...t})});et.displayName=`FormLabel`;const tt=b(({...e},t)=>{let{error:n,formItemId:i,formDescriptionId:o,formMessageId:s}=$();return r(a,{ref:t,id:i,"aria-describedby":n?`${o} ${s}`:o,"aria-invalid":!!n,...e})});tt.displayName=`FormControl`;const nt=b(({className:e,...t},n)=>{let{formDescriptionId:i}=$();return r(`p`,{ref:n,id:i,className:T(`text-[0.8rem] text-muted-foreground`,e),...t})});nt.displayName=`FormDescription`;const rt=b(({className:e,children:t,...n},i)=>{let{error:a,formMessageId:o}=$(),s=a?String(a.message):t;return s?r(`p`,{ref:i,id:o,className:T(`text-[0.8rem] font-medium text-destructive`,e),...n,children:s}):null});rt.displayName=`FormMessage`;const it=b(({className:e,children:t,...n},i)=>r(`select`,{ref:i,className:T(`flex h-9 w-full rounded-md border border-input bg-background text-foreground px-3 py-1 text-sm shadow-xs`,`transition-colors`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:t}));it.displayName=`Select`;const at=b(({className:e,orientation:t=`horizontal`,decorative:n=!0,...i},a)=>r(pe.Root,{ref:a,decorative:n,orientation:t,className:T(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...i}));at.displayName=`Separator`;function ot({className:e,...t}){return r(`div`,{className:T(`animate-pulse rounded-md bg-muted`,e),...t})}const st={background:`var(--color-background)`,color:`var(--color-foreground)`,border:`1px solid var(--color-border)`},ct={error:`sonner-error`,success:`sonner-success`};function lt({toastOptions:e,...t}){return r(me,{position:`bottom-right`,...t,toastOptions:{...e,style:{...st,...e?.style},classNames:{...ct,...e?.classNames}}})}const ut=b(({className:e,...t},n)=>r(`textarea`,{ref:n,className:T(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs`,`placeholder:text-muted-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));ut.displayName=`Textarea`;export{_e as Badge,E as Button,be as Card,A as CardContent,k as CardDescription,j as CardFooter,D as CardHeader,O as CardTitle,Oe as ChartContainer,Ae as ChartTooltip,je as ChartTooltipContent,F as Checkbox,Re as DataTable,ze as DataTableColumnHeader,X as DataTableViewOptions,Be as Dialog,He as DialogClose,Ge as DialogContent,Ye as DialogDescription,qe as DialogFooter,Ke as DialogHeader,Je as DialogTitle,Ve as DialogTrigger,U as DropdownMenu,G as DropdownMenuContent,K as DropdownMenuItem,J as DropdownMenuLabel,Fe as DropdownMenuPortal,Y as DropdownMenuSeparator,W as DropdownMenuTrigger,Xe as Form,tt as FormControl,nt as FormDescription,Ze as FormField,$e as FormItem,et as FormLabel,rt as FormMessage,I as Input,Z as Label,it as Select,at as Separator,ot as Skeleton,L as Table,z as TableBody,H as TableCell,V as TableHead,R as TableHeader,B as TableRow,ut as Textarea,lt as Toaster,T as cn,he as toast};
|
|
4
|
+
`):null}function Me(e){if(e&&typeof e==`object`&&`fill`in e&&typeof e.fill==`string`)return e.fill}function Ne({id:e,className:t,children:n,config:a,initialDimension:o=Ee,nonce:s,...c}){let l=v.useId(),u=`chart-${(e&&j.test(e)?e:null)??l.replace(/:/g,``)}`;return r(ke.Provider,{value:{config:a},children:i(`div`,{"data-slot":`chart`,"data-chart":u,className:O(`flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,t),...c,children:[r(Pe,{id:u,config:a,nonce:s}),r(te.ResponsiveContainer,{initialDimension:o,children:n})]})})}const Pe=({id:e,config:t,nonce:n})=>{let i=je(e,t);return i?r(`style`,{nonce:n,dangerouslySetInnerHTML:{__html:i}}):null},Fe=te.Tooltip;function Ie({active:e,payload:t,className:a,indicator:o=`dot`,hideLabel:s=!1,hideIndicator:c=!1,label:l,labelFormatter:u,labelClassName:d,formatter:f,color:p,nameKey:m,labelKey:h}){let{config:g}=Ae(),_=v.useMemo(()=>{if(s||!t?.length)return null;let[e]=t,n=Le(g,e,`${h??e?.dataKey??e?.name??`value`}`),i=!h&&typeof l==`string`?g[l]?.label??l:n?.label;return u?r(`div`,{className:O(`font-medium`,d),children:u(i,t)}):i?r(`div`,{className:O(`font-medium`,d),children:i}):null},[l,u,t,s,d,g,h]);if(!e||!t?.length)return null;let y=t.length===1&&o!==`dot`;return i(`div`,{className:O(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,a),children:[y?null:_,r(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let a=`${m??e.name??e.dataKey??`value`}`,s=Le(g,e,a),l=p??Me(e.payload)??e.color;return r(`div`,{className:O(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,o===`dot`&&`items-center`),children:f&&e?.value!==void 0&&e.name?f(e.value,e.name,e,t,e.payload):i(n,{children:[s?.icon?r(s.icon,{}):!c&&r(`div`,{className:O(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":o===`dot`,"w-1":o===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":o===`dashed`,"my-0.5":y&&o===`dashed`}),style:{"--color-bg":l,"--color-border":l}}),i(`div`,{className:O(`flex flex-1 justify-between leading-none`,y?`items-end`:`items-center`),children:[i(`div`,{className:`grid gap-1.5`,children:[y?_:null,r(`span`,{className:`text-muted-foreground`,children:s?.label??e.name})]}),e.value!=null&&r(`span`,{className:`font-mono font-medium text-foreground tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},a)})})]})}function Le(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}const Re=b(({className:e,...t},n)=>r(ne.Root,{ref:n,className:O(`peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-xs`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-50`,`data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:r(ne.Indicator,{className:`flex items-center justify-center text-current`,children:r(c,{className:`h-3.5 w-3.5`})})}));Re.displayName=`Checkbox`;const ze=T.Root,Be=T.CollapsibleTrigger,Ve=T.CollapsibleContent,M=b(({className:e,type:t,...n},i)=>r(`input`,{type:t,ref:i,className:O(`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=b(({className:e,...t},n)=>r(`div`,{className:`relative w-full overflow-auto`,children:r(`table`,{ref:n,className:O(`w-full caption-bottom text-sm`,e),...t})}));N.displayName=`Table`;const P=b(({className:e,...t},n)=>r(`thead`,{ref:n,className:O(`[&_tr]:border-b`,e),...t}));P.displayName=`TableHeader`;const F=b(({className:e,...t},n)=>r(`tbody`,{ref:n,className:O(`[&_tr:last-child]:border-0`,e),...t}));F.displayName=`TableBody`;const He=b(({className:e,...t},n)=>r(`tfoot`,{ref:n,className:O(`border-t bg-muted/50 font-medium [&>tr]:last:border-b-0`,e),...t}));He.displayName=`TableFooter`;const I=b(({className:e,...t},n)=>r(`tr`,{ref:n,className:O(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...t}));I.displayName=`TableRow`;const L=b(({className:e,...t},n)=>r(`th`,{ref:n,className:O(`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}));L.displayName=`TableHead`;const R=b(({className:e,...t},n)=>r(`td`,{ref:n,className:O(`p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t}));R.displayName=`TableCell`;const Ue=b(({className:e,...t},n)=>r(`caption`,{ref:n,className:O(`mt-4 text-sm text-muted-foreground`,e),...t}));Ue.displayName=`TableCaption`;function We({table:e,className:t}){let n=e.getFilteredSelectedRowModel().rows.length,a=e.getFilteredRowModel().rows.length;return i(`div`,{className:O(`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(k,{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(k,{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(k,{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(k,{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 z=E.Root,B=E.Trigger,Ge=E.Portal,V=b(({className:e,sideOffset:t=4,...n},i)=>r(E.Portal,{children:r(E.Content,{ref:i,sideOffset:t,className:O(`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})}));V.displayName=`DropdownMenuContent`;const H=b(({className:e,inset:t,...n},i)=>r(E.Item,{ref:i,className:O(`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}));H.displayName=`DropdownMenuItem`;const Ke=b(({className:e,children:t,checked:n,...a},o)=>i(E.CheckboxItem,{ref:o,className:O(`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),...n!==void 0&&{checked:n},...a,children:[r(`span`,{className:`absolute left-2 flex h-3.5 w-3.5 items-center justify-center`,children:r(E.ItemIndicator,{children:r(c,{className:`h-4 w-4`})})}),t]}));Ke.displayName=`DropdownMenuCheckboxItem`;const U=b(({className:e,inset:t,...n},i)=>r(E.Label,{ref:i,className:O(`px-2 py-1.5 text-sm font-semibold`,t&&`pl-8`,e),...n}));U.displayName=`DropdownMenuLabel`;const W=b(({className:e,...t},n)=>r(E.Separator,{ref:n,className:O(`-mx-1 my-1 h-px bg-muted`,e),...t}));W.displayName=`DropdownMenuSeparator`;const qe=b(({className:e,inset:t,children:n,...a},o)=>i(E.SubTrigger,{ref:o,className:O(`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`})]}));qe.displayName=`DropdownMenuSubTrigger`;const Je=b(({className:e,...t},n)=>r(E.SubContent,{ref:n,className:O(`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}));Je.displayName=`DropdownMenuSubContent`;function Ye({table:e}){return i(z,{children:[r(B,{asChild:!0,children:i(k,{variant:`outline`,size:`sm`,className:`ml-auto hidden h-8 lg:flex`,children:[r(g,{className:`mr-2 h-4 w-4`}),`View`]})}),i(V,{align:`end`,className:`w-[150px]`,children:[r(U,{children:`Toggle columns`}),r(W,{}),e.getAllColumns().filter(e=>e.accessorFn!==void 0&&e.getCanHide()).map(e=>r(Ke,{className:`capitalize`,checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.id},e.id))]})]})}function Xe({columns:e,data:t,searchKey:n,searchPlaceholder:a=`Filter...`,pageSize:o=10,emptyMessage:s=`No results.`,classNames:c}){let[l,u]=w([]),[d,f]=w([]),[p,m]=w({}),[h,g]=w({}),_=ce({data:t,columns:e,state:{sorting:l,columnFilters:d,columnVisibility:p,rowSelection:h},onSortingChange:u,onColumnFiltersChange:f,onColumnVisibilityChange:m,onRowSelectionChange:g,getCoreRowModel:ie(),getSortedRowModel:se(),getFilteredRowModel:ae(),getPaginationRowModel:oe(),initialState:{pagination:{pageSize:o}}});return i(`div`,{className:O(`space-y-4`,c?.root),children:[i(`div`,{className:O(`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:_.getColumn(n)?.getFilterValue()??``,onChange:e=>_.getColumn(n)?.setFilterValue(e.target.value),className:`h-8 w-[150px] lg:w-[250px]`})}),r(Ye,{table:_})]}),r(`div`,{className:O(`rounded-md border`,c?.table),children:i(N,{children:[r(P,{children:_.getHeaderGroups().map(e=>r(I,{children:e.headers.map(e=>r(L,{colSpan:e.colSpan,children:e.isPlaceholder?null:re(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),r(F,{children:_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>r(I,{"data-state":e.getIsSelected()&&`selected`,children:e.getVisibleCells().map(e=>r(R,{children:re(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):r(I,{children:r(R,{colSpan:e.length,className:`h-24 text-center`,children:s})})})]})}),r(We,{table:_,className:c?.pagination})]})}function Ze({column:e,title:t,className:a}){return e.getCanSort()?r(`div`,{className:O(`flex items-center space-x-2`,a),children:i(z,{children:[r(B,{asChild:!0,children:i(k,{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(V,{align:`start`,children:[i(H,{onClick:()=>e.toggleSorting(!1),children:[r(s,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Asc`]}),i(H,{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(W,{}),i(H,{onClick:()=>e.toggleVisibility(!1),children:[r(m,{className:`mr-2 h-3.5 w-3.5 text-muted-foreground/70`}),`Hide`]})]})]})]})}):r(`div`,{className:O(a),children:t})}const Qe=D.Root,$e=D.Trigger,et=D.Close,tt=D.Portal,nt=b(({className:e,...t},n)=>r(D.Overlay,{ref:n,className:O(`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}));nt.displayName=`DialogOverlay`;const G=b(({className:e,children:t,...n},a)=>i(tt,{children:[r(nt,{}),i(D.Content,{ref:a,className:O(`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(D.Close,{className:O(`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity`,`hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,`disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,`cursor-pointer`),children:[r(_,{className:`h-4 w-4`}),r(`span`,{className:`sr-only`,children:`Close`})]})]})]}));G.displayName=`DialogContent`;function rt({className:e,...t}){return r(`div`,{className:O(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t})}function it({className:e,...t}){return r(`div`,{className:O(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t})}const K=b(({className:e,...t},n)=>r(D.Title,{ref:n,className:O(`text-lg font-semibold leading-none tracking-tight`,e),...t}));K.displayName=`DialogTitle`;const at=b(({className:e,...t},n)=>r(D.Description,{ref:n,className:O(`text-sm text-muted-foreground`,e),...t}));at.displayName=`DialogDescription`;const q=b(({className:e,...t},n)=>r(fe.Root,{ref:n,className:O(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,e),...t}));q.displayName=`Label`;const ot=ue,st=y({});function ct(e){return r(st.Provider,{value:{name:e.name},children:r(le,{...e})})}const lt=y({});function J(){let e=x(st),t=x(lt),{getFieldState:n,formState:r}=de(),i=n(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}}const ut=b(({className:e,...t},n)=>{let i=ee();return r(lt.Provider,{value:{id:i},children:r(`div`,{ref:n,className:O(`space-y-2`,e),...t})})});ut.displayName=`FormItem`;const dt=b(({className:e,...t},n)=>{let{error:i,formItemId:a}=J();return r(q,{ref:n,className:O(i&&`text-destructive`,e),htmlFor:a,...t})});dt.displayName=`FormLabel`;const Y=b(({...e},t)=>{let{error:n,formItemId:i,formDescriptionId:o,formMessageId:s}=J();return r(a,{ref:t,id:i,"aria-describedby":n?`${o} ${s}`:o,"aria-invalid":!!n,...e})});Y.displayName=`FormControl`;const ft=b(({className:e,...t},n)=>{let{formDescriptionId:i}=J();return r(`p`,{ref:n,id:i,className:O(`text-[0.8rem] text-muted-foreground`,e),...t})});ft.displayName=`FormDescription`;const pt=b(({className:e,children:t,...n},i)=>{let{error:a,formMessageId:o}=J(),s=a?String(a.message):t;return s?r(`p`,{ref:i,id:o,className:O(`text-[0.8rem] font-medium text-destructive`,e),...n,children:s}):null});pt.displayName=`FormMessage`;let X=`/api/admin/icons`;function mt(e){let t=e.replace(/\/+$/,``);t!==X&&(X=t,Z.clear(),Q=null)}const Z=new Map;function ht(e){let t=Z.get(e);if(t instanceof Promise)return t;if(t!==void 0)return Promise.resolve(t);let n=fetch(`${X}/${encodeURIComponent(e)}`).then(async t=>{if(t.ok){let n=await t.text();return Z.set(e,n),n}return t.status===404?Z.set(e,null):Z.delete(e),null}).catch(()=>(Z.delete(e),null));return Z.set(e,n),n}let Q=null;function gt(){return Q||=fetch(X).then(e=>e.ok?e.json():[]).catch(()=>[]),Q}function $({name:e,className:t,size:n}){let[i,a]=w(null);S(()=>{if(!e){a(null);return}let t=Z.get(e);if(typeof t==`string`||t===null){a(t);return}let n=!0;return ht(e).then(e=>{n&&a(e)}),()=>{n=!1}},[e]);let o=C(()=>i?{__html:i}:null,[i]);return o?r(`span`,{className:t,style:{display:`inline-flex`,lineHeight:0,...n==null?{}:{width:n,height:n}},dangerouslySetInnerHTML:o,"aria-hidden":`true`}):null}const _t=b(function({value:e,onChange:t,placeholder:a=`Pick icon`,className:o,disabled:s,id:c,...l},u){let[d,f]=w(!1),[p,m]=w(``),[h,g]=w([]),[_,v]=w(!1),y=ee();S(()=>{if(!d||h.length>0)return;let e=!0;return v(!0),gt().then(t=>{e&&(g(t),v(!1))}),()=>{e=!1}},[d,h.length]);let b=C(()=>{let e=p.trim().toLowerCase(),t=e?h.filter(t=>t.includes(e)):h;return{shown:t.slice(0,90),total:t.length}},[p,h]),x=e=>{t(e),f(!1),m(``)};return i(n,{children:[r(k,{ref:u,id:c,type:`button`,variant:`outline`,size:`icon`,disabled:s,onClick:()=>f(!0),title:e??a,"aria-label":e?`Icon: ${e}`:a,className:o,...l,children:e?r($,{name:e,size:16}):r(`span`,{"aria-hidden":!0,className:`text-base leading-none text-muted-foreground`,children:`+`})}),r(Qe,{open:d,onOpenChange:f,children:i(G,{className:`max-w-lg`,children:[r(rt,{children:r(K,{children:`Choose an icon`})}),r(`label`,{htmlFor:y,className:`sr-only`,children:`Search icons`}),r(M,{id:y,autoFocus:!0,value:p,onChange:e=>m(e.target.value),placeholder:`Search icons…`}),i(`div`,{className:`grid max-h-72 grid-cols-8 gap-1 overflow-auto p-0.5`,children:[r(`button`,{type:`button`,title:`No icon`,"aria-label":`No icon`,onClick:()=>x(void 0),className:O(`flex aspect-square items-center justify-center rounded-md border border-border text-[10px] text-muted-foreground hover:bg-accent`,!e&&`ring-2 ring-ring`),children:`none`}),b.shown.map(t=>r(`button`,{type:`button`,title:t,"aria-label":t,onClick:()=>x(t),className:O(`flex aspect-square items-center justify-center rounded-md border border-transparent hover:bg-accent hover:border-border`,t===e&&`ring-2 ring-ring`),children:r($,{name:t,size:18})},t))]}),r(`div`,{className:`text-xs text-muted-foreground`,children:_?`Loading icons…`:p?`${b.total} match${b.total===1?``:`es`}${b.total>90?` (showing 90)`:``}`:`${h.length} icons — type to search`})]})})]})}),vt=b(({className:e,children:t,...n},i)=>r(`select`,{ref:i,className:O(`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}));vt.displayName=`Select`;const yt=b(({className:e,orientation:t=`horizontal`,decorative:n=!0,...i},a)=>r(pe.Root,{ref:a,decorative:n,orientation:t,className:O(`shrink-0 bg-border`,t===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...i}));yt.displayName=`Separator`;function bt({className:e,...t}){return r(`div`,{className:O(`animate-pulse rounded-md bg-muted`,e),...t})}const xt={background:`var(--color-background)`,color:`var(--color-foreground)`,border:`1px solid var(--color-border)`},St={error:`sonner-error`,success:`sonner-success`};function Ct({toastOptions:e,...t}){return r(me,{position:`bottom-right`,...t,toastOptions:{...e,style:{...xt,...e?.style},classNames:{...St,...e?.classNames}}})}const wt=b(({className:e,...t},n)=>r(`textarea`,{ref:n,className:O(`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}));wt.displayName=`Textarea`;export{_e as Badge,k as Button,be as Card,we as CardContent,Ce as CardDescription,A as CardFooter,xe as CardHeader,Se as CardTitle,Ne as ChartContainer,Fe as ChartTooltip,Ie as ChartTooltipContent,Re as Checkbox,ze as Collapsible,Ve as CollapsibleContent,Be as CollapsibleTrigger,Xe as DataTable,Ze as DataTableColumnHeader,Ye as DataTableViewOptions,Qe as Dialog,et as DialogClose,G as DialogContent,at as DialogDescription,it as DialogFooter,rt as DialogHeader,K as DialogTitle,$e as DialogTrigger,z as DropdownMenu,V as DropdownMenuContent,H as DropdownMenuItem,U as DropdownMenuLabel,Ge as DropdownMenuPortal,W as DropdownMenuSeparator,B as DropdownMenuTrigger,ot as Form,Y as FormControl,ft as FormDescription,ct as FormField,ut as FormItem,dt as FormLabel,pt as FormMessage,$ as Icon,_t as IconPicker,M as Input,q as Label,vt as Select,yt as Separator,bt as Skeleton,N as Table,F as TableBody,R as TableCell,L as TableHead,P as TableHeader,I as TableRow,wt as Textarea,Ct as Toaster,O as cn,mt as setIconEndpoint,he as toast};
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["variantClasses","SonnerToaster"],"sources":["../src/lib/cn.ts","../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/chart.tsx","../src/checkbox.tsx","../src/input.tsx","../src/table.tsx","../src/data-table/data-table-pagination.tsx","../src/dropdown-menu.tsx","../src/data-table/data-table-view-options.tsx","../src/data-table/data-table.tsx","../src/data-table/data-table-column-header.tsx","../src/dialog.tsx","../src/label.tsx","../src/form.tsx","../src/select.tsx","../src/separator.tsx","../src/skeleton.tsx","../src/sonner.tsx","../src/textarea.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import type { HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface BadgeProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'secondary' | 'destructive' | 'outline'\n}\n\nconst variantClasses: Record<NonNullable<BadgeProps['variant']>, string> = {\n default: 'border-transparent bg-primary text-primary-foreground shadow-xs',\n secondary: 'border-transparent bg-secondary text-secondary-foreground',\n destructive: 'border-transparent bg-destructive text-destructive-foreground shadow-xs',\n outline: 'text-foreground',\n}\n\nexport function Badge({ className, variant = 'default', ...props }: BadgeProps) {\n return (\n <div\n className={cn(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold',\n 'transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n variantClasses[variant],\n className,\n )}\n {...props}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport { Loader2 } from 'lucide-react'\nimport { type ButtonHTMLAttributes, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'\n size?: 'default' | 'sm' | 'lg' | 'icon'\n loading?: boolean\n asChild?: boolean\n}\n\nconst variantClasses: Record<NonNullable<ButtonProps['variant']>, string> = {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n}\n\nconst sizeClasses: Record<NonNullable<ButtonProps['size']>, string> = {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = 'default',\n size = 'default',\n loading = false,\n asChild = false,\n disabled,\n children,\n type = 'button',\n ...props\n },\n ref,\n ) => {\n const classes = cn(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-colors cursor-pointer',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n variantClasses[variant],\n sizeClasses[size],\n className,\n )\n\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} {...props}>\n {children}\n </Slot>\n )\n }\n\n return (\n <button ref={ref} disabled={disabled || loading} className={classes} type={type} {...props}>\n {loading && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {children}\n </button>\n )\n },\n)\n\nButton.displayName = 'Button'\n","import { forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('rounded-xl border bg-card text-card-foreground shadow-sm', className)}\n {...props}\n />\n ),\n)\nCard.displayName = 'Card'\n\nexport const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n)\nCardHeader.displayName = 'CardHeader'\n\nexport const CardTitle = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n ),\n)\nCardTitle.displayName = 'CardTitle'\n\nexport const CardDescription = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n ),\n)\nCardDescription.displayName = 'CardDescription'\n\nexport const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />\n ),\n)\nCardContent.displayName = 'CardContent'\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n)\nCardFooter.displayName = 'CardFooter'\n","'use client'\n\n/**\n * Chart primitives for dashboard widgets.\n *\n * Vendored from shadcn/ui chart component (Recharts under the hood).\n * Provides ChartContainer (responsive wrapper), ChartTooltip, ChartTooltipContent.\n *\n * Usage: import Recharts components directly (Bar, BarChart, XAxis, etc.)\n * and wrap them in ChartContainer with a ChartConfig for theming.\n *\n * Security: ChartContainer's `id` prop and ChartConfig keys/colors are\n * inlined into a `<style dangerouslySetInnerHTML>` block to publish per-chart\n * CSS variables. Inputs that don't match the strict allowlists below are\n * silently dropped — DO NOT pass user-controllable strings as `id`, config\n * keys, or color values without validating upstream first.\n */\n\nimport * as React from 'react'\nimport type { TooltipValueType } from 'recharts'\nimport * as RechartsPrimitive from 'recharts'\n\nimport { cn } from './lib/cn'\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const\ntype TooltipNameType = number | string\n\n/**\n * Allowlist for chart id prop and ChartConfig keys.\n * Inlined into both the [data-chart=...] attribute selector and the\n * --color-{key} CSS custom property name; deny anything that could break\n * out of the selector or property declaration.\n */\nconst SAFE_CHART_ID_OR_KEY = /^[a-zA-Z0-9_-]+$/\n\n/**\n * Allowlist for ChartConfig color values.\n * Permits hex/rgb/hsl/oklch/var()/keyword colors; denies `;`, `{`, `}`, `<`, `>`, `\"`, `\\`\n * and other characters that would let a value escape the rule body.\n */\nconst SAFE_CSS_COLOR_VALUE = /^[#a-zA-Z0-9 ,.()/%-]+$/\n\n/**\n * Bare `url(...)` values are also rejected — even though the per-chart custom\n * property is inert at the declaration site, it leaks into the cascade and is\n * fetched by any downstream rule that uses `var(--color-key)` in\n * `background-image` / `mask-image` / `cursor` / `border-image` / etc. That's\n * the fetch-on-attribute-selector exfil class the audit calls out, just laundered\n * through a custom property. `var()` is the consumer-intended escape hatch — it\n * doesn't trigger a network fetch on its own.\n */\nconst FORBIDDEN_COLOR_FUNCTION = /\\burl\\s*\\(/i\n\nexport type ChartConfig = Record<\n string,\n {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n )\n>\n\ntype ChartContextProps = {\n config: ChartConfig\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />')\n }\n\n return context\n}\n\n/**\n * Build the per-chart CSS rules emitted by `<ChartStyle>`.\n *\n * Returns `null` if there is nothing to emit. Drops individual config\n * entries whose key fails {@link SAFE_CHART_ID_OR_KEY} or whose color\n * value fails {@link SAFE_CSS_COLOR_VALUE} — silently, since those values\n * being present means a consumer is forwarding untrusted input.\n *\n * Exported for unit tests; not part of the package public API.\n */\nexport function buildChartCss(id: string, config: ChartConfig): string | null {\n if (!SAFE_CHART_ID_OR_KEY.test(id)) {\n return null\n }\n\n const colorConfig = Object.entries(config).filter(([, value]) => value.theme ?? value.color)\n if (!colorConfig.length) {\n return null\n }\n\n const blocks = Object.entries(THEMES)\n .map(([theme, prefix]) => {\n const lines = colorConfig\n .map(([key, itemConfig]) => {\n if (!SAFE_CHART_ID_OR_KEY.test(key)) {\n return null\n }\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color\n if (!color || !SAFE_CSS_COLOR_VALUE.test(color) || FORBIDDEN_COLOR_FUNCTION.test(color)) {\n return null\n }\n return ` --color-${key}: ${color};`\n })\n .filter((line): line is string => line !== null)\n\n if (!lines.length) {\n return null\n }\n return `${prefix} [data-chart=${id}] {\\n${lines.join('\\n')}\\n}`\n })\n .filter((block): block is string => block !== null)\n\n return blocks.length ? blocks.join('\\n') : null\n}\n\n/**\n * Recharts' `Payload.payload` is typed `any`, which cascades through\n * the indicator color resolution. Narrow once here so callers stay typed.\n */\nfunction getPayloadFill(payload: unknown): string | undefined {\n if (\n payload &&\n typeof payload === 'object' &&\n 'fill' in payload &&\n typeof (payload as { fill: unknown }).fill === 'string'\n ) {\n return (payload as { fill: string }).fill\n }\n return undefined\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n nonce,\n ...props\n}: React.ComponentProps<'div'> & {\n config: ChartConfig\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children']\n initialDimension?: {\n width: number\n height: number\n }\n /** CSP nonce forwarded to the inline `<style>` element. */\n nonce?: string\n}) {\n const uniqueId = React.useId()\n const safeProvidedId = id && SAFE_CHART_ID_OR_KEY.test(id) ? id : null\n const chartId = `chart-${safeProvidedId ?? uniqueId.replace(/:/g, '')}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} nonce={nonce} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({\n id,\n config,\n nonce,\n}: {\n id: string\n config: ChartConfig\n nonce?: string | undefined\n}) => {\n const css = buildChartCss(id, config)\n if (!css) {\n return null\n }\n\n return (\n // biome-ignore lint/security/noDangerouslySetInnerHtml: id/keys/colors validated by buildChartCss against SAFE_CHART_ID_OR_KEY + SAFE_CSS_COLOR_VALUE allowlists.\n <style nonce={nonce} dangerouslySetInnerHTML={{ __html: css }} />\n )\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<'div'> & {\n hideLabel?: boolean\n hideIndicator?: boolean\n indicator?: 'line' | 'dot' | 'dashed'\n nameKey?: string\n labelKey?: string\n } & Omit<\n RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>,\n 'accessibilityLayer'\n >) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? 'value'}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value =\n !labelKey && typeof label === 'string' ? (config[label]?.label ?? label) : itemConfig?.label\n\n if (labelFormatter) {\n return (\n <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>\n )\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot'\n\n return (\n <div\n className={cn(\n 'grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const lookupKey = `${nameKey ?? item.name ?? item.dataKey ?? 'value'}`\n const itemConfig = getPayloadConfigFromPayload(config, item, lookupKey)\n const indicatorColor = color ?? getPayloadFill(item.payload) ?? item.color\n\n return (\n <div\n key={lookupKey}\n className={cn(\n 'flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n 'shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)',\n {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent':\n indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n },\n )}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label ?? item.name}\n </span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === 'number'\n ? item.value.toLocaleString()\n : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (key in payload && typeof payload[key as keyof typeof payload] === 'string') {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === 'string'\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key]\n}\n\nexport { ChartContainer, ChartTooltip, ChartTooltipContent }\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 | undefined\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 !== undefined && { 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\n// rolldown-plugin-dts 0.25.x (PR #243 \"Preserve external import types\")\n// flagged TS2742 on a bare `export const Form = FormProvider`: the inferred\n// type of `Form` indirectly references `@types/react` via react-hook-form's\n// generics, and the bundler can't construct a portable type alias without an\n// explicit annotation. Pinning the type to `typeof FormProvider` is the\n// react-hook-form-recommended fix (see hook-form examples) and identical at\n// the value level.\nexport const Form: typeof FormProvider = 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 * Consumer-provided `toastOptions.style` and `toastOptions.classNames` are\n * deep-merged with the toolkit defaults — overriding `error` doesn't drop\n * the `success` className, and overriding `background` doesn't drop the\n * border / color.\n */\n\nimport type { ComponentProps } from 'react'\nimport { Toaster as SonnerToaster, toast } from 'sonner'\n\nconst DEFAULT_STYLE = {\n background: 'var(--color-background)',\n color: 'var(--color-foreground)',\n border: '1px solid var(--color-border)',\n}\n\nconst DEFAULT_CLASS_NAMES = {\n error: 'sonner-error',\n success: 'sonner-success',\n}\n\nfunction Toaster({ toastOptions, ...props }: ComponentProps<typeof SonnerToaster>) {\n return (\n <SonnerToaster\n position=\"bottom-right\"\n {...props}\n toastOptions={{\n ...toastOptions,\n style: { ...DEFAULT_STYLE, ...toastOptions?.style },\n classNames: { ...DEFAULT_CLASS_NAMES, ...toastOptions?.classNames },\n }}\n />\n )\n}\n\nexport { Toaster, toast }\n","import { forwardRef, type TextareaHTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Textarea = forwardRef<\n HTMLTextAreaElement,\n TextareaHTMLAttributes<HTMLTextAreaElement>\n>(({ className, ...props }, ref) => {\n return (\n <textarea\n ref={ref}\n className={cn(\n 'flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs',\n 'placeholder:text-muted-foreground',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n})\n\nTextarea.displayName = 'Textarea'\n"],"mappings":";4hCAGA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAO,EAAQ,EAAK,CAAM,CAAC,CAC7B,CCEA,MAAMA,GAAqE,CACzE,QAAS,kEACT,UAAW,4DACX,YAAa,0EACb,QAAS,iBACX,EAEA,SAAgB,GAAM,CAAE,YAAW,UAAU,UAAW,GAAG,GAAqB,CAC9E,OACE,EAAC,MAAD,CACE,UAAW,EACT,iFACA,wFACAA,GAAe,GACf,CACF,EACA,GAAI,CACL,CAAA,CAEL,CCdA,MAAM,GAAsE,CAC1E,QAAS,mEACT,YAAa,+EACb,QACE,2FACF,UAAW,yEACX,MAAO,+CACP,KAAM,iDACR,EAEM,GAAgE,CACpE,QAAS,gBACT,GAAI,8BACJ,GAAI,uBACJ,KAAM,SACR,EAEa,EAAS,GAElB,CACE,YACA,UAAU,UACV,OAAO,UACP,UAAU,GACV,UAAU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GAAmB,KAApB,CACO,MACO,aACC,cACb,UAAW,EACT,qBACA,IAAgB,aAAe,iBAAmB,iBAClD,CACF,EACA,GAAI,CACL,CAAA,CACF,EAED,GAAU,YAAc,YClBxB,SAAgB,GAAS,CAAE,YAAW,GAAG,GAAyC,CAChF,OAAO,EAAC,MAAD,CAAK,UAAW,EAAG,oCAAqC,CAAS,EAAG,GAAI,CAAQ,CAAA,CACzF,CCiBA,MAAM,GAAgB,CACpB,WAAY,0BACZ,MAAO,0BACP,OAAQ,+BACV,EAEM,GAAsB,CAC1B,MAAO,eACP,QAAS,gBACX,EAEA,SAAS,GAAQ,CAAE,eAAc,GAAG,GAA+C,CACjF,OACE,EAACC,GAAD,CACE,SAAS,eACT,GAAI,EACJ,aAAc,CACZ,GAAG,EACH,MAAO,CAAE,GAAG,GAAe,GAAG,GAAc,KAAM,EAClD,WAAY,CAAE,GAAG,GAAqB,GAAG,GAAc,UAAW,CACpE,CACD,CAAA,CAEL,CC1CA,MAAa,GAAW,GAGrB,CAAE,YAAW,GAAG,GAAS,IAExB,EAAC,WAAD,CACO,MACL,UAAW,EACT,qGACA,oCACA,0EACA,kDACA,CACF,EACA,GAAI,CACL,CAAA,CAEJ,EAED,GAAS,YAAc"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["variantClasses","SonnerToaster"],"sources":["../src/lib/cn.ts","../src/badge.tsx","../src/button.tsx","../src/card.tsx","../src/chart.tsx","../src/checkbox.tsx","../src/collapsible.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/icon.tsx","../src/icon-picker.tsx","../src/select.tsx","../src/separator.tsx","../src/skeleton.tsx","../src/sonner.tsx","../src/textarea.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import type { HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface BadgeProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'default' | 'secondary' | 'destructive' | 'outline'\n}\n\nconst variantClasses: Record<NonNullable<BadgeProps['variant']>, string> = {\n default: 'border-transparent bg-primary text-primary-foreground shadow-xs',\n secondary: 'border-transparent bg-secondary text-secondary-foreground',\n destructive: 'border-transparent bg-destructive text-destructive-foreground shadow-xs',\n outline: 'text-foreground',\n}\n\nexport function Badge({ className, variant = 'default', ...props }: BadgeProps) {\n return (\n <div\n className={cn(\n 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold',\n 'transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n variantClasses[variant],\n className,\n )}\n {...props}\n />\n )\n}\n","import { Slot } from '@radix-ui/react-slot'\nimport { Loader2 } from 'lucide-react'\nimport { type ButtonHTMLAttributes, forwardRef } from 'react'\nimport { cn } from './lib/cn'\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'\n size?: 'default' | 'sm' | 'lg' | 'icon'\n loading?: boolean\n asChild?: boolean\n}\n\nconst variantClasses: Record<NonNullable<ButtonProps['variant']>, string> = {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n}\n\nconst sizeClasses: Record<NonNullable<ButtonProps['size']>, string> = {\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = 'default',\n size = 'default',\n loading = false,\n asChild = false,\n disabled,\n children,\n type = 'button',\n ...props\n },\n ref,\n ) => {\n const classes = cn(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium',\n 'transition-colors cursor-pointer',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n variantClasses[variant],\n sizeClasses[size],\n className,\n )\n\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} {...props}>\n {children}\n </Slot>\n )\n }\n\n return (\n <button ref={ref} disabled={disabled || loading} className={classes} type={type} {...props}>\n {loading && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {children}\n </button>\n )\n },\n)\n\nButton.displayName = 'Button'\n","import { forwardRef, type HTMLAttributes } from 'react'\nimport { cn } from './lib/cn'\n\nexport const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('rounded-xl border bg-card text-card-foreground shadow-sm', className)}\n {...props}\n />\n ),\n)\nCard.displayName = 'Card'\n\nexport const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n)\nCardHeader.displayName = 'CardHeader'\n\nexport const CardTitle = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n ),\n)\nCardTitle.displayName = 'CardTitle'\n\nexport const CardDescription = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n ),\n)\nCardDescription.displayName = 'CardDescription'\n\nexport const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />\n ),\n)\nCardContent.displayName = 'CardContent'\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n)\nCardFooter.displayName = 'CardFooter'\n","'use client'\n\n/**\n * Chart primitives for dashboard widgets.\n *\n * Vendored from shadcn/ui chart component (Recharts under the hood).\n * Provides ChartContainer (responsive wrapper), ChartTooltip, ChartTooltipContent.\n *\n * Usage: import Recharts components directly (Bar, BarChart, XAxis, etc.)\n * and wrap them in ChartContainer with a ChartConfig for theming.\n *\n * Security: ChartContainer's `id` prop and ChartConfig keys/colors are\n * inlined into a `<style dangerouslySetInnerHTML>` block to publish per-chart\n * CSS variables. Inputs that don't match the strict allowlists below are\n * silently dropped — DO NOT pass user-controllable strings as `id`, config\n * keys, or color values without validating upstream first.\n */\n\nimport * as React from 'react'\nimport type { TooltipValueType } from 'recharts'\nimport * as RechartsPrimitive from 'recharts'\n\nimport { cn } from './lib/cn'\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: '', dark: '.dark' } as const\n\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const\ntype TooltipNameType = number | string\n\n/**\n * Allowlist for chart id prop and ChartConfig keys.\n * Inlined into both the [data-chart=...] attribute selector and the\n * --color-{key} CSS custom property name; deny anything that could break\n * out of the selector or property declaration.\n */\nconst SAFE_CHART_ID_OR_KEY = /^[a-zA-Z0-9_-]+$/\n\n/**\n * Allowlist for ChartConfig color values.\n * Permits hex/rgb/hsl/oklch/var()/keyword colors; denies `;`, `{`, `}`, `<`, `>`, `\"`, `\\`\n * and other characters that would let a value escape the rule body.\n */\nconst SAFE_CSS_COLOR_VALUE = /^[#a-zA-Z0-9 ,.()/%-]+$/\n\n/**\n * Bare `url(...)` values are also rejected — even though the per-chart custom\n * property is inert at the declaration site, it leaks into the cascade and is\n * fetched by any downstream rule that uses `var(--color-key)` in\n * `background-image` / `mask-image` / `cursor` / `border-image` / etc. That's\n * the fetch-on-attribute-selector exfil class the audit calls out, just laundered\n * through a custom property. `var()` is the consumer-intended escape hatch — it\n * doesn't trigger a network fetch on its own.\n */\nconst FORBIDDEN_COLOR_FUNCTION = /\\burl\\s*\\(/i\n\nexport type ChartConfig = Record<\n string,\n {\n label?: React.ReactNode\n icon?: React.ComponentType\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<keyof typeof THEMES, string> }\n )\n>\n\ntype ChartContextProps = {\n config: ChartConfig\n}\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null)\n\nfunction useChart() {\n const context = React.useContext(ChartContext)\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />')\n }\n\n return context\n}\n\n/**\n * Build the per-chart CSS rules emitted by `<ChartStyle>`.\n *\n * Returns `null` if there is nothing to emit. Drops individual config\n * entries whose key fails {@link SAFE_CHART_ID_OR_KEY} or whose color\n * value fails {@link SAFE_CSS_COLOR_VALUE} — silently, since those values\n * being present means a consumer is forwarding untrusted input.\n *\n * Exported for unit tests; not part of the package public API.\n */\nexport function buildChartCss(id: string, config: ChartConfig): string | null {\n if (!SAFE_CHART_ID_OR_KEY.test(id)) {\n return null\n }\n\n const colorConfig = Object.entries(config).filter(([, value]) => value.theme ?? value.color)\n if (!colorConfig.length) {\n return null\n }\n\n const blocks = Object.entries(THEMES)\n .map(([theme, prefix]) => {\n const lines = colorConfig\n .map(([key, itemConfig]) => {\n if (!SAFE_CHART_ID_OR_KEY.test(key)) {\n return null\n }\n const color =\n itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ?? itemConfig.color\n if (!color || !SAFE_CSS_COLOR_VALUE.test(color) || FORBIDDEN_COLOR_FUNCTION.test(color)) {\n return null\n }\n return ` --color-${key}: ${color};`\n })\n .filter((line): line is string => line !== null)\n\n if (!lines.length) {\n return null\n }\n return `${prefix} [data-chart=${id}] {\\n${lines.join('\\n')}\\n}`\n })\n .filter((block): block is string => block !== null)\n\n return blocks.length ? blocks.join('\\n') : null\n}\n\n/**\n * Recharts' `Payload.payload` is typed `any`, which cascades through\n * the indicator color resolution. Narrow once here so callers stay typed.\n */\nfunction getPayloadFill(payload: unknown): string | undefined {\n if (\n payload &&\n typeof payload === 'object' &&\n 'fill' in payload &&\n typeof (payload as { fill: unknown }).fill === 'string'\n ) {\n return (payload as { fill: string }).fill\n }\n return undefined\n}\n\nfunction ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n nonce,\n ...props\n}: React.ComponentProps<'div'> & {\n config: ChartConfig\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children']\n initialDimension?: {\n width: number\n height: number\n }\n /** CSP nonce forwarded to the inline `<style>` element. */\n nonce?: string\n}) {\n const uniqueId = React.useId()\n const safeProvidedId = id && SAFE_CHART_ID_OR_KEY.test(id) ? id : null\n const chartId = `chart-${safeProvidedId ?? uniqueId.replace(/:/g, '')}`\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n data-slot=\"chart\"\n data-chart={chartId}\n className={cn(\n \"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden\",\n className,\n )}\n {...props}\n >\n <ChartStyle id={chartId} config={config} nonce={nonce} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n )\n}\n\nconst ChartStyle = ({\n id,\n config,\n nonce,\n}: {\n id: string\n config: ChartConfig\n nonce?: string | undefined\n}) => {\n const css = buildChartCss(id, config)\n if (!css) {\n return null\n }\n\n return (\n // biome-ignore lint/security/noDangerouslySetInnerHtml: id/keys/colors validated by buildChartCss against SAFE_CHART_ID_OR_KEY + SAFE_CSS_COLOR_VALUE allowlists.\n <style nonce={nonce} dangerouslySetInnerHTML={{ __html: css }} />\n )\n}\n\nconst ChartTooltip = RechartsPrimitive.Tooltip\n\nfunction ChartTooltipContent({\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n React.ComponentProps<'div'> & {\n hideLabel?: boolean\n hideIndicator?: boolean\n indicator?: 'line' | 'dot' | 'dashed'\n nameKey?: string\n labelKey?: string\n } & Omit<\n RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>,\n 'accessibilityLayer'\n >) {\n const { config } = useChart()\n\n const tooltipLabel = React.useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null\n }\n\n const [item] = payload\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? 'value'}`\n const itemConfig = getPayloadConfigFromPayload(config, item, key)\n const value =\n !labelKey && typeof label === 'string' ? (config[label]?.label ?? label) : itemConfig?.label\n\n if (labelFormatter) {\n return (\n <div className={cn('font-medium', labelClassName)}>{labelFormatter(value, payload)}</div>\n )\n }\n\n if (!value) {\n return null\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey])\n\n if (!active || !payload?.length) {\n return null\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot'\n\n return (\n <div\n className={cn(\n 'grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const lookupKey = `${nameKey ?? item.name ?? item.dataKey ?? 'value'}`\n const itemConfig = getPayloadConfigFromPayload(config, item, lookupKey)\n const indicatorColor = color ?? getPayloadFill(item.payload) ?? item.color\n\n return (\n <div\n key={lookupKey}\n className={cn(\n 'flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n 'shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)',\n {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent':\n indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n },\n )}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as React.CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label ?? item.name}\n </span>\n </div>\n {item.value != null && (\n <span className=\"font-mono font-medium text-foreground tabular-nums\">\n {typeof item.value === 'number'\n ? item.value.toLocaleString()\n : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n )\n })}\n </div>\n </div>\n )\n}\n\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\n if (typeof payload !== 'object' || payload === null) {\n return undefined\n }\n\n const payloadPayload =\n 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null\n ? payload.payload\n : undefined\n\n let configLabelKey: string = key\n\n if (key in payload && typeof payload[key as keyof typeof payload] === 'string') {\n configLabelKey = payload[key as keyof typeof payload] as string\n } else if (\n payloadPayload &&\n key in payloadPayload &&\n typeof payloadPayload[key as keyof typeof payloadPayload] === 'string'\n ) {\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string\n }\n\n return configLabelKey in config ? config[configLabelKey] : config[key]\n}\n\nexport { ChartContainer, ChartTooltip, ChartTooltipContent }\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 * as CollapsiblePrimitive from '@radix-ui/react-collapsible'\n\n/**\n * Collapsible primitive (Radix). Used by the admin sidebar to fold nav groups\n * away (plan/config phase 03 §9). Controlled via `open` / `onOpenChange`, or\n * uncontrolled via `defaultOpen`.\n *\n * Minimal re-export (shadcn convention) — the consumer styles the trigger and\n * content. `CollapsibleContent` exposes the `--radix-collapsible-content-height`\n * CSS var for height-animated reveals when the consumer opts in.\n */\nexport const Collapsible = CollapsiblePrimitive.Root\nexport const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger\nexport const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent\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 | undefined\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 !== undefined && { 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\n// rolldown-plugin-dts 0.25.x (PR #243 \"Preserve external import types\")\n// flagged TS2742 on a bare `export const Form = FormProvider`: the inferred\n// type of `Form` indirectly references `@types/react` via react-hook-form's\n// generics, and the bundler can't construct a portable type alias without an\n// explicit annotation. Pinning the type to `typeof FormProvider` is the\n// react-hook-form-recommended fix (see hook-form examples) and identical at\n// the value level.\nexport const Form: typeof FormProvider = 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","'use client'\n\n/**\n * `<Icon name>` — render a Lucide icon by kebab-case name, fetched **on demand**\n * as SVG data from the toolkit's icon endpoint (plan/config SD003).\n *\n * The client ships **zero icon code**: each icon's `<svg>` is fetched once from\n * `GET {endpoint}/{name}`, cached in-memory (shared across all `<Icon>`s) and by\n * the browser (`immutable`), then inlined so it inherits `currentColor` for\n * theming. Unknown/empty names render nothing. This replaces the crash-prone\n * `lucide-react/dynamic` approach (1500 lazy chunks crawled the library under\n * Turbopack — lucide #1576).\n *\n * Endpoint defaults to `/api/admin/icons` (the toolkit's admin API base). Apps\n * that mount the admin API elsewhere call {@link setIconEndpoint} once at boot.\n */\n\nimport { useEffect, useMemo, useState } from 'react'\n\nlet endpoint = '/api/admin/icons'\n\n/** Override the icon endpoint base (default `/api/admin/icons`). Call once at app boot. */\nexport function setIconEndpoint(base: string): void {\n const next = base.replace(/\\/+$/, '')\n if (next !== endpoint) {\n endpoint = next\n // Drop everything fetched from the previous backend — otherwise stale SVGs /\n // name lists from the old endpoint keep serving after the switch.\n cache.clear()\n namesPromise = null\n }\n}\n\n// Shared cache: name → svg string | null (known-missing) | in-flight Promise.\nconst cache = new Map<string, string | null | Promise<string | null>>()\n\n/** Fetch + cache one icon's SVG (dedupes concurrent requests for the same name). */\nfunction fetchIconSvg(name: string): Promise<string | null> {\n const hit = cache.get(name)\n if (hit instanceof Promise) return hit\n if (hit !== undefined) return Promise.resolve(hit)\n const p = fetch(`${endpoint}/${encodeURIComponent(name)}`)\n .then(async (r) => {\n if (r.ok) {\n const svg = await r.text()\n cache.set(name, svg)\n return svg\n }\n // 404 = the icon genuinely doesn't exist → cache the miss so we don't refetch.\n // A transient failure (e.g. the route's 503 when icon data is briefly\n // unavailable) must NOT be cached as a permanent miss — otherwise one outage\n // blanks the icon for the rest of the session. Drop it so the next render retries.\n if (r.status === 404) cache.set(name, null)\n else cache.delete(name)\n return null\n })\n .catch(() => {\n // Network error — transient. Clear the in-flight entry so a retry can happen.\n cache.delete(name)\n return null\n })\n cache.set(name, p)\n return p\n}\n\nlet namesPromise: Promise<readonly string[]> | null = null\n\n/** Fetch the full icon-name list (for pickers). Cached for the session. */\nexport function fetchIconNames(): Promise<readonly string[]> {\n if (!namesPromise) {\n namesPromise = fetch(endpoint)\n .then((r) => (r.ok ? (r.json() as Promise<readonly string[]>) : []))\n .catch(() => [])\n }\n return namesPromise\n}\n\nexport interface IconProps {\n /** Lucide kebab-case name (e.g. `panel-left`). Unknown/empty → renders nothing. */\n name?: string | null | undefined\n /** Sizing class applied to the wrapper (e.g. `h-4 w-4`). The SVG fills it. */\n className?: string | undefined\n /** Explicit pixel size (alternative to `className`). */\n size?: number | undefined\n}\n\nexport function Icon({ name, className, size }: IconProps): React.ReactElement | null {\n // Always start `null` so the server render and the client's FIRST render match\n // (the SVG is client-fetched data the server doesn't have — seeding from the\n // cache here causes a hydration mismatch). The effect populates it immediately\n // on a cache hit, or after the fetch.\n const [svg, setSvg] = useState<string | null>(null)\n\n // External-resource fetch (the sanctioned useEffect use): load the SVG on\n // demand, ignore the result if the name changed / unmounted before it lands.\n useEffect(() => {\n if (!name) {\n setSvg(null)\n return\n }\n const hit = cache.get(name)\n if (typeof hit === 'string' || hit === null) {\n setSvg(hit)\n return\n }\n let active = true\n fetchIconSvg(name).then((s) => {\n if (active) setSvg(s)\n })\n return () => {\n active = false\n }\n }, [name])\n\n // Memoize the dangerouslySetInnerHTML object — a fresh object identity on every\n // render makes React 19 re-apply innerHTML each time (PR #621 gotcha).\n const html = useMemo(() => (svg ? { __html: svg } : null), [svg])\n if (!html) return null\n\n return (\n <span\n className={className}\n style={{\n display: 'inline-flex',\n lineHeight: 0,\n ...(size != null ? { width: size, height: size } : {}),\n }}\n // biome-ignore lint/security/noDangerouslySetInnerHtml: SVG is from our own first-party icon endpoint (lucide data), not user input.\n dangerouslySetInnerHTML={html}\n aria-hidden=\"true\"\n />\n )\n}\n","'use client'\n\n/**\n * `<IconPicker>` — a searchable Lucide icon browser (plan/config SD003).\n *\n * On-demand by construction: the name list is fetched once when the dialog first\n * opens (not per mount — there can be many pickers on a page), search filters the\n * names client-side (just strings), and each visible cell renders `<Icon>`, which\n * fetches that one SVG on demand + caches it. No icon code/data ships in the\n * bundle; opening the picker never loads the whole set.\n *\n * Results are capped ({@link MAX_RESULTS}) so a broad query renders a bounded grid\n * — type to narrow. (Virtualized windowing is a future enhancement; the cap keeps\n * the request count + DOM bounded for v1.)\n */\n\nimport { forwardRef, useEffect, useId, useMemo, useState } from 'react'\nimport { Button } from './button'\nimport { Dialog, DialogContent, DialogHeader, DialogTitle } from './dialog'\nimport { fetchIconNames, Icon } from './icon'\nimport { Input } from './input'\nimport { cn } from './lib/cn'\n\nconst MAX_RESULTS = 90\n\nexport interface IconPickerProps {\n /** Current Lucide icon name, or empty. */\n value?: string | null | undefined\n /** Called with the chosen name, or `undefined` when cleared. */\n onChange: (name: string | undefined) => void\n /** Trigger text when no icon is selected. Default \"Pick icon\". */\n placeholder?: string\n /** Extra classes for the trigger button. */\n className?: string\n /** Disable the trigger. */\n disabled?: boolean\n /**\n * a11y props a form wrapper (e.g. shadcn `FormControl`) injects into the\n * trigger so the field stays linked to its label + validation message.\n */\n id?: string\n 'aria-describedby'?: string\n 'aria-invalid'?: React.AriaAttributes['aria-invalid']\n}\n\nexport const IconPicker = forwardRef<HTMLButtonElement, IconPickerProps>(function IconPicker(\n { value, onChange, placeholder = 'Pick icon', className, disabled, id, ...aria },\n ref,\n) {\n const [open, setOpen] = useState(false)\n const [query, setQuery] = useState('')\n const [names, setNames] = useState<readonly string[]>([])\n const [loading, setLoading] = useState(false)\n const searchId = useId()\n\n // Load the name list the first time the dialog opens (cached module-wide, so\n // multiple pickers share one request). Fetch is the sanctioned useEffect use.\n useEffect(() => {\n if (!open || names.length > 0) return\n let active = true\n setLoading(true)\n fetchIconNames().then((list) => {\n if (active) {\n setNames(list)\n setLoading(false)\n }\n })\n return () => {\n active = false\n }\n }, [open, names.length])\n\n const results = useMemo(() => {\n const needle = query.trim().toLowerCase()\n const matches = needle ? names.filter((n) => n.includes(needle)) : names\n return { shown: matches.slice(0, MAX_RESULTS), total: matches.length }\n }, [query, names])\n\n const select = (name: string | undefined) => {\n onChange(name)\n setOpen(false)\n setQuery('')\n }\n\n return (\n <>\n {/* Fixed-width icon-only trigger: showing the variable-length icon NAME made\n rows ragged. The icon itself is the affordance; the name lives in the\n dialog + the tooltip. */}\n <Button\n ref={ref}\n id={id}\n type=\"button\"\n variant=\"outline\"\n size=\"icon\"\n disabled={disabled}\n onClick={() => setOpen(true)}\n title={value ?? placeholder}\n aria-label={value ? `Icon: ${value}` : placeholder}\n className={className}\n {...aria}\n >\n {value ? (\n <Icon name={value} size={16} />\n ) : (\n <span aria-hidden className=\"text-base leading-none text-muted-foreground\">\n +\n </span>\n )}\n </Button>\n\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogContent className=\"max-w-lg\">\n <DialogHeader>\n <DialogTitle>Choose an icon</DialogTitle>\n </DialogHeader>\n {/* Placeholder text is not a reliable accessible name — give the\n search field a real label linked via `searchId`. */}\n <label htmlFor={searchId} className=\"sr-only\">\n Search icons\n </label>\n <Input\n id={searchId}\n autoFocus\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder=\"Search icons…\"\n />\n <div className=\"grid max-h-72 grid-cols-8 gap-1 overflow-auto p-0.5\">\n <button\n type=\"button\"\n title=\"No icon\"\n aria-label=\"No icon\"\n onClick={() => select(undefined)}\n className={cn(\n 'flex aspect-square items-center justify-center rounded-md border border-border text-[10px] text-muted-foreground hover:bg-accent',\n !value && 'ring-2 ring-ring',\n )}\n >\n none\n </button>\n {results.shown.map((name) => (\n <button\n key={name}\n type=\"button\"\n title={name}\n aria-label={name}\n onClick={() => select(name)}\n className={cn(\n 'flex aspect-square items-center justify-center rounded-md border border-transparent hover:bg-accent hover:border-border',\n name === value && 'ring-2 ring-ring',\n )}\n >\n <Icon name={name} size={18} />\n </button>\n ))}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n {loading\n ? 'Loading icons…'\n : query\n ? `${results.total} match${results.total === 1 ? '' : 'es'}${\n results.total > MAX_RESULTS ? ` (showing ${MAX_RESULTS})` : ''\n }`\n : `${names.length} icons — type to search`}\n </div>\n </DialogContent>\n </Dialog>\n </>\n )\n})\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 * Consumer-provided `toastOptions.style` and `toastOptions.classNames` are\n * deep-merged with the toolkit defaults — overriding `error` doesn't drop\n * the `success` className, and overriding `background` doesn't drop the\n * border / color.\n */\n\nimport type { ComponentProps } from 'react'\nimport { Toaster as SonnerToaster, toast } from 'sonner'\n\nconst DEFAULT_STYLE = {\n background: 'var(--color-background)',\n color: 'var(--color-foreground)',\n border: '1px solid var(--color-border)',\n}\n\nconst DEFAULT_CLASS_NAMES = {\n error: 'sonner-error',\n success: 'sonner-success',\n}\n\nfunction Toaster({ toastOptions, ...props }: ComponentProps<typeof SonnerToaster>) {\n return (\n <SonnerToaster\n position=\"bottom-right\"\n {...props}\n toastOptions={{\n ...toastOptions,\n style: { ...DEFAULT_STYLE, ...toastOptions?.style },\n classNames: { ...DEFAULT_CLASS_NAMES, ...toastOptions?.classNames },\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":";smCAGA,SAAgB,EAAG,GAAG,EAAsB,CAC1C,OAAO,EAAQ,EAAK,CAAM,CAAC,CAC7B,CCEA,MAAMA,GAAqE,CACzE,QAAS,kEACT,UAAW,4DACX,YAAa,0EACb,QAAS,iBACX,EAEA,SAAgB,GAAM,CAAE,YAAW,UAAU,UAAW,GAAG,GAAqB,CAC9E,OACE,EAAC,MAAD,CACE,UAAW,EACT,iFACA,wFACAA,GAAe,GACf,CACF,EACA,GAAI,CACL,CAAA,CAEL,CCdA,MAAM,GAAsE,CAC1E,QAAS,mEACT,YAAa,+EACb,QACE,2FACF,UAAW,yEACX,MAAO,+CACP,KAAM,iDACR,EAEM,GAAgE,CACpE,QAAS,gBACT,GAAI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,UAAW,EACT,2GACA,oBACA,0EACA,kDACA,CACF,EACA,GAAI,EAEH,UACK,CAAA,CAGd,EAEA,GAAO,YAAc,SCnBrB,MAAa,GAAY,GAGtB,CAAE,YAAW,cAAc,aAAc,aAAa,GAAM,GAAG,GAAS,IACzE,EAAC,GAAmB,KAApB,CACO,MACO,aACC,cACb,UAAW,EACT,qBACA,IAAgB,aAAe,iBAAmB,iBAClD,CACF,EACA,GAAI,CACL,CAAA,CACF,EAED,GAAU,YAAc,YClBxB,SAAgB,GAAS,CAAE,YAAW,GAAG,GAAyC,CAChF,OAAO,EAAC,MAAD,CAAK,UAAW,EAAG,oCAAqC,CAAS,EAAG,GAAI,CAAQ,CAAA,CACzF,CCiBA,MAAM,GAAgB,CACpB,WAAY,0BACZ,MAAO,0BACP,OAAQ,+BACV,EAEM,GAAsB,CAC1B,MAAO,eACP,QAAS,gBACX,EAEA,SAAS,GAAQ,CAAE,eAAc,GAAG,GAA+C,CACjF,OACE,EAACC,GAAD,CACE,SAAS,eACT,GAAI,EACJ,aAAc,CACZ,GAAG,EACH,MAAO,CAAE,GAAG,GAAe,GAAG,GAAc,KAAM,EAClD,WAAY,CAAE,GAAG,GAAqB,GAAG,GAAc,UAAW,CACpE,CACD,CAAA,CAEL,CC1CA,MAAa,GAAW,GAGrB,CAAE,YAAW,GAAG,GAAS,IAExB,EAAC,WAAD,CACO,MACL,UAAW,EACT,qGACA,oCACA,0EACA,kDACA,CACF,EACA,GAAI,CACL,CAAA,CAEJ,EAED,GAAS,YAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@murumets-ee/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@radix-ui/react-checkbox": "^1.3.4",
|
|
17
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
17
18
|
"@radix-ui/react-dialog": "^1.1.16",
|
|
18
19
|
"@radix-ui/react-dropdown-menu": "^2.1.17",
|
|
19
20
|
"@radix-ui/react-label": "^2.1.9",
|