@itilite/lumina-ui 1.2.1 → 1.2.21

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.
Files changed (88) hide show
  1. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.mjs +1 -1
  2. package/dist/atom/Switch/Switch.d.mts +1 -1
  3. package/dist/atom/Switch/Switch.d.ts +1 -1
  4. package/dist/atom/Switch/Switch.js +2 -2
  5. package/dist/atom/Switch/Switch.mjs +1 -1
  6. package/dist/{chunk-4JX54OKI.mjs → chunk-IIJUGDEJ.mjs} +20 -29
  7. package/dist/{chunk-QQA7KWAJ.mjs → chunk-LTP5I3GX.mjs} +4 -4
  8. package/dist/chunk-O6PQFAXN.mjs +47 -0
  9. package/dist/index.js +2 -2
  10. package/dist/index.mjs +10 -10
  11. package/dist/styles.css +826 -806
  12. package/package.json +28 -27
  13. package/dist/AdvancedDateRangePicker-D7xn4So6.d.mts +0 -59
  14. package/dist/AdvancedDateRangePicker-D7xn4So6.d.ts +0 -59
  15. package/dist/AdvancedDateRangePicker-D9Sdk4rK.d.mts +0 -64
  16. package/dist/AdvancedDateRangePicker-D9Sdk4rK.d.ts +0 -64
  17. package/dist/AdvancedDateRangePicker-DGg-rucL.d.mts +0 -62
  18. package/dist/AdvancedDateRangePicker-DGg-rucL.d.ts +0 -62
  19. package/dist/AdvancedDateRangePicker-Di3rHxqf.d.mts +0 -64
  20. package/dist/AdvancedDateRangePicker-Di3rHxqf.d.ts +0 -64
  21. package/dist/AdvancedDateRangePicker-Dxug2Mcf.d.mts +0 -60
  22. package/dist/AdvancedDateRangePicker-Dxug2Mcf.d.ts +0 -60
  23. package/dist/AdvancedDateRangePicker-ozItnkhp.d.mts +0 -57
  24. package/dist/AdvancedDateRangePicker-ozItnkhp.d.ts +0 -57
  25. package/dist/Table-BOq-_9Nr.d.mts +0 -121
  26. package/dist/Table-BOq-_9Nr.d.ts +0 -121
  27. package/dist/Table-BxaCiQmh.d.mts +0 -82
  28. package/dist/Table-BxaCiQmh.d.ts +0 -82
  29. package/dist/Table-CnzP9dkc.d.mts +0 -82
  30. package/dist/Table-CnzP9dkc.d.ts +0 -82
  31. package/dist/Table-DNvoh2P8.d.mts +0 -127
  32. package/dist/Table-DNvoh2P8.d.ts +0 -127
  33. package/dist/Table-DSFYzrpU.d.mts +0 -129
  34. package/dist/Table-DSFYzrpU.d.ts +0 -129
  35. package/dist/Table-DmfNNnuD.d.mts +0 -86
  36. package/dist/Table-DmfNNnuD.d.ts +0 -86
  37. package/dist/Table-DoCPt3ri.d.mts +0 -129
  38. package/dist/Table-DoCPt3ri.d.ts +0 -129
  39. package/dist/chunk-27LRL4RO.mjs +0 -428
  40. package/dist/chunk-2IT3XM7C.mjs +0 -473
  41. package/dist/chunk-3HXZIFV6.mjs +0 -438
  42. package/dist/chunk-53O7JM5I.mjs +0 -424
  43. package/dist/chunk-5JXIJTAS.mjs +0 -448
  44. package/dist/chunk-5OUMKJWI.mjs +0 -301
  45. package/dist/chunk-5PMUTA6S.mjs +0 -303
  46. package/dist/chunk-5PQ43JFX.mjs +0 -440
  47. package/dist/chunk-62VAYFZA.mjs +0 -437
  48. package/dist/chunk-6ON32H2N.mjs +0 -431
  49. package/dist/chunk-6RIZXTFP.mjs +0 -290
  50. package/dist/chunk-6XIT27XY.mjs +0 -269
  51. package/dist/chunk-772C454L.mjs +0 -438
  52. package/dist/chunk-7L267Y4P.mjs +0 -429
  53. package/dist/chunk-7WSVCE2C.mjs +0 -269
  54. package/dist/chunk-ANJI6SPV.mjs +0 -283
  55. package/dist/chunk-BFFLWW7N.mjs +0 -250
  56. package/dist/chunk-C5VYFNVC.mjs +0 -441
  57. package/dist/chunk-DL7BZMGE.mjs +0 -295
  58. package/dist/chunk-DXPVJNGY.mjs +0 -284
  59. package/dist/chunk-FTL3PFC2.mjs +0 -438
  60. package/dist/chunk-G4P6XGQX.mjs +0 -278
  61. package/dist/chunk-GGWY2SYX.mjs +0 -452
  62. package/dist/chunk-GZ4P7OL3.mjs +0 -429
  63. package/dist/chunk-I6GLPWHS.mjs +0 -278
  64. package/dist/chunk-IPVJEGDI.mjs +0 -476
  65. package/dist/chunk-J4YYP4IZ.mjs +0 -0
  66. package/dist/chunk-J5JDQ4R6.mjs +0 -278
  67. package/dist/chunk-K2A4TWA3.mjs +0 -430
  68. package/dist/chunk-L3L42SIL.mjs +0 -429
  69. package/dist/chunk-LRNKIRH3.mjs +0 -289
  70. package/dist/chunk-MA23J4WQ.mjs +0 -430
  71. package/dist/chunk-N4DPPZVJ.mjs +0 -269
  72. package/dist/chunk-PQ3B2FEB.mjs +0 -249
  73. package/dist/chunk-QRGHJP7U.mjs +0 -437
  74. package/dist/chunk-QU73KNTT.mjs +0 -452
  75. package/dist/chunk-RC6IGURJ.mjs +0 -428
  76. package/dist/chunk-SKPCOHON.mjs +0 -473
  77. package/dist/chunk-SRKN7WS7.mjs +0 -448
  78. package/dist/chunk-T43CWNOG.mjs +0 -283
  79. package/dist/chunk-TE5EOIIW.mjs +0 -301
  80. package/dist/chunk-TQDZWJZP.mjs +0 -269
  81. package/dist/chunk-UAGSPM3T.mjs +0 -288
  82. package/dist/chunk-UC4NTBDH.mjs +0 -439
  83. package/dist/chunk-UPSQTJJ4.mjs +0 -294
  84. package/dist/chunk-V3CHJHUX.mjs +0 -424
  85. package/dist/chunk-X3NDICAU.mjs +0 -284
  86. package/dist/chunk-XECXKSTC.mjs +0 -453
  87. package/dist/chunk-XIVTXS3Y.mjs +0 -439
  88. package/dist/chunk-ZGV6QMVM.mjs +0 -437
