create-croissant 0.1.39 → 0.1.40

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 (155) hide show
  1. package/package.json +9 -9
  2. package/template/README.md +4 -4
  3. package/template/apps/desktop/electron-builder.yml +6 -6
  4. package/template/apps/desktop/electron.vite.config.ts +8 -8
  5. package/template/apps/desktop/package.json +5 -5
  6. package/template/apps/desktop/src/main/index.ts +32 -32
  7. package/template/apps/desktop/src/preload/index.d.ts +3 -3
  8. package/template/apps/desktop/src/preload/index.ts +8 -8
  9. package/template/apps/desktop/src/renderer/src/App.tsx +5 -5
  10. package/template/apps/desktop/src/renderer/src/assets/base.css +4 -4
  11. package/template/apps/desktop/src/renderer/src/assets/main.css +3 -3
  12. package/template/apps/desktop/src/renderer/src/components/Versions.tsx +4 -4
  13. package/template/apps/desktop/src/renderer/src/main.tsx +7 -7
  14. package/template/apps/desktop/tsconfig.json +1 -4
  15. package/template/apps/desktop/tsconfig.node.json +7 -1
  16. package/template/apps/desktop/tsconfig.web.json +3 -9
  17. package/template/apps/mobile/app/(tabs)/_layout.tsx +11 -10
  18. package/template/apps/mobile/app/(tabs)/explore.tsx +29 -27
  19. package/template/apps/mobile/app/(tabs)/index.tsx +25 -24
  20. package/template/apps/mobile/app/_layout.tsx +8 -8
  21. package/template/apps/mobile/app/modal.tsx +6 -6
  22. package/template/apps/mobile/components/external-link.tsx +5 -5
  23. package/template/apps/mobile/components/haptic-tab.tsx +4 -4
  24. package/template/apps/mobile/components/hello-wave.tsx +5 -4
  25. package/template/apps/mobile/components/parallax-scroll-view.tsx +15 -13
  26. package/template/apps/mobile/components/themed-text.tsx +14 -14
  27. package/template/apps/mobile/components/themed-view.tsx +3 -3
  28. package/template/apps/mobile/components/ui/collapsible.tsx +14 -13
  29. package/template/apps/mobile/components/ui/icon-symbol.ios.tsx +4 -4
  30. package/template/apps/mobile/components/ui/icon-symbol.tsx +9 -9
  31. package/template/apps/mobile/constants/theme.ts +19 -19
  32. package/template/apps/mobile/hooks/use-color-scheme.ts +1 -1
  33. package/template/apps/mobile/hooks/use-color-scheme.web.ts +3 -3
  34. package/template/apps/mobile/hooks/use-theme-color.ts +4 -4
  35. package/template/apps/mobile/package.json +3 -3
  36. package/template/apps/mobile/scripts/reset-project.js +2 -2
  37. package/template/apps/mobile/tsconfig.json +2 -9
  38. package/template/apps/platform/drizzle.config.ts +5 -5
  39. package/template/apps/platform/package.json +4 -4
  40. package/template/apps/platform/src/components/app-sidebar.tsx +60 -69
  41. package/template/apps/platform/src/components/login-form.tsx +32 -39
  42. package/template/apps/platform/src/components/search-form.tsx +5 -13
  43. package/template/apps/platform/src/components/signup-form.tsx +39 -49
  44. package/template/apps/platform/src/components/version-switcher.tsx +11 -21
  45. package/template/apps/platform/src/lib/auth-utils.ts +12 -14
  46. package/template/apps/platform/src/lib/orpc.ts +17 -17
  47. package/template/apps/platform/src/router.tsx +5 -5
  48. package/template/apps/platform/src/routes/__root.tsx +13 -15
  49. package/template/apps/platform/src/routes/_auth/account.tsx +61 -50
  50. package/template/apps/platform/src/routes/_auth/dashboard.tsx +17 -17
  51. package/template/apps/platform/src/routes/_auth/examples/client-orpc-auth.tsx +13 -13
  52. package/template/apps/platform/src/routes/_auth/examples/ssr-orpc-auth.tsx +16 -16
  53. package/template/apps/platform/src/routes/_auth.tsx +5 -5
  54. package/template/apps/platform/src/routes/_public/examples/client-orpc.tsx +108 -88
  55. package/template/apps/platform/src/routes/_public/examples/isr.tsx +14 -14
  56. package/template/apps/platform/src/routes/_public/examples/ssr-orpc.tsx +92 -75
  57. package/template/apps/platform/src/routes/_public/index.tsx +22 -19
  58. package/template/apps/platform/src/routes/_public/login.tsx +4 -4
  59. package/template/apps/platform/src/routes/_public/signup.tsx +6 -5
  60. package/template/apps/platform/src/routes/_public.tsx +5 -5
  61. package/template/apps/platform/src/routes/api/auth/$.ts +13 -13
  62. package/template/apps/platform/src/routes/api/rpc.$.ts +13 -13
  63. package/template/apps/platform/vite.config.ts +8 -8
  64. package/template/docker-compose.yml +1 -1
  65. package/template/package.json +24 -22
  66. package/template/packages/auth/package.json +9 -9
  67. package/template/packages/auth/src/lib/auth.ts +1 -1
  68. package/template/packages/db/package.json +7 -7
  69. package/template/packages/db/src/index.ts +4 -4
  70. package/template/packages/db/src/schema.ts +2 -2
  71. package/template/packages/orpc/package.json +6 -6
  72. package/template/packages/orpc/src/lib/planets.ts +39 -43
  73. package/template/packages/orpc/src/lib/router.ts +15 -15
  74. package/template/packages/ui/package.json +10 -10
  75. package/template/packages/ui/src/components/accordion.tsx +20 -22
  76. package/template/packages/ui/src/components/alert-dialog.tsx +31 -56
  77. package/template/packages/ui/src/components/alert.tsx +15 -23
  78. package/template/packages/ui/src/components/aspect-ratio.tsx +3 -3
  79. package/template/packages/ui/src/components/avatar.tsx +19 -35
  80. package/template/packages/ui/src/components/badge.tsx +13 -17
  81. package/template/packages/ui/src/components/breadcrumb.tsx +22 -44
  82. package/template/packages/ui/src/components/button-group.tsx +16 -25
  83. package/template/packages/ui/src/components/button.tsx +8 -9
  84. package/template/packages/ui/src/components/calendar.tsx +43 -82
  85. package/template/packages/ui/src/components/card.tsx +15 -26
  86. package/template/packages/ui/src/components/carousel.tsx +70 -78
  87. package/template/packages/ui/src/components/chart.tsx +84 -117
  88. package/template/packages/ui/src/components/checkbox.tsx +8 -9
  89. package/template/packages/ui/src/components/collapsible.tsx +5 -9
  90. package/template/packages/ui/src/components/combobox.tsx +44 -68
  91. package/template/packages/ui/src/components/command.tsx +32 -47
  92. package/template/packages/ui/src/components/context-menu.tsx +45 -71
  93. package/template/packages/ui/src/components/dialog.tsx +29 -51
  94. package/template/packages/ui/src/components/direction.tsx +1 -4
  95. package/template/packages/ui/src/components/drawer.tsx +24 -38
  96. package/template/packages/ui/src/components/dropdown-menu.tsx +45 -55
  97. package/template/packages/ui/src/components/empty.tsx +16 -27
  98. package/template/packages/ui/src/components/field.tsx +49 -63
  99. package/template/packages/ui/src/components/hover-card.tsx +9 -14
  100. package/template/packages/ui/src/components/input-group.tsx +40 -52
  101. package/template/packages/ui/src/components/input-otp.tsx +17 -18
  102. package/template/packages/ui/src/components/input.tsx +6 -6
  103. package/template/packages/ui/src/components/item.tsx +31 -44
  104. package/template/packages/ui/src/components/kbd.tsx +5 -5
  105. package/template/packages/ui/src/components/label.tsx +6 -6
  106. package/template/packages/ui/src/components/menubar.tsx +51 -64
  107. package/template/packages/ui/src/components/mode-toggle.tsx +9 -15
  108. package/template/packages/ui/src/components/native-select.tsx +18 -24
  109. package/template/packages/ui/src/components/navigation-menu.tsx +28 -35
  110. package/template/packages/ui/src/components/pagination.tsx +19 -31
  111. package/template/packages/ui/src/components/popover.tsx +13 -26
  112. package/template/packages/ui/src/components/progress.tsx +13 -30
  113. package/template/packages/ui/src/components/radio-group.tsx +7 -7
  114. package/template/packages/ui/src/components/resizable.tsx +12 -20
  115. package/template/packages/ui/src/components/scroll-area.tsx +8 -12
  116. package/template/packages/ui/src/components/select.tsx +31 -42
  117. package/template/packages/ui/src/components/separator.tsx +6 -10
  118. package/template/packages/ui/src/components/sheet.tsx +25 -38
  119. package/template/packages/ui/src/components/sidebar.tsx +137 -170
  120. package/template/packages/ui/src/components/skeleton.tsx +3 -3
  121. package/template/packages/ui/src/components/slider.tsx +5 -5
  122. package/template/packages/ui/src/components/sonner.tsx +20 -24
  123. package/template/packages/ui/src/components/spinner.tsx +10 -5
  124. package/template/packages/ui/src/components/switch.tsx +6 -6
  125. package/template/packages/ui/src/components/table.tsx +18 -45
  126. package/template/packages/ui/src/components/tabs.tsx +14 -22
  127. package/template/packages/ui/src/components/textarea.tsx +5 -5
  128. package/template/packages/ui/src/components/theme-provider.tsx +43 -48
  129. package/template/packages/ui/src/components/toggle-group.tsx +18 -20
  130. package/template/packages/ui/src/components/toggle.tsx +9 -10
  131. package/template/packages/ui/src/components/tooltip.tsx +10 -22
  132. package/template/packages/ui/src/hooks/use-mobile.ts +11 -11
  133. package/template/packages/ui/src/lib/utils.ts +4 -4
  134. package/template/packages/ui/src/styles/globals.css +106 -106
  135. package/template/turbo.json +15 -6
  136. package/template/.prettierignore +0 -10
  137. package/template/apps/desktop/.prettierignore +0 -6
  138. package/template/apps/desktop/eslint.config.ts +0 -11
  139. package/template/apps/desktop/prettier.config.ts +0 -3
  140. package/template/apps/mobile/eslint.config.js +0 -10
  141. package/template/apps/platform/eslint.config.ts +0 -11
  142. package/template/apps/platform/prettier.config.ts +0 -3
  143. package/template/packages/auth/eslint.config.ts +0 -3
  144. package/template/packages/auth/prettier.config.ts +0 -3
  145. package/template/packages/config-eslint/index.ts +0 -24
  146. package/template/packages/config-eslint/package.json +0 -11
  147. package/template/packages/config-prettier/index.ts +0 -14
  148. package/template/packages/config-prettier/package.json +0 -7
  149. package/template/packages/db/eslint.config.ts +0 -3
  150. package/template/packages/db/prettier.config.ts +0 -3
  151. package/template/packages/orpc/eslint.config.ts +0 -3
  152. package/template/packages/orpc/prettier.config.ts +0 -3
  153. package/template/packages/ui/eslint.config.ts +0 -3
  154. package/template/packages/ui/prettier.config.ts +0 -3
  155. package/template/prettier.config.ts +0 -15
