@orion-ds/react 2.0.1 → 2.0.3

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 (106) hide show
  1. package/AI_COMPONENTS.md +68 -1
  2. package/AI_QUICKREF.md +1 -1
  3. package/README.md +14 -0
  4. package/dist/components/AlertDialog/AlertDialog.d.ts +28 -0
  5. package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
  6. package/dist/components/AlertDialog/AlertDialog.types.d.ts +95 -0
  7. package/dist/components/AlertDialog/AlertDialog.types.d.ts.map +1 -0
  8. package/dist/components/AlertDialog/index.d.ts +21 -0
  9. package/dist/components/AlertDialog/index.d.ts.map +1 -0
  10. package/dist/components/Calendar/Calendar.d.ts +22 -0
  11. package/dist/components/Calendar/Calendar.d.ts.map +1 -0
  12. package/dist/components/Calendar/Calendar.types.d.ts +79 -0
  13. package/dist/components/Calendar/Calendar.types.d.ts.map +1 -0
  14. package/dist/components/Calendar/index.d.ts +14 -0
  15. package/dist/components/Calendar/index.d.ts.map +1 -0
  16. package/dist/components/Chart/Chart.d.ts +44 -0
  17. package/dist/components/Chart/Chart.d.ts.map +1 -0
  18. package/dist/components/Chart/Chart.types.d.ts +117 -0
  19. package/dist/components/Chart/Chart.types.d.ts.map +1 -0
  20. package/dist/components/Chart/index.d.ts +22 -0
  21. package/dist/components/Chart/index.d.ts.map +1 -0
  22. package/dist/components/Chat/Chat.d.ts +45 -0
  23. package/dist/components/Chat/Chat.d.ts.map +1 -0
  24. package/dist/components/Chat/Chat.types.d.ts +392 -0
  25. package/dist/components/Chat/Chat.types.d.ts.map +1 -0
  26. package/dist/components/Chat/components/ChatAttachment.d.ts +10 -0
  27. package/dist/components/Chat/components/ChatAttachment.d.ts.map +1 -0
  28. package/dist/components/Chat/components/ChatAudioPlayer.d.ts +9 -0
  29. package/dist/components/Chat/components/ChatAudioPlayer.d.ts.map +1 -0
  30. package/dist/components/Chat/components/ChatCodeBlock.d.ts +10 -0
  31. package/dist/components/Chat/components/ChatCodeBlock.d.ts.map +1 -0
  32. package/dist/components/Chat/components/ChatFileUpload.d.ts +9 -0
  33. package/dist/components/Chat/components/ChatFileUpload.d.ts.map +1 -0
  34. package/dist/components/Chat/components/ChatHeader.d.ts +9 -0
  35. package/dist/components/Chat/components/ChatHeader.d.ts.map +1 -0
  36. package/dist/components/Chat/components/ChatImagePreview.d.ts +9 -0
  37. package/dist/components/Chat/components/ChatImagePreview.d.ts.map +1 -0
  38. package/dist/components/Chat/components/ChatInput.d.ts +10 -0
  39. package/dist/components/Chat/components/ChatInput.d.ts.map +1 -0
  40. package/dist/components/Chat/components/ChatLightbox.d.ts +9 -0
  41. package/dist/components/Chat/components/ChatLightbox.d.ts.map +1 -0
  42. package/dist/components/Chat/components/ChatMarkdown.d.ts +10 -0
  43. package/dist/components/Chat/components/ChatMarkdown.d.ts.map +1 -0
  44. package/dist/components/Chat/components/ChatMessage.d.ts +10 -0
  45. package/dist/components/Chat/components/ChatMessage.d.ts.map +1 -0
  46. package/dist/components/Chat/components/ChatMessages.d.ts +10 -0
  47. package/dist/components/Chat/components/ChatMessages.d.ts.map +1 -0
  48. package/dist/components/Chat/components/ChatSidebar.d.ts +10 -0
  49. package/dist/components/Chat/components/ChatSidebar.d.ts.map +1 -0
  50. package/dist/components/Chat/components/ChatTypingIndicator.d.ts +14 -0
  51. package/dist/components/Chat/components/ChatTypingIndicator.d.ts.map +1 -0
  52. package/dist/components/Chat/components/ChatVoiceRecorder.d.ts +9 -0
  53. package/dist/components/Chat/components/ChatVoiceRecorder.d.ts.map +1 -0
  54. package/dist/components/Chat/components/index.d.ts +18 -0
  55. package/dist/components/Chat/components/index.d.ts.map +1 -0
  56. package/dist/components/Chat/hooks/index.d.ts +12 -0
  57. package/dist/components/Chat/hooks/index.d.ts.map +1 -0
  58. package/dist/components/Chat/hooks/useAutoScroll.d.ts +24 -0
  59. package/dist/components/Chat/hooks/useAutoScroll.d.ts.map +1 -0
  60. package/dist/components/Chat/hooks/useChatInput.d.ts +43 -0
  61. package/dist/components/Chat/hooks/useChatInput.d.ts.map +1 -0
  62. package/dist/components/Chat/hooks/useStreamingText.d.ts +22 -0
  63. package/dist/components/Chat/hooks/useStreamingText.d.ts.map +1 -0
  64. package/dist/components/Chat/hooks/useVoiceRecorder.d.ts +31 -0
  65. package/dist/components/Chat/hooks/useVoiceRecorder.d.ts.map +1 -0
  66. package/dist/components/Chat/index.d.ts +28 -0
  67. package/dist/components/Chat/index.d.ts.map +1 -0
  68. package/dist/components/Chat/utils.d.ts +16 -0
  69. package/dist/components/Chat/utils.d.ts.map +1 -0
  70. package/dist/components/Command/Command.d.ts +35 -0
  71. package/dist/components/Command/Command.d.ts.map +1 -0
  72. package/dist/components/Command/Command.types.d.ts +155 -0
  73. package/dist/components/Command/Command.types.d.ts.map +1 -0
  74. package/dist/components/Command/index.d.ts +21 -0
  75. package/dist/components/Command/index.d.ts.map +1 -0
  76. package/dist/components/DatePicker/DatePicker.d.ts +17 -0
  77. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
  78. package/dist/components/DatePicker/DatePicker.types.d.ts +80 -0
  79. package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -0
  80. package/dist/components/DatePicker/index.d.ts +14 -0
  81. package/dist/components/DatePicker/index.d.ts.map +1 -0
  82. package/dist/components/index.d.ts +3 -0
  83. package/dist/components/index.d.ts.map +1 -1
  84. package/dist/docs/DocComponents.d.ts +60 -0
  85. package/dist/docs/DocComponents.d.ts.map +1 -0
  86. package/dist/index.cjs +99 -24
  87. package/dist/index.cjs.map +1 -1
  88. package/dist/index.d.ts +14 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.mjs +65584 -19306
  91. package/dist/index.mjs.map +1 -1
  92. package/dist/react.css +1 -1
  93. package/dist/sections/Chat/ChatSection.d.ts +22 -0
  94. package/dist/sections/Chat/ChatSection.d.ts.map +1 -0
  95. package/dist/sections/Chat/index.d.ts +19 -0
  96. package/dist/sections/Chat/index.d.ts.map +1 -0
  97. package/dist/sections/index.d.ts +2 -0
  98. package/dist/sections/index.d.ts.map +1 -1
  99. package/dist/styles.css +65 -57
  100. package/dist/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts +21 -0
  101. package/dist/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts.map +1 -0
  102. package/dist/templates/app/ChatPageTemplate/index.d.ts +19 -0
  103. package/dist/templates/app/ChatPageTemplate/index.d.ts.map +1 -0
  104. package/dist/templates/app/index.d.ts +2 -0
  105. package/dist/templates/app/index.d.ts.map +1 -1
  106. package/package.json +8 -2
