@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.
- package/AI_COMPONENTS.md +68 -1
- package/AI_QUICKREF.md +1 -1
- package/README.md +14 -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 +44 -0
- package/dist/components/Chart/Chart.d.ts.map +1 -0
- package/dist/components/Chart/Chart.types.d.ts +117 -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/Chat/Chat.d.ts +45 -0
- package/dist/components/Chat/Chat.d.ts.map +1 -0
- package/dist/components/Chat/Chat.types.d.ts +392 -0
- package/dist/components/Chat/Chat.types.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatAttachment.d.ts +10 -0
- package/dist/components/Chat/components/ChatAttachment.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatAudioPlayer.d.ts +9 -0
- package/dist/components/Chat/components/ChatAudioPlayer.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatCodeBlock.d.ts +10 -0
- package/dist/components/Chat/components/ChatCodeBlock.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatFileUpload.d.ts +9 -0
- package/dist/components/Chat/components/ChatFileUpload.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatHeader.d.ts +9 -0
- package/dist/components/Chat/components/ChatHeader.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatImagePreview.d.ts +9 -0
- package/dist/components/Chat/components/ChatImagePreview.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatInput.d.ts +10 -0
- package/dist/components/Chat/components/ChatInput.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatLightbox.d.ts +9 -0
- package/dist/components/Chat/components/ChatLightbox.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatMarkdown.d.ts +10 -0
- package/dist/components/Chat/components/ChatMarkdown.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatMessage.d.ts +10 -0
- package/dist/components/Chat/components/ChatMessage.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatMessages.d.ts +10 -0
- package/dist/components/Chat/components/ChatMessages.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatSidebar.d.ts +10 -0
- package/dist/components/Chat/components/ChatSidebar.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatTypingIndicator.d.ts +14 -0
- package/dist/components/Chat/components/ChatTypingIndicator.d.ts.map +1 -0
- package/dist/components/Chat/components/ChatVoiceRecorder.d.ts +9 -0
- package/dist/components/Chat/components/ChatVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/components/index.d.ts +18 -0
- package/dist/components/Chat/components/index.d.ts.map +1 -0
- package/dist/components/Chat/hooks/index.d.ts +12 -0
- package/dist/components/Chat/hooks/index.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useAutoScroll.d.ts +24 -0
- package/dist/components/Chat/hooks/useAutoScroll.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useChatInput.d.ts +43 -0
- package/dist/components/Chat/hooks/useChatInput.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useStreamingText.d.ts +22 -0
- package/dist/components/Chat/hooks/useStreamingText.d.ts.map +1 -0
- package/dist/components/Chat/hooks/useVoiceRecorder.d.ts +31 -0
- package/dist/components/Chat/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/components/Chat/index.d.ts +28 -0
- package/dist/components/Chat/index.d.ts.map +1 -0
- package/dist/components/Chat/utils.d.ts +16 -0
- package/dist/components/Chat/utils.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/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/docs/DocComponents.d.ts +60 -0
- package/dist/docs/DocComponents.d.ts.map +1 -0
- package/dist/index.cjs +99 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +65584 -19306
- package/dist/index.mjs.map +1 -1
- package/dist/react.css +1 -1
- package/dist/sections/Chat/ChatSection.d.ts +22 -0
- package/dist/sections/Chat/ChatSection.d.ts.map +1 -0
- package/dist/sections/Chat/index.d.ts +19 -0
- package/dist/sections/Chat/index.d.ts.map +1 -0
- package/dist/sections/index.d.ts +2 -0
- package/dist/sections/index.d.ts.map +1 -1
- package/dist/styles.css +65 -57
- package/dist/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts +21 -0
- package/dist/templates/app/ChatPageTemplate/ChatPageTemplate.d.ts.map +1 -0
- package/dist/templates/app/ChatPageTemplate/index.d.ts +19 -0
- package/dist/templates/app/ChatPageTemplate/index.d.ts.map +1 -0
- package/dist/templates/app/index.d.ts +2 -0
- package/dist/templates/app/index.d.ts.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Component Hooks
|
|
3
|
+
*/
|
|
4
|
+
export { useAutoScroll } from './useAutoScroll';
|
|
5
|
+
export type { UseAutoScrollOptions, UseAutoScrollReturn } from './useAutoScroll';
|
|
6
|
+
export { useVoiceRecorder } from './useVoiceRecorder';
|
|
7
|
+
export type { UseVoiceRecorderOptions, UseVoiceRecorderReturn } from './useVoiceRecorder';
|
|
8
|
+
export { useChatInput } from './useChatInput';
|
|
9
|
+
export type { UseChatInputOptions, UseChatInputReturn } from './useChatInput';
|
|
10
|
+
export { useStreamingText } from './useStreamingText';
|
|
11
|
+
export type { UseStreamingTextOptions, UseStreamingTextReturn } from './useStreamingText';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE1F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useAutoScroll Hook
|
|
3
|
+
*
|
|
4
|
+
* Automatically scrolls to the bottom of a container when new content is added.
|
|
5
|
+
* Includes smart detection to pause auto-scroll when user scrolls up.
|
|
6
|
+
*/
|
|
7
|
+
export interface UseAutoScrollOptions {
|
|
8
|
+
/** Whether auto-scroll is enabled */
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/** Threshold in pixels from bottom to consider "at bottom" */
|
|
11
|
+
threshold?: number;
|
|
12
|
+
/** Smooth scroll behavior */
|
|
13
|
+
smooth?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UseAutoScrollReturn {
|
|
16
|
+
/** Ref to attach to the scrollable container */
|
|
17
|
+
scrollRef: React.RefObject<HTMLDivElement | null>;
|
|
18
|
+
/** Whether the user is currently at the bottom */
|
|
19
|
+
isAtBottom: boolean;
|
|
20
|
+
/** Manually scroll to bottom */
|
|
21
|
+
scrollToBottom: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function useAutoScroll(options?: UseAutoScrollOptions): UseAutoScrollReturn;
|
|
24
|
+
//# sourceMappingURL=useAutoScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutoScroll.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useAutoScroll.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,oBAAoB;IACnC,qCAAqC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,kDAAkD;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAC3B,OAAO,GAAE,oBAAyB,GACjC,mBAAmB,CAoFrB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useChatInput Hook
|
|
3
|
+
*
|
|
4
|
+
* Manages chat input state including text, attachments, and submission.
|
|
5
|
+
*/
|
|
6
|
+
export interface UseChatInputOptions {
|
|
7
|
+
/** Maximum character count */
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
/** Callback when message is sent */
|
|
10
|
+
onSend?: (message: string, attachments?: File[]) => void;
|
|
11
|
+
/** Whether input is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface UseChatInputReturn {
|
|
15
|
+
/** Current input value */
|
|
16
|
+
value: string;
|
|
17
|
+
/** Set input value */
|
|
18
|
+
setValue: (value: string) => void;
|
|
19
|
+
/** Pending file attachments */
|
|
20
|
+
attachments: File[];
|
|
21
|
+
/** Add files to attachments */
|
|
22
|
+
addAttachments: (files: File[]) => void;
|
|
23
|
+
/** Remove attachment by index */
|
|
24
|
+
removeAttachment: (index: number) => void;
|
|
25
|
+
/** Clear all attachments */
|
|
26
|
+
clearAttachments: () => void;
|
|
27
|
+
/** Handle form submission */
|
|
28
|
+
handleSubmit: () => void;
|
|
29
|
+
/** Handle key down (for Enter to send) */
|
|
30
|
+
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
31
|
+
/** Ref for textarea element */
|
|
32
|
+
textareaRef: React.RefObject<HTMLTextAreaElement | null>;
|
|
33
|
+
/** Whether input is empty */
|
|
34
|
+
isEmpty: boolean;
|
|
35
|
+
/** Current character count */
|
|
36
|
+
charCount: number;
|
|
37
|
+
/** Whether character limit is exceeded */
|
|
38
|
+
isOverLimit: boolean;
|
|
39
|
+
/** Focus the input */
|
|
40
|
+
focus: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare function useChatInput(options?: UseChatInputOptions): UseChatInputReturn;
|
|
43
|
+
//# sourceMappingURL=useChatInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChatInput.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useChatInput.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzD,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,+BAA+B;IAC/B,WAAW,EAAE,IAAI,EAAE,CAAC;IACpB,+BAA+B;IAC/B,cAAc,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACxC,iCAAiC;IACjC,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,4BAA4B;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,6BAA6B;IAC7B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,0CAA0C;IAC1C,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAChD,+BAA+B;IAC/B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACzD,6BAA6B;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB;IACtB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,kBAAkB,CAwFlF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useStreamingText Hook
|
|
3
|
+
*
|
|
4
|
+
* Reveals text progressively, word by word, simulating real-time
|
|
5
|
+
* content generation. Content is final — text only grows, never rewrites.
|
|
6
|
+
*/
|
|
7
|
+
export interface UseStreamingTextOptions {
|
|
8
|
+
/** Words revealed per tick (default: 2) */
|
|
9
|
+
wordsPerTick?: number;
|
|
10
|
+
/** Milliseconds between ticks (default: 60) */
|
|
11
|
+
intervalMs?: number;
|
|
12
|
+
/** Whether streaming is active (default: true) */
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UseStreamingTextReturn {
|
|
16
|
+
/** The portion of text currently visible */
|
|
17
|
+
displayText: string;
|
|
18
|
+
/** Whether all text has been revealed */
|
|
19
|
+
isComplete: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function useStreamingText(fullText: string, options?: UseStreamingTextOptions): UseStreamingTextReturn;
|
|
22
|
+
//# sourceMappingURL=useStreamingText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStreamingText.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useStreamingText.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,uBAAuB;IACtC,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CAqCxB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useVoiceRecorder Hook
|
|
3
|
+
*
|
|
4
|
+
* Provides voice recording functionality using the MediaRecorder API.
|
|
5
|
+
* Includes duration tracking and error handling.
|
|
6
|
+
*/
|
|
7
|
+
import type { VoiceRecorderState } from '../Chat.types';
|
|
8
|
+
export interface UseVoiceRecorderOptions {
|
|
9
|
+
/** Maximum recording duration in seconds */
|
|
10
|
+
maxDuration?: number;
|
|
11
|
+
/** Audio MIME type */
|
|
12
|
+
mimeType?: string;
|
|
13
|
+
/** Callback when recording is complete */
|
|
14
|
+
onRecordingComplete?: (blob: Blob) => void;
|
|
15
|
+
/** Callback on error */
|
|
16
|
+
onError?: (error: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface UseVoiceRecorderReturn extends VoiceRecorderState {
|
|
19
|
+
/** Start recording */
|
|
20
|
+
startRecording: () => Promise<void>;
|
|
21
|
+
/** Stop recording */
|
|
22
|
+
stopRecording: () => void;
|
|
23
|
+
/** Cancel recording */
|
|
24
|
+
cancelRecording: () => void;
|
|
25
|
+
/** Reset state */
|
|
26
|
+
reset: () => void;
|
|
27
|
+
/** Whether recording is supported */
|
|
28
|
+
isSupported: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare function useVoiceRecorder(options?: UseVoiceRecorderOptions): UseVoiceRecorderReturn;
|
|
31
|
+
//# sourceMappingURL=useVoiceRecorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACtC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC3C,wBAAwB;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,sBAAsB;IACtB,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,qBAAqB;IACrB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,uBAAuB;IACvB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,kBAAkB;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CAqKxB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Component - AI-first chat interface with multimodal support.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* import { Chat } from '@orion-ds/react';
|
|
7
|
+
*
|
|
8
|
+
* <Chat>
|
|
9
|
+
* <Chat.Header title="AI Assistant" />
|
|
10
|
+
* <Chat.Messages>
|
|
11
|
+
* {messages.map(msg => (
|
|
12
|
+
* <Chat.Message
|
|
13
|
+
* key={msg.id}
|
|
14
|
+
* role={msg.role}
|
|
15
|
+
* content={msg.content}
|
|
16
|
+
* />
|
|
17
|
+
* ))}
|
|
18
|
+
* {isTyping && <Chat.TypingIndicator />}
|
|
19
|
+
* </Chat.Messages>
|
|
20
|
+
* <Chat.Input onSend={handleSend} />
|
|
21
|
+
* </Chat>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export { Chat } from './Chat';
|
|
25
|
+
export type { ChatRole, MessageStatus, AttachmentType, MessageReaction, ChatAttachment, ChatMessage, ChatConversation, VoiceRecorderState, ChatProps, ChatHeaderProps, ChatMessagesProps, ChatMessageProps, ChatInputProps, ChatTypingIndicatorProps, ChatCodeBlockProps, ChatMarkdownProps, ChatImagePreviewProps, ChatAudioPlayerProps, ChatVoiceRecorderProps, ChatFileUploadProps, ChatAttachmentPreviewProps, ChatSidebarProps, ChatSectionProps, ChatPageTemplateProps, ChatLightboxProps, } from './Chat.types';
|
|
26
|
+
export { useAutoScroll, useVoiceRecorder, useChatInput, useStreamingText, } from './hooks';
|
|
27
|
+
export type { UseAutoScrollOptions, UseAutoScrollReturn, UseVoiceRecorderOptions, UseVoiceRecorderReturn, UseChatInputOptions, UseChatInputReturn, UseStreamingTextOptions, UseStreamingTextReturn, } from './hooks';
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,YAAY,EAEV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAElB,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAEjB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,0BAA0B,EAE1B,gBAAgB,EAEhB,gBAAgB,EAChB,qBAAqB,EAErB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Component Shared Utilities
|
|
3
|
+
*
|
|
4
|
+
* Centralized helper functions used across multiple Chat sub-components.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Format a byte count into a human-readable file size string.
|
|
8
|
+
* Used by ChatInput, ChatFileUpload, and ChatAttachment.
|
|
9
|
+
*/
|
|
10
|
+
export declare const formatFileSize: (bytes?: number) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Format seconds into mm:ss display string.
|
|
13
|
+
* Used by ChatAudioPlayer and ChatVoiceRecorder.
|
|
14
|
+
*/
|
|
15
|
+
export declare const formatTime: (seconds: number) => string;
|
|
16
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,MAM/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,KAAG,MAI5C,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"}
|
|
@@ -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,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACpF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAEnD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC1G;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACtE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;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,CA+IhD,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,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,IA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ion-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"}
|
|
@@ -47,4 +47,7 @@ export { ThemeController } from './ThemeController';
|
|
|
47
47
|
export type { ThemeControllerProps } from './ThemeController';
|
|
48
48
|
export { Carousel, CarouselCard } from './Carousel';
|
|
49
49
|
export type { CarouselProps, CarouselItem, CarouselCardProps, CarouselVariant, CarouselAspectRatio, CarouselGap, CarouselOverlay, CarouselAlign, CarouselNavigationProps, } from './Carousel';
|
|
50
|
+
export { Chat } from './Chat';
|
|
51
|
+
export type { ChatRole, MessageStatus, AttachmentType, ChatAttachment, ChatMessage, ChatConversation, VoiceRecorderState, ChatProps, ChatHeaderProps, ChatMessagesProps, ChatMessageProps, ChatInputProps, ChatTypingIndicatorProps, ChatCodeBlockProps, ChatMarkdownProps, ChatImagePreviewProps, ChatAudioPlayerProps, ChatVoiceRecorderProps, ChatFileUploadProps, ChatAttachmentPreviewProps, ChatSidebarProps, ChatSectionProps, ChatPageTemplateProps, ChatLightboxProps, } from './Chat';
|
|
52
|
+
export { useAutoScroll, useVoiceRecorder, useChatInput, } from './Chat';
|
|
50
53
|
//# sourceMappingURL=index.d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AChB,YAAY,GACb,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type CalloutVariant = 'info' | 'tip' | 'warning' | 'error';
|
|
3
|
+
interface CalloutProps {
|
|
4
|
+
variant?: CalloutVariant;
|
|
5
|
+
title?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function Callout({ variant, title, children }: CalloutProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
interface FeatureCardProps {
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
title: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare function FeatureCard({ icon, title, children }: FeatureCardProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
interface CardGridProps {
|
|
16
|
+
columns?: 2 | 3;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function CardGrid({ columns, children }: CardGridProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
interface StepProps {
|
|
21
|
+
number: number;
|
|
22
|
+
title: string;
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare function Step({ number, title, children }: StepProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface StepsProps {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare function Steps({ children }: StepsProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
interface LinkCardProps {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
href: string;
|
|
34
|
+
icon?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export declare function LinkCard({ title, description, href, icon }: LinkCardProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
interface LinkCardGridProps {
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
export declare function LinkCardGrid({ children }: LinkCardGridProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
interface BrandSwatchProps {
|
|
42
|
+
color: string;
|
|
43
|
+
name: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function BrandSwatch({ color, name }: BrandSwatchProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
interface TokenTableRow {
|
|
47
|
+
token: string;
|
|
48
|
+
description: string;
|
|
49
|
+
}
|
|
50
|
+
interface TokenTableProps {
|
|
51
|
+
rows: TokenTableRow[];
|
|
52
|
+
}
|
|
53
|
+
export declare function TokenTable({ rows }: TokenTableProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
interface InfoTableProps {
|
|
55
|
+
headers: string[];
|
|
56
|
+
rows: string[][];
|
|
57
|
+
}
|
|
58
|
+
export declare function InfoTable({ headers, rows }: InfoTableProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=DocComponents.d.ts.map
|