@material/web 1.0.0-pre.11 → 1.0.0-pre.13

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.
Files changed (166) hide show
  1. package/README.md +18 -1
  2. package/button/lib/_icon.scss +9 -9
  3. package/button/lib/_outlined-button.scss +4 -0
  4. package/button/lib/button.d.ts +0 -6
  5. package/button/lib/button.js +2 -14
  6. package/button/lib/button.js.map +1 -1
  7. package/button/lib/elevated-styles.css.js +1 -1
  8. package/button/lib/elevated-styles.css.js.map +1 -1
  9. package/button/lib/filled-styles.css.js +1 -1
  10. package/button/lib/filled-styles.css.js.map +1 -1
  11. package/button/lib/outlined-styles.css.js +1 -1
  12. package/button/lib/outlined-styles.css.js.map +1 -1
  13. package/button/lib/shared-styles.css.js +1 -1
  14. package/button/lib/shared-styles.css.js.map +1 -1
  15. package/button/lib/text-styles.css.js +1 -1
  16. package/button/lib/text-styles.css.js.map +1 -1
  17. package/button/lib/tonal-styles.css.js +1 -1
  18. package/button/lib/tonal-styles.css.js.map +1 -1
  19. package/chips/assist-chip.js +2 -1
  20. package/chips/assist-chip.js.map +1 -1
  21. package/chips/filter-chip.js +3 -1
  22. package/chips/filter-chip.js.map +1 -1
  23. package/chips/harness.d.ts +2 -5
  24. package/chips/harness.js +9 -6
  25. package/chips/harness.js.map +1 -1
  26. package/chips/input-chip.js +5 -1
  27. package/chips/input-chip.js.map +1 -1
  28. package/chips/lib/_elevated.scss +14 -0
  29. package/chips/lib/_selectable.scss +8 -0
  30. package/chips/lib/_shared.scss +1 -0
  31. package/chips/lib/_trailing-icon.scss +1 -1
  32. package/chips/lib/assist-chip.d.ts +1 -0
  33. package/chips/lib/assist-chip.js +1 -0
  34. package/chips/lib/assist-chip.js.map +1 -1
  35. package/chips/lib/assist-forced-colors-styles.css.d.ts +1 -0
  36. package/chips/lib/assist-forced-colors-styles.css.js +9 -0
  37. package/chips/lib/assist-forced-colors-styles.css.js.map +1 -0
  38. package/chips/lib/assist-forced-colors-styles.scss +27 -0
  39. package/chips/lib/chip-set.js +4 -4
  40. package/chips/lib/chip-set.js.map +1 -1
  41. package/chips/lib/elevated-styles.css.js +1 -1
  42. package/chips/lib/elevated-styles.css.js.map +1 -1
  43. package/chips/lib/filter-chip.d.ts +1 -0
  44. package/chips/lib/filter-chip.js +2 -1
  45. package/chips/lib/filter-chip.js.map +1 -1
  46. package/chips/lib/filter-forced-colors-styles.css.d.ts +1 -0
  47. package/chips/lib/filter-forced-colors-styles.css.js +9 -0
  48. package/chips/lib/filter-forced-colors-styles.css.js.map +1 -0
  49. package/chips/lib/filter-forced-colors-styles.scss +34 -0
  50. package/chips/lib/input-chip.d.ts +2 -0
  51. package/chips/lib/input-chip.js +4 -2
  52. package/chips/lib/input-chip.js.map +1 -1
  53. package/chips/lib/input-forced-colors-styles.css.d.ts +1 -0
  54. package/chips/lib/input-forced-colors-styles.css.js +9 -0
  55. package/chips/lib/input-forced-colors-styles.css.js.map +1 -0
  56. package/chips/lib/input-forced-colors-styles.scss +39 -0
  57. package/chips/lib/input-styles.css.js +1 -1
  58. package/chips/lib/input-styles.css.js.map +1 -1
  59. package/chips/lib/selectable-styles.css.js +1 -1
  60. package/chips/lib/selectable-styles.css.js.map +1 -1
  61. package/chips/lib/shared-styles.css.js +1 -1
  62. package/chips/lib/shared-styles.css.js.map +1 -1
  63. package/chips/lib/suggestion-forced-colors-styles.css.d.ts +1 -0
  64. package/chips/lib/suggestion-forced-colors-styles.css.js +9 -0
  65. package/chips/lib/suggestion-forced-colors-styles.css.js.map +1 -0
  66. package/chips/lib/suggestion-forced-colors-styles.scss +27 -0
  67. package/chips/lib/trailing-icon-styles.css.js +1 -1
  68. package/chips/lib/trailing-icon-styles.css.js.map +1 -1
  69. package/chips/suggestion-chip.js +2 -1
  70. package/chips/suggestion-chip.js.map +1 -1
  71. package/dialog/lib/_dialog.scss +2 -2
  72. package/dialog/lib/_tokens.scss +5 -22
  73. package/dialog/lib/dialog-styles.css.js +1 -1
  74. package/dialog/lib/dialog-styles.css.js.map +1 -1
  75. package/dialog/lib/dialog.d.ts +9 -3
  76. package/dialog/lib/dialog.js +24 -16
  77. package/dialog/lib/dialog.js.map +1 -1
  78. package/fab/branded-fab.d.ts +1 -0
  79. package/fab/lib/_fab.scss +12 -0
  80. package/fab/lib/fab-styles.css.js +1 -1
  81. package/fab/lib/fab-styles.css.js.map +1 -1
  82. package/fab/lib/fab.d.ts +1 -0
  83. package/fab/lib/shared.d.ts +9 -0
  84. package/fab/lib/shared.js +23 -2
  85. package/fab/lib/shared.js.map +1 -1
  86. package/field/lib/_supporting-text.scss +6 -16
  87. package/field/lib/field.d.ts +26 -2
  88. package/field/lib/field.js +100 -15
  89. package/field/lib/field.js.map +1 -1
  90. package/field/lib/outlined-field.d.ts +1 -2
  91. package/field/lib/outlined-field.js.map +1 -1
  92. package/field/lib/shared-styles.css.js +1 -1
  93. package/field/lib/shared-styles.css.js.map +1 -1
  94. package/iconbutton/lib/icon-button.js +1 -1
  95. package/iconbutton/lib/icon-button.js.map +1 -1
  96. package/labs/navigationbar/lib/navigation-bar.js +2 -2
  97. package/labs/navigationbar/lib/navigation-bar.js.map +1 -1
  98. package/labs/navigationtab/lib/navigation-tab.js +3 -3
  99. package/labs/navigationtab/lib/navigation-tab.js.map +1 -1
  100. package/labs/segmentedbutton/lib/_shared.scss +7 -7
  101. package/labs/segmentedbutton/lib/outlined-styles.css.js +1 -1
  102. package/labs/segmentedbutton/lib/outlined-styles.css.js.map +1 -1
  103. package/labs/segmentedbutton/lib/segmented-button.js +2 -2
  104. package/labs/segmentedbutton/lib/segmented-button.js.map +1 -1
  105. package/labs/segmentedbutton/lib/shared-styles.css.js +1 -1
  106. package/labs/segmentedbutton/lib/shared-styles.css.js.map +1 -1
  107. package/labs/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
  108. package/labs/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
  109. package/list/harness.d.ts +24 -0
  110. package/list/harness.js +25 -0
  111. package/list/harness.js.map +1 -1
  112. package/list/lib/list.d.ts +28 -10
  113. package/list/lib/list.js +57 -19
  114. package/list/lib/list.js.map +1 -1
  115. package/list/lib/listitem/harness.d.ts +21 -1
  116. package/list/lib/listitem/harness.js +16 -2
  117. package/list/lib/listitem/harness.js.map +1 -1
  118. package/list/lib/listitem/list-item.js +4 -4
  119. package/list/lib/listitem/list-item.js.map +1 -1
  120. package/list/lib/listitemlink/list-item-link-only.d.ts +1 -0
  121. package/list/lib/listitemlink/list-item-link-only.js +4 -1
  122. package/list/lib/listitemlink/list-item-link-only.js.map +1 -1
  123. package/menu/harness.js.map +1 -1
  124. package/menu/lib/menu.d.ts +15 -1
  125. package/menu/lib/menu.js +29 -6
  126. package/menu/lib/menu.js.map +1 -1
  127. package/package.json +5 -4
  128. package/radio/lib/single-selection-controller.js +2 -3
  129. package/radio/lib/single-selection-controller.js.map +1 -1
  130. package/select/harness.js +1 -1
  131. package/select/harness.js.map +1 -1
  132. package/select/lib/_shared.scss +2 -1
  133. package/select/lib/select.d.ts +1 -11
  134. package/select/lib/select.js +15 -51
  135. package/select/lib/select.js.map +1 -1
  136. package/select/lib/shared-styles.css.js +1 -1
  137. package/select/lib/shared-styles.css.js.map +1 -1
  138. package/slider/lib/slider.d.ts +3 -3
  139. package/slider/lib/slider.js +10 -10
  140. package/slider/lib/slider.js.map +1 -1
  141. package/switch/lib/switch.js +1 -1
  142. package/switch/lib/switch.js.map +1 -1
  143. package/tabs/lib/tab.js +4 -2
  144. package/tabs/lib/tab.js.map +1 -1
  145. package/tabs/lib/tabs.js +3 -1
  146. package/tabs/lib/tabs.js.map +1 -1
  147. package/textfield/lib/_shared.scss +0 -4
  148. package/textfield/lib/shared-styles.css.js +1 -1
  149. package/textfield/lib/shared-styles.css.js.map +1 -1
  150. package/textfield/lib/text-field.d.ts +2 -13
  151. package/textfield/lib/text-field.js +44 -98
  152. package/textfield/lib/text-field.js.map +1 -1
  153. package/tokens/_md-comp-dialog.scss +48 -6
  154. package/tokens/_md-comp-elevated-button.scss +17 -7
  155. package/tokens/_md-comp-elevation.scss +11 -2
  156. package/tokens/_md-comp-filled-button.scss +17 -7
  157. package/tokens/_md-comp-filled-tonal-button.scss +17 -7
  158. package/tokens/_md-comp-input-chip.scss +7 -0
  159. package/tokens/_md-comp-list-item.scss +5 -0
  160. package/tokens/_md-comp-menu-item.scss +1 -0
  161. package/tokens/_md-comp-outlined-button.scss +19 -9
  162. package/tokens/_md-comp-outlined-segmented-button.scss +19 -13
  163. package/tokens/_md-comp-slider.scss +48 -2
  164. package/tokens/_md-comp-suggestion-chip.scss +1 -0
  165. package/tokens/_md-comp-text-button.scss +17 -7
  166. package/tokens/_values.scss +1 -1
