@itilite/lumina-ui 1.0.1 → 1.0.3-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -10
- package/dist/AdvancedDateRangePicker-D7xn4So6.d.mts +59 -0
- package/dist/AdvancedDateRangePicker-D7xn4So6.d.ts +59 -0
- package/dist/AdvancedDateRangePicker-ozItnkhp.d.mts +57 -0
- package/dist/AdvancedDateRangePicker-ozItnkhp.d.ts +57 -0
- package/dist/Table-BOq-_9Nr.d.mts +121 -0
- package/dist/Table-BOq-_9Nr.d.ts +121 -0
- package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.d.mts +2 -0
- package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.d.ts +2 -0
- package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.js +1610 -0
- package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.mjs +15 -0
- package/dist/atom/AdvancedDateRangePicker/InternalCalendar.d.mts +17 -0
- package/dist/atom/AdvancedDateRangePicker/InternalCalendar.d.ts +17 -0
- package/dist/atom/AdvancedDateRangePicker/InternalCalendar.js +370 -0
- package/dist/atom/AdvancedDateRangePicker/InternalCalendar.mjs +8 -0
- package/dist/{Avatar.d.mts → atom/Avatar/Avatar.d.mts} +1 -9
- package/dist/{Avatar.d.ts → atom/Avatar/Avatar.d.ts} +1 -9
- package/dist/{Avatar.js → atom/Avatar/Avatar.js} +4 -2
- package/dist/{Avatar.mjs → atom/Avatar/Avatar.mjs} +2 -2
- package/dist/{Button.js → atom/Button/Button.js} +1 -1
- package/dist/{Button.mjs → atom/Button/Button.mjs} +2 -2
- package/dist/{Checkbox.mjs → atom/Checkbox/Checkbox.mjs} +2 -2
- package/dist/atom/LoadingSpinner/LoadingSpinner.d.mts +19 -0
- package/dist/atom/LoadingSpinner/LoadingSpinner.d.ts +19 -0
- package/dist/atom/LoadingSpinner/LoadingSpinner.js +90 -0
- package/dist/atom/LoadingSpinner/LoadingSpinner.mjs +9 -0
- package/dist/{Modal.d.mts → atom/Modal/Modal.d.mts} +1 -1
- package/dist/{Modal.d.ts → atom/Modal/Modal.d.ts} +1 -1
- package/dist/{Modal.js → atom/Modal/Modal.js} +1 -1
- package/dist/atom/Modal/Modal.mjs +10 -0
- package/dist/{Radio.mjs → atom/Radio/Radio.mjs} +2 -2
- package/dist/atom/RangePicker/Chevron.d.mts +13 -0
- package/dist/atom/RangePicker/Chevron.d.ts +13 -0
- package/dist/atom/RangePicker/Chevron.js +110 -0
- package/dist/atom/RangePicker/Chevron.mjs +7 -0
- package/dist/atom/RangePicker/RangePicker.d.mts +26 -0
- package/dist/atom/RangePicker/RangePicker.d.ts +26 -0
- package/dist/atom/RangePicker/RangePicker.js +1465 -0
- package/dist/atom/RangePicker/RangePicker.mjs +13 -0
- package/dist/atom/Select/Select.d.mts +40 -0
- package/dist/atom/Select/Select.d.ts +40 -0
- package/dist/atom/Select/Select.js +805 -0
- package/dist/atom/Select/Select.mjs +11 -0
- package/dist/atom/Slider/Slider.d.mts +34 -0
- package/dist/atom/Slider/Slider.d.ts +34 -0
- package/dist/atom/Slider/Slider.js +107 -0
- package/dist/atom/Slider/Slider.mjs +9 -0
- package/dist/{Switch.mjs → atom/Switch/Switch.mjs} +2 -2
- package/dist/atom/Table/Table.d.mts +3 -0
- package/dist/atom/Table/Table.d.ts +3 -0
- package/dist/atom/Table/Table.js +307 -0
- package/dist/atom/Table/Table.mjs +9 -0
- package/dist/atom/Tag/Tag.d.mts +6 -0
- package/dist/atom/Tag/Tag.d.ts +6 -0
- package/dist/atom/Tag/Tag.js +108 -0
- package/dist/atom/Tag/Tag.mjs +9 -0
- package/dist/{Tooltip.mjs → atom/Tooltip/Tooltip.mjs} +2 -2
- package/dist/chunk-27LRL4RO.mjs +428 -0
- package/dist/chunk-3HXZIFV6.mjs +438 -0
- package/dist/chunk-4JX54OKI.mjs +627 -0
- package/dist/chunk-4VZB2KR2.mjs +51 -0
- package/dist/chunk-53O7JM5I.mjs +424 -0
- package/dist/chunk-62VAYFZA.mjs +437 -0
- package/dist/chunk-6ON32H2N.mjs +431 -0
- package/dist/chunk-6XIT27XY.mjs +269 -0
- package/dist/chunk-772C454L.mjs +438 -0
- package/dist/chunk-7L267Y4P.mjs +429 -0
- package/dist/chunk-7WSVCE2C.mjs +269 -0
- package/dist/{chunk-HISCHZ5H.mjs → chunk-AF2RKLH6.mjs} +1 -1
- package/dist/chunk-BFFLWW7N.mjs +250 -0
- package/dist/chunk-D3N7VFER.mjs +73 -0
- package/dist/chunk-FTL3PFC2.mjs +438 -0
- package/dist/chunk-GU5F7Z7I.mjs +681 -0
- package/dist/chunk-GZ4P7OL3.mjs +429 -0
- package/dist/{chunk-X76GNSBB.mjs → chunk-IWO2Y5QX.mjs} +4 -2
- package/dist/chunk-J4YYP4IZ.mjs +0 -0
- package/dist/chunk-K2A4TWA3.mjs +430 -0
- package/dist/chunk-L3L42SIL.mjs +429 -0
- package/dist/chunk-MA23J4WQ.mjs +430 -0
- package/dist/chunk-N2WTNCQU.mjs +66 -0
- package/dist/chunk-N4DPPZVJ.mjs +269 -0
- package/dist/chunk-PQ3B2FEB.mjs +249 -0
- package/dist/chunk-QKTMWS4J.mjs +43 -0
- package/dist/chunk-QRGHJP7U.mjs +437 -0
- package/dist/chunk-RC6IGURJ.mjs +428 -0
- package/dist/chunk-TQDZWJZP.mjs +269 -0
- package/dist/{chunk-N355RJGH.mjs → chunk-UQJ3BDM4.mjs} +1 -1
- package/dist/chunk-V3CHJHUX.mjs +424 -0
- package/dist/chunk-ZGV6QMVM.mjs +437 -0
- package/dist/chunk-ZTRM4HZJ.mjs +53 -0
- package/dist/index.d.mts +18 -7
- package/dist/index.d.ts +18 -7
- package/dist/index.js +2470 -8
- package/dist/index.mjs +44 -10
- package/dist/molecules/UserProfile/UserProfile.d.mts +23 -0
- package/dist/molecules/UserProfile/UserProfile.d.ts +23 -0
- package/dist/molecules/UserProfile/UserProfile.js +243 -0
- package/dist/molecules/UserProfile/UserProfile.mjs +11 -0
- package/dist/styles.css +1891 -907
- package/dist/types-D4MD2w3_.d.mts +9 -0
- package/dist/types-D4MD2w3_.d.ts +9 -0
- package/dist/types-mhQmqhsR.d.mts +10 -0
- package/dist/types-mhQmqhsR.d.ts +10 -0
- package/package.json +9 -32
- package/dist/Modal.mjs +0 -10
- package/dist/chunk-2O2IH2FG.mjs +0 -83
- package/dist/styles.d.mts +0 -2
- package/dist/styles.d.ts +0 -2
- /package/dist/{Button.d.mts → atom/Button/Button.d.mts} +0 -0
- /package/dist/{Button.d.ts → atom/Button/Button.d.ts} +0 -0
- /package/dist/{Checkbox.d.mts → atom/Checkbox/Checkbox.d.mts} +0 -0
- /package/dist/{Checkbox.d.ts → atom/Checkbox/Checkbox.d.ts} +0 -0
- /package/dist/{Checkbox.js → atom/Checkbox/Checkbox.js} +0 -0
- /package/dist/{Radio.d.mts → atom/Radio/Radio.d.mts} +0 -0
- /package/dist/{Radio.d.ts → atom/Radio/Radio.d.ts} +0 -0
- /package/dist/{Radio.js → atom/Radio/Radio.js} +0 -0
- /package/dist/{Switch.d.mts → atom/Switch/Switch.d.mts} +0 -0
- /package/dist/{Switch.d.ts → atom/Switch/Switch.d.ts} +0 -0
- /package/dist/{Switch.js → atom/Switch/Switch.js} +0 -0
- /package/dist/{Tooltip.d.mts → atom/Tooltip/Tooltip.d.mts} +0 -0
- /package/dist/{Tooltip.d.ts → atom/Tooltip/Tooltip.d.ts} +0 -0
- /package/dist/{Tooltip.js → atom/Tooltip/Tooltip.js} +0 -0
package/README.md
CHANGED
|
@@ -22,6 +22,43 @@ npm install react antd
|
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
|
+
### Prerequisites
|
|
26
|
+
|
|
27
|
+
This component library requires Tailwind CSS to be set up in your consuming application. The components use Tailwind utility classes and will not be styled without it.
|
|
28
|
+
|
|
29
|
+
#### Setting up Tailwind CSS in your app
|
|
30
|
+
|
|
31
|
+
1. Install Tailwind CSS:
|
|
32
|
+
```bash
|
|
33
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
34
|
+
npx tailwindcss init
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. Configure Tailwind to scan your app (you don't need to scan the component library):
|
|
38
|
+
```js
|
|
39
|
+
// tailwind.config.js
|
|
40
|
+
module.exports = {
|
|
41
|
+
content: [
|
|
42
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
43
|
+
// No need to scan node_modules - component utilities are pre-compiled
|
|
44
|
+
],
|
|
45
|
+
theme: {
|
|
46
|
+
extend: {},
|
|
47
|
+
},
|
|
48
|
+
plugins: [],
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
3. Add Tailwind directives to your main CSS file:
|
|
53
|
+
```css
|
|
54
|
+
/* app.css or index.css */
|
|
55
|
+
@tailwind base;
|
|
56
|
+
@tailwind components;
|
|
57
|
+
@tailwind utilities;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Important:** The component library includes only the Tailwind utilities it uses. Your app must provide the base/reset styles via `@tailwind base`.
|
|
61
|
+
|
|
25
62
|
### Importing Components
|
|
26
63
|
|
|
27
64
|
You can import components individually (recommended for tree-shaking):
|
|
@@ -29,21 +66,20 @@ You can import components individually (recommended for tree-shaking):
|
|
|
29
66
|
```tsx
|
|
30
67
|
import { Button } from '@itilite/lumina-ui/button';
|
|
31
68
|
import { Checkbox } from '@itilite/lumina-ui/checkbox';
|
|
32
|
-
import '@itilite/lumina-ui/styles.css';
|
|
69
|
+
import '@itilite/lumina-ui/styles.css'; // Import component styles
|
|
33
70
|
```
|
|
34
71
|
|
|
35
72
|
Or import all components from the main entry point:
|
|
36
73
|
|
|
37
74
|
```tsx
|
|
38
75
|
import { Button, Checkbox } from '@itilite/lumina-ui';
|
|
39
|
-
import '@itilite/lumina-ui/styles.css';
|
|
76
|
+
import '@itilite/lumina-ui/styles.css'; // Import component styles
|
|
40
77
|
```
|
|
41
78
|
|
|
42
79
|
### Button Component
|
|
43
80
|
|
|
44
81
|
```tsx
|
|
45
82
|
import { Button } from '@itilite/lumina-ui/button';
|
|
46
|
-
import '@itilite/lumina-ui/styles.css';
|
|
47
83
|
|
|
48
84
|
function App() {
|
|
49
85
|
return (
|
|
@@ -58,7 +94,6 @@ function App() {
|
|
|
58
94
|
|
|
59
95
|
```tsx
|
|
60
96
|
import { Checkbox } from '@itilite/lumina-ui/checkbox';
|
|
61
|
-
import '@itilite/lumina-ui/styles.css';
|
|
62
97
|
|
|
63
98
|
function App() {
|
|
64
99
|
return (
|
|
@@ -69,13 +104,11 @@ function App() {
|
|
|
69
104
|
}
|
|
70
105
|
```
|
|
71
106
|
|
|
72
|
-
##
|
|
107
|
+
## Requirements
|
|
73
108
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
import '@itilite/lumina-ui/styles.css';
|
|
78
|
-
```
|
|
109
|
+
- **Tailwind CSS**: This library requires Tailwind CSS to be configured in your consuming application
|
|
110
|
+
- **React**: 18+
|
|
111
|
+
- **Ant Design**: 5.13.1
|
|
79
112
|
|
|
80
113
|
## Available Components
|
|
81
114
|
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
/** Initial active preset key. Defaults to "custom". e.g. "this-month", "yesterday" */
|
|
51
|
+
defaultPreset?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare function AdvancedDateRangePicker({ value, onChange, confirmLabel, className, disabled, disablePastDates, minDate, maxDate, showSingleCalendar, id, defaultTimezone, isTimezoneDisabled, timezoneOptions, defaultPreset, }: DateRangePickerProps): React.JSX.Element;
|
|
55
|
+
declare namespace AdvancedDateRangePicker {
|
|
56
|
+
var displayName: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { AdvancedDateRangePicker as A, type DateRangePickerProps as D, type PresetOption as P, type TimeValue as T, type DateRangeValue as a, type TimezoneOption as b };
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
/** Initial active preset key. Defaults to "custom". e.g. "this-month", "yesterday" */
|
|
51
|
+
defaultPreset?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare function AdvancedDateRangePicker({ value, onChange, confirmLabel, className, disabled, disablePastDates, minDate, maxDate, showSingleCalendar, id, defaultTimezone, isTimezoneDisabled, timezoneOptions, defaultPreset, }: DateRangePickerProps): React.JSX.Element;
|
|
55
|
+
declare namespace AdvancedDateRangePicker {
|
|
56
|
+
var displayName: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { AdvancedDateRangePicker as A, type DateRangePickerProps as D, type PresetOption as P, type TimeValue as T, type DateRangeValue as a, type TimezoneOption as b };
|
|
@@ -0,0 +1,57 @@
|
|
|
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 };
|
|
@@ -0,0 +1,57 @@
|
|
|
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 };
|
|
@@ -0,0 +1,121 @@
|
|
|
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 };
|
|
@@ -0,0 +1,121 @@
|
|
|
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 };
|