Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 18e24fb

Browse files
committedMar 15, 2024··
Oppdatere storybook addons
1 parent 08f735d commit 18e24fb

File tree

10 files changed

+13
-122
lines changed

10 files changed

+13
-122
lines changed
 

‎apps/endringsmelding-pleiepenger/.storybook/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = {
22
stories: ['../src/storybook/**/*.stories.tsx'],
3-
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', 'storybook-formik/register'],
3+
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
44
framework: {
55
name: '@storybook/react-vite',
66
options: {},

‎apps/omsorgspengerutbetaling-soknad/.storybook/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = {
22
stories: ['../src/storybook/**/*.stories.tsx'],
3-
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', 'storybook-formik/register'],
3+
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
44
framework: {
55
name: '@storybook/react-vite',
66
options: {},

‎apps/omsorgspengesoknad/.storybook/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const config = {
22
stories: ['../src/storybook/**/*.stories.tsx'],
3-
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', 'storybook-formik/register'],
3+
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y'],
44
framework: {
55
name: '@storybook/react-vite',
66
options: {},

‎packages/sif-common-formik-ds/.storybook/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
'@storybook/addon-essentials',
55
'@storybook/addon-interactions',
66
'@storybook/addon-a11y',
7-
// 'storybook-formik/register',
7+
'@storybook/preset-scss',
88
],
99
framework: {
1010
name: '@storybook/react-vite',

‎packages/sif-common-formik-ds/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"react-syntax-highlighter": "15.5.0",
6363
"rimraf": "5.0.5",
6464
"storybook": "8.0.0",
65-
"storybook-formik": "2.4.2",
6665
"vite": "5.1.6",
6766
"vite-plugin-checker": "0.6.4",
6867
"vitest": "1.3.1"

‎packages/sif-common-formik-ds/storybook/stories/validation/ValidationExample.tsx

+3-35
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ import * as React from 'react';
44
import { useIntl } from 'react-intl';
55
import Block from '@navikt/sif-common-core-ds/src/atoms/block/Block';
66
import { prettifyDate } from '@navikt/sif-common-utils';
7-
import { getTypedFormComponents } from '../../../lib';
8-
import datepickerUtils from '../../../src/components/formik-datepicker/datepickerUtils';
7+
98
import TypedFormikWrapper from '../../../src/components/typed-formik-wrapper/TypedFormikWrapper';
109
import {
1110
getCheckedValidator,
12-
getDateRangeValidator,
1311
getDateValidator,
1412
getFødselsnummerValidator,
1513
getNumberValidator,
@@ -33,6 +31,7 @@ import { ValidationError } from '../../../src/validation/types';
3331
import ValidationErrorList from '../../components/validation-error-list/ValidationErrorList';
3432
import ValidationPanel from '../../components/validation-panel/ValidationPanel';
3533
import { FormFields, FormValues } from './types';
34+
import { getTypedFormComponents } from '../../../src';
3635

3736
const initialValues: FormValues = {
3837
liste: [],
@@ -52,9 +51,7 @@ const ValidationExample = () => {
5251
onSubmit={(values) => {
5352
console.log('FormikWrapperSubmit', values);
5453
}}
55-
renderForm={(formik) => {
56-
const fromDate = datepickerUtils.getDateFromDateString(formik.values.tidsperiode_fra);
57-
const toDate = datepickerUtils.getDateFromDateString(formik.values.tidsperiode_til);
54+
renderForm={() => {
5855
return (
5956
<Form.Form
6057
submitButtonLabel="Ok"
@@ -313,35 +310,6 @@ interface Options extends DateValidationOptions {
313310
const errorFromDate = getDateRangeValidator(options).validateFromDate(value);
314311
const errorToDate = getDateRangeValidator(options).validateToDate(value);
315312
`}>
316-
<Panel>
317-
<Form.DateRangePicker
318-
legend="Når startet og avsluttet du virksomheten?"
319-
fromInputProps={{
320-
label: 'Startdato',
321-
name: FormFields.tidsperiode_fra,
322-
dayPickerProps: { defaultMonth: new Date(2021, 0, 1) },
323-
validate: getDateRangeValidator({
324-
min: new Date(2021, 0, 1),
325-
max: new Date(2021, 11, 31),
326-
toDate,
327-
required: true,
328-
onlyWeekdays: true,
329-
}).validateFromDate,
330-
}}
331-
toInputProps={{
332-
label: 'Sluttdato',
333-
name: FormFields.tidsperiode_til,
334-
dayPickerProps: { defaultMonth: new Date(2021, 11, 31) },
335-
validate: getDateRangeValidator({
336-
min: new Date(2000, 0, 1),
337-
max: new Date(),
338-
fromDate,
339-
required: true,
340-
onlyWeekdays: true,
341-
}).validateToDate,
342-
}}
343-
/>
344-
</Panel>
345313
<ValidationErrorList
346314
title="Feilmeldinger - Startdato"
347315
errors={{

‎packages/sif-common-forms-ds/.storybook/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export default {
44
'@storybook/addon-essentials',
55
'@storybook/addon-interactions',
66
'@storybook/addon-a11y',
7-
// 'storybook-formik/register',
87
'@storybook/addon-toolbars',
98
],
109
framework: {

‎packages/sif-common-soknad-ds/.storybook/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export default {
44
'@storybook/addon-essentials',
55
'@storybook/addon-interactions',
66
'@storybook/addon-a11y',
7-
// 'storybook-formik/register',
87
'@storybook/addon-toolbars',
98
],
109
framework: {

‎packages/sif-common-ui/.storybook/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export default {
44
'@storybook/addon-essentials',
55
'@storybook/addon-interactions',
66
'@storybook/addon-a11y',
7-
// 'storybook-formik/register',
87
'@storybook/addon-toolbars',
98
],
109
framework: {

‎yarn.lock

+6-79
Original file line numberDiff line numberDiff line change
@@ -4184,7 +4184,6 @@ __metadata:
41844184
react-syntax-highlighter: 15.5.0
41854185
rimraf: 5.0.5
41864186
storybook: 8.0.0
4187-
storybook-formik: 2.4.2
41884187
uuid: 9.0.1
41894188
vite: 5.1.6
41904189
vite-plugin-checker: 0.6.4
@@ -7517,13 +7516,6 @@ __metadata:
75177516
languageName: node
75187517
linkType: hard
75197518

7520-
"@types/base16@npm:^1.0.2":
7521-
version: 1.0.5
7522-
resolution: "@types/base16@npm:1.0.5"
7523-
checksum: caa391944e9af95d395ad8a489ad7e6bc3b358f73f876215313e8a2f97a18d109d8ab3d6d92bd473d9a1c782639a82921a3c30124922f2492082b550a2e9f6a6
7524-
languageName: node
7525-
linkType: hard
7526-
75277519
"@types/body-parser@npm:*":
75287520
version: 1.19.5
75297521
resolution: "@types/body-parser@npm:1.19.5"
@@ -7866,7 +7858,7 @@ __metadata:
78667858
languageName: node
78677859
linkType: hard
78687860

7869-
"@types/lodash@npm:*, @types/lodash@npm:^4.14.167, @types/lodash@npm:^4.14.172, @types/lodash@npm:^4.14.178":
7861+
"@types/lodash@npm:*, @types/lodash@npm:^4.14.167, @types/lodash@npm:^4.14.172":
78707862
version: 4.17.0
78717863
resolution: "@types/lodash@npm:4.17.0"
78727864
checksum: 3f98c0b67a93994cbc3403d4fa9dbaf52b0b6bb7f07a764d73875c2dcd5ef91222621bd5bcf8eee7b417a74d175c2f7191b9f595f8603956fd06f0674c0cba93
@@ -8003,7 +7995,7 @@ __metadata:
80037995
languageName: node
80047996
linkType: hard
80057997

8006-
"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.4":
7998+
"@types/prop-types@npm:*":
80077999
version: 15.7.11
80088000
resolution: "@types/prop-types@npm:15.7.11"
80098001
checksum: 7519ff11d06fbf6b275029fe03fff9ec377b4cb6e864cac34d87d7146c7f5a7560fd164bdc1d2dbe00b60c43713631251af1fd3d34d46c69cd354602bc0c7c54
@@ -9774,13 +9766,6 @@ __metadata:
97749766
languageName: node
97759767
linkType: hard
97769768

9777-
"base16@npm:^1.0.0":
9778-
version: 1.0.0
9779-
resolution: "base16@npm:1.0.0"
9780-
checksum: 0cd449a2db0f0f957e4b6b57e33bc43c9e20d4f1dd744065db94b5da35e8e71fa4dc4bc7a901e59a84d5f8b6936e3c520e2471787f667fc155fb0f50d8540f5d
9781-
languageName: node
9782-
linkType: hard
9783-
97849769
"base64-js@npm:^1.3.1":
97859770
version: 1.5.1
97869771
resolution: "base64-js@npm:1.5.1"
@@ -10682,7 +10667,7 @@ __metadata:
1068210667
languageName: node
1068310668
linkType: hard
1068410669

10685-
"color-convert@npm:^1.9.0, color-convert@npm:^1.9.3":
10670+
"color-convert@npm:^1.9.0":
1068610671
version: 1.9.3
1068710672
resolution: "color-convert@npm:1.9.3"
1068810673
dependencies:
@@ -10714,7 +10699,7 @@ __metadata:
1071410699
languageName: node
1071510700
linkType: hard
1071610701

10717-
"color-string@npm:^1.6.0, color-string@npm:^1.9.0":
10702+
"color-string@npm:^1.9.0":
1071810703
version: 1.9.1
1071910704
resolution: "color-string@npm:1.9.1"
1072010705
dependencies:
@@ -10724,16 +10709,6 @@ __metadata:
1072410709
languageName: node
1072510710
linkType: hard
1072610711

10727-
"color@npm:^3.2.1":
10728-
version: 3.2.1
10729-
resolution: "color@npm:3.2.1"
10730-
dependencies:
10731-
color-convert: ^1.9.3
10732-
color-string: ^1.6.0
10733-
checksum: f81220e8b774d35865c2561be921f5652117638dcda7ca4029262046e37fc2444ac7bbfdd110cf1fd9c074a4ee5eda8f85944ffbdda26186b602dd9bb05f6400
10734-
languageName: node
10735-
linkType: hard
10736-
1073710712
"color@npm:^4.2.3":
1073810713
version: 4.2.3
1073910714
resolution: "color@npm:4.2.3"
@@ -11317,7 +11292,7 @@ __metadata:
1131711292
languageName: node
1131811293
linkType: hard
1131911294

11320-
"csstype@npm:^3.0.10, csstype@npm:^3.0.2":
11295+
"csstype@npm:^3.0.2":
1132111296
version: 3.1.3
1132211297
resolution: "csstype@npm:3.1.3"
1132311298
checksum: 8db785cc92d259102725b3c694ec0c823f5619a84741b5c7991b8ad135dfaa66093038a1cc63e03361a6cd28d122be48f2106ae72334e067dd619a51f49eddf7
@@ -17636,13 +17611,6 @@ __metadata:
1763617611
languageName: node
1763717612
linkType: hard
1763817613

17639-
"lodash.curry@npm:^4.1.1":
17640-
version: 4.1.1
17641-
resolution: "lodash.curry@npm:4.1.1"
17642-
checksum: 9192b70fe7df4d1ff780c0260bee271afa9168c93fe4fa24bc861900240531b59781b5fdaadf4644fea8f4fbcd96f0700539ab294b579ffc1022c6c15dcc462a
17643-
languageName: node
17644-
linkType: hard
17645-
1764617614
"lodash.debounce@npm:4.0.8, lodash.debounce@npm:^4.0.8":
1764717615
version: 4.0.8
1764817616
resolution: "lodash.debounce@npm:4.0.8"
@@ -20288,7 +20256,7 @@ __metadata:
2028820256
languageName: node
2028920257
linkType: hard
2029020258

20291-
"prop-types@npm:15.8.1, prop-types@npm:^15.6.1, prop-types@npm:^15.7.2, prop-types@npm:^15.8.0, prop-types@npm:^15.8.1":
20259+
"prop-types@npm:15.8.1, prop-types@npm:^15.6.1, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1":
2029220260
version: 15.8.1
2029320261
resolution: "prop-types@npm:15.8.1"
2029420262
dependencies:
@@ -20556,20 +20524,6 @@ __metadata:
2055620524
languageName: node
2055720525
linkType: hard
2055820526

20559-
"react-base16-styling@npm:^0.8.2":
20560-
version: 0.8.2
20561-
resolution: "react-base16-styling@npm:0.8.2"
20562-
dependencies:
20563-
"@types/base16": ^1.0.2
20564-
"@types/lodash": ^4.14.178
20565-
base16: ^1.0.0
20566-
color: ^3.2.1
20567-
csstype: ^3.0.10
20568-
lodash.curry: ^4.1.1
20569-
checksum: be5eba7f7b5330bc616c327f0fcba03e4676318382ad62c841aeac483da16e394a6c313af3fc15e6a08ed3616f8896376c46400852bbff86b15852224146b366
20570-
languageName: node
20571-
linkType: hard
20572-
2057320527
"react-collapse@npm:5.1.1":
2057420528
version: 5.1.1
2057520529
resolution: "react-collapse@npm:5.1.1"
@@ -20731,20 +20685,6 @@ __metadata:
2073120685
languageName: node
2073220686
linkType: hard
2073320687

20734-
"react-json-tree@npm:^0.15.0":
20735-
version: 0.15.2
20736-
resolution: "react-json-tree@npm:0.15.2"
20737-
dependencies:
20738-
"@types/prop-types": ^15.7.4
20739-
prop-types: ^15.8.0
20740-
react-base16-styling: ^0.8.2
20741-
peerDependencies:
20742-
"@types/react": ^16.3.0 || ^17.0.0
20743-
react: ^16.3.0 || ^17.0.0
20744-
checksum: b5ae2fa34b1ab72f39412a2b5d7a5279b1778cd66e22cbabf20f1d83cd3de354a0f19bac44b880a89494c1695d488b89302771135d62c24546cc314e9d3dd9f1
20745-
languageName: node
20746-
linkType: hard
20747-
2074820688
"react-lifecycles-compat@npm:^3.0.0":
2074920689
version: 3.0.4
2075020690
resolution: "react-lifecycles-compat@npm:3.0.4"
@@ -22333,19 +22273,6 @@ __metadata:
2233322273
languageName: node
2233422274
linkType: hard
2233522275

22336-
"storybook-formik@npm:2.4.2":
22337-
version: 2.4.2
22338-
resolution: "storybook-formik@npm:2.4.2"
22339-
dependencies:
22340-
react-json-tree: ^0.15.0
22341-
peerDependencies:
22342-
formik: ^1.0.0||^2.0.0
22343-
react: "*"
22344-
react-dom: "*"
22345-
checksum: 1fd82aaf4d012da1f56a5d7d705c98757ace589c673b169685e00168ca64d61e60f0e485befb5f965f502d5e0755a5c65b4ce370dee08b9d54dc25bc53f9a4ba
22346-
languageName: node
22347-
linkType: hard
22348-
2234922276
"storybook@npm:8.0.0":
2235022277
version: 8.0.0
2235122278
resolution: "storybook@npm:8.0.0"

0 commit comments

Comments
 (0)
Please sign in to comment.