@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.
Files changed (40) hide show
  1. package/README.md +10 -0
  2. package/dist/components/AlertDialog/AlertDialog.d.ts +28 -0
  3. package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
  4. package/dist/components/AlertDialog/AlertDialog.types.d.ts +95 -0
  5. package/dist/components/AlertDialog/AlertDialog.types.d.ts.map +1 -0
  6. package/dist/components/AlertDialog/index.d.ts +21 -0
  7. package/dist/components/AlertDialog/index.d.ts.map +1 -0
  8. package/dist/components/Calendar/Calendar.d.ts +22 -0
  9. package/dist/components/Calendar/Calendar.d.ts.map +1 -0
  10. package/dist/components/Calendar/Calendar.types.d.ts +79 -0
  11. package/dist/components/Calendar/Calendar.types.d.ts.map +1 -0
  12. package/dist/components/Calendar/index.d.ts +14 -0
  13. package/dist/components/Calendar/index.d.ts.map +1 -0
  14. package/dist/components/Chart/Chart.d.ts +60 -0
  15. package/dist/components/Chart/Chart.d.ts.map +1 -0
  16. package/dist/components/Chart/Chart.types.d.ts +140 -0
  17. package/dist/components/Chart/Chart.types.d.ts.map +1 -0
  18. package/dist/components/Chart/index.d.ts +22 -0
  19. package/dist/components/Chart/index.d.ts.map +1 -0
  20. package/dist/components/Command/Command.d.ts +35 -0
  21. package/dist/components/Command/Command.d.ts.map +1 -0
  22. package/dist/components/Command/Command.types.d.ts +155 -0
  23. package/dist/components/Command/Command.types.d.ts.map +1 -0
  24. package/dist/components/Command/index.d.ts +21 -0
  25. package/dist/components/Command/index.d.ts.map +1 -0
  26. package/dist/components/DatePicker/DatePicker.d.ts +17 -0
  27. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
  28. package/dist/components/DatePicker/DatePicker.types.d.ts +80 -0
  29. package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -0
  30. package/dist/components/DatePicker/index.d.ts +14 -0
  31. package/dist/components/DatePicker/index.d.ts.map +1 -0
  32. package/dist/index.cjs +91 -52
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.ts +10 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.mjs +39596 -26360
  37. package/dist/index.mjs.map +1 -1
  38. package/dist/react.css +1 -1
  39. package/dist/styles.css +1 -1
  40. package/package.json +5 -3
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Command Component Types
3
+ *
4
+ * Type definitions for the Orion Command palette component.
5
+ * A searchable command menu with keyboard navigation.
6
+ */
7
+ import type { HTMLAttributes, ReactNode, InputHTMLAttributes } from 'react';
8
+ /**
9
+ * Command root props
10
+ */
11
+ export interface CommandProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
12
+ /**
13
+ * Controlled search value
14
+ */
15
+ value?: string;
16
+ /**
17
+ * Callback when search value changes
18
+ */
19
+ onValueChange?: (value: string) => void;
20
+ /**
21
+ * Custom filter function. Return 0 to hide, 1 to show.
22
+ * By default uses case-insensitive includes.
23
+ */
24
+ filter?: (value: string, search: string) => number;
25
+ /**
26
+ * Children (compound components)
27
+ */
28
+ children?: ReactNode;
29
+ /**
30
+ * Additional class name
31
+ */
32
+ className?: string;
33
+ }
34
+ /**
35
+ * Command.Dialog props — renders Command inside a modal overlay
36
+ */
37
+ export interface CommandDialogProps {
38
+ /**
39
+ * Whether the dialog is open
40
+ */
41
+ open: boolean;
42
+ /**
43
+ * Callback when open state changes
44
+ */
45
+ onOpenChange: (open: boolean) => void;
46
+ /**
47
+ * Children (Command compound components)
48
+ */
49
+ children?: ReactNode;
50
+ /**
51
+ * Additional class name
52
+ */
53
+ className?: string;
54
+ }
55
+ /**
56
+ * Command.Input props
57
+ */
58
+ export interface CommandInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {
59
+ /**
60
+ * Additional class name
61
+ */
62
+ className?: string;
63
+ }
64
+ /**
65
+ * Command.List props
66
+ */
67
+ export interface CommandListProps extends HTMLAttributes<HTMLDivElement> {
68
+ /**
69
+ * Children (groups and items)
70
+ */
71
+ children?: ReactNode;
72
+ /**
73
+ * Additional class name
74
+ */
75
+ className?: string;
76
+ }
77
+ /**
78
+ * Command.Empty props
79
+ */
80
+ export interface CommandEmptyProps {
81
+ /**
82
+ * Content to show when no results match
83
+ */
84
+ children?: ReactNode;
85
+ /**
86
+ * Additional class name
87
+ */
88
+ className?: string;
89
+ }
90
+ /**
91
+ * Command.Group props
92
+ */
93
+ export interface CommandGroupProps {
94
+ /**
95
+ * Group heading
96
+ */
97
+ heading?: string;
98
+ /**
99
+ * Group items
100
+ */
101
+ children?: ReactNode;
102
+ /**
103
+ * Additional class name
104
+ */
105
+ className?: string;
106
+ }
107
+ /**
108
+ * Command.Item props
109
+ */
110
+ export interface CommandItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
111
+ /**
112
+ * Callback when item is selected (click or Enter)
113
+ */
114
+ onSelect?: () => void;
115
+ /**
116
+ * Whether the item is disabled
117
+ * @default false
118
+ */
119
+ disabled?: boolean;
120
+ /**
121
+ * Search value for filtering (defaults to text content)
122
+ */
123
+ value?: string;
124
+ /**
125
+ * Children
126
+ */
127
+ children?: ReactNode;
128
+ /**
129
+ * Additional class name
130
+ */
131
+ className?: string;
132
+ }
133
+ /**
134
+ * Command.Separator props
135
+ */
136
+ export interface CommandSeparatorProps {
137
+ /**
138
+ * Additional class name
139
+ */
140
+ className?: string;
141
+ }
142
+ /**
143
+ * Command.Shortcut props
144
+ */
145
+ export interface CommandShortcutProps {
146
+ /**
147
+ * Keyboard shortcut text
148
+ */
149
+ children?: ReactNode;
150
+ /**
151
+ * Additional class name
152
+ */
153
+ className?: string;
154
+ }
155
+ //# sourceMappingURL=Command.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Command.types.d.ts","sourceRoot":"","sources":["../../../src/components/Command/Command.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,E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G;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACxF;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Command Component - Searchable command palette with keyboard navigation.
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * import { Command } from '@orion-ds/react';
7
+ *
8
+ * <Command>
9
+ * <Command.Input placeholder="Type a command..." />
10
+ * <Command.List>
11
+ * <Command.Empty>No results found.</Command.Empty>
12
+ * <Command.Group heading="Suggestions">
13
+ * <Command.Item onSelect={() => {}}>Calendar</Command.Item>
14
+ * </Command.Group>
15
+ * </Command.List>
16
+ * </Command>
17
+ * ```
18
+ */
19
+ export { Command } from './Command';
20
+ export type { CommandProps, CommandDialogProps, CommandInputProps, CommandListProps, CommandEmptyProps, CommandGroupProps, CommandItemProps, CommandSeparatorProps, CommandShortcutProps, } from './Command.types';
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Command/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * DatePicker Component
3
+ *
4
+ * Composes Popover + Calendar into a single date selection control.
5
+ * Supports single and range modes with optional presets.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <DatePicker selected={date} onSelect={setDate} placeholder="Pick a date" />
10
+ *
11
+ * <DatePicker mode="range" selected={range} onSelect={setRange} />
12
+ * ```
13
+ */
14
+ import React from 'react';
15
+ import type { DatePickerProps } from './DatePicker.types';
16
+ export declare const DatePicker: React.FC<DatePickerProps>;
17
+ //# sourceMappingURL=DatePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,oBAAoB,CAAC;AAG5E,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgJhD,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * DatePicker Component Types
3
+ *
4
+ * Type definitions for the Orion DatePicker component.
5
+ * Composes Calendar + Popover with formatted trigger display.
6
+ */
7
+ import type { DateRange } from '../Calendar/Calendar.types';
8
+ /**
9
+ * Preset option for quick date selection
10
+ */
11
+ export interface DatePickerPreset {
12
+ label: string;
13
+ value: Date | DateRange;
14
+ }
15
+ /**
16
+ * Base DatePicker props shared across modes
17
+ */
18
+ interface DatePickerBaseProps {
19
+ /**
20
+ * Minimum selectable date
21
+ */
22
+ min?: Date;
23
+ /**
24
+ * Maximum selectable date
25
+ */
26
+ max?: Date;
27
+ /**
28
+ * Disabled dates — array of dates or predicate function
29
+ */
30
+ disabledDates?: Date[] | ((date: Date) => boolean);
31
+ /**
32
+ * Placeholder text for the trigger button
33
+ * @default 'Pick a date'
34
+ */
35
+ placeholder?: string;
36
+ /**
37
+ * Quick-select presets (e.g., "Last 7 days")
38
+ */
39
+ presets?: DatePickerPreset[];
40
+ /**
41
+ * date-fns format string for displaying the selected date
42
+ * @default 'PPP'
43
+ */
44
+ format?: string;
45
+ /**
46
+ * Whether the trigger is disabled
47
+ * @default false
48
+ */
49
+ disabled?: boolean;
50
+ /**
51
+ * Additional class name for the trigger button
52
+ */
53
+ triggerClassName?: string;
54
+ /**
55
+ * Additional class name for the wrapper
56
+ */
57
+ className?: string;
58
+ }
59
+ /**
60
+ * Single date picker
61
+ */
62
+ export interface DatePickerSingleProps extends DatePickerBaseProps {
63
+ mode?: 'single';
64
+ selected?: Date;
65
+ onSelect?: (date: Date | undefined) => void;
66
+ }
67
+ /**
68
+ * Range date picker
69
+ */
70
+ export interface DatePickerRangeProps extends DatePickerBaseProps {
71
+ mode: 'range';
72
+ selected?: DateRange;
73
+ onSelect?: (range: DateRange | undefined) => void;
74
+ }
75
+ /**
76
+ * Union type for all DatePicker modes
77
+ */
78
+ export type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
79
+ export {};
80
+ //# sourceMappingURL=DatePicker.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatePicker.types.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,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*
4
+ * @example
5
+ * ```tsx
6
+ * import { DatePicker } from '@orion-ds/react';
7
+ *
8
+ * <DatePicker selected={date} onSelect={setDate} />
9
+ * <DatePicker mode="range" selected={range} onSelect={setRange} presets={presets} />
10
+ * ```
11
+ */
12
+ export { DatePicker } from './DatePicker';
13
+ export type { DatePickerProps, DatePickerSingleProps, DatePickerRangeProps, DatePickerPreset, } from './DatePicker.types';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC"}