create-einja-app 0.2.17 → 0.2.18
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/package.json +2 -2
- package/templates/default/.claude/hooks/einja/playwright-resize.sh +12 -2
- package/templates/default/.claude/settings.json +15 -0
- package/templates/default/.cursor/commands/task-vibe-kanban-loop.md +107 -42
- package/templates/default/.env.develop +0 -4
- package/templates/default/.env.example +1 -0
- package/templates/default/.env.preview +0 -4
- package/templates/default/.env.staging +19 -0
- package/templates/default/.github/actions/ci/action.yml +39 -0
- package/templates/default/.github/actions/migrate/action.yml +39 -0
- package/templates/default/.github/actions/neon-export-env/action.yml +28 -0
- package/templates/default/.github/actions/setup/action.yml +20 -0
- package/templates/default/.github/workflows/claude.yml +1 -0
- package/templates/default/.github/workflows/{cleanup-neon-branches.yml → cleanup-pr-preview-db.yml} +28 -24
- package/templates/default/.github/workflows/cleanup-pr-preview-on-close.yml +50 -0
- package/templates/default/.github/workflows/deploy-pr-preview.yml +398 -0
- package/templates/default/.github/workflows/deploy-stable-branches.yml +259 -0
- package/templates/default/.github/workflows/release-create-einja-app.yml +95 -0
- package/templates/default/.mcp.json +6 -9
- package/templates/default/CLAUDE.md +46 -9
- package/templates/default/README.md +5 -14
- package/templates/default/apps/admin/next.config.ts +11 -0
- package/templates/default/apps/admin/package.json +55 -0
- package/templates/default/apps/admin/postcss.config.cjs +5 -0
- package/templates/default/apps/admin/src/app/(auth)/forgot-password/page.tsx +97 -0
- package/templates/default/apps/admin/src/app/(auth)/layout.tsx +18 -0
- package/templates/default/apps/admin/src/app/(auth)/otp/page.tsx +121 -0
- package/templates/default/apps/admin/src/app/(auth)/sign-in/page.tsx +145 -0
- package/templates/default/apps/admin/src/app/(auth)/sign-up/page.tsx +199 -0
- package/templates/default/apps/admin/src/app/(errors)/401/page.tsx +27 -0
- package/templates/default/apps/admin/src/app/(errors)/403/page.tsx +28 -0
- package/templates/default/apps/admin/src/app/(errors)/500/page.tsx +29 -0
- package/templates/default/apps/admin/src/app/(errors)/layout.tsx +7 -0
- package/templates/default/apps/admin/src/app/(errors)/maintenance/page.tsx +25 -0
- package/templates/default/apps/admin/src/app/dashboard/_components/analytics-chart.tsx +68 -0
- package/templates/default/apps/admin/src/app/dashboard/_components/analytics.tsx +182 -0
- package/templates/default/apps/admin/src/app/dashboard/_components/dashboard-page.tsx +74 -0
- package/templates/default/apps/admin/src/app/dashboard/_components/metric-cards.tsx +49 -0
- package/templates/default/apps/admin/src/app/dashboard/_components/overview-chart.tsx +73 -0
- package/templates/default/apps/admin/src/app/dashboard/_components/recent-sales.tsx +75 -0
- package/templates/default/apps/admin/src/app/dashboard/apps/_components/apps-page.tsx +135 -0
- package/templates/default/apps/admin/src/app/dashboard/apps/page.tsx +10 -0
- package/templates/default/apps/admin/src/app/dashboard/chats/_components/chat-list.tsx +82 -0
- package/templates/default/apps/admin/src/app/dashboard/chats/_components/chat-messages.tsx +194 -0
- package/templates/default/apps/admin/src/app/dashboard/chats/_components/chats-page.tsx +99 -0
- package/templates/default/apps/admin/src/app/dashboard/chats/_components/new-chat.tsx +118 -0
- package/templates/default/apps/admin/src/app/dashboard/chats/page.tsx +10 -0
- package/templates/default/apps/admin/src/app/dashboard/layout.tsx +9 -0
- package/templates/default/apps/admin/src/app/dashboard/not-found.tsx +14 -0
- package/templates/default/apps/admin/src/app/dashboard/page.tsx +10 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/_components/content-section.tsx +20 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/_components/sidebar-nav.tsx +66 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/account/page.tsx +173 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/appearance/page.tsx +156 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/display/page.tsx +125 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/layout.tsx +30 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/notifications/page.tsx +196 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/page.tsx +5 -0
- package/templates/default/apps/admin/src/app/dashboard/settings/profile/page.tsx +176 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/data-table-bulk-actions.tsx +183 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/data-table-row-actions.tsx +79 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-columns.tsx +107 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-dialogs.tsx +71 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-import-dialog.tsx +106 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-multi-delete-dialog.tsx +90 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-mutate-drawer.tsx +207 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-page.tsx +31 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-primary-buttons.tsx +19 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-provider.tsx +37 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/_components/tasks-table.tsx +155 -0
- package/templates/default/apps/admin/src/app/dashboard/tasks/page.tsx +14 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/data-table-bulk-actions.tsx +136 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/data-table-row-actions.tsx +62 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-action-dialog.tsx +297 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-columns.tsx +121 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-delete-dialog.tsx +72 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-dialogs.tsx +49 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-invite-dialog.tsx +139 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-multi-delete-dialog.tsx +89 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-page.tsx +30 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-primary-buttons.tsx +19 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-provider.tsx +35 -0
- package/templates/default/apps/admin/src/app/dashboard/users/_components/users-table.tsx +157 -0
- package/templates/default/apps/admin/src/app/dashboard/users/page.tsx +10 -0
- package/templates/default/apps/admin/src/app/globals.css +109 -0
- package/templates/default/apps/admin/src/app/layout.tsx +32 -0
- package/templates/default/apps/admin/src/app/not-found.tsx +14 -0
- package/templates/default/apps/admin/src/app/page.tsx +5 -0
- package/templates/default/apps/admin/src/components/layout/admin-layout.tsx +16 -0
- package/templates/default/apps/admin/src/components/layout/app-sidebar.tsx +52 -0
- package/templates/default/apps/admin/src/components/layout/nav-config.ts +131 -0
- package/templates/default/apps/admin/src/components/providers/theme-provider.tsx +10 -0
- package/templates/default/apps/admin/src/components/shared/long-text.tsx +78 -0
- package/templates/default/apps/admin/src/components/shared/search-input.tsx +16 -0
- package/templates/default/apps/admin/src/components/shared/select-dropdown.tsx +64 -0
- package/templates/default/apps/admin/src/data/apps.tsx +116 -0
- package/templates/default/apps/admin/src/data/chats.ts +114 -0
- package/templates/default/apps/admin/src/data/tasks.ts +114 -0
- package/templates/default/apps/admin/src/data/users.ts +90 -0
- package/templates/default/apps/admin/src/hooks/use-dialog-state.ts +17 -0
- package/templates/default/apps/admin/src/hooks/use-table-url-state.ts +243 -0
- package/templates/default/apps/admin/src/lib/show-submitted-data.tsx +12 -0
- package/templates/default/apps/admin/src/types/table.d.ts +9 -0
- package/templates/default/apps/admin/tsconfig.json +32 -0
- package/templates/default/apps/web/next.config.ts +1 -0
- package/templates/default/apps/web/package.json +0 -22
- package/templates/default/apps/web/postcss.config.cjs +0 -1
- package/templates/default/apps/web/src/app/(authenticated)/dashboard/page.tsx +4 -20
- package/templates/default/apps/web/src/app/(authenticated)/data/_components/UserTable.tsx +4 -4
- package/templates/default/apps/web/src/app/(authenticated)/data/page.tsx +1 -1
- package/templates/default/apps/web/src/app/(authenticated)/profile/page.tsx +1 -1
- package/templates/default/apps/web/src/app/error.tsx +8 -70
- package/templates/default/apps/web/src/app/global-error.tsx +8 -70
- package/templates/default/apps/web/src/app/globals.css +20 -0
- package/templates/default/apps/web/src/app/not-found.tsx +5 -39
- package/templates/default/apps/web/src/app/page.tsx +27 -203
- package/templates/default/apps/web/src/app/signin/page.tsx +27 -191
- package/templates/default/apps/web/src/app/signup/page.tsx +33 -240
- package/templates/default/apps/web/src/components/dashboard/dashboard-stats.tsx +11 -75
- package/templates/default/apps/web/src/components/shared/Sidebar.tsx +3 -3
- package/templates/default/apps/web/src/components/shared/header.tsx +17 -112
- package/templates/default/apps/web/tsconfig.json +0 -6
- package/templates/default/biome.json +1 -2
- package/templates/default/components.json +2 -2
- package/templates/default/docker-compose.yml +1 -1
- package/templates/default/gitignore +4 -0
- package/templates/default/package.json +1 -0
- package/templates/default/packages/admin-ui/catalog/catalog.css +54 -0
- package/templates/default/packages/admin-ui/catalog/catalog.tsx +401 -0
- package/templates/default/packages/admin-ui/catalog/index.html +12 -0
- package/templates/default/packages/admin-ui/catalog/main.tsx +9 -0
- package/templates/default/packages/admin-ui/components.json +21 -0
- package/templates/default/packages/admin-ui/package.json +105 -0
- package/templates/default/packages/admin-ui/src/command-menu/index.tsx +174 -0
- package/templates/default/packages/admin-ui/src/data-table/bulk-actions.tsx +215 -0
- package/templates/default/packages/admin-ui/src/data-table/column-header.tsx +73 -0
- package/templates/default/packages/admin-ui/src/data-table/data-table.tsx +127 -0
- package/templates/default/packages/admin-ui/src/data-table/faceted-filter.tsx +148 -0
- package/templates/default/packages/admin-ui/src/data-table/index.tsx +9 -0
- package/templates/default/packages/admin-ui/src/data-table/pagination.tsx +101 -0
- package/templates/default/packages/admin-ui/src/data-table/toolbar.tsx +87 -0
- package/templates/default/packages/admin-ui/src/data-table/view-options.tsx +57 -0
- package/templates/default/packages/admin-ui/src/hooks/use-mobile.tsx +23 -0
- package/templates/default/packages/admin-ui/src/layout/header.tsx +55 -0
- package/templates/default/packages/admin-ui/src/layout/index.ts +10 -0
- package/templates/default/packages/admin-ui/src/layout/main.tsx +23 -0
- package/templates/default/packages/admin-ui/src/layout/nav-group.tsx +111 -0
- package/templates/default/packages/admin-ui/src/layout/nav-user.tsx +114 -0
- package/templates/default/packages/admin-ui/src/layout/theme-switch.tsx +40 -0
- package/templates/default/packages/admin-ui/src/layout/types.ts +21 -0
- package/templates/default/packages/admin-ui/src/lib/utils.ts +6 -0
- package/templates/default/packages/admin-ui/src/styles/base.css +65 -0
- package/templates/default/packages/admin-ui/src/styles/tokens.css +91 -0
- package/templates/default/packages/admin-ui/src/tanstack-table.d.ts +10 -0
- package/templates/default/packages/admin-ui/src/ui/alert-dialog.tsx +157 -0
- package/templates/default/packages/admin-ui/src/ui/alert.tsx +66 -0
- package/templates/default/packages/admin-ui/src/ui/avatar.tsx +53 -0
- package/templates/default/packages/admin-ui/src/ui/badge.tsx +46 -0
- package/templates/default/packages/admin-ui/src/ui/breadcrumb.tsx +108 -0
- package/templates/default/packages/admin-ui/src/ui/button.tsx +59 -0
- package/templates/default/packages/admin-ui/src/ui/calendar.tsx +69 -0
- package/templates/default/packages/admin-ui/src/ui/card.tsx +92 -0
- package/templates/default/packages/admin-ui/src/ui/chart.tsx +345 -0
- package/templates/default/packages/admin-ui/src/ui/checkbox.tsx +32 -0
- package/templates/default/packages/admin-ui/src/ui/collapsible.tsx +27 -0
- package/templates/default/packages/admin-ui/src/ui/command.tsx +161 -0
- package/templates/default/packages/admin-ui/src/ui/confirm-dialog.tsx +72 -0
- package/templates/default/packages/admin-ui/src/ui/date-picker.tsx +53 -0
- package/templates/default/packages/admin-ui/src/ui/dialog.tsx +143 -0
- package/templates/default/packages/admin-ui/src/ui/dropdown-menu.tsx +257 -0
- package/templates/default/packages/admin-ui/src/ui/form.tsx +168 -0
- package/templates/default/packages/admin-ui/src/ui/input-otp.tsx +84 -0
- package/templates/default/packages/admin-ui/src/ui/input.tsx +21 -0
- package/templates/default/packages/admin-ui/src/ui/label.tsx +24 -0
- package/templates/default/packages/admin-ui/src/ui/pagination.tsx +126 -0
- package/templates/default/packages/admin-ui/src/ui/password-input.tsx +46 -0
- package/templates/default/packages/admin-ui/src/ui/popover.tsx +48 -0
- package/templates/default/packages/admin-ui/src/ui/progress.tsx +31 -0
- package/templates/default/packages/admin-ui/src/ui/radio-group.tsx +45 -0
- package/templates/default/packages/admin-ui/src/ui/scroll-area.tsx +52 -0
- package/templates/default/packages/admin-ui/src/ui/select.tsx +185 -0
- package/templates/default/packages/admin-ui/src/ui/separator.tsx +28 -0
- package/templates/default/packages/admin-ui/src/ui/sheet.tsx +149 -0
- package/templates/default/packages/admin-ui/src/ui/sidebar.tsx +728 -0
- package/templates/default/packages/admin-ui/src/ui/skeleton.tsx +13 -0
- package/templates/default/packages/admin-ui/src/ui/sonner.tsx +25 -0
- package/templates/default/packages/admin-ui/src/ui/switch.tsx +31 -0
- package/templates/default/packages/admin-ui/src/ui/table.tsx +116 -0
- package/templates/default/packages/admin-ui/src/ui/tabs.tsx +66 -0
- package/templates/default/packages/admin-ui/src/ui/textarea.tsx +18 -0
- package/templates/default/packages/admin-ui/src/ui/toggle-group.tsx +60 -0
- package/templates/default/packages/admin-ui/src/ui/toggle.tsx +44 -0
- package/templates/default/packages/admin-ui/src/ui/tooltip.tsx +61 -0
- package/templates/default/packages/admin-ui/tsconfig.json +8 -0
- package/templates/default/packages/admin-ui/vite.config.ts +11 -0
- package/templates/default/packages/config/package.json +0 -2
- package/templates/default/packages/server-core/package.json +1 -0
- package/templates/default/packages/ui/components.json +21 -0
- package/templates/default/packages/ui/package.json +42 -5
- package/templates/default/packages/ui/src/accordion.tsx +1 -1
- package/templates/default/packages/ui/src/alert-dialog.tsx +4 -4
- package/templates/default/packages/ui/src/alert.tsx +1 -1
- package/templates/default/packages/ui/src/avatar.tsx +1 -1
- package/templates/default/packages/ui/src/badge.tsx +1 -1
- package/templates/default/packages/ui/src/breadcrumb.tsx +1 -1
- package/templates/default/packages/ui/src/button.tsx +1 -1
- package/templates/default/packages/ui/src/card.tsx +1 -1
- package/templates/default/packages/ui/src/checkbox.tsx +1 -1
- package/templates/default/packages/ui/src/dialog.tsx +3 -3
- package/templates/default/packages/ui/src/drawer.tsx +3 -3
- package/templates/default/packages/ui/src/dropdown-menu.tsx +3 -3
- package/templates/default/packages/ui/src/form.tsx +2 -2
- package/templates/default/packages/ui/src/hover-card.tsx +2 -2
- package/templates/default/packages/ui/src/input.tsx +1 -1
- package/templates/default/packages/ui/src/label.tsx +1 -1
- package/templates/default/packages/ui/src/pagination.tsx +2 -2
- package/templates/default/packages/ui/src/popover.tsx +2 -2
- package/templates/default/packages/ui/src/progress.tsx +1 -1
- package/templates/default/packages/ui/src/select.tsx +2 -2
- package/templates/default/packages/ui/src/separator.tsx +1 -1
- package/templates/default/packages/ui/src/skeleton.tsx +1 -1
- package/templates/default/packages/ui/src/table.tsx +1 -1
- package/templates/default/packages/ui/src/tabs.tsx +1 -1
- package/templates/default/packages/ui/src/textarea.tsx +1 -1
- package/templates/default/packages/ui/src/tooltip.tsx +3 -3
- package/templates/default/packages/ui/src/typography.tsx +1 -1
- package/templates/default/packages/ui/tsconfig.json +1 -6
- package/templates/default/pnpm-lock.yaml +1319 -936
- package/templates/default/postcss.config.cjs +0 -1
- package/templates/default/turbo.json +11 -5
- package/templates/default/worktree.config.json +5 -0
- package/templates/default/.env.ci +0 -32
- package/templates/default/.github/workflows/ci.yml +0 -96
- package/templates/default/.github/workflows/preview-db.yml +0 -134
- package/templates/default/.playwright-mcp/dashboard.png +0 -0
- package/templates/default/.playwright-mcp/web-home.png +0 -0
- package/templates/default/apps/web/panda.config.ts +0 -114
- package/templates/default/apps/web/src/components/ui/accordion.tsx +0 -64
- package/templates/default/apps/web/src/components/ui/alert-dialog.tsx +0 -135
- package/templates/default/apps/web/src/components/ui/alert.tsx +0 -60
- package/templates/default/apps/web/src/components/ui/aspect-ratio.tsx +0 -9
- package/templates/default/apps/web/src/components/ui/avatar.tsx +0 -41
- package/templates/default/apps/web/src/components/ui/badge.tsx +0 -39
- package/templates/default/apps/web/src/components/ui/breadcrumb.tsx +0 -101
- package/templates/default/apps/web/src/components/ui/button.tsx +0 -56
- package/templates/default/apps/web/src/components/ui/card.tsx +0 -75
- package/templates/default/apps/web/src/components/ui/checkbox.tsx +0 -29
- package/templates/default/apps/web/src/components/ui/data-table.tsx +0 -189
- package/templates/default/apps/web/src/components/ui/dialog-hook.tsx +0 -210
- package/templates/default/apps/web/src/components/ui/dialog.tsx +0 -129
- package/templates/default/apps/web/src/components/ui/drawer.tsx +0 -124
- package/templates/default/apps/web/src/components/ui/dropdown-menu.tsx +0 -228
- package/templates/default/apps/web/src/components/ui/form.tsx +0 -152
- package/templates/default/apps/web/src/components/ui/hover-card.tsx +0 -38
- package/templates/default/apps/web/src/components/ui/input.tsx +0 -21
- package/templates/default/apps/web/src/components/ui/label.tsx +0 -21
- package/templates/default/apps/web/src/components/ui/pagination.tsx +0 -105
- package/templates/default/apps/web/src/components/ui/popover.tsx +0 -42
- package/templates/default/apps/web/src/components/ui/progress.tsx +0 -28
- package/templates/default/apps/web/src/components/ui/select.tsx +0 -170
- package/templates/default/apps/web/src/components/ui/separator.tsx +0 -28
- package/templates/default/apps/web/src/components/ui/skeleton.tsx +0 -13
- package/templates/default/apps/web/src/components/ui/sonner.tsx +0 -25
- package/templates/default/apps/web/src/components/ui/table.tsx +0 -92
- package/templates/default/apps/web/src/components/ui/tabs.tsx +0 -54
- package/templates/default/apps/web/src/components/ui/textarea.tsx +0 -18
- package/templates/default/apps/web/src/components/ui/tooltip.tsx +0 -57
- package/templates/default/apps/web/src/components/ui/typography.tsx +0 -158
- package/templates/default/packages/config/panda.config.ts +0 -114
- package/templates/default/panda.config.ts +0 -114
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import {
|
|
7
|
-
Controller,
|
|
8
|
-
type ControllerProps,
|
|
9
|
-
type FieldPath,
|
|
10
|
-
type FieldValues,
|
|
11
|
-
FormProvider,
|
|
12
|
-
useFormContext,
|
|
13
|
-
useFormState,
|
|
14
|
-
} from "react-hook-form";
|
|
15
|
-
|
|
16
|
-
import { Label } from "@/components/ui/label";
|
|
17
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
18
|
-
|
|
19
|
-
const Form = FormProvider;
|
|
20
|
-
|
|
21
|
-
type FormFieldContextValue<
|
|
22
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
23
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
24
|
-
> = {
|
|
25
|
-
name: TName;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);
|
|
29
|
-
|
|
30
|
-
const FormField = <
|
|
31
|
-
TFieldValues extends FieldValues = FieldValues,
|
|
32
|
-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
33
|
-
>({
|
|
34
|
-
...props
|
|
35
|
-
}: ControllerProps<TFieldValues, TName>) => {
|
|
36
|
-
return (
|
|
37
|
-
<FormFieldContext.Provider value={{ name: props.name }}>
|
|
38
|
-
<Controller {...props} />
|
|
39
|
-
</FormFieldContext.Provider>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const useFormField = () => {
|
|
44
|
-
const fieldContext = React.useContext(FormFieldContext);
|
|
45
|
-
const itemContext = React.useContext(FormItemContext);
|
|
46
|
-
const { getFieldState } = useFormContext();
|
|
47
|
-
const formState = useFormState({ name: fieldContext.name });
|
|
48
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
49
|
-
|
|
50
|
-
if (!fieldContext) {
|
|
51
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const { id } = itemContext;
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
id,
|
|
58
|
-
name: fieldContext.name,
|
|
59
|
-
formItemId: `${id}-form-item`,
|
|
60
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
61
|
-
formMessageId: `${id}-form-item-message`,
|
|
62
|
-
...fieldState,
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
type FormItemContextValue = {
|
|
67
|
-
id: string;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);
|
|
71
|
-
|
|
72
|
-
function FormItem({ className, ...props }: React.ComponentProps<"div">) {
|
|
73
|
-
const id = React.useId();
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<FormItemContext.Provider value={{ id }}>
|
|
77
|
-
<div data-slot="form-item" className={cn("grid gap-2", className)} {...props} />
|
|
78
|
-
</FormItemContext.Provider>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
83
|
-
const { error, formItemId } = useFormField();
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<Label
|
|
87
|
-
data-slot="form-label"
|
|
88
|
-
data-error={!!error}
|
|
89
|
-
className={cn("data-[error=true]:text-destructive", className)}
|
|
90
|
-
htmlFor={formItemId}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
|
|
97
|
-
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
98
|
-
|
|
99
|
-
return (
|
|
100
|
-
<Slot
|
|
101
|
-
data-slot="form-control"
|
|
102
|
-
id={formItemId}
|
|
103
|
-
aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}
|
|
104
|
-
aria-invalid={!!error}
|
|
105
|
-
{...props}
|
|
106
|
-
/>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function FormDescription({ className, ...props }: React.ComponentProps<"p">) {
|
|
111
|
-
const { formDescriptionId } = useFormField();
|
|
112
|
-
|
|
113
|
-
return (
|
|
114
|
-
<p
|
|
115
|
-
data-slot="form-description"
|
|
116
|
-
id={formDescriptionId}
|
|
117
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
118
|
-
{...props}
|
|
119
|
-
/>
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function FormMessage({ className, ...props }: React.ComponentProps<"p">) {
|
|
124
|
-
const { error, formMessageId } = useFormField();
|
|
125
|
-
const body = error ? String(error?.message ?? "") : props.children;
|
|
126
|
-
|
|
127
|
-
if (!body) {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return (
|
|
132
|
-
<p
|
|
133
|
-
data-slot="form-message"
|
|
134
|
-
id={formMessageId}
|
|
135
|
-
className={cn("text-destructive text-sm", className)}
|
|
136
|
-
{...props}
|
|
137
|
-
>
|
|
138
|
-
{body}
|
|
139
|
-
</p>
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export {
|
|
144
|
-
useFormField,
|
|
145
|
-
Form,
|
|
146
|
-
FormItem,
|
|
147
|
-
FormLabel,
|
|
148
|
-
FormControl,
|
|
149
|
-
FormDescription,
|
|
150
|
-
FormMessage,
|
|
151
|
-
FormField,
|
|
152
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
4
|
-
import type * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
7
|
-
|
|
8
|
-
function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {
|
|
9
|
-
return <HoverCardPrimitive.Root data-slot="hover-card" {...props} />;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {
|
|
13
|
-
return <HoverCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function HoverCardContent({
|
|
17
|
-
className,
|
|
18
|
-
align = "center",
|
|
19
|
-
sideOffset = 4,
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {
|
|
22
|
-
return (
|
|
23
|
-
<HoverCardPrimitive.Portal data-slot="hover-card-portal">
|
|
24
|
-
<HoverCardPrimitive.Content
|
|
25
|
-
data-slot="hover-card-content"
|
|
26
|
-
align={align}
|
|
27
|
-
sideOffset={sideOffset}
|
|
28
|
-
className={cn(
|
|
29
|
-
"bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
30
|
-
className
|
|
31
|
-
)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
</HoverCardPrimitive.Portal>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
4
|
-
|
|
5
|
-
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
6
|
-
return (
|
|
7
|
-
<input
|
|
8
|
-
type={type}
|
|
9
|
-
data-slot="input"
|
|
10
|
-
className={cn(
|
|
11
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
13
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { Input };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
-
import type * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
7
|
-
|
|
8
|
-
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
9
|
-
return (
|
|
10
|
-
<LabelPrimitive.Root
|
|
11
|
-
data-slot="label"
|
|
12
|
-
className={cn(
|
|
13
|
-
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
14
|
-
className
|
|
15
|
-
)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { Label };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
2
|
-
import type * as React from "react";
|
|
3
|
-
|
|
4
|
-
import { type Button, buttonVariants } from "@/components/ui/button";
|
|
5
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
6
|
-
|
|
7
|
-
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
8
|
-
return (
|
|
9
|
-
<nav
|
|
10
|
-
aria-label="pagination"
|
|
11
|
-
data-slot="pagination"
|
|
12
|
-
className={cn("mx-auto flex w-full justify-center", className)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function PaginationContent({ className, ...props }: React.ComponentProps<"ul">) {
|
|
19
|
-
return (
|
|
20
|
-
<ul
|
|
21
|
-
data-slot="pagination-content"
|
|
22
|
-
className={cn("flex flex-row items-center gap-1", className)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function PaginationItem({ ...props }: React.ComponentProps<"li">) {
|
|
29
|
-
return <li data-slot="pagination-item" {...props} />;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
type PaginationLinkProps = {
|
|
33
|
-
isActive?: boolean;
|
|
34
|
-
} & Pick<React.ComponentProps<typeof Button>, "size"> &
|
|
35
|
-
React.ComponentProps<"a">;
|
|
36
|
-
|
|
37
|
-
function PaginationLink({ className, isActive, size = "icon", ...props }: PaginationLinkProps) {
|
|
38
|
-
return (
|
|
39
|
-
<a
|
|
40
|
-
aria-current={isActive ? "page" : undefined}
|
|
41
|
-
data-slot="pagination-link"
|
|
42
|
-
data-active={isActive}
|
|
43
|
-
className={cn(
|
|
44
|
-
buttonVariants({
|
|
45
|
-
variant: isActive ? "outline" : "ghost",
|
|
46
|
-
size,
|
|
47
|
-
}),
|
|
48
|
-
className
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {
|
|
56
|
-
return (
|
|
57
|
-
<PaginationLink
|
|
58
|
-
aria-label="Go to previous page"
|
|
59
|
-
size="default"
|
|
60
|
-
className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
|
|
61
|
-
{...props}
|
|
62
|
-
>
|
|
63
|
-
<ChevronLeftIcon />
|
|
64
|
-
<span className="hidden sm:block">Previous</span>
|
|
65
|
-
</PaginationLink>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {
|
|
70
|
-
return (
|
|
71
|
-
<PaginationLink
|
|
72
|
-
aria-label="Go to next page"
|
|
73
|
-
size="default"
|
|
74
|
-
className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
|
|
75
|
-
{...props}
|
|
76
|
-
>
|
|
77
|
-
<span className="hidden sm:block">Next</span>
|
|
78
|
-
<ChevronRightIcon />
|
|
79
|
-
</PaginationLink>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">) {
|
|
84
|
-
return (
|
|
85
|
-
<span
|
|
86
|
-
aria-hidden
|
|
87
|
-
data-slot="pagination-ellipsis"
|
|
88
|
-
className={cn("flex size-9 items-center justify-center", className)}
|
|
89
|
-
{...props}
|
|
90
|
-
>
|
|
91
|
-
<MoreHorizontalIcon className="size-4" />
|
|
92
|
-
<span className="sr-only">More pages</span>
|
|
93
|
-
</span>
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
Pagination,
|
|
99
|
-
PaginationContent,
|
|
100
|
-
PaginationLink,
|
|
101
|
-
PaginationItem,
|
|
102
|
-
PaginationPrevious,
|
|
103
|
-
PaginationNext,
|
|
104
|
-
PaginationEllipsis,
|
|
105
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
-
import type * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
7
|
-
|
|
8
|
-
function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
9
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
13
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function PopoverContent({
|
|
17
|
-
className,
|
|
18
|
-
align = "center",
|
|
19
|
-
sideOffset = 4,
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
22
|
-
return (
|
|
23
|
-
<PopoverPrimitive.Portal>
|
|
24
|
-
<PopoverPrimitive.Content
|
|
25
|
-
data-slot="popover-content"
|
|
26
|
-
align={align}
|
|
27
|
-
sideOffset={sideOffset}
|
|
28
|
-
className={cn(
|
|
29
|
-
"bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
30
|
-
className
|
|
31
|
-
)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
</PopoverPrimitive.Portal>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
39
|
-
return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4
|
-
import type * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
7
|
-
|
|
8
|
-
function Progress({
|
|
9
|
-
className,
|
|
10
|
-
value,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
|
13
|
-
return (
|
|
14
|
-
<ProgressPrimitive.Root
|
|
15
|
-
data-slot="progress"
|
|
16
|
-
className={cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className)}
|
|
17
|
-
{...props}
|
|
18
|
-
>
|
|
19
|
-
<ProgressPrimitive.Indicator
|
|
20
|
-
data-slot="progress-indicator"
|
|
21
|
-
className="bg-primary h-full w-full flex-1 transition-all"
|
|
22
|
-
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
23
|
-
/>
|
|
24
|
-
</ProgressPrimitive.Root>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { Progress };
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
|
-
import type * as React from "react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
8
|
-
|
|
9
|
-
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
10
|
-
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
14
|
-
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
18
|
-
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function SelectTrigger({
|
|
22
|
-
className,
|
|
23
|
-
size = "default",
|
|
24
|
-
children,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
27
|
-
size?: "sm" | "default";
|
|
28
|
-
}) {
|
|
29
|
-
return (
|
|
30
|
-
<SelectPrimitive.Trigger
|
|
31
|
-
data-slot="select-trigger"
|
|
32
|
-
data-size={size}
|
|
33
|
-
className={cn(
|
|
34
|
-
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
35
|
-
className
|
|
36
|
-
)}
|
|
37
|
-
{...props}
|
|
38
|
-
>
|
|
39
|
-
{children}
|
|
40
|
-
<SelectPrimitive.Icon asChild>
|
|
41
|
-
<ChevronDownIcon className="size-4 opacity-50" />
|
|
42
|
-
</SelectPrimitive.Icon>
|
|
43
|
-
</SelectPrimitive.Trigger>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function SelectContent({
|
|
48
|
-
className,
|
|
49
|
-
children,
|
|
50
|
-
position = "popper",
|
|
51
|
-
...props
|
|
52
|
-
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
53
|
-
return (
|
|
54
|
-
<SelectPrimitive.Portal>
|
|
55
|
-
<SelectPrimitive.Content
|
|
56
|
-
data-slot="select-content"
|
|
57
|
-
className={cn(
|
|
58
|
-
"bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
59
|
-
position === "popper" &&
|
|
60
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
61
|
-
className
|
|
62
|
-
)}
|
|
63
|
-
position={position}
|
|
64
|
-
{...props}
|
|
65
|
-
>
|
|
66
|
-
<SelectScrollUpButton />
|
|
67
|
-
<SelectPrimitive.Viewport
|
|
68
|
-
className={cn(
|
|
69
|
-
"p-1",
|
|
70
|
-
position === "popper" &&
|
|
71
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
72
|
-
)}
|
|
73
|
-
>
|
|
74
|
-
{children}
|
|
75
|
-
</SelectPrimitive.Viewport>
|
|
76
|
-
<SelectScrollDownButton />
|
|
77
|
-
</SelectPrimitive.Content>
|
|
78
|
-
</SelectPrimitive.Portal>
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
83
|
-
return (
|
|
84
|
-
<SelectPrimitive.Label
|
|
85
|
-
data-slot="select-label"
|
|
86
|
-
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
87
|
-
{...props}
|
|
88
|
-
/>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function SelectItem({
|
|
93
|
-
className,
|
|
94
|
-
children,
|
|
95
|
-
...props
|
|
96
|
-
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
97
|
-
return (
|
|
98
|
-
<SelectPrimitive.Item
|
|
99
|
-
data-slot="select-item"
|
|
100
|
-
className={cn(
|
|
101
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
102
|
-
className
|
|
103
|
-
)}
|
|
104
|
-
{...props}
|
|
105
|
-
>
|
|
106
|
-
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
107
|
-
<SelectPrimitive.ItemIndicator>
|
|
108
|
-
<CheckIcon className="size-4" />
|
|
109
|
-
</SelectPrimitive.ItemIndicator>
|
|
110
|
-
</span>
|
|
111
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
112
|
-
</SelectPrimitive.Item>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function SelectSeparator({
|
|
117
|
-
className,
|
|
118
|
-
...props
|
|
119
|
-
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
120
|
-
return (
|
|
121
|
-
<SelectPrimitive.Separator
|
|
122
|
-
data-slot="select-separator"
|
|
123
|
-
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
|
|
124
|
-
{...props}
|
|
125
|
-
/>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function SelectScrollUpButton({
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
133
|
-
return (
|
|
134
|
-
<SelectPrimitive.ScrollUpButton
|
|
135
|
-
data-slot="select-scroll-up-button"
|
|
136
|
-
className={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
137
|
-
{...props}
|
|
138
|
-
>
|
|
139
|
-
<ChevronUpIcon className="size-4" />
|
|
140
|
-
</SelectPrimitive.ScrollUpButton>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function SelectScrollDownButton({
|
|
145
|
-
className,
|
|
146
|
-
...props
|
|
147
|
-
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
148
|
-
return (
|
|
149
|
-
<SelectPrimitive.ScrollDownButton
|
|
150
|
-
data-slot="select-scroll-down-button"
|
|
151
|
-
className={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
152
|
-
{...props}
|
|
153
|
-
>
|
|
154
|
-
<ChevronDownIcon className="size-4" />
|
|
155
|
-
</SelectPrimitive.ScrollDownButton>
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export {
|
|
160
|
-
Select,
|
|
161
|
-
SelectContent,
|
|
162
|
-
SelectGroup,
|
|
163
|
-
SelectItem,
|
|
164
|
-
SelectLabel,
|
|
165
|
-
SelectScrollDownButton,
|
|
166
|
-
SelectScrollUpButton,
|
|
167
|
-
SelectSeparator,
|
|
168
|
-
SelectTrigger,
|
|
169
|
-
SelectValue,
|
|
170
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
|
-
import type * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
7
|
-
|
|
8
|
-
function Separator({
|
|
9
|
-
className,
|
|
10
|
-
orientation = "horizontal",
|
|
11
|
-
decorative = true,
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
14
|
-
return (
|
|
15
|
-
<SeparatorPrimitive.Root
|
|
16
|
-
data-slot="separator"
|
|
17
|
-
decorative={decorative}
|
|
18
|
-
orientation={orientation}
|
|
19
|
-
className={cn(
|
|
20
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { Separator };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { cn } from "{{packageName}}/ui/utils";
|
|
2
|
-
|
|
3
|
-
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
data-slot="skeleton"
|
|
7
|
-
className={cn("bg-accent animate-pulse rounded-md", className)}
|
|
8
|
-
{...props}
|
|
9
|
-
/>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Skeleton };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useTheme } from "next-themes";
|
|
4
|
-
import { Toaster as Sonner, type ToasterProps } from "sonner";
|
|
5
|
-
|
|
6
|
-
const Toaster = ({ ...props }: ToasterProps) => {
|
|
7
|
-
const { theme = "system" } = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<Sonner
|
|
11
|
-
theme={theme as ToasterProps["theme"]}
|
|
12
|
-
className="toaster group"
|
|
13
|
-
style={
|
|
14
|
-
{
|
|
15
|
-
"--normal-bg": "var(--popover)",
|
|
16
|
-
"--normal-text": "var(--popover-foreground)",
|
|
17
|
-
"--normal-border": "var(--border)",
|
|
18
|
-
} as React.CSSProperties
|
|
19
|
-
}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { Toaster };
|