Skip to content

Commit ed79b1b

Browse files
Bump the tools group with 5 updates (#335)
* Bump the tools group with 5 updates Bumps the tools group with 5 updates: | Package | From | To | | --- | --- | --- | | [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `10.1.11` | `10.2.0` | | [@storybook/addon-links](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/links) | `10.1.11` | `10.2.0` | | [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `10.1.11` | `10.2.0` | | [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `10.1.11` | `10.2.0` | | [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) | `6.0.4` | `6.0.5` | Updates `@storybook/addon-docs` from 10.1.11 to 10.2.0 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.2.0/code/addons/docs) Updates `@storybook/addon-links` from 10.1.11 to 10.2.0 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.2.0/code/addons/links) Updates `@storybook/react-vite` from 10.1.11 to 10.2.0 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.2.0/code/frameworks/react-vite) Updates `storybook` from 10.1.11 to 10.2.0 - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v10.2.0/code/core) Updates `vite-tsconfig-paths` from 6.0.4 to 6.0.5 - [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases) - [Commits](aleclarson/vite-tsconfig-paths@v6.0.4...v6.0.5) --- updated-dependencies: - dependency-name: "@storybook/addon-docs" dependency-version: 10.2.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: tools - dependency-name: "@storybook/addon-links" dependency-version: 10.2.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: tools - dependency-name: "@storybook/react-vite" dependency-version: 10.2.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: tools - dependency-name: storybook dependency-version: 10.2.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: tools - dependency-name: vite-tsconfig-paths dependency-version: 6.0.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: tools ... Signed-off-by: dependabot[bot] <support@github.com> * Use theme defaults to fix toolbar contrast issue * Add NHS.UK frontend viewports * Enable code panel * Disable unstable snapshots with automatic IDs etc * Fail status checks on story changes --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Rotherham <work@colinr.com>
1 parent 4bd3407 commit ed79b1b

6 files changed

Lines changed: 147 additions & 127 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
with:
6262
autoAcceptChanges: main
6363
branchName: ${{ env.CHROMATIC_BRANCH}}
64+
exitZeroOnChanges: false
6465
onlyChanged: ${{ github.event_name == 'pull_request' }}
6566
projectToken: ${{ env.CHROMATIC_PROJECT_TOKEN }}
6667
token: ${{ env.GITHUB_TOKEN }}

.storybook/preview.tsx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ const preview: Preview = {
2828
grey: { name: 'Grey', value: '#d8dde0' },
2929
},
3030
},
31+
docs: {
32+
codePanel: true,
33+
},
3134
width: 'two-thirds',
3235
layout: 'fullscreen',
3336
initialGlobals: {
@@ -46,6 +49,58 @@ const preview: Preview = {
4649
],
4750
},
4851
},
52+
viewport: {
53+
options: {
54+
watch: {
55+
name: 'Watch',
56+
styles: {
57+
width: '224px',
58+
height: '184px',
59+
},
60+
type: 'other',
61+
},
62+
mobile: {
63+
name: 'Mobile',
64+
styles: {
65+
width: '320px',
66+
height: '568px',
67+
},
68+
type: 'mobile',
69+
},
70+
tablet: {
71+
name: 'Tablet',
72+
styles: {
73+
width: '641px',
74+
height: '768px',
75+
},
76+
type: 'tablet',
77+
},
78+
desktop: {
79+
name: 'Desktop',
80+
styles: {
81+
width: '769px',
82+
height: '1024px',
83+
},
84+
type: 'desktop',
85+
},
86+
desktopL: {
87+
name: 'Large desktop',
88+
styles: {
89+
width: '990px',
90+
height: '1024px',
91+
},
92+
type: 'desktop',
93+
},
94+
desktopXL: {
95+
name: 'Extra large desktop',
96+
styles: {
97+
width: '1281px',
98+
height: '1024px',
99+
},
100+
type: 'desktop',
101+
},
102+
},
103+
},
49104
},
50105
tags: ['autodocs'],
51106
};

.storybook/theme.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,6 @@ import packageJson from '../package.json' with { type: 'json' };
44

