@itilite/lumina-ui 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Table-BfGn3Pa0.d.mts +82 -0
- package/dist/Table-BfGn3Pa0.d.ts +82 -0
- package/dist/Table-CnzP9dkc.d.mts +82 -0
- package/dist/Table-CnzP9dkc.d.ts +82 -0
- package/dist/Table-DmfNNnuD.d.mts +86 -0
- package/dist/Table-DmfNNnuD.d.ts +86 -0
- package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.js +3 -2
- package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.mjs +2 -2
- package/dist/atom/Table/Table.d.mts +1 -1
- package/dist/atom/Table/Table.d.ts +1 -1
- package/dist/atom/Table/Table.js +2 -2
- package/dist/atom/Table/Table.mjs +1 -1
- package/dist/chunk-5OUMKJWI.mjs +301 -0
- package/dist/chunk-5PMUTA6S.mjs +303 -0
- package/dist/chunk-GOIABK2Y.mjs +283 -0
- package/dist/chunk-QQA7KWAJ.mjs +477 -0
- package/dist/chunk-T43CWNOG.mjs +283 -0
- package/dist/chunk-TE5EOIIW.mjs +301 -0
- package/dist/chunk-Z3N4E2C5.mjs +477 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -4
- package/dist/index.mjs +12 -12
- package/dist/styles.css +213 -168
- package/package.json +1 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableProps as TableProps$1, TablePaginationConfig } from 'antd';
|
|
3
|
+
|
|
4
|
+
type SortOrder = "ascend" | "descend" | undefined;
|
|
5
|
+
type AntColumnType<RecordType> = NonNullable<TableProps$1<RecordType>["columns"]>[number];
|
|
6
|
+
interface LuminaColumnHeaderProps {
|
|
7
|
+
/** Clicking cycles: undefined → ascend → descend → undefined */
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
/** Provide to make sort controlled. */
|
|
10
|
+
sortOrder?: SortOrder;
|
|
11
|
+
onSortChange?: (order: SortOrder) => void;
|
|
12
|
+
/** Sort icon to render. Must be provided if sortable is true. */
|
|
13
|
+
sortIcon?: React.ReactNode;
|
|
14
|
+
/** > 0 turns the filter icon red and shows a count badge. */
|
|
15
|
+
filterCount?: number;
|
|
16
|
+
/** MUST be provided if filterContent is present, otherwise no icon renders. */
|
|
17
|
+
filterIcon?: React.ReactNode;
|
|
18
|
+
/** Renders a filter icon button; clicking it toggles visibility of this content. */
|
|
19
|
+
filterContent?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
|
|
23
|
+
headerProps?: LuminaColumnHeaderProps;
|
|
24
|
+
};
|
|
25
|
+
type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
|
|
26
|
+
interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
|
|
27
|
+
/** `selectable` — clicking any row toggles its checkbox */
|
|
28
|
+
variant?: "default" | "selectable";
|
|
29
|
+
isAccordion?: boolean;
|
|
30
|
+
isToolbar?: boolean;
|
|
31
|
+
size?: "small" | "middle" | "large";
|
|
32
|
+
className?: string;
|
|
33
|
+
pagination?: TablePaginationConfig | boolean;
|
|
34
|
+
/** Add `headerProps` to any column to enable sort/filter icons. */
|
|
35
|
+
columns?: LuminaColumnsType<RecordType>;
|
|
36
|
+
/** Total items for server-side pagination. */
|
|
37
|
+
total?: number;
|
|
38
|
+
/** Current page number (1-indexed). */
|
|
39
|
+
current?: number;
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
onPaginationChange?: TablePaginationConfig["onChange"];
|
|
42
|
+
emptyState?: React.ReactNode;
|
|
43
|
+
hideHeader?: boolean;
|
|
44
|
+
loadingIndicator?: React.ReactElement;
|
|
45
|
+
/** Extra class applied to header cells (th). */
|
|
46
|
+
headerCellClassName?: string;
|
|
47
|
+
/** Extra class applied to body cells (td). */
|
|
48
|
+
bodyCellClassName?: string;
|
|
49
|
+
/** Can be a string or a per-row function. */
|
|
50
|
+
rowClassName?: string | ((record: RecordType, index: number) => string);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Lumina Table component.
|
|
55
|
+
*
|
|
56
|
+
* Variants:
|
|
57
|
+
* - `default` – standard table
|
|
58
|
+
* - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
|
|
59
|
+
*
|
|
60
|
+
* Use `isAccordion` / `isToolbar` to strip outer chrome when embedded.
|
|
61
|
+
* Row hover tint is enabled by default via styles.
|
|
62
|
+
*
|
|
63
|
+
* Column header icons — add `headerProps` to any column definition:
|
|
64
|
+
* ```tsx
|
|
65
|
+
* columns={[{
|
|
66
|
+
* key: "name", dataIndex: "name", title: "Name",
|
|
67
|
+
* headerProps: {
|
|
68
|
+
* sortable: true,
|
|
69
|
+
* sortOrder: sortOrders.name,
|
|
70
|
+
* onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
|
|
71
|
+
* filterCount: activeFilters.name ?? 0,
|
|
72
|
+
* filterContent: <MyFilterPanel />,
|
|
73
|
+
* },
|
|
74
|
+
* }]}
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
|
|
78
|
+
declare namespace Table {
|
|
79
|
+
var displayName: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableProps as TableProps$1, TablePaginationConfig } from 'antd';
|
|
3
|
+
|
|
4
|
+
type SortOrder = "ascend" | "descend" | undefined;
|
|
5
|
+
type AntColumnType<RecordType> = NonNullable<TableProps$1<RecordType>["columns"]>[number];
|
|
6
|
+
interface LuminaColumnHeaderProps {
|
|
7
|
+
/** Clicking cycles: undefined → ascend → descend → undefined */
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
/** Provide to make sort controlled. */
|
|
10
|
+
sortOrder?: SortOrder;
|
|
11
|
+
onSortChange?: (order: SortOrder) => void;
|
|
12
|
+
/** Sort icon to render. Must be provided if sortable is true. */
|
|
13
|
+
sortIcon?: React.ReactNode;
|
|
14
|
+
/** > 0 turns the filter icon red and shows a count badge. */
|
|
15
|
+
filterCount?: number;
|
|
16
|
+
/** MUST be provided if filterContent is present, otherwise no icon renders. */
|
|
17
|
+
filterIcon?: React.ReactNode;
|
|
18
|
+
/** Renders a filter icon button; clicking it toggles visibility of this content. */
|
|
19
|
+
filterContent?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
|
|
23
|
+
headerProps?: LuminaColumnHeaderProps;
|
|
24
|
+
};
|
|
25
|
+
type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
|
|
26
|
+
interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
|
|
27
|
+
/** `selectable` — clicking any row toggles its checkbox */
|
|
28
|
+
variant?: "default" | "selectable";
|
|
29
|
+
isAccordion?: boolean;
|
|
30
|
+
isToolbar?: boolean;
|
|
31
|
+
size?: "small" | "middle" | "large";
|
|
32
|
+
className?: string;
|
|
33
|
+
pagination?: TablePaginationConfig | boolean;
|
|
34
|
+
/** Add `headerProps` to any column to enable sort/filter icons. */
|
|
35
|
+
columns?: LuminaColumnsType<RecordType>;
|
|
36
|
+
/** Total items for server-side pagination. */
|
|
37
|
+
total?: number;
|
|
38
|
+
/** Current page number (1-indexed). */
|
|
39
|
+
current?: number;
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
onPaginationChange?: TablePaginationConfig["onChange"];
|
|
42
|
+
emptyState?: React.ReactNode;
|
|
43
|
+
hideHeader?: boolean;
|
|
44
|
+
loadingIndicator?: React.ReactElement;
|
|
45
|
+
/** Extra class applied to header cells (th). */
|
|
46
|
+
headerCellClassName?: string;
|
|
47
|
+
/** Extra class applied to body cells (td). */
|
|
48
|
+
bodyCellClassName?: string;
|
|
49
|
+
/** Can be a string or a per-row function. */
|
|
50
|
+
rowClassName?: string | ((record: RecordType, index: number) => string);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Lumina Table component.
|
|
55
|
+
*
|
|
56
|
+
* Variants:
|
|
57
|
+
* - `default` – standard table
|
|
58
|
+
* - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
|
|
59
|
+
*
|
|
60
|
+
* Use `isAccordion` / `isToolbar` to strip outer chrome when embedded.
|
|
61
|
+
* Row hover tint is enabled by default via styles.
|
|
62
|
+
*
|
|
63
|
+
* Column header icons — add `headerProps` to any column definition:
|
|
64
|
+
* ```tsx
|
|
65
|
+
* columns={[{
|
|
66
|
+
* key: "name", dataIndex: "name", title: "Name",
|
|
67
|
+
* headerProps: {
|
|
68
|
+
* sortable: true,
|
|
69
|
+
* sortOrder: sortOrders.name,
|
|
70
|
+
* onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
|
|
71
|
+
* filterCount: activeFilters.name ?? 0,
|
|
72
|
+
* filterContent: <MyFilterPanel />,
|
|
73
|
+
* },
|
|
74
|
+
* }]}
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
|
|
78
|
+
declare namespace Table {
|
|
79
|
+
var displayName: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableProps as TableProps$1, TablePaginationConfig } from 'antd';
|
|
3
|
+
|
|
4
|
+
type SortOrder = "ascend" | "descend" | undefined;
|
|
5
|
+
type AntColumnType<RecordType> = NonNullable<TableProps$1<RecordType>["columns"]>[number];
|
|
6
|
+
interface LuminaColumnHeaderProps {
|
|
7
|
+
/** Clicking cycles: undefined → ascend → descend → undefined */
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
/** Provide to make sort controlled. */
|
|
10
|
+
sortOrder?: SortOrder;
|
|
11
|
+
onSortChange?: (order: SortOrder) => void;
|
|
12
|
+
/** If not provided, dynamic default/up/down sort icons will render. */
|
|
13
|
+
sortIcon?: React.ReactNode;
|
|
14
|
+
/** > 0 turns the filter icon red and shows a count badge. */
|
|
15
|
+
filterCount?: number;
|
|
16
|
+
/** MUST be provided if filterContent is present, otherwise no icon renders. */
|
|
17
|
+
filterIcon?: React.ReactNode;
|
|
18
|
+
/** Renders a filter icon button; clicking it toggles visibility of this content. */
|
|
19
|
+
filterContent?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
|
|
23
|
+
headerProps?: LuminaColumnHeaderProps;
|
|
24
|
+
};
|
|
25
|
+
type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
|
|
26
|
+
interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
|
|
27
|
+
/** `selectable` — clicking any row toggles its checkbox */
|
|
28
|
+
variant?: "default" | "selectable";
|
|
29
|
+
isAccordion?: boolean;
|
|
30
|
+
isToolbar?: boolean;
|
|
31
|
+
size?: "small" | "middle" | "large";
|
|
32
|
+
className?: string;
|
|
33
|
+
pagination?: TablePaginationConfig | boolean;
|
|
34
|
+
/** Add `headerProps` to any column to enable sort/filter icons. */
|
|
35
|
+
columns?: LuminaColumnsType<RecordType>;
|
|
36
|
+
/** Total items for server-side pagination. */
|
|
37
|
+
total?: number;
|
|
38
|
+
/** Current page number (1-indexed). */
|
|
39
|
+
current?: number;
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
onPaginationChange?: TablePaginationConfig["onChange"];
|
|
42
|
+
emptyState?: React.ReactNode;
|
|
43
|
+
hideHeader?: boolean;
|
|
44
|
+
loadingIndicator?: React.ReactElement;
|
|
45
|
+
/** Extra class applied to header cells (th). */
|
|
46
|
+
headerCellClassName?: string;
|
|
47
|
+
/** Extra class applied to body cells (td). */
|
|
48
|
+
bodyCellClassName?: string;
|
|
49
|
+
/** Can be a string or a per-row function. */
|
|
50
|
+
rowClassName?: string | ((record: RecordType, index: number) => string);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Lumina Table component.
|
|
55
|
+
*
|
|
56
|
+
* Variants:
|
|
57
|
+
* - `default` – standard table
|
|
58
|
+
* - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
|
|
59
|
+
*
|
|
60
|
+
* Use `isAccordion` / `isToolbar` to strip outer chrome when embedded.
|
|
61
|
+
* Row hover tint is enabled by default via styles.
|
|
62
|
+
*
|
|
63
|
+
* Column header icons — add `headerProps` to any column definition:
|
|
64
|
+
* ```tsx
|
|
65
|
+
* columns={[{
|
|
66
|
+
* key: "name", dataIndex: "name", title: "Name",
|
|
67
|
+
* headerProps: {
|
|
68
|
+
* sortable: true,
|
|
69
|
+
* sortOrder: sortOrders.name,
|
|
70
|
+
* onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
|
|
71
|
+
* filterCount: activeFilters.name ?? 0,
|
|
72
|
+
* filterContent: <MyFilterPanel />,
|
|
73
|
+
* },
|
|
74
|
+
* }]}
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
|
|
78
|
+
declare namespace Table {
|
|
79
|
+
var displayName: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableProps as TableProps$1, TablePaginationConfig } from 'antd';
|
|
3
|
+
|
|
4
|
+
type SortOrder = "ascend" | "descend" | undefined;
|
|
5
|
+
type AntColumnType<RecordType> = NonNullable<TableProps$1<RecordType>["columns"]>[number];
|
|
6
|
+
interface LuminaColumnHeaderProps {
|
|
7
|
+
/** Clicking cycles: undefined → ascend → descend → undefined */
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
/** Provide to make sort controlled. */
|
|
10
|
+
sortOrder?: SortOrder;
|
|
11
|
+
onSortChange?: (order: SortOrder) => void;
|
|
12
|
+
/** If not provided, dynamic default/up/down sort icons will render. */
|
|
13
|
+
sortIcon?: React.ReactNode;
|
|
14
|
+
/** > 0 turns the filter icon red and shows a count badge. */
|
|
15
|
+
filterCount?: number;
|
|
16
|
+
/** MUST be provided if filterContent is present, otherwise no icon renders. */
|
|
17
|
+
filterIcon?: React.ReactNode;
|
|
18
|
+
/** Renders a filter icon button; clicking it toggles visibility of this content. */
|
|
19
|
+
filterContent?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
|
|
23
|
+
headerProps?: LuminaColumnHeaderProps;
|
|
24
|
+
};
|
|
25
|
+
type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
|
|
26
|
+
interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
|
|
27
|
+
/** `selectable` — clicking any row toggles its checkbox */
|
|
28
|
+
variant?: "default" | "selectable";
|
|
29
|
+
isAccordion?: boolean;
|
|
30
|
+
isToolbar?: boolean;
|
|
31
|
+
size?: "small" | "middle" | "large";
|
|
32
|
+
className?: string;
|
|
33
|
+
pagination?: TablePaginationConfig | boolean;
|
|
34
|
+
/** Add `headerProps` to any column to enable sort/filter icons. */
|
|
35
|
+
columns?: LuminaColumnsType<RecordType>;
|
|
36
|
+
/** Total items for server-side pagination. */
|
|
37
|
+
total?: number;
|
|
38
|
+
/** Current page number (1-indexed). */
|
|
39
|
+
current?: number;
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
onPaginationChange?: TablePaginationConfig["onChange"];
|
|
42
|
+
emptyState?: React.ReactNode;
|
|
43
|
+
hideHeader?: boolean;
|
|
44
|
+
loadingIndicator?: React.ReactElement;
|
|
45
|
+
/** Extra class applied to header cells (th). */
|
|
46
|
+
headerCellClassName?: string;
|
|
47
|
+
/** Extra class applied to body cells (td). */
|
|
48
|
+
bodyCellClassName?: string;
|
|
49
|
+
/** Can be a string or a per-row function. */
|
|
50
|
+
rowClassName?: string | ((record: RecordType, index: number) => string);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Lumina Table component.
|
|
55
|
+
*
|
|
56
|
+
* Variants:
|
|
57
|
+
* - `default` – standard table
|
|
58
|
+
* - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
|
|
59
|
+
*
|
|
60
|
+
* Use `isAccordion` / `isToolbar` to strip outer chrome when embedded.
|
|
61
|
+
* Row hover tint is enabled by default via styles.
|
|
62
|
+
*
|
|
63
|
+
* Column header icons — add `headerProps` to any column definition:
|
|
64
|
+
* ```tsx
|
|
65
|
+
* columns={[{
|
|
66
|
+
* key: "name", dataIndex: "name", title: "Name",
|
|
67
|
+
* headerProps: {
|
|
68
|
+
* sortable: true,
|
|
69
|
+
* sortOrder: sortOrders.name,
|
|
70
|
+
* onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
|
|
71
|
+
* filterCount: activeFilters.name ?? 0,
|
|
72
|
+
* filterContent: <MyFilterPanel />,
|
|
73
|
+
* },
|
|
74
|
+
* }]}
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
|
|
78
|
+
declare namespace Table {
|
|
79
|
+
var displayName: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableProps as TableProps$1, TablePaginationConfig } from 'antd';
|
|
3
|
+
|
|
4
|
+
type SortOrder = "ascend" | "descend" | undefined;
|
|
5
|
+
type AntColumnType<RecordType> = NonNullable<TableProps$1<RecordType>["columns"]>[number];
|
|
6
|
+
interface LuminaColumnHeaderProps {
|
|
7
|
+
/** Clicking cycles: undefined → ascend → descend → undefined */
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
/** Provide to make sort controlled. */
|
|
10
|
+
sortOrder?: SortOrder;
|
|
11
|
+
onSortChange?: (order: SortOrder) => void;
|
|
12
|
+
/** If not provided, dynamic default sort icon will render. */
|
|
13
|
+
sortIcon?: React.ReactNode;
|
|
14
|
+
/** Custom icon for ascending sort. */
|
|
15
|
+
sortAscendIcon?: React.ReactNode;
|
|
16
|
+
/** Custom icon for descending sort. */
|
|
17
|
+
sortDescendIcon?: React.ReactNode;
|
|
18
|
+
/** > 0 turns the filter icon red and shows a count badge. */
|
|
19
|
+
filterCount?: number;
|
|
20
|
+
/** MUST be provided if filterContent is present, otherwise no icon renders. */
|
|
21
|
+
filterIcon?: React.ReactNode;
|
|
22
|
+
/** Renders a filter icon button; clicking it toggles visibility of this content. */
|
|
23
|
+
filterContent?: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
|
|
27
|
+
headerProps?: LuminaColumnHeaderProps;
|
|
28
|
+
};
|
|
29
|
+
type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
|
|
30
|
+
interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
|
|
31
|
+
/** `selectable` — clicking any row toggles its checkbox */
|
|
32
|
+
variant?: "default" | "selectable";
|
|
33
|
+
isAccordion?: boolean;
|
|
34
|
+
isToolbar?: boolean;
|
|
35
|
+
size?: "small" | "middle" | "large";
|
|
36
|
+
className?: string;
|
|
37
|
+
pagination?: TablePaginationConfig | boolean;
|
|
38
|
+
/** Add `headerProps` to any column to enable sort/filter icons. */
|
|
39
|
+
columns?: LuminaColumnsType<RecordType>;
|
|
40
|
+
/** Total items for server-side pagination. */
|
|
41
|
+
total?: number;
|
|
42
|
+
/** Current page number (1-indexed). */
|
|
43
|
+
current?: number;
|
|
44
|
+
pageSize?: number;
|
|
45
|
+
onPaginationChange?: TablePaginationConfig["onChange"];
|
|
46
|
+
emptyState?: React.ReactNode;
|
|
47
|
+
hideHeader?: boolean;
|
|
48
|
+
loadingIndicator?: React.ReactElement;
|
|
49
|
+
/** Extra class applied to header cells (th). */
|
|
50
|
+
headerCellClassName?: string;
|
|
51
|
+
/** Extra class applied to body cells (td). */
|
|
52
|
+
bodyCellClassName?: string;
|
|
53
|
+
/** Can be a string or a per-row function. */
|
|
54
|
+
rowClassName?: string | ((record: RecordType, index: number) => string);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Lumina Table component.
|
|
59
|
+
*
|
|
60
|
+
* Variants:
|
|
61
|
+
* - `default` – standard table
|
|
62
|
+
* - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
|
|
63
|
+
*
|
|
64
|
+
* Use `isAccordion` / `isToolbar` to strip outer chrome when embedded.
|
|
65
|
+
* Row hover tint is enabled by default via styles.
|
|
66
|
+
*
|
|
67
|
+
* Column header icons — add `headerProps` to any column definition:
|
|
68
|
+
* ```tsx
|
|
69
|
+
* columns={[{
|
|
70
|
+
* key: "name", dataIndex: "name", title: "Name",
|
|
71
|
+
* headerProps: {
|
|
72
|
+
* sortable: true,
|
|
73
|
+
* sortOrder: sortOrders.name,
|
|
74
|
+
* onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
|
|
75
|
+
* filterCount: activeFilters.name ?? 0,
|
|
76
|
+
* filterContent: <MyFilterPanel />,
|
|
77
|
+
* },
|
|
78
|
+
* }]}
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
|
|
82
|
+
declare namespace Table {
|
|
83
|
+
var displayName: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableProps as TableProps$1, TablePaginationConfig } from 'antd';
|
|
3
|
+
|
|
4
|
+
type SortOrder = "ascend" | "descend" | undefined;
|
|
5
|
+
type AntColumnType<RecordType> = NonNullable<TableProps$1<RecordType>["columns"]>[number];
|
|
6
|
+
interface LuminaColumnHeaderProps {
|
|
7
|
+
/** Clicking cycles: undefined → ascend → descend → undefined */
|
|
8
|
+
sortable?: boolean;
|
|
9
|
+
/** Provide to make sort controlled. */
|
|
10
|
+
sortOrder?: SortOrder;
|
|
11
|
+
onSortChange?: (order: SortOrder) => void;
|
|
12
|
+
/** If not provided, dynamic default sort icon will render. */
|
|
13
|
+
sortIcon?: React.ReactNode;
|
|
14
|
+
/** Custom icon for ascending sort. */
|
|
15
|
+
sortAscendIcon?: React.ReactNode;
|
|
16
|
+
/** Custom icon for descending sort. */
|
|
17
|
+
sortDescendIcon?: React.ReactNode;
|
|
18
|
+
/** > 0 turns the filter icon red and shows a count badge. */
|
|
19
|
+
filterCount?: number;
|
|
20
|
+
/** MUST be provided if filterContent is present, otherwise no icon renders. */
|
|
21
|
+
filterIcon?: React.ReactNode;
|
|
22
|
+
/** Renders a filter icon button; clicking it toggles visibility of this content. */
|
|
23
|
+
filterContent?: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
|
|
27
|
+
headerProps?: LuminaColumnHeaderProps;
|
|
28
|
+
};
|
|
29
|
+
type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
|
|
30
|
+
interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
|
|
31
|
+
/** `selectable` — clicking any row toggles its checkbox */
|
|
32
|
+
variant?: "default" | "selectable";
|
|
33
|
+
isAccordion?: boolean;
|
|
34
|
+
isToolbar?: boolean;
|
|
35
|
+
size?: "small" | "middle" | "large";
|
|
36
|
+
className?: string;
|
|
37
|
+
pagination?: TablePaginationConfig | boolean;
|
|
38
|
+
/** Add `headerProps` to any column to enable sort/filter icons. */
|
|
39
|
+
columns?: LuminaColumnsType<RecordType>;
|
|
40
|
+
/** Total items for server-side pagination. */
|
|
41
|
+
total?: number;
|
|
42
|
+
/** Current page number (1-indexed). */
|
|
43
|
+
current?: number;
|
|
44
|
+
pageSize?: number;
|
|
45
|
+
onPaginationChange?: TablePaginationConfig["onChange"];
|
|
46
|
+
emptyState?: React.ReactNode;
|
|
47
|
+
hideHeader?: boolean;
|
|
48
|
+
loadingIndicator?: React.ReactElement;
|
|
49
|
+
/** Extra class applied to header cells (th). */
|
|
50
|
+
headerCellClassName?: string;
|
|
51
|
+
/** Extra class applied to body cells (td). */
|
|
52
|
+
bodyCellClassName?: string;
|
|
53
|
+
/** Can be a string or a per-row function. */
|
|
54
|
+
rowClassName?: string | ((record: RecordType, index: number) => string);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Lumina Table component.
|
|
59
|
+
*
|
|
60
|
+
* Variants:
|
|
61
|
+
* - `default` – standard table
|
|
62
|
+
* - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
|
|
63
|
+
*
|
|
64
|
+
* Use `isAccordion` / `isToolbar` to strip outer chrome when embedded.
|
|
65
|
+
* Row hover tint is enabled by default via styles.
|
|
66
|
+
*
|
|
67
|
+
* Column header icons — add `headerProps` to any column definition:
|
|
68
|
+
* ```tsx
|
|
69
|
+
* columns={[{
|
|
70
|
+
* key: "name", dataIndex: "name", title: "Name",
|
|
71
|
+
* headerProps: {
|
|
72
|
+
* sortable: true,
|
|
73
|
+
* sortOrder: sortOrders.name,
|
|
74
|
+
* onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
|
|
75
|
+
* filterCount: activeFilters.name ?? 0,
|
|
76
|
+
* filterContent: <MyFilterPanel />,
|
|
77
|
+
* },
|
|
78
|
+
* }]}
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
|
|
82
|
+
declare namespace Table {
|
|
83
|
+
var displayName: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
|
|
@@ -70,7 +70,7 @@ var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.j
|
|
|
70
70
|
var import_isSameOrBefore = __toESM(require("dayjs/plugin/isSameOrBefore.js"));
|
|
71
71
|
|
|
72
72
|
// src/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.module.scss
|
|
73
|
-
var AdvancedDateRangePicker_module_default = { "root": "AdvancedDateRangePicker-module__root___udir8", "singleCalendar": "AdvancedDateRangePicker-module__singleCalendar___qy2-H", "hidePresets": "AdvancedDateRangePicker-module__hidePresets___-m2-P", "inner": "AdvancedDateRangePicker-module__inner___P4OHa", "left": "AdvancedDateRangePicker-module__left___T6E84", "sidebarItem": "AdvancedDateRangePicker-module__sidebarItem___-NXPm", "sidebarItemActive": "AdvancedDateRangePicker-module__sidebarItemActive___5GmBY", "main": "AdvancedDateRangePicker-module__main___G4MU9", "header": "AdvancedDateRangePicker-module__header___mxXEE", "timezoneWrapper": "AdvancedDateRangePicker-module__timezoneWrapper___886Qm", "dateTimeWrapper": "AdvancedDateRangePicker-module__dateTimeWrapper___unDQJ", "headerGroup": "AdvancedDateRangePicker-module__headerGroup___J7mJB", "headerLabel": "AdvancedDateRangePicker-module__headerLabel___Yvhkr", "headerSeparator": "AdvancedDateRangePicker-module__headerSeparator___Vwx6P", "timezoneSelect": "AdvancedDateRangePicker-module__timezoneSelect___f4oln", "timezoneSelectContainer": "AdvancedDateRangePicker-module__timezoneSelectContainer___8SMc4", "timezoneSelectInput": "AdvancedDateRangePicker-module__timezoneSelectInput___ol0-7", "timezoneDisabledBadge": "AdvancedDateRangePicker-module__timezoneDisabledBadge___VBxOd", "inputWrapper": "AdvancedDateRangePicker-module__inputWrapper___bFFNF", "dateTimeColumn": "AdvancedDateRangePicker-module__dateTimeColumn___tdDV3", "dateTimeGroup": "AdvancedDateRangePicker-module__dateTimeGroup___azF09", "dateInput": "AdvancedDateRangePicker-module__dateInput___0t9ww", "inputError": "AdvancedDateRangePicker-module__inputError___A5hid", "timeInput": "AdvancedDateRangePicker-module__timeInput___Jalr9", "errorMessage": "AdvancedDateRangePicker-module__errorMessage___gx7ag", "body": "AdvancedDateRangePicker-module__body___f8XYj", "footer": "AdvancedDateRangePicker-module__footer___rsJ2w", "doneBtn": "AdvancedDateRangePicker-module__doneBtn___mt-Sv" };
|
|
73
|
+
var AdvancedDateRangePicker_module_default = { "root": "AdvancedDateRangePicker-module__root___udir8", "singleCalendar": "AdvancedDateRangePicker-module__singleCalendar___qy2-H", "hidePresets": "AdvancedDateRangePicker-module__hidePresets___-m2-P", "inner": "AdvancedDateRangePicker-module__inner___P4OHa", "left": "AdvancedDateRangePicker-module__left___T6E84", "sidebarItem": "AdvancedDateRangePicker-module__sidebarItem___-NXPm", "sidebarItemActive": "AdvancedDateRangePicker-module__sidebarItemActive___5GmBY", "sidebarItemText": "AdvancedDateRangePicker-module__sidebarItemText___X9qO-", "main": "AdvancedDateRangePicker-module__main___G4MU9", "header": "AdvancedDateRangePicker-module__header___mxXEE", "timezoneWrapper": "AdvancedDateRangePicker-module__timezoneWrapper___886Qm", "dateTimeWrapper": "AdvancedDateRangePicker-module__dateTimeWrapper___unDQJ", "headerGroup": "AdvancedDateRangePicker-module__headerGroup___J7mJB", "headerLabel": "AdvancedDateRangePicker-module__headerLabel___Yvhkr", "headerSeparator": "AdvancedDateRangePicker-module__headerSeparator___Vwx6P", "timezoneSelect": "AdvancedDateRangePicker-module__timezoneSelect___f4oln", "timezoneSelectContainer": "AdvancedDateRangePicker-module__timezoneSelectContainer___8SMc4", "timezoneSelectInput": "AdvancedDateRangePicker-module__timezoneSelectInput___ol0-7", "timezoneDisabledBadge": "AdvancedDateRangePicker-module__timezoneDisabledBadge___VBxOd", "inputWrapper": "AdvancedDateRangePicker-module__inputWrapper___bFFNF", "dateTimeColumn": "AdvancedDateRangePicker-module__dateTimeColumn___tdDV3", "dateTimeGroup": "AdvancedDateRangePicker-module__dateTimeGroup___azF09", "dateInput": "AdvancedDateRangePicker-module__dateInput___0t9ww", "inputError": "AdvancedDateRangePicker-module__inputError___A5hid", "timeInput": "AdvancedDateRangePicker-module__timeInput___Jalr9", "errorMessage": "AdvancedDateRangePicker-module__errorMessage___gx7ag", "body": "AdvancedDateRangePicker-module__body___f8XYj", "footer": "AdvancedDateRangePicker-module__footer___rsJ2w", "doneBtn": "AdvancedDateRangePicker-module__doneBtn___mt-Sv" };
|
|
74
74
|
|
|
75
75
|
// src/atom/AdvancedDateRangePicker/InternalCalendar.tsx
|
|
76
76
|
var import_react = require("react");
|
|
@@ -1561,7 +1561,8 @@ function AdvancedDateRangePicker({
|
|
|
1561
1561
|
className: (0, import_clsx3.default)(AdvancedDateRangePicker_module_default.sidebarItem, {
|
|
1562
1562
|
[AdvancedDateRangePicker_module_default.sidebarItemActive]: activePreset === p.key
|
|
1563
1563
|
}),
|
|
1564
|
-
|
|
1564
|
+
title: p.label,
|
|
1565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: AdvancedDateRangePicker_module_default.sidebarItemText, children: p.label })
|
|
1565
1566
|
},
|
|
1566
1567
|
p.key
|
|
1567
1568
|
)) }),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AdvancedDateRangePicker,
|
|
3
3
|
AdvancedDateRangePicker_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-Z3N4E2C5.mjs";
|
|
5
5
|
import "../../chunk-GU5F7Z7I.mjs";
|
|
6
6
|
import "../../chunk-MLCMZRUC.mjs";
|
|
7
7
|
import "../../chunk-FPH63V2R.mjs";
|
|
8
8
|
import "../../chunk-ZTRM4HZJ.mjs";
|
|
9
|
-
import "../../chunk-QKTMWS4J.mjs";
|
|
10
9
|
import "../../chunk-AF2RKLH6.mjs";
|
|
10
|
+
import "../../chunk-QKTMWS4J.mjs";
|
|
11
11
|
import "../../chunk-FWCSY2DS.mjs";
|
|
12
12
|
export {
|
|
13
13
|
AdvancedDateRangePicker,
|
package/dist/atom/Table/Table.js
CHANGED
|
@@ -132,7 +132,7 @@ function ColumnHeader({
|
|
|
132
132
|
onClick: () => onSortChange == null ? void 0 : onSortChange(nextSortOrder(sortOrder)),
|
|
133
133
|
"aria-label": typeof label === "string" ? `Sort by ${label}` : "Sort",
|
|
134
134
|
children: [
|
|
135
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(Table_module_default.columnHeaderLabel,
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(Table_module_default.columnHeaderLabel, className), children: label }),
|
|
136
136
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
137
|
"span",
|
|
138
138
|
{
|
|
@@ -144,7 +144,7 @@ function ColumnHeader({
|
|
|
144
144
|
)
|
|
145
145
|
]
|
|
146
146
|
}
|
|
147
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(Table_module_default.columnHeaderLabel,
|
|
147
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(Table_module_default.columnHeaderLabel, className), children: label }) }),
|
|
148
148
|
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: Table_module_default.columnHeaderFilterWrapper, children: [
|
|
149
149
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
150
150
|
"button",
|