@@ -134,6 +134,7 @@ export class TextField extends LitElement {
134
134
  * native `validationMessage`.
135
135
  */
136
136
  this.errorText = '';
137
+ this.label = '';
137
138
  this.required = false;
138
139
  /**
139
140
  * The current value of the text field. It is always a string.
@@ -221,12 +222,6 @@ export class TextField extends LitElement {
221
222
  */
222
223
  this.dirty = false;
223
224
  this.focused = false;
224
- /**
225
- * When set to true, the error text's `role="alert"` will be removed, then
226
- * re-added after an animation frame. This will re-announce an error message
227
- * to screen readers.
228
- */
229
- this.refreshErrorAlert = false;
230
225
  /**
231
226
  * Whether or not a native error has been reported via `reportValidity()`.
232
227
  */
@@ -292,9 +287,8 @@ export class TextField extends LitElement {
292
287
  const prevMessage = this.getErrorText();
293
288
  this.nativeError = !valid;
294
289
  this.nativeErrorText = this.validationMessage;
295
- const needsRefresh = this.shouldErrorAnnounce() && prevMessage === this.getErrorText();
296
- if (needsRefresh) {
297
- this.refreshErrorAlert = true;
290
+ if (prevMessage === this.getErrorText()) {
291
+ this.field?.reannounceError();
298
292
  }
299
293
  }
300
294
  return valid;
@@ -405,13 +399,6 @@ export class TextField extends LitElement {
405
399
  // before checking its value.
406
400
  this.value = value;
407
401
  }
408
- if (this.refreshErrorAlert) {
409
- // The past render cycle removed the role="alert" from the error message.
410
- // Re-add it after an animation frame to re-announce the error.
411
- requestAnimationFrame(() => {
412
- this.refreshErrorAlert = false;
413
- });
414
- }
415
402
  }
416
403
  renderField() {
417
404
  const prefix = this.renderPrefix();
@@ -422,17 +409,19 @@ export class TextField extends LitElement {
422
409
  ?disabled=${this.disabled}
423
410
  ?error=${this.hasError}
424
411
  ?focused=${this.focused}
425
- ?hasEnd=${this.hasTrailingIcon}
426
- ?hasStart=${this.hasLeadingIcon}
427
- .label=${this.label}
412
+ ?has-end=${this.hasTrailingIcon}
413
+ ?has-start=${this.hasLeadingIcon}
414
+ label=${this.label}
428
415
  ?populated=${!!this.value}
429
416
  ?required=${this.required}
417
+ supporting-text=${this.supportingText}
418
+ error-text=${this.getErrorText()}
419
+ count=${this.value.length}
420
+ max=${this.maxLength}
430
421
  >
431
422
  ${this.renderLeadingIcon()}
432
423
  ${prefix}${input}${suffix}
433
424
  ${this.renderTrailingIcon()}
434
- ${this.renderSupportingText()}
435
- ${this.renderCounter()}
436
425
  </${this.fieldTag}>`;
437
426
  }
438
427
  renderLeadingIcon() {
@@ -453,39 +442,30 @@ export class TextField extends LitElement {
453
442
  const style = { direction: this.textDirection };
454
443
  // TODO(b/243805848): remove `as unknown as number` once lit analyzer is
455
444
  // fixed
456
- return html `<input
457
- style=${styleMap(style)}
458
- aria-autocomplete=${this.ariaAutoComplete || nothing}
459
- aria-describedby=${this.getAriaDescribedBy() || nothing}
460
- aria-expanded=${this.ariaExpanded || nothing}
461
- aria-invalid=${this.hasError}
462
- aria-label=${this.ariaLabel || this.label || nothing}
463
- ?disabled=${this.disabled}
464
- max=${(this.max || nothing)}
465
- maxlength=${this.maxLength > -1 ? this.maxLength : nothing}
466
- min=${(this.min || nothing)}
467
- minlength=${this.minLength > -1 ? this.minLength : nothing}
468
- pattern=${this.pattern || nothing}
469
- placeholder=${this.placeholder || nothing}
470
- ?readonly=${this.readOnly}
471
- ?required=${this.required}
472
- step=${(this.step || nothing)}
473
- type=${this.type}
474
- .value=${live(this.value)}
475
- @change=${this.redispatchEvent}
476
- @input=${this.handleInput}
477
- @select=${this.redispatchEvent}
478
- >`;
479
- }
480
- getAriaDescribedBy() {
481
- const ids = [];
482
- if (this.getSupportingText()) {
483
- ids.push('support');
484
- }
485
- if (this.getCounterText()) {
486
- ids.push('counter');
487
- }
488
- return ids.join(' ');
445
+ return html `
446
+ <input
447
+ style=${styleMap(style)}
448
+ aria-describedby="description"
449
+ aria-invalid=${this.hasError}
450
+ aria-label=${this.ariaLabel || this.label || nothing}
451
+ ?disabled=${this.disabled}
452
+ max=${(this.max || nothing)}
453
+ maxlength=${this.maxLength > -1 ? this.maxLength : nothing}
454
+ min=${(this.min || nothing)}
455
+ minlength=${this.minLength > -1 ? this.minLength : nothing}
456
+ pattern=${this.pattern || nothing}
457
+ placeholder=${this.placeholder || nothing}
458
+ ?readonly=${this.readOnly}
459
+ ?required=${this.required}
460
+ step=${(this.step || nothing)}
461
+ type=${this.type}
462
+ .value=${live(this.value)}
463
+ @change=${this.redispatchEvent}
464
+ @input=${this.handleInput}
465
+ @select=${this.redispatchEvent}
466
+ >
467
+ <div id="description" slot="aria-describedby"></div>
468
+ `;
489
469
  }
490
470
  renderPrefix() {
491
471
  return this.renderAffix(this.prefixText, /* isSuffix */ false);
@@ -503,43 +483,9 @@ export class TextField extends LitElement {
503
483
  };
504
484
  return html `<span class="${classMap(classes)}">${text}</span>`;
505
485
  }
506
- renderSupportingText() {
507
- const text = this.getSupportingText();
508
- if (!text) {
509
- return nothing;
510
- }
511
- return html `<span id="support"
512
- slot="supporting-text"
513
- role=${this.shouldErrorAnnounce() ? 'alert' : nothing}>${text}</span>`;
514
- }
515
- getSupportingText() {
516
- const errorText = this.getErrorText();
517
- return this.hasError && errorText ? errorText : this.supportingText;
518
- }
519
486
  getErrorText() {
520
487
  return this.error ? this.errorText : this.nativeErrorText;
521
488
  }
522
- shouldErrorAnnounce() {
523
- // Announce if there is an error and error text visible.
524
- // If refreshErrorAlert is true, do not announce. This will remove the
525
- // role="alert" attribute. Another render cycle will happen after an
526
- // animation frame to re-add the role.
527
- return this.hasError && !!this.getErrorText() && !this.refreshErrorAlert;
528
- }
529
- renderCounter() {
530
- const text = this.getCounterText();
531
- if (!text) {
532
- return nothing;
533
- }
534
- // TODO(b/244473435): add aria-label and announcements
535
- return html `<span id="counter"
536
- class="counter"
537
- slot="supporting-text-end">${text}</span>`;
538
- }
539
- getCounterText() {
540
- return this.maxLength > -1 ? `${this.value.length} / ${this.maxLength}` :
541
- '';
542
- }
543
489
  handleFocusin() {
544
490
  this.focused = true;
545
491
  }
@@ -612,7 +558,7 @@ __decorate([
612
558
  property({ type: Boolean, reflect: true })
613
559
  ], TextField.prototype, "error", void 0);
614
560
  __decorate([
615
- property()
561
+ property({ attribute: 'error-text' })
616
562
  ], TextField.prototype, "errorText", void 0);
617
563
  __decorate([
618
564
  property()
@@ -624,22 +570,22 @@ __decorate([
624
570
  property()
625
571
  ], TextField.prototype, "value", void 0);
626
572
  __decorate([
627
- property()
573
+ property({ attribute: 'prefix-text' })
628
574
  ], TextField.prototype, "prefixText", void 0);
629
575
  __decorate([
630
- property()
576
+ property({ attribute: 'suffix-text' })
631
577
  ], TextField.prototype, "suffixText", void 0);
632
578
  __decorate([
633
- property({ type: Boolean })
579
+ property({ type: Boolean, attribute: 'has-leading-icon' })
634
580
  ], TextField.prototype, "hasLeadingIcon", void 0);
635
581
  __decorate([
636
- property({ type: Boolean })
582
+ property({ type: Boolean, attribute: 'has-trailing-icon' })
637
583
  ], TextField.prototype, "hasTrailingIcon", void 0);
638
584
  __decorate([
639
- property()
585
+ property({ attribute: 'supporting-text' })
640
586
  ], TextField.prototype, "supportingText", void 0);
641
587
  __decorate([
642
- property()
588
+ property({ attribute: 'text-direction' })
643
589
  ], TextField.prototype, "textDirection", void 0);
644
590
  __decorate([
645
591
  property()
@@ -674,9 +620,6 @@ __decorate([
674
620
  __decorate([
675
621
  state()
676
622
  ], TextField.prototype, "focused", void 0);
677
- __decorate([
678
- state()
679
- ], TextField.prototype, "refreshErrorAlert", void 0);
680
623
  __decorate([
681
624
  state()
682
625
  ], TextField.prototype, "nativeError", void 0);
@@ -686,6 +629,9 @@ __decorate([
686
629
  __decorate([
687
630
  query('input')
688
631
  ], TextField.prototype, "input", void 0);
632
+ __decorate([
633
+ query('.field')
634
+ ], TextField.prototype, "field", void 0);
689
635
  __decorate([
690
636
  queryAssignedElements({ slot: 'leadingicon' })
691
637
  ], TextField.prototype, "leadingIcons", 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;AAGnE,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;IA6DhD;;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,MAA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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 {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';\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(this);\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() errorText = '';\n @property() label?: string;\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() prefixText = '';\n /**\n * An optional suffix to display after the input value.\n */\n @property() suffixText = '';\n /**\n * Whether or not the text field has a leading icon. Used for SSR.\n */\n @property({type: Boolean}) hasLeadingIcon = false;\n /**\n * Whether or not the text field has a trailing icon. Used for SSR.\n */\n @property({type: Boolean}) hasTrailingIcon = false;\n /**\n * Conveys additional information below the text field, such as how it should\n * be used.\n */\n @property() supportingText = '';\n /**\n * Override the input text CSS `direction`. Useful for RTL languages that use\n * LTR notation for fractions.\n */\n @property() textDirection = '';\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.getInput().selectionDirection;\n }\n set selectionDirection(value: 'forward'|'backward'|'none'|null) {\n this.getInput().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.getInput().selectionEnd;\n }\n set selectionEnd(value: number|null) {\n this.getInput().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.getInput().selectionStart;\n }\n set selectionStart(value: number|null) {\n this.getInput().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.getInput().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.getInput().validity;\n }\n\n /**\n * The text field's value as a number.\n */\n get valueAsNumber() {\n return this.getInput().valueAsNumber;\n }\n set valueAsNumber(value: number) {\n this.getInput().valueAsNumber = value;\n this.value = this.getInput().value;\n }\n\n /**\n * The text field's value as a Date.\n */\n get valueAsDate() {\n return this.getInput().valueAsDate;\n }\n set valueAsDate(value: Date|null) {\n this.getInput().valueAsDate = value;\n this.value = this.getInput().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.getInput().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 * When set to true, the error text's `role=\"alert\"` will be removed, then\n * re-added after an animation frame. This will re-announce an error message\n * to screen readers.\n */\n @state() private refreshErrorAlert = 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') private readonly input?: HTMLInputElement|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 const needsRefresh =\n this.shouldErrorAnnounce() && prevMessage === this.getErrorText();\n if (needsRefresh) {\n this.refreshErrorAlert = true;\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.getInput().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.getInput().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.getInput().setRangeText(\n ...args as Parameters<HTMLInputElement['setRangeText']>);\n this.value = this.getInput().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.getInput().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 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 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 };\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.getInput().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 if (this.refreshErrorAlert) {\n // The past render cycle removed the role=\"alert\" from the error message.\n // Re-add it after an animation frame to re-announce the error.\n requestAnimationFrame(() => {\n this.refreshErrorAlert = false;\n });\n }\n }\n\n private renderField() {\n const prefix = this.renderPrefix();\n const suffix = this.renderSuffix();\n const input = this.renderInput();\n\n return staticHtml`<${this.fieldTag}\n class=\"field\"\n ?disabled=${this.disabled}\n ?error=${this.hasError}\n ?focused=${this.focused}\n ?hasEnd=${this.hasTrailingIcon}\n ?hasStart=${this.hasLeadingIcon}\n .label=${this.label}\n ?populated=${!!this.value}\n ?required=${this.required}\n >\n ${this.renderLeadingIcon()}\n ${prefix}${input}${suffix}\n ${this.renderTrailingIcon()}\n ${this.renderSupportingText()}\n ${this.renderCounter()}\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 renderInput() {\n const style = {direction: this.textDirection};\n\n // TODO(b/243805848): remove `as unknown as number` once lit analyzer is\n // fixed\n return html`<input\n style=${styleMap(style)}\n aria-autocomplete=${\n (this as ARIAMixinStrict).ariaAutoComplete || nothing}\n aria-describedby=${this.getAriaDescribedBy() || nothing}\n aria-expanded=${(this as ARIAMixinStrict).ariaExpanded || nothing}\n aria-invalid=${this.hasError}\n aria-label=${\n (this as ARIAMixinStrict).ariaLabel || this.label || nothing}\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 }\n\n private getAriaDescribedBy() {\n const ids: string[] = [];\n if (this.getSupportingText()) {\n ids.push('support');\n }\n\n if (this.getCounterText()) {\n ids.push('counter');\n }\n\n return ids.join(' ');\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 renderSupportingText() {\n const text = this.getSupportingText();\n if (!text) {\n return nothing;\n }\n\n return html`<span id=\"support\"\n slot=\"supporting-text\"\n role=${this.shouldErrorAnnounce() ? 'alert' : nothing}>${text}</span>`;\n }\n\n private getSupportingText() {\n const errorText = this.getErrorText();\n return this.hasError && errorText ? errorText : this.supportingText;\n }\n\n private getErrorText() {\n return this.error ? this.errorText : this.nativeErrorText;\n }\n\n private shouldErrorAnnounce() {\n // Announce if there is an error and error text visible.\n // If refreshErrorAlert is true, do not announce. This will remove the\n // role=\"alert\" attribute. Another render cycle will happen after an\n // animation frame to re-add the role.\n return this.hasError && !!this.getErrorText() && !this.refreshErrorAlert;\n }\n\n private renderCounter() {\n const text = this.getCounterText();\n if (!text) {\n return nothing;\n }\n\n // TODO(b/244473435): add aria-label and announcements\n return html`<span id=\"counter\"\n class=\"counter\"\n slot=\"supporting-text-end\">${text}</span>`;\n }\n\n private getCounterText() {\n return this.maxLength > -1 ? `${this.value.length} / ${this.maxLength}` :\n '';\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 this.redispatchEvent(event);\n }\n\n private redispatchEvent(event: Event) {\n redispatchEvent(this, event);\n }\n\n private getInput() {\n if (!this.input) {\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.input!;\n }\n\n private checkValidityAndDispatch() {\n const valid = this.getInput().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;IA+DhD;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH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;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/lib/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';\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(this);\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 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.getInput().selectionDirection;\n }\n set selectionDirection(value: 'forward'|'backward'|'none'|null) {\n this.getInput().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.getInput().selectionEnd;\n }\n set selectionEnd(value: number|null) {\n this.getInput().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.getInput().selectionStart;\n }\n set selectionStart(value: number|null) {\n this.getInput().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.getInput().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.getInput().validity;\n }\n\n /**\n * The text field's value as a number.\n */\n get valueAsNumber() {\n return this.getInput().valueAsNumber;\n }\n set valueAsNumber(value: number) {\n this.getInput().valueAsNumber = value;\n this.value = this.getInput().value;\n }\n\n /**\n * The text field's value as a Date.\n */\n get valueAsDate() {\n return this.getInput().valueAsDate;\n }\n set valueAsDate(value: Date|null) {\n this.getInput().valueAsDate = value;\n this.value = this.getInput().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.getInput().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') private readonly input?: HTMLInputElement|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.getInput().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.getInput().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.getInput().setRangeText(\n ...args as Parameters<HTMLInputElement['setRangeText']>);\n this.value = this.getInput().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.getInput().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 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 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 };\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.getInput().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 const prefix = this.renderPrefix();\n const suffix = this.renderSuffix();\n const input = this.renderInput();\n\n return staticHtml`<${this.fieldTag}\n class=\"field\"\n ?disabled=${this.disabled}\n ?error=${this.hasError}\n ?focused=${this.focused}\n ?has-end=${this.hasTrailingIcon}\n ?has-start=${this.hasLeadingIcon}\n label=${this.label}\n ?populated=${!!this.value}\n ?required=${this.required}\n supporting-text=${this.supportingText}\n error-text=${this.getErrorText()}\n count=${this.value.length}\n max=${this.maxLength}\n >\n ${this.renderLeadingIcon()}\n ${prefix}${input}${suffix}\n ${this.renderTrailingIcon()}\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 renderInput() {\n const style = {direction: this.textDirection};\n\n // TODO(b/243805848): remove `as unknown as number` once lit analyzer is\n // fixed\n return html`\n <input\n style=${styleMap(style)}\n aria-describedby=\"description\"\n aria-invalid=${this.hasError}\n aria-label=${\n (this as ARIAMixinStrict).ariaLabel || this.label || nothing}\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 <div id=\"description\" slot=\"aria-describedby\"></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 this.redispatchEvent(event);\n }\n\n private redispatchEvent(event: Event) {\n redispatchEvent(this, event);\n }\n\n private getInput() {\n if (!this.input) {\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.input!;\n }\n\n private checkValidityAndDispatch() {\n const valid = this.getInput().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"]}
@@ -13,8 +13,23 @@
13
13
  @use './md-sys-state';
14
14
  @use './md-sys-typescale';
15
15
  @use './v0_172/md-comp-dialog';
16
+ @use './values';
16
17
  // go/keep-sorted end
17
18
 
19
+ $supported-tokens: (
20
+ // go/keep-sorted start
21
+ 'container-color',
22
+ 'container-elevation',
23
+ 'container-shape',
24
+ 'headline-color',
25
+ 'headline-type',
26
+ 'icon-color',
27
+ 'icon-size',
28
+ 'supporting-text-color',
29
+ 'supporting-text-type',
30
+ // go/keep-sorted end
31
+ );
32
+
18
33
  $_default: (
19
34
  'md-sys-color': md-sys-color.values-light(),
20
35
  'md-sys-elevation': md-sys-elevation.values(),
@@ -23,7 +38,26 @@ $_default: (
23
38
  'md-sys-typescale': md-sys-typescale.values(),
24
39
  );
25
40
 
26
- $_unsupported-tokens: (
41
+ // Note: currently ignoring tokens for `action-*-label-text` and
42
+ // `action-*-state-layer` since actions are spec'd as standard text buttons.
43
+ $unsupported-tokens: (
44
+ // go/keep-sorted start
45
+ 'action-focus-label-text-color',
46
+ 'action-focus-state-layer-color',
47
+ 'action-focus-state-layer-opacity',
48
+ 'action-hover-label-text-color',
49
+ 'action-hover-state-layer-color',
50
+ 'action-hover-state-layer-opacity',
51
+ 'action-label-text-color',
52
+ 'action-label-text-font',
53
+ 'action-label-text-line-height',
54
+ 'action-label-text-size',
55
+ 'action-label-text-tracking',
56
+ 'action-label-text-type',
57
+ 'action-label-text-weight',
58
+ 'action-pressed-label-text-color',
59
+ 'action-pressed-state-layer-color',
60
+ 'action-pressed-state-layer-opacity',
27
61
  'headline-font',
28
62
  'headline-line-height',
29
63
  'headline-size',
@@ -33,18 +67,26 @@ $_unsupported-tokens: (
33
67
  'supporting-text-line-height',
34
68
  'supporting-text-size',
35
69
  'supporting-text-tracking',
36
- 'supporting-text-weight'
70
+ 'supporting-text-weight',
71
+ // go/keep-sorted end
37
72
  );
38
73
 
39
74
  @function values($deps: $_default, $exclude-hardcoded-values: false) {
40
- $tokens: md-comp-dialog.values($deps, $exclude-hardcoded-values);
41
- $tokens: map.remove($tokens, $_unsupported-tokens...);
75
+ $tokens: values.validate(
76
+ md-comp-dialog.values($deps, $exclude-hardcoded-values),
77
+ $supported-tokens: $supported-tokens,
78
+ $unsupported-tokens: $unsupported-tokens,
79
+ $renamed-tokens: (
80
+ // Remove "with-*" prefixes (b/273534858)
81
+ 'with-icon-icon-color': 'icon-color',
82
+ 'with-icon-icon-size': 'icon-size'
83
+ )
84
+ );
85
+
42
86
  // TODO(b/271876162): remove when tokens compiler emits typescale tokens
43
87
  $tokens: map.merge(
44
88
  $tokens,
45
89
  (
46
- 'action-label-text-type':
47
- map.get($deps, 'md-sys-typescale', 'label-large'),
48
90
  'headline-type': map.get($deps, 'md-sys-typescale', 'headline-small'),
49
91
  )
50
92
  );
@@ -26,29 +26,29 @@ $supported-tokens: (
26
26
  'disabled-container-color',
27
27
  'disabled-container-elevation',
28
28
  'disabled-container-opacity',
29
+ 'disabled-icon-color',
30
+ 'disabled-icon-opacity',
29
31
  'disabled-label-text-color',
30
32
  'disabled-label-text-opacity',
31
33
  'focus-container-elevation',
34
+ 'focus-icon-color',
32
35
  'focus-label-text-color',
33
36
  'hover-container-elevation',
37
+ 'hover-icon-color',
34
38
  'hover-label-text-color',
35
39
  'hover-state-layer-color',
36
40
  'hover-state-layer-opacity',
41
+ 'icon-color',
42
+ 'icon-size',
37
43
  'label-text-color',
38
44
  'label-text-type',
39
45
  'pressed-container-elevation',
46
+ 'pressed-icon-color',
40
47
  'pressed-label-text-color',
41
48
  'pressed-state-layer-color',
42
49
  'pressed-state-layer-opacity',
43
50
  'spacing-leading',
44
51
  'spacing-trailing',
45
- 'with-icon-disabled-icon-color',
46
- 'with-icon-disabled-icon-opacity',
47
- 'with-icon-focus-icon-color',
48
- 'with-icon-hover-icon-color',
49
- 'with-icon-icon-color',
50
- 'with-icon-icon-size',
51
- 'with-icon-pressed-icon-color',
52
52
  'with-icon-spacing-leading',
53
53
  'with-icon-spacing-trailing',
54
54
  'with-trailing-icon-spacing-leading',
@@ -93,6 +93,16 @@ $_default: (
93
93
  'with-trailing-icon-spacing-trailing':
94
94
  if($exclude-hardcoded-values, null, 16px),
95
95
  // go/keep-sorted end
96
+ ),
97
+ $renamed-tokens: (
98
+ // Remove "with-*" prefixes (b/273534858)
99
+ 'with-icon-disabled-icon-color': 'disabled-icon-color',
100
+ 'with-icon-disabled-icon-opacity': 'disabled-icon-opacity',
101
+ 'with-icon-focus-icon-color': 'focus-icon-color',
102
+ 'with-icon-hover-icon-color': 'hover-icon-color',
103
+ 'with-icon-icon-color': 'icon-color',
104
+ 'with-icon-icon-size': 'icon-size',
105
+ 'with-icon-pressed-icon-color': 'pressed-icon-color'
96
106
  )
97
107
  );
98
108
 
@@ -9,16 +9,25 @@
9
9
  // go/keep-sorted start
10
10
  @use './md-sys-color';
11
11
  @use './md-sys-elevation';
12
+ @use './values';
12
13
  // go/keep-sorted end
13
14
 
15
+ $supported-tokens: (
16
+ // go/keep-sorted start
17
+ 'level',
18
+ 'shadow-color',
19
+ // go/keep-sorted end
20
+ );
21
+
14
22
  $_default: (
15
23
  'md-sys-color': md-sys-color.values-light(),
16
24
  'md-sys-elevation': md-sys-elevation.values(),
17
25
  );
18
26
 
19
27
  @function values($deps: $_default, $exclude-hardcoded-values: false) {
20
- @return (
28
+ $tokens: (
21
29
  'level': map.get($deps, 'md-sys-elevation', 'level0'),
22
- 'shadow-color': map.get($deps, 'md-sys-color', 'shadow')
30
+ 'shadow-color': map.get($deps, 'md-sys-color', 'shadow'),
23
31
  );
32
+ @return values.validate($tokens, $supported-tokens: $supported-tokens);
24
33
  }
@@ -26,29 +26,29 @@ $supported-tokens: (
26
26
  'disabled-container-color',
27
27
  'disabled-container-elevation',
28
28
  'disabled-container-opacity',
29
+ 'disabled-icon-color',
30
+ 'disabled-icon-opacity',
29
31
  'disabled-label-text-color',
30
32
  'disabled-label-text-opacity',
31
33
  'focus-container-elevation',
34
+ 'focus-icon-color',
32
35
  'focus-label-text-color',
33
36
  'hover-container-elevation',
37
+ 'hover-icon-color',
34
38
  'hover-label-text-color',
35
39
  'hover-state-layer-color',
36
40
  'hover-state-layer-opacity',
41
+ 'icon-color',
42
+ 'icon-size',
37
43
  'label-text-color',
38
44
  'label-text-type',
39
45
  'pressed-container-elevation',
46
+ 'pressed-icon-color',
40
47
  'pressed-label-text-color',
41
48
  'pressed-state-layer-color',
42
49
  'pressed-state-layer-opacity',
43
50
  'spacing-leading',
44
51
  'spacing-trailing',
45
- 'with-icon-disabled-icon-color',
46
- 'with-icon-disabled-icon-opacity',
47
- 'with-icon-focus-icon-color',
48
- 'with-icon-hover-icon-color',
49
- 'with-icon-icon-color',
50
- 'with-icon-icon-size',
51
- 'with-icon-pressed-icon-color',
52
52
  'with-icon-spacing-leading',
53
53
  'with-icon-spacing-trailing',
54
54
  'with-trailing-icon-spacing-leading',
@@ -93,6 +93,16 @@ $_default: (
93
93
  'with-trailing-icon-spacing-trailing':
94
94
  if($exclude-hardcoded-values, null, 16px),
95
95
  // go/keep-sorted end
96
+ ),
97
+ $renamed-tokens: (
98
+ // Remove "with-*" prefixes (b/273534858)
99
+ 'with-icon-disabled-icon-color': 'disabled-icon-color',
100
+ 'with-icon-disabled-icon-opacity': 'disabled-icon-opacity',
101
+ 'with-icon-focus-icon-color': 'focus-icon-color',
102
+ 'with-icon-hover-icon-color': 'hover-icon-color',
103
+ 'with-icon-icon-color': 'icon-color',
104
+ 'with-icon-icon-size': 'icon-size',
105
+ 'with-icon-pressed-icon-color': 'pressed-icon-color'
96
106
  )
97
107
  );
98
108