@cogito.ai/cli 0.4.2 → 0.4.4

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.
Files changed (135) hide show
  1. package/README.md +29 -22
  2. package/dist/index.js +9 -15
  3. package/dist/templates/web-nextjs/.github/copilot-instructions.md +5 -6
  4. package/dist/templates/web-nextjs/README.md +25 -24
  5. package/dist/templates/web-nextjs/apps/docs/.source/browser.ts +1 -1
  6. package/dist/templates/web-nextjs/apps/docs/.source/server.ts +6 -6
  7. package/dist/templates/web-nextjs/apps/docs/app/docs/[[...slug]]/page.tsx +1 -6
  8. package/dist/templates/web-nextjs/apps/docs/app/docs/layout.tsx +1 -4
  9. package/dist/templates/web-nextjs/apps/docs/app/llms-full.txt/route.ts +3 -1
  10. package/dist/templates/web-nextjs/apps/docs/next-env.d.ts +1 -1
  11. package/dist/templates/web-nextjs/apps/web/.env.example +35 -0
  12. package/dist/templates/web-nextjs/apps/web/.github/copilot-instructions.md +53 -6
  13. package/dist/templates/web-nextjs/apps/web/.github/skills/impeccable/SKILL.md +55 -0
  14. package/dist/templates/web-nextjs/apps/web/DESIGN.md +65 -0
  15. package/dist/templates/web-nextjs/apps/web/messages/en.json +151 -5
  16. package/dist/templates/web-nextjs/apps/web/messages/zh.json +151 -5
  17. package/dist/templates/web-nextjs/apps/web/next-env.d.ts +1 -1
  18. package/dist/templates/web-nextjs/apps/web/next.config.ts +3 -3
  19. package/dist/templates/web-nextjs/apps/web/package.json +4 -0
  20. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/forgot-password/page.tsx +167 -38
  21. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/login/page.tsx +13 -3
  22. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/reset-password/page.tsx +4 -1
  23. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/signup/page.tsx +18 -17
  24. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/dashboard/page.tsx +1 -5
  25. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/payment/[paymentId]/page.tsx +88 -0
  26. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/payment/checkout/page.tsx +170 -0
  27. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/pricing/page.tsx +120 -0
  28. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/layout.tsx +45 -2
  29. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/profile/page.tsx +2 -8
  30. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/subscription/page.tsx +128 -0
  31. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/about/page.tsx +3 -6
  32. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/globals.css +17 -5
  33. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/help/page.tsx +1 -5
  34. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/layout.tsx +10 -8
  35. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/page.tsx +22 -6
  36. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/privacy/page.tsx +3 -6
  37. package/dist/templates/web-nextjs/apps/web/src/app/[locale]/terms/page.tsx +1 -5
  38. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/alipay/create/route.ts +43 -0
  39. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/alipay/notify/route.ts +105 -0
  40. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/alipay/query/route.ts +54 -0
  41. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/alipay/return/route.ts +20 -0
  42. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/create/route.ts +52 -0
  43. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/wechat/create/route.ts +58 -0
  44. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/wechat/notify/route.ts +92 -0
  45. package/dist/templates/web-nextjs/apps/web/src/app/api/payments/wechat/query/route.ts +54 -0
  46. package/dist/templates/web-nextjs/apps/web/src/app/auth/callback/route.ts +2 -3
  47. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/app-sidebar.tsx +13 -16
  48. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/chart-area-interactive.tsx +122 -146
  49. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/data-table.tsx +84 -149
  50. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-documents.tsx +7 -16
  51. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-main.tsx +4 -4
  52. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-secondary.tsx +4 -4
  53. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-user.tsx +12 -21
  54. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/page.tsx +10 -13
  55. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/section-cards.tsx +5 -9
  56. package/dist/templates/web-nextjs/apps/web/src/components/dashboard/site-header.tsx +6 -7
  57. package/dist/templates/web-nextjs/apps/web/src/components/landing/features.tsx +63 -0
  58. package/dist/templates/web-nextjs/apps/web/src/components/landing/footer.tsx +48 -0
  59. package/dist/templates/web-nextjs/apps/web/src/components/landing/header.tsx +97 -0
  60. package/dist/templates/web-nextjs/apps/web/src/components/landing/hero.tsx +45 -0
  61. package/dist/templates/web-nextjs/apps/web/src/components/landing/how-it-works.tsx +35 -0
  62. package/dist/templates/web-nextjs/apps/web/src/components/landing/pricing-teaser.tsx +23 -0
  63. package/dist/templates/web-nextjs/apps/web/src/components/profile/profile-form.tsx +6 -4
  64. package/dist/templates/web-nextjs/apps/web/src/components/providers/theme-provider.tsx +16 -0
  65. package/dist/templates/web-nextjs/apps/web/src/components/ui/alert-dialog.tsx +32 -49
  66. package/dist/templates/web-nextjs/apps/web/src/components/ui/alert.tsx +16 -23
  67. package/dist/templates/web-nextjs/apps/web/src/components/ui/avatar.tsx +25 -38
  68. package/dist/templates/web-nextjs/apps/web/src/components/ui/badge.tsx +16 -18
  69. package/dist/templates/web-nextjs/apps/web/src/components/ui/breadcrumb.tsx +19 -26
  70. package/dist/templates/web-nextjs/apps/web/src/components/ui/button.tsx +23 -24
  71. package/dist/templates/web-nextjs/apps/web/src/components/ui/card.tsx +19 -36
  72. package/dist/templates/web-nextjs/apps/web/src/components/ui/chart.tsx +60 -94
  73. package/dist/templates/web-nextjs/apps/web/src/components/ui/checkbox.tsx +8 -11
  74. package/dist/templates/web-nextjs/apps/web/src/components/ui/collapsible.tsx +5 -17
  75. package/dist/templates/web-nextjs/apps/web/src/components/ui/command.tsx +25 -48
  76. package/dist/templates/web-nextjs/apps/web/src/components/ui/dialog.tsx +21 -35
  77. package/dist/templates/web-nextjs/apps/web/src/components/ui/drawer.tsx +24 -35
  78. package/dist/templates/web-nextjs/apps/web/src/components/ui/dropdown-menu.tsx +26 -55
  79. package/dist/templates/web-nextjs/apps/web/src/components/ui/field.tsx +62 -76
  80. package/dist/templates/web-nextjs/apps/web/src/components/ui/form.tsx +19 -34
  81. package/dist/templates/web-nextjs/apps/web/src/components/ui/input-otp.tsx +13 -20
  82. package/dist/templates/web-nextjs/apps/web/src/components/ui/input.tsx +6 -6
  83. package/dist/templates/web-nextjs/apps/web/src/components/ui/label.tsx +6 -6
  84. package/dist/templates/web-nextjs/apps/web/src/components/ui/pagination.tsx +21 -42
  85. package/dist/templates/web-nextjs/apps/web/src/components/ui/popover.tsx +16 -31
  86. package/dist/templates/web-nextjs/apps/web/src/components/ui/progress.tsx +5 -8
  87. package/dist/templates/web-nextjs/apps/web/src/components/ui/radio-group.tsx +8 -8
  88. package/dist/templates/web-nextjs/apps/web/src/components/ui/scroll-area.tsx +10 -12
  89. package/dist/templates/web-nextjs/apps/web/src/components/ui/select.tsx +26 -41
  90. package/dist/templates/web-nextjs/apps/web/src/components/ui/separator.tsx +7 -7
  91. package/dist/templates/web-nextjs/apps/web/src/components/ui/sheet.tsx +29 -38
  92. package/dist/templates/web-nextjs/apps/web/src/components/ui/sidebar.tsx +157 -189
  93. package/dist/templates/web-nextjs/apps/web/src/components/ui/skeleton.tsx +3 -3
  94. package/dist/templates/web-nextjs/apps/web/src/components/ui/slider.tsx +10 -15
  95. package/dist/templates/web-nextjs/apps/web/src/components/ui/sonner.tsx +13 -7
  96. package/dist/templates/web-nextjs/apps/web/src/components/ui/switch.tsx +9 -9
  97. package/dist/templates/web-nextjs/apps/web/src/components/ui/table.tsx +24 -48
  98. package/dist/templates/web-nextjs/apps/web/src/components/ui/tabs.tsx +21 -31
  99. package/dist/templates/web-nextjs/apps/web/src/components/ui/textarea.tsx +5 -5
  100. package/dist/templates/web-nextjs/apps/web/src/components/ui/theme-toggle.tsx +23 -0
  101. package/dist/templates/web-nextjs/apps/web/src/components/ui/toggle-group.tsx +15 -16
  102. package/dist/templates/web-nextjs/apps/web/src/components/ui/toggle.tsx +14 -15
  103. package/dist/templates/web-nextjs/apps/web/src/components/ui/tooltip.tsx +8 -12
  104. package/dist/templates/web-nextjs/apps/web/src/core/repositories/IAuthRepository.ts +2 -0
  105. package/dist/templates/web-nextjs/apps/web/src/core/types/auth.ts +1 -3
  106. package/dist/templates/web-nextjs/apps/web/src/features/auth/actions.ts +57 -1
  107. package/dist/templates/web-nextjs/apps/web/src/features/auth/index.ts +2 -0
  108. package/dist/templates/web-nextjs/apps/web/src/features/subscription/alipay/client.ts +36 -0
  109. package/dist/templates/web-nextjs/apps/web/src/features/subscription/alipay/server.ts +83 -0
  110. package/dist/templates/web-nextjs/apps/web/src/features/subscription/components/index.ts +4 -0
  111. package/dist/templates/web-nextjs/apps/web/src/features/subscription/components/pro-badge.tsx +9 -0
  112. package/dist/templates/web-nextjs/apps/web/src/features/subscription/components/pro-feature-comparison.tsx +70 -0
  113. package/dist/templates/web-nextjs/apps/web/src/features/subscription/components/quota-warning-banner.tsx +37 -0
  114. package/dist/templates/web-nextjs/apps/web/src/features/subscription/components/upgrade-button.tsx +42 -0
  115. package/dist/templates/web-nextjs/apps/web/src/features/subscription/hooks.ts +141 -0
  116. package/dist/templates/web-nextjs/apps/web/src/features/subscription/payment-helpers.ts +27 -0
  117. package/dist/templates/web-nextjs/apps/web/src/features/subscription/payment-service.ts +56 -0
  118. package/dist/templates/web-nextjs/apps/web/src/features/subscription/service.ts +55 -0
  119. package/dist/templates/web-nextjs/apps/web/src/features/subscription/types.ts +73 -0
  120. package/dist/templates/web-nextjs/apps/web/src/features/subscription/wechat/client.ts +33 -0
  121. package/dist/templates/web-nextjs/apps/web/src/features/subscription/wechat/server.ts +147 -0
  122. package/dist/templates/web-nextjs/apps/web/src/hooks/use-mobile.ts +4 -4
  123. package/dist/templates/web-nextjs/apps/web/src/i18n/config.ts +1 -1
  124. package/dist/templates/web-nextjs/apps/web/src/infra/db/SupabaseAuthRepository.ts +48 -4
  125. package/dist/templates/web-nextjs/apps/web/src/infra/db/client.ts +1 -4
  126. package/dist/templates/web-nextjs/apps/web/src/lib/supabase/admin.ts +23 -0
  127. package/dist/templates/web-nextjs/apps/web/src/lib/utils.ts +2 -2
  128. package/dist/templates/web-nextjs/apps/web/src/lib/validations/auth.ts +13 -0
  129. package/dist/templates/web-nextjs/apps/web/src/lib/wechat-pay/client.ts +66 -0
  130. package/dist/templates/web-nextjs/apps/web/src/lib/wechat-pay/crypto.ts +99 -0
  131. package/dist/templates/web-nextjs/apps/web/src/lib/wechat-pay/types.ts +10 -0
  132. package/dist/templates/web-nextjs/apps/web/src/styles/tokens.css +58 -0
  133. package/dist/templates/web-nextjs/pnpm-lock.yaml +319 -0
  134. package/dist/templates/web-nextjs/supabase/migrations/20250608_add_subscription_tables.sql +125 -0
  135. package/package.json +1 -1
