@admin-layout/tailwind-ui 12.2.4-alpha.4 → 12.2.4-alpha.41
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 +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 -100
- 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 -82
- 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 +8 -0
- package/lib/components/InputToolBar/InputToolBar.d.ts.map +1 -0
- package/lib/components/InputToolBar/InputToolBar.js +469 -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 +59 -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 +153 -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/index.d.ts +5 -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 +7 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';import {Loader2}from'lucide-react';const Button = ({
|
|
2
2
|
variant = 'primary',
|
|
3
3
|
size = 'medium',
|
|
4
4
|
isLoading = false,
|
|
@@ -39,11 +39,12 @@ import React__default from'react';import {Loader2}from'lucide-react';const Butto
|
|
|
39
39
|
const sizeClasses = getSizeClasses();
|
|
40
40
|
const widthClass = fullWidth ? 'w-full' : '';
|
|
41
41
|
const disabledClass = isLoading || disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer interactive-hover';
|
|
42
|
-
return
|
|
42
|
+
return jsxs("button", {
|
|
43
43
|
className: `${baseClasses} ${variantClasses} ${sizeClasses} ${widthClass} ${disabledClass} ${className}`,
|
|
44
44
|
disabled: isLoading || disabled,
|
|
45
|
-
...props
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
...props,
|
|
46
|
+
children: [isLoading && jsx(Loader2, {
|
|
47
|
+
className: "w-4 h-4 mr-2 animate-spin"
|
|
48
|
+
}), children]
|
|
49
|
+
});
|
|
49
50
|
};export{Button as TailwindUiButton};//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":[],"mappings":"4EAIA,MAAM,MAAM;AAEZ,EAAA,OAAM,GAAA;MACF,GAAA,QAAU;WACH,GAAA,KAAA;WACP,GAAU,KAAE;WACZ,GAAU,EAAE;AACZ,EAAA,QAAA;AACH,EAAA,QAAA;AAED,EAAA,GAAA;AAwDA,CAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {X}from'lucide-react';import {useRef,useId,useEffect}from'react';import {cn}from'../../utils/util.js';const DEFAULT_DIALOG_WIDTH = '32rem';
|
|
2
|
+
const DEFAULT_DIALOG_HEIGHT = 'auto';
|
|
3
|
+
const DEFAULT_DIALOG_MIN_WIDTH = 'min(20rem, 90vw)';
|
|
4
|
+
const DEFAULT_DIALOG_MIN_HEIGHT = 'min(12rem, 90vh)';
|
|
5
|
+
const DEFAULT_DIALOG_MAX_WIDTH = '90vw';
|
|
6
|
+
const DEFAULT_DIALOG_MAX_HEIGHT = '90vh';
|
|
7
|
+
function getDialogStyle(width, height) {
|
|
8
|
+
return {
|
|
9
|
+
width: width ?? DEFAULT_DIALOG_WIDTH,
|
|
10
|
+
height: height ?? DEFAULT_DIALOG_HEIGHT,
|
|
11
|
+
minWidth: DEFAULT_DIALOG_MIN_WIDTH,
|
|
12
|
+
minHeight: DEFAULT_DIALOG_MIN_HEIGHT,
|
|
13
|
+
maxWidth: DEFAULT_DIALOG_MAX_WIDTH,
|
|
14
|
+
maxHeight: DEFAULT_DIALOG_MAX_HEIGHT
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function Dialog({
|
|
18
|
+
isOpen,
|
|
19
|
+
title,
|
|
20
|
+
subtitle,
|
|
21
|
+
onClose,
|
|
22
|
+
onSave,
|
|
23
|
+
loading,
|
|
24
|
+
children,
|
|
25
|
+
saveLabel = 'Save',
|
|
26
|
+
cancelLabel = 'Cancel',
|
|
27
|
+
saveDisabled,
|
|
28
|
+
hideFooter,
|
|
29
|
+
width,
|
|
30
|
+
height,
|
|
31
|
+
className,
|
|
32
|
+
bodyClassName
|
|
33
|
+
}) {
|
|
34
|
+
const dialogRef = useRef(null);
|
|
35
|
+
const titleId = useId();
|
|
36
|
+
const trimmedTitle = title?.trim();
|
|
37
|
+
const trimmedSubtitle = subtitle?.trim();
|
|
38
|
+
const hasHeader = Boolean(trimmedTitle);
|
|
39
|
+
const dialogStyle = getDialogStyle(width, height);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const dialog = dialogRef.current;
|
|
42
|
+
if (!dialog) return;
|
|
43
|
+
if (isOpen && !dialog.open) {
|
|
44
|
+
dialog.showModal();
|
|
45
|
+
} else if (!isOpen && dialog.open) {
|
|
46
|
+
dialog.close();
|
|
47
|
+
}
|
|
48
|
+
}, [isOpen]);
|
|
49
|
+
return jsx("dialog", {
|
|
50
|
+
ref: dialogRef,
|
|
51
|
+
onClose: onClose,
|
|
52
|
+
onClick: event => {
|
|
53
|
+
if (event.target === dialogRef.current) {
|
|
54
|
+
dialogRef.current?.close();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"aria-labelledby": trimmedTitle ? titleId : undefined,
|
|
58
|
+
"aria-label": !trimmedTitle ? trimmedSubtitle || 'Dialog' : undefined,
|
|
59
|
+
className: "m-0 h-screen max-h-none w-screen max-w-none border-0 bg-transparent p-4 backdrop:bg-black/50 backdrop:backdrop-blur-sm open:fixed open:inset-0 open:flex open:items-center open:justify-center sm:p-6",
|
|
60
|
+
children: jsxs("div", {
|
|
61
|
+
style: dialogStyle,
|
|
62
|
+
className: cn('themed-modal relative flex w-full flex-col overflow-hidden rounded-themed-lg border border-border bg-card text-card-foreground shadow-themed-xl animate-in fade-in zoom-in-95 duration-200', className),
|
|
63
|
+
children: [hasHeader && jsxs("div", {
|
|
64
|
+
className: "flex items-start justify-between gap-4 bg-card px-6 py-4 text-card-foreground",
|
|
65
|
+
children: [jsxs("div", {
|
|
66
|
+
children: [jsx("h3", {
|
|
67
|
+
id: titleId,
|
|
68
|
+
className: "text-xl font-semibold text-card-foreground",
|
|
69
|
+
children: trimmedTitle
|
|
70
|
+
}), trimmedSubtitle && jsx("p", {
|
|
71
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
72
|
+
children: trimmedSubtitle
|
|
73
|
+
})]
|
|
74
|
+
}), jsx("button", {
|
|
75
|
+
type: "button",
|
|
76
|
+
onClick: onClose,
|
|
77
|
+
className: "rounded-themed bg-transparent p-1 text-muted-foreground transition-colors hover:bg-secondary/80 hover:text-foreground focus-themed",
|
|
78
|
+
"aria-label": "Close dialog",
|
|
79
|
+
children: jsx(X, {
|
|
80
|
+
className: "h-6 w-6"
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
83
|
+
}), !hasHeader && jsx("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
onClick: onClose,
|
|
86
|
+
className: "absolute right-4 top-4 z-10 rounded-themed bg-transparent p-1 text-muted-foreground transition-colors hover:bg-secondary/80 hover:text-foreground focus-themed",
|
|
87
|
+
"aria-label": "Close dialog",
|
|
88
|
+
children: jsx(X, {
|
|
89
|
+
className: "h-6 w-6"
|
|
90
|
+
})
|
|
91
|
+
}), jsx("div", {
|
|
92
|
+
className: cn('min-h-0 flex-1 overflow-y-auto bg-card px-6 py-4 text-card-foreground', !hasHeader && 'pt-14', bodyClassName),
|
|
93
|
+
children: children
|
|
94
|
+
}), !hideFooter && jsxs("div", {
|
|
95
|
+
className: "flex items-center justify-end gap-3 bg-card px-6 py-4 text-card-foreground",
|
|
96
|
+
children: [jsx("button", {
|
|
97
|
+
type: "button",
|
|
98
|
+
onClick: onClose,
|
|
99
|
+
className: "rounded-themed border border-border bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground transition-colors hover:bg-secondary/80 focus-themed",
|
|
100
|
+
children: cancelLabel
|
|
101
|
+
}), onSave && jsx("button", {
|
|
102
|
+
type: "button",
|
|
103
|
+
onClick: onSave,
|
|
104
|
+
disabled: loading || saveDisabled,
|
|
105
|
+
className: "themed-button rounded-themed px-4 py-2 text-sm font-medium focus-themed disabled:cursor-not-allowed disabled:opacity-50",
|
|
106
|
+
children: loading ? 'Saving...' : saveLabel
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
}export{Dialog};//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":[null],"names":[],"mappings":"4JAOI,oBAAkB,GAAA,OAAA;MAClB,qBAAoB,GAAA,MAAA;AACpB,MAAA,wBAAoB,GAAA,kBAAA;MACpB,yBAAkB,GAAA,kBAAA;MAClB,wBAAqB,GAAA,MAAA;MACrB,yBAAmB,GAAA,MAAA;SACnB,cAAc,CAAM,KAAC,EAAA,MAAA,EAAA;SACrB;IACA,KAAA,EAAA,KAAW,IAAE,oBAAQ;AACrB,IAAA,MAAM,EAAE,MAAA,IAAA,qBAAuB;AAC/B,IAAA,QAAO,EAAE,wBAAwB;IACjC,SAAS,EAAC,yBAAS;IACnB,QAAA,EAAA,wBAAuB;AAC1B,IAAA,SAAA,EAAA;AAoBD,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ApplicationErrorHandler: (props: any) => React.JSX.Element;
|
|
1
|
+
export declare const ApplicationErrorHandler: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
3
2
|
//# sourceMappingURL=ApplicationErrorHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandler.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ApplicationErrorHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationErrorHandler.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ApplicationErrorHandler.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,uBAAuB,GAAI,UAAK,4CAG5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {ApplicationErrorHandlerCommon}from'@admin-layout/client';import*as React from'react';import {logger}from'@cdm-logger/client';import'../ThemeProvider/ThemeProvider.js';import {toast}from'sonner';const FallbackComponent = ({
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {ApplicationErrorHandlerCommon}from'@admin-layout/client';import*as React from'react';import {logger}from'@cdm-logger/client';import'../ThemeProvider/ThemeProvider.js';import {toast}from'sonner';const FallbackComponent = ({
|
|
2
2
|
error
|
|
3
3
|
}) => {
|
|
4
4
|
React.useLayoutEffect(() => {
|
|
@@ -14,7 +14,7 @@ import {ApplicationErrorHandlerCommon}from'@admin-layout/client';import*as React
|
|
|
14
14
|
};
|
|
15
15
|
const ApplicationErrorHandler = props => {
|
|
16
16
|
const CommonHandler = ApplicationErrorHandlerCommon(FallbackComponent);
|
|
17
|
-
return
|
|
17
|
+
return jsx(CommonHandler, {
|
|
18
18
|
...props
|
|
19
19
|
});
|
|
20
20
|
};export{ApplicationErrorHandler};//# sourceMappingURL=ApplicationErrorHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ErrorBoundary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ErrorBoundary.tsx"],"names":[],"mappings":"AAyCA,eAAO,MAAM,aAAa,GAAI,UAAK,4CAElC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {ErrorBoundaryCommon}from'@admin-layout/client';import*as React from'react';import {useNavigate}from'@remix-run/react';import {logger}from'@cdm-logger/client';import {icons}from'../../icons/index.js';const Fallback = props => {
|
|
1
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {ErrorBoundaryCommon}from'@admin-layout/client';import*as React from'react';import {useNavigate}from'@remix-run/react';import {logger}from'@cdm-logger/client';import {icons}from'../../icons/index.js';const Fallback = props => {
|
|
2
2
|
const {
|
|
3
3
|
error
|
|
4
4
|
} = props;
|
|
@@ -9,33 +9,40 @@ import {ErrorBoundaryCommon}from'@admin-layout/client';import*as React from'reac
|
|
|
9
9
|
React.useEffect(() => {
|
|
10
10
|
logger.trace(error);
|
|
11
11
|
}, [error]);
|
|
12
|
-
return
|
|
13
|
-
className: "flex items-start p-4 rounded-md bg-red-50 border border-red-200"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
12
|
+
return jsxs("div", {
|
|
13
|
+
className: "flex items-start p-4 rounded-md bg-red-50 border border-red-200",
|
|
14
|
+
children: [jsx("div", {
|
|
15
|
+
className: "flex-shrink-0 mr-3 text-red-400",
|
|
16
|
+
children: jsx(ExclamationCircleIcon, {
|
|
17
|
+
className: "h-5 w-5"
|
|
18
|
+
})
|
|
19
|
+
}), jsxs("div", {
|
|
20
|
+
className: "flex-1",
|
|
21
|
+
children: [jsx("h3", {
|
|
22
|
+
className: "text-lg font-medium text-red-800",
|
|
23
|
+
children: "Error!"
|
|
24
|
+
}), jsx("div", {
|
|
25
|
+
className: "mt-2 text-sm text-red-700",
|
|
26
|
+
children: error?.message
|
|
27
|
+
})]
|
|
28
|
+
}), jsx("button", {
|
|
29
|
+
className: "ml-4 px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors",
|
|
30
|
+
onClick: () => {
|
|
31
|
+
navigate('/');
|
|
32
|
+
/**
|
|
33
|
+
* Have to reload the window because the above dispatch will only change the router
|
|
34
|
+
* but won't refresh due to which we have to call the reload on location
|
|
35
|
+
* Reference: https://stackoverflow.com/questions/63060387/how-do-i-redirect-within-an-errorboundary
|
|
36
|
+
*/
|
|
37
|
+
window.location.reload();
|
|
38
|
+
},
|
|
39
|
+
children: "Home"
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
36
42
|
};
|
|
37
43
|
const ErrorBoundary = props => {
|
|
38
|
-
return
|
|
39
|
-
fallbackComponent: Fallback
|
|
40
|
-
|
|
44
|
+
return jsx(ErrorBoundaryCommon, {
|
|
45
|
+
fallbackComponent: Fallback,
|
|
46
|
+
children: props?.children
|
|
47
|
+
});
|
|
41
48
|
};export{ErrorBoundary};//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|