From 5d539545d9a2ca22627b605cc9509afd899513ac Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Jun 2020 16:34:58 +0200 Subject: [PATCH 01/24] FIX list of versions missing the current version -edge case- --- lib/ui/src/components/sidebar/RefIndicator.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ui/src/components/sidebar/RefIndicator.tsx b/lib/ui/src/components/sidebar/RefIndicator.tsx index 0f36d5b74f6..fde629cba5b 100644 --- a/lib/ui/src/components/sidebar/RefIndicator.tsx +++ b/lib/ui/src/components/sidebar/RefIndicator.tsx @@ -102,10 +102,10 @@ const Version = styled.div({ }); const CurrentVersion: FunctionComponent = ({ url, versions }) => { - const currentVersionId = useMemo(() => Object.entries(versions).find(([k, v]) => v === url)[0], [ - url, - versions, - ]); + const currentVersionId = useMemo(() => { + const c = Object.entries(versions).find(([k, v]) => v === url); + return c && c[0] ? c[0] : 'version'; + }, [url, versions]); return ( From c2cf9077cae0a5ce9e17978d47e695ad6057d735 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Mon, 22 Jun 2020 17:09:13 +0200 Subject: [PATCH 02/24] ADD the ability to specify versions (for example) in the refs config in main.js --- lib/core/src/server/manager/manager-config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/src/server/manager/manager-config.js b/lib/core/src/server/manager/manager-config.js index 1e8f0f546f6..9b8edf74ef9 100644 --- a/lib/core/src/server/manager/manager-config.js +++ b/lib/core/src/server/manager/manager-config.js @@ -71,11 +71,14 @@ async function getManagerWebpackConfig(options, presets) { if (definedRefs) { Object.entries(definedRefs).forEach(([key, value]) => { const url = typeof value === 'string' ? value : value.url; - const title = typeof value === 'string' ? toTitle(key) : value.title || toTitle(value.key); + const rest = + typeof value === 'string' + ? { title: toTitle(key) } + : { ...value, title: value.title || toTitle(value.key) }; refs[key] = { id: key, - title, + ...rest, url: stripTrailingSlash(url), }; }); From e439a48a6e8120252efee56ad38b06a170baaeda Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jun 2020 12:02:38 +0200 Subject: [PATCH 03/24] copy versions from previous ref object & drop error when switching versions --- examples/dev-kits/main.js | 4 ++++ lib/api/src/modules/refs.ts | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/dev-kits/main.js b/examples/dev-kits/main.js index 79db36243b4..3ba02c3459b 100644 --- a/examples/dev-kits/main.js +++ b/examples/dev-kits/main.js @@ -6,6 +6,10 @@ module.exports = { id: 'ember', title: 'Ember', url: 'https://next--storybookjs.netlify.app/ember-cli', + versions: { + next: 'https://next--storybookjs.netlify.app/ember-cli', + master: 'https://master--storybookjs.netlify.app/ember-cli', + }, }, cra: 'https://next--storybookjs.netlify.app/cra-ts-kitchen-sink', }, diff --git a/lib/api/src/modules/refs.ts b/lib/api/src/modules/refs.ts index 00595d930ed..1437ee10a06 100644 --- a/lib/api/src/modules/refs.ts +++ b/lib/api/src/modules/refs.ts @@ -108,8 +108,8 @@ export const init: ModuleFn = ({ store, provider, fullAPI }, { runCheck = true } return Object.values(refs).find(({ url }) => url.match(source)); }, changeRefVersion: (id, url) => { - const previous = api.getRefs()[id]; - const ref = { ...previous, stories: {}, url } as SetRefData; + const { versions, title } = api.getRefs()[id]; + const ref = { id, url, versions, title, stories: {} } as SetRefData; api.checkRef(ref); }, @@ -192,6 +192,7 @@ export const init: ModuleFn = ({ store, provider, fullAPI }, { runCheck = true } id, url, ...loadedData, + error: loadedData.error, type: !loadedData.stories ? 'auto-inject' : 'lazy', }); }, From 9dc3489bd09e7a2196008670f0e4678e7aed26b1 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jun 2020 12:06:18 +0200 Subject: [PATCH 04/24] FIX versions --- lib/api/src/version.ts | 2 +- lib/cli/versions.json | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/api/src/version.ts b/lib/api/src/version.ts index 43536275fd1..f9a2b7d1121 100644 --- a/lib/api/src/version.ts +++ b/lib/api/src/version.ts @@ -1 +1 @@ -export const version = '6.0.0-beta.32'; +export const version = '6.0.0-beta.33'; diff --git a/lib/cli/versions.json b/lib/cli/versions.json index 74628defd29..77730e65ace 100644 --- a/lib/cli/versions.json +++ b/lib/cli/versions.json @@ -1,17 +1,17 @@ { - "@storybook/angular": "6.0.0-beta.32", - "@storybook/aurelia": "6.0.0-beta.32", - "@storybook/ember": "6.0.0-beta.32", - "@storybook/html": "6.0.0-beta.32", - "@storybook/marionette": "6.0.0-beta.32", - "@storybook/marko": "6.0.0-beta.32", - "@storybook/mithril": "6.0.0-beta.32", - "@storybook/preact": "6.0.0-beta.32", - "@storybook/rax": "6.0.0-beta.32", - "@storybook/react": "6.0.0-beta.32", - "@storybook/riot": "6.0.0-beta.32", - "@storybook/server": "6.0.0-beta.32", - "@storybook/svelte": "6.0.0-beta.32", - "@storybook/vue": "6.0.0-beta.32", - "@storybook/web-components": "6.0.0-beta.32" + "@storybook/angular": "6.0.0-beta.33", + "@storybook/aurelia": "6.0.0-beta.33", + "@storybook/ember": "6.0.0-beta.33", + "@storybook/html": "6.0.0-beta.33", + "@storybook/marionette": "6.0.0-beta.33", + "@storybook/marko": "6.0.0-beta.33", + "@storybook/mithril": "6.0.0-beta.33", + "@storybook/preact": "6.0.0-beta.33", + "@storybook/rax": "6.0.0-beta.33", + "@storybook/react": "6.0.0-beta.33", + "@storybook/riot": "6.0.0-beta.33", + "@storybook/server": "6.0.0-beta.33", + "@storybook/svelte": "6.0.0-beta.33", + "@storybook/vue": "6.0.0-beta.33", + "@storybook/web-components": "6.0.0-beta.33" } \ No newline at end of file From fc66dee02ad360945a9bd21124819954dc6e795e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jun 2020 12:10:46 +0200 Subject: [PATCH 05/24] ADD story --- lib/ui/src/components/sidebar/Sidebar.stories.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ui/src/components/sidebar/Sidebar.stories.tsx b/lib/ui/src/components/sidebar/Sidebar.stories.tsx index f5319ebe62c..572f48418ff 100644 --- a/lib/ui/src/components/sidebar/Sidebar.stories.tsx +++ b/lib/ui/src/components/sidebar/Sidebar.stories.tsx @@ -68,6 +68,14 @@ const refs: Record = { stories, versions: { '1.0.0': 'https://example.com/v1', '2.0.0': 'https://example.com' }, }, + versionsMissingCurrent: { + id: 'versions_missing_current', + title: 'It has versions', + url: 'https://example.com', + type: 'lazy', + stories, + versions: { '1.0.0': 'https://example.com/v1', '2.0.0': 'https://example.com/v2' }, + }, error: { id: 'error', title: 'This has problems', From abca0fd38030850d653d0e4e36a3782afb1543ff Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Jun 2020 12:11:21 +0200 Subject: [PATCH 06/24] FIX versions --- lib/api/src/version.ts | 2 +- lib/cli/versions.json | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/api/src/version.ts b/lib/api/src/version.ts index 43536275fd1..f9a2b7d1121 100644 --- a/lib/api/src/version.ts +++ b/lib/api/src/version.ts @@ -1 +1 @@ -export const version = '6.0.0-beta.32'; +export const version = '6.0.0-beta.33'; diff --git a/lib/cli/versions.json b/lib/cli/versions.json index 74628defd29..77730e65ace 100644 --- a/lib/cli/versions.json +++ b/lib/cli/versions.json @@ -1,17 +1,17 @@ { - "@storybook/angular": "6.0.0-beta.32", - "@storybook/aurelia": "6.0.0-beta.32", - "@storybook/ember": "6.0.0-beta.32", - "@storybook/html": "6.0.0-beta.32", - "@storybook/marionette": "6.0.0-beta.32", - "@storybook/marko": "6.0.0-beta.32", - "@storybook/mithril": "6.0.0-beta.32", - "@storybook/preact": "6.0.0-beta.32", - "@storybook/rax": "6.0.0-beta.32", - "@storybook/react": "6.0.0-beta.32", - "@storybook/riot": "6.0.0-beta.32", - "@storybook/server": "6.0.0-beta.32", - "@storybook/svelte": "6.0.0-beta.32", - "@storybook/vue": "6.0.0-beta.32", - "@storybook/web-components": "6.0.0-beta.32" + "@storybook/angular": "6.0.0-beta.33", + "@storybook/aurelia": "6.0.0-beta.33", + "@storybook/ember": "6.0.0-beta.33", + "@storybook/html": "6.0.0-beta.33", + "@storybook/marionette": "6.0.0-beta.33", + "@storybook/marko": "6.0.0-beta.33", + "@storybook/mithril": "6.0.0-beta.33", + "@storybook/preact": "6.0.0-beta.33", + "@storybook/rax": "6.0.0-beta.33", + "@storybook/react": "6.0.0-beta.33", + "@storybook/riot": "6.0.0-beta.33", + "@storybook/server": "6.0.0-beta.33", + "@storybook/svelte": "6.0.0-beta.33", + "@storybook/vue": "6.0.0-beta.33", + "@storybook/web-components": "6.0.0-beta.33" } \ No newline at end of file From cf35e810f03a23417deff430e1d42f068cc6778c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Jun 2020 15:08:48 +0200 Subject: [PATCH 07/24] FIX #11264 ADD check for api/modules/stories, to only navigate to valid storyId + viewmode FIX spelling error in story_store ADD default values for viewMode & storyId to FramesRenderer --- lib/api/src/modules/stories.ts | 2 +- lib/client-api/src/story_store.ts | 2 +- lib/ui/src/components/preview/FramesRenderer.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/api/src/modules/stories.ts b/lib/api/src/modules/stories.ts index 0096f1376ee..8062c3bbdb9 100644 --- a/lib/api/src/modules/stories.ts +++ b/lib/api/src/modules/stories.ts @@ -264,7 +264,7 @@ export const init: ModuleFn = ({ const { source }: { source: string } = this; const [sourceType] = getSourceType(source); - if (sourceType === 'local') { + if (sourceType === 'local' && storyId && viewMode) { navigate(`/${viewMode}/${storyId}`); } }); diff --git a/lib/client-api/src/story_store.ts b/lib/client-api/src/story_store.ts index 0237d6b2e11..e44f524eae2 100644 --- a/lib/client-api/src/story_store.ts +++ b/lib/client-api/src/story_store.ts @@ -212,7 +212,7 @@ export default class StoryStore { } } - // If we didn't find a story matching the speficier, we always want to emit CURRENT_STORY_WAS_SET anyway + // If we didn't find a story matching the specifier, we always want to emit CURRENT_STORY_WAS_SET anyway if (!foundStory && this._channel) { this._channel.emit(Events.CURRENT_STORY_WAS_SET, this._selection); } diff --git a/lib/ui/src/components/preview/FramesRenderer.tsx b/lib/ui/src/components/preview/FramesRenderer.tsx index d0f1f790ab5..39701c5e112 100644 --- a/lib/ui/src/components/preview/FramesRenderer.tsx +++ b/lib/ui/src/components/preview/FramesRenderer.tsx @@ -16,11 +16,11 @@ export const FramesRenderer: FunctionComponent = ({ refs, story, scale, - viewMode, + viewMode = 'story', refId, queryParams, baseUrl, - storyId, + storyId = '*', }) => { const stringifiedQueryParams = stringifyQueryParams(queryParams); const active = getActive(refId); From e9a920f15dd3cd3c1965e11d448651cd6178ab4e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Jun 2020 15:08:59 +0200 Subject: [PATCH 08/24] FIX versions --- lib/api/src/version.ts | 2 +- lib/cli/versions.json | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/api/src/version.ts b/lib/api/src/version.ts index 5f3343a3569..7cd52f1fd4e 100644 --- a/lib/api/src/version.ts +++ b/lib/api/src/version.ts @@ -1 +1 @@ -export const version = '6.0.0-beta.34'; +export const version = '6.0.0-beta.35'; diff --git a/lib/cli/versions.json b/lib/cli/versions.json index fef02cad4d6..bc8ac525df2 100644 --- a/lib/cli/versions.json +++ b/lib/cli/versions.json @@ -1,17 +1,17 @@ { - "@storybook/angular": "6.0.0-beta.34", - "@storybook/aurelia": "6.0.0-beta.34", - "@storybook/ember": "6.0.0-beta.34", - "@storybook/html": "6.0.0-beta.34", - "@storybook/marionette": "6.0.0-beta.34", - "@storybook/marko": "6.0.0-beta.34", - "@storybook/mithril": "6.0.0-beta.34", - "@storybook/preact": "6.0.0-beta.34", - "@storybook/rax": "6.0.0-beta.34", - "@storybook/react": "6.0.0-beta.34", - "@storybook/riot": "6.0.0-beta.34", - "@storybook/server": "6.0.0-beta.34", - "@storybook/svelte": "6.0.0-beta.34", - "@storybook/vue": "6.0.0-beta.34", - "@storybook/web-components": "6.0.0-beta.34" + "@storybook/angular": "6.0.0-beta.35", + "@storybook/aurelia": "6.0.0-beta.35", + "@storybook/ember": "6.0.0-beta.35", + "@storybook/html": "6.0.0-beta.35", + "@storybook/marionette": "6.0.0-beta.35", + "@storybook/marko": "6.0.0-beta.35", + "@storybook/mithril": "6.0.0-beta.35", + "@storybook/preact": "6.0.0-beta.35", + "@storybook/rax": "6.0.0-beta.35", + "@storybook/react": "6.0.0-beta.35", + "@storybook/riot": "6.0.0-beta.35", + "@storybook/server": "6.0.0-beta.35", + "@storybook/svelte": "6.0.0-beta.35", + "@storybook/vue": "6.0.0-beta.35", + "@storybook/web-components": "6.0.0-beta.35" } \ No newline at end of file From 4e17d7357ff14bd45d20ddd9056bc2ce3fdd0938 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Jun 2020 18:39:35 +0200 Subject: [PATCH 09/24] FIX versions --- lib/api/src/version.ts | 2 +- lib/cli/versions.json | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/api/src/version.ts b/lib/api/src/version.ts index 5f3343a3569..7cd52f1fd4e 100644 --- a/lib/api/src/version.ts +++ b/lib/api/src/version.ts @@ -1 +1 @@ -export const version = '6.0.0-beta.34'; +export const version = '6.0.0-beta.35'; diff --git a/lib/cli/versions.json b/lib/cli/versions.json index fef02cad4d6..bc8ac525df2 100644 --- a/lib/cli/versions.json +++ b/lib/cli/versions.json @@ -1,17 +1,17 @@ { - "@storybook/angular": "6.0.0-beta.34", - "@storybook/aurelia": "6.0.0-beta.34", - "@storybook/ember": "6.0.0-beta.34", - "@storybook/html": "6.0.0-beta.34", - "@storybook/marionette": "6.0.0-beta.34", - "@storybook/marko": "6.0.0-beta.34", - "@storybook/mithril": "6.0.0-beta.34", - "@storybook/preact": "6.0.0-beta.34", - "@storybook/rax": "6.0.0-beta.34", - "@storybook/react": "6.0.0-beta.34", - "@storybook/riot": "6.0.0-beta.34", - "@storybook/server": "6.0.0-beta.34", - "@storybook/svelte": "6.0.0-beta.34", - "@storybook/vue": "6.0.0-beta.34", - "@storybook/web-components": "6.0.0-beta.34" + "@storybook/angular": "6.0.0-beta.35", + "@storybook/aurelia": "6.0.0-beta.35", + "@storybook/ember": "6.0.0-beta.35", + "@storybook/html": "6.0.0-beta.35", + "@storybook/marionette": "6.0.0-beta.35", + "@storybook/marko": "6.0.0-beta.35", + "@storybook/mithril": "6.0.0-beta.35", + "@storybook/preact": "6.0.0-beta.35", + "@storybook/rax": "6.0.0-beta.35", + "@storybook/react": "6.0.0-beta.35", + "@storybook/riot": "6.0.0-beta.35", + "@storybook/server": "6.0.0-beta.35", + "@storybook/svelte": "6.0.0-beta.35", + "@storybook/vue": "6.0.0-beta.35", + "@storybook/web-components": "6.0.0-beta.35" } \ No newline at end of file From 2a2d49d9f99878ed74d65a0ac465420a83c3b994 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 24 Jun 2020 18:45:36 +0200 Subject: [PATCH 10/24] UPGRADE chromatic --- examples/official-storybook/package.json | 2 +- lib/ui/package.json | 2 +- package.json | 2 +- yarn.lock | 195 ++++++++++------------- 4 files changed, 84 insertions(+), 117 deletions(-) diff --git a/examples/official-storybook/package.json b/examples/official-storybook/package.json index ac8933ea7da..55dfa6aa3ac 100644 --- a/examples/official-storybook/package.json +++ b/examples/official-storybook/package.json @@ -41,7 +41,7 @@ "@storybook/react": "6.0.0-beta.35", "@storybook/source-loader": "6.0.0-beta.35", "@storybook/theming": "6.0.0-beta.35", - "chromatic": "^4.0.2", + "chromatic": "^5.0.0", "cors": "^2.8.5", "cross-env": "^7.0.0", "enzyme-to-json": "^3.4.1", diff --git a/lib/ui/package.json b/lib/ui/package.json index 1713bbaf8ac..c64d6485193 100644 --- a/lib/ui/package.json +++ b/lib/ui/package.json @@ -68,7 +68,7 @@ "@storybook/react": "6.0.0-beta.35", "@testing-library/react": "^10.0.3", "babel-loader": "^8.0.6", - "chromatic": "^4.0.2", + "chromatic": "^5.0.0", "enzyme": "^3.11.0", "flush-promises": "^1.0.2", "terser-webpack-plugin": "^3.0.0", diff --git a/package.json b/package.json index 429c88b92ed..d9eee4efa19 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "babel-plugin-macros": "^2.7.0", "babel-plugin-require-context-hook": "^1.0.0", "chalk": "^4.0.0", - "chromatic": "^4.0.2", + "chromatic": "^5.0.0", "codecov": "^3.5.0", "codelyzer": "^5.0.0", "commander": "^5.1.0", diff --git a/yarn.lock b/yarn.lock index f14a5fdc10c..53ddcef2224 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6737,11 +6737,6 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -atomic-sleep@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" - integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== - aurelia@dev: version "0.8.0-dev.202005200307" resolved "https://registry.yarnpkg.com/aurelia/-/aurelia-0.8.0-dev.202005200307.tgz#0afaaff3cb5e2ac43c8f14a5856da3a0d81b27e0" @@ -9929,19 +9924,19 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -chromatic@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/chromatic/-/chromatic-4.0.3.tgz#3788bdb78b6323190dae2e9714dc0e5934926a45" - integrity sha512-TmtYAblzPxbEhH8vpQvL3aqQ/K2AkxraMliaIdORmOyVHmV4qM1aQHP2zPj4yTSdZ5/Tap5zOPW1xODrkQcI4Q== +chromatic@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/chromatic/-/chromatic-5.0.0.tgz#64fcdd26e76c9a9d311d781e91d7532d2a0abd2a" + integrity sha512-jreBi7r6BFcJ5o30O9LQpZI/9ofNWAOZ6R8yX0U2EzxLGXA3yC8aiwkS73EDVUPwZC5qUvWm5pqzvD0FCIAHiw== dependencies: "@babel/preset-react" "^7.9.4" "@babel/runtime" "^7.9.2" "@chromaui/localtunnel" "2.0.1" async-retry "^1.3.1" babel-plugin-require-context-hook "^1.0.0" + chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.1.1" - denodeify "^1.2.1" dotenv "^8.2.0" enhanced-resolve "^4.1.1" env-ci "^5.0.2" @@ -9949,25 +9944,25 @@ chromatic@^4.0.2: execa "^4.0.0" fake-tag "^2.0.0" fs-extra "^9.0.0" - is-url "^1.2.4" jest "^25.2.7" - jsdom "16.2.2" jsonfile "^6.0.1" + junit-report-builder "2.0.0" + listr "0.14.3" meow "^6.1.0" - minimatch "^3.0.4" node-ask "^1.0.1" node-fetch "^2.6.0" node-loggly-bulk "^2.2.4" - npmlog "^4.1.2" - pino "5.17.0" + p-limit "2.3.0" + picomatch "2.2.2" pkg-up "^3.1.0" + pluralize "^8.0.0" progress "^2.0.3" progress-stream "^2.0.0" - rotating-file-stream "^2.0.2" semver "^7.1.3" slash "^3.0.0" - strip-color "^0.1.0" + strip-ansi "6.0.0" tmp "^0.1.0" + tmp-promise "2.1.1" tree-kill "^1.2.2" ts-dedent "^1.1.1" util-deprecate "^1.0.2" @@ -11724,6 +11719,11 @@ date-fns@^2.0.1: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.14.0.tgz#359a87a265bb34ef2e38f93ecf63ac453f9bc7ba" integrity sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw== +date-format@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-0.0.2.tgz#fafd448f72115ef1e2b739155ae92f2be6c28dd1" + integrity sha1-+v1Ej3IRXvHitzkVWukvK+bCjdE= + date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" @@ -12038,11 +12038,6 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -denodeify@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/denodeify/-/denodeify-1.2.1.tgz#3a36287f5034e699e7577901052c2e6c94251631" - integrity sha1-OjYof1A05pnnV3kBBSwubJQlFjE= - depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -14563,11 +14558,6 @@ fast-ordered-set@^1.0.0: dependencies: blank-object "^1.0.1" -fast-redact@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-2.0.0.tgz#17bb8f5e1f56ecf4a38c8455985e5eab4c478431" - integrity sha512-zxpkULI9W9MNTK2sJ3BpPQrTEXFNESd2X6O1tXMFpK/XM0G5c5Rll2EVYZH2TqI3xRGK/VaJ+eEOt7pnENJpeA== - fast-safe-stringify@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" @@ -14950,11 +14940,6 @@ flat-cache@^2.0.1: rimraf "2.6.3" write "1.0.3" -flatstr@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/flatstr/-/flatstr-1.0.12.tgz#c2ba6a08173edbb6c9640e3055b95e287ceb5931" - integrity sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw== - flatted@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" @@ -18030,7 +18015,7 @@ is-url-superb@^3.0.0: dependencies: url-regex "^5.0.0" -is-url@^1.2.2, is-url@^1.2.4: +is-url@^1.2.2: version "1.2.4" resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== @@ -19731,38 +19716,6 @@ jsdom@16.2.1: ws "^7.2.1" xml-name-validator "^3.0.0" -jsdom@16.2.2, jsdom@^16.2.2: - version "16.2.2" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.2.2.tgz#76f2f7541646beb46a938f5dc476b88705bedf2b" - integrity sha512-pDFQbcYtKBHxRaP55zGXCJWgFHkDAYbKcsXEK/3Icu9nKYZkutUXfLBwbD+09XDutkYSHcgfQLZ0qvpAAm9mvg== - dependencies: - abab "^2.0.3" - acorn "^7.1.1" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.2.0" - data-urls "^2.0.0" - decimal.js "^10.2.0" - domexception "^2.0.1" - escodegen "^1.14.1" - html-encoding-sniffer "^2.0.1" - is-potential-custom-element-name "^1.0.0" - nwsapi "^2.2.0" - parse5 "5.1.1" - request "^2.88.2" - request-promise-native "^1.0.8" - saxes "^5.0.0" - symbol-tree "^3.2.4" - tough-cookie "^3.0.1" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.0.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" - ws "^7.2.3" - xml-name-validator "^3.0.0" - jsdom@^11.5.1: version "11.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" @@ -19891,6 +19844,38 @@ jsdom@^15.2.1: ws "^7.0.0" xml-name-validator "^3.0.0" +jsdom@^16.2.2: + version "16.2.2" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.2.2.tgz#76f2f7541646beb46a938f5dc476b88705bedf2b" + integrity sha512-pDFQbcYtKBHxRaP55zGXCJWgFHkDAYbKcsXEK/3Icu9nKYZkutUXfLBwbD+09XDutkYSHcgfQLZ0qvpAAm9mvg== + dependencies: + abab "^2.0.3" + acorn "^7.1.1" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.2.0" + data-urls "^2.0.0" + decimal.js "^10.2.0" + domexception "^2.0.1" + escodegen "^1.14.1" + html-encoding-sniffer "^2.0.1" + is-potential-custom-element-name "^1.0.0" + nwsapi "^2.2.0" + parse5 "5.1.1" + request "^2.88.2" + request-promise-native "^1.0.8" + saxes "^5.0.0" + symbol-tree "^3.2.4" + tough-cookie "^3.0.1" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.0.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + ws "^7.2.3" + xml-name-validator "^3.0.0" + jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -20195,6 +20180,16 @@ jszip@^3.1.3: readable-stream "~2.3.6" set-immediate-shim "~1.0.1" +junit-report-builder@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/junit-report-builder/-/junit-report-builder-2.0.0.tgz#aaf9c8c6848cd9bb9dfb6da8e2f411d72ddf47aa" + integrity sha512-/CkUScz5G7U1Fehna9swd8YfA+o5tV07NZz+3pea27okD0+ZEgyXQ5E0etyxMaqzXOjBvN8HGmNpVO/79yj5TA== + dependencies: + date-format "0.0.2" + lodash "^4.17.15" + make-dir "^1.3.0" + xmlbuilder "^10.0.0" + junk@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/junk/-/junk-1.0.3.tgz#87be63488649cbdca6f53ab39bec9ccd2347f592" @@ -21525,7 +21520,7 @@ magic-string@^0.22.4: dependencies: vlq "^0.2.2" -make-dir@^1.0.0: +make-dir@^1.0.0, make-dir@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== @@ -23654,6 +23649,13 @@ p-is-promise@^2.0.0: resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== +p-limit@2.3.0, p-limit@^2.0.0, p-limit@^2.1.0, p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.2.2, p-limit@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -23661,13 +23663,6 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.1.0, p-limit@^2.2.0, p-limit@^2.2.1, p-limit@^2.2.2, p-limit@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -24332,7 +24327,7 @@ physical-cpu-count@^2.0.0: resolved "https://registry.yarnpkg.com/physical-cpu-count/-/physical-cpu-count-2.0.0.tgz#18de2f97e4bf7a9551ad7511942b5496f7aba660" integrity sha1-GN4vl+S/epVRrXURlCtUlverpmA= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: +picomatch@2.2.2, picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -24364,23 +24359,6 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pino-std-serializers@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz#cb5e3e58c358b26f88969d7e619ae54bdfcc1ae1" - integrity sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ== - -pino@5.17.0: - version "5.17.0" - resolved "https://registry.yarnpkg.com/pino/-/pino-5.17.0.tgz#b9def314e82402154f89a25d76a31f20ca84b4c8" - integrity sha512-LqrqmRcJz8etUjyV0ddqB6OTUutCgQULPFg2b4dtijRHUsucaAdBgSUW58vY6RFSX+NT8963F+q0tM6lNwGShA== - dependencies: - fast-redact "^2.0.0" - fast-safe-stringify "^2.0.7" - flatstr "^1.0.12" - pino-std-serializers "^2.4.2" - quick-format-unescaped "^3.0.3" - sonic-boom "^0.7.5" - pinpoint@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pinpoint/-/pinpoint-1.1.0.tgz#0cf7757a6977f1bf7f6a32207b709e377388e874" @@ -26146,11 +26124,6 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== -quick-format-unescaped@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz#fb3e468ac64c01d22305806c39f121ddac0d1fb9" - integrity sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ== - quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -28360,11 +28333,6 @@ rollup@^0.57.1: signal-exit "^3.0.2" sourcemap-codec "^1.4.1" -rotating-file-stream@^2.0.2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/rotating-file-stream/-/rotating-file-stream-2.1.1.tgz#41f7f63a16dc016171e845b3d664063fe38cb652" - integrity sha512-cAKIeAmdr5ttkEogIYHpbyV1DSTe9FsY/jr3RPrC1BqbGZn4OBgWR2ye+42CQnbxqW3PcvhPD36emX9fDvZtrw== - routes-table@^1.2.1: version "1.2.5" resolved "https://registry.yarnpkg.com/routes-table/-/routes-table-1.2.5.tgz#a36dc6da809bd132e783244bbfc0362fb86bcb34" @@ -29246,14 +29214,6 @@ socks@~2.3.2: ip "1.1.5" smart-buffer "^4.1.0" -sonic-boom@^0.7.5: - version "0.7.7" - resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-0.7.7.tgz#d921de887428208bfa07b0ae32c278de043f350a" - integrity sha512-Ei5YOo5J64GKClHIL/5evJPgASXFVpfVYbJV9PILZQytTK6/LCwHvsZJW2Ig4p9FMC2OrBrMnXKgRN/OEoAWfg== - dependencies: - atomic-sleep "^1.0.0" - flatstr "^1.0.12" - sort-keys@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" @@ -29992,11 +29952,6 @@ strip-bom@^4.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== -strip-color@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/strip-color/-/strip-color-0.1.0.tgz#106f65d3d3e6a2d9401cac0eb0ce8b8a702b4f7b" - integrity sha1-EG9l09PmotlAHKwOsM6LinArT3s= - strip-comments@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/strip-comments/-/strip-comments-1.0.2.tgz#82b9c45e7f05873bee53f37168af930aa368679d" @@ -30851,6 +30806,13 @@ tlds@^1.203.0: resolved "https://registry.yarnpkg.com/tlds/-/tlds-1.207.0.tgz#459264e644cf63ddc0965fece3898913286b1afd" integrity sha512-k7d7Q1LqjtAvhtEOs3yN14EabsNO8ZCoY6RESSJDB9lst3bTx3as/m1UuAeCKzYxiyhR1qq72ZPhpSf+qlqiwg== +tmp-promise@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-2.1.1.tgz#eb97c038995af74efbfe8156f5e07fdd0c935539" + integrity sha512-Z048AOz/w9b6lCbJUpevIJpRpUztENl8zdv1bmAKVHimfqRFl92ROkmT9rp7TVBnrEw2gtMTol/2Cp2S2kJa4Q== + dependencies: + tmp "0.1.0" + tmp@0.0.28: version "0.0.28" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.28.tgz#172735b7f614ea7af39664fa84cf0de4e515d120" @@ -33608,6 +33570,11 @@ xml@1.0.1: resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= +xmlbuilder@^10.0.0: + version "10.1.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz#8cae6688cc9b38d850b7c8d3c0a4161dcaf475b0" + integrity sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg== + xmlbuilder@~11.0.0: version "11.0.1" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" From 94295c892c5dc124bbf956e6e09b5eda98efddaa Mon Sep 17 00:00:00 2001 From: domyen Date: Wed, 24 Jun 2020 14:26:42 -0400 Subject: [PATCH 11/24] Improve Boolean focus state again --- lib/components/src/controls/Boolean.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/components/src/controls/Boolean.tsx b/lib/components/src/controls/Boolean.tsx index cd33d862194..cc896b22182 100644 --- a/lib/components/src/controls/Boolean.tsx +++ b/lib/components/src/controls/Boolean.tsx @@ -24,13 +24,11 @@ const Label = styled.label(({ theme }) => ({ border: 'none', background: 'transparent', cursor: 'pointer', + borderRadius: '3em', '&:focus': { outline: 'none', - - '& ~ span': { - boxShadow: `${theme.color.secondary} 0 0 0 1px inset !important`, - }, + boxShadow: `${theme.color.secondary} 0 0 0 1px inset !important`, }, }, @@ -82,7 +80,7 @@ const parse = (value: string | null) => value === 'true'; export type BooleanProps = ControlProps & BooleanConfig; export const BooleanControl: FC = ({ name, value, onChange }) => ( -