@@ -1,28 +1,25 @@
1
- "use client"
1
+ 'use client'
2
2
 
3
- import * as React from "react"
4
- import { Command as CommandPrimitive } from "cmdk"
5
- import { SearchIcon } from "lucide-react"
3
+ import * as React from 'react'
4
+ import { Command as CommandPrimitive } from 'cmdk'
5
+ import { SearchIcon } from 'lucide-react'
6
6
 
7
- import { cn } from "@/lib/utils"
7
+ import { cn } from '@/lib/utils'
8
8
  import {
9
9
  Dialog,
10
10
  DialogContent,
11
11
  DialogDescription,
12
12
  DialogHeader,
13
13
  DialogTitle,
14
- } from "@/components/ui/dialog"
14
+ } from '@/components/ui/dialog'
15
15
 
16
- function Command({
17
- className,
18
- ...props
19
- }: React.ComponentProps<typeof CommandPrimitive>) {
16
+ function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
20
17
  return (
21
18
  <CommandPrimitive
22
19
  data-slot="command"
23
20
  className={cn(
24
- "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
25
- className
21
+ 'flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground',
22
+ className,
26
23
  )}
27
24
  {...props}
28
25
  />
@@ -30,8 +27,8 @@ function Command({
30
27
  }
31
28
 
32
29
  function CommandDialog({
33
- title = "Command Palette",
34
- description = "Search for a command to run...",
30
+ title = 'Command Palette',
31
+ description = 'Search for a command to run...',
35
32
  children,
36
33
  className,
37
34
  showCloseButton = true,
@@ -49,7 +46,7 @@ function CommandDialog({
49
46
  <DialogDescription>{description}</DialogDescription>
50
47
  </DialogHeader>
51
48
  <DialogContent
52
- className={cn("overflow-hidden p-0", className)}
49
+ className={cn('overflow-hidden p-0', className)}
53
50
  showCloseButton={showCloseButton}
54
51
  >
55
52
  <Command className="**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
@@ -65,16 +62,13 @@ function CommandInput({
65
62
  ...props
66
63
  }: React.ComponentProps<typeof CommandPrimitive.Input>) {
67
64
  return (
68
- <div
69
- data-slot="command-input-wrapper"
70
- className="flex h-9 items-center gap-2 border-b px-3"
71
- >
65
+ <div data-slot="command-input-wrapper" className="flex h-9 items-center gap-2 border-b px-3">
72
66
  <SearchIcon className="size-4 shrink-0 opacity-50" />
73
67
  <CommandPrimitive.Input
74
68
  data-slot="command-input"
75
69
  className={cn(
76
- "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
77
- className
70
+ 'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',
71
+ className,
78
72
  )}
79
73
  {...props}
80
74
  />
@@ -82,25 +76,17 @@ function CommandInput({
82
76
  )
83
77
  }
84
78
 
85
- function CommandList({
86
- className,
87
- ...props
88
- }: React.ComponentProps<typeof CommandPrimitive.List>) {
79
+ function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {
89
80
  return (
90
81
  <CommandPrimitive.List
91
82
  data-slot="command-list"
92
- className={cn(
93
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
94
- className
95
- )}
83
+ className={cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', className)}
96
84
  {...props}
97
85
  />
98
86
  )
99
87
  }
100
88
 
101
- function CommandEmpty({
102
- ...props
103
- }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
89
+ function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
104
90
  return (
105
91
  <CommandPrimitive.Empty
106
92
  data-slot="command-empty"
@@ -118,8 +104,8 @@ function CommandGroup({
118
104
  <CommandPrimitive.Group
119
105
  data-slot="command-group"
120
106
  className={cn(
121
- "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
122
- className
107
+ 'overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground',
108
+ className,
123
109
  )}
124
110
  {...props}
125
111
  />
@@ -133,39 +119,30 @@ function CommandSeparator({
133
119
  return (
134
120
  <CommandPrimitive.Separator
135
121
  data-slot="command-separator"
136
- className={cn("-mx-1 h-px bg-border", className)}
122
+ className={cn('-mx-1 h-px bg-border', className)}
137
123
  {...props}
138
124
  />
139
125
  )
140
126
  }
141
127
 
142
- function CommandItem({
143
- className,
144
- ...props
145
- }: React.ComponentProps<typeof CommandPrimitive.Item>) {
128
+ function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {
146
129
  return (
147
130
  <CommandPrimitive.Item
148
131
  data-slot="command-item"
149
132
  className={cn(
150
133
  "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
151
- className
134
+ className,
152
135
  )}
153
136
  {...props}
154
137
  />
155
138
  )
156
139
  }
157
140
 
158
- function CommandShortcut({
159
- className,
160
- ...props
161
- }: React.ComponentProps<"span">) {
141
+ function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {
162
142
  return (
163
143
  <span
164
144
  data-slot="command-shortcut"
165
- className={cn(
166
- "ml-auto text-xs tracking-widest text-muted-foreground",
167
- className
168
- )}
145
+ className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}
169
146
  {...props}
170
147
  />
171
148
  )
@@ -1,33 +1,25 @@
1
- "use client"
1
+ 'use client'
2
2
 
3
- import * as React from "react"
4
- import { XIcon } from "lucide-react"
5
- import { Dialog as DialogPrimitive } from "radix-ui"
3
+ import * as React from 'react'
4
+ import { XIcon } from 'lucide-react'
5
+ import { Dialog as DialogPrimitive } from 'radix-ui'
6
6
 
7
- import { cn } from "@/lib/utils"
8
- import { Button } from "@/components/ui/button"
7
+ import { cn } from '@/lib/utils'
8
+ import { Button } from '@/components/ui/button'
9
9
 
10
- function Dialog({
11
- ...props
12
- }: React.ComponentProps<typeof DialogPrimitive.Root>) {
10
+ function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
13
11
  return <DialogPrimitive.Root data-slot="dialog" {...props} />
14
12
  }
15
13
 
16
- function DialogTrigger({
17
- ...props
18
- }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
14
+ function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
19
15
  return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
20
16
  }
21
17
 
22
- function DialogPortal({
23
- ...props
24
- }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
18
+ function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
25
19
  return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
26
20
  }
27
21
 
28
- function DialogClose({
29
- ...props
30
- }: React.ComponentProps<typeof DialogPrimitive.Close>) {
22
+ function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
31
23
  return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
32
24
  }
33
25
 
@@ -39,8 +31,8 @@ function DialogOverlay({
39
31
  <DialogPrimitive.Overlay
40
32
  data-slot="dialog-overlay"
41
33
  className={cn(
42
- "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
43
- className
34
+ 'fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0',
35
+ className,
44
36
  )}
45
37
  {...props}
46
38
  />
@@ -61,8 +53,8 @@ function DialogContent({
61
53
  <DialogPrimitive.Content
62
54
  data-slot="dialog-content"
63
55
  className={cn(
64
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",
65
- className
56
+ 'fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg',
57
+ className,
66
58
  )}
67
59
  {...props}
68
60
  >
@@ -81,11 +73,11 @@ function DialogContent({
81
73
  )
82
74
  }
83
75
 
84
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
76
+ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
85
77
  return (
86
78
  <div
87
79
  data-slot="dialog-header"
88
- className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
80
+ className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
89
81
  {...props}
90
82
  />
91
83
  )
@@ -96,16 +88,13 @@ function DialogFooter({
96
88
  showCloseButton = false,
97
89
  children,
98
90
  ...props
99
- }: React.ComponentProps<"div"> & {
91
+ }: React.ComponentProps<'div'> & {
100
92
  showCloseButton?: boolean
101
93
  }) {
102
94
  return (
103
95
  <div
104
96
  data-slot="dialog-footer"
105
- className={cn(
106
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
107
- className
108
- )}
97
+ className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
109
98
  {...props}
110
99
  >
111
100
  {children}
@@ -118,14 +107,11 @@ function DialogFooter({
118
107
  )
119
108
  }
120
109
 
121
- function DialogTitle({
122
- className,
123
- ...props
124
- }: React.ComponentProps<typeof DialogPrimitive.Title>) {
110
+ function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
125
111
  return (
126
112
  <DialogPrimitive.Title
127
113
  data-slot="dialog-title"
128
- className={cn("text-lg leading-none font-semibold", className)}
114
+ className={cn('text-lg leading-none font-semibold', className)}
129
115
  {...props}
130
116
  />
131
117
  )
@@ -138,7 +124,7 @@ function DialogDescription({
138
124
  return (
139
125
  <DialogPrimitive.Description
140
126
  data-slot="dialog-description"
141
- className={cn("text-sm text-muted-foreground", className)}
127
+ className={cn('text-sm text-muted-foreground', className)}
142
128
  {...props}
143
129
  />
144
130
  )
@@ -1,31 +1,23 @@
1
- "use client"
1
+ 'use client'
2
2
 
3
- import * as React from "react"
4
- import { Drawer as DrawerPrimitive } from "vaul"
3
+ import * as React from 'react'
4
+ import { Drawer as DrawerPrimitive } from 'vaul'
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from '@/lib/utils'
7
7
 
8
- function Drawer({
9
- ...props
10
- }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
8
+ function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
11
9
  return <DrawerPrimitive.Root data-slot="drawer" {...props} />
12
10
  }
13
11
 
14
- function DrawerTrigger({
15
- ...props
16
- }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
12
+ function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
17
13
  return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
18
14
  }
19
15
 
20
- function DrawerPortal({
21
- ...props
22
- }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
16
+ function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
23
17
  return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
24
18
  }
25
19
 
26
- function DrawerClose({
27
- ...props
28
- }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
20
+ function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
29
21
  return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
30
22
  }
31
23
 
@@ -37,8 +29,8 @@ function DrawerOverlay({
37
29
  <DrawerPrimitive.Overlay
38
30
  data-slot="drawer-overlay"
39
31
  className={cn(
40
- "fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
41
- className
32
+ 'fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0',
33
+ className,
42
34
  )}
43
35
  {...props}
44
36
  />
@@ -56,12 +48,12 @@ function DrawerContent({
56
48
  <DrawerPrimitive.Content
57
49
  data-slot="drawer-content"
58
50
  className={cn(
59
- "group/drawer-content fixed z-50 flex h-auto flex-col bg-background",
60
- "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
61
- "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
62
- "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
63
- "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
64
- className
51
+ 'group/drawer-content fixed z-50 flex h-auto flex-col bg-background',
52
+ 'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b',
53
+ 'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t',
54
+ 'data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm',
55
+ 'data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm',
56
+ className,
65
57
  )}
66
58
  {...props}
67
59
  >
@@ -72,37 +64,34 @@ function DrawerContent({
72
64
  )
73
65
  }
74
66
 
75
- function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
67
+ function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
76
68
  return (
77
69
  <div
78
70
  data-slot="drawer-header"
79
71
  className={cn(
80
- "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
81
- className
72
+ 'flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left',
73
+ className,
82
74
  )}
83
75
  {...props}
84
76
  />
85
77
  )
86
78
  }
87
79
 
88
- function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
80
+ function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {
89
81
  return (
90
82
  <div
91
83
  data-slot="drawer-footer"
92
- className={cn("mt-auto flex flex-col gap-2 p-4", className)}
84
+ className={cn('mt-auto flex flex-col gap-2 p-4', className)}
93
85
  {...props}
94
86
  />
95
87
  )
96
88
  }
97
89
 
98
- function DrawerTitle({
99
- className,
100
- ...props
101
- }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
90
+ function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
102
91
  return (
103
92
  <DrawerPrimitive.Title
104
93
  data-slot="drawer-title"
105
- className={cn("font-semibold text-foreground", className)}
94
+ className={cn('font-semibold text-foreground', className)}
106
95
  {...props}
107
96
  />
108
97
  )
@@ -115,7 +104,7 @@ function DrawerDescription({
115
104
  return (
116
105
  <DrawerPrimitive.Description
117
106
  data-slot="drawer-description"
118
- className={cn("text-sm text-muted-foreground", className)}
107
+ className={cn('text-sm text-muted-foreground', className)}
119
108
  {...props}
120
109
  />
121
110
  )
@@ -1,34 +1,25 @@
1
- "use client"
1
+ 'use client'
2
2
 
3
- import * as React from "react"
4
- import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
5
- import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
3
+ import * as React from 'react'
4
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'
5
+ import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'
6
6
 
7
- import { cn } from "@/lib/utils"
7
+ import { cn } from '@/lib/utils'
8
8
 
9
- function DropdownMenu({
10
- ...props
11
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
9
+ function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
12
10
  return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
13
11
  }
14
12
 
15
13
  function DropdownMenuPortal({
16
14
  ...props
17
15
  }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
18
- return (
19
- <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
20
- )
16
+ return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
21
17
  }
22
18
 
23
19
  function DropdownMenuTrigger({
24
20
  ...props
25
21
  }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
26
- return (
27
- <DropdownMenuPrimitive.Trigger
28
- data-slot="dropdown-menu-trigger"
29
- {...props}
30
- />
31
- )
22
+ return <DropdownMenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
32
23
  }
33
24
 
34
25
  function DropdownMenuContent({
@@ -42,8 +33,8 @@ function DropdownMenuContent({
42
33
  data-slot="dropdown-menu-content"
43
34
  sideOffset={sideOffset}
44
35
  className={cn(
45
- "z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
46
- className
36
+ 'z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
37
+ className,
47
38
  )}
48
39
  {...props}
49
40
  />
@@ -51,22 +42,18 @@ function DropdownMenuContent({
51
42
  )
52
43
  }
53
44
 
54
- function DropdownMenuGroup({
55
- ...props
56
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
57
- return (
58
- <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
59
- )
45
+ function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
46
+ return <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
60
47
  }
61
48
 
62
49
  function DropdownMenuItem({
63
50
  className,
64
51
  inset,
65
- variant = "default",
52
+ variant = 'default',
66
53
  ...props
67
54
  }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
68
55
  inset?: boolean
69
- variant?: "default" | "destructive"
56
+ variant?: 'default' | 'destructive'
70
57
  }) {
71
58
  return (
72
59
  <DropdownMenuPrimitive.Item
@@ -75,7 +62,7 @@ function DropdownMenuItem({
75
62
  data-variant={variant}
76
63
  className={cn(
77
64
  "relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
78
- className
65
+ className,
79
66
  )}
80
67
  {...props}
81
68
  />
@@ -93,7 +80,7 @@ function DropdownMenuCheckboxItem({
93
80
  data-slot="dropdown-menu-checkbox-item"
94
81
  className={cn(
95
82
  "relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
96
- className
83
+ className,
97
84
  )}
98
85
  checked={checked!}
99
86
  {...props}
@@ -111,12 +98,7 @@ function DropdownMenuCheckboxItem({
111
98
  function DropdownMenuRadioGroup({
112
99
  ...props
113
100
  }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
114
- return (
115
- <DropdownMenuPrimitive.RadioGroup
116
- data-slot="dropdown-menu-radio-group"
117
- {...props}
118
- />
119
- )
101
+ return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />
120
102
  }
121
103
 
122
104
  function DropdownMenuRadioItem({
@@ -129,7 +111,7 @@ function DropdownMenuRadioItem({
129
111
  data-slot="dropdown-menu-radio-item"
130
112
  className={cn(
131
113
  "relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
132
- className
114
+ className,
133
115
  )}
134
116
  {...props}
135
117
  >
@@ -154,10 +136,7 @@ function DropdownMenuLabel({
154
136
  <DropdownMenuPrimitive.Label
155
137
  data-slot="dropdown-menu-label"
156
138
  data-inset={inset}
157
- className={cn(
158
- "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
159
- className
160
- )}
139
+ className={cn('px-2 py-1.5 text-sm font-medium data-[inset]:pl-8', className)}
161
140
  {...props}
162
141
  />
163
142
  )
@@ -170,31 +149,23 @@ function DropdownMenuSeparator({
170
149
  return (
171
150
  <DropdownMenuPrimitive.Separator
172
151
  data-slot="dropdown-menu-separator"
173
- className={cn("-mx-1 my-1 h-px bg-border", className)}
152
+ className={cn('-mx-1 my-1 h-px bg-border', className)}
174
153
  {...props}
175
154
  />
176
155
  )
177
156
  }
178
157
 
179
- function DropdownMenuShortcut({
180
- className,
181
- ...props
182
- }: React.ComponentProps<"span">) {
158
+ function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {
183
159
  return (
184
160
  <span
185
161
  data-slot="dropdown-menu-shortcut"
186
- className={cn(
187
- "ml-auto text-xs tracking-widest text-muted-foreground",
188
- className
189
- )}
162
+ className={cn('ml-auto text-xs tracking-widest text-muted-foreground', className)}
190
163
  {...props}
191
164
  />
192
165
  )
193
166
  }
194
167
 
195
- function DropdownMenuSub({
196
- ...props
197
- }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
168
+ function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
198
169
  return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
199
170
  }
200
171
 
@@ -212,7 +183,7 @@ function DropdownMenuSubTrigger({
212
183
  data-inset={inset}
213
184
  className={cn(
214
185
  "flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
215
- className
186
+ className,
216
187
  )}
217
188
  {...props}
218
189
  >
@@ -230,8 +201,8 @@ function DropdownMenuSubContent({
230
201
  <DropdownMenuPrimitive.SubContent
231
202
  data-slot="dropdown-menu-sub-content"
232
203
  className={cn(
233
- "z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
234
- className
204
+ 'z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
205
+ className,
235
206
  )}
236
207
  {...props}
237
208
  />