Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit d7c5233

Browse files
author
Matt Goo
committed
feat: update mdcweb v1.x.x (#830)
BREAKING CHANGE: Text-field, select, list have API changes. Please see PR #830 for more details.
1 parent 8bf577d commit d7c5233

File tree

275 files changed

+8642
-3396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+8642
-3396
lines changed

docs/best-practices.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ Since `[email protected]` is exporting `default`, we should be importing as such:
2727
```ts
2828
// referenced in https://github.com/basarat/typescript-book/blob/master/docs/project/external-modules.md#default-exportsimports
2929
import classnames from 'classnames';
30-
```
31-
32-
In other cases where we import modules that do not use `default`, we should import like:
33-
```ts
34-
import * as classnames from 'classnames';
3530
```

package-lock.json

Lines changed: 2446 additions & 580 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"pretest": "npm stop",
1515
"test": "npm run lint && npm run test:unit && npm run test:screenshots",
1616
"posttest": "npm stop && istanbul report --root coverage text-summary && istanbul check-coverage --lines 95 --statements 95 --branches 95 --functions 95",
17-
"postinstall": "lerna bootstrap",
17+
"postinstall": "lerna bootstrap && rm node_modules/**/.babelrc -f && rm packages/**/node_modules/.babelrc -f",
1818
"test:watch": "karma start karma.local.js --auto-watch",
1919
"test:unit": "npm run clean && cross-env NODE_ENV=test karma start karma.local.js --single-run",
2020
"test:unit-ci": "karma start karma.ci.js --single-run",
@@ -41,9 +41,11 @@
4141
"linear-progress",
4242
"list",
4343
"menu-surface",
44+
"notched-outline",
4445
"radio",
4546
"ripple",
4647
"select",
48+
"snackbar",
4749
"top-app-bar",
4850
"switch",
4951
"tab",
@@ -60,34 +62,27 @@
6062
},
6163
"devDependencies": {
6264
"@google-cloud/storage": "^1.6.0",
63-
"@material/button": "^0.43.0",
64-
"@material/card": "^0.41.0",
65-
"@material/checkbox": "^0.41.0",
66-
"@material/chips": "^0.41.0",
67-
"@material/dialog": "^0.43.0",
68-
"@material/dom": "^0.41.0",
69-
"@material/drawer": "^0.41.0",
70-
"@material/fab": "^0.41.0",
71-
"@material/floating-label": "^0.41.0",
72-
"@material/icon-button": "^0.41.0",
73-
"@material/layout-grid": "^0.41.0",
74-
"@material/line-ripple": "^0.41.0",
75-
"@material/linear-progress": "^0.41.0",
76-
"@material/list": "^0.41.0",
77-
"@material/menu-surface": "^0.41.0",
78-
"@material/notched-outline": "^0.41.0",
79-
"@material/radio": "^0.41.0",
80-
"@material/ripple": "^0.41.0",
81-
"@material/select": "^0.40.1",
82-
"@material/snackbar": "^0.43.0",
83-
"@material/switch": "^0.41.0",
84-
"@material/tab": "^0.41.0",
85-
"@material/tab-bar": "^0.41.0",
86-
"@material/tab-indicator": "^0.41.0",
87-
"@material/tab-scroller": "^0.41.0",
88-
"@material/textfield": "^0.41.0",
89-
"@material/top-app-bar": "^0.41.0",
90-
"@material/typography": "^0.41.0",
65+
"@material/base": "^1.0.0",
66+
"@material/button": "^1.1.0",
67+
"@material/card": "^1.1.0",
68+
"@material/checkbox": "^1.0.0",
69+
"@material/chips": "^1.1.1",
70+
"@material/dialog": "^1.1.0",
71+
"@material/drawer": "^1.0.1",
72+
"@material/floating-label": "^1.1.0",
73+
"@material/icon-button": "^1.1.0",
74+
"@material/line-ripple": "^1.0.0",
75+
"@material/list": "1.0.0",
76+
"@material/menu-surface": "^1.0.1",
77+
"@material/notched-outline": "^1.1.1",
78+
"@material/radio": "^1.1.0",
79+
"@material/ripple": "^1.0.0",
80+
"@material/select": "^1.1.1",
81+
"@material/snackbar": "^1.0.0",
82+
"@material/tab": "^1.0.0",
83+
"@material/tab-bar": "^1.0.0",
84+
"@material/textfield": "^1.1.1",
85+
"@material/typography": "^1.0.0",
9186
"@types/chai": "^4.1.7",
9287
"@types/classnames": "^2.2.6",
9388
"@types/enzyme": "^3.1.15",
@@ -119,8 +114,9 @@
119114
"cp-file": "^6.0.0",
120115
"cross-env": "^5.2.0",
121116
"css-loader": "^0.28.10",
122-
"enzyme": "^3.3.0",
123-
"enzyme-adapter-react-16": "^1.1.1",
117+
"enzyme": "^3.9.0",
118+
"enzyme-adapter-react-16": "^1.11.2",
119+
"enzyme-adapter-utils": "^1.10.1",
124120
"eslint": "^5.9.0",
125121
"eslint-config-google": "^0.9.1",
126122
"eslint-plugin-react": "^7.7.0",
@@ -146,13 +142,13 @@
146142
"react-dom": "^16.4.2",
147143
"react-router-dom": "^4.3.1",
148144
"remap-istanbul": "^0.12.0",
149-
"rimraf": "^2.6.3",
150145
"resemblejs": "^3.0.1",
146+
"rimraf": "^2.6.3",
151147
"sass-loader": "^6.0.7",
152148
"testdouble": "^3.6.0",
153149
"ts-loader": "^3.5.0",
154150
"ts-node": "^7.0.1",
155-
"typescript": "^3.2.2",
151+
"typescript": "^3.3.3",
156152
"typescript-eslint-parser": "^21.0.1",
157153
"utility-types": "^2.1.0",
158154
"uuid": "^3.3.2",

packages/button/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
2222

23-
import * as React from 'react';
23+
import React from 'react';
2424
import classnames from 'classnames';
25-
import * as Ripple from '@material/react-ripple';
25+
import {withRipple, InjectedProps} from '@material/react-ripple';
2626

2727
const BUTTON_CLASS_NAME = 'mdc-button__icon';
2828

2929
type ButtonTypes = HTMLAnchorElement | HTMLButtonElement;
3030

3131
export interface ButtonProps<T extends ButtonTypes>
32-
extends Ripple.InjectedProps<T>, React.AnchorHTMLAttributes<T>, React.ButtonHTMLAttributes<T> {
32+
extends InjectedProps<T>, React.AnchorHTMLAttributes<T>, React.ButtonHTMLAttributes<T> {
3333
raised?: boolean;
3434
unelevated?: boolean;
3535
outlined?: boolean;
@@ -109,5 +109,5 @@ Button.defaultProps = {
109109
initRipple: () => {},
110110
};
111111

112-
export default Ripple.withRipple<ButtonProps<ButtonTypes>, ButtonTypes>(Button);
112+
export default withRipple<ButtonProps<ButtonTypes>, ButtonTypes>(Button);
113113

packages/button/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"url": "https://github.com/material-components/material-components-web-react.git"
1818
},
1919
"dependencies": {
20-
"@material/button": "^0.43.0",
20+
"@material/button": "^1.1.0",
2121
"@material/react-ripple": "^0.11.0",
2222
"classnames": "^2.2.6",
2323
"react": "^16.4.2"

packages/card/ActionButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
2222

23-
import * as React from 'react';
23+
import React from 'react';
2424
import classnames from 'classnames';
2525

2626
type ChildType = React.ReactElement<React.HTMLProps<HTMLButtonElement|HTMLAnchorElement>>;

packages/card/ActionIcons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
2222

23-
import * as React from 'react';
23+
import React from 'react';
2424
import classnames from 'classnames';
2525

2626
type ChildType = React.ReactElement<React.HTMLProps<HTMLImageElement|HTMLOrSVGElement>>;

packages/card/Actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
2222

23-
import * as React from 'react';
23+
import React from 'react';
2424
import classnames from 'classnames';
2525

2626
export interface ActionsProps extends React.HTMLProps<HTMLDivElement> {

packages/card/Media.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
2222

23-
import * as React from 'react';
23+
import React from 'react';
2424
import classnames from 'classnames';
2525

2626
export interface MediaProps extends React.HTMLProps<HTMLDivElement> {

packages/card/PrimaryContent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
2222

23-
import * as React from 'react';
23+
import React from 'react';
2424
import classnames from 'classnames';
25-
import * as Ripple from '@material/react-ripple';
25+
import {withRipple, InjectedProps} from '@material/react-ripple';
2626

27-
export interface PrimaryContentBaseProps extends React.HTMLProps<HTMLDivElement>, Ripple.InjectedProps<HTMLDivElement>{
27+
export interface PrimaryContentBaseProps extends React.HTMLProps<HTMLDivElement>, InjectedProps<HTMLDivElement>{
2828
className: string;
2929
unbounded?: boolean;
3030
};
@@ -47,4 +47,4 @@ export const PrimaryContentBase: React.FunctionComponent<PrimaryContentBaseProps
4747
);
4848
};
4949

50-
export default Ripple.withRipple<PrimaryContentBaseProps, HTMLDivElement>(PrimaryContentBase);
50+
export default withRipple<PrimaryContentBaseProps, HTMLDivElement>(PrimaryContentBase);

0 commit comments

Comments
 (0)