package/AI_COMPONENTS.md CHANGED
@@ -187,6 +187,13 @@ Use these for landing pages, marketing sites, and product pages. **DO NOT create
187
187
  | `Container` | Constrain content width |
188
188
  | `Section` | Vertical section with spacing |
189
189
 
190
+ ### AI Chat Sections
191
+
192
+ | Section | Use When | Required Props |
193
+ |---------|----------|----------------|
194
+ | `ChatSection` | Chat UI with sidebar | `messages`, `onSendMessage` |
195
+ | `ChatPageTemplate` | Full-page chat app | `messages`, `onSendMessage` |
196
+
190
197
  ---
191
198
 
192
199
  ## Complete Landing Page Example
@@ -478,6 +485,66 @@ Some components use the compound pattern with dot notation:
478
485
  </Drawer>
479
486
  ```
480
487
 
488
+ ### Chat (AI Chat Interface)
489
+
490
+ Full-featured chat interface with multimodal support (text, images, audio, files, code).
491
+
492
+ ```tsx
493
+ <Chat>
494
+ <Chat.Header title="AI Assistant" subtitle="Online" />
495
+ <Chat.Messages>
496
+ {messages.map(msg => (
497
+ <Chat.Message
498
+ key={msg.id}
499
+ role={msg.role}
500
+ content={msg.content}
501
+ timestamp={msg.timestamp}
502
+ attachments={msg.attachments}
503
+ />
504
+ ))}
505
+ {isTyping && <Chat.TypingIndicator />}
506
+ </Chat.Messages>
507
+ <Chat.Input
508
+ onSend={handleSend}
509
+ allowAttachments
510
+ allowVoiceRecording
511
+ />
512
+ </Chat>
513
+ ```
514
+
515
+ **Chat Sub-components:**
516
+ - `Chat.Header` - Title, avatar, and actions
517
+ - `Chat.Messages` - Scrollable message container with auto-scroll
518
+ - `Chat.Message` - Individual message (user/assistant/system)
519
+ - `Chat.Input` - Multi-line input with attachments and voice
520
+ - `Chat.TypingIndicator` - Animated "typing" dots
521
+ - `Chat.CodeBlock` - Syntax-highlighted code
522
+ - `Chat.Markdown` - Markdown rendering
523
+ - `Chat.ImagePreview` - Image with lightbox
524
+ - `Chat.AudioPlayer` - Audio playback
525
+ - `Chat.VoiceRecorder` - Voice recording
526
+ - `Chat.FileUpload` - Drag-and-drop file upload
527
+ - `Chat.Attachment` - Attachment preview
528
+ - `Chat.Sidebar` - Conversation history list
529
+
530
+ **Pre-built Sections:**
531
+ - `ChatSection` - Chat with sidebar layout
532
+ - `ChatPageTemplate` - Full-page ChatGPT-style layout
533
+
534
+ ```tsx
535
+ // Full-page template (ChatGPT-style)
536
+ <ChatPageTemplate
537
+ conversations={conversations}
538
+ activeConversationId={activeId}
539
+ messages={messages}
540
+ onSendMessage={handleSend}
541
+ onSelectConversation={handleSelect}
542
+ onNewConversation={handleNew}
543
+ isTyping={isTyping}
544
+ user={{ name: 'John', avatar: '...' }}
545
+ />
546
+ ```
547
+
481
548
  ---
482
549
 
483
550
  ## Icons (Lucide)
@@ -535,7 +602,7 @@ function ThemeSwitcher() {
535
602
  }
536
603
  ```
