@material/web 1.0.0-pre.16 → 1.0.0-pre.17

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 (291) hide show
  1. package/README.md +5 -5
  2. package/all.d.ts +4 -2
  3. package/all.js +4 -2
  4. package/all.js.map +1 -1
  5. package/button/internal/_elevation.scss +4 -0
  6. package/button/internal/_shared.scss +5 -1
  7. package/button/internal/elevated-styles.css.js +1 -1
  8. package/button/internal/elevated-styles.css.js.map +1 -1
  9. package/button/internal/filled-styles.css.js +1 -1
  10. package/button/internal/filled-styles.css.js.map +1 -1
  11. package/button/internal/filled-tonal-styles.css.js +1 -1
  12. package/button/internal/filled-tonal-styles.css.js.map +1 -1
  13. package/button/internal/outlined-styles.css.js +1 -1
  14. package/button/internal/outlined-styles.css.js.map +1 -1
  15. package/button/internal/shared-elevation-styles.css.js +1 -1
  16. package/button/internal/shared-elevation-styles.css.js.map +1 -1
  17. package/button/internal/shared-styles.css.js +1 -1
  18. package/button/internal/shared-styles.css.js.map +1 -1
  19. package/button/internal/text-styles.css.js +1 -1
  20. package/button/internal/text-styles.css.js.map +1 -1
  21. package/checkbox/internal/_checkbox.scss +1 -1
  22. package/checkbox/internal/checkbox-styles.css.js +1 -1
  23. package/checkbox/internal/checkbox-styles.css.js.map +1 -1
  24. package/chips/internal/_elevated.scss +0 -4
  25. package/chips/internal/_shared.scss +10 -1
  26. package/chips/internal/assist-chip.d.ts +3 -1
  27. package/chips/internal/assist-chip.js +11 -8
  28. package/chips/internal/assist-chip.js.map +1 -1
  29. package/chips/internal/assist-styles.css.js +1 -1
  30. package/chips/internal/assist-styles.css.js.map +1 -1
  31. package/chips/internal/chip.d.ts +18 -10
  32. package/chips/internal/chip.js +38 -33
  33. package/chips/internal/chip.js.map +1 -1
  34. package/chips/internal/elevated-styles.css.js +1 -1
  35. package/chips/internal/elevated-styles.css.js.map +1 -1
  36. package/chips/internal/filter-chip.d.ts +6 -7
  37. package/chips/internal/filter-chip.js +13 -14
  38. package/chips/internal/filter-chip.js.map +1 -1
  39. package/chips/internal/filter-styles.css.js +1 -1
  40. package/chips/internal/filter-styles.css.js.map +1 -1
  41. package/chips/internal/input-chip.d.ts +4 -2
  42. package/chips/internal/input-chip.js +16 -12
  43. package/chips/internal/input-chip.js.map +1 -1
  44. package/chips/internal/input-styles.css.js +1 -1
  45. package/chips/internal/input-styles.css.js.map +1 -1
  46. package/chips/internal/multi-action-chip.d.ts +2 -3
  47. package/chips/internal/multi-action-chip.js +3 -3
  48. package/chips/internal/multi-action-chip.js.map +1 -1
  49. package/chips/internal/shared-styles.css.js +1 -1
  50. package/chips/internal/shared-styles.css.js.map +1 -1
  51. package/chips/internal/suggestion-styles.css.js +1 -1
  52. package/chips/internal/suggestion-styles.css.js.map +1 -1
  53. package/color/_color.scss +193 -0
  54. package/common.d.ts +2 -2
  55. package/common.js +2 -2
  56. package/common.js.map +1 -1
  57. package/dialog/internal/_dialog.scss +19 -4
  58. package/dialog/internal/dialog-styles.css.js +1 -1
  59. package/dialog/internal/dialog-styles.css.js.map +1 -1
  60. package/dialog/internal/dialog.d.ts +6 -0
  61. package/dialog/internal/dialog.js +36 -4
  62. package/dialog/internal/dialog.js.map +1 -1
  63. package/elevation/internal/elevation.d.ts +1 -0
  64. package/elevation/internal/elevation.js +6 -0
  65. package/elevation/internal/elevation.js.map +1 -1
  66. package/fab/internal/_shared.scss +4 -1
  67. package/fab/internal/fab-branded-styles.css.js +1 -1
  68. package/fab/internal/fab-branded-styles.css.js.map +1 -1
  69. package/fab/internal/fab-styles.css.js +1 -1
  70. package/fab/internal/fab-styles.css.js.map +1 -1
  71. package/fab/internal/shared-styles.css.js +1 -1
  72. package/fab/internal/shared-styles.css.js.map +1 -1
  73. package/field/internal/_content.scss +9 -1
  74. package/field/internal/_filled-field.scss +12 -0
  75. package/field/internal/_label.scss +4 -1
  76. package/field/internal/_outlined-field.scss +33 -0
  77. package/field/internal/_shared.scss +14 -6
  78. package/field/internal/_supporting-text.scss +4 -1
  79. package/field/internal/field.d.ts +2 -0
  80. package/field/internal/field.js +19 -0
  81. package/field/internal/field.js.map +1 -1
  82. package/field/internal/filled-styles.css.js +1 -1
  83. package/field/internal/filled-styles.css.js.map +1 -1
  84. package/field/internal/outlined-styles.css.js +1 -1
  85. package/field/internal/outlined-styles.css.js.map +1 -1
  86. package/field/internal/shared-styles.css.js +1 -1
  87. package/field/internal/shared-styles.css.js.map +1 -1
  88. package/focus/internal/focus-ring.d.ts +3 -1
  89. package/focus/internal/focus-ring.js +9 -0
  90. package/focus/internal/focus-ring.js.map +1 -1
  91. package/icon/internal/icon.js +4 -0
  92. package/icon/internal/icon.js.map +1 -1
  93. package/iconbutton/internal/_icon-button.scss +8 -0
  94. package/iconbutton/internal/icon-button.d.ts +3 -3
  95. package/iconbutton/internal/icon-button.js +4 -4
  96. package/iconbutton/internal/icon-button.js.map +1 -1
  97. package/iconbutton/internal/standard-styles.css.js +1 -1
  98. package/iconbutton/internal/standard-styles.css.js.map +1 -1
  99. package/internal/aria/aria.d.ts +52 -1
  100. package/internal/aria/aria.js +146 -0
  101. package/internal/aria/aria.js.map +1 -1
  102. package/internal/controller/attachable-controller.d.ts +5 -4
  103. package/internal/controller/attachable-controller.js +8 -0
  104. package/internal/controller/attachable-controller.js.map +1 -1
  105. package/labs/badge/internal/_badge.scss +5 -1
  106. package/labs/badge/internal/badge-styles.css.js +1 -1
  107. package/labs/badge/internal/badge-styles.css.js.map +1 -1
  108. package/labs/navigationbar/internal/navigation-bar-styles.css.js +1 -1
  109. package/labs/navigationbar/internal/navigation-bar-styles.css.js.map +1 -1
  110. package/labs/navigationtab/internal/_navigation-tab.scss +4 -1
  111. package/labs/navigationtab/internal/navigation-tab-styles.css.js +1 -1
  112. package/labs/navigationtab/internal/navigation-tab-styles.css.js.map +1 -1
  113. package/labs/segmentedbutton/internal/_shared.scss +4 -1
  114. package/labs/segmentedbutton/internal/outlined-styles.css.js +1 -1
  115. package/labs/segmentedbutton/internal/outlined-styles.css.js.map +1 -1
  116. package/labs/segmentedbutton/internal/shared-styles.css.js +1 -1
  117. package/labs/segmentedbutton/internal/shared-styles.css.js.map +1 -1
  118. package/labs/segmentedbuttonset/internal/outlined-styles.css.js +1 -1
  119. package/labs/segmentedbuttonset/internal/outlined-styles.css.js.map +1 -1
  120. package/list/harness.js +1 -1
  121. package/list/harness.js.map +1 -1
  122. package/list/internal/_list.scss +1 -4
  123. package/list/internal/list-styles.css.js +1 -1
  124. package/list/internal/list-styles.css.js.map +1 -1
  125. package/list/internal/list.d.ts +1 -2
  126. package/list/internal/list.js +4 -6
  127. package/list/internal/list.js.map +1 -1
  128. package/list/internal/listitem/_list-item.scss +17 -5
  129. package/list/internal/listitem/list-item-styles.css.js +1 -1
  130. package/list/internal/listitem/list-item-styles.css.js.map +1 -1
  131. package/menu/harness.d.ts +1 -1
  132. package/menu/harness.js +3 -4
  133. package/menu/harness.js.map +1 -1
  134. package/menu/internal/_menu.scss +32 -26
  135. package/menu/internal/menu-styles.css.js +1 -1
  136. package/menu/internal/menu-styles.css.js.map +1 -1
  137. package/menu/internal/menu.d.ts +15 -4
  138. package/menu/internal/menu.js +27 -4
  139. package/menu/internal/menu.js.map +1 -1
  140. package/menu/internal/menuitem/menu-item.js +1 -1
  141. package/menu/internal/menuitem/menu-item.js.map +1 -1
  142. package/menu/internal/submenuitem/sub-menu-item.d.ts +3 -0
  143. package/menu/internal/submenuitem/sub-menu-item.js +42 -12
  144. package/menu/internal/submenuitem/sub-menu-item.js.map +1 -1
  145. package/menu/internal/typeaheadController.js +2 -1
  146. package/menu/internal/typeaheadController.js.map +1 -1
  147. package/menu/menu.d.ts +12 -5
  148. package/menu/menu.js +12 -5
  149. package/menu/menu.js.map +1 -1
  150. package/menu/sub-menu-item.d.ts +3 -4
  151. package/menu/sub-menu-item.js +3 -4
  152. package/menu/sub-menu-item.js.map +1 -1
  153. package/package.json +10 -2
  154. package/progress/internal/_circular-progress.scss +4 -2
  155. package/progress/internal/_linear-progress.scss +2 -2
  156. package/progress/internal/circular-progress-styles.css.js +1 -1
  157. package/progress/internal/circular-progress-styles.css.js.map +1 -1
  158. package/radio/harness.d.ts +1 -1
  159. package/radio/harness.js +1 -1
  160. package/radio/harness.js.map +1 -1
  161. package/radio/internal/_radio.scss +4 -4
  162. package/radio/internal/radio-styles.css.js +1 -1
  163. package/radio/internal/radio-styles.css.js.map +1 -1
  164. package/radio/internal/radio.d.ts +3 -5
  165. package/radio/internal/radio.js +37 -32
  166. package/radio/internal/radio.js.map +1 -1
  167. package/radio/internal/single-selection-controller.js +4 -3
  168. package/radio/internal/single-selection-controller.js.map +1 -1
  169. package/ripple/internal/ripple.d.ts +3 -1
  170. package/ripple/internal/ripple.js +9 -0
  171. package/ripple/internal/ripple.js.map +1 -1
  172. package/select/harness.d.ts +1 -1
  173. package/select/harness.js +1 -3
  174. package/select/harness.js.map +1 -1
  175. package/select/internal/_filled-select.scss +13 -3
  176. package/select/internal/_outlined-select.scss +13 -3
  177. package/select/internal/filled-select-styles.css.js +1 -1
  178. package/select/internal/filled-select-styles.css.js.map +1 -1
  179. package/select/internal/outlined-select-styles.css.js +1 -1
  180. package/select/internal/outlined-select-styles.css.js.map +1 -1
  181. package/select/internal/select.d.ts +8 -2
  182. package/select/internal/select.js +21 -8
  183. package/select/internal/select.js.map +1 -1
  184. package/slider/internal/_slider.scss +9 -4
  185. package/slider/internal/forced-colors-styles.css.js +1 -1
  186. package/slider/internal/forced-colors-styles.css.js.map +1 -1
  187. package/slider/internal/forced-colors-styles.scss +31 -4
  188. package/slider/internal/slider-styles.css.js +1 -1
  189. package/slider/internal/slider-styles.css.js.map +1 -1
  190. package/switch/harness.d.ts +1 -1
  191. package/switch/harness.js +1 -1
  192. package/switch/harness.js.map +1 -1
  193. package/switch/internal/_handle.scss +22 -21
  194. package/switch/internal/_icon.scss +12 -12
  195. package/switch/internal/_switch.scss +11 -19
  196. package/switch/internal/_track.scss +12 -12
  197. package/switch/internal/forced-colors-styles.css.js +1 -1
  198. package/switch/internal/forced-colors-styles.css.js.map +1 -1
  199. package/switch/internal/forced-colors-styles.scss +1 -0
  200. package/switch/internal/switch-styles.css.js +1 -1
  201. package/switch/internal/switch-styles.css.js.map +1 -1
  202. package/switch/internal/switch.d.ts +72 -2
  203. package/switch/internal/switch.js +144 -30
  204. package/switch/internal/switch.js.map +1 -1
  205. package/tabs/{_tab.scss → _primary-tab.scss} +1 -1
  206. package/tabs/_secondary-tab.scss +6 -0
  207. package/tabs/harness.d.ts +2 -2
  208. package/tabs/harness.js +1 -2
  209. package/tabs/harness.js.map +1 -1
  210. package/tabs/internal/_primary-tab.scss +70 -0
  211. package/tabs/internal/_secondary-tab.scss +61 -0
  212. package/tabs/internal/_tab.scss +8 -157
  213. package/tabs/internal/_tabs.scss +9 -10
  214. package/tabs/internal/primary-tab-styles.css.d.ts +1 -0
  215. package/tabs/internal/primary-tab-styles.css.js +9 -0
  216. package/tabs/internal/primary-tab-styles.css.js.map +1 -0
  217. package/tabs/internal/primary-tab-styles.scss +10 -0
  218. package/tabs/internal/primary-tab.d.ts +20 -0
  219. package/tabs/internal/primary-tab.js +30 -0
  220. package/tabs/internal/primary-tab.js.map +1 -0
  221. package/tabs/internal/secondary-tab-styles.css.d.ts +1 -0
  222. package/tabs/internal/secondary-tab-styles.css.js +9 -0
  223. package/tabs/internal/secondary-tab-styles.css.js.map +1 -0
  224. package/tabs/internal/secondary-tab-styles.scss +10 -0
  225. package/tabs/internal/secondary-tab.d.ts +12 -0
  226. package/tabs/internal/secondary-tab.js +16 -0
  227. package/tabs/internal/secondary-tab.js.map +1 -0
  228. package/tabs/internal/tab-styles.css.js +1 -1
  229. package/tabs/internal/tab-styles.css.js.map +1 -1
  230. package/tabs/internal/tab.d.ts +16 -34
  231. package/tabs/internal/tab.js +81 -80
  232. package/tabs/internal/tab.js.map +1 -1
  233. package/tabs/internal/tabs-styles.css.js +1 -1
  234. package/tabs/internal/tabs-styles.css.js.map +1 -1
  235. package/tabs/internal/tabs.d.ts +6 -20
  236. package/tabs/internal/tabs.js +33 -66
  237. package/tabs/internal/tabs.js.map +1 -1
  238. package/tabs/{tab.d.ts → primary-tab.d.ts} +3 -4
  239. package/tabs/primary-tab.js +23 -0
  240. package/tabs/primary-tab.js.map +1 -0
  241. package/tabs/secondary-tab.d.ts +18 -0
  242. package/tabs/secondary-tab.js +23 -0
  243. package/tabs/secondary-tab.js.map +1 -0
  244. package/tabs/tabs.d.ts +0 -2
  245. package/tabs/tabs.js +0 -2
  246. package/tabs/tabs.js.map +1 -1
  247. package/textfield/internal/_filled-text-field.scss +12 -3
  248. package/textfield/internal/_outlined-text-field.scss +12 -3
  249. package/textfield/internal/filled-styles.css.js +1 -1
  250. package/textfield/internal/filled-styles.css.js.map +1 -1
  251. package/textfield/internal/outlined-styles.css.js +1 -1
  252. package/textfield/internal/outlined-styles.css.js.map +1 -1
  253. package/textfield/internal/text-field.d.ts +19 -0
  254. package/textfield/internal/text-field.js +20 -0
  255. package/textfield/internal/text-field.js.map +1 -1
  256. package/tokens/_index.scss +5 -6
  257. package/tokens/_md-comp-assist-chip.scss +6 -14
  258. package/tokens/_md-comp-badge.scss +1 -14
  259. package/tokens/{_md-comp-circular-progress-indicator.scss → _md-comp-circular-progress.scss} +3 -1
  260. package/tokens/_md-comp-dialog.scss +10 -17
  261. package/tokens/_md-comp-elevated-button.scss +5 -13
  262. package/tokens/_md-comp-fab-branded.scss +9 -10
  263. package/tokens/_md-comp-fab.scss +9 -10
  264. package/tokens/_md-comp-filled-button.scss +5 -13
  265. package/tokens/_md-comp-filled-field.scss +25 -6
  266. package/tokens/_md-comp-filled-select.scss +15 -15
  267. package/tokens/_md-comp-filled-text-field.scss +15 -19
  268. package/tokens/_md-comp-filled-tonal-button.scss +5 -13
  269. package/tokens/_md-comp-filter-chip.scss +5 -13
  270. package/tokens/_md-comp-input-chip.scss +5 -13
  271. package/tokens/_md-comp-list-item.scss +18 -37
  272. package/tokens/_md-comp-outlined-button.scss +5 -13
  273. package/tokens/_md-comp-outlined-field.scss +25 -6
  274. package/tokens/_md-comp-outlined-segmented-button.scss +5 -13
  275. package/tokens/_md-comp-outlined-select.scss +15 -15
  276. package/tokens/_md-comp-outlined-text-field.scss +15 -19
  277. package/tokens/_md-comp-primary-tab.scss +132 -0
  278. package/tokens/_md-comp-secondary-tab.scss +139 -0
  279. package/tokens/_md-comp-slider.scss +16 -16
  280. package/tokens/_md-comp-suggestion-chip.scss +5 -13
  281. package/tokens/_md-comp-test-table.scss +13 -2
  282. package/tokens/_md-comp-text-button.scss +5 -13
  283. package/tokens/_md-ref-palette.scss +101 -1
  284. package/tokens/_md-ref-typeface.scss +3 -0
  285. package/tokens/_md-sys-color.scss +57 -2
  286. package/tokens/_md-sys-typescale.scss +66 -5
  287. package/tabs/tab.js +0 -22
  288. package/tabs/tab.js.map +0 -1
  289. package/tokens/_md-comp-tab.scss +0 -285
  290. /package/tokens/{_md-comp-linear-progress-indicator.scss → _md-comp-linear-progress.scss} +0 -0
  291. /package/tokens/{_md-comp-radio-button.scss → _md-comp-radio.scss} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"outlined-styles.css.js","sourceRoot":"","sources":["outlined-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-shape: var(--md-outlined-text-field-container-shape, 4px);--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-type: var(--md-outlined-text-field-input-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, 1rem);--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, 0.75rem);--_label-text-type: var(--md-outlined-text-field-label-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-outlined-text-field-supporting-text-type, var(--md-sys-typescale-body-small, 400 0.75rem / 1rem var(--md-ref-typeface-plain, Roboto)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var( --md-outlined-text-field-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-outlined-text-field-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-outlined-text-field-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-outlined-text-field-container-shape-end-start, var(--_container-shape) );--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-type: var(--_input-text-type);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-type: var(--_label-text-type);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-type: var(--_supporting-text-type);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}/*# sourceMappingURL=outlined-styles.css.map */\n`;\n "]}
