@sunggang/ui-lib 0.1.51 → 0.1.53
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/index.esm.css +248 -0
- package/index.esm.js +855 -3144
- package/package.json +6 -1
- package/src/Type/index.d.ts +19 -0
- package/src/components/ui/checkbox.d.ts +4 -0
- package/src/components/ui/dropdown-menu.d.ts +27 -0
- package/src/components/ui/input.d.ts +5 -0
- package/src/components/ui/table.d.ts +10 -0
- package/src/index.d.ts +1 -0
- package/src/lib/DataTable/Pagination.d.ts +6 -0
- package/src/lib/DataTable/fake.d.ts +68 -0
- package/src/lib/DataTable/index.d.ts +4 -0
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sunggang/ui-lib",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.53",
|
|
4
4
|
"dependencies": {
|
|
5
|
+
"@iconify/react": "^4.1.1",
|
|
6
|
+
"@radix-ui/react-checkbox": "^1.0.4",
|
|
7
|
+
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
8
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
5
9
|
"@radix-ui/react-popover": "^1.0.7",
|
|
6
10
|
"@radix-ui/react-slot": "^1.0.2",
|
|
7
11
|
"@radix-ui/react-switch": "^1.0.3",
|
|
12
|
+
"@tanstack/react-table": "^8.16.0",
|
|
8
13
|
"class-variance-authority": "^0.7.0",
|
|
9
14
|
"clsx": "^2.1.0",
|
|
10
15
|
"date-fns": "^2.29.3",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ColumnDef {
|
|
3
|
+
id: string;
|
|
4
|
+
header: React.ReactNode;
|
|
5
|
+
cell: React.ReactNode;
|
|
6
|
+
enableSorting?: boolean | undefined;
|
|
7
|
+
enableHiding?: boolean | undefined;
|
|
8
|
+
accessorKey?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface DataTableProps {
|
|
11
|
+
data: any[];
|
|
12
|
+
filterColumn: Record<string, string>;
|
|
13
|
+
columns: any;
|
|
14
|
+
searchData?: {
|
|
15
|
+
disable: boolean;
|
|
16
|
+
label: string;
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean | undefined;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
+
inset?: boolean | undefined;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
inset?: boolean | undefined;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const DropdownMenuShortcut: {
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
3
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
package/src/index.d.ts
CHANGED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare const CheckboxHeader: ({ table }: {
|
|
2
|
+
table: any;
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const CheckboxCell: ({ row }: {
|
|
5
|
+
row: any;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ButtonHeader: ({ column }: {
|
|
8
|
+
column: any;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const NameCell: ({ row }: {
|
|
11
|
+
row: any;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const AddressCell: ({ row }: {
|
|
14
|
+
row: any;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const DescriptionCell: ({ row }: {
|
|
17
|
+
row: any;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const PublishCell: ({ row }: {
|
|
20
|
+
row: any;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const ActionsCell: ({ row }: {
|
|
23
|
+
row: any;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const mappingRegionsColumn: {
|
|
26
|
+
name: string;
|
|
27
|
+
address: string;
|
|
28
|
+
description: string;
|
|
29
|
+
is_publish: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const data: {
|
|
32
|
+
name: string;
|
|
33
|
+
address: string;
|
|
34
|
+
description: string;
|
|
35
|
+
is_publish: boolean;
|
|
36
|
+
}[];
|
|
37
|
+
export declare const searchData: {
|
|
38
|
+
disable: boolean;
|
|
39
|
+
label: string;
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const columns: ({
|
|
43
|
+
accessorKey: string;
|
|
44
|
+
header: ({ column }: {
|
|
45
|
+
column: any;
|
|
46
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
cell: ({ row }: {
|
|
48
|
+
row: any;
|
|
49
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
id?: undefined;
|
|
51
|
+
enableHiding?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
accessorKey: string;
|
|
54
|
+
header: string;
|
|
55
|
+
cell: ({ row }: {
|
|
56
|
+
row: any;
|
|
57
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
id?: undefined;
|
|
59
|
+
enableHiding?: undefined;
|
|
60
|
+
} | {
|
|
61
|
+
id: string;
|
|
62
|
+
enableHiding: boolean;
|
|
63
|
+
cell: ({ row }: {
|
|
64
|
+
row: any;
|
|
65
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
accessorKey?: undefined;
|
|
67
|
+
header?: undefined;
|
|
68
|
+
})[];
|