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,28 +1,24 @@
1
1
  {
2
2
  "name": "@workspace/auth",
3
3
  "version": "0.0.0",
4
- "type": "module",
5
4
  "private": true,
5
+ "type": "module",
6
+ "exports": {
7
+ "./lib/*": "./src/lib/*.ts",
8
+ "./hooks/*": "./src/hooks/*.ts"
9
+ },
6
10
  "scripts": {
7
- "lint": "eslint",
8
- "format": "prettier --write \"**/*.{ts,tsx}\"",
9
11
  "typecheck": "tsc --noEmit",
10
12
  "generate": "better-auth generate --output ../db/src/lib/auth-schema.ts"
11
13
  },
12
14
  "dependencies": {
13
- "better-auth": "^1.6.9",
14
- "@workspace/db": "*"
15
+ "@workspace/db": "*",
16
+ "better-auth": "^1.6.9"
15
17
  },
16
18
  "devDependencies": {
17
- "@workspace/config-eslint": "*",
18
- "@workspace/config-typescript": "*",
19
- "@workspace/config-prettier": "*",
20
19
  "@better-auth/cli": "^1.4.22",
20
+ "@workspace/config-typescript": "*",
21
21
  "drizzle-kit": "^0.31.10",
22
22
  "tsx": "^4.21.0"
23
- },
24
- "exports": {
25
- "./lib/*": "./src/lib/*.ts",
26
- "./hooks/*": "./src/hooks/*.ts"
27
23
  }
28
24
  }
@@ -10,4 +10,4 @@ export const auth = betterAuth({
10
10
  emailAndPassword: { enabled: true },
11
11
  });
12
12
 
13
- export type Session = typeof auth.$Infer.Session
13
+ export type Session = typeof auth.$Infer.Session;
@@ -5,6 +5,6 @@
5
5
  "@workspace/auth/*": ["./src/*"]
6
6
  }
7
7
  },
8
- "include": ["src", "eslint.config.ts", "prettier.config.ts"],
8
+ "include": ["src"],
9
9
  "exclude": ["node_modules", "dist"]
10
10
  }
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@workspace/db",
3
3
  "version": "0.0.0",
4
- "type": "module",
5
4
  "private": true,
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./src/index.ts",
8
+ "./schema": "./src/schema.ts"
9
+ },
6
10
  "scripts": {
7
- "lint": "eslint",
8
- "format": "prettier --write \"**/*.{ts,tsx}\"",
9
11
  "typecheck": "tsc --noEmit",
10
12
  "db:push": "drizzle-kit push",
11
13
  "db:studio": "drizzle-kit studio"
@@ -16,15 +18,9 @@
16
18
  "pg": "^8.20.0"
17
19
  },
18
20
  "devDependencies": {
19
- "@workspace/config-eslint": "*",
20
- "@workspace/config-typescript": "*",
21
- "@workspace/config-prettier": "*",
22
21
  "@types/pg": "^8.20.0",
22
+ "@workspace/config-typescript": "*",
23
23
  "drizzle-kit": "^0.31.10",
24
24
  "tsx": "^4.21.0"
25
- },
26
- "exports": {
27
- ".": "./src/index.ts",
28
- "./schema": "./src/schema.ts"
29
25
  }
30
26
  }
@@ -1,7 +1,7 @@
1
- import 'dotenv/config';
2
- import { drizzle } from 'drizzle-orm/node-postgres';
3
- import * as schema from './schema';
1
+ import "dotenv/config";
2
+ import { drizzle } from "drizzle-orm/node-postgres";
3
+ import * as schema from "./schema";
4
4
 
5
5
  export const db = drizzle(process.env.DATABASE_URL!, { schema });
6
6
 
7
- export { schema };
7
+ export { schema };
@@ -1,2 +1,2 @@
1
- export * from "./auth-schema"
2
- export * from "./planets-schema"
1
+ export * from "./auth-schema";
2
+ export * from "./planets-schema";
@@ -5,6 +5,6 @@
5
5
  "@workspace/db/*": ["./src/*"]
6
6
  }
7
7
  },
8
- "include": ["src", "eslint.config.ts", "prettier.config.ts"],
8
+ "include": ["src"],
9
9
  "exclude": ["node_modules", "dist"]
