@material/web 1.0.0-pre.15 → 1.0.0-pre.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -17
- package/button/internal/_filled-button.scss +0 -1
- package/button/internal/_outlined-button.scss +6 -0
- package/button/internal/_shared.scss +7 -1
- package/button/internal/button.d.ts +15 -14
- package/button/internal/button.js +41 -39
- package/button/internal/button.js.map +1 -1
- package/button/internal/outlined-styles.css.js +1 -1
- package/button/internal/outlined-styles.css.js.map +1 -1
- package/button/internal/shared-elevation-styles.css.js +1 -1
- package/button/internal/shared-elevation-styles.css.js.map +1 -1
- package/button/internal/shared-styles.css.js +1 -1
- package/button/internal/shared-styles.css.js.map +1 -1
- package/checkbox/internal/_checkbox.scss +1 -0
- package/checkbox/internal/checkbox-styles.css.js +1 -1
- package/checkbox/internal/checkbox-styles.css.js.map +1 -1
- package/checkbox/internal/checkbox.d.ts +2 -2
- package/checkbox/internal/checkbox.js +18 -14
- package/checkbox/internal/checkbox.js.map +1 -1
- package/chips/assist-chip.js +1 -2
- package/chips/assist-chip.js.map +1 -1
- package/chips/filter-chip.js +1 -3
- package/chips/filter-chip.js.map +1 -1
- package/chips/input-chip.js +1 -5
- package/chips/input-chip.js.map +1 -1
- package/chips/internal/_assist-chip.scss +6 -0
- package/chips/internal/_elevated.scss +1 -1
- package/chips/internal/_filter-chip.scss +6 -0
- package/chips/internal/_input-chip.scss +32 -0
- package/chips/internal/_selectable.scss +17 -13
- package/chips/internal/_shared.scss +17 -10
- package/chips/internal/_suggestion-chip.scss +6 -0
- package/chips/internal/_trailing-icon.scss +24 -24
- package/chips/internal/assist-styles.css.js +1 -1
- package/chips/internal/assist-styles.css.js.map +1 -1
- package/chips/internal/elevated-styles.css.js +1 -1
- package/chips/internal/elevated-styles.css.js.map +1 -1
- package/chips/internal/filter-styles.css.js +1 -1
- package/chips/internal/filter-styles.css.js.map +1 -1
- package/chips/internal/input-styles.css.js +1 -1
- package/chips/internal/input-styles.css.js.map +1 -1
- package/chips/internal/selectable-styles.css.js +1 -1
- package/chips/internal/selectable-styles.css.js.map +1 -1
- package/chips/internal/shared-styles.css.js +1 -1
- package/chips/internal/shared-styles.css.js.map +1 -1
- package/chips/internal/suggestion-styles.css.js +1 -1
- package/chips/internal/suggestion-styles.css.js.map +1 -1
- package/chips/internal/trailing-icon-styles.css.js +1 -1
- package/chips/internal/trailing-icon-styles.css.js.map +1 -1
- package/chips/suggestion-chip.js +1 -2
- package/chips/suggestion-chip.js.map +1 -1
- package/elevation/internal/_elevation.scss +14 -7
- package/elevation/internal/elevation-styles.css.js +1 -1
- package/elevation/internal/elevation-styles.css.js.map +1 -1
- package/fab/branded-fab.d.ts +0 -1
- package/fab/internal/_fab.scss +11 -10
- package/fab/internal/_shared.scss +4 -1
- package/fab/internal/fab-styles.css.js +1 -1
- package/fab/internal/fab-styles.css.js.map +1 -1
- package/fab/internal/fab.d.ts +0 -1
- package/fab/internal/shared-styles.css.js +1 -1
- package/fab/internal/shared-styles.css.js.map +1 -1
- package/fab/internal/shared.d.ts +0 -9
- package/fab/internal/shared.js +2 -18
- package/fab/internal/shared.js.map +1 -1
- package/field/internal/filled-styles.css.js +1 -1
- package/field/internal/filled-styles.css.js.map +1 -1
- package/field/internal/outlined-styles.css.js +1 -1
- package/field/internal/outlined-styles.css.js.map +1 -1
- package/icon/internal/_icon.scss +10 -5
- package/icon/internal/icon-styles.css.js +1 -1
- package/icon/internal/icon-styles.css.js.map +1 -1
- package/iconbutton/internal/_icon-button.scss +4 -0
- package/iconbutton/internal/_shared.scss +9 -0
- package/iconbutton/internal/icon-button.d.ts +16 -3
- package/iconbutton/internal/icon-button.js +31 -7
- package/iconbutton/internal/icon-button.js.map +1 -1
- package/iconbutton/internal/shared-styles.css.js +1 -1
- package/iconbutton/internal/shared-styles.css.js.map +1 -1
- package/iconbutton/internal/standard-styles.css.js +1 -1
- package/iconbutton/internal/standard-styles.css.js.map +1 -1
- package/internal/controller/form-submitter.d.ts +12 -0
- package/internal/controller/form-submitter.js +3 -1
- package/internal/controller/form-submitter.js.map +1 -1
- package/labs/badge/internal/_badge.scss +11 -8
- package/labs/navigationbar/internal/_navigation-bar.scss +11 -9
- package/labs/navigationbar/internal/navigation-bar-styles.css.js +1 -1
- package/labs/navigationbar/internal/navigation-bar-styles.css.js.map +1 -1
- package/labs/navigationdrawer/internal/_navigation-drawer-modal.scss +11 -8
- package/labs/navigationdrawer/internal/_navigation-drawer.scss +11 -8
- package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.css.js +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.css.js.map +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-styles.css.js +1 -1
- package/labs/navigationdrawer/internal/navigation-drawer-styles.css.js.map +1 -1
- package/labs/navigationtab/internal/_navigation-tab.scss +10 -10
- package/labs/segmentedbutton/internal/_outlined-segmented-button.scss +1 -3
- package/labs/segmentedbutton/internal/outlined-styles.css.js +1 -1
- package/labs/segmentedbutton/internal/outlined-styles.css.js.map +1 -1
- package/list/internal/_list.scss +6 -2
- package/list/internal/list-styles.css.js +1 -1
- package/list/internal/list-styles.css.js.map +1 -1
- package/list/internal/listitem/_list-item.scss +83 -93
- package/list/internal/listitem/forced-colors-styles.css.js +1 -1
- package/list/internal/listitem/forced-colors-styles.css.js.map +1 -1
- package/list/internal/listitem/forced-colors-styles.scss +6 -6
- package/list/internal/listitem/list-item-styles.css.js +1 -1
- package/list/internal/listitem/list-item-styles.css.js.map +1 -1
- package/menu/internal/_menu.scss +6 -3
- package/menu/internal/menu-styles.css.js +1 -1
- package/menu/internal/menu-styles.css.js.map +1 -1
- package/menu/internal/menu.js +6 -6
- package/menu/internal/menu.js.map +1 -1
- package/menu/internal/menuitem/_menu-item.scss +7 -4
- package/menu/internal/menuitem/menu-item-styles.css.js +1 -1
- package/menu/internal/menuitem/menu-item-styles.css.js.map +1 -1
- package/package.json +1 -1
- package/progress/harness.js +2 -4
- package/progress/harness.js.map +1 -1
- package/progress/internal/_circular-progress.scss +4 -4
- package/progress/internal/_linear-progress.scss +93 -132
- package/progress/internal/circular-progress-styles.css.js +1 -1
- package/progress/internal/circular-progress-styles.css.js.map +1 -1
- package/progress/internal/circular-progress.js +1 -1
- package/progress/internal/circular-progress.js.map +1 -1
- package/progress/internal/linear-progress-styles.css.js +1 -1
- package/progress/internal/linear-progress-styles.css.js.map +1 -1
- package/progress/internal/linear-progress.d.ts +0 -11
- package/progress/internal/linear-progress.js +4 -48
- package/progress/internal/linear-progress.js.map +1 -1
- package/radio/internal/radio.d.ts +1 -1
- package/radio/internal/radio.js.map +1 -1
- package/ripple/internal/_ripple.scss +1 -1
- package/ripple/internal/ripple-styles.css.js +1 -1
- package/ripple/internal/ripple-styles.css.js.map +1 -1
- package/select/internal/_filled-select.scss +0 -1
- package/select/internal/_outlined-select.scss +0 -1
- package/select/internal/_shared.scss +0 -1
- package/select/internal/filled-select-styles.css.js +1 -1
- package/select/internal/filled-select-styles.css.js.map +1 -1
- package/select/internal/outlined-select-styles.css.js +1 -1
- package/select/internal/outlined-select-styles.css.js.map +1 -1
- package/slider/internal/_slider.scss +33 -28
- package/slider/internal/forced-colors-styles.css.js +1 -1
- package/slider/internal/forced-colors-styles.css.js.map +1 -1
- package/slider/internal/slider-styles.css.js +1 -1
- package/slider/internal/slider-styles.css.js.map +1 -1
- package/slider/internal/slider.d.ts +22 -8
- package/slider/internal/slider.js +113 -22
- package/slider/internal/slider.js.map +1 -1
- package/switch/internal/_switch.scss +9 -1
- package/switch/internal/switch-styles.css.js +1 -1
- package/switch/internal/switch-styles.css.js.map +1 -1
- package/switch/internal/switch.d.ts +1 -1
- package/switch/internal/switch.js +2 -2
- package/switch/internal/switch.js.map +1 -1
- package/tabs/internal/_tab.scss +76 -20
- package/tabs/internal/tab-styles.css.js +1 -1
- package/tabs/internal/tab-styles.css.js.map +1 -1
- package/tabs/internal/tab.js +0 -1
- package/tabs/internal/tab.js.map +1 -1
- package/textfield/internal/filled-styles.css.js +1 -1
- package/textfield/internal/filled-styles.css.js.map +1 -1
- package/textfield/internal/outlined-styles.css.js +1 -1
- package/textfield/internal/outlined-styles.css.js.map +1 -1
- package/textfield/internal/text-field.d.ts +11 -10
- package/textfield/internal/text-field.js +60 -32
- package/textfield/internal/text-field.js.map +1 -1
- package/tokens/_md-comp-filled-field.scss +2 -2
- package/tokens/_md-comp-filled-select.scss +3 -0
- package/tokens/_md-comp-filled-text-field.scss +3 -1
- package/tokens/_md-comp-list-item.scss +117 -103
- package/tokens/_md-comp-menu-item.scss +3 -3
- package/tokens/_md-comp-outlined-field.scss +2 -1
- package/tokens/_md-comp-outlined-select.scss +8 -0
- package/tokens/_md-comp-outlined-text-field.scss +3 -1
- package/chips/internal/assist-forced-colors-styles.css.d.ts +0 -1
- package/chips/internal/assist-forced-colors-styles.css.js +0 -9
- package/chips/internal/assist-forced-colors-styles.css.js.map +0 -1
- package/chips/internal/assist-forced-colors-styles.scss +0 -27
- package/chips/internal/filter-forced-colors-styles.css.d.ts +0 -1
- package/chips/internal/filter-forced-colors-styles.css.js +0 -9
- package/chips/internal/filter-forced-colors-styles.css.js.map +0 -1
- package/chips/internal/filter-forced-colors-styles.scss +0 -34
- package/chips/internal/input-forced-colors-styles.css.d.ts +0 -1
- package/chips/internal/input-forced-colors-styles.css.js +0 -9
- package/chips/internal/input-forced-colors-styles.css.js.map +0 -1
- package/chips/internal/input-forced-colors-styles.scss +0 -39
- package/chips/internal/suggestion-forced-colors-styles.css.d.ts +0 -1
- package/chips/internal/suggestion-forced-colors-styles.css.js +0 -9
- package/chips/internal/suggestion-forced-colors-styles.css.js.map +0 -1
- package/chips/internal/suggestion-forced-colors-styles.scss +0 -27
- package/internal/sass/_theme.scss +0 -249
|
@@ -66,22 +66,23 @@ export class TextField extends LitElement {
|
|
|
66
66
|
this.getInputOrTextarea().selectionStart = value;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
-
* Returns the
|
|
70
|
-
* calling `reportValidity()`.
|
|
69
|
+
* Returns the text field's validation error message.
|
|
71
70
|
*
|
|
72
|
-
* https://developer.mozilla.org/en-US/docs/Web/
|
|
71
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation
|
|
73
72
|
*/
|
|
74
73
|
get validationMessage() {
|
|
75
|
-
|
|
74
|
+
this.syncValidity();
|
|
75
|
+
return this.internals.validationMessage;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* Returns a ValidityState object that represents the validity states of the
|
|
78
|
+
* Returns a `ValidityState` object that represents the validity states of the
|
|
79
79
|
* text field.
|
|
80
80
|
*
|
|
81
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/
|
|
81
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/ValidityState
|
|
82
82
|
*/
|
|
83
83
|
get validity() {
|
|
84
|
-
|
|
84
|
+
this.syncValidity();
|
|
85
|
+
return this.internals.validity;
|
|
85
86
|
}
|
|
86
87
|
/**
|
|
87
88
|
* The text field's value as a number.
|
|
@@ -123,10 +124,11 @@ export class TextField extends LitElement {
|
|
|
123
124
|
* Returns whether an element will successfully validate based on forms
|
|
124
125
|
* validation rules and constraints.
|
|
125
126
|
*
|
|
126
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/
|
|
127
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate
|
|
127
128
|
*/
|
|
128
129
|
get willValidate() {
|
|
129
|
-
|
|
130
|
+
this.syncValidity();
|
|
131
|
+
return this.internals.willValidate;
|
|
130
132
|
}
|
|
131
133
|
get hasError() {
|
|
132
134
|
return this.error || this.nativeError;
|
|
@@ -187,6 +189,7 @@ export class TextField extends LitElement {
|
|
|
187
189
|
*/
|
|
188
190
|
this.rows = 2;
|
|
189
191
|
// <input> properties
|
|
192
|
+
this.inputMode = '';
|
|
190
193
|
/**
|
|
191
194
|
* Defines the greatest value in the range of permitted values.
|
|
192
195
|
*
|
|
@@ -269,8 +272,8 @@ export class TextField extends LitElement {
|
|
|
269
272
|
* @return true if the text field is valid, or false if not.
|
|
270
273
|
*/
|
|
271
274
|
checkValidity() {
|
|
272
|
-
|
|
273
|
-
return
|
|
275
|
+
this.syncValidity();
|
|
276
|
+
return this.internals.checkValidity();
|
|
274
277
|
}
|
|
275
278
|
/**
|
|
276
279
|
* Focuses the text field's input text.
|
|
@@ -302,14 +305,19 @@ export class TextField extends LitElement {
|
|
|
302
305
|
* @return true if the text field is valid, or false if not.
|
|
303
306
|
*/
|
|
304
307
|
reportValidity() {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
308
|
+
let invalidEvent;
|
|
309
|
+
this.addEventListener('invalid', event => {
|
|
310
|
+
invalidEvent = event;
|
|
311
|
+
}, { once: true });
|
|
312
|
+
const valid = this.checkValidity();
|
|
313
|
+
if (invalidEvent?.defaultPrevented) {
|
|
314
|
+
return valid;
|
|
315
|
+
}
|
|
316
|
+
const prevMessage = this.getErrorText();
|
|
317
|
+
this.nativeError = !valid;
|
|
318
|
+
this.nativeErrorText = this.validationMessage;
|
|
319
|
+
if (prevMessage === this.getErrorText()) {
|
|
320
|
+
this.field?.reannounceError();
|
|
313
321
|
}
|
|
314
322
|
return valid;
|
|
315
323
|
}
|
|
@@ -322,8 +330,8 @@ export class TextField extends LitElement {
|
|
|
322
330
|
this.getInputOrTextarea().select();
|
|
323
331
|
}
|
|
324
332
|
/**
|
|
325
|
-
* Sets
|
|
326
|
-
*
|
|
333
|
+
* Sets a custom validation error message for the text field. Use this for
|
|
334
|
+
* custom error message.
|
|
327
335
|
*
|
|
328
336
|
* When the error is not an empty string, the text field is considered invalid
|
|
329
337
|
* and `validity.customError` will be true.
|
|
@@ -333,7 +341,7 @@ export class TextField extends LitElement {
|
|
|
333
341
|
* @param error The error message to display.
|
|
334
342
|
*/
|
|
335
343
|
setCustomValidity(error) {
|
|
336
|
-
this.
|
|
344
|
+
this.internals.setValidity({ customError: !!error }, error, this.getInputOrTextarea());
|
|
337
345
|
}
|
|
338
346
|
setRangeText(...args) {
|
|
339
347
|
// Calling setRangeText with 1 vs 3-4 arguments has different behavior.
|
|
@@ -419,13 +427,16 @@ export class TextField extends LitElement {
|
|
|
419
427
|
// If a property such as `type` changes and causes the internal <input>
|
|
420
428
|
// value to change without dispatching an event, re-sync it.
|
|
421
429
|
const value = this.getInputOrTextarea().value;
|
|
422
|
-
this.internals.setFormValue(value);
|
|
423
430
|
if (this.value !== value) {
|
|
424
431
|
// Note this is typically inefficient in updated() since it schedules
|
|
425
432
|
// another update. However, it is needed for the <input> to fully render
|
|
426
433
|
// before checking its value.
|
|
427
434
|
this.value = value;
|
|
428
435
|
}
|
|
436
|
+
this.internals.setFormValue(value);
|
|
437
|
+
// Sync validity when properties change, since validation properties may
|
|
438
|
+
// have changed.
|
|
439
|
+
this.syncValidity();
|
|
429
440
|
}
|
|
430
441
|
renderField() {
|
|
431
442
|
return staticHtml `<${this.fieldTag}
|
|
@@ -482,7 +493,7 @@ export class TextField extends LitElement {
|
|
|
482
493
|
?required=${this.required}
|
|
483
494
|
rows=${this.rows}
|
|
484
495
|
.value=${live(this.value)}
|
|
485
|
-
@change=${this.
|
|
496
|
+
@change=${this.handleChange}
|
|
486
497
|
@input=${this.handleInput}
|
|
487
498
|
@select=${this.redispatchEvent}
|
|
488
499
|
></textarea>
|
|
@@ -490,8 +501,10 @@ export class TextField extends LitElement {
|
|
|
490
501
|
}
|
|
491
502
|
const prefix = this.renderPrefix();
|
|
492
503
|
const suffix = this.renderSuffix();
|
|
493
|
-
// TODO(b/243805848): remove `as unknown as number` once lit
|
|
494
|
-
// fixed
|
|
504
|
+
// TODO(b/243805848): remove `as unknown as number` and `as any` once lit
|
|
505
|
+
// analyzer is fixed
|
|
506
|
+
// tslint:disable-next-line:no-any
|
|
507
|
+
const inputMode = this.inputMode;
|
|
495
508
|
return html `
|
|
496
509
|
<div class="input-wrapper">
|
|
497
510
|
${prefix}
|
|
@@ -502,6 +515,7 @@ export class TextField extends LitElement {
|
|
|
502
515
|
aria-invalid=${this.hasError}
|
|
503
516
|
aria-label=${ariaLabel}
|
|
504
517
|
?disabled=${this.disabled}
|
|
518
|
+
inputmode=${inputMode || nothing}
|
|
505
519
|
max=${(this.max || nothing)}
|
|
506
520
|
maxlength=${this.maxLength > -1 ? this.maxLength : nothing}
|
|
507
521
|
min=${(this.min || nothing)}
|
|
@@ -553,6 +567,13 @@ export class TextField extends LitElement {
|
|
|
553
567
|
handleInput(event) {
|
|
554
568
|
this.dirty = true;
|
|
555
569
|
this.value = event.target.value;
|
|
570
|
+
// Sync validity so that clients can check validity on input.
|
|
571
|
+
this.syncValidity();
|
|
572
|
+
}
|
|
573
|
+
handleChange(event) {
|
|
574
|
+
// Sync validity so that clients can check validity on change.
|
|
575
|
+
this.syncValidity();
|
|
576
|
+
this.redispatchEvent(event);
|
|
556
577
|
}
|
|
557
578
|
redispatchEvent(event) {
|
|
558
579
|
redispatchEvent(this, event);
|
|
@@ -581,13 +602,17 @@ export class TextField extends LitElement {
|
|
|
581
602
|
}
|
|
582
603
|
return this.getInputOrTextarea();
|
|
583
604
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
605
|
+
syncValidity() {
|
|
606
|
+
// Sync the internal <input>'s validity and the host's ElementInternals
|
|
607
|
+
// validity. We do this to re-use native `<input>` validation messages.
|
|
608
|
+
const input = this.getInputOrTextarea();
|
|
609
|
+
if (this.internals.validity.customError) {
|
|
610
|
+
input.setCustomValidity(this.internals.validationMessage);
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
input.setCustomValidity('');
|
|
589
614
|
}
|
|
590
|
-
|
|
615
|
+
this.internals.setValidity(input.validity, input.validationMessage, this.getInputOrTextarea());
|
|
591
616
|
}
|
|
592
617
|
handleIconChange() {
|
|
593
618
|
this.hasLeadingIcon = this.leadingIcons.length > 0;
|
|
@@ -648,6 +673,9 @@ __decorate([
|
|
|
648
673
|
__decorate([
|
|
649
674
|
property({ type: Number })
|
|
650
675
|
], TextField.prototype, "rows", void 0);
|
|
676
|
+
__decorate([
|
|
677
|
+
property({ reflect: true })
|
|
678
|
+
], TextField.prototype, "inputMode", void 0);
|
|
651
679
|
__decorate([
|
|
652
680
|
property()
|
|
653
681
|
], TextField.prototype, "max", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["text-field.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,IAAI,IAAI,UAAU,EAAc,MAAM,oBAAoB,CAAC;AAInE,OAAO,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;AAoB9E;;GAEG;AACH,MAAM,OAAgB,SAAU,SAAQ,UAAU;IAqEhD;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;I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-2.0\n */\n\nimport {html, isServer, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, query, queryAssignedElements, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {live} from 'lit/directives/live.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport {html as staticHtml, StaticValue} from 'lit/static-html.js';\n\nimport {Field} from '../../field/internal/field.js';\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\nimport {redispatchEvent} from '../../internal/controller/events.js';\nimport {stringConverter} from '../../internal/controller/string-converter.js';\n\n/**\n * Input types that are compatible with the text field.\n */\nexport type TextFieldType =\n 'email'|'number'|'password'|'search'|'tel'|'text'|'url'|'textarea';\n\n/**\n * Input types that are not fully supported for the text field.\n */\nexport type UnsupportedTextFieldType =\n 'color'|'date'|'datetime-local'|'file'|'month'|'time'|'week';\n\n/**\n * Input types that are incompatible with the text field.\n */\nexport type InvalidTextFieldType =\n 'button'|'checkbox'|'hidden'|'image'|'radio'|'range'|'reset'|'submit';\n\n/**\n * A text field component.\n */\nexport abstract class TextField extends LitElement {\n static {\n requestUpdateOnAriaChange(TextField);\n }\n\n /** @nocollapse */\n static override shadowRootOptions:\n ShadowRootInit = {...LitElement.shadowRootOptions, delegatesFocus: true};\n\n /** @nocollapse */\n static formAssociated = true;\n\n @property({type: Boolean, reflect: true}) disabled = false;\n /**\n * Gets or sets whether or not the text field is in a visually invalid state.\n *\n * Calling `reportValidity()` will automatically update `error`.\n */\n @property({type: Boolean, reflect: true}) error = false;\n /**\n * The error message that replaces supporting text when `error` is true. If\n * `errorText` is an empty string, then the supporting text will continue to\n * show.\n *\n * Calling `reportValidity()` will automatically update `errorText` to the\n * native `validationMessage`.\n */\n @property({attribute: 'error-text'}) errorText = '';\n @property() label = '';\n @property({type: Boolean, reflect: true}) required = false;\n /**\n * The current value of the text field. It is always a string.\n */\n @property() value = '';\n /**\n * An optional prefix to display before the input value.\n */\n @property({attribute: 'prefix-text'}) prefixText = '';\n /**\n * An optional suffix to display after the input value.\n */\n @property({attribute: 'suffix-text'}) suffixText = '';\n /**\n * Whether or not the text field has a leading icon. Used for SSR.\n */\n @property({type: Boolean, attribute: 'has-leading-icon'})\n hasLeadingIcon = false;\n /**\n * Whether or not the text field has a trailing icon. Used for SSR.\n */\n @property({type: Boolean, attribute: 'has-trailing-icon'})\n hasTrailingIcon = false;\n /**\n * Conveys additional information below the text field, such as how it should\n * be used.\n */\n @property({attribute: 'supporting-text'}) supportingText = '';\n /**\n * Override the input text CSS `direction`. Useful for RTL languages that use\n * LTR notation for fractions.\n */\n @property({attribute: 'text-direction'}) textDirection = '';\n\n /**\n * The number of rows to display for a `type=\"textarea\"` text field.\n * Defaults to 2.\n */\n @property({type: Number}) rows = 2;\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * The labels this element is associated with.\n */\n get labels() {\n return this.internals.labels;\n }\n\n /**\n * The HTML name to use in form submission.\n */\n get name() {\n return this.getAttribute('name') ?? '';\n }\n set name(name: string) {\n this.setAttribute('name', name);\n }\n\n // <input> properties\n /**\n * Defines the greatest value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max\n */\n @property() max = '';\n /**\n * The maximum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength\n */\n @property({type: Number}) maxLength = -1;\n /**\n * Defines the most negative value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min\n */\n @property() min = '';\n /**\n * The minimum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength\n */\n @property({type: Number}) minLength = -1;\n /**\n * A regular expression that the text field's value must match to pass\n * constraint validation.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern\n */\n @property() pattern = '';\n @property({reflect: true, converter: stringConverter}) placeholder = '';\n\n /**\n * Indicates whether or not a user should be able to edit the text field's\n * value.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly\n */\n @property({type: Boolean, reflect: true}) readOnly = false;\n\n /**\n * Gets or sets the direction in which selection occurred.\n */\n get selectionDirection() {\n return this.getInputOrTextarea().selectionDirection;\n }\n set selectionDirection(value: 'forward'|'backward'|'none'|null) {\n this.getInputOrTextarea().selectionDirection = value;\n }\n\n /**\n * Gets or sets the end position or offset of a text selection.\n */\n get selectionEnd() {\n return this.getInputOrTextarea().selectionEnd;\n }\n set selectionEnd(value: number|null) {\n this.getInputOrTextarea().selectionEnd = value;\n }\n\n /**\n * Gets or sets the starting position or offset of a text selection.\n */\n get selectionStart() {\n return this.getInputOrTextarea().selectionStart;\n }\n set selectionStart(value: number|null) {\n this.getInputOrTextarea().selectionStart = value;\n }\n\n /**\n * Returns or sets the element's step attribute, which works with min and max\n * to limit the increments at which a numeric or date-time value can be set.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n */\n @property() step = '';\n\n @property({reflect: true})\n type: TextFieldType|UnsupportedTextFieldType = 'text';\n\n /**\n * Returns the native validation error message that would be displayed upon\n * calling `reportValidity()`.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage\n */\n get validationMessage() {\n return this.getInputOrTextarea().validationMessage;\n }\n\n /**\n * Returns a ValidityState object that represents the validity states of the\n * text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validity\n */\n get validity() {\n return this.getInputOrTextarea().validity;\n }\n\n /**\n * The text field's value as a number.\n */\n get valueAsNumber() {\n const input = this.getInput();\n if (!input) {\n return NaN;\n }\n\n return input.valueAsNumber;\n }\n set valueAsNumber(value: number) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.valueAsNumber = value;\n this.value = input.value;\n }\n\n /**\n * The text field's value as a Date.\n */\n get valueAsDate() {\n const input = this.getInput();\n if (!input) {\n return null;\n }\n\n return input.valueAsDate;\n }\n set valueAsDate(value: Date|null) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.valueAsDate = value;\n this.value = input.value;\n }\n\n /**\n * Returns whether an element will successfully validate based on forms\n * validation rules and constraints.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/willValidate\n */\n get willValidate() {\n return this.getInputOrTextarea().willValidate;\n }\n\n protected abstract readonly fieldTag: StaticValue;\n\n /**\n * Returns true when the text field has been interacted with. Native\n * validation errors only display in response to user interactions.\n */\n @state() private dirty = false;\n @state() private focused = false;\n /**\n * Whether or not a native error has been reported via `reportValidity()`.\n */\n @state() private nativeError = false;\n /**\n * The validation message displayed from a native error via\n * `reportValidity()`.\n */\n @state() private nativeErrorText = '';\n\n private get hasError() {\n return this.error || this.nativeError;\n }\n\n @query('.input')\n private readonly inputOrTextarea?: HTMLInputElement|HTMLTextAreaElement|null;\n @query('.field') private readonly field?: Field|null;\n @queryAssignedElements({slot: 'leadingicon'})\n private readonly leadingIcons!: Element[];\n @queryAssignedElements({slot: 'trailingicon'})\n private readonly trailingIcons!: Element[];\n private readonly internals =\n (this as HTMLElement /* needed for closure */).attachInternals();\n\n constructor() {\n super();\n if (!isServer) {\n this.addEventListener('click', this.focus);\n this.addEventListener('focusin', this.handleFocusin);\n this.addEventListener('focusout', this.handleFocusout);\n }\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n checkValidity() {\n const {valid} = this.checkValidityAndDispatch();\n return valid;\n }\n\n /**\n * Focuses the text field's input text.\n */\n override focus() {\n if (this.disabled || this.matches(':focus-within')) {\n // Don't shift focus from an element within the text field, like an icon\n // button, to the input when focus is requested.\n return;\n }\n\n super.focus();\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * This method will display or clear an error text message equal to the text\n * field's `validationMessage`, unless the invalid event is canceled.\n *\n * Use `setCustomValidity()` to customize the `validationMessage`.\n *\n * This method can also be used to re-announce error messages to screen\n * readers.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n reportValidity() {\n const {valid, canceled} = this.checkValidityAndDispatch();\n if (!canceled) {\n const prevMessage = this.getErrorText();\n this.nativeError = !valid;\n this.nativeErrorText = this.validationMessage;\n\n if (prevMessage === this.getErrorText()) {\n this.field?.reannounceError();\n }\n }\n\n return valid;\n }\n\n /**\n * Selects all the text in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select\n */\n select() {\n this.getInputOrTextarea().select();\n }\n\n /**\n * Sets the text field's native validation error message. This is used to\n * customize `validationMessage`.\n *\n * When the error is not an empty string, the text field is considered invalid\n * and `validity.customError` will be true.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity\n *\n * @param error The error message to display.\n */\n setCustomValidity(error: string) {\n this.getInputOrTextarea().setCustomValidity(error);\n }\n\n /**\n * Replaces a range of text with a new string.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setRangeText\n */\n setRangeText(replacement: string): void;\n setRangeText(\n replacement: string, start: number, end: number,\n selectionMode?: SelectionMode): void;\n setRangeText(...args: unknown[]) {\n // Calling setRangeText with 1 vs 3-4 arguments has different behavior.\n // Use spread syntax and type casting to ensure correct usage.\n this.getInputOrTextarea().setRangeText(\n ...args as Parameters<HTMLInputElement['setRangeText']>);\n this.value = this.getInputOrTextarea().value;\n }\n\n /**\n * Sets the start and end positions of a selection in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n *\n * @param start The offset into the text field for the start of the selection.\n * @param end The offset into the text field for the end of the selection.\n * @param direction The direction in which the selection is performed.\n */\n setSelectionRange(\n start: number|null, end: number|null,\n direction?: 'forward'|'backward'|'none') {\n this.getInputOrTextarea().setSelectionRange(start, end, direction);\n }\n\n /**\n * Decrements the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown\n *\n * @param stepDecrement The number of steps to decrement, defaults to 1.\n */\n stepDown(stepDecrement?: number) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.stepDown(stepDecrement);\n this.value = input.value;\n }\n\n /**\n * Increments the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp\n *\n * @param stepIncrement The number of steps to increment, defaults to 1.\n */\n stepUp(stepIncrement?: number) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.stepUp(stepIncrement);\n this.value = input.value;\n }\n\n /**\n * Reset the text field to its default value.\n */\n reset() {\n this.dirty = false;\n this.value = this.getAttribute('value') ?? '';\n this.nativeError = false;\n this.nativeErrorText = '';\n }\n\n override attributeChangedCallback(\n attribute: string, newValue: string|null, oldValue: string|null) {\n if (attribute === 'value' && this.dirty) {\n // After user input, changing the value attribute no longer updates the\n // text field's value (until reset). This matches native <input> behavior.\n return;\n }\n\n super.attributeChangedCallback(attribute, newValue, oldValue);\n }\n\n protected override render() {\n const classes = {\n 'disabled': this.disabled,\n 'error': !this.disabled && this.hasError,\n 'textarea': this.type === 'textarea',\n };\n\n return html`\n <span class=\"text-field ${classMap(classes)}\">\n ${this.renderField()}\n </span>\n `;\n }\n\n protected override updated(changedProperties: PropertyValues) {\n // Keep changedProperties arg so that subclasses may call it\n\n // If a property such as `type` changes and causes the internal <input>\n // value to change without dispatching an event, re-sync it.\n const value = this.getInputOrTextarea().value;\n this.internals.setFormValue(value);\n if (this.value !== value) {\n // Note this is typically inefficient in updated() since it schedules\n // another update. However, it is needed for the <input> to fully render\n // before checking its value.\n this.value = value;\n }\n }\n\n private renderField() {\n return staticHtml`<${this.fieldTag}\n class=\"field\"\n count=${this.value.length}\n ?disabled=${this.disabled}\n ?error=${this.hasError}\n error-text=${this.getErrorText()}\n ?focused=${this.focused}\n ?has-end=${this.hasTrailingIcon}\n ?has-start=${this.hasLeadingIcon}\n label=${this.label}\n max=${this.maxLength}\n ?populated=${!!this.value}\n ?required=${this.required}\n supporting-text=${this.supportingText}\n >\n ${this.renderLeadingIcon()}\n ${this.renderInputOrTextarea()}\n ${this.renderTrailingIcon()}\n <div id=\"description\" slot=\"aria-describedby\"></div>\n </${this.fieldTag}>`;\n }\n\n private renderLeadingIcon() {\n return html`\n <span class=\"icon leading\" slot=\"start\">\n <slot name=\"leadingicon\" @slotchange=${this.handleIconChange}></slot>\n </span>\n `;\n }\n\n private renderTrailingIcon() {\n return html`\n <span class=\"icon trailing\" slot=\"end\">\n <slot name=\"trailingicon\" @slotchange=${this.handleIconChange}></slot>\n </span>\n `;\n }\n\n private renderInputOrTextarea() {\n const style = {direction: this.textDirection};\n const ariaLabel =\n (this as ARIAMixinStrict).ariaLabel || this.label || nothing;\n\n if (this.type === 'textarea') {\n return html`\n <textarea\n class=\"input\"\n style=${styleMap(style)}\n aria-describedby=\"description\"\n aria-invalid=${this.hasError}\n aria-label=${ariaLabel}\n ?disabled=${this.disabled}\n maxlength=${this.maxLength > -1 ? this.maxLength : nothing}\n minlength=${this.minLength > -1 ? this.minLength : nothing}\n placeholder=${this.placeholder || nothing}\n ?readonly=${this.readOnly}\n ?required=${this.required}\n rows=${this.rows}\n .value=${live(this.value)}\n @change=${this.redispatchEvent}\n @input=${this.handleInput}\n @select=${this.redispatchEvent}\n ></textarea>\n `;\n }\n\n const prefix = this.renderPrefix();\n const suffix = this.renderSuffix();\n\n // TODO(b/243805848): remove `as unknown as number` once lit analyzer is\n // fixed\n return html`\n <div class=\"input-wrapper\">\n ${prefix}\n <input\n class=\"input\"\n style=${styleMap(style)}\n aria-describedby=\"description\"\n aria-invalid=${this.hasError}\n aria-label=${ariaLabel}\n ?disabled=${this.disabled}\n max=${(this.max || nothing) as unknown as number}\n maxlength=${this.maxLength > -1 ? this.maxLength : nothing}\n min=${(this.min || nothing) as unknown as number}\n minlength=${this.minLength > -1 ? this.minLength : nothing}\n pattern=${this.pattern || nothing}\n placeholder=${this.placeholder || nothing}\n ?readonly=${this.readOnly}\n ?required=${this.required}\n step=${(this.step || nothing) as unknown as number}\n type=${this.type}\n .value=${live(this.value)}\n @change=${this.redispatchEvent}\n @input=${this.handleInput}\n @select=${this.redispatchEvent}\n >\n ${suffix}\n </div>\n `;\n }\n\n private renderPrefix() {\n return this.renderAffix(this.prefixText, /* isSuffix */ false);\n }\n\n private renderSuffix() {\n return this.renderAffix(this.suffixText, /* isSuffix */ true);\n }\n\n private renderAffix(text: string, isSuffix: boolean) {\n if (!text) {\n return nothing;\n }\n\n const classes = {\n 'suffix': isSuffix,\n 'prefix': !isSuffix,\n };\n\n return html`<span class=\"${classMap(classes)}\">${text}</span>`;\n }\n\n private getErrorText() {\n return this.error ? this.errorText : this.nativeErrorText;\n }\n\n private handleFocusin() {\n this.focused = true;\n }\n\n private handleFocusout() {\n if (this.matches(':focus-within')) {\n // Changing focus to another child within the text field, like a button\n return;\n }\n\n this.focused = false;\n }\n\n private handleInput(event: InputEvent) {\n this.dirty = true;\n this.value = (event.target as HTMLInputElement).value;\n }\n\n private redispatchEvent(event: Event) {\n redispatchEvent(this, event);\n }\n\n private getInputOrTextarea() {\n if (!this.inputOrTextarea) {\n // If the input is not yet defined, synchronously render.\n // e.g.\n // const textField = document.createElement('md-outlined-text-field');\n // document.body.appendChild(textField);\n // textField.focus(); // synchronously render\n this.connectedCallback();\n this.scheduleUpdate();\n }\n\n if (this.isUpdatePending) {\n // If there are pending updates, synchronously perform them. This ensures\n // that constraint validation properties (like `required`) are synced\n // before interacting with input APIs that depend on them.\n this.scheduleUpdate();\n }\n\n return this.inputOrTextarea!;\n }\n\n private getInput() {\n if (this.type === 'textarea') {\n return null;\n }\n\n return this.getInputOrTextarea() as HTMLInputElement;\n }\n\n private checkValidityAndDispatch() {\n const valid = this.getInputOrTextarea().checkValidity();\n let canceled = false;\n if (!valid) {\n canceled = !this.dispatchEvent(new Event('invalid', {cancelable: true}));\n }\n\n return {valid, canceled};\n }\n\n private handleIconChange() {\n this.hasLeadingIcon = this.leadingIcons.length > 0;\n this.hasTrailingIcon = this.trailingIcons.length > 0;\n }\n\n /** @private */\n formResetCallback() {\n this.reset();\n }\n\n /** @private */\n formStateRestoreCallback(state: string) {\n this.value = state;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["text-field.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,IAAI,IAAI,UAAU,EAAc,MAAM,oBAAoB,CAAC;AAInE,OAAO,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;AAoB9E;;GAEG;AACH,MAAM,OAAgB,SAAU,SAAQ,UAAU;IAqEhD;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAA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AC,CAAC;4CAAyB;AAMvC;IAAX,QAAQ,EAAE;sCAAU;AAOK;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CAAgB;AAM7B;IAAX,QAAQ,EAAE;sCAAU;AAOK;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CAAgB;AAO7B;IAAX,QAAQ,EAAE;0CAAc;AAC8B;IAAtD,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAC,CAAC;8CAAkB;AAQ9B;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;2CAAkB;AAsC/C;IAAX,QAAQ,EAAE;uCAAW;AAGtB;IADC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;uCAC4B;AAkF7C;IAAR,KAAK,EAAE;wCAAuB;AACtB;IAAR,KAAK,EAAE;0CAAyB;AAIxB;IAAR,KAAK,EAAE;8CAA6B;AAK5B;IAAR,KAAK,EAAE;kDAA8B;AAOtC;IADC,KAAK,CAAC,QAAQ,CAAC;kDAC6D;AAC5D;IAAhB,KAAK,CAAC,QAAQ,CAAC;wCAAqC;AAErD;IADC,qBAAqB,CAAC,EAAC,IAAI,EAAE,aAAa,EAAC,CAAC;+CACH;AAE1C;IADC,qBAAqB,CAAC,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;gDACH","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, isServer, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, query, queryAssignedElements, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {live} from 'lit/directives/live.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport {html as staticHtml, StaticValue} from 'lit/static-html.js';\n\nimport {Field} from '../../field/internal/field.js';\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\nimport {redispatchEvent} from '../../internal/controller/events.js';\nimport {stringConverter} from '../../internal/controller/string-converter.js';\n\n/**\n * Input types that are compatible with the text field.\n */\nexport type TextFieldType =\n 'email'|'number'|'password'|'search'|'tel'|'text'|'url'|'textarea';\n\n/**\n * Input types that are not fully supported for the text field.\n */\nexport type UnsupportedTextFieldType =\n 'color'|'date'|'datetime-local'|'file'|'month'|'time'|'week';\n\n/**\n * Input types that are incompatible with the text field.\n */\nexport type InvalidTextFieldType =\n 'button'|'checkbox'|'hidden'|'image'|'radio'|'range'|'reset'|'submit';\n\n/**\n * A text field component.\n */\nexport abstract class TextField extends LitElement {\n static {\n requestUpdateOnAriaChange(TextField);\n }\n\n /** @nocollapse */\n static override shadowRootOptions:\n ShadowRootInit = {...LitElement.shadowRootOptions, delegatesFocus: true};\n\n /** @nocollapse */\n static readonly formAssociated = true;\n\n @property({type: Boolean, reflect: true}) disabled = false;\n /**\n * Gets or sets whether or not the text field is in a visually invalid state.\n *\n * Calling `reportValidity()` will automatically update `error`.\n */\n @property({type: Boolean, reflect: true}) error = false;\n /**\n * The error message that replaces supporting text when `error` is true. If\n * `errorText` is an empty string, then the supporting text will continue to\n * show.\n *\n * Calling `reportValidity()` will automatically update `errorText` to the\n * native `validationMessage`.\n */\n @property({attribute: 'error-text'}) errorText = '';\n @property() label = '';\n @property({type: Boolean, reflect: true}) required = false;\n /**\n * The current value of the text field. It is always a string.\n */\n @property() value = '';\n /**\n * An optional prefix to display before the input value.\n */\n @property({attribute: 'prefix-text'}) prefixText = '';\n /**\n * An optional suffix to display after the input value.\n */\n @property({attribute: 'suffix-text'}) suffixText = '';\n /**\n * Whether or not the text field has a leading icon. Used for SSR.\n */\n @property({type: Boolean, attribute: 'has-leading-icon'})\n hasLeadingIcon = false;\n /**\n * Whether or not the text field has a trailing icon. Used for SSR.\n */\n @property({type: Boolean, attribute: 'has-trailing-icon'})\n hasTrailingIcon = false;\n /**\n * Conveys additional information below the text field, such as how it should\n * be used.\n */\n @property({attribute: 'supporting-text'}) supportingText = '';\n /**\n * Override the input text CSS `direction`. Useful for RTL languages that use\n * LTR notation for fractions.\n */\n @property({attribute: 'text-direction'}) textDirection = '';\n\n /**\n * The number of rows to display for a `type=\"textarea\"` text field.\n * Defaults to 2.\n */\n @property({type: Number}) rows = 2;\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * The labels this element is associated with.\n */\n get labels() {\n return this.internals.labels;\n }\n\n /**\n * The HTML name to use in form submission.\n */\n get name() {\n return this.getAttribute('name') ?? '';\n }\n set name(name: string) {\n this.setAttribute('name', name);\n }\n\n // <input> properties\n @property({reflect: true}) override inputMode = '';\n /**\n * Defines the greatest value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#max\n */\n @property() max = '';\n /**\n * The maximum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength\n */\n @property({type: Number}) maxLength = -1;\n /**\n * Defines the most negative value in the range of permitted values.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#min\n */\n @property() min = '';\n /**\n * The minimum number of characters a user can enter into the text field. Set\n * to -1 for none.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength\n */\n @property({type: Number}) minLength = -1;\n /**\n * A regular expression that the text field's value must match to pass\n * constraint validation.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern\n */\n @property() pattern = '';\n @property({reflect: true, converter: stringConverter}) placeholder = '';\n\n /**\n * Indicates whether or not a user should be able to edit the text field's\n * value.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#readonly\n */\n @property({type: Boolean, reflect: true}) readOnly = false;\n\n /**\n * Gets or sets the direction in which selection occurred.\n */\n get selectionDirection() {\n return this.getInputOrTextarea().selectionDirection;\n }\n set selectionDirection(value: 'forward'|'backward'|'none'|null) {\n this.getInputOrTextarea().selectionDirection = value;\n }\n\n /**\n * Gets or sets the end position or offset of a text selection.\n */\n get selectionEnd() {\n return this.getInputOrTextarea().selectionEnd;\n }\n set selectionEnd(value: number|null) {\n this.getInputOrTextarea().selectionEnd = value;\n }\n\n /**\n * Gets or sets the starting position or offset of a text selection.\n */\n get selectionStart() {\n return this.getInputOrTextarea().selectionStart;\n }\n set selectionStart(value: number|null) {\n this.getInputOrTextarea().selectionStart = value;\n }\n\n /**\n * Returns or sets the element's step attribute, which works with min and max\n * to limit the increments at which a numeric or date-time value can be set.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n */\n @property() step = '';\n\n @property({reflect: true})\n type: TextFieldType|UnsupportedTextFieldType = 'text';\n\n /**\n * Returns the text field's validation error message.\n *\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Constraint_validation\n */\n get validationMessage() {\n this.syncValidity();\n return this.internals.validationMessage;\n }\n\n /**\n * Returns a `ValidityState` object that represents the validity states of the\n * text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n */\n get validity() {\n this.syncValidity();\n return this.internals.validity;\n }\n\n /**\n * The text field's value as a number.\n */\n get valueAsNumber() {\n const input = this.getInput();\n if (!input) {\n return NaN;\n }\n\n return input.valueAsNumber;\n }\n set valueAsNumber(value: number) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.valueAsNumber = value;\n this.value = input.value;\n }\n\n /**\n * The text field's value as a Date.\n */\n get valueAsDate() {\n const input = this.getInput();\n if (!input) {\n return null;\n }\n\n return input.valueAsDate;\n }\n set valueAsDate(value: Date|null) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.valueAsDate = value;\n this.value = input.value;\n }\n\n /**\n * Returns whether an element will successfully validate based on forms\n * validation rules and constraints.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/willValidate\n */\n get willValidate() {\n this.syncValidity();\n return this.internals.willValidate;\n }\n\n protected abstract readonly fieldTag: StaticValue;\n\n /**\n * Returns true when the text field has been interacted with. Native\n * validation errors only display in response to user interactions.\n */\n @state() private dirty = false;\n @state() private focused = false;\n /**\n * Whether or not a native error has been reported via `reportValidity()`.\n */\n @state() private nativeError = false;\n /**\n * The validation message displayed from a native error via\n * `reportValidity()`.\n */\n @state() private nativeErrorText = '';\n\n private get hasError() {\n return this.error || this.nativeError;\n }\n\n @query('.input')\n private readonly inputOrTextarea?: HTMLInputElement|HTMLTextAreaElement|null;\n @query('.field') private readonly field?: Field|null;\n @queryAssignedElements({slot: 'leadingicon'})\n private readonly leadingIcons!: Element[];\n @queryAssignedElements({slot: 'trailingicon'})\n private readonly trailingIcons!: Element[];\n private readonly internals =\n (this as HTMLElement /* needed for closure */).attachInternals();\n\n constructor() {\n super();\n if (!isServer) {\n this.addEventListener('click', this.focus);\n this.addEventListener('focusin', this.handleFocusin);\n this.addEventListener('focusout', this.handleFocusout);\n }\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checkValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n checkValidity() {\n this.syncValidity();\n return this.internals.checkValidity();\n }\n\n /**\n * Focuses the text field's input text.\n */\n override focus() {\n if (this.disabled || this.matches(':focus-within')) {\n // Don't shift focus from an element within the text field, like an icon\n // button, to the input when focus is requested.\n return;\n }\n\n super.focus();\n }\n\n /**\n * Checks the text field's native validation and returns whether or not the\n * element is valid.\n *\n * If invalid, this method will dispatch the `invalid` event.\n *\n * This method will display or clear an error text message equal to the text\n * field's `validationMessage`, unless the invalid event is canceled.\n *\n * Use `setCustomValidity()` to customize the `validationMessage`.\n *\n * This method can also be used to re-announce error messages to screen\n * readers.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/reportValidity\n *\n * @return true if the text field is valid, or false if not.\n */\n reportValidity() {\n let invalidEvent: Event|undefined;\n this.addEventListener('invalid', event => {\n invalidEvent = event;\n }, {once: true});\n\n const valid = this.checkValidity();\n if (invalidEvent?.defaultPrevented) {\n return valid;\n }\n\n const prevMessage = this.getErrorText();\n this.nativeError = !valid;\n this.nativeErrorText = this.validationMessage;\n\n if (prevMessage === this.getErrorText()) {\n this.field?.reannounceError();\n }\n\n return valid;\n }\n\n /**\n * Selects all the text in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select\n */\n select() {\n this.getInputOrTextarea().select();\n }\n\n /**\n * Sets a custom validation error message for the text field. Use this for\n * custom error message.\n *\n * When the error is not an empty string, the text field is considered invalid\n * and `validity.customError` will be true.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setCustomValidity\n *\n * @param error The error message to display.\n */\n setCustomValidity(error: string) {\n this.internals.setValidity(\n {customError: !!error}, error, this.getInputOrTextarea());\n }\n\n /**\n * Replaces a range of text with a new string.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setRangeText\n */\n setRangeText(replacement: string): void;\n setRangeText(\n replacement: string, start: number, end: number,\n selectionMode?: SelectionMode): void;\n setRangeText(...args: unknown[]) {\n // Calling setRangeText with 1 vs 3-4 arguments has different behavior.\n // Use spread syntax and type casting to ensure correct usage.\n this.getInputOrTextarea().setRangeText(\n ...args as Parameters<HTMLInputElement['setRangeText']>);\n this.value = this.getInputOrTextarea().value;\n }\n\n /**\n * Sets the start and end positions of a selection in the text field.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange\n *\n * @param start The offset into the text field for the start of the selection.\n * @param end The offset into the text field for the end of the selection.\n * @param direction The direction in which the selection is performed.\n */\n setSelectionRange(\n start: number|null, end: number|null,\n direction?: 'forward'|'backward'|'none') {\n this.getInputOrTextarea().setSelectionRange(start, end, direction);\n }\n\n /**\n * Decrements the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown\n *\n * @param stepDecrement The number of steps to decrement, defaults to 1.\n */\n stepDown(stepDecrement?: number) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.stepDown(stepDecrement);\n this.value = input.value;\n }\n\n /**\n * Increments the value of a numeric type text field by `step` or `n` `step`\n * number of times.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp\n *\n * @param stepIncrement The number of steps to increment, defaults to 1.\n */\n stepUp(stepIncrement?: number) {\n const input = this.getInput();\n if (!input) {\n return;\n }\n\n input.stepUp(stepIncrement);\n this.value = input.value;\n }\n\n /**\n * Reset the text field to its default value.\n */\n reset() {\n this.dirty = false;\n this.value = this.getAttribute('value') ?? '';\n this.nativeError = false;\n this.nativeErrorText = '';\n }\n\n override attributeChangedCallback(\n attribute: string, newValue: string|null, oldValue: string|null) {\n if (attribute === 'value' && this.dirty) {\n // After user input, changing the value attribute no longer updates the\n // text field's value (until reset). This matches native <input> behavior.\n return;\n }\n\n super.attributeChangedCallback(attribute, newValue, oldValue);\n }\n\n protected override render() {\n const classes = {\n 'disabled': this.disabled,\n 'error': !this.disabled && this.hasError,\n 'textarea': this.type === 'textarea',\n };\n\n return html`\n <span class=\"text-field ${classMap(classes)}\">\n ${this.renderField()}\n </span>\n `;\n }\n\n protected override updated(changedProperties: PropertyValues) {\n // Keep changedProperties arg so that subclasses may call it\n\n // If a property such as `type` changes and causes the internal <input>\n // value to change without dispatching an event, re-sync it.\n const value = this.getInputOrTextarea().value;\n if (this.value !== value) {\n // Note this is typically inefficient in updated() since it schedules\n // another update. However, it is needed for the <input> to fully render\n // before checking its value.\n this.value = value;\n }\n\n this.internals.setFormValue(value);\n // Sync validity when properties change, since validation properties may\n // have changed.\n this.syncValidity();\n }\n\n private renderField() {\n return staticHtml`<${this.fieldTag}\n class=\"field\"\n count=${this.value.length}\n ?disabled=${this.disabled}\n ?error=${this.hasError}\n error-text=${this.getErrorText()}\n ?focused=${this.focused}\n ?has-end=${this.hasTrailingIcon}\n ?has-start=${this.hasLeadingIcon}\n label=${this.label}\n max=${this.maxLength}\n ?populated=${!!this.value}\n ?required=${this.required}\n supporting-text=${this.supportingText}\n >\n ${this.renderLeadingIcon()}\n ${this.renderInputOrTextarea()}\n ${this.renderTrailingIcon()}\n <div id=\"description\" slot=\"aria-describedby\"></div>\n </${this.fieldTag}>`;\n }\n\n private renderLeadingIcon() {\n return html`\n <span class=\"icon leading\" slot=\"start\">\n <slot name=\"leadingicon\" @slotchange=${this.handleIconChange}></slot>\n </span>\n `;\n }\n\n private renderTrailingIcon() {\n return html`\n <span class=\"icon trailing\" slot=\"end\">\n <slot name=\"trailingicon\" @slotchange=${this.handleIconChange}></slot>\n </span>\n `;\n }\n\n private renderInputOrTextarea() {\n const style = {direction: this.textDirection};\n const ariaLabel =\n (this as ARIAMixinStrict).ariaLabel || this.label || nothing;\n\n if (this.type === 'textarea') {\n return html`\n <textarea\n class=\"input\"\n style=${styleMap(style)}\n aria-describedby=\"description\"\n aria-invalid=${this.hasError}\n aria-label=${ariaLabel}\n ?disabled=${this.disabled}\n maxlength=${this.maxLength > -1 ? this.maxLength : nothing}\n minlength=${this.minLength > -1 ? this.minLength : nothing}\n placeholder=${this.placeholder || nothing}\n ?readonly=${this.readOnly}\n ?required=${this.required}\n rows=${this.rows}\n .value=${live(this.value)}\n @change=${this.handleChange}\n @input=${this.handleInput}\n @select=${this.redispatchEvent}\n ></textarea>\n `;\n }\n\n const prefix = this.renderPrefix();\n const suffix = this.renderSuffix();\n\n // TODO(b/243805848): remove `as unknown as number` and `as any` once lit\n // analyzer is fixed\n // tslint:disable-next-line:no-any\n const inputMode = this.inputMode as any;\n return html`\n <div class=\"input-wrapper\">\n ${prefix}\n <input\n class=\"input\"\n style=${styleMap(style)}\n aria-describedby=\"description\"\n aria-invalid=${this.hasError}\n aria-label=${ariaLabel}\n ?disabled=${this.disabled}\n inputmode=${inputMode || nothing}\n max=${(this.max || nothing) as unknown as number}\n maxlength=${this.maxLength > -1 ? this.maxLength : nothing}\n min=${(this.min || nothing) as unknown as number}\n minlength=${this.minLength > -1 ? this.minLength : nothing}\n pattern=${this.pattern || nothing}\n placeholder=${this.placeholder || nothing}\n ?readonly=${this.readOnly}\n ?required=${this.required}\n step=${(this.step || nothing) as unknown as number}\n type=${this.type}\n .value=${live(this.value)}\n @change=${this.redispatchEvent}\n @input=${this.handleInput}\n @select=${this.redispatchEvent}\n >\n ${suffix}\n </div>\n `;\n }\n\n private renderPrefix() {\n return this.renderAffix(this.prefixText, /* isSuffix */ false);\n }\n\n private renderSuffix() {\n return this.renderAffix(this.suffixText, /* isSuffix */ true);\n }\n\n private renderAffix(text: string, isSuffix: boolean) {\n if (!text) {\n return nothing;\n }\n\n const classes = {\n 'suffix': isSuffix,\n 'prefix': !isSuffix,\n };\n\n return html`<span class=\"${classMap(classes)}\">${text}</span>`;\n }\n\n private getErrorText() {\n return this.error ? this.errorText : this.nativeErrorText;\n }\n\n private handleFocusin() {\n this.focused = true;\n }\n\n private handleFocusout() {\n if (this.matches(':focus-within')) {\n // Changing focus to another child within the text field, like a button\n return;\n }\n\n this.focused = false;\n }\n\n private handleInput(event: InputEvent) {\n this.dirty = true;\n this.value = (event.target as HTMLInputElement).value;\n // Sync validity so that clients can check validity on input.\n this.syncValidity();\n }\n\n private handleChange(event: Event) {\n // Sync validity so that clients can check validity on change.\n this.syncValidity();\n this.redispatchEvent(event);\n }\n\n private redispatchEvent(event: Event) {\n redispatchEvent(this, event);\n }\n\n private getInputOrTextarea() {\n if (!this.inputOrTextarea) {\n // If the input is not yet defined, synchronously render.\n // e.g.\n // const textField = document.createElement('md-outlined-text-field');\n // document.body.appendChild(textField);\n // textField.focus(); // synchronously render\n this.connectedCallback();\n this.scheduleUpdate();\n }\n\n if (this.isUpdatePending) {\n // If there are pending updates, synchronously perform them. This ensures\n // that constraint validation properties (like `required`) are synced\n // before interacting with input APIs that depend on them.\n this.scheduleUpdate();\n }\n\n return this.inputOrTextarea!;\n }\n\n private getInput() {\n if (this.type === 'textarea') {\n return null;\n }\n\n return this.getInputOrTextarea() as HTMLInputElement;\n }\n\n private syncValidity() {\n // Sync the internal <input>'s validity and the host's ElementInternals\n // validity. We do this to re-use native `<input>` validation messages.\n const input = this.getInputOrTextarea();\n if (this.internals.validity.customError) {\n input.setCustomValidity(this.internals.validationMessage);\n } else {\n input.setCustomValidity('');\n }\n\n this.internals.setValidity(\n input.validity, input.validationMessage, this.getInputOrTextarea());\n }\n\n private handleIconChange() {\n this.hasLeadingIcon = this.leadingIcons.length > 0;\n this.hasTrailingIcon = this.trailingIcons.length > 0;\n }\n\n /** @private */\n formResetCallback() {\n this.reset();\n }\n\n /** @private */\n formStateRestoreCallback(state: string) {\n this.value = state;\n }\n}\n"]}
|
|
@@ -184,8 +184,8 @@ $_default: (
|
|
|
184
184
|
map.get($text-field, 'error-trailing-icon-color'),
|
|
185
185
|
'focus-active-indicator-color':
|
|
186
186
|
map.get($text-field, 'focus-active-indicator-color'),
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
// TODO(b/259455114): remove when focus tokens update to 3px
|
|
188
|
+
'focus-active-indicator-height': if($exclude-hardcoded-values, null, 3px),
|
|
189
189
|
'focus-content-color': map.get($text-field, 'focus-input-text-color'),
|
|
190
190
|
'focus-label-text-color': map.get($text-field, 'focus-label-text-color'),
|
|
191
191
|
'focus-leading-content-color':
|
|
@@ -141,6 +141,9 @@ $_default: (
|
|
|
141
141
|
// Values pulled from b/198759625 spreadsheet
|
|
142
142
|
@return (
|
|
143
143
|
// go/keep-sorted start
|
|
144
|
+
// TODO(b/259455114): remove when focus tokens update to 3px
|
|
145
|
+
'text-field-focus-active-indicator-height':
|
|
146
|
+
if($exclude-hardcoded-values, null, 3px),
|
|
144
147
|
// TODO(b/292242500): remove once we upgrade tokens
|
|
145
148
|
'text-field-leading-icon-size': if($exclude-hardcoded-values, null, 24px),
|
|
146
149
|
// go/keep-sorted end
|
|
@@ -126,13 +126,15 @@ $_default: (
|
|
|
126
126
|
$unsupported-tokens: $unsupported-tokens
|
|
127
127
|
);
|
|
128
128
|
|
|
129
|
-
// TODO(b/271876162): remove when tokens compiler emits typescale tokens
|
|
130
129
|
$tokens: map.merge(
|
|
131
130
|
$tokens,
|
|
132
131
|
(
|
|
132
|
+
// TODO(b/271876162): remove when tokens compiler emits typescale tokens
|
|
133
133
|
'input-text-type': map.get($deps, 'md-sys-typescale', 'body-large'),
|
|
134
134
|
'label-text-type': map.get($deps, 'md-sys-typescale', 'body-large'),
|
|
135
135
|
'supporting-text-type': map.get($deps, 'md-sys-typescale', 'body-small'),
|
|
136
|
+
// TODO(b/259455114): remove when focus tokens update to 3px
|
|
137
|
+
'focus-active-indicator-height': if($exclude-hardcoded-values, null, 3px)
|
|
136
138
|
)
|
|
137
139
|
);
|
|
138
140
|
|