create-ej-app 6.0.0 → 8.0.0
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/cli.js +88 -14
- package/cli.ts +100 -17
- package/package.json +2 -2
- package/template/base/.env.example +11 -15
- package/template/base/Dockerfile +15 -0
- package/template/base/components.json +10 -5
- package/template/base/drizzle.config.ts +4 -5
- package/template/{new → base}/eslint.config.mjs +6 -1
- package/template/base/package.json +58 -75
- package/template/base/postcss.config.mjs +1 -4
- package/template/base/src/app/(admin)/layout.tsx +20 -0
- package/template/base/src/app/(app)/layout.tsx +13 -118
- package/template/base/src/app/(auth)/login/page.tsx +65 -42
- package/template/base/src/app/(marketing)/layout.tsx +7 -35
- package/template/base/src/app/(marketing)/page.tsx +2 -96
- package/template/base/src/app/(marketing)/privacy/page.tsx +3 -0
- package/template/base/src/app/(marketing)/terms/page.tsx +3 -0
- package/template/base/src/app/globals.css +118 -66
- package/template/base/src/app/layout.tsx +27 -12
- package/template/base/src/app/not-found.tsx +27 -0
- package/template/base/src/components/site-footer.tsx +16 -24
- package/template/base/src/components/ui/button.tsx +31 -27
- package/template/base/src/components/ui/card.tsx +83 -70
- package/template/base/src/components/ui/form.tsx +38 -47
- package/template/base/src/components/ui/input.tsx +16 -20
- package/template/base/src/components/ui/label.tsx +16 -18
- package/template/base/src/components/ui/separator.tsx +11 -14
- package/template/base/src/components/ui/sonner.tsx +22 -13
- package/template/base/src/db/index.ts +4 -11
- package/template/base/src/db/schema.ts +60 -268
- package/template/{new → base}/src/env.ts +2 -2
- package/template/{new → base}/src/lib/auth-client.ts +2 -0
- package/template/base/src/lib/auth.ts +64 -80
- package/template/base/src/lib/safe-action.ts +30 -6
- package/template/base/tsconfig.json +9 -7
- package/template/{prisma-advanced → old}/.env.example +10 -9
- package/template/{prisma → old}/components.json +1 -1
- package/template/old/drizzle.config.ts +11 -0
- package/template/old/package.json +87 -0
- package/template/old/postcss.config.mjs +8 -0
- package/template/{prisma-advanced → old}/src/app/(app)/layout.tsx +11 -3
- package/template/{prisma-advanced → old}/src/app/(auth)/login/page.tsx +2 -2
- package/template/{prisma → old}/src/app/(marketing)/page.tsx +8 -7
- package/template/old/src/app/layout.tsx +31 -0
- package/template/old/src/components/ui/sonner.tsx +31 -0
- package/template/old/src/db/index.ts +14 -0
- package/template/old/src/db/schema.ts +287 -0
- package/template/old/src/lib/auth.ts +89 -0
- package/template/old/src/lib/safe-action.ts +19 -0
- package/template/{prisma-advanced → old}/tsconfig.json +3 -2
- package/template/new/.env.example +0 -13
- package/template/new/components.json +0 -22
- package/template/new/drizzle.config.ts +0 -10
- package/template/new/package.json +0 -81
- package/template/new/postcss.config.mjs +0 -5
- package/template/new/src/app/(auth)/login/page.tsx +0 -72
- package/template/new/src/app/globals.css +0 -128
- package/template/new/src/app/layout.tsx +0 -50
- package/template/new/src/app/page.tsx +0 -3
- package/template/new/src/components/ui/button.tsx +0 -60
- package/template/new/src/components/ui/card.tsx +0 -92
- package/template/new/src/components/ui/form.tsx +0 -167
- package/template/new/src/components/ui/input.tsx +0 -21
- package/template/new/src/components/ui/label.tsx +0 -24
- package/template/new/src/components/ui/separator.tsx +0 -28
- package/template/new/src/components/ui/sonner.tsx +0 -40
- package/template/new/src/db/index.ts +0 -7
- package/template/new/src/db/schema.ts +0 -74
- package/template/new/src/lib/auth.ts +0 -67
- package/template/new/src/lib/safe-action.ts +0 -15
- package/template/new/tsconfig.json +0 -49
- package/template/prisma/.env.example +0 -16
- package/template/prisma/.eslintrc.cjs +0 -24
- package/template/prisma/next.config.mjs +0 -15
- package/template/prisma/package.json +0 -80
- package/template/prisma/postcss.config.cjs +0 -6
- package/template/prisma/prettier.config.ts +0 -11
- package/template/prisma/prisma/schema.prisma +0 -115
- package/template/prisma/public/next.svg +0 -1
- package/template/prisma/src/app/(app)/dashboard/page.tsx +0 -19
- package/template/prisma/src/app/(app)/layout.tsx +0 -90
- package/template/prisma/src/app/(app)/settings/actions.ts +0 -18
- package/template/prisma/src/app/(app)/settings/loading.tsx +0 -28
- package/template/prisma/src/app/(app)/settings/page.tsx +0 -28
- package/template/prisma/src/app/(app)/settings/render.tsx +0 -113
- package/template/prisma/src/app/(app)/tasks/[id]/actions.ts +0 -147
- package/template/prisma/src/app/(app)/tasks/[id]/page.tsx +0 -25
- package/template/prisma/src/app/(app)/tasks/[id]/render.tsx +0 -413
- package/template/prisma/src/app/(app)/tasks/actions.ts +0 -69
- package/template/prisma/src/app/(app)/tasks/page.tsx +0 -53
- package/template/prisma/src/app/(app)/tasks/render.tsx +0 -107
- package/template/prisma/src/app/(app)/users/[id]/actions.ts +0 -83
- package/template/prisma/src/app/(app)/users/[id]/page.tsx +0 -32
- package/template/prisma/src/app/(app)/users/[id]/render.tsx +0 -240
- package/template/prisma/src/app/(app)/users/actions.ts +0 -55
- package/template/prisma/src/app/(app)/users/page.tsx +0 -49
- package/template/prisma/src/app/(app)/users/render.tsx +0 -80
- package/template/prisma/src/app/(auth)/layout.tsx +0 -20
- package/template/prisma/src/app/(auth)/login/page.tsx +0 -49
- package/template/prisma/src/app/(auth)/login/user-auth-form.tsx +0 -152
- package/template/prisma/src/app/api/auth/[...nextauth]/route.ts +0 -7
- package/template/prisma/src/app/api/upload/route.ts +0 -36
- package/template/prisma/src/app/favicon.ico +0 -0
- package/template/prisma/src/app/layout.tsx +0 -34
- package/template/prisma/src/components/app-nav-command.tsx +0 -160
- package/template/prisma/src/components/dark-mode-toggle.tsx +0 -43
- package/template/prisma/src/components/data-table/data-table-column-header.tsx +0 -91
- package/template/prisma/src/components/data-table/data-table-faceted-filter.tsx +0 -149
- package/template/prisma/src/components/data-table/data-table-loading.tsx +0 -77
- package/template/prisma/src/components/data-table/data-table-pagination.tsx +0 -94
- package/template/prisma/src/components/data-table/data-table-toolbar.tsx +0 -78
- package/template/prisma/src/components/data-table/data-table-types.ts +0 -17
- package/template/prisma/src/components/data-table/data-table-view-options.tsx +0 -59
- package/template/prisma/src/components/data-table/data-table.tsx +0 -301
- package/template/prisma/src/components/data-table/simple-data-table.tsx +0 -109
- package/template/prisma/src/components/empty-placeholder.tsx +0 -78
- package/template/prisma/src/components/heading.tsx +0 -17
- package/template/prisma/src/components/icons.tsx +0 -85
- package/template/prisma/src/components/main-nav.tsx +0 -64
- package/template/prisma/src/components/mobile-nav.tsx +0 -50
- package/template/prisma/src/components/shell.tsx +0 -13
- package/template/prisma/src/components/side-nav.tsx +0 -51
- package/template/prisma/src/components/site-footer.tsx +0 -31
- package/template/prisma/src/components/system-info.tsx +0 -36
- package/template/prisma/src/components/theme-provider.tsx +0 -13
- package/template/prisma/src/components/ui/alert-dialog.tsx +0 -141
- package/template/prisma/src/components/ui/avatar.tsx +0 -50
- package/template/prisma/src/components/ui/badge.tsx +0 -36
- package/template/prisma/src/components/ui/button.tsx +0 -56
- package/template/prisma/src/components/ui/card.tsx +0 -79
- package/template/prisma/src/components/ui/checkbox.tsx +0 -30
- package/template/prisma/src/components/ui/command.tsx +0 -155
- package/template/prisma/src/components/ui/dialog.tsx +0 -122
- package/template/prisma/src/components/ui/dropdown-menu.tsx +0 -200
- package/template/prisma/src/components/ui/form.tsx +0 -176
- package/template/prisma/src/components/ui/input.tsx +0 -25
- package/template/prisma/src/components/ui/label.tsx +0 -26
- package/template/prisma/src/components/ui/popover.tsx +0 -31
- package/template/prisma/src/components/ui/select.tsx +0 -160
- package/template/prisma/src/components/ui/separator.tsx +0 -31
- package/template/prisma/src/components/ui/skeleton.tsx +0 -15
- package/template/prisma/src/components/ui/table.tsx +0 -117
- package/template/prisma/src/components/ui/textarea.tsx +0 -24
- package/template/prisma/src/components/ui/toast.tsx +0 -127
- package/template/prisma/src/components/ui/toaster.tsx +0 -35
- package/template/prisma/src/components/ui/use-toast.ts +0 -189
- package/template/prisma/src/components/user-account-nav.tsx +0 -60
- package/template/prisma/src/components/user-avatar.tsx +0 -25
- package/template/prisma/src/env.mjs +0 -78
- package/template/prisma/src/hooks/use-debounce.ts +0 -17
- package/template/prisma/src/hooks/use-lock-body.tsx +0 -12
- package/template/prisma/src/lib/auth.ts +0 -80
- package/template/prisma/src/lib/cn.ts +0 -4
- package/template/prisma/src/lib/db.ts +0 -20
- package/template/prisma/src/lib/delay.ts +0 -2
- package/template/prisma/src/lib/formatDate.ts +0 -11
- package/template/prisma/src/lib/generateLabel.ts +0 -5
- package/template/prisma/src/lib/siteConfig.ts +0 -4
- package/template/prisma/src/lib/storageClient.ts +0 -11
- package/template/prisma/src/styles/editor.css +0 -61
- package/template/prisma/src/styles/globals.css +0 -76
- package/template/prisma/src/types/UnwrapPromise.ts +0 -1
- package/template/prisma/tailwind.config.ts +0 -80
- package/template/prisma/tsconfig.json +0 -46
- package/template/prisma-advanced/.eslintrc.cjs +0 -24
- package/template/prisma-advanced/components.json +0 -17
- package/template/prisma-advanced/next.config.mjs +0 -15
- package/template/prisma-advanced/package.json +0 -80
- package/template/prisma-advanced/postcss.config.cjs +0 -6
- package/template/prisma-advanced/prettier.config.ts +0 -11
- package/template/prisma-advanced/prisma/schema.prisma +0 -154
- package/template/prisma-advanced/public/next.svg +0 -1
- package/template/prisma-advanced/src/app/(app)/dashboard/page.tsx +0 -19
- package/template/prisma-advanced/src/app/(app)/roles/[id]/actions.ts +0 -100
- package/template/prisma-advanced/src/app/(app)/roles/[id]/page.tsx +0 -36
- package/template/prisma-advanced/src/app/(app)/roles/[id]/render.tsx +0 -266
- package/template/prisma-advanced/src/app/(app)/roles/actions.ts +0 -67
- package/template/prisma-advanced/src/app/(app)/roles/page.tsx +0 -51
- package/template/prisma-advanced/src/app/(app)/roles/render.tsx +0 -70
- package/template/prisma-advanced/src/app/(app)/settings/actions.ts +0 -18
- package/template/prisma-advanced/src/app/(app)/settings/loading.tsx +0 -28
- package/template/prisma-advanced/src/app/(app)/settings/page.tsx +0 -28
- package/template/prisma-advanced/src/app/(app)/settings/render.tsx +0 -113
- package/template/prisma-advanced/src/app/(app)/tasks/[id]/actions.ts +0 -147
- package/template/prisma-advanced/src/app/(app)/tasks/[id]/page.tsx +0 -55
- package/template/prisma-advanced/src/app/(app)/tasks/[id]/render.tsx +0 -418
- package/template/prisma-advanced/src/app/(app)/tasks/actions.ts +0 -69
- package/template/prisma-advanced/src/app/(app)/tasks/page.tsx +0 -63
- package/template/prisma-advanced/src/app/(app)/tasks/render.tsx +0 -114
- package/template/prisma-advanced/src/app/(app)/users/[id]/actions.ts +0 -104
- package/template/prisma-advanced/src/app/(app)/users/[id]/page.tsx +0 -39
- package/template/prisma-advanced/src/app/(app)/users/[id]/render.tsx +0 -320
- package/template/prisma-advanced/src/app/(app)/users/actions.ts +0 -67
- package/template/prisma-advanced/src/app/(app)/users/page.tsx +0 -61
- package/template/prisma-advanced/src/app/(app)/users/render.tsx +0 -108
- package/template/prisma-advanced/src/app/(auth)/layout.tsx +0 -20
- package/template/prisma-advanced/src/app/(auth)/login/user-auth-form.tsx +0 -152
- package/template/prisma-advanced/src/app/(marketing)/layout.tsx +0 -42
- package/template/prisma-advanced/src/app/(marketing)/page.tsx +0 -96
- package/template/prisma-advanced/src/app/api/auth/[...nextauth]/route.ts +0 -7
- package/template/prisma-advanced/src/app/api/upload/route.ts +0 -36
- package/template/prisma-advanced/src/app/favicon.ico +0 -0
- package/template/prisma-advanced/src/app/layout.tsx +0 -34
- package/template/prisma-advanced/src/components/app-nav-command.tsx +0 -160
- package/template/prisma-advanced/src/components/dark-mode-toggle.tsx +0 -43
- package/template/prisma-advanced/src/components/data-table/data-table-column-header.tsx +0 -91
- package/template/prisma-advanced/src/components/data-table/data-table-faceted-filter.tsx +0 -149
- package/template/prisma-advanced/src/components/data-table/data-table-loading.tsx +0 -77
- package/template/prisma-advanced/src/components/data-table/data-table-pagination.tsx +0 -94
- package/template/prisma-advanced/src/components/data-table/data-table-toolbar.tsx +0 -78
- package/template/prisma-advanced/src/components/data-table/data-table-types.ts +0 -17
- package/template/prisma-advanced/src/components/data-table/data-table-view-options.tsx +0 -59
- package/template/prisma-advanced/src/components/data-table/data-table.tsx +0 -301
- package/template/prisma-advanced/src/components/data-table/simple-data-table.tsx +0 -109
- package/template/prisma-advanced/src/components/empty-placeholder.tsx +0 -78
- package/template/prisma-advanced/src/components/heading.tsx +0 -17
- package/template/prisma-advanced/src/components/icons.tsx +0 -85
- package/template/prisma-advanced/src/components/main-nav.tsx +0 -64
- package/template/prisma-advanced/src/components/shell.tsx +0 -13
- package/template/prisma-advanced/src/components/side-nav.tsx +0 -51
- package/template/prisma-advanced/src/components/system-info.tsx +0 -36
- package/template/prisma-advanced/src/components/theme-provider.tsx +0 -13
- package/template/prisma-advanced/src/components/ui/alert-dialog.tsx +0 -141
- package/template/prisma-advanced/src/components/ui/avatar.tsx +0 -50
- package/template/prisma-advanced/src/components/ui/badge.tsx +0 -36
- package/template/prisma-advanced/src/components/ui/checkbox.tsx +0 -30
- package/template/prisma-advanced/src/components/ui/command.tsx +0 -155
- package/template/prisma-advanced/src/components/ui/dialog.tsx +0 -122
- package/template/prisma-advanced/src/components/ui/dropdown-menu.tsx +0 -200
- package/template/prisma-advanced/src/components/ui/popover.tsx +0 -31
- package/template/prisma-advanced/src/components/ui/select.tsx +0 -160
- package/template/prisma-advanced/src/components/ui/skeleton.tsx +0 -15
- package/template/prisma-advanced/src/components/ui/table.tsx +0 -117
- package/template/prisma-advanced/src/components/ui/textarea.tsx +0 -24
- package/template/prisma-advanced/src/components/ui/toast.tsx +0 -127
- package/template/prisma-advanced/src/components/ui/toaster.tsx +0 -35
- package/template/prisma-advanced/src/components/ui/use-toast.ts +0 -189
- package/template/prisma-advanced/src/components/user-account-nav.tsx +0 -60
- package/template/prisma-advanced/src/components/user-avatar.tsx +0 -25
- package/template/prisma-advanced/src/env.mjs +0 -78
- package/template/prisma-advanced/src/hooks/use-debounce.ts +0 -17
- package/template/prisma-advanced/src/hooks/use-lock-body.tsx +0 -12
- package/template/prisma-advanced/src/lib/auth.ts +0 -180
- package/template/prisma-advanced/src/lib/cn.ts +0 -4
- package/template/prisma-advanced/src/lib/db.ts +0 -20
- package/template/prisma-advanced/src/lib/delay.ts +0 -2
- package/template/prisma-advanced/src/lib/formatDate.ts +0 -11
- package/template/prisma-advanced/src/lib/generateLabel.ts +0 -5
- package/template/prisma-advanced/src/lib/siteConfig.ts +0 -4
- package/template/prisma-advanced/src/lib/storageClient.ts +0 -11
- package/template/prisma-advanced/src/styles/editor.css +0 -61
- package/template/prisma-advanced/src/types/UnwrapPromise.ts +0 -1
- package/template/prisma-advanced/tailwind.config.ts +0 -80
- package/template/{new → base}/next.config.ts +0 -0
- package/template/{new → base}/public/placeholder.svg +0 -0
- package/template/{new → base}/src/app/(auth)/login/email-login-form.tsx +0 -0
- package/template/{new → base}/src/app/(auth)/login/social-login-buttons.tsx +0 -0
- package/template/{new → base}/src/app/api/auth/[...all]/route.ts +0 -0
- package/template/{new → base}/src/components/loader.tsx +0 -0
- package/template/{new → base}/src/components/react-query-provider.tsx +0 -0
- package/template/{new → base}/src/components/screen-size.tsx +0 -0
- package/template/{new → base}/src/components/theme-toggle.tsx +0 -0
- package/template/{new → base}/src/lib/toast-message.ts +0 -0
- package/template/{base → old}/.eslintrc.cjs +0 -0
- package/template/{base → old}/next.config.mjs +0 -0
- package/template/{new → old}/prettier.config.mjs +0 -0
- package/template/{base → old}/public/next.svg +0 -0
- package/template/{base → old}/public/vercel.svg +0 -0
- package/template/{base → old}/src/app/(app)/dashboard/layout.tsx +0 -0
- package/template/{base → old}/src/app/(app)/dashboard/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/[id]/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/roles/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/roles/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/roles/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/settings/layout.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/loading.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/settings/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/[id]/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/tasks/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/tasks/statusEnum.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/render.tsx +0 -0
- package/template/{base → old}/src/app/(app)/users/[id]/validation.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/actions.ts +0 -0
- package/template/{base → old}/src/app/(app)/users/page.tsx +0 -0
- package/template/{base → old}/src/app/(app)/users/render.tsx +0 -0
- package/template/{base → old}/src/app/(auth)/layout.tsx +0 -0
- package/template/{base → old}/src/app/(auth)/login/render.tsx +0 -0
- package/template/{prisma → old}/src/app/(marketing)/layout.tsx +1 -1
- /package/template/{base → old}/src/app/api/auth/[...nextauth]/route.ts +0 -0
- /package/template/{new → old}/src/app/favicon.ico +0 -0
- /package/template/{prisma-advanced/src/styles → old/src/app}/globals.css +0 -0
- /package/template/{base → old}/src/components/app-nav-command.tsx +0 -0
- /package/template/{base → old}/src/components/dark-mode-toggle.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-column-header.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-faceted-filter.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-loading.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-pagination.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-toolbar.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-types.ts +0 -0
- /package/template/{base → old}/src/components/data-table/data-table-view-options.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/data-table.tsx +0 -0
- /package/template/{base → old}/src/components/data-table/simple-data-table.tsx +0 -0
- /package/template/{base → old}/src/components/empty-placeholder.tsx +0 -0
- /package/template/{base → old}/src/components/heading.tsx +0 -0
- /package/template/{base → old}/src/components/icons.tsx +0 -0
- /package/template/{base → old}/src/components/main-nav.tsx +0 -0
- /package/template/{base → old}/src/components/mobile-nav.tsx +0 -0
- /package/template/{base → old}/src/components/shell.tsx +0 -0
- /package/template/{base → old}/src/components/side-nav.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/site-footer.tsx +0 -0
- /package/template/{base → old}/src/components/system-info.tsx +0 -0
- /package/template/{base → old}/src/components/ui/alert-dialog.tsx +0 -0
- /package/template/{base → old}/src/components/ui/avatar.tsx +0 -0
- /package/template/{base → old}/src/components/ui/badge.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/button.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/card.tsx +0 -0
- /package/template/{base → old}/src/components/ui/checkbox.tsx +0 -0
- /package/template/{base → old}/src/components/ui/command.tsx +0 -0
- /package/template/{base → old}/src/components/ui/dialog.tsx +0 -0
- /package/template/{base → old}/src/components/ui/dropdown-menu.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/form.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/input.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/label.tsx +0 -0
- /package/template/{base → old}/src/components/ui/popover.tsx +0 -0
- /package/template/{base → old}/src/components/ui/select.tsx +0 -0
- /package/template/{prisma-advanced → old}/src/components/ui/separator.tsx +0 -0
- /package/template/{base → old}/src/components/ui/skeleton.tsx +0 -0
- /package/template/{base → old}/src/components/ui/table.tsx +0 -0
- /package/template/{base → old}/src/components/user-account-nav.tsx +0 -0
- /package/template/{base → old}/src/components/user-avatar.tsx +0 -0
- /package/template/{base → old}/src/data-access/resource.ts +0 -0
- /package/template/{base → old}/src/data-access/role-permission.ts +0 -0
- /package/template/{base → old}/src/data-access/role.ts +0 -0
- /package/template/{base → old}/src/data-access/task.ts +0 -0
- /package/template/{base → old}/src/data-access/user.ts +0 -0
- /package/template/{base → old}/src/env.mjs +0 -0
- /package/template/{base → old}/src/hooks/use-debounce.tsx +0 -0
- /package/template/{base → old}/src/hooks/use-lock-body.tsx +0 -0
- /package/template/{new → old}/src/lib/cn.ts +0 -0
- /package/template/{base → old}/src/lib/currentUser.ts +0 -0
- /package/template/{new → old}/src/lib/delay.ts +0 -0
- /package/template/{base → old}/src/lib/formatDate.ts +0 -0
- /package/template/{base → old}/src/lib/generateLabel.ts +0 -0
- /package/template/{base → old}/src/lib/s3Client.ts +0 -0
- /package/template/{new → old}/src/lib/siteConfig.ts +0 -0
- /package/template/{base → old}/src/lib/sortOrderEnum.ts +0 -0
- /package/template/{base → old}/src/use-case/role-permission.ts +0 -0
- /package/template/{base → old}/src/use-case/role.ts +0 -0
- /package/template/{base → old}/src/use-case/task.ts +0 -0
- /package/template/{base → old}/src/use-case/user.ts +0 -0
- /package/template/{base → old}/tailwind.config.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "ES2022",
|
|
4
4
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
5
5
|
"allowJs": true,
|
|
6
6
|
"checkJs": true,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"noEmit": true,
|
|
20
20
|
"esModuleInterop": true,
|
|
21
21
|
"module": "ESNext",
|
|
22
|
-
"moduleResolution": "
|
|
22
|
+
"moduleResolution": "bundler",
|
|
23
23
|
"resolveJsonModule": true,
|
|
24
24
|
"isolatedModules": true,
|
|
25
25
|
"jsx": "preserve",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"next-env.d.ts",
|
|
39
39
|
"**/*.ts",
|
|
40
40
|
"**/*.tsx",
|
|
41
|
+
"**/*.js",
|
|
41
42
|
"**/*.cjs",
|
|
42
43
|
"**/*.mjs",
|
|
43
44
|
".next/types/**/*.ts"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
NODE_ENV="production"
|
|
2
|
-
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/postgres"
|
|
3
|
-
BETTER_AUTH_URL="http://localhost:3000"
|
|
4
|
-
BETTER_AUTH_SECRET="secret"
|
|
5
|
-
BETTER_AUTH_GITHUB_ID="github_id"
|
|
6
|
-
BETTER_AUTH_GITHUB_SECRET="github_secret"
|
|
7
|
-
BETTER_AUTH_GOOGLE_ID="google_id"
|
|
8
|
-
BETTER_AUTH_GOOGLE_SECRET="google_secret"
|
|
9
|
-
EMAIL_SERVER_USER="username"
|
|
10
|
-
EMAIL_SERVER_PASSWORD="password"
|
|
11
|
-
EMAIL_SERVER_HOST="smtp.example.com"
|
|
12
|
-
EMAIL_SERVER_PORT="465"
|
|
13
|
-
EMAIL_FROM="no-reply@example.com"
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "new-york",
|
|
4
|
-
"rsc": true,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "",
|
|
8
|
-
"css": "src/app/globals.css",
|
|
9
|
-
"baseColor": "neutral",
|
|
10
|
-
"cssVariables": true,
|
|
11
|
-
"prefix": ""
|
|
12
|
-
},
|
|
13
|
-
"iconLibrary": "lucide",
|
|
14
|
-
"aliases": {
|
|
15
|
-
"components": "~/components",
|
|
16
|
-
"utils": "~/lib/cn",
|
|
17
|
-
"ui": "~/components/ui",
|
|
18
|
-
"lib": "~/lib",
|
|
19
|
-
"hooks": "~/hooks"
|
|
20
|
-
},
|
|
21
|
-
"registries": {}
|
|
22
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-app",
|
|
3
|
-
"description": "A Legendary Next.js App",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"private": true,
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "next dev",
|
|
8
|
-
"build": "next build",
|
|
9
|
-
"analyze": "ANALYZE=true next build --webpack",
|
|
10
|
-
"start": "next start",
|
|
11
|
-
"lint": "eslint",
|
|
12
|
-
"format": "prettier --write \"./src/**/*.{js,cjs,mjs,jsx,ts,tsx}\"",
|
|
13
|
-
"db:push": "drizzle-kit push",
|
|
14
|
-
"db:studio": "drizzle-kit studio",
|
|
15
|
-
"gen:auth": "bunx @better-auth/cli generate"
|
|
16
|
-
},
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"@hookform/resolvers": "5.2.2",
|
|
19
|
-
"@next/third-parties": "16.0.1",
|
|
20
|
-
"@paralleldrive/cuid2": "3.0.4",
|
|
21
|
-
"@radix-ui/react-avatar": "1.1.11",
|
|
22
|
-
"@radix-ui/react-checkbox": "1.3.3",
|
|
23
|
-
"@radix-ui/react-collapsible": "1.1.12",
|
|
24
|
-
"@radix-ui/react-dialog": "1.1.15",
|
|
25
|
-
"@radix-ui/react-dropdown-menu": "2.1.16",
|
|
26
|
-
"@radix-ui/react-label": "2.1.8",
|
|
27
|
-
"@radix-ui/react-popover": "1.1.15",
|
|
28
|
-
"@radix-ui/react-radio-group": "1.3.8",
|
|
29
|
-
"@radix-ui/react-select": "2.2.6",
|
|
30
|
-
"@radix-ui/react-separator": "1.1.8",
|
|
31
|
-
"@radix-ui/react-slider": "1.3.6",
|
|
32
|
-
"@radix-ui/react-slot": "1.2.4",
|
|
33
|
-
"@t3-oss/env-nextjs": "0.13.8",
|
|
34
|
-
"@tanstack/react-query": "5.90.7",
|
|
35
|
-
"better-auth": "1.3.34",
|
|
36
|
-
"class-variance-authority": "0.7.1",
|
|
37
|
-
"clsx": "2.1.1",
|
|
38
|
-
"date-fns": "4.1.0",
|
|
39
|
-
"decimal.js": "10.6.0",
|
|
40
|
-
"drizzle-orm": "0.44.7",
|
|
41
|
-
"lucide-react": "0.552.0",
|
|
42
|
-
"next": "16.0.1",
|
|
43
|
-
"next-safe-action": "8.0.11",
|
|
44
|
-
"next-themes": "0.4.6",
|
|
45
|
-
"nextjs-toploader": "3.9.17",
|
|
46
|
-
"nodemailer": "7.0.10",
|
|
47
|
-
"postgres": "3.4.7",
|
|
48
|
-
"react": "19.2.0",
|
|
49
|
-
"react-day-picker": "9.11.1",
|
|
50
|
-
"react-dom": "19.2.0",
|
|
51
|
-
"react-hook-form": "7.66.0",
|
|
52
|
-
"sonner": "2.0.7",
|
|
53
|
-
"tailwind-merge": "3.3.1",
|
|
54
|
-
"tw-animate-css": "1.4.0",
|
|
55
|
-
"workflow": "4.0.1-beta.11",
|
|
56
|
-
"zod": "4.1.12"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@next/bundle-analyzer": "16.0.1",
|
|
60
|
-
"@tailwindcss/postcss": "4.1.16",
|
|
61
|
-
"@types/bun": "1.3.1",
|
|
62
|
-
"@types/react": "19.2.2",
|
|
63
|
-
"@types/react-dom": "19.2.2",
|
|
64
|
-
"babel-plugin-react-compiler": "1.0.0",
|
|
65
|
-
"drizzle-kit": "0.31.6",
|
|
66
|
-
"eslint": "9.39.1",
|
|
67
|
-
"eslint-config-next": "16.0.1",
|
|
68
|
-
"prettier": "3.6.2",
|
|
69
|
-
"prettier-plugin-organize-imports": "4.3.0",
|
|
70
|
-
"prettier-plugin-tailwindcss": "0.7.1",
|
|
71
|
-
"tailwindcss": "4.1.16",
|
|
72
|
-
"typescript": "5.9.3"
|
|
73
|
-
},
|
|
74
|
-
"trustedDependencies": [
|
|
75
|
-
"@swc/core",
|
|
76
|
-
"@tailwindcss/oxide",
|
|
77
|
-
"esbuild",
|
|
78
|
-
"sharp",
|
|
79
|
-
"unrs-resolver"
|
|
80
|
-
]
|
|
81
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ShoppingBag } from 'lucide-react'
|
|
2
|
-
import Link from 'next/link'
|
|
3
|
-
import { redirect } from 'next/navigation'
|
|
4
|
-
import {
|
|
5
|
-
Card,
|
|
6
|
-
CardContent,
|
|
7
|
-
CardDescription,
|
|
8
|
-
CardFooter,
|
|
9
|
-
CardHeader,
|
|
10
|
-
CardTitle
|
|
11
|
-
} from '~/components/ui/card'
|
|
12
|
-
import { Separator } from '~/components/ui/separator'
|
|
13
|
-
import { getAuthSession } from '~/lib/auth'
|
|
14
|
-
import { EmailLoginForm } from './email-login-form'
|
|
15
|
-
import { SocialLoginButtons } from './social-login-buttons'
|
|
16
|
-
|
|
17
|
-
export default async function LoginPage() {
|
|
18
|
-
const session = await getAuthSession()
|
|
19
|
-
|
|
20
|
-
if (session?.user) redirect('/')
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<div className="flex min-h-screen items-center justify-center px-4 py-12 sm:px-6 lg:px-8">
|
|
24
|
-
<Card className="w-full max-w-md">
|
|
25
|
-
<CardHeader className="space-y-1 text-center">
|
|
26
|
-
<div className="bg-primary/10 mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full">
|
|
27
|
-
<ShoppingBag className="text-primary size-6" />
|
|
28
|
-
</div>
|
|
29
|
-
<CardTitle className="text-2xl font-bold">Welcome back</CardTitle>
|
|
30
|
-
<CardDescription className="text-muted-foreground text-sm">
|
|
31
|
-
Sign in to your account to continue
|
|
32
|
-
</CardDescription>
|
|
33
|
-
</CardHeader>
|
|
34
|
-
<CardContent className="space-y-4">
|
|
35
|
-
<div className="border-muted-foreground/50 bg-muted/50 rounded-lg border border-dashed p-4">
|
|
36
|
-
<p className="text-muted-foreground text-sm">
|
|
37
|
-
<strong>New to our site?</strong> No need to create a separate
|
|
38
|
-
account. Simply use one of the options below to both sign up and
|
|
39
|
-
log in.
|
|
40
|
-
</p>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<EmailLoginForm />
|
|
44
|
-
|
|
45
|
-
<div className="relative">
|
|
46
|
-
<div className="absolute inset-0 flex items-center">
|
|
47
|
-
<span className="w-full border-t" />
|
|
48
|
-
</div>
|
|
49
|
-
<div className="relative flex justify-center text-xs uppercase">
|
|
50
|
-
<span className="bg-background text-muted-foreground px-2">
|
|
51
|
-
Or continue with
|
|
52
|
-
</span>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<SocialLoginButtons />
|
|
57
|
-
</CardContent>
|
|
58
|
-
<CardFooter className="flex flex-col space-y-4">
|
|
59
|
-
<Separator className="my-2" />
|
|
60
|
-
<div className="text-muted-foreground text-center text-sm">
|
|
61
|
-
<Link
|
|
62
|
-
href="/"
|
|
63
|
-
className="text-primary underline-offset-4 hover:underline"
|
|
64
|
-
>
|
|
65
|
-
Return to home page
|
|
66
|
-
</Link>
|
|
67
|
-
</div>
|
|
68
|
-
</CardFooter>
|
|
69
|
-
</Card>
|
|
70
|
-
</div>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
@import 'tailwindcss';
|
|
2
|
-
@import 'tw-animate-css';
|
|
3
|
-
|
|
4
|
-
@custom-variant dark (&:is(.dark *));
|
|
5
|
-
|
|
6
|
-
@theme inline {
|
|
7
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
8
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
9
|
-
--radius-lg: var(--radius);
|
|
10
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
11
|
-
--color-background: var(--background);
|
|
12
|
-
--color-foreground: var(--foreground);
|
|
13
|
-
--color-card: var(--card);
|
|
14
|
-
--color-card-foreground: var(--card-foreground);
|
|
15
|
-
--color-popover: var(--popover);
|
|
16
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
17
|
-
--color-primary: var(--primary);
|
|
18
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
19
|
-
--color-secondary: var(--secondary);
|
|
20
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
21
|
-
--color-muted: var(--muted);
|
|
22
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
23
|
-
--color-accent: var(--accent);
|
|
24
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
25
|
-
--color-destructive: var(--destructive);
|
|
26
|
-
--color-border: var(--border);
|
|
27
|
-
--color-input: var(--input);
|
|
28
|
-
--color-ring: var(--ring);
|
|
29
|
-
--color-chart-1: var(--chart-1);
|
|
30
|
-
--color-chart-2: var(--chart-2);
|
|
31
|
-
--color-chart-3: var(--chart-3);
|
|
32
|
-
--color-chart-4: var(--chart-4);
|
|
33
|
-
--color-chart-5: var(--chart-5);
|
|
34
|
-
--color-sidebar: var(--sidebar);
|
|
35
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
36
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
37
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
38
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
39
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
40
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
41
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:root {
|
|
45
|
-
--radius: 0.625rem;
|
|
46
|
-
--background: oklch(1 0 0);
|
|
47
|
-
--foreground: oklch(0.145 0 0);
|
|
48
|
-
--card: oklch(1 0 0);
|
|
49
|
-
--card-foreground: oklch(0.145 0 0);
|
|
50
|
-
--popover: oklch(1 0 0);
|
|
51
|
-
--popover-foreground: oklch(0.145 0 0);
|
|
52
|
-
--primary: oklch(0.205 0 0);
|
|
53
|
-
--primary-foreground: oklch(0.985 0 0);
|
|
54
|
-
--secondary: oklch(0.97 0 0);
|
|
55
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
56
|
-
--muted: oklch(0.97 0 0);
|
|
57
|
-
--muted-foreground: oklch(0.556 0 0);
|
|
58
|
-
--accent: oklch(0.97 0 0);
|
|
59
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
60
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
61
|
-
--border: oklch(0.922 0 0);
|
|
62
|
-
--input: oklch(0.922 0 0);
|
|
63
|
-
--ring: oklch(0.708 0 0);
|
|
64
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
65
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
66
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
67
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
68
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
69
|
-
--sidebar: oklch(0.985 0 0);
|
|
70
|
-
--sidebar-foreground: oklch(0.145 0 0);
|
|
71
|
-
--sidebar-primary: oklch(0.205 0 0);
|
|
72
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
73
|
-
--sidebar-accent: oklch(0.97 0 0);
|
|
74
|
-
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
75
|
-
--sidebar-border: oklch(0.922 0 0);
|
|
76
|
-
--sidebar-ring: oklch(0.708 0 0);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.dark {
|
|
80
|
-
--background: oklch(0.145 0 0);
|
|
81
|
-
--foreground: oklch(0.985 0 0);
|
|
82
|
-
--card: oklch(0.205 0 0);
|
|
83
|
-
--card-foreground: oklch(0.985 0 0);
|
|
84
|
-
--popover: oklch(0.205 0 0);
|
|
85
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
86
|
-
--primary: oklch(0.922 0 0);
|
|
87
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
88
|
-
--secondary: oklch(0.269 0 0);
|
|
89
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
90
|
-
--muted: oklch(0.269 0 0);
|
|
91
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
92
|
-
--accent: oklch(0.269 0 0);
|
|
93
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
94
|
-
--destructive: oklch(0.704 0.191 22.216);
|
|
95
|
-
--border: oklch(1 0 0 / 10%);
|
|
96
|
-
--input: oklch(1 0 0 / 15%);
|
|
97
|
-
--ring: oklch(0.556 0 0);
|
|
98
|
-
--chart-1: oklch(0.488 0.243 264.376);
|
|
99
|
-
--chart-2: oklch(0.696 0.17 162.48);
|
|
100
|
-
--chart-3: oklch(0.769 0.188 70.08);
|
|
101
|
-
--chart-4: oklch(0.627 0.265 303.9);
|
|
102
|
-
--chart-5: oklch(0.645 0.246 16.439);
|
|
103
|
-
--sidebar: oklch(0.205 0 0);
|
|
104
|
-
--sidebar-foreground: oklch(0.985 0 0);
|
|
105
|
-
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
106
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
107
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
108
|
-
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
109
|
-
--sidebar-border: oklch(1 0 0 / 10%);
|
|
110
|
-
--sidebar-ring: oklch(0.556 0 0);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@layer base {
|
|
114
|
-
* {
|
|
115
|
-
@apply border-border outline-ring/50;
|
|
116
|
-
}
|
|
117
|
-
body {
|
|
118
|
-
@apply text-foreground bg-background min-h-screen font-sans antialiased;
|
|
119
|
-
}
|
|
120
|
-
button:not([disabled]),
|
|
121
|
-
[role='button']:not([disabled]) {
|
|
122
|
-
cursor: pointer;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@utility container {
|
|
127
|
-
@apply mx-auto p-4;
|
|
128
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Metadata } from 'next'
|
|
2
|
-
import { ThemeProvider } from 'next-themes'
|
|
3
|
-
import { Geist, Geist_Mono } from 'next/font/google'
|
|
4
|
-
import { Loader } from '~/components/loader'
|
|
5
|
-
import { ReactQueryProvider } from '~/components/react-query-provider'
|
|
6
|
-
import { ScreenSize } from '~/components/screen-size'
|
|
7
|
-
import { Toaster } from '~/components/ui/sonner'
|
|
8
|
-
import { env } from '~/env'
|
|
9
|
-
import { siteConfig } from '~/lib/siteConfig'
|
|
10
|
-
import './globals.css'
|
|
11
|
-
|
|
12
|
-
const geistSans = Geist({
|
|
13
|
-
variable: '--font-geist-sans',
|
|
14
|
-
subsets: ['latin']
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const geistMono = Geist_Mono({
|
|
18
|
-
variable: '--font-geist-mono',
|
|
19
|
-
subsets: ['latin']
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
export const metadata: Metadata = {
|
|
23
|
-
title: siteConfig.name,
|
|
24
|
-
description: siteConfig.description
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default function RootLayout({
|
|
28
|
-
children
|
|
29
|
-
}: Readonly<{
|
|
30
|
-
children: React.ReactNode
|
|
31
|
-
}>) {
|
|
32
|
-
return (
|
|
33
|
-
<html lang="en" suppressHydrationWarning>
|
|
34
|
-
<body className={`${geistSans.variable} ${geistMono.variable}`}>
|
|
35
|
-
<ReactQueryProvider>
|
|
36
|
-
<ThemeProvider
|
|
37
|
-
attribute="class"
|
|
38
|
-
defaultTheme="light"
|
|
39
|
-
forcedTheme="light"
|
|
40
|
-
>
|
|
41
|
-
<Loader />
|
|
42
|
-
{children}
|
|
43
|
-
{env.NODE_ENV === 'development' ? <ScreenSize /> : null}
|
|
44
|
-
<Toaster />
|
|
45
|
-
</ThemeProvider>
|
|
46
|
-
</ReactQueryProvider>
|
|
47
|
-
</body>
|
|
48
|
-
</html>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Slot } from '@radix-ui/react-slot'
|
|
2
|
-
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
|
-
import * as React from 'react'
|
|
4
|
-
|
|
5
|
-
import { cn } from '~/lib/cn'
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"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:not([class*='size-'])]: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",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
13
|
-
destructive:
|
|
14
|
-
'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
15
|
-
outline:
|
|
16
|
-
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
17
|
-
secondary:
|
|
18
|
-
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
19
|
-
ghost:
|
|
20
|
-
'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
21
|
-
link: 'text-primary underline-offset-4 hover:underline'
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
25
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
26
|
-
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
27
|
-
icon: 'size-9',
|
|
28
|
-
'icon-sm': 'size-8',
|
|
29
|
-
'icon-lg': 'size-10'
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
variant: 'default',
|
|
34
|
-
size: 'default'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
function Button({
|
|
40
|
-
className,
|
|
41
|
-
variant,
|
|
42
|
-
size,
|
|
43
|
-
asChild = false,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<'button'> &
|
|
46
|
-
VariantProps<typeof buttonVariants> & {
|
|
47
|
-
asChild?: boolean
|
|
48
|
-
}) {
|
|
49
|
-
const Comp = asChild ? Slot : 'button'
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<Comp
|
|
53
|
-
data-slot="button"
|
|
54
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
55
|
-
{...props}
|
|
56
|
-
/>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { Button, buttonVariants }
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
|
|
3
|
-
import { cn } from '~/lib/cn'
|
|
4
|
-
|
|
5
|
-
function Card({ className, ...props }: React.ComponentProps<'div'>) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="card"
|
|
9
|
-
className={cn(
|
|
10
|
-
'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
|
|
11
|
-
className
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
data-slot="card-header"
|
|
22
|
-
className={cn(
|
|
23
|
-
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
|
24
|
-
className
|
|
25
|
-
)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function CardTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
32
|
-
return (
|
|
33
|
-
<div
|
|
34
|
-
data-slot="card-title"
|
|
35
|
-
className={cn('leading-none font-semibold', className)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function CardDescription({ className, ...props }: React.ComponentProps<'div'>) {
|
|
42
|
-
return (
|
|
43
|
-
<div
|
|
44
|
-
data-slot="card-description"
|
|
45
|
-
className={cn('text-muted-foreground text-sm', className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function CardAction({ className, ...props }: React.ComponentProps<'div'>) {
|
|
52
|
-
return (
|
|
53
|
-
<div
|
|
54
|
-
data-slot="card-action"
|
|
55
|
-
className={cn(
|
|
56
|
-
'col-start-2 row-span-2 row-start-1 self-start justify-self-end',
|
|
57
|
-
className
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function CardContent({ className, ...props }: React.ComponentProps<'div'>) {
|
|
65
|
-
return (
|
|
66
|
-
<div
|
|
67
|
-
data-slot="card-content"
|
|
68
|
-
className={cn('px-6', className)}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
75
|
-
return (
|
|
76
|
-
<div
|
|
77
|
-
data-slot="card-footer"
|
|
78
|
-
className={cn('flex items-center px-6 [.border-t]:pt-6', className)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
Card,
|
|
86
|
-
CardAction,
|
|
87
|
-
CardContent,
|
|
88
|
-
CardDescription,
|
|
89
|
-
CardFooter,
|
|
90
|
-
CardHeader,
|
|
91
|
-
CardTitle
|
|
92
|
-
}
|