@@ -1,19 +1,19 @@
1
- import * as React from "react"
2
- import { Menu as MenuPrimitive } from "@base-ui/react/menu"
1
+ import * as React from "react";
2
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
3
 
4
- import { CheckIcon, ChevronRightIcon } from "lucide-react"
5
- import { cn } from "@workspace/ui/lib/utils"
4
+ import { CheckIcon, ChevronRightIcon } from "lucide-react";
5
+ import { cn } from "@workspace/ui/lib/utils";
6
6
 
7
7
  function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
8
- return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
8
+ return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
9
9
  }
10
10
 
11
11
  function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
12
- return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
12
+ return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
13
13
  }
14
14
 
15
15
  function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
16
- return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
16
+ return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />;
17
17
  }
18
18
 
19
19
  function DropdownMenuContent({
@@ -24,10 +24,7 @@ function DropdownMenuContent({
24
24
  className,
25
25
  ...props
26
26
  }: MenuPrimitive.Popup.Props &
27
- Pick<
28
- MenuPrimitive.Positioner.Props,
29
- "align" | "alignOffset" | "side" | "sideOffset"
30
- >) {
27
+ Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
31
28
  return (
32
29
  <MenuPrimitive.Portal>
33
30
  <MenuPrimitive.Positioner
@@ -39,16 +36,19 @@ function DropdownMenuContent({
39
36
  >
40
37
  <MenuPrimitive.Popup
41
38
  data-slot="dropdown-menu-content"
42
- className={cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className )}
39
+ className={cn(
40
+ "z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
41
+ className,
42
+ )}
43
43
  {...props}
44
44
  />
45
45
  </MenuPrimitive.Positioner>
46
46
  </MenuPrimitive.Portal>
47
- )
47
+ );
48
48
  }
49
49
 
50
50
  function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
51
- return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
51
+ return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />;
52
52
  }
53
53
 
54
54
  function DropdownMenuLabel({
@@ -56,7 +56,7 @@ function DropdownMenuLabel({
56
56
  inset,
57
57
  ...props
58
58
  }: MenuPrimitive.GroupLabel.Props & {
59
- inset?: boolean
59
+ inset?: boolean;
60
60
  }) {
61
61
  return (
62
62
  <MenuPrimitive.GroupLabel
@@ -64,11 +64,11 @@ function DropdownMenuLabel({
64
64
  data-inset={inset}
65
65
  className={cn(
66
66
  "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
67
- className
67
+ className,
68
68
  )}
69
69
  {...props}
70
70
  />
71
- )
71
+ );
72
72
  }
73
73
 
74
74
  function DropdownMenuItem({
@@ -77,8 +77,8 @@ function DropdownMenuItem({
77
77
  variant = "default",
78
78
  ...props
79
79
  }: MenuPrimitive.Item.Props & {
80
- inset?: boolean
81
- variant?: "default" | "destructive"
80
+ inset?: boolean;
81
+ variant?: "default" | "destructive";
82
82
  }) {
83
83
  return (
84
84
  <MenuPrimitive.Item
@@ -87,15 +87,15 @@ function DropdownMenuItem({
87
87
  data-variant={variant}
88
88
  className={cn(
89
89
  "group/dropdown-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 not-data-[variant=destructive]: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 data-[variant=destructive]:*:[svg]:text-destructive",
90
- className
90
+ className,
91
91
  )}
92
92
  {...props}
93
93
  />
94
- )
94
+ );
95
95
  }
96
96
 
97
97
  function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
98
- return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
98
+ return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />;
99
99
  }
100
100
 
101
101
  function DropdownMenuSubTrigger({
@@ -104,7 +104,7 @@ function DropdownMenuSubTrigger({
104
104
  children,
105
105
  ...props
106
106
  }: MenuPrimitive.SubmenuTrigger.Props & {
107
- inset?: boolean
107
+ inset?: boolean;
108
108
  }) {
109
109
  return (
110
110
  <MenuPrimitive.SubmenuTrigger
@@ -112,14 +112,14 @@ function DropdownMenuSubTrigger({
112
112
  data-inset={inset}
113
113
  className={cn(
114
114
  "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 not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
115
- className
115
+ className,
116
116
  )}
117
117
  {...props}
118
118
  >
119
119
  {children}
120
120
  <ChevronRightIcon className="ml-auto" />
121
121
  </MenuPrimitive.SubmenuTrigger>
122
- )
122
+ );
123
123
  }
124
124
 
125
125
  function DropdownMenuSubContent({
@@ -133,14 +133,17 @@ function DropdownMenuSubContent({
133
133
  return (
134
134
  <DropdownMenuContent
135
135
  data-slot="dropdown-menu-sub-content"
136
- className={cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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-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 )}
136
+ className={cn(
137
+ "w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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-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",
138
+ className,
139
+ )}
137
140
  align={align}
138
141
  alignOffset={alignOffset}
139
142
  side={side}
140
143
  sideOffset={sideOffset}
141
144
  {...props}
142
145
  />
143
- )
146
+ );
144
147
  }
145
148
 
146
149
  function DropdownMenuCheckboxItem({
@@ -150,7 +153,7 @@ function DropdownMenuCheckboxItem({
150
153
  inset,
151
154
  ...props
152
155
  }: MenuPrimitive.CheckboxItem.Props & {
153
- inset?: boolean
156
+ inset?: boolean;
154
157
  }) {
155
158
  return (
156
159
  <MenuPrimitive.CheckboxItem
@@ -158,7 +161,7 @@ function DropdownMenuCheckboxItem({
158
161
  data-inset={inset}
159
162
  className={cn(
160
163
  "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 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",
161
- className
164
+ className,
162
165
  )}
163
166
  checked={checked}
164
167
  {...props}
@@ -168,22 +171,16 @@ function DropdownMenuCheckboxItem({
168
171
  data-slot="dropdown-menu-checkbox-item-indicator"
169
172
  >
170
173
  <MenuPrimitive.CheckboxItemIndicator>
171
- <CheckIcon
172
- />
174
+ <CheckIcon />
173
175
  </MenuPrimitive.CheckboxItemIndicator>
174
176
  </span>
175
177
  {children}
176
178
  </MenuPrimitive.CheckboxItem>
177
- )
179
+ );
178
180
  }
179
181
 
180
182
  function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
181
- return (
182
- <MenuPrimitive.RadioGroup
183
- data-slot="dropdown-menu-radio-group"
184
- {...props}
185
- />
186
- )
183
+ return <MenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />;
187
184
  }
188
185
 
189
186
  function DropdownMenuRadioItem({
@@ -192,7 +189,7 @@ function DropdownMenuRadioItem({
192
189
  inset,
193
190
  ...props
194
191
  }: MenuPrimitive.RadioItem.Props & {
195
- inset?: boolean
192
+ inset?: boolean;
196
193
  }) {
197
194
  return (
198
195
  <MenuPrimitive.RadioItem
@@ -200,7 +197,7 @@ function DropdownMenuRadioItem({
200
197
  data-inset={inset}
201
198
  className={cn(
202
199
  "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 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",
203
- className
200
+ className,
204
201
  )}
205
202
  {...props}
206
203
  >
@@ -209,42 +206,35 @@ function DropdownMenuRadioItem({
209
206
  data-slot="dropdown-menu-radio-item-indicator"
210
207
  >
211
208
  <MenuPrimitive.RadioItemIndicator>
212
- <CheckIcon
213
- />
209
+ <CheckIcon />
214
210
  </MenuPrimitive.RadioItemIndicator>
215
211
  </span>
216
212
  {children}
217
213
  </MenuPrimitive.RadioItem>
218
- )
214
+ );
219
215
  }
220
216
 
221
- function DropdownMenuSeparator({
222
- className,
223
- ...props
224
- }: MenuPrimitive.Separator.Props) {
217
+ function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) {
225
218
  return (
226
219
  <MenuPrimitive.Separator
227
220
  data-slot="dropdown-menu-separator"
228
221
  className={cn("-mx-1 my-1 h-px bg-border", className)}
229
222
  {...props}
230
223
  />
231
- )
224
+ );
232
225
  }
233
226
 
234
- function DropdownMenuShortcut({
235
- className,
236
- ...props
237
- }: React.ComponentProps<"span">) {
227
+ function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
238
228
  return (
239
229
  <span
240
230
  data-slot="dropdown-menu-shortcut"
241
231
  className={cn(
242
232
  "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
243
- className
233
+ className,
244
234
  )}
245
235
  {...props}
246
236
  />
247
- )
237
+ );
248
238
  }
249
239
 
250
240
  export {
@@ -263,4 +253,4 @@ export {
263
253
  DropdownMenuSub,
264
254
  DropdownMenuSubTrigger,
265
255
  DropdownMenuSubContent,
266
- }
256
+ };
@@ -1,7 +1,6 @@
1
- import { cva } from "class-variance-authority"
2
- import { cn } from "@workspace/ui/lib/utils"
3
- import type {VariantProps} from "class-variance-authority";
4
-
1
+ import { cva } from "class-variance-authority";
2
+ import { cn } from "@workspace/ui/lib/utils";
3
+ import type { VariantProps } from "class-variance-authority";
5
4
 
6
5
  function Empty({ className, ...props }: React.ComponentProps<"div">) {
7
6
  return (
@@ -9,11 +8,11 @@ function Empty({ className, ...props }: React.ComponentProps<"div">) {
9
8
  data-slot="empty"
10
9
  className={cn(
11
10
  "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
12
- className
11
+ className,
13
12
  )}
14
13
  {...props}
15
14
  />
16
- )
15
+ );
17
16
  }
18
17
 
19
18
  function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
@@ -23,7 +22,7 @@ function EmptyHeader({ className, ...props }: React.ComponentProps<"div">) {
23
22
  className={cn("flex max-w-sm flex-col items-center gap-2", className)}
24
23
  {...props}
25
24
  />
26
- )
25
+ );
27
26
  }
28
27
 
29
28
  const emptyMediaVariants = cva(
@@ -38,8 +37,8 @@ const emptyMediaVariants = cva(
38
37
  defaultVariants: {
39
38
  variant: "default",
40
39
  },
41
- }
42
- )
40
+ },
41
+ );
43
42
 
44
43
  function EmptyMedia({
45
44
  className,
@@ -53,20 +52,17 @@ function EmptyMedia({
53
52
  className={cn(emptyMediaVariants({ variant, className }))}
54
53
  {...props}
55
54
  />
56
- )
55
+ );
57
56
  }
58
57
 
59
58
  function EmptyTitle({ className, ...props }: React.ComponentProps<"div">) {
60
59
  return (
61
60
  <div
62
61
  data-slot="empty-title"
63
- className={cn(
64
- "font-heading text-sm font-medium tracking-tight",
65
- className
66
- )}
62
+ className={cn("font-heading text-sm font-medium tracking-tight", className)}
67
63
  {...props}
68
64
  />
69
- )
65
+ );
70
66
  }
71
67
 
72
68
  function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
@@ -75,11 +71,11 @@ function EmptyDescription({ className, ...props }: React.ComponentProps<"p">) {
75
71
  data-slot="empty-description"
76
72
  className={cn(
77
73
  "text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
78
- className
74
+ className,
79
75
  )}
80
76
  {...props}
81
77
  />
82
- )
78
+ );
83
79
  }
84
80
 
85
81
  function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
@@ -88,18 +84,11 @@ function EmptyContent({ className, ...props }: React.ComponentProps<"div">) {
88
84
  data-slot="empty-content"
89
85
  className={cn(
90
86
  "flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
91
- className
87
+ className,
92
88
  )}
93
89
  {...props}
94
90
  />
95
- )
91
+ );
96
92
  }
97
93
 
98
- export {
99
- Empty,
100
- EmptyHeader,
101
- EmptyTitle,
102
- EmptyDescription,
103
- EmptyContent,
104
- EmptyMedia,
105
- }
94
+ export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };
@@ -1,10 +1,10 @@
1
- import { useMemo } from "react"
2
- import { cva } from "class-variance-authority"
1
+ import { useMemo } from "react";
2
+ import { cva } from "class-variance-authority";
3
3
 
4
- import { cn } from "@workspace/ui/lib/utils"
5
- import { Label } from "@workspace/ui/components/label"
6
- import { Separator } from "@workspace/ui/components/separator"
7
- import type {VariantProps} from "class-variance-authority";
4
+ import { cn } from "@workspace/ui/lib/utils";
5
+ import { Label } from "@workspace/ui/components/label";
6
+ import { Separator } from "@workspace/ui/components/separator";
7
+ import type { VariantProps } from "class-variance-authority";
8
8
 
9
9
  function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
10
10
  return (
@@ -12,11 +12,11 @@ function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
12
12
  data-slot="field-set"
13
13
  className={cn(
14
14
  "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
15
- className
15
+ className,
16
16
  )}
17
17
  {...props}
18
18
  />
19
- )
19
+ );
20
20
  }
21
21
 
22
22
  function FieldLegend({
@@ -30,11 +30,11 @@ function FieldLegend({
30
30
  data-variant={variant}
31
31
  className={cn(
32
32
  "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
33
- className
33
+ className,
34
34
  )}
35
35
  {...props}
36
36
  />
37
- )
37
+ );
38
38
  }
39
39
 
40
40
  function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
@@ -43,30 +43,27 @@ function FieldGroup({ className, ...props }: React.ComponentProps<"div">) {
43
43
  data-slot="field-group"
44
44
  className={cn(
45
45
  "group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
46
- className
46
+ className,
47
47
  )}
48
48
  {...props}
49
49
  />
50
- )
50
+ );
51
51
  }
52
52
 
53
- const fieldVariants = cva(
54
- "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
55
- {
56
- variants: {
57
- orientation: {
58
- vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
59
- horizontal:
60
- "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
61
- responsive:
62
- "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
63
- },
53
+ const fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
54
+ variants: {
55
+ orientation: {
56
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
57
+ horizontal:
58
+ "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
59
+ responsive:
60
+ "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
64
61
  },
65
- defaultVariants: {
66
- orientation: "vertical",
67
- },
68
- }
69
- )
62
+ },
63
+ defaultVariants: {
64
+ orientation: "vertical",
65
+ },
66
+ });
70
67
 
71
68
  function Field({
72
69
  className,
@@ -81,37 +78,31 @@ function Field({
81
78
  className={cn(fieldVariants({ orientation }), className)}
82
79
  {...props}
83
80
  />
84
- )
81
+ );
85
82
  }
86
83
 
87
84
  function FieldContent({ className, ...props }: React.ComponentProps<"div">) {
88
85
  return (
89
86
  <div
90
87
  data-slot="field-content"
91
- className={cn(
92
- "group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
93
- className
94
- )}
88
+ className={cn("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", className)}
95
89
  {...props}
96
90
  />
97
- )
91
+ );
98
92
  }
99
93
 
100
- function FieldLabel({
101
- className,
102
- ...props
103
- }: React.ComponentProps<typeof Label>) {
94
+ function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {
104
95
  return (
105
96
  <Label
106
97
  data-slot="field-label"
107
98
  className={cn(
108
99
  "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
109
100
  "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
110
- className
101
+ className,
111
102
  )}
112
103
  {...props}
113
104
  />
114
- )
105
+ );
115
106
  }
116
107
 
117
108
  function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
@@ -120,11 +111,11 @@ function FieldTitle({ className, ...props }: React.ComponentProps<"div">) {
120
111
  data-slot="field-label"
121
112
  className={cn(
122
113
  "flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
123
- className
114
+ className,
124
115
  )}
125
116
  {...props}
126
117
  />
127
- )
118
+ );
128
119
  }
129
120
 
130
121
  function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {
@@ -135,11 +126,11 @@ function FieldDescription({ className, ...props }: React.ComponentProps<"p">) {
135
126
  "text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
136
127
  "last:mt-0 nth-last-2:-mt-1",
137
128
  "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
138
- className
129
+ className,
139
130
  )}
140
131
  {...props}
141
132
  />
142
- )
133
+ );
143
134
  }
