@admin-layout/tailwind-ui 10.1.1-alpha.8 → 11.2.1-alpha.1
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/README.md +20 -0
- package/lib/components/Button/Button.d.ts +13 -0
- package/lib/components/Button/Button.d.ts.map +1 -0
- package/lib/components/Button/Button.js +49 -0
- package/lib/components/Button/Button.js.map +1 -0
- package/lib/components/DatePicker/DatePicker.d.ts +5 -0
- package/lib/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/lib/components/DatePicker/DatePicker.js +200 -0
- package/lib/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/components/DatePicker/index.d.ts +3 -0
- package/lib/components/DatePicker/index.d.ts.map +1 -0
- package/lib/components/DatePicker/machine.d.ts +3 -0
- package/lib/components/DatePicker/machine.d.ts.map +1 -0
- package/lib/components/DatePicker/machine.js +95 -0
- package/lib/components/DatePicker/machine.js.map +1 -0
- package/lib/components/DatePicker/types.d.ts +34 -0
- package/lib/components/DatePicker/types.d.ts.map +1 -0
- package/lib/components/DatePicker/utils.d.ts +25 -0
- package/lib/components/DatePicker/utils.d.ts.map +1 -0
- package/lib/components/DatePicker/utils.js +28 -0
- package/lib/components/DatePicker/utils.js.map +1 -0
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +2 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +6 -10
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js.map +1 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +2 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.js +28 -35
- package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +2 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +15 -20
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
- package/lib/components/ErrorPages/403.d.ts +2 -1
- package/lib/components/ErrorPages/403.d.ts.map +1 -1
- package/lib/components/ErrorPages/403.js +18 -26
- package/lib/components/ErrorPages/403.js.map +1 -1
- package/lib/components/ErrorPages/404.d.ts +2 -1
- package/lib/components/ErrorPages/404.d.ts.map +1 -1
- package/lib/components/ErrorPages/404.js +18 -26
- package/lib/components/ErrorPages/404.js.map +1 -1
- package/lib/components/ErrorPages/500.d.ts +2 -1
- package/lib/components/ErrorPages/500.d.ts.map +1 -1
- package/lib/components/ErrorPages/500.js +18 -26
- package/lib/components/ErrorPages/500.js.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +6 -0
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -0
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +56 -0
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -0
- package/lib/components/LanguageMenuDropdown/index.d.ts +2 -0
- package/lib/components/LanguageMenuDropdown/index.d.ts.map +1 -0
- package/lib/components/OTP/OTPInput.js +30 -32
- package/lib/components/OTP/OTPInput.js.map +1 -1
- package/lib/components/OTP/OTPVerification.js +55 -75
- 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/OTP/utils.js.map +1 -1
- package/lib/components/PageContainer/PageContainer.d.ts.map +1 -1
- package/lib/components/PageContainer/PageContainer.js +27 -28
- package/lib/components/PageContainer/PageContainer.js.map +1 -1
- package/lib/components/PageLoading/index.js +7 -8
- package/lib/components/PageLoading/index.js.map +1 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +12 -0
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewCheckboxWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewCheckboxWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewCustomFieldTemplate.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewCustomFieldTemplate.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewDateWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewDateWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewDialog.d.ts +9 -0
- package/lib/components/RJSFPreview/PreviewDialog.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewDropdownWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewDropdownWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewFieldTemplate.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewFieldTemplate.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewFileUploadWidget.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewFileUploadWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewFormRenderer.d.ts +16 -0
- package/lib/components/RJSFPreview/PreviewFormRenderer.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewImageUploadWidget.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewImageUploadWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewInputWidget.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewInputWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewObjectFieldTemplate.d.ts +4 -0
- package/lib/components/RJSFPreview/PreviewObjectFieldTemplate.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewRadioWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewRadioWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewStepper.d.ts +9 -0
- package/lib/components/RJSFPreview/PreviewStepper.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewSwitchWidget.d.ts +9 -0
- package/lib/components/RJSFPreview/PreviewSwitchWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewTab.d.ts +17 -0
- package/lib/components/RJSFPreview/PreviewTab.d.ts.map +1 -0
- package/lib/components/RJSFPreview/PreviewTextareaWidget.d.ts +8 -0
- package/lib/components/RJSFPreview/PreviewTextareaWidget.d.ts.map +1 -0
- package/lib/components/RJSFPreview/generateSchemaWithInputs.d.ts +9 -0
- package/lib/components/RJSFPreview/generateSchemaWithInputs.d.ts.map +1 -0
- package/lib/components/RJSFPreview/index.d.ts +2 -0
- package/lib/components/RJSFPreview/index.d.ts.map +1 -0
- package/lib/components/ReactTable/Table.d.ts +2 -1
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.js +71 -92
- package/lib/components/ReactTable/Table.js.map +1 -1
- package/lib/components/ReactTable/TableFilters.d.ts +3 -2
- package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
- package/lib/components/ReactTable/TableFilters.js +34 -40
- package/lib/components/ReactTable/TableFilters.js.map +1 -1
- package/lib/components/Search/SearchInput.d.ts +12 -0
- package/lib/components/Search/SearchInput.d.ts.map +1 -0
- package/lib/components/Search/SearchInput.js +32 -0
- package/lib/components/Search/SearchInput.js.map +1 -0
- package/lib/components/Search/index.d.ts +2 -0
- package/lib/components/Search/index.d.ts.map +1 -0
- package/lib/components/Select/Select.d.ts +35 -0
- package/lib/components/Select/Select.d.ts.map +1 -0
- package/lib/components/Select/Select.js +242 -0
- package/lib/components/Select/Select.js.map +1 -0
- package/lib/components/Select/index.d.ts +2 -0
- package/lib/components/Select/index.d.ts.map +1 -0
- package/lib/components/Spin/index.js +11 -14
- package/lib/components/Spin/index.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +16 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.js +124 -0
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts +7 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeToggle.js +47 -0
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -0
- package/lib/components/ThemeProvider/index.d.ts +4 -0
- package/lib/components/ThemeProvider/index.d.ts.map +1 -0
- package/lib/components/ThemeProvider/types.d.ts +27 -0
- package/lib/components/ThemeProvider/types.d.ts.map +1 -0
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/index.d.ts +5 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/useMediaQuery.d.ts +14 -0
- package/lib/hooks/useMediaQuery.d.ts.map +1 -0
- package/lib/hooks/useMediaQuery.js +48 -0
- package/lib/hooks/useMediaQuery.js.map +1 -0
- package/lib/hooks/useTheme.d.ts +2 -0
- package/lib/hooks/useTheme.d.ts.map +1 -0
- package/lib/hooks/useTheme.js +7 -0
- package/lib/hooks/useTheme.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 +37 -46
- package/lib/hooks/useToast.js.map +1 -1
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/hooks/useWindowSize.js +20 -0
- package/lib/hooks/useWindowSize.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/shardui/accordion.d.ts +8 -0
- package/lib/shardui/accordion.d.ts.map +1 -0
- package/lib/shardui/accordion.js +36 -0
- package/lib/shardui/accordion.js.map +1 -0
- package/lib/shardui/alert-dialog.d.ts +21 -0
- package/lib/shardui/alert-dialog.d.ts.map +1 -0
- package/lib/shardui/alert-dialog.js +75 -0
- package/lib/shardui/alert-dialog.js.map +1 -0
- package/lib/shardui/alert.d.ts +9 -0
- package/lib/shardui/alert.d.ts.map +1 -0
- package/lib/shardui/alert.js +42 -0
- package/lib/shardui/alert.js.map +1 -0
- package/lib/shardui/aspect-ratio.d.ts +4 -0
- package/lib/shardui/aspect-ratio.d.ts.map +1 -0
- package/lib/shardui/aspect-ratio.js +1 -0
- package/lib/shardui/aspect-ratio.js.map +1 -0
- package/lib/shardui/avatar.d.ts +7 -0
- package/lib/shardui/avatar.d.ts.map +1 -0
- package/lib/shardui/avatar.js +27 -0
- package/lib/shardui/avatar.js.map +1 -0
- package/lib/shardui/badge.d.ts +10 -0
- package/lib/shardui/badge.d.ts.map +1 -0
- package/lib/shardui/badge.js +25 -0
- package/lib/shardui/badge.js.map +1 -0
- package/lib/shardui/breadcrumb.d.ts +20 -0
- package/lib/shardui/breadcrumb.d.ts.map +1 -0
- package/lib/shardui/breadcrumb.js +76 -0
- package/lib/shardui/breadcrumb.js.map +1 -0
- package/lib/shardui/button.d.ts +12 -0
- package/lib/shardui/button.d.ts.map +1 -0
- package/lib/shardui/button.js +41 -0
- package/lib/shardui/button.js.map +1 -0
- package/lib/shardui/calendar.d.ts +9 -0
- package/lib/shardui/calendar.d.ts.map +1 -0
- package/lib/shardui/calendar.js +53 -0
- package/lib/shardui/calendar.js.map +1 -0
- package/lib/shardui/card.d.ts +9 -0
- package/lib/shardui/card.d.ts.map +1 -0
- package/lib/shardui/card.js +54 -0
- package/lib/shardui/card.js.map +1 -0
- package/lib/shardui/carousel.d.ts +19 -0
- package/lib/shardui/carousel.d.ts.map +1 -0
- package/lib/shardui/carousel.js +169 -0
- package/lib/shardui/carousel.js.map +1 -0
- package/lib/shardui/chart.d.ts +63 -0
- package/lib/shardui/chart.d.ts.map +1 -0
- package/lib/shardui/chart.js +182 -0
- package/lib/shardui/chart.js.map +1 -0
- package/lib/shardui/checkbox.d.ts +5 -0
- package/lib/shardui/checkbox.d.ts.map +1 -0
- package/lib/shardui/checkbox.js +13 -0
- package/lib/shardui/checkbox.js.map +1 -0
- package/lib/shardui/collapsible.d.ts +6 -0
- package/lib/shardui/collapsible.d.ts.map +1 -0
- package/lib/shardui/collapsible.js +3 -0
- package/lib/shardui/collapsible.js.map +1 -0
- package/lib/shardui/command.d.ts +83 -0
- package/lib/shardui/command.d.ts.map +1 -0
- package/lib/shardui/command.js +87 -0
- package/lib/shardui/command.js.map +1 -0
- package/lib/shardui/context-menu.d.ts +28 -0
- package/lib/shardui/context-menu.d.ts.map +1 -0
- package/lib/shardui/context-menu.js +106 -0
- package/lib/shardui/context-menu.js.map +1 -0
- package/lib/shardui/dialog.d.ts +20 -0
- package/lib/shardui/dialog.d.ts.map +1 -0
- package/lib/shardui/dialog.js +62 -0
- package/lib/shardui/dialog.js.map +1 -0
- package/lib/shardui/drawer.d.ts +23 -0
- package/lib/shardui/drawer.d.ts.map +1 -0
- package/lib/shardui/drawer.js +66 -0
- package/lib/shardui/drawer.js.map +1 -0
- package/lib/shardui/dropdown-menu.d.ts +28 -0
- package/lib/shardui/dropdown-menu.d.ts.map +1 -0
- package/lib/shardui/dropdown-menu.js +108 -0
- package/lib/shardui/dropdown-menu.js.map +1 -0
- package/lib/shardui/form.d.ts +24 -0
- package/lib/shardui/form.d.ts.map +1 -0
- package/lib/shardui/form.js +123 -0
- package/lib/shardui/form.js.map +1 -0
- package/lib/shardui/hover-card.d.ts +7 -0
- package/lib/shardui/hover-card.d.ts.map +1 -0
- package/lib/shardui/hover-card.js +15 -0
- package/lib/shardui/hover-card.js.map +1 -0
- package/lib/shardui/index.d.ts +50 -0
- package/lib/shardui/index.d.ts.map +1 -0
- package/lib/shardui/index.js +1 -0
- package/lib/shardui/index.js.map +1 -0
- package/lib/shardui/input-otp.d.ts +35 -0
- package/lib/shardui/input-otp.d.ts.map +1 -0
- package/lib/shardui/input-otp.js +50 -0
- package/lib/shardui/input-otp.js.map +1 -0
- package/lib/shardui/input.d.ts +4 -0
- package/lib/shardui/input.d.ts.map +1 -0
- package/lib/shardui/input.js +13 -0
- package/lib/shardui/input.js.map +1 -0
- package/lib/shardui/label.d.ts +6 -0
- package/lib/shardui/label.d.ts.map +1 -0
- package/lib/shardui/label.js +10 -0
- package/lib/shardui/label.js.map +1 -0
- package/lib/shardui/menubar.d.ts +34 -0
- package/lib/shardui/menubar.d.ts.map +1 -0
- package/lib/shardui/menubar.js +129 -0
- package/lib/shardui/menubar.js.map +1 -0
- package/lib/shardui/navigation-menu.d.ts +13 -0
- package/lib/shardui/navigation-menu.d.ts.map +1 -0
- package/lib/shardui/navigation-menu.js +66 -0
- package/lib/shardui/navigation-menu.js.map +1 -0
- package/lib/shardui/pagination.d.ts +29 -0
- package/lib/shardui/pagination.d.ts.map +1 -0
- package/lib/shardui/pagination.js +79 -0
- package/lib/shardui/pagination.js.map +1 -0
- package/lib/shardui/popover.d.ts +7 -0
- package/lib/shardui/popover.d.ts.map +1 -0
- package/lib/shardui/popover.js +15 -0
- package/lib/shardui/popover.js.map +1 -0
- package/lib/shardui/progress.d.ts +5 -0
- package/lib/shardui/progress.d.ts.map +1 -0
- package/lib/shardui/progress.js +15 -0
- package/lib/shardui/progress.js.map +1 -0
- package/lib/shardui/radio-group.d.ts +6 -0
- package/lib/shardui/radio-group.d.ts.map +1 -0
- package/lib/shardui/radio-group.js +26 -0
- package/lib/shardui/radio-group.js.map +1 -0
- package/lib/shardui/resizable.d.ts +25 -0
- package/lib/shardui/resizable.d.ts.map +1 -0
- package/lib/shardui/resizable.js +20 -0
- package/lib/shardui/resizable.js.map +1 -0
- package/lib/shardui/scroll-area.d.ts +6 -0
- package/lib/shardui/scroll-area.d.ts.map +1 -0
- package/lib/shardui/scroll-area.js +25 -0
- package/lib/shardui/scroll-area.js.map +1 -0
- package/lib/shardui/select.d.ts +14 -0
- package/lib/shardui/select.d.ts.map +1 -0
- package/lib/shardui/select.js +85 -0
- package/lib/shardui/select.js.map +1 -0
- package/lib/shardui/separator.d.ts +5 -0
- package/lib/shardui/separator.d.ts.map +1 -0
- package/lib/shardui/separator.js +13 -0
- package/lib/shardui/separator.js.map +1 -0
- package/lib/shardui/sheet.d.ts +26 -0
- package/lib/shardui/sheet.d.ts.map +1 -0
- package/lib/shardui/sheet.js +79 -0
- package/lib/shardui/sheet.js.map +1 -0
- package/lib/shardui/sidebar.d.ts +67 -0
- package/lib/shardui/sidebar.d.ts.map +1 -0
- package/lib/shardui/sidebar.js +474 -0
- package/lib/shardui/sidebar.js.map +1 -0
- package/lib/shardui/skeleton.d.ts +4 -0
- package/lib/shardui/skeleton.d.ts.map +1 -0
- package/lib/shardui/skeleton.js +9 -0
- package/lib/shardui/skeleton.js.map +1 -0
- package/lib/shardui/slider.d.ts +5 -0
- package/lib/shardui/slider.d.ts.map +1 -0
- package/lib/shardui/slider.js +15 -0
- package/lib/shardui/slider.js.map +1 -0
- package/lib/shardui/sonner.d.ts +6 -0
- package/lib/shardui/sonner.d.ts.map +1 -0
- package/lib/shardui/sonner.js +20 -0
- package/lib/shardui/sonner.js.map +1 -0
- package/lib/shardui/switch.d.ts +5 -0
- package/lib/shardui/switch.d.ts.map +1 -0
- package/lib/shardui/switch.js +11 -0
- package/lib/shardui/switch.js.map +1 -0
- package/lib/shardui/table.d.ts +11 -0
- package/lib/shardui/table.d.ts.map +1 -0
- package/lib/shardui/table.js +74 -0
- package/lib/shardui/table.js.map +1 -0
- package/lib/shardui/tabs.d.ts +8 -0
- package/lib/shardui/tabs.d.ts.map +1 -0
- package/lib/shardui/tabs.js +28 -0
- package/lib/shardui/tabs.js.map +1 -0
- package/lib/shardui/textarea.d.ts +6 -0
- package/lib/shardui/textarea.d.ts.map +1 -0
- package/lib/shardui/textarea.js +11 -0
- package/lib/shardui/textarea.js.map +1 -0
- package/lib/shardui/toast.d.ts +16 -0
- package/lib/shardui/toast.d.ts.map +1 -0
- package/lib/shardui/toast.js +74 -0
- package/lib/shardui/toast.js.map +1 -0
- package/lib/shardui/toaster.d.ts +3 -0
- package/lib/shardui/toaster.d.ts.map +1 -0
- package/lib/shardui/toaster.js +19 -0
- package/lib/shardui/toaster.js.map +1 -0
- package/lib/shardui/toggle-group.d.ts +13 -0
- package/lib/shardui/toggle-group.d.ts.map +1 -0
- package/lib/shardui/toggle-group.js +39 -0
- package/lib/shardui/toggle-group.js.map +1 -0
- package/lib/shardui/toggle.d.ts +13 -0
- package/lib/shardui/toggle.d.ts.map +1 -0
- package/lib/shardui/toggle.js +32 -0
- package/lib/shardui/toggle.js.map +1 -0
- package/lib/shardui/tooltip.d.ts +8 -0
- package/lib/shardui/tooltip.d.ts.map +1 -0
- package/lib/shardui/tooltip.js +14 -0
- package/lib/shardui/tooltip.js.map +1 -0
- package/lib/shardui/use-toast.d.ts +3 -0
- package/lib/shardui/use-toast.d.ts.map +1 -0
- package/lib/utils/hooks/use-mobile.d.ts +2 -0
- package/lib/utils/hooks/use-mobile.d.ts.map +1 -0
- package/lib/utils/hooks/use-mobile.js +14 -0
- package/lib/utils/hooks/use-mobile.js.map +1 -0
- package/lib/utils/hooks/use-toast.d.ts +45 -0
- package/lib/utils/hooks/use-toast.d.ts.map +1 -0
- package/lib/utils/hooks/use-toast.js +133 -0
- package/lib/utils/hooks/use-toast.js.map +1 -0
- package/lib/utils/index.d.ts +7 -1
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/isBrowser/index.js +1 -0
- package/lib/utils/isBrowser/index.js.map +1 -0
- package/lib/utils/util.d.ts +3 -0
- package/lib/utils/util.d.ts.map +1 -0
- package/lib/utils/util.js +3 -0
- package/lib/utils/util.js.map +1 -0
- package/package.json +58 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from'react';const Spin = ({
|
|
2
2
|
size = 'default',
|
|
3
3
|
tip,
|
|
4
4
|
fullPage = false,
|
|
@@ -11,21 +11,18 @@ import {jsxs,jsx}from'react/jsx-runtime';const Spin = ({
|
|
|
11
11
|
large: 'h-8 w-8 border-4'
|
|
12
12
|
};
|
|
13
13
|
// Spinner component with size variation
|
|
14
|
-
const SpinnerElement =
|
|
15
|
-
className: "inline-flex flex-col items-center justify-center"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})]
|
|
22
|
-
});
|
|
14
|
+
const SpinnerElement = React__default.createElement("div", {
|
|
15
|
+
className: "inline-flex flex-col items-center justify-center"
|
|
16
|
+
}, React__default.createElement("div", {
|
|
17
|
+
className: `${sizeClasses[size]} animate-spin rounded-full border-gray-300 border-t-blue-500 ${className}`
|
|
18
|
+
}), tip && React__default.createElement("div", {
|
|
19
|
+
className: `mt-2 text-${size === 'small' ? 'xs' : 'sm'} text-gray-600`
|
|
20
|
+
}, tip));
|
|
23
21
|
// If fullPage is true, center in viewport
|
|
24
22
|
if (fullPage) {
|
|
25
|
-
return
|
|
26
|
-
className: "fixed inset-0 z-50 flex items-center justify-center bg-white bg-opacity-80"
|
|
27
|
-
|
|
28
|
-
});
|
|
23
|
+
return React__default.createElement("div", {
|
|
24
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-white bg-opacity-80"
|
|
25
|
+
}, SpinnerElement);
|
|
29
26
|
}
|
|
30
27
|
return SpinnerElement;
|
|
31
28
|
};export{Spin};//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Spin/index.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Spin/index.tsx"],"sourcesContent":[null],"names":[],"mappings":"kCAEY,aAAQ,CAAA;AACpB,EAAA,IAAM,GAAA;KACF;UACM,GAAA,KAAO;WACb,GAAS;MACT;;AAGJ,EAAA,MAAA,WAAO;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ThemeContextType, Theme } from './types';
|
|
3
|
+
export declare const themes: {
|
|
4
|
+
value: Theme;
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const ThemeContext: React.Context<ThemeContextType>;
|
|
9
|
+
export declare const TailwindThemeProvider: React.FC<{
|
|
10
|
+
settings: any;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
actor: any;
|
|
13
|
+
routePattern: string;
|
|
14
|
+
location: any;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,MAAM;WACO,KAAK;;;GAK9B,CAAC;AAEF,eAAO,MAAM,YAAY,iCASvB,CAAC;AAEH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC;IACzC,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,GAAG,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,GAAG,CAAC;CACjB,CA8FA,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React__default,{createContext,useState,useEffect,useMemo}from'react';import'../../hooks/useToast.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';const themes = [{
|
|
2
|
+
value: 'default',
|
|
3
|
+
label: 'Default',
|
|
4
|
+
description: 'Clean and minimal design'
|
|
5
|
+
}, {
|
|
6
|
+
value: 'airbnb',
|
|
7
|
+
label: 'Airbnb',
|
|
8
|
+
description: 'Warm coral and friendly vibes'
|
|
9
|
+
}, {
|
|
10
|
+
value: 'slack',
|
|
11
|
+
label: 'Slack',
|
|
12
|
+
description: 'Professional purple workspace'
|
|
13
|
+
}, {
|
|
14
|
+
value: 'github',
|
|
15
|
+
label: 'GitHub',
|
|
16
|
+
description: 'Developer-focused dark and light'
|
|
17
|
+
}, {
|
|
18
|
+
value: 'spotify',
|
|
19
|
+
label: 'Spotify',
|
|
20
|
+
description: 'Dark mode with vibrant green'
|
|
21
|
+
}];
|
|
22
|
+
const ThemeContext = createContext({
|
|
23
|
+
theme: 'default',
|
|
24
|
+
mode: 'light',
|
|
25
|
+
setTheme: () => {},
|
|
26
|
+
setMode: () => {},
|
|
27
|
+
toggleMode: () => {},
|
|
28
|
+
themes: themes,
|
|
29
|
+
routePattern: '',
|
|
30
|
+
location: {}
|
|
31
|
+
});
|
|
32
|
+
const TailwindThemeProvider = ({
|
|
33
|
+
settings,
|
|
34
|
+
children,
|
|
35
|
+
actor,
|
|
36
|
+
routePattern,
|
|
37
|
+
location
|
|
38
|
+
}) => {
|
|
39
|
+
const {
|
|
40
|
+
theme,
|
|
41
|
+
themeType,
|
|
42
|
+
primaryColor,
|
|
43
|
+
fontFamily,
|
|
44
|
+
navTheme
|
|
45
|
+
} = settings;
|
|
46
|
+
const {
|
|
47
|
+
isMobile
|
|
48
|
+
} = useMediaQuery();
|
|
49
|
+
const currentRoute = routePattern || location?.pathname || '/';
|
|
50
|
+
const deviceType = isMobile ? 'mobile' : 'desktop';
|
|
51
|
+
const [applyToAllRoutes, setApplyToAllRoutes] = useState(false);
|
|
52
|
+
// Toggle mode
|
|
53
|
+
const toggleMode = () => {
|
|
54
|
+
const newNavTheme = navTheme === 'dark' ? 'light' : 'dark';
|
|
55
|
+
handleSettingChange('navTheme', newNavTheme);
|
|
56
|
+
};
|
|
57
|
+
function parseSettingPath(path, value) {
|
|
58
|
+
const keys = path.split('.');
|
|
59
|
+
// Base case: no nesting
|
|
60
|
+
if (keys.length === 1) {
|
|
61
|
+
return {
|
|
62
|
+
[path]: value
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
// Build nested object
|
|
66
|
+
let result = {};
|
|
67
|
+
let current = result;
|
|
68
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
69
|
+
current[keys[i]] = {};
|
|
70
|
+
current = current[keys[i]];
|
|
71
|
+
}
|
|
72
|
+
current[keys[keys.length - 1]] = value;
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
const handleSettingChange = (key, value) => {
|
|
76
|
+
const bracketKey = applyToAllRoutes ? `[${deviceType}]` : `[${currentRoute}][${deviceType}]`;
|
|
77
|
+
const settingObject = parseSettingPath(key, value);
|
|
78
|
+
const nestedValue = {
|
|
79
|
+
[bracketKey]: settingObject
|
|
80
|
+
};
|
|
81
|
+
actor.send({
|
|
82
|
+
type: 'UISETTING_UPDATE',
|
|
83
|
+
value: nestedValue
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
// Toggle dark mode class on document
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (typeof window === 'undefined') return;
|
|
89
|
+
const root = document.documentElement;
|
|
90
|
+
// Remove all previous theme classes
|
|
91
|
+
root.classList.remove('dark', 'light', 'realDark');
|
|
92
|
+
// Add only the current theme class
|
|
93
|
+
if (settings?.navTheme) {
|
|
94
|
+
root.classList.add(settings.navTheme);
|
|
95
|
+
}
|
|
96
|
+
}, [settings?.navTheme]);
|
|
97
|
+
// Apply theme effects when component mounts and when theme settings change
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (typeof window === 'undefined') return;
|
|
100
|
+
const root = document.documentElement;
|
|
101
|
+
// Apply font family to document
|
|
102
|
+
root.style.setProperty('--font-family', fontFamily);
|
|
103
|
+
// Apply theme-specific classes
|
|
104
|
+
root.dataset.theme = theme;
|
|
105
|
+
}, [theme, themeType, primaryColor, fontFamily]);
|
|
106
|
+
// Memoize the context value to prevent unnecessary re-renders
|
|
107
|
+
const contextValue = useMemo(() => ({
|
|
108
|
+
theme: theme,
|
|
109
|
+
mode: navTheme,
|
|
110
|
+
toggleMode,
|
|
111
|
+
setTheme: theme => {
|
|
112
|
+
handleSettingChange('theme', theme);
|
|
113
|
+
},
|
|
114
|
+
setMode: mode => {
|
|
115
|
+
handleSettingChange('navTheme', mode);
|
|
116
|
+
},
|
|
117
|
+
themes: themes,
|
|
118
|
+
routePattern: routePattern,
|
|
119
|
+
location: location
|
|
120
|
+
}), [theme, settings, routePattern, location]);
|
|
121
|
+
return React__default.createElement(ThemeContext.Provider, {
|
|
122
|
+
value: contextValue
|
|
123
|
+
}, children);
|
|
124
|
+
};export{TailwindThemeProvider,ThemeContext,themes};//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../../src/components/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":[null],"names":[],"mappings":"qKAIA,MAAA,SAAa,CAAA;kBACkB;;;GAK9B;AAED,EAAA,KAAA,EAAA,QAAO;AAWP,EAAA,KAAA,EAAA;aACY;AACR,CAAA,EAAA;OACA,EAAK,OAAM;OACX,EAAA,OAAY;aACJ;AACX,CAAA,EA8FC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeToggle.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/ThemeToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,gBAAgB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAYlD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React__default from'react';import {useTheme}from'../../hooks/useTheme.js';const ThemeToggle = ({
|
|
2
|
+
className = ''
|
|
3
|
+
}) => {
|
|
4
|
+
const {
|
|
5
|
+
mode,
|
|
6
|
+
toggleMode
|
|
7
|
+
} = useTheme();
|
|
8
|
+
return React__default.createElement("button", {
|
|
9
|
+
onClick: toggleMode,
|
|
10
|
+
className: `rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-colors ${className}`,
|
|
11
|
+
"aria-label": "Toggle dark mode"
|
|
12
|
+
}, mode === 'dark' ? React__default.createElement(SunIcon, {
|
|
13
|
+
className: "w-5 h-5"
|
|
14
|
+
}) : React__default.createElement(MoonIcon, {
|
|
15
|
+
className: "w-5 h-5"
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
// Simple Sun icon component
|
|
19
|
+
const SunIcon = ({
|
|
20
|
+
className
|
|
21
|
+
}) => React__default.createElement("svg", {
|
|
22
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23
|
+
className: className,
|
|
24
|
+
fill: "none",
|
|
25
|
+
viewBox: "0 0 24 24",
|
|
26
|
+
stroke: "currentColor"
|
|
27
|
+
}, React__default.createElement("path", {
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
strokeLinejoin: "round",
|
|
30
|
+
strokeWidth: 2,
|
|
31
|
+
d: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"
|
|
32
|
+
}));
|
|
33
|
+
// Simple Moon icon component
|
|
34
|
+
const MoonIcon = ({
|
|
35
|
+
className
|
|
36
|
+
}) => React__default.createElement("svg", {
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
+
className: className,
|
|
39
|
+
fill: "none",
|
|
40
|
+
viewBox: "0 0 24 24",
|
|
41
|
+
stroke: "currentColor"
|
|
42
|
+
}, React__default.createElement("path", {
|
|
43
|
+
strokeLinecap: "round",
|
|
44
|
+
strokeLinejoin: "round",
|
|
45
|
+
strokeWidth: 2,
|
|
46
|
+
d: "M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"
|
|
47
|
+
}));export{ThemeToggle};//# sourceMappingURL=ThemeToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeToggle.js","sources":["../../../src/components/ThemeProvider/ThemeToggle.tsx"],"sourcesContent":[null],"names":[],"mappings":"iFAII,MAAS,WAAU,GAAA,CAAA;AACtB,EAAA,SAAA,GAAA;AAED,CAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAGhC,cAAc,eAAe,CAAC;AAG9B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type Theme = 'default' | 'airbnb' | 'slack' | 'github' | 'spotify';
|
|
2
|
+
export type ThemeMode = 'light' | 'dark' | 'realDark';
|
|
3
|
+
export interface ThemeContextType {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
mode: ThemeMode;
|
|
6
|
+
setTheme: (theme: Theme) => void;
|
|
7
|
+
setMode: (mode: ThemeMode) => void;
|
|
8
|
+
toggleMode: () => void;
|
|
9
|
+
themes: {
|
|
10
|
+
value: Theme;
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}[];
|
|
14
|
+
routePattern: string;
|
|
15
|
+
location: any;
|
|
16
|
+
}
|
|
17
|
+
export interface ButtonStyle {
|
|
18
|
+
background: string;
|
|
19
|
+
text: string;
|
|
20
|
+
hoverBackground: string;
|
|
21
|
+
hoverText: string;
|
|
22
|
+
borderRadius: string;
|
|
23
|
+
padding: string;
|
|
24
|
+
fontWeight: string;
|
|
25
|
+
border?: string;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC1E,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC/D,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,GAAG,CAAC;CACjB;AACD,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -5,5 +5,11 @@ export * from './ErrorPages';
|
|
|
5
5
|
export * from './PageContainer';
|
|
6
6
|
export * from './Spin';
|
|
7
7
|
export * from './OTP';
|
|
8
|
+
export * from './Search';
|
|
9
|
+
export * from './Select';
|
|
10
|
+
export * from './DatePicker';
|
|
11
|
+
export * from './Button/Button';
|
|
12
|
+
export * from './ThemeProvider';
|
|
13
|
+
export * from './LanguageMenuDropdown';
|
|
8
14
|
export { PageLoading };
|
|
9
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface MediaQueryResult {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
isMobile: boolean;
|
|
5
|
+
xs: boolean;
|
|
6
|
+
sm: boolean;
|
|
7
|
+
md: boolean;
|
|
8
|
+
lg: boolean;
|
|
9
|
+
xl: boolean;
|
|
10
|
+
'2xl': boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const useMediaQuery: () => MediaQueryResult;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;CAClB;AAoBD,eAAO,MAAM,aAAa,QAAO,gBAyChC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {useState,useEffect}from'react';const breakpoints = {
|
|
2
|
+
sm: 640,
|
|
3
|
+
md: 768,
|
|
4
|
+
lg: 1024,
|
|
5
|
+
xl: 1280,
|
|
6
|
+
'2xl': 1536
|
|
7
|
+
};
|
|
8
|
+
const getFlags = width => ({
|
|
9
|
+
xs: width < breakpoints.sm,
|
|
10
|
+
sm: width >= breakpoints.sm && width < breakpoints.md,
|
|
11
|
+
md: width >= breakpoints.md && width < breakpoints.lg,
|
|
12
|
+
lg: width >= breakpoints.lg && width < breakpoints.xl,
|
|
13
|
+
xl: width >= breakpoints.xl && width < breakpoints['2xl'],
|
|
14
|
+
'2xl': width >= breakpoints['2xl']
|
|
15
|
+
});
|
|
16
|
+
const useMediaQuery = () => {
|
|
17
|
+
const getDimensions = () => {
|
|
18
|
+
const width = window.innerWidth;
|
|
19
|
+
const height = window.innerHeight;
|
|
20
|
+
const isMobile = width < breakpoints.md;
|
|
21
|
+
const flags = getFlags(width);
|
|
22
|
+
return {
|
|
23
|
+
width,
|
|
24
|
+
height,
|
|
25
|
+
isMobile,
|
|
26
|
+
...flags
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const [state, setState] = useState(() => typeof window !== 'undefined' ? getDimensions() : {
|
|
30
|
+
width: 0,
|
|
31
|
+
height: 0,
|
|
32
|
+
isMobile: false,
|
|
33
|
+
xs: false,
|
|
34
|
+
sm: false,
|
|
35
|
+
md: false,
|
|
36
|
+
lg: false,
|
|
37
|
+
xl: false,
|
|
38
|
+
'2xl': false
|
|
39
|
+
});
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const handleResize = () => {
|
|
42
|
+
setState(getDimensions());
|
|
43
|
+
};
|
|
44
|
+
window.addEventListener('resize', handleResize);
|
|
45
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
46
|
+
}, []);
|
|
47
|
+
return state;
|
|
48
|
+
};export{useMediaQuery};//# sourceMappingURL=useMediaQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaQuery.js","sources":["../../src/hooks/useMediaQuery.ts"],"sourcesContent":[null],"names":[],"mappings":"6CAGI,WAAa,GAAC;IAEd,EAAA,GAAA;IACA,EAAE;IACF,EAAE;IACF,EAAE;OACA;;MAEF,gBAAe,KAAA;AAClB,EAAA,EAAA,EAAA,KAAA,GAAA,WAAA,CAAA,EAAA;AAoBD,EAAA,EAAA,EAAA,KAAA,IAAO,WAAM,CAAA,EAAA,IAAA,KAAa,GAAA,WAAO,CAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,kCAMvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {useContext}from'react';import {ThemeContext}from'../components/ThemeProvider/ThemeProvider.js';function useTheme() {
|
|
2
|
+
const context = useContext(ThemeContext);
|
|
3
|
+
if (context === undefined) {
|
|
4
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
5
|
+
}
|
|
6
|
+
return context;
|
|
7
|
+
}export{useTheme};//# sourceMappingURL=useTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/lib/hooks/useToast.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface ToastOptions {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const ToastContainer: ({ children }: {
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
-
}) =>
|
|
14
|
+
}) => React.JSX.Element;
|
|
15
15
|
export declare const useToast: () => (options: ToastOptions) => void;
|
|
16
16
|
export declare const useToastCloseAll: () => () => void;
|
|
17
17
|
//# sourceMappingURL=useToast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../src/hooks/useToast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAKtE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,YAAY;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,aAAa,CAAC;IACxF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AA+GD,eAAO,MAAM,cAAc,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"useToast.d.ts","sourceRoot":"","sources":["../../src/hooks/useToast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAKtE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,YAAY;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,aAAa,CAAC;IACxF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AA+GD,eAAO,MAAM,cAAc,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,sBAgCzE,CAAC;AAGF,eAAO,MAAM,QAAQ,kBA/IA,YAAY,KAAK,IAqJrC,CAAC;AAGF,eAAO,MAAM,gBAAgB,cAvJT,IA6JnB,CAAC"}
|
package/lib/hooks/useToast.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default,{createContext,useCallback,useContext}from'react';import {createPortal}from'react-dom';import {icons}from'../icons/index.js';// Context
|
|
2
2
|
const ToastContext = createContext(undefined);
|
|
3
3
|
const {
|
|
4
4
|
CloseIcon,
|
|
@@ -13,19 +13,19 @@ const StatusIcon = ({
|
|
|
13
13
|
}) => {
|
|
14
14
|
switch (status) {
|
|
15
15
|
case 'success':
|
|
16
|
-
return
|
|
16
|
+
return React__default.createElement(CheckCircleIcon, {
|
|
17
17
|
className: "w-5 h-5"
|
|
18
18
|
});
|
|
19
19
|
case 'error':
|
|
20
|
-
return
|
|
20
|
+
return React__default.createElement(ExclamationCircleIcon, {
|
|
21
21
|
className: "w-5 h-5"
|
|
22
22
|
});
|
|
23
23
|
case 'warning':
|
|
24
|
-
return
|
|
24
|
+
return React__default.createElement(WarningIcon, {
|
|
25
25
|
className: "w-5 h-5"
|
|
26
26
|
});
|
|
27
27
|
case 'info':
|
|
28
|
-
return
|
|
28
|
+
return React__default.createElement(InfoCircleIcon, {
|
|
29
29
|
className: "w-5 h-5"
|
|
30
30
|
});
|
|
31
31
|
default:
|
|
@@ -77,37 +77,30 @@ const Toast = ({
|
|
|
77
77
|
'bottom-right': 'bottom-4 right-4',
|
|
78
78
|
'bottom-left': 'bottom-4 left-4'
|
|
79
79
|
};
|
|
80
|
-
return
|
|
80
|
+
return React__default.createElement("div", {
|
|
81
81
|
className: `fixed ${positionClasses[position]} z-50 transition-all duration-300 ease-in-out ${isVisible ? 'opacity-100 translate-y-0' : 'opacity-0 translate-y-2'}`,
|
|
82
82
|
role: "alert",
|
|
83
83
|
"aria-live": "assertive",
|
|
84
|
-
"data-testid": "toast"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"aria-label": "Close toast",
|
|
105
|
-
children: jsx(CloseIcon, {
|
|
106
|
-
className: "w-4 h-4"
|
|
107
|
-
})
|
|
108
|
-
})]
|
|
109
|
-
})
|
|
110
|
-
});
|
|
84
|
+
"data-testid": "toast"
|
|
85
|
+
}, React__default.createElement("div", {
|
|
86
|
+
className: `${statusClasses[status]} text-white p-4 rounded-md shadow-lg min-w-[300px] max-w-md flex items-start`
|
|
87
|
+
}, React__default.createElement("div", {
|
|
88
|
+
className: "mr-3 flex-shrink-0 mt-0.5"
|
|
89
|
+
}, React__default.createElement(StatusIcon, {
|
|
90
|
+
status: status
|
|
91
|
+
})), React__default.createElement("div", {
|
|
92
|
+
className: "flex-1"
|
|
93
|
+
}, title && React__default.createElement("h3", {
|
|
94
|
+
className: "font-bold"
|
|
95
|
+
}, title), description && React__default.createElement("p", {
|
|
96
|
+
className: "text-sm mt-1"
|
|
97
|
+
}, description)), isClosable && React__default.createElement("button", {
|
|
98
|
+
onClick: handleClose,
|
|
99
|
+
className: "ml-4 text-white opacity-70 hover:opacity-100 transition-opacity flex-shrink-0",
|
|
100
|
+
"aria-label": "Close toast"
|
|
101
|
+
}, React__default.createElement(CloseIcon, {
|
|
102
|
+
className: "w-4 h-4"
|
|
103
|
+
}))));
|
|
111
104
|
};
|
|
112
105
|
// Toast Container Component
|
|
113
106
|
const ToastContainer = ({
|
|
@@ -131,19 +124,17 @@ const ToastContainer = ({
|
|
|
131
124
|
toast,
|
|
132
125
|
closeAll
|
|
133
126
|
}), [toast, closeAll]);
|
|
134
|
-
return
|
|
135
|
-
value: value
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}), document.body)]
|
|
146
|
-
});
|
|
127
|
+
return React__default.createElement(ToastContext.Provider, {
|
|
128
|
+
value: value
|
|
129
|
+
}, children, typeof window !== 'undefined' && createPortal(React__default.createElement(React__default.Fragment, null, toasts.map(({
|
|
130
|
+
id,
|
|
131
|
+
...toastProps
|
|
132
|
+
}) => React__default.createElement(Toast, {
|
|
133
|
+
key: id,
|
|
134
|
+
id: id,
|
|
135
|
+
...toastProps,
|
|
136
|
+
onClose: () => closeToast(id)
|
|
137
|
+
}))), document.body));
|
|
147
138
|
};
|
|
148
139
|
// Hook to use the toast
|
|
149
140
|
const useToast = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToast.js","sources":["../../src/hooks/useToast.tsx"],"sourcesContent":[null],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"useToast.js","sources":["../../src/hooks/useToast.tsx"],"sourcesContent":[null],"names":[],"mappings":";MASI,YAAc,GAAA,aAAO,CAAA,SAAA,CAAA;MACrB;WACA;iBACa;AACb,EAAA,qBAAmB;AACnB,EAAA,WAAQ;AACX,EAAA;AA+GD,CAAA,GAAA,KAAA;AAA+C;AAA2B,MAAA,UAAA,GAAA,CAAA;AAmC1E,EAAA;AASA,CAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useWindowSize.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa;;;EAsB5B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {useState,useEffect}from'react';function useWindowSize() {
|
|
2
|
+
const [windowSize, setWindowSize] = useState({
|
|
3
|
+
width: typeof window !== 'undefined' ? window.innerWidth : 0,
|
|
4
|
+
// Check if window is defined
|
|
5
|
+
height: typeof window !== 'undefined' ? window.innerHeight : 0 // Check if window is defined
|
|
6
|
+
});
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
function handleResize() {
|
|
9
|
+
setWindowSize({
|
|
10
|
+
width: window.innerWidth,
|
|
11
|
+
height: window.innerHeight
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
// Add event listener for window resize
|
|
15
|
+
window.addEventListener('resize', handleResize);
|
|
16
|
+
// Cleanup the event listener on component unmount
|
|
17
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
18
|
+
}, []);
|
|
19
|
+
return windowSize;
|
|
20
|
+
}export{useWindowSize};//# sourceMappingURL=useWindowSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","sources":["../../src/hooks/useWindowSize.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAwBC,IAAA,KAAA,EAAA,OAAA,MAAA,KAAA,WAAA,GAAA,MAAA,CAAA,UAAA,GAAA,CAAA;;;;;;;;;;;;;;;;;"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as PageLoading}from'./components/PageLoading/index.js';export{ApplicationErrorHandler}from'./components/ErrorHandlers/ApplicationErrorHandler.js';export{ErrorBoundary}from'./components/ErrorHandlers/ErrorBoundary.js';export{LayoutErrorBoundary}from'./components/ErrorHandlers/LayoutErrorBoundary.js';export{ReactTable}from'./components/ReactTable/Table.js';export{DefaultColumnFilter,SelectColumnFilter}from'./components/ReactTable/TableFilters.js';export{Error404}from'./components/ErrorPages/404.js';export{Error500}from'./components/ErrorPages/500.js';export{Error403}from'./components/ErrorPages/403.js';export{PageContainer}from'./components/PageContainer/PageContainer.js';export{Spin}from'./components/Spin/index.js';export{OTPInput}from'./components/OTP/OTPInput.js';export{SingleInput}from'./components/OTP/SingleInput.js';export{useOTPInput}from'./components/OTP/hooks.js';export{OTPVerification}from'./components/OTP/OTPVerification.js';export{ToastContainer,useToast,useToastCloseAll}from'./hooks/useToast.js';//# sourceMappingURL=index.js.map
|
|
1
|
+
export{default as PageLoading}from'./components/PageLoading/index.js';export{ApplicationErrorHandler}from'./components/ErrorHandlers/ApplicationErrorHandler.js';export{ErrorBoundary}from'./components/ErrorHandlers/ErrorBoundary.js';export{LayoutErrorBoundary}from'./components/ErrorHandlers/LayoutErrorBoundary.js';export{ReactTable}from'./components/ReactTable/Table.js';export{DefaultColumnFilter,SelectColumnFilter}from'./components/ReactTable/TableFilters.js';export{Error404}from'./components/ErrorPages/404.js';export{Error500}from'./components/ErrorPages/500.js';export{Error403}from'./components/ErrorPages/403.js';export{PageContainer}from'./components/PageContainer/PageContainer.js';export{Spin}from'./components/Spin/index.js';export{OTPInput}from'./components/OTP/OTPInput.js';export{SingleInput}from'./components/OTP/SingleInput.js';export{useOTPInput}from'./components/OTP/hooks.js';export{OTPVerification}from'./components/OTP/OTPVerification.js';export{SearchInput}from'./components/Search/SearchInput.js';export{Select,SelectContent,SelectItem,SelectSearch,SelectTrigger,SelectValue}from'./components/Select/Select.js';export{DatePicker}from'./components/DatePicker/DatePicker.js';export{TailwindUiButton}from'./components/Button/Button.js';export{TailwindThemeProvider,ThemeContext,themes}from'./components/ThemeProvider/ThemeProvider.js';export{ThemeToggle}from'./components/ThemeProvider/ThemeToggle.js';export{LanguageMenuDropdown}from'./components/LanguageMenuDropdown/LanguageMenuDropdown.js';export{useTheme}from'./hooks/useTheme.js';export{useWindowSize}from'./hooks/useWindowSize.js';export{ToastContainer,useToast,useToastCloseAll}from'./hooks/useToast.js';export{useMediaQuery}from'./hooks/useMediaQuery.js';export{cn}from'./utils/util.js';//# sourceMappingURL=index.js.map
|