10
10
  }
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@workspace/orpc",
3
3
  "version": "0.0.0",
4
- "type": "module",
5
4
  "private": true,
5
+ "type": "module",
6
+ "exports": {
7
+ "./router": "./src/lib/router.ts"
8
+ },
6
9
  "scripts": {
7
- "lint": "eslint",
8
- "format": "prettier --write \"**/*.{ts,tsx}\"",
9
10
  "typecheck": "tsc --noEmit"
10
11
  },
11
12
  "dependencies": {
@@ -15,12 +16,7 @@
15
16
  "@workspace/db": "*"
16
17
  },
17
18
  "devDependencies": {
18
- "@workspace/config-eslint": "*",
19
- "@workspace/config-typescript": "*",
20
- "@workspace/config-prettier": "*",
21
- "@types/node": "^22.19.1"
22
- },
23
- "exports": {
24
- "./router": "./src/lib/router.ts"
19
+ "@types/node": "^22.19.1",
20
+ "@workspace/config-typescript": "*"
25
21
  }
26
22
  }
@@ -1,79 +1,75 @@
1
- import { ORPCError, os } from '@orpc/server'
2
- import { db, schema } from '@workspace/db'
3
- import { eq } from 'drizzle-orm'
4
- import { type } from 'arktype'
5
- import type { RPCContext } from './router'
1
+ import { ORPCError, os } from "@orpc/server";
2
+ import { db, schema } from "@workspace/db";
3
+ import { eq } from "drizzle-orm";
4
+ import { type } from "arktype";
5
+ import type { RPCContext } from "./router";
6
6
 
7
- const { planets } = schema
7
+ const { planets } = schema;
8
8
 
9
- const o = os.$context<RPCContext>()
9
+ const o = os.$context<RPCContext>();
10
10
 
11
11
  export const planetRouter = o.router({
12
- getPlanets: o
13
- .handler(async () => {
14
- const allPlanets = await db.select().from(planets)
15
- return allPlanets
16
- }),
12
+ getPlanets: o.handler(async () => {
13
+ const allPlanets = await db.select().from(planets);
14
+ return allPlanets;
15
+ }),
17
16
 
18
17
  createPlanet: o
19
18
  .input(
20
19
  type({
21
- name: 'string>0',
22
- 'description?': 'string',
23
- distanceFromSun: 'number',
24
- diameter: 'number',
25
- 'hasRings?': 'boolean',
26
- 'atmosphere?': 'string',
20
+ name: "string>0",
21
+ "description?": "string",
22
+ distanceFromSun: "number",
23
+ diameter: "number",
24
+ "hasRings?": "boolean",
25
+ "atmosphere?": "string",
27
26
  }),
28
27
  )
29
28
  .handler(async ({ input }) => {
30
- const [newPlanet] = await db.insert(planets).values(input).returning()
31
- return newPlanet
29
+ const [newPlanet] = await db.insert(planets).values(input).returning();
30
+ return newPlanet;
32
31
  }),
33
32
 
34
33
  updatePlanet: o
35
34
  .input(
36
35
  type({
37
- id: 'number',
38
- name: 'string>0',
39
- 'description?': 'string',
40
- distanceFromSun: 'number',
41
- diameter: 'number',
42
- hasRings: 'boolean',
43
- 'atmosphere?': 'string',
36
+ id: "number",
37
+ name: "string>0",
38
+ "description?": "string",
39
+ distanceFromSun: "number",
40
+ diameter: "number",
41
+ hasRings: "boolean",
42
+ "atmosphere?": "string",
44
43
  }),
45
44
  )
46
45
  .handler(async ({ input }) => {
47
- const { id, ...data } = input
46
+ const { id, ...data } = input;
48
47
  const results = await db
49
48
  .update(planets)
50
49
  .set({ ...data, updatedAt: new Date() })
51
50
  .where(eq(planets.id, id))
52
- .returning()
53
-
51
+ .returning();
52
+
54
53
  if (results.length === 0) {
55
- throw new ORPCError('NOT_FOUND')
54
+ throw new ORPCError("NOT_FOUND");
56
55
  }
57
-
58
- return results[0]
56
+
57
+ return results[0];
59
58
  }),
60
59
 
61
60
  deletePlanet: o
62
61
  .input(
63
62
  type({
64
- id: 'number',
63
+ id: "number",
65
64
  }),
66
65
  )
67
66
  .handler(async ({ input }) => {
68
- const results = await db
69
- .delete(planets)
70
- .where(eq(planets.id, input.id))
71
- .returning()
72
-
67
+ const results = await db.delete(planets).where(eq(planets.id, input.id)).returning();
68
+
73
69
  if (results.length === 0) {
74
- throw new ORPCError('NOT_FOUND')
70
+ throw new ORPCError("NOT_FOUND");
75
71
  }
76
-
77
- return results[0]
72
+
73
+ return results[0];
78
74
  }),
79
- })
75
+ });
@@ -1,13 +1,13 @@
1
- import { ORPCError, os } from '@orpc/server'
2
- import { type } from 'arktype'
3
- import { planetRouter } from './planets'
4
- import type { Session } from '@workspace/auth/lib/auth'
1
+ import { ORPCError, os } from "@orpc/server";
2
+ import { type } from "arktype";
3
+ import { planetRouter } from "./planets";
4
+ import type { Session } from "@workspace/auth/lib/auth";
5
5
 
