From 195b325b4bf1ac7112fa6a18b82b92ca7dee6b42 Mon Sep 17 00:00:00 2001 From: sureshsevarthi Date: Tue, 18 Feb 2020 10:36:55 -0500 Subject: [PATCH 1/7] created source map in bundle to easy debugging --- example/package-lock.json | 106 ++++++++++++++++++++++++++------------ package-lock.json | 49 +++++++++++++----- rollup.config.js | 37 +++++++------ 3 files changed, 130 insertions(+), 62 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index ebc7e2182..c4f869e89 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -3091,7 +3091,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3109,11 +3110,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3126,15 +3129,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3237,7 +3243,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3247,6 +3254,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3259,17 +3267,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3286,6 +3297,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3358,7 +3370,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3368,6 +3381,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3443,7 +3457,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3473,6 +3488,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3490,6 +3506,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3528,11 +3545,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -7111,7 +7130,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -7129,11 +7149,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7146,15 +7168,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7257,7 +7282,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -7267,6 +7293,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7279,17 +7306,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7306,6 +7336,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -7378,7 +7409,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -7388,6 +7420,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -7463,7 +7496,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -7493,6 +7527,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7510,6 +7545,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -7548,11 +7584,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } } @@ -10594,22 +10632,22 @@ "dependencies": { "js-tokens": { "version": "4.0.0", - "bundled": true + "resolved": false }, "loose-envify": { "version": "1.4.0", - "bundled": true, + "resolved": false, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } }, "object-assign": { "version": "4.1.1", - "bundled": true + "resolved": false }, "prop-types": { "version": "15.7.2", - "bundled": true, + "resolved": false, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -10618,11 +10656,11 @@ }, "react-is": { "version": "16.12.0", - "bundled": true + "resolved": false }, "scheduler": { "version": "0.13.6", - "bundled": true, + "resolved": false, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -10776,22 +10814,22 @@ "dependencies": { "js-tokens": { "version": "4.0.0", - "bundled": true + "resolved": false }, "loose-envify": { "version": "1.4.0", - "bundled": true, + "resolved": false, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } }, "object-assign": { "version": "4.1.1", - "bundled": true + "resolved": false }, "prop-types": { "version": "15.7.2", - "bundled": true, + "resolved": false, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -10800,11 +10838,11 @@ }, "react-is": { "version": "16.12.0", - "bundled": true + "resolved": false }, "scheduler": { "version": "0.13.6", - "bundled": true, + "resolved": false, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" diff --git a/package-lock.json b/package-lock.json index 6e193f26e..233b97420 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@unicef/material-ui", - "version": "0.4.1", + "version": "0.4.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -6478,7 +6478,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -6499,12 +6500,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -6519,17 +6522,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -6646,7 +6652,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -6658,6 +6665,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -6672,6 +6680,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -6679,12 +6688,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -6703,6 +6714,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -6783,7 +6795,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -6795,6 +6808,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6880,7 +6894,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6916,6 +6931,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6935,6 +6951,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6978,12 +6995,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -7145,6 +7164,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, + "optional": true, "requires": { "is-glob": "^2.0.0" } @@ -8278,7 +8298,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true + "dev": true, + "optional": true }, "is-finite": { "version": "1.0.2", @@ -8303,6 +8324,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, + "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -9754,6 +9776,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, + "optional": true, "requires": { "remove-trailing-separator": "^1.0.1" } diff --git a/rollup.config.js b/rollup.config.js index 7b8a8e1ab..2975e58f8 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,38 +1,45 @@ -import babel from "rollup-plugin-babel" -import commonjs from "rollup-plugin-commonjs" -import resolve from "rollup-plugin-node-resolve" -import replace from "rollup-plugin-replace" +import babel from 'rollup-plugin-babel' +import commonjs from 'rollup-plugin-commonjs' +import resolve from 'rollup-plugin-node-resolve' +import replace from 'rollup-plugin-replace' -const NODE_ENV = process.env.NODE_ENV || "development" -const outputFile = NODE_ENV === "production" ? "./lib/prod.js" : "./lib/dev.js" +const NODE_ENV = process.env.NODE_ENV || 'development' +const outputFile = NODE_ENV === 'production' ? './lib/prod.js' : './lib/dev.js' export default { - input: "./src/index.js", + input: './src/index.js', output: { file: outputFile, - format: "cjs", + format: 'cjs', + sourcemap: true, }, plugins: [ replace({ - "process.env.NODE_ENV": JSON.stringify(NODE_ENV), + 'process.env.NODE_ENV': JSON.stringify(NODE_ENV), }), babel({ babelrc: false, presets: [ [ - "env", + 'env', { modules: false, }, ], - "stage-0", - "react", + 'stage-0', + 'react', ], - exclude: "node_modules/**", - plugins: ["external-helpers"], + exclude: 'node_modules/**', + plugins: ['external-helpers'], }), resolve(), commonjs(), ], - external: ['react', 'react-is', 'react-dom', 'prop-types', 'styled-components'], + external: [ + 'react', + 'react-is', + 'react-dom', + 'prop-types', + 'styled-components', + ], } From 7d051bf1be46409ab4e2e40383fc5031cba07cc2 Mon Sep 17 00:00:00 2001 From: sureshsevarthi Date: Tue, 18 Feb 2020 10:39:54 -0500 Subject: [PATCH 2/7] user can clear the single people picker selected value and also cursor to be in start when place holder exists --- src/components/UPeoplePicker/UPeoplePicker.js | 54 ++++++------------- 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/src/components/UPeoplePicker/UPeoplePicker.js b/src/components/UPeoplePicker/UPeoplePicker.js index c20f879e6..62a4b2ea0 100644 --- a/src/components/UPeoplePicker/UPeoplePicker.js +++ b/src/components/UPeoplePicker/UPeoplePicker.js @@ -28,7 +28,7 @@ const useStyles = makeStyles(theme => ({ }, chip: { marginLeft: theme.spacing(0.5), - marginTop: theme.spacing(0.25) + marginTop: theme.spacing(0.25), }, chipFocused: { backgroundColor: emphasize( @@ -56,7 +56,10 @@ const useStyles = makeStyles(theme => ({ zIndex: 999, left: 0, right: 0, - marginTop: props.TextFieldProps && props.TextFieldProps.helperText ? theme.spacing(-1.5) : theme.spacing(1) + marginTop: + props.TextFieldProps && props.TextFieldProps.helperText + ? theme.spacing(-1.5) + : theme.spacing(1), }), divider: { height: theme.spacing(2), @@ -73,7 +76,6 @@ const StyledAvatar = styled(Avatar)` width: 32px }` - const SingleValueAvatar = styled(Avatar)` && { height: 24px @@ -223,27 +225,6 @@ Option.propTypes = { isSelected: PropTypes.bool.isRequired, } -function Placeholder(props) { - const { selectProps, innerProps = {}, children } = props - return ( - - {children} - - ) -} - -Placeholder.propTypes = { - /** - * The children to be rendered. - */ - children: PropTypes.node, - /** - * props passed to the wrapping element for the group. - */ - innerProps: PropTypes.object, - selectProps: PropTypes.object.isRequired, -} - function SingleValue(props) { return ( handlePush(props)} onDelete={props.removeProps.onClick} - deleteIcon={< CancelIcon {...props.removeProps} />} + deleteIcon={} /> ) } @@ -322,11 +303,7 @@ function Menu(props) { className={props.selectProps.classes.paper} {...props.innerProps} > - { - props.isLoading - ? Loading .... - : props.children - } + {props.isLoading ? Loading .... : props.children} ) } @@ -350,7 +327,6 @@ const components = { NoOptionsMessage, IndicatorSeparator: () => null, Option, - Placeholder, SingleValue, ValueContainer, } @@ -360,9 +336,9 @@ const components = { * * Select single person from list * * Select Multiple people from list. * * Autocomplete. - * * Search and filter the opions. + * * Search and filter the opions. * * Clear selected. - * + * */ export default function UPeoplePicker(props) { const classes = useStyles(props) @@ -399,14 +375,14 @@ export default function UPeoplePicker(props) { onChange: PropTypes.func, /** Options to select from dropdown. * - * `const suggestions = [ {label: "name1" }, {label: "name2"} ]` // which is an array of objects - * - * `options = {suggestions}` - */ + * `const suggestions = [ {label: "name1" }, {label: "name2"} ]` // which is an array of objects + * + * `options = {suggestions}` + */ options: PropTypes.array, /** It accepts all the props from TextField API. * - * `TextFieldProps={helperText = "text", inputProps={className: classes.textField}}` + * `TextFieldProps={helperText = "text", inputProps={className: classes.textField}}` * */ TextFieldProps: PropTypes.object, @@ -426,13 +402,13 @@ export default function UPeoplePicker(props) { }, } - const mergedTextFieldProps = { ...defaultTextFieldProps, ...TextFieldProps } return (
-
- ) -} diff --git a/src/components/USelect/USelect.md b/src/components/USelect/USelect.md deleted file mode 100644 index 0c76aa97b..000000000 --- a/src/components/USelect/USelect.md +++ /dev/null @@ -1,59 +0,0 @@ -### Examples - -```jsx static - -const options = [ - { label: 'Afghanistan' }, - { label: 'Aland Islands' }, - { label: 'Albania' }, - { label: 'Algeria' }, - { label: 'American Samoa' }, - { label: 'Andorra' }, - { label: 'Angola' }, -].map(suggestion => ({ - value: suggestion.label, - label: suggestion.label, -})) -``` - -#### Select - -```jsx -import { Typography } from '@material-ui/core'; - -const options = [ - { label: 'Afghanistan' }, - { label: 'Aland Islands' }, - { label: 'Albania' }, - { label: 'Algeria' }, - { label: 'American Samoa' }, - { label: 'Andorra' }, - { label: 'Angola' }, -].map(option => ({ - value: option.label, - label: option.label, -})); - -; -``` - -#### Multi select - -```jsx -import { Typography } from '@material-ui/core'; - -const options = [ - { label: 'Afghanistan' }, - { label: 'Aland Islands' }, - { label: 'Albania' }, - { label: 'Algeria' }, - { label: 'American Samoa' }, - { label: 'Andorra' }, - { label: 'Angola' }, -].map(suggestion => ({ - value: suggestion.label, - label: suggestion.label, -})); - -; -``` diff --git a/src/components/USelect/index.js b/src/components/USelect/index.js deleted file mode 100644 index f9a769e3f..000000000 --- a/src/components/USelect/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './USelect' diff --git a/src/index.js b/src/index.js index 6a1e4b1c0..a1c26c5a8 100644 --- a/src/index.js +++ b/src/index.js @@ -9,7 +9,6 @@ import USideBar from './components/USideBar' import UContent from './components/UContent' import UHeaderMainMenu from './components/UHeaderMainMenu' import UButton from './components/UButton' -import USelect from './components/USelect' import UPeoplePicker from './components/UPeoplePicker' import UDatePicker from './components/UDatePicker' import UTimePicker from './components/UTimePicker' @@ -37,7 +36,6 @@ export { USideBar, UContent, UButton, - USelect, UPeoplePicker, UDatePicker, UTimePicker, diff --git a/styleguide.config.js b/styleguide.config.js index 79a61aa89..a34c69419 100644 --- a/styleguide.config.js +++ b/styleguide.config.js @@ -51,7 +51,6 @@ module.exports = { name: 'Components', components: () => [ path.resolve(__dirname, 'src/components/UButton', 'UButton.js'), - path.resolve(__dirname, 'src/components/USelect', 'USelect.js'), ], usageMode: 'expand', }, From 0eb1b54eeb5be19dfd9f203aa968e1919069fe0e Mon Sep 17 00:00:00 2001 From: sureshsevarthi Date: Tue, 18 Feb 2020 10:53:02 -0500 Subject: [PATCH 4/7] bumped the version to 0.4.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b4ad24c6f..8dac35231 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@unicef/material-ui", - "version": "0.4.2", + "version": "0.4.3", "description": "UNICEF theme and components of material-ui for react", "main": "index.js", "files": [ From 13fc8cecd2e052e043348962a02f6e663fab0613 Mon Sep 17 00:00:00 2001 From: sureshsevarthi Date: Tue, 18 Feb 2020 11:02:20 -0500 Subject: [PATCH 5/7] updated the package.json file --- package-lock.json | 86 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 6 ++-- 2 files changed, 88 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 233b97420..11323a128 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@unicef/material-ui", - "version": "0.4.2", + "version": "0.4.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -912,6 +912,23 @@ "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.7.2.tgz", "integrity": "sha512-RMtr1i6E8MXaBWwhXL3yeOU8JXRnz8GNxHvaUfVvwxokvayUY0zoBeWbKw1S9XkufmGEEdQd228pSZXFkAln8Q==" }, + "@emotion/is-prop-valid": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.6.tgz", + "integrity": "sha512-mnZMho3Sq8BfzkYYRVc8ilQTnc8U02Ytp6J1AwM6taQStZ3AhsEJBX2LzhA/LJirNCwM2VtHL3VFIZ+sNJUgUQ==", + "dev": true, + "requires": { + "@emotion/memoize": "0.7.4" + }, + "dependencies": { + "@emotion/memoize": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", + "dev": true + } + } + }, "@emotion/memoize": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.2.tgz", @@ -2235,6 +2252,18 @@ "resolve": "^1.10.0" } }, + "babel-plugin-styled-components": { + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz", + "integrity": "sha512-MBMHGcIA22996n9hZRf/UJLVVgkEOITuR2SvjHLb5dSTUyR4ZRGn+ngITapes36FI3WLxZHfRhkA1ffHxihOrg==", + "dev": true, + "requires": { + "@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-async-functions": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", @@ -3516,6 +3545,12 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "camelize": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=", + "dev": true + }, "caniuse-lite": { "version": "1.0.30000988", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000988.tgz", @@ -4233,6 +4268,12 @@ "randomfill": "^1.0.3" } }, + "css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=", + "dev": true + }, "css-initials": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/css-initials/-/css-initials-0.3.1.tgz", @@ -4267,6 +4308,25 @@ } } }, + "css-to-react-native": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", + "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", + "dev": true, + "requires": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" + }, + "dependencies": { + "postcss-value-parser": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", + "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==", + "dev": true + } + } + }, "cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -13350,6 +13410,12 @@ "safe-buffer": "^5.0.1" } }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -13914,6 +13980,24 @@ } } }, + "styled-components": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.0.1.tgz", + "integrity": "sha512-E0xKTRIjTs4DyvC1MHu/EcCXIj6+ENCP8hP01koyoADF++WdBUOrSGwU1scJRw7/YaYOhDvvoad6VlMG+0j53A==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "@babel/traverse": "^7.4.5", + "@emotion/is-prop-valid": "^0.8.3", + "@emotion/stylis": "^0.8.4", + "@emotion/unitless": "^0.7.4", + "babel-plugin-styled-components": ">= 1", + "css-to-react-native": "^3.0.0", + "hoist-non-react-statics": "^3.0.0", + "shallowequal": "^1.1.0", + "supports-color": "^5.5.0" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/package.json b/package.json index 8dac35231..20c85b29d 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "transpile": "npm run build", "deploy": "gh-pages -d gh-pages-build", "prepublishOnly": "npm run transpile", - "publish-demo": "npm run build && npm run deploy" + "publish-demo": "npm run build:site && npm run deploy" }, "repository": { "type": "git", @@ -33,8 +33,7 @@ "react": "^16.0.0", "react-dom": ">=16.0.0", "@material-ui/core": ">=4.3.0", - "@material-ui/pickers": ">=3.0.0", - "styled-components": ">=4.0.0" + "@material-ui/pickers": ">=3.0.0" }, "bugs": { "url": "https://github.com/unicef/unicef-material-ui/issues" @@ -73,6 +72,7 @@ "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-replace": "^2.2.0", "style-loader": "^0.23.1", + "styled-components": "^5.0.1", "webpack": "^4.29.6", "webpack-cli": "^3.3.6", "webpack-dev-server": "^3.2.1" From 83075e82cb10b53c07c8ef4254a90cf378132a78 Mon Sep 17 00:00:00 2001 From: sureshsevarthi Date: Tue, 18 Feb 2020 11:29:08 -0500 Subject: [PATCH 6/7] styled-components to be as dependancy --- package-lock.json | 55 +++++++++++------------------------------------ package.json | 4 ++-- 2 files changed, 14 insertions(+), 45 deletions(-) diff --git a/package-lock.json b/package-lock.json index 11323a128..80908aa1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "dev": true, "requires": { "@babel/highlight": "^7.0.0" } @@ -39,7 +38,6 @@ "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", - "dev": true, "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -52,7 +50,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz", "integrity": "sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q==", - "dev": true, "requires": { "@babel/types": "^7.0.0" } @@ -113,7 +110,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.0.0", "@babel/template": "^7.1.0", @@ -124,7 +120,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "dev": true, "requires": { "@babel/types": "^7.0.0" } @@ -232,7 +227,6 @@ "version": "7.4.4", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", - "dev": true, "requires": { "@babel/types": "^7.4.4" } @@ -264,7 +258,6 @@ "version": "7.5.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", - "dev": true, "requires": { "chalk": "^2.0.0", "esutils": "^2.0.2", @@ -274,8 +267,7 @@ "@babel/parser": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", - "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==", - "dev": true + "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==" }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", @@ -824,7 +816,6 @@ "version": "7.4.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", - "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/parser": "^7.4.4", @@ -835,7 +826,6 @@ "version": "7.5.5", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", "integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==", - "dev": true, "requires": { "@babel/code-frame": "^7.5.5", "@babel/generator": "^7.5.5", @@ -916,7 +906,6 @@ "version": "0.8.6", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.6.tgz", "integrity": "sha512-mnZMho3Sq8BfzkYYRVc8ilQTnc8U02Ytp6J1AwM6taQStZ3AhsEJBX2LzhA/LJirNCwM2VtHL3VFIZ+sNJUgUQ==", - "dev": true, "requires": { "@emotion/memoize": "0.7.4" }, @@ -924,8 +913,7 @@ "@emotion/memoize": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", - "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", - "dev": true + "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==" } } }, @@ -1641,7 +1629,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "^1.9.0" } @@ -2256,7 +2243,6 @@ "version": "1.10.7", "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz", "integrity": "sha512-MBMHGcIA22996n9hZRf/UJLVVgkEOITuR2SvjHLb5dSTUyR4ZRGn+ngITapes36FI3WLxZHfRhkA1ffHxihOrg==", - "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", "@babel/helper-module-imports": "^7.0.0", @@ -3548,8 +3534,7 @@ "camelize": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", - "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=", - "dev": true + "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=" }, "caniuse-lite": { "version": "1.0.30000988", @@ -3573,7 +3558,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3838,7 +3822,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "requires": { "color-name": "1.1.3" } @@ -3846,8 +3829,7 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "colors": { "version": "0.6.2", @@ -4271,8 +4253,7 @@ "css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", - "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=", - "dev": true + "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" }, "css-initials": { "version": "0.3.1", @@ -4312,7 +4293,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", - "dev": true, "requires": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", @@ -4322,8 +4302,7 @@ "postcss-value-parser": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", - "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==", - "dev": true + "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==" } } }, @@ -4378,7 +4357,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -7262,8 +7240,7 @@ "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "globby": { "version": "6.1.0", @@ -7381,8 +7358,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-symbols": { "version": "1.0.0", @@ -7505,7 +7481,6 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", - "dev": true, "requires": { "react-is": "^16.7.0" } @@ -8640,8 +8615,7 @@ "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, "json-parse-better-errors": { "version": "1.0.2", @@ -9417,8 +9391,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "multicast-dns": { "version": "6.2.3", @@ -13413,8 +13386,7 @@ "shallowequal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" }, "shebang-command": { "version": "1.2.0", @@ -13984,7 +13956,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.0.1.tgz", "integrity": "sha512-E0xKTRIjTs4DyvC1MHu/EcCXIj6+ENCP8hP01koyoADF++WdBUOrSGwU1scJRw7/YaYOhDvvoad6VlMG+0j53A==", - "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/traverse": "^7.4.5", @@ -14002,7 +13973,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -14360,8 +14330,7 @@ "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "trim-trailing-lines": { "version": "1.1.2", diff --git a/package.json b/package.json index 20c85b29d..aca8e12ac 100644 --- a/package.json +++ b/package.json @@ -72,13 +72,13 @@ "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-replace": "^2.2.0", "style-loader": "^0.23.1", - "styled-components": "^5.0.1", "webpack": "^4.29.6", "webpack-cli": "^3.3.6", "webpack-dev-server": "^3.2.1" }, "dependencies": { "react-form-validator-core": "^0.6.4", - "react-select": "^3.0.4" + "react-select": "^3.0.4", + "styled-components": "^5.0.1" } } From 568eb10fcd80cb5c268b4f38ee885e29600ac425 Mon Sep 17 00:00:00 2001 From: sureshsevarthi Date: Tue, 18 Feb 2020 12:06:44 -0500 Subject: [PATCH 7/7] fixed the issue with avatar and styled components --- example/package-lock.json | 39 +++++++---- example/package.json | 1 - package-lock.json | 66 ++++++++++++------- package.json | 2 +- src/components/UPeoplePicker/UPeoplePicker.js | 2 +- 5 files changed, 72 insertions(+), 38 deletions(-) diff --git a/example/package-lock.json b/example/package-lock.json index c4f869e89..15c93b464 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -10632,22 +10632,26 @@ "dependencies": { "js-tokens": { "version": "4.0.0", - "resolved": false + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "loose-envify": { "version": "1.4.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } }, "object-assign": { "version": "4.1.1", - "resolved": false + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "prop-types": { "version": "15.7.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -10656,11 +10660,13 @@ }, "react-is": { "version": "16.12.0", - "resolved": false + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", + "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" }, "scheduler": { "version": "0.13.6", - "resolved": false, + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz", + "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -10814,22 +10820,26 @@ "dependencies": { "js-tokens": { "version": "4.0.0", - "resolved": false + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "loose-envify": { "version": "1.4.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } }, "object-assign": { "version": "4.1.1", - "resolved": false + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "prop-types": { "version": "15.7.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -10838,11 +10848,13 @@ }, "react-is": { "version": "16.12.0", - "resolved": false + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", + "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" }, "scheduler": { "version": "0.13.6", - "resolved": false, + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.13.6.tgz", + "integrity": "sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -12793,7 +12805,8 @@ "version": "file:..", "requires": { "react-form-validator-core": "^0.6.4", - "react-select": "^3.0.4" + "react-select": "^3.0.4", + "styled-components": "^4.4.0" } }, "unicode-canonical-property-names-ecmascript": { diff --git a/example/package.json b/example/package.json index d13373a0b..6d4467fbc 100644 --- a/example/package.json +++ b/example/package.json @@ -15,7 +15,6 @@ "react-material-ui-form-validator": "^2.0.9", "react-router-dom": "^5.1.2", "react-scripts": "3.0.1", - "styled-components": "^4.4.1", "unicef-material-ui": "file:.." }, "scripts": { diff --git a/package-lock.json b/package-lock.json index 80908aa1f..13dbdb33f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4290,19 +4290,19 @@ } }, "css-to-react-native": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz", - "integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.3.2.tgz", + "integrity": "sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==", "requires": { "camelize": "^1.0.0", "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^4.0.2" + "postcss-value-parser": "^3.3.0" }, "dependencies": { "postcss-value-parser": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", - "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" } } }, @@ -7481,6 +7481,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz", "integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==", + "dev": true, "requires": { "react-is": "^16.7.0" } @@ -8511,6 +8512,11 @@ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, + "is-what": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.6.0.tgz", + "integrity": "sha512-2rMAWmuDACWgcy5Cp4eDXHRf4GlNjXKp3e/0etFzE5HZhCgPw8u5zeKDyLIUmtE2GP9mGK3jS7jvXYFc6qk/ZA==" + }, "is-whitespace-character": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.3.tgz", @@ -9105,6 +9111,14 @@ "readable-stream": "^2.0.1" } }, + "merge-anything": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-2.4.4.tgz", + "integrity": "sha512-l5XlriUDJKQT12bH+rVhAHjwIuXWdAIecGwsYjv2LJo+dA1AeRTmeQS+3QBpO6lEthBMDi2IUMpLC1yyRvGlwQ==", + "requires": { + "is-what": "^3.3.1" + } + }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -13383,11 +13397,6 @@ "safe-buffer": "^5.0.1" } }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -13953,22 +13962,35 @@ } }, "styled-components": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.0.1.tgz", - "integrity": "sha512-E0xKTRIjTs4DyvC1MHu/EcCXIj6+ENCP8hP01koyoADF++WdBUOrSGwU1scJRw7/YaYOhDvvoad6VlMG+0j53A==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-4.4.0.tgz", + "integrity": "sha512-xQ6vTI/0zNjZ1BBDRxyjvBddrxhQ3DxjeCdaLM1lSn5FDnkTOQgRkmWvcUiTajqc5nJqKVl+7sUioMqktD0+Zw==", "requires": { "@babel/helper-module-imports": "^7.0.0", - "@babel/traverse": "^7.4.5", - "@emotion/is-prop-valid": "^0.8.3", - "@emotion/stylis": "^0.8.4", - "@emotion/unitless": "^0.7.4", + "@babel/traverse": "^7.0.0", + "@emotion/is-prop-valid": "^0.8.1", + "@emotion/unitless": "^0.7.0", "babel-plugin-styled-components": ">= 1", - "css-to-react-native": "^3.0.0", - "hoist-non-react-statics": "^3.0.0", - "shallowequal": "^1.1.0", + "css-to-react-native": "^2.2.2", + "memoize-one": "^5.0.0", + "merge-anything": "^2.2.4", + "prop-types": "^15.5.4", + "react-is": "^16.6.0", + "stylis": "^3.5.0", + "stylis-rule-sheet": "^0.0.10", "supports-color": "^5.5.0" } }, + "stylis": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", + "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" + }, + "stylis-rule-sheet": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", + "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/package.json b/package.json index aca8e12ac..bc045e203 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,6 @@ "dependencies": { "react-form-validator-core": "^0.6.4", "react-select": "^3.0.4", - "styled-components": "^5.0.1" + "styled-components": "^4.4.0" } } diff --git a/src/components/UPeoplePicker/UPeoplePicker.js b/src/components/UPeoplePicker/UPeoplePicker.js index 62a4b2ea0..568a1786c 100644 --- a/src/components/UPeoplePicker/UPeoplePicker.js +++ b/src/components/UPeoplePicker/UPeoplePicker.js @@ -382,7 +382,7 @@ export default function UPeoplePicker(props) { options: PropTypes.array, /** It accepts all the props from TextField API. * - * `TextFieldProps={helperText = "text", inputProps={className: classes.textField}}` + * `TextFieldProps={{helperText:"text", onChange: {textFieldTargetValue}, inputProps:{className: classes.textField}}}` * */ TextFieldProps: PropTypes.object,