@vitnode/core 1.2.0-canary.13 → 1.2.0-canary.15
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/config/next.config.ts +27 -0
- package/dist/emails/my-email.d.ts +2 -0
- package/dist/emails/my-email.d.ts.map +1 -0
- package/dist/scripts/get-config.d.ts +3 -0
- package/dist/scripts/get-config.d.ts.map +1 -0
- package/dist/scripts/plugin.d.ts +4 -0
- package/dist/scripts/plugin.d.ts.map +1 -0
- package/dist/scripts/prepare-database.d.ts +7 -0
- package/dist/scripts/prepare-database.d.ts.map +1 -0
- package/dist/scripts/prepare-plugins-files.d.ts +2 -0
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -0
- package/dist/scripts/run-interactive-shell-command.d.ts +2 -0
- package/dist/scripts/run-interactive-shell-command.d.ts.map +1 -0
- package/dist/scripts/scripts.d.ts +3 -0
- package/dist/scripts/scripts.d.ts.map +1 -0
- package/dist/scripts/shared/file-utils.d.ts +14 -0
- package/dist/scripts/shared/file-utils.d.ts.map +1 -0
- package/dist/src/api/config.d.ts +24 -0
- package/dist/src/api/config.d.ts.map +1 -0
- package/dist/src/api/config.js +50 -0
- package/dist/src/api/lib/check-plugin-id.d.ts +15 -0
- package/dist/src/api/lib/check-plugin-id.d.ts.map +1 -0
- package/dist/src/api/lib/check-plugin-id.js +15 -0
- package/dist/src/api/lib/get-user-ip.d.ts +3 -0
- package/dist/src/api/lib/get-user-ip.d.ts.map +1 -0
- package/dist/src/api/lib/get-user-ip.js +8 -0
- package/dist/src/api/lib/module.d.ts +23 -0
- package/dist/src/api/lib/module.d.ts.map +1 -0
- package/dist/src/api/lib/module.js +21 -0
- package/dist/src/api/lib/plugin.d.ts +11 -0
- package/dist/src/api/lib/plugin.d.ts.map +1 -0
- package/dist/src/api/lib/plugin.js +14 -0
- package/dist/src/api/lib/route.d.ts +26 -0
- package/dist/src/api/lib/route.d.ts.map +1 -0
- package/dist/src/api/lib/route.js +23 -0
- package/dist/src/api/lib/with-pagination.d.ts +72 -0
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -0
- package/dist/src/api/lib/with-pagination.js +70 -0
- package/dist/src/api/middlewares/global/global.d.ts +66 -0
- package/dist/src/api/middlewares/global/global.d.ts.map +1 -0
- package/dist/src/api/middlewares/global/global.js +47 -0
- package/dist/src/api/models/device.d.ts +10 -0
- package/dist/src/api/models/device.d.ts.map +1 -0
- package/dist/src/api/models/device.js +54 -0
- package/dist/src/api/models/email.d.ts +22 -0
- package/dist/src/api/models/email.d.ts.map +1 -0
- package/dist/src/api/models/email.js +30 -0
- package/dist/src/api/models/password.d.ts +5 -0
- package/dist/src/api/models/password.d.ts.map +1 -0
- package/dist/src/api/models/password.js +21 -0
- package/dist/src/api/models/session-admin.d.ts +24 -0
- package/dist/src/api/models/session-admin.d.ts.map +1 -0
- package/dist/src/api/models/session-admin.js +73 -0
- package/dist/src/api/models/session.d.ts +23 -0
- package/dist/src/api/models/session.d.ts.map +1 -0
- package/dist/src/api/models/session.js +60 -0
- package/dist/src/api/models/sso.d.ts +38 -0
- package/dist/src/api/models/sso.d.ts.map +1 -0
- package/dist/src/api/models/sso.js +120 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts +17 -0
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -0
- package/dist/src/api/models/user/get-user-by-id.js +18 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +10 -0
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-in-with-passwords.js +22 -0
- package/dist/src/api/models/user/sign-up.d.ts +21 -0
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -0
- package/dist/src/api/models/user/sign-up.js +75 -0
- package/dist/src/api/models/user.d.ts +45 -0
- package/dist/src/api/models/user.d.ts.map +1 -0
- package/dist/src/api/models/user.js +8 -0
- package/dist/src/api/modules/admin/admin.module.d.ts +294 -0
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/admin.module.js +14 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +108 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/routes/session.route.js +51 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +190 -0
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/list.route.js +79 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +193 -0
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/routes/users.route.js +84 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +189 -0
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/users/users.admin.module.js +10 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts +52 -0
- package/dist/src/api/modules/middleware/middleware.module.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/middleware.module.js +10 -0
- package/dist/src/api/modules/middleware/route.d.ts +53 -0
- package/dist/src/api/modules/middleware/route.d.ts.map +1 -0
- package/dist/src/api/modules/middleware/route.js +39 -0
- package/dist/src/api/modules/users/avatar-color.d.ts +2 -0
- package/dist/src/api/modules/users/avatar-color.d.ts.map +1 -0
- package/dist/src/api/modules/users/avatar-color.js +43 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts +103 -0
- package/dist/src/api/modules/users/routes/session.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/session.route.js +46 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +88 -0
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-in.route.js +71 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +47 -0
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-out.route.js +43 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +89 -0
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/sign-up.route.js +60 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts +31 -0
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/routes/test.route.js +32 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +78 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/callback.route.js +49 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +51 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +36 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts +125 -0
- package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/sso/sso.module.js +12 -0
- package/dist/src/api/modules/users/users.module.d.ts +439 -0
- package/dist/src/api/modules/users/users.module.d.ts.map +1 -0
- package/dist/src/api/modules/users/users.module.js +22 -0
- package/dist/src/api/plugin.d.ts +2 -0
- package/dist/src/api/plugin.d.ts.map +1 -0
- package/dist/src/api/plugin.js +13 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts +10 -0
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +1 -0
- package/dist/src/api/plugins/email/nodemailer.js +30 -0
- package/dist/src/api/plugins/email/resend.d.ts +6 -0
- package/dist/src/api/plugins/email/resend.d.ts.map +1 -0
- package/dist/src/api/plugins/email/resend.js +21 -0
- package/dist/src/api/plugins/sso/discord.d.ts +6 -0
- package/dist/src/api/plugins/sso/discord.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/discord.js +77 -0
- package/dist/src/api/plugins/sso/facebook.d.ts +6 -0
- package/dist/src/api/plugins/sso/facebook.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/facebook.js +76 -0
- package/dist/src/api/plugins/sso/google.d.ts +6 -0
- package/dist/src/api/plugins/sso/google.d.ts.map +1 -0
- package/dist/src/api/plugins/sso/google.js +87 -0
- package/dist/src/app/login/page.d.ts +6 -0
- package/dist/src/app/login/page.d.ts.map +1 -0
- package/dist/src/app/login/page.js +15 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts +7 -0
- package/dist/src/app/login/sso/[providerId]/page.d.ts.map +1 -0
- package/dist/src/app/login/sso/[providerId]/page.js +10 -0
- package/dist/src/app/register/page.d.ts +6 -0
- package/dist/src/app/register/page.d.ts.map +1 -0
- package/dist/src/app/register/page.js +15 -0
- package/dist/src/app_admin/core/page.d.ts +2 -0
- package/dist/src/app_admin/core/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/page.js +5 -0
- package/dist/src/app_admin/core/test/page.d.ts +2 -0
- package/dist/src/app_admin/core/test/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/test/page.js +5 -0
- package/dist/src/app_admin/core/users/page.d.ts +6 -0
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/users/page.js +35 -0
- package/dist/src/components/avatar.d.ts +10 -0
- package/dist/src/components/avatar.d.ts.map +1 -0
- package/dist/src/components/avatar.js +14 -0
- package/dist/src/components/date-format.d.ts +5 -0
- package/dist/src/components/date-format.d.ts.map +1 -0
- package/dist/src/components/date-format.js +38 -0
- package/dist/src/components/form/auto-form.d.ts +12 -0
- package/dist/src/components/form/auto-form.d.ts.map +1 -0
- package/dist/src/components/form/auto-form.js +57 -0
- package/dist/src/components/form/common/desc.d.ts +2 -0
- package/dist/src/components/form/common/desc.d.ts.map +1 -0
- package/dist/src/components/form/common/desc.js +9 -0
- package/dist/src/components/form/common/label.d.ts +3 -0
- package/dist/src/components/form/common/label.d.ts.map +1 -0
- package/dist/src/components/form/common/label.js +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts +8 -0
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -0
- package/dist/src/components/form/fields/checkbox.js +35 -0
- package/dist/src/components/form/fields/combobox.d.ts +14 -0
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -0
- package/dist/src/components/form/fields/combobox.js +88 -0
- package/dist/src/components/form/fields/input.d.ts +9 -0
- package/dist/src/components/form/fields/input.d.ts.map +1 -0
- package/dist/src/components/form/fields/input.js +34 -0
- package/dist/src/components/form/fields/item.d.ts +14 -0
- package/dist/src/components/form/fields/item.d.ts.map +1 -0
- package/dist/src/components/form/fields/item.js +22 -0
- package/dist/src/components/form/fields/radio-group.d.ts +13 -0
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -0
- package/dist/src/components/form/fields/radio-group.js +51 -0
- package/dist/src/components/form/fields/select.d.ts +14 -0
- package/dist/src/components/form/fields/select.d.ts.map +1 -0
- package/dist/src/components/form/fields/select.js +59 -0
- package/dist/src/components/form/fields/switch.d.ts +8 -0
- package/dist/src/components/form/fields/switch.d.ts.map +1 -0
- package/dist/src/components/form/fields/switch.js +35 -0
- package/dist/src/components/form/fields/textarea.d.ts +9 -0
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -0
- package/dist/src/components/form/fields/textarea.js +34 -0
- package/dist/src/components/i18n-provider.d.ts +7 -0
- package/dist/src/components/i18n-provider.d.ts.map +1 -0
- package/dist/src/components/i18n-provider.js +43 -0
- package/dist/src/components/logo-vitnode.d.ts +4 -0
- package/dist/src/components/logo-vitnode.d.ts.map +1 -0
- package/dist/src/components/logo-vitnode.js +113 -0
- package/dist/src/components/switchers/theme-switcher.d.ts +2 -0
- package/dist/src/components/switchers/theme-switcher.d.ts.map +1 -0
- package/dist/src/components/switchers/theme-switcher.js +25 -0
- package/dist/src/components/table/content.d.ts +3 -0
- package/dist/src/components/table/content.d.ts.map +1 -0
- package/dist/src/components/table/content.js +84 -0
- package/dist/src/components/table/data-table.d.ts +37 -0
- package/dist/src/components/table/data-table.d.ts.map +1 -0
- package/dist/src/components/table/data-table.js +69 -0
- package/dist/src/components/table/order-table-head.d.ts +7 -0
- package/dist/src/components/table/order-table-head.d.ts.map +1 -0
- package/dist/src/components/table/order-table-head.js +39 -0
- package/dist/src/components/table/pagination.d.ts +11 -0
- package/dist/src/components/table/pagination.d.ts.map +1 -0
- package/dist/src/components/table/pagination.js +122 -0
- package/dist/src/components/ui/accordion.d.ts +8 -0
- package/dist/src/components/ui/accordion.d.ts.map +1 -0
- package/dist/src/components/ui/accordion.js +47 -0
- package/dist/src/components/ui/alert-dialog.d.ts +15 -0
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/src/components/ui/alert-dialog.js +86 -0
- package/dist/src/components/ui/alert.d.ts +10 -0
- package/dist/src/components/ui/alert.d.ts.map +1 -0
- package/dist/src/components/ui/alert.js +40 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.d.ts.map +1 -0
- package/dist/src/components/ui/badge.js +29 -0
- package/dist/src/components/ui/button.d.ts +13 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/button.js +66 -0
- package/dist/src/components/ui/card.d.ts +10 -0
- package/dist/src/components/ui/card.d.ts.map +1 -0
- package/dist/src/components/ui/card.js +53 -0
- package/dist/src/components/ui/checkbox.d.ts +5 -0
- package/dist/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/checkbox.js +21 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.js +22 -0
- package/dist/src/components/ui/command.d.ts +19 -0
- package/dist/src/components/ui/command.d.ts.map +1 -0
- package/dist/src/components/ui/command.js +99 -0
- package/dist/src/components/ui/context-menu.d.ts +26 -0
- package/dist/src/components/ui/context-menu.d.ts.map +1 -0
- package/dist/src/components/ui/context-menu.js +141 -0
- package/dist/src/components/ui/dialog.d.ts +23 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.js +181 -0
- package/dist/src/components/ui/drawer.d.ts +14 -0
- package/dist/src/components/ui/drawer.d.ts.map +1 -0
- package/dist/src/components/ui/drawer.js +84 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/src/components/ui/dropdown-menu.js +142 -0
- package/dist/src/components/ui/form.d.ts +33 -0
- package/dist/src/components/ui/form.d.ts.map +1 -0
- package/dist/src/components/ui/form.js +142 -0
- package/dist/src/components/ui/header-content.d.ts +17 -0
- package/dist/src/components/ui/header-content.d.ts.map +1 -0
- package/dist/src/components/ui/header-content.js +30 -0
- package/dist/src/components/ui/hover-card.d.ts +7 -0
- package/dist/src/components/ui/hover-card.d.ts.map +1 -0
- package/dist/src/components/ui/hover-card.js +30 -0
- package/dist/src/components/ui/input-otp.d.ts +12 -0
- package/dist/src/components/ui/input-otp.d.ts.map +1 -0
- package/dist/src/components/ui/input-otp.js +49 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/input.js +12 -0
- package/dist/src/components/ui/label.d.ts +5 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/label.js +13 -0
- package/dist/src/components/ui/loader.d.ts +5 -0
- package/dist/src/components/ui/loader.d.ts.map +1 -0
- package/dist/src/components/ui/loader.js +16 -0
- package/dist/src/components/ui/menubar.d.ts +27 -0
- package/dist/src/components/ui/menubar.d.ts.map +1 -0
- package/dist/src/components/ui/menubar.js +152 -0
- package/dist/src/components/ui/navigation-menu.d.ts +15 -0
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/src/components/ui/navigation-menu.js +83 -0
- package/dist/src/components/ui/popover.d.ts +8 -0
- package/dist/src/components/ui/popover.d.ts.map +1 -0
- package/dist/src/components/ui/popover.js +35 -0
- package/dist/src/components/ui/progress.d.ts +5 -0
- package/dist/src/components/ui/progress.d.ts.map +1 -0
- package/dist/src/components/ui/progress.js +20 -0
- package/dist/src/components/ui/radio-group.d.ts +6 -0
- package/dist/src/components/ui/radio-group.d.ts.map +1 -0
- package/dist/src/components/ui/radio-group.js +28 -0
- package/dist/src/components/ui/select.d.ts +16 -0
- package/dist/src/components/ui/select.d.ts.map +1 -0
- package/dist/src/components/ui/select.js +114 -0
- package/dist/src/components/ui/separator.d.ts +5 -0
- package/dist/src/components/ui/separator.d.ts.map +1 -0
- package/dist/src/components/ui/separator.js +15 -0
- package/dist/src/components/ui/sheet.d.ts +14 -0
- package/dist/src/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/components/ui/sheet.js +93 -0
- package/dist/src/components/ui/sidebar.d.ts +70 -0
- package/dist/src/components/ui/sidebar.d.ts.map +1 -0
- package/dist/src/components/ui/sidebar.js +437 -0
- package/dist/src/components/ui/skeleton.d.ts +3 -0
- package/dist/src/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/components/ui/skeleton.js +10 -0
- package/dist/src/components/ui/slider.d.ts +5 -0
- package/dist/src/components/ui/slider.d.ts.map +1 -0
- package/dist/src/components/ui/slider.js +42 -0
- package/dist/src/components/ui/sonner.d.ts +4 -0
- package/dist/src/components/ui/sonner.d.ts.map +1 -0
- package/dist/src/components/ui/sonner.js +26 -0
- package/dist/src/components/ui/switch.d.ts +5 -0
- package/dist/src/components/ui/switch.d.ts.map +1 -0
- package/dist/src/components/ui/switch.js +17 -0
- package/dist/src/components/ui/table.d.ts +11 -0
- package/dist/src/components/ui/table.d.ts.map +1 -0
- package/dist/src/components/ui/table.js +64 -0
- package/dist/src/components/ui/tabs.d.ts +8 -0
- package/dist/src/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/components/ui/tabs.js +34 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.js +11 -0
- package/dist/src/components/ui/toggle-group.d.ts +8 -0
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/src/components/ui/toggle-group.js +41 -0
- package/dist/src/components/ui/toggle.d.ts +10 -0
- package/dist/src/components/ui/toggle.d.ts.map +1 -0
- package/dist/src/components/ui/toggle.js +35 -0
- package/dist/src/components/ui/tooltip.d.ts +8 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.js +43 -0
- package/dist/src/config.d.ts +5 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +4 -0
- package/dist/src/database/admins.d.ts +246 -0
- package/dist/src/database/admins.d.ts.map +1 -0
- package/dist/src/database/admins.js +74 -0
- package/dist/src/database/languages.d.ts +321 -0
- package/dist/src/database/languages.d.ts.map +1 -0
- package/dist/src/database/languages.js +52 -0
- package/dist/src/database/moderators.d.ts +114 -0
- package/dist/src/database/moderators.d.ts.map +1 -0
- package/dist/src/database/moderators.js +37 -0
- package/dist/src/database/roles.d.ts +146 -0
- package/dist/src/database/roles.d.ts.map +1 -0
- package/dist/src/database/roles.js +13 -0
- package/dist/src/database/sessions.d.ts +196 -0
- package/dist/src/database/sessions.d.ts.map +1 -0
- package/dist/src/database/sessions.js +57 -0
- package/dist/src/database/users.d.ts +562 -0
- package/dist/src/database/users.d.ts.map +1 -0
- package/dist/src/database/users.js +142 -0
- package/dist/src/drizzle.config.d.ts +6 -0
- package/dist/src/drizzle.config.d.ts.map +1 -0
- package/dist/src/drizzle.config.js +37 -0
- package/dist/src/hooks/use-before-unload.d.ts +2 -0
- package/dist/src/hooks/use-before-unload.d.ts.map +1 -0
- package/dist/src/hooks/use-before-unload.js +30 -0
- package/dist/src/hooks/use-mobile.d.ts +2 -0
- package/dist/src/hooks/use-mobile.d.ts.map +1 -0
- package/dist/src/hooks/use-mobile.js +15 -0
- package/dist/src/lib/api/get-middleware-api.d.ts +8 -0
- package/dist/src/lib/api/get-middleware-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-middleware-api.js +13 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts +16 -0
- package/dist/src/lib/api/get-session-admin-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-admin-api.js +19 -0
- package/dist/src/lib/api/get-session-api.d.ts +17 -0
- package/dist/src/lib/api/get-session-api.d.ts.map +1 -0
- package/dist/src/lib/api/get-session-api.js +14 -0
- package/dist/src/lib/colors.d.ts +23 -0
- package/dist/src/lib/colors.d.ts.map +1 -0
- package/dist/src/lib/colors.js +131 -0
- package/dist/src/lib/colors.test.d.ts +2 -0
- package/dist/src/lib/colors.test.d.ts.map +1 -0
- package/dist/src/lib/colors.test.js +173 -0
- package/dist/src/lib/config.d.ts +6 -0
- package/dist/src/lib/config.d.ts.map +1 -0
- package/dist/src/lib/config.js +15 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts +10 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +12 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts +2 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +78 -0
- package/dist/src/lib/fetcher/helpers.d.ts +3 -0
- package/dist/src/lib/fetcher/helpers.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.js +33 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts +2 -0
- package/dist/src/lib/fetcher/helpers.test.d.ts.map +1 -0
- package/dist/src/lib/fetcher/helpers.test.js +37 -0
- package/dist/src/lib/fetcher/types.d.ts +120 -0
- package/dist/src/lib/fetcher/types.d.ts.map +1 -0
- package/dist/src/lib/fetcher/types.js +1 -0
- package/dist/src/lib/fetcher.d.ts +9 -0
- package/dist/src/lib/fetcher.d.ts.map +1 -0
- package/dist/src/lib/fetcher.js +47 -0
- package/dist/src/lib/helpers/auto-form.d.ts +10 -0
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.js +82 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts +2 -0
- package/dist/src/lib/helpers/auto-form.test.d.ts.map +1 -0
- package/dist/src/lib/helpers/auto-form.test.js +126 -0
- package/dist/src/lib/navigation.d.ts +339 -0
- package/dist/src/lib/navigation.d.ts.map +1 -0
- package/dist/src/lib/navigation.js +11 -0
- package/dist/src/lib/plugin.d.ts +15 -0
- package/dist/src/lib/plugin.d.ts.map +1 -0
- package/dist/src/lib/plugin.js +3 -0
- package/dist/src/lib/special-characters.d.ts +3 -0
- package/dist/src/lib/special-characters.d.ts.map +1 -0
- package/dist/src/lib/special-characters.js +4 -0
- package/dist/src/lib/special-characters.test.d.ts +2 -0
- package/dist/src/lib/special-characters.test.d.ts.map +1 -0
- package/dist/src/lib/special-characters.test.js +56 -0
- package/dist/src/lib/utils.d.ts +3 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/lib/utils.js +5 -0
- package/dist/src/tests/setup.d.ts +2 -0
- package/dist/src/tests/setup.d.ts.map +1 -0
- package/dist/src/tests/setup.js +6 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts +8 -0
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/admin-layout.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts +11 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +70 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +10 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +49 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +3 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +30 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts +4 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +14 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts +7 -0
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/client.js +61 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +3 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -0
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +31 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts +2 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +26 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts +2 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +44 -0
- package/dist/src/views/admin/views/core/test.d.ts +2 -0
- package/dist/src/views/admin/views/core/test.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/test.js +146 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts +4 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/users/users-admin-view.js +90 -0
- package/dist/src/views/auth/components/password-input.d.ts +4 -0
- package/dist/src/views/auth/components/password-input.d.ts.map +1 -0
- package/dist/src/views/auth/components/password-input.js +89 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/form.js +59 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts +10 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +33 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts +27 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +38 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts +2 -0
- package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-in/sign-in-view.js +55 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts +4 -0
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/form.js +88 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts +6 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +18 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts +61 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +57 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts +2 -0
- package/dist/src/views/auth/sign-up/sign-up-view.d.ts.map +1 -0
- package/dist/src/views/auth/sign-up/sign-up-view.js +61 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts +5 -0
- package/dist/src/views/auth/sso/buttons/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/client.js +22 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts +4 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/mutation-api.js +24 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +3 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +51 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts +5 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +18 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts +6 -0
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/client.js +39 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts +8 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -0
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +27 -0
- package/dist/src/views/error/back-button.d.ts +5 -0
- package/dist/src/views/error/back-button.d.ts.map +1 -0
- package/dist/src/views/error/back-button.js +14 -0
- package/dist/src/views/error/error-view.d.ts +5 -0
- package/dist/src/views/error/error-view.d.ts.map +1 -0
- package/dist/src/views/error/error-view.js +56 -0
- package/dist/src/views/error/global-error-view.d.ts +6 -0
- package/dist/src/views/error/global-error-view.d.ts.map +1 -0
- package/dist/src/views/error/global-error-view.js +57 -0
- package/dist/src/views/layouts/provider.d.ts +11 -0
- package/dist/src/views/layouts/provider.d.ts.map +1 -0
- package/dist/src/views/layouts/provider.js +43 -0
- package/dist/src/views/layouts/root-layout.d.ts +16 -0
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -0
- package/dist/src/views/layouts/root-layout.js +38 -0
- package/dist/src/views/layouts/theme/header/header.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/header.js +32 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +33 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +5 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/client.js +47 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts +4 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +27 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts +2 -0
- package/dist/src/views/layouts/theme/header/user/user.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/header/user/user.js +34 -0
- package/dist/src/views/layouts/theme/layout.d.ts +5 -0
- package/dist/src/views/layouts/theme/layout.d.ts.map +1 -0
- package/dist/src/views/layouts/theme/layout.js +15 -0
- package/dist/src/vitnode.config.d.ts +50 -0
- package/dist/src/vitnode.config.d.ts.map +1 -0
- package/dist/src/vitnode.config.js +39 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/tsup.config.d.ts +3 -0
- package/dist/tsup.config.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/drizzle.config.ts +62 -0
- package/src/vitnode.config.ts +100 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
export const LogoVitNode = ({ className, small, ...props })=>{
|
|
4
|
+
if (small) return /*#__PURE__*/ _jsxs("svg", {
|
|
5
|
+
"aria-label": "Logo VitNode",
|
|
6
|
+
className: cn('text-foreground', className),
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 375 376",
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
...props,
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ _jsx("path", {
|
|
13
|
+
d: "M169.385 16.196C180.827 9.60134 194.923 9.60134 206.365 16.196L329.51 87.1749C340.952 93.7695 348 105.957 348 119.146V261.104C348 274.293 340.952 286.481 329.51 293.075L206.365 364.054C194.923 370.649 180.827 370.649 169.385 364.054L46.2396 293.075C34.7982 286.481 27.75 274.293 27.75 261.104V119.146C27.75 105.957 34.7982 93.7695 46.2396 87.1749L169.385 16.196Z",
|
|
14
|
+
fill: "#FDFEFF"
|
|
15
|
+
}),
|
|
16
|
+
/*#__PURE__*/ _jsx("path", {
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M168.101 5.19482C180.105 -1.73161 194.895 -1.73161 206.899 5.19482L336.101 79.745C348.105 86.6714 355.5 99.472 355.5 113.325V262.425C355.5 276.278 348.105 289.079 336.101 296.005L206.899 370.555C194.895 377.482 180.105 377.482 168.101 370.555L38.899 296.005C26.8948 289.079 19.5 276.278 19.5 262.425V113.325C19.5 99.472 26.8948 86.6714 38.899 79.745L168.101 5.19482ZM109.649 106.082L187.5 61.1613L265.351 106.082L187.5 241.071L109.649 106.082ZM77.6969 148.394V251.232L166.585 302.521L77.6969 148.394ZM208.415 302.521L297.303 251.232V148.394L208.415 302.521Z",
|
|
19
|
+
fill: "url(#paint0_linear_123_23)",
|
|
20
|
+
fillRule: "evenodd"
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ _jsx("defs", {
|
|
23
|
+
children: /*#__PURE__*/ _jsxs("linearGradient", {
|
|
24
|
+
gradientUnits: "userSpaceOnUse",
|
|
25
|
+
id: "paint0_linear_123_23",
|
|
26
|
+
x1: "187.5",
|
|
27
|
+
x2: "187.5",
|
|
28
|
+
y1: "0",
|
|
29
|
+
y2: "375.75",
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx("stop", {
|
|
32
|
+
stopColor: "#3261BF"
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ _jsx("stop", {
|
|
35
|
+
offset: "1",
|
|
36
|
+
stopColor: "#363795"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
return /*#__PURE__*/ _jsxs("svg", {
|
|
44
|
+
"aria-label": "Logo VitNode",
|
|
45
|
+
className: cn('text-foreground', className),
|
|
46
|
+
fill: "none",
|
|
47
|
+
viewBox: "0 0 762 191",
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
/*#__PURE__*/ _jsxs("g", {
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ _jsx("path", {
|
|
54
|
+
d: "M550.7 157H543.7L505 98.2V157H498V87.1H505L543.7 145.8V87.1H550.7V157ZM597.955 157.7C591.488 157.7 585.621 156.2 580.355 153.2C575.088 150.133 570.921 145.9 567.855 140.5C564.855 135.033 563.355 128.867 563.355 122C563.355 115.133 564.855 109 567.855 103.6C570.921 98.1333 575.088 93.9 580.355 90.9C585.621 87.8333 591.488 86.3 597.955 86.3C604.488 86.3 610.388 87.8333 615.655 90.9C620.921 93.9 625.055 98.1333 628.055 103.6C631.055 109 632.555 115.133 632.555 122C632.555 128.867 631.055 135.033 628.055 140.5C625.055 145.9 620.921 150.133 615.655 153.2C610.388 156.2 604.488 157.7 597.955 157.7ZM597.955 151.6C603.155 151.6 607.821 150.4 611.955 148C616.088 145.6 619.355 142.167 621.755 137.7C624.155 133.167 625.355 127.933 625.355 122C625.355 116.067 624.155 110.867 621.755 106.4C619.355 101.933 616.088 98.5 611.955 96.1C607.821 93.7 603.155 92.5 597.955 92.5C592.755 92.5 588.088 93.7 583.955 96.1C579.821 98.5 576.555 101.933 574.155 106.4C571.755 110.867 570.555 116.067 570.555 122C570.555 127.933 571.755 133.167 574.155 137.7C576.555 142.167 579.821 145.6 583.955 148C588.088 150.4 592.755 151.6 597.955 151.6ZM666.063 87.1C673.797 87.1 680.43 88.5 685.963 91.3C691.497 94.1 695.73 98.1333 698.663 103.4C701.597 108.667 703.063 114.933 703.063 122.2C703.063 129.4 701.597 135.633 698.663 140.9C695.73 146.1 691.497 150.1 685.963 152.9C680.43 155.633 673.797 157 666.063 157H645.363V87.1H666.063ZM666.063 151.2C675.797 151.2 683.197 148.667 688.263 143.6C693.397 138.467 695.963 131.333 695.963 122.2C695.963 113 693.397 105.833 688.263 100.7C683.197 95.5 675.797 92.9 666.063 92.9H652.363V151.2H666.063ZM722.969 92.8V118.9H749.469V124.7H722.969V151.2H752.469V157H715.969V87H752.469V92.8H722.969Z",
|
|
55
|
+
fill: "currentColor"
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsx("path", {
|
|
58
|
+
d: "M349.338 32.044L305.016 157H266.924L222.602 32.044H254.998L285.97 126.384L317.12 32.044H349.338ZM392.497 32.044V157H362.059V32.044H392.497ZM504.446 32.044V56.43H471.338V157H440.9V56.43H407.792V32.044H504.446Z",
|
|
59
|
+
fill: "url(#paint0_linear_205_42)"
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ _jsx("path", {
|
|
64
|
+
d: "M85.7722 8.20596C91.5658 4.86468 98.7039 4.86468 104.497 8.20596L166.855 44.1686C172.649 47.5099 176.218 53.6848 176.218 60.3674V132.293C176.218 138.975 172.649 145.15 166.855 148.491L104.497 184.454C98.7039 187.795 91.5658 187.795 85.7722 184.454L23.4144 148.491C17.6208 145.15 14.0518 138.975 14.0518 132.293V60.3674C14.0518 53.6848 17.6208 47.5099 23.4144 44.1686L85.7722 8.20596Z",
|
|
65
|
+
fill: "#FDFEFF"
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ _jsx("path", {
|
|
68
|
+
clipRule: "evenodd",
|
|
69
|
+
d: "M85.1219 2.63204C91.2005 -0.877348 98.6896 -0.877348 104.768 2.63204L170.193 40.4041C176.271 43.9135 180.016 50.3991 180.016 57.4179V132.962C180.016 139.981 176.271 146.466 170.193 149.976L104.768 187.748C98.6896 191.257 91.2005 191.257 85.1219 187.748L19.6974 149.976C13.6188 146.466 9.87427 139.981 9.87427 132.962V57.4179C9.87427 50.3991 13.6188 43.9135 19.6974 40.4041L85.1219 2.63204ZM55.5232 53.7481L94.945 30.9884L134.367 53.7481L94.945 122.143L55.5232 53.7481ZM39.3436 75.1861V127.291L84.3544 153.277L39.3436 75.1861ZM105.536 153.277L150.546 127.291V75.1861L105.536 153.277Z",
|
|
70
|
+
fill: "url(#paint1_linear_205_42)",
|
|
71
|
+
fillRule: "evenodd"
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ _jsxs("defs", {
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ _jsxs("linearGradient", {
|
|
76
|
+
gradientUnits: "userSpaceOnUse",
|
|
77
|
+
id: "paint0_linear_205_42",
|
|
78
|
+
x1: "381.603",
|
|
79
|
+
x2: "381.603",
|
|
80
|
+
y1: "6",
|
|
81
|
+
y2: "196",
|
|
82
|
+
children: [
|
|
83
|
+
/*#__PURE__*/ _jsx("stop", {
|
|
84
|
+
stopColor: "#3261BF"
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ _jsx("stop", {
|
|
87
|
+
offset: "1",
|
|
88
|
+
stopColor: "#363795"
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
}),
|
|
92
|
+
/*#__PURE__*/ _jsxs("linearGradient", {
|
|
93
|
+
gradientUnits: "userSpaceOnUse",
|
|
94
|
+
id: "paint1_linear_205_42",
|
|
95
|
+
x1: "94.945",
|
|
96
|
+
x2: "94.945",
|
|
97
|
+
y1: "0",
|
|
98
|
+
y2: "190.38",
|
|
99
|
+
children: [
|
|
100
|
+
/*#__PURE__*/ _jsx("stop", {
|
|
101
|
+
stopColor: "#3261BF"
|
|
102
|
+
}),
|
|
103
|
+
/*#__PURE__*/ _jsx("stop", {
|
|
104
|
+
offset: "1",
|
|
105
|
+
stopColor: "#363795"
|
|
106
|
+
})
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-switcher.d.ts","sourceRoot":"","sources":["../../../../src/components/switchers/theme-switcher.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,+CAiBzB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Moon, Sun } from "lucide-react";
|
|
4
|
+
import { useTheme } from "next-themes";
|
|
5
|
+
import { Button } from "../ui/button";
|
|
6
|
+
export const ThemeSwitcher = ()=>{
|
|
7
|
+
const { setTheme, resolvedTheme } = useTheme();
|
|
8
|
+
return /*#__PURE__*/ _jsxs(Button, {
|
|
9
|
+
className: "relative",
|
|
10
|
+
onClick: ()=>{
|
|
11
|
+
const nextTheme = resolvedTheme === 'dark' ? 'light' : 'dark';
|
|
12
|
+
setTheme(nextTheme);
|
|
13
|
+
},
|
|
14
|
+
size: "icon",
|
|
15
|
+
variant: "ghost",
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsx(Sun, {
|
|
18
|
+
className: "size-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsx(Moon, {
|
|
21
|
+
className: "absolute size-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DataTable, DataTableTMin } from './data-table';
|
|
2
|
+
export declare function ContentDataTable<T extends DataTableTMin>({ columns, edges, pageInfo, order, customNotFoundComponent, ...props }: React.ComponentProps<typeof DataTable<T>>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../src/components/table/content.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAc7D,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,aAAa,EAAE,EACxD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,uBAAuB,EACvB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,2CAoF3C"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SearchXIcon } from "lucide-react";
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table";
|
|
6
|
+
import { OrderTableHeadDataTable } from "./order-table-head";
|
|
7
|
+
import { PaginationDataTable } from "./pagination";
|
|
8
|
+
export function ContentDataTable({ columns, edges, pageInfo, order, customNotFoundComponent, ...props }) {
|
|
9
|
+
const t = useTranslations('core.global');
|
|
10
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
11
|
+
className: "space-y-4",
|
|
12
|
+
children: [
|
|
13
|
+
/*#__PURE__*/ _jsx("div", {
|
|
14
|
+
className: "overflow-hidden rounded-lg border",
|
|
15
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
16
|
+
className: "relative w-full overflow-auto",
|
|
17
|
+
children: /*#__PURE__*/ _jsxs(Table, {
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(TableHeader, {
|
|
21
|
+
className: "bg-muted sticky top-0 z-10",
|
|
22
|
+
children: /*#__PURE__*/ _jsx(TableRow, {
|
|
23
|
+
children: columns.map((column)=>/*#__PURE__*/ _jsx(TableHead, {
|
|
24
|
+
className: cn(column.className),
|
|
25
|
+
children: order.columns?.includes(column.id) ? /*#__PURE__*/ _jsx(OrderTableHeadDataTable, {
|
|
26
|
+
id: column.id,
|
|
27
|
+
order: order,
|
|
28
|
+
children: column.label
|
|
29
|
+
}) : column.label
|
|
30
|
+
}, column.id.toString()))
|
|
31
|
+
})
|
|
32
|
+
}),
|
|
33
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
34
|
+
children: edges.length ? edges.map((row)=>/*#__PURE__*/ _jsx(TableRow, {
|
|
35
|
+
children: columns.map((column)=>{
|
|
36
|
+
const content = column.cell?.({
|
|
37
|
+
allData: edges,
|
|
38
|
+
row
|
|
39
|
+
}) ?? (column.id === 'actions' ? '' : String(row[column.id]));
|
|
40
|
+
return /*#__PURE__*/ _jsx(TableCell, {
|
|
41
|
+
className: cn({
|
|
42
|
+
'flex flex-wrap items-center justify-end gap-2': column.id === 'actions'
|
|
43
|
+
}),
|
|
44
|
+
children: content
|
|
45
|
+
}, `${row.id}_${column.id.toString()}`);
|
|
46
|
+
})
|
|
47
|
+
}, row.id)) : /*#__PURE__*/ _jsx(TableRow, {
|
|
48
|
+
children: /*#__PURE__*/ _jsx(TableCell, {
|
|
49
|
+
className: "mx-auto max-w-sm whitespace-normal p-4 text-center sm:px-10 sm:py-12",
|
|
50
|
+
colSpan: columns.length,
|
|
51
|
+
children: customNotFoundComponent ?? /*#__PURE__*/ _jsxs("div", {
|
|
52
|
+
className: "flex flex-col items-center justify-center gap-6",
|
|
53
|
+
children: [
|
|
54
|
+
/*#__PURE__*/ _jsx(SearchXIcon, {
|
|
55
|
+
className: "text-muted-foreground size-16 sm:size-24"
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
58
|
+
className: "space-y-2 text-center",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
61
|
+
className: "text-xl font-semibold tracking-tight",
|
|
62
|
+
children: t('no_results.title')
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsx("p", {
|
|
65
|
+
className: "text-muted-foreground text-sm",
|
|
66
|
+
children: t('no_results.desc')
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ _jsx(PaginationDataTable, {
|
|
80
|
+
pageInfo: pageInfo
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PaginationDataTable } from './pagination';
|
|
3
|
+
import { Table } from '../ui/table';
|
|
4
|
+
export interface DataTableTMin {
|
|
5
|
+
id: number;
|
|
6
|
+
}
|
|
7
|
+
export interface SearchParamsDataTable<T = unknown> {
|
|
8
|
+
cursor?: string;
|
|
9
|
+
first?: string;
|
|
10
|
+
last?: string;
|
|
11
|
+
order?: 'asc' | 'desc';
|
|
12
|
+
orderBy?: keyof T;
|
|
13
|
+
}
|
|
14
|
+
export declare const DataTableSkeleton: ({ columns }: {
|
|
15
|
+
columns: number;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function DataTable<T extends DataTableTMin>(props: Omit<React.ComponentProps<typeof Table>, 'columns'> & React.ComponentProps<typeof PaginationDataTable> & {
|
|
18
|
+
columns: {
|
|
19
|
+
cell?: (data: {
|
|
20
|
+
allData: T[];
|
|
21
|
+
row: T;
|
|
22
|
+
}) => React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
id: 'actions' | keyof T;
|
|
25
|
+
label: string;
|
|
26
|
+
}[];
|
|
27
|
+
customNotFoundComponent?: React.ReactNode;
|
|
28
|
+
edges: T[];
|
|
29
|
+
order: {
|
|
30
|
+
columns?: (keyof T)[];
|
|
31
|
+
defaultOrder: {
|
|
32
|
+
column: keyof T;
|
|
33
|
+
order: 'asc' | 'desc';
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
//# sourceMappingURL=data-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,OAAO;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,4CAgCjE,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,SAAS,aAAa,EAC/C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,SAAS,CAAC,GACxD,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,GAAG;IACjD,OAAO,EAAE;QACP,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YAAC,GAAG,EAAE,CAAC,CAAA;SAAE,KAAK,KAAK,CAAC,SAAS,CAAC;QAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,EAAE,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,uBAAuB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1C,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE;QACL,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QACtB,YAAY,EAAE;YACZ,MAAM,EAAE,MAAM,CAAC,CAAC;YAChB,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;CACH,2CAaJ"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ErrorView } from "../../views/error/error-view";
|
|
4
|
+
import { Skeleton } from "../ui/skeleton";
|
|
5
|
+
import { Table, TableBody, TableHead, TableHeader, TableRow } from "../ui/table";
|
|
6
|
+
import { ContentDataTable } from "./content";
|
|
7
|
+
export const DataTableSkeleton = ({ columns })=>/*#__PURE__*/ _jsxs("div", {
|
|
8
|
+
className: "space-y-4",
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ _jsx("div", {
|
|
11
|
+
className: "overflow-hidden rounded-lg border",
|
|
12
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
13
|
+
className: "relative w-full overflow-auto",
|
|
14
|
+
children: /*#__PURE__*/ _jsxs(Table, {
|
|
15
|
+
className: "min-w-full",
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsx(TableHeader, {
|
|
18
|
+
children: /*#__PURE__*/ _jsx(TableRow, {
|
|
19
|
+
children: Array.from({
|
|
20
|
+
length: columns
|
|
21
|
+
}).map((_, i)=>/*#__PURE__*/ _jsx(TableHead, {
|
|
22
|
+
className: "px-4 py-3",
|
|
23
|
+
children: /*#__PURE__*/ _jsx(Skeleton, {
|
|
24
|
+
className: "h-4 w-24"
|
|
25
|
+
})
|
|
26
|
+
}, i))
|
|
27
|
+
})
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsx(TableBody, {
|
|
30
|
+
children: Array.from({
|
|
31
|
+
length: 6
|
|
32
|
+
}).map((_, i)=>/*#__PURE__*/ _jsx(TableRow, {
|
|
33
|
+
children: Array.from({
|
|
34
|
+
length: columns
|
|
35
|
+
}).map((_, j)=>/*#__PURE__*/ _jsx("td", {
|
|
36
|
+
className: "px-4 py-3",
|
|
37
|
+
children: /*#__PURE__*/ _jsx(Skeleton, {
|
|
38
|
+
className: "h-4 w-full"
|
|
39
|
+
})
|
|
40
|
+
}, j))
|
|
41
|
+
}, i))
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ _jsx("div", {
|
|
48
|
+
className: "flex justify-end",
|
|
49
|
+
children: /*#__PURE__*/ _jsx(Skeleton, {
|
|
50
|
+
className: "h-8 w-32"
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
export function DataTable(props) {
|
|
56
|
+
if (!props.edges || !props.pageInfo) {
|
|
57
|
+
return /*#__PURE__*/ _jsx(ErrorView, {
|
|
58
|
+
code: 500
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return /*#__PURE__*/ _jsx(React.Suspense, {
|
|
62
|
+
fallback: /*#__PURE__*/ _jsx(DataTableSkeleton, {
|
|
63
|
+
columns: props.columns.length
|
|
64
|
+
}),
|
|
65
|
+
children: /*#__PURE__*/ _jsx(ContentDataTable, {
|
|
66
|
+
...props
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DataTable, DataTableTMin } from './data-table';
|
|
3
|
+
export declare function OrderTableHeadDataTable<T extends DataTableTMin>({ id, children, order: { defaultOrder }, }: Pick<React.ComponentProps<typeof DataTable<T>>, 'order'> & {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
id: React.ComponentProps<typeof DataTable<T>>['columns'][0]['id'];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=order-table-head.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-table-head.d.ts","sourceRoot":"","sources":["../../../../src/components/table/order-table-head.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,aAAa,EAAE,EAC/D,EAAE,EACF,QAAQ,EACR,KAAK,EAAE,EAAE,YAAY,EAAE,GACxB,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAC5D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;CACnE,2CA2CA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowDown, ArrowUp, ChevronsUpDown } from "lucide-react";
|
|
4
|
+
import { useSearchParams } from "next/navigation";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { usePathname, useRouter } from "../../lib/navigation";
|
|
7
|
+
import { Button } from "../ui/button";
|
|
8
|
+
import { Loader } from "../ui/loader";
|
|
9
|
+
export function OrderTableHeadDataTable({ id, children, order: { defaultOrder } }) {
|
|
10
|
+
const [isPending, startTransition] = React.useTransition();
|
|
11
|
+
const searchParams = useSearchParams();
|
|
12
|
+
const pathname = usePathname();
|
|
13
|
+
const { push } = useRouter();
|
|
14
|
+
const currentOrderBy = searchParams.get('orderBy') ?? defaultOrder.column.toString();
|
|
15
|
+
const currentOrder = searchParams.get('order') ?? defaultOrder.order;
|
|
16
|
+
const isActive = currentOrderBy === id.toString();
|
|
17
|
+
const nextOrder = isActive && currentOrder === 'asc' ? 'desc' : 'asc';
|
|
18
|
+
return /*#__PURE__*/ _jsxs(Button, {
|
|
19
|
+
className: "[&_svg]:text-muted-foreground flex h-8 items-center gap-1.5 rounded-md px-2 py-1.5 [&_svg]:size-4 [&_svg]:shrink-0",
|
|
20
|
+
onClick: ()=>{
|
|
21
|
+
startTransition(()=>{
|
|
22
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
23
|
+
params.set('orderBy', id.toString());
|
|
24
|
+
params.set('order', nextOrder);
|
|
25
|
+
push(`${pathname}?${params.toString()}`, {
|
|
26
|
+
scroll: false
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
size: "sm",
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
children: [
|
|
33
|
+
children,
|
|
34
|
+
isPending ? /*#__PURE__*/ _jsx(Loader, {
|
|
35
|
+
small: true
|
|
36
|
+
}) : isActive ? currentOrder === 'asc' ? /*#__PURE__*/ _jsx(ArrowUp, {}) : /*#__PURE__*/ _jsx(ArrowDown, {}) : /*#__PURE__*/ _jsx(ChevronsUpDown, {})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const PaginationDataTable: ({ pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor }, }: {
|
|
2
|
+
pageInfo: {
|
|
3
|
+
count: number;
|
|
4
|
+
endCursor: null | number;
|
|
5
|
+
hasNextPage: boolean;
|
|
6
|
+
hasPreviousPage: boolean;
|
|
7
|
+
startCursor: null | number;
|
|
8
|
+
totalCount: number;
|
|
9
|
+
};
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/table/pagination.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,mBAAmB,GAAI,yEAEjC;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;QACzB,WAAW,EAAE,OAAO,CAAC;QACrB,eAAe,EAAE,OAAO,CAAC;QACzB,WAAW,EAAE,IAAI,GAAG,MAAM,CAAC;QAC3B,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,4CA6GA,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import { useSearchParams } from "next/navigation";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { usePathname, useRouter } from "../../lib/navigation";
|
|
8
|
+
import { Button } from "../ui/button";
|
|
9
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select";
|
|
10
|
+
import { Skeleton } from "../ui/skeleton";
|
|
11
|
+
const PAGE_SIZE_OPTIONS = [
|
|
12
|
+
10,
|
|
13
|
+
20,
|
|
14
|
+
30,
|
|
15
|
+
40
|
|
16
|
+
];
|
|
17
|
+
export const PaginationDataTable = ({ pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor } })=>{
|
|
18
|
+
const t = useTranslations('core.global');
|
|
19
|
+
const { push } = useRouter();
|
|
20
|
+
const [isPending, startTransition] = React.useTransition();
|
|
21
|
+
const pathname = usePathname();
|
|
22
|
+
const searchParams = useSearchParams();
|
|
23
|
+
const pagination = {
|
|
24
|
+
first: searchParams.get('first'),
|
|
25
|
+
last: searchParams.get('last'),
|
|
26
|
+
cursor: searchParams.get('cursor')
|
|
27
|
+
};
|
|
28
|
+
const pageSize = pagination.first ?? pagination.last ?? 10;
|
|
29
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
30
|
+
className: "flex w-full flex-col-reverse items-center justify-end gap-4 overflow-auto p-1 sm:flex-row sm:gap-8",
|
|
31
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
32
|
+
className: "flex flex-wrap items-center justify-center gap-4 sm:gap-6 lg:gap-8",
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ _jsxs(Select, {
|
|
35
|
+
disabled: isPending,
|
|
36
|
+
onValueChange: (value)=>{
|
|
37
|
+
startTransition(()=>{
|
|
38
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
39
|
+
params.set('first', value);
|
|
40
|
+
params.delete('last');
|
|
41
|
+
params.delete('cursor');
|
|
42
|
+
push(`${pathname}?${params.toString()}`, {
|
|
43
|
+
scroll: false
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
value: `${pageSize}`,
|
|
48
|
+
children: [
|
|
49
|
+
isPending ? /*#__PURE__*/ _jsx(Skeleton, {
|
|
50
|
+
className: "h-9 w-[4.5rem]"
|
|
51
|
+
}) : /*#__PURE__*/ _jsx(SelectTrigger, {
|
|
52
|
+
className: "h-8 w-[4.5rem]",
|
|
53
|
+
children: /*#__PURE__*/ _jsx(SelectValue, {})
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ _jsx(SelectContent, {
|
|
56
|
+
side: "top",
|
|
57
|
+
children: PAGE_SIZE_OPTIONS.map((pageSize)=>/*#__PURE__*/ _jsx(SelectItem, {
|
|
58
|
+
value: `${pageSize}`,
|
|
59
|
+
children: pageSize
|
|
60
|
+
}, pageSize))
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
65
|
+
className: "flex items-center space-x-2",
|
|
66
|
+
children: [
|
|
67
|
+
isPending ? /*#__PURE__*/ _jsx(Skeleton, {
|
|
68
|
+
className: "size-8"
|
|
69
|
+
}) : /*#__PURE__*/ _jsx(Button, {
|
|
70
|
+
"aria-label": t('go_to_prev_page'),
|
|
71
|
+
className: "size-8",
|
|
72
|
+
disabled: !hasPreviousPage,
|
|
73
|
+
onClick: ()=>{
|
|
74
|
+
startTransition(()=>{
|
|
75
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
76
|
+
params.set('last', `${Number(pageSize)}`);
|
|
77
|
+
if (startCursor) {
|
|
78
|
+
params.set('cursor', `${startCursor}`);
|
|
79
|
+
} else {
|
|
80
|
+
params.delete('cursor');
|
|
81
|
+
}
|
|
82
|
+
params.delete('first');
|
|
83
|
+
push(`${pathname}?${params.toString()}`, {
|
|
84
|
+
scroll: false
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
size: "icon",
|
|
89
|
+
variant: "outline",
|
|
90
|
+
children: /*#__PURE__*/ _jsx(ChevronLeftIcon, {})
|
|
91
|
+
}),
|
|
92
|
+
isPending ? /*#__PURE__*/ _jsx(Skeleton, {
|
|
93
|
+
className: "size-8"
|
|
94
|
+
}) : /*#__PURE__*/ _jsx(Button, {
|
|
95
|
+
"aria-label": t('go_to_next_page'),
|
|
96
|
+
className: "size-8",
|
|
97
|
+
disabled: !hasNextPage || isPending,
|
|
98
|
+
onClick: ()=>{
|
|
99
|
+
startTransition(()=>{
|
|
100
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
101
|
+
params.set('first', `${Number(pageSize)}`);
|
|
102
|
+
if (endCursor) {
|
|
103
|
+
params.set('cursor', `${endCursor}`);
|
|
104
|
+
} else {
|
|
105
|
+
params.delete('cursor');
|
|
106
|
+
}
|
|
107
|
+
params.delete('last');
|
|
108
|
+
push(`${pathname}?${params.toString()}`, {
|
|
109
|
+
scroll: false
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
size: "icon",
|
|
114
|
+
variant: "outline",
|
|
115
|
+
children: /*#__PURE__*/ _jsx(ChevronRightIcon, {})
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
});
|
|
122
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
8
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/accordion.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,SAAS,CAAC,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAEtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAQtD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAgBzD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAUzD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
|
+
function Accordion({ ...props }) {
|
|
8
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Root, {
|
|
9
|
+
"data-slot": "accordion",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function AccordionItem({ className, ...props }) {
|
|
14
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Item, {
|
|
15
|
+
className: cn('border-b last:border-b-0', className),
|
|
16
|
+
"data-slot": "accordion-item",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
21
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Header, {
|
|
22
|
+
className: "flex",
|
|
23
|
+
children: /*#__PURE__*/ _jsxs(AccordionPrimitive.Trigger, {
|
|
24
|
+
className: cn('focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium outline-none transition-all hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180', className),
|
|
25
|
+
"data-slot": "accordion-trigger",
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
children,
|
|
29
|
+
/*#__PURE__*/ _jsx(ChevronDownIcon, {
|
|
30
|
+
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function AccordionContent({ className, children, ...props }) {
|
|
37
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Content, {
|
|
38
|
+
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
39
|
+
"data-slot": "accordion-content",
|
|
40
|
+
...props,
|
|
41
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
42
|
+
className: cn('pb-4 pt-0', className),
|
|
43
|
+
children: children
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'radix-ui';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
15
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAI3D;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAI1D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAW3D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAc3D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7B;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,2CAQzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,2CAQ/D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAC"}
|