144
135
 
145
136
  function FieldSeparator({
@@ -147,7 +138,7 @@ function FieldSeparator({
147
138
  className,
148
139
  ...props
149
140
  }: React.ComponentProps<"div"> & {
150
- children?: React.ReactNode
141
+ children?: React.ReactNode;
151
142
  }) {
152
143
  return (
153
144
  <div
@@ -155,7 +146,7 @@ function FieldSeparator({
155
146
  data-content={!!children}
156
147
  className={cn(
157
148
  "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
158
- className
149
+ className,
159
150
  )}
160
151
  {...props}
161
152
  >
@@ -169,7 +160,7 @@ function FieldSeparator({
169
160
  </span>
170
161
  )}
171
162
  </div>
172
- )
163
+ );
173
164
  }
174
165
 
175
166
  function FieldError({
@@ -178,37 +169,32 @@ function FieldError({
178
169
  errors,
179
170
  ...props
180
171
  }: React.ComponentProps<"div"> & {
181
- errors?: Array<{ message?: string } | undefined>
172
+ errors?: Array<{ message?: string } | undefined>;
182
173
  }) {
183
174
  const content = useMemo(() => {
184
175
  if (children) {
185
- return children
176
+ return children;
186
177
  }
187
178
 
188
179
  if (!errors?.length) {
189
- return null
180
+ return null;
190
181
  }
191
182
 
192
- const uniqueErrors = [
193
- ...new Map(errors.map((error) => [error?.message, error])).values(),
194
- ]
183
+ const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
195
184
 
196
185
  if (uniqueErrors.length == 1) {
197
- return uniqueErrors[0]?.message
186
+ return uniqueErrors[0]?.message;
198
187
  }
199
188
 
200
189
  return (
201
190
  <ul className="ml-4 flex list-disc flex-col gap-1">
202
- {uniqueErrors.map(
203
- (error, index) =>
204
- error?.message && <li key={index}>{error.message}</li>
205
- )}
191
+ {uniqueErrors.map((error, index) => error?.message && <li key={index}>{error.message}</li>)}
206
192
  </ul>
207
- )
208
- }, [children, errors])
193
+ );
194
+ }, [children, errors]);
209
195
 
210
196
  if (!content) {
211
- return null
197
+ return null;
212
198
  }
213
199
 
214
200
  return (
@@ -220,7 +206,7 @@ function FieldError({
220
206
  >
221
207
  {content}
222
208
  </div>
223
- )
209
+ );
224
210
  }
225
211
 
226
212
  export {
@@ -234,4 +220,4 @@ export {
234
220
  FieldSet,
235
221
  FieldContent,
236
222
  FieldTitle,
237
- }
223
+ };
@@ -1,17 +1,15 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card"
3
+ import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
4
4
 
5
- import { cn } from "@workspace/ui/lib/utils"
5
+ import { cn } from "@workspace/ui/lib/utils";
6
6
 
7
7
  function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props) {
8
- return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />
8
+ return <PreviewCardPrimitive.Root data-slot="hover-card" {...props} />;
9
9
  }
10
10
 
11
11
  function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props) {
12
- return (
13
- <PreviewCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />
14
- )
12
+ return <PreviewCardPrimitive.Trigger data-slot="hover-card-trigger" {...props} />;
15
13
  }
16
14
 
17
15
  function HoverCardContent({
@@ -22,10 +20,7 @@ function HoverCardContent({
22
20
  alignOffset = 4,
23
21
  ...props
24
22
  }: PreviewCardPrimitive.Popup.Props &
25
- Pick<
26
- PreviewCardPrimitive.Positioner.Props,
27
- "align" | "alignOffset" | "side" | "sideOffset"
28
- >) {
23
+ Pick<PreviewCardPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">) {
29
24
  return (
30
25
  <PreviewCardPrimitive.Portal data-slot="hover-card-portal">
31
26
  <PreviewCardPrimitive.Positioner
@@ -39,13 +34,13 @@ function HoverCardContent({
39
34
  data-slot="hover-card-content"
40
35
  className={cn(
41
36
  "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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",
42
- className
37
+ className,
43
38
  )}
44
39
  {...props}
45
40
  />
46
41
  </PreviewCardPrimitive.Positioner>
47
42
  </PreviewCardPrimitive.Portal>
48
- )
43
+ );
49
44
  }
50
45
 
51
- export { HoverCard, HoverCardTrigger, HoverCardContent }
46
+ export { HoverCard, HoverCardTrigger, HoverCardContent };