@dsbtek/component-library 1.0.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/README.md +17 -0
- package/dist/index.d.mts +45 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +54 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# SFT Advanced Components
|
|
2
|
+
|
|
3
|
+
This package provides advanced React components built on top of shadcn/ui.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @smartflowtech/component-library
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import { AdvancedCombobox } from '@smartflowtech/component-library';
|
|
15
|
+
|
|
16
|
+
// ... rest of the documentation
|
|
17
|
+
```
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface Column<T> {
|
|
5
|
+
accessor: keyof T | ((item: T) => React.ReactNode);
|
|
6
|
+
header: string;
|
|
7
|
+
sortable?: boolean;
|
|
8
|
+
filterable?: boolean;
|
|
9
|
+
cell?: (value: any, item: T) => React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface AdvancedDataTableProps<T> {
|
|
12
|
+
columns: Column<T>[];
|
|
13
|
+
fetchData: (params: {
|
|
14
|
+
page: number;
|
|
15
|
+
perPage: number;
|
|
16
|
+
sortBy?: string;
|
|
17
|
+
sortOrder?: "asc" | "desc";
|
|
18
|
+
filters?: Record<string, string>;
|
|
19
|
+
}) => Promise<{
|
|
20
|
+
data: T[];
|
|
21
|
+
meta: {
|
|
22
|
+
current_page: number;
|
|
23
|
+
last_page: number;
|
|
24
|
+
per_page: number;
|
|
25
|
+
total: number;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
itemsPerPageOptions?: number[];
|
|
29
|
+
}
|
|
30
|
+
declare function AdvancedDataTable<T extends Record<string, any>>({ columns, fetchData, itemsPerPageOptions, }: AdvancedDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface ComboboxItem {
|
|
33
|
+
value: string;
|
|
34
|
+
label: string;
|
|
35
|
+
}
|
|
36
|
+
interface AdvancedComboboxProps {
|
|
37
|
+
items: ComboboxItem[];
|
|
38
|
+
placeholder: string;
|
|
39
|
+
onSelect: (value: string) => void;
|
|
40
|
+
multiple?: boolean;
|
|
41
|
+
searchable?: boolean;
|
|
42
|
+
}
|
|
43
|
+
declare function AdvancedCombobox({ items, placeholder, onSelect, multiple, searchable, }: AdvancedComboboxProps): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
45
|
+
export { AdvancedCombobox, AdvancedDataTable };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface Column<T> {
|
|
5
|
+
accessor: keyof T | ((item: T) => React.ReactNode);
|
|
6
|
+
header: string;
|
|
7
|
+
sortable?: boolean;
|
|
8
|
+
filterable?: boolean;
|
|
9
|
+
cell?: (value: any, item: T) => React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface AdvancedDataTableProps<T> {
|
|
12
|
+
columns: Column<T>[];
|
|
13
|
+
fetchData: (params: {
|
|
14
|
+
page: number;
|
|
15
|
+
perPage: number;
|
|
16
|
+
sortBy?: string;
|
|
17
|
+
sortOrder?: "asc" | "desc";
|
|
18
|
+
filters?: Record<string, string>;
|
|
19
|
+
}) => Promise<{
|
|
20
|
+
data: T[];
|
|
21
|
+
meta: {
|
|
22
|
+
current_page: number;
|
|
23
|
+
last_page: number;
|
|
24
|
+
per_page: number;
|
|
25
|
+
total: number;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
itemsPerPageOptions?: number[];
|
|
29
|
+
}
|
|
30
|
+
declare function AdvancedDataTable<T extends Record<string, any>>({ columns, fetchData, itemsPerPageOptions, }: AdvancedDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface ComboboxItem {
|
|
33
|
+
value: string;
|
|
34
|
+
label: string;
|
|
35
|
+
}
|
|
36
|
+
interface AdvancedComboboxProps {
|
|
37
|
+
items: ComboboxItem[];
|
|
38
|
+
placeholder: string;
|
|
39
|
+
onSelect: (value: string) => void;
|
|
40
|
+
multiple?: boolean;
|
|
41
|
+
searchable?: boolean;
|
|
42
|
+
}
|
|
43
|
+
declare function AdvancedCombobox({ items, placeholder, onSelect, multiple, searchable, }: AdvancedComboboxProps): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
45
|
+
export { AdvancedCombobox, AdvancedDataTable };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var y=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),i=require('@radix-ui/react-select'),lucideReact=require('lucide-react'),V=require('@radix-ui/react-checkbox'),P=require('@radix-ui/react-avatar'),w=require('@radix-ui/react-tooltip'),cmdk=require('cmdk'),c=require('@radix-ui/react-dialog'),g=require('@radix-ui/react-popover');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var y__namespace=/*#__PURE__*/_interopNamespace(y);var i__namespace=/*#__PURE__*/_interopNamespace(i);var V__namespace=/*#__PURE__*/_interopNamespace(V);var P__namespace=/*#__PURE__*/_interopNamespace(P);var w__namespace=/*#__PURE__*/_interopNamespace(w);var c__namespace=/*#__PURE__*/_interopNamespace(c);var g__namespace=/*#__PURE__*/_interopNamespace(g);function a(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var Q=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:o,className:a("w-full caption-bottom text-sm",e),...t})}));Q.displayName="Table";var Y=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("thead",{ref:o,className:a("[&_tr]:border-b",e),...t}));Y.displayName="TableHeader";var Z=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("tbody",{ref:o,className:a("[&_tr:last-child]:border-0",e),...t}));Z.displayName="TableBody";var ze=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("tfoot",{ref:o,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ze.displayName="TableFooter";var I=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("tr",{ref:o,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));I.displayName="TableRow";var O=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("th",{ref:o,className:a("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}));O.displayName="TableHead";var M=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("td",{ref:o,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));M.displayName="TableCell";var Ve=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx("caption",{ref:o,className:a("mt-4 text-sm text-muted-foreground",e),...t}));Ve.displayName="TableCaption";var Ge=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{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"}},defaultVariants:{variant:"default",size:"default"}}),_=y__namespace.forwardRef(({className:e,variant:t,size:o,asChild:n=false,...f},L)=>jsxRuntime.jsx(n?reactSlot.Slot:"button",{className:a(Ge({variant:t,size:o,className:e})),ref:L,...f}));_.displayName="Button";var j=y__namespace.forwardRef(({className:e,type:t,...o},n)=>jsxRuntime.jsx("input",{type:t,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm 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 md:text-sm",e),ref:n,...o}));j.displayName="Input";var fe=i__namespace.Root;var Je=y__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsxs(i__namespace.Trigger,{ref:n,className:a("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...o,children:[t,jsxRuntime.jsx(i__namespace.Icon,{asChild:true,children:jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Je.displayName=i__namespace.Trigger.displayName;var ue=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(i__namespace.ScrollUpButton,{ref:o,className:a("flex cursor-default items-center justify-center py-1",e),...t,children:jsxRuntime.jsx(lucideReact.ChevronUp,{className:"h-4 w-4"})}));ue.displayName=i__namespace.ScrollUpButton.displayName;var ge=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(i__namespace.ScrollDownButton,{ref:o,className:a("flex cursor-default items-center justify-center py-1",e),...t,children:jsxRuntime.jsx(lucideReact.ChevronDown,{className:"h-4 w-4"})}));ge.displayName=i__namespace.ScrollDownButton.displayName;var Ke=y__namespace.forwardRef(({className:e,children:t,position:o="popper",...n},f)=>jsxRuntime.jsx(i__namespace.Portal,{children:jsxRuntime.jsxs(i__namespace.Content,{ref:f,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...n,children:[jsxRuntime.jsx(ue,{}),jsxRuntime.jsx(i__namespace.Viewport,{className:a("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),jsxRuntime.jsx(ge,{})]})}));Ke.displayName=i__namespace.Content.displayName;var Qe=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(i__namespace.Label,{ref:o,className:a("px-2 py-1.5 text-sm font-semibold",e),...t}));Qe.displayName=i__namespace.Label.displayName;var Ye=y__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsxs(i__namespace.Item,{ref:n,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[jsxRuntime.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(i__namespace.ItemIndicator,{children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})})}),jsxRuntime.jsx(i__namespace.ItemText,{children:t})]}));Ye.displayName=i__namespace.Item.displayName;var Ze=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(i__namespace.Separator,{ref:o,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));Ze.displayName=i__namespace.Separator.displayName;var G=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(V__namespace.Root,{ref:o,className:a("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow 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:jsxRuntime.jsx(V__namespace.Indicator,{className:a("flex items-center justify-center text-current"),children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})})}));G.displayName=V__namespace.Root.displayName;var be=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(P__namespace.Root,{ref:o,className:a("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));be.displayName=P__namespace.Root.displayName;var Re=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(P__namespace.Image,{ref:o,className:a("aspect-square h-full w-full",e),...t}));Re.displayName=P__namespace.Image.displayName;var ye=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(P__namespace.Fallback,{ref:o,className:a("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ye.displayName=P__namespace.Fallback.displayName;classVarianceAuthority.cva("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",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});var Ce=y__namespace.forwardRef(({className:e,sideOffset:t=4,...o},n)=>jsxRuntime.jsx(w__namespace.Portal,{children:jsxRuntime.jsx(w__namespace.Content,{ref:n,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ce.displayName=w__namespace.Content.displayName;function at({columns:e,fetchData:t,itemsPerPageOptions:o=[10,20,50]}){let[n,f]=y.useState([]),[L,A]=y.useState(true),[v,k]=y.useState(1),[x,q]=y.useState(o[0]),[W,X]=y.useState(null),[H,s]=y.useState("asc"),[D,J]=y.useState({}),[z,K]=y.useState(new Set),[b,De]=y.useState(null);y.useEffect(()=>{Ee();},[t,v,x,W,H,D]);let Ee=async()=>{A(true);try{let r=await t({page:v,perPage:x,sortBy:W,sortOrder:H,filters:D});f(r.data),De(r.meta);}catch(r){console.error("Error fetching data:",r);}finally{A(false);}},Le=r=>{W===r?s(H==="asc"?"desc":"asc"):(X(r),s("asc"));},Ae=(r,l)=>{J(_e=>({..._e,[r]:l})),k(1);},He=r=>{let l=new Set(z);l.has(r)?l.delete(r):l.add(r),K(l);},Ie=()=>{z.size===n.length?K(new Set):K(new Set(n.map(r=>r.id)));},Me=(r,l)=>l.cell?l.cell(r[l.accessor],r):typeof l.accessor=="function"?l.accessor(r):r[l.accessor];return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex justify-between mb-4",children:[jsxRuntime.jsx("div",{className:"flex space-x-2",children:e.filter(r=>r.filterable).map(r=>jsxRuntime.jsx(j,{placeholder:`Filter ${r.header}`,value:D[r.accessor]||"",onChange:l=>Ae(r.accessor,l.target.value),className:"w-40"},r.accessor))}),jsxRuntime.jsx(fe,{value:x.toString(),onValueChange:r=>{q(Number(r)),k(1);},children:o.map(r=>jsxRuntime.jsxs("option",{value:r.toString(),children:[r," per page"]},r))})]}),jsxRuntime.jsxs(Q,{children:[jsxRuntime.jsx(Y,{children:jsxRuntime.jsxs(I,{children:[jsxRuntime.jsx(O,{className:"w-[50px]",children:jsxRuntime.jsx(G,{checked:z.size===n.length,onCheckedChange:Ie})}),e.map(r=>jsxRuntime.jsx(O,{className:r.sortable?"cursor-pointer":"",onClick:()=>r.sortable&&Le(r.accessor),children:jsxRuntime.jsxs("div",{className:"flex items-center",children:[r.header,r.sortable&&jsxRuntime.jsx(lucideReact.ArrowUpDown,{className:"ml-2 h-4 w-4"})]})},r.accessor))]})}),jsxRuntime.jsx(Z,{children:L?jsxRuntime.jsx(I,{children:jsxRuntime.jsx(M,{colSpan:e.length+1,className:"h-24 text-center",children:"Loading..."})}):n.length===0?jsxRuntime.jsx(I,{children:jsxRuntime.jsx(M,{colSpan:e.length+1,className:"h-24 text-center",children:"No results found."})}):n.map(r=>jsxRuntime.jsxs(I,{className:z.has(r.id)?"bg-muted":"",children:[jsxRuntime.jsx(M,{children:jsxRuntime.jsx(G,{checked:z.has(r.id),onCheckedChange:()=>He(r.id)})}),e.map(l=>jsxRuntime.jsx(M,{children:Me(r,l)},l.accessor))]},r.id))})]}),b&&jsxRuntime.jsxs("div",{className:"flex justify-between items-center mt-4",children:[jsxRuntime.jsxs("div",{children:["Showing ",(b.current_page-1)*b.per_page+1," to"," ",Math.min(b.current_page*b.per_page,b.total)," of ",b.total," entries"]}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx(_,{onClick:()=>k(r=>Math.max(r-1,1)),disabled:v===1,children:"Previous"}),jsxRuntime.jsx(_,{onClick:()=>k(r=>Math.min(r+1,b.last_page)),disabled:v===b.last_page,children:"Next"})]})]})]})}var it=c__namespace.Portal;var xe=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(c__namespace.Overlay,{ref:o,className:a("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}));xe.displayName=c__namespace.Overlay.displayName;var Te=y__namespace.forwardRef(({className:e,children:t,...o},n)=>jsxRuntime.jsxs(it,{children:[jsxRuntime.jsx(xe,{}),jsxRuntime.jsxs(c__namespace.Content,{ref:n,className:a("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 duration-200 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%] sm:rounded-lg",e),...o,children:[t,jsxRuntime.jsxs(c__namespace.Close,{className:"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",children:[jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Te.displayName=c__namespace.Content.displayName;var lt=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(c__namespace.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName=c__namespace.Title.displayName;var mt=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(c__namespace.Description,{ref:o,className:a("text-sm text-muted-foreground",e),...t}));mt.displayName=c__namespace.Description.displayName;var re=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(cmdk.Command,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));re.displayName=cmdk.Command.displayName;var ie=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:o,className:a("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));ie.displayName=cmdk.Command.Input.displayName;var dt=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(cmdk.Command.List,{ref:o,className:a("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));dt.displayName=cmdk.Command.List.displayName;var ne=y__namespace.forwardRef((e,t)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ne.displayName=cmdk.Command.Empty.displayName;var se=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(cmdk.Command.Group,{ref:o,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));se.displayName=cmdk.Command.Group.displayName;var pt=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:o,className:a("-mx-1 h-px bg-border",e),...t}));pt.displayName=cmdk.Command.Separator.displayName;var le=y__namespace.forwardRef(({className:e,...t},o)=>jsxRuntime.jsx(cmdk.Command.Item,{ref:o,className:a("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));le.displayName=cmdk.Command.Item.displayName;var Se=g__namespace.Root,ke=g__namespace.Trigger;var me=y__namespace.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},f)=>jsxRuntime.jsx(g__namespace.Portal,{children:jsxRuntime.jsx(g__namespace.Content,{ref:f,align:t,sideOffset:o,className:a("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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})}));me.displayName=g__namespace.Content.displayName;function bt({items:e,placeholder:t,onSelect:o,multiple:n=false,searchable:f=true}){var H;let[L,A]=y__namespace.useState(false),[v,k]=y__namespace.useState([]),[x,q]=y__namespace.useState(""),W=y__namespace.useMemo(()=>!f||!x?e:e.filter(s=>s.label.toLowerCase().includes(x.toLowerCase())||s.value.toLowerCase().includes(x.toLowerCase())),[e,x,f]),X=s=>{n?k(D=>D.includes(s)?D.filter(J=>J!==s):[...D,s]):(k([s]),A(false)),o(s);};return jsxRuntime.jsxs(Se,{open:L,onOpenChange:A,children:[jsxRuntime.jsx(ke,{asChild:true,children:jsxRuntime.jsxs(_,{variant:"outline",role:"combobox","aria-expanded":L,className:"w-[200px] justify-between",children:[v.length>0?n?`${v.length} selected`:(H=e.find(s=>s.value===v[0]))==null?void 0:H.label:t,jsxRuntime.jsx(lucideReact.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),jsxRuntime.jsx(me,{className:"w-[200px] p-0",children:jsxRuntime.jsxs(re,{children:[f&&jsxRuntime.jsx(ie,{placeholder:`Search ${t.toLowerCase()}...`,onValueChange:q}),jsxRuntime.jsx(ne,{children:"No item found."}),jsxRuntime.jsx(se,{children:W.map(s=>jsxRuntime.jsxs(le,{onSelect:()=>X(s.value),children:[jsxRuntime.jsx(lucideReact.Check,{className:a("mr-2 h-4 w-4",v.includes(s.value)?"opacity-100":"opacity-0")}),s.label]},s.value))})]})})]})}exports.AdvancedCombobox=bt;exports.AdvancedDataTable=at;//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../lib/utils.tsx","../src/shadcn/ui/table.tsx","../src/shadcn/ui/button.tsx","../src/shadcn/ui/input.tsx","../src/shadcn/ui/select.tsx","../src/shadcn/ui/checkbox.tsx","../src/shadcn/ui/avatar.tsx","../src/shadcn/ui/badge.tsx","../src/shadcn/ui/tooltip.tsx","../src/advanced-data-table/index.tsx","../src/shadcn/ui/dialog.tsx","../src/shadcn/ui/command.tsx","../src/shadcn/ui/popover.tsx","../src/advanced-combobox/index.tsx"],"names":["cn","inputs","twMerge","clsx","Table","y","className","props","ref","jsx","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","buttonVariants","cva","Button","ce","variant","size","asChild","Slot","Input","de","type","Select","i","SelectTrigger","T","children","jsxs","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","Check","SelectSeparator","Checkbox","ve","V","Avatar","U","P","AvatarImage","AvatarFallback","TooltipContent","he","sideOffset","w","AdvancedDataTable","columns","fetchData","itemsPerPageOptions","data","setData","useState","loading","setLoading","currentPage","setCurrentPage","itemsPerPage","setItemsPerPage","sortColumn","setSortColumn","sortOrder","setSortOrder","filters","setFilters","selectedRows","setSelectedRows","meta","setMeta","useEffect","loadData","result","error","handleSort","column","handleFilter","value","prev","toggleRowSelection","id","newSelectedRows","toggleAllRows","item","renderCell","e","option","ArrowUpDown","DialogPortal","c","DialogOverlay","F","DialogContent","X","DialogTitle","DialogDescription","Command","S","CommandPrimitive","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","Popover","g","PopoverTrigger","PopoverContent","Ne","align","AdvancedCombobox","items","placeholder","onSelect","multiple","searchable","_a","open","setOpen","B","setValue","search","setSearch","filteredItems","handleSelect","currentValue","v","ChevronsUpDown"],"mappings":"2pCAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CACxC,OAAOC,qBAAAA,CAAQC,UAAKF,CAAM,CAAC,CAC/B,CCDA,IAAMG,EAAcC,YAGlB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,IACxBC,cAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,+BAAA,CACX,QAAAA,CAAAA,cAAAA,CAAC,OACG,CAAA,CAAA,GAAA,CAAKD,EACL,SAAWR,CAAAA,CAAAA,CAAG,+BAAiCM,CAAAA,CAAS,CACvD,CAAA,GAAGC,CACR,CAAA,CAAA,CACJ,CACH,CACDH,CAAAA,CAAAA,CAAM,WAAc,CAAA,OAAA,CAEpB,IAAMM,CAAoB,CAAAL,YAAA,CAAA,UAAA,CAGxB,CAAC,CAAE,UAAAC,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,CACxBC,GAAAA,cAAAA,CAAC,OAAM,CAAA,CAAA,GAAA,CAAKD,EAAK,SAAWR,CAAAA,CAAAA,CAAG,iBAAmBM,CAAAA,CAAS,CAAI,CAAA,GAAGC,CAAO,CAAA,CAC5E,EACDG,CAAY,CAAA,WAAA,CAAc,aAE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GvC,EAAM,MAAM,CAAA,SAAA,CAAA,CAAA,CACfyC,CAAAL,CAAAA,CAAAA,CAAM,IAAM9B,CAAAA,CAAAA,EAASA,CAAK,CAAA,KAAA,GAAUN,EAAM,CAAC,CAAC,CAA5C,GAAA,IAAA,CAAA,MAAA,CAAAyC,EACM,KACVJ,CAAAA,CAAAA,CACNlH,cAACiI,CAAAA,0BAAAA,CAAA,CAAe,SAAU,CAAA,kCAAA,CAAmC,CACjE,CAAA,CAAA,CAAA,CACJ,CACAjI,CAAAA,cAAAA,CAAC6G,EAAA,CAAA,CAAe,UAAU,eACtB,CAAA,QAAA,CAAArF,eAACwE,CAAAA,EAAAA,CAAA,CACI,QAAA,CAAA,CAAAqB,CACGrH,EAAAA,cAAAA,CAACmG,GAAA,CACG,WAAA,CAAa,CAAUe,OAAAA,EAAAA,CAAAA,CAAY,WAAY,EAAC,CAChD,GAAA,CAAA,CAAA,aAAA,CAAeU,EACnB,CAEJ5H,CAAAA,cAAAA,CAACsG,EAAA,CAAA,CAAa,0BAAc,CAC5BtG,CAAAA,cAAAA,CAACuG,EAAA,CAAA,CACI,SAAAsB,CAAc,CAAA,GAAA,CAAK1C,CAChB3D,EAAAA,eAAAA,CAACiF,EAAA,CAAA,CAEG,QAAU,CAAA,IAAMqB,EAAa3C,CAAK,CAAA,KAAK,CAEvC,CAAA,QAAA,CAAA,CAAAnF,cAACiC,CAAAA,iBAAAA,CAAA,CACG,SAAA,CAAW1C,EACP,cACAsF,CAAAA,CAAAA,CAAM,QAASM,CAAAA,CAAAA,CAAK,KAAK,CAAA,CACnB,aACA,CAAA,WACV,EACJ,CACCA,CAAAA,CAAAA,CAAK,KAXDA,CAAAA,CAAAA,CAAAA,CAAAA,CAAK,KAYd,CACH,CAAA,CACL,CACJ,CAAA,CAAA,CAAA,CACJ,GACJ,CAER","file":"index.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n))\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n))\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.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))\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.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 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.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))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\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 },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\n","import * as React from \"react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm 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 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.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 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\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\nimport {cn} from \"../../../lib/utils\";\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst badgeVariants = cva(\n \"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\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","\"use client\"\n\nimport type React from \"react\"\nimport { useState, useEffect } from \"react\"\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"../shadcn/ui/table\"\nimport { Button } from \"../shadcn/ui/button\"\nimport { Input } from \"../shadcn/ui/input\"\nimport { Select } from \"../shadcn/ui/select\"\nimport { Checkbox } from \"../shadcn/ui/checkbox\"\nimport { ArrowUpDown } from \"lucide-react\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"../shadcn/ui/avatar\"\nimport { Badge } from \"../shadcn/ui/badge\"\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"../shadcn/ui/tooltip\"\n\ninterface Column<T> {\n accessor: keyof T | ((item: T) => React.ReactNode)\n header: string\n sortable?: boolean\n filterable?: boolean\n cell?: (value: any, item: T) => React.ReactNode\n}\n\ninterface AdvancedDataTableProps<T> {\n columns: Column<T>[]\n fetchData: (params: {\n page: number\n perPage: number\n sortBy?: string\n sortOrder?: \"asc\" | \"desc\"\n filters?: Record<string, string>\n }) => Promise<{\n data: T[]\n meta: {\n current_page: number\n last_page: number\n per_page: number\n total: number\n }\n }>\n itemsPerPageOptions?: number[]\n}\n\nexport function AdvancedDataTable<T extends Record<string, any>>({\n columns,\n fetchData,\n itemsPerPageOptions = [10, 20, 50],\n }: AdvancedDataTableProps<T>) {\n const [data, setData] = useState<T[]>([])\n const [loading, setLoading] = useState(true)\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(itemsPerPageOptions[0])\n const [sortColumn, setSortColumn] = useState<keyof T | null>(null)\n const [sortOrder, setSortOrder] = useState<\"asc\" | \"desc\">(\"asc\")\n const [filters, setFilters] = useState<Record<string, string>>({})\n const [selectedRows, setSelectedRows] = useState<Set<number>>(new Set())\n const [meta, setMeta] = useState<{\n current_page: number\n last_page: number\n per_page: number\n total: number\n } | null>(null)\n\n useEffect(() => {\n loadData()\n }, [fetchData, currentPage, itemsPerPage, sortColumn, sortOrder, filters]) //Fixed useEffect dependency\n\n const loadData = async () => {\n setLoading(true)\n try {\n const result = await fetchData({\n page: currentPage,\n perPage: itemsPerPage,\n sortBy: sortColumn as string,\n sortOrder,\n filters,\n })\n setData(result.data)\n setMeta(result.meta)\n } catch (error) {\n console.error(\"Error fetching data:\", error)\n } finally {\n setLoading(false)\n }\n }\n\n const handleSort = (column: keyof T) => {\n if (sortColumn === column) {\n setSortOrder(sortOrder === \"asc\" ? \"desc\" : \"asc\")\n } else {\n setSortColumn(column)\n setSortOrder(\"asc\")\n }\n }\n\n const handleFilter = (column: keyof T, value: string) => {\n setFilters((prev) => ({ ...prev, [column]: value }))\n setCurrentPage(1)\n }\n\n const toggleRowSelection = (id: number) => {\n const newSelectedRows = new Set(selectedRows)\n if (newSelectedRows.has(id)) {\n newSelectedRows.delete(id)\n } else {\n newSelectedRows.add(id)\n }\n setSelectedRows(newSelectedRows)\n }\n\n const toggleAllRows = () => {\n if (selectedRows.size === data.length) {\n setSelectedRows(new Set())\n } else {\n setSelectedRows(new Set(data.map((item) => item.id)))\n }\n }\n\n const renderCell = (item: T, column: Column<T>) => {\n if (column.cell) {\n return column.cell(item[column.accessor as keyof T], item)\n }\n if (typeof column.accessor === \"function\") {\n return column.accessor(item)\n }\n return item[column.accessor as keyof T]\n }\n\n return (\n <div>\n <div className=\"flex justify-between mb-4\">\n <div className=\"flex space-x-2\">\n {columns\n .filter((column) => column.filterable)\n .map((column) => (\n <Input\n key={column.accessor as string}\n placeholder={`Filter ${column.header}`}\n value={filters[column.accessor as string] || \"\"}\n onChange={(e) => handleFilter(column.accessor as keyof T, e.target.value)}\n className=\"w-40\"\n />\n ))}\n </div>\n <Select\n value={itemsPerPage.toString()}\n onValueChange={(value) => {\n setItemsPerPage(Number(value))\n setCurrentPage(1)\n }}\n >\n {itemsPerPageOptions.map((option) => (\n <option key={option} value={option.toString()}>\n {option} per page\n </option>\n ))}\n </Select>\n </div>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead className=\"w-[50px]\">\n <Checkbox checked={selectedRows.size === data.length} onCheckedChange={toggleAllRows} />\n </TableHead>\n {columns.map((column) => (\n <TableHead\n key={column.accessor as string}\n className={column.sortable ? \"cursor-pointer\" : \"\"}\n onClick={() => column.sortable && handleSort(column.accessor as keyof T)}\n >\n <div className=\"flex items-center\">\n {column.header}\n {column.sortable && <ArrowUpDown className=\"ml-2 h-4 w-4\" />}\n </div>\n </TableHead>\n ))}\n </TableRow>\n </TableHeader>\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell colSpan={columns.length + 1} className=\"h-24 text-center\">\n Loading...\n </TableCell>\n </TableRow>\n ) : data.length === 0 ? (\n <TableRow>\n <TableCell colSpan={columns.length + 1} className=\"h-24 text-center\">\n No results found.\n </TableCell>\n </TableRow>\n ) : (\n data.map((item) => (\n <TableRow key={item.id} className={selectedRows.has(item.id) ? \"bg-muted\" : \"\"}>\n <TableCell>\n <Checkbox checked={selectedRows.has(item.id)} onCheckedChange={() => toggleRowSelection(item.id)} />\n </TableCell>\n {columns.map((column) => (\n <TableCell key={column.accessor as string}>{renderCell(item, column)}</TableCell>\n ))}\n </TableRow>\n ))\n )}\n </TableBody>\n </Table>\n {meta && (\n <div className=\"flex justify-between items-center mt-4\">\n <div>\n Showing {(meta.current_page - 1) * meta.per_page + 1} to{\" \"}\n {Math.min(meta.current_page * meta.per_page, meta.total)} of {meta.total} entries\n </div>\n <div className=\"flex space-x-2\">\n <Button onClick={() => setCurrentPage((prev) => Math.max(prev - 1, 1))} disabled={currentPage === 1}>\n Previous\n </Button>\n <Button\n onClick={() => setCurrentPage((prev) => Math.min(prev + 1, meta.last_page))}\n disabled={currentPage === meta.last_page}\n >\n Next\n </Button>\n </div>\n </div>\n )}\n </div>\n )\n}\n\n// Custom cell renderers\nexport const AvatarCell = ({ value }: { value: string }) => (\n <Avatar>\n <AvatarImage src={value} alt=\"Avatar\" />\n <AvatarFallback>Avatar</AvatarFallback>\n </Avatar>\n)\n\nexport const BadgeCell = ({ value }: { value: string }) => <Badge variant=\"outline\">{value}</Badge>\n\nexport const TooltipCell = ({ value, tooltip }: { value: string; tooltip: string }) => (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>{value}</TooltipTrigger>\n <TooltipContent>\n <p>{tooltip}</p>\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n)\n\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.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 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.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%] gap-4 border bg-background p-6 shadow-lg duration-200 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%] sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"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\">\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 = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.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 = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\nimport {Dialog, DialogContent} from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n","// 'use client';\n\nimport * as React from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../shadcn/ui/button';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n} from '../shadcn/ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '../shadcn/ui/popover';\n\ninterface ComboboxItem {\n value: string;\n label: string;\n}\n\ninterface AdvancedComboboxProps {\n items: ComboboxItem[];\n placeholder: string;\n onSelect: (value: string) => void;\n multiple?: boolean;\n searchable?: boolean;\n}\n\nexport function AdvancedCombobox({\n items,\n placeholder,\n onSelect,\n multiple = false,\n searchable = true,\n}: AdvancedComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const [value, setValue] = React.useState<string[]>([]);\n const [search, setSearch] = React.useState('');\n\n const filteredItems = React.useMemo(() => {\n if (!searchable || !search) return items;\n return items.filter(\n (item) =>\n item.label.toLowerCase().includes(search.toLowerCase()) ||\n item.value.toLowerCase().includes(search.toLowerCase()),\n );\n }, [items, search, searchable]);\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n setValue((prev) => {\n if (prev.includes(currentValue)) {\n return prev.filter((v) => v !== currentValue);\n } else {\n return [...prev, currentValue];\n }\n });\n } else {\n setValue([currentValue]);\n setOpen(false);\n }\n onSelect(currentValue);\n };\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n className=\"w-[200px] justify-between\"\n >\n {value.length > 0\n ? multiple\n ? `${value.length} selected`\n : items.find((item) => item.value === value[0])\n ?.label\n : placeholder}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[200px] p-0\">\n <Command>\n {searchable && (\n <CommandInput\n placeholder={`Search ${placeholder.toLowerCase()}...`}\n onValueChange={setSearch}\n />\n )}\n <CommandEmpty>No item found.</CommandEmpty>\n <CommandGroup>\n {filteredItems.map((item) => (\n <CommandItem\n key={item.value}\n onSelect={() => handleSelect(item.value)}\n >\n <Check\n className={cn(\n 'mr-2 h-4 w-4',\n value.includes(item.value)\n ? 'opacity-100'\n : 'opacity-0',\n )}\n />\n {item.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as y from'react';import {useState,useEffect}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs}from'react/jsx-runtime';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import*as i from'@radix-ui/react-select';import {ChevronDown,ChevronUp,Check,X,Search,ArrowUpDown,ChevronsUpDown}from'lucide-react';import*as V from'@radix-ui/react-checkbox';import*as P from'@radix-ui/react-avatar';import*as w from'@radix-ui/react-tooltip';import {Command}from'cmdk';import*as c from'@radix-ui/react-dialog';import*as g from'@radix-ui/react-popover';function a(...e){return twMerge(clsx(e))}var Q=y.forwardRef(({className:e,...t},o)=>jsx("div",{className:"relative w-full overflow-auto",children:jsx("table",{ref:o,className:a("w-full caption-bottom text-sm",e),...t})}));Q.displayName="Table";var Y=y.forwardRef(({className:e,...t},o)=>jsx("thead",{ref:o,className:a("[&_tr]:border-b",e),...t}));Y.displayName="TableHeader";var Z=y.forwardRef(({className:e,...t},o)=>jsx("tbody",{ref:o,className:a("[&_tr:last-child]:border-0",e),...t}));Z.displayName="TableBody";var ze=y.forwardRef(({className:e,...t},o)=>jsx("tfoot",{ref:o,className:a("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ze.displayName="TableFooter";var I=y.forwardRef(({className:e,...t},o)=>jsx("tr",{ref:o,className:a("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));I.displayName="TableRow";var O=y.forwardRef(({className:e,...t},o)=>jsx("th",{ref:o,className:a("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}));O.displayName="TableHead";var M=y.forwardRef(({className:e,...t},o)=>jsx("td",{ref:o,className:a("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));M.displayName="TableCell";var Ve=y.forwardRef(({className:e,...t},o)=>jsx("caption",{ref:o,className:a("mt-4 text-sm text-muted-foreground",e),...t}));Ve.displayName="TableCaption";var Ge=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{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"}},defaultVariants:{variant:"default",size:"default"}}),_=y.forwardRef(({className:e,variant:t,size:o,asChild:n=false,...f},L)=>jsx(n?Slot:"button",{className:a(Ge({variant:t,size:o,className:e})),ref:L,...f}));_.displayName="Button";var j=y.forwardRef(({className:e,type:t,...o},n)=>jsx("input",{type:t,className:a("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm 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 md:text-sm",e),ref:n,...o}));j.displayName="Input";var fe=i.Root;var Je=y.forwardRef(({className:e,children:t,...o},n)=>jsxs(i.Trigger,{ref:n,className:a("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...o,children:[t,jsx(i.Icon,{asChild:true,children:jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Je.displayName=i.Trigger.displayName;var ue=y.forwardRef(({className:e,...t},o)=>jsx(i.ScrollUpButton,{ref:o,className:a("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronUp,{className:"h-4 w-4"})}));ue.displayName=i.ScrollUpButton.displayName;var ge=y.forwardRef(({className:e,...t},o)=>jsx(i.ScrollDownButton,{ref:o,className:a("flex cursor-default items-center justify-center py-1",e),...t,children:jsx(ChevronDown,{className:"h-4 w-4"})}));ge.displayName=i.ScrollDownButton.displayName;var Ke=y.forwardRef(({className:e,children:t,position:o="popper",...n},f)=>jsx(i.Portal,{children:jsxs(i.Content,{ref:f,className:a("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...n,children:[jsx(ue,{}),jsx(i.Viewport,{className:a("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),jsx(ge,{})]})}));Ke.displayName=i.Content.displayName;var Qe=y.forwardRef(({className:e,...t},o)=>jsx(i.Label,{ref:o,className:a("px-2 py-1.5 text-sm font-semibold",e),...t}));Qe.displayName=i.Label.displayName;var Ye=y.forwardRef(({className:e,children:t,...o},n)=>jsxs(i.Item,{ref:n,className:a("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(i.ItemIndicator,{children:jsx(Check,{className:"h-4 w-4"})})}),jsx(i.ItemText,{children:t})]}));Ye.displayName=i.Item.displayName;var Ze=y.forwardRef(({className:e,...t},o)=>jsx(i.Separator,{ref:o,className:a("-mx-1 my-1 h-px bg-muted",e),...t}));Ze.displayName=i.Separator.displayName;var G=y.forwardRef(({className:e,...t},o)=>jsx(V.Root,{ref:o,className:a("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow 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:jsx(V.Indicator,{className:a("flex items-center justify-center text-current"),children:jsx(Check,{className:"h-4 w-4"})})}));G.displayName=V.Root.displayName;var be=y.forwardRef(({className:e,...t},o)=>jsx(P.Root,{ref:o,className:a("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));be.displayName=P.Root.displayName;var Re=y.forwardRef(({className:e,...t},o)=>jsx(P.Image,{ref:o,className:a("aspect-square h-full w-full",e),...t}));Re.displayName=P.Image.displayName;var ye=y.forwardRef(({className:e,...t},o)=>jsx(P.Fallback,{ref:o,className:a("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ye.displayName=P.Fallback.displayName;cva("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",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});var Ce=y.forwardRef(({className:e,sideOffset:t=4,...o},n)=>jsx(w.Portal,{children:jsx(w.Content,{ref:n,sideOffset:t,className:a("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Ce.displayName=w.Content.displayName;function at({columns:e,fetchData:t,itemsPerPageOptions:o=[10,20,50]}){let[n,f]=useState([]),[L,A]=useState(true),[v,k]=useState(1),[x,q]=useState(o[0]),[W,X]=useState(null),[H,s]=useState("asc"),[D,J]=useState({}),[z,K]=useState(new Set),[b,De]=useState(null);useEffect(()=>{Ee();},[t,v,x,W,H,D]);let Ee=async()=>{A(true);try{let r=await t({page:v,perPage:x,sortBy:W,sortOrder:H,filters:D});f(r.data),De(r.meta);}catch(r){console.error("Error fetching data:",r);}finally{A(false);}},Le=r=>{W===r?s(H==="asc"?"desc":"asc"):(X(r),s("asc"));},Ae=(r,l)=>{J(_e=>({..._e,[r]:l})),k(1);},He=r=>{let l=new Set(z);l.has(r)?l.delete(r):l.add(r),K(l);},Ie=()=>{z.size===n.length?K(new Set):K(new Set(n.map(r=>r.id)));},Me=(r,l)=>l.cell?l.cell(r[l.accessor],r):typeof l.accessor=="function"?l.accessor(r):r[l.accessor];return jsxs("div",{children:[jsxs("div",{className:"flex justify-between mb-4",children:[jsx("div",{className:"flex space-x-2",children:e.filter(r=>r.filterable).map(r=>jsx(j,{placeholder:`Filter ${r.header}`,value:D[r.accessor]||"",onChange:l=>Ae(r.accessor,l.target.value),className:"w-40"},r.accessor))}),jsx(fe,{value:x.toString(),onValueChange:r=>{q(Number(r)),k(1);},children:o.map(r=>jsxs("option",{value:r.toString(),children:[r," per page"]},r))})]}),jsxs(Q,{children:[jsx(Y,{children:jsxs(I,{children:[jsx(O,{className:"w-[50px]",children:jsx(G,{checked:z.size===n.length,onCheckedChange:Ie})}),e.map(r=>jsx(O,{className:r.sortable?"cursor-pointer":"",onClick:()=>r.sortable&&Le(r.accessor),children:jsxs("div",{className:"flex items-center",children:[r.header,r.sortable&&jsx(ArrowUpDown,{className:"ml-2 h-4 w-4"})]})},r.accessor))]})}),jsx(Z,{children:L?jsx(I,{children:jsx(M,{colSpan:e.length+1,className:"h-24 text-center",children:"Loading..."})}):n.length===0?jsx(I,{children:jsx(M,{colSpan:e.length+1,className:"h-24 text-center",children:"No results found."})}):n.map(r=>jsxs(I,{className:z.has(r.id)?"bg-muted":"",children:[jsx(M,{children:jsx(G,{checked:z.has(r.id),onCheckedChange:()=>He(r.id)})}),e.map(l=>jsx(M,{children:Me(r,l)},l.accessor))]},r.id))})]}),b&&jsxs("div",{className:"flex justify-between items-center mt-4",children:[jsxs("div",{children:["Showing ",(b.current_page-1)*b.per_page+1," to"," ",Math.min(b.current_page*b.per_page,b.total)," of ",b.total," entries"]}),jsxs("div",{className:"flex space-x-2",children:[jsx(_,{onClick:()=>k(r=>Math.max(r-1,1)),disabled:v===1,children:"Previous"}),jsx(_,{onClick:()=>k(r=>Math.min(r+1,b.last_page)),disabled:v===b.last_page,children:"Next"})]})]})]})}var it=c.Portal;var xe=y.forwardRef(({className:e,...t},o)=>jsx(c.Overlay,{ref:o,className:a("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}));xe.displayName=c.Overlay.displayName;var Te=y.forwardRef(({className:e,children:t,...o},n)=>jsxs(it,{children:[jsx(xe,{}),jsxs(c.Content,{ref:n,className:a("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 duration-200 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%] sm:rounded-lg",e),...o,children:[t,jsxs(c.Close,{className:"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",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Te.displayName=c.Content.displayName;var lt=y.forwardRef(({className:e,...t},o)=>jsx(c.Title,{ref:o,className:a("text-lg font-semibold leading-none tracking-tight",e),...t}));lt.displayName=c.Title.displayName;var mt=y.forwardRef(({className:e,...t},o)=>jsx(c.Description,{ref:o,className:a("text-sm text-muted-foreground",e),...t}));mt.displayName=c.Description.displayName;var re=y.forwardRef(({className:e,...t},o)=>jsx(Command,{ref:o,className:a("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));re.displayName=Command.displayName;var ie=y.forwardRef(({className:e,...t},o)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:o,className:a("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));ie.displayName=Command.Input.displayName;var dt=y.forwardRef(({className:e,...t},o)=>jsx(Command.List,{ref:o,className:a("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));dt.displayName=Command.List.displayName;var ne=y.forwardRef((e,t)=>jsx(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ne.displayName=Command.Empty.displayName;var se=y.forwardRef(({className:e,...t},o)=>jsx(Command.Group,{ref:o,className:a("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));se.displayName=Command.Group.displayName;var pt=y.forwardRef(({className:e,...t},o)=>jsx(Command.Separator,{ref:o,className:a("-mx-1 h-px bg-border",e),...t}));pt.displayName=Command.Separator.displayName;var le=y.forwardRef(({className:e,...t},o)=>jsx(Command.Item,{ref:o,className:a("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));le.displayName=Command.Item.displayName;var Se=g.Root,ke=g.Trigger;var me=y.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},f)=>jsx(g.Portal,{children:jsx(g.Content,{ref:f,align:t,sideOffset:o,className:a("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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})}));me.displayName=g.Content.displayName;function bt({items:e,placeholder:t,onSelect:o,multiple:n=false,searchable:f=true}){var H;let[L,A]=y.useState(false),[v,k]=y.useState([]),[x,q]=y.useState(""),W=y.useMemo(()=>!f||!x?e:e.filter(s=>s.label.toLowerCase().includes(x.toLowerCase())||s.value.toLowerCase().includes(x.toLowerCase())),[e,x,f]),X=s=>{n?k(D=>D.includes(s)?D.filter(J=>J!==s):[...D,s]):(k([s]),A(false)),o(s);};return jsxs(Se,{open:L,onOpenChange:A,children:[jsx(ke,{asChild:true,children:jsxs(_,{variant:"outline",role:"combobox","aria-expanded":L,className:"w-[200px] justify-between",children:[v.length>0?n?`${v.length} selected`:(H=e.find(s=>s.value===v[0]))==null?void 0:H.label:t,jsx(ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),jsx(me,{className:"w-[200px] p-0",children:jsxs(re,{children:[f&&jsx(ie,{placeholder:`Search ${t.toLowerCase()}...`,onValueChange:q}),jsx(ne,{children:"No item found."}),jsx(se,{children:W.map(s=>jsxs(le,{onSelect:()=>X(s.value),children:[jsx(Check,{className:a("mr-2 h-4 w-4",v.includes(s.value)?"opacity-100":"opacity-0")}),s.label]},s.value))})]})})]})}export{bt as AdvancedCombobox,at as AdvancedDataTable};//# sourceMappingURL=index.mjs.map
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../lib/utils.tsx","../src/shadcn/ui/table.tsx","../src/shadcn/ui/button.tsx","../src/shadcn/ui/input.tsx","../src/shadcn/ui/select.tsx","../src/shadcn/ui/checkbox.tsx","../src/shadcn/ui/avatar.tsx","../src/shadcn/ui/badge.tsx","../src/shadcn/ui/tooltip.tsx","../src/advanced-data-table/index.tsx","../src/shadcn/ui/dialog.tsx","../src/shadcn/ui/command.tsx","../src/shadcn/ui/popover.tsx","../src/advanced-combobox/index.tsx"],"names":["cn","inputs","twMerge","clsx","Table","className","props","ref","jsx","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","buttonVariants","cva","Button","ce","variant","size","asChild","Slot","Input","de","type","Select","SelectTrigger","T","children","jsxs","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","Check","SelectSeparator","Checkbox","ve","Avatar","U","AvatarImage","AvatarFallback","TooltipContent","he","sideOffset","AdvancedDataTable","columns","fetchData","itemsPerPageOptions","data","setData","useState","loading","setLoading","currentPage","setCurrentPage","itemsPerPage","setItemsPerPage","sortColumn","setSortColumn","sortOrder","setSortOrder","filters","setFilters","selectedRows","setSelectedRows","meta","setMeta","useEffect","loadData","result","error","handleSort","column","handleFilter","value","prev","toggleRowSelection","id","newSelectedRows","toggleAllRows","item","renderCell","e","option","ArrowUpDown","DialogPortal","DialogOverlay","F","DialogContent","X","DialogTitle","DialogDescription","Command","S","CommandPrimitive","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","Popover","PopoverTrigger","PopoverContent","Ne","align","AdvancedCombobox","items","placeholder","onSelect","multiple","searchable","_a","open","setOpen","B","setValue","search","setSearch","filteredItems","handleSelect","currentValue","v","ChevronsUpDown"],"mappings":"wmBAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CACxC,OAAOC,OAAAA,CAAQC,KAAKF,CAAM,CAAC,CAC/B,CCDA,IAAMG,EAAc,CAGlB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,IACxBC,GAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,+BAAA,CACX,QAAAA,CAAAA,GAAAA,CAAC,OACG,CAAA,CAAA,GAAA,CAAKD,EACL,SAAWP,CAAAA,CAAAA,CAAG,+BAAiCK,CAAAA,CAAS,CACvD,CAAA,GAAGC,CACR,CAAA,CAAA,CACJ,CACH,CACDF,CAAAA,CAAAA,CAAM,WAAc,CAAA,OAAA,CAEpB,IAAMK,CAAoB,CAAA,CAAA,CAAA,UAAA,CAGxB,CAAC,CAAE,UAAAJ,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,CACxBC,GAAAA,GAAAA,CAAC,OAAM,CAAA,CAAA,GAAA,CAAKD,EAAK,SAAWP,CAAAA,CAAAA,CAAG,iBAAmBK,CAAAA,CAAS,CAAI,CAAA,GAAGC,CAAO,CAAA,CAC5E,EACDG,CAAY,CAAA,WAAA,CAAc,aAE1B,CAAA,IAAMC,CAAkB,CAAA,CAAA,CAAA,UAAA,CAGtB,CAAC,CAAE,UAAAL,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,CACxBC,GAAAA,GAAAA,CAAC,OACG,CAAA,CAAA,GAAA,CAAKD,EACL,SAAWP,CAAAA,CAAAA,CAAG,4BAA8BK,CAAAA,CAAS,CACpD,CAAA,GAAGC,CACR,CAAA,CACH,EACDI,CAAU,CAAA,WAAA,CAAc,WA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,QAAA,CAAA,CAAAoB,CACG/G,EAAAA,GAAAA,CAAC8F,GAAA,CACG,WAAA,CAAa,CAAUc,OAAAA,EAAAA,CAAAA,CAAY,WAAY,EAAC,CAChD,GAAA,CAAA,CAAA,aAAA,CAAeU,EACnB,CAEJtH,CAAAA,GAAAA,CAACiG,EAAA,CAAA,CAAa,0BAAc,CAC5BjG,CAAAA,GAAAA,CAACkG,EAAA,CAAA,CACI,SAAAqB,CAAc,CAAA,GAAA,CAAKxC,CAChBxD,EAAAA,IAAAA,CAAC6E,EAAA,CAAA,CAEG,QAAU,CAAA,IAAMoB,EAAazC,CAAK,CAAA,KAAK,CAEvC,CAAA,QAAA,CAAA,CAAA/E,GAACgC,CAAAA,KAAAA,CAAA,CACG,SAAA,CAAWxC,EACP,cACAiF,CAAAA,CAAAA,CAAM,QAASM,CAAAA,CAAAA,CAAK,KAAK,CAAA,CACnB,aACA,CAAA,WACV,EACJ,CACCA,CAAAA,CAAAA,CAAK,KAXDA,CAAAA,CAAAA,CAAAA,CAAAA,CAAK,KAYd,CACH,CAAA,CACL,CACJ,CAAA,CAAA,CAAA,CACJ,GACJ,CAER","file":"index.mjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table\n ref={ref}\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n))\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n))\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n))\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.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))\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.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 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n))\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.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))\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn(\"mt-4 text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nTableCaption.displayName = \"TableCaption\"\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../../lib/utils';\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive:\n 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline:\n 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\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 },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\n","import * as React from \"react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm 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 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold\", className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.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 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\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\nimport {cn} from \"../../../lib/utils\";\n\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(\n \"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n))\nAvatar.displayName = AvatarPrimitive.Root.displayName\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn(\"aspect-square h-full w-full\", className)}\n {...props}\n />\n))\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-muted\",\n className\n )}\n {...props}\n />\n))\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst badgeVariants = cva(\n \"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\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive:\n \"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n )\n}\n\nexport { Badge, badgeVariants }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n","\"use client\"\n\nimport type React from \"react\"\nimport { useState, useEffect } from \"react\"\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from \"../shadcn/ui/table\"\nimport { Button } from \"../shadcn/ui/button\"\nimport { Input } from \"../shadcn/ui/input\"\nimport { Select } from \"../shadcn/ui/select\"\nimport { Checkbox } from \"../shadcn/ui/checkbox\"\nimport { ArrowUpDown } from \"lucide-react\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"../shadcn/ui/avatar\"\nimport { Badge } from \"../shadcn/ui/badge\"\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"../shadcn/ui/tooltip\"\n\ninterface Column<T> {\n accessor: keyof T | ((item: T) => React.ReactNode)\n header: string\n sortable?: boolean\n filterable?: boolean\n cell?: (value: any, item: T) => React.ReactNode\n}\n\ninterface AdvancedDataTableProps<T> {\n columns: Column<T>[]\n fetchData: (params: {\n page: number\n perPage: number\n sortBy?: string\n sortOrder?: \"asc\" | \"desc\"\n filters?: Record<string, string>\n }) => Promise<{\n data: T[]\n meta: {\n current_page: number\n last_page: number\n per_page: number\n total: number\n }\n }>\n itemsPerPageOptions?: number[]\n}\n\nexport function AdvancedDataTable<T extends Record<string, any>>({\n columns,\n fetchData,\n itemsPerPageOptions = [10, 20, 50],\n }: AdvancedDataTableProps<T>) {\n const [data, setData] = useState<T[]>([])\n const [loading, setLoading] = useState(true)\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(itemsPerPageOptions[0])\n const [sortColumn, setSortColumn] = useState<keyof T | null>(null)\n const [sortOrder, setSortOrder] = useState<\"asc\" | \"desc\">(\"asc\")\n const [filters, setFilters] = useState<Record<string, string>>({})\n const [selectedRows, setSelectedRows] = useState<Set<number>>(new Set())\n const [meta, setMeta] = useState<{\n current_page: number\n last_page: number\n per_page: number\n total: number\n } | null>(null)\n\n useEffect(() => {\n loadData()\n }, [fetchData, currentPage, itemsPerPage, sortColumn, sortOrder, filters]) //Fixed useEffect dependency\n\n const loadData = async () => {\n setLoading(true)\n try {\n const result = await fetchData({\n page: currentPage,\n perPage: itemsPerPage,\n sortBy: sortColumn as string,\n sortOrder,\n filters,\n })\n setData(result.data)\n setMeta(result.meta)\n } catch (error) {\n console.error(\"Error fetching data:\", error)\n } finally {\n setLoading(false)\n }\n }\n\n const handleSort = (column: keyof T) => {\n if (sortColumn === column) {\n setSortOrder(sortOrder === \"asc\" ? \"desc\" : \"asc\")\n } else {\n setSortColumn(column)\n setSortOrder(\"asc\")\n }\n }\n\n const handleFilter = (column: keyof T, value: string) => {\n setFilters((prev) => ({ ...prev, [column]: value }))\n setCurrentPage(1)\n }\n\n const toggleRowSelection = (id: number) => {\n const newSelectedRows = new Set(selectedRows)\n if (newSelectedRows.has(id)) {\n newSelectedRows.delete(id)\n } else {\n newSelectedRows.add(id)\n }\n setSelectedRows(newSelectedRows)\n }\n\n const toggleAllRows = () => {\n if (selectedRows.size === data.length) {\n setSelectedRows(new Set())\n } else {\n setSelectedRows(new Set(data.map((item) => item.id)))\n }\n }\n\n const renderCell = (item: T, column: Column<T>) => {\n if (column.cell) {\n return column.cell(item[column.accessor as keyof T], item)\n }\n if (typeof column.accessor === \"function\") {\n return column.accessor(item)\n }\n return item[column.accessor as keyof T]\n }\n\n return (\n <div>\n <div className=\"flex justify-between mb-4\">\n <div className=\"flex space-x-2\">\n {columns\n .filter((column) => column.filterable)\n .map((column) => (\n <Input\n key={column.accessor as string}\n placeholder={`Filter ${column.header}`}\n value={filters[column.accessor as string] || \"\"}\n onChange={(e) => handleFilter(column.accessor as keyof T, e.target.value)}\n className=\"w-40\"\n />\n ))}\n </div>\n <Select\n value={itemsPerPage.toString()}\n onValueChange={(value) => {\n setItemsPerPage(Number(value))\n setCurrentPage(1)\n }}\n >\n {itemsPerPageOptions.map((option) => (\n <option key={option} value={option.toString()}>\n {option} per page\n </option>\n ))}\n </Select>\n </div>\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead className=\"w-[50px]\">\n <Checkbox checked={selectedRows.size === data.length} onCheckedChange={toggleAllRows} />\n </TableHead>\n {columns.map((column) => (\n <TableHead\n key={column.accessor as string}\n className={column.sortable ? \"cursor-pointer\" : \"\"}\n onClick={() => column.sortable && handleSort(column.accessor as keyof T)}\n >\n <div className=\"flex items-center\">\n {column.header}\n {column.sortable && <ArrowUpDown className=\"ml-2 h-4 w-4\" />}\n </div>\n </TableHead>\n ))}\n </TableRow>\n </TableHeader>\n <TableBody>\n {loading ? (\n <TableRow>\n <TableCell colSpan={columns.length + 1} className=\"h-24 text-center\">\n Loading...\n </TableCell>\n </TableRow>\n ) : data.length === 0 ? (\n <TableRow>\n <TableCell colSpan={columns.length + 1} className=\"h-24 text-center\">\n No results found.\n </TableCell>\n </TableRow>\n ) : (\n data.map((item) => (\n <TableRow key={item.id} className={selectedRows.has(item.id) ? \"bg-muted\" : \"\"}>\n <TableCell>\n <Checkbox checked={selectedRows.has(item.id)} onCheckedChange={() => toggleRowSelection(item.id)} />\n </TableCell>\n {columns.map((column) => (\n <TableCell key={column.accessor as string}>{renderCell(item, column)}</TableCell>\n ))}\n </TableRow>\n ))\n )}\n </TableBody>\n </Table>\n {meta && (\n <div className=\"flex justify-between items-center mt-4\">\n <div>\n Showing {(meta.current_page - 1) * meta.per_page + 1} to{\" \"}\n {Math.min(meta.current_page * meta.per_page, meta.total)} of {meta.total} entries\n </div>\n <div className=\"flex space-x-2\">\n <Button onClick={() => setCurrentPage((prev) => Math.max(prev - 1, 1))} disabled={currentPage === 1}>\n Previous\n </Button>\n <Button\n onClick={() => setCurrentPage((prev) => Math.min(prev + 1, meta.last_page))}\n disabled={currentPage === meta.last_page}\n >\n Next\n </Button>\n </div>\n </div>\n )}\n </div>\n )\n}\n\n// Custom cell renderers\nexport const AvatarCell = ({ value }: { value: string }) => (\n <Avatar>\n <AvatarImage src={value} alt=\"Avatar\" />\n <AvatarFallback>Avatar</AvatarFallback>\n </Avatar>\n)\n\nexport const BadgeCell = ({ value }: { value: string }) => <Badge variant=\"outline\">{value}</Badge>\n\nexport const TooltipCell = ({ value, tooltip }: { value: string; tooltip: string }) => (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>{value}</TooltipTrigger>\n <TooltipContent>\n <p>{tooltip}</p>\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n)\n\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.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 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.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%] gap-4 border bg-background p-6 shadow-lg duration-200 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%] sm:rounded-lg\",\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"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\">\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 = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.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 = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport {cn} from \"../../../lib/utils\";\nimport {Dialog, DialogContent} from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport {cn} from \"../../../lib/utils\";\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n","// 'use client';\n\nimport * as React from 'react';\nimport { Check, ChevronsUpDown } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\nimport { Button } from '../shadcn/ui/button';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n} from '../shadcn/ui/command';\nimport { Popover, PopoverContent, PopoverTrigger } from '../shadcn/ui/popover';\n\ninterface ComboboxItem {\n value: string;\n label: string;\n}\n\ninterface AdvancedComboboxProps {\n items: ComboboxItem[];\n placeholder: string;\n onSelect: (value: string) => void;\n multiple?: boolean;\n searchable?: boolean;\n}\n\nexport function AdvancedCombobox({\n items,\n placeholder,\n onSelect,\n multiple = false,\n searchable = true,\n}: AdvancedComboboxProps) {\n const [open, setOpen] = React.useState(false);\n const [value, setValue] = React.useState<string[]>([]);\n const [search, setSearch] = React.useState('');\n\n const filteredItems = React.useMemo(() => {\n if (!searchable || !search) return items;\n return items.filter(\n (item) =>\n item.label.toLowerCase().includes(search.toLowerCase()) ||\n item.value.toLowerCase().includes(search.toLowerCase()),\n );\n }, [items, search, searchable]);\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n setValue((prev) => {\n if (prev.includes(currentValue)) {\n return prev.filter((v) => v !== currentValue);\n } else {\n return [...prev, currentValue];\n }\n });\n } else {\n setValue([currentValue]);\n setOpen(false);\n }\n onSelect(currentValue);\n };\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n className=\"w-[200px] justify-between\"\n >\n {value.length > 0\n ? multiple\n ? `${value.length} selected`\n : items.find((item) => item.value === value[0])\n ?.label\n : placeholder}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[200px] p-0\">\n <Command>\n {searchable && (\n <CommandInput\n placeholder={`Search ${placeholder.toLowerCase()}...`}\n onValueChange={setSearch}\n />\n )}\n <CommandEmpty>No item found.</CommandEmpty>\n <CommandGroup>\n {filteredItems.map((item) => (\n <CommandItem\n key={item.value}\n onSelect={() => handleSelect(item.value)}\n >\n <Check\n className={cn(\n 'mr-2 h-4 w-4',\n value.includes(item.value)\n ? 'opacity-100'\n : 'opacity-0',\n )}\n />\n {item.label}\n </CommandItem>\n ))}\n </CommandGroup>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dsbtek/component-library",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"homepage": "https://smartflowtech.com",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
13
|
+
"lint": "tsc",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"react": "^18.0.0",
|
|
18
|
+
"react-dom": "^18.0.0"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [],
|
|
21
|
+
"author": "Smartflowtech Team",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"description": "Advanced components built with shadcn/ui",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@radix-ui/react-avatar": "^1.1.3",
|
|
26
|
+
"@radix-ui/react-checkbox": "^1.1.4",
|
|
27
|
+
"@radix-ui/react-dialog": "^1.1.6",
|
|
28
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
29
|
+
"@radix-ui/react-popover": "^1.1.6",
|
|
30
|
+
"@radix-ui/react-select": "^2.1.6",
|
|
31
|
+
"@radix-ui/react-slot": "^1.1.2",
|
|
32
|
+
"@radix-ui/react-tooltip": "^1.1.8",
|
|
33
|
+
"class-variance-authority": "^0.7.1",
|
|
34
|
+
"clsx": "^2.1.1",
|
|
35
|
+
"cmdk": "^1.0.4",
|
|
36
|
+
"lucide-react": "^0.475.0",
|
|
37
|
+
"react": "^18.0.0",
|
|
38
|
+
"react-dom": "^18.0.0",
|
|
39
|
+
"tailwind-merge": "^3.0.1",
|
|
40
|
+
"tailwindcss": "^4.0.6",
|
|
41
|
+
"tslib": "^2.8.1"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@swc/core": "^1.10.16",
|
|
45
|
+
"@types/react": "^19.0.8",
|
|
46
|
+
"@types/react-dom": "^19.0.3",
|
|
47
|
+
"tsup": "^8.3.6",
|
|
48
|
+
"typescript": "^5.7.3"
|
|
49
|
+
},
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "https://github.com/smartflowtech-ssbu/component-library"
|
|
53
|
+
}
|
|
54
|
+
}
|