Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 15 and react 19 🚀 #9421

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions design-system/packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3"
"@types/react": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^",
"@keystone-ui/icons": "workspace:^",
"@keystone-ui/loading": "workspace:^",
"react": "^18.3.1"
"react": "^19.0.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/button"
}
12 changes: 6 additions & 6 deletions design-system/packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"@types/react": "^19.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@emotion/react": "^11.7.1",
"@emotion/react": "^11.14.0",
"@types/facepaint": "^1.2.2",
"facepaint": "^1.2.1"
},
Expand Down
12 changes: 6 additions & 6 deletions design-system/packages/fields/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3"
"@types/react": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^",
"@keystone-ui/icons": "workspace:^",
"@keystone-ui/popover": "workspace:^",
"date-fns": "^4.0.0",
"react": "^18.3.1",
"react-day-picker": "^9.0.0",
"react-dom": "^18.3.1",
"react-focus-lock": "^2.7.1",
"react-select": "^5.2.1"
"react": "^19.0.0",
"react-day-picker": "^9.4.2",
"react-dom": "^19.0.0",
"react-focus-lock": "^2.13.2",
"react-select": "^5.9.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/fields"
}
6 changes: 3 additions & 3 deletions design-system/packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,18 +1162,18 @@
"@svgr/core": "^8.0.0",
"@svgr/plugin-jsx": "^8.0.0",
"@svgr/plugin-svgo": "^8.0.0",
"@types/react": "^18.3.3",
"@types/react": "^19.0.0",
"feather-icons": "^4.28.0",
"globby": "^14.0.0",
"react": "^18.3.1",
"react": "^19.0.0",
"to-pascal-case": "^1.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^"
},
"peerDependencies": {
"react": "^18.3.1"
"react": "^19.0.0"
},
"preconstruct": {
"entrypoints": [
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/loading/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3"
"@types/react": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^",
"react": "^18.3.1"
"react": "^19.0.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/loading"
}
8 changes: 4 additions & 4 deletions design-system/packages/modals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react": "^19.0.0",
"@types/react-transition-group": "4.4.12"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/button": "workspace:^",
"@keystone-ui/core": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-focus-lock": "^2.7.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-focus-lock": "^2.13.2",
"react-remove-scroll": "^2.4.3",
"react-transition-group": "^4.4.2"
},
Expand Down
11 changes: 7 additions & 4 deletions design-system/packages/modals/src/DrawerController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ export const useDrawerControllerContext = () => {
}