55
export default create({
66
base: 'light',
7-
8-
colorPrimary: '#005eb8',
9-
colorSecondary: '#768692',
10-
11-
// UI
12-
appBg: 'white',
13-
appContentBg: 'white',
14-
appBorderColor: 'grey',
15-
appBorderRadius: 4,
16-
17-
// Typography
18-
fontCode: 'monospace',
19-
20-
// Text colors
21-
textColor: '#212b32',
22-
textInverseColor: 'white',
23-
24-
// Toolbar default and active colors
25-
barTextColor: 'rgba(255,255,255,0.8)',
26-
barSelectedColor: 'rgba(255,255,255,1)',
27-
barBg: '#005eb8',
28-
29-
// Form colors
30-
inputBg: 'white',
31-
inputBorder: '#425563',
32-
inputTextColor: '#212b32',
33-
inputBorderRadius: 4,
34-
357
brandTitle: `NHS.UK React Components (v${packageJson.version})`,
368
brandUrl: 'https://github.com/NHSDigital/nhsuk-react-components',
379
});

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@
7474
"@rollup/plugin-commonjs": "^29.0.0",
7575
"@rollup/plugin-node-resolve": "^16.0.3",
7676
"@rollup/plugin-typescript": "^12.3.0",
77-
"@storybook/addon-docs": "^10.1.11",
78-
"@storybook/addon-links": "^10.1.10",
79-
"@storybook/react-vite": "^10.1.10",
77+
"@storybook/addon-docs": "^10.2.0",
78+
"@storybook/addon-links": "^10.2.0",
79+
"@storybook/react-vite": "^10.2.0",
8080
"@testing-library/dom": "^10.4.1",
8181
"@testing-library/jest-dom": "^6.9.1",
8282
"@testing-library/react": "^16.3.1",
@@ -109,12 +109,12 @@
109109
"rollup": "^4.55.1",
110110
"rollup-preserve-directives": "^1.1.3",
111111
"sass-embedded": "^1.97.2",
112-
"storybook": "^10.1.11",
112+
"storybook": "^10.2.0",
113113
"tslib": "^2.8.1",
114114
"typescript": "^5.9.3",
115115
"typescript-eslint": "^8.53.0",
116116
"vite": "^7.3.1",
117-
"vite-tsconfig-paths": "^6.0.4"
117+
"vite-tsconfig-paths": "^6.0.5"
118118
},
119119
"peerDependencies": {
120120
"classnames": ">=2.5.0",

stories/Form Elements/Checkboxes.stories.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,11 @@ export const WithExclusiveNoneOptionNamed: Story = {
470470

471471
export const NoIDSupplied: Story = {
472472
name: 'Checkboxes with no ID supplied',
473+
parameters: {
474+
chromatic: {
475+
disableSnapshot: true,
476+
},
477+
},
473478
render: function NoIDSuppliedRender() {
474479
const checkbox1Ref = useRef<HTMLInputElement>(null);
475480
const checkbox2Ref = useRef<HTMLInputElement>(null);
@@ -555,6 +560,11 @@ export const NoIDSupplied: Story = {
555560

556561
export const NameSupplied: Story = {
557562
name: 'Checkboxes with name supplied',
563+
parameters: {
564+
chromatic: {
565+
disableSnapshot: true,
566+
},
567+
},
558568
render: function NameSuppliedRender() {
559569
const checkbox1Ref = useRef<HTMLInputElement>(null);
560570
const checkbox2Ref = useRef<HTMLInputElement>(null);
@@ -640,6 +650,11 @@ export const NameSupplied: Story = {
640650

641651
export const IDPrefixSupplied: Story = {
642652
name: 'Checkboxes with ID prefix supplied',
653+
parameters: {
654+
chromatic: {
655+
disableSnapshot: true,
656+
},
657+
},
643658
render: function IDPrefixSuppliedRender() {
644659
const checkbox1Ref = useRef<HTMLInputElement>(null);
645660
const checkbox2Ref = useRef<HTMLInputElement>(null);
@@ -726,6 +741,11 @@ export const IDPrefixSupplied: Story = {
726741

727742
export const IDPrefixAndNameSupplied: Story = {
728743
name: 'Checkboxes with ID prefix and name supplied',
744+
parameters: {
745+
chromatic: {
746+
disableSnapshot: true,
747+
},
748+
},
729749
render: function IDPrefixAndNameSuppliedRender() {
730750
const checkbox1Ref = useRef<HTMLInputElement>(null);
731751
const checkbox2Ref = useRef<HTMLInputElement>(null);
@@ -812,6 +832,11 @@ export const IDPrefixAndNameSupplied: Story = {
812832

813833
export const OnChangeAndOnInputHandlers: Story = {
814834
name: 'Checkboxes change and input handlers',
835+
parameters: {
836+
chromatic: {
837+
disableSnapshot: true,
838+
},
839+
},
815840
render: function OnChangeAndOnInputHandlersRender() {
816841
const [changeEventLog, setChangeEventLog] = useState<Array<string>>([]);
817842
const [inputEventLog, setInputEventLog] = useState<Array<string>>([]);

0 commit comments

Comments
 (0)