diff --git a/docs/pages/props/index.js b/docs/pages/props/index.js index 699bea114d..fb2906bc3c 100644 --- a/docs/pages/props/index.js +++ b/docs/pages/props/index.js @@ -58,6 +58,7 @@ export default function Api() { selectOption: OptionType => void, selectProps: any, setValue: (ValueType, ActionTypes) => void, + emotion: any, } // passed as the second argument to \`onChange\` diff --git a/package.json b/package.json index 873f7b47e8..be65712ff8 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,9 @@ "url": "https://github.com/JedWatson/react-select.git" }, "dependencies": { + "@emotion/memoize": "^0.7.1", "classnames": "^2.2.5", - "emotion": "^9.1.2", + "create-emotion": "^10.0.4", "memoize-one": "^4.0.0", "prop-types": "^15.6.0", "raf": "^3.4.0", diff --git a/src/Select.js b/src/Select.js index 45c06f333e..afe4f892b7 100644 --- a/src/Select.js +++ b/src/Select.js @@ -3,6 +3,8 @@ import React, { Component, type ElementRef, type Node } from 'react'; import memoizeOne from 'memoize-one'; +import memoize from '@emotion/memoize'; +import createEmotion from 'create-emotion'; import { MenuPlacer } from './components/Menu'; import isEqual from './internal/react-fast-compare'; @@ -242,6 +244,8 @@ export type Props = { tabSelectsValue: boolean, /* The value of the select; reflected by the selected option */ value: ValueType, + /* A CSP Nonce which will be used in injected style sheets */ + nonce?: string }; export const defaultProps = { @@ -305,6 +309,8 @@ type ElRef = ElementRef<*>; let instanceId = 1; +const getEmotion = memoize(nonce => createEmotion(nonce ? { nonce } : {})); + export default class Select extends Component { static defaultProps = defaultProps; state = { @@ -369,6 +375,8 @@ export default class Select extends Component { const selectValue = cleanValue(value); const menuOptions = this.buildMenuOptions(props, selectValue); + this.emotion = getEmotion(props.nonce); + this.state.menuOptions = menuOptions; this.state.selectValue = selectValue; } @@ -721,6 +729,7 @@ export default class Select extends Component { setValue, selectProps: props, theme: this.getTheme(), + emotion: this.emotion }; } @@ -1370,6 +1379,7 @@ export default class Select extends Component { disabled={isDisabled} tabIndex={tabIndex} value="" + emotion={this.emotion} /> ); } @@ -1402,6 +1412,7 @@ export default class Select extends Component { theme={theme} type="text" value={inputValue} + emotion={this.emotion} {...ariaAttributes} /> ); @@ -1427,8 +1438,8 @@ export default class Select extends Component { if (!this.hasValue() || !controlShouldRenderValue) { return inputValue ? null : ( - { onTopArrive={onMenuScrollToTop} onBottomArrive={onMenuScrollToBottom} > - + { renderLiveRegion() { if (!this.state.isFocused) return null; return ( - +

 {this.state.ariaLiveSelection}

 {this.constructAriaLiveMessage()}