6
6
  export type RPCContext = {
7
- session: Session | null
8
- }
7
+ session: Session | null;
8
+ };
9
9
 
10
- const o = os.$context<RPCContext>()
10
+ const o = os.$context<RPCContext>();
11
11
 
12
12
  export const router = o.router({
13
13
  planets: planetRouter,
@@ -15,32 +15,32 @@ export const router = o.router({
15
15
  hello: o
16
16
  .input(
17
17
  type({
18
- 'name?': 'string',
18
+ "name?": "string",
19
19
  }),
20
20
  )
21
21
  .handler(({ input }) => {
22
22
  return {
23
- message: `Hello, ${input.name ?? 'world'}!`,
24
- }
23
+ message: `Hello, ${input.name ?? "world"}!`,
24
+ };
25
25
  }),
26
26
 
27
27
  getSecretData: o
28
28
  .use(async ({ context, next }) => {
29
29
  if (!context.session) {
30
- throw new ORPCError('UNAUTHORIZED')
30
+ throw new ORPCError("UNAUTHORIZED");
31
31
  }
32
32
  return next({
33
33
  context: {
34
34
  session: context.session,
35
35
  },
36
- })
36
+ });
37
37
  })
38
38
  .handler(({ context }) => {
39
39
  return {
40
40
  secret: `This is secret data for ${context.session.user.name}`,
41
41
  email: context.session.user.email,
42
- }
42
+ };
43
43
  }),
44
- })
44
+ });
45
45
 
46
- export type AppRouter = typeof router
46
+ export type AppRouter = typeof router;
@@ -5,6 +5,6 @@
5
5
  "@workspace/orpc/*": ["./src/*"]
6
6
  }
7
7
  },
8
- "include": ["src", "eslint.config.ts", "prettier.config.ts"],
8
+ "include": ["src"],
9
9
  "exclude": ["node_modules", "dist"]
10
10
  }
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@workspace/ui",
3
3
  "version": "0.0.0",
4
- "type": "module",
5
4
  "private": true,
5
+ "type": "module",
6
+ "exports": {
7
+ "./globals.css": "./src/styles/globals.css",
8
+ "./lib/*": "./src/lib/*.ts",
9
+ "./components/*": "./src/components/*.tsx",
10
+ "./hooks/*": "./src/hooks/*.ts"
11
+ },
6
12
  "scripts": {
7
- "lint": "eslint",
8
- "format": "prettier --write \"**/*.{ts,tsx}\"",
9
13
  "typecheck": "tsc --noEmit"
10
14
  },
11
15
  "dependencies": {
@@ -31,20 +35,12 @@
31
35
  "vaul": "^1.1.2"
32
36
  },
