create-croissant 0.1.39 → 0.1.41

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 (164) hide show
  1. package/dist/index.js +5 -5
  2. package/package.json +7 -10
  3. package/template/.oxlintignore +11 -0
  4. package/template/README.md +6 -6
  5. package/template/apps/desktop/README.md +1 -1
  6. package/template/apps/desktop/electron-builder.yml +6 -6
  7. package/template/apps/desktop/electron.vite.config.ts +8 -8
  8. package/template/apps/desktop/package.json +4 -13
  9. package/template/apps/desktop/src/main/index.ts +32 -32
  10. package/template/apps/desktop/src/preload/index.d.ts +3 -3
  11. package/template/apps/desktop/src/preload/index.ts +8 -8
  12. package/template/apps/desktop/src/renderer/src/App.tsx +5 -5
  13. package/template/apps/desktop/src/renderer/src/assets/base.css +4 -4
  14. package/template/apps/desktop/src/renderer/src/assets/main.css +3 -3
  15. package/template/apps/desktop/src/renderer/src/components/Versions.tsx +4 -4
  16. package/template/apps/desktop/src/renderer/src/main.tsx +7 -7
  17. package/template/apps/desktop/tsconfig.json +1 -4
  18. package/template/apps/desktop/tsconfig.node.json +1 -1
  19. package/template/apps/desktop/tsconfig.web.json +4 -11
  20. package/template/apps/mobile/app/(tabs)/_layout.tsx +11 -10
  21. package/template/apps/mobile/app/(tabs)/explore.tsx +29 -27
  22. package/template/apps/mobile/app/(tabs)/index.tsx +25 -24
  23. package/template/apps/mobile/app/_layout.tsx +8 -8
  24. package/template/apps/mobile/app/modal.tsx +6 -6
  25. package/template/apps/mobile/components/external-link.tsx +5 -5
  26. package/template/apps/mobile/components/haptic-tab.tsx +4 -4
  27. package/template/apps/mobile/components/hello-wave.tsx +5 -4
  28. package/template/apps/mobile/components/parallax-scroll-view.tsx +15 -13
  29. package/template/apps/mobile/components/themed-text.tsx +14 -14
  30. package/template/apps/mobile/components/themed-view.tsx +3 -3
  31. package/template/apps/mobile/components/ui/collapsible.tsx +14 -13
  32. package/template/apps/mobile/components/ui/icon-symbol.ios.tsx +4 -4
  33. package/template/apps/mobile/components/ui/icon-symbol.tsx +9 -9
  34. package/template/apps/mobile/constants/theme.ts +19 -19
  35. package/template/apps/mobile/hooks/use-color-scheme.ts +1 -1
  36. package/template/apps/mobile/hooks/use-color-scheme.web.ts +3 -3
  37. package/template/apps/mobile/hooks/use-theme-color.ts +4 -4
  38. package/template/apps/mobile/package.json +3 -6
  39. package/template/apps/mobile/scripts/reset-project.js +2 -2
  40. package/template/apps/mobile/tsconfig.json +2 -9
  41. package/template/apps/platform/drizzle.config.ts +5 -5
  42. package/template/apps/platform/package.json +2 -6
  43. package/template/apps/platform/src/components/app-sidebar.tsx +60 -69
  44. package/template/apps/platform/src/components/login-form.tsx +32 -39
  45. package/template/apps/platform/src/components/search-form.tsx +5 -13
  46. package/template/apps/platform/src/components/signup-form.tsx +39 -49
  47. package/template/apps/platform/src/components/version-switcher.tsx +11 -21
  48. package/template/apps/platform/src/lib/auth-utils.ts +12 -14
  49. package/template/apps/platform/src/lib/orpc.ts +17 -17
  50. package/template/apps/platform/src/routeTree.gen.ts +264 -267
  51. package/template/apps/platform/src/router.tsx +5 -5
  52. package/template/apps/platform/src/routes/__root.tsx +13 -15
  53. package/template/apps/platform/src/routes/_auth/account.tsx +61 -50
  54. package/template/apps/platform/src/routes/_auth/dashboard.tsx +17 -17
  55. package/template/apps/platform/src/routes/_auth/examples/client-orpc-auth.tsx +13 -13
  56. package/template/apps/platform/src/routes/_auth/examples/ssr-orpc-auth.tsx +17 -17
  57. package/template/apps/platform/src/routes/_auth.tsx +5 -5
  58. package/template/apps/platform/src/routes/_public/examples/client-orpc.tsx +108 -88
  59. package/template/apps/platform/src/routes/_public/examples/isr.tsx +14 -14
  60. package/template/apps/platform/src/routes/_public/examples/ssr-orpc.tsx +92 -75
  61. package/template/apps/platform/src/routes/_public/index.tsx +22 -19
  62. package/template/apps/platform/src/routes/_public/login.tsx +4 -4
  63. package/template/apps/platform/src/routes/_public/signup.tsx +6 -5
  64. package/template/apps/platform/src/routes/_public.tsx +5 -5
  65. package/template/apps/platform/src/routes/api/auth/$.ts +13 -13
  66. package/template/apps/platform/src/routes/api/rpc.$.ts +13 -13
  67. package/template/apps/platform/tsconfig.json +1 -1
  68. package/template/apps/platform/vite.config.ts +8 -8
  69. package/template/docker-compose.yml +1 -1
  70. package/template/package.json +24 -22
  71. package/template/packages/auth/package.json +8 -12
  72. package/template/packages/auth/src/lib/auth.ts +1 -1
  73. package/template/packages/auth/tsconfig.json +1 -1
  74. package/template/packages/db/package.json +6 -10
  75. package/template/packages/db/src/index.ts +4 -4
  76. package/template/packages/db/src/schema.ts +2 -2
  77. package/template/packages/db/tsconfig.json +1 -1
  78. package/template/packages/orpc/package.json +6 -10
  79. package/template/packages/orpc/src/lib/planets.ts +39 -43
  80. package/template/packages/orpc/src/lib/router.ts +15 -15
  81. package/template/packages/orpc/tsconfig.json +1 -1
  82. package/template/packages/ui/package.json +8 -12
  83. package/template/packages/ui/src/components/accordion.tsx +20 -22
  84. package/template/packages/ui/src/components/alert-dialog.tsx +31 -56
  85. package/template/packages/ui/src/components/alert.tsx +15 -23
  86. package/template/packages/ui/src/components/aspect-ratio.tsx +3 -3
  87. package/template/packages/ui/src/components/avatar.tsx +19 -35
  88. package/template/packages/ui/src/components/badge.tsx +13 -17
  89. package/template/packages/ui/src/components/breadcrumb.tsx +22 -44
  90. package/template/packages/ui/src/components/button-group.tsx +16 -25
  91. package/template/packages/ui/src/components/button.tsx +8 -9
  92. package/template/packages/ui/src/components/calendar.tsx +43 -82
  93. package/template/packages/ui/src/components/card.tsx +15 -26
  94. package/template/packages/ui/src/components/carousel.tsx +70 -78
  95. package/template/packages/ui/src/components/chart.tsx +84 -117
  96. package/template/packages/ui/src/components/checkbox.tsx +8 -9
  97. package/template/packages/ui/src/components/collapsible.tsx +5 -9
  98. package/template/packages/ui/src/components/combobox.tsx +44 -68
  99. package/template/packages/ui/src/components/command.tsx +32 -47
  100. package/template/packages/ui/src/components/context-menu.tsx +45 -71
  101. package/template/packages/ui/src/components/dialog.tsx +29 -51
  102. package/template/packages/ui/src/components/direction.tsx +1 -4
  103. package/template/packages/ui/src/components/drawer.tsx +24 -38
  104. package/template/packages/ui/src/components/dropdown-menu.tsx +45 -55
  105. package/template/packages/ui/src/components/empty.tsx +16 -27
  106. package/template/packages/ui/src/components/field.tsx +49 -63
  107. package/template/packages/ui/src/components/hover-card.tsx +9 -14
  108. package/template/packages/ui/src/components/input-group.tsx +40 -52
  109. package/template/packages/ui/src/components/input-otp.tsx +17 -18
  110. package/template/packages/ui/src/components/input.tsx +6 -6
  111. package/template/packages/ui/src/components/item.tsx +31 -44
  112. package/template/packages/ui/src/components/kbd.tsx +5 -5
  113. package/template/packages/ui/src/components/label.tsx +6 -6
  114. package/template/packages/ui/src/components/menubar.tsx +51 -64
  115. package/template/packages/ui/src/components/mode-toggle.tsx +9 -15
  116. package/template/packages/ui/src/components/native-select.tsx +18 -24
  117. package/template/packages/ui/src/components/navigation-menu.tsx +28 -35
  118. package/template/packages/ui/src/components/pagination.tsx +19 -31
  119. package/template/packages/ui/src/components/popover.tsx +13 -26
  120. package/template/packages/ui/src/components/progress.tsx +13 -30
  121. package/template/packages/ui/src/components/radio-group.tsx +7 -7
  122. package/template/packages/ui/src/components/resizable.tsx +12 -20
  123. package/template/packages/ui/src/components/scroll-area.tsx +8 -12
  124. package/template/packages/ui/src/components/select.tsx +31 -42
  125. package/template/packages/ui/src/components/separator.tsx +6 -10
  126. package/template/packages/ui/src/components/sheet.tsx +25 -38
  127. package/template/packages/ui/src/components/sidebar.tsx +137 -170
  128. package/template/packages/ui/src/components/skeleton.tsx +3 -3
  129. package/template/packages/ui/src/components/slider.tsx +5 -5
  130. package/template/packages/ui/src/components/sonner.tsx +20 -24
  131. package/template/packages/ui/src/components/spinner.tsx +10 -5
  132. package/template/packages/ui/src/components/switch.tsx +6 -6
  133. package/template/packages/ui/src/components/table.tsx +18 -45
  134. package/template/packages/ui/src/components/tabs.tsx +14 -22
  135. package/template/packages/ui/src/components/textarea.tsx +5 -5
  136. package/template/packages/ui/src/components/theme-provider.tsx +43 -48
  137. package/template/packages/ui/src/components/toggle-group.tsx +18 -20
  138. package/template/packages/ui/src/components/toggle.tsx +9 -10
  139. package/template/packages/ui/src/components/tooltip.tsx +10 -22
  140. package/template/packages/ui/src/hooks/use-mobile.ts +11 -11
  141. package/template/packages/ui/src/lib/utils.ts +4 -4
  142. package/template/packages/ui/src/styles/globals.css +106 -106
  143. package/template/packages/ui/tsconfig.json +1 -1
  144. package/template/turbo.json +15 -6
  145. package/template/.prettierignore +0 -10
  146. package/template/apps/desktop/.prettierignore +0 -6
  147. package/template/apps/desktop/eslint.config.ts +0 -11
  148. package/template/apps/desktop/prettier.config.ts +0 -3
  149. package/template/apps/mobile/eslint.config.js +0 -10
  150. package/template/apps/platform/eslint.config.ts +0 -11
  151. package/template/apps/platform/prettier.config.ts +0 -3
  152. package/template/packages/auth/eslint.config.ts +0 -3
  153. package/template/packages/auth/prettier.config.ts +0 -3
  154. package/template/packages/config-eslint/index.ts +0 -24
  155. package/template/packages/config-eslint/package.json +0 -11
  156. package/template/packages/config-prettier/index.ts +0 -14
  157. package/template/packages/config-prettier/package.json +0 -7
  158. package/template/packages/db/eslint.config.ts +0 -3
  159. package/template/packages/db/prettier.config.ts +0 -3
  160. package/template/packages/orpc/eslint.config.ts +0 -3
  161. package/template/packages/orpc/prettier.config.ts +0 -3
  162. package/template/packages/ui/eslint.config.ts +0 -3
  163. package/template/packages/ui/prettier.config.ts +0 -3
  164. package/template/prettier.config.ts +0 -15
