This repository was archived by the owner on Jan 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +39
-23
lines changed Expand file tree Collapse file tree 5 files changed +39
-23
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pnpm add -D prettier-plugin-packagejson prettier-plugin-tailwindcss
15
15
# pre-commit
16
16
pnpm add -D lint-staged simple-git-hooks
17
17
# other
18
- pnpm add class-variance-authority zod react-hook-form @hookform/resolvers @prisma/client @next- auth/prisma-adapter next-auth tailwind-merge date-fns path-to-regexp slugify lucide-react pluralize
18
+ pnpm add class-variance-authority zod react-hook-form @hookform/resolvers @prisma/client @auth/prisma-adapter next-auth@beta tailwind-merge date-fns path-to-regexp slugify lucide-react pluralize
19
19
pnpm add -D prisma @types/pluralize @faker-js/faker
20
20
```
21
21
@@ -86,6 +86,7 @@ Update `tsconfig.json`
86
86
- "isolatedModules": true,
87
87
- "jsx": "preserve",
88
88
- "incremental": true,
89
+ + "declaration": false,
89
90
"plugins": [
90
91
{
91
92
"name": "next"
@@ -146,12 +147,18 @@ datasource db {
146
147
+ }
147
148
```
148
149
149
- Create ` /src/lib/database/index .ts `
150
+ Create ` /src/lib/prisma .ts `
150
151
151
152
``` ts
152
- import { PrismaClient } from ' @prisma/client' ;
153
+ import { PrismaClient } from ' @prisma/client/edge ' ;
153
154
154
- const globalForPrisma = globalThis as unknown as { prisma? : PrismaClient };
155
+ // PrismaClient is attached to the `global` object in development to prevent
156
+ // exhausting your database connection limit.
157
+ //
158
+ // Learn more:
159
+ // https://pris.ly/d/help/next-js-best-practices
160
+
161
+ const globalForPrisma = global as unknown as { prisma? : PrismaClient };
155
162
156
163
export const prisma = globalForPrisma .prisma || new PrismaClient ();
157
164
Original file line number Diff line number Diff line change 1
1
# @codefixlabs/ui
2
2
3
+ ## 0.1.33
4
+
5
+ ### Patch Changes
6
+
7
+ - Button focus on state open
8
+
3
9
## 0.1.32
4
10
5
11
### Patch Changes
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @codefixlabs/ui" ,
3
- "version" : " 0.1.32 " ,
3
+ "version" : " 0.1.33 " ,
4
4
"license" : " MIT" ,
5
5
"exports" : {
6
6
"./package.json" : " ./package.json" ,
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ export const buttonVariants = cva(
115
115
[
116
116
'relative select-none items-center gap-2 overflow-hidden whitespace-nowrap text-sm font-medium transition-colors' ,
117
117
'focus:ring-ring/40 focus:outline-none focus:ring-2' ,
118
+ 'data-state-open:ring-ring/20 data-state-open:outline-none data-state-open:ring-2' ,
118
119
'data-disabled:cursor-not-allowed data-disabled:ring-0' ,
119
120
] ,
120
121
{
Original file line number Diff line number Diff line change @@ -475,6 +475,24 @@ export function DataTablePagination<TData>({
475
475
* Component: DataTableContent
476
476
* -------------------------------------------------------------------------- */
477
477
478
+ interface TableClassNames {
479
+ root ?: string ;
480
+ container ?: string ;
481
+ table ?: string ;
482
+ header ?: string ;
483
+ headerRow ?: string ;
484
+ footer ?: string ;
485
+ footerRow ?: string ;
486
+ headerCell ?: string ;
487
+ body ?: string ;
488
+ row ?: string ;
489
+ cell ?: string ;
490
+ emptyRow ?: string ;
491
+ emptyCell ?: string ;
492
+ toolbar ?: string ;
493
+ pagination ?: string ;
494
+ }
495
+
478
496
export function DataTableContent < TData , TValue > ( {
479
497
table,
480
498
columns = [ ] ,
@@ -484,23 +502,7 @@ export function DataTableContent<TData, TValue>({
484
502
table : TableType < TData > ;
485
503
columns : ColumnDef < TData , TValue > [ ] ;
486
504
showFooter ?: boolean ;
487
- classNames ?: {
488
- root ?: string ;
489
- container ?: string ;
490
- table ?: string ;
491
- header ?: string ;
492
- headerRow ?: string ;
493
- footer ?: string ;
494
- footerRow ?: string ;
495
- headerCell ?: string ;
496
- body ?: string ;
497
- row ?: string ;
498
- cell ?: string ;
499
- emptyRow ?: string ;
500
- emptyCell ?: string ;
501
- toolbar ?: string ;
502
- pagination ?: string ;
503
- } ;
505
+ classNames ?: TableClassNames ;
504
506
} ) : React . JSX . Element {
505
507
return (
506
508
< div
@@ -768,7 +770,7 @@ export function DataTable<TData>({
768
770
endToolbar,
769
771
...props
770
772
} : Omit < TableOptions < TData > , 'getCoreRowModel' > & {
771
- classNames ?: React . ComponentProps < typeof DataTableContent > [ 'classNames' ] ;
773
+ classNames ?: TableClassNames ;
772
774
showFooter ?: boolean ;
773
775
startToolbar ?: React . ReactNode ;
774
776
endToolbar ?: React . ReactNode ;
You can’t perform that action at this time.
0 commit comments