From 7f99f044aafd737e5313f0265f1a8cde1f82c9ba Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Thu, 20 Apr 2023 13:08:39 -0400 Subject: [PATCH 01/20] Updates component name parsing --- components/pages/example/LiveExample.tsx | 9 +- .../LiveExampleState.types.ts | 2 +- .../useLiveExampleState.ts | 3 + .../pages/example/utils/getStoryCode.ts | 98 +++++++++++++++++++ .../example/{utils.ts => utils/index.ts} | 78 ++------------- 5 files changed, 114 insertions(+), 76 deletions(-) create mode 100644 components/pages/example/utils/getStoryCode.ts rename components/pages/example/{utils.ts => utils/index.ts} (82%) diff --git a/components/pages/example/LiveExample.tsx b/components/pages/example/LiveExample.tsx index f19ddba4..20154391 100644 --- a/components/pages/example/LiveExample.tsx +++ b/components/pages/example/LiveExample.tsx @@ -11,6 +11,7 @@ import LeafyGreenProvider, { import { KnobRow } from './KnobRow/KnobRow'; import { assertCompleteContext, isReady } from './useLiveExampleState/utils'; +import { getStoryCode } from './utils/getStoryCode'; import { CodeExample } from './CodeExample'; import { blockContainerStyle, @@ -27,7 +28,6 @@ import { } from './LiveExampleStateComponents'; import {} from './types'; import { LiveExampleContext, useLiveExampleState } from './useLiveExampleState'; -import { getStoryCode } from './utils'; // Use standard block flow for these packages const useBlockWrapperFor = [ @@ -73,11 +73,8 @@ export const LiveExample = ({ /** Re-generates story example code from context */ const regenerateStoryCode = (context: Partial) => { if (assertCompleteContext(context)) { - const code = getStoryCode(context); - - if (code) { - setCode(code); - } + const code = getStoryCode(context) ?? 'No code found'; + setCode(code); } }; diff --git a/components/pages/example/useLiveExampleState/LiveExampleState.types.ts b/components/pages/example/useLiveExampleState/LiveExampleState.types.ts index 52bfffd1..86ef5b9e 100644 --- a/components/pages/example/useLiveExampleState/LiveExampleState.types.ts +++ b/components/pages/example/useLiveExampleState/LiveExampleState.types.ts @@ -19,7 +19,7 @@ export interface LiveExampleContext { componentName?: string; tsDoc?: Array | null; meta?: Meta; - StoryFn?: ComponentStoryFn; + StoryFn?: ComponentStoryFn & React.FunctionComponent; knobValues?: { [arg: string]: any }; knobsArray?: Array; } diff --git a/components/pages/example/useLiveExampleState/useLiveExampleState.ts b/components/pages/example/useLiveExampleState/useLiveExampleState.ts index 7bd2b203..336a5904 100644 --- a/components/pages/example/useLiveExampleState/useLiveExampleState.ts +++ b/components/pages/example/useLiveExampleState/useLiveExampleState.ts @@ -1,5 +1,6 @@ import { useReducer } from 'react'; import { kebabCase, merge } from 'lodash'; +import pascalcase from 'pascalcase'; import { getComponentStories, ModuleType } from 'utils/getComponentStories'; import { CustomComponentDoc } from 'utils/tsdoc.utils'; @@ -48,6 +49,7 @@ export function useLiveExampleState( }); } + /** Log an error */ function ERROR(message: string) { dispatch({ type: LiveExampleActionType.ERROR, @@ -67,6 +69,7 @@ export function useLiveExampleState( function parse(module: ModuleType) { const { default: meta, ...stories } = module; const StoryFn = getDefaultStoryFn(meta, stories); + StoryFn.displayName = pascalcase(componentName); if (assertContext(context, ['state', 'componentName', 'tsDoc'])) { const knobsArray = getKnobsArray({ diff --git a/components/pages/example/utils/getStoryCode.ts b/components/pages/example/utils/getStoryCode.ts new file mode 100644 index 00000000..00b37f4d --- /dev/null +++ b/components/pages/example/utils/getStoryCode.ts @@ -0,0 +1,98 @@ +import React, { ReactNode } from 'react'; +import reactElementToJSXString from 'react-element-to-jsx-string'; +import { Meta } from '@storybook/react'; +import { kebabCase } from 'lodash'; + +import { LiveExampleContext } from '../useLiveExampleState'; +import { assertCompleteContext } from '../useLiveExampleState/utils'; + +/** + * Returns example code for the given component data + */ +export function getStoryCode(context: LiveExampleContext): string | undefined { + /** Skip generation, and just use the story source code for these packages */ + const useStorySourceForComponents = ['typography']; + + if (assertCompleteContext(context)) { + const { componentName, meta, StoryFn, knobValues } = context; + + /** + * If this is the Typography component, + * we use the original story code, + * otherwise we convert the component to JSX + */ + if (useStorySourceForComponents.includes(componentName)) { + // fetchStorySource(componentName).then(module => { + // parseStorySource(module); + // }); + return getStorySourceCode(meta); + } else { + const renderedStory = React.createElement(StoryFn, { ...knobValues }); + return getStoryJSX(renderedStory); + } + } + + /** `getStoryCode` utility that returns a JSX string */ + function getStoryJSX(element: ReactNode) { + if (element) { + return reactElementToJSXString(element, { + showFunctions: true, + showDefaultProps: false, + useBooleanShorthandSyntax: false, + useFragmentShortSyntax: true, + }); + } + } + + /** Extracts the story code from the meta `storySource` */ + function getStorySourceCode(meta?: Meta) { + if (meta && meta.parameters) { + const { + parameters: { default: defaultStoryName, storySource }, + } = meta; + + if (storySource) { + const locationsMap = defaultStoryName + ? storySource.locationsMap[defaultStoryName] + : Object.values(storySource.locationsMap)[0]; + const lines = (storySource.source as string).match(/^.*$/gm); + + const storyCode = lines + ?.slice( + locationsMap?.startLoc?.line - 1, + locationsMap?.endLoc?.line - 1, + ) + .join('\n'); + return storyCode; + } + } + } +} + +async function fetchStorySource(componentName: string) { + try { + return import(`@leafygreen-ui/${kebabCase(componentName)}/stories.js.map`); + } catch (error) { + console.warn(error); + } +} + +interface SourceMap { + file: 'stories.js'; + mappings: string; + names: Array; + sources: Array; + sourcesContent: Array; + version: number; +} + +function parseStorySource(module: { default: string }) { + const { default: sourceString } = module; + const sourceMap: SourceMap = JSON.parse(sourceString); + const { sources, sourcesContent } = sourceMap; + + const indexOfStorySource = sources.findIndex(src => !!src.match(/story/)); + const storySource = sourcesContent[indexOfStorySource]; + + const storySourceLines = storySource.split('\n'); +} diff --git a/components/pages/example/utils.ts b/components/pages/example/utils/index.ts similarity index 82% rename from components/pages/example/utils.ts rename to components/pages/example/utils/index.ts index c7321f49..b7124f55 100644 --- a/components/pages/example/utils.ts +++ b/components/pages/example/utils/index.ts @@ -1,6 +1,4 @@ -import React, { ReactNode } from 'react'; import { PropItem } from 'react-docgen-typescript'; -import reactElementToJSXString from 'react-element-to-jsx-string'; import { InputType } from '@storybook/csf'; import { ComponentStoryFn, Meta } from '@storybook/react'; import { @@ -12,7 +10,6 @@ import { pickBy, snakeCase, } from 'lodash'; -import pascalcase from 'pascalcase'; import { CustomComponentDoc, findComponentDoc, @@ -20,9 +17,13 @@ import { getDefaultValueValue, } from 'utils/tsdoc.utils'; -import { assertCompleteContext } from './useLiveExampleState/utils'; -import { KnobOptionType, KnobType, MetadataSources, TypeString } from './types'; -import { LiveExampleContext } from './useLiveExampleState'; +import { + KnobOptionType, + KnobType, + MetadataSources, + TypeString, +} from '../types'; +import { LiveExampleContext } from '../useLiveExampleState'; /** * A list of Prop names that should not appear in Knobs @@ -378,73 +379,12 @@ export function getKnobDescription({ ); } -/** - * Returns example code for the given component data - */ -export function getStoryCode(context: LiveExampleContext): string | undefined { - /** Skip generation, and just use the story source code for these packages */ - const useStorySourceForComponents = ['typography']; - - if (assertCompleteContext(context)) { - const { componentName, meta, StoryFn, knobValues } = context; - - /** - * If this is the Typography component, - * we use the original story code, - * otherwise we convert the component to JSX - */ - if (useStorySourceForComponents.includes(componentName)) { - return getStorySourceCode(meta); - } else { - const renderedStory = React.createElement(StoryFn, { ...knobValues }); - return getStoryJSX(renderedStory, componentName); - } - } - - /** `getStoryCode` utility that returns a JSX string */ - function getStoryJSX(element: ReactNode, displayName: string) { - if (element) { - return reactElementToJSXString(element, { - displayName: (child: ReactNode) => - // @ts-expect-error - correct type for `child` is too verbose - child?.type?.displayName ?? pascalcase(displayName), - showFunctions: true, - showDefaultProps: true, - useBooleanShorthandSyntax: false, - useFragmentShortSyntax: true, - }); - } - } - - /** Extracts the story code from the meta `storySource` */ - function getStorySourceCode(meta?: Meta) { - if (meta && meta.parameters) { - const { - parameters: { default: defaultStoryName, storySource }, - } = meta; - - const locationsMap = defaultStoryName - ? storySource.locationsMap[defaultStoryName] - : Object.values(storySource.locationsMap)[0]; - const lines = (storySource.source as string).match(/^.*$/gm); - - const storyCode = lines - ?.slice( - locationsMap?.startLoc?.line - 1, - locationsMap?.endLoc?.line - 1, - ) - .join('\n'); - return storyCode; - } - } -} - /** * Gets the default story from the meta */ export function getDefaultStoryFn( - meta: Meta, - stories: { [key: string]: ComponentStoryFn }, + meta: Required['meta'], + stories: { [key: string]: Required['StoryFn'] }, ) { const defaultStoryName = meta.parameters?.default ?? Object.keys(stories)[0]; return defaultStoryName From 6a4904ef275f115aa50850de1d94a83e4de7de16 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Thu, 20 Apr 2023 14:50:39 -0400 Subject: [PATCH 02/20] Update LiveExample.tsx --- components/pages/example/LiveExample.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/pages/example/LiveExample.tsx b/components/pages/example/LiveExample.tsx index 20154391..44bab029 100644 --- a/components/pages/example/LiveExample.tsx +++ b/components/pages/example/LiveExample.tsx @@ -72,10 +72,10 @@ export const LiveExample = ({ /** Re-generates story example code from context */ const regenerateStoryCode = (context: Partial) => { - if (assertCompleteContext(context)) { - const code = getStoryCode(context) ?? 'No code found'; - setCode(code); - } + const code = assertCompleteContext(context) + ? getStoryCode(context) ?? 'No code found' + : 'No code found'; + setCode(code); }; /** re-generate example code when the context changes */ From bfd472b83e198e5277578475a9beb52539b9b29e Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Fri, 21 Apr 2023 13:17:08 -0400 Subject: [PATCH 03/20] Parse React Tree to generate code example --- .../useLiveExampleState.ts | 2 +- .../pages/example/utils/getStoryCode.ts | 114 +++++++----------- yarn.lock | 5 + 3 files changed, 50 insertions(+), 71 deletions(-) diff --git a/components/pages/example/useLiveExampleState/useLiveExampleState.ts b/components/pages/example/useLiveExampleState/useLiveExampleState.ts index 336a5904..4761afc8 100644 --- a/components/pages/example/useLiveExampleState/useLiveExampleState.ts +++ b/components/pages/example/useLiveExampleState/useLiveExampleState.ts @@ -69,7 +69,7 @@ export function useLiveExampleState( function parse(module: ModuleType) { const { default: meta, ...stories } = module; const StoryFn = getDefaultStoryFn(meta, stories); - StoryFn.displayName = pascalcase(componentName); + StoryFn.displayName = pascalcase(componentName) + 'Story'; if (assertContext(context, ['state', 'componentName', 'tsDoc'])) { const knobsArray = getKnobsArray({ diff --git a/components/pages/example/utils/getStoryCode.ts b/components/pages/example/utils/getStoryCode.ts index 00b37f4d..a02a7e28 100644 --- a/components/pages/example/utils/getStoryCode.ts +++ b/components/pages/example/utils/getStoryCode.ts @@ -1,7 +1,7 @@ -import React, { ReactNode } from 'react'; +import React, { FunctionComponentElement, ReactElement } from 'react'; import reactElementToJSXString from 'react-element-to-jsx-string'; -import { Meta } from '@storybook/react'; -import { kebabCase } from 'lodash'; +import prepass from 'react-ssr-prepass'; // lets us traverse the react tree +import pascalcase from 'pascalcase'; import { LiveExampleContext } from '../useLiveExampleState'; import { assertCompleteContext } from '../useLiveExampleState/utils'; @@ -10,89 +10,63 @@ import { assertCompleteContext } from '../useLiveExampleState/utils'; * Returns example code for the given component data */ export function getStoryCode(context: LiveExampleContext): string | undefined { - /** Skip generation, and just use the story source code for these packages */ - const useStorySourceForComponents = ['typography']; + /** Treat these packages differently */ + const packageNameDoesNotMatchComponent = ['typography']; if (assertCompleteContext(context)) { - const { componentName, meta, StoryFn, knobValues } = context; + const { componentName, StoryFn, knobValues, knobsArray } = context; - /** - * If this is the Typography component, - * we use the original story code, - * otherwise we convert the component to JSX - */ - if (useStorySourceForComponents.includes(componentName)) { - // fetchStorySource(componentName).then(module => { - // parseStorySource(module); - // }); - return getStorySourceCode(meta); - } else { - const renderedStory = React.createElement(StoryFn, { ...knobValues }); - return getStoryJSX(renderedStory); - } - } + const renderedStory: FunctionComponentElement = React.createElement( + StoryFn, + { ...knobValues }, + ); + + const componentRoot = getComponentRoot(renderedStory, componentName); - /** `getStoryCode` utility that returns a JSX string */ - function getStoryJSX(element: ReactNode) { - if (element) { - return reactElementToJSXString(element, { + if (componentRoot) { + return reactElementToJSXString(componentRoot, { showFunctions: true, showDefaultProps: false, useBooleanShorthandSyntax: false, useFragmentShortSyntax: true, + filterProps: (_, propName) => + // Only display props that we allow users to control in the example + knobsArray.map(knob => knob.name).includes(propName), }); } } - /** Extracts the story code from the meta `storySource` */ - function getStorySourceCode(meta?: Meta) { - if (meta && meta.parameters) { - const { - parameters: { default: defaultStoryName, storySource }, - } = meta; + /** Returns the component root we want to generate source code for */ + function getComponentRoot( + renderedStory: FunctionComponentElement, + componentName: string, + ) { + let isRootSet = false; + let componentRoot: ReactElement = renderedStory; - if (storySource) { - const locationsMap = defaultStoryName - ? storySource.locationsMap[defaultStoryName] - : Object.values(storySource.locationsMap)[0]; - const lines = (storySource.source as string).match(/^.*$/gm); - - const storyCode = lines - ?.slice( - locationsMap?.startLoc?.line - 1, - locationsMap?.endLoc?.line - 1, - ) - .join('\n'); - return storyCode; + // @ts-expect-error - prepass callback args are incorrectly typed. Need to explicitly re-type them + prepass(renderedStory, (element: ReactElement) => { + if (!isRootSet && isFunctionComponentElement(element)) { + if (packageNameDoesNotMatchComponent.includes(componentName)) { + // We take the first element that is not the Story element + if (!element.type.displayName?.includes('Story')) { + componentRoot = element; + isRootSet = true; + } + } else if (element.type.displayName === pascalcase(componentName)) { + componentRoot = element; + isRootSet = true; + } } - } - } -} + }); -async function fetchStorySource(componentName: string) { - try { - return import(`@leafygreen-ui/${kebabCase(componentName)}/stories.js.map`); - } catch (error) { - console.warn(error); + return componentRoot; } } -interface SourceMap { - file: 'stories.js'; - mappings: string; - names: Array; - sources: Array; - sourcesContent: Array; - version: number; -} - -function parseStorySource(module: { default: string }) { - const { default: sourceString } = module; - const sourceMap: SourceMap = JSON.parse(sourceString); - const { sources, sourcesContent } = sourceMap; - - const indexOfStorySource = sources.findIndex(src => !!src.match(/story/)); - const storySource = sourcesContent[indexOfStorySource]; - - const storySourceLines = storySource.split('\n'); +/** Returns whether a React Element is a Component vs just an intrinsic element */ +function isFunctionComponentElement( + node: React.ReactElement, +): node is React.FunctionComponentElement> { + return typeof node === 'object' && typeof node.type === 'function'; } diff --git a/yarn.lock b/yarn.lock index 5e8827cc..9f7a2ef0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10657,6 +10657,11 @@ react-refresh@^0.11.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A== +react-ssr-prepass@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/react-ssr-prepass/-/react-ssr-prepass-1.5.0.tgz#bc4ca7fcb52365e6aea11cc254a3d1bdcbd030c5" + integrity sha512-yFNHrlVEReVYKsLI5lF05tZoHveA5pGzjFbFJY/3pOqqjGOmMmqx83N4hIjN2n6E1AOa+eQEUxs3CgRnPmT0RQ== + react-transition-group@^4.4.1, react-transition-group@^4.4.5: version "4.4.5" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.5.tgz#e53d4e3f3344da8521489fbef8f2581d42becdd1" From 111f37ff53cb140fc436fd08065641acfc62ab72 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Fri, 21 Apr 2023 13:18:39 -0400 Subject: [PATCH 04/20] update package json & config --- next.config.js | 12 ------------ package.json | 1 + 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/next.config.js b/next.config.js index 8f379a37..1940b296 100644 --- a/next.config.js +++ b/next.config.js @@ -38,18 +38,6 @@ const nextConfig = { type: 'javascript/auto', }); - config.module.rules.push({ - test: /\.+(stories|story)\.tsx?$/, - use: [ - { - loader: require.resolve('@storybook/source-loader'), - options: { parser: 'typescript' }, - }, - ], - include: isPathInLeafygreen, - enforce: 'pre', - }); - // Allow to dynamically import the svg files config.module.rules.push({ test: /\.svg$/, diff --git a/package.json b/package.json index 9db8c254..322a0078 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "react-dom": "^17.0.2", "react-element-to-jsx-string": "^15.0.0", "react-markdown": "^8.0.3", + "react-ssr-prepass": "^1.5.0", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", "remark": "^14.0.2", From c613d00846ea0b3f1849bc3db4be5377e11e9934 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Fri, 21 Apr 2023 17:19:38 -0400 Subject: [PATCH 05/20] Update LiveExampleError.tsx --- .../example/LiveExampleStateComponents/LiveExampleError.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/components/pages/example/LiveExampleStateComponents/LiveExampleError.tsx b/components/pages/example/LiveExampleStateComponents/LiveExampleError.tsx index 5c9f3bda..0de2caee 100644 --- a/components/pages/example/LiveExampleStateComponents/LiveExampleError.tsx +++ b/components/pages/example/LiveExampleStateComponents/LiveExampleError.tsx @@ -5,6 +5,7 @@ export function LiveExampleError({ message }: { message?: string }) { <>

⚠️ Error loading live example


+ {/* @ts-ignore - union too complex */} {message} ); From 5873644c830e3113201d053216b2ec99856e9da8 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Fri, 21 Apr 2023 17:21:05 -0400 Subject: [PATCH 06/20] adds pascalcase --- package.json | 1 + yarn.lock | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 322a0078..09fb6e43 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,7 @@ "eslint-plugin-react-hooks": "^4.6.0", "gray-matter": "4.0.3", "next": "^12.3.1", + "pascalcase": "^2.0.0", "polished": "^4.1.3", "prettier": "^2.7.1", "react": "^17.0.2", diff --git a/yarn.lock b/yarn.lock index 9f7a2ef0..2288ea54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4872,7 +4872,7 @@ camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.2.0: +camelcase@^6.2.0, camelcase@^6.2.1: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -10050,6 +10050,13 @@ pascalcase@^0.1.1: resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== +pascalcase@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-2.0.0.tgz#13515fcbfa76eddff9282827f59f7868e3cc9250" + integrity sha512-DHpENy5Qm/FaX+x3iBLoMLG/XHNCTgL+yErm1TwuVaj6u4fiOSkYkf60vGtITk7hrKHOO4uCl9vRrD4hqjNKjg== + dependencies: + camelcase "^6.2.1" + path-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" From eae3f0ec6b6744194d9bfa20a3a45db61db6225e Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Fri, 21 Apr 2023 18:06:17 -0400 Subject: [PATCH 07/20] update comment with issue reference --- components/pages/example/utils/getStoryCode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pages/example/utils/getStoryCode.ts b/components/pages/example/utils/getStoryCode.ts index a02a7e28..137a4014 100644 --- a/components/pages/example/utils/getStoryCode.ts +++ b/components/pages/example/utils/getStoryCode.ts @@ -44,7 +44,7 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { let isRootSet = false; let componentRoot: ReactElement = renderedStory; - // @ts-expect-error - prepass callback args are incorrectly typed. Need to explicitly re-type them + // @ts-expect-error - prepass callback args are incorrectly typed (see FormidableLabs/react-ssr-prepass#86). Need to explicitly re-type them here prepass(renderedStory, (element: ReactElement) => { if (!isRootSet && isFunctionComponentElement(element)) { if (packageNameDoesNotMatchComponent.includes(componentName)) { From e4a15edf059f54f0c365dec687e2a6b005cf533a Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 12:54:17 -0400 Subject: [PATCH 08/20] ignore default props --- .../pages/example/utils/getStoryCode.ts | 26 ++++++++++++++----- components/pages/example/utils/index.ts | 8 +++--- utils/tsdoc.utils.ts | 7 +++++ 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/components/pages/example/utils/getStoryCode.ts b/components/pages/example/utils/getStoryCode.ts index 137a4014..f56fbf83 100644 --- a/components/pages/example/utils/getStoryCode.ts +++ b/components/pages/example/utils/getStoryCode.ts @@ -2,19 +2,28 @@ import React, { FunctionComponentElement, ReactElement } from 'react'; import reactElementToJSXString from 'react-element-to-jsx-string'; import prepass from 'react-ssr-prepass'; // lets us traverse the react tree import pascalcase from 'pascalcase'; +import { + getDefaultValueValue, + getPropsArrayForComponentName, +} from 'utils/tsdoc.utils'; import { LiveExampleContext } from '../useLiveExampleState'; import { assertCompleteContext } from '../useLiveExampleState/utils'; +import { ignoreProps } from '.'; + /** - * Returns example code for the given component data + * Returns example code for the given component data. + * + * Does not generate prop code for props that have the same value as the + * documented default (in TSDoc). */ export function getStoryCode(context: LiveExampleContext): string | undefined { - /** Treat these packages differently */ + /** Treat these packages differently. We use the entire story code, not just the component JSX */ const packageNameDoesNotMatchComponent = ['typography']; if (assertCompleteContext(context)) { - const { componentName, StoryFn, knobValues, knobsArray } = context; + const { componentName, StoryFn, tsDoc, knobValues } = context; const renderedStory: FunctionComponentElement = React.createElement( StoryFn, @@ -24,14 +33,19 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { const componentRoot = getComponentRoot(renderedStory, componentName); if (componentRoot) { + const TSPropsArray = getPropsArrayForComponentName(componentName, tsDoc); return reactElementToJSXString(componentRoot, { showFunctions: true, showDefaultProps: false, useBooleanShorthandSyntax: false, useFragmentShortSyntax: true, - filterProps: (_, propName) => - // Only display props that we allow users to control in the example - knobsArray.map(knob => knob.name).includes(propName), + filterProps: (value, name) => { + const tsProp = TSPropsArray.find(p => p.name === name); + const tsDefault = tsProp ? getDefaultValueValue(tsProp) : null; + // Filter out explicitly ignored props + // and props that have the same value as the documented default + return !ignoreProps.includes(name) && value !== tsDefault; + }, }); } } diff --git a/components/pages/example/utils/index.ts b/components/pages/example/utils/index.ts index b7124f55..6694fa1e 100644 --- a/components/pages/example/utils/index.ts +++ b/components/pages/example/utils/index.ts @@ -12,9 +12,8 @@ import { } from 'lodash'; import { CustomComponentDoc, - findComponentDoc, - getComponentPropsArray as getTSDocPropsArray, getDefaultValueValue, + getPropsArrayForComponentName, } from 'utils/tsdoc.utils'; import { @@ -406,8 +405,9 @@ export function getKnobsArray({ StoryFn: ComponentStoryFn; tsDoc: Array | null; }) { - const TSPropsArray: Array = getTSDocPropsArray( - findComponentDoc(componentName, tsDoc), + const TSPropsArray: Array = getPropsArrayForComponentName( + componentName, + tsDoc, ) // Filter out component props we don't want knobs for. // i.e. `@ignore` tags, excluded in SB.parameters.controls diff --git a/utils/tsdoc.utils.ts b/utils/tsdoc.utils.ts index 138efb3a..2592e19d 100644 --- a/utils/tsdoc.utils.ts +++ b/utils/tsdoc.utils.ts @@ -84,6 +84,13 @@ export function getComponentPropsArray( }); } +export function getPropsArrayForComponentName( + componentName: string, + tsDoc: Array | null, +) { + return getComponentPropsArray(findComponentDoc(componentName, tsDoc)); +} + export const getInheritedProps = (props: PropCategories): Array => { return Object.entries(pickBy(props, isInheritableGroup)).map( ([groupName, props]: [string, Props]) => ({ From d0f3d209f8aac259089ac43df22ed585b27a9be6 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 14:48:03 -0400 Subject: [PATCH 09/20] refactor knob table component --- .../example/KnobsTable/KnobsTable.styles.ts | 10 ++++ .../pages/example/KnobsTable/KnobsTable.tsx | 57 +++++++++++++++++++ .../pages/example/LiveExample.styles.ts | 9 --- components/pages/example/LiveExample.tsx | 44 +++++--------- .../LiveExampleState.types.ts | 8 +++ .../example/useLiveExampleState/index.ts | 5 +- .../useLiveExampleState.ts | 3 +- 7 files changed, 96 insertions(+), 40 deletions(-) create mode 100644 components/pages/example/KnobsTable/KnobsTable.styles.ts create mode 100644 components/pages/example/KnobsTable/KnobsTable.tsx diff --git a/components/pages/example/KnobsTable/KnobsTable.styles.ts b/components/pages/example/KnobsTable/KnobsTable.styles.ts new file mode 100644 index 00000000..fb21382b --- /dev/null +++ b/components/pages/example/KnobsTable/KnobsTable.styles.ts @@ -0,0 +1,10 @@ +import { css } from '@leafygreen-ui/emotion'; + +export const exampleCodeButtonRowStyle = css` + text-align: right; + padding: 16px 24px; +`; + +export const exampleCodeButtonStyle = css` + white-space: nowrap; +`; diff --git a/components/pages/example/KnobsTable/KnobsTable.tsx b/components/pages/example/KnobsTable/KnobsTable.tsx new file mode 100644 index 00000000..cc16eb97 --- /dev/null +++ b/components/pages/example/KnobsTable/KnobsTable.tsx @@ -0,0 +1,57 @@ +import { MouseEventHandler } from 'react'; + +import Button from '@leafygreen-ui/button'; + +import { KnobRow } from '../KnobRow/KnobRow'; +import { + LiveExampleContext, + LiveExampleStateReturnValue, +} from '../useLiveExampleState'; + +import { + exampleCodeButtonRowStyle, + exampleCodeButtonStyle, +} from './KnobsTable.styles'; + +interface KnobsTableProps { + showCode: boolean; + codeExampleEnabled: boolean; + handleShowCodeClick: MouseEventHandler; + knobsArray: Required['knobsArray']; + knobValues: Required['knobValues']; + updateKnobValue: LiveExampleStateReturnValue['updateKnobValue']; +} + +export const KnobsTable = ({ + showCode, + codeExampleEnabled, + handleShowCodeClick, + knobsArray, + knobValues, + updateKnobValue, +}: KnobsTableProps) => { + return ( +
+ {codeExampleEnabled && ( +
+ +
+ )} + {knobsArray.map(knob => ( + + ))} +
+ ); +}; diff --git a/components/pages/example/LiveExample.styles.ts b/components/pages/example/LiveExample.styles.ts index 3c82d1f4..07fb745e 100644 --- a/components/pages/example/LiveExample.styles.ts +++ b/components/pages/example/LiveExample.styles.ts @@ -88,12 +88,3 @@ export const codeStyle = css` height: 100%; overflow: auto; `; - -export const exampleCodeButtonRowStyle = css` - text-align: right; - padding: 16px 24px; -`; - -export const exampleCodeButtonStyle = css` - white-space: nowrap; -`; diff --git a/components/pages/example/LiveExample.tsx b/components/pages/example/LiveExample.tsx index 81fff91c..70011dd3 100644 --- a/components/pages/example/LiveExample.tsx +++ b/components/pages/example/LiveExample.tsx @@ -1,7 +1,6 @@ import { useEffect, useRef, useState } from 'react'; import { CustomComponentDoc } from 'utils/tsdoc.utils'; -import Button from '@leafygreen-ui/button'; import Card from '@leafygreen-ui/card'; import { css, cx } from '@leafygreen-ui/emotion'; import { usePrevious } from '@leafygreen-ui/hooks'; @@ -9,7 +8,7 @@ import LeafyGreenProvider, { useDarkMode, } from '@leafygreen-ui/leafygreen-provider'; -import { KnobRow } from './KnobRow/KnobRow'; +import { KnobsTable } from './KnobsTable/KnobsTable'; import { assertCompleteContext, isStateReady, @@ -18,8 +17,6 @@ import { getStoryCode } from './utils/getStoryCode'; import { CodeExample } from './CodeExample'; import { blockContainerStyle, - exampleCodeButtonRowStyle, - exampleCodeButtonStyle, liveExampleWrapperStyle, storyContainerStyle, } from './LiveExample.styles'; @@ -86,7 +83,7 @@ export const LiveExample = ({ }, [context]); /** Triggered on button click */ - const handleShowCodeClick = () => { + const toggleShowCode = () => { setShowCode(sc => !sc); regenerateStoryCode(context); }; @@ -104,6 +101,8 @@ export const LiveExample = ({ // should match the total height of the story container const exampleCodeHeight = storyContainerHeight + 48; + const codeExampleEnabled = !disableCodeExampleFor.includes(componentName); + return ( )} - {!disableCodeExampleFor.includes(componentName) && ( + {codeExampleEnabled && ( )} -
- {!disableCodeExampleFor.includes(componentName) && ( -
- -
- )} - {isStateReady(context) && - context.knobsArray.map(knob => ( - - ))} -
+ {isStateReady(context) && ( + + )}
); diff --git a/components/pages/example/useLiveExampleState/LiveExampleState.types.ts b/components/pages/example/useLiveExampleState/LiveExampleState.types.ts index fe100a46..cb070ce8 100644 --- a/components/pages/example/useLiveExampleState/LiveExampleState.types.ts +++ b/components/pages/example/useLiveExampleState/LiveExampleState.types.ts @@ -51,3 +51,11 @@ export type LiveExampleAction = type: LiveExampleActionType.NOT_FOUND; componentName: string; }; + +export interface LiveExampleStateReturnValue { + context: LiveExampleContext; + updateKnobValue: (prop: string, val: any) => void; + resetContext: (name: string, tsDoc: Array) => void; + setErrorState: (msg: string) => void; + isState: (state: LiveExampleState) => boolean; +} diff --git a/components/pages/example/useLiveExampleState/index.ts b/components/pages/example/useLiveExampleState/index.ts index c4726a71..4ca0a67c 100644 --- a/components/pages/example/useLiveExampleState/index.ts +++ b/components/pages/example/useLiveExampleState/index.ts @@ -1,2 +1,5 @@ -export type { LiveExampleContext } from './LiveExampleState.types'; +export type { + LiveExampleContext, + LiveExampleStateReturnValue, +} from './LiveExampleState.types'; export { useLiveExampleState } from './useLiveExampleState'; diff --git a/components/pages/example/useLiveExampleState/useLiveExampleState.ts b/components/pages/example/useLiveExampleState/useLiveExampleState.ts index 82fac0e1..6152ccc8 100644 --- a/components/pages/example/useLiveExampleState/useLiveExampleState.ts +++ b/components/pages/example/useLiveExampleState/useLiveExampleState.ts @@ -15,6 +15,7 @@ import { import { LiveExampleActionType, LiveExampleState, + LiveExampleStateReturnValue, } from './LiveExampleState.types'; import { liveExampleStateReducer } from './LiveExampleStateReducer'; import { assertContext, defaultLiveExampleContext } from './utils'; @@ -22,7 +23,7 @@ import { assertContext, defaultLiveExampleContext } from './utils'; export function useLiveExampleState( componentName: string, tsDoc?: Array | null, -) { +): LiveExampleStateReturnValue { const initialState = merge( { componentName, tsDoc }, defaultLiveExampleContext, From 2649d0ef1da0d70e708c936d56b178469c4a10d0 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 15:02:24 -0400 Subject: [PATCH 10/20] ensure table is sorted --- components/pages/example/KnobsTable/KnobsTable.tsx | 4 ++++ components/pages/example/utils/index.ts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/pages/example/KnobsTable/KnobsTable.tsx b/components/pages/example/KnobsTable/KnobsTable.tsx index cc16eb97..b5a7f9e3 100644 --- a/components/pages/example/KnobsTable/KnobsTable.tsx +++ b/components/pages/example/KnobsTable/KnobsTable.tsx @@ -1,6 +1,7 @@ import { MouseEventHandler } from 'react'; import Button from '@leafygreen-ui/button'; +import Icon from '@leafygreen-ui/icon'; import { KnobRow } from '../KnobRow/KnobRow'; import { @@ -39,6 +40,9 @@ export const KnobsTable = ({ variant="default" size="xsmall" onClick={handleShowCodeClick} + leftGlyph={ + + } > {showCode ? 'Hide' : 'Show'} Code diff --git a/components/pages/example/utils/index.ts b/components/pages/example/utils/index.ts index 6694fa1e..2880c7ac 100644 --- a/components/pages/example/utils/index.ts +++ b/components/pages/example/utils/index.ts @@ -425,7 +425,9 @@ export function getKnobsArray({ // Convert SB InputType to KnobType .map(mapSBArgTypeToKnobType); - const knobsArray = [...TSPropsArray, ...SBArgsArray]; + const knobsArray = [...TSPropsArray, ...SBArgsArray].sort((a, z) => + a.name.localeCompare(z.name), + ); return knobsArray; } From f355bb352a955363a9cd1f1e87aeea6a9e54253e Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 15:15:47 -0400 Subject: [PATCH 11/20] mv knobrow & knob --- components/pages/example/{ => KnobsTable}/Knob/Knob.styles.ts | 0 components/pages/example/{ => KnobsTable}/Knob/Knob.tsx | 0 components/pages/example/{ => KnobsTable}/Knob/RawKnob.tsx | 0 components/pages/example/{ => KnobsTable}/Knob/types.ts | 2 +- components/pages/example/{KnobRow => KnobsTable}/KnobRow.tsx | 3 ++- components/pages/example/KnobsTable/KnobsTable.tsx | 2 +- 6 files changed, 4 insertions(+), 3 deletions(-) rename components/pages/example/{ => KnobsTable}/Knob/Knob.styles.ts (100%) rename components/pages/example/{ => KnobsTable}/Knob/Knob.tsx (100%) rename components/pages/example/{ => KnobsTable}/Knob/RawKnob.tsx (100%) rename components/pages/example/{ => KnobsTable}/Knob/types.ts (83%) rename components/pages/example/{KnobRow => KnobsTable}/KnobRow.tsx (98%) diff --git a/components/pages/example/Knob/Knob.styles.ts b/components/pages/example/KnobsTable/Knob/Knob.styles.ts similarity index 100% rename from components/pages/example/Knob/Knob.styles.ts rename to components/pages/example/KnobsTable/Knob/Knob.styles.ts diff --git a/components/pages/example/Knob/Knob.tsx b/components/pages/example/KnobsTable/Knob/Knob.tsx similarity index 100% rename from components/pages/example/Knob/Knob.tsx rename to components/pages/example/KnobsTable/Knob/Knob.tsx diff --git a/components/pages/example/Knob/RawKnob.tsx b/components/pages/example/KnobsTable/Knob/RawKnob.tsx similarity index 100% rename from components/pages/example/Knob/RawKnob.tsx rename to components/pages/example/KnobsTable/Knob/RawKnob.tsx diff --git a/components/pages/example/Knob/types.ts b/components/pages/example/KnobsTable/Knob/types.ts similarity index 83% rename from components/pages/example/Knob/types.ts rename to components/pages/example/KnobsTable/Knob/types.ts index 31e82196..9a4861d8 100644 --- a/components/pages/example/Knob/types.ts +++ b/components/pages/example/KnobsTable/Knob/types.ts @@ -1,6 +1,6 @@ import { HTMLElementProps } from '@leafygreen-ui/lib'; -import { KnobOptionType, TypeString } from '../types'; +import { KnobOptionType, TypeString } from '../../types'; export interface KnobProps extends HTMLElementProps<'input'> { propName: string; diff --git a/components/pages/example/KnobRow/KnobRow.tsx b/components/pages/example/KnobsTable/KnobRow.tsx similarity index 98% rename from components/pages/example/KnobRow/KnobRow.tsx rename to components/pages/example/KnobsTable/KnobRow.tsx index 931bd59b..bbc576cc 100644 --- a/components/pages/example/KnobRow/KnobRow.tsx +++ b/components/pages/example/KnobsTable/KnobRow.tsx @@ -8,9 +8,10 @@ import { spacing } from '@leafygreen-ui/tokens'; import Tooltip from '@leafygreen-ui/tooltip'; import { Body } from '@leafygreen-ui/typography'; -import { Knob } from '../Knob/Knob'; import { KnobType } from '../types'; +import { Knob } from './Knob/Knob'; + const knobRowWrapperStyle = (darkMode: boolean) => css` display: flex; width: 100%; diff --git a/components/pages/example/KnobsTable/KnobsTable.tsx b/components/pages/example/KnobsTable/KnobsTable.tsx index b5a7f9e3..b07dbec2 100644 --- a/components/pages/example/KnobsTable/KnobsTable.tsx +++ b/components/pages/example/KnobsTable/KnobsTable.tsx @@ -3,12 +3,12 @@ import { MouseEventHandler } from 'react'; import Button from '@leafygreen-ui/button'; import Icon from '@leafygreen-ui/icon'; -import { KnobRow } from '../KnobRow/KnobRow'; import { LiveExampleContext, LiveExampleStateReturnValue, } from '../useLiveExampleState'; +import { KnobRow } from './KnobRow'; import { exampleCodeButtonRowStyle, exampleCodeButtonStyle, From 6ca347701be88beb9a992de0be265185fae86f44 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 15:16:12 -0400 Subject: [PATCH 12/20] Sort knobs same as tsdocs --- components/pages/example/utils/index.ts | 5 ++--- utils/tsdoc.utils.ts | 12 +++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/pages/example/utils/index.ts b/components/pages/example/utils/index.ts index 2880c7ac..f1dbad80 100644 --- a/components/pages/example/utils/index.ts +++ b/components/pages/example/utils/index.ts @@ -14,6 +14,7 @@ import { CustomComponentDoc, getDefaultValueValue, getPropsArrayForComponentName, + sortPropItems, } from 'utils/tsdoc.utils'; import { @@ -425,9 +426,7 @@ export function getKnobsArray({ // Convert SB InputType to KnobType .map(mapSBArgTypeToKnobType); - const knobsArray = [...TSPropsArray, ...SBArgsArray].sort((a, z) => - a.name.localeCompare(z.name), - ); + const knobsArray = [...TSPropsArray, ...SBArgsArray].sort(sortPropItems); return knobsArray; } diff --git a/utils/tsdoc.utils.ts b/utils/tsdoc.utils.ts index 2592e19d..e9b53a08 100644 --- a/utils/tsdoc.utils.ts +++ b/utils/tsdoc.utils.ts @@ -46,6 +46,12 @@ export function isRequired(prop: PropItem): boolean { return prop.required || !isUndefined(prop.tags?.required); } +export function sortPropItems(a: PropItem, z: PropItem): number { + if (isRequired(a) && !isRequired(z)) return -1; + if (isRequired(z)) return 1; + return a.name.localeCompare(z.name); +} + /** * Finds the appropriate ComponentDoc given a componentName. * Useful when there are multiple docs for one component @@ -77,11 +83,7 @@ export function getComponentPropsArray( return Object.values(omitBy(props, isInheritableGroup)) .flatMap(Object.values) - .sort((a, z) => { - if (isRequired(a) && !isRequired(z)) return -1; - if (isRequired(z)) return 1; - return a.name.localeCompare(z.name); - }); + .sort(sortPropItems); } export function getPropsArrayForComponentName( From 4f90e8cc4774fee3dfe94b87716da9bb7a0eb1f6 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 15:21:44 -0400 Subject: [PATCH 13/20] Adds required flag --- components/pages/example/KnobsTable/KnobRow.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/components/pages/example/KnobsTable/KnobRow.tsx b/components/pages/example/KnobsTable/KnobRow.tsx index bbc576cc..0f1fc09a 100644 --- a/components/pages/example/KnobsTable/KnobRow.tsx +++ b/components/pages/example/KnobsTable/KnobRow.tsx @@ -6,7 +6,7 @@ import { HTMLElementProps } from '@leafygreen-ui/lib'; import { palette } from '@leafygreen-ui/palette'; import { spacing } from '@leafygreen-ui/tokens'; import Tooltip from '@leafygreen-ui/tooltip'; -import { Body } from '@leafygreen-ui/typography'; +import { Body, Disclaimer } from '@leafygreen-ui/typography'; import { KnobType } from '../types'; @@ -32,6 +32,13 @@ const knobControlStyle = css` justify-content: end; `; +const requiredFlagStyle = css` + display: inline; + padding-left: 1ch; + color: ${palette.red.base}; + text-transform: uppercase; +`; + interface KnobRowProps extends HTMLElementProps<'div'> { knob: KnobType; knobValue?: any; @@ -39,7 +46,7 @@ interface KnobRowProps extends HTMLElementProps<'div'> { } export const KnobRow = ({ knob, knobValue, setKnobValue }: KnobRowProps) => { - const { controlType, name, options, args } = knob; + const { controlType, name, options, args, required } = knob; const { darkMode } = useDarkMode(); const renderedKnob = ( @@ -67,6 +74,9 @@ export const KnobRow = ({ knob, knobValue, setKnobValue }: KnobRowProps) => { id={`${kebabCase()}-knob-${name}`} > {name} + {required && ( + (required) + )} {args?.disabled && args?.description ? ( From 46b9667f11ac0185c2ed2c846426e69645ac6b02 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 15:24:16 -0400 Subject: [PATCH 14/20] Update tsdoc.utils.ts --- utils/tsdoc.utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/tsdoc.utils.ts b/utils/tsdoc.utils.ts index e9b53a08..c5f9acc6 100644 --- a/utils/tsdoc.utils.ts +++ b/utils/tsdoc.utils.ts @@ -46,6 +46,9 @@ export function isRequired(prop: PropItem): boolean { return prop.required || !isUndefined(prop.tags?.required); } +/** + * Sorts prop items with required props first, then the rest alphabetically + */ export function sortPropItems(a: PropItem, z: PropItem): number { if (isRequired(a) && !isRequired(z)) return -1; if (isRequired(z)) return 1; From 2cab2279906322dfc18a97fd98a7054c332c11cb Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 15:25:21 -0400 Subject: [PATCH 15/20] use isRequired in knobs table --- components/pages/example/KnobsTable/KnobRow.tsx | 3 ++- utils/tsdoc.utils.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/pages/example/KnobsTable/KnobRow.tsx b/components/pages/example/KnobsTable/KnobRow.tsx index 0f1fc09a..13b60739 100644 --- a/components/pages/example/KnobsTable/KnobRow.tsx +++ b/components/pages/example/KnobsTable/KnobRow.tsx @@ -1,4 +1,5 @@ import { kebabCase } from 'lodash'; +import { isRequired } from 'utils/tsdoc.utils'; import { css } from '@leafygreen-ui/emotion'; import { useDarkMode } from '@leafygreen-ui/leafygreen-provider'; @@ -74,7 +75,7 @@ export const KnobRow = ({ knob, knobValue, setKnobValue }: KnobRowProps) => { id={`${kebabCase()}-knob-${name}`} > {name} - {required && ( + {isRequired(knob) && ( (required) )} diff --git a/utils/tsdoc.utils.ts b/utils/tsdoc.utils.ts index c5f9acc6..37bc08fe 100644 --- a/utils/tsdoc.utils.ts +++ b/utils/tsdoc.utils.ts @@ -41,6 +41,9 @@ export const isPropItem = (obj: any): obj is PropItem => { ); }; +/** + * Whether a given prop item is required + */ export function isRequired(prop: PropItem): boolean { // @ts-expect-error return prop.required || !isUndefined(prop.tags?.required); From b8889863cc39d291ddda52fece3a752b41fe679b Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 15:25:37 -0400 Subject: [PATCH 16/20] rm var --- components/pages/example/KnobsTable/KnobRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pages/example/KnobsTable/KnobRow.tsx b/components/pages/example/KnobsTable/KnobRow.tsx index 13b60739..a5671341 100644 --- a/components/pages/example/KnobsTable/KnobRow.tsx +++ b/components/pages/example/KnobsTable/KnobRow.tsx @@ -47,7 +47,7 @@ interface KnobRowProps extends HTMLElementProps<'div'> { } export const KnobRow = ({ knob, knobValue, setKnobValue }: KnobRowProps) => { - const { controlType, name, options, args, required } = knob; + const { controlType, name, options, args } = knob; const { darkMode } = useDarkMode(); const renderedKnob = ( From a666ce4e73645dbbee70f82be758a7d7babfd8b3 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Mon, 24 Apr 2023 17:53:45 -0400 Subject: [PATCH 17/20] bumps versions --- package.json | 102 ++-- yarn.lock | 1344 ++++++++++++++++++++++---------------------------- 2 files changed, 630 insertions(+), 816 deletions(-) diff --git a/package.json b/package.json index 09fb6e43..4262b85d 100644 --- a/package.json +++ b/package.json @@ -27,57 +27,57 @@ "@emotion/server": "^11.0.0", "@emotion/styled": "^11.9.3", "@faker-js/faker": "^7.6.0", - "@leafygreen-ui/a11y": "^1.4.1", - "@leafygreen-ui/badge": "^8.0.4", - "@leafygreen-ui/banner": "^7.0.4", - "@leafygreen-ui/box": "^3.1.1", - "@leafygreen-ui/button": "^20.0.3", - "@leafygreen-ui/callout": "^9.0.5", - "@leafygreen-ui/card": "^9.0.6", - "@leafygreen-ui/checkbox": "^12.0.7", - "@leafygreen-ui/code": "^14.2.1", - "@leafygreen-ui/combobox": "^5.0.10", - "@leafygreen-ui/confirmation-modal": "^4.0.5", - "@leafygreen-ui/copyable": "^8.0.6", - "@leafygreen-ui/emotion": "^4.0.3", - "@leafygreen-ui/empty-state": "^1.0.0", - "@leafygreen-ui/expandable-card": "^3.0.7", - "@leafygreen-ui/form-footer": "^3.0.4", - "@leafygreen-ui/guide-cue": "^4.0.2", - "@leafygreen-ui/hooks": "^7.7.0", - "@leafygreen-ui/icon": "^11.13.0", - "@leafygreen-ui/icon-button": "^15.0.8", - "@leafygreen-ui/inline-definition": "^6.0.3", - "@leafygreen-ui/leafygreen-provider": "^3.1.1", - "@leafygreen-ui/lib": "^10.3.1", - "@leafygreen-ui/logo": "^8.0.1", - "@leafygreen-ui/marketing-modal": "^4.0.5", - "@leafygreen-ui/menu": "^20.0.1", - "@leafygreen-ui/modal": "^14.0.4", - "@leafygreen-ui/number-input": "^1.0.0", - "@leafygreen-ui/pagination": "^1.0.4", - "@leafygreen-ui/palette": "^4.0.2", - "@leafygreen-ui/password-input": "^1.0.2", - "@leafygreen-ui/pipeline": "^5.0.5", - "@leafygreen-ui/popover": "^11.0.6", - "@leafygreen-ui/portal": "^4.1.0", - "@leafygreen-ui/radio-box-group": "^12.0.4", - "@leafygreen-ui/radio-group": "^10.1.0", - "@leafygreen-ui/ripple": "^1.1.8", - "@leafygreen-ui/search-input": "^2.0.1", - "@leafygreen-ui/segmented-control": "^7.0.5", - "@leafygreen-ui/select": "^10.3.0", - "@leafygreen-ui/side-nav": "^13.0.4", - "@leafygreen-ui/stepper": "^3.1.9", - "@leafygreen-ui/table": "^11.0.2", - "@leafygreen-ui/tabs": "^11.0.6", - "@leafygreen-ui/text-area": "^8.0.6", - "@leafygreen-ui/text-input": "^12.1.8", - "@leafygreen-ui/toast": "^6.1.0", - "@leafygreen-ui/toggle": "^10.0.6", - "@leafygreen-ui/tokens": "^2.0.1", - "@leafygreen-ui/tooltip": "^9.1.6", - "@leafygreen-ui/typography": "^16.2.0", + "@leafygreen-ui/a11y": "^1.4.2", + "@leafygreen-ui/badge": "^8.0.5", + "@leafygreen-ui/banner": "^7.0.5", + "@leafygreen-ui/box": "^3.1.2", + "@leafygreen-ui/button": "^20.0.4", + "@leafygreen-ui/callout": "^9.0.6", + "@leafygreen-ui/card": "^9.0.7", + "@leafygreen-ui/checkbox": "^12.0.8", + "@leafygreen-ui/code": "^14.2.2", + "@leafygreen-ui/combobox": "^5.0.11", + "@leafygreen-ui/confirmation-modal": "^4.0.6", + "@leafygreen-ui/copyable": "^8.0.7", + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/empty-state": "^1.0.1", + "@leafygreen-ui/expandable-card": "^3.0.8", + "@leafygreen-ui/form-footer": "^3.0.5", + "@leafygreen-ui/guide-cue": "^4.0.3", + "@leafygreen-ui/hooks": "^7.7.1", + "@leafygreen-ui/icon": "^11.13.1", + "@leafygreen-ui/icon-button": "^15.0.9", + "@leafygreen-ui/inline-definition": "^6.0.4", + "@leafygreen-ui/leafygreen-provider": "^3.1.2", + "@leafygreen-ui/lib": "^10.3.2", + "@leafygreen-ui/logo": "^8.0.2", + "@leafygreen-ui/marketing-modal": "^4.0.6", + "@leafygreen-ui/menu": "^20.0.2", + "@leafygreen-ui/modal": "^14.0.5", + "@leafygreen-ui/number-input": "^1.0.1", + "@leafygreen-ui/pagination": "^1.0.5", + "@leafygreen-ui/palette": "^4.0.3", + "@leafygreen-ui/password-input": "^1.0.3", + "@leafygreen-ui/pipeline": "^5.0.6", + "@leafygreen-ui/popover": "^11.0.7", + "@leafygreen-ui/portal": "^4.1.1", + "@leafygreen-ui/radio-box-group": "^12.0.5", + "@leafygreen-ui/radio-group": "^10.1.1", + "@leafygreen-ui/ripple": "^1.1.9", + "@leafygreen-ui/search-input": "^2.0.2", + "@leafygreen-ui/segmented-control": "^8.0.0", + "@leafygreen-ui/select": "^10.3.1", + "@leafygreen-ui/side-nav": "^13.0.5", + "@leafygreen-ui/stepper": "^3.1.10", + "@leafygreen-ui/table": "^11.0.3", + "@leafygreen-ui/tabs": "^11.0.7", + "@leafygreen-ui/text-area": "^8.0.7", + "@leafygreen-ui/text-input": "^12.1.9", + "@leafygreen-ui/toast": "^6.1.1", + "@leafygreen-ui/toggle": "^10.0.7", + "@leafygreen-ui/tokens": "^2.0.2", + "@leafygreen-ui/tooltip": "^9.1.7", + "@leafygreen-ui/typography": "^16.2.1", "@mdx-js/loader": "^2.1.0", "@mdx-js/react": "^2.1.2", "@next/mdx": "^10.0.3", diff --git a/yarn.lock b/yarn.lock index 2288ea54..c0ef19c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1462,122 +1462,109 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@leafygreen-ui/a11y@^1.3.4", "@leafygreen-ui/a11y@^1.4.0", "@leafygreen-ui/a11y@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/a11y/-/a11y-1.4.1.tgz#cb5f28483d1e9500ad719086ae3c90c13c24db9c" - integrity sha512-vYjIorEFOWLFhs2WPmCg5wYYWq9CmScQ2CkqtJhixkgzXP/Q36TEfkJ2BuReyLir8XZG/QIWBSSO7dR5sQLDPA== +"@leafygreen-ui/a11y@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/a11y/-/a11y-1.4.2.tgz#ecc85210873882a6ff0e265fc1d06f8f6641de9b" + integrity sha512-xIBYmA/kazyCieds9fmFBQmWfsqwOEOP6lX9EWEzecJnOreTflZcrZYV9ApnTQ2whw8k9CLT0wObaTHm4S1IMQ== dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/lib" "^10.2.1" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/lib" "^10.3.2" -"@leafygreen-ui/badge@^8.0.4": - version "8.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/badge/-/badge-8.0.4.tgz#96a2490aabbd4fce99142ee562b4bed2b8573008" - integrity sha512-bjpEr1une8UOQd6IWfK+9R7li0ect/+G1sR4IbQsNzZU8q9CZlxY25eFMi3hfu6XKXKgqM8UUryQf1phTer7lA== +"@leafygreen-ui/badge@^8.0.5": + version "8.0.5" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/badge/-/badge-8.0.5.tgz#78b173958edf6c85a888051125766b093dafb15f" + integrity sha512-+WNK0jwY3ItJQHUOmUl7MdzHXBw2aGG0UQGsJmDo0hat94K8mqiGNJpKPpYUFZ3SEei7Y1hd1Kc+35uuC51SHw== dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - -"@leafygreen-ui/banner@^7.0.4": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/banner/-/banner-7.0.4.tgz#73889e8227866f4a1de9c530ee5d5fbaf7ee9d2f" - integrity sha512-JqcyuD5/olUC6s4KAZkNlAOwzTEhl6pxg6ioAsoqeQjXb6Lvqt3hUwI+4O37irW/1lT2a87E7Bf+tSJgRzcupA== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/box@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/box/-/box-3.1.1.tgz#3d2cc09ac5105e19d2a49da2f2065b45cc8e4722" - integrity sha512-zA6Ors7GV19DTVLqhQdg3jvypUNlyNJNVrS2XytmsPvR5XJuh5saNLmi9zw1aNsN7hETUCxj4JH1QxDEgaYTqg== + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" -"@leafygreen-ui/button@^20.0.2": - version "20.0.2" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/button/-/button-20.0.2.tgz#ce200fb8d353a265b38a2502ff6d2a8c8102a550" - integrity sha512-gSeDZDdv3H6fe+CjITFlJvGq74YntipNXkM50id9R94FBagT757JMRV6IK9drOxAssy7u3bx93cdmn1PjAKQQg== - dependencies: - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/ripple" "^1.1.8" - "@leafygreen-ui/tokens" "^2.0.1" - polished "^4.2.2" - -"@leafygreen-ui/button@^20.0.3": - version "20.0.3" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/button/-/button-20.0.3.tgz#f716d971b8c8836d29208e4cba0531daf950ca18" - integrity sha512-lhi5je9b0SQxy3tsRKtTlr3MP9o9PSGELAmCDgi8GqAVyLOzl1TlX5ZnSMTuDuWop3sV0phcDk7YCmfP4dgOPQ== - dependencies: - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/ripple" "^1.1.8" - "@leafygreen-ui/tokens" "^2.0.1" +"@leafygreen-ui/banner@^7.0.5": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/banner/-/banner-7.0.5.tgz#1c1048f5f86afe5dd60764fc9886271388358a6a" + integrity sha512-gzQMxqIcux0y7GV+UPrZ7PA8hry6cyQFGbJDP+NBecIHIvZfqseuYi+kjLm6do4ZbqieSl/br+Z1bAOjiIy99A== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/box@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/box/-/box-3.1.2.tgz#2d2ad7ae98d9ce267a3518d37f7ff3a7b1ffd503" + integrity sha512-2blVwXz/Zj/muClu2h7KTk6QPZU89eXTdVeWZidFjQrpuh+j3RvKcV9yZkmgbZMvwTpJCmyxXDKzkYV9pmTPCA== + +"@leafygreen-ui/button@^20.0.4": + version "20.0.4" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/button/-/button-20.0.4.tgz#739e0f4533e96c277b46907a1d9f44ed678884b2" + integrity sha512-9j0MW1iz8MDjhTOD2RjMJXXKRMcpl1+qPutrOfKU0oyqMdufa1XcEDbBoAgNeb9AZP9Hy8xHDf2c1nGMLFR8CQ== + dependencies: + "@leafygreen-ui/box" "^3.1.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/ripple" "^1.1.9" + "@leafygreen-ui/tokens" "^2.0.2" polished "^4.2.2" -"@leafygreen-ui/callout@^9.0.5": - version "9.0.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/callout/-/callout-9.0.5.tgz#8b3c48b6e0805688a7ad00a2db28bf276f856643" - integrity sha512-eR+Na8H4jkaccpxkEv2c13/aDm1ZaKy6/RcdZlDWXSIFLNMqIBNLfDtoC8f4n4VzNpFh2A4DHqo08sMFlUCVxw== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/card@^9.0.6": +"@leafygreen-ui/callout@^9.0.6": version "9.0.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/card/-/card-9.0.6.tgz#4e792dc560544663fa5bf5854b42303cbe58fd7e" - integrity sha512-vu/zQK7mNJEp4eAtOtFMhppYz6NuQX7VEotJHCoTMI9Ec8qCLL/jyI8X6drd/4H5xnGMFoZrBersyh6vKwzVvg== - dependencies: - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/callout/-/callout-9.0.6.tgz#0b6e6eef736c286141a0f8625d08f2fd151933a3" + integrity sha512-mCQFy+D8iRlkSUe7TJC+iEa3FaaUF5Y3wV9ch1+BJVrKb/Lk7773UxuwMKC5hnqcCukGXHiRMmUSxAs85Di7qQ== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/card@^9.0.7": + version "9.0.7" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/card/-/card-9.0.7.tgz#aa0af9ecd96b1db068b4f81f8bb1f6cfe5c02849" + integrity sha512-WMxqCbNxf8XganuIyKWDuD7v1dieD6dA6kWa3PY/5JllaD9TLOwO2yD47x71yo8v/Y+vAgSoblo7Upsxo0nBnA== + dependencies: + "@leafygreen-ui/box" "^3.1.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" polished "^4.2.2" -"@leafygreen-ui/checkbox@^12.0.0", "@leafygreen-ui/checkbox@^12.0.7": - version "12.0.7" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/checkbox/-/checkbox-12.0.7.tgz#484b223cff80d70de095929c1a56beff72e93440" - integrity sha512-9rJ9I7R7UMnIaK7Q7zPoK55JtHydmjj1bbpVofl3Pa+HcVvbriXIPk6WlMDVLsThQuO61jhgGwNeRfGEWgZ8cg== - dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/checkbox@^12.0.8": + version "12.0.8" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/checkbox/-/checkbox-12.0.8.tgz#2eba74f146b49d07d4664b8d22ff12ce4f3b8862" + integrity sha512-lWD2YKzikIaHkztHaDqOULdOyb1bP9sZk1V6GeUALbftK0YCcpXtc3PHVJncHK8aZNWfK3eVnyDVWO0L3ePWvQ== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" react-transition-group "^4.4.1" -"@leafygreen-ui/code@^14.2.1": - version "14.2.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/code/-/code-14.2.1.tgz#66f4cfba45278f868abce5750b92e4fa92cf1e52" - integrity sha512-hRXLJjYJs+R0tQvoVk9bHl51I+r3z434WtchAbeh+ZwmRjynuxEJ/x51c7kNKmX8Mibe1Z0BZIqSzJUKLf8vlw== - dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/select" "^10.2.3" - "@leafygreen-ui/tokens" "^2.0.1" +"@leafygreen-ui/code@^14.2.2": + version "14.2.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/code/-/code-14.2.2.tgz#68b42b6b0898ccae6168ce36e5a4884984c1134f" + integrity sha512-5stKYdCNkpBLhfbpRy9nKhr2KLnXo0SBS4xJPxWiZqrlmi6G+b+Q0NVBqgerMMwbRv3OPG4QviVQWfLxtt7qmQ== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/select" "^10.3.1" + "@leafygreen-ui/tokens" "^2.0.2" clipboard "^2.0.6" facepaint "^1.2.1" highlight.js "~11.5.0" @@ -1585,757 +1572,584 @@ lodash "^4.17.21" polished "^4.2.2" -"@leafygreen-ui/combobox@^5.0.10": - version "5.0.10" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/combobox/-/combobox-5.0.10.tgz#06dd2a22438fc46bb307e301ffdede0536ae19d8" - integrity sha512-R2ORWOOaWNqF1aEo5E7bTcBZj4WjIjSTeSJsxENvhRP63MyO8bn36zrDyxE9eOMWQr12hRnLLb6bJ3++8g/csg== - dependencies: - "@leafygreen-ui/checkbox" "^12.0.7" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.6.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/inline-definition" "^6.0.3" - "@leafygreen-ui/input-option" "^1.0.1" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/popover" "^11.0.5" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/combobox@^5.0.11": + version "5.0.11" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/combobox/-/combobox-5.0.11.tgz#558f9def83905da6d2914512ff6433dc8af7d029" + integrity sha512-AWGtfB7K/+XErGJSYhXssFLuafsplgZcTfJfa+gaNeyQPN1Sss5mxwBd4gxuRPP2d3+3BMaN+JogeJGYaRthqQ== + dependencies: + "@leafygreen-ui/checkbox" "^12.0.8" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/inline-definition" "^6.0.4" + "@leafygreen-ui/input-option" "^1.0.2" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/popover" "^11.0.7" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" chalk "^4.1.2" lodash "^4.17.21" polished "^4.2.2" -"@leafygreen-ui/confirmation-modal@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/confirmation-modal/-/confirmation-modal-4.0.5.tgz#f5cafdd167dbea74e0b8a9c0778dcd700d7b60cd" - integrity sha512-9COUAn/OmXxqJr5vRSWMckrJj87SM3bT4o66jZJ1c8THPD8uxs6JSho+OPV+4wML+BuEFyxo2HhuqUlWw9fdbw== - dependencies: - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/modal" "^14.0.3" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/text-input" "^12.1.7" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/copyable@^8.0.6": - version "8.0.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/copyable/-/copyable-8.0.6.tgz#04960df431ea383e0fa9b7b18740e324f535bf2c" - integrity sha512-evgHOuQMl5SB2XfCosuWoCDkkJh9IcYgo5YY/Bz0lP+yaAFYWoMHT6WLmKqoHOSn4900xbMSUlt0BLLP9CGdaA== - dependencies: - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/tooltip" "^9.1.6" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/confirmation-modal@^4.0.6": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/confirmation-modal/-/confirmation-modal-4.0.6.tgz#46fdae5892b1e3e50c1fe77c6990a0bfacbca5bd" + integrity sha512-uNsqrZSZ+kWRBtgnvqYwobbtRS2rRtwgfvo5UBnDjOzT8l4Y4KgAQQGb2xN76mmterePiTNyrlVFn+Tz1USmtg== + dependencies: + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/modal" "^14.0.5" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/text-input" "^12.1.9" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/copyable@^8.0.7": + version "8.0.7" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/copyable/-/copyable-8.0.7.tgz#1503a8b97113893a7b2f41d78d3c31bdc0d3913d" + integrity sha512-UvW/rXUnp5hrGKR7ApTxfVAEViS6T6Lf2iJo9EZPtplmeAcCyi/t/paMoSY9Me8PThHkPgy9nRgiMquiQ/hVoQ== + dependencies: + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/tooltip" "^9.1.7" + "@leafygreen-ui/typography" "^16.2.1" clipboard "^2.0.6" polished "^4.2.2" -"@leafygreen-ui/emotion@^4.0.1", "@leafygreen-ui/emotion@^4.0.3": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/emotion/-/emotion-4.0.3.tgz#f93cf9c4471551f3d54e21670e80e6e6c019550a" - integrity sha512-GXVHswpN68rwBv7s1FKDIBserh2WYRsXfuRSWk9Nq5SKyl74JVuvEfMIwrJLNzAy0+G3j+vskCGkH22dgPCPhA== +"@leafygreen-ui/emotion@^4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/emotion/-/emotion-4.0.4.tgz#8ed1a7cda533daf55866ee56a232a7e5b45c9838" + integrity sha512-ICiAaGqCX73Zmg02afBe4CRqKXwcS/XPOnSZZWk7XAy+qwhHQjp2cO2pVSjQQbTkJcNpqbuzWErsj5Vy98+sxA== dependencies: "@emotion/css" "^11.1.3" "@emotion/server" "^11.4.0" -"@leafygreen-ui/empty-state@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/empty-state/-/empty-state-1.0.0.tgz#e0650974dd69d1ad5757a5a834e4945da9811e90" - integrity sha512-sKLLI07s/f9vK4rcDCC2sPuGQewp8RTN0qLj42r97qAvdOrRcPqxcher8cwWI7fmAnfJ++2c+ejWv34HiZ6QiA== - dependencies: - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.3.0" - "@leafygreen-ui/palette" "^4.0.2" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/expandable-card@^3.0.7": - version "3.0.7" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/expandable-card/-/expandable-card-3.0.7.tgz#db3b10c2c2c06917f27aefabf62bf24bf1886ca9" - integrity sha512-WoiT31kNxBPCLSbPvo5NTlsQNhGQcDExb/ti/n66dsx3OazzapKALeLEdxnJTBk3hXi9YHmnby1FUds9u8kAxA== - dependencies: - "@leafygreen-ui/card" "^9.0.6" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/empty-state@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/empty-state/-/empty-state-1.0.1.tgz#60c062e9413b3c285efc26571c3818016cc6640d" + integrity sha512-dXOPItiXMZJPBtZ5ZrmXPHRB6ZeH77FDPSmdmlNGR4ulNPCLl0tTGt8uYCSJ5TGpefWxj5vY3Crf5/StfiXDJQ== + dependencies: + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/expandable-card@^3.0.8": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/expandable-card/-/expandable-card-3.0.8.tgz#d76bd88068290aa8bac387c4cffaf1e0ac37c1d0" + integrity sha512-QcqxI0xkTn/pA+xEbZ2Pryfb/0A9+XupzK568Tk25o8eiA/Ts6TV7abRRTduS14yv9UzRlkGusH+j8qJokRamQ== + dependencies: + "@leafygreen-ui/card" "^9.0.7" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" react-transition-group "^4.4.1" -"@leafygreen-ui/form-footer@^3.0.4": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/form-footer/-/form-footer-3.0.4.tgz#86d87923e9f73afe6f45802b0cfafa33e30ac3ed" - integrity sha512-r5vl8cQQrUWR7sixLxw9FxSoUdX/cjTLHjiRGKsZwdquAuNSN86qq5ShpYV6C/7mRz5QAMbis/FMWYlbEEnZog== - dependencies: - "@leafygreen-ui/banner" "^7.0.4" - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" +"@leafygreen-ui/form-footer@^3.0.5": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/form-footer/-/form-footer-3.0.5.tgz#450546c27c16683b1f1181f89e3b2080415195b5" + integrity sha512-sf4YtSzD8t+Hr15Aojhj+n0WLiWvW2mUUuk27AuR5lVibdxpFd7Bb2SOMiHAQ7+1DAS2/v5Uh4j/LtfsPO7qkQ== + dependencies: + "@leafygreen-ui/banner" "^7.0.5" + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" polished "^4.2.2" -"@leafygreen-ui/guide-cue@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/guide-cue/-/guide-cue-4.0.2.tgz#3553abb0fc5dba8641f1ad367824339f6381a6c0" - integrity sha512-0eYgRuD75pvYfByov+vi5KWg0wB9DbsWDMfKduWwwhtaR06lKFxRITC8VQ6BiSbgA0dZ0+UMeBoaHCaGOyzkVg== - dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/popover" "^11.0.4" - "@leafygreen-ui/tooltip" "^9.1.6" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/guide-cue@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/guide-cue/-/guide-cue-4.0.3.tgz#59a2faf0c88d36682969d31276ca7dffcc54719f" + integrity sha512-i8G5/gyYLsYcN/ssu+vn7uKc7B/esyfl43xVVNoxKyCrCLiYBYpkUl+OaHZFUBNH04APX7BKfsYwXA1ISWfNUg== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/popover" "^11.0.7" + "@leafygreen-ui/tooltip" "^9.1.7" + "@leafygreen-ui/typography" "^16.2.1" focus-trap-react "^10.0.0" polished "^4.2.2" -"@leafygreen-ui/hooks@^7.3.3", "@leafygreen-ui/hooks@^7.5.0", "@leafygreen-ui/hooks@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/hooks/-/hooks-7.6.0.tgz#bf53b95706f27d81d055be3bac19a7f10d48b36e" - integrity sha512-/VFuuaeaNq0XHC0g6R2IpESKQwa7VUK3I6fEH+nh1QL1unu7t+j0Yuah8cWtqYqv6pXPy+IXw7Elw4JwFUTDOg== +"@leafygreen-ui/hooks@^7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/hooks/-/hooks-7.7.1.tgz#98d65bee14ef538723fdf2d632725d2f88f8eab7" + integrity sha512-P4uGzI0IBUX2g4MRY2FX6TPrMOLuh2/bOrq9TiWQgj/vhDPbAQt+62F7p3b3XL+Axywtqg6dIODNWW+WfJrXSA== dependencies: lodash "^4.17.21" -"@leafygreen-ui/hooks@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/hooks/-/hooks-7.7.0.tgz#7cbcbc4286bb0a961724ddcb7d45a17641bc9776" - integrity sha512-Orf0UODtNab2MXFfMfQ6kySQft8s8uHoq69thh/EOsyaFTLh2S+wEkpIyFMEKc6TUeID639NBMASD3woTnUhgw== - dependencies: +"@leafygreen-ui/icon-button@^15.0.9": + version "15.0.9" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.9.tgz#6e9a655994d03f49430a502179e59ad2e212fa92" + integrity sha512-OJ3K53wIv2302ks9XpJ9jLLlsZX/go+8o2iHtH2JT8YgHjpgz5ZsiVGTHeehzynr3H/wvj/d7VozhqcAr03ZKQ== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/box" "^3.1.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + +"@leafygreen-ui/icon@^11.13.1": + version "11.13.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.13.1.tgz#c6d028367feaf02ec907314a01dbdc780a674f2a" + integrity sha512-yxxSMzq99W8TYjH2PEKcqa6KuMyIk8tKm1CwZdEexIYC44m81f/HjZrSIPq5CEogHFEFns1wHp6dOPHIYsC23Q== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" lodash "^4.17.21" -"@leafygreen-ui/icon-button@^15.0.7": - version "15.0.7" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.7.tgz#4ea946b5c1dd00591bae7204165d438eb3869d68" - integrity sha512-KBF7m85FLW6IXy2MfuaoF0Lt78BYi+jlzj8U46tGso+gnwsZcWVDZQZNVtKOM7ARbEus6YEKJ45sqWu4vmmSkg== - dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - -"@leafygreen-ui/icon-button@^15.0.8": - version "15.0.8" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon-button/-/icon-button-15.0.8.tgz#64a9450cbfc988934f92ba663f7c664d355f4112" - integrity sha512-kEzoIiZd6+aX/fFwe1WeMosAiyszYDlGeBMi00vnuzc6eoSUbIZTWfu7nK55HH5Ob0XcLdVgJJsbpzTGVRrs/g== - dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/tokens" "^2.0.1" - -"@leafygreen-ui/icon@^11.12.5": - version "11.12.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.12.5.tgz#cd35a3511a7e29931ff2e800f6b33ea12e8417f8" - integrity sha512-3ICFu5XibuWlUlkxRT2eCaw1wr02oOEqCb/Bn93MG3xO9tnqJRAeclNs40ZovbnFXv9mxa0XWfFrmGWEmxpmvQ== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - -"@leafygreen-ui/icon@^11.12.6": - version "11.12.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.12.6.tgz#9dca03e4a48f821a7f757a25dc401d5fc9396440" - integrity sha512-0eVzQXNTXCspt+3PDgRA0IvUN551ibdsW1GxcyEx5AwnecKhDP5DVgMwuooGO3xRnzGcKP22t4klD0SLBdcRRQ== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - -"@leafygreen-ui/icon@^11.12.7": - version "11.12.7" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.12.7.tgz#1d0cde6d63d2e29b69f35c667a636aad0f10c10b" - integrity sha512-XjmD5FXHgyDzUfAik+Ox0kAfRdc0lRImDbl+8DlYfbGdz1lO8AFTSchnLzr766ESF1RHTUImsHWd/0YAHvwOaw== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - lodash "^4.17.21" - -"@leafygreen-ui/icon@^11.13.0": - version "11.13.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/icon/-/icon-11.13.0.tgz#9c376accb84e8c8a16eecfb6e3dc4697c0747617" - integrity sha512-wMHrAZVwED/1Fy8qMvLWXJFhaJMnOVgxTVhtMtDoa55PmZEhQYHP4qKEy9bWMWolbcobdX7SyUIcUcU/tLQ/Pw== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - lodash "^4.17.21" - -"@leafygreen-ui/inline-definition@^6.0.3": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/inline-definition/-/inline-definition-6.0.3.tgz#b5db9baf441d536ff78f129b8df41ea25d6f9ed3" - integrity sha512-LjNpuUR/4Lx93qAaTpHUhcRye1jFRi5JM9X7Ce776rZn8E618R2nBv5y4fI3LjlYo8lc0VQvQURn59ADp1F2lQ== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tooltip" "^9.1.6" - -"@leafygreen-ui/input-option@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/input-option/-/input-option-1.0.1.tgz#11a31f4e96a9d0914d7c87fc637d1e5ec83be20a" - integrity sha512-Q1+SdVHo8IoRpd+F6/D5gNY/9D+pShP84/LfojrHA81RceD1+VPTDCfS3+8Hdee8kmsEBOw6Z0RUE6CD1Kl+3w== +"@leafygreen-ui/inline-definition@^6.0.4": + version "6.0.4" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/inline-definition/-/inline-definition-6.0.4.tgz#d9bca247bd62bb76ab0da175ae3ff9a1747898f0" + integrity sha512-FUBRpqrMZOh2YZNy0NotIdmryLpMN5suppcTGDM2QIrpgKBxCGJB+GJpekK/ZU5UnONeOqMH+f6o0VwN/Vpwjw== dependencies: - "@leafygreen-ui/a11y" "^1.3.4" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/polymorphic" "^1.2.0" - "@leafygreen-ui/tokens" "^2.0.1" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tooltip" "^9.1.7" -"@leafygreen-ui/leafygreen-provider@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/leafygreen-provider/-/leafygreen-provider-3.1.1.tgz#97f9a2105eccdf03221c5859c4aa819cbb5334a9" - integrity sha512-S2FbJ1u/6BgEK05AStYAhSPOb9MXGZArPc7/j/7SyBlm3OJI26g+lueY5YvI04qDEGX6hgs+CoA+0MYK19loIA== - dependencies: - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/lib" "^10.1.0" - -"@leafygreen-ui/lib@^10.0.0", "@leafygreen-ui/lib@^10.1.0", "@leafygreen-ui/lib@^10.2.1": - version "10.2.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/lib/-/lib-10.2.1.tgz#cd83f3865f14785f29cd3392a8b96f52cbc94f5f" - integrity sha512-2fat+tej+QVSMMed7c/jZZOYBodrs57VKBC5OkqcSr68VWbKpUdrb7yKfK2Cx5VNY1cnbYYpRNFa9VwTfCW/rw== +"@leafygreen-ui/input-option@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/input-option/-/input-option-1.0.2.tgz#6654fd406590e3e38efe651b7baf33b63fb68133" + integrity sha512-xEFlzyB23V8h2q144KLk4nXoUjIhEA28Z9jY356IDHxXGh7fB3uEoIdLK7PVCDNku+zgyoddRQ/Nhr9gfEUPoQ== dependencies: - lodash "^4.17.21" + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/polymorphic" "^1.3.1" + "@leafygreen-ui/tokens" "^2.0.2" -"@leafygreen-ui/lib@^10.2.2": - version "10.2.2" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/lib/-/lib-10.2.2.tgz#ce9f647930616f5fbfaf8ad7511c564e79b72bb9" - integrity sha512-VuG/O3N7s/dVa2yntLdVUGhsDEWHPp88SYWAbhEC54ZbGT6bviStwloJs65d0rOqwXdoLss+KWRZ3DFu1RrDLQ== +"@leafygreen-ui/leafygreen-provider@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/leafygreen-provider/-/leafygreen-provider-3.1.2.tgz#35ed43c3741dd9828c76520f968f2dd91384a0f9" + integrity sha512-jsYNaXjVAeYuFvQtlKAedvKNTERiIWWI0LbR17u2Lg9ufk/4zrYLyoUyGk4tIzD4FTGtQrJPk3D9pL6ea2D4iA== dependencies: - lodash "^4.17.21" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/lib" "^10.3.2" -"@leafygreen-ui/lib@^10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/lib/-/lib-10.3.0.tgz#ec87d9665bd52bad64bedca6e0fef324e47a109a" - integrity sha512-nCNU25lbOGGfJJAkpdipIAwitD0h2rOZiHgCfERlwHsL4lr8K29qrPYKKEiE9JxbW8EBkoP2zJseY0RMd6Jq8A== +"@leafygreen-ui/lib@^10.3.2": + version "10.3.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/lib/-/lib-10.3.2.tgz#48a64f0bb9c7905a9d7bec3a860978a49b81e2be" + integrity sha512-YfxSDU+NyTtt5CsLCwtkRbHj2XsFDxmhgcGkC9OV2DPTbqhc6dLOgboQtYKQePfck928xns8EKdRX1EmDDHGWg== dependencies: + "@storybook/csf" "^0.0.2-next.10" lodash "^4.17.21" prop-types "^15.7.2" -"@leafygreen-ui/lib@^10.3.1": - version "10.3.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/lib/-/lib-10.3.1.tgz#ac339c7f2791ee2a95206a763ed944e4134ab863" - integrity sha512-xwXqisBR8Gp9BcwYSudOvNBTEh52IHCOTnKECjlYBc3X6n3doz8vNW2km2l1DcwGodjqAYsTjiJAp8CgI8QZKw== +"@leafygreen-ui/logo@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/logo/-/logo-8.0.2.tgz#94406e494dc0153923fb7a56b3d536106b09172e" + integrity sha512-E0gzHmyPQj20lCZZn14lQCGWRcgunsIImJMDfvTB8msRskOUlvacKmq4O7X0O8DHf73b+srqLnyo0VyPEJx4RQ== dependencies: - "@storybook/csf" "^0.0.2-next.10" - lodash "^4.17.21" - prop-types "^15.7.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" -"@leafygreen-ui/logo@^8.0.1": - version "8.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/logo/-/logo-8.0.1.tgz#72c15ff7783112f6f588386dae4b92a730dcdf40" - integrity sha512-iIKvp6f0nGhUvoXUPlNp63YCAj9o+dTcJhb023mprJEjiscVc/4EF2HI84nJHmuAS9KxOPLyG0CBt1U034kIUg== +"@leafygreen-ui/marketing-modal@^4.0.6": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/marketing-modal/-/marketing-modal-4.0.6.tgz#12303b0485b41eb07a2dc4699431ae19b4ceef84" + integrity sha512-zEY131NCR6DauPdYp/cByrjTFwwuct31dT5urGPQLpi3yB1+l3t6cDucxwhw2fmPF5PjrbS0BhOFj2ke3LZaIQ== dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/modal" "^14.0.5" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" -"@leafygreen-ui/marketing-modal@^4.0.5": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/marketing-modal/-/marketing-modal-4.0.5.tgz#ad7577bf2fc0998daeff02401138b6478733d99d" - integrity sha512-T/qqgDtl4sF1z9TinsYrIUVaWWYnNe/qgojD1IWXWah5KeJsfm1RJkAlnxgN7wU0uTxGaa8SQts0R3a8zS3kFg== - dependencies: - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/modal" "^14.0.3" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/menu@^20.0.1": - version "20.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/menu/-/menu-20.0.1.tgz#73384d4a49c5268a31cf09ff4355a5022de3319e" - integrity sha512-mZNj/QTk0okbTe9l6nupbBpzEIiDomwuSfUcHQzqM4AM1ZzpIRQgaTFAFYsWQ1lTNHxNwp+95ThgMREz3Xw33A== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/polymorphic" "^1.2.0" - "@leafygreen-ui/popover" "^11.0.4" - "@leafygreen-ui/tokens" "^2.0.1" +"@leafygreen-ui/menu@^20.0.2": + version "20.0.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/menu/-/menu-20.0.2.tgz#1f477f0e8e5de679a6bd1f307abc8062bb2910ab" + integrity sha512-NY9KgS79uD+6IPEH3u+QiMcywxQCaPJv4seeYZPSdfqYiHskv22SGegzy9T5oAxVU6xOOCxqJL1A2LSZu0ZxuA== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/polymorphic" "^1.3.1" + "@leafygreen-ui/popover" "^11.0.7" + "@leafygreen-ui/tokens" "^2.0.2" lodash "^4.17.21" react-transition-group "^4.4.1" -"@leafygreen-ui/modal@^14.0.3": - version "14.0.3" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/modal/-/modal-14.0.3.tgz#2ba5f1a52e729ce84ffc0b874ed917c12eb63e84" - integrity sha512-DpyFSYRO+4TchwVlqe/hSoNoD2A2T/ckeJw7VW/wq6N8gncbvFG3YIv7NWWNfj3tSNcW2dybBt9SoSJonEuIMw== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/portal" "^4.1.0" - "@leafygreen-ui/tokens" "^2.0.1" - facepaint "^1.2.1" +"@leafygreen-ui/modal@^14.0.5": + version "14.0.5" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/modal/-/modal-14.0.5.tgz#ce5553411f273ed2262864bc17b0a3cb8b043631" + integrity sha512-7zrBZSdf4P8OWeUxxFRLgSZhh/V7REbkXJrpqb/JK2fclU161ZeT2SLLdFKfnjQqf4n3eOVrlDsxy8xwwZ769Q== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/portal" "^4.1.1" + "@leafygreen-ui/tokens" "^2.0.2" focus-trap-react "^8.10.0" polished "^4.2.2" prop-types "^15.8.1" react-transition-group "^4.4.1" -"@leafygreen-ui/modal@^14.0.4": - version "14.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/modal/-/modal-14.0.4.tgz#42fa6db2e846dba16d4348ed5dcd0b487dcbf251" - integrity sha512-qun2voSrbXeVdD/odCW9/MZCrsWRU/zvuSg1kj5fwRQDUdEsu7G8YRl2Y3pt9plhQJu9PrOBwWr+t7e80WMCIA== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/icon-button" "^15.0.8" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/portal" "^4.1.0" - "@leafygreen-ui/tokens" "^2.0.1" - focus-trap-react "^8.10.0" - polished "^4.2.2" - prop-types "^15.8.1" - react-transition-group "^4.4.1" - -"@leafygreen-ui/number-input@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/number-input/-/number-input-1.0.0.tgz#92c218198286f4582233c08e6262d8970412a900" - integrity sha512-geZ2kXw8q8SYe2ClBn2/f45gcC4xd/JLM8lR4nXnTYWkDBXt5OtbBgCGjEhz3MW+b+1ijOAKz9zCaFYLTs6lMQ== - dependencies: - "@leafygreen-ui/a11y" "^1.4.1" - "@leafygreen-ui/button" "^20.0.3" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/popover" "^11.0.5" - "@leafygreen-ui/select" "^10.3.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/tooltip" "^9.1.5" - "@leafygreen-ui/typography" "^16.2.0" +"@leafygreen-ui/number-input@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/number-input/-/number-input-1.0.1.tgz#b3bfde512c71d629260731e60c26fca5290532bf" + integrity sha512-qmHQaozJMDykoG4kwCEBcrrWF4mSEDHljq/NTjNNCXsrQXn4uyV5UgpxehJD3vezz7/esobyTaH3sO7BGm2awA== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/popover" "^11.0.7" + "@leafygreen-ui/select" "^10.3.1" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/tooltip" "^9.1.7" + "@leafygreen-ui/typography" "^16.2.1" lodash "^4.17.21" -"@leafygreen-ui/pagination@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/pagination/-/pagination-1.0.4.tgz#5fa99acb005c452c2df9beca1f1987f6024c408f" - integrity sha512-cEDajv5mvSeA1+c7wd9sYo16GgiSu3zuSCLvFFqJsn6sM7Ej07da0X49w4tKk/BteG1C44bsXMg1h5MspzJifg== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/icon-button" "^15.0.8" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/select" "^10.3.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.2.0" +"@leafygreen-ui/pagination@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/pagination/-/pagination-1.0.5.tgz#9a1edd85e5250a6fd950c10b1d886fab25033776" + integrity sha512-1lNhwh1xOLqZ/HiiZMTGCugQORnaMxnsmp70Qvi2FsWTqPQXtFByx4n86bvZZGMG+Kfu40ZG9JPeRJ+HHCDCNw== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/select" "^10.3.1" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" lodash "^4.17.21" -"@leafygreen-ui/palette@^3.4.7": - version "3.4.7" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/palette/-/palette-3.4.7.tgz#7c4a619ca0cb7a9785326dcb67e012369b3d92d6" - integrity sha512-AsvPlbvF7CERiZbAQR8hy3lAJ2/rieXI3cO0jsOwV8ztDqYNotKAdLujyr/NviudrRUenYiXrLizIKVlSPUMuA== - -"@leafygreen-ui/palette@^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/palette/-/palette-4.0.0.tgz#a04ee5bc511dd4db15495d514b9f002cf449d7b8" - integrity sha512-hZBf1tqLf9IF3uyRSiyVbPGmvdDbqAonYUrDa+9CPTopZNqXtga6zxkkjxsbVzZDjs1IL5tkW/A0sMQlMWzT3Q== - -"@leafygreen-ui/palette@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/palette/-/palette-4.0.1.tgz#17b787289ebb1d93ecfa25d7922cc72d3a061be2" - integrity sha512-MQYtjFgMcagKIdhtqkasRzhJ4Px7r+fE1AySGSU45RasQmeaJcBss9HziZ1QESMeuDPGH+uCXcoxNQjU5iy4vg== - -"@leafygreen-ui/palette@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/palette/-/palette-4.0.2.tgz#a20d1abd66389ead277c801f0573c0de9df2851b" - integrity sha512-M2hNpbxbB9+pRVI9kBAGpdVGbMPc90725FCWx5Wbyb6TnPpaex34fHyLa0yx1dRcxZUHgdf9xKEnE9Mw7Q6FKw== +"@leafygreen-ui/palette@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/palette/-/palette-4.0.3.tgz#3fad7cd97b7fd63b546898b0ab1dc390949d3ea7" + integrity sha512-x4FLi2y97XQHw+gnJQ+K4D43ko9Cyzt8yHQLXqQWfINePfCie+VkqwVIhi/zivmEH6tS57TiPmuLKWgjBrVgxw== -"@leafygreen-ui/password-input@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/password-input/-/password-input-1.0.2.tgz#814b6d2ca260e65ba75310e6fa04d9f5c06525be" - integrity sha512-7cVEtWEFO/XaffAYDa9sUCKQ6CEOteoTCO8hP0lRI6wO1wCR4OoCag8guixo5yJyc6x8xlO1RE+fi2IMDqFnqg== - dependencies: - "@leafygreen-ui/a11y" "^1.4.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/icon-button" "^15.0.8" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.2.0" - -"@leafygreen-ui/pipeline@^5.0.5": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/pipeline/-/pipeline-5.0.5.tgz#3bad4341537ee53bd18bbb8e448bd47a82537a64" - integrity sha512-XleT3kdv35vB4Z7V0WbeoGVmuUOdIFC+RdDletBEp9euCzTKyO1a0WFw6cd+qIkS+p00LechKsv+z5tlorSJwQ== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.3.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/tooltip" "^9.1.6" +"@leafygreen-ui/password-input@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/password-input/-/password-input-1.0.3.tgz#c4eb6a8c424806434c940d421e45cf6bf2e7eb29" + integrity sha512-CHuAzw49rHTFoGOBmLBdzOgKbGtG98qSfB7WqXyQJDQP3pVT7p7/6qJ0JnjYSefbZ+Uhn4v9iVkzhG9i6m3/XQ== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/pipeline@^5.0.6": + version "5.0.6" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/pipeline/-/pipeline-5.0.6.tgz#9b3c1d60b471953207f164e40a2f175280befc6c" + integrity sha512-yv5XoJW2W/xeCBNihUHYCxHD9ne/E1vv83wKylVX818AERb10C/kZWxqXzgU0BfupQYFAduVWSn4ZnSTShUnHQ== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/tooltip" "^9.1.7" react-intersection-observer "^8.25.1" -"@leafygreen-ui/polymorphic@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/polymorphic/-/polymorphic-1.2.0.tgz#2276a28a326caa47c630026e9ee2ba2abcbaf88e" - integrity sha512-PWNzW7Kfc1CU3qxAhIjR1K91oV2A0TkVAzvfChMYoMc9czv6DJBWUEbjcPzV7r9QHSCFDncaV1vyT/xoWGnlqA== - -"@leafygreen-ui/polymorphic@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/polymorphic/-/polymorphic-1.3.0.tgz#d4ec0f44be9d1b190f514e8d963810443c666baa" - integrity sha512-XTKbrevrOQHUp1gMP3/sqh92vYYGJ8cz5c7EiGCTJZIegrejwuxQe2lGxW2UEUJk2PpkZDvgPwkKmuqvEayu2Q== - -"@leafygreen-ui/popover@^11.0.1", "@leafygreen-ui/popover@^11.0.4", "@leafygreen-ui/popover@^11.0.5": - version "11.0.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/popover/-/popover-11.0.5.tgz#1f3676fbe768a40ccb5b90559d3f63f6378609d2" - integrity sha512-br8+fh9ow4JSExW1jobh94n8LKTcLFETnSIhwo+z+gaWecLHBH/5N+wh0GXA4JWjd6ZBaM73mu/BWfCCY5Mmhg== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.3.3" - "@leafygreen-ui/lib" "^10.1.0" - "@leafygreen-ui/portal" "^4.0.9" - "@leafygreen-ui/tokens" "^2.0.0" - react-transition-group "^4.4.1" - -"@leafygreen-ui/popover@^11.0.6": - version "11.0.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/popover/-/popover-11.0.6.tgz#341ef8f3efa24bead7cb952eb1ee5d8605f6bf57" - integrity sha512-wBSAIYX7pRQUPq3yLW+UGgvGz6hpRalSfWRomV/nwK9k/InTC40uAxsv/cbPZBC04Cb0ykbFzX7/kDmeOjCK6g== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/portal" "^4.1.0" - "@leafygreen-ui/tokens" "^2.0.1" +"@leafygreen-ui/polymorphic@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/polymorphic/-/polymorphic-1.3.1.tgz#c1e6adb284078263ee1b4fc594c786ace0dc88bc" + integrity sha512-guybioSUs6Xa4kMs65iQwTlUgZ08N9ZvzvjOxUqK5lROVLauAUKt/Sn6tVTgzRpepDHrOUBkt5LQi0o/i4JQcQ== + +"@leafygreen-ui/popover@^11.0.7": + version "11.0.7" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/popover/-/popover-11.0.7.tgz#a01d4f8339f3b63e7cb1d86d91ff65edb391ea57" + integrity sha512-K6OgkQuB44QaHgVkKORHl7htpiiYN+Cb/910vpCujq5kLmRMOXf3NGjoz9s082Bx9rCUL/notPiND5Zokmv0Qg== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/portal" "^4.1.1" + "@leafygreen-ui/tokens" "^2.0.2" react-transition-group "^4.4.1" -"@leafygreen-ui/portal@^4.0.9": - version "4.0.9" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/portal/-/portal-4.0.9.tgz#e5127d74b8aca5f7cc31ec0a776389ead057ab80" - integrity sha512-pYFMGUvZSX0k6PgRJY1EKXqXZ6ZVNrCslcOzD1JURnHvqO+SalsAqGVjajhniDZIHW/n3jOnw9EtmT33J97NZQ== - dependencies: - "@leafygreen-ui/hooks" "^7.3.3" - "@leafygreen-ui/lib" "^10.0.0" - -"@leafygreen-ui/portal@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/portal/-/portal-4.1.0.tgz#6cd9c6a754754a85951bb3f174190f4ced55e4c1" - integrity sha512-zEt1s9/4WD2Q4eZqcRnOYDLhk6LcUkcAxcv22hhBMp2YPkKpbJi8lvU8TZaRFJxIdQdrQFKBYpqTsmkkazqypA== +"@leafygreen-ui/portal@^4.1.1": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/portal/-/portal-4.1.1.tgz#51f0d78b2a51cd3dbd1c1e17cc40b7eca929f0dd" + integrity sha512-33F8WRX2zvPFri66OmtdVEW2nPxMLLz2DHzcUIAdaD5Z/sH1IBJsMEkKxbf/PGsdB6A71C8SKBzgbQUJhAPQYw== dependencies: - "@leafygreen-ui/hooks" "^7.3.3" - "@leafygreen-ui/lib" "^10.2.2" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/lib" "^10.3.2" -"@leafygreen-ui/radio-box-group@^12.0.4": - version "12.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/radio-box-group/-/radio-box-group-12.0.4.tgz#36fe865d757c466bad7afd5701852ac7c8796a4d" - integrity sha512-iNXXlIP2NK9+CX314cWs54J9L8b04thU8OEDYYuIC32VNJPEBg4Dzx+o11SW/p+L/6nzw5lnGkfVzAisMq1MpQ== +"@leafygreen-ui/radio-box-group@^12.0.5": + version "12.0.5" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/radio-box-group/-/radio-box-group-12.0.5.tgz#eec62113ec8c8049ccfe065d9b90f68aab3da286" + integrity sha512-f91BzX7VHRJNyzHbztVTl/Ka9pvmNO8DP5538bI4VopfuuCw6qLH3RVVPh1D1z9JY57vId2FaoWiFuAitOyohQ== dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.3.3" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" -"@leafygreen-ui/radio-group@^10.1.0": - version "10.1.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/radio-group/-/radio-group-10.1.0.tgz#2c523386274455436e51396c80c0ec00fc4c3cf1" - integrity sha512-jQeIq4q/BzRNNxDhSL2jqnzwvo27o8aWo23Q5xBNbDoLOYpvmxnP7MxCWI+mtZhEM3deX1qWocuPkprNFtQ42Q== +"@leafygreen-ui/radio-group@^10.1.1": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/radio-group/-/radio-group-10.1.1.tgz#e391ea296dc99658a2d020dccf3542c919d86f75" + integrity sha512-Af4lf1Ntd8GkjJWUeVSpgfCBkMK3I/I+aY/gLKeiLaSCohP5V47Okj7lY48ZpWX8H9+B23npvMW6z0o1Eo9wHQ== dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" -"@leafygreen-ui/ripple@^1.1.8": - version "1.1.8" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/ripple/-/ripple-1.1.8.tgz#142fbeda7302e8d6319f271e9db36d9e122554a0" - integrity sha512-hBfth9f7VXxo6PjY79lD6xFNGMsUQ5U3Yw1tLEh/8IPHEw1fa3OOnKiofNh6ZVvenv7WzWApOOeuhGww9j3vEA== +"@leafygreen-ui/ripple@^1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/ripple/-/ripple-1.1.9.tgz#a923bebc2182fc034ce56950302794351490775e" + integrity sha512-0sAyvOu8Tva9LYgpkMTvcP9XKyrS8i57hUq+QGpT9b3s4UrfHHtDD3TaDGll08GYViIwqQDEzLQLk3H3O3we8Q== dependencies: - "@leafygreen-ui/tokens" "^2.0.0" + "@leafygreen-ui/tokens" "^2.0.2" -"@leafygreen-ui/search-input@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/search-input/-/search-input-2.0.1.tgz#1023f73b15b4fd60ce82f048838ef63b768396a2" - integrity sha512-qUYTXTrRqeCOel2Q1oZ/lC+tOd9PL4kGnjKOQS2A601DI3KLnWxkqQH0A6etcPdtNANNGYRB7U/5rKCELzMeeQ== - dependencies: - "@leafygreen-ui/a11y" "^1.3.4" - "@leafygreen-ui/emotion" "^4.0.1" - "@leafygreen-ui/hooks" "^7.6.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/icon-button" "^15.0.7" - "@leafygreen-ui/input-option" "^1.0.1" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/polymorphic" "^1.2.0" - "@leafygreen-ui/popover" "^11.0.1" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/search-input@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/search-input/-/search-input-2.0.2.tgz#7c879b40b45cff5ca78b9c61b26adc2d98cbab37" + integrity sha512-XhiDYPIBEyHCyCIVqkX8Hq3owec2P87UwfktMxXss255NrHBLGCiG95MB4XqjOPvrYXka8ZrHDRyFdN0b9S9Ww== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/input-option" "^1.0.2" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/polymorphic" "^1.3.1" + "@leafygreen-ui/popover" "^11.0.7" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" lodash "^4.17.21" polished "^4.2.2" -"@leafygreen-ui/segmented-control@^7.0.5": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/segmented-control/-/segmented-control-7.0.5.tgz#3833271d05e3c5975140824f0c3f77a4c79d84a6" - integrity sha512-ar0+gKg7ClTz+YK7TnaWq9bY0y7TazGxxR/vjPTAO/LRgg6drP/nmycU8Q3UqsL2LPJqRscKTcIPv9lSNl6eEw== - dependencies: - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.2.0" +"@leafygreen-ui/segmented-control@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/segmented-control/-/segmented-control-8.0.0.tgz#3e6ca8a3c2965984cd2d3d99a9b19299c76662d3" + integrity sha512-4frTjZyULqY5aH6VI2iTbFE75kRsJwia/CIBUJrmIv2mFThkqGKQDxQFr6k8hzHxBJgJEe9sxDLRFQNsIlwtfA== + dependencies: + "@leafygreen-ui/box" "^3.1.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" lodash "^4.17.21" polished "^4.2.2" -"@leafygreen-ui/select@^10.2.3": - version "10.2.3" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/select/-/select-10.2.3.tgz#d3213e661f97a8d79fc02f7591fa770c4d61332c" - integrity sha512-i84wzz5LBlKq9vcyW54PfITCtyOtikjBZqKY2GqLe84aQANEvSfdPxqbX+7zQJwGKqgDxmPujAYULi3ACXLp7A== - dependencies: - "@leafygreen-ui/button" "^20.0.2" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/popover" "^11.0.4" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - "@types/react-is" "^17.0.0" - lodash "^4.17.21" - polished "^4.1.3" - react-is "^17.0.1" - -"@leafygreen-ui/select@^10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/select/-/select-10.3.0.tgz#16a929d9db9873fe0f889af030e1ef4a8f3c5c64" - integrity sha512-TgX+81yN+y5lEXDRn+yOht1NgCC0B1/ShSY2v5fAVrKbKHS2fKyxkM1jlXmt1p0NtsmA736cBEzDoqx/o+Xazw== - dependencies: - "@leafygreen-ui/button" "^20.0.3" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/popover" "^11.0.4" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.2.0" +"@leafygreen-ui/select@^10.3.1": + version "10.3.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/select/-/select-10.3.1.tgz#7325af81338a40f0accefc0e455fc7a58163c897" + integrity sha512-/AQphTOPbA2ZXyv84Q+lRamwspwFq6z0q2emiKXTsAsliRIYubFmxWZ/vQOiad8FORBp7CFTD033+DtFKFEKFA== + dependencies: + "@leafygreen-ui/button" "^20.0.4" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/popover" "^11.0.7" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" "@types/react-is" "^17.0.0" lodash "^4.17.21" polished "^4.1.3" react-is "^17.0.1" -"@leafygreen-ui/side-nav@^13.0.4": - version "13.0.4" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/side-nav/-/side-nav-13.0.4.tgz#3e6f46e942fa76694dd7b82b2fc4aa2943df3310" - integrity sha512-76bFJXfQJaccKJOYZd9dbSVJrR8ag7nHwe7m5NBzqVrFXp36oXlEkh24OysRmjh2b8NCv1tFj0nlOqunbmexbQ== - dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/portal" "^4.1.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/tooltip" "^9.1.6" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/side-nav@^13.0.5": + version "13.0.5" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/side-nav/-/side-nav-13.0.5.tgz#6ff7c9b62e57a2a4405044f85063f0a22fb7576d" + integrity sha512-PoXT0yyCoNSNar528dA9al8N4m3ze5ls+SyRobbHq5Il/2Mc2VTPoW7pajnedxH8rfOdFOYjIz0gZ5MCN3pxGw== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/box" "^3.1.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/portal" "^4.1.1" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/tooltip" "^9.1.7" + "@leafygreen-ui/typography" "^16.2.1" polished "^4.2.2" react-transition-group "^4.4.5" -"@leafygreen-ui/stepper@^3.1.9": - version "3.1.9" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/stepper/-/stepper-3.1.9.tgz#83180807ac0f73e17d06b06b1ffbeb3f88dd92bb" - integrity sha512-ENkKjdN2T8tPKayWV+e09UCs/tpA96MWXvAbXmW5aj8mYxG+VXsSFzXjDap7cYqEe/K4zEKwQgAlBUid2FTDPg== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.6" - "@leafygreen-ui/lib" "^10.3.0" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/tooltip" "^9.1.6" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/table@^11.0.2": - version "11.0.2" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/table/-/table-11.0.2.tgz#3b20e1488cd5373f4017376e10538c7fa44162de" - integrity sha512-Cofc1G1MErivXdzJPF5jzr+u/iG91/YqK8mkijG9Pa4aIseYYpgPrddD270Mgcd3HTWK2Nm1bBisdm7VWQzxeQ== - dependencies: - "@leafygreen-ui/checkbox" "^12.0.0" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.13.0" - "@leafygreen-ui/icon-button" "^15.0.8" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.2" - "@leafygreen-ui/polymorphic" "^1.3.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.2.0" +"@leafygreen-ui/stepper@^3.1.10": + version "3.1.10" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/stepper/-/stepper-3.1.10.tgz#201ad1f132b9124d393083392b86883103284844" + integrity sha512-mt4EIpyHuXjPMqZw8A1ErXWvYyqfuASQBHihnIrWIjLEfptapw50iYMYwTtAm/3TTAIJu7OQ1asAx0yQbhIa9g== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/tooltip" "^9.1.7" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/table@^11.0.3": + version "11.0.3" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/table/-/table-11.0.3.tgz#56b20cec1de6459ab9bec60f043f88fd7ca45030" + integrity sha512-yL1nc3xVerwiquZVCMUEETutLyYFgKhBQp9kxtEFH39ODcWwREyyh8cozq8UbxvHVgW8WyTkCP2TsVIc71cJrw== + dependencies: + "@leafygreen-ui/checkbox" "^12.0.8" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/polymorphic" "^1.3.1" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + "@tanstack/react-table" "^8.7.3" lodash "^4.17.21" polished "^4.2.2" react-keyed-flatten-children "^1.3.0" react-transition-group "^4.4.1" react-virtual "^2.10.4" -"@leafygreen-ui/tabs@^11.0.6": - version "11.0.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/tabs/-/tabs-11.0.6.tgz#839e61f9a5eac7d57353e0acd39a230986ecbfc4" - integrity sha512-fpaPCYkofSk8Fdv5RZrwsqZ4w+FMBkLFeIB2P54j5VmLsykVOtHe+1MaPClYUzpWM/iN/3wATKziPh4gzZqHbA== - dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/box" "^3.1.1" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/portal" "^4.1.0" - "@leafygreen-ui/tokens" "^2.0.1" - -"@leafygreen-ui/text-area@^8.0.6": - version "8.0.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/text-area/-/text-area-8.0.6.tgz#41b5fb6648a6016643a50d67e11636b100a4b957" - integrity sha512-4tfv6SK5XRLivM7yw3HBkcqLr74r4cnNz+HlfRm1vm4WXrDumcMndwclPA7NpZzb8ra/kkn7ef+B7UBHm22AIA== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/text-input@^12.1.7": - version "12.1.7" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/text-input/-/text-input-12.1.7.tgz#a5ae60d28a9a4f3130796854380a3a2b5ae68e33" - integrity sha512-Nz60ixq08lwzZ2XfuSrAlwcC5lgJBqmJX54MYxnxFlqAuSDsleU5bgZlIlB+Z6IiGfS++wVMOdTikCNIW85d9Q== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" - -"@leafygreen-ui/text-input@^12.1.8": - version "12.1.8" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/text-input/-/text-input-12.1.8.tgz#aa20391720cf41b264d309e89f62c814dfd9f57b" - integrity sha512-oOwTYey9SWGr7pdWkMwEPbfNVn79HcN5IheH3Q/NCDJwerkXAcuA20T001E/52SvRh3HZJY3YZIJSDJt2ei5JQ== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.2.0" - -"@leafygreen-ui/toast@^6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/toast/-/toast-6.1.0.tgz#a73beda7b179a729eb6bfdbd154b48663bbf9ffc" - integrity sha512-tqxwaIGH8ODOgR7oa8fppLITYONVx8tiXV3AY6cu8x3xFMeTf6szBjCqIlLCVehD6PZ6NSSdUhz3cfiL1wzihA== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.7.0" - "@leafygreen-ui/icon" "^11.13.0" - "@leafygreen-ui/icon-button" "^15.0.8" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.2" - "@leafygreen-ui/portal" "^4.1.0" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.2.0" +"@leafygreen-ui/tabs@^11.0.7": + version "11.0.7" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/tabs/-/tabs-11.0.7.tgz#66680040dd216a39b750e60b349b170f77f7ae9b" + integrity sha512-561+MMIXHq/8zQO9mvaKVl+MqQCR7g6VCsaDLO5no0rJtYFwUBhBCkOeQOHnejrCyyzLX42kPFNBouviQtQHjg== + dependencies: + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/box" "^3.1.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/portal" "^4.1.1" + "@leafygreen-ui/tokens" "^2.0.2" + +"@leafygreen-ui/text-area@^8.0.7": + version "8.0.7" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/text-area/-/text-area-8.0.7.tgz#8fc568244e6dfa6bbe7d0f23def8568afb887726" + integrity sha512-elRUgSiBGPB8shcy9BZGjGt0zCb1digpan60dMbiGe4nMLcWV8ivoQP3p6UoCm058xdEtKBEfw0tE1K6sZ9X9A== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/text-input@^12.1.9": + version "12.1.9" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/text-input/-/text-input-12.1.9.tgz#82a63d65d10d9bb6a39c35e3b02a6e5cd96a42a1" + integrity sha512-izePzekqE8iWTdBiLx78noW2chsU4EyWKfIIMrLJvZKVqYRRk3gmVubEJoaJsK9qPLW8Bu9nf8BiXS/bwZp8oQ== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" + +"@leafygreen-ui/toast@^6.1.1": + version "6.1.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/toast/-/toast-6.1.1.tgz#492fe5cc9bf06f24b76090a77b5243c698e5d86a" + integrity sha512-u8MiCrDbNFFt7b1HpL+Gax0Au6iQuNZwAXWdUhnlpQ8XoMdd+G9RxoUR8yEtma0bXvW/hXHSsVqOOAE3y9Z3Eg== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/icon-button" "^15.0.9" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/portal" "^4.1.1" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" lodash "^4.17.21" polished "^4.2.2" react-transition-group "^4.4.1" -"@leafygreen-ui/toggle@^10.0.6": - version "10.0.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/toggle/-/toggle-10.0.6.tgz#af8ba5f4ca7ca60e69e74d97f2f68c30f6bfe8c2" - integrity sha512-siZl8YnJ2aRVBoXaGd5KbpUdKVrVNl70eYUo3mBJ9UTB8FaItangF7Tl8dVNWYAhTSp5lpaHhxCqbLLxlkGmwQ== +"@leafygreen-ui/toggle@^10.0.7": + version "10.0.7" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/toggle/-/toggle-10.0.7.tgz#d69a1e191535da61bbc73ea6dc8549e838757982" + integrity sha512-yOn+6hai4cG/8SyV8OccXgQcMuxMcz40bcsBqliEYQepEOQzjFC48GMag/ouhlnW0EAlqVjQrcpvwUiKeior7A== dependencies: - "@leafygreen-ui/a11y" "^1.4.0" - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/tokens" "^2.0.1" + "@leafygreen-ui/a11y" "^1.4.2" + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/tokens" "^2.0.2" -"@leafygreen-ui/tokens@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/tokens/-/tokens-2.0.0.tgz#92068a37309136eae320edd152de375743bc48c1" - integrity sha512-g4GtMp7p3ZutrVtXRK9oPjV4Uk3y3GfGJwrNm4cUvwHPbSEcSF+FNoTWS/ZCc8t2g7o42gMe/KT8zZvmq+UF/g== - dependencies: - "@leafygreen-ui/palette" "^3.4.7" - -"@leafygreen-ui/tokens@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/tokens/-/tokens-2.0.1.tgz#043ad2ef840e014f0f5e22b3513544419b5e7ff3" - integrity sha512-aKEV9AHhNpv4Tg36w3pdbec7N4ldX4ImT75U5hCdAM3Ws2fSzNKPh1+yetAnf0BnRCudjdccnOizNfCv3NMC+A== - dependencies: - "@leafygreen-ui/palette" "^4.0.0" - -"@leafygreen-ui/tooltip@^9.1.5", "@leafygreen-ui/tooltip@^9.1.6": - version "9.1.6" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/tooltip/-/tooltip-9.1.6.tgz#0a750a3d043a0049b5c74bd317aa026073e7a377" - integrity sha512-ROy8EqIqMPaZH4zuU7Abq2KrqOA0i/C+kFRXqdohkIeDHlO3j0t8NlcrhbWClbz1L1QUcCkj5G9qyvOKMobaJQ== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/hooks" "^7.5.0" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/popover" "^11.0.4" - "@leafygreen-ui/tokens" "^2.0.1" - "@leafygreen-ui/typography" "^16.1.0" +"@leafygreen-ui/tokens@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/tokens/-/tokens-2.0.2.tgz#44fd1f7f8795106c4d888dc1896ed309fab6a84b" + integrity sha512-i+cf8J+6ZCDfzWuisVTSdBpynImW5uUag9x858r0rDiOpxS/atWJbucTRLsXRBsPYudhScb7aRinfPE785EbDQ== + dependencies: + "@leafygreen-ui/palette" "^4.0.3" + +"@leafygreen-ui/tooltip@^9.1.7": + version "9.1.7" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/tooltip/-/tooltip-9.1.7.tgz#6d29f11fb33e6a0953c7482d413a2e10c4aa1ff5" + integrity sha512-sKyK/lVvcAq1foxlUU9rSfRBzK59YQbTsSNIXS13HRTZMy4ABkmQL89xC/qqO/GFz2vZUYDxzfVKOOT2P0OktQ== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/hooks" "^7.7.1" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/popover" "^11.0.7" + "@leafygreen-ui/tokens" "^2.0.2" + "@leafygreen-ui/typography" "^16.2.1" lodash "^4.17.21" polished "^4.2.2" -"@leafygreen-ui/typography@^16.1.0": - version "16.1.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/typography/-/typography-16.1.0.tgz#8e226a41963b5e0e36c1e26cdc9c25c6d0d273f4" - integrity sha512-t4SIcKEij6oq9KrAV+tALkSZfJ8J7PZnxOh6hEYYZ3Yaj3UPfY6BSxYSwZXM73myv912jDbxwtKggjRSQGXV2A== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.5" - "@leafygreen-ui/lib" "^10.2.2" - "@leafygreen-ui/palette" "^4.0.0" - "@leafygreen-ui/polymorphic" "^1.2.0" - "@leafygreen-ui/tokens" "^2.0.1" - -"@leafygreen-ui/typography@^16.2.0": - version "16.2.0" - resolved "https://registry.yarnpkg.com/@leafygreen-ui/typography/-/typography-16.2.0.tgz#a6a993197734eb1f95fc5b461a60ff419cf173fc" - integrity sha512-3OP3x5n+6fP9XUeX4Di+QJ5BW1Hlpb58e34EJEUtmZ5MH+lHWfqguG+fhynDUL7x1eWiLmUpy8isp2k3oX7J/w== - dependencies: - "@leafygreen-ui/emotion" "^4.0.3" - "@leafygreen-ui/icon" "^11.12.7" - "@leafygreen-ui/lib" "^10.3.1" - "@leafygreen-ui/palette" "^4.0.1" - "@leafygreen-ui/polymorphic" "^1.3.0" - "@leafygreen-ui/tokens" "^2.0.1" +"@leafygreen-ui/typography@^16.2.1": + version "16.2.1" + resolved "https://registry.yarnpkg.com/@leafygreen-ui/typography/-/typography-16.2.1.tgz#31850a70eb12b76082186e5706e16c37840a58ce" + integrity sha512-ctU5M/C8EU8j8uNTsPwJmzAoNklzotszphZBnJv7Hy1ZC46N5gGyQ22rHRRwaGxrcpGtGuhJC2nd8NdE0GOfnA== + dependencies: + "@leafygreen-ui/emotion" "^4.0.4" + "@leafygreen-ui/icon" "^11.13.1" + "@leafygreen-ui/lib" "^10.3.2" + "@leafygreen-ui/palette" "^4.0.3" + "@leafygreen-ui/polymorphic" "^1.3.1" + "@leafygreen-ui/tokens" "^2.0.2" "@mdx-js/loader@^2.1.0": version "2.3.0" From dc081d50aa128ae22fcaadf6af70b62e46da8156 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Tue, 25 Apr 2023 16:25:23 -0400 Subject: [PATCH 18/20] makes story code parsing more efficient --- components/pages/example/LiveExample.tsx | 24 ++++--------------- components/pages/example/useStoryCode.ts | 23 ++++++++++++++++++ .../pages/example/utils/getStoryCode.ts | 20 ++++++++++++---- package.json | 1 + yarn.lock | 2 +- 5 files changed, 44 insertions(+), 26 deletions(-) create mode 100644 components/pages/example/useStoryCode.ts diff --git a/components/pages/example/LiveExample.tsx b/components/pages/example/LiveExample.tsx index 81fff91c..67d71ea6 100644 --- a/components/pages/example/LiveExample.tsx +++ b/components/pages/example/LiveExample.tsx @@ -10,11 +10,7 @@ import LeafyGreenProvider, { } from '@leafygreen-ui/leafygreen-provider'; import { KnobRow } from './KnobRow/KnobRow'; -import { - assertCompleteContext, - isStateReady, -} from './useLiveExampleState/utils'; -import { getStoryCode } from './utils/getStoryCode'; +import { isStateReady } from './useLiveExampleState/utils'; import { CodeExample } from './CodeExample'; import { blockContainerStyle, @@ -29,7 +25,8 @@ import { LiveExampleLoading, LiveExampleNotFound, } from './LiveExampleStateComponents'; -import { LiveExampleContext, useLiveExampleState } from './useLiveExampleState'; +import { useLiveExampleState } from './useLiveExampleState'; +import { useStoryCode } from './useStoryCode'; // Use standard block flow for these packages const useBlockWrapperFor = [ @@ -50,7 +47,6 @@ export const LiveExample = ({ }) => { const prevComponentName = usePrevious(componentName); const [showCode, setShowCode] = useState(false); - const [storyCode, setCode] = useState('No code found'); const storyContainerRef = useRef(null); const storyWrapperRef = useRef(null); @@ -72,23 +68,11 @@ export const LiveExample = ({ } }, [componentName, prevComponentName, tsDoc, resetContext, setErrorState]); - /** Re-generates story example code from context */ - const regenerateStoryCode = (context: Partial) => { - const code = assertCompleteContext(context) - ? getStoryCode(context) ?? 'No code found' - : 'No code found'; - setCode(code); - }; - - /** re-generate example code when the context changes */ - useEffect(() => { - regenerateStoryCode(context); - }, [context]); + const storyCode = useStoryCode(context, showCode); /** Triggered on button click */ const handleShowCodeClick = () => { setShowCode(sc => !sc); - regenerateStoryCode(context); }; const storyWrapperStyle = context.meta?.parameters?.wrapperStyle; diff --git a/components/pages/example/useStoryCode.ts b/components/pages/example/useStoryCode.ts new file mode 100644 index 00000000..1dc348be --- /dev/null +++ b/components/pages/example/useStoryCode.ts @@ -0,0 +1,23 @@ +import { useEffect, useState } from 'react'; + +import { isStateReady } from './useLiveExampleState/utils'; +import { getStoryCode } from './utils/getStoryCode'; +import { LiveExampleContext } from './useLiveExampleState'; + +const emptyStateCode = 'No code found'; + +export const useStoryCode = ( + context: LiveExampleContext, + showCode: boolean, +) => { + const [storyCode, setCode] = useState(emptyStateCode); + + useEffect(() => { + if (showCode && isStateReady(context)) { + const code = getStoryCode(context) ?? emptyStateCode; + setCode(code); + } + }, [context, showCode]); + + return storyCode; +}; diff --git a/components/pages/example/utils/getStoryCode.ts b/components/pages/example/utils/getStoryCode.ts index f56fbf83..c1d30f3f 100644 --- a/components/pages/example/utils/getStoryCode.ts +++ b/components/pages/example/utils/getStoryCode.ts @@ -1,5 +1,6 @@ import React, { FunctionComponentElement, ReactElement } from 'react'; import reactElementToJSXString from 'react-element-to-jsx-string'; +import { isElement } from 'react-is'; import prepass from 'react-ssr-prepass'; // lets us traverse the react tree import pascalcase from 'pascalcase'; import { @@ -19,8 +20,8 @@ import { ignoreProps } from '.'; * documented default (in TSDoc). */ export function getStoryCode(context: LiveExampleContext): string | undefined { - /** Treat these packages differently. We use the entire story code, not just the component JSX */ - const packageNameDoesNotMatchComponent = ['typography']; + // Some components have highly complex props, which crashes the browser when attempting to parse them + const ignoreAllPropsForComponents = ['table']; if (assertCompleteContext(context)) { const { componentName, StoryFn, tsDoc, knobValues } = context; @@ -34,7 +35,7 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { if (componentRoot) { const TSPropsArray = getPropsArrayForComponentName(componentName, tsDoc); - return reactElementToJSXString(componentRoot, { + const storyCode = reactElementToJSXString(componentRoot, { showFunctions: true, showDefaultProps: false, useBooleanShorthandSyntax: false, @@ -44,9 +45,15 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { const tsDefault = tsProp ? getDefaultValueValue(tsProp) : null; // Filter out explicitly ignored props // and props that have the same value as the documented default - return !ignoreProps.includes(name) && value !== tsDefault; + return ( + !ignoreAllPropsForComponents.includes(componentName) && + !ignoreProps.includes(name) && + value !== tsDefault + ); }, }); + + return storyCode; } } @@ -55,6 +62,9 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { renderedStory: FunctionComponentElement, componentName: string, ) { + /** Treat these packages differently. We use the entire story code, not just the component JSX */ + const packageNameDoesNotMatchComponent = ['typography']; + let isRootSet = false; let componentRoot: ReactElement = renderedStory; @@ -82,5 +92,5 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { function isFunctionComponentElement( node: React.ReactElement, ): node is React.FunctionComponentElement> { - return typeof node === 'object' && typeof node.type === 'function'; + return isElement(node) && typeof node.type === 'function'; } diff --git a/package.json b/package.json index 4262b85d..ac57dab4 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "react-docgen-typescript": "^2.2.2", "react-dom": "^17.0.2", "react-element-to-jsx-string": "^15.0.0", + "react-is": "^18.2.0", "react-markdown": "^8.0.3", "react-ssr-prepass": "^1.5.0", "rehype-autolink-headings": "^6.1.1", diff --git a/yarn.lock b/yarn.lock index c0ef19c3..a1329d9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10440,7 +10440,7 @@ react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.6: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^18.0.0: +react-is@^18.0.0, react-is@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== From 63a2d8ee0f855c00b323fa61d62ea237292f7c92 Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Tue, 25 Apr 2023 16:39:06 -0400 Subject: [PATCH 19/20] exclude key prop --- components/pages/example/utils/getStoryCode.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/components/pages/example/utils/getStoryCode.ts b/components/pages/example/utils/getStoryCode.ts index c1d30f3f..9d58754b 100644 --- a/components/pages/example/utils/getStoryCode.ts +++ b/components/pages/example/utils/getStoryCode.ts @@ -43,13 +43,16 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { filterProps: (value, name) => { const tsProp = TSPropsArray.find(p => p.name === name); const tsDefault = tsProp ? getDefaultValueValue(tsProp) : null; + + const excludeProp = + ignoreAllPropsForComponents.includes(componentName) || + ignoreProps.includes(name) || + value === tsDefault || + name === 'key'; + // Filter out explicitly ignored props // and props that have the same value as the documented default - return ( - !ignoreAllPropsForComponents.includes(componentName) && - !ignoreProps.includes(name) && - value !== tsDefault - ); + return !excludeProp; }, }); From d4bd19be385d2d88354dd7022047d03a6392b30c Mon Sep 17 00:00:00 2001 From: Adam Thompson Date: Tue, 25 Apr 2023 17:52:11 -0400 Subject: [PATCH 20/20] adds key to ignore props --- components/pages/example/utils/getStoryCode.ts | 3 +-- components/pages/example/utils/index.ts | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/pages/example/utils/getStoryCode.ts b/components/pages/example/utils/getStoryCode.ts index 9d58754b..d317b517 100644 --- a/components/pages/example/utils/getStoryCode.ts +++ b/components/pages/example/utils/getStoryCode.ts @@ -47,8 +47,7 @@ export function getStoryCode(context: LiveExampleContext): string | undefined { const excludeProp = ignoreAllPropsForComponents.includes(componentName) || ignoreProps.includes(name) || - value === tsDefault || - name === 'key'; + value === tsDefault; // Filter out explicitly ignored props // and props that have the same value as the documented default diff --git a/components/pages/example/utils/index.ts b/components/pages/example/utils/index.ts index 6694fa1e..b6e80231 100644 --- a/components/pages/example/utils/index.ts +++ b/components/pages/example/utils/index.ts @@ -28,6 +28,7 @@ import { LiveExampleContext } from '../useLiveExampleState'; * A list of Prop names that should not appear in Knobs */ export const ignoreProps = [ + 'key', 'className', 'tooltipClassName', 'contentClassName',