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
32 changes: 8 additions & 24 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,20 @@ nodeLinker: node-modules
npmRegistryServer: "https://registry.yarnpkg.com"

packageExtensions:
"@storybook/addon-essentials@*":
"@storybook/addon-docs@*":
peerDependencies:
react: "*"
react-dom: "*"
"@types/react": "*"
"@types/react-dom": "*"

"@storybook/addon-controls@*":
"@storybook/addon-essentials@*":
peerDependencies:
react: "*"
react-dom: "*"
"@types/react": "*"
"@types/react-dom": "*"

"@storybook/manager-api@*":
"@storybook/core@*":
peerDependencies:
react: "*"
react-dom: "*"
storybook: "*"

"@storybook/react-vite@*":
peerDependencies:
typescript: "*"

"@storybook/cli@*":
peerDependencies:
react: "*"
react-dom: "*"

"@storybook/core-server@*":
peerDependencies:
react: "*"
react-dom: "*"

"storybook@*":
peerDependencies:
react: "*"
react-dom: "*"
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,23 @@
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-typescript": "^12.1.4",
"@storybook/addon-actions": "^8.0.5",
"@storybook/addon-essentials": "^8.0.5",
"@storybook/addon-links": "^8.0.5",
"@storybook/blocks": "^8.0.5",
"@storybook/manager-api": "^8.0.5",
"@storybook/preview-api": "^8.0.5",
"@storybook/react": "^8.0.5",
"@storybook/react-vite": "^8.0.5",
"@storybook/theming": "^8.0.5",
"@storybook/addon-essentials": "^8.6.14",
"@storybook/addon-links": "^8.6.14",
"@storybook/blocks": "^8.6.14",
"@storybook/manager-api": "^8.6.14",
"@storybook/react": "^8.6.14",
"@storybook/react-vite": "^8.6.14",
"@storybook/theming": "^8.6.14",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^15.0.7",
"@testing-library/react": "^16.3.0",
"@types/eslint": "^9.6.1",
"@types/jest": "^30.0.0",
"@types/jest-axe": "^3.5.9",
"@types/lodash": "^4.17.20",
"@types/node": "^24.6.2",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.1",
"babel-jest": "^30.2.0",
"babel-plugin-module-resolver": "^5.0.2",
"babel-plugin-replace-import-extension": "^1.1.5",
Expand All @@ -115,12 +114,12 @@
"nhsuk-frontend": "^10.0.0",
"outdent": "^0.8.0",
"prettier": "^3.6.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"rollup": "^4.52.4",
"rollup-plugin-preserve-directives": "^0.4.0",
"sass": "^1.53.0",
"storybook": "^8.0.5",
"storybook": "^8.6.14",
"tslib": "^2.8.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.45.0",
Expand All @@ -130,8 +129,8 @@
"peerDependencies": {
"classnames": ">=2.5.0",
"nhsuk-frontend": ">=10.0.0 <11.0.0",
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"react": ">=18.2.0",
"react-dom": ">=18.2.0",
"tslib": ">=2.8.0"
},
"packageManager": "yarn@4.10.3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import {
createContext,
Expand Down
2 changes: 2 additions & 0 deletions src/components/content-presentation/table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import {
forwardRef,
Expand Down
2 changes: 2 additions & 0 deletions src/components/content-presentation/table/TableContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext, type ReactNode } from 'react';

export interface ITableContext {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext } from 'react';

export enum TableSection {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { useContext, type ComponentPropsWithoutRef, type FC } from 'react';
import { TableContext, type ITableContext } from '../TableContext.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { useContext, type ComponentPropsWithoutRef, type FC } from 'react';
import { TableContext, type ITableContext } from '../TableContext.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import {
Children,
Expand Down
2 changes: 2 additions & 0 deletions src/components/content-presentation/tabs/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type Tabs as TabsModule } from 'nhsuk-frontend';
import {
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type Button as ButtonModule } from 'nhsuk-frontend';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type CharacterCount as CharacterCountModule } from 'nhsuk-frontend';
import { createRef, forwardRef, useEffect, useState, type ComponentPropsWithoutRef } from 'react';
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/checkboxes/Checkboxes.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type Checkboxes as CheckboxesModule } from 'nhsuk-frontend';
import { createRef, forwardRef, useEffect, useState, type ComponentPropsWithoutRef } from 'react';
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/checkboxes/CheckboxesContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext } from 'react';

