@datacrest/dcuikit 0.1.5 → 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/build/components/Molecule/Card/Card.d.ts +1 -1
- package/build/components/Molecule/Card/const.d.ts +44 -0
- package/build/components/Molecule/Card/types.d.ts +26 -5
- package/build/components/Molecule/Dialog/index.d.ts +2 -1
- package/build/components/Molecule/Message/index.d.ts +4 -4
- package/build/components/Molecule/ProfileCard/ProfileCard.stories.d.ts +4 -0
- package/build/components/Molecule/ProfileCard/types.d.ts +5 -1
- package/build/components/Molecule/Table/Table.d.ts +2 -2
- package/build/components/Molecule/Table/Table.stories.d.ts +14 -3
- package/build/components/Molecule/Table/Table.types.d.ts +37 -5
- package/build/components/Molecule/Table/TableCell.d.ts +4 -0
- package/build/components/Molecule/Table/TableColumn.d.ts +48 -0
- package/build/components/Molecule/Table/TableHeader.d.ts +29 -0
- package/build/components/Molecule/Table/const.d.ts +16 -0
- package/build/components/Molecule/Table/index.d.ts +5 -2
- package/build/components/Molecule/Table/utils.d.ts +23 -0
- package/build/components/ui/TruncatedText.d.ts +7 -0
- package/build/hooks/useTruncatedText.d.ts +5 -0
- package/build/index.css +1 -1
- package/build/index.esm.css +1 -1
- package/build/index.esm.js +8 -8
- package/build/index.esm.js.map +1 -1
- package/build/index.js +7 -7
- package/build/index.js.map +1 -1
- package/build/tsconfig.prod.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardProps } from './types';
|
|
3
3
|
declare const Card: {
|
|
4
|
-
({ title, description, variant, size, image, footer,
|
|
4
|
+
({ title, description, children, variant, size, shadow, hoverEffect, borderRadius, image, imagePosition, imageHeight, badge, badgePosition, footer, header, padding, spacing, width, height, maxWidth, className, contentClassName, titleClassName, descriptionClassName, imageClassName, onClick, href, interactive, disabled, }: CardProps): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
7
7
|
export default Card;
|
|
@@ -5,18 +5,62 @@ export declare const CARD_SIZES: {
|
|
|
5
5
|
readonly titleSize: "text-base sm:text-lg";
|
|
6
6
|
readonly descSize: "text-sm sm:text-base";
|
|
7
7
|
readonly imageHeight: "h-24 sm:h-32 md:h-36";
|
|
8
|
+
readonly spacing: "space-y-2";
|
|
8
9
|
};
|
|
9
10
|
readonly medium: {
|
|
10
11
|
readonly padding: "p-4 sm:p-5 md:p-6";
|
|
11
12
|
readonly titleSize: "text-lg sm:text-xl md:text-2xl";
|
|
12
13
|
readonly descSize: "text-sm sm:text-base md:text-lg";
|
|
13
14
|
readonly imageHeight: "h-32 sm:h-40 md:h-48 lg:h-56";
|
|
15
|
+
readonly spacing: "space-y-3";
|
|
14
16
|
};
|
|
15
17
|
readonly large: {
|
|
16
18
|
readonly padding: "p-5 sm:p-6 md:p-7 lg:p-8";
|
|
17
19
|
readonly titleSize: "text-xl sm:text-2xl md:text-3xl";
|
|
18
20
|
readonly descSize: "text-base sm:text-lg md:text-xl";
|
|
19
21
|
readonly imageHeight: "h-40 sm:h-48 md:h-56 lg:h-64";
|
|
22
|
+
readonly spacing: "space-y-4";
|
|
20
23
|
};
|
|
24
|
+
readonly custom: {
|
|
25
|
+
readonly padding: "";
|
|
26
|
+
readonly titleSize: "text-lg";
|
|
27
|
+
readonly descSize: "text-base";
|
|
28
|
+
readonly imageHeight: "";
|
|
29
|
+
readonly spacing: "space-y-3";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const CARD_SPACING: {
|
|
33
|
+
readonly none: "";
|
|
34
|
+
readonly sm: "space-y-2";
|
|
35
|
+
readonly md: "space-y-3";
|
|
36
|
+
readonly lg: "space-y-4";
|
|
37
|
+
};
|
|
38
|
+
export declare const CARD_SHADOWS: {
|
|
39
|
+
readonly none: "";
|
|
40
|
+
readonly sm: "shadow-sm";
|
|
41
|
+
readonly md: "shadow";
|
|
42
|
+
readonly lg: "shadow-md";
|
|
43
|
+
readonly xl: "shadow-lg";
|
|
44
|
+
};
|
|
45
|
+
export declare const CARD_HOVER_EFFECTS: {
|
|
46
|
+
readonly none: "";
|
|
47
|
+
readonly lift: "transition-transform duration-300 hover:-translate-y-1";
|
|
48
|
+
readonly glow: "transition-shadow duration-300 hover:shadow-glow";
|
|
49
|
+
readonly scale: "transition-transform duration-300 hover:scale-[1.02]";
|
|
50
|
+
readonly border: "transition-colors duration-300 hover:border-primary";
|
|
51
|
+
};
|
|
52
|
+
export declare const CARD_BORDER_RADIUS: {
|
|
53
|
+
readonly none: "rounded-none";
|
|
54
|
+
readonly sm: "rounded";
|
|
55
|
+
readonly md: "rounded-lg";
|
|
56
|
+
readonly lg: "rounded-xl";
|
|
57
|
+
readonly xl: "rounded-2xl";
|
|
58
|
+
readonly full: "rounded-3xl";
|
|
59
|
+
};
|
|
60
|
+
export declare const BADGE_POSITIONS: {
|
|
61
|
+
readonly 'top-right': "absolute right-4 top-4 z-10";
|
|
62
|
+
readonly 'top-left': "absolute left-4 top-4 z-10";
|
|
63
|
+
readonly 'bottom-right': "absolute right-4 bottom-4 z-10";
|
|
64
|
+
readonly 'bottom-left': "absolute left-4 bottom-4 z-10";
|
|
21
65
|
};
|
|
22
66
|
export declare const CARD_VARIANTS: Record<CardVariant, VariantStyles>;
|
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export type CardVariant = 'default' | 'gradiant';
|
|
3
|
-
export type CardSize = 'small' | 'medium' | 'large';
|
|
2
|
+
export type CardVariant = 'default' | 'gradiant' | 'outline' | 'solid' | 'glass';
|
|
3
|
+
export type CardSize = 'small' | 'medium' | 'large' | 'custom';
|
|
4
|
+
export type CardShadow = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
export type HoverEffect = 'none' | 'lift' | 'glow' | 'scale' | 'border';
|
|
6
|
+
export type BorderRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
7
|
export interface CardProps {
|
|
5
8
|
title?: string;
|
|
6
9
|
description?: string;
|
|
10
|
+
children?: ReactNode;
|
|
7
11
|
variant?: CardVariant;
|
|
8
12
|
size?: CardSize;
|
|
13
|
+
shadow?: CardShadow;
|
|
14
|
+
hoverEffect?: HoverEffect;
|
|
15
|
+
borderRadius?: BorderRadius;
|
|
9
16
|
image?: string;
|
|
17
|
+
imagePosition?: 'top' | 'background';
|
|
18
|
+
imageHeight?: string;
|
|
19
|
+
badge?: string | ReactNode;
|
|
20
|
+
badgePosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
10
21
|
footer?: ReactNode;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
header?: ReactNode;
|
|
23
|
+
padding?: string;
|
|
24
|
+
spacing?: 'none' | 'sm' | 'md' | 'lg';
|
|
14
25
|
width?: string | number;
|
|
15
26
|
height?: string | number;
|
|
27
|
+
maxWidth?: string | number;
|
|
28
|
+
className?: string;
|
|
29
|
+
contentClassName?: string;
|
|
30
|
+
titleClassName?: string;
|
|
31
|
+
descriptionClassName?: string;
|
|
32
|
+
imageClassName?: string;
|
|
33
|
+
onClick?: () => void;
|
|
34
|
+
href?: string;
|
|
35
|
+
interactive?: boolean;
|
|
36
|
+
disabled?: boolean;
|
|
16
37
|
}
|
|
17
38
|
interface BaseVariantStyles {
|
|
18
39
|
kind: CardVariant;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export type {
|
|
1
|
+
import { MessagePosition, MessageProps, MessageVariants } from './Message.types';
|
|
2
|
+
import { message, MessageOptions } from './MessageManager';
|
|
3
|
+
export { message, MessageVariants, MessagePosition };
|
|
4
|
+
export type { MessageProps, MessageOptions };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { PROFILE_CARD_SIZES } from './const';
|
|
2
3
|
export interface DropdownItem {
|
|
3
4
|
name: string;
|
|
4
5
|
icon?: ReactNode;
|
|
5
6
|
link?: string;
|
|
6
7
|
isDisabled?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
7
9
|
}
|
|
8
10
|
export interface ProfileCardProps {
|
|
9
11
|
avatarUrl: string;
|
|
@@ -11,6 +13,8 @@ export interface ProfileCardProps {
|
|
|
11
13
|
email?: string;
|
|
12
14
|
position?: string;
|
|
13
15
|
dropdownItems?: DropdownItem[];
|
|
14
|
-
size?:
|
|
16
|
+
size?: (typeof PROFILE_CARD_SIZES)[keyof typeof PROFILE_CARD_SIZES];
|
|
15
17
|
className?: string;
|
|
18
|
+
isDropdownOpen?: boolean;
|
|
19
|
+
onToggleDropdown?: () => void;
|
|
16
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { JSX } from 'react';
|
|
2
2
|
import { TableProps } from './Table.types';
|
|
3
|
-
declare const Table:
|
|
3
|
+
declare const Table: <T extends Record<string, unknown>>({ columns, data, sortable, pagination, searchable, currentPage, pageSize, onSort, onPageChange, actions, showCustomCells, useBuiltInStatus, swapPaginationLayout, }: TableProps<T>) => JSX.Element;
|
|
4
4
|
export default Table;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { PAGE_SIZES } from './const';
|
|
3
3
|
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
|
-
|
|
5
|
+
interface TableStoryProps {
|
|
6
|
+
sortable: boolean;
|
|
7
|
+
pagination: boolean;
|
|
8
|
+
searchable: boolean;
|
|
9
|
+
currentPage: number;
|
|
10
|
+
pageSize: (typeof PAGE_SIZES)[number];
|
|
11
|
+
showCustomCells: boolean;
|
|
12
|
+
showActions: boolean;
|
|
13
|
+
useBuiltInStatus: boolean;
|
|
14
|
+
swapPaginationLayout: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const Table: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, TableStoryProps>;
|
|
@@ -1,19 +1,47 @@
|
|
|
1
|
+
import { FilterFn } from '@tanstack/react-table';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
1
3
|
export declare enum TableColumnAlign {
|
|
2
4
|
Left = "left",
|
|
3
5
|
Center = "center",
|
|
4
6
|
Right = "right"
|
|
5
7
|
}
|
|
6
|
-
export
|
|
8
|
+
export declare enum PaginationPosition {
|
|
9
|
+
Left = "left",
|
|
10
|
+
Right = "right",
|
|
11
|
+
Center = "center"
|
|
12
|
+
}
|
|
13
|
+
export type PageSizeOptions = 5 | 10 | 20 | 50;
|
|
14
|
+
export declare enum CellType {
|
|
15
|
+
Text = "text",
|
|
16
|
+
Date = "date",
|
|
17
|
+
Status = "status",
|
|
18
|
+
Custom = "custom"
|
|
19
|
+
}
|
|
20
|
+
export interface DateFormat {
|
|
21
|
+
input?: string;
|
|
22
|
+
output: string;
|
|
23
|
+
}
|
|
24
|
+
export interface TableColumn<T extends Record<string, unknown>> {
|
|
7
25
|
key: string;
|
|
8
26
|
title: string;
|
|
9
27
|
width?: string;
|
|
10
28
|
sortable?: boolean;
|
|
11
29
|
align?: TableColumnAlign;
|
|
30
|
+
type?: CellType | string;
|
|
31
|
+
dateFormat?: DateFormat;
|
|
32
|
+
filterFn?: FilterFn<T>;
|
|
33
|
+
customCell?: (value: unknown, row: T) => ReactNode;
|
|
34
|
+
customHeader?: (column: ColumnInfo<T>) => ReactNode;
|
|
12
35
|
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
36
|
+
export interface ColumnInfo<T> {
|
|
37
|
+
toggleSorting: (desc?: boolean) => void;
|
|
38
|
+
getIsSorted: () => false | 'asc' | 'desc';
|
|
39
|
+
key: string;
|
|
40
|
+
data: T[];
|
|
41
|
+
}
|
|
42
|
+
export interface TableProps<T extends Record<string, unknown>> {
|
|
43
|
+
columns: TableColumn<T>[];
|
|
44
|
+
data: T[];
|
|
17
45
|
sortable?: boolean;
|
|
18
46
|
pagination?: boolean;
|
|
19
47
|
searchable?: boolean;
|
|
@@ -21,4 +49,8 @@ export interface TableProps {
|
|
|
21
49
|
pageSize?: PageSizeOptions;
|
|
22
50
|
onSort?: (key: string, direction: 'asc' | 'desc') => void;
|
|
23
51
|
onPageChange?: (page: number) => void;
|
|
52
|
+
actions?: (row: T) => ReactNode;
|
|
53
|
+
showCustomCells?: boolean;
|
|
54
|
+
useBuiltInStatus?: boolean;
|
|
55
|
+
swapPaginationLayout?: boolean;
|
|
24
56
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableColumn } from './Table.types';
|
|
3
|
+
declare const TableCell: <T extends Record<string, unknown>>(column: TableColumn<T>, row: T, showCustomCells: boolean, useBuiltInStatus: boolean) => React.JSX.Element | null;
|
|
4
|
+
export default TableCell;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableColumn as TableColumnType, TableColumnAlign } from './Table.types';
|
|
3
|
+
import { PersonData } from './const';
|
|
4
|
+
export declare const createTextColumn: <T extends Record<string, unknown>>(key: string, title: string, options?: {
|
|
5
|
+
width?: string;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
align?: TableColumnAlign;
|
|
8
|
+
customCell?: (value: unknown, row: T) => React.ReactNode;
|
|
9
|
+
}) => TableColumnType<T>;
|
|
10
|
+
export declare const createDateColumn: <T extends Record<string, unknown>>(key: string, title: string, options?: {
|
|
11
|
+
width?: string;
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
align?: TableColumnAlign;
|
|
14
|
+
inputFormat?: string;
|
|
15
|
+
outputFormat?: string;
|
|
16
|
+
customCell?: (value: unknown, row: T) => React.ReactNode;
|
|
17
|
+
}) => TableColumnType<T>;
|
|
18
|
+
export declare const createStatusColumn: <T extends Record<string, unknown>>(key: string, title: string, options?: {
|
|
19
|
+
width?: string;
|
|
20
|
+
sortable?: boolean;
|
|
21
|
+
align?: TableColumnAlign;
|
|
22
|
+
customCell?: (value: unknown, row: T) => React.ReactNode;
|
|
23
|
+
}) => TableColumnType<T>;
|
|
24
|
+
export declare const createPersonDataColumns: (showCustomCells: boolean) => TableColumnType<PersonData>[];
|
|
25
|
+
declare const TableColumn: {
|
|
26
|
+
createTextColumn: <T extends Record<string, unknown>>(key: string, title: string, options?: {
|
|
27
|
+
width?: string;
|
|
28
|
+
sortable?: boolean;
|
|
29
|
+
align?: TableColumnAlign;
|
|
30
|
+
customCell?: (value: unknown, row: T) => React.ReactNode;
|
|
31
|
+
}) => TableColumnType<T>;
|
|
32
|
+
createDateColumn: <T extends Record<string, unknown>>(key: string, title: string, options?: {
|
|
33
|
+
width?: string;
|
|
34
|
+
sortable?: boolean;
|
|
35
|
+
align?: TableColumnAlign;
|
|
36
|
+
inputFormat?: string;
|
|
37
|
+
outputFormat?: string;
|
|
38
|
+
customCell?: (value: unknown, row: T) => React.ReactNode;
|
|
39
|
+
}) => TableColumnType<T>;
|
|
40
|
+
createStatusColumn: <T extends Record<string, unknown>>(key: string, title: string, options?: {
|
|
41
|
+
width?: string;
|
|
42
|
+
sortable?: boolean;
|
|
43
|
+
align?: TableColumnAlign;
|
|
44
|
+
customCell?: (value: unknown, row: T) => React.ReactNode;
|
|
45
|
+
}) => TableColumnType<T>;
|
|
46
|
+
createPersonDataColumns: (showCustomCells: boolean) => TableColumnType<PersonData>[];
|
|
47
|
+
};
|
|
48
|
+
export default TableColumn;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableColumn, ColumnInfo } from './Table.types';
|
|
3
|
+
export declare const renderSortIcon: <T extends Record<string, unknown>>(column: TableColumn<T>, sortConfig: {
|
|
4
|
+
key: string;
|
|
5
|
+
direction: "asc" | "desc";
|
|
6
|
+
} | null) => React.JSX.Element;
|
|
7
|
+
export declare const renderHeader: <T extends Record<string, unknown>>(column: TableColumn<T>, columnInfoFn: (key: string) => ColumnInfo<T>, handleSort: (column: TableColumn<T>) => void, sortable: boolean, sortConfig: {
|
|
8
|
+
key: string;
|
|
9
|
+
direction: "asc" | "desc";
|
|
10
|
+
} | null) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
11
|
+
export declare const renderTableHeader: <T extends Record<string, unknown>>(column: TableColumn<T>, getColumnInfo: (key: string) => ColumnInfo<T>, handleSort: (column: TableColumn<T>) => void, sortable: boolean, sortConfig: {
|
|
12
|
+
key: string;
|
|
13
|
+
direction: "asc" | "desc";
|
|
14
|
+
} | null) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
15
|
+
declare const TableHeader: {
|
|
16
|
+
renderSortIcon: <T extends Record<string, unknown>>(column: TableColumn<T>, sortConfig: {
|
|
17
|
+
key: string;
|
|
18
|
+
direction: "asc" | "desc";
|
|
19
|
+
} | null) => React.JSX.Element;
|
|
20
|
+
renderHeader: <T extends Record<string, unknown>>(column: TableColumn<T>, columnInfoFn: (key: string) => ColumnInfo<T>, handleSort: (column: TableColumn<T>) => void, sortable: boolean, sortConfig: {
|
|
21
|
+
key: string;
|
|
22
|
+
direction: "asc" | "desc";
|
|
23
|
+
} | null) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
24
|
+
renderTableHeader: <T extends Record<string, unknown>>(column: TableColumn<T>, getColumnInfo: (key: string) => ColumnInfo<T>, handleSort: (column: TableColumn<T>) => void, sortable: boolean, sortConfig: {
|
|
25
|
+
key: string;
|
|
26
|
+
direction: "asc" | "desc";
|
|
27
|
+
} | null) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
28
|
+
};
|
|
29
|
+
export default TableHeader;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface PersonData extends Record<string, unknown> {
|
|
2
|
+
name?: string;
|
|
3
|
+
email?: string;
|
|
4
|
+
joinDate?: string;
|
|
5
|
+
status?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const SAMPLE_DATA: PersonData[];
|
|
8
|
+
export declare const PAGE_SIZES: readonly [5, 10, 20, 50];
|
|
9
|
+
export declare const STATUS_COLOR_MAP: Record<string, string>;
|
|
10
|
+
export declare const DEFAULT_COLUMN_CONFIG: {
|
|
11
|
+
NAME_KEY: string;
|
|
12
|
+
NAME_WIDTH: string;
|
|
13
|
+
EMAIL_KEY: string;
|
|
14
|
+
JOIN_DATE_KEY: string;
|
|
15
|
+
STATUS_KEY: string;
|
|
16
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import Table from './Table';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import TableCell from './TableCell';
|
|
3
|
+
import TableColumn, { createTextColumn, createDateColumn, createStatusColumn } from './TableColumn';
|
|
4
|
+
import TableHeader, { renderSortIcon, renderHeader, renderTableHeader } from './TableHeader';
|
|
5
|
+
export { Table, TableCell, TableColumn, TableHeader, renderSortIcon, renderHeader, renderTableHeader, createTextColumn, createDateColumn, createStatusColumn, };
|
|
6
|
+
export * from './Table.types';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TableColumn, TableColumnAlign, ColumnInfo, PaginationPosition } from './Table.types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const getFlexAlignment: (align?: TableColumnAlign) => string;
|
|
4
|
+
export declare const columnInfo: <T extends Record<string, unknown>>(key: string, columns: TableColumn<T>[], onSort: ((key: string, direction: "asc" | "desc") => void) | undefined, paginatedData: T[], sortConfig: {
|
|
5
|
+
key: string;
|
|
6
|
+
direction: "asc" | "desc";
|
|
7
|
+
} | null, setSortConfig: React.Dispatch<React.SetStateAction<{
|
|
8
|
+
key: string;
|
|
9
|
+
direction: "asc" | "desc";
|
|
10
|
+
} | null>>) => ColumnInfo<T>;
|
|
11
|
+
export declare const getColumnInfo: <T extends Record<string, unknown>>(key: string, columns: TableColumn<T>[], onSort: ((key: string, direction: "asc" | "desc") => void) | undefined, paginatedData: T[], sortConfig: {
|
|
12
|
+
key: string;
|
|
13
|
+
direction: "asc" | "desc";
|
|
14
|
+
} | null, setSortConfig: React.Dispatch<React.SetStateAction<{
|
|
15
|
+
key: string;
|
|
16
|
+
direction: "asc" | "desc";
|
|
17
|
+
} | null>>) => ColumnInfo<T>;
|
|
18
|
+
export declare const getShowingEntriesPositionClass: (showingEntriesPosition: PaginationPosition) => "ml-auto order-2" | "mx-auto" | "order-1";
|
|
19
|
+
export declare const getPaginationContainerClass: (paginationPosition: PaginationPosition) => "ml-auto order-2" | "mx-auto" | "order-1";
|
|
20
|
+
export declare const getEffectivePositions: (swapPaginationLayout?: boolean) => {
|
|
21
|
+
effectivePaginationPosition: PaginationPosition;
|
|
22
|
+
effectiveEntriesPosition: PaginationPosition;
|
|
23
|
+
};
|