@orion-ds/react 2.0.2 → 2.0.4
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 +10 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +28 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +95 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts.map +1 -0
- package/dist/components/AlertDialog/index.d.ts +21 -0
- package/dist/components/AlertDialog/index.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +22 -0
- package/dist/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.types.d.ts +79 -0
- package/dist/components/Calendar/Calendar.types.d.ts.map +1 -0
- package/dist/components/Calendar/index.d.ts +14 -0
- package/dist/components/Calendar/index.d.ts.map +1 -0
- package/dist/components/Chart/Chart.d.ts +60 -0
- package/dist/components/Chart/Chart.d.ts.map +1 -0
- package/dist/components/Chart/Chart.types.d.ts +140 -0
- package/dist/components/Chart/Chart.types.d.ts.map +1 -0
- package/dist/components/Chart/index.d.ts +22 -0
- package/dist/components/Chart/index.d.ts.map +1 -0
- package/dist/components/Command/Command.d.ts +35 -0
- package/dist/components/Command/Command.d.ts.map +1 -0
- package/dist/components/Command/Command.types.d.ts +155 -0
- package/dist/components/Command/Command.types.d.ts.map +1 -0
- package/dist/components/Command/index.d.ts +21 -0
- package/dist/components/Command/index.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +17 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts +80 -0
- package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -0
- package/dist/components/DatePicker/index.d.ts +14 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/index.cjs +91 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +39596 -26360
- package/dist/index.mjs.map +1 -1
- package/dist/react.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -20,6 +20,16 @@ TypeScript-first React component library built on the Orion Design System. Featu
|
|
|
20
20
|
- ♿ **Accessible** - WCAG AA compliant
|
|
21
21
|
- 📦 **Tree-Shakeable** - ESM + CJS
|
|
22
22
|
|
|
23
|
+
## Compatibility
|
|
24
|
+
|
|
25
|
+
| Dependency | Supported Versions |
|
|
26
|
+
|------------|-------------------|
|
|
27
|
+
| **React** | `^18.0.0 \|\| ^19.0.0` |
|
|
28
|
+
| **React DOM** | `^18.0.0 \|\| ^19.0.0` |
|
|
29
|
+
| **@orion-ds/core** | `^1.2.0` |
|
|
30
|
+
|
|
31
|
+
The library uses standard React APIs (`forwardRef`, `useState`, `useEffect`, `useContext`, `useRef`, etc.) and does not rely on React 19-exclusive features, so it works with both React 18 and 19.
|
|
32
|
+
|
|
23
33
|
## Installation
|
|
24
34
|
|
|
25
35
|
### Option A: npm install (full library)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AlertDialog Component
|
|
3
|
+
*
|
|
4
|
+
* A confirmation dialog that forces a user response.
|
|
5
|
+
* Unlike Modal, it does NOT close on backdrop click or Escape by default.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <AlertDialog open={open} onClose={handleClose}>
|
|
10
|
+
* <AlertDialog.Icon variant="danger" />
|
|
11
|
+
* <AlertDialog.Title>Delete account?</AlertDialog.Title>
|
|
12
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
13
|
+
* <AlertDialog.Actions>
|
|
14
|
+
* <Button variant="ghost" onClick={handleClose}>Cancel</Button>
|
|
15
|
+
* <Button variant="primary" onClick={handleConfirm}>Delete</Button>
|
|
16
|
+
* </AlertDialog.Actions>
|
|
17
|
+
* </AlertDialog>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import React from 'react';
|
|
21
|
+
import type { AlertDialogProps, AlertDialogIconProps, AlertDialogTitleProps, AlertDialogDescriptionProps, AlertDialogActionsProps } from './AlertDialog.types';
|
|
22
|
+
export declare const AlertDialog: React.FC<AlertDialogProps> & {
|
|
23
|
+
Icon: React.FC<AlertDialogIconProps>;
|
|
24
|
+
Title: React.FC<AlertDialogTitleProps>;
|
|
25
|
+
Description: React.FC<AlertDialogDescriptionProps>;
|
|
26
|
+
Actions: React.FC<AlertDialogActionsProps>;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=AlertDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAsD,MAAM,OAAO,CAAC;AAG3E,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAsB7B,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,GAAG;IACrD,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;IACvC,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC;IACnD,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,CAAC;CAgE5C,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AlertDialog Component Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the Orion AlertDialog component.
|
|
5
|
+
* Unlike Modal, AlertDialog forces a user response (no close on backdrop/escape by default).
|
|
6
|
+
*/
|
|
7
|
+
import type { ReactNode } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* AlertDialog variant — controls accent color of icon
|
|
10
|
+
*/
|
|
11
|
+
export type AlertDialogVariant = 'info' | 'warning' | 'danger';
|
|
12
|
+
/**
|
|
13
|
+
* AlertDialog component props
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <AlertDialog open={open} onClose={handleClose}>
|
|
18
|
+
* <AlertDialog.Icon variant="danger" />
|
|
19
|
+
* <AlertDialog.Title>Delete account?</AlertDialog.Title>
|
|
20
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
21
|
+
* <AlertDialog.Actions>
|
|
22
|
+
* <Button variant="ghost" onClick={handleClose}>Cancel</Button>
|
|
23
|
+
* <Button variant="primary" onClick={handleConfirm}>Delete</Button>
|
|
24
|
+
* </AlertDialog.Actions>
|
|
25
|
+
* </AlertDialog>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export interface AlertDialogProps {
|
|
29
|
+
/**
|
|
30
|
+
* Whether the dialog is open
|
|
31
|
+
*/
|
|
32
|
+
open: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Callback when dialog should close
|
|
35
|
+
*/
|
|
36
|
+
onClose: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Close on backdrop click
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
closeOnBackdrop?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Close on Escape key
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
closeOnEscape?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Dialog content (use compound components)
|
|
49
|
+
*/
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* Additional class name
|
|
53
|
+
*/
|
|
54
|
+
className?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* AlertDialog.Icon props
|
|
58
|
+
*/
|
|
59
|
+
export interface AlertDialogIconProps {
|
|
60
|
+
/**
|
|
61
|
+
* Visual variant — controls icon and color
|
|
62
|
+
* @default 'info'
|
|
63
|
+
*/
|
|
64
|
+
variant?: AlertDialogVariant;
|
|
65
|
+
/**
|
|
66
|
+
* Custom icon (overrides default)
|
|
67
|
+
*/
|
|
68
|
+
icon?: ReactNode;
|
|
69
|
+
/**
|
|
70
|
+
* Additional class name
|
|
71
|
+
*/
|
|
72
|
+
className?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* AlertDialog.Title props
|
|
76
|
+
*/
|
|
77
|
+
export interface AlertDialogTitleProps {
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
className?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* AlertDialog.Description props
|
|
83
|
+
*/
|
|
84
|
+
export interface AlertDialogDescriptionProps {
|
|
85
|
+
children?: ReactNode;
|
|
86
|
+
className?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* AlertDialog.Actions props
|
|
90
|
+
*/
|
|
91
|
+
export interface AlertDialogActionsProps {
|
|
92
|
+
children?: ReactNode;
|
|
93
|
+
className?: string;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=AlertDialog.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.types.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/AlertDialog.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AlertDialog Component - Confirmation dialogs that force a user response.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* import { AlertDialog, Button } from '@orion-ds/react';
|
|
7
|
+
*
|
|
8
|
+
* <AlertDialog open={open} onClose={handleClose}>
|
|
9
|
+
* <AlertDialog.Icon variant="danger" />
|
|
10
|
+
* <AlertDialog.Title>Delete account?</AlertDialog.Title>
|
|
11
|
+
* <AlertDialog.Description>This action cannot be undone.</AlertDialog.Description>
|
|
12
|
+
* <AlertDialog.Actions>
|
|
13
|
+
* <Button variant="ghost" onClick={handleClose}>Cancel</Button>
|
|
14
|
+
* <Button variant="primary" onClick={handleConfirm}>Delete</Button>
|
|
15
|
+
* </AlertDialog.Actions>
|
|
16
|
+
* </AlertDialog>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export { AlertDialog } from './AlertDialog';
|
|
20
|
+
export type { AlertDialogProps, AlertDialogVariant, AlertDialogIconProps, AlertDialogTitleProps, AlertDialogDescriptionProps, AlertDialogActionsProps, } from './AlertDialog.types';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AlertDialog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendar Component
|
|
3
|
+
*
|
|
4
|
+
* A date picker grid supporting single, range, and multiple selection.
|
|
5
|
+
* Built without react-day-picker — uses date-fns for date manipulation.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* // Single date
|
|
10
|
+
* <Calendar selected={date} onSelect={setDate} />
|
|
11
|
+
*
|
|
12
|
+
* // Range
|
|
13
|
+
* <Calendar mode="range" selected={range} onSelect={setRange} />
|
|
14
|
+
*
|
|
15
|
+
* // Multiple
|
|
16
|
+
* <Calendar mode="multiple" selected={dates} onSelect={setDates} />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import React from 'react';
|
|
20
|
+
import type { CalendarProps } from './Calendar.types';
|
|
21
|
+
export declare const Calendar: React.FC<CalendarProps>;
|
|
22
|
+
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAgD,MAAM,OAAO,CAAC;AAkBrE,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAW1B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAuN5C,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendar Component Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the Orion Calendar component.
|
|
5
|
+
* Supports single, range, and multiple date selection.
|
|
6
|
+
*/
|
|
7
|
+
import type { HTMLAttributes } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* Date range value
|
|
10
|
+
*/
|
|
11
|
+
export interface DateRange {
|
|
12
|
+
from: Date | undefined;
|
|
13
|
+
to: Date | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Calendar selection mode
|
|
17
|
+
*/
|
|
18
|
+
export type CalendarMode = 'single' | 'range' | 'multiple';
|
|
19
|
+
/**
|
|
20
|
+
* Base calendar props shared across all modes
|
|
21
|
+
*/
|
|
22
|
+
interface CalendarBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
23
|
+
/**
|
|
24
|
+
* Minimum selectable date
|
|
25
|
+
*/
|
|
26
|
+
min?: Date;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum selectable date
|
|
29
|
+
*/
|
|
30
|
+
max?: Date;
|
|
31
|
+
/**
|
|
32
|
+
* Disabled dates — array of dates or predicate function
|
|
33
|
+
*/
|
|
34
|
+
disabled?: Date[] | ((date: Date) => boolean);
|
|
35
|
+
/**
|
|
36
|
+
* Day the week starts on (0 = Sunday, 1 = Monday, etc.)
|
|
37
|
+
* @default 0
|
|
38
|
+
*/
|
|
39
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
40
|
+
/**
|
|
41
|
+
* Show days from adjacent months
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
showOutsideDays?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Additional class name
|
|
47
|
+
*/
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Single date selection
|
|
52
|
+
*/
|
|
53
|
+
export interface CalendarSingleProps extends CalendarBaseProps {
|
|
54
|
+
mode?: 'single';
|
|
55
|
+
selected?: Date;
|
|
56
|
+
onSelect?: (date: Date | undefined) => void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Range date selection
|
|
60
|
+
*/
|
|
61
|
+
export interface CalendarRangeProps extends CalendarBaseProps {
|
|
62
|
+
mode: 'range';
|
|
63
|
+
selected?: DateRange;
|
|
64
|
+
onSelect?: (range: DateRange | undefined) => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Multiple date selection
|
|
68
|
+
*/
|
|
69
|
+
export interface CalendarMultipleProps extends CalendarBaseProps {
|
|
70
|
+
mode: 'multiple';
|
|
71
|
+
selected?: Date[];
|
|
72
|
+
onSelect?: (dates: Date[]) => void;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Union type for all calendar modes
|
|
76
|
+
*/
|
|
77
|
+
export type CalendarProps = CalendarSingleProps | CalendarRangeProps | CalendarMultipleProps;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=Calendar.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.types.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,SAAS;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I,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,mBAAmB,GACnB,kBAAkB,GAClB,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendar Component - Date selection with single, range, and multiple modes.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* import { Calendar } from '@orion-ds/react';
|
|
7
|
+
*
|
|
8
|
+
* <Calendar selected={date} onSelect={setDate} />
|
|
9
|
+
* <Calendar mode="range" selected={range} onSelect={setRange} />
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export { Calendar } from './Calendar';
|
|
13
|
+
export type { CalendarProps, CalendarMode, CalendarSingleProps, CalendarRangeProps, CalendarMultipleProps, DateRange, } from './Calendar.types';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,SAAS,GACV,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart Component
|
|
3
|
+
*
|
|
4
|
+
* Lightweight wrapper around Recharts providing Orion token theming.
|
|
5
|
+
* Does NOT wrap Recharts — user accesses Recharts components directly.
|
|
6
|
+
* Provides: ChartContainer (CSS variable injection), ChartTooltipContent,
|
|
7
|
+
* and ChartLegendContent styled with Orion tokens.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const config: ChartConfig = {
|
|
12
|
+
* revenue: { label: 'Revenue', color: 'var(--color-brand-500)' },
|
|
13
|
+
* expenses: { label: 'Expenses', color: 'var(--status-error)' },
|
|
14
|
+
* };
|
|
15
|
+
*
|
|
16
|
+
* <ChartContainer config={config}>
|
|
17
|
+
* <BarChart data={data}>
|
|
18
|
+
* <XAxis dataKey="month" />
|
|
19
|
+
* <YAxis />
|
|
20
|
+
* <ChartTooltip content={<ChartTooltipContent />} />
|
|
21
|
+
* <ChartLegend content={<ChartLegendContent />} />
|
|
22
|
+
* <Bar dataKey="revenue" fill="var(--color-revenue)" />
|
|
23
|
+
* </BarChart>
|
|
24
|
+
* </ChartContainer>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import React from 'react';
|
|
28
|
+
import { Tooltip, Legend } from 'recharts';
|
|
29
|
+
import type { ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartGradientProps } from './Chart.types';
|
|
30
|
+
/**
|
|
31
|
+
* ChartContainer — wraps Recharts with CSS variable injection from config
|
|
32
|
+
*/
|
|
33
|
+
export declare const ChartContainer: React.FC<ChartContainerProps>;
|
|
34
|
+
/**
|
|
35
|
+
* ChartTooltipContent — Orion-styled tooltip for Recharts
|
|
36
|
+
*/
|
|
37
|
+
export declare const ChartTooltipContent: React.FC<ChartTooltipContentProps>;
|
|
38
|
+
/**
|
|
39
|
+
* ChartLegendContent — Orion-styled legend for Recharts
|
|
40
|
+
*/
|
|
41
|
+
export declare const ChartLegendContent: React.FC<ChartLegendContentProps>;
|
|
42
|
+
/**
|
|
43
|
+
* ChartGradient — SVG linearGradient helper for elegant area chart fills.
|
|
44
|
+
*
|
|
45
|
+
* Place inside `<defs>` within a Recharts chart, then reference via `fill="url(#id)"`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <AreaChart data={data}>
|
|
50
|
+
* <defs>
|
|
51
|
+
* <ChartGradient id="fillRevenue" color="var(--chart-1)" />
|
|
52
|
+
* </defs>
|
|
53
|
+
* <Area dataKey="revenue" fill="url(#fillRevenue)" fillOpacity={1} />
|
|
54
|
+
* </AreaChart>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare const ChartGradient: React.FC<ChartGradientProps>;
|
|
58
|
+
export declare const ChartTooltip: typeof Tooltip;
|
|
59
|
+
export declare const ChartLegend: typeof Legend;
|
|
60
|
+
//# sourceMappingURL=Chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/components/Chart/Chart.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAuB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAEV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAMvB;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkCxD,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAwDlE,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8BhE,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAUtD,CAAC;AAKF,eAAO,MAAM,YAAY,gBAAU,CAAC;AACpC,eAAO,MAAM,WAAW,eAAS,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart Component Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the Orion Chart wrapper components.
|
|
5
|
+
* Provides themed containers, tooltips, and legends for Recharts.
|
|
6
|
+
*/
|
|
7
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for a single data series in a chart
|
|
10
|
+
*/
|
|
11
|
+
export interface ChartConfigItem {
|
|
12
|
+
/**
|
|
13
|
+
* Display label for the series
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* CSS color value or token variable (e.g., 'var(--color-brand-500)')
|
|
18
|
+
*/
|
|
19
|
+
color: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional icon for the legend
|
|
22
|
+
*/
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Chart configuration object — maps data keys to display settings
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const config: ChartConfig = {
|
|
31
|
+
* revenue: { label: 'Revenue', color: 'var(--color-brand-500)' },
|
|
32
|
+
* expenses: { label: 'Expenses', color: 'var(--status-error)' },
|
|
33
|
+
* };
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export type ChartConfig = Record<string, ChartConfigItem>;
|
|
37
|
+
/**
|
|
38
|
+
* ChartContainer props — wraps Recharts with CSS variable injection
|
|
39
|
+
*/
|
|
40
|
+
export interface ChartContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
41
|
+
/**
|
|
42
|
+
* Chart configuration mapping data keys to colors/labels
|
|
43
|
+
*/
|
|
44
|
+
config: ChartConfig;
|
|
45
|
+
/**
|
|
46
|
+
* The Recharts chart element
|
|
47
|
+
*/
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Additional class name
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* ChartTooltipContent props
|
|
56
|
+
*/
|
|
57
|
+
export interface ChartTooltipContentProps {
|
|
58
|
+
/**
|
|
59
|
+
* Whether to show the color indicator dot
|
|
60
|
+
* @default true
|
|
61
|
+
*/
|
|
62
|
+
indicator?: 'dot' | 'line' | 'dashed';
|
|
63
|
+
/**
|
|
64
|
+
* Hide the label text
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
hideLabel?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Hide the indicator
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
hideIndicator?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Custom label formatter
|
|
75
|
+
*/
|
|
76
|
+
labelFormatter?: (label: string) => string;
|
|
77
|
+
/**
|
|
78
|
+
* Custom value formatter
|
|
79
|
+
*/
|
|
80
|
+
formatter?: (value: number, name: string) => string;
|
|
81
|
+
/**
|
|
82
|
+
* Additional class name
|
|
83
|
+
*/
|
|
84
|
+
className?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Recharts injected props (passed automatically)
|
|
87
|
+
*/
|
|
88
|
+
active?: boolean;
|
|
89
|
+
payload?: Array<{
|
|
90
|
+
name: string;
|
|
91
|
+
value: number;
|
|
92
|
+
dataKey: string;
|
|
93
|
+
color: string;
|
|
94
|
+
payload: Record<string, unknown>;
|
|
95
|
+
}>;
|
|
96
|
+
label?: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* ChartGradient props — SVG linearGradient helper for area charts
|
|
100
|
+
*/
|
|
101
|
+
export interface ChartGradientProps {
|
|
102
|
+
/**
|
|
103
|
+
* Unique ID for the gradient (referenced via `fill="url(#id)"`)
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
/**
|
|
107
|
+
* CSS color value or token variable
|
|
108
|
+
*/
|
|
109
|
+
color: string;
|
|
110
|
+
/**
|
|
111
|
+
* Opacity at the top of the gradient
|
|
112
|
+
* @default 0.8
|
|
113
|
+
*/
|
|
114
|
+
startOpacity?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Opacity at the bottom of the gradient
|
|
117
|
+
* @default 0.1
|
|
118
|
+
*/
|
|
119
|
+
endOpacity?: number;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* ChartLegendContent props
|
|
123
|
+
*/
|
|
124
|
+
export interface ChartLegendContentProps {
|
|
125
|
+
/**
|
|
126
|
+
* Additional class name
|
|
127
|
+
*/
|
|
128
|
+
className?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Recharts injected props (passed automatically)
|
|
131
|
+
*/
|
|
132
|
+
payload?: Array<{
|
|
133
|
+
value: string;
|
|
134
|
+
type: string;
|
|
135
|
+
id: string;
|
|
136
|
+
color: string;
|
|
137
|
+
dataKey: string;
|
|
138
|
+
}>;
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=Chart.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.types.d.ts","sourceRoot":"","sources":["../../../src/components/Chart/Chart.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACzE;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAG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,CAAC;CACJ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart Component - Orion-themed wrappers for Recharts.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* import { ChartContainer, ChartTooltipContent, ChartLegendContent } from '@orion-ds/react';
|
|
7
|
+
* import { BarChart, Bar, XAxis, YAxis, Tooltip, Legend } from 'recharts';
|
|
8
|
+
*
|
|
9
|
+
* <ChartContainer config={config}>
|
|
10
|
+
* <BarChart data={data}>
|
|
11
|
+
* <XAxis dataKey="month" />
|
|
12
|
+
* <YAxis />
|
|
13
|
+
* <Tooltip content={<ChartTooltipContent />} />
|
|
14
|
+
* <Legend content={<ChartLegendContent />} />
|
|
15
|
+
* <Bar dataKey="revenue" fill="var(--color-revenue)" />
|
|
16
|
+
* </BarChart>
|
|
17
|
+
* </ChartContainer>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export { ChartContainer, ChartTooltipContent, ChartLegendContent, ChartGradient, ChartTooltip, ChartLegend, } from './Chart';
|
|
21
|
+
export type { ChartConfig, ChartConfigItem, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, ChartGradientProps, } from './Chart.types';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chart/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Component
|
|
3
|
+
*
|
|
4
|
+
* A searchable command palette with keyboard navigation.
|
|
5
|
+
* Built without cmdk — uses internal context for search state and filtering.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Command>
|
|
10
|
+
* <Command.Input placeholder="Type a command..." />
|
|
11
|
+
* <Command.List>
|
|
12
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
13
|
+
* <Command.Group heading="Suggestions">
|
|
14
|
+
* <Command.Item onSelect={() => navigate('/calendar')}>
|
|
15
|
+
* <CalendarIcon size={16} /> Calendar
|
|
16
|
+
* <Command.Shortcut>⌘C</Command.Shortcut>
|
|
17
|
+
* </Command.Item>
|
|
18
|
+
* </Command.Group>
|
|
19
|
+
* </Command.List>
|
|
20
|
+
* </Command>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import type { CommandProps, CommandDialogProps, CommandInputProps, CommandListProps, CommandEmptyProps, CommandGroupProps, CommandItemProps, CommandSeparatorProps, CommandShortcutProps } from './Command.types';
|
|
25
|
+
export declare const Command: React.FC<CommandProps> & {
|
|
26
|
+
Input: React.FC<CommandInputProps>;
|
|
27
|
+
List: React.FC<CommandListProps>;
|
|
28
|
+
Empty: React.FC<CommandEmptyProps>;
|
|
29
|
+
Group: React.FC<CommandGroupProps>;
|
|
30
|
+
Item: React.FC<CommandItemProps>;
|
|
31
|
+
Separator: React.FC<CommandSeparatorProps>;
|
|
32
|
+
Shortcut: React.FC<CommandShortcutProps>;
|
|
33
|
+
Dialog: React.FC<CommandDialogProps>;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=Command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../../src/components/Command/Command.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KASN,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAqCzB,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG;IAC7C,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;IACnC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;IACnC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;IACnC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;IACjC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC;IACzC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;CAiGtC,CAAC"}
|