1
+ {"version":3,"file":"outlined-styles.css.js","sourceRoot":"","sources":["outlined-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-shape: var(--md-outlined-text-field-container-shape, 4px);--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var( --md-outlined-text-field-container-shape-start-start, var(--_container-shape) );--_container-shape-start-end: var( --md-outlined-text-field-container-shape-start-end, var(--_container-shape) );--_container-shape-end-end: var( --md-outlined-text-field-container-shape-end-end, var(--_container-shape) );--_container-shape-end-start: var( --md-outlined-text-field-container-shape-end-start, var(--_container-shape) );--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space)}/*# sourceMappingURL=outlined-styles.css.map */\n`;\n "]}
@@ -155,6 +155,25 @@ export declare abstract class TextField extends LitElement {
155
155
  * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
156
156
  */
157
157
  step: string;
158
+ /**
159
+ * The `<input>` type to use, defaults to "text". The type greatly changes how
160
+ * the text field behaves.
161
+ *
162
+ * Text fields support a limited number of `<input>` types:
163
+ *
164
+ * - text
165
+ * - textarea
166
+ * - email
167
+ * - number
168
+ * - password
169
+ * - search
170
+ * - tel
171
+ * - url
172
+ *
173
+ * See
174
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
175
+ * for more details on each input type.
176
+ */
158
177
  type: TextFieldType | UnsupportedTextFieldType;
159
178
  /**
160
179
  * Returns the text field's validation error message.
@@ -238,6 +238,25 @@ export class TextField extends LitElement {
238
238
  * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step
239
239
  */
240
240
  this.step = '';
241
+ /**
242
+ * The `<input>` type to use, defaults to "text". The type greatly changes how
243
+ * the text field behaves.
244
+ *
245
+ * Text fields support a limited number of `<input>` types:
246
+ *
247
+ * - text
248
+ * - textarea
249
+ * - email
250
+ * - number
251
+ * - password
252
+ * - search
253
+ * - tel
254
+ * - url
255
+ *
256
+ * See
257
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
258
+ * for more details on each input type.
259
+ */
241
260
  this.type = 'text';
242
261
  /**
243
262
  * Returns true when the text field has been interacted with. Native
@@ -452,6 +471,7 @@ export class TextField extends LitElement {
452
471
  max=${this.maxLength}
453
472
  ?populated=${!!this.value}
454
473
  ?required=${this.required}
474
+ ?resizable=${this.type === 'textarea'}
455
475
  supporting-text=${this.supportingText}
456
476
  >
457
477
  ${this.renderLeadingIcon()}
@@ -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,I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AAC,CAAC;gDAAoB;AAMlC;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uCAAU;AA2BR;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,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"]}
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,CA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AC,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 /**\n * The `<input>` type to use, defaults to \"text\". The type greatly changes how\n * the text field behaves.\n *\n * Text fields support a limited number of `<input>` types:\n *\n * - text\n * - textarea\n * - email\n * - number\n * - password\n * - search\n * - tel\n * - url\n *\n * See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n * for more details on each input type.\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 ?resizable=${this.type === 'textarea'}\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"]}
@@ -7,8 +7,7 @@
7
7
  @forward './md-comp-assist-chip' as md-comp-assist-chip-*;
8
8
  @forward './md-comp-badge' as md-comp-badge-*;
9
9
  @forward './md-comp-checkbox' as md-comp-checkbox-*;
10
- @forward './md-comp-circular-progress-indicator' as
11
- md-comp-circular-progress-indicator-*;
10
+ @forward './md-comp-circular-progress' as md-comp-circular-progress-*;
12
11
  @forward './md-comp-dialog' as md-comp-dialog-*;
13
12
  @forward './md-comp-divider' as md-comp-divider-*;
14
13
  @forward './md-comp-elevated-button' as md-comp-elevated-button-*;
@@ -29,8 +28,7 @@
29
28
  @forward './md-comp-icon' as md-comp-icon-*;
30
29
  @forward './md-comp-icon-button' as md-comp-icon-button-*;
31
30
  @forward './md-comp-input-chip' as md-comp-input-chip-*;
32
- @forward './md-comp-linear-progress-indicator' as
33
- md-comp-linear-progress-indicator-*;
31
+ @forward './md-comp-linear-progress' as md-comp-linear-progress-*;
34
32
  @forward './md-comp-list' as md-comp-list-*;
35
33
  @forward './md-comp-list-item' as md-comp-list-item-*;
36
34
  @forward './md-comp-menu' as md-comp-menu-*;
@@ -44,12 +42,13 @@
44
42
  md-comp-outlined-segmented-button-*;
45
43
  @forward './md-comp-outlined-select' as md-comp-outlined-select-*;
46
44
  @forward './md-comp-outlined-text-field' as md-comp-outlined-text-field-*;
47
- @forward './md-comp-radio-button' as md-comp-radio-button-*;
45
+ @forward './md-comp-primary-tab' as md-comp-primary-tab-*;
46
+ @forward './md-comp-radio' as md-comp-radio-*;
48
47
  @forward './md-comp-ripple' as md-comp-ripple-*;
48
+ @forward './md-comp-secondary-tab' as md-comp-secondary-tab-*;
49
49
  @forward './md-comp-slider' as md-comp-slider-*;
50
50
  @forward './md-comp-suggestion-chip' as md-comp-suggestion-chip-*;
51
51
  @forward './md-comp-switch' as md-comp-switch-*;
52
- @forward './md-comp-tab' as md-comp-tab-*;
53
52
  @forward './md-comp-test-table' as md-comp-test-table-*;
54
53
  @forward './md-comp-text-button' as md-comp-text-button-*;
55
54
  @forward './md-ref-palette' as md-ref-palette-*;
@@ -1,7 +1,7 @@
1
+ //
1
2
  // Copyright 2023 Google LLC
2
3
  // SPDX-License-Identifier: Apache-2.0
3
4
  //
4
- //
5
5
 
6
6
  // go/keep-sorted start
7
7
  @use 'sass:map';
@@ -44,7 +44,10 @@ $supported-tokens: (
44
44
  'hover-state-layer-opacity',
45
45
  'icon-size',
46
46
  'label-text-color',
47
- 'label-text-type',
47
+ 'label-text-font',
48
+ 'label-text-line-height',
49
+ 'label-text-size',
50
+ 'label-text-weight',
48
51
  'leading-icon-color',
49
52
  'outline-color',
50
53
  'outline-width',
@@ -65,11 +68,8 @@ $unsupported-tokens: (
65
68
  'dragged-state-layer-opacity',
66
69
  'focus-state-layer-color',
67
70
  'focus-state-layer-opacity',
68
- 'label-text-font',
69
- 'label-text-line-height',
70
- 'label-text-size',
71
71
  'label-text-tracking',
72
- 'label-text-weight',
72
+ 'label-text-type',
73
73
  // go/keep-sorted end
74
74
  );
75
75
 
@@ -107,13 +107,5 @@ $_default: (
107
107
  )
108
108
  );
109
109
 
110
- // TODO(b/271876162): remove when tokens compiler emits typescale tokens
111
- $tokens: map.merge(
112
- $tokens,
113
- (
114
- 'label-text-type': map.get($deps, 'md-sys-typescale', 'label-large'),
115
- )
116
- );
117
-
118
110
  @return $tokens;
119
111
  }
@@ -19,23 +19,10 @@ $_default: (
19
19
  'md-sys-typescale': md-sys-typescale.values(),
20
20
  );
21
21
 
22
- $_unsupported-tokens: (
23
- 'large-label-text-font',
24
- 'large-label-text-line-height',
25
- 'large-label-text-size',
26
- 'large-label-text-tracking',
27
- 'large-label-text-weight'
28
- );
22
+ $_unsupported-tokens: ('large-label-text-tracking', 'large-label-text-type');
29
23
 
30
24
  @function values($deps: $_default, $exclude-hardcoded-values: false) {
31
25
  $tokens: md-comp-badge.values($deps, $exclude-hardcoded-values);
32
26
  $tokens: map.remove($tokens, $_unsupported-tokens...);
33
- // TODO(b/271876162): remove when tokens compiler emits typescale tokens
34
- $tokens: map.merge(
35
- $tokens,
36
- (
37
- 'large-label-text-type': map.get($deps, 'md-sys-typescale', 'label-small'),
38
- )
39
- );
40
27
  @return $tokens;
41
28
  }
@@ -52,10 +52,12 @@ $_default: (
52
52
  // must be set as a raw % for compatibility between rendering border or svg.
53
53
  $width: map.get($tokens, 'active-indicator-width');
54
54
  $size: map.get($tokens, 'size');
55
+ $container-padding: 4px;
56
+ $size-without-padding: $size - $container-padding - $container-padding;
55
57
  $tokens: map.set(
56
58
  $tokens,
57
59
  'active-indicator-width',
58
- math.div($width, $size) * 100
60
+ math.div($width, $size-without-padding) * 100
59
61
  );
60
62
  }
61
63
 
@@ -21,11 +21,17 @@ $supported-tokens: (
21
21
  'container-color',
22
22
  'container-shape',
23
23
  'headline-color',
24
- 'headline-type',
24
+ 'headline-font',
25
+ 'headline-line-height',
26
+ 'headline-size',
27
+ 'headline-weight',
25
28
  'icon-color',
26
29
  'icon-size',
27
30
  'supporting-text-color',
28
- 'supporting-text-type',
31
+ 'supporting-text-font',
32
+ 'supporting-text-line-height',
33
+ 'supporting-text-size',
34
+ 'supporting-text-weight',
29
35
  // go/keep-sorted end
30
36
  );
31
37
 
@@ -59,16 +65,10 @@ $unsupported-tokens: (
59
65
  'action-pressed-state-layer-opacity',
60
66
  'container-elevation',
61
67
  // Unused without a shadow color
62
- 'headline-font',
63
- 'headline-line-height',
64
- 'headline-size',
65
68
  'headline-tracking',
66
- 'headline-weight',
67
- 'supporting-text-font',
68
- 'supporting-text-line-height',
69
- 'supporting-text-size',
69
+ 'headline-type',
70
70
  'supporting-text-tracking',
71
- 'supporting-text-weight',
71
+ 'supporting-text-type',
72
72
  // go/keep-sorted end
73
73
  );
74
74
 
@@ -84,12 +84,5 @@ $unsupported-tokens: (
84
84
  )
85
85
  );
86
86
 
87
- // TODO(b/271876162): remove when tokens compiler emits typescale tokens
88
- $tokens: map.merge(
89
- $tokens,
90
- (
91
- 'headline-type': map.get($deps, 'md-sys-typescale', 'headline-small'),
92
- )
93
- );
94
87
  @return $tokens;
95
88
  }
@@ -41,7 +41,10 @@ $supported-tokens: (
41
41
  'icon-color',
42
42
  'icon-size',
43
43
  'label-text-color',
44
- 'label-text-type',
44
+ 'label-text-font',
45
+ 'label-text-line-height',
46
+ 'label-text-size',
47
+ 'label-text-weight',
45
48
  'leading-space',
46
49
  'pressed-container-elevation',
47
50
  'pressed-icon-color',
@@ -60,11 +63,8 @@ $unsupported-tokens: (
60
63
  // go/keep-sorted start
61
64
  'focus-state-layer-color',
62
65
  'focus-state-layer-opacity',
63
- 'label-text-font',
64
- 'label-text-line-height',
65
- 'label-text-size',
66
66
  'label-text-tracking',
67
- 'label-text-weight',
67
+ 'label-text-type',
68
68
  // go/keep-sorted end
69
69
  );
70
70
 
@@ -108,13 +108,5 @@ $_default: (
108
108
  )
109
109
  );
110
110
 
111
- // TODO(b/271876162): remove when tokens compiler emits typescale tokens
112
- $tokens: map.merge(
113
- $tokens,
114
- (
115
- 'label-text-type': map.get($deps, 'md-sys-typescale', 'label-large'),
116
- )
117
- );
118
-
119
111
  @return $tokens;
120
112
  }
@@ -34,7 +34,10 @@ $supported-tokens: (
34
34
  'hover-state-layer-opacity',
35
35
  'icon-size',
36
36
  'label-text-color',
37
- 'label-text-type',
37
+ 'label-text-font',
38
+ 'label-text-line-height',
39
+ 'label-text-size',
40
+ 'label-text-weight',
38
41
  'large-container-height',
39
42
  'large-container-shape',
40
43
  'large-container-width',
@@ -74,7 +77,11 @@ $unsupported-tokens: (
74
77
  'hover-label-text-color':
75
78
  map.get($extended-branded-tokens, 'hover-label-text-color'),
76
79
  'label-text-color': map.get($extended-branded-tokens, 'label-text-color'),
77
- 'label-text-type': map.get($extended-branded-tokens, 'label-text-type'),
80
+ 'label-text-font': map.get($extended-branded-tokens, 'label-text-font'),
81
+ 'label-text-size': map.get($extended-branded-tokens, 'label-text-size'),
82
+ 'label-text-line-height':
83
+ map.get($extended-branded-tokens, 'label-text-line-height'),
84
+ 'label-text-weight': map.get($extended-branded-tokens, 'label-text-weight'),
78
85
  'large-container-height': map.get($large-tokens, 'container-height'),
79
86
  'large-container-shape': map.get($large-tokens, 'container-shape'),
80
87
  'large-container-width': map.get($large-tokens, 'container-width'),
@@ -100,13 +107,5 @@ $_default: (
100
107
  $new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values)
101
108
  );
102
109
 
103
- // TODO(b/271876162): remove when tokens compiler emits typescale tokens
104
- $tokens: map.merge(
105
- $tokens,
106
- (
107
- 'label-text-type': map.get($deps, 'md-sys-typescale', 'label-large'),
108
- )
109
- );
110
-
111
110
  @return $tokens;
112
111
  }
@@ -44,7 +44,10 @@ $supported-tokens: (
44
44
  'icon-color',
45
45
  'icon-size',
46
46
  'label-text-color',
47
- 'label-text-type',
47
+ 'label-text-font',
48
+ 'label-text-line-height',
49
+ 'label-text-size',
50
+ 'label-text-weight',
48
51
  'large-container-height',
49
52
  'large-container-shape',
50
53
  'large-container-width',
@@ -148,7 +151,11 @@ $unsupported-tokens: (
148
151
  'hover-label-text-color':
149
152
  map.get($extended-surface-tokens, 'hover-label-text-color'),
150
153
  'label-text-color': map.get($extended-surface-tokens, 'label-text-color'),
151
- 'label-text-type': map.get($extended-surface-tokens, 'label-text-type'),
154
+ 'label-text-font': map.get($extended-surface-tokens, 'label-text-font'),
155
+ 'label-text-line-height':
156
+ map.get($extended-surface-tokens, 'label-text-line-height'),
157
+ 'label-text-size': map.get($extended-surface-tokens, 'label-text-size'),
158
+ 'label-text-weight': map.get($extended-surface-tokens, 'label-text-weight'),
152
159
  'large-container-height': map.get($large-tokens, 'container-height'),
153
160
  'large-container-shape': map.get($large-tokens, 'container-shape'),
154
161
  'large-container-width': map.get($large-tokens, 'container-width'),
@@ -234,13 +241,5 @@ $_default: (
234
241
  $new-tokens: _get-new-tokens($deps, $exclude-hardcoded-values)
235
242
  );
236
243
 
237
- // TODO(b/271876162): remove when tokens compiler emits typescale tokens
238
- $tokens: map.merge(
239
- $tokens,
240
- (
241
- 'label-text-type': map.get($deps, 'md-sys-typescale', 'label-large'),
242
- )
243
- );
244
-
245
244
  @return $tokens;
246
245
  }