@vitnode/core 1.2.0-canary.52 → 1.2.0-canary.53
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 +3 -3
- package/dist/scripts/get-config.d.ts +2 -2
- package/dist/scripts/get-config.d.ts.map +1 -1
- package/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/prepare-database.d.ts.map +1 -1
- package/dist/scripts/prepare-plugins-files.d.ts.map +1 -1
- package/dist/scripts/scripts.js +4 -4
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/adapters/email/nodemailer.d.ts +1 -1
- package/dist/src/api/adapters/email/nodemailer.js +3 -3
- package/dist/src/api/adapters/email/resend.d.ts +1 -1
- package/dist/src/api/adapters/email/resend.js +2 -2
- package/dist/src/api/adapters/sso/discord.d.ts +1 -1
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/discord.js +21 -21
- package/dist/src/api/adapters/sso/facebook.d.ts +1 -1
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/facebook.js +23 -23
- package/dist/src/api/adapters/sso/google.d.ts +1 -1
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -1
- package/dist/src/api/adapters/sso/google.js +21 -21
- package/dist/src/api/config.d.ts +3 -3
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +11 -11
- package/dist/src/api/lib/check-plugin-id.js +8 -8
- package/dist/src/api/lib/logger-middleware.d.ts +1 -1
- package/dist/src/api/lib/logger-middleware.js +9 -9
- package/dist/src/api/lib/module.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts +2 -2
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/lib/route.d.ts +2 -2
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/lib/with-pagination.d.ts +7 -7
- package/dist/src/api/lib/with-pagination.d.ts.map +1 -1
- package/dist/src/api/lib/with-pagination.js +37 -24
- package/dist/src/api/middlewares/captcha.middleware.d.ts +1 -1
- package/dist/src/api/middlewares/captcha.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/captcha.middleware.js +14 -13
- package/dist/src/api/middlewares/global.middleware.d.ts +12 -12
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +29 -28
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +3 -3
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/rate-limiter.middleware.js +4 -4
- package/dist/src/api/models/device.d.ts +1 -1
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +13 -13
- package/dist/src/api/models/email.d.ts +15 -15
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +11 -10
- package/dist/src/api/models/password.js +9 -9
- package/dist/src/api/models/session-admin.d.ts +1 -1
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session-admin.js +19 -19
- package/dist/src/api/models/session.d.ts +1 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/session.js +17 -17
- package/dist/src/api/models/sso.d.ts +1 -1
- package/dist/src/api/models/sso.d.ts.map +1 -1
- package/dist/src/api/models/sso.js +22 -25
- package/dist/src/api/models/user/get-user-by-id.d.ts +1 -1
- package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
- package/dist/src/api/models/user/get-user-by-id.js +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +1 -1
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +11 -12
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +3 -3
- package/dist/src/api/modules/admin/admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -1
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +2 -2
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +16 -16
- package/dist/src/api/modules/admin/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/admin/routes/session.route.js +7 -7
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/list.route.js +12 -12
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +2 -2
- package/dist/src/api/modules/admin/users/routes/users.route.js +15 -15
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -1
- package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/middleware.module.js +1 -1
- package/dist/src/api/modules/middleware/route.d.ts +2 -2
- package/dist/src/api/modules/middleware/route.js +12 -12
- package/dist/src/api/modules/users/routes/change-password.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/change-password.route.js +13 -13
- package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +17 -17
- package/dist/src/api/modules/users/routes/session.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/session.route.js +6 -6
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/sign-in.route.js +10 -10
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/sign-out.route.js +7 -7
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/sign-up.route.js +14 -14
- package/dist/src/api/modules/users/routes/test.route.d.ts +3 -3
- package/dist/src/api/modules/users/routes/test.route.js +9 -9
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +2 -2
- package/dist/src/api/modules/users/sso/routes/callback.route.js +8 -8
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +2 -2
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +6 -6
- package/dist/src/api/modules/users/sso/sso.module.d.ts +2 -2
- package/dist/src/api/modules/users/sso/sso.module.js +1 -1
- package/dist/src/api/modules/users/users.module.d.ts +12 -12
- package/dist/src/api/modules/users/users.module.js +1 -1
- package/dist/src/app/login/page.d.ts +1 -1
- package/dist/src/app/login/page.js +2 -2
- package/dist/src/app/login/reset-password/page.d.ts +2 -2
- package/dist/src/app/login/reset-password/page.js +2 -2
- package/dist/src/app/register/page.d.ts +1 -1
- package/dist/src/app/register/page.js +2 -2
- package/dist/src/app_admin/core/debug/page.d.ts +1 -1
- package/dist/src/app_admin/core/debug/page.js +8 -8
- package/dist/src/app_admin/core/users/page.d.ts +2 -2
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +7 -7
- package/dist/src/components/avatar.d.ts +1 -1
- package/dist/src/components/avatar.js +1 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +2 -2
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +5 -5
- package/dist/src/components/confirm-action/content.d.ts.map +1 -1
- package/dist/src/components/confirm-action/content.js +3 -4
- package/dist/src/components/date-format.js +8 -8
- package/dist/src/components/form/auto-form.d.ts +16 -16
- package/dist/src/components/form/auto-form.d.ts.map +1 -1
- package/dist/src/components/form/auto-form.js +13 -12
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.d.ts +1 -1
- package/dist/src/components/form/common/label.js +1 -1
- package/dist/src/components/form/fields/checkbox.d.ts +2 -2
- package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.d.ts +3 -3
- package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox-async.js +29 -23
- package/dist/src/components/form/fields/combobox.d.ts +3 -3
- package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
- package/dist/src/components/form/fields/combobox.js +6 -7
- package/dist/src/components/form/fields/input.d.ts +2 -2
- package/dist/src/components/form/fields/input.d.ts.map +1 -1
- package/dist/src/components/form/fields/input.js +2 -2
- package/dist/src/components/form/fields/radio-group.d.ts +3 -3
- package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
- package/dist/src/components/form/fields/radio-group.js +0 -1
- package/dist/src/components/form/fields/select.d.ts +3 -3
- package/dist/src/components/form/fields/select.d.ts.map +1 -1
- package/dist/src/components/form/fields/select.js +2 -3
- package/dist/src/components/form/fields/switch.d.ts +2 -2
- package/dist/src/components/form/fields/switch.d.ts.map +1 -1
- package/dist/src/components/form/fields/textarea.d.ts +3 -3
- package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
- package/dist/src/components/form/fields/textarea.js +1 -2
- package/dist/src/components/i18n-provider.d.ts +2 -2
- package/dist/src/components/i18n-provider.js +3 -3
- package/dist/src/components/logo-vitnode.d.ts.map +1 -1
- package/dist/src/components/logo-vitnode.js +8 -2
- package/dist/src/components/switchers/langs/language-swietcher.d.ts +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -1
- package/dist/src/components/switchers/langs/language-swietcher.js +3 -3
- package/dist/src/components/switchers/themes/theme-switcher.js +4 -4
- package/dist/src/components/table/content.d.ts +1 -1
- package/dist/src/components/table/content.d.ts.map +1 -1
- package/dist/src/components/table/content.js +5 -5
- package/dist/src/components/table/data-table.d.ts +7 -7
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/data-table.js +22 -15
- package/dist/src/components/table/order-table-head.d.ts +4 -4
- package/dist/src/components/table/order-table-head.d.ts.map +1 -1
- package/dist/src/components/table/order-table-head.js +20 -9
- package/dist/src/components/table/pagination.js +19 -19
- package/dist/src/components/ui/accordion.d.ts +2 -2
- package/dist/src/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/components/ui/accordion.js +4 -5
- package/dist/src/components/ui/alert-dialog.d.ts +7 -7
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/components/ui/alert-dialog.js +12 -12
- package/dist/src/components/ui/alert.d.ts +5 -5
- package/dist/src/components/ui/alert.d.ts.map +1 -1
- package/dist/src/components/ui/alert.js +6 -7
- package/dist/src/components/ui/badge.d.ts +3 -3
- package/dist/src/components/ui/badge.d.ts.map +1 -1
- package/dist/src/components/ui/badge.js +7 -8
- package/dist/src/components/ui/button-client.d.ts +1 -1
- package/dist/src/components/ui/button-client.js +9 -9
- package/dist/src/components/ui/button.d.ts +8 -8
- package/dist/src/components/ui/button.d.ts.map +1 -1
- package/dist/src/components/ui/button.js +13 -14
- package/dist/src/components/ui/card.d.ts +8 -8
- package/dist/src/components/ui/card.js +7 -7
- package/dist/src/components/ui/checkbox.d.ts +2 -2
- package/dist/src/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/components/ui/checkbox.js +2 -3
- package/dist/src/components/ui/collapsible.d.ts +1 -1
- package/dist/src/components/ui/collapsible.js +1 -1
- package/dist/src/components/ui/command.d.ts +4 -4
- package/dist/src/components/ui/command.d.ts.map +1 -1
- package/dist/src/components/ui/command.js +9 -10
- package/dist/src/components/ui/context-menu.d.ts +4 -4
- package/dist/src/components/ui/context-menu.d.ts.map +1 -1
- package/dist/src/components/ui/context-menu.js +7 -8
- package/dist/src/components/ui/dialog.d.ts +6 -6
- package/dist/src/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/components/ui/dialog.js +16 -16
- package/dist/src/components/ui/drawer.d.ts +4 -4
- package/dist/src/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/components/ui/drawer.js +7 -8
- package/dist/src/components/ui/dropdown-menu.d.ts +4 -4
- package/dist/src/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/components/ui/dropdown-menu.js +8 -9
- package/dist/src/components/ui/form.d.ts +10 -10
- package/dist/src/components/ui/form.d.ts.map +1 -1
- package/dist/src/components/ui/form.js +15 -15
- package/dist/src/components/ui/header-content.js +1 -1
- package/dist/src/components/ui/hover-card.d.ts +2 -2
- package/dist/src/components/ui/hover-card.d.ts.map +1 -1
- package/dist/src/components/ui/hover-card.js +3 -4
- package/dist/src/components/ui/input-otp.d.ts +5 -5
- package/dist/src/components/ui/input-otp.d.ts.map +1 -1
- package/dist/src/components/ui/input-otp.js +6 -7
- package/dist/src/components/ui/input.d.ts +2 -2
- package/dist/src/components/ui/input.d.ts.map +1 -1
- package/dist/src/components/ui/input.js +1 -2
- package/dist/src/components/ui/label.d.ts +2 -2
- package/dist/src/components/ui/label.d.ts.map +1 -1
- package/dist/src/components/ui/label.js +2 -3
- package/dist/src/components/ui/loader.js +3 -3
- package/dist/src/components/ui/menubar.d.ts +4 -4
- package/dist/src/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/components/ui/menubar.js +11 -12
- package/dist/src/components/ui/navigation-menu.d.ts +2 -2
- package/dist/src/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/src/components/ui/navigation-menu.js +10 -11
- package/dist/src/components/ui/popover.d.ts +2 -2
- package/dist/src/components/ui/popover.d.ts.map +1 -1
- package/dist/src/components/ui/popover.js +3 -4
- package/dist/src/components/ui/progress.d.ts +2 -2
- package/dist/src/components/ui/progress.d.ts.map +1 -1
- package/dist/src/components/ui/progress.js +2 -3
- package/dist/src/components/ui/radio-group.d.ts +2 -2
- package/dist/src/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/components/ui/radio-group.js +3 -4
- package/dist/src/components/ui/select.d.ts +3 -3
- package/dist/src/components/ui/select.d.ts.map +1 -1
- package/dist/src/components/ui/select.js +9 -10
- package/dist/src/components/ui/separator.d.ts +2 -2
- package/dist/src/components/ui/separator.d.ts.map +1 -1
- package/dist/src/components/ui/separator.js +3 -4
- package/dist/src/components/ui/sheet.d.ts +5 -5
- package/dist/src/components/ui/sheet.d.ts.map +1 -1
- package/dist/src/components/ui/sheet.js +8 -9
- package/dist/src/components/ui/sidebar.d.ts +31 -31
- package/dist/src/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/components/ui/sidebar.js +67 -69
- package/dist/src/components/ui/skeleton.d.ts +1 -1
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.d.ts +2 -2
- package/dist/src/components/ui/slider.d.ts.map +1 -1
- package/dist/src/components/ui/slider.js +16 -8
- package/dist/src/components/ui/sonner.d.ts +1 -1
- package/dist/src/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/components/ui/sonner.js +6 -6
- package/dist/src/components/ui/switch.d.ts +2 -2
- package/dist/src/components/ui/switch.d.ts.map +1 -1
- package/dist/src/components/ui/switch.js +3 -4
- package/dist/src/components/ui/table.d.ts +9 -9
- package/dist/src/components/ui/table.d.ts.map +1 -1
- package/dist/src/components/ui/table.js +8 -9
- package/dist/src/components/ui/tabs.d.ts +2 -2
- package/dist/src/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/components/ui/tabs.js +4 -5
- package/dist/src/components/ui/textarea.d.ts +2 -2
- package/dist/src/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/components/ui/textarea.js +1 -2
- package/dist/src/components/ui/toggle-group.d.ts +4 -4
- package/dist/src/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/components/ui/toggle-group.js +6 -6
- package/dist/src/components/ui/toggle.d.ts +3 -3
- package/dist/src/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/components/ui/toggle.js +8 -9
- package/dist/src/components/ui/tooltip.d.ts +2 -2
- package/dist/src/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/components/ui/tooltip.js +2 -3
- package/dist/src/config.js +2 -2
- package/dist/src/database/admins.js +10 -10
- package/dist/src/database/languages.js +7 -7
- package/dist/src/database/logs.js +9 -9
- package/dist/src/database/moderators.js +5 -5
- package/dist/src/database/roles.js +1 -1
- package/dist/src/database/sessions.js +6 -6
- package/dist/src/database/users.js +13 -13
- package/dist/src/drizzle.config.d.ts +2 -2
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +19 -12
- package/dist/src/emails/default-template.d.ts +3 -3
- package/dist/src/emails/default-template.d.ts.map +1 -1
- package/dist/src/emails/default-template.js +39 -38
- package/dist/src/emails/reset-password.d.ts +1 -1
- package/dist/src/emails/reset-password.d.ts.map +1 -1
- package/dist/src/emails/reset-password.js +51 -51
- package/dist/src/emails/ui/button.d.ts +2 -2
- package/dist/src/emails/ui/button.js +13 -13
- package/dist/src/emails/ui/card.d.ts +1 -1
- package/dist/src/emails/ui/card.js +6 -6
- package/dist/src/hooks/use-before-unload.js +3 -3
- package/dist/src/hooks/use-captcha.d.ts +2 -2
- package/dist/src/hooks/use-captcha.d.ts.map +1 -1
- package/dist/src/hooks/use-captcha.js +29 -37
- package/dist/src/hooks/use-mobile.d.ts.map +1 -1
- package/dist/src/hooks/use-mobile.js +3 -4
- package/dist/src/lib/api/get-middleware-api.js +4 -4
- package/dist/src/lib/api/get-session-admin-api.js +5 -5
- package/dist/src/lib/api/get-session-api.js +4 -4
- package/dist/src/lib/colors.js +28 -19
- package/dist/src/lib/colors.test.js +60 -60
- package/dist/src/lib/config.js +3 -3
- package/dist/src/lib/fetcher/cookie-from-string-to-object.d.ts.map +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +27 -27
- package/dist/src/lib/fetcher/core.d.ts +5 -5
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +11 -10
- package/dist/src/lib/fetcher/helpers-server.d.ts +1 -1
- package/dist/src/lib/fetcher/helpers-server.js +1 -1
- package/dist/src/lib/fetcher/helpers.test.js +17 -17
- package/dist/src/lib/fetcher/types.d.ts +26 -26
- package/dist/src/lib/fetcher/types.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.d.ts +4 -4
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.js +3 -3
- package/dist/src/lib/fetcher.d.ts +5 -5
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/fetcher.js +4 -4
- package/dist/src/lib/helpers/auto-form.d.ts +3 -3
- package/dist/src/lib/helpers/auto-form.d.ts.map +1 -1
- package/dist/src/lib/helpers/auto-form.js +16 -15
- package/dist/src/lib/helpers/auto-form.test.js +129 -129
- package/dist/src/lib/navigation.d.ts +2 -2
- package/dist/src/lib/navigation.d.ts.map +1 -1
- package/dist/src/lib/plugin.d.ts +3 -3
- package/dist/src/lib/special-characters.js +1 -1
- package/dist/src/lib/special-characters.test.js +36 -36
- package/dist/src/lib/utils.d.ts +1 -1
- package/dist/src/tests/setup.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts +1 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +4 -8
- package/dist/src/views/admin/layouts/sidebar/nav/item.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +11 -12
- package/dist/src/views/admin/layouts/sidebar/nav/nav.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +11 -11
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +1 -2
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +5 -5
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -1
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +1 -1
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +3 -3
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +10 -10
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +2 -2
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +15 -15
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +7 -7
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +7 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +1 -1
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +3 -3
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +25 -25
- package/dist/src/views/admin/views/core/test.js +43 -43
- package/dist/src/views/admin/views/core/users/users-admin-view.d.ts.map +1 -1
- package/dist/src/views/admin/views/core/users/users-admin-view.js +13 -14
- package/dist/src/views/auth/password-reset/change-password-form/form.js +9 -9
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +5 -5
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts +2 -2
- package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -1
- package/dist/src/views/auth/password-reset/change-password-form/use-form.js +7 -7
- package/dist/src/views/auth/password-reset/form/form.d.ts +2 -2
- package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/password-reset/form/form.js +15 -15
- package/dist/src/views/auth/password-reset/form/mutation-api.js +5 -5
- package/dist/src/views/auth/password-reset/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/password-reset/form/use-form.js +7 -7
- package/dist/src/views/auth/password-reset/password-reset-view.js +4 -4
- package/dist/src/views/auth/sign-in/form/form.js +9 -9
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-in/form/mutation-api.js +10 -10
- package/dist/src/views/auth/sign-in/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/sign-in/form/use-form.js +11 -11
- package/dist/src/views/auth/sign-in/sign-in-view.js +5 -5
- package/dist/src/views/auth/sign-up/components/password-input.d.ts +3 -3
- package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/components/password-input.js +9 -10
- package/dist/src/views/auth/sign-up/email-confirmation-view.js +4 -4
- package/dist/src/views/auth/sign-up/form/form.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/form.js +18 -18
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/form/mutation-api.js +6 -6
- package/dist/src/views/auth/sign-up/form/use-form.d.ts +2 -2
- package/dist/src/views/auth/sign-up/form/use-form.js +21 -21
- package/dist/src/views/auth/sign-up/sign-up-view.js +5 -5
- package/dist/src/views/auth/sign-up/wrapper.d.ts +1 -1
- package/dist/src/views/auth/sign-up/wrapper.d.ts.map +1 -1
- package/dist/src/views/auth/sign-up/wrapper.js +5 -8
- package/dist/src/views/auth/sso/buttons/client.js +4 -4
- package/dist/src/views/auth/sso/buttons/mutation-api.js +5 -5
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +2 -2
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +6 -6
- package/dist/src/views/auth/sso/callback/client/client.d.ts +1 -1
- package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
- package/dist/src/views/auth/sso/callback/client/client.js +9 -9
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +7 -7
- package/dist/src/views/error/back-button.js +1 -1
- package/dist/src/views/error/error-view.js +4 -4
- package/dist/src/views/error/global-error-view.d.ts +3 -3
- package/dist/src/views/error/global-error-view.d.ts.map +1 -1
- package/dist/src/views/error/global-error-view.js +36 -44
- package/dist/src/views/layouts/provider.d.ts +4 -4
- package/dist/src/views/layouts/provider.d.ts.map +1 -1
- package/dist/src/views/layouts/provider.js +3 -3
- package/dist/src/views/layouts/root-layout.d.ts +3 -3
- package/dist/src/views/layouts/root-layout.d.ts.map +1 -1
- package/dist/src/views/layouts/root-layout.js +1 -2
- package/dist/src/views/layouts/theme/header/header.d.ts +2 -2
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.js +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/user/auth/client.js +4 -4
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +8 -8
- package/dist/src/views/layouts/theme/header/user/user.js +4 -4
- package/dist/src/views/layouts/theme/layout.d.ts +2 -2
- package/dist/src/views/layouts/theme/layout.js +1 -1
- package/dist/src/vitnode.config.d.ts +16 -16
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -5
- package/src/app/login/page.tsx +5 -5
- package/src/app/login/reset-password/page.tsx +5 -5
- package/src/app/login/sso/[providerId]/page.tsx +1 -1
- package/src/app/register/page.tsx +5 -5
- package/src/app_admin/core/debug/page.tsx +14 -14
- package/src/app_admin/core/page.tsx +1 -1
- package/src/app_admin/core/test/page.tsx +1 -1
- package/src/app_admin/core/users/page.tsx +12 -13
|
@@ -6,7 +6,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from ".
|
|
|
6
6
|
import { OrderTableHeadDataTable } from "./order-table-head.js";
|
|
7
7
|
import { PaginationDataTable } from "./pagination.js";
|
|
8
8
|
export function ContentDataTable({ columns, edges, pageInfo, order, customNotFoundComponent, ...props }) {
|
|
9
|
-
const t = useTranslations(
|
|
9
|
+
const t = useTranslations("core.global");
|
|
10
10
|
return /*#__PURE__*/ _jsxs("div", {
|
|
11
11
|
className: "space-y-4",
|
|
12
12
|
children: [
|
|
@@ -34,10 +34,10 @@ export function ContentDataTable({ columns, edges, pageInfo, order, customNotFou
|
|
|
34
34
|
const content = column.cell?.({
|
|
35
35
|
allData: edges,
|
|
36
36
|
row
|
|
37
|
-
}) ?? (column.id ===
|
|
37
|
+
}) ?? (column.id === "actions" ? "" : String(row[column.id]));
|
|
38
38
|
return /*#__PURE__*/ _jsx(TableCell, {
|
|
39
39
|
className: cn({
|
|
40
|
-
|
|
40
|
+
"flex items-center justify-end gap-2": column.id === "actions"
|
|
41
41
|
}),
|
|
42
42
|
children: content
|
|
43
43
|
}, `${row.id}_${column.id.toString()}`);
|
|
@@ -57,11 +57,11 @@ export function ContentDataTable({ columns, edges, pageInfo, order, customNotFou
|
|
|
57
57
|
children: [
|
|
58
58
|
/*#__PURE__*/ _jsx("h3", {
|
|
59
59
|
className: "text-xl font-semibold tracking-tight",
|
|
60
|
-
children: t(
|
|
60
|
+
children: t("no_results.title")
|
|
61
61
|
}),
|
|
62
62
|
/*#__PURE__*/ _jsx("p", {
|
|
63
63
|
className: "text-muted-foreground text-sm",
|
|
64
|
-
children: t(
|
|
64
|
+
children: t("no_results.desc")
|
|
65
65
|
})
|
|
66
66
|
]
|
|
67
67
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Table } from "../ui/table";
|
|
3
|
+
import type { PaginationDataTable } from "./pagination";
|
|
4
4
|
export interface DataTableTMin {
|
|
5
5
|
id: number;
|
|
6
6
|
}
|
|
@@ -8,20 +8,20 @@ export interface SearchParamsDataTable<T = unknown> {
|
|
|
8
8
|
cursor?: string;
|
|
9
9
|
first?: string;
|
|
10
10
|
last?: string;
|
|
11
|
-
order?:
|
|
11
|
+
order?: "asc" | "desc";
|
|
12
12
|
orderBy?: keyof T;
|
|
13
13
|
}
|
|
14
14
|
export declare const DataTableSkeleton: ({ columns }: {
|
|
15
15
|
columns: number;
|
|
16
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export declare function DataTable<T extends DataTableTMin>(props: Omit<React.ComponentProps<typeof Table>,
|
|
17
|
+
export declare function DataTable<T extends DataTableTMin>(props: Omit<React.ComponentProps<typeof Table>, "columns"> & React.ComponentProps<typeof PaginationDataTable> & {
|
|
18
18
|
columns: {
|
|
19
19
|
cell?: (data: {
|
|
20
20
|
allData: T[];
|
|
21
21
|
row: T;
|
|
22
22
|
}) => React.ReactNode;
|
|
23
23
|
className?: string;
|
|
24
|
-
id:
|
|
24
|
+
id: "actions" | keyof T;
|
|
25
25
|
label: string;
|
|
26
26
|
}[];
|
|
27
27
|
customNotFoundComponent?: React.ReactNode;
|
|
@@ -30,7 +30,7 @@ export declare function DataTable<T extends DataTableTMin>(props: Omit<React.Com
|
|
|
30
30
|
columns?: (keyof T)[];
|
|
31
31
|
defaultOrder: {
|
|
32
32
|
column: keyof T;
|
|
33
|
-
order:
|
|
33
|
+
order: "asc" | "desc";
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/table/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,KAAK,EAKN,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,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,4CAoDjE,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,2CAOJ"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ErrorView } from "../../views/error/error-view.js";
|
|
4
4
|
import { Skeleton } from "../ui/skeleton.js";
|
|
5
5
|
import { Table, TableBody, TableHead, TableHeader, TableRow } from "../ui/table.js";
|
|
6
6
|
import { ContentDataTable } from "./content.js";
|
|
7
|
-
export const DataTableSkeleton = ({ columns })
|
|
7
|
+
export const DataTableSkeleton = ({ columns })=>{
|
|
8
|
+
const headerIds = React.useMemo(()=>Array.from({
|
|
9
|
+
length: columns
|
|
10
|
+
}).map(()=>`s-head-${Math.random().toString(36).slice(2, 9)}`), [
|
|
11
|
+
columns
|
|
12
|
+
]);
|
|
13
|
+
const rowIds = React.useMemo(()=>Array.from({
|
|
14
|
+
length: 6
|
|
15
|
+
}).map(()=>`s-row-${Math.random().toString(36).slice(2, 9)}`), []);
|
|
16
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
8
17
|
className: "space-y-4",
|
|
9
18
|
children: [
|
|
10
19
|
/*#__PURE__*/ _jsx("div", {
|
|
@@ -14,29 +23,26 @@ export const DataTableSkeleton = ({ columns })=>/*#__PURE__*/ _jsxs("div", {
|
|
|
14
23
|
children: [
|
|
15
24
|
/*#__PURE__*/ _jsx(TableHeader, {
|
|
16
25
|
children: /*#__PURE__*/ _jsx(TableRow, {
|
|
17
|
-
children:
|
|
18
|
-
length: columns
|
|
19
|
-
}).map((_, i)=>/*#__PURE__*/ _jsx(TableHead, {
|
|
26
|
+
children: headerIds.map((hid)=>/*#__PURE__*/ _jsx(TableHead, {
|
|
20
27
|
className: "px-4 py-3",
|
|
21
28
|
children: /*#__PURE__*/ _jsx(Skeleton, {
|
|
22
29
|
className: "h-4 w-24"
|
|
23
30
|
})
|
|
24
|
-
},
|
|
31
|
+
}, hid))
|
|
25
32
|
})
|
|
26
33
|
}),
|
|
27
34
|
/*#__PURE__*/ _jsx(TableBody, {
|
|
28
|
-
children:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
length: columns
|
|
33
|
-
}).map((_, j)=>/*#__PURE__*/ _jsx("td", {
|
|
35
|
+
children: rowIds.map((rid)=>/*#__PURE__*/ _jsx(TableRow, {
|
|
36
|
+
children: headerIds.map((_, j)=>{
|
|
37
|
+
const cellId = `s-cell-${rid}-${j}`;
|
|
38
|
+
return /*#__PURE__*/ _jsx("td", {
|
|
34
39
|
className: "px-4 py-3",
|
|
35
40
|
children: /*#__PURE__*/ _jsx(Skeleton, {
|
|
36
41
|
className: "h-4 w-full"
|
|
37
42
|
})
|
|
38
|
-
},
|
|
39
|
-
|
|
43
|
+
}, cellId);
|
|
44
|
+
})
|
|
45
|
+
}, rid))
|
|
40
46
|
})
|
|
41
47
|
]
|
|
42
48
|
})
|
|
@@ -49,8 +55,9 @@ export const DataTableSkeleton = ({ columns })=>/*#__PURE__*/ _jsxs("div", {
|
|
|
49
55
|
})
|
|
50
56
|
]
|
|
51
57
|
});
|
|
58
|
+
};
|
|
52
59
|
export function DataTable(props) {
|
|
53
|
-
if (!props.edges
|
|
60
|
+
if (!(props.edges && props.pageInfo)) {
|
|
54
61
|
return /*#__PURE__*/ _jsx(ErrorView, {
|
|
55
62
|
code: 500
|
|
56
63
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { DataTable, DataTableTMin } from
|
|
3
|
-
export declare function OrderTableHeadDataTable<T extends DataTableTMin>({ id, children, order: { defaultOrder }, }: Pick<React.ComponentProps<typeof DataTable<T>>,
|
|
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
4
|
children: React.ReactNode;
|
|
5
|
-
id: React.ComponentProps<typeof DataTable<T>>[
|
|
5
|
+
id: React.ComponentProps<typeof DataTable<T>>["columns"][0]["id"];
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=order-table-head.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAK1B,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7D,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,2CA4CA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowDown, ArrowUp, ChevronsUpDown } from "lucide-react";
|
|
4
4
|
import { useSearchParams } from "next/navigation";
|
|
@@ -11,17 +11,17 @@ export function OrderTableHeadDataTable({ id, children, order: { defaultOrder }
|
|
|
11
11
|
const searchParams = useSearchParams();
|
|
12
12
|
const pathname = usePathname();
|
|
13
13
|
const { push } = useRouter();
|
|
14
|
-
const currentOrderBy = searchParams.get(
|
|
15
|
-
const currentOrder = searchParams.get(
|
|
14
|
+
const currentOrderBy = searchParams.get("orderBy") ?? defaultOrder.column.toString();
|
|
15
|
+
const currentOrder = searchParams.get("order") ?? defaultOrder.order;
|
|
16
16
|
const isActive = currentOrderBy === id.toString();
|
|
17
|
-
const nextOrder = isActive && currentOrder ===
|
|
17
|
+
const nextOrder = isActive && currentOrder === "asc" ? "desc" : "asc";
|
|
18
18
|
return /*#__PURE__*/ _jsxs(Button, {
|
|
19
19
|
className: "[&_svg]:text-muted-foreground -ml-2 flex h-8 items-center gap-1.5 rounded-md px-2 py-1.5 [&_svg]:size-4 [&_svg]:shrink-0",
|
|
20
20
|
onClick: ()=>{
|
|
21
21
|
startTransition(()=>{
|
|
22
22
|
const params = new URLSearchParams(searchParams.toString());
|
|
23
|
-
params.set(
|
|
24
|
-
params.set(
|
|
23
|
+
params.set("orderBy", id.toString());
|
|
24
|
+
params.set("order", nextOrder);
|
|
25
25
|
push(`${pathname}?${params.toString()}`, {
|
|
26
26
|
scroll: false
|
|
27
27
|
});
|
|
@@ -31,9 +31,20 @@ export function OrderTableHeadDataTable({ id, children, order: { defaultOrder }
|
|
|
31
31
|
variant: "ghost",
|
|
32
32
|
children: [
|
|
33
33
|
children,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
(()=>{
|
|
35
|
+
if (isPending) {
|
|
36
|
+
return /*#__PURE__*/ _jsx(Loader, {
|
|
37
|
+
small: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (isActive) {
|
|
41
|
+
if (currentOrder === "asc") {
|
|
42
|
+
return /*#__PURE__*/ _jsx(ArrowUp, {});
|
|
43
|
+
}
|
|
44
|
+
return /*#__PURE__*/ _jsx(ArrowDown, {});
|
|
45
|
+
}
|
|
46
|
+
return /*#__PURE__*/ _jsx(ChevronsUpDown, {});
|
|
47
|
+
})()
|
|
37
48
|
]
|
|
38
49
|
});
|
|
39
50
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
-
import { useTranslations } from "next-intl";
|
|
5
4
|
import { useSearchParams } from "next/navigation";
|
|
5
|
+
import { useTranslations } from "next-intl";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { usePathname, useRouter } from "../../lib/navigation.js";
|
|
8
8
|
import { Button } from "../ui/button.js";
|
|
@@ -15,15 +15,15 @@ const PAGE_SIZE_OPTIONS = [
|
|
|
15
15
|
40
|
|
16
16
|
];
|
|
17
17
|
export const PaginationDataTable = ({ pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor } })=>{
|
|
18
|
-
const t = useTranslations(
|
|
18
|
+
const t = useTranslations("core.global");
|
|
19
19
|
const { push } = useRouter();
|
|
20
20
|
const [isPending, startTransition] = React.useTransition();
|
|
21
21
|
const pathname = usePathname();
|
|
22
22
|
const searchParams = useSearchParams();
|
|
23
23
|
const pagination = {
|
|
24
|
-
first: searchParams.get(
|
|
25
|
-
last: searchParams.get(
|
|
26
|
-
cursor: searchParams.get(
|
|
24
|
+
first: searchParams.get("first"),
|
|
25
|
+
last: searchParams.get("last"),
|
|
26
|
+
cursor: searchParams.get("cursor")
|
|
27
27
|
};
|
|
28
28
|
const pageSize = pagination.first ?? pagination.last ?? 10;
|
|
29
29
|
return /*#__PURE__*/ _jsx("div", {
|
|
@@ -36,9 +36,9 @@ export const PaginationDataTable = ({ pageInfo: { hasNextPage, hasPreviousPage,
|
|
|
36
36
|
onValueChange: (value)=>{
|
|
37
37
|
startTransition(()=>{
|
|
38
38
|
const params = new URLSearchParams(searchParams.toString());
|
|
39
|
-
params.set(
|
|
40
|
-
params.delete(
|
|
41
|
-
params.delete(
|
|
39
|
+
params.set("first", value);
|
|
40
|
+
params.delete("last");
|
|
41
|
+
params.delete("cursor");
|
|
42
42
|
push(`${pathname}?${params.toString()}`, {
|
|
43
43
|
scroll: false
|
|
44
44
|
});
|
|
@@ -67,19 +67,19 @@ export const PaginationDataTable = ({ pageInfo: { hasNextPage, hasPreviousPage,
|
|
|
67
67
|
isPending ? /*#__PURE__*/ _jsx(Skeleton, {
|
|
68
68
|
className: "size-8"
|
|
69
69
|
}) : /*#__PURE__*/ _jsx(Button, {
|
|
70
|
-
"aria-label": t(
|
|
70
|
+
"aria-label": t("go_to_prev_page"),
|
|
71
71
|
className: "bg-card size-8",
|
|
72
72
|
disabled: !hasPreviousPage,
|
|
73
73
|
onClick: ()=>{
|
|
74
74
|
startTransition(()=>{
|
|
75
75
|
const params = new URLSearchParams(searchParams.toString());
|
|
76
|
-
params.set(
|
|
76
|
+
params.set("last", `${Number(pageSize)}`);
|
|
77
77
|
if (startCursor) {
|
|
78
|
-
params.set(
|
|
78
|
+
params.set("cursor", `${startCursor}`);
|
|
79
79
|
} else {
|
|
80
|
-
params.delete(
|
|
80
|
+
params.delete("cursor");
|
|
81
81
|
}
|
|
82
|
-
params.delete(
|
|
82
|
+
params.delete("first");
|
|
83
83
|
push(`${pathname}?${params.toString()}`, {
|
|
84
84
|
scroll: false
|
|
85
85
|
});
|
|
@@ -92,19 +92,19 @@ export const PaginationDataTable = ({ pageInfo: { hasNextPage, hasPreviousPage,
|
|
|
92
92
|
isPending ? /*#__PURE__*/ _jsx(Skeleton, {
|
|
93
93
|
className: "size-8"
|
|
94
94
|
}) : /*#__PURE__*/ _jsx(Button, {
|
|
95
|
-
"aria-label": t(
|
|
95
|
+
"aria-label": t("go_to_next_page"),
|
|
96
96
|
className: "bg-card size-8",
|
|
97
97
|
disabled: !hasNextPage || isPending,
|
|
98
98
|
onClick: ()=>{
|
|
99
99
|
startTransition(()=>{
|
|
100
100
|
const params = new URLSearchParams(searchParams.toString());
|
|
101
|
-
params.set(
|
|
101
|
+
params.set("first", `${Number(pageSize)}`);
|
|
102
102
|
if (endCursor) {
|
|
103
|
-
params.set(
|
|
103
|
+
params.set("cursor", `${endCursor}`);
|
|
104
104
|
} else {
|
|
105
|
-
params.delete(
|
|
105
|
+
params.delete("cursor");
|
|
106
106
|
}
|
|
107
|
-
params.delete(
|
|
107
|
+
params.delete("last");
|
|
108
108
|
push(`${pathname}?${params.toString()}`, {
|
|
109
109
|
scroll: false
|
|
110
110
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Accordion as AccordionPrimitive } from
|
|
2
|
-
import * as React from
|
|
1
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
2
|
+
import type * as React from "react";
|
|
3
3
|
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +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;
|
|
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,KAAK,MAAM,OAAO,CAAC;AAIpC,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"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronDownIcon } from "lucide-react";
|
|
4
4
|
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { cn } from "../../lib/utils.js";
|
|
7
6
|
function Accordion({ ...props }) {
|
|
8
7
|
return /*#__PURE__*/ _jsx(AccordionPrimitive.Root, {
|
|
@@ -12,7 +11,7 @@ function Accordion({ ...props }) {
|
|
|
12
11
|
}
|
|
13
12
|
function AccordionItem({ className, ...props }) {
|
|
14
13
|
return /*#__PURE__*/ _jsx(AccordionPrimitive.Item, {
|
|
15
|
-
className: cn(
|
|
14
|
+
className: cn("border-b last:border-b-0", className),
|
|
16
15
|
"data-slot": "accordion-item",
|
|
17
16
|
...props
|
|
18
17
|
});
|
|
@@ -21,7 +20,7 @@ function AccordionTrigger({ className, children, ...props }) {
|
|
|
21
20
|
return /*#__PURE__*/ _jsx(AccordionPrimitive.Header, {
|
|
22
21
|
className: "flex",
|
|
23
22
|
children: /*#__PURE__*/ _jsxs(AccordionPrimitive.Trigger, {
|
|
24
|
-
className: cn(
|
|
23
|
+
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
24
|
"data-slot": "accordion-trigger",
|
|
26
25
|
...props,
|
|
27
26
|
children: [
|
|
@@ -39,7 +38,7 @@ function AccordionContent({ className, children, ...props }) {
|
|
|
39
38
|
"data-slot": "accordion-content",
|
|
40
39
|
...props,
|
|
41
40
|
children: /*#__PURE__*/ _jsx("div", {
|
|
42
|
-
className: cn(
|
|
41
|
+
className: cn("pb-4 pt-0", className),
|
|
43
42
|
children: children
|
|
44
43
|
})
|
|
45
44
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AlertDialog as AlertDialogPrimitive } from
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare const useAlertDialog: () => {
|
|
4
4
|
open: boolean;
|
|
5
5
|
setOpen?: (value: boolean) => void;
|
|
6
6
|
};
|
|
@@ -9,12 +9,12 @@ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof Al
|
|
|
9
9
|
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<
|
|
13
|
-
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<
|
|
14
|
-
declare function AlertDialogFooterSkeleton({ className, ...props }: Omit<React.ComponentProps<
|
|
12
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function AlertDialogFooterSkeleton({ className, ...props }: Omit<React.ComponentProps<"div">, "children">): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
19
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, useAlertDialog, };
|
|
20
20
|
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,OAAO,CAAC;AAe1B,QAAA,MAAM,cAAc;UAPZ,OAAO;cACH,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI;CAMsB,CAAC;AAE3D,iBAAS,WAAW,CAAC,EACnB,YAAY,EACZ,IAAI,EAAE,QAAQ,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAoBxD;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,yBAAyB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,2CAc/C;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,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACf,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
4
|
-
import
|
|
4
|
+
import React from "react";
|
|
5
5
|
import { buttonVariants } from "./button.js";
|
|
6
6
|
import { cn } from "../../lib/utils.js";
|
|
7
7
|
import { Skeleton } from "./skeleton.js";
|
|
@@ -9,7 +9,7 @@ const AlertDialogContext = /*#__PURE__*/ React.createContext({
|
|
|
9
9
|
open: false,
|
|
10
10
|
setOpen: ()=>{}
|
|
11
11
|
});
|
|
12
|
-
|
|
12
|
+
const useAlertDialog = ()=>React.use(AlertDialogContext);
|
|
13
13
|
function AlertDialog({ onOpenChange, open: openProp, ...props }) {
|
|
14
14
|
const [open, setOpen] = React.useState(false);
|
|
15
15
|
const handleOpenChange = (newOpen)=>{
|
|
@@ -46,7 +46,7 @@ function AlertDialogPortal({ ...props }) {
|
|
|
46
46
|
}
|
|
47
47
|
function AlertDialogOverlay({ className, ...props }) {
|
|
48
48
|
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Overlay, {
|
|
49
|
-
className: cn(
|
|
49
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
|
|
50
50
|
"data-slot": "alert-dialog-overlay",
|
|
51
51
|
...props
|
|
52
52
|
});
|
|
@@ -56,7 +56,7 @@ function AlertDialogContent({ className, ...props }) {
|
|
|
56
56
|
children: [
|
|
57
57
|
/*#__PURE__*/ _jsx(AlertDialogOverlay, {}),
|
|
58
58
|
/*#__PURE__*/ _jsx(AlertDialogPrimitive.Content, {
|
|
59
|
-
className: cn(
|
|
59
|
+
className: cn("dark:bg-background bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
|
|
60
60
|
"data-slot": "alert-dialog-content",
|
|
61
61
|
...props
|
|
62
62
|
})
|
|
@@ -65,21 +65,21 @@ function AlertDialogContent({ className, ...props }) {
|
|
|
65
65
|
}
|
|
66
66
|
function AlertDialogHeader({ className, ...props }) {
|
|
67
67
|
return /*#__PURE__*/ _jsx("div", {
|
|
68
|
-
className: cn(
|
|
68
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
69
69
|
"data-slot": "alert-dialog-header",
|
|
70
70
|
...props
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
function AlertDialogFooter({ className, ...props }) {
|
|
74
74
|
return /*#__PURE__*/ _jsx("div", {
|
|
75
|
-
className: cn(
|
|
75
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
76
76
|
"data-slot": "alert-dialog-footer",
|
|
77
77
|
...props
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
function AlertDialogFooterSkeleton({ className, ...props }) {
|
|
81
81
|
return /*#__PURE__*/ _jsxs("div", {
|
|
82
|
-
className: cn(
|
|
82
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
83
83
|
"data-slot": "alert-dialog-footer",
|
|
84
84
|
...props,
|
|
85
85
|
children: [
|
|
@@ -94,14 +94,14 @@ function AlertDialogFooterSkeleton({ className, ...props }) {
|
|
|
94
94
|
}
|
|
95
95
|
function AlertDialogTitle({ className, ...props }) {
|
|
96
96
|
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Title, {
|
|
97
|
-
className: cn(
|
|
97
|
+
className: cn("text-lg font-semibold", className),
|
|
98
98
|
"data-slot": "alert-dialog-title",
|
|
99
99
|
...props
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
function AlertDialogDescription({ className, ...props }) {
|
|
103
103
|
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Description, {
|
|
104
|
-
className: cn(
|
|
104
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
105
105
|
"data-slot": "alert-dialog-description",
|
|
106
106
|
...props
|
|
107
107
|
});
|
|
@@ -115,9 +115,9 @@ function AlertDialogAction({ className, ...props }) {
|
|
|
115
115
|
function AlertDialogCancel({ className, ...props }) {
|
|
116
116
|
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Cancel, {
|
|
117
117
|
className: cn(buttonVariants({
|
|
118
|
-
variant:
|
|
118
|
+
variant: "ghost"
|
|
119
119
|
}), className),
|
|
120
120
|
...props
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
123
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, useAlertDialog };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type VariantProps } from
|
|
2
|
-
import * as React from
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
4
|
variant?: "destructive" | "default" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
declare function Alert({ className, variant, ...props }: React.ComponentProps<
|
|
7
|
-
declare function AlertTitle({ className, ...props }: React.ComponentProps<
|
|
8
|
-
declare function AlertDescription({ className, ...props }: React.ComponentProps<
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { Alert, AlertDescription, AlertTitle };
|
|
10
10
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,QAAA,MAAM,aAAa;;8EAclB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,2CASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7B;AAED,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import * as React from "react";
|
|
4
3
|
import { cn } from "../../lib/utils.js";
|
|
5
|
-
const alertVariants = cva(
|
|
4
|
+
const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
6
5
|
variants: {
|
|
7
6
|
variant: {
|
|
8
|
-
default:
|
|
9
|
-
destructive:
|
|
7
|
+
default: "bg-card text-card-foreground",
|
|
8
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
10
9
|
}
|
|
11
10
|
},
|
|
12
11
|
defaultVariants: {
|
|
13
|
-
variant:
|
|
12
|
+
variant: "default"
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
15
|
function Alert({ className, variant, ...props }) {
|
|
@@ -25,14 +24,14 @@ function Alert({ className, variant, ...props }) {
|
|
|
25
24
|
}
|
|
26
25
|
function AlertTitle({ className, ...props }) {
|
|
27
26
|
return /*#__PURE__*/ _jsx("div", {
|
|
28
|
-
className: cn(
|
|
27
|
+
className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
|
|
29
28
|
"data-slot": "alert-title",
|
|
30
29
|
...props
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
32
|
function AlertDescription({ className, ...props }) {
|
|
34
33
|
return /*#__PURE__*/ _jsx("div", {
|
|
35
|
-
className: cn(
|
|
34
|
+
className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
|
|
36
35
|
"data-slot": "alert-description",
|
|
37
36
|
...props
|
|
38
37
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type VariantProps } from
|
|
2
|
-
import * as React from
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
4
|
variant?: "secondary" | "destructive" | "default" | "outline" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
7
|
asChild?: boolean;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { Badge, badgeVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,QAAA,MAAM,aAAa;;8EAmBlB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAC7B,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2CAU3D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|