@@ -1,32 +1,27 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"
3
+ import * as React from "react";
4
+ import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
5
5
 
6
- import { CheckIcon, ChevronRightIcon } from "lucide-react"
7
- import { cn } from "@workspace/ui/lib/utils"
6
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
7
+ import { cn } from "@workspace/ui/lib/utils";
8
8
 
9
9
  function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
10
- return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />
10
+ return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
11
11
  }
12
12
 
13
13
  function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {
14
- return (
15
- <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
16
- )
14
+ return <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />;
17
15
  }
18
16
 
19
- function ContextMenuTrigger({
20
- className,
21
- ...props
22
- }: ContextMenuPrimitive.Trigger.Props) {
17
+ function ContextMenuTrigger({ className, ...props }: ContextMenuPrimitive.Trigger.Props) {
23
18
  return (
24
19
  <ContextMenuPrimitive.Trigger
25
20
  data-slot="context-menu-trigger"
26
21
  className={cn("select-none", className)}
27
22
  {...props}
28
23
  />
29
- )
24
+ );
30
25
  }
31
26
 
32
27
  function ContextMenuContent({
@@ -37,10 +32,7 @@ function ContextMenuContent({
37
32
  sideOffset = 0,
38
33
  ...props
39
34
  }: ContextMenuPrimitive.Popup.Props &
40
- Pick<
41
- ContextMenuPrimitive.Positioner.Props,
42
- "align" | "alignOffset" | "side" | "sideOffset"
43
- >) {
35
+ Pick<ContextMenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
44
36
  return (
45
37
  <ContextMenuPrimitive.Portal>
46
38
  <ContextMenuPrimitive.Positioner
@@ -52,18 +44,19 @@ function ContextMenuContent({
52
44
  >
53
45
  <ContextMenuPrimitive.Popup
54
46
  data-slot="context-menu-content"
55
- className={cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
47
+ className={cn(
48
+ "z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
49
+ className,
50
+ )}
56
51
  {...props}
57
52
  />
58
53
  </ContextMenuPrimitive.Positioner>
59
54
  </ContextMenuPrimitive.Portal>
60
- )
55
+ );
61
56
  }
62
57
 
63
58
  function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
64
- return (
65
- <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
66
- )
59
+ return <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />;
67
60
  }
68
61
 
69
62
  function ContextMenuLabel({
@@ -71,7 +64,7 @@ function ContextMenuLabel({
71
64
  inset,
72
65
  ...props
73
66
  }: ContextMenuPrimitive.GroupLabel.Props & {
74
- inset?: boolean
67
+ inset?: boolean;
75
68
  }) {
76
69
  return (
77
70
  <ContextMenuPrimitive.GroupLabel
@@ -79,11 +72,11 @@ function ContextMenuLabel({
79
72
  data-inset={inset}
80
73
  className={cn(
81
74
  "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
82
- className
75
+ className,
83
76
  )}
84
77
  {...props}
85
78
  />
86
- )
79
+ );
87
80
  }
88
81
 
89
82
  function ContextMenuItem({
@@ -92,8 +85,8 @@ function ContextMenuItem({
92
85
  variant = "default",
93
86
  ...props
94
87
  }: ContextMenuPrimitive.Item.Props & {
95
- inset?: boolean
96
- variant?: "default" | "destructive"
88
+ inset?: boolean;
89
+ variant?: "default" | "destructive";
97
90
  }) {
98
91
  return (
99
92
  <ContextMenuPrimitive.Item
@@ -102,17 +95,15 @@ function ContextMenuItem({
102
95
  data-variant={variant}
103
96
  className={cn(
104
97
  "group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 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 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
105
- className
98
+ className,
106
99
  )}
107
100
  {...props}
108
101
  />
109
- )
102
+ );
110
103
  }
111
104
 
112
105
  function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {
113
- return (
114
- <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />
115
- )
106
+ return <ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />;
116
107
  }
117
108
 
118
109
  function ContextMenuSubTrigger({
@@ -121,7 +112,7 @@ function ContextMenuSubTrigger({
121
112
  children,
122
113
  ...props
123
114
  }: ContextMenuPrimitive.SubmenuTrigger.Props & {
124
- inset?: boolean
115
+ inset?: boolean;
125
116
  }) {
126
117
  return (
127
118
  <ContextMenuPrimitive.SubmenuTrigger
@@ -129,19 +120,17 @@ function ContextMenuSubTrigger({
129
120
  data-inset={inset}
130
121
  className={cn(
131
122
  "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
132
- className
123
+ className,
133
124
  )}
134
125
  {...props}
135
126
  >
136
127
  {children}
137
128
  <ChevronRightIcon className="ml-auto" />
138
129
  </ContextMenuPrimitive.SubmenuTrigger>
139
- )
130
+ );
140
131
  }
141
132
 
142
- function ContextMenuSubContent({
143
- ...props
144
- }: React.ComponentProps<typeof ContextMenuContent>) {
133
+ function ContextMenuSubContent({ ...props }: React.ComponentProps<typeof ContextMenuContent>) {
145
134
  return (
146
135
  <ContextMenuContent
147
136
  data-slot="context-menu-sub-content"
@@ -149,7 +138,7 @@ function ContextMenuSubContent({
149
138
  side="right"
150
139
  {...props}
151
140
  />
152
- )
141
+ );
153
142
  }
154
143
 
155
144
  function ContextMenuCheckboxItem({
@@ -159,7 +148,7 @@ function ContextMenuCheckboxItem({
159
148
  inset,
160
149
  ...props
161
150
  }: ContextMenuPrimitive.CheckboxItem.Props & {
162
- inset?: boolean
151
+ inset?: boolean;
163
152
  }) {
164
153
  return (
165
154
  <ContextMenuPrimitive.CheckboxItem
@@ -167,31 +156,23 @@ function ContextMenuCheckboxItem({
167
156
  data-inset={inset}
168
157
  className={cn(
169
158
  "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
170
- className
159
+ className,
171
160
  )}
172
161
  checked={checked}
173
162
  {...props}
174
163
  >
175
164
  <span className="pointer-events-none absolute right-2">
176
165
  <ContextMenuPrimitive.CheckboxItemIndicator>
177
- <CheckIcon
178
- />
166
+ <CheckIcon />
179
167
  </ContextMenuPrimitive.CheckboxItemIndicator>
180
168
  </span>
181
169
  {children}
182
170
  </ContextMenuPrimitive.CheckboxItem>
183
- )
171
+ );
184
172
  }
185
173
 
186
- function ContextMenuRadioGroup({
187
- ...props
188
- }: ContextMenuPrimitive.RadioGroup.Props) {
189
- return (
190
- <ContextMenuPrimitive.RadioGroup
191
- data-slot="context-menu-radio-group"
192
- {...props}
193
- />
194
- )
174
+ function ContextMenuRadioGroup({ ...props }: ContextMenuPrimitive.RadioGroup.Props) {
175
+ return <ContextMenuPrimitive.RadioGroup data-slot="context-menu-radio-group" {...props} />;
195
176
  }
196
177
 
197
178
  function ContextMenuRadioItem({
@@ -200,7 +181,7 @@ function ContextMenuRadioItem({
200
181
  inset,
201
182
  ...props
202
183
  }: ContextMenuPrimitive.RadioItem.Props & {
203
- inset?: boolean
184
+ inset?: boolean;
204
185
  }) {
205
186
  return (
206
187
  <ContextMenuPrimitive.RadioItem
@@ -208,48 +189,41 @@ function ContextMenuRadioItem({
208
189
  data-inset={inset}
209
190
  className={cn(
210
191
  "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
211
- className
192
+ className,
212
193
  )}
213
194
  {...props}
214
195
  >
215
196
  <span className="pointer-events-none absolute right-2">
216
197
  <ContextMenuPrimitive.RadioItemIndicator>
217
- <CheckIcon
218
- />
198
+ <CheckIcon />
219
199
  </ContextMenuPrimitive.RadioItemIndicator>
220
200
  </span>
221
201
  {children}
222
202
  </ContextMenuPrimitive.RadioItem>
223
- )
203
+ );
224
204
  }
225
205
 
226
- function ContextMenuSeparator({
227
- className,
228
- ...props
229
- }: ContextMenuPrimitive.Separator.Props) {
206
+ function ContextMenuSeparator({ className, ...props }: ContextMenuPrimitive.Separator.Props) {
230
207
  return (
231
208
  <ContextMenuPrimitive.Separator
232
209
  data-slot="context-menu-separator"
233
210
  className={cn("-mx-1 my-1 h-px bg-border", className)}
234
211
  {...props}
235
212
  />
236
- )
213
+ );
237
214
  }
238
215
 
239
- function ContextMenuShortcut({
240
- className,
241
- ...props
242
- }: React.ComponentProps<"span">) {
216
+ function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
243
217
  return (
244
218
  <span
245
219
  data-slot="context-menu-shortcut"
246
220
  className={cn(
247
221
  "ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",
248
- className
222
+ className,
249
223
  )}
250
224
  {...props}
251
225
  />
252
- )
226
+ );
253
227
  }
254
228
 
255
229
  export {
@@ -268,4 +242,4 @@ export {
268
242
  ContextMenuSubContent,
269
243
  ContextMenuSubTrigger,
270
244
  ContextMenuRadioGroup,
271
- }
245
+ };
@@ -1,40 +1,37 @@
1
- import * as React from "react"
2
- import { Dialog as DialogPrimitive } from "@base-ui/react/dialog"
1
+ import * as React from "react";
2
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
3
3
 
4
- import { XIcon } from "lucide-react"
5
- import { cn } from "@workspace/ui/lib/utils"
6
- import { Button } from "@workspace/ui/components/button"
4
+ import { XIcon } from "lucide-react";
5
+ import { cn } from "@workspace/ui/lib/utils";
6
+ import { Button } from "@workspace/ui/components/button";
7
7
 
8
8
  function Dialog({ ...props }: DialogPrimitive.Root.Props) {
9
- return <DialogPrimitive.Root data-slot="dialog" {...props} />
9
+ return <DialogPrimitive.Root data-slot="dialog" {...props} />;
10
10
  }
11
11
 
12
12
  function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
13
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
13
+ return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
14
14
  }
15
15
 
16
16
  function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
17
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
17
+ return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
18
18
  }
19
19
 
20
20
  function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
21
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
21
+ return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
22
22
  }
23
23
 
24
- function DialogOverlay({
25
- className,
26
- ...props
27
- }: DialogPrimitive.Backdrop.Props) {
24
+ function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {
28
25
  return (
29
26
  <DialogPrimitive.Backdrop
30
27
  data-slot="dialog-overlay"
31
28
  className={cn(
32
29
  "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
33
- className
30
+ className,
34
31
  )}
35
32
  {...props}
36
33
  />
37
- )
34
+ );
38
35
  }
39
36
 
40
37
  function DialogContent({
@@ -43,7 +40,7 @@ function DialogContent({
43
40
  showCloseButton = true,
44
41
  ...props
45
42
  }: DialogPrimitive.Popup.Props & {
46
- showCloseButton?: boolean
43
+ showCloseButton?: boolean;
47
44
  }) {
48
45
  return (
49
46
  <DialogPortal>
@@ -52,7 +49,7 @@ function DialogContent({
52
49
  data-slot="dialog-content"
53
50
  className={cn(
54
51
  "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
55
- className
52
+ className,
56
53
  )}
57
54
  {...props}
58
55
  >
@@ -60,32 +57,21 @@ function DialogContent({
60
57
  {showCloseButton && (
61
58
  <DialogPrimitive.Close
62
59
  data-slot="dialog-close"
63
- render={
64
- <Button
65
- variant="ghost"
66
- className="absolute top-2 right-2"
67
- size="icon-sm"
68
- />
69
- }
60
+ render={<Button variant="ghost" className="absolute top-2 right-2" size="icon-sm" />}
70
61
  >
71
- <XIcon
72
- />
62
+ <XIcon />
73
63
  <span className="sr-only">Close</span>
74
64
  </DialogPrimitive.Close>
75
65
  )}
76
66
  </DialogPrimitive.Popup>
77
67
  </DialogPortal>
78
- )
68
+ );
79
69
  }
80
70
 
81
71
  function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
82
72
  return (
83
- <div
84
- data-slot="dialog-header"
85
- className={cn("flex flex-col gap-2", className)}
86
- {...props}
87
- />
88
- )
73
+ <div data-slot="dialog-header" className={cn("flex flex-col gap-2", className)} {...props} />
74
+ );
89
75
  }
90
76
 
91
77
  function DialogFooter({
@@ -94,54 +80,46 @@ function DialogFooter({
94
80
  children,
95
81
  ...props
96
82
  }: React.ComponentProps<"div"> & {
97
- showCloseButton?: boolean
83
+ showCloseButton?: boolean;
98
84
  }) {
99
85
  return (
100
86
  <div
101
87
  data-slot="dialog-footer"
102
88
  className={cn(
103
89
  "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
104
- className
90
+ className,
105
91
  )}
106
92
  {...props}
107
93
  >
108
94
  {children}
109
95
  {showCloseButton && (
110
- <DialogPrimitive.Close render={<Button variant="outline" />}>
111
- Close
112
- </DialogPrimitive.Close>
96
+ <DialogPrimitive.Close render={<Button variant="outline" />}>Close</DialogPrimitive.Close>
113
97
  )}
114
98
  </div>
115
- )
99
+ );
116
100
  }
117
101
 
118
102
  function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
119
103
  return (
120
104
  <DialogPrimitive.Title
121
105
  data-slot="dialog-title"
122
- className={cn(
123
- "font-heading text-base leading-none font-medium",
124
- className
125
- )}
106
+ className={cn("font-heading text-base leading-none font-medium", className)}
126
107
  {...props}
127
108
  />
128
- )
109
+ );
129
110
  }
130
111
 
131
- function DialogDescription({
132
- className,
133
- ...props
134
- }: DialogPrimitive.Description.Props) {
112
+ function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props) {
135
113
  return (
136
114
  <DialogPrimitive.Description
137
115
  data-slot="dialog-description"
138
116
  className={cn(
139
117
  "text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
140
- className
118
+ className,
141
119
  )}
142
120
  {...props}
143
121
  />
144
- )
122
+ );
145
123
  }
146
124
 
147
125
  export {
@@ -155,4 +133,4 @@ export {
155
133
  DialogPortal,
156
134
  DialogTitle,
157
135
  DialogTrigger,
158
- }
136
+ };
@@ -1,4 +1 @@
1
- export {
2
- DirectionProvider,
3
- useDirection,
4
- } from "@base-ui/react/direction-provider"
1
+ export { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
@@ -1,32 +1,24 @@
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 "@workspace/ui/lib/utils"
6
+ import { cn } from "@workspace/ui/lib/utils";
7
7
 
8
- function Drawer({
9
- ...props
10
- }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
11
- return <DrawerPrimitive.Root data-slot="drawer" {...props} />
8
+ function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
9
+ return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
12
10
  }
13
11
 
14
- function DrawerTrigger({
15
- ...props
16
- }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
17
- return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />
12
+ function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
13
+ return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
18
14
  }
19
15
 
20
- function DrawerPortal({
21
- ...props
22
- }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
23
- return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />
16
+ function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
17
+ return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
24
18
  }
25
19
 
26
- function DrawerClose({
27
- ...props
28
- }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
29
- return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />
20
+ function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
21
+ return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
30
22
  }
31
23
 
32
24
  function DrawerOverlay({
@@ -38,11 +30,11 @@ function DrawerOverlay({
38
30
  data-slot="drawer-overlay"
39
31
  className={cn(
40
32
  "fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
41
- className
33
+ className,
42
34
  )}
43
35
  {...props}
44
36
  />
45
- )
37
+ );
46
38
  }
47
39
 
48
40
  function DrawerContent({
@@ -57,7 +49,7 @@ function DrawerContent({
57
49
  data-slot="drawer-content"
58
50
  className={cn(
59
51
  "group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground 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-xl data-[vaul-drawer-direction=bottom]:border-t 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]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r 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]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l 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-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",
60
- className
52
+ className,
61
53
  )}
62
54
  {...props}
63
55
  >
@@ -65,7 +57,7 @@ function DrawerContent({
65
57
  {children}
66
58
  </DrawerPrimitive.Content>
67
59
  </DrawerPortal>
68
- )
60
+ );
69
61
  }
70
62
 
71
63
  function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
@@ -74,11 +66,11 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
74
66
  data-slot="drawer-header"
75
67
  className={cn(
76
68
  "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-0.5 md:text-left",
77
- className
69
+ className,
78
70
  )}
79
71
  {...props}
80
72
  />
81
- )
73
+ );
82
74
  }
83
75
 
84
76
  function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
@@ -88,23 +80,17 @@ function DrawerFooter({ className, ...props }: React.ComponentProps<"div">) {
88
80
  className={cn("mt-auto flex flex-col gap-2 p-4", className)}
89
81
  {...props}
90
82
  />
91
- )
83
+ );
92
84
  }
93
85
 
94
- function DrawerTitle({
95
- className,
96
- ...props
97
- }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
86
+ function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
98
87
  return (
99
88
  <DrawerPrimitive.Title
100
89
  data-slot="drawer-title"
101
- className={cn(
102
- "font-heading text-base font-medium text-foreground",
103
- className
104
- )}
90
+ className={cn("font-heading text-base font-medium text-foreground", className)}
105
91
  {...props}
106
92
  />
107
- )
93
+ );
108
94
  }
109
95
 
110
96
  function DrawerDescription({
@@ -117,7 +103,7 @@ function DrawerDescription({
117
103
  className={cn("text-sm text-muted-foreground", className)}
118
104
  {...props}
119
105
  />
120
- )
106
+ );
121
107
  }
122
108
 
123
109
  export {
@@ -131,4 +117,4 @@ export {
131
117
  DrawerFooter,
132
118
  DrawerTitle,
133
119
  DrawerDescription,
134
- }
120
+ };