@admin-layout/tailwind-ui 12.2.4-alpha.33 → 12.2.4-alpha.35
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/lib/components/AIToolbar/components/AIToolBar.d.ts +22 -0
- package/lib/components/AIToolbar/components/AIToolBar.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/AIToolBar.js +83 -0
- package/lib/components/AIToolbar/components/AIToolBar.js.map +1 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts +14 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.js +60 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.js.map +1 -0
- package/lib/components/AIToolbar/components/CustomCursor.d.ts +2 -0
- package/lib/components/AIToolbar/components/CustomCursor.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/CustomCursor.js +66 -0
- package/lib/components/AIToolbar/components/CustomCursor.js.map +1 -0
- package/lib/components/AIToolbar/components/DragButton.d.ts +9 -0
- package/lib/components/AIToolbar/components/DragButton.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/DragButton.js +57 -0
- package/lib/components/AIToolbar/components/DragButton.js.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts +7 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.js +30 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.js.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/index.d.ts +7 -0
- package/lib/components/AIToolbar/components/Markdown/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/index.js +46 -0
- package/lib/components/AIToolbar/components/Markdown/index.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts +3 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.js +65 -0
- package/lib/components/AIToolbar/components/completion/Audio.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts +11 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js +66 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts +6 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.js +134 -0
- package/lib/components/AIToolbar/components/completion/Files.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts +5 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.js +169 -0
- package/lib/components/AIToolbar/components/completion/Input.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts +11 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.js +90 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts +6 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js +28 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts +10 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.js +20 -0
- package/lib/components/AIToolbar/components/completion/index.js.map +1 -0
- package/lib/components/AIToolbar/components/index.d.ts +17 -0
- package/lib/components/AIToolbar/components/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Header.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/Header.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Header.js +82 -0
- package/lib/components/AIToolbar/components/speech/Header.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts +8 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.js +44 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts +8 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.js +161 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.d.ts +13 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.js +100 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.js +101 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.d.ts +12 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.js +132 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts +12 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js +289 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts +10 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.js +48 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/Warning.d.ts +6 -0
- package/lib/components/AIToolbar/components/speech/Warning.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Warning.js +154 -0
- package/lib/components/AIToolbar/components/speech/Warning.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts +7 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.js +194 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts +2 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.js +32 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/index.d.ts +4 -0
- package/lib/components/AIToolbar/components/speech/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/index.js +292 -0
- package/lib/components/AIToolbar/components/speech/index.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts +12 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.js +114 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.js.map +1 -0
- package/lib/components/AIToolbar/components/types.d.ts +175 -0
- package/lib/components/AIToolbar/components/types.d.ts.map +1 -0
- package/lib/components/AIToolbar/index.d.ts +5 -0
- package/lib/components/AIToolbar/index.d.ts.map +1 -0
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +7 -6
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +157 -139
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts +2 -2
- package/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/components/Dialog/Dialog.js +54 -41
- package/lib/components/Dialog/Dialog.js.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +1 -2
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +2 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.js +35 -28
- package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +20 -15
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js +177 -152
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.js +207 -168
- package/lib/components/ErrorHandlers/SPAErrorBoundary.js.map +1 -1
- package/lib/components/ErrorPages/403.d.ts +1 -2
- package/lib/components/ErrorPages/403.d.ts.map +1 -1
- package/lib/components/ErrorPages/403.js +26 -18
- package/lib/components/ErrorPages/403.js.map +1 -1
- package/lib/components/ErrorPages/404.d.ts +1 -2
- package/lib/components/ErrorPages/404.d.ts.map +1 -1
- package/lib/components/ErrorPages/404.js +26 -18
- package/lib/components/ErrorPages/404.js.map +1 -1
- package/lib/components/ErrorPages/500.d.ts +1 -2
- package/lib/components/ErrorPages/500.d.ts.map +1 -1
- package/lib/components/ErrorPages/500.js +26 -18
- package/lib/components/ErrorPages/500.js.map +1 -1
- package/lib/components/InputToolBar/InputToolBar.d.ts +1 -2
- package/lib/components/InputToolBar/InputToolBar.d.ts.map +1 -1
- package/lib/components/InputToolBar/InputToolBar.js +286 -242
- package/lib/components/InputToolBar/InputToolBar.js.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +1 -2
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +24 -19
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -1
- package/lib/components/Markdown/MarkdownBreadcrumbs.js +25 -18
- package/lib/components/Markdown/MarkdownBreadcrumbs.js.map +1 -1
- package/lib/components/Markdown/MarkdownCopyButton.js +136 -107
- package/lib/components/Markdown/MarkdownCopyButton.js.map +1 -1
- package/lib/components/Markdown/MarkdownHeader.js +35 -20
- package/lib/components/Markdown/MarkdownHeader.js.map +1 -1
- package/lib/components/Markdown/MarkdownNavigation.js +29 -22
- package/lib/components/Markdown/MarkdownNavigation.js.map +1 -1
- package/lib/components/Markdown/MarkdownPage.js +133 -116
- package/lib/components/Markdown/MarkdownPage.js.map +1 -1
- package/lib/components/Markdown/MarkdownTableOfContents.js +31 -25
- package/lib/components/Markdown/MarkdownTableOfContents.js.map +1 -1
- package/lib/components/OTP/OTPInput.js +32 -30
- package/lib/components/OTP/OTPInput.js.map +1 -1
- package/lib/components/OTP/OTPVerification.js +75 -55
- package/lib/components/OTP/OTPVerification.js.map +1 -1
- package/lib/components/OTP/SingleInput.js +2 -2
- package/lib/components/OTP/SingleInput.js.map +1 -1
- package/lib/components/PageContainer/PageContainer.js +29 -22
- package/lib/components/PageContainer/PageContainer.js.map +1 -1
- package/lib/components/PageLoading/index.js +8 -7
- package/lib/components/PageLoading/index.js.map +1 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +1 -2
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.d.ts +1 -2
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.js +92 -71
- package/lib/components/ReactTable/Table.js.map +1 -1
- package/lib/components/ReactTable/TableFilters.d.ts +2 -3
- package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
- package/lib/components/ReactTable/TableFilters.js +40 -34
- package/lib/components/ReactTable/TableFilters.js.map +1 -1
- package/lib/components/Search/SearchInput.d.ts +1 -2
- package/lib/components/Search/SearchInput.d.ts.map +1 -1
- package/lib/components/Search/SearchInput.js +14 -13
- package/lib/components/Search/SearchInput.js.map +1 -1
- package/lib/components/Select/Select.d.ts +6 -6
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +60 -45
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Spin/index.js +14 -11
- package/lib/components/Spin/index.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +5 -4
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +27 -24
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/useToast.d.ts +1 -1
- package/lib/hooks/useToast.d.ts.map +1 -1
- package/lib/hooks/useToast.js +46 -37
- package/lib/hooks/useToast.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/shardui/accordion.js +20 -16
- package/lib/shardui/accordion.js.map +1 -1
- package/lib/shardui/alert-dialog.d.ts +2 -2
- package/lib/shardui/alert-dialog.js +15 -13
- package/lib/shardui/alert-dialog.js.map +1 -1
- package/lib/shardui/alert.js +4 -4
- package/lib/shardui/alert.js.map +1 -1
- package/lib/shardui/avatar.js +4 -4
- package/lib/shardui/avatar.js.map +1 -1
- package/lib/shardui/badge.d.ts +1 -1
- package/lib/shardui/badge.d.ts.map +1 -1
- package/lib/shardui/badge.js +2 -2
- package/lib/shardui/badge.js.map +1 -1
- package/lib/shardui/breadcrumb.d.ts +2 -2
- package/lib/shardui/breadcrumb.js +19 -16
- package/lib/shardui/breadcrumb.js.map +1 -1
- package/lib/shardui/button.js +2 -2
- package/lib/shardui/button.js.map +1 -1
- package/lib/shardui/calendar.d.ts +1 -1
- package/lib/shardui/calendar.d.ts.map +1 -1
- package/lib/shardui/calendar.js +4 -4
- package/lib/shardui/card.js +7 -7
- package/lib/shardui/card.js.map +1 -1
- package/lib/shardui/carousel.js +40 -33
- package/lib/shardui/carousel.js.map +1 -1
- package/lib/shardui/chart.d.ts +1 -1
- package/lib/shardui/chart.d.ts.map +1 -1
- package/lib/shardui/chart.js +81 -66
- package/lib/shardui/chart.js.map +1 -1
- package/lib/shardui/checkbox.js +10 -8
- package/lib/shardui/checkbox.js.map +1 -1
- package/lib/shardui/command.d.ts +2 -2
- package/lib/shardui/command.d.ts.map +1 -1
- package/lib/shardui/command.js +28 -24
- package/lib/shardui/command.js.map +1 -1
- package/lib/shardui/context-menu.d.ts +1 -1
- package/lib/shardui/context-menu.js +41 -30
- package/lib/shardui/context-menu.js.map +1 -1
- package/lib/shardui/dialog.d.ts +2 -2
- package/lib/shardui/dialog.js +22 -17
- package/lib/shardui/dialog.js.map +1 -1
- package/lib/shardui/drawer.d.ts +3 -3
- package/lib/shardui/drawer.js +17 -14
- package/lib/shardui/drawer.js.map +1 -1
- package/lib/shardui/dropdown-menu.d.ts +1 -1
- package/lib/shardui/dropdown-menu.js +42 -31
- package/lib/shardui/dropdown-menu.js.map +1 -1
- package/lib/shardui/form.d.ts +1 -1
- package/lib/shardui/form.d.ts.map +1 -1
- package/lib/shardui/form.js +22 -19
- package/lib/shardui/form.js.map +1 -1
- package/lib/shardui/hover-card.js +2 -2
- package/lib/shardui/hover-card.js.map +1 -1
- package/lib/shardui/input-otp.js +16 -13
- package/lib/shardui/input-otp.js.map +1 -1
- package/lib/shardui/input.js +2 -2
- package/lib/shardui/input.js.map +1 -1
- package/lib/shardui/label.js +2 -2
- package/lib/shardui/label.js.map +1 -1
- package/lib/shardui/menubar.d.ts +1 -1
- package/lib/shardui/menubar.js +46 -35
- package/lib/shardui/menubar.js.map +1 -1
- package/lib/shardui/navigation-menu.js +28 -24
- package/lib/shardui/navigation-menu.js.map +1 -1
- package/lib/shardui/pagination.d.ts +5 -5
- package/lib/shardui/pagination.js +30 -22
- package/lib/shardui/pagination.js.map +1 -1
- package/lib/shardui/popover.js +10 -8
- package/lib/shardui/popover.js.map +1 -1
- package/lib/shardui/progress.js +10 -9
- package/lib/shardui/progress.js.map +1 -1
- package/lib/shardui/radio-group.js +11 -9
- package/lib/shardui/radio-group.js.map +1 -1
- package/lib/shardui/resizable.d.ts +3 -3
- package/lib/shardui/resizable.d.ts.map +1 -1
- package/lib/shardui/resizable.js +11 -9
- package/lib/shardui/resizable.js.map +1 -1
- package/lib/shardui/scroll-area.js +14 -11
- package/lib/shardui/scroll-area.js.map +1 -1
- package/lib/shardui/select.js +49 -35
- package/lib/shardui/select.js.map +1 -1
- package/lib/shardui/separator.js +2 -2
- package/lib/shardui/separator.js.map +1 -1
- package/lib/shardui/sheet.d.ts +2 -2
- package/lib/shardui/sheet.js +24 -19
- package/lib/shardui/sheet.js.map +1 -1
- package/lib/shardui/sidebar.js +104 -88
- package/lib/shardui/sidebar.js.map +1 -1
- package/lib/shardui/skeleton.d.ts +1 -1
- package/lib/shardui/skeleton.d.ts.map +1 -1
- package/lib/shardui/skeleton.js +2 -2
- package/lib/shardui/skeleton.js.map +1 -1
- package/lib/shardui/slider.js +12 -10
- package/lib/shardui/slider.js.map +1 -1
- package/lib/shardui/sonner.d.ts +1 -1
- package/lib/shardui/sonner.d.ts.map +1 -1
- package/lib/shardui/sonner.js +2 -2
- package/lib/shardui/sonner.js.map +1 -1
- package/lib/shardui/switch.js +7 -6
- package/lib/shardui/switch.js.map +1 -1
- package/lib/shardui/table.js +16 -15
- package/lib/shardui/table.js.map +1 -1
- package/lib/shardui/tabs.js +4 -4
- package/lib/shardui/tabs.js.map +1 -1
- package/lib/shardui/textarea.js +2 -2
- package/lib/shardui/textarea.js.map +1 -1
- package/lib/shardui/toast.js +12 -11
- package/lib/shardui/toast.js.map +1 -1
- package/lib/shardui/toaster.d.ts +1 -2
- package/lib/shardui/toaster.d.ts.map +1 -1
- package/lib/shardui/toaster.js +21 -14
- package/lib/shardui/toaster.js.map +1 -1
- package/lib/shardui/toggle-group.js +15 -12
- package/lib/shardui/toggle-group.js.map +1 -1
- package/lib/shardui/toggle.js +2 -2
- package/lib/shardui/toggle.js.map +1 -1
- package/lib/shardui/tooltip.js +2 -2
- package/lib/shardui/tooltip.js.map +1 -1
- package/package.json +6 -3
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {Lightbulb,Zap,Search,Mic,Paperclip,Image,Camera,WandSparkles,Settings,X,Layout,Check,StopCircle,ArrowUpRight}from'lucide-react';import React__default,{useState,useMemo}from'react';import'../../utils/isBrowser/index.js';import {cn}from'../../utils/util.js';import'fast-deep-equal/react.js';const iconSize = 'h-3.5 w-3.5';
|
|
1
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {Lightbulb,Zap,Search,Mic,Paperclip,Image,Camera,WandSparkles,Settings,X,Layout,Check,StopCircle,ArrowUpRight}from'lucide-react';import React__default,{useState,useMemo}from'react';import'../../utils/isBrowser/index.js';import {cn}from'../../utils/util.js';import'fast-deep-equal/react.js';const iconSize = 'h-3.5 w-3.5';
|
|
2
2
|
const iconSizeRight = 'h-4 w-4';
|
|
3
3
|
const defaultLeftIconMap = {
|
|
4
|
-
search:
|
|
4
|
+
search: jsx(Search, {
|
|
5
5
|
className: iconSize
|
|
6
6
|
}),
|
|
7
|
-
zap:
|
|
7
|
+
zap: jsx(Zap, {
|
|
8
8
|
className: iconSize
|
|
9
9
|
}),
|
|
10
|
-
lightbulb:
|
|
10
|
+
lightbulb: jsx(Lightbulb, {
|
|
11
11
|
className: iconSize
|
|
12
12
|
}),
|
|
13
13
|
template: null // template is rendered as pill, not in icon group
|
|
14
14
|
};
|
|
15
15
|
const defaultRightIconMap = {
|
|
16
|
-
projectSettings:
|
|
16
|
+
projectSettings: jsx(Settings, {
|
|
17
17
|
className: iconSizeRight
|
|
18
18
|
}),
|
|
19
|
-
tag:
|
|
19
|
+
tag: jsx(WandSparkles, {
|
|
20
20
|
className: iconSizeRight
|
|
21
21
|
}),
|
|
22
|
-
chip:
|
|
22
|
+
chip: jsxs("svg", {
|
|
23
23
|
className: iconSizeRight,
|
|
24
24
|
viewBox: "0 0 24 24",
|
|
25
25
|
fill: "none",
|
|
@@ -27,45 +27,46 @@ const defaultRightIconMap = {
|
|
|
27
27
|
strokeWidth: "2",
|
|
28
28
|
strokeLinecap: "round",
|
|
29
29
|
strokeLinejoin: "round",
|
|
30
|
-
"aria-hidden": true
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
30
|
+
"aria-hidden": true,
|
|
31
|
+
children: [jsx("rect", {
|
|
32
|
+
x: "4",
|
|
33
|
+
y: "4",
|
|
34
|
+
width: "16",
|
|
35
|
+
height: "16",
|
|
36
|
+
rx: "2",
|
|
37
|
+
ry: "2"
|
|
38
|
+
}), jsx("line", {
|
|
39
|
+
x1: "9",
|
|
40
|
+
y1: "9",
|
|
41
|
+
x2: "15",
|
|
42
|
+
y2: "9"
|
|
43
|
+
}), jsx("line", {
|
|
44
|
+
x1: "9",
|
|
45
|
+
y1: "15",
|
|
46
|
+
x2: "15",
|
|
47
|
+
y2: "15"
|
|
48
|
+
}), jsx("line", {
|
|
49
|
+
x1: "9",
|
|
50
|
+
y1: "9",
|
|
51
|
+
x2: "9",
|
|
52
|
+
y2: "15"
|
|
53
|
+
}), jsx("line", {
|
|
54
|
+
x1: "15",
|
|
55
|
+
y1: "9",
|
|
56
|
+
x2: "15",
|
|
57
|
+
y2: "15"
|
|
58
|
+
})]
|
|
59
|
+
}),
|
|
60
|
+
camera: jsx(Camera, {
|
|
60
61
|
className: iconSizeRight
|
|
61
62
|
}),
|
|
62
|
-
image:
|
|
63
|
+
image: jsx(Image, {
|
|
63
64
|
className: iconSizeRight
|
|
64
65
|
}),
|
|
65
|
-
attach:
|
|
66
|
+
attach: jsx(Paperclip, {
|
|
66
67
|
className: iconSizeRight
|
|
67
68
|
}),
|
|
68
|
-
mic:
|
|
69
|
+
mic: jsx(Mic, {
|
|
69
70
|
className: iconSizeRight
|
|
70
71
|
})
|
|
71
72
|
};
|
|
@@ -83,20 +84,21 @@ function MicSendButton({
|
|
|
83
84
|
const base = 'inline-flex h-7 w-7 items-center justify-center rounded-2xl transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary border border-primary';
|
|
84
85
|
const handleClick = isStop ? onStop : isSend ? onSend : onMic;
|
|
85
86
|
const label = isStop ? 'Stop' : isSend ? 'Send' : 'Start voice input';
|
|
86
|
-
return
|
|
87
|
+
return jsx("button", {
|
|
87
88
|
type: "button",
|
|
88
89
|
"aria-label": label,
|
|
89
90
|
title: label,
|
|
90
91
|
onClick: handleClick,
|
|
91
92
|
disabled: disabled && !isStop,
|
|
92
|
-
className: cn(base, className)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
className: cn(base, className),
|
|
94
|
+
children: isStop ? jsx(StopCircle, {
|
|
95
|
+
className: iconSizeRight
|
|
96
|
+
}) : isSend ? jsx(ArrowUpRight, {
|
|
97
|
+
className: iconSizeRight
|
|
98
|
+
}) : jsx(Mic, {
|
|
99
|
+
className: iconSizeRight
|
|
100
|
+
})
|
|
101
|
+
});
|
|
100
102
|
}
|
|
101
103
|
function ToolbarIconButton({
|
|
102
104
|
item,
|
|
@@ -107,7 +109,9 @@ function ToolbarIconButton({
|
|
|
107
109
|
if (item.enabled === false) return null;
|
|
108
110
|
const icon = item.customButton ?? item.icon ?? getDefaultIcon(item.id);
|
|
109
111
|
if (item.customButton) {
|
|
110
|
-
return
|
|
112
|
+
return jsx(Fragment, {
|
|
113
|
+
children: item.customButton
|
|
114
|
+
});
|
|
111
115
|
}
|
|
112
116
|
const isDisabled = item.disabled === true || item.loading === true;
|
|
113
117
|
const isActive = item.active === true;
|
|
@@ -117,17 +121,18 @@ function ToolbarIconButton({
|
|
|
117
121
|
const rightVariantActive = cn('rounded-2xl text-primary hover:bg-secondary border border-transparent', classNames?.rightButtonActive);
|
|
118
122
|
const rightVariantDefault = cn('rounded-2xl text-muted-foreground hover:bg-secondary/70 active:bg-secondary border border-transparent', classNames?.rightButton);
|
|
119
123
|
const rightVariant = isDisabled ? rightVariantDisabled : isActive ? rightVariantActive : rightVariantDefault;
|
|
120
|
-
return
|
|
124
|
+
return jsx("button", {
|
|
121
125
|
type: "button",
|
|
122
126
|
"aria-label": item.label,
|
|
123
127
|
title: item.label,
|
|
124
128
|
onClick: item.onClick,
|
|
125
129
|
disabled: isDisabled,
|
|
126
|
-
className: cn(base, isLeftGroup ? leftVariant : rightVariant)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
className: cn(base, isLeftGroup ? leftVariant : rightVariant),
|
|
131
|
+
children: item.loading ? jsx("div", {
|
|
132
|
+
className: "h-4 w-4 animate-spin rounded-full border-2 border-primary border-t-transparent",
|
|
133
|
+
"aria-hidden": true
|
|
134
|
+
}) : icon
|
|
135
|
+
});
|
|
131
136
|
}
|
|
132
137
|
function LeftSection({
|
|
133
138
|
leftItems,
|
|
@@ -136,38 +141,41 @@ function LeftSection({
|
|
|
136
141
|
classNames
|
|
137
142
|
}) {
|
|
138
143
|
if (leftCustomRender != null) {
|
|
139
|
-
return
|
|
140
|
-
className: cn('flex items-center gap-2', classNames?.leftGroup)
|
|
141
|
-
|
|
144
|
+
return jsx("div", {
|
|
145
|
+
className: cn('flex items-center gap-2', classNames?.leftGroup),
|
|
146
|
+
children: leftCustomRender
|
|
147
|
+
});
|
|
142
148
|
}
|
|
143
149
|
const left = leftItems ?? [];
|
|
144
150
|
const leftEnabled = left.filter(item => item.enabled !== false);
|
|
145
151
|
const hasTemplate = templateButton != null;
|
|
146
152
|
const hasLeft = leftEnabled.length > 0 || hasTemplate;
|
|
147
153
|
if (!hasLeft) return null;
|
|
148
|
-
return
|
|
149
|
-
className: cn('flex items-center gap-2', classNames?.leftGroup)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
154
|
+
return jsxs("div", {
|
|
155
|
+
className: cn('flex items-center gap-2', classNames?.leftGroup),
|
|
156
|
+
children: [leftEnabled.length > 0 && jsx("div", {
|
|
157
|
+
className: "flex items-center gap-1 rounded-full bg-secondary px-2 py-1",
|
|
158
|
+
children: leftEnabled.map((item, index) => jsxs(React__default.Fragment, {
|
|
159
|
+
children: [jsx(ToolbarIconButton, {
|
|
160
|
+
item: item,
|
|
161
|
+
getDefaultIcon: id => defaultLeftIconMap[id] ?? null,
|
|
162
|
+
isLeftGroup: true,
|
|
163
|
+
classNames: classNames
|
|
164
|
+
}), index < leftEnabled.length - 1 && jsx("span", {
|
|
165
|
+
"aria-hidden": "true",
|
|
166
|
+
className: "mx-1 h-5 w-px bg-border/70"
|
|
167
|
+
})]
|
|
168
|
+
}, item.id))
|
|
169
|
+
}), hasTemplate && jsx(TemplatePill, {
|
|
170
|
+
label: templateButton.label,
|
|
171
|
+
count: templateButton.count,
|
|
172
|
+
selectedLabel: templateButton.selectedLabel,
|
|
173
|
+
onClick: templateButton.onClick,
|
|
174
|
+
onClearTemplate: templateButton.onClearTemplate,
|
|
175
|
+
disabled: templateButton.disabled,
|
|
176
|
+
classNames: classNames
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
171
179
|
}
|
|
172
180
|
function TemplatePill({
|
|
173
181
|
label,
|
|
@@ -179,35 +187,40 @@ function TemplatePill({
|
|
|
179
187
|
classNames
|
|
180
188
|
}) {
|
|
181
189
|
if (selectedLabel) {
|
|
182
|
-
return
|
|
183
|
-
className: cn('flex items-center gap-1 px-2 py-1 rounded-full bg-primary/10 text-primary text-xs font-medium border border-primary/20', classNames?.templatePillSelected)
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
190
|
+
return jsxs("div", {
|
|
191
|
+
className: cn('flex items-center gap-1 px-2 py-1 rounded-full bg-primary/10 text-primary text-xs font-medium border border-primary/20', classNames?.templatePillSelected),
|
|
192
|
+
children: [jsx("span", {
|
|
193
|
+
className: "truncate max-w-[120px]",
|
|
194
|
+
title: selectedLabel,
|
|
195
|
+
children: selectedLabel
|
|
196
|
+
}), jsx("button", {
|
|
197
|
+
type: "button",
|
|
198
|
+
onClick: onClearTemplate,
|
|
199
|
+
className: "ml-1 hover:bg-primary/20 rounded-full p-0.5 transition-colors",
|
|
200
|
+
"aria-label": "Remove template",
|
|
201
|
+
disabled: disabled,
|
|
202
|
+
children: jsx(X, {
|
|
203
|
+
className: "h-3 w-3"
|
|
204
|
+
})
|
|
205
|
+
}), jsx("button", {
|
|
206
|
+
type: "button",
|
|
207
|
+
onClick: onClick,
|
|
208
|
+
className: "ml-1 hover:bg-primary/20 rounded-full p-0.5 transition-colors text-[10px]",
|
|
209
|
+
"aria-label": "Change template",
|
|
210
|
+
disabled: disabled,
|
|
211
|
+
children: "\u25BC"
|
|
212
|
+
})]
|
|
213
|
+
});
|
|
202
214
|
}
|
|
203
215
|
const text = count != null && count > 0 ? `${label} (${count})` : label;
|
|
204
|
-
return
|
|
216
|
+
return jsx("button", {
|
|
205
217
|
type: "button",
|
|
206
218
|
onClick: onClick,
|
|
207
219
|
disabled: disabled,
|
|
208
220
|
className: cn('flex items-center gap-1 rounded-full border border-border bg-muted/50 px-2 py-1 text-xs font-medium text-foreground transition-colors hover:border-primary hover:bg-primary/5', disabled && 'opacity-50 cursor-not-allowed' || '', classNames?.templatePill),
|
|
209
|
-
"aria-label": "Select template"
|
|
210
|
-
|
|
221
|
+
"aria-label": "Select template",
|
|
222
|
+
children: text
|
|
223
|
+
});
|
|
211
224
|
}
|
|
212
225
|
function RightSection({
|
|
213
226
|
rightItems,
|
|
@@ -216,31 +229,32 @@ function RightSection({
|
|
|
216
229
|
classNames
|
|
217
230
|
}) {
|
|
218
231
|
if (rightCustomRender != null) {
|
|
219
|
-
return
|
|
220
|
-
className: "flex items-center gap-1"
|
|
221
|
-
|
|
232
|
+
return jsx("div", {
|
|
233
|
+
className: "flex items-center gap-1",
|
|
234
|
+
children: rightCustomRender
|
|
235
|
+
});
|
|
222
236
|
}
|
|
223
237
|
const right = rightItems ?? [];
|
|
224
238
|
const rightEnabled = right.filter(item => item.enabled !== false);
|
|
225
239
|
const filteredRight = micSendButton != null ? rightEnabled.filter(item => item.id !== 'mic') : rightEnabled;
|
|
226
240
|
const hasRight = filteredRight.length > 0 || micSendButton != null;
|
|
227
241
|
if (!hasRight) return null;
|
|
228
|
-
return
|
|
229
|
-
className: "flex flex-wrap items-center gap-2 text-muted-foreground"
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
})
|
|
242
|
+
return jsxs("div", {
|
|
243
|
+
className: "flex flex-wrap items-center gap-2 text-muted-foreground",
|
|
244
|
+
children: [filteredRight.map(item => jsx(ToolbarIconButton, {
|
|
245
|
+
item: item,
|
|
246
|
+
getDefaultIcon: id => defaultRightIconMap[id] ?? null,
|
|
247
|
+
classNames: classNames
|
|
248
|
+
}, item.id)), micSendButton != null && jsx(MicSendButton, {
|
|
249
|
+
hasContent: micSendButton.hasContent,
|
|
250
|
+
onSend: micSendButton.onSend,
|
|
251
|
+
onMic: micSendButton.onMic,
|
|
252
|
+
disabled: micSendButton.disabled,
|
|
253
|
+
isLoading: micSendButton.isLoading,
|
|
254
|
+
onStop: micSendButton.onStop,
|
|
255
|
+
className: classNames?.micSendButton
|
|
256
|
+
})]
|
|
257
|
+
});
|
|
244
258
|
}
|
|
245
259
|
const defaultTextareaClassName = 'w-full outline-none border-none ring-0 focus:outline-none focus:ring-0 bg-transparent text-base text-foreground placeholder:text-muted-foreground disabled:opacity-50 resize-none overflow-y-auto max-h-[30vh] [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]';
|
|
246
260
|
function DefaultTemplateModal({
|
|
@@ -271,82 +285,101 @@ function DefaultTemplateModal({
|
|
|
271
285
|
function handleBackdropClick(e) {
|
|
272
286
|
if (e.target === e.currentTarget) onClose();
|
|
273
287
|
}
|
|
274
|
-
return
|
|
288
|
+
return jsx("div", {
|
|
275
289
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm p-4",
|
|
276
|
-
onClick: handleBackdropClick
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
290
|
+
onClick: handleBackdropClick,
|
|
291
|
+
children: jsxs("div", {
|
|
292
|
+
className: cn('bg-card w-full max-w-[720px] max-h-[80vh] rounded-xl flex flex-col overflow-hidden border border-border shadow-xl', modalClassName),
|
|
293
|
+
children: [jsxs("div", {
|
|
294
|
+
className: "h-12 px-4 border-b border-border flex items-center justify-between shrink-0",
|
|
295
|
+
children: [jsx("h2", {
|
|
296
|
+
className: "text-sm font-semibold text-foreground",
|
|
297
|
+
children: title
|
|
298
|
+
}), jsx("button", {
|
|
299
|
+
type: "button",
|
|
300
|
+
onClick: onClose,
|
|
301
|
+
className: "p-1.5 rounded-lg hover:bg-accent text-muted-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-ring",
|
|
302
|
+
"aria-label": "Close",
|
|
303
|
+
children: jsx(X, {
|
|
304
|
+
className: "h-4 w-4"
|
|
305
|
+
})
|
|
306
|
+
})]
|
|
307
|
+
}), jsxs("div", {
|
|
308
|
+
className: "p-4 border-b border-border space-y-3",
|
|
309
|
+
children: [jsxs("div", {
|
|
310
|
+
className: "relative",
|
|
311
|
+
children: [jsx(Search, {
|
|
312
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"
|
|
313
|
+
}), jsx("input", {
|
|
314
|
+
type: "text",
|
|
315
|
+
placeholder: "Search templates...",
|
|
316
|
+
value: searchQuery,
|
|
317
|
+
onChange: e => setSearchQuery(e.target.value),
|
|
318
|
+
className: "w-full pl-9 pr-3 py-2 border border-border rounded-lg bg-muted text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
319
|
+
})]
|
|
320
|
+
}), jsx("div", {
|
|
321
|
+
className: "flex gap-1.5 flex-wrap",
|
|
322
|
+
children: categories.map(category => jsx("button", {
|
|
323
|
+
type: "button",
|
|
324
|
+
onClick: () => setCategoryFilter(category),
|
|
325
|
+
className: cn('px-2.5 py-1 rounded-md text-xs font-medium transition-colors border', categoryFilter === category ? 'bg-primary/10 text-primary border-primary/20' : 'bg-card text-muted-foreground border-border hover:bg-muted hover:text-foreground'),
|
|
326
|
+
children: category
|
|
327
|
+
}, category))
|
|
328
|
+
})]
|
|
329
|
+
}), jsxs("div", {
|
|
330
|
+
className: "flex-1 overflow-y-auto p-4 min-h-0",
|
|
331
|
+
children: [jsx("div", {
|
|
332
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
333
|
+
children: filteredTemplates.map(template => {
|
|
334
|
+
const isSelected = selectedId === template.id;
|
|
335
|
+
const isSuggested = suggestedId === template.id;
|
|
336
|
+
return jsx("button", {
|
|
337
|
+
type: "button",
|
|
338
|
+
onClick: () => {
|
|
339
|
+
onSelect(template.id);
|
|
340
|
+
onClose();
|
|
341
|
+
},
|
|
342
|
+
className: cn('text-left p-3 rounded-lg border-2 transition-all', isSelected ? 'border-primary bg-primary/10 ring-2 ring-primary/20' : 'border-border hover:border-primary/50 hover:bg-muted/50', isSuggested && !isSelected && 'border-primary/30 bg-primary/5'),
|
|
343
|
+
children: jsxs("div", {
|
|
344
|
+
className: "flex items-start gap-2",
|
|
345
|
+
children: [jsx("div", {
|
|
346
|
+
className: cn('p-1.5 rounded-md flex-shrink-0', isSelected ? 'bg-primary' : isSuggested ? 'bg-primary/20' : 'bg-secondary'),
|
|
347
|
+
children: jsx(Layout, {
|
|
348
|
+
className: cn('h-3.5 w-3.5', isSelected ? 'text-primary-foreground' : isSuggested ? 'text-primary' : 'text-foreground')
|
|
349
|
+
})
|
|
350
|
+
}), jsxs("div", {
|
|
351
|
+
className: "min-w-0 flex-1",
|
|
352
|
+
children: [jsxs("div", {
|
|
353
|
+
className: "flex items-center gap-1.5",
|
|
354
|
+
children: [jsx("span", {
|
|
355
|
+
className: "font-medium text-sm text-foreground truncate",
|
|
356
|
+
children: template.label
|
|
357
|
+
}), isSelected && jsx(Check, {
|
|
358
|
+
className: "h-3.5 w-3.5 text-primary flex-shrink-0"
|
|
359
|
+
})]
|
|
360
|
+
}), template.description && jsx("p", {
|
|
361
|
+
className: "text-xs text-muted-foreground mt-0.5 line-clamp-2",
|
|
362
|
+
children: template.description
|
|
363
|
+
})]
|
|
364
|
+
})]
|
|
365
|
+
})
|
|
366
|
+
}, template.id);
|
|
367
|
+
})
|
|
368
|
+
}), filteredTemplates.length === 0 && jsxs("div", {
|
|
369
|
+
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
370
|
+
children: [jsx(Search, {
|
|
371
|
+
className: "h-10 w-10 text-muted-foreground mb-3"
|
|
372
|
+
}), jsx("p", {
|
|
373
|
+
className: "text-sm font-medium text-foreground",
|
|
374
|
+
children: "No templates found"
|
|
375
|
+
}), jsx("p", {
|
|
376
|
+
className: "text-xs text-muted-foreground mt-1",
|
|
377
|
+
children: "Try adjusting search or filters"
|
|
378
|
+
})]
|
|
379
|
+
})]
|
|
380
|
+
})]
|
|
381
|
+
})
|
|
382
|
+
});
|
|
350
383
|
}
|
|
351
384
|
/**
|
|
352
385
|
* InputToolBar – UI only. Renders toolbar and optional built-in textarea from props.
|
|
@@ -379,47 +412,58 @@ function InputToolBar({
|
|
|
379
412
|
const projectSettingsModal = projectSettingsModalOpen === true && onProjectSettingsModalClose != null && projectSettingsModalRender != null ? projectSettingsModalRender({
|
|
380
413
|
onClose: onProjectSettingsModalClose
|
|
381
414
|
}) : null;
|
|
382
|
-
return
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
415
|
+
return jsxs(Fragment, {
|
|
416
|
+
children: [templateModal, projectSettingsModal, jsx("section", {
|
|
417
|
+
className: cn('w-full overflow-visible rounded-[24px] border border-border/70 bg-card shadow-md', hasInputContent && 'cursor-text', classNames?.container, className),
|
|
418
|
+
onClick: hasInputContent ? onContainerClick : undefined,
|
|
419
|
+
role: hasInputContent ? 'presentation' : undefined,
|
|
420
|
+
children: jsxs("div", {
|
|
421
|
+
className: cn('flex px-3 py-2', hasInputContent ? 'flex-col gap-2' : 'flex-wrap items-center gap-3'),
|
|
422
|
+
children: [hasInputContent && jsxs("div", {
|
|
423
|
+
className: "min-w-0 flex-1 flex flex-col gap-2",
|
|
424
|
+
children: [effectiveTopContent, inputConfig != null ? jsxs(Fragment, {
|
|
425
|
+
children: [jsx("label", {
|
|
426
|
+
htmlFor: inputConfig.id ?? 'input-toolbar-input',
|
|
427
|
+
className: "sr-only",
|
|
428
|
+
children: inputConfig.placeholder ?? 'Message'
|
|
429
|
+
}), jsx("textarea", {
|
|
430
|
+
ref: inputConfig.inputRef,
|
|
431
|
+
id: inputConfig.id ?? 'input-toolbar-input',
|
|
432
|
+
name: inputConfig.name ?? 'query',
|
|
433
|
+
value: inputConfig.value,
|
|
434
|
+
onChange: inputConfig.onChange,
|
|
435
|
+
onKeyDown: inputConfig.onKeyDown,
|
|
436
|
+
onPaste: inputConfig.onPaste,
|
|
437
|
+
placeholder: inputConfig.placeholder ?? 'Ask anything...',
|
|
438
|
+
disabled: inputConfig.disabled,
|
|
439
|
+
rows: 1,
|
|
440
|
+
className: defaultTextareaClassName
|
|
441
|
+
})]
|
|
442
|
+
}) : children]
|
|
443
|
+
}), jsxs("div", {
|
|
444
|
+
className: cn('flex flex-wrap items-center gap-3', hasInputContent && 'pt-2'),
|
|
445
|
+
children: [jsx("div", {
|
|
446
|
+
className: cn('flex items-center gap-2', hasInputContent && 'mb-2'),
|
|
447
|
+
children: jsx(LeftSection, {
|
|
448
|
+
leftItems: leftItems,
|
|
449
|
+
templateButton: templateButton,
|
|
450
|
+
leftCustomRender: leftCustomRender,
|
|
451
|
+
classNames: classNames
|
|
452
|
+
})
|
|
453
|
+
}), !hasInputContent && jsx("div", {
|
|
454
|
+
className: "min-w-0 flex-1",
|
|
455
|
+
"aria-hidden": true
|
|
456
|
+
}), jsx("div", {
|
|
457
|
+
className: "flex flex-1 flex-wrap items-center justify-end gap-2",
|
|
458
|
+
children: jsx(RightSection, {
|
|
459
|
+
rightItems: rightItems,
|
|
460
|
+
rightCustomRender: rightCustomRender,
|
|
461
|
+
micSendButton: micSendButton,
|
|
462
|
+
classNames: classNames
|
|
463
|
+
})
|
|
464
|
+
})]
|
|
465
|
+
})]
|
|
466
|
+
})
|
|
467
|
+
})]
|
|
468
|
+
});
|
|
425
469
|
}export{InputToolBar};//# sourceMappingURL=InputToolBar.js.map
|