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

Commit ffcf3d6

Browse files
author
Matt Goo
committed
Squashed commit of the following:
commit 14b22bc Author: Matt Goo <[email protected]> Date: Tue Apr 30 12:06:32 2019 -0700 feat(select): enhanced select (#823) commit b400013 Author: Matt Goo <[email protected]> Date: Mon Apr 29 14:49:32 2019 -0700 chore: reduce unused deps in package.json (#819) commit beedb23 Author: Matt Goo <[email protected]> Date: Mon Apr 29 13:43:20 2019 -0700 feat(select): add icon (#825) commit e22ac2a Author: Matt Goo <[email protected]> Date: Mon Apr 29 13:35:45 2019 -0700 feat(select): add helper text (#824) commit abaa146 Author: Matt Goo <[email protected]> Date: Mon Apr 29 13:35:16 2019 -0700 feat(select): add option component (#826) commit 7adc12a Author: Matt Goo <[email protected]> Date: Mon Apr 29 13:11:16 2019 -0700 fix(drawer): add missing foundation import in drawer (#821) commit 7e0f877 Author: Matt Goo <[email protected]> Date: Fri Apr 26 14:33:40 2019 -0700 feat(menu): add component (#786) commit 509e93e Author: Matt Goo <[email protected]> Date: Fri Apr 26 09:46:26 2019 -0700 chore(infrastructure): add esmoduleinterop to tsconfig (#818) commit 4dbc8b8 Author: Matt Goo <[email protected]> Date: Tue Apr 16 15:56:25 2019 -0700 feat(notched-outline): update to v1.1.1 (#806) commit ea15a2a Author: 태재영 <[email protected]> Date: Sat Apr 13 06:50:37 2019 +0900 fix(chips): Fix incorrect ripple effect (#804) commit 7b413df Author: Matt Goo <[email protected]> Date: Mon Apr 8 13:27:36 2019 -0700 feat(button): update mdc web deps to v1.1.0 (#791) commit 034158c Author: Matt Goo <[email protected]> Date: Tue Apr 2 17:36:46 2019 -0700 fix: remove .only (#794) commit 74379af Author: Matt Goo <[email protected]> Date: Tue Apr 2 16:24:45 2019 -0700 fix(list): maintain classes with state.listItemClassNames (#776) BREAKING CHANGE: Removes props.tabbableOnListItemFocus from all the auxiliary components, as it seemed confusing to have this and tabIndex dictate what tabIndex would ultimately be. commit e5b953f Author: Ben McKernan <[email protected]> Date: Tue Apr 2 20:18:03 2019 +0200 fix(icon-button): upgrade to mdc-web v1.1 (#792) commit 9c7bfa7 Author: Andrii Kostenko <[email protected]> Date: Mon Apr 1 23:08:27 2019 +0300 fix(card): upgrade to mdc-web v1.1 (#788) commit bb9e7e4 Author: Andrii Kostenko <[email protected]> Date: Mon Apr 1 20:44:28 2019 +0300 fix(top-app-bar): mdc-web v1 upgrade (#780) commit 37c7269 Author: Andrii Kostenko <[email protected]> Date: Mon Apr 1 20:00:39 2019 +0300 fix(linear-progress): upgrade mdc-web to v1 (#787) commit b6403e6 Author: Andrii Kostenko <[email protected]> Date: Mon Apr 1 19:38:31 2019 +0300 fix(fab): upgrade to mdc-web v1.1 (#790) commit bcda111 Author: Andrii Kostenko <[email protected]> Date: Fri Mar 29 21:11:19 2019 +0300 fix(dialog): mdc-web v1 upgrade (#779) commit 8ff8695 Author: Andrii Kostenko <[email protected]> Date: Thu Mar 28 22:32:55 2019 +0300 fix(typography): upgrade to mdc-web v1 (#778) commit 4d6bbc0 Author: Andrii Kostenko <[email protected]> Date: Thu Mar 28 22:15:22 2019 +0300 feat(radio): upgrade to typescript v1 (#777) commit 4f523e3 Author: Andrii Kostenko <[email protected]> Date: Thu Mar 28 22:13:29 2019 +0300 fix(checkbox): upgrade mdc-web to v1 (#769) commit 1a04f3d Author: Matt Goo <[email protected]> Date: Wed Mar 27 12:39:00 2019 -0700 feat(menu-surface): upgrade to mdc web v1 (#774) commit 44cca84 Author: Andrii Kostenko <[email protected]> Date: Wed Mar 27 01:14:18 2019 +0200 feat(switch): upgrade to mdc-web v1 (#757) commit 580c850 Author: Andrii Kostenko <[email protected]> Date: Wed Mar 27 01:13:37 2019 +0200 fix(tab-bar): upgrade mdc-web to v1 (#770) commit 45fef89 Author: Matt Goo <[email protected]> Date: Mon Mar 25 15:27:29 2019 -0700 fix(card): add react-ripple to package json (#773) commit 4e99b4c Author: Matt Goo <[email protected]> Date: Tue Mar 19 14:10:37 2019 -0700 feat(list): update to MDC Web 1.0.0 (#740) commit 38e9886 Author: Matt Goo <[email protected]> Date: Tue Mar 19 12:36:06 2019 -0700 feat(floating-label): update mdc web to v1.0.0 (#741) commit dd95b60 Author: Andrii Kostenko <[email protected]> Date: Mon Mar 18 23:38:34 2019 +0200 feat(snackbar): MDC Web v1.0.0 (#755) commit 9b86474 Author: Andrii Kostenko <[email protected]> Date: Mon Mar 18 23:27:39 2019 +0200 fix(tab): mdc-web v1.0.0 upgrade (#748) commit a8c64b5 Author: Lucas Cordeiro <[email protected]> Date: Mon Mar 18 17:46:29 2019 -0300 feat(drawer): add innerRef prop (#749) commit 5f55983 Author: Andrii Kostenko <[email protected]> Date: Fri Mar 15 19:05:44 2019 +0200 fix(chips): upgrade mdc-web to v1.0.0 (#750) commit 09cb8a5 Author: Matt Goo <[email protected]> Date: Fri Mar 15 10:05:03 2019 -0700 fix: [email protected] --> [email protected] & update imports (#709) commit ae9b421 Author: Andrii Kostenko <[email protected]> Date: Thu Mar 14 20:53:28 2019 +0300 fix(tab-scroller): upgrade mdc-web to 1.0.0 (#743) commit 1b29dd9 Author: Andrii Kostenko <[email protected]> Date: Thu Mar 14 20:32:18 2019 +0300 fix(tab-indicator): upgrade mdc-web to 1.0.0 (#742) commit f966714 Author: Andrii Kostenko <[email protected]> Date: Thu Mar 14 19:45:11 2019 +0300 feat(ripple) mdc-web typescript conversion (#711) commit 0b674f5 Author: Andrii Kostenko <[email protected]> Date: Fri Mar 8 23:54:24 2019 +0300 feat(line-ripple): mdc-web typescript support (#716)
1 parent 8bf577d commit ffcf3d6

File tree

274 files changed

+8197
-3017
lines changed

Some content is hidden

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

274 files changed

+8197
-3017
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: 2440 additions & 602 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 28 additions & 32 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",
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",
8884
"@material/textfield": "^0.41.0",
89-
"@material/top-app-bar": "^0.41.0",
90-
"@material/typography": "^0.41.0",
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);