export const DrawerController = ({ isOpen, children }: DrawerControllerProps) => {
const nodeRef = React.useRef(null)
return (
<Transition appear mountOnEnter unmountOnExit in={isOpen} timeout={150}>
<Transition appear mountOnEnter unmountOnExit in={isOpen} timeout={150} nodeRef={nodeRef}>
{transitionState => (
<DrawerControllerContextProvider value={transitionState}>
{children}
</DrawerControllerContextProvider>
<div ref={nodeRef}>
<DrawerControllerContextProvider value={transitionState}>
{children}
</DrawerControllerContextProvider>
</div>
)}
</Transition>
)
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/notice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3"
"@types/react": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/button": "workspace:^",
"@keystone-ui/core": "workspace:^",
"@keystone-ui/icons": "workspace:^",
"react": "^18.3.1"
"react": "^19.0.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/notice"
}
10 changes: 5 additions & 5 deletions design-system/packages/options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
"./package.json": "./package.json"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^",
"@keystone-ui/fields": "workspace:^",
"@keystone-ui/icons": "workspace:^",
"react-select": "^5.2.1"
"react-select": "^5.9.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/options"
}
4 changes: 2 additions & 2 deletions design-system/packages/pill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"./package.json": "./package.json"
},
"peerDependencies": {
"react": "^18.3.1"
"react": "^19.0.0"
},
"devDependencies": {
"react": "^18.3.1"
"react": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
Expand Down
10 changes: 5 additions & 5 deletions design-system/packages/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
"./package.json": "./package.json"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^",
"@popperjs/core": "^2.10.2",
"focus-trap": "^7.0.0",
"react-popper": "^2.2.5"
"react-popper": "^2.3.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/popover"
}
6 changes: 3 additions & 3 deletions design-system/packages/segmented-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3",
"react": "^18.3.1"
"@types/react": "^19.0.0",
"react": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^"
},
"peerDependencies": {
"react": "^18.3.1"
"react": "^19.0.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/segmented-control"
}
6 changes: 3 additions & 3 deletions design-system/packages/toast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"./package.json": "./package.json"
},
"devDependencies": {
"@types/react": "^18.3.3",
"react": "^18.3.1"
"@types/react": "^19.0.0",
"react": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
"@keystone-ui/core": "workspace:^",
"@keystone-ui/icons": "workspace:^"
},
"peerDependencies": {
"react": "^18.3.1"
"react": "^19.0.0"
},
"repository": "https://github.com/keystonejs/keystone/tree/main/design-system/packages/toast"
}
8 changes: 4 additions & 4 deletions design-system/packages/tooltip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"./package.json": "./package.json"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"dependencies": {
"@babel/runtime": "^7.24.7",
Expand Down
10 changes: 5 additions & 5 deletions design-system/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"@keystone-ui/toast": "workspace:^",
"@keystone-ui/tooltip": "workspace:^",
"@preconstruct/next": "^4.0.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/tinycolor2": "^1.4.3",
"next": "^14.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"next": "^15.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"tinycolor2": "^1.4.2"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions docs/app/(site)/blog/[post]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export type BlogPost = NonNullable<
>

export default async function Page ({ params }) {
const post = await reader.collections.posts.read(params!.post, {
const _params = await params
const post = await reader.collections.posts.read(_params!.post, {
resolveLinkedFiles: true,
})

Expand All @@ -40,7 +41,8 @@ export default async function Page ({ params }) {

// Dynamic SEO page metadata
export async function generateMetadata ({ params }): Promise<Metadata> {
const post = await reader.collections.posts.read(params!.post)
const _params = await params
const post = await reader.collections.posts.read(_params!.post)

const title = post?.title ? `${post.title} - Keystone 6 Blog` : 'Keystone 6 Blog'

Expand Down
8 changes: 5 additions & 3 deletions docs/app/(site)/docs/[...rest]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export type Document = NonNullable<
>

export default async function DocPage ({ params }) {
const doc = await reader.collections.docs.read(params!.rest.join('/'), {
const _params = await params
const doc = await reader.collections.docs.read(_params!.rest.join('/'), {
resolveLinkedFiles: true,
})
if (!doc) return notFound()
Expand All @@ -35,15 +36,16 @@ export default async function DocPage ({ params }) {
]

return (
<DocsLayout headings={headings} editPath={`docs/${(params?.rest as string[]).join('/')}.md`}>
<DocsLayout headings={headings} editPath={`docs/${(_params?.rest as string[]).join('/')}.md`}>
<PageClient document={JSON.parse(JSON.stringify(transformedDoc))} />
</DocsLayout>
)
}

// Dynamic SEO page metadata
export async function generateMetadata ({ params }) {
const doc = await reader.collections.docs.read(params!.rest.join('/'))
const _params = await params
const doc = await reader.collections.docs.read(_params!.rest.join('/'))
return {
title: doc?.title ? `${doc.title} - Keystone 6 Documentation` : 'Keystone 6 Documentation',
description: doc?.description,
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function LinkItem ({
)
}

function useClickOutside (ref: RefObject<HTMLElement>, cb: () => void) {
function useClickOutside (ref: RefObject<HTMLElement | null>, cb: () => void) {
useEffect(() => {
/**
* Alert if clicked on outside of element
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Markdoc.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import React, { type ElementType, type ReactNode } from 'react'
import React, { type ElementType, type ReactNode, type JSX } from 'react'
import type { RenderableTreeNodes, Scalar, RenderableTreeNode, Tag } from '@markdoc/markdoc'
import { isTag } from '../markdoc/isTag'
import { Code, InlineCode } from './primitives/Code'
Expand Down
2 changes: 1 addition & 1 deletion docs/components/content/CustomerCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @jsxImportSource @emotion/react */

import type { HTMLAttributes } from 'react'
import type { HTMLAttributes, JSX } from 'react'

import { Type } from '../primitives/Type'
import { type IconProps } from '../icons/util'
Expand Down
Loading
Loading