diff --git a/src/__tests__/__snapshots__/Async.test.js.snap b/src/__tests__/__snapshots__/Async.test.js.snap index 07a1beb36f..50a7e96fc5 100644 --- a/src/__tests__/__snapshots__/Async.test.js.snap +++ b/src/__tests__/__snapshots__/Async.test.js.snap @@ -68,6 +68,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -172,6 +500,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -278,6 +934,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -374,6 +1358,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -478,6 +1790,334 @@ exports[`defaults - snapshot 1`] = ` autoComplete="off" autoCorrect="off" cx={[Function]} + emotion={ + Object { + "cache": Object { + "compat": true, + "insert": [Function], + "inserted": Object { + "10nd86i": true, + "1492t68": true, + "19bqh2r": true, + "1ep9fjw": true, + "1g6gooi": true, + "1hwfws3": true, + "1wy0on6": true, + "d8oujb": true, + "vj8t7z": true, + }, + "key": "css", + "nonce": undefined, + "registered": Object { + "css-10nd86i": "direction{}pointerEvents{}position:relative;box-sizing:border-box;", + "css-1492t68": "color:hsl(0, 0%, 50%);margin-left:2px;margin-right:2px;position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;", + "css-19bqh2r": "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;", + "css-1ep9fjw": "color:hsl(0, 0%, 80%);display:flex;padding:8px;transition:color 150ms;:hover{color:hsl(0, 0%, 60%);}box-sizing:border-box;", + "css-1g6gooi": "margin:2px;padding-bottom:2px;padding-top:2px;visibility:visible;color:hsl(0, 0%, 20%);box-sizing:border-box;", + "css-1hwfws3": "align-items:center;display:flex;flex:1;flex-wrap:wrap;padding:2px 8px;-webkit-overflow-scrolling:touch;position:relative;overflow:hidden;box-sizing:border-box;", + "css-1wy0on6": "align-items:center;align-self:stretch;display:flex;flex-shrink:0;box-sizing:border-box;", + "css-d8oujb": "align-self:stretch;background-color:hsl(0, 0%, 80%);margin-bottom:8px;margin-top:8px;width:1px;box-sizing:border-box;", + "css-vj8t7z": "align-items:center;background-color:hsl(0, 0%, 100%);border-color:hsl(0, 0%, 80%);border-radius:4px;border-style:solid;border-width:1px;boxShadow{}cursor:default;display:flex;flex-wrap:wrap;justify-content:space-between;min-height:38px;outline:0 !important;position:relative;transition:all 100ms;&:hover{border-color:hsl(0, 0%, 70%);}box-sizing:border-box;", + }, + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} id="react-select-2-input" innerRef={[Function]} @@ -611,6 +2251,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -707,6 +2675,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -805,6 +3101,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -909,8 +3533,665 @@ exports[`defaults - snapshot 1`] = ` onMouseDown={[Function]} onTouchEnd={[Function]} > - + + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } + > + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } size={20} > + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -204,6 +532,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -315,6 +971,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -416,6 +1400,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -525,6 +1837,334 @@ exports[`defaults - snapshot 1`] = ` autoComplete="off" autoCorrect="off" cx={[Function]} + emotion={ + Object { + "cache": Object { + "compat": true, + "insert": [Function], + "inserted": Object { + "10nd86i": true, + "1492t68": true, + "19bqh2r": true, + "1ep9fjw": true, + "1g6gooi": true, + "1hwfws3": true, + "1wy0on6": true, + "d8oujb": true, + "vj8t7z": true, + }, + "key": "css", + "nonce": undefined, + "registered": Object { + "css-10nd86i": "direction{}pointerEvents{}position:relative;box-sizing:border-box;", + "css-1492t68": "color:hsl(0, 0%, 50%);margin-left:2px;margin-right:2px;position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;", + "css-19bqh2r": "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;", + "css-1ep9fjw": "color:hsl(0, 0%, 80%);display:flex;padding:8px;transition:color 150ms;:hover{color:hsl(0, 0%, 60%);}box-sizing:border-box;", + "css-1g6gooi": "margin:2px;padding-bottom:2px;padding-top:2px;visibility:visible;color:hsl(0, 0%, 20%);box-sizing:border-box;", + "css-1hwfws3": "align-items:center;display:flex;flex:1;flex-wrap:wrap;padding:2px 8px;-webkit-overflow-scrolling:touch;position:relative;overflow:hidden;box-sizing:border-box;", + "css-1wy0on6": "align-items:center;align-self:stretch;display:flex;flex-shrink:0;box-sizing:border-box;", + "css-d8oujb": "align-self:stretch;background-color:hsl(0, 0%, 80%);margin-bottom:8px;margin-top:8px;width:1px;box-sizing:border-box;", + "css-vj8t7z": "align-items:center;background-color:hsl(0, 0%, 100%);border-color:hsl(0, 0%, 80%);border-radius:4px;border-style:solid;border-width:1px;boxShadow{}cursor:default;display:flex;flex-wrap:wrap;justify-content:space-between;min-height:38px;outline:0 !important;position:relative;transition:all 100ms;&:hover{border-color:hsl(0, 0%, 70%);}box-sizing:border-box;", + }, + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} id="react-select-2-input" innerRef={[Function]} @@ -658,6 +2298,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -759,6 +2727,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -862,6 +3158,334 @@ exports[`defaults - snapshot 1`] = ` + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -971,8 +3595,665 @@ exports[`defaults - snapshot 1`] = ` onMouseDown={[Function]} onTouchEnd={[Function]} > - + + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } + > + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": + + + + + + + + + + + + , + "ctr": 11, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [ + , + , + , + , + , + , + , + , + , + , + , + ], + }, + } + } size={20} > , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -93,6 +133,46 @@ exports[`snapshot - defaults 1`] = ` , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -183,6 +263,46 @@ exports[`snapshot - defaults 1`] = ` , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -265,6 +385,46 @@ exports[`snapshot - defaults 1`] = ` , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -354,6 +514,46 @@ exports[`snapshot - defaults 1`] = ` autoComplete="off" autoCorrect="off" cx={[Function]} + emotion={ + Object { + "cache": Object { + "compat": true, + "insert": [Function], + "inserted": Object {}, + "key": "css", + "nonce": undefined, + "registered": Object {}, + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} id="react-select-2-input" innerRef={[Function]} @@ -399,6 +599,46 @@ exports[`snapshot - defaults 1`] = ` , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -481,6 +721,46 @@ exports[`snapshot - defaults 1`] = ` , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -564,6 +844,46 @@ exports[`snapshot - defaults 1`] = ` , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + }, + "css": [Function], + "cx": [Function], + "flush": [Function], + "getRegisteredStyles": [Function], + "hydrate": [Function], + "injectGlobal": [Function], + "keyframes": [Function], + "merge": [Function], + "sheet": StyleSheet { + "before": null, + "container": , + "ctr": 0, + "isSpeedy": false, + "key": "css", + "nonce": undefined, + "speedy": [Function], + "tags": Array [], + }, + } + } getStyles={[Function]} getValue={[Function]} hasValue={false} @@ -650,9 +970,7 @@ exports[`snapshot - defaults 1`] = ` }, } } - > - - + /> diff --git a/src/components/Control.js b/src/components/Control.js index 76b4b11748..846ea485a4 100644 --- a/src/components/Control.js +++ b/src/components/Control.js @@ -1,6 +1,5 @@ // @flow import React, { type Node, type ElementRef } from 'react'; -import { css as emotionCSS } from 'emotion'; import type { CommonProps, PropsWithStyles } from '../types'; @@ -52,11 +51,11 @@ export const css = ({ }); const Control = (props: ControlProps) => { - const { children, cx, getStyles, className, isDisabled, isFocused, innerRef, innerProps } = props; + const { children, cx, getStyles, className, isDisabled, isFocused, innerRef, innerProps, emotion } = props; return (
{ headingProps, label, theme, + emotion, } = props; return (
- + {label}
{children}
@@ -61,11 +61,11 @@ export const groupHeadingCSS = ({ theme: { spacing } }: GroupProps) => ({ }); export const GroupHeading = (props: any) => { - const { className, cx, getStyles, theme, ...cleanProps } = props; + const { className, cx, getStyles, theme, emotion, ...cleanProps } = props; return (
({ @@ -40,9 +41,10 @@ const Input = ({ isHidden, isDisabled, theme, + emotion, ...props }: InputProps) => ( -
+
{ } const Menu = (props: MenuProps) => { - const { children, className, cx, getStyles, innerRef, innerProps } = props; - const cn = cx(css(getStyles('menu', props)), { menu: true }, className); + const { children, className, cx, getStyles, innerRef, innerProps, emotion } = props; + const cn = cx(emotion.css(getStyles('menu', props)), { menu: true }, className); return (
@@ -361,11 +360,11 @@ export const menuListCSS = ({ WebkitOverflowScrolling: 'touch', }); export const MenuList = (props: MenuListComponentProps) => { - const { children, className, cx, getStyles, isMulti, innerRef } = props; + const { children, className, cx, getStyles, isMulti, innerRef, emotion } = props; return (
{ - const { children, className, cx, getStyles, innerProps } = props; + const { children, className, cx, getStyles, innerProps, emotion } = props; return (
{ - const { children, className, cx, getStyles, innerProps } = props; + const { children, className, cx, getStyles, innerProps, emotion } = props; return (
{ menuPlacement, menuPosition: position, getStyles, + emotion } = this.props; const isFixed = position === 'fixed'; @@ -519,7 +519,7 @@ export class MenuPortal extends Component { // same wrapper element whether fixed or portalled const menuWrapper = ( -
{children}
+
{children}
); return appendTo ? createPortal(menuWrapper, appendTo) : menuWrapper; diff --git a/src/components/MultiValue.js b/src/components/MultiValue.js index 340010d1dd..8ad655aa76 100644 --- a/src/components/MultiValue.js +++ b/src/components/MultiValue.js @@ -1,6 +1,5 @@ // @flow import React, { Component, type Node } from 'react'; -import { css } from 'emotion'; import { CrossIcon } from './indicators'; import type { CommonProps } from '../types'; @@ -70,7 +69,8 @@ export const MultiValueGeneric = ({ export const MultiValueContainer = MultiValueGeneric; export const MultiValueLabel = MultiValueGeneric; -export type MultiValueRemoveProps = CommonProps & { +export type MultiValueRemoveProps = { + emotion: any, children: Node, data: any, innerProps: { @@ -82,12 +82,9 @@ export type MultiValueRemoveProps = CommonProps & { selectProps: any, }; export class MultiValueRemove extends Component { - static defaultProps = { - children: , - }; render() { - const { children, innerProps } = this.props; - return
{children}
; + const { children, innerProps, emotion } = this.props; + return
{children || }
; } } @@ -107,13 +104,14 @@ class MultiValue extends Component { isDisabled, removeProps, selectProps, + emotion, } = this.props; const { Container, Label, Remove } = components; const containerInnerProps = { className: cx( - css(getStyles('multiValue', this.props)), + emotion.css(getStyles('multiValue', this.props)), { 'multi-value': true, 'multi-value--is-disabled': isDisabled, @@ -125,7 +123,7 @@ class MultiValue extends Component { const labelInnerProps = { className: cx( - css(getStyles('multiValueLabel', this.props)), + emotion.css(getStyles('multiValueLabel', this.props)), { 'multi-value__label': true, }, @@ -135,7 +133,7 @@ class MultiValue extends Component { const removeInnerProps = { className: cx( - css(getStyles('multiValueRemove', this.props)), + emotion.css(getStyles('multiValueRemove', this.props)), { 'multi-value__remove': true, }, @@ -161,6 +159,7 @@ class MultiValue extends Component { data={data} innerProps={removeInnerProps} selectProps={selectProps} + emotion={emotion} /> ); diff --git a/src/components/Option.js b/src/components/Option.js index f44400dec6..dce917f59e 100644 --- a/src/components/Option.js +++ b/src/components/Option.js @@ -1,6 +1,5 @@ // @flow import React, { type Node } from 'react'; -import { css } from 'emotion'; import type { CommonProps, PropsWithStyles, InnerRef } from '../types'; @@ -64,12 +63,12 @@ export const optionCSS = ({ }); const Option = (props: OptionProps) => { - const { children, className, cx, getStyles, isDisabled, isFocused, isSelected, innerRef, innerProps } = props; + const { children, className, cx, getStyles, isDisabled, isFocused, isSelected, innerRef, innerProps, emotion } = props; return (
{ - const { children, className, cx, getStyles, innerProps } = props; + const { children, className, cx, getStyles, innerProps, emotion } = props; return (
{ - const { children, className, cx, getStyles, isDisabled, innerProps } = props; + const { children, className, cx, getStyles, isDisabled, innerProps, emotion } = props; return (
({ position: 'relative', }); export const SelectContainer = (props: ContainerProps) => { - const { children, className, cx, getStyles, innerProps, isDisabled, isRtl } = props; + const { children, className, cx, getStyles, innerProps, isDisabled, isRtl, emotion } = props; return (
{ render() { - const { children, className, cx, isMulti, getStyles, hasValue } = this.props; + const { children, className, cx, isMulti, getStyles, hasValue, emotion } = this.props; return (
({ flexShrink: 0, }); export const IndicatorsContainer = (props: IndicatorContainerProps) => { - const { children, className, cx, getStyles } = props; + const { children, className, cx, getStyles, emotion } = props; return (
( +const Svg = ({ size, emotion, ...props }: { size: number }) => (
{ className, )} > - {children} + {children || }
); }; -DropdownIndicator.defaultProps = { - children: , -}; - export const clearIndicatorCSS = baseCSS; export const ClearIndicator = (props: IndicatorProps) => { - const { children, className, cx, getStyles, innerProps } = props; + const { children, className, cx, getStyles, innerProps, emotion } = props; return (
- {children} + {children || }
); }; -ClearIndicator.defaultProps = { - children: -}; - // ============================== // Separator // ============================== @@ -132,12 +123,12 @@ export const indicatorSeparatorCSS = ({ }); export const IndicatorSeparator = (props: IndicatorProps) => { - const { className, cx, getStyles, innerProps } = props; + const { className, cx, getStyles, innerProps, emotion } = props; return ( { // ============================== const keyframesName = 'react-select-loading-indicator'; +let keyframesInjected = false; export const loadingIndicatorCSS = ({ isFocused, @@ -172,10 +164,10 @@ export const loadingIndicatorCSS = ({ verticalAlign: 'middle', }); -type DotProps = { color: string, delay: number, offset: boolean }; -const LoadingDot = ({ color, delay, offset }: DotProps) => ( +type DotProps = { color: string, delay: number, offset: boolean, emotion: any }; +const LoadingDot = ({ color, delay, offset, emotion }: DotProps) => ( ( height: '1em', verticalAlign: 'top', width: '1em', - }} + })} /> ); -// eslint-disable-next-line no-unused-expressions -injectGlobal`@keyframes ${keyframesName} { - 0%, 80%, 100% { opacity: 0; } - 40% { opacity: 1; } -};`; - export type LoadingIconProps = { /** Props that will be passed on to the children. */ innerProps: any, @@ -210,14 +196,23 @@ export type LoadingIconProps = { size: number, }; export const LoadingIndicator = (props: LoadingIconProps) => { - const { className, cx, getStyles, innerProps, isFocused, isRtl, theme: { colors } } = props; + const { className, cx, getStyles, innerProps, isFocused, isRtl, emotion, theme: { colors } } = props; const color = isFocused ? colors.neutral80 : colors.neutral20; + if(!keyframesInjected) { + // eslint-disable-next-line no-unused-expressions + emotion.injectGlobal`@keyframes ${keyframesName} { + 0%, 80%, 100% { opacity: 0; } + 40% { opacity: 1; } + };`; + keyframesInjected = true; + } + return (
{ className )} > - - - + + +
); }; diff --git a/src/internal/A11yText.js b/src/internal/A11yText.js index 55931a2c37..49b7264a8d 100644 --- a/src/internal/A11yText.js +++ b/src/internal/A11yText.js @@ -4,7 +4,7 @@ import React from 'react'; // Assistive text to describe visual elements. Hidden for sighted users. const A11yText = (props: any) => ( ( whiteSpace: 'nowrap', backgroundColor: 'red', color: 'blue', - }} + })} {...props} /> ); diff --git a/src/internal/DummyInput.js b/src/internal/DummyInput.js index f5cae6c80f..f26ddb4428 100644 --- a/src/internal/DummyInput.js +++ b/src/internal/DummyInput.js @@ -4,12 +4,12 @@ import React, { Component } from 'react'; export default class DummyInput extends Component { render () { - const { in: inProp, out, onExited, appear, enter, exit, innerRef, ...props } = this.props; + const { in: inProp, out, onExited, appear, enter, exit, innerRef, emotion, ...props } = this.props; return( { opacity: 0, position: 'relative', transform: 'scale(0)', - }} + })} /> ); } diff --git a/src/internal/ScrollBlock.js b/src/internal/ScrollBlock.js index 0923681a5e..b79c649ba9 100644 --- a/src/internal/ScrollBlock.js +++ b/src/internal/ScrollBlock.js @@ -7,6 +7,7 @@ import ScrollLock from './ScrollLock/index'; type Props = { children: Element<*>, isEnabled: boolean, + emotion: any, }; type State = { touchScrollTarget: HTMLElement | null, @@ -34,7 +35,7 @@ export default class ScrollBlock extends PureComponent { }; render() { - const { children, isEnabled } = this.props; + const { children, isEnabled, emotion } = this.props; const { touchScrollTarget } = this.state; // bail early if not enabled @@ -58,7 +59,7 @@ export default class ScrollBlock extends PureComponent {
{children} {touchScrollTarget ? ( diff --git a/src/types.js b/src/types.js index 88f8d3f30d..e2159f6120 100644 --- a/src/types.js +++ b/src/types.js @@ -69,6 +69,7 @@ export type CommonProps = { selectOption: OptionType => void, selectProps: any, setValue: (ValueType, ActionTypes) => void, + emotion: any, }; export type ActionTypes = diff --git a/yarn.lock b/yarn.lock index fc23f481cc..ae5c1db554 100644 --- a/yarn.lock +++ b/yarn.lock @@ -254,6 +254,21 @@ find-root "^1.1.0" source-map "^0.7.2" +"@emotion/cache@10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.0.tgz#e22eadcb770de4131ec707c84207e9e1ce210413" + integrity sha512-1/sT6GNyvWmxCtJek8ZDV+b+a+NMDx8/61UTnnF3rqrTY7bLTjw+fmXO7WgUIH0owuWKxza/J/FfAWC/RU4G7A== + dependencies: + "@emotion/sheet" "0.9.2" + "@emotion/stylis" "0.8.3" + "@emotion/utils" "0.11.1" + "@emotion/weak-memoize" "0.2.2" + +"@emotion/hash@0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.7.1.tgz#9833722341379fb7d67f06a4b00ab3c37913da53" + integrity sha512-OYpa/Sg+2GDX+jibUfpZVn1YqSVRpYmTLF2eyAfrFTIJSbwyIrc+YscayoykvaOME/wV4BV0Sa0yqdMrgse6mA== + "@emotion/hash@^0.6.2": version "0.6.2" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.2.tgz#4cfe6b57e251aa7f254750ddac7c449ff99c476f" @@ -263,6 +278,11 @@ version "0.6.6" resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.6.6.tgz#62266c5f0eac6941fece302abad69f2ee7e25e44" +"@emotion/memoize@0.7.1", "@emotion/memoize@^0.7.1": + version "0.7.1" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.1.tgz#e93c13942592cf5ef01aa8297444dc192beee52f" + integrity sha512-Qv4LTqO11jepd5Qmlp3M1YEjBumoTHcHFdgPTQ+sFlIL5myi/7xu/POwP7IRu6odBdmLXdtIs1D6TuW6kbwbbg== + "@emotion/memoize@^0.6.1": version "0.6.1" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.1.tgz#b2de5184e49f518b7115a5e6d0e727643ec531cf" @@ -272,6 +292,17 @@ version "0.6.6" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b" +"@emotion/serialize@^0.11.2": + version "0.11.2" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.2.tgz#f6cdf7b20ade02251525add0e50f8a56d47e4a3f" + integrity sha512-6bWsiynUj+KByNXpcSbx/2xj9OI7Vty/IeIvB5ArPswosyp0N0GezDqQ50IjFDfDUPv0LNCtyyKuTtlFy62Epw== + dependencies: + "@emotion/hash" "0.7.1" + "@emotion/memoize" "0.7.1" + "@emotion/unitless" "0.7.3" + "@emotion/utils" "0.11.1" + csstype "^2.5.7" + "@emotion/serialize@^0.9.1": version "0.9.1" resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.9.1.tgz#a494982a6920730dba6303eb018220a2b629c145" @@ -281,6 +312,16 @@ "@emotion/unitless" "^0.6.7" "@emotion/utils" "^0.8.2" +"@emotion/sheet@0.9.2": + version "0.9.2" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.2.tgz#74e5c6b5e489a1ba30ab246ab5eedd96916487c4" + integrity sha512-pVBLzIbC/QCHDKJF2E82V2H/W/B004mDFQZiyo/MSR+VC4pV5JLG0TF/zgQDFvP3fZL/5RTPGEmXlYJBMUuJ+A== + +"@emotion/stylis@0.8.3": + version "0.8.3" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.3.tgz#3ca7e9bcb31b3cb4afbaeb66156d86ee85e23246" + integrity sha512-M3nMfJ6ndJMYloSIbYEBq6G3eqoYD41BpDOxreE8j0cb4fzz/5qvmqU9Mb2hzsXcCnIlGlWhS03PCzVGvTAe0Q== + "@emotion/stylis@^0.6.5": version "0.6.5" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.6.5.tgz#3e1bb0e52307d66212bcd307e2cb4d079f2a0b6a" @@ -290,6 +331,11 @@ version "0.7.1" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.7.1.tgz#50f63225e712d99e2b2b39c19c70fff023793ca5" +"@emotion/unitless@0.7.3": + version "0.7.3" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.3.tgz#6310a047f12d21a1036fb031317219892440416f" + integrity sha512-4zAPlpDEh2VwXswwr/t8xGNDGg8RQiPxtxZ3qQEXyQsBV39ptTdESCjuBvGze1nLMVrxmTIKmnO/nAV8Tqjjzg== + "@emotion/unitless@^0.6.2": version "0.6.2" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.2.tgz#19a39bda906e5ba45f39f6f7f3512b2740ceab29" @@ -299,10 +345,20 @@ version "0.6.7" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.7.tgz#53e9f1892f725b194d5e6a1684a7b394df592397" +"@emotion/utils@0.11.1": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.1.tgz#8529b7412a6eb4b48bdf6e720cc1b8e6e1e17628" + integrity sha512-8M3VN0hetwhsJ8dH8VkVy7xo5/1VoBsDOk/T4SJOeXwTO1c4uIqVNx2qyecLFnnUWD5vvUqHQ1gASSeUN6zcTg== + "@emotion/utils@^0.8.2": version "0.8.2" resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.8.2.tgz#576ff7fb1230185b619a75d258cbc98f0867a8dc" +"@emotion/weak-memoize@0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e" + integrity sha512-n/VQ4mbfr81aqkx/XmVicOLjviMuy02eenSdJY33SVA7S2J42EU0P1H0mOogfYedb3wXA0d/LVtBrgTSm04WEA== + "@types/acorn@^4.0.3": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.3.tgz#d1f3e738dde52536f9aad3d3380d14e448820afd" @@ -3119,6 +3175,16 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" +create-emotion@^10.0.4: + version "10.0.4" + resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-10.0.4.tgz#c3bdd8f2aba790eb559e44b481027b9e33f2e49c" + integrity sha512-IQqKZFZz3DYnHB3wfww4oc/tsKpaWxrd2mspaFyFqTRqJZABJWgXBZB+FD7UIrUOQDmxY03xcMbcdk3oGiUNZg== + dependencies: + "@emotion/cache" "10.0.0" + "@emotion/serialize" "^0.11.2" + "@emotion/sheet" "0.9.2" + "@emotion/utils" "0.11.1" + create-emotion@^9.1.2: version "9.1.2" resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.1.2.tgz#a4227ac0c1bd9f07160f1e87161bffdb1732e148" @@ -3356,6 +3422,11 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": dependencies: cssom "0.3.x" +csstype@^2.5.7: + version "2.5.8" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.8.tgz#4ce5aa16ea0d562ef9105fa3ae2676f199586a35" + integrity sha512-r4DbsyNJ7slwBSKoGesxDubRWJ71ghG8W2+1HcsDlAo12KGca9dDLv0u98tfdFw7ldBdoA7XmCnI6Q8LpAJXaQ== + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -3864,7 +3935,7 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= -emotion@^9.1.1, emotion@^9.1.2: +emotion@^9.1.1: version "9.1.2" resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.1.2.tgz#b89ff80c8449a2eb146a4a0fc87f3e1aefedd253" integrity sha512-VpRjmUWwH7saQEjN57Snoi2jxlB/4rF0iXvRR25n1O8lb6xo3EMxrmxsg8Tqq4a52/FWyxoLP4QzSqnK2qs6+Q==