Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/old-sides-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions integration/presets/longRunningApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export const createLongRunningApps = () => {
{ id: 'next.appRouter.withNeedsClientTrust', config: next.appRouter, env: envs.withNeedsClientTrust },
{ id: 'next.appRouter.withSharedUIVariant', config: next.appRouter, env: envs.withSharedUIVariant },

/**
* NextJS apps - bundled UI
*/
{ id: 'next.appRouterBundledUI.withEmailCodes', config: next.appRouterBundledUI, env: envs.withEmailCodes },

/**
* NextJS apps - cache components
*/
Expand Down
16 changes: 16 additions & 0 deletions integration/presets/next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ const appRouterAPWithClerkNextV6 = appRouterQuickstartV6
.setName('next-app-router-ap-clerk-next-v6')
.addDependency('@clerk/nextjs', '6');

const appRouterBundledUI = applicationConfig()
.setName('next-app-router-bundled-ui')
.useTemplate(templates['next-app-router-bundled-ui'])
.setEnvFormatter('public', key => `NEXT_PUBLIC_${key}`)
.addScript('setup', constants.E2E_NPM_FORCE ? 'pnpm install --force' : 'pnpm install')
.addScript('dev', 'pnpm dev')
.addScript('build', 'pnpm build')
.addScript('serve', 'pnpm start')
.addDependency('next', constants.E2E_NEXTJS_VERSION)
.addDependency('react', constants.E2E_REACT_VERSION)
.addDependency('react-dom', constants.E2E_REACT_DOM_VERSION)
.addDependency('@clerk/nextjs', constants.E2E_CLERK_JS_VERSION || linkPackage('nextjs'))
.addDependency('@clerk/shared', linkPackage('shared'))
.addDependency('@clerk/ui', constants.E2E_CLERK_UI_VERSION || linkPackage('ui'));

const cacheComponents = applicationConfig()
.setName('next-cache-components')
.useTemplate(templates['next-cache-components'])
Expand All @@ -54,5 +69,6 @@ export const next = {
appRouterAPWithClerkNextLatest,
appRouterAPWithClerkNextV6,
appRouterQuickstartV6,
appRouterBundledUI,
cacheComponents,
} as const;
1 change: 1 addition & 0 deletions integration/templates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const templates = {
'next-app-router': resolve(__dirname, './next-app-router'),
'next-cache-components': resolve(__dirname, './next-cache-components'),
'next-app-router-quickstart': resolve(__dirname, './next-app-router-quickstart'),
'next-app-router-bundled-ui': resolve(__dirname, './next-app-router-bundled-ui'),
'next-app-router-quickstart-v6': resolve(__dirname, './next-app-router-quickstart-v6'),
'react-cra': resolve(__dirname, './react-cra'),
'react-vite': resolve(__dirname, './react-vite'),
Expand Down
35 changes: 35 additions & 0 deletions integration/templates/next-app-router-bundled-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

module.exports = nextConfig;
23 changes: 23 additions & 0 deletions integration/templates/next-app-router-bundled-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "next-app-router-bundled-ui",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start"
},
"dependencies": {
"@types/node": "^20.12.12",
"@types/react": "19.2.14",
"@types/react-dom": "19.2.3",
"next": "^15.0.1",
"react": "19.2.4",
"react-dom": "19.2.4",
"typescript": "^5.7.3"
},
"engines": {
"node": ">=20.9.0"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono:
ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace',
'Source Code Pro', 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;

--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;

--primary-glow: conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
#0885ff33 55deg,
#54d6ff33 120deg,
#0071ff33 160deg,
transparent 360deg
);
--secondary-glow: radial-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));

--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(#00000080, #00000040, #00000030, #00000020, #00000010, #00000010, #00000080);

--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
--card-border-rgb: 131, 134, 135;
}

@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;

--primary-glow: radial-gradient(rgba(1, 65, 255, 0.4), rgba(1, 65, 255, 0));
--secondary-glow: linear-gradient(to bottom right, rgba(1, 65, 255, 0), rgba(1, 65, 255, 0), rgba(1, 65, 255, 0.3));

--tile-start-rgb: 2, 13, 46;
--tile-end-rgb: 2, 5, 19;
--tile-border: conic-gradient(#ffffff80, #ffffff40, #ffffff30, #ffffff20, #ffffff10, #ffffff10, #ffffff80);

--callout-rgb: 20, 20, 20;
--callout-border-rgb: 108, 108, 108;
--card-rgb: 100, 100, 100;
--card-border-rgb: 200, 200, 200;
}
}

* {
box-sizing: border-box;
padding: 0;
margin: 0;
}

html,
body {
max-width: 100vw;
overflow-x: hidden;
}

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb));
}

a {
color: inherit;
text-decoration: none;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import './globals.css';
import { Inter } from 'next/font/google';
import { ClerkProvider } from '@clerk/nextjs';
import { ui } from '@clerk/ui';

const inter = Inter({ subsets: ['latin'] });

export const metadata = {
title: 'Bundled UI Test App',
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<ClerkProvider
ui={ui}
appearance={{
options: {
showOptionalFields: true,
socialButtonsVariant: 'blockButton',
},
}}
>
<html lang='en'>
<body className={inter.className}>{children}</body>
</html>
</ClerkProvider>
);
}
17 changes: 17 additions & 0 deletions integration/templates/next-app-router-bundled-ui/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Show, SignInButton, SignUpButton, UserButton } from '@clerk/nextjs';

export default function Home() {
return (
<header>
<Show when='signed-out'>
<p>signed-out-state</p>
<SignInButton />
<SignUpButton />
</Show>
<Show when='signed-in'>
<p>signed-in-state</p>
<UserButton />
</Show>
</header>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { SignIn } from '@clerk/nextjs';

export default function Page() {
return (
<div>
<SignIn
routing={'path'}
path={'/sign-in'}
signUpUrl={'/sign-up'}
fallback={<>Loading sign in</>}
/>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { SignUp } from '@clerk/nextjs';

export default function Page() {
return (
<div>
<SignUp
routing={'path'}
path={'/sign-up'}
signInUrl={'/sign-in'}
fallback={<>Loading sign up</>}
/>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
'use client';

import { SignIn } from '@clerk/nextjs';
import { dark, neobrutalism, shadesOfPurple, shadcn } from '@clerk/ui/themes';

export default function ThemesPage() {
return (
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2rem', padding: '2rem' }}>
<div>
<h2>Dark</h2>
<SignIn
appearance={{ baseTheme: dark }}
routing='hash'
fallback={<>Loading dark theme</>}
/>
</div>
<div>
<h2>Neobrutalism</h2>
<SignIn
appearance={{ baseTheme: neobrutalism }}
routing='hash'
fallback={<>Loading neobrutalism theme</>}
/>
</div>
<div>
<h2>Shades of Purple</h2>
<SignIn
appearance={{ baseTheme: shadesOfPurple }}
routing='hash'
fallback={<>Loading shadesOfPurple theme</>}
/>
</div>
<div>
<h2>Shadcn</h2>
<SignIn
appearance={{ baseTheme: shadcn }}
routing='hash'
fallback={<>Loading shadcn theme</>}
/>
</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { UserButton } from '@clerk/nextjs';

export default function Page() {
return (
<div>
<UserButton fallback={<>Loading user button</>} />
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { clerkMiddleware } from '@clerk/nextjs/server';

export default clerkMiddleware();

export const config = {
matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'],
};
28 changes: 28 additions & 0 deletions integration/templates/next-app-router-bundled-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
Loading