export interface ICheckboxesContext {
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/checkboxes/components/Item.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import {
forwardRef,
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/date-input/DateInput.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import {
createRef,
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/date-input/DateInputContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext, type ChangeEvent } from 'react';

export type IDateInputContext = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ exports[`DateInput matches snapshot (via server): client 1`] = `
inputmode="numeric"
name="date-input-day"
type="text"
value=""
/>
</div>
</div>
Expand All @@ -67,7 +66,6 @@ exports[`DateInput matches snapshot (via server): client 1`] = `
inputmode="numeric"
name="date-input-month"
type="text"
value=""
/>
</div>
</div>
Expand All @@ -90,7 +88,6 @@ exports[`DateInput matches snapshot (via server): client 1`] = `
inputmode="numeric"
name="date-input-year"
type="text"
value=""
/>
</div>
</div>
Expand Down Expand Up @@ -241,7 +238,6 @@ exports[`DateInput matches snapshot 1`] = `
inputmode="numeric"
name="date-input-day"
type="text"
value=""
/>
</div>
</div>
Expand All @@ -264,7 +260,6 @@ exports[`DateInput matches snapshot 1`] = `
inputmode="numeric"
name="date-input-month"
type="text"
value=""
/>
</div>
</div>
Expand All @@ -287,7 +282,6 @@ exports[`DateInput matches snapshot 1`] = `
inputmode="numeric"
name="date-input-year"
type="text"
value=""
/>
</div>
</div>
Expand Down Expand Up @@ -453,7 +447,6 @@ exports[`DateInput matches snapshot with custom date fields and error message 1`
inputmode="numeric"
name="date-input-day"
type="text"
value=""
/>
</div>
</div>
Expand Down Expand Up @@ -565,7 +558,6 @@ exports[`DateInput matches snapshot with error message 1`] = `
inputmode="numeric"
name="date-input-day"
type="text"
value=""
/>
</div>
</div>
Expand All @@ -588,7 +580,6 @@ exports[`DateInput matches snapshot with error message 1`] = `
inputmode="numeric"
name="date-input-month"
type="text"
value=""
/>
</div>
</div>
Expand All @@ -611,7 +602,6 @@ exports[`DateInput matches snapshot with error message 1`] = `
inputmode="numeric"
name="date-input-year"
type="text"
value=""
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { forwardRef, useContext, type ChangeEvent, type ComponentPropsWithoutRef } from 'react';
import { DateInputContext, type IDateInputContext } from '../DateInputContext.js';
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/error-summary/ErrorSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type ErrorSummary as ErrorSummaryModule } from 'nhsuk-frontend';
import {
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/form/FormContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext, useContext } from 'react';

export interface IFormContext {
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/radios/Radios.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type Radios as RadiosModule } from 'nhsuk-frontend';
import { createRef, forwardRef, useEffect, useState, type ComponentPropsWithoutRef } from 'react';
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/radios/RadiosContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext } from 'react';

export type IRadiosContext = {
Expand Down
2 changes: 2 additions & 0 deletions src/components/form-elements/radios/components/Item.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import {
forwardRef,
Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/card/CardContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext } from 'react';
import { type CardType } from '#util/types/index.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ exports[`Card Care card variant urgent matches the snapshot 1`] = `

exports[`Card matches snapshot (via server): client 1`] = `
<div>
<link
as="image"
href="imageSrc"
rel="preload"
/>
<div
class="nhsuk-card"
>
Expand Down Expand Up @@ -187,6 +192,11 @@ exports[`Card matches snapshot (via server): client 1`] = `

exports[`Card matches snapshot (via server): server 1`] = `
<div>
<link
as="image"
href="imageSrc"
rel="preload"
/>
<div
class="nhsuk-card"
>
Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/card/components/CardContent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { forwardRef, useContext, type ComponentPropsWithoutRef } from 'react';
import { CardContext } from '../CardContext.js';
Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/card/components/CardHeading.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { forwardRef, useContext } from 'react';
import { CardContext } from '../CardContext.js';
Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type Header as HeaderModule } from 'nhsuk-frontend';
import {
Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/header/HeaderContext.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { createContext, type Dispatch, type SetStateAction } from 'react';

export interface IHeaderContext {
Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/header/components/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useContext, useEffect, type FC } from 'react';
import { HeaderContext, type IHeaderContext } from '../HeaderContext.js';

Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/header/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { useContext, useEffect, type ComponentPropsWithoutRef, type FC } from 'react';
import { HeaderContext, type IHeaderContext } from '../HeaderContext.js';
Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/header/components/ServiceName.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useContext, type ComponentPropsWithoutRef, type FC } from 'react';
import { HeaderContext, type IHeaderContext } from '../HeaderContext.js';

Expand Down
2 changes: 2 additions & 0 deletions src/components/navigation/skip-link/SkipLink.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import { type SkipLink as SkipLinkModule } from 'nhsuk-frontend';
import { createRef, forwardRef, useEffect, useState, type ComponentPropsWithoutRef } from 'react';
Expand Down
2 changes: 2 additions & 0 deletions src/components/utils/FormGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import classNames from 'classnames';
import {
useContext,
Expand Down
Loading