Commit a8531978 by Alex Khomenko Committed by GitHub

Grafana-UI: add storysource addon to Storybook (#22490)

* Add @storybook/addon-storysource

* Enable the addon

* Fix Select label

* Lock storysource version
parent 0c020f22
...@@ -5,5 +5,6 @@ module.exports = { ...@@ -5,5 +5,6 @@ module.exports = {
'@storybook/addon-actions', '@storybook/addon-actions',
'@storybook/addon-docs', '@storybook/addon-docs',
'storybook-dark-mode/register', 'storybook-dark-mode/register',
'@storybook/addon-storysource',
], ],
}; };
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
"@storybook/addon-docs": "5.3.9", "@storybook/addon-docs": "5.3.9",
"@storybook/addon-info": "5.3.9", "@storybook/addon-info": "5.3.9",
"@storybook/addon-knobs": "5.3.9", "@storybook/addon-knobs": "5.3.9",
"@storybook/addon-storysource": "5.3.14",
"@storybook/react": "5.3.9", "@storybook/react": "5.3.9",
"@storybook/theming": "5.3.9", "@storybook/theming": "5.3.9",
"@types/classnames": "2.2.7", "@types/classnames": "2.2.7",
......
...@@ -98,7 +98,7 @@ const renderForm = (defaultValues?: Partial<FormDTO>) => ( ...@@ -98,7 +98,7 @@ const renderForm = (defaultValues?: Partial<FormDTO>) => (
<Forms.InputControl name="radio" control={control} options={selectOptions} as={RadioButtonGroup} /> <Forms.InputControl name="radio" control={control} options={selectOptions} as={RadioButtonGroup} />
</Field> </Field>
<Field label="RadioButton" invalid={!!errors.select}> <Field label="Select" invalid={!!errors.select}>
<Forms.InputControl <Forms.InputControl
name="select" name="select"
control={control} control={control}
......
...@@ -2636,6 +2636,18 @@ ...@@ -2636,6 +2636,18 @@
"@emotion/sheet" "0.9.4" "@emotion/sheet" "0.9.4"
"@emotion/utils" "0.11.3" "@emotion/utils" "0.11.3"
"@emotion/core@^10.0.27":
version "10.0.28"
resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.28.tgz#bb65af7262a234593a9e952c041d0f1c9b9bef3d"
integrity sha512-pH8UueKYO5jgg0Iq+AmCLxBsvuGtvlmiDCOuv8fGNYn3cowFpLN98L8zO56U0H1PjDIyAlXymgL3Wu7u7v6hbA==
dependencies:
"@babel/runtime" "^7.5.5"
"@emotion/cache" "^10.0.27"
"@emotion/css" "^10.0.27"
"@emotion/serialize" "^0.11.15"
"@emotion/sheet" "0.9.4"
"@emotion/utils" "0.11.3"
"@emotion/core@^10.0.9": "@emotion/core@^10.0.9":
version "10.0.21" version "10.0.21"
resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.21.tgz#2e8398d2b92fd90d4ed6ac4d0b66214971de3458" resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.21.tgz#2e8398d2b92fd90d4ed6ac4d0b66214971de3458"
...@@ -4088,6 +4100,38 @@ ...@@ -4088,6 +4100,38 @@
react-lifecycles-compat "^3.0.4" react-lifecycles-compat "^3.0.4"
react-select "^3.0.8" react-select "^3.0.8"
"@storybook/addon-storysource@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/addon-storysource/-/addon-storysource-5.3.14.tgz#da820431638f36e961f74c6f4e4dea4b7d9ec9f9"
integrity sha512-ctNmSkvnMGmYUUjdzKtuA71CsxNfQ9/FSDWV7pbaMNNsq05QVT6CcC9as80wcw32RdD58kHWXfPuNZ2Z8s3CMQ==
dependencies:
"@storybook/addons" "5.3.14"
"@storybook/components" "5.3.14"
"@storybook/router" "5.3.14"
"@storybook/source-loader" "5.3.14"
"@storybook/theming" "5.3.14"
core-js "^3.0.1"
estraverse "^4.2.0"
loader-utils "^1.2.3"
prettier "^1.16.4"
prop-types "^15.7.2"
react-syntax-highlighter "^11.0.2"
regenerator-runtime "^0.13.3"
util-deprecate "^1.0.2"
"@storybook/addons@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.14.tgz#ff96c2c46a617f777c3660395017d2aef5319f19"
integrity sha512-zoN1MYlArdThp93i+Ogil/pihyx8n7nkrdSO0j9HUh6jUsGeFFEluPQZdRFte9NIoY6ZWSWwuEMDgrv2Pw9r2Q==
dependencies:
"@storybook/api" "5.3.14"
"@storybook/channels" "5.3.14"
"@storybook/client-logger" "5.3.14"
"@storybook/core-events" "5.3.14"
core-js "^3.0.1"
global "^4.3.2"
util-deprecate "^1.0.2"
"@storybook/addons@5.3.9": "@storybook/addons@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.9.tgz#f2492de356e0cd38e3da357f4dafa058a4756e36" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.3.9.tgz#f2492de356e0cd38e3da357f4dafa058a4756e36"
...@@ -4101,6 +4145,32 @@ ...@@ -4101,6 +4145,32 @@
global "^4.3.2" global "^4.3.2"
util-deprecate "^1.0.2" util-deprecate "^1.0.2"
"@storybook/api@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.3.14.tgz#8c2bb226a4a5de7974ee2ccce36986b72f462f1b"
integrity sha512-ANWRMTLEoAfu0IsXqbxmbTpxS8xTByZgLj20tH96bxgH1rJo9KAZnJ8A9kGYr+zklU8QnYvVIgmV3HESXII9zg==
dependencies:
"@reach/router" "^1.2.1"
"@storybook/channels" "5.3.14"
"@storybook/client-logger" "5.3.14"
"@storybook/core-events" "5.3.14"
"@storybook/csf" "0.0.1"
"@storybook/router" "5.3.14"
"@storybook/theming" "5.3.14"
"@types/reach__router" "^1.2.3"
core-js "^3.0.1"
fast-deep-equal "^2.0.1"
global "^4.3.2"
lodash "^4.17.15"
memoizerific "^1.11.3"
prop-types "^15.6.2"
react "^16.8.3"
semver "^6.0.0"
shallow-equal "^1.1.0"
store2 "^2.7.1"
telejson "^3.2.0"
util-deprecate "^1.0.2"
"@storybook/api@5.3.9": "@storybook/api@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.3.9.tgz#090119c6fd4082442e926a434d3d171535ec6784" resolved "https://registry.yarnpkg.com/@storybook/api/-/api-5.3.9.tgz#090119c6fd4082442e926a434d3d171535ec6784"
...@@ -4138,6 +4208,13 @@ ...@@ -4138,6 +4208,13 @@
global "^4.3.2" global "^4.3.2"
telejson "^3.2.0" telejson "^3.2.0"
"@storybook/channels@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.3.14.tgz#9969e27761a80afb495bc1475f0173f9b6ef5a76"
integrity sha512-k9QBf9Kwe+iGmdEK/kW5xprqem2SPfBVwET6LWvJkWOl9UQ9VoMuCHgV55p0tzjcugaqWWKoF9+FRMWxWRfsQg==
dependencies:
core-js "^3.0.1"
"@storybook/channels@5.3.9": "@storybook/channels@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.3.9.tgz#7ee8f6e6f4c9465227120d6711805b5e6862107f" resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-5.3.9.tgz#7ee8f6e6f4c9465227120d6711805b5e6862107f"
...@@ -4168,6 +4245,13 @@ ...@@ -4168,6 +4245,13 @@
ts-dedent "^1.1.0" ts-dedent "^1.1.0"
util-deprecate "^1.0.2" util-deprecate "^1.0.2"
"@storybook/client-logger@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.3.14.tgz#85068f1b665a52163191eb5976f1581bce6df0e4"
integrity sha512-YCHEsOvo6zPb4udlyAwqr5W0Kv9mAEQmcX73w9IDvAxbjR00T7empW7qmbjvviftKB/5MEgDdiYbj64ccs3aqg==
dependencies:
core-js "^3.0.1"
"@storybook/client-logger@5.3.9": "@storybook/client-logger@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.3.9.tgz#06654be9caa8d37366270b0426c2d5acb217f504" resolved "https://registry.yarnpkg.com/@storybook/client-logger/-/client-logger-5.3.9.tgz#06654be9caa8d37366270b0426c2d5acb217f504"
...@@ -4175,6 +4259,33 @@ ...@@ -4175,6 +4259,33 @@
dependencies: dependencies:
core-js "^3.0.1" core-js "^3.0.1"
"@storybook/components@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.3.14.tgz#0f2f90113674e14ee74d5d16d6b3b1220cb0fa16"
integrity sha512-AsjkIFBrrqcBDLxGdmUHiauZo5gOL65eXx8WA7/yJDF8s45VVZX5Z0buOnjFyEhGVus02gwTov8da2irjL862A==
dependencies:
"@storybook/client-logger" "5.3.14"
"@storybook/theming" "5.3.14"
"@types/react-syntax-highlighter" "11.0.2"
"@types/react-textarea-autosize" "^4.3.3"
core-js "^3.0.1"
global "^4.3.2"
lodash "^4.17.15"
markdown-to-jsx "^6.9.1"
memoizerific "^1.11.3"
polished "^3.3.1"
popper.js "^1.14.7"
prop-types "^15.7.2"
react "^16.8.3"
react-dom "^16.8.3"
react-focus-lock "^2.1.0"
react-helmet-async "^1.0.2"
react-popper-tooltip "^2.8.3"
react-syntax-highlighter "^11.0.2"
react-textarea-autosize "^7.1.0"
simplebar-react "^1.0.0-alpha.6"
ts-dedent "^1.1.0"
"@storybook/components@5.3.9": "@storybook/components@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.3.9.tgz#1fbc688770889ddadb8c603f5a4dbcf987f3eb0f" resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.3.9.tgz#1fbc688770889ddadb8c603f5a4dbcf987f3eb0f"
...@@ -4202,6 +4313,13 @@ ...@@ -4202,6 +4313,13 @@
simplebar-react "^1.0.0-alpha.6" simplebar-react "^1.0.0-alpha.6"
ts-dedent "^1.1.0" ts-dedent "^1.1.0"
"@storybook/core-events@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.3.14.tgz#d476eea7032670db1a84bef7e5baadb04c2de529"
integrity sha512-VCPLKqRugsOSx/smMJiJOvRgAzTrMpsbRuFw48kBGkQMP9TEV82Qe/341dv+f4GllPyBZyANG0p0m5+w7ZCURQ==
dependencies:
core-js "^3.0.1"
"@storybook/core-events@5.3.9": "@storybook/core-events@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.3.9.tgz#3c7fbc20204ae4b937c896ed6281e782cc09c4aa" resolved "https://registry.yarnpkg.com/@storybook/core-events/-/core-events-5.3.9.tgz#3c7fbc20204ae4b937c896ed6281e782cc09c4aa"
...@@ -4341,6 +4459,21 @@ ...@@ -4341,6 +4459,21 @@
ts-dedent "^1.1.0" ts-dedent "^1.1.0"
webpack "^4.33.0" webpack "^4.33.0"
"@storybook/router@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.14.tgz#6535267624da5f54971c37e497df1c161f65be8f"
integrity sha512-O0KwQFncdBeq+O2Aq8UAFBVWjWmP5rtqoacUOFSGkXgObOnyniEraLiPH7rPtq2dAlSpgYI9+srQAZfo52Hz2A==
dependencies:
"@reach/router" "^1.2.1"
"@storybook/csf" "0.0.1"
"@types/reach__router" "^1.2.3"
core-js "^3.0.1"
global "^4.3.2"
lodash "^4.17.15"
memoizerific "^1.11.3"
qs "^6.6.0"
util-deprecate "^1.0.2"
"@storybook/router@5.3.9": "@storybook/router@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.9.tgz#3c6e01f4dced9de8e8c5c314352fdc437f2441c2" resolved "https://registry.yarnpkg.com/@storybook/router/-/router-5.3.9.tgz#3c6e01f4dced9de8e8c5c314352fdc437f2441c2"
...@@ -4356,6 +4489,22 @@ ...@@ -4356,6 +4489,22 @@
qs "^6.6.0" qs "^6.6.0"
util-deprecate "^1.0.2" util-deprecate "^1.0.2"
"@storybook/source-loader@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-5.3.14.tgz#62428a1b12fc9f51f24d27194a06d343366d8bf5"
integrity sha512-j4z83KLfiYrFi/KDwX9K6LsLfFo0vbsWProUMjVV/Hapio/ozvFm2YAYc4UWrYkzg+DM8/OKrK5wXLf18HcHDA==
dependencies:
"@storybook/addons" "5.3.14"
"@storybook/client-logger" "5.3.14"
"@storybook/csf" "0.0.1"
core-js "^3.0.1"
estraverse "^4.2.0"
global "^4.3.2"
loader-utils "^1.2.3"
prettier "^1.16.4"
prop-types "^15.7.2"
regenerator-runtime "^0.13.3"
"@storybook/source-loader@5.3.9": "@storybook/source-loader@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-5.3.9.tgz#6820476c5fb08c0950dcde033f88b9496df38f67" resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-5.3.9.tgz#6820476c5fb08c0950dcde033f88b9496df38f67"
...@@ -4372,6 +4521,24 @@ ...@@ -4372,6 +4521,24 @@
prop-types "^15.7.2" prop-types "^15.7.2"
regenerator-runtime "^0.13.3" regenerator-runtime "^0.13.3"
"@storybook/theming@5.3.14":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.14.tgz#4923739ad0d7d673b7844f27da8a3c6cf118790f"
integrity sha512-raqXC3yJycEt1CrCAfnBYUA6pyJI80E9M26EeQl3UfytJOL6euprOi+D17QvxqBn7jmmf9ZDw5XRkvJhQ17Y7Q==
dependencies:
"@emotion/core" "^10.0.20"
"@emotion/styled" "^10.0.17"
"@storybook/client-logger" "5.3.14"
core-js "^3.0.1"
deep-object-diff "^1.1.0"
emotion-theming "^10.0.19"
global "^4.3.2"
memoizerific "^1.11.3"
polished "^3.3.1"
prop-types "^15.7.2"
resolve-from "^5.0.0"
ts-dedent "^1.1.0"
"@storybook/theming@5.3.9": "@storybook/theming@5.3.9":
version "5.3.9" version "5.3.9"
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.9.tgz#caaeea398f9e630394298ccfe8f36a185a289e4f" resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.9.tgz#caaeea398f9e630394298ccfe8f36a185a289e4f"
...@@ -5322,6 +5489,21 @@ ...@@ -5322,6 +5489,21 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c"
integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==
"@types/rc-slider@8.6.5":
version "8.6.5"
resolved "https://registry.yarnpkg.com/@types/rc-slider/-/rc-slider-8.6.5.tgz#5032e5a4e4074588068d4b149f9e80a5ae80d8e3"
integrity sha512-cz5xqjsN4OtqoX0gMG5KheFUV/4DwmzpSXJdLyHQXp2xwfPyPggh7nLy9nwKXQhXLnimOH3EXz9AAlsA8UGkLg==
dependencies:
"@types/rc-tooltip" "*"
"@types/react" "*"
"@types/rc-tooltip@*":
version "3.7.2"
resolved "https://registry.yarnpkg.com/@types/rc-tooltip/-/rc-tooltip-3.7.2.tgz#bbf35284cc1adf6fb61cc49262fd4199ebcc7bff"
integrity sha512-N1SJZlYzMxU96ACxzdBfWfG8o4oQpDRjuWrenIrvzAYFUnMscSZVx1LU7zmHO2aOumLz7G0odNxREt3BrE1WHg==
dependencies:
"@types/react" "*"
"@types/reach__router@^1.2.3": "@types/reach__router@^1.2.3":
version "1.2.6" version "1.2.6"
resolved "https://registry.yarnpkg.com/@types/reach__router/-/reach__router-1.2.6.tgz#b14cf1adbd1a365d204bbf6605cd9dd7b8816c87" resolved "https://registry.yarnpkg.com/@types/reach__router/-/reach__router-1.2.6.tgz#b14cf1adbd1a365d204bbf6605cd9dd7b8816c87"
...@@ -20164,6 +20346,20 @@ rc-drawer@3.0.2: ...@@ -20164,6 +20346,20 @@ rc-drawer@3.0.2:
rc-util "^4.11.2" rc-util "^4.11.2"
react-lifecycles-compat "^3.0.4" react-lifecycles-compat "^3.0.4"
rc-slider@8.7.1:
version "8.7.1"
resolved "https://registry.yarnpkg.com/rc-slider/-/rc-slider-8.7.1.tgz#9ed07362dc93489a38e654b21b8122ad70fd3c42"
integrity sha512-WMT5mRFUEcrLWwTxsyS8jYmlaMsTVCZIGENLikHsNv+tE8ThU2lCoPfi/xFNUfJFNFSBFP3MwPez9ZsJmNp13g==
dependencies:
babel-runtime "6.x"
classnames "^2.2.5"
prop-types "^15.5.4"
rc-tooltip "^3.7.0"
rc-util "^4.0.4"
react-lifecycles-compat "^3.0.4"
shallowequal "^1.1.0"
warning "^4.0.3"
rc-time-picker@^3.7.2: rc-time-picker@^3.7.2:
version "3.7.2" version "3.7.2"
resolved "https://registry.yarnpkg.com/rc-time-picker/-/rc-time-picker-3.7.2.tgz#fabe5501adf1374d31a2d3b47f1ba89fc2dc2467" resolved "https://registry.yarnpkg.com/rc-time-picker/-/rc-time-picker-3.7.2.tgz#fabe5501adf1374d31a2d3b47f1ba89fc2dc2467"
...@@ -20176,7 +20372,16 @@ rc-time-picker@^3.7.2: ...@@ -20176,7 +20372,16 @@ rc-time-picker@^3.7.2:
rc-trigger "^2.2.0" rc-trigger "^2.2.0"
react-lifecycles-compat "^3.0.4" react-lifecycles-compat "^3.0.4"
rc-trigger@^2.2.0: rc-tooltip@^3.7.0:
version "3.7.3"
resolved "https://registry.yarnpkg.com/rc-tooltip/-/rc-tooltip-3.7.3.tgz#280aec6afcaa44e8dff0480fbaff9e87fc00aecc"
integrity sha512-dE2ibukxxkrde7wH9W8ozHKUO4aQnPZ6qBHtrTH9LoO836PjDdiaWO73fgPB05VfJs9FbZdmGPVEbXCeOP99Ww==
dependencies:
babel-runtime "6.x"
prop-types "^15.5.8"
rc-trigger "^2.2.2"
rc-trigger@^2.2.0, rc-trigger@^2.2.2:
version "2.6.5" version "2.6.5"
resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-2.6.5.tgz#140a857cf28bd0fa01b9aecb1e26a50a700e9885" resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-2.6.5.tgz#140a857cf28bd0fa01b9aecb1e26a50a700e9885"
integrity sha512-m6Cts9hLeZWsTvWnuMm7oElhf+03GOjOLfTuU0QmdB9ZrW7jR2IpI5rpNM7i9MvAAlMAmTx5Zr7g3uu/aMvZAw== integrity sha512-m6Cts9hLeZWsTvWnuMm7oElhf+03GOjOLfTuU0QmdB9ZrW7jR2IpI5rpNM7i9MvAAlMAmTx5Zr7g3uu/aMvZAw==
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment