Skip to content

Commit d36e986

Browse files
asynclizcopybara-github
authored andcommitted
fix(textfield): remove fullwidth variant
BREAKING_CHANGE: fullwidth variant has been removed since the changes it made were not part of spec. To achieve "fullwidth", add width: 100% to the component PiperOrigin-RevId: 318498642
1 parent 9aa1a5c commit d36e986

File tree

8 files changed

+4
-29
lines changed

8 files changed

+4
-29
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
4242
- `SingleSelectionController` now accepts `CheckableElements` rather than just MWC Radio elements
4343
- `textarea`
4444
- **BREAKING** character counters are now external by default
45+
- **BREAKING** removed `fullwidth` variant
46+
- `textfield`
47+
- **BREAKING** removed `fullwidth` variant
4548
- **BREAKING** `--mdc-tab-border-radius` has been removed to align with spec
4649
- **BREAKING** replaced `--mdc-dialog-shape-radius` with `--mdc-shape-medium`
4750
- **BREAKING** mwc-checkbox sizing changed to 48x48 by default for touch accessibility. Disable with `reducedTouchTarget` attribute or property.

packages/textarea/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,6 @@ npm install @material/mwc-textarea
115115
</mwc-textarea>
116116
```
117117

118-
### Fullwidth
119-
120-
<img src="images/fullwidth-outlined.png" width="762px">
121-
122-
```html
123-
<!-- Note: Fullwidth does not support label; only placeholder -->
124-
<mwc-textarea outlined fullwidth placeholder="My Textarea"></mwc-textarea>
125-
```
126-
127118
## API
128119

129120
### Properties/Attributes
@@ -141,7 +132,6 @@ npm install @material/mwc-textarea
141132
| `disabled` | `boolean` | Whether or not the input should be disabled.
142133
| `charCounter` | `boolean`\|`TextAreaCharCounter**` | **Note: requires `maxLength` to be set.** Display character counter with max length. Textareas may display an `"external"` or `"internal"` `charCounter`. When `true`, textareas display an external character counter by default.
143134
| `outlined` | `boolean` | Whether or not to show the material outlined variant.
144-
| `fullwidth` | `boolean` | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.
145135
| `helper` | `string` | Helper text to display below the input. Display default only when focused.
146136
| `helperPersistent` | `boolean` | Always show the helper text despite focus.
147137
| `required` | `boolean` | Displays error state if value is empty and input is blurred.
-14.1 KB
Binary file not shown.

packages/textarea/src/mwc-textarea-base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export abstract class TextAreaBase extends TextFieldBase {
6464
'mdc-text-field--no-label': !this.label,
6565
'mdc-text-field--filled': !this.outlined,
6666
'mdc-text-field--outlined': this.outlined,
67-
'mdc-text-field--fullwidth': this.fullWidth,
6867
'mdc-text-field--end-aligned': this.endAligned,
6968
'mdc-text-field--with-internal-counter': internalCounter,
7069
};

packages/textfield/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,6 @@ npm install @material/mwc-textfield
140140
</mwc-textfield>
141141
```
142142

143-
### Fullwidth
144-
145-
<img src="images/fullwidth.png" width="777px">
146-
147-
```html
148-
<!-- Note: Fullwidth does not support label; only placeholder -->
149-
<mwc-textfield fullwidth placeholder="Standard" helper="Helper Text"></mwc-textfield>
150-
```
151-
152143
## API
153144

154145
### Properties/Attributes
@@ -166,7 +157,6 @@ Name | Type | Description
166157
`disabled` | `boolean` | Whether or not the input should be disabled.
167158
`charCounter` | `boolean` | **Note: requries `maxLength` to be set.** Display character counter with max length.
168159
`outlined` | `boolean` | Whether or not to show the material outlined variant.
169-
`fullwidth` | `boolean` | Whether or not to make the input fullwidth. No longer displays `label`; only `placeholder` and `helper`.
170160
`helper` | `string` | Helper text to display below the input. Display default only when focused.
171161
`helperPersistent` | `boolean` | Always show the helper text despite focus.
172162
`required` | `boolean` | Displays error state if value is empty and input is blurred.
-13.6 KB
Binary file not shown.

packages/textfield/src/mwc-textfield-base.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ export abstract class TextFieldBase extends FormElement {
153153
})
154154
outlined = false;
155155

156-
@property({type: Boolean, reflect: true}) fullWidth = false;
157-
158156
@property({type: String}) helper = '';
159157

160158
@property({type: Boolean}) validateOnInitialRender = false;
@@ -271,7 +269,6 @@ export abstract class TextFieldBase extends FormElement {
271269
'mdc-text-field--no-label': !this.label,
272270
'mdc-text-field--filled': !this.outlined,
273271
'mdc-text-field--outlined': this.outlined,
274-
'mdc-text-field--fullwidth': this.fullWidth,
275272
'mdc-text-field--with-leading-icon': this.icon,
276273
'mdc-text-field--with-trailing-icon': this.iconTrailing,
277274
'mdc-text-field--end-aligned': this.endAligned,
@@ -373,7 +370,7 @@ export abstract class TextFieldBase extends FormElement {
373370

374371
protected renderLabelText() {
375372
let labelTemplate: TemplateResult|string = '';
376-
if (this.label && !this.fullWidth) {
373+
if (this.label) {
377374
labelTemplate = html`
378375
<span
379376
.floatingLabelFoundation=${floatingLabel(this.label)}

packages/textfield/src/mwc-textfield.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ limitations under the License.
3535
outline: none;
3636
}
3737

38-
:host([fullwidth]) {
39-
display: flex;
40-
}
41-
4238
.mdc-text-field {
4339
width: 100%;
4440

0 commit comments

Comments
 (0)