packages/card/index.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
import ActionButtons from './ActionButtons';
2626
import ActionIcons from './ActionIcons';

packages/card/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/card": "^0.41.0",
20+
"@material/card": "^1.1.0",
2121
"@material/react-ripple": "^0.11.0",
2222
"classnames": "^2.2.6",
2323
"react": "^16.4.2"

packages/checkbox/NativeControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
// THE SOFTWARE.
22-
import * as React from 'react';
22+
import React from 'react';
2323

2424
export interface NativeControlProps extends React.HTMLProps<HTMLInputElement>{
2525
checked: boolean;

packages/checkbox/index.tsx

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +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-
// @ts-ignore no mdc .d.ts file
26-
import {MDCCheckboxFoundation, MDCCheckboxAdapter} from '@material/checkbox/dist/mdc.checkbox';
27-
import * as Ripple from '@material/react-ripple';
25+
import {MDCCheckboxFoundation} from '@material/checkbox/foundation';
26+
import {MDCCheckboxAdapter} from '@material/checkbox/adapter';
27+
import {cssClasses} from '@material/checkbox/constants';
28+
import {withRipple, InjectedProps} from '@material/react-ripple';
2829

2930
import NativeControl from './NativeControl';
3031

31-
export interface CheckboxProps extends Ripple.InjectedProps<HTMLDivElement, HTMLInputElement> {
32+
export interface CheckboxProps extends InjectedProps<HTMLDivElement, HTMLInputElement> {
3233
checked?: boolean;
3334
className?: string;
3435
disabled?: boolean;
@@ -45,20 +46,22 @@ interface CheckboxState {
4546
checked?: boolean;
4647
indeterminate?: boolean;
4748
classList: Set<string>;
48-
'aria-checked': boolean;
49+
'aria-checked': string;
50+
disabled: boolean;
4951
};
5052

5153
export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
5254
inputElement: React.RefObject<HTMLInputElement> = React.createRef();
53-
foundation = MDCCheckboxFoundation;
55+
foundation!: MDCCheckboxFoundation;
5456

5557
constructor(props: CheckboxProps) {
5658
super(props);
5759
this.state = {
5860
'checked': props.checked,
5961
'indeterminate': props.indeterminate,
6062
'classList': new Set(),
61-
'aria-checked': false,
63+
'aria-checked': 'false',
64+
'disabled': props.disabled!,
6265
};
6366
}
6467

@@ -74,7 +77,7 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
7477
componentDidMount() {
7578
this.foundation = new MDCCheckboxFoundation(this.adapter);
7679
this.foundation.init();
77-
this.foundation.setDisabled(this.props.disabled);
80+
this.foundation.setDisabled(this.props.disabled!);
7881
// indeterminate property on checkboxes is not supported:
7982
// https://github.com/facebook/react/issues/1798#issuecomment-333414857
8083
if (this.inputElement.current) {
@@ -91,7 +94,7 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
9194
this.handleChange(checked!, indeterminate!);
9295
}
9396
if (disabled !== prevProps.disabled) {
94-
this.foundation.setDisabled(disabled);
97+
this.foundation.setDisabled(disabled!);
9598
}
9699
}
97100

@@ -118,7 +121,9 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
118121
get classes(): string {
119122
const {classList} = this.state;
120123
const {className} = this.props;
121-
return classnames('mdc-checkbox', Array.from(classList), className);
124+
return classnames(
125+
'mdc-checkbox', Array.from(classList),
126+
this.state.disabled ? cssClasses.DISABLED : null, className);
122127
}
123128

124129
updateState = (key: keyof CheckboxState, value: string | boolean) => {
@@ -146,10 +151,14 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
146151
// isAttachedToDOM will likely be removed
147152
// https://github.com/material-components/material-components-web/issues/3691
148153
isAttachedToDOM: () => true,
149-
isChecked: () => this.state.checked,
150-
isIndeterminate: () => this.state.indeterminate,
154+
isChecked: () => this.state.checked!,
155+
isIndeterminate: () => this.state.indeterminate!,
151156
setNativeControlAttr: this.updateState,
157+
setNativeControlDisabled: (disabled) => {
158+
this.updateState('disabled', disabled);
159+
},
152160
removeNativeControlAttr: this.removeState,
161+
forceLayout: () => null,
153162
};
154163
}
155164

@@ -169,8 +178,8 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
169178
initRipple,
170179
onChange,
171180
unbounded,
172-
/* eslint-enable no-unused-vars */
173181
disabled,
182+
/* eslint-enable no-unused-vars */
174183
nativeControlId,
175184
name,
176185
...otherProps
@@ -186,8 +195,8 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
186195
<NativeControl
187196
id={nativeControlId}
188197
checked={this.state.checked}
189-
disabled={disabled}
190-
aria-checked={this.state['aria-checked']}
198+
disabled={this.state.disabled}
199+
aria-checked={(this.state['aria-checked'] || this.state.checked!.toString()) as ('true' | 'false')}
191200
name={name}
192201
onChange={this.onChange}
193202
rippleActivatorRef={this.inputElement}
@@ -211,4 +220,4 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
211220
}
212221
}
213222

214-
export default Ripple.withRipple<CheckboxProps, HTMLDivElement, HTMLInputElement>(Checkbox);
223+
export default withRipple<CheckboxProps, HTMLDivElement, HTMLInputElement>(Checkbox);

packages/checkbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "https://github.com/material-components/material-components-web-react.git"
1717
},
1818
"dependencies": {
19-
"@material/checkbox": "^0.41.0",
19+
"@material/checkbox": "^1.1.0",
2020
"@material/react-ripple": "^0.11.0",
2121
"classnames": "^2.2.6",
2222
"react": "^16.3.2"

0 commit comments

Comments
 (0)