@vitnode/core 1.2.0-canary.60 → 1.2.0-canary.62
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/dist/scripts/get-config.js +15 -0
- package/dist/scripts/plugin.js +188 -0
- package/dist/scripts/prepare-database.js +177 -0
- package/dist/scripts/prepare-plugins-files.js +134 -0
- package/dist/scripts/run-interactive-shell-command.js +21 -0
- package/dist/scripts/scripts.js +39 -13
- package/dist/scripts/shared/file-utils.js +203 -0
- package/dist/src/api/adapters/sso/discord.js +1 -77
- package/dist/src/api/adapters/sso/facebook.js +1 -76
- package/dist/src/api/adapters/sso/google.js +1 -87
- package/dist/src/api/config.js +1 -67
- package/dist/src/api/lib/check-plugin-id.js +1 -43
- package/dist/src/api/lib/cron.js +1 -22
- package/dist/src/api/lib/logger-middleware.js +1 -35
- package/dist/src/api/lib/module.js +1 -22
- package/dist/src/api/lib/plugin.js +1 -22
- package/dist/src/api/lib/route.js +1 -27
- package/dist/src/api/lib/with-pagination.js +1 -83
- package/dist/src/api/middlewares/captcha.middleware.js +1 -63
- package/dist/src/api/middlewares/cron-auth.middleware.js +1 -19
- package/dist/src/api/middlewares/global.middleware.js +1 -93
- package/dist/src/api/middlewares/rate-limiter.middleware.js +1 -32
- package/dist/src/api/models/device.js +1 -61
- package/dist/src/api/models/email.js +1 -76
- package/dist/src/api/models/password.js +1 -36
- package/dist/src/api/models/session-admin.js +1 -106
- package/dist/src/api/models/session.js +1 -85
- package/dist/src/api/models/sso.js +1 -120
- package/dist/src/api/models/user/get-user-by-id.js +1 -19
- package/dist/src/api/models/user/sign-in-with-passwords.js +1 -22
- package/dist/src/api/models/user/sign-up.js +1 -73
- package/dist/src/api/models/user.js +1 -8
- package/dist/src/api/modules/admin/admin.module.js +1 -19
- package/dist/src/api/modules/admin/advanced/advanced.admin.module.js +1 -11
- package/dist/src/api/modules/admin/advanced/cron/cron.admin.module.js +1 -12
- package/dist/src/api/modules/admin/advanced/cron/routes/get.route.js +1 -66
- package/dist/src/api/modules/admin/advanced/cron/routes/run.route.js +1 -95
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +1 -10
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +1 -94
- package/dist/src/api/modules/admin/routes/session.route.js +1 -47
- package/dist/src/api/modules/admin/users/routes/list.route.js +1 -79
- package/dist/src/api/modules/admin/users/routes/users.route.js +1 -84
- package/dist/src/api/modules/admin/users/users.admin.module.js +1 -10
- package/dist/src/api/modules/cron/cron/clean.cron.js +1 -24
- package/dist/src/api/modules/cron/cron.module.js +1 -14
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.d.ts.map +1 -1
- package/dist/src/api/modules/cron/helpers/process-cron-jobs.js +1 -76
- package/dist/src/api/modules/cron/routes/cron.route.js +1 -101
- package/dist/src/api/modules/middleware/middleware.module.js +1 -10
- package/dist/src/api/modules/middleware/route.js +1 -49
- package/dist/src/api/modules/users/avatar-color.js +1 -43
- package/dist/src/api/modules/users/routes/change-password.route.js +1 -58
- package/dist/src/api/modules/users/routes/reset-passowrd.route.js +1 -91
- package/dist/src/api/modules/users/routes/session.route.js +1 -46
- package/dist/src/api/modules/users/routes/sign-in.route.js +1 -71
- package/dist/src/api/modules/users/routes/sign-out.route.js +1 -43
- package/dist/src/api/modules/users/routes/sign-up.route.js +1 -77
- package/dist/src/api/modules/users/routes/test.route.js +1 -33
- package/dist/src/api/modules/users/sso/routes/callback.route.js +1 -52
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +1 -36
- package/dist/src/api/modules/users/sso/sso.module.js +1 -12
- package/dist/src/api/modules/users/users.module.js +1 -26
- package/dist/src/api/plugin.js +1 -15
- package/dist/src/app/login/page.js +1 -16
- package/dist/src/app/login/reset-password/page.js +1 -18
- package/dist/src/app/login/sso/[providerId]/page.js +1 -10
- package/dist/src/app/register/page.js +1 -16
- package/dist/src/app_admin/core/advanced/cron/page.js +1 -42
- package/dist/src/app_admin/core/debug/page.js +1 -45
- package/dist/src/app_admin/core/page.js +1 -5
- package/dist/src/app_admin/core/test/page.js +1 -5
- package/dist/src/app_admin/core/users/page.js +1 -38
- package/dist/src/components/avatar.js +1 -14
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +1 -42
- package/dist/src/components/confirm-action/content.js +1 -31
- package/dist/src/components/date-format.js +1 -41
- package/dist/src/components/form/auto-form.js +1 -103
- package/dist/src/components/form/common/desc.js +1 -9
- package/dist/src/components/form/common/label.js +1 -18
- package/dist/src/components/form/fields/checkbox.js +1 -37
- package/dist/src/components/form/fields/combobox-async.js +1 -123
- package/dist/src/components/form/fields/combobox.js +1 -87
- package/dist/src/components/form/fields/input.js +1 -39
- package/dist/src/components/form/fields/radio-group.js +1 -50
- package/dist/src/components/form/fields/select.js +1 -58
- package/dist/src/components/form/fields/switch.js +1 -36
- package/dist/src/components/form/fields/textarea.js +1 -36
- package/dist/src/components/i18n-provider.js +1 -43
- package/dist/src/components/logo-vitnode.js +1 -119
- package/dist/src/components/switchers/langs/language-switcher.js +1 -47
- package/dist/src/components/switchers/themes/theme-switcher.js +1 -28
- package/dist/src/components/table/content.js +1 -81
- package/dist/src/components/table/data-table.js +1 -68
- package/dist/src/components/table/order-table-head.js +1 -50
- package/dist/src/components/table/pagination.js +1 -122
- package/dist/src/components/tiptap/extension.js +1 -33
- package/dist/src/components/tiptap/toolbar/actions/alignment-action.js +1 -91
- package/dist/src/components/tiptap/toolbar/actions/bold-action.js +1 -39
- package/dist/src/components/tiptap/toolbar/actions/headings-action.js +1 -93
- package/dist/src/components/tiptap/toolbar/actions/italic-action.js +1 -38
- package/dist/src/components/tiptap/toolbar/actions/list-action.js +1 -61
- package/dist/src/components/tiptap/toolbar/actions/text-format-more/text-format-more.js +1 -59
- package/dist/src/components/tiptap/toolbar/actions/underline-action.js +1 -38
- package/dist/src/components/tiptap/toolbar/actions/undo-redo-actions.js +1 -63
- package/dist/src/components/tiptap/toolbar/actions/utils/tooltip-shortcut.js +1 -11
- package/dist/src/components/tiptap/toolbar/tiptap-toolbar.js +1 -55
- package/dist/src/components/tiptap/toolbar/use-toolbar-editor.js +1 -5
- package/dist/src/components/ui/accordion.js +1 -46
- package/dist/src/components/ui/alert-dialog.js +1 -123
- package/dist/src/components/ui/alert.js +1 -39
- package/dist/src/components/ui/badge.js +1 -28
- package/dist/src/components/ui/button-client.js +1 -57
- package/dist/src/components/ui/button.js +1 -32
- package/dist/src/components/ui/card.js +1 -52
- package/dist/src/components/ui/checkbox.js +1 -20
- package/dist/src/components/ui/collapsible.js +1 -22
- package/dist/src/components/ui/command.js +1 -98
- package/dist/src/components/ui/context-menu.js +1 -140
- package/dist/src/components/ui/dialog.js +1 -189
- package/dist/src/components/ui/drawer.js +1 -83
- package/dist/src/components/ui/dropdown-menu.js +1 -141
- package/dist/src/components/ui/editor-content.js +1 -10
- package/dist/src/components/ui/editor.js +1 -35
- package/dist/src/components/ui/form.js +1 -148
- package/dist/src/components/ui/header-content.js +1 -30
- package/dist/src/components/ui/hover-card.js +1 -29
- package/dist/src/components/ui/input-otp.js +1 -48
- package/dist/src/components/ui/input.js +1 -11
- package/dist/src/components/ui/label.js +1 -12
- package/dist/src/components/ui/loader.js +1 -16
- package/dist/src/components/ui/menubar.js +1 -151
- package/dist/src/components/ui/navigation-menu.js +1 -82
- package/dist/src/components/ui/popover.js +1 -35
- package/dist/src/components/ui/progress.js +1 -19
- package/dist/src/components/ui/radio-group.js +1 -27
- package/dist/src/components/ui/scroll-area.js +1 -33
- package/dist/src/components/ui/select.js +1 -113
- package/dist/src/components/ui/separator.js +1 -14
- package/dist/src/components/ui/sheet.js +1 -92
- package/dist/src/components/ui/sidebar.js +1 -433
- package/dist/src/components/ui/skeleton.js +1 -10
- package/dist/src/components/ui/slider.js +1 -50
- package/dist/src/components/ui/sonner.js +1 -26
- package/dist/src/components/ui/switch.js +1 -16
- package/dist/src/components/ui/table.js +1 -63
- package/dist/src/components/ui/tabs.js +1 -33
- package/dist/src/components/ui/textarea.js +1 -10
- package/dist/src/components/ui/toggle-group.js +1 -45
- package/dist/src/components/ui/toggle.js +1 -34
- package/dist/src/components/ui/tooltip.js +1 -57
- package/dist/src/config.js +1 -4
- package/dist/src/database/admins.js +1 -74
- package/dist/src/database/cron.js +1 -22
- package/dist/src/database/languages.js +1 -52
- package/dist/src/database/logs.js +1 -34
- package/dist/src/database/moderators.js +1 -37
- package/dist/src/database/roles.js +1 -13
- package/dist/src/database/sessions.js +1 -60
- package/dist/src/database/users.js +1 -145
- package/dist/src/drizzle.config.js +1 -67
- package/dist/src/emails/default-template.js +1 -99
- package/dist/src/emails/reset-password.js +1 -132
- package/dist/src/emails/ui/button.js +1 -36
- package/dist/src/emails/ui/card.js +1 -39
- package/dist/src/hooks/use-before-unload.js +1 -30
- package/dist/src/hooks/use-captcha.js +1 -122
- package/dist/src/hooks/use-mobile.js +1 -16
- package/dist/src/lib/api/get-middleware-api.js +1 -13
- package/dist/src/lib/api/get-next-cron-run-date.js +1 -14
- package/dist/src/lib/api/get-next-cron-run-date.test.js +1 -55
- package/dist/src/lib/api/get-session-admin-api.js +1 -19
- package/dist/src/lib/api/get-session-api.js +1 -14
- package/dist/src/lib/api/should-cron-job-run.js +1 -16
- package/dist/src/lib/api/should-cron-job-run.test.js +1 -213
- package/dist/src/lib/api/validate-cron-schedule.d.ts +2 -0
- package/dist/src/lib/api/validate-cron-schedule.d.ts.map +1 -0
- package/dist/src/lib/api/validate-cron-schedule.js +1 -0
- package/dist/src/lib/api/validate-cron-schedule.test.d.ts +2 -0
- package/dist/src/lib/api/validate-cron-schedule.test.d.ts.map +1 -0
- package/dist/src/lib/api/validate-cron-schedule.test.js +1 -0
- package/dist/src/lib/colors.js +1 -140
- package/dist/src/lib/colors.test.js +1 -173
- package/dist/src/lib/config.js +1 -14
- package/dist/src/lib/ctrl-or-command-character.js +1 -5
- package/dist/src/lib/fetcher/cookie-from-string-to-object.js +1 -12
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +1 -78
- package/dist/src/lib/fetcher/core.js +3 -48
- package/dist/src/lib/fetcher/helpers-server.js +1 -18
- package/dist/src/lib/fetcher/helpers.js +1 -16
- package/dist/src/lib/fetcher/helpers.test.js +1 -37
- package/dist/src/lib/fetcher/types.js +1 -1
- package/dist/src/lib/fetcher-client.js +1 -17
- package/dist/src/lib/fetcher.js +1 -33
- package/dist/src/lib/helpers/auto-form.js +1 -98
- package/dist/src/lib/helpers/auto-form.test.js +1 -336
- package/dist/src/lib/navigation.js +1 -11
- package/dist/src/lib/plugin.js +1 -3
- package/dist/src/lib/special-characters.js +1 -4
- package/dist/src/lib/special-characters.test.js +1 -56
- package/dist/src/lib/utils.js +1 -5
- package/dist/src/locales/en.json +308 -0
- package/dist/src/tests/setup.js +1 -6
- package/dist/src/views/admin/layouts/admin-layout.js +1 -73
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +1 -98
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +1 -60
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +1 -28
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +1 -14
- package/dist/src/views/admin/layouts/user-bar/client.js +1 -69
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +1 -32
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +1 -27
- package/dist/src/views/admin/views/core/advanced/cron/cron-table-view.js +1 -97
- package/dist/src/views/admin/views/core/advanced/cron/run-action/mutation-api.js +1 -23
- package/dist/src/views/admin/views/core/advanced/cron/run-action/run-action.js +1 -38
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +1 -44
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +1 -35
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +1 -5
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +1 -281
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +1 -67
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +1 -14
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +1 -30
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +1 -96
- package/dist/src/views/admin/views/core/test.js +1 -161
- package/dist/src/views/admin/views/core/users/users-admin-view.js +1 -89
- package/dist/src/views/auth/password-reset/change-password-form/form.js +1 -48
- package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +1 -22
- package/dist/src/views/auth/password-reset/change-password-form/use-form.js +1 -36
- package/dist/src/views/auth/password-reset/form/form.js +1 -104
- package/dist/src/views/auth/password-reset/form/mutation-api.js +1 -21
- package/dist/src/views/auth/password-reset/form/use-form.js +1 -33
- package/dist/src/views/auth/password-reset/password-reset-view.js +1 -37
- package/dist/src/views/auth/sign-in/form/form.js +1 -64
- package/dist/src/views/auth/sign-in/form/mutation-api.js +1 -33
- package/dist/src/views/auth/sign-in/form/use-form.js +1 -38
- package/dist/src/views/auth/sign-in/sign-in-view.js +1 -61
- package/dist/src/views/auth/sign-up/components/password-input.js +1 -96
- package/dist/src/views/auth/sign-up/email-confirmation-view.js +1 -55
- package/dist/src/views/auth/sign-up/form/form.js +1 -89
- package/dist/src/views/auth/sign-up/form/mutation-api.js +1 -30
- package/dist/src/views/auth/sign-up/form/use-form.js +1 -70
- package/dist/src/views/auth/sign-up/sign-up-view.js +1 -65
- package/dist/src/views/auth/sign-up/wrapper.js +1 -22
- package/dist/src/views/auth/sso/buttons/client.js +1 -22
- package/dist/src/views/auth/sso/buttons/mutation-api.js +1 -24
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +1 -56
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +1 -32
- package/dist/src/views/auth/sso/callback/client/client.js +1 -68
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +1 -32
- package/dist/src/views/error/back-button.js +1 -14
- package/dist/src/views/error/error-view.js +1 -58
- package/dist/src/views/error/global-error-view.js +1 -50
- package/dist/src/views/layouts/provider.js +1 -44
- package/dist/src/views/layouts/root-layout.js +1 -25
- package/dist/src/views/layouts/theme/header/header.js +1 -38
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +1 -33
- package/dist/src/views/layouts/theme/header/user/auth/client.js +1 -47
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +1 -27
- package/dist/src/views/layouts/theme/header/user/user.js +1 -32
- package/dist/src/views/layouts/theme/layout.js +1 -16
- package/dist/src/vitnode.config.js +1 -42
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/tsup.config.js +18 -0
- package/dist/vitest.config.d.ts.map +1 -1
- package/dist/vitest.config.js +49 -0
- package/eslint.config.mjs +2 -0
- package/package.json +6 -10
- package/dist/src/api/adapters/cron/node-cron.adapter.d.ts +0 -3
- package/dist/src/api/adapters/cron/node-cron.adapter.d.ts.map +0 -1
- package/dist/src/api/adapters/cron/node-cron.adapter.js +0 -11
- package/dist/src/api/adapters/email/nodemailer.d.ts +0 -10
- package/dist/src/api/adapters/email/nodemailer.d.ts.map +0 -1
- package/dist/src/api/adapters/email/nodemailer.js +0 -30
- package/dist/src/api/adapters/email/resend.d.ts +0 -6
- package/dist/src/api/adapters/email/resend.d.ts.map +0 -1
- package/dist/src/api/adapters/email/resend.js +0 -21
|
@@ -1,123 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { buttonVariants } from "./button.js";
|
|
6
|
-
import { cn } from "../../lib/utils.js";
|
|
7
|
-
import { Skeleton } from "./skeleton.js";
|
|
8
|
-
const AlertDialogContext = /*#__PURE__*/ React.createContext({
|
|
9
|
-
open: false,
|
|
10
|
-
setOpen: ()=>{}
|
|
11
|
-
});
|
|
12
|
-
const useAlertDialog = ()=>React.use(AlertDialogContext);
|
|
13
|
-
function AlertDialog({ onOpenChange, open: openProp, ...props }) {
|
|
14
|
-
const [open, setOpen] = React.useState(false);
|
|
15
|
-
const handleOpenChange = (newOpen)=>{
|
|
16
|
-
onOpenChange?.(newOpen);
|
|
17
|
-
setOpen(newOpen);
|
|
18
|
-
};
|
|
19
|
-
const contextValue = React.useMemo(()=>({
|
|
20
|
-
open,
|
|
21
|
-
setOpen
|
|
22
|
-
}), [
|
|
23
|
-
open
|
|
24
|
-
]);
|
|
25
|
-
return /*#__PURE__*/ _jsx(AlertDialogContext, {
|
|
26
|
-
value: contextValue,
|
|
27
|
-
children: /*#__PURE__*/ _jsx(AlertDialogPrimitive.Root, {
|
|
28
|
-
"data-slot": "alert-dialog",
|
|
29
|
-
onOpenChange: handleOpenChange,
|
|
30
|
-
open: openProp ?? open,
|
|
31
|
-
...props
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function AlertDialogTrigger({ ...props }) {
|
|
36
|
-
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Trigger, {
|
|
37
|
-
"data-slot": "alert-dialog-trigger",
|
|
38
|
-
...props
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function AlertDialogPortal({ ...props }) {
|
|
42
|
-
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Portal, {
|
|
43
|
-
"data-slot": "alert-dialog-portal",
|
|
44
|
-
...props
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function AlertDialogOverlay({ className, ...props }) {
|
|
48
|
-
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Overlay, {
|
|
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
|
-
"data-slot": "alert-dialog-overlay",
|
|
51
|
-
...props
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function AlertDialogContent({ className, ...props }) {
|
|
55
|
-
return /*#__PURE__*/ _jsxs(AlertDialogPortal, {
|
|
56
|
-
children: [
|
|
57
|
-
/*#__PURE__*/ _jsx(AlertDialogOverlay, {}),
|
|
58
|
-
/*#__PURE__*/ _jsx(AlertDialogPrimitive.Content, {
|
|
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 top-[50%] left-[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
|
-
"data-slot": "alert-dialog-content",
|
|
61
|
-
...props
|
|
62
|
-
})
|
|
63
|
-
]
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
function AlertDialogHeader({ className, ...props }) {
|
|
67
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
68
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
69
|
-
"data-slot": "alert-dialog-header",
|
|
70
|
-
...props
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function AlertDialogFooter({ className, ...props }) {
|
|
74
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
75
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
76
|
-
"data-slot": "alert-dialog-footer",
|
|
77
|
-
...props
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function AlertDialogFooterSkeleton({ className, ...props }) {
|
|
81
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
82
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
83
|
-
"data-slot": "alert-dialog-footer",
|
|
84
|
-
...props,
|
|
85
|
-
children: [
|
|
86
|
-
/*#__PURE__*/ _jsx(Skeleton, {
|
|
87
|
-
className: "h-9 sm:w-24"
|
|
88
|
-
}),
|
|
89
|
-
/*#__PURE__*/ _jsx(Skeleton, {
|
|
90
|
-
className: "h-9 sm:w-24"
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function AlertDialogTitle({ className, ...props }) {
|
|
96
|
-
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Title, {
|
|
97
|
-
className: cn("text-lg font-semibold", className),
|
|
98
|
-
"data-slot": "alert-dialog-title",
|
|
99
|
-
...props
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
function AlertDialogDescription({ className, ...props }) {
|
|
103
|
-
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Description, {
|
|
104
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
105
|
-
"data-slot": "alert-dialog-description",
|
|
106
|
-
...props
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
function AlertDialogAction({ className, ...props }) {
|
|
110
|
-
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Action, {
|
|
111
|
-
className: cn(buttonVariants(), className),
|
|
112
|
-
...props
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
function AlertDialogCancel({ className, ...props }) {
|
|
116
|
-
return /*#__PURE__*/ _jsx(AlertDialogPrimitive.Cancel, {
|
|
117
|
-
className: cn(buttonVariants({
|
|
118
|
-
variant: "ghost"
|
|
119
|
-
}), className),
|
|
120
|
-
...props
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogFooterSkeleton, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, useAlertDialog };
|
|
1
|
+
"use client";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{AlertDialog as AlertDialogPrimitive}from"radix-ui";import React from"react";import{buttonVariants}from"./button.js";import{cn}from"../../lib/utils.js";import{Skeleton}from"./skeleton.js";const AlertDialogContext=React.createContext({open:false,setOpen:()=>{}});const useAlertDialog=()=>React.use(AlertDialogContext);function AlertDialog({onOpenChange,open:openProp,...props}){const[open,setOpen]=React.useState(false);const handleOpenChange=newOpen=>{onOpenChange?.(newOpen);setOpen(newOpen)};const contextValue=React.useMemo(()=>({open,setOpen}),[open]);return _jsx(AlertDialogContext,{value:contextValue,children:_jsx(AlertDialogPrimitive.Root,{"data-slot":"alert-dialog",onOpenChange:handleOpenChange,open:openProp??open,...props})})}function AlertDialogTrigger({...props}){return _jsx(AlertDialogPrimitive.Trigger,{"data-slot":"alert-dialog-trigger",...props})}function AlertDialogPortal({...props}){return _jsx(AlertDialogPrimitive.Portal,{"data-slot":"alert-dialog-portal",...props})}function AlertDialogOverlay({className,...props}){return _jsx(AlertDialogPrimitive.Overlay,{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),"data-slot":"alert-dialog-overlay",...props})}function AlertDialogContent({className,...props}){return _jsxs(AlertDialogPortal,{children:[_jsx(AlertDialogOverlay,{}),_jsx(AlertDialogPrimitive.Content,{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 top-[50%] left-[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),"data-slot":"alert-dialog-content",...props})]})}function AlertDialogHeader({className,...props}){return _jsx("div",{className:cn("flex flex-col gap-2 text-center sm:text-left",className),"data-slot":"alert-dialog-header",...props})}function AlertDialogFooter({className,...props}){return _jsx("div",{className:cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",className),"data-slot":"alert-dialog-footer",...props})}function AlertDialogFooterSkeleton({className,...props}){return _jsxs("div",{className:cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",className),"data-slot":"alert-dialog-footer",...props,children:[_jsx(Skeleton,{className:"h-9 sm:w-24"}),_jsx(Skeleton,{className:"h-9 sm:w-24"})]})}function AlertDialogTitle({className,...props}){return _jsx(AlertDialogPrimitive.Title,{className:cn("text-lg font-semibold",className),"data-slot":"alert-dialog-title",...props})}function AlertDialogDescription({className,...props}){return _jsx(AlertDialogPrimitive.Description,{className:cn("text-muted-foreground text-sm",className),"data-slot":"alert-dialog-description",...props})}function AlertDialogAction({className,...props}){return _jsx(AlertDialogPrimitive.Action,{className:cn(buttonVariants(),className),...props})}function AlertDialogCancel({className,...props}){return _jsx(AlertDialogPrimitive.Cancel,{className:cn(buttonVariants({variant:"ghost"}),className),...props})}export{AlertDialog,AlertDialogAction,AlertDialogCancel,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogFooterSkeleton,AlertDialogHeader,AlertDialogOverlay,AlertDialogPortal,AlertDialogTitle,AlertDialogTrigger,useAlertDialog};
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
|
-
import { cn } from "../../lib/utils.js";
|
|
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", {
|
|
5
|
-
variants: {
|
|
6
|
-
variant: {
|
|
7
|
-
default: "bg-card text-card-foreground",
|
|
8
|
-
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
defaultVariants: {
|
|
12
|
-
variant: "default"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
function Alert({ className, variant, ...props }) {
|
|
16
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
17
|
-
className: cn(alertVariants({
|
|
18
|
-
variant
|
|
19
|
-
}), className),
|
|
20
|
-
"data-slot": "alert",
|
|
21
|
-
role: "alert",
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
function AlertTitle({ className, ...props }) {
|
|
26
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
27
|
-
className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
|
|
28
|
-
"data-slot": "alert-title",
|
|
29
|
-
...props
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function AlertDescription({ className, ...props }) {
|
|
33
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
34
|
-
className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
|
|
35
|
-
"data-slot": "alert-description",
|
|
36
|
-
...props
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
export { Alert, AlertDescription, AlertTitle };
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{cva}from"class-variance-authority";import{cn}from"../../lib/utils.js";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",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Alert({className,variant,...props}){return _jsx("div",{className:cn(alertVariants({variant}),className),"data-slot":"alert",role:"alert",...props})}function AlertTitle({className,...props}){return _jsx("div",{className:cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",className),"data-slot":"alert-title",...props})}function AlertDescription({className,...props}){return _jsx("div",{className:cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",className),"data-slot":"alert-description",...props})}export{Alert,AlertDescription,AlertTitle};
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
|
-
import { Slot } from "radix-ui";
|
|
4
|
-
import { cn } from "../../lib/utils.js";
|
|
5
|
-
const badgeVariants = cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
6
|
-
variants: {
|
|
7
|
-
variant: {
|
|
8
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
9
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
10
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
11
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
defaultVariants: {
|
|
15
|
-
variant: "default"
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
function Badge({ className, variant, asChild = false, ...props }) {
|
|
19
|
-
const Comp = asChild ? Slot.Root : "span";
|
|
20
|
-
return /*#__PURE__*/ _jsx(Comp, {
|
|
21
|
-
className: cn(badgeVariants({
|
|
22
|
-
variant
|
|
23
|
-
}), className),
|
|
24
|
-
"data-slot": "badge",
|
|
25
|
-
...props
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
export { Badge, badgeVariants };
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{cva}from"class-variance-authority";import{Slot}from"radix-ui";import{cn}from"../../lib/utils.js";const badgeVariants=cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Badge({className,variant,asChild=false,...props}){const Comp=asChild?Slot.Root:"span";return _jsx(Comp,{className:cn(badgeVariants({variant}),className),"data-slot":"badge",...props})}export{Badge,badgeVariants};
|
|
@@ -1,57 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { AnimatePresence, motion } from "motion/react";
|
|
4
|
-
import { useTranslations } from "next-intl";
|
|
5
|
-
import { Slot } from "radix-ui";
|
|
6
|
-
import { cn } from "../../lib/utils.js";
|
|
7
|
-
import { buttonVariants } from "./button.js";
|
|
8
|
-
import { Loader } from "./loader.js";
|
|
9
|
-
export function ClientButton({ className, variant, size, asChild = false, isLoading, children, ...props }) {
|
|
10
|
-
const Comp = asChild ? Slot.Root : "button";
|
|
11
|
-
const t = useTranslations("core.global");
|
|
12
|
-
return /*#__PURE__*/ _jsx(Comp, {
|
|
13
|
-
"aria-label": isLoading ? t("loading") : props["aria-label"],
|
|
14
|
-
className: cn(buttonVariants({
|
|
15
|
-
variant,
|
|
16
|
-
size,
|
|
17
|
-
className
|
|
18
|
-
})),
|
|
19
|
-
"data-slot": "button",
|
|
20
|
-
disabled: isLoading ?? props.disabled,
|
|
21
|
-
...props,
|
|
22
|
-
children: isLoading === undefined ? children : /*#__PURE__*/ _jsxs("div", {
|
|
23
|
-
className: "relative flex items-center justify-center",
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ _jsx("div", {
|
|
26
|
-
className: cn("flex items-center justify-center gap-2 transition-opacity duration-300", isLoading ? "opacity-0" : "opacity-100"),
|
|
27
|
-
children: children
|
|
28
|
-
}),
|
|
29
|
-
/*#__PURE__*/ _jsx(AnimatePresence, {
|
|
30
|
-
children: isLoading && /*#__PURE__*/ _jsx(motion.div, {
|
|
31
|
-
animate: {
|
|
32
|
-
opacity: 1,
|
|
33
|
-
transform: "translateY(0px)"
|
|
34
|
-
},
|
|
35
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
36
|
-
exit: {
|
|
37
|
-
opacity: 0,
|
|
38
|
-
transform: "translateY(20px)"
|
|
39
|
-
},
|
|
40
|
-
initial: {
|
|
41
|
-
opacity: 0,
|
|
42
|
-
transform: "translateY(-20px)"
|
|
43
|
-
},
|
|
44
|
-
transition: {
|
|
45
|
-
type: "spring",
|
|
46
|
-
duration: 0.4,
|
|
47
|
-
bounce: 0
|
|
48
|
-
},
|
|
49
|
-
children: /*#__PURE__*/ _jsx(Loader, {
|
|
50
|
-
small: true
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
})
|
|
54
|
-
]
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}
|
|
1
|
+
"use client";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{AnimatePresence,motion}from"motion/react";import{useTranslations}from"next-intl";import{Slot}from"radix-ui";import{cn}from"../../lib/utils.js";import{buttonVariants}from"./button.js";import{Loader}from"./loader.js";export function ClientButton({className,variant,size,asChild=false,isLoading,children,...props}){const Comp=asChild?Slot.Root:"button";const t=useTranslations("core.global");return _jsx(Comp,{"aria-label":isLoading?t("loading"):props["aria-label"],className:cn(buttonVariants({variant,size,className})),"data-slot":"button",disabled:isLoading??props.disabled,...props,children:isLoading===undefined?children:_jsxs("div",{className:"relative flex items-center justify-center",children:[_jsx("div",{className:cn("flex items-center justify-center gap-2 transition-opacity duration-300",isLoading?"opacity-0":"opacity-100"),children:children}),_jsx(AnimatePresence,{children:isLoading&&_jsx(motion.div,{animate:{opacity:1,transform:"translateY(0px)"},className:"absolute inset-0 flex items-center justify-center",exit:{opacity:0,transform:"translateY(20px)"},initial:{opacity:0,transform:"translateY(-20px)"},transition:{type:"spring",duration:.4,bounce:0},children:_jsx(Loader,{small:true})})})]})})}
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
|
-
import { ClientButton } from "./button-client.js";
|
|
4
|
-
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer overflow-hidden active:scale-[0.98] select-none", {
|
|
5
|
-
variants: {
|
|
6
|
-
variant: {
|
|
7
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
8
|
-
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
9
|
-
destructiveGhost: "hover:bg-destructive/20 text-destructive focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
|
|
10
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
11
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
12
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
13
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
17
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
18
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
19
|
-
icon: "size-9"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
variant: "default",
|
|
24
|
-
size: "default"
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
function Button(props) {
|
|
28
|
-
return /*#__PURE__*/ _jsx(ClientButton, {
|
|
29
|
-
...props
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
export { Button, buttonVariants };
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{cva}from"class-variance-authority";import{ClientButton}from"./button-client.js";const buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer overflow-hidden active:scale-[0.98] select-none",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",destructiveGhost:"hover:bg-destructive/20 text-destructive focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Button(props){return _jsx(ClientButton,{...props})}export{Button,buttonVariants};
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cn } from "../../lib/utils.js";
|
|
3
|
-
function Card({ className, ...props }) {
|
|
4
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
5
|
-
className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className),
|
|
6
|
-
"data-slot": "card",
|
|
7
|
-
...props
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function CardHeader({ className, ...props }) {
|
|
11
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
12
|
-
className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
13
|
-
"data-slot": "card-header",
|
|
14
|
-
...props
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function CardTitle({ className, ...props }) {
|
|
18
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
19
|
-
className: cn("text-xl leading-none font-semibold", className),
|
|
20
|
-
"data-slot": "card-title",
|
|
21
|
-
...props
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function CardDescription({ className, ...props }) {
|
|
25
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
26
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
27
|
-
"data-slot": "card-description",
|
|
28
|
-
...props
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function CardAction({ className, ...props }) {
|
|
32
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
33
|
-
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
34
|
-
"data-slot": "card-action",
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function CardContent({ className, ...props }) {
|
|
39
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
40
|
-
className: cn("px-6", className),
|
|
41
|
-
"data-slot": "card-content",
|
|
42
|
-
...props
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function CardFooter({ className, ...props }) {
|
|
46
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
47
|
-
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
48
|
-
"data-slot": "card-footer",
|
|
49
|
-
...props
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{cn}from"../../lib/utils.js";function Card({className,...props}){return _jsx("div",{className:cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",className),"data-slot":"card",...props})}function CardHeader({className,...props}){return _jsx("div",{className:cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",className),"data-slot":"card-header",...props})}function CardTitle({className,...props}){return _jsx("div",{className:cn("text-xl leading-none font-semibold",className),"data-slot":"card-title",...props})}function CardDescription({className,...props}){return _jsx("div",{className:cn("text-muted-foreground text-sm",className),"data-slot":"card-description",...props})}function CardAction({className,...props}){return _jsx("div",{className:cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end",className),"data-slot":"card-action",...props})}function CardContent({className,...props}){return _jsx("div",{className:cn("px-6",className),"data-slot":"card-content",...props})}function CardFooter({className,...props}){return _jsx("div",{className:cn("flex items-center px-6 [.border-t]:pt-6",className),"data-slot":"card-footer",...props})}export{Card,CardAction,CardContent,CardDescription,CardFooter,CardHeader,CardTitle};
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { CheckIcon } from "lucide-react";
|
|
4
|
-
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils.js";
|
|
6
|
-
function Checkbox({ className, ...props }) {
|
|
7
|
-
return /*#__PURE__*/ _jsx(CheckboxPrimitive.Root, {
|
|
8
|
-
className: cn("border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive peer size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
9
|
-
"data-slot": "checkbox",
|
|
10
|
-
...props,
|
|
11
|
-
children: /*#__PURE__*/ _jsx(CheckboxPrimitive.Indicator, {
|
|
12
|
-
className: "flex items-center justify-center text-current transition-none",
|
|
13
|
-
"data-slot": "checkbox-indicator",
|
|
14
|
-
children: /*#__PURE__*/ _jsx(CheckIcon, {
|
|
15
|
-
className: "size-3.5"
|
|
16
|
-
})
|
|
17
|
-
})
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
export { Checkbox };
|
|
1
|
+
"use client";import{jsx as _jsx}from"react/jsx-runtime";import{CheckIcon}from"lucide-react";import{Checkbox as CheckboxPrimitive}from"radix-ui";import{cn}from"../../lib/utils.js";function Checkbox({className,...props}){return _jsx(CheckboxPrimitive.Root,{className:cn("border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive peer size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",className),"data-slot":"checkbox",...props,children:_jsx(CheckboxPrimitive.Indicator,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",children:_jsx(CheckIcon,{className:"size-3.5"})})})}export{Checkbox};
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
4
|
-
function Collapsible({ ...props }) {
|
|
5
|
-
return /*#__PURE__*/ _jsx(CollapsiblePrimitive.Root, {
|
|
6
|
-
"data-slot": "collapsible",
|
|
7
|
-
...props
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function CollapsibleTrigger({ ...props }) {
|
|
11
|
-
return /*#__PURE__*/ _jsx(CollapsiblePrimitive.CollapsibleTrigger, {
|
|
12
|
-
"data-slot": "collapsible-trigger",
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function CollapsibleContent({ ...props }) {
|
|
17
|
-
return /*#__PURE__*/ _jsx(CollapsiblePrimitive.CollapsibleContent, {
|
|
18
|
-
"data-slot": "collapsible-content",
|
|
19
|
-
...props
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
1
|
+
"use client";import{jsx as _jsx}from"react/jsx-runtime";import{Collapsible as CollapsiblePrimitive}from"radix-ui";function Collapsible({...props}){return _jsx(CollapsiblePrimitive.Root,{"data-slot":"collapsible",...props})}function CollapsibleTrigger({...props}){return _jsx(CollapsiblePrimitive.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...props})}function CollapsibleContent({...props}){return _jsx(CollapsiblePrimitive.CollapsibleContent,{"data-slot":"collapsible-content",...props})}export{Collapsible,CollapsibleContent,CollapsibleTrigger};
|
|
@@ -1,98 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
4
|
-
import { SearchIcon } from "lucide-react";
|
|
5
|
-
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./dialog.js";
|
|
6
|
-
import { cn } from "../../lib/utils.js";
|
|
7
|
-
function Command({ className, ...props }) {
|
|
8
|
-
return /*#__PURE__*/ _jsx(CommandPrimitive, {
|
|
9
|
-
className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
10
|
-
"data-slot": "command",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
|
|
15
|
-
return /*#__PURE__*/ _jsxs(Dialog, {
|
|
16
|
-
...props,
|
|
17
|
-
children: [
|
|
18
|
-
/*#__PURE__*/ _jsxs(DialogHeader, {
|
|
19
|
-
className: "sr-only",
|
|
20
|
-
children: [
|
|
21
|
-
/*#__PURE__*/ _jsx(DialogTitle, {
|
|
22
|
-
children: title
|
|
23
|
-
}),
|
|
24
|
-
/*#__PURE__*/ _jsx(DialogDescription, {
|
|
25
|
-
children: description
|
|
26
|
-
})
|
|
27
|
-
]
|
|
28
|
-
}),
|
|
29
|
-
/*#__PURE__*/ _jsx(DialogContent, {
|
|
30
|
-
className: cn("overflow-hidden p-0", className),
|
|
31
|
-
showCloseButton: showCloseButton,
|
|
32
|
-
children: /*#__PURE__*/ _jsx(Command, {
|
|
33
|
-
className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
|
|
34
|
-
children: children
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function CommandInput({ className, ...props }) {
|
|
41
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
42
|
-
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
43
|
-
"data-slot": "command-input-wrapper",
|
|
44
|
-
children: [
|
|
45
|
-
/*#__PURE__*/ _jsx(SearchIcon, {
|
|
46
|
-
className: "size-4 shrink-0 opacity-50"
|
|
47
|
-
}),
|
|
48
|
-
/*#__PURE__*/ _jsx(CommandPrimitive.Input, {
|
|
49
|
-
className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
50
|
-
"data-slot": "command-input",
|
|
51
|
-
...props
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function CommandList({ className, ...props }) {
|
|
57
|
-
return /*#__PURE__*/ _jsx(CommandPrimitive.List, {
|
|
58
|
-
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
59
|
-
"data-slot": "command-list",
|
|
60
|
-
...props
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function CommandEmpty({ ...props }) {
|
|
64
|
-
return /*#__PURE__*/ _jsx(CommandPrimitive.Empty, {
|
|
65
|
-
className: "py-6 text-center text-sm",
|
|
66
|
-
"data-slot": "command-empty",
|
|
67
|
-
...props
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function CommandGroup({ className, ...props }) {
|
|
71
|
-
return /*#__PURE__*/ _jsx(CommandPrimitive.Group, {
|
|
72
|
-
className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
|
|
73
|
-
"data-slot": "command-group",
|
|
74
|
-
...props
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function CommandSeparator({ className, ...props }) {
|
|
78
|
-
return /*#__PURE__*/ _jsx(CommandPrimitive.Separator, {
|
|
79
|
-
className: cn("bg-border -mx-1 h-px", className),
|
|
80
|
-
"data-slot": "command-separator",
|
|
81
|
-
...props
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function CommandItem({ className, ...props }) {
|
|
85
|
-
return /*#__PURE__*/ _jsx(CommandPrimitive.Item, {
|
|
86
|
-
className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className),
|
|
87
|
-
"data-slot": "command-item",
|
|
88
|
-
...props
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function CommandShortcut({ className, ...props }) {
|
|
92
|
-
return /*#__PURE__*/ _jsx("span", {
|
|
93
|
-
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
94
|
-
"data-slot": "command-shortcut",
|
|
95
|
-
...props
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
1
|
+
"use client";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Command as CommandPrimitive}from"cmdk";import{SearchIcon}from"lucide-react";import{Dialog,DialogContent,DialogDescription,DialogHeader,DialogTitle}from"./dialog.js";import{cn}from"../../lib/utils.js";function Command({className,...props}){return _jsx(CommandPrimitive,{className:cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",className),"data-slot":"command",...props})}function CommandDialog({title="Command Palette",description="Search for a command to run...",children,className,showCloseButton=true,...props}){return _jsxs(Dialog,{...props,children:[_jsxs(DialogHeader,{className:"sr-only",children:[_jsx(DialogTitle,{children:title}),_jsx(DialogDescription,{children:description})]}),_jsx(DialogContent,{className:cn("overflow-hidden p-0",className),showCloseButton:showCloseButton,children:_jsx(Command,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:children})})]})}function CommandInput({className,...props}){return _jsxs("div",{className:"flex h-9 items-center gap-2 border-b px-3","data-slot":"command-input-wrapper",children:[_jsx(SearchIcon,{className:"size-4 shrink-0 opacity-50"}),_jsx(CommandPrimitive.Input,{className:cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",className),"data-slot":"command-input",...props})]})}function CommandList({className,...props}){return _jsx(CommandPrimitive.List,{className:cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",className),"data-slot":"command-list",...props})}function CommandEmpty({...props}){return _jsx(CommandPrimitive.Empty,{className:"py-6 text-center text-sm","data-slot":"command-empty",...props})}function CommandGroup({className,...props}){return _jsx(CommandPrimitive.Group,{className:cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",className),"data-slot":"command-group",...props})}function CommandSeparator({className,...props}){return _jsx(CommandPrimitive.Separator,{className:cn("bg-border -mx-1 h-px",className),"data-slot":"command-separator",...props})}function CommandItem({className,...props}){return _jsx(CommandPrimitive.Item,{className:cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",className),"data-slot":"command-item",...props})}function CommandShortcut({className,...props}){return _jsx("span",{className:cn("text-muted-foreground ml-auto text-xs tracking-widest",className),"data-slot":"command-shortcut",...props})}export{Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut};
|