diff --git a/.babelrc b/.babelrc index 600a65ec36..da61da8021 100644 --- a/.babelrc +++ b/.babelrc @@ -8,13 +8,28 @@ } ], "@babel/preset-react", - "@babel/preset-typescript" + "@babel/preset-typescript", + "@emotion/babel-preset-css-prop" ], "plugins": [ + "emotion", "@babel/plugin-transform-runtime", - ["styled-components", { "pure": true }], "@babel/plugin-proposal-class-properties", - "@babel/plugin-transform-react-jsx", - "babel-plugin-macros" + "babel-plugin-macros", + [ + "@emotion/babel-plugin-jsx-pragmatic", + { + "export": "jsx", + "import": "__cssprop", + "module": "@emotion/react" + } + ], + [ + "@babel/plugin-transform-react-jsx", + { + "pragma": "__cssprop", + "pragmaFrag": "React.Fragment" + } + ] ] } diff --git a/apps/web-console/src/hooks/use-toast/ToastStack.tsx b/apps/web-console/src/hooks/use-toast/ToastStack.tsx index 4069c45583..3a50e93892 100644 --- a/apps/web-console/src/hooks/use-toast/ToastStack.tsx +++ b/apps/web-console/src/hooks/use-toast/ToastStack.tsx @@ -1,11 +1,11 @@ import React from 'react' import type { Toast as ToastModel } from './types' -import { createGlobalStyle } from 'styled-components' +import { Global } from '@emotion/react' import { ActionToast, ConfirmToast, Toast } from '@oxide/ui' import { CSSTransition, TransitionGroup } from 'react-transition-group' -import 'twin.macro' +import { css } from 'twin.macro' -export const ToastAnimations = createGlobalStyle` +const toastAnimations = css` .toast-enter { transform: translateY(100%); opacity: 0; @@ -29,6 +29,8 @@ export const ToastAnimations = createGlobalStyle` } ` +export const ToastAnimations = () => + interface ToastStackProps { toasts: ToastModel[] onRemoveToast: (id: string) => void diff --git a/apps/web-console/src/pages/instance/InstanceCreatePage.tsx b/apps/web-console/src/pages/instance/InstanceCreatePage.tsx index edd4af42c0..b396a83c52 100644 --- a/apps/web-console/src/pages/instance/InstanceCreatePage.tsx +++ b/apps/web-console/src/pages/instance/InstanceCreatePage.tsx @@ -18,7 +18,7 @@ import { useApiMutation } from '@oxide/api' import { useBreadcrumbs } from '../../hooks' import { getServerError } from '../../util/errors' -const Heading = tw.h2`text-white text-lg mt-8 first:mt-0` +const Heading = tw.h2`text-white text-lg mt-8 first-of-type:mt-0` const Description = tw.p`text-gray-300 text-sm mt-2 max-w-prose` diff --git a/libs/css-helpers/breakpoints.ts b/libs/css-helpers/breakpoints.ts index 974ef9c545..bd0ac9571a 100644 --- a/libs/css-helpers/breakpoints.ts +++ b/libs/css-helpers/breakpoints.ts @@ -1,4 +1,4 @@ -import type { SimpleInterpolation } from 'styled-components' +import type { CSSInterpolation } from '@emotion/serialize' import { css } from 'twin.macro' export type Breakpoint = 'xs' | 'sm' | 'lg' | 'xl' | '2xl' @@ -11,7 +11,8 @@ export const breakpoints: Record = { } /** - * This helper works simlarly to the `css` helper from `styled-components` however, it first takes a breakpoint and only applies the styles for that given breakpoint. + * This helper works simlarly to the `css`, but it takes a breakpoint and only + * applies the styles for that given breakpoint. * * ## Usage * @@ -29,7 +30,7 @@ export const breakpoints: Record = { */ export const breakpoint = (breakpoint: Breakpoint) => - (first: TemplateStringsArray, ...args: SimpleInterpolation[]) => + (first: TemplateStringsArray, ...args: CSSInterpolation[]) => css` @media (min-width: ${breakpoints[breakpoint]}px) { ${css(first, ...args)} diff --git a/libs/ui/.storybook/preview.js b/libs/ui/.storybook/preview.js index 0b11216142..6c236bed10 100644 --- a/libs/ui/.storybook/preview.js +++ b/libs/ui/.storybook/preview.js @@ -2,12 +2,12 @@ import React from 'react' import { BrowserRouter as Router } from 'react-router-dom' import { DocsContainer } from '@storybook/addon-docs/blocks' import { darkUI } from './theme' -import { createGlobalStyle } from 'styled-components' +import { Global, css } from '@emotion/react' import { GlobalStyle } from '@oxide/ui' import { breakpoints } from '@oxide/css-helpers' // Bug: https://github.com/storybookjs/storybook/issues/14029 -const DocsStyleOverrides = createGlobalStyle` +const docsStyleOverrides = css` table.sbdocs tr { background-color: inherit; color: inherit; @@ -22,12 +22,19 @@ const DocsStyleOverrides = createGlobalStyle` padding-top: 1.5rem; } - h1.sbdocs, h2.sbdocs, h3.sbdocs, h4.sbdocs, h5.sbdocs, h6.sbdocs, p.sbdocs { + h1.sbdocs, + h2.sbdocs, + h3.sbdocs, + h4.sbdocs, + h5.sbdocs, + h6.sbdocs, + p.sbdocs { /* Use single direction margins only */ margin: 1.25em 0 0 0 !important; } - a, a:link { + a, + a:link { text-decoration: underline !important; } @@ -51,7 +58,7 @@ export const parameters = { container: ({ children, context }) => ( - + {children} ), diff --git a/libs/ui/src/global-styles/index.tsx b/libs/ui/src/global-styles/index.tsx index a2f7a42937..df1a432528 100644 --- a/libs/ui/src/global-styles/index.tsx +++ b/libs/ui/src/global-styles/index.tsx @@ -1,10 +1,10 @@ import React from 'react' -import { createGlobalStyle } from 'styled-components' -import tw, { GlobalStyles as BaseStyles } from 'twin.macro' +import { Global } from '@emotion/react' +import tw, { css, GlobalStyles as BaseStyles } from 'twin.macro' import './fonts.css' -const CustomStyles = createGlobalStyle` +const customStyles = css` body { ${tw`box-border bg-blue-gray-900 text-gray-300 font-mono font-normal`} } @@ -31,10 +31,11 @@ const CustomStyles = createGlobalStyle` } // https://github.com/ben-rogerson/twin.macro/blob/16911c0/src/config/preflightStyles.js#L232 - button, [role="button"] { + button, + [role='button'] { cursor: auto; } - + // https://github.com/ben-rogerson/twin.macro/blob/16911c0/src/config/preflightStyles.js#L274-L284 svg { display: inline; @@ -45,6 +46,6 @@ const CustomStyles = createGlobalStyle` export const GlobalStyle = () => ( <> - + ) diff --git a/libs/ui/src/lib/breadcrumbs/Breadcrumbs.tsx b/libs/ui/src/lib/breadcrumbs/Breadcrumbs.tsx index ee4eb31f6f..300848a17c 100644 --- a/libs/ui/src/lib/breadcrumbs/Breadcrumbs.tsx +++ b/libs/ui/src/lib/breadcrumbs/Breadcrumbs.tsx @@ -8,7 +8,7 @@ export interface BreadcrumbsProps { data: Crumb[] } -const Item = tw.li`inline-block not-first:before:(content['/'] mx-2 text-yellow-500)` +const Item = tw.li`inline-block not-first-of-type:before:(content['/'] mx-2 text-yellow-500)` const Link_ = tw(Link)`visited:text-gray-400 hover:text-green-500` diff --git a/libs/ui/src/lib/dropdown/Dropdown.tsx b/libs/ui/src/lib/dropdown/Dropdown.tsx index fffe7b4f73..2135d0f4d8 100644 --- a/libs/ui/src/lib/dropdown/Dropdown.tsx +++ b/libs/ui/src/lib/dropdown/Dropdown.tsx @@ -113,7 +113,7 @@ const StyledOption = styled.li<{ size: SizeType; isHighlighted: boolean }>` box-shadow: 0 0 0 1px ${color('green500')}; } - &:first-child { + &:first-of-type { margin-top: ${spacing(2)}; } diff --git a/libs/ui/src/lib/icon/Icon.tsx b/libs/ui/src/lib/icon/Icon.tsx index 75920f1eac..e6311e407d 100644 --- a/libs/ui/src/lib/icon/Icon.tsx +++ b/libs/ui/src/lib/icon/Icon.tsx @@ -5,13 +5,7 @@ import type { IconComponentProps } from './IconComponent' import { IconComponent } from './IconComponent' export interface IconProps extends IconComponentProps { - /** - * Add optional margin - */ align?: 'left' | 'right' - /** - * Set the color using a theme color ("green500") - */ color?: Color /** * Amount to rotate the SVG icon (useful for "chevron"); expects a number followed by an [angle](https://developer.mozilla.org/en-US/docs/Web/CSS/angle) unit: `90deg`, `0.5turn` @@ -19,12 +13,12 @@ export interface IconProps extends IconComponentProps { rotate?: string } -export const Icon = styled(IconComponent).withConfig({ - shouldForwardProp: (prop) => { - // Do not pass 'align', 'color', 'rotate' (etc) props to the DOM - // but do pass 'svgProps' to SvgIcon - return ['className', 'svgProps', 'name'].includes(prop) - }, +const propsToForward: PropertyKey[] = ['className', 'svgProps', 'name'] + +// Do not pass 'align', 'color', 'rotate' (etc) props to the DOM +// but do pass 'svgProps' to SvgIcon +export const Icon = styled(IconComponent, { + shouldForwardProp: (prop) => propsToForward.includes(prop), })` align-self: center; /* displays correct height for Safari */ flex-shrink: 0; @@ -35,14 +29,9 @@ export const Icon = styled(IconComponent).withConfig({ fill: ${({ color }) => (color ? getColor(color) : 'currentColor')}; ${({ rotate }) => rotate && `transform: rotate(${rotate})`}; - ${({ align }) => { - if (align === 'left') { - return `margin-right: 0.5em;` - } - if (align === 'right') { - return `margin-left: 0.5em;` - } - }} + + ${({ align }) => align === 'left' && `margin-right: 0.5em;`} + ${({ align }) => align === 'right' && `margin-left: 0.5em;`} ` export default Icon diff --git a/libs/ui/src/lib/instance-details/InstanceDetails.tsx b/libs/ui/src/lib/instance-details/InstanceDetails.tsx index 8dea142b71..771d89ac4d 100644 --- a/libs/ui/src/lib/instance-details/InstanceDetails.tsx +++ b/libs/ui/src/lib/instance-details/InstanceDetails.tsx @@ -11,12 +11,9 @@ export interface InstanceDetailsProps { } const Cell = styled.span` - :before { + :not(:first-of-type):before { content: ' // '; } - :first-child:before { - content: ''; - } ` export const InstanceDetails = ({ instance }: InstanceDetailsProps) => { diff --git a/libs/ui/src/lib/table/Table.tsx b/libs/ui/src/lib/table/Table.tsx index 73772776b9..8be164c6a8 100644 --- a/libs/ui/src/lib/table/Table.tsx +++ b/libs/ui/src/lib/table/Table.tsx @@ -1,6 +1,7 @@ import React, { createContext, forwardRef, useContext } from 'react' import type { FC, ReactNode } from 'react' +import isPropValid from '@emotion/is-prop-valid' import tw, { css, styled } from 'twin.macro' import { VariableSizeList } from 'react-window' import AutoSizer from 'react-virtualized-auto-sizer' @@ -23,7 +24,6 @@ export interface TableColumn { export type TableData = Record[] export interface TableProps { - /** Allow styled-components to add custom styles */ className?: string /** * Column headers to render. Header is the title of the column for the table. Accessor is the key on the data object. @@ -86,10 +86,9 @@ const StyledRowGroup = styled.div` ` /* TODO: Table cells have the ability to be greedy with size or be restricted based on the content inside */ -const StyledCell = styled.div.withConfig({ +const StyledCell = styled('div', { // Do not pass 'width' prop to the DOM - shouldForwardProp: (prop, defaultValidatorFn) => - !['width'].includes(prop) && defaultValidatorFn(prop), + shouldForwardProp: (prop) => prop !== 'width' && isPropValid(prop), })<{ arrange?: 'fill' | 'none'; width?: number }>` display: flex; align-items: flex-start; @@ -116,7 +115,7 @@ const StyledCell = styled.div.withConfig({ } }}; - &:not(:first-child) { + &:not(:first-of-type) { box-shadow: inset 1px 0 0 ${BORDER_COLOR}; } ` diff --git a/libs/ui/src/lib/toast/Toast.tsx b/libs/ui/src/lib/toast/Toast.tsx index 5a9a49f9b4..0b042e4af1 100644 --- a/libs/ui/src/lib/toast/Toast.tsx +++ b/libs/ui/src/lib/toast/Toast.tsx @@ -107,7 +107,7 @@ export interface ConfirmToastProps extends BaseToastProps { const SplitActions = tw.div`flex flex-col border-l border-gray-300` -const SplitActionContainer = tw.div`flex flex-1 first:(border-b border-gray-300)` +const SplitActionContainer = tw.div`flex flex-1 first-of-type:(border-b border-gray-300)` export const ConfirmToast = ({ icon, diff --git a/package.json b/package.json index 41a0bcd43a..571bff8dd2 100644 --- a/package.json +++ b/package.json @@ -10,14 +10,20 @@ "test": "jest", "lint": "eslint --ext .js,.ts,.tsx,.json .", "fmt": "prettier --write .", - "storybook": "start-storybook --ci -c libs/ui/.storybook -p 4400", + "storybook": "NODE_ENV=production start-storybook --ci -c libs/ui/.storybook -p 4400", "storybook:clean": "rm -rf node_modules/.cache && yarn storybook", "typecheck": "tsc", "plop": "plop" }, "private": true, "dependencies": { + "@emotion/babel-plugin-jsx-pragmatic": "^0.1.5", + "@emotion/babel-preset-css-prop": "^11.2.0", + "@emotion/is-prop-valid": "^1.1.0", + "@emotion/react": "^11.4.0", + "@emotion/styled": "^11.3.0", "@popperjs/core": "^2.9.2", + "babel-plugin-macros": "^3.1.0", "core-js": "^3.11.0", "date-fns": "^2.21.2", "document-register-element": "1.13.1", @@ -33,7 +39,6 @@ "react-transition-group": "^4.4.1", "react-virtualized-auto-sizer": "^1.0.4", "react-window": "^1.8.6", - "styled-components": "^5.3.0", "tslib": "^2.0.0", "uuid": "^8.3.2" }, @@ -61,7 +66,6 @@ "@types/react-transition-group": "^4.4.1", "@types/react-virtualized-auto-sizer": "^1.0.0", "@types/react-window": "^1.8.2", - "@types/styled-components": "5.1.9", "@types/uuid": "^8.3.0", "@types/webpack": "^4.41.26", "@types/webpack-dev-server": "^3.11.2", @@ -69,7 +73,6 @@ "@typescript-eslint/parser": "^4.22.1", "autoprefixer": "^10.2.5", "babel-loader": "^8.2.2", - "babel-plugin-styled-components": "^1.12.0", "clean-webpack-plugin": "^3.0.0", "css-loader": "^5.1.3", "eslint": "7.10.0", @@ -99,7 +102,7 @@ }, "babelMacros": { "twin": { - "preset": "styled-components" + "preset": "emotion" } } } diff --git a/tsconfig.json b/tsconfig.json index 72dcddb35b..806d980908 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,8 @@ "skipLibCheck": true, "allowSyntheticDefaultImports": true, "strict": true, - "jsx": "react", + "jsx": "react-jsx", + "jsxImportSource": "@emotion/react", "baseUrl": ".", "noEmit": true, "paths": { diff --git a/types/twin.d.ts b/types/twin.d.ts index 2d8341030d..13ec7d6e4b 100644 --- a/types/twin.d.ts +++ b/types/twin.d.ts @@ -1,42 +1,10 @@ -// This file mostly follows the recommendations in the twin.macro example repo -// for React + styled-components. See below for the exception. -// https://github.com/ben-rogerson/twin.examples/tree/0cc4c8/react-styled-components#complete-the-typescript-setup - +// twin.d.ts import 'twin.macro' -import type styledImport from 'styled-components' -import type { css as cssImport } from 'styled-components' -// import type { CSSProp } from 'styled-components' +import type styledImport from '@emotion/styled' +import type { css as cssImport } from '@emotion/react' declare module 'twin.macro' { + // The styled and css imports const styled: typeof styledImport const css: typeof cssImport } - -declare global { - namespace JSX { - interface IntrinsicAttributes extends DOMAttributes { - as?: string | Element - } - } -} - -// The TypeScript setup instructions includes the following bit to type the css -// prop, but it conflicts with the Emotion type for the css prop which is -// polluting the global namespace (we're not the only ones with this problem: -// https://github.com/emotion-js/emotion/issues/1800). The Emotion types are -// only around because Storybook relies on them. This was apparently fixed in -// Emotion v11 (https://github.com/emotion-js/emotion/pull/1941) but all the -// Storybook stuff is still pointing at v10. Anyway, if we leave the recommended -// bit out, there's no conflict because we're falling back to Emotion's types, -// which is a little weird because we're using styled-components, but it seems -// to work fine. All this is just one more point in favor of switching to -// Emotion, which makes this problem disappear. - -// declare module 'react' { -// interface HTMLAttributes extends DOMAttributes { -// css?: CSSProp -// } -// interface SVGProps extends SVGProps { -// css?: CSSProp -// } -// } diff --git a/yarn.lock b/yarn.lock index 83d8553f76..c0bf7649bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -142,7 +142,7 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.13": +"@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw== @@ -728,7 +728,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.12.13": +"@babel/plugin-syntax-jsx@^7.12.13", "@babel/plugin-syntax-jsx@^7.2.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.13.tgz#044fb81ebad6698fe62c478875575bcbb9b70f15" integrity sha512-d4HM23Q1K7oq/SLNmG6mRt85l2csmQ0cHRaxRXjKW0YFdEXqlZ5kzFQKH5Uc3rDJECgu+yCRgPkG04Mm98R/1g== @@ -1098,7 +1098,7 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.12.17" -"@babel/plugin-transform-react-jsx@^7.12.12", "@babel/plugin-transform-react-jsx@^7.13.12": +"@babel/plugin-transform-react-jsx@^7.12.1", "@babel/plugin-transform-react-jsx@^7.12.12", "@babel/plugin-transform-react-jsx@^7.13.12": version "7.13.12" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.13.12.tgz#1df5dfaf0f4b784b43e96da6f28d630e775f68b3" integrity sha512-jcEI2UqIcpCqB5U5DRxIl0tQEProI2gcu+g8VTIqxLO5Iidojb4d77q+fwGseCvd8af/lJ9masp4QWzBXFE2xA== @@ -1577,7 +1577,7 @@ "@babel/parser" "^7.12.13" "@babel/types" "^7.12.13" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.5": +"@babel/traverse@^7.1.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.13.tgz#689f0e4b4c08587ad26622832632735fb8c4e0c0" integrity sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA== @@ -1670,6 +1670,41 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz#8f03a22a04de437254e8ce8cc84ba39689288752" integrity sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg== +"@emotion/babel-plugin-jsx-pragmatic@^0.1.5": + version "0.1.5" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-0.1.5.tgz#27debfe9c27c4d83574d509787ae553bf8a34d7e" + integrity sha512-y+3AJ0SItMDaAgGPVkQBC/S/BaqaPACkQ6MyCI2CUlrjTxKttTVfD3TMtcs7vLEcLxqzZ1xiG0vzwCXjhopawQ== + dependencies: + "@babel/plugin-syntax-jsx" "^7.2.0" + +"@emotion/babel-plugin@^11.2.0", "@emotion/babel-plugin@^11.3.0": + version "11.3.0" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz#3a16850ba04d8d9651f07f3fb674b3436a4fb9d7" + integrity sha512-UZKwBV2rADuhRp+ZOGgNWg2eYgbzKzQXfQPtJbu/PLy8onurxlNCLvxMQEvlr1/GudguPI5IU9qIY1+2z1M5bA== + dependencies: + "@babel/helper-module-imports" "^7.12.13" + "@babel/plugin-syntax-jsx" "^7.12.13" + "@babel/runtime" "^7.13.10" + "@emotion/hash" "^0.8.0" + "@emotion/memoize" "^0.7.5" + "@emotion/serialize" "^1.0.2" + babel-plugin-macros "^2.6.1" + convert-source-map "^1.5.0" + escape-string-regexp "^4.0.0" + find-root "^1.1.0" + source-map "^0.5.7" + stylis "^4.0.3" + +"@emotion/babel-preset-css-prop@^11.2.0": + version "11.2.0" + resolved "https://registry.yarnpkg.com/@emotion/babel-preset-css-prop/-/babel-preset-css-prop-11.2.0.tgz#c7e945f56b2610b438f0dc8ae5253fc55488de0e" + integrity sha512-9XLQm2eLPYTho+Cx1LQTDA1rATjoAaB4O+ds55XDvoAa+Z16Hhg8y5Vihj3C8E6+ilDM8SV5A9Z6z+yj0YIRBg== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.12.1" + "@babel/runtime" "^7.7.2" + "@emotion/babel-plugin" "^11.2.0" + "@emotion/babel-plugin-jsx-pragmatic" "^0.1.5" + "@emotion/cache@^10.0.27": version "10.0.29" resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0" @@ -1680,6 +1715,17 @@ "@emotion/utils" "0.11.3" "@emotion/weak-memoize" "0.2.5" +"@emotion/cache@^11.4.0": + version "11.4.0" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.4.0.tgz#293fc9d9a7a38b9aad8e9337e5014366c3b09ac0" + integrity sha512-Zx70bjE7LErRO9OaZrhf22Qye1y4F7iDl+ITjet0J+i+B88PrAOBkKvaAWhxsZf72tDLajwCgfCjJ2dvH77C3g== + dependencies: + "@emotion/memoize" "^0.7.4" + "@emotion/sheet" "^1.0.0" + "@emotion/utils" "^1.0.0" + "@emotion/weak-memoize" "^0.2.5" + stylis "^4.0.3" + "@emotion/core@^10.1.1": version "10.1.1" resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.1.1.tgz#c956c1365f2f2481960064bcb8c4732e5fb612c3" @@ -1701,23 +1747,48 @@ "@emotion/utils" "0.11.3" babel-plugin-emotion "^10.0.27" -"@emotion/hash@0.8.0": +"@emotion/hash@0.8.0", "@emotion/hash@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== -"@emotion/is-prop-valid@0.8.8", "@emotion/is-prop-valid@^0.8.2", "@emotion/is-prop-valid@^0.8.6", "@emotion/is-prop-valid@^0.8.8": +"@emotion/is-prop-valid@0.8.8", "@emotion/is-prop-valid@^0.8.2", "@emotion/is-prop-valid@^0.8.6": version "0.8.8" resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== dependencies: "@emotion/memoize" "0.7.4" +"@emotion/is-prop-valid@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.1.0.tgz#29ef6be1e946fb4739f9707def860f316f668cde" + integrity sha512-9RkilvXAufQHsSsjQ3PIzSns+pxuX4EW8EbGeSPjZMHuMx6z/MOzb9LpqNieQX4F3mre3NWS2+X3JNRHTQztUQ== + dependencies: + "@emotion/memoize" "^0.7.4" + "@emotion/memoize@0.7.4": version "0.7.4" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== +"@emotion/memoize@^0.7.4", "@emotion/memoize@^0.7.5": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50" + integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ== + +"@emotion/react@^11.4.0": + version "11.4.0" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.4.0.tgz#2465ad7b073a691409b88dfd96dc17097ddad9b7" + integrity sha512-4XklWsl9BdtatLoJpSjusXhpKv9YVteYKh9hPKP1Sxl+mswEFoUe0WtmtWjxEjkA51DQ2QRMCNOvKcSlCQ7ivg== + dependencies: + "@babel/runtime" "^7.13.10" + "@emotion/cache" "^11.4.0" + "@emotion/serialize" "^1.0.2" + "@emotion/sheet" "^1.0.1" + "@emotion/utils" "^1.0.0" + "@emotion/weak-memoize" "^0.2.5" + hoist-non-react-statics "^3.3.1" + "@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": version "0.11.16" resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad" @@ -1729,11 +1800,27 @@ "@emotion/utils" "0.11.3" csstype "^2.5.7" +"@emotion/serialize@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.2.tgz#77cb21a0571c9f68eb66087754a65fa97bfcd965" + integrity sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A== + dependencies: + "@emotion/hash" "^0.8.0" + "@emotion/memoize" "^0.7.4" + "@emotion/unitless" "^0.7.5" + "@emotion/utils" "^1.0.0" + csstype "^3.0.2" + "@emotion/sheet@0.9.4": version "0.9.4" resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== +"@emotion/sheet@^1.0.0", "@emotion/sheet@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.0.1.tgz#245f54abb02dfd82326e28689f34c27aa9b2a698" + integrity sha512-GbIvVMe4U+Zc+929N1V7nW6YYJtidj31lidSmdYcWozwoBIObXBnaJkKNDjZrLm9Nc0BR+ZyHNaRZxqNZbof5g== + "@emotion/styled-base@^10.0.27": version "10.0.31" resolved "https://registry.yarnpkg.com/@emotion/styled-base/-/styled-base-10.0.31.tgz#940957ee0aa15c6974adc7d494ff19765a2f742a" @@ -1752,12 +1839,23 @@ "@emotion/styled-base" "^10.0.27" babel-plugin-emotion "^10.0.27" -"@emotion/stylis@0.8.5", "@emotion/stylis@^0.8.4": +"@emotion/styled@^11.3.0": + version "11.3.0" + resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.3.0.tgz#d63ee00537dfb6ff612e31b0e915c5cf9925a207" + integrity sha512-fUoLcN3BfMiLlRhJ8CuPUMEyKkLEoM+n+UyAbnqGEsCd5IzKQ7VQFLtzpJOaCD2/VR2+1hXQTnSZXVJeiTNltA== + dependencies: + "@babel/runtime" "^7.13.10" + "@emotion/babel-plugin" "^11.3.0" + "@emotion/is-prop-valid" "^1.1.0" + "@emotion/serialize" "^1.0.2" + "@emotion/utils" "^1.0.0" + +"@emotion/stylis@0.8.5": version "0.8.5" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== -"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4": +"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.5": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== @@ -1767,7 +1865,12 @@ resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== -"@emotion/weak-memoize@0.2.5": +"@emotion/utils@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.0.0.tgz#abe06a83160b10570816c913990245813a2fd6af" + integrity sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA== + +"@emotion/weak-memoize@0.2.5", "@emotion/weak-memoize@^0.2.5": version "0.2.5" resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== @@ -3093,14 +3196,6 @@ resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.8.tgz#49348387983075705fe8f4e02fb67f7daaec4934" integrity sha512-S78QIYirQcUoo6UJZx9CSP0O2ix9IaeAXwQi26Rhr/+mg7qqPy8TzaxHSUut7eGjL8WmLccT7/MXf304WjqHcA== -"@types/hoist-non-react-statics@*": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" - integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== - dependencies: - "@types/react" "*" - hoist-non-react-statics "^3.3.0" - "@types/html-minifier-terser@^5.0.0": version "5.1.1" resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#3c9ee980f1a10d6021ae6632ca3e79ca2ec4fb50" @@ -3404,15 +3499,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== -"@types/styled-components@5.1.9": - version "5.1.9" - resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.9.tgz#00d3d84b501420521c4db727e3c195459f87a6cf" - integrity sha512-kbEG6YlwK8rucITpKEr6pA4Ho9KSQHUUOzZ9lY3va1mtcjvS3D0wDciFyHEiNHKLL/npZCKDQJqm0x44sPO9oA== - dependencies: - "@types/hoist-non-react-statics" "*" - "@types/react" "*" - csstype "^3.0.2" - "@types/tapable@*": version "2.2.2" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-2.2.2.tgz#1d324b524190954a5700d86b6328bfc57e1fda48" @@ -4449,7 +4535,7 @@ babel-plugin-jest-hoist@^26.6.2: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.8.0: +babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.6.1, babel-plugin-macros@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== @@ -4467,6 +4553,15 @@ babel-plugin-macros@^3.0.1: cosmiconfig "^7.0.0" resolve "^1.19.0" +babel-plugin-macros@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" + integrity sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== + dependencies: + "@babel/runtime" "^7.12.5" + cosmiconfig "^7.0.0" + resolve "^1.19.0" + babel-plugin-named-asset-import@^0.3.1: version "0.3.7" resolved "https://registry.yarnpkg.com/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.7.tgz#156cd55d3f1228a5765774340937afc8398067dd" @@ -4505,16 +4600,6 @@ babel-plugin-react-docgen@^4.2.1: lodash "^4.17.15" react-docgen "^5.0.0" -"babel-plugin-styled-components@>= 1.12.0", babel-plugin-styled-components@^1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz#1dec1676512177de6b827211e9eda5a30db4f9b9" - integrity sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-module-imports" "^7.0.0" - babel-plugin-syntax-jsx "^6.18.0" - lodash "^4.17.11" - babel-plugin-syntax-jsx@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -4977,11 +5062,6 @@ camelcase@^6.0.0, camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -camelize@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" - integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= - caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001181: version "1.0.30001207" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001207.tgz#364d47d35a3007e528f69adb6fecb07c2bb2cc50" @@ -5722,11 +5802,6 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" -css-color-keywords@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" - integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= - css-loader@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.6.0.tgz#2e4b2c7e6e2d27f8c8f28f61bffcd2e6c91ef645" @@ -5779,15 +5854,6 @@ css-select@^2.0.0, css-select@^2.0.2: domutils "^1.7.0" nth-check "^1.0.2" -css-to-react-native@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" - integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ== - dependencies: - camelize "^1.0.0" - css-color-keywords "^1.0.0" - postcss-value-parser "^4.0.2" - css-tree@1.0.0-alpha.37: version "1.0.0-alpha.37" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" @@ -6596,6 +6662,11 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.14.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -8035,7 +8106,7 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -11327,7 +11398,7 @@ postcss-value-parser@^3.3.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== -postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: +postcss-value-parser@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== @@ -13264,28 +13335,17 @@ style-value-types@4.1.4: hey-listen "^1.0.8" tslib "^2.1.0" -styled-components@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.3.0.tgz#e47c3d3e9ddfff539f118a3dd0fd4f8f4fb25727" - integrity sha512-bPJKwZCHjJPf/hwTJl6TbkSZg/3evha+XPEizrZUGb535jLImwDUdjTNxXqjjaASt2M4qO4AVfoHJNe3XB/tpQ== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - "@babel/traverse" "^7.4.5" - "@emotion/is-prop-valid" "^0.8.8" - "@emotion/stylis" "^0.8.4" - "@emotion/unitless" "^0.7.4" - babel-plugin-styled-components ">= 1.12.0" - css-to-react-native "^3.0.0" - hoist-non-react-statics "^3.0.0" - shallowequal "^1.1.0" - supports-color "^5.5.0" +stylis@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.0.10.tgz#446512d1097197ab3f02fb3c258358c3f7a14240" + integrity sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg== supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= -supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0: +supports-color@^5.3.0, supports-color@^5.4.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==