33
37
  "devDependencies": {
34
- "@workspace/config-eslint": "*",
35
- "@workspace/config-typescript": "*",
36
- "@workspace/config-prettier": "*",
37
38
  "@tailwindcss/vite": "^4.2.4",
38
39
  "@turbo/gen": "^2.9.6",
39
40
  "@types/node": "^25.6.0",
40
41
  "@types/react": "^19.2.14",
41
42
  "@types/react-dom": "^19.2.3",
43
+ "@workspace/config-typescript": "*",
42
44
  "tailwindcss": "^4.2.4"
43
- },
44
- "exports": {
45
- "./globals.css": "./src/styles/globals.css",
46
- "./lib/*": "./src/lib/*.ts",
47
- "./components/*": "./src/components/*.tsx",
48
- "./hooks/*": "./src/hooks/*.ts"
49
45
  }
50
46
  }
@@ -1,7 +1,7 @@
1
- import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion"
1
+ import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
2
2
 
3
- import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"
4
- import { cn } from "@workspace/ui/lib/utils"
3
+ import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
4
+ import { cn } from "@workspace/ui/lib/utils";
5
5
 
6
6
  function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
7
7
  return (
@@ -10,7 +10,7 @@ function Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {
10
10
  className={cn("flex w-full flex-col", className)}
11
11
  {...props}
12
12
  />
13
- )
13
+ );
14
14
  }
15
15
 
16
16
  function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
@@ -20,37 +20,35 @@ function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {
20
20
  className={cn("not-last:border-b", className)}
21
21
  {...props}
22
22
  />
23
- )
23
+ );
24
24
  }
25
25
 
26
- function AccordionTrigger({
27
- className,
28
- children,
29
- ...props
30
- }: AccordionPrimitive.Trigger.Props) {
26
+ function AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props) {
31
27
  return (
32
28
  <AccordionPrimitive.Header className="flex">
33
29
  <AccordionPrimitive.Trigger
34
30
  data-slot="accordion-trigger"
35
31
  className={cn(
36
32
  "group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
37
- className
33
+ className,
38
34
  )}
39
35
  {...props}
40
36
  >
41
37
  {children}
42
- <ChevronDownIcon data-slot="accordion-trigger-icon" className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" />
43
- <ChevronUpIcon data-slot="accordion-trigger-icon" className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" />
38
+ <ChevronDownIcon
39
+ data-slot="accordion-trigger-icon"
40
+ className="pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"
41
+ />
42
+ <ChevronUpIcon
43
+ data-slot="accordion-trigger-icon"
44
+ className="pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"
45
+ />
44
46
  </AccordionPrimitive.Trigger>
45
47
  </AccordionPrimitive.Header>
46
- )
48
+ );
47
49
  }
48
50
 
49
- function AccordionContent({
50
- className,
51
- children,
52
- ...props
53
- }: AccordionPrimitive.Panel.Props) {
51
+ function AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props) {
54
52
  return (
55
53
  <AccordionPrimitive.Panel
56
54
  data-slot="accordion-content"
@@ -60,13 +58,13 @@ function AccordionContent({
60
58
  <div
61
59
  className={cn(
62
60
  "h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
63
- className
61
+ className,
64
62
  )}
65
63
  >
66
64
  {children}
67
65
  </div>
68
66
  </AccordionPrimitive.Panel>
69
- )
67
+ );
70
68
  }
71
69
 
72
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
70
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,41 +1,34 @@
1
- "use client"
1
+ "use client";
2
2
 
3
- import * as React from "react"
4
- import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
3
+ import * as React from "react";
4
+ import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
5
5
 
6
- import { cn } from "@workspace/ui/lib/utils"
7
- import { Button } from "@workspace/ui/components/button"
6
+ import { cn } from "@workspace/ui/lib/utils";
7
+ import { Button } from "@workspace/ui/components/button";
8
8
 
9
9
  function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
10
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
10
+ return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
11
11
  }
12
12
 
13
13
  function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {
14
- return (
15
- <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
16
- )
14
+ return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />;
17
15
  }
18
16
 
19
17
  function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {
20
- return (
21
- <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
22
- )
18
+ return <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />;
23
19
  }
24
20
 
