Skip to content

Commit a226526

Browse files
committed
feat(integration): add next-app-router-bundled-ui integration template
Add a Next.js App Router integration template that uses `@clerk/ui` bundled UI via `ui={ui}` on `<ClerkProvider>`. Includes sign-in, sign-up, user-button, and theme test pages for dark, neobrutalism, shadesOfPurple, and shadcn themes.
1 parent b971d0b commit a226526

18 files changed

Lines changed: 324 additions & 0 deletions

File tree

integration/presets/longRunningApps.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ export const createLongRunningApps = () => {
3636
{ id: 'next.appRouter.withNeedsClientTrust', config: next.appRouter, env: envs.withNeedsClientTrust },
3737
{ id: 'next.appRouter.withSharedUIVariant', config: next.appRouter, env: envs.withSharedUIVariant },
3838

39+
/**
40+
* NextJS apps - bundled UI
41+
*/
42+
{ id: 'next.appRouterBundledUI.withEmailCodes', config: next.appRouterBundledUI, env: envs.withEmailCodes },
43+
3944
/**
4045
* NextJS apps - cache components
4146
*/

integration/presets/next.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ const appRouterAPWithClerkNextV6 = appRouterQuickstartV6
3636
.setName('next-app-router-ap-clerk-next-v6')
3737
.addDependency('@clerk/nextjs', '6');
3838

39+
const appRouterBundledUI = applicationConfig()
40+
.setName('next-app-router-bundled-ui')
41+
.useTemplate(templates['next-app-router-bundled-ui'])
42+
.setEnvFormatter('public', key => `NEXT_PUBLIC_${key}`)
43+
.addScript('setup', constants.E2E_NPM_FORCE ? 'pnpm install --force' : 'pnpm install')
44+
.addScript('dev', 'pnpm dev')
45+
.addScript('build', 'pnpm build')
46+
.addScript('serve', 'pnpm start')
47+
.addDependency('next', constants.E2E_NEXTJS_VERSION)
48+
.addDependency('react', constants.E2E_REACT_VERSION)
49+
.addDependency('react-dom', constants.E2E_REACT_DOM_VERSION)
50+
.addDependency('@clerk/nextjs', constants.E2E_CLERK_JS_VERSION || linkPackage('nextjs'))
51+
.addDependency('@clerk/shared', linkPackage('shared'))
52+
.addDependency('@clerk/ui', constants.E2E_CLERK_UI_VERSION || linkPackage('ui'));
53+
3954
const cacheComponents = applicationConfig()
4055
.setName('next-cache-components')
4156
.useTemplate(templates['next-cache-components'])
@@ -54,5 +69,6 @@ export const next = {
5469
appRouterAPWithClerkNextLatest,
5570
appRouterAPWithClerkNextV6,
5671
appRouterQuickstartV6,
72+
appRouterBundledUI,
5773
cacheComponents,
5874
} as const;

integration/templates/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const templates = {
77
'next-app-router': resolve(__dirname, './next-app-router'),
88
'next-cache-components': resolve(__dirname, './next-cache-components'),
99
'next-app-router-quickstart': resolve(__dirname, './next-app-router-quickstart'),
10+
'next-app-router-bundled-ui': resolve(__dirname, './next-app-router-bundled-ui'),
1011
'next-app-router-quickstart-v6': resolve(__dirname, './next-app-router-quickstart-v6'),
1112
'react-cra': resolve(__dirname, './react-cra'),
1213
'react-vite': resolve(__dirname, './react-vite'),
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {};
3+
4+
module.exports = nextConfig;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "next-app-router-bundled-ui",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"build": "next build",
7+
"dev": "next dev",
8+
"lint": "next lint",
9+
"start": "next start"
10+
},
11+
"dependencies": {
12+
"@types/node": "^20.12.12",
13+
"@types/react": "18.3.12",
14+
"@types/react-dom": "18.3.1",
15+
"next": "^15.0.1",
16+
"react": "18.3.1",
17+
"react-dom": "18.3.1",
18+
"typescript": "^5.7.3"
19+
},
20+
"engines": {
21+
"node": ">=20.9.0"
22+
}
23+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Binary file not shown.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
:root {
2+
--max-width: 1100px;
3+
--border-radius: 12px;
4+
--font-mono:
5+
ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace',
6+
'Source Code Pro', 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
7+
8+
--foreground-rgb: 0, 0, 0;
9+
--background-start-rgb: 214, 219, 220;
10+
--background-end-rgb: 255, 255, 255;
11+
12+
--primary-glow: conic-gradient(
13+
from 180deg at 50% 50%,
14+
#16abff33 0deg,
15+
#0885ff33 55deg,
16+
#54d6ff33 120deg,
17+
#0071ff33 160deg,
18+
transparent 360deg
19+
);
20+
--secondary-glow: radial-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
21+
22+
--tile-start-rgb: 239, 245, 249;
23+
--tile-end-rgb: 228, 232, 233;
24+
--tile-border: conic-gradient(#00000080, #00000040, #00000030, #00000020, #00000010, #00000010, #00000080);
25+
26+
--callout-rgb: 238, 240, 241;
27+
--callout-border-rgb: 172, 175, 176;
28+
--card-rgb: 180, 185, 188;
29+
--card-border-rgb: 131, 134, 135;
30+
}
31+
32+
@media (prefers-color-scheme: dark) {
33+
:root {
34+
--foreground-rgb: 255, 255, 255;
35+
--background-start-rgb: 0, 0, 0;
36+
--background-end-rgb: 0, 0, 0;
37+
38+
--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
39+
--secondary-glow: linear-gradient(to bottom right, rgba(1, 65, 255, 0), rgba(1, 65, 255, 0), rgba(1, 65, 255, 0.3));
40+
41+
--tile-start-rgb: 2, 13, 46;
42+
--tile-end-rgb: 2, 5, 19;
43+
--tile-border: conic-gradient(#ffffff80, #ffffff40, #ffffff30, #ffffff20, #ffffff10, #ffffff10, #ffffff80);
44+
45+
--callout-rgb: 20, 20, 20;
46+
--callout-border-rgb: 108, 108, 108;
47+
--card-rgb: 100, 100, 100;
48+
--card-border-rgb: 200, 200, 200;
49+
}
50+
}
51+
52+
* {
53+
box-sizing: border-box;
54+
padding: 0;
55+
margin: 0;
56+
}
57+
58+
html,
59+
body {
60+
max-width: 100vw;
61+
overflow-x: hidden;
62+
}
63+
64+
body {
65+
color: rgb(var(--foreground-rgb));
66+
background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb));
67+
}
68+
69+
a {
70+
color: inherit;
71+
text-decoration: none;
72+
}
73+
74+
@media (prefers-color-scheme: dark) {
75+
html {
76+
color-scheme: dark;
77+
}
78+
}

0 commit comments

Comments
 (0)