537
604
 
538
- **Available brands:** `orion`, `red`, `deepblue`, `orange`
605
+ **Available brands:** `orion`, `red`, `deepblue`, `orange`, `lemon`
539
606
  **Available themes:** `light`, `dark`
540
607
 
541
608
  ---
package/AI_QUICKREF.md CHANGED
@@ -46,7 +46,7 @@ import { Search } from 'lucide-react';
46
46
  ## Theme Switching
47
47
  ```tsx
48
48
  const { theme, brand, setTheme, setBrand } = useThemeContext();
49
- // brands: orion, red, deepblue, orange
49
+ // brands: orion, red, deepblue, orange, lemon
50
50
  // themes: light, dark
51
51
  ```
52
52
 
package/README.md CHANGED
@@ -22,6 +22,8 @@ TypeScript-first React component library built on the Orion Design System. Featu
22
22
 
23
23
  ## Installation
24
24
 
25
+ ### Option A: npm install (full library)
26
+
25
27
  \`\`\`bash
26
28
  npm install @orion-ds/react @orion-ds/core
27
29
  # or
@@ -32,6 +34,18 @@ yarn add @orion-ds/react @orion-ds/core
32
34
 
33
35
  > **Note**: `@orion-ds/core` is a peer dependency that must be installed alongside `@orion-ds/react`.
34
36
 
37
+ ### Option B: CLI copy (own the code)
38
+
39
+ Copy individual components into your project, shadcn-style. You own the source and can modify freely.
40
+
41
+ \`\`\`bash
42
+ npx @orion-ds/cli init # Creates orion.json, installs @orion-ds/core
43
+ npx @orion-ds/cli add button card modal # Copies component source files
44
+ npx @orion-ds/cli list # Shows all 90 available items
45
+ \`\`\`
46
+
47
+ See [@orion-ds/cli README](../cli/README.md) for full documentation.
48
+
35
49
  ## CSS Setup
36
50
 
37
51
  ### Option 1: Single Import (Recommended)
@@ -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;IACxB,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,EAAE,EAAE,IAAI,GAAG,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AAE3D;;GAEG;AACH,UAAU,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAClF;;OAEG;IACH,GAAG,CAAC,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,GAAG,CAAC,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC;IAE9C;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAEzC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,IAAI,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,44 @@
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 } 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
+ export declare const ChartTooltip: typeof Tooltip;
43
+ export declare const ChartLegend: typeof Legend;
44
+ //# 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,EACxB,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;AAKF,eAAO,MAAM,YAAY,gBAAU,CAAC;AACpC,eAAO,MAAM,WAAW,eAAS,CAAC"}
@@ -0,0 +1,117 @@
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
+ * ChartLegendContent props
100
+ */
101
+ export interface ChartLegendContentProps {
102
+ /**
103
+ * Additional class name
104
+ */
105
+ className?: string;
106
+ /**
107
+ * Recharts injected props (passed automatically)
108
+ */
109
+ payload?: Array<{
110
+ value: string;
111
+ type: string;
112
+ id: string;
113
+ color: string;
114
+ dataKey: string;
115
+ }>;
116
+ }
117
+ //# 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;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEtC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAE3C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAEpD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAClC,CAAC,CAAC;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,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, ChartTooltip, ChartLegend, } from './Chart';
21
+ export type { ChartConfig, ChartConfigItem, ChartContainerProps, ChartTooltipContentProps, ChartLegendContentProps, } 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,YAAY,EACZ,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,eAAe,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Chat Component
3
+ *
4
+ * A flexible compound component for building AI chat interfaces.
5
+ * Supports multimodal content including text, images, audio, files, and code.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Chat>
10
+ * <Chat.Header title="AI Assistant" />
11
+ * <Chat.Messages>
12
+ * {messages.map(msg => (
13
+ * <Chat.Message
14
+ * key={msg.id}
15
+ * role={msg.role}
16
+ * content={msg.content}
17
+ * />
18
+ * ))}
19
+ * {isTyping && <Chat.TypingIndicator />}
20
+ * </Chat.Messages>
21
+ * <Chat.Input onSend={handleSend} />
22
+ * </Chat>
23
+ * ```
24
+ */
25
+ import React from 'react';
26
+ import type { ChatProps } from './Chat.types';
27
+ import { ChatMessage, ChatMessages, ChatInput, ChatHeader, ChatTypingIndicator, ChatCodeBlock, ChatMarkdown, ChatImagePreview, ChatAudioPlayer, ChatVoiceRecorder, ChatFileUpload, ChatAttachment, ChatSidebar } from './components';
28
+ type ChatComponent = React.FC<ChatProps> & {
29
+ Header: typeof ChatHeader;
30
+ Messages: typeof ChatMessages;
31
+ Message: typeof ChatMessage;
32
+ Input: typeof ChatInput;
33
+ TypingIndicator: typeof ChatTypingIndicator;
34
+ CodeBlock: typeof ChatCodeBlock;
35
+ Markdown: typeof ChatMarkdown;
36
+ ImagePreview: typeof ChatImagePreview;
37
+ AudioPlayer: typeof ChatAudioPlayer;
38
+ VoiceRecorder: typeof ChatVoiceRecorder;
39
+ FileUpload: typeof ChatFileUpload;
40
+ Attachment: typeof ChatAttachment;
41
+ Sidebar: typeof ChatSidebar;
42
+ };
43
+ export declare const Chat: ChatComponent;
44
+ export {};
45
+ //# sourceMappingURL=Chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,cAAc,CAAC;AAwBtB,KAAK,aAAa,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG;IACzC,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B,QAAQ,EAAE,OAAO,YAAY,CAAC;IAC9B,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,eAAe,EAAE,OAAO,mBAAmB,CAAC;IAC5C,SAAS,EAAE,OAAO,aAAa,CAAC;IAChC,QAAQ,EAAE,OAAO,YAAY,CAAC;IAC9B,YAAY,EAAE,OAAO,gBAAgB,CAAC;IACtC,WAAW,EAAE,OAAO,eAAe,CAAC;IACpC,aAAa,EAAE,OAAO,iBAAiB,CAAC;IACxC,UAAU,EAAE,OAAO,cAAc,CAAC;IAClC,UAAU,EAAE,OAAO,cAAc,CAAC;IAClC,OAAO,EAAE,OAAO,WAAW,CAAC;CAC7B,CAAC;AAGF,eAAO,MAAM,IAAI,EAAe,aAAa,CAAC"}