@@ -1,60 +0,0 @@
1
- import * as React from 'react';
2
-
3
- interface TimeValue {
4
- hour: string;
5
- minute: string;
6
- period: "AM" | "PM";
7
- }
8
- interface DateRangeValue {
9
- startDate: Date | null;
10
- endDate: Date | null;
11
- startTime: TimeValue;
12
- endTime: TimeValue;
13
- timezone: string;
14
- activePreset?: string;
15
- }
16
- interface PresetOption {
17
- label: string;
18
- key: string;
19
- getRange: () => (Date | null)[];
20
- }
21
- interface TimezoneOption {
22
- label: string;
23
- value: string;
24
- }
25
- interface DateRangePickerProps {
26
- /** Controlled value for the date range */
27
- value?: DateRangeValue;
28
- /** Called when the user clicks "Done" */
29
- onChange?: (value: DateRangeValue) => void;
30
- /** Called on every selection change (live) */
31
- onRangeChange?: (value: DateRangeValue) => void;
32
- /** Label for the confirm button. Defaults to "Done" */
33
- confirmLabel?: string;
34
- /** Additional class name for the root wrapper */
35
- className?: string;
36
- /** Whether the picker is disabled */
37
- disabled?: boolean;
38
- /** Disable dates before today */
39
- disablePastDates?: boolean;
40
- /** Minimum selectable date (ISO string) */
41
- minDate?: string | null;
42
- /** Maximum selectable date (ISO string) */
43
- maxDate?: string | null;
44
- /** Show a single calendar instead of two */
45
- showSingleCalendar?: boolean;
46
- /** Id prefix for accessibility */
47
- id?: string;
48
- defaultTimezone?: string;
49
- isTimezoneDisabled?: boolean;
50
- timezoneOptions?: TimezoneOption[];
51
- /** Initial active preset key. Defaults to "custom". e.g. "this-month", "yesterday" */
52
- defaultPreset?: string;
53
- }
54
-
55
- declare function AdvancedDateRangePicker({ value, onChange, confirmLabel, className, disabled, disablePastDates, minDate, maxDate, showSingleCalendar, id, defaultTimezone, isTimezoneDisabled, timezoneOptions, defaultPreset, }: DateRangePickerProps): React.JSX.Element;
56
- declare namespace AdvancedDateRangePicker {
57
- var displayName: string;
58
- }
59
-
60
- export { AdvancedDateRangePicker as A, type DateRangePickerProps as D, type PresetOption as P, type TimeValue as T, type DateRangeValue as a, type TimezoneOption as b };
@@ -1,57 +0,0 @@
1
- import * as React from 'react';
2
-
3
- interface TimeValue {
4
- hour: string;
5
- minute: string;
6
- period: "AM" | "PM";
7
- }
8
- interface DateRangeValue {
9
- startDate: Date | null;
10
- endDate: Date | null;
11
- startTime: TimeValue;
12
- endTime: TimeValue;
13
- timezone: string;
14
- }
15
- interface PresetOption {
16
- label: string;
17
- key: string;
18
- getRange: () => (Date | null)[];
19
- }
20
- interface TimezoneOption {
21
- label: string;
22
- value: string;
23
- }
24
- interface DateRangePickerProps {
25
- /** Controlled value for the date range */
26
- value?: DateRangeValue;
27
- /** Called when the user clicks "Done" */
28
- onChange?: (value: DateRangeValue) => void;
29
- /** Called on every selection change (live) */
30
- onRangeChange?: (value: DateRangeValue) => void;
31
- /** Label for the confirm button. Defaults to "Done" */
32
- confirmLabel?: string;
33
- /** Additional class name for the root wrapper */
34
- className?: string;
35
- /** Whether the picker is disabled */
36
- disabled?: boolean;
37
- /** Disable dates before today */
38
- disablePastDates?: boolean;
39
- /** Minimum selectable date (ISO string) */
40
- minDate?: string | null;
41
- /** Maximum selectable date (ISO string) */
42
- maxDate?: string | null;
43
- /** Show a single calendar instead of two */
44
- showSingleCalendar?: boolean;
45
- /** Id prefix for accessibility */
46
- id?: string;
47
- defaultTimezone?: string;
48
- isTimezoneDisabled?: boolean;
49
- timezoneOptions?: TimezoneOption[];
50
- }
51
-
52
- declare function AdvancedDateRangePicker({ value, onChange, confirmLabel, className, disabled, disablePastDates, minDate, maxDate, showSingleCalendar, id, defaultTimezone, isTimezoneDisabled, timezoneOptions, }: DateRangePickerProps): React.JSX.Element;
53
- declare namespace AdvancedDateRangePicker {
54
- var displayName: string;
55
- }
56
-
57
- export { AdvancedDateRangePicker as A, type DateRangePickerProps as D, type PresetOption as P, type TimeValue as T, type DateRangeValue as a, type TimezoneOption as b };
@@ -1,57 +0,0 @@
1
- import * as React from 'react';
2
-
3
- interface TimeValue {
4
- hour: string;
5
- minute: string;
6
- period: "AM" | "PM";
7
- }
8
- interface DateRangeValue {
9
- startDate: Date | null;
10
- endDate: Date | null;
11
- startTime: TimeValue;
12
- endTime: TimeValue;
13
- timezone: string;
14
- }
15
- interface PresetOption {
16
- label: string;
17
- key: string;
18
- getRange: () => (Date | null)[];
19
- }
20
- interface TimezoneOption {
21
- label: string;
22
- value: string;
23
- }
24
- interface DateRangePickerProps {
25
- /** Controlled value for the date range */
26
- value?: DateRangeValue;
27
- /** Called when the user clicks "Done" */
28
- onChange?: (value: DateRangeValue) => void;
29
- /** Called on every selection change (live) */
30
- onRangeChange?: (value: DateRangeValue) => void;
31
- /** Label for the confirm button. Defaults to "Done" */
32
- confirmLabel?: string;
33
- /** Additional class name for the root wrapper */
34
- className?: string;
35
- /** Whether the picker is disabled */
36
- disabled?: boolean;
37
- /** Disable dates before today */
38
- disablePastDates?: boolean;
39
- /** Minimum selectable date (ISO string) */
40
- minDate?: string | null;
41
- /** Maximum selectable date (ISO string) */
42
- maxDate?: string | null;
43
- /** Show a single calendar instead of two */
44
- showSingleCalendar?: boolean;
45
- /** Id prefix for accessibility */
46
- id?: string;
47
- defaultTimezone?: string;
48
- isTimezoneDisabled?: boolean;
49
- timezoneOptions?: TimezoneOption[];
50
- }
51
-
52
- declare function AdvancedDateRangePicker({ value, onChange, confirmLabel, className, disabled, disablePastDates, minDate, maxDate, showSingleCalendar, id, defaultTimezone, isTimezoneDisabled, timezoneOptions, }: DateRangePickerProps): React.JSX.Element;
53
- declare namespace AdvancedDateRangePicker {
54
- var displayName: string;
55
- }
56
-
57
- export { AdvancedDateRangePicker as A, type DateRangePickerProps as D, type PresetOption as P, type TimeValue as T, type DateRangeValue as a, type TimezoneOption as b };
@@ -1,121 +0,0 @@
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
- /**
7
- * Header icon configuration added to any column definition.
8
- * The Table component reads these props and renders sort/filter icons automatically.
9
- */
10
- interface LuminaColumnHeaderProps {
11
- /** Show sort icon. Clicking cycles: undefined (↑↓) → ascend (↑) → descend (↓) → undefined */
12
- sortable?: boolean;
13
- /** Current sort direction. Provide to make sort controlled. */
14
- sortOrder?: SortOrder;
15
- /** Called when the user clicks the sort icon. */
16
- onSortChange?: (order: SortOrder) => void;
17
- /**
18
- * Custom sort icon. This MUST be provided if sortable is true.
19
- * If omitted, no icon will be rendered.
20
- */
21
- sortIcon?: React.ReactNode;
22
- /** > 0 turns the filter icon red and shows a count badge. */
23
- filterCount?: number;
24
- /**
25
- * Custom filter icon. This MUST be provided if filterContent is present.
26
- * If omitted, no icon will be rendered.
27
- */
28
- filterIcon?: React.ReactNode;
29
- /**
30
- * Filter dropdown content from the consumer.
31
- * Providing this prop renders the filter icon button.
32
- * Clicking the icon toggles visibility of this content.
33
- */
34
- filterContent?: React.ReactNode;
35
- /** Optional class name to apply to the header label. */
36
- className?: string;
37
- }
38
- /**
39
- * AntD ColumnType extended with optional `headerProps` for Lumina sort/filter icons.
40
- */
41
- type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
42
- headerProps?: LuminaColumnHeaderProps;
43
- };
44
- type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
45
- interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
46
- /**
47
- * Lumina UI table variant.
48
- * - `default` – standard table
49
- * - `selectable` – checkbox rows; clicking any row toggles its checkbox
50
- */
51
- variant?: "default" | "selectable";
52
- /** If true, strips outer card chrome to fit inside an Accordion parent. */
53
- isAccordion?: boolean;
54
- /** If true, strips outer card chrome to fit inside a Toolbar/Container parent. */
55
- isToolbar?: boolean;
56
- /** Table size. Defaults to 'middle'. */
57
- size?: "small" | "middle" | "large";
58
- /** Extra class applied on the outermost wrapper div. */
59
- className?: string;
60
- /** AntD pagination config. Pass `false` to hide pagination. */
61
- pagination?: TablePaginationConfig | boolean;
62
- /**
63
- * Column definitions. Add `headerProps` to any column to get sort/filter icons
64
- * rendered automatically in the column header.
65
- */
66
- columns?: LuminaColumnsType<RecordType>;
67
- /** Total number of items in the dataset (for server-side pagination). */
68
- total?: number;
69
- /** Current page number (1-indexed). */
70
- current?: number;
71
- /** Number of rows per page. */
72
- pageSize?: number;
73
- /** Called when the page or page size changes. */
74
- onPaginationChange?: TablePaginationConfig["onChange"];
75
- /**
76
- * Custom content to show when the table has no data.
77
- * If provided, it overrides the default Ant Design "No Data" view.
78
- */
79
- emptyState?: React.ReactNode;
80
- /**
81
- * If true, the table header (the row with column labels) will be hidden.
82
- * Useful during loading or for specific visual variants.
83
- */
84
- hideHeader?: boolean;
85
- /**
86
- * Custom loading indicator (e.g. a spinner or skeleton).
87
- * If provided, this will be rendered when the table is in a loading state.
88
- */
89
- loadingIndicator?: React.ReactElement;
90
- }
91
-
92
- /**
93
- * Lumina Table component.
94
- *
95
- * Variants:
96
- * - `default` – standalone table card with rounded border
97
- * - `hover` – row highlight on mouse-over
98
- * - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
99
- * - `accordion-child` – strips outer card chrome; place inside your own accordion wrapper
100
- * - `toolbar-child` – strips outer card chrome; place inside your own toolbar/container wrapper
101
- *
102
- * Column header icons — add `headerProps` to any column definition:
103
- * ```tsx
104
- * columns={[{
105
- * key: "name", dataIndex: "name", title: "Name",
106
- * headerProps: {
107
- * sortable: true,
108
- * sortOrder: sortOrders.name,
109
- * onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
110
- * filterCount: activeFilters.name ?? 0,
111
- * filterContent: <MyFilterPanel />,
112
- * },
113
- * }]}
114
- * ```
115
- */
116
- declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
117
- declare namespace Table {
118
- var displayName: string;
119
- }
120
-
121
- export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
@@ -1,121 +0,0 @@
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
- /**
7
- * Header icon configuration added to any column definition.
8
- * The Table component reads these props and renders sort/filter icons automatically.
9
- */
10
- interface LuminaColumnHeaderProps {
11
- /** Show sort icon. Clicking cycles: undefined (↑↓) → ascend (↑) → descend (↓) → undefined */
12
- sortable?: boolean;
13
- /** Current sort direction. Provide to make sort controlled. */
14
- sortOrder?: SortOrder;
15
- /** Called when the user clicks the sort icon. */
16
- onSortChange?: (order: SortOrder) => void;
17
- /**
18
- * Custom sort icon. This MUST be provided if sortable is true.
19
- * If omitted, no icon will be rendered.
20
- */
21
- sortIcon?: React.ReactNode;
22
- /** > 0 turns the filter icon red and shows a count badge. */
23
- filterCount?: number;
24
- /**
25
- * Custom filter icon. This MUST be provided if filterContent is present.
26
- * If omitted, no icon will be rendered.
27
- */
28
- filterIcon?: React.ReactNode;
29
- /**
30
- * Filter dropdown content from the consumer.
31
- * Providing this prop renders the filter icon button.
32
- * Clicking the icon toggles visibility of this content.
33
- */
34
- filterContent?: React.ReactNode;
35
- /** Optional class name to apply to the header label. */
36
- className?: string;
37
- }
38
- /**
39
- * AntD ColumnType extended with optional `headerProps` for Lumina sort/filter icons.
40
- */
41
- type LuminaColumnType<RecordType = any> = AntColumnType<RecordType> & {
42
- headerProps?: LuminaColumnHeaderProps;
43
- };
44
- type LuminaColumnsType<RecordType = any> = LuminaColumnType<RecordType>[];
45
- interface TableProps<RecordType = any> extends Omit<TableProps$1<RecordType>, "size" | "bordered" | "pagination" | "columns"> {
46
- /**
47
- * Lumina UI table variant.
48
- * - `default` – standard table
49
- * - `selectable` – checkbox rows; clicking any row toggles its checkbox
50
- */
51
- variant?: "default" | "selectable";
52
- /** If true, strips outer card chrome to fit inside an Accordion parent. */
53
- isAccordion?: boolean;
54
- /** If true, strips outer card chrome to fit inside a Toolbar/Container parent. */
55
- isToolbar?: boolean;
56
- /** Table size. Defaults to 'middle'. */
57
- size?: "small" | "middle" | "large";
58
- /** Extra class applied on the outermost wrapper div. */
59
- className?: string;
60
- /** AntD pagination config. Pass `false` to hide pagination. */
61
- pagination?: TablePaginationConfig | boolean;
62
- /**
63
- * Column definitions. Add `headerProps` to any column to get sort/filter icons
64
- * rendered automatically in the column header.
65
- */
66
- columns?: LuminaColumnsType<RecordType>;
67
- /** Total number of items in the dataset (for server-side pagination). */
68
- total?: number;
69
- /** Current page number (1-indexed). */
70
- current?: number;
71
- /** Number of rows per page. */
72
- pageSize?: number;
73
- /** Called when the page or page size changes. */
74
- onPaginationChange?: TablePaginationConfig["onChange"];
75
- /**
76
- * Custom content to show when the table has no data.
77
- * If provided, it overrides the default Ant Design "No Data" view.
78
- */
79
- emptyState?: React.ReactNode;
80
- /**
81
- * If true, the table header (the row with column labels) will be hidden.
82
- * Useful during loading or for specific visual variants.
83
- */
84
- hideHeader?: boolean;
85
- /**
86
- * Custom loading indicator (e.g. a spinner or skeleton).
87
- * If provided, this will be rendered when the table is in a loading state.
88
- */
89
- loadingIndicator?: React.ReactElement;
90
- }
91
-
92
- /**
93
- * Lumina Table component.
94
- *
95
- * Variants:
96
- * - `default` – standalone table card with rounded border
97
- * - `hover` – row highlight on mouse-over
98
- * - `selectable` – use with `rowSelection`; clicking any row toggles its checkbox
99
- * - `accordion-child` – strips outer card chrome; place inside your own accordion wrapper
100
- * - `toolbar-child` – strips outer card chrome; place inside your own toolbar/container wrapper
101
- *
102
- * Column header icons — add `headerProps` to any column definition:
103
- * ```tsx
104
- * columns={[{
105
- * key: "name", dataIndex: "name", title: "Name",
106
- * headerProps: {
107
- * sortable: true,
108
- * sortOrder: sortOrders.name,
109
- * onSortChange: (order) => setSortOrders(prev => ({ ...prev, name: order })),
110
- * filterCount: activeFilters.name ?? 0,
111
- * filterContent: <MyFilterPanel />,
112
- * },
113
- * }]}
114
- * ```
115
- */
116
- declare function Table<RecordType extends object = any>(props: TableProps<RecordType>): React.JSX.Element;
117
- declare namespace Table {
118
- var displayName: string;
119
- }
120
-
121
- export { type LuminaColumnHeaderProps as L, type SortOrder as S, Table as T, type LuminaColumnType as a, type LuminaColumnsType as b, type TableProps as c };
@@ -1,82 +0,0 @@
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
- /** MUST be provided if sortable is true, otherwise no icon renders. */
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 };
@@ -1,82 +0,0 @@
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
- /** MUST be provided if sortable is true, otherwise no icon renders. */
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 };
@@ -1,82 +0,0 @@
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 };