@admin-layout/tailwind-ui 12.2.4-alpha.9 → 12.2.4-alpha.97
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 +87 -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 +65 -0
- package/lib/components/AIToolbar/components/Markdown/index.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts +24 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.js +48 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts +28 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js +209 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts +15 -0
- package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts +5 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.js +67 -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/CharacterPicker.d.ts +5 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.js +93 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts +7 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.js +166 -0
- package/lib/components/AIToolbar/components/completion/Files.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts +6 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.js +287 -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 +131 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts +7 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js +30 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts +13 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.js +25 -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/MicrophoneDiagnostics.d.ts +2 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.js +396 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.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 +13 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.js +168 -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/SettingsPanel.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js +293 -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 +226 -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 +276 -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 +194 -0
- package/lib/components/AIToolbar/components/types.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts +13 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js +6 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts +52 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js +360 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts +14 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.js +103 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts +10 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js +126 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js.map +1 -0
- package/lib/components/AIToolbar/index.d.ts +8 -0
- package/lib/components/AIToolbar/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.d.ts +19 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.d.ts.map +1 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.js +142 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.js.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/CharacterSlotPicker/CharacterSlotPicker.d.ts +20 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.d.ts.map +1 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js +249 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js.map +1 -0
- package/lib/components/CharacterSlotPicker/index.d.ts +3 -0
- package/lib/components/CharacterSlotPicker/index.d.ts.map +1 -0
- package/lib/components/DatePicker/DatePicker.js +158 -140
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts +20 -0
- package/lib/components/Dialog/Dialog.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.js +111 -0
- package/lib/components/Dialog/Dialog.js.map +1 -0
- package/lib/components/Dialog/index.d.ts +3 -0
- package/lib/components/Dialog/index.d.ts.map +1 -0
- 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 +4 -2
- package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js +222 -104
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts +4 -2
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.js +247 -86
- 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/Inbox/Channels/ChannelBar.d.ts +33 -0
- package/lib/components/Inbox/Channels/ChannelBar.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/ChannelBar.js +79 -0
- package/lib/components/Inbox/Channels/ChannelBar.js.map +1 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts +24 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.js +177 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.js.map +1 -0
- package/lib/components/Inbox/Channels/channelsMeta.d.ts +16 -0
- package/lib/components/Inbox/Channels/channelsMeta.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/channelsMeta.js +127 -0
- package/lib/components/Inbox/Channels/channelsMeta.js.map +1 -0
- package/lib/components/Inbox/Channels/index.d.ts +7 -0
- package/lib/components/Inbox/Channels/index.d.ts.map +1 -0
- package/lib/components/Inbox/index.d.ts +2 -0
- package/lib/components/Inbox/index.d.ts.map +1 -0
- package/lib/components/InputToolBar/InputToolBar.d.ts +8 -0
- package/lib/components/InputToolBar/InputToolBar.d.ts.map +1 -0
- package/lib/components/InputToolBar/InputToolBar.js +531 -0
- package/lib/components/InputToolBar/InputToolBar.js.map +1 -0
- package/lib/components/InputToolBar/defaults.d.ts +15 -0
- package/lib/components/InputToolBar/defaults.d.ts.map +1 -0
- package/lib/components/InputToolBar/defaults.js +60 -0
- package/lib/components/InputToolBar/defaults.js.map +1 -0
- package/lib/components/InputToolBar/index.d.ts +5 -0
- package/lib/components/InputToolBar/index.d.ts.map +1 -0
- package/lib/components/InputToolBar/types.d.ts +156 -0
- package/lib/components/InputToolBar/types.d.ts.map +1 -0
- 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.d.ts +13 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.js +34 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.js.map +1 -0
- package/lib/components/Markdown/MarkdownCopyButton.d.ts +10 -0
- package/lib/components/Markdown/MarkdownCopyButton.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownCopyButton.js +229 -0
- package/lib/components/Markdown/MarkdownCopyButton.js.map +1 -0
- package/lib/components/Markdown/MarkdownHeader.d.ts +13 -0
- package/lib/components/Markdown/MarkdownHeader.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownHeader.js +44 -0
- package/lib/components/Markdown/MarkdownHeader.js.map +1 -0
- package/lib/components/Markdown/MarkdownNavigation.d.ts +15 -0
- package/lib/components/Markdown/MarkdownNavigation.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownNavigation.js +38 -0
- package/lib/components/Markdown/MarkdownNavigation.js.map +1 -0
- package/lib/components/Markdown/MarkdownPage.d.ts +41 -0
- package/lib/components/Markdown/MarkdownPage.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownPage.js +238 -0
- package/lib/components/Markdown/MarkdownPage.js.map +1 -0
- package/lib/components/Markdown/MarkdownTableOfContents.d.ts +15 -0
- package/lib/components/Markdown/MarkdownTableOfContents.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownTableOfContents.js +57 -0
- package/lib/components/Markdown/MarkdownTableOfContents.js.map +1 -0
- package/lib/components/Markdown/index.d.ts +7 -0
- package/lib/components/Markdown/index.d.ts.map +1 -0
- 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.d.ts +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +29 -17
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +28 -25
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -1
- package/lib/components/ThemeProvider/types.d.ts +3 -3
- package/lib/components/ThemeProvider/types.d.ts.map +1 -1
- package/lib/components/YantraIcon.d.ts +6 -0
- package/lib/components/YantraIcon.d.ts.map +1 -0
- package/lib/components/YantraIcon.js +32 -0
- package/lib/components/YantraIcon.js.map +1 -0
- package/lib/components/index.d.ts +8 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/activeCharacterPreference.d.ts +25 -0
- package/lib/hooks/activeCharacterPreference.d.ts.map +1 -0
- package/lib/hooks/activeCharacterPreference.js +71 -0
- package/lib/hooks/activeCharacterPreference.js.map +1 -0
- package/lib/hooks/characterOverrides.d.ts +29 -0
- package/lib/hooks/characterOverrides.d.ts.map +1 -0
- package/lib/hooks/characterOverrides.js +130 -0
- package/lib/hooks/characterOverrides.js.map +1 -0
- package/lib/hooks/characterSlotsPreference.d.ts +33 -0
- package/lib/hooks/characterSlotsPreference.d.ts.map +1 -0
- package/lib/hooks/characterSlotsPreference.js +141 -0
- package/lib/hooks/characterSlotsPreference.js.map +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useGlobalShortcutBridge.d.ts +21 -0
- package/lib/hooks/useGlobalShortcutBridge.d.ts.map +1 -0
- package/lib/hooks/useGlobalShortcutBridge.js +68 -0
- package/lib/hooks/useGlobalShortcutBridge.js.map +1 -0
- 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 +3 -3
- 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 +10 -4
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import*as React from'react';import {Star,X,Settings}from'lucide-react';import {Popover,PopoverTrigger,PopoverContent}from'../../shardui/popover.js';import {useCharacterPicker}from'../AIToolbar/hooks/useActiveCharacter.js';import {useCharacterSlots,SLOT_NUMBERS}from'../../hooks/characterSlotsPreference.js';import {useCharacterOverrides,setCharacterOverrides}from'../../hooks/characterOverrides.js';// helpers
|
|
2
|
+
function findCharacterByFile(list, fileName) {
|
|
3
|
+
if (!fileName) return null;
|
|
4
|
+
return list.find(c => c.fileName === fileName) ?? null;
|
|
5
|
+
}
|
|
6
|
+
function SlotSettingsForm({
|
|
7
|
+
fileName,
|
|
8
|
+
characterName,
|
|
9
|
+
onClose
|
|
10
|
+
}) {
|
|
11
|
+
const overrides = useCharacterOverrides(fileName);
|
|
12
|
+
const [voiceId, setVoiceId] = React.useState(overrides.voiceId);
|
|
13
|
+
const [addendum, setAddendum] = React.useState(overrides.addendum);
|
|
14
|
+
// Keep local state in sync if the popover re-opens for a different snapshot.
|
|
15
|
+
React.useEffect(() => {
|
|
16
|
+
setVoiceId(overrides.voiceId);
|
|
17
|
+
setAddendum(overrides.addendum);
|
|
18
|
+
}, [overrides.voiceId, overrides.addendum]);
|
|
19
|
+
const handleSave = () => {
|
|
20
|
+
setCharacterOverrides(fileName, {
|
|
21
|
+
voiceId: voiceId.trim(),
|
|
22
|
+
addendum: addendum.trim()
|
|
23
|
+
});
|
|
24
|
+
onClose();
|
|
25
|
+
};
|
|
26
|
+
return jsxs("div", {
|
|
27
|
+
className: "flex flex-col gap-2 p-1",
|
|
28
|
+
children: [jsx("div", {
|
|
29
|
+
className: "px-1 text-xs font-semibold text-foreground/80",
|
|
30
|
+
children: characterName
|
|
31
|
+
}), jsxs("label", {
|
|
32
|
+
className: "flex flex-col gap-1",
|
|
33
|
+
children: [jsx("span", {
|
|
34
|
+
className: "text-xs text-muted-foreground",
|
|
35
|
+
children: "TTS voice ID"
|
|
36
|
+
}), jsx("input", {
|
|
37
|
+
type: "text",
|
|
38
|
+
value: voiceId,
|
|
39
|
+
onChange: e => setVoiceId(e.target.value),
|
|
40
|
+
placeholder: "e.g. ElevenLabs voice id",
|
|
41
|
+
spellCheck: false,
|
|
42
|
+
className: "w-full rounded-md border border-border bg-background px-2 py-1 text-xs font-mono outline-none focus:border-primary"
|
|
43
|
+
})]
|
|
44
|
+
}), jsxs("label", {
|
|
45
|
+
className: "flex flex-col gap-1",
|
|
46
|
+
children: [jsx("span", {
|
|
47
|
+
className: "text-xs text-muted-foreground",
|
|
48
|
+
children: "Prompt addendum"
|
|
49
|
+
}), jsx("textarea", {
|
|
50
|
+
value: addendum,
|
|
51
|
+
onChange: e => setAddendum(e.target.value),
|
|
52
|
+
rows: 4,
|
|
53
|
+
placeholder: "Extra instructions appended to this character's persona\u2026",
|
|
54
|
+
className: "w-full resize-y rounded-md border border-border bg-background px-2 py-1 text-xs outline-none focus:border-primary"
|
|
55
|
+
})]
|
|
56
|
+
}), jsxs("div", {
|
|
57
|
+
className: "flex justify-end gap-2 pt-1",
|
|
58
|
+
children: [jsx("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
onClick: onClose,
|
|
61
|
+
className: "rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-muted",
|
|
62
|
+
children: "Cancel"
|
|
63
|
+
}), jsx("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
onClick: handleSave,
|
|
66
|
+
className: "rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90",
|
|
67
|
+
children: "Save"
|
|
68
|
+
})]
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function SlotTile({
|
|
73
|
+
slot,
|
|
74
|
+
fileName,
|
|
75
|
+
character,
|
|
76
|
+
isDefault,
|
|
77
|
+
onPick,
|
|
78
|
+
onClear,
|
|
79
|
+
onActivate,
|
|
80
|
+
onSetDefault,
|
|
81
|
+
candidates
|
|
82
|
+
}) {
|
|
83
|
+
const [open, setOpen] = React.useState(false);
|
|
84
|
+
const [settingsOpen, setSettingsOpen] = React.useState(false);
|
|
85
|
+
const filled = Boolean(fileName);
|
|
86
|
+
const handleTileClick = () => {
|
|
87
|
+
if (filled) onActivate(slot);else setOpen(true);
|
|
88
|
+
};
|
|
89
|
+
const handleContextMenu = e => {
|
|
90
|
+
if (!filled) return;
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
onClear(slot);
|
|
93
|
+
};
|
|
94
|
+
return jsxs(Popover, {
|
|
95
|
+
open: open && !filled,
|
|
96
|
+
onOpenChange: setOpen,
|
|
97
|
+
children: [jsx(PopoverTrigger, {
|
|
98
|
+
asChild: true,
|
|
99
|
+
children: jsxs("button", {
|
|
100
|
+
type: "button",
|
|
101
|
+
onClick: handleTileClick,
|
|
102
|
+
onContextMenu: handleContextMenu,
|
|
103
|
+
title: filled ? `Slot ${slot} · ${character?.name ?? fileName} (click to activate, right-click to clear)` : `Slot ${slot} · empty (click to assign)`,
|
|
104
|
+
className: ['group relative aspect-square w-full overflow-hidden rounded-xl border bg-muted/30 transition', 'flex items-center justify-center', filled ? 'border-border hover:border-primary/60' : 'border-dashed border-border/60 hover:border-primary/50 hover:bg-muted/50', isDefault ? 'ring-2 ring-primary ring-offset-2 ring-offset-background' : ''].join(' '),
|
|
105
|
+
children: [jsx("span", {
|
|
106
|
+
className: "absolute left-1 top-1 z-10 rounded bg-background/80 px-1 text-xs font-semibold text-foreground/70",
|
|
107
|
+
children: slot
|
|
108
|
+
}), filled && character?.avatarSrc ? jsx("img", {
|
|
109
|
+
src: character.avatarSrc,
|
|
110
|
+
alt: character.name,
|
|
111
|
+
className: "h-full w-full object-cover"
|
|
112
|
+
}) : filled ? jsx("span", {
|
|
113
|
+
className: "px-2 text-center text-sm font-medium text-foreground/80",
|
|
114
|
+
children: character?.name ?? fileName
|
|
115
|
+
}) : jsx("span", {
|
|
116
|
+
className: "text-2xl text-muted-foreground/60",
|
|
117
|
+
children: "+"
|
|
118
|
+
}), filled && jsx("button", {
|
|
119
|
+
type: "button",
|
|
120
|
+
onClick: e => {
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
onSetDefault(slot);
|
|
123
|
+
},
|
|
124
|
+
title: isDefault ? 'Default slot' : 'Set as default',
|
|
125
|
+
className: ['absolute right-1 top-1 z-10 rounded-full p-0.5 transition', isDefault ? 'bg-primary text-primary-foreground' : 'bg-background/80 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground'].join(' '),
|
|
126
|
+
children: jsx(Star, {
|
|
127
|
+
className: "h-3 w-3",
|
|
128
|
+
fill: isDefault ? 'currentColor' : 'none'
|
|
129
|
+
})
|
|
130
|
+
}), filled && jsx("button", {
|
|
131
|
+
type: "button",
|
|
132
|
+
onClick: e => {
|
|
133
|
+
e.stopPropagation();
|
|
134
|
+
onClear(slot);
|
|
135
|
+
},
|
|
136
|
+
title: "Clear slot",
|
|
137
|
+
className: "absolute bottom-1 right-1 z-10 rounded-full bg-background/80 p-0.5 text-muted-foreground opacity-0 transition group-hover:opacity-100 hover:text-destructive",
|
|
138
|
+
children: jsx(X, {
|
|
139
|
+
className: "h-3 w-3"
|
|
140
|
+
})
|
|
141
|
+
}), filled && fileName && jsxs(Popover, {
|
|
142
|
+
open: settingsOpen,
|
|
143
|
+
onOpenChange: setSettingsOpen,
|
|
144
|
+
children: [jsx(PopoverTrigger, {
|
|
145
|
+
asChild: true,
|
|
146
|
+
children: jsx("button", {
|
|
147
|
+
type: "button",
|
|
148
|
+
onClick: e => {
|
|
149
|
+
e.stopPropagation();
|
|
150
|
+
setSettingsOpen(true);
|
|
151
|
+
},
|
|
152
|
+
title: "Slot settings (voice id & prompt addendum)",
|
|
153
|
+
className: "absolute bottom-1 left-1 z-10 rounded-full bg-background/80 p-0.5 text-muted-foreground opacity-0 transition group-hover:opacity-100 hover:text-foreground",
|
|
154
|
+
children: jsx(Settings, {
|
|
155
|
+
className: "h-3 w-3"
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
}), jsx(PopoverContent, {
|
|
159
|
+
align: "start",
|
|
160
|
+
sideOffset: 6,
|
|
161
|
+
className: "w-72 p-2",
|
|
162
|
+
onClick: e => e.stopPropagation(),
|
|
163
|
+
children: jsx(SlotSettingsForm, {
|
|
164
|
+
fileName: fileName,
|
|
165
|
+
characterName: character?.name ?? fileName,
|
|
166
|
+
onClose: () => setSettingsOpen(false)
|
|
167
|
+
})
|
|
168
|
+
})]
|
|
169
|
+
})]
|
|
170
|
+
})
|
|
171
|
+
}), jsx(PopoverContent, {
|
|
172
|
+
align: "start",
|
|
173
|
+
sideOffset: 6,
|
|
174
|
+
className: "w-56 p-1",
|
|
175
|
+
children: jsx("div", {
|
|
176
|
+
className: "max-h-64 overflow-y-auto",
|
|
177
|
+
children: candidates.length === 0 ? jsx("p", {
|
|
178
|
+
className: "px-2 py-4 text-center text-sm text-muted-foreground",
|
|
179
|
+
children: "No characters installed."
|
|
180
|
+
}) : candidates.map(c => jsxs("button", {
|
|
181
|
+
type: "button",
|
|
182
|
+
onClick: () => {
|
|
183
|
+
onPick(slot, c.name, c.fileName);
|
|
184
|
+
setOpen(false);
|
|
185
|
+
},
|
|
186
|
+
className: "flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted",
|
|
187
|
+
children: [c.avatarSrc ? jsx("img", {
|
|
188
|
+
src: c.avatarSrc,
|
|
189
|
+
alt: "",
|
|
190
|
+
className: "h-6 w-6 rounded object-cover"
|
|
191
|
+
}) : jsx("span", {
|
|
192
|
+
className: "inline-block h-6 w-6 rounded bg-muted"
|
|
193
|
+
}), jsx("span", {
|
|
194
|
+
className: "truncate",
|
|
195
|
+
children: c.name
|
|
196
|
+
})]
|
|
197
|
+
}, c.fileName ?? c.name))
|
|
198
|
+
})
|
|
199
|
+
})]
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function CharacterSlotPicker({
|
|
203
|
+
className
|
|
204
|
+
}) {
|
|
205
|
+
const picker = useCharacterPicker();
|
|
206
|
+
const {
|
|
207
|
+
slots,
|
|
208
|
+
defaultSlot,
|
|
209
|
+
setSlot,
|
|
210
|
+
setDefaultSlot
|
|
211
|
+
} = useCharacterSlots();
|
|
212
|
+
const handlePick = React.useCallback((slot, name, fileName) => {
|
|
213
|
+
if (!fileName) return;
|
|
214
|
+
void setSlot(slot, fileName);
|
|
215
|
+
}, [setSlot]);
|
|
216
|
+
const handleClear = React.useCallback(slot => {
|
|
217
|
+
void setSlot(slot, null);
|
|
218
|
+
}, [setSlot]);
|
|
219
|
+
const handleActivate = React.useCallback(slot => {
|
|
220
|
+
const fileName = slots[slot];
|
|
221
|
+
const c = findCharacterByFile(picker.characters, fileName);
|
|
222
|
+
if (c?.name) picker.setActive(c.name);
|
|
223
|
+
}, [picker, slots]);
|
|
224
|
+
const handleSetDefault = React.useCallback(slot => {
|
|
225
|
+
void setDefaultSlot(slot);
|
|
226
|
+
// Also activate the default slot's character so the change is visible.
|
|
227
|
+
const fileName = slots[slot];
|
|
228
|
+
const c = findCharacterByFile(picker.characters, fileName);
|
|
229
|
+
if (c?.name) picker.setActive(c.name);
|
|
230
|
+
}, [picker, slots, setDefaultSlot]);
|
|
231
|
+
return jsx("div", {
|
|
232
|
+
className: ['grid grid-cols-3 gap-2', className ?? ''].join(' '),
|
|
233
|
+
children: SLOT_NUMBERS.map(slot => {
|
|
234
|
+
const fileName = slots[slot];
|
|
235
|
+
const character = findCharacterByFile(picker.characters, fileName);
|
|
236
|
+
return jsx(SlotTile, {
|
|
237
|
+
slot: slot,
|
|
238
|
+
fileName: fileName,
|
|
239
|
+
character: character,
|
|
240
|
+
isDefault: slot === defaultSlot,
|
|
241
|
+
onPick: handlePick,
|
|
242
|
+
onClear: handleClear,
|
|
243
|
+
onActivate: handleActivate,
|
|
244
|
+
onSetDefault: handleSetDefault,
|
|
245
|
+
candidates: picker.characters
|
|
246
|
+
}, slot);
|
|
247
|
+
})
|
|
248
|
+
});
|
|
249
|
+
}export{CharacterSlotPicker};//# sourceMappingURL=CharacterSlotPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CharacterSlotPicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CharacterSlotPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {useRef,useEffect}from'react';import {useActor}from'@xstate/react';import {datePickerMachine}from'./machine.js';import {getDaysInMonth,getYearsRange,months}from'./utils.js';const DatePicker = ({
|
|
2
2
|
value,
|
|
3
3
|
onChange,
|
|
4
4
|
placeholder = 'Select date',
|
|
@@ -53,148 +53,166 @@ import React__default,{useRef,useEffect}from'react';import {useActor}from'@xstat
|
|
|
53
53
|
// Group dates into rows (5 rows of 7 days each - may have empty cells)
|
|
54
54
|
const numberOfRows = Math.ceil(daysInMonth / 7);
|
|
55
55
|
const years = getYearsRange(currentDate.getFullYear());
|
|
56
|
-
return
|
|
56
|
+
return jsxs("div", {
|
|
57
57
|
ref: containerRef,
|
|
58
|
-
className: `relative ${className}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
58
|
+
className: `relative ${className}`,
|
|
59
|
+
children: [jsxs("div", {
|
|
60
|
+
className: "relative",
|
|
61
|
+
children: [jsx("input", {
|
|
62
|
+
type: "text",
|
|
63
|
+
className: "w-full px-2 py-1 h-7 border border-gray-300 hover:border-blue-400 focus:border-blue-400 \n rounded text-xs transition-colors duration-200 ease-in-out shadow-sm \n focus:outline-none focus:ring-0",
|
|
64
|
+
placeholder: placeholder,
|
|
65
|
+
value: inputValue,
|
|
66
|
+
onChange: e => send({
|
|
67
|
+
type: 'INPUT_CHANGE',
|
|
68
|
+
value: e.target.value
|
|
69
|
+
}),
|
|
70
|
+
onClick: () => send({
|
|
71
|
+
type: 'TOGGLE_CALENDAR'
|
|
72
|
+
}),
|
|
73
|
+
readOnly: true
|
|
74
|
+
}), jsx("div", {
|
|
75
|
+
className: "absolute inset-y-0 right-0 flex items-center px-2 cursor-pointer text-gray-400",
|
|
76
|
+
onClick: () => send({
|
|
77
|
+
type: 'TOGGLE_CALENDAR'
|
|
78
|
+
}),
|
|
79
|
+
children: jsx("svg", {
|
|
80
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
+
className: "h-3 w-3",
|
|
82
|
+
fill: "none",
|
|
83
|
+
viewBox: "0 0 24 24",
|
|
84
|
+
stroke: "currentColor",
|
|
85
|
+
children: jsx("path", {
|
|
86
|
+
strokeLinecap: "round",
|
|
87
|
+
strokeLinejoin: "round",
|
|
88
|
+
strokeWidth: 2,
|
|
89
|
+
d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
})]
|
|
93
|
+
}), isOpen && jsxs("div", {
|
|
94
|
+
className: "absolute z-50 mt-1 w-72 bg-white rounded shadow-md border border-gray-200",
|
|
95
|
+
children: [jsx("div", {
|
|
96
|
+
className: "px-1 py-1 border-b border-gray-200",
|
|
97
|
+
children: jsxs("div", {
|
|
98
|
+
className: "flex justify-between items-center",
|
|
99
|
+
children: [jsx("button", {
|
|
100
|
+
className: "p-0.5 hover:bg-gray-100 text-gray-600 rounded flex items-center justify-center w-5 h-5",
|
|
101
|
+
onClick: () => send({
|
|
102
|
+
type: 'PREV_MONTH'
|
|
103
|
+
}),
|
|
104
|
+
children: jsx("svg", {
|
|
105
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
106
|
+
className: "h-3 w-3",
|
|
107
|
+
fill: "none",
|
|
108
|
+
viewBox: "0 0 24 24",
|
|
109
|
+
stroke: "currentColor",
|
|
110
|
+
children: jsx("path", {
|
|
111
|
+
strokeLinecap: "round",
|
|
112
|
+
strokeLinejoin: "round",
|
|
113
|
+
strokeWidth: 2.5,
|
|
114
|
+
d: "M15 19l-7-7 7-7"
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
}), jsxs("div", {
|
|
118
|
+
className: "flex items-center space-x-1 text-xs",
|
|
119
|
+
children: [jsx("select", {
|
|
120
|
+
className: "appearance-none bg-transparent cursor-pointer py-0 px-1 pr-6 w-20 rounded hover:bg-gray-100 text-gray-800 border-0 focus:outline-none focus:ring-0 text-xs",
|
|
121
|
+
value: currentMonth.getMonth(),
|
|
122
|
+
onChange: e => send({
|
|
123
|
+
type: 'SELECT_MONTH',
|
|
124
|
+
month: parseInt(e.target.value)
|
|
125
|
+
}),
|
|
126
|
+
style: {
|
|
127
|
+
backgroundPosition: 'right 4px center'
|
|
128
|
+
},
|
|
129
|
+
children: months.map((month, index) => jsx("option", {
|
|
130
|
+
value: index,
|
|
131
|
+
children: month
|
|
132
|
+
}, month))
|
|
133
|
+
}), jsx("select", {
|
|
134
|
+
className: "appearance-none bg-transparent cursor-pointer py-0 px-1 pr-6 w-14 rounded hover:bg-gray-100 text-gray-800 border-0 focus:outline-none focus:ring-0 text-xs",
|
|
135
|
+
value: currentMonth.getFullYear(),
|
|
136
|
+
onChange: e => send({
|
|
137
|
+
type: 'SELECT_YEAR',
|
|
138
|
+
year: parseInt(e.target.value)
|
|
139
|
+
}),
|
|
140
|
+
style: {
|
|
141
|
+
backgroundPosition: 'right 4px center'
|
|
142
|
+
},
|
|
143
|
+
children: years.map(year => jsx("option", {
|
|
144
|
+
value: year,
|
|
145
|
+
children: year
|
|
146
|
+
}, year))
|
|
147
|
+
})]
|
|
148
|
+
}), jsx("button", {
|
|
149
|
+
className: "p-0.5 hover:bg-gray-100 text-gray-600 rounded flex items-center justify-center w-5 h-5",
|
|
150
|
+
onClick: () => send({
|
|
151
|
+
type: 'NEXT_MONTH'
|
|
152
|
+
}),
|
|
153
|
+
children: jsx("svg", {
|
|
154
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
155
|
+
className: "h-3 w-3",
|
|
156
|
+
fill: "none",
|
|
157
|
+
viewBox: "0 0 24 24",
|
|
158
|
+
stroke: "currentColor",
|
|
159
|
+
children: jsx("path", {
|
|
160
|
+
strokeLinecap: "round",
|
|
161
|
+
strokeLinejoin: "round",
|
|
162
|
+
strokeWidth: 2.5,
|
|
163
|
+
d: "M9 5l7 7-7 7"
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
})]
|
|
167
|
+
})
|
|
168
|
+
}), jsxs("div", {
|
|
169
|
+
className: "border-b border-gray-200",
|
|
170
|
+
children: [jsx("div", {
|
|
171
|
+
className: "flex border-b border-gray-100 bg-gray-50",
|
|
172
|
+
children: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'].map((day, index) => jsx("div", {
|
|
173
|
+
className: `flex-1 px-1 py-1 text-xs text-center font-medium text-gray-700 ${index < 6 ? 'border-r border-gray-100' : ''}`,
|
|
174
|
+
children: day
|
|
175
|
+
}, day))
|
|
176
|
+
}), jsx("div", {
|
|
177
|
+
className: "p-0",
|
|
178
|
+
children: Array.from({
|
|
179
|
+
length: numberOfRows
|
|
180
|
+
}).map((_, rowIndex) => jsx("div", {
|
|
181
|
+
className: "flex border-b border-gray-100 last:border-b-0",
|
|
182
|
+
children: Array.from({
|
|
183
|
+
length: 7
|
|
184
|
+
}).map((_, colIndex) => {
|
|
185
|
+
const dateIndex = rowIndex * 7 + colIndex;
|
|
186
|
+
// Return empty cell if out of range
|
|
187
|
+
if (dateIndex >= dates.length) {
|
|
188
|
+
return jsx("div", {
|
|
189
|
+
className: "flex-1 h-6 border-r border-gray-100 last:border-r-0"
|
|
190
|
+
}, `empty-${rowIndex}-${colIndex}`);
|
|
191
|
+
}
|
|
192
|
+
const date = dates[dateIndex];
|
|
193
|
+
const isToday = date.getDate() === currentDate.getDate() && date.getMonth() === currentDate.getMonth() && date.getFullYear() === currentDate.getFullYear();
|
|
194
|
+
const isSelected = selectedDate && date.getDate() === selectedDate.getDate() && date.getMonth() === selectedDate.getMonth() && date.getFullYear() === selectedDate.getFullYear();
|
|
195
|
+
return jsx("div", {
|
|
196
|
+
className: `
|
|
187
197
|
flex-1 h-6 flex items-center justify-center text-xs cursor-pointer transition-colors
|
|
188
198
|
border-r border-gray-100 last:border-r-0
|
|
189
199
|
${isToday && !isSelected ? 'font-bold text-blue-600' : ''}
|
|
190
200
|
${isSelected ? 'bg-blue-50 text-blue-700 font-medium' : 'hover:bg-gray-50'}
|
|
191
201
|
`,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
onClick: () => handleDateSelect(date),
|
|
203
|
+
children: date.getDate()
|
|
204
|
+
}, `date-${date.getDate()}`);
|
|
205
|
+
})
|
|
206
|
+
}, `row-${rowIndex}`))
|
|
207
|
+
})]
|
|
208
|
+
}), jsx("div", {
|
|
209
|
+
className: "py-1 px-1 flex justify-end",
|
|
210
|
+
children: jsx("button", {
|
|
211
|
+
className: "px-2 py-0.5 text-xs text-blue-600 hover:bg-blue-50 transition-colors",
|
|
212
|
+
onClick: () => handleDateSelect(new Date()),
|
|
213
|
+
children: "Today"
|
|
214
|
+
})
|
|
215
|
+
})]
|
|
216
|
+
})]
|
|
217
|
+
});
|
|
218
|
+
};export{DatePicker};//# sourceMappingURL=DatePicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export interface DialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSave?: () => void;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
saveLabel?: string;
|
|
11
|
+
cancelLabel?: string;
|
|
12
|
+
saveDisabled?: boolean;
|
|
13
|
+
hideFooter?: boolean;
|
|
14
|
+
width?: CSSProperties['width'];
|
|
15
|
+
height?: CSSProperties['height'];
|
|
16
|
+
className?: string;
|
|
17
|
+
bodyClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function Dialog({ isOpen, title, subtitle, onClose, onSave, loading, children, saveLabel, cancelLabel, saveDisabled, hideFooter, width, height, className, bodyClassName, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,aAAa,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAC;AAGlF,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAoBD,wBAAgB,MAAM,CAAC,EACnB,MAAM,EACN,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAkB,EAClB,WAAsB,EACtB,YAAY,EACZ,UAAU,EACV,KAAK,EACL,MAAM,EACN,SAAS,EACT,aAAa,GAChB,EAAE,WAAW,2CAuGb"}
|