25
- function AlertDialogOverlay({
26
- className,
27
- ...props
28
- }: AlertDialogPrimitive.Backdrop.Props) {
21
+ function AlertDialogOverlay({ className, ...props }: AlertDialogPrimitive.Backdrop.Props) {
29
22
  return (
30
23
  <AlertDialogPrimitive.Backdrop
31
24
  data-slot="alert-dialog-overlay"
32
25
  className={cn(
33
26
  "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",
34
- className
27
+ className,
35
28
  )}
36
29
  {...props}
37
30
  />
38
- )
31
+ );
39
32
  }
40
33
 
41
34
  function AlertDialogContent({
@@ -43,7 +36,7 @@ function AlertDialogContent({
43
36
  size = "default",
44
37
  ...props
45
38
  }: AlertDialogPrimitive.Popup.Props & {
46
- size?: "default" | "sm"
39
+ size?: "default" | "sm";
47
40
  }) {
48
41
  return (
49
42
  <AlertDialogPortal>
@@ -53,60 +46,51 @@ function AlertDialogContent({
53
46
  data-size={size}
54
47
  className={cn(
55
48
  "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]: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",
56
- className
49
+ className,
57
50
  )}
58
51
  {...props}
59
52
  />
60
53
  </AlertDialogPortal>
61
- )
54
+ );
62
55
  }
63
56
 
64
- function AlertDialogHeader({
65
- className,
66
- ...props
67
- }: React.ComponentProps<"div">) {
57
+ function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">) {
68
58
  return (
69
59
  <div
70
60
  data-slot="alert-dialog-header"
71
61
  className={cn(
72
62
  "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
73
- className
63
+ className,
74
64
  )}
75
65
  {...props}
76
66
  />
77
- )
67
+ );
78
68
  }
79
69
 
80
- function AlertDialogFooter({
81
- className,
82
- ...props
83
- }: React.ComponentProps<"div">) {
70
+ function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">) {
84
71
  return (
85
72
  <div
86
73
  data-slot="alert-dialog-footer"
87
74
  className={cn(
88
75
  "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
89
- className
76
+ className,
90
77
  )}
91
78
  {...props}
92
79
  />
93
- )
80
+ );
94
81
  }
95
82
 
96
- function AlertDialogMedia({
97
- className,
98
- ...props
99
- }: React.ComponentProps<"div">) {
83
+ function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">) {
100
84
  return (
101
85
  <div
102
86
  data-slot="alert-dialog-media"
103
87
  className={cn(
104
88
  "mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",
105
- className
89
+ className,
106
90
  )}
107
91
  {...props}
108
92
  />
109
- )
93
+ );
110
94
  }
111
95
 
112
96
  function AlertDialogTitle({
@@ -118,11 +102,11 @@ function AlertDialogTitle({
118
102
  data-slot="alert-dialog-title"
119
103
  className={cn(
120
104
  "font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
121
- className
105
+ className,
122
106
  )}
123
107
  {...props}
124
108
  />
125
- )
109
+ );
126
110
  }
127
111
 
128
112
  function AlertDialogDescription({
@@ -134,24 +118,15 @@ function AlertDialogDescription({
134
118
  data-slot="alert-dialog-description"
135
119
  className={cn(
136
120
  "text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
137
- className
121
+ className,
138
122
  )}
139
123
  {...props}
140
124
  />
141
- )
125
+ );
142
126
  }
143
127
 
144
- function AlertDialogAction({
145
- className,
146
- ...props
147
- }: React.ComponentProps<typeof Button>) {
148
- return (
149
- <Button
150
- data-slot="alert-dialog-action"
151
- className={cn(className)}
152
- {...props}
153
- />
154
- )
128
+ function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>) {
129
+ return <Button data-slot="alert-dialog-action" className={cn(className)} {...props} />;
155
130
  }
156
131
 
157
132
  function AlertDialogCancel({
@@ -168,7 +143,7 @@ function AlertDialogCancel({
168
143
  render={<Button variant={variant} size={size} />}
169
144
  {...props}
170
145
  />
171
- )
146
+ );
172
147
  }
173
148
 
174
149
  export {
@@ -184,4 +159,4 @@ export {
184
159
  AlertDialogPortal,
185
160
  AlertDialogTitle,
186
161
  AlertDialogTrigger,
187
- }
162
+ };