@material/web 1.0.0-pre.2 → 1.0.0-pre.4

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 (684) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +41 -41
  3. package/autocomplete/autocomplete-item.js.map +1 -1
  4. package/autocomplete/autocomplete-list.js.map +1 -1
  5. package/autocomplete/autocomplete-surface.js.map +1 -1
  6. package/autocomplete/filled-autocomplete.d.ts +0 -2
  7. package/autocomplete/filled-autocomplete.js +0 -7
  8. package/autocomplete/filled-autocomplete.js.map +1 -1
  9. package/autocomplete/lib/_filled-autocomplete.scss +22 -28
  10. package/autocomplete/lib/_outlined-autocomplete.scss +23 -29
  11. package/autocomplete/lib/_shared.scss +6 -10
  12. package/autocomplete/lib/autocomplete.d.ts +2 -2
  13. package/autocomplete/lib/autocomplete.js +4 -5
  14. package/autocomplete/lib/autocomplete.js.map +1 -1
  15. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.scss +2 -0
  16. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.scss +2 -0
  17. package/autocomplete/lib/filled-styles.css.js +1 -1
  18. package/autocomplete/lib/filled-styles.css.js.map +1 -1
  19. package/autocomplete/lib/filled-styles.scss +2 -0
  20. package/autocomplete/lib/outlined-styles.css.js +1 -1
  21. package/autocomplete/lib/outlined-styles.css.js.map +1 -1
  22. package/autocomplete/lib/outlined-styles.scss +2 -0
  23. package/autocomplete/lib/shared-styles.scss +2 -0
  24. package/autocomplete/outlined-autocomplete.d.ts +0 -2
  25. package/autocomplete/outlined-autocomplete.js +0 -7
  26. package/autocomplete/outlined-autocomplete.js.map +1 -1
  27. package/badge/badge.js.map +1 -1
  28. package/badge/lib/_badge.scss +10 -13
  29. package/badge/lib/badge-styles.css.js +1 -1
  30. package/badge/lib/badge-styles.css.js.map +1 -1
  31. package/badge/lib/badge-styles.scss +2 -0
  32. package/badge/lib/badge.js.map +1 -1
  33. package/button/elevated-button.js.map +1 -1
  34. package/button/elevated-link-button.js.map +1 -1
  35. package/button/filled-button.js.map +1 -1
  36. package/button/filled-link-button.js.map +1 -1
  37. package/button/lib/_elevated-button.scss +10 -15
  38. package/button/lib/_elevation.scss +4 -1
  39. package/button/lib/_filled-button.scss +12 -14
  40. package/button/lib/_icon.scss +1 -0
  41. package/button/lib/_outlined-button.scss +10 -15
  42. package/button/lib/_shared.scss +14 -19
  43. package/button/lib/_text-button.scss +12 -14
  44. package/button/lib/_tonal-button.scss +10 -15
  45. package/button/lib/button.js.map +1 -1
  46. package/button/lib/elevated-styles.css.js +1 -1
  47. package/button/lib/elevated-styles.css.js.map +1 -1
  48. package/button/lib/elevated-styles.scss +2 -0
  49. package/button/lib/filled-styles.css.js +1 -1
  50. package/button/lib/filled-styles.css.js.map +1 -1
  51. package/button/lib/filled-styles.scss +2 -0
  52. package/button/lib/link-button.js.map +1 -1
  53. package/button/lib/outlined-styles.css.js +1 -1
  54. package/button/lib/outlined-styles.css.js.map +1 -1
  55. package/button/lib/outlined-styles.scss +2 -0
  56. package/button/lib/shared-elevation-styles.scss +2 -0
  57. package/button/lib/shared-styles.css.js +1 -1
  58. package/button/lib/shared-styles.css.js.map +1 -1
  59. package/button/lib/shared-styles.scss +2 -0
  60. package/button/lib/text-styles.css.js +1 -1
  61. package/button/lib/text-styles.css.js.map +1 -1
  62. package/button/lib/text-styles.scss +2 -0
  63. package/button/lib/tonal-styles.css.js +1 -1
  64. package/button/lib/tonal-styles.css.js.map +1 -1
  65. package/button/lib/tonal-styles.scss +2 -0
  66. package/button/outlined-button.js.map +1 -1
  67. package/button/outlined-link-button.js.map +1 -1
  68. package/button/text-button.js.map +1 -1
  69. package/button/text-link-button.js.map +1 -1
  70. package/button/tonal-button.js.map +1 -1
  71. package/button/tonal-link-button.js.map +1 -1
  72. package/checkbox/checkbox.js.map +1 -1
  73. package/checkbox/lib/_checkbox.scss +26 -31
  74. package/checkbox/lib/checkbox-styles.css.js +1 -1
  75. package/checkbox/lib/checkbox-styles.css.js.map +1 -1
  76. package/checkbox/lib/checkbox-styles.scss +2 -0
  77. package/checkbox/lib/checkbox.js +6 -6
  78. package/checkbox/lib/checkbox.js.map +1 -1
  79. package/checkbox/lib/forced-colors-styles.scss +2 -0
  80. package/chips/action/delete-action.js.map +1 -1
  81. package/chips/action/lib/action.js +4 -4
  82. package/chips/action/lib/action.js.map +1 -1
  83. package/chips/action/lib/link-action.js +1 -1
  84. package/chips/action/lib/link-action.js.map +1 -1
  85. package/chips/action/lib/primary-action.js.map +1 -1
  86. package/chips/action/lib/selectable-action.js.map +1 -1
  87. package/chips/action/link-action.js.map +1 -1
  88. package/chips/action/presentational-action.js.map +1 -1
  89. package/chips/action/primary-action.js.map +1 -1
  90. package/chips/action/selectable-action.js.map +1 -1
  91. package/chips/chip/lib/_assist-chip-theme.scss +4 -0
  92. package/chips/chip/lib/_chip-theme.scss +29 -40
  93. package/chips/chip/lib/_chip.scss +2 -0
  94. package/chips/chip/lib/_filter-chip-theme.scss +4 -0
  95. package/chips/chip/lib/_input-chip-theme.scss +4 -0
  96. package/chips/chip/lib/_suggestion-chip-theme.scss +4 -0
  97. package/chips/chip/lib/chip.js.map +1 -1
  98. package/chips/chip/lib/foundation.js +4 -4
  99. package/chips/chip/lib/foundation.js.map +1 -1
  100. package/chips/chip/lib/link-chip.js.map +1 -1
  101. package/chips/chip/lib/selectable-chip.js.map +1 -1
  102. package/chips/chip/lib/types.d.ts +2 -2
  103. package/chips/chipset/lib/_chip-set-theme.scss +2 -0
  104. package/chips/chipset/lib/_chip-set.scss +2 -0
  105. package/chips/chipset/lib/foundation.js +3 -3
  106. package/chips/chipset/lib/foundation.js.map +1 -1
  107. package/chips/chipset/lib/types.d.ts +3 -3
  108. package/controller/events.js +4 -0
  109. package/controller/events.js.map +1 -1
  110. package/controller/form-controller.d.ts +1 -1
  111. package/controller/form-controller.js +21 -29
  112. package/controller/form-controller.js.map +1 -1
  113. package/dialog/dialog.js.map +1 -1
  114. package/dialog/harness.d.ts +2 -2
  115. package/dialog/harness.js +11 -8
  116. package/dialog/harness.js.map +1 -1
  117. package/dialog/lib/_dialog.scss +7 -11
  118. package/dialog/lib/_tokens.scss +9 -6
  119. package/dialog/lib/dialog-styles.css.js +1 -1
  120. package/dialog/lib/dialog-styles.css.js.map +1 -1
  121. package/dialog/lib/dialog-styles.scss +2 -0
  122. package/dialog/lib/dialog.js +9 -7
  123. package/dialog/lib/dialog.js.map +1 -1
  124. package/divider/divider.js.map +1 -1
  125. package/divider/lib/_divider.scss +2 -0
  126. package/divider/lib/divider-styles.scss +2 -0
  127. package/divider/lib/divider.js.map +1 -1
  128. package/elevation/elevation.js.map +1 -1
  129. package/elevation/lib/_elevation.scss +4 -0
  130. package/elevation/lib/_md-comp-elevation.scss +4 -0
  131. package/elevation/lib/elevation-styles.scss +2 -0
  132. package/elevation/lib/elevation.js.map +1 -1
  133. package/fab/fab-extended.js.map +1 -1
  134. package/fab/fab.js.map +1 -1
  135. package/fab/lib/_fab-extended.scss +18 -11
  136. package/fab/lib/_fab.scss +7 -2
  137. package/fab/lib/_shared.scss +16 -8
  138. package/fab/lib/fab-extended-styles.css.js +1 -1
  139. package/fab/lib/fab-extended-styles.css.js.map +1 -1
  140. package/fab/lib/fab-extended-styles.scss +2 -0
  141. package/fab/lib/fab-shared-styles.css.js +1 -1
  142. package/fab/lib/fab-shared-styles.css.js.map +1 -1
  143. package/fab/lib/fab-shared-styles.scss +2 -0
  144. package/fab/lib/fab-shared.d.ts +9 -15
  145. package/fab/lib/fab-shared.js +21 -33
  146. package/fab/lib/fab-shared.js.map +1 -1
  147. package/fab/lib/fab-styles.css.js +1 -1
  148. package/fab/lib/fab-styles.css.js.map +1 -1
  149. package/fab/lib/fab-styles.scss +2 -0
  150. package/field/filled-field.d.ts +1 -1
  151. package/field/filled-field.js +1 -1
  152. package/field/filled-field.js.map +1 -1
  153. package/field/harness.js +1 -1
  154. package/field/harness.js.map +1 -1
  155. package/field/lib/_content.scss +120 -57
  156. package/field/lib/_filled-field.scss +73 -130
  157. package/field/lib/_label.scss +27 -65
  158. package/field/lib/_md-comp-filled-field.scss +127 -56
  159. package/field/lib/_md-comp-outlined-field.scss +104 -52
  160. package/field/lib/_outlined-field.scss +108 -120
  161. package/field/lib/_shared.scss +27 -45
  162. package/field/lib/_supporting-text.scss +25 -52
  163. package/field/lib/field.d.ts +15 -31
  164. package/field/lib/field.js +130 -139
  165. package/field/lib/field.js.map +1 -1
  166. package/field/lib/filled-field.d.ts +5 -16
  167. package/field/lib/filled-field.js +8 -70
  168. package/field/lib/filled-field.js.map +1 -1
  169. package/field/lib/filled-styles.css.js +1 -1
  170. package/field/lib/filled-styles.css.js.map +1 -1
  171. package/field/lib/outlined-field.d.ts +4 -10
  172. package/field/lib/outlined-field.js +13 -33
  173. package/field/lib/outlined-field.js.map +1 -1
  174. package/field/lib/outlined-styles.css.js +1 -1
  175. package/field/lib/outlined-styles.css.js.map +1 -1
  176. package/field/lib/shared-styles.css.js +1 -1
  177. package/field/lib/shared-styles.css.js.map +1 -1
  178. package/field/outlined-field.d.ts +1 -1
  179. package/field/outlined-field.js +1 -1
  180. package/field/outlined-field.js.map +1 -1
  181. package/focus/focus-ring.js.map +1 -1
  182. package/focus/lib/_focus-ring.scss +7 -13
  183. package/focus/lib/_md-comp-focus-ring.scss +4 -0
  184. package/focus/lib/focus-ring-styles.css.js +1 -1
  185. package/focus/lib/focus-ring-styles.css.js.map +1 -1
  186. package/focus/lib/focus-ring-styles.scss +2 -0
  187. package/focus/lib/focus-ring.js.map +1 -1
  188. package/icon/icon.js.map +1 -1
  189. package/icon/lib/_icon.scss +3 -1
  190. package/icon/lib/_md-comp-icon.scss +1 -2
  191. package/icon/lib/icon-styles.css.js +1 -1
  192. package/icon/lib/icon-styles.css.js.map +1 -1
  193. package/icon/lib/icon-styles.scss +2 -0
  194. package/iconbutton/filled-icon-button-toggle.js.map +1 -1
  195. package/iconbutton/filled-icon-button.js.map +1 -1
  196. package/iconbutton/filled-link-icon-button.js.map +1 -1
  197. package/iconbutton/filled-tonal-icon-button-toggle.js.map +1 -1
  198. package/iconbutton/filled-tonal-icon-button.js.map +1 -1
  199. package/iconbutton/filled-tonal-link-icon-button.js.map +1 -1
  200. package/iconbutton/lib/_filled-icon-button.scss +19 -19
  201. package/iconbutton/lib/_filled-tonal-icon-button.scss +19 -19
  202. package/iconbutton/lib/_outlined-icon-button.scss +20 -16
  203. package/iconbutton/lib/_shared.scss +8 -8
  204. package/iconbutton/lib/_standard-icon-button.scss +21 -18
  205. package/iconbutton/lib/filled-styles.css.js +1 -1
  206. package/iconbutton/lib/filled-styles.css.js.map +1 -1
  207. package/iconbutton/lib/filled-styles.scss +2 -0
  208. package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
  209. package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
  210. package/iconbutton/lib/filled-tonal-styles.scss +2 -0
  211. package/iconbutton/lib/icon-button-toggle.js.map +1 -1
  212. package/iconbutton/lib/icon-button.js.map +1 -1
  213. package/iconbutton/lib/link-icon-button.js.map +1 -1
  214. package/iconbutton/lib/outlined-styles.css.js +1 -1
  215. package/iconbutton/lib/outlined-styles.css.js.map +1 -1
  216. package/iconbutton/lib/outlined-styles.scss +2 -0
  217. package/iconbutton/lib/shared-styles.scss +2 -0
  218. package/iconbutton/lib/standard-styles.css.js +1 -1
  219. package/iconbutton/lib/standard-styles.css.js.map +1 -1
  220. package/iconbutton/lib/standard-styles.scss +2 -0
  221. package/iconbutton/outlined-icon-button-toggle.js.map +1 -1
  222. package/iconbutton/outlined-icon-button.js.map +1 -1
  223. package/iconbutton/outlined-link-icon-button.js.map +1 -1
  224. package/iconbutton/standard-icon-button-toggle.js.map +1 -1
  225. package/iconbutton/standard-icon-button.js.map +1 -1
  226. package/iconbutton/standard-link-icon-button.js.map +1 -1
  227. package/list/lib/_list.scss +25 -11
  228. package/list/lib/list-styles.scss +2 -0
  229. package/list/lib/list.js +3 -1
  230. package/list/lib/list.js.map +1 -1
  231. package/list/lib/listitem/_list-item.scss +320 -128
  232. package/list/lib/listitem/list-item-styles.css.js +1 -1
  233. package/list/lib/listitem/list-item-styles.css.js.map +1 -1
  234. package/list/lib/listitem/list-item-styles.scss +2 -0
  235. package/list/lib/listitem/list-item.d.ts +8 -7
  236. package/list/lib/listitem/list-item.js +25 -27
  237. package/list/lib/listitem/list-item.js.map +1 -1
  238. package/list/lib/listitemlink/list-item-link.js.map +1 -1
  239. package/list/list-item-link.d.ts +18 -0
  240. package/list/list-item-link.js +19 -2
  241. package/list/list-item-link.js.map +1 -1
  242. package/list/list-item.d.ts +19 -0
  243. package/list/list-item.js +20 -2
  244. package/list/list-item.js.map +1 -1
  245. package/list/list.js.map +1 -1
  246. package/menu/lib/_menu.scss +32 -8
  247. package/menu/lib/menu-styles.css.js +1 -1
  248. package/menu/lib/menu-styles.css.js.map +1 -1
  249. package/menu/lib/menu-styles.scss +2 -0
  250. package/menu/lib/menu.d.ts +1 -1
  251. package/menu/lib/menu.js +8 -7
  252. package/menu/lib/menu.js.map +1 -1
  253. package/menu/lib/menuitem/_menu-item.scss +44 -76
  254. package/menu/lib/menuitem/menu-item-styles.css.js +1 -1
  255. package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -1
  256. package/menu/lib/menuitem/menu-item-styles.scss +2 -0
  257. package/menu/lib/menuitem/menu-item.js.map +1 -1
  258. package/menu/lib/menuitemlink/menu-item-link.js.map +1 -1
  259. package/menu/lib/shared.d.ts +3 -3
  260. package/menu/lib/submenuitem/sub-menu-item.d.ts +0 -1
  261. package/menu/lib/submenuitem/sub-menu-item.js +0 -1
  262. package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
  263. package/menu/lib/surfacePositionController.d.ts +1 -1
  264. package/menu/lib/typeaheadController.d.ts +1 -1
  265. package/menu/menu-item-link.js +1 -2
  266. package/menu/menu-item-link.js.map +1 -1
  267. package/menu/menu-item.js +2 -3
  268. package/menu/menu-item.js.map +1 -1
  269. package/menu/menu.js.map +1 -1
  270. package/menu/sub-menu-item.js +1 -2
  271. package/menu/sub-menu-item.js.map +1 -1
  272. package/menusurface/lib/_md-comp-menu-surface.scss +5 -1
  273. package/menusurface/lib/_menu-surface.scss +4 -0
  274. package/menusurface/lib/foundation.js +31 -31
  275. package/menusurface/lib/foundation.js.map +1 -1
  276. package/menusurface/lib/menu-surface-styles.scss +2 -0
  277. package/menusurface/lib/menu-surface.d.ts +2 -2
  278. package/menusurface/lib/menu-surface.js.map +1 -1
  279. package/menusurface/menu-surface.js.map +1 -1
  280. package/navigationbar/lib/_navigation-bar.scss +2 -0
  281. package/navigationbar/lib/constants.d.ts +1 -1
  282. package/navigationbar/lib/navigation-bar-styles.scss +2 -0
  283. package/navigationbar/lib/navigation-bar.js.map +1 -1
  284. package/navigationbar/navigation-bar.js.map +1 -1
  285. package/navigationdrawer/lib/_navigation-drawer-modal.scss +11 -2
  286. package/navigationdrawer/lib/_navigation-drawer.scss +10 -5
  287. package/navigationdrawer/lib/_shared.scss +4 -8
  288. package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js +1 -1
  289. package/navigationdrawer/lib/navigation-drawer-modal-styles.css.js.map +1 -1
  290. package/navigationdrawer/lib/navigation-drawer-modal-styles.scss +2 -0
  291. package/navigationdrawer/lib/navigation-drawer-modal.js.map +1 -1
  292. package/navigationdrawer/lib/navigation-drawer-styles.css.js +1 -1
  293. package/navigationdrawer/lib/navigation-drawer-styles.css.js.map +1 -1
  294. package/navigationdrawer/lib/navigation-drawer-styles.scss +2 -0
  295. package/navigationdrawer/lib/navigation-drawer.js.map +1 -1
  296. package/navigationdrawer/lib/shared-styles.scss +2 -0
  297. package/navigationdrawer/navigation-drawer-modal.js.map +1 -1
  298. package/navigationdrawer/navigation-drawer.js.map +1 -1
  299. package/navigationtab/lib/_navigation-tab.scss +26 -22
  300. package/navigationtab/lib/navigation-tab-styles.css.js +1 -1
  301. package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -1
  302. package/navigationtab/lib/navigation-tab-styles.scss +2 -0
  303. package/navigationtab/lib/navigation-tab.js +4 -4
  304. package/navigationtab/lib/navigation-tab.js.map +1 -1
  305. package/navigationtab/navigation-tab.js.map +1 -1
  306. package/package.json +2 -2
  307. package/radio/lib/_radio.scss +16 -14
  308. package/radio/lib/forced-colors-styles.scss +2 -0
  309. package/radio/lib/radio-styles.css.js +1 -1
  310. package/radio/lib/radio-styles.css.js.map +1 -1
  311. package/radio/lib/radio-styles.scss +2 -0
  312. package/radio/lib/radio.js +21 -21
  313. package/radio/lib/radio.js.map +1 -1
  314. package/radio/radio.js.map +1 -1
  315. package/ripple/directive.d.ts +1 -33
  316. package/ripple/directive.js +7 -194
  317. package/ripple/directive.js.map +1 -1
  318. package/ripple/lib/_md-comp-ripple.scss +20 -19
  319. package/ripple/lib/_ripple.scss +20 -20
  320. package/ripple/lib/ripple-styles.css.js +1 -1
  321. package/ripple/lib/ripple-styles.css.js.map +1 -1
  322. package/ripple/lib/ripple-styles.scss +2 -0
  323. package/ripple/lib/ripple.d.ts +50 -48
  324. package/ripple/lib/ripple.js +214 -76
  325. package/ripple/lib/ripple.js.map +1 -1
  326. package/ripple/ripple.d.ts +9 -1
  327. package/ripple/ripple.js +9 -1
  328. package/ripple/ripple.js.map +1 -1
  329. package/sass/_assert.scss +2 -0
  330. package/sass/_color-scheme.scss +4 -0
  331. package/sass/_color.scss +4 -0
  332. package/sass/_elevation.scss +4 -0
  333. package/sass/_feature-flags.scss +2 -0
  334. package/sass/_map-ext.scss +2 -0
  335. package/sass/_resolvers.scss +4 -4
  336. package/sass/_shape.scss +75 -27
  337. package/sass/_string-ext.scss +44 -0
  338. package/sass/_theme.scss +4 -0
  339. package/sass/_typography.scss +18 -93
  340. package/sass/_var.scss +4 -0
  341. package/segmentedbutton/lib/_outlined-segmented-button.scss +4 -0
  342. package/segmentedbutton/lib/_shared.scss +18 -22
  343. package/segmentedbutton/lib/outlined-styles.css.js +1 -1
  344. package/segmentedbutton/lib/outlined-styles.css.js.map +1 -1
  345. package/segmentedbutton/lib/outlined-styles.scss +2 -0
  346. package/segmentedbutton/lib/segmented-button.js +4 -4
  347. package/segmentedbutton/lib/segmented-button.js.map +1 -1
  348. package/segmentedbutton/lib/shared-styles.css.js +1 -1
  349. package/segmentedbutton/lib/shared-styles.css.js.map +1 -1
  350. package/segmentedbutton/lib/shared-styles.scss +2 -0
  351. package/segmentedbutton/outlined-segmented-button.js.map +1 -1
  352. package/segmentedbuttonset/lib/_outlined-segmented-button-set.scss +9 -5
  353. package/segmentedbuttonset/lib/_shared.scss +0 -13
  354. package/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
  355. package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
  356. package/segmentedbuttonset/lib/outlined-styles.scss +2 -0
  357. package/segmentedbuttonset/lib/segmented-button-set.js.map +1 -1
  358. package/segmentedbuttonset/lib/shared-styles.scss +2 -0
  359. package/segmentedbuttonset/outlined-segmented-button-set.js.map +1 -1
  360. package/{list/lib/listitem/list-item-private-styles.scss → slider/_slider.scss} +1 -3
  361. package/slider/harness.d.ts +20 -0
  362. package/slider/harness.js +63 -0
  363. package/slider/harness.js.map +1 -0
  364. package/slider/lib/_slider.scss +503 -0
  365. package/slider/lib/_tokens.scss +66 -0
  366. package/slider/lib/forced-colors-styles.css.js +9 -0
  367. package/slider/lib/forced-colors-styles.css.js.map +1 -0
  368. package/slider/lib/forced-colors-styles.scss +53 -0
  369. package/slider/lib/slider-styles.css.js +9 -0
  370. package/slider/lib/slider-styles.css.js.map +1 -0
  371. package/{menu/lib/menuitem/menu-item-private-styles.scss → slider/lib/slider-styles.scss} +2 -2
  372. package/slider/lib/slider.d.ts +158 -0
  373. package/slider/lib/slider.js +575 -0
  374. package/slider/lib/slider.js.map +1 -0
  375. package/slider/slider.d.ts +28 -0
  376. package/slider/slider.js +32 -0
  377. package/slider/slider.js.map +1 -0
  378. package/switch/lib/README.md +55 -0
  379. package/switch/lib/_handle.scss +17 -18
  380. package/switch/lib/_icon.scss +4 -0
  381. package/switch/lib/_switch.scss +11 -18
  382. package/switch/lib/_track.scss +2 -0
  383. package/switch/lib/switch-styles.css.js +1 -1
  384. package/switch/lib/switch-styles.css.js.map +1 -1
  385. package/switch/lib/switch-styles.scss +2 -0
  386. package/switch/lib/switch.js +9 -9
  387. package/switch/lib/switch.js.map +1 -1
  388. package/switch/switch.js.map +1 -1
  389. package/textfield/filled-text-field.d.ts +1 -1
  390. package/textfield/filled-text-field.js +1 -2
  391. package/textfield/filled-text-field.js.map +1 -1
  392. package/textfield/harness.js +1 -1
  393. package/textfield/harness.js.map +1 -1
  394. package/textfield/lib/_filled-text-field.scss +116 -110
  395. package/textfield/lib/_icon.scss +14 -73
  396. package/textfield/lib/_input.scss +15 -36
  397. package/textfield/lib/_outlined-text-field.scss +107 -103
  398. package/textfield/lib/_shared.scss +10 -29
  399. package/textfield/lib/filled-forced-colors-styles.scss +2 -0
  400. package/textfield/lib/filled-styles.css.js +1 -1
  401. package/textfield/lib/filled-styles.css.js.map +1 -1
  402. package/textfield/lib/filled-styles.scss +2 -0
  403. package/textfield/lib/filled-text-field.d.ts +6 -5
  404. package/textfield/lib/filled-text-field.js +8 -7
  405. package/textfield/lib/filled-text-field.js.map +1 -1
  406. package/textfield/lib/outlined-forced-colors-styles.scss +2 -0
  407. package/textfield/lib/outlined-styles.css.js +1 -1
  408. package/textfield/lib/outlined-styles.css.js.map +1 -1
  409. package/textfield/lib/outlined-styles.scss +2 -0
  410. package/textfield/lib/outlined-text-field.d.ts +6 -5
  411. package/textfield/lib/outlined-text-field.js +8 -7
  412. package/textfield/lib/outlined-text-field.js.map +1 -1
  413. package/textfield/lib/shared-styles.css.js +1 -1
  414. package/textfield/lib/shared-styles.css.js.map +1 -1
  415. package/textfield/lib/shared-styles.scss +2 -0
  416. package/textfield/lib/text-field.d.ts +40 -88
  417. package/textfield/lib/text-field.js +194 -270
  418. package/textfield/lib/text-field.js.map +1 -1
  419. package/textfield/outlined-text-field.d.ts +1 -1
  420. package/textfield/outlined-text-field.js +1 -2
  421. package/textfield/outlined-text-field.js.map +1 -1
  422. package/tokens/_index.scss +1 -1
  423. package/tokens/{v0_152 → v0_160}/_md-comp-assist-chip.scss +1 -1
  424. package/tokens/{v0_152 → v0_160}/_md-comp-badge.scss +1 -1
  425. package/tokens/{v0_152 → v0_160}/_md-comp-banner.scss +1 -1
  426. package/tokens/{v0_152 → v0_160}/_md-comp-bottom-app-bar.scss +1 -1
  427. package/tokens/{v0_152 → v0_160}/_md-comp-carousel-item.scss +1 -1
  428. package/tokens/{v0_152 → v0_160}/_md-comp-checkbox.scss +4 -15
  429. package/tokens/{v0_152 → v0_160}/_md-comp-circular-progress-indicator.scss +1 -1
  430. package/tokens/{v0_152 → v0_160}/_md-comp-data-table.scss +1 -3
  431. package/tokens/{v0_152 → v0_160}/_md-comp-date-input-modal.scss +10 -10
  432. package/tokens/{v0_152 → v0_160}/_md-comp-date-picker-docked.scss +23 -23
  433. package/tokens/{v0_152 → v0_160}/_md-comp-date-picker-modal.scss +34 -34
  434. package/tokens/{v0_152 → v0_160}/_md-comp-dialog.scss +1 -1
  435. package/tokens/{v0_152 → v0_160}/_md-comp-divider.scss +1 -1
  436. package/tokens/{v0_152 → v0_160}/_md-comp-elevated-button.scss +1 -1
  437. package/tokens/{v0_152 → v0_160}/_md-comp-elevated-card.scss +1 -1
  438. package/tokens/{v0_152 → v0_160}/_md-comp-extended-fab-branded.scss +1 -1
  439. package/tokens/{v0_152 → v0_160}/_md-comp-extended-fab-primary.scss +1 -1
  440. package/tokens/{v0_152 → v0_160}/_md-comp-extended-fab-secondary.scss +1 -1
  441. package/tokens/{v0_152 → v0_160}/_md-comp-extended-fab-surface.scss +1 -1
  442. package/tokens/{v0_152 → v0_160}/_md-comp-extended-fab-tertiary.scss +1 -1
  443. package/tokens/{v0_152 → v0_160}/_md-comp-fab-branded-large.scss +1 -1
  444. package/tokens/{v0_152 → v0_160}/_md-comp-fab-branded.scss +1 -1
  445. package/tokens/{v0_152 → v0_160}/_md-comp-fab-primary-large.scss +1 -1
  446. package/tokens/{v0_152 → v0_160}/_md-comp-fab-primary-small.scss +1 -1
  447. package/tokens/{v0_152 → v0_160}/_md-comp-fab-primary.scss +1 -1
  448. package/tokens/{v0_152 → v0_160}/_md-comp-fab-secondary-large.scss +1 -1
  449. package/tokens/{v0_152 → v0_160}/_md-comp-fab-secondary-small.scss +1 -1
  450. package/tokens/{v0_152 → v0_160}/_md-comp-fab-secondary.scss +1 -1
  451. package/tokens/{v0_152 → v0_160}/_md-comp-fab-surface-large.scss +1 -1
  452. package/tokens/{v0_152 → v0_160}/_md-comp-fab-surface-small.scss +1 -1
  453. package/tokens/{v0_152 → v0_160}/_md-comp-fab-surface.scss +1 -1
  454. package/tokens/{v0_152 → v0_160}/_md-comp-fab-tertiary-large.scss +1 -1
  455. package/tokens/{v0_152 → v0_160}/_md-comp-fab-tertiary-small.scss +1 -1
  456. package/tokens/{v0_152 → v0_160}/_md-comp-fab-tertiary.scss +1 -1
  457. package/tokens/{v0_152 → v0_160}/_md-comp-filled-autocomplete.scss +1 -1
  458. package/tokens/{v0_152 → v0_160}/_md-comp-filled-button.scss +1 -1
  459. package/tokens/{v0_152 → v0_160}/_md-comp-filled-card.scss +1 -1
  460. package/tokens/{v0_152 → v0_160}/_md-comp-filled-icon-button.scss +1 -1
  461. package/tokens/{v0_152 → v0_160}/_md-comp-filled-menu-button.scss +1 -1
  462. package/tokens/{v0_152 → v0_160}/_md-comp-filled-select.scss +1 -1
  463. package/tokens/{v0_152 → v0_160}/_md-comp-filled-text-field.scss +1 -1
  464. package/tokens/{v0_152 → v0_160}/_md-comp-filled-tonal-button.scss +1 -1
  465. package/tokens/{v0_152 → v0_160}/_md-comp-filled-tonal-icon-button.scss +1 -1
  466. package/tokens/{v0_152 → v0_160}/_md-comp-filter-chip.scss +1 -1
  467. package/tokens/{v0_152 → v0_160}/_md-comp-full-screen-dialog.scss +1 -1
  468. package/tokens/{v0_152 → v0_160}/_md-comp-icon-button.scss +1 -1
  469. package/tokens/{v0_152 → v0_160}/_md-comp-input-chip.scss +1 -1
  470. package/tokens/{v0_152 → v0_160}/_md-comp-linear-progress-indicator.scss +1 -1
  471. package/tokens/{v0_152 → v0_160}/_md-comp-list.scss +1 -1
  472. package/tokens/{v0_152 → v0_160}/_md-comp-menu.scss +1 -1
  473. package/tokens/{v0_152 → v0_160}/_md-comp-navigation-bar.scss +1 -1
  474. package/tokens/{v0_152 → v0_160}/_md-comp-navigation-drawer.scss +1 -1
  475. package/tokens/{v0_152 → v0_160}/_md-comp-navigation-rail.scss +1 -1
  476. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-autocomplete.scss +1 -1
  477. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-button.scss +1 -1
  478. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-card.scss +1 -1
  479. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-icon-button.scss +1 -1
  480. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-menu-button.scss +1 -1
  481. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-segmented-button.scss +1 -1
  482. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-select.scss +1 -1
  483. package/tokens/{v0_152 → v0_160}/_md-comp-outlined-text-field.scss +1 -1
  484. package/tokens/{v0_152 → v0_160}/_md-comp-plain-tooltip.scss +1 -1
  485. package/tokens/{v0_152 → v0_160}/_md-comp-primary-navigation-tab.scss +1 -3
  486. package/tokens/{v0_152 → v0_160}/_md-comp-radio-button.scss +1 -1
  487. package/tokens/{v0_152 → v0_160}/_md-comp-rich-tooltip.scss +1 -1
  488. package/tokens/{v0_152 → v0_160}/_md-comp-scrim.scss +1 -1
  489. package/tokens/{v0_152 → v0_160}/_md-comp-search-bar.scss +1 -1
  490. package/tokens/{v0_152 → v0_160}/_md-comp-search-view.scss +1 -1
  491. package/tokens/{v0_152 → v0_160}/_md-comp-secondary-navigation-tab.scss +1 -3
  492. package/tokens/{v0_152 → v0_160}/_md-comp-sheet-bottom.scss +1 -1
  493. package/tokens/{v0_152 → v0_160}/_md-comp-sheet-floating.scss +1 -1
  494. package/tokens/{v0_152 → v0_160}/_md-comp-sheet-side.scss +10 -10
  495. package/tokens/{v0_152 → v0_160}/_md-comp-slider.scss +1 -1
  496. package/tokens/{v0_152 → v0_160}/_md-comp-snackbar.scss +1 -1
  497. package/tokens/{v0_152 → v0_160}/_md-comp-standard-menu-button.scss +1 -1
  498. package/tokens/{v0_152 → v0_160}/_md-comp-suggestion-chip.scss +1 -1
  499. package/tokens/{v0_152 → v0_160}/_md-comp-switch.scss +1 -1
  500. package/tokens/{v0_152 → v0_160}/_md-comp-text-button.scss +1 -1
  501. package/tokens/{v0_152 → v0_160}/_md-comp-time-input.scss +1 -1
  502. package/tokens/{v0_152 → v0_160}/_md-comp-time-picker.scss +1 -1
  503. package/tokens/{v0_152 → v0_160}/_md-comp-top-app-bar-large.scss +1 -1
  504. package/tokens/{v0_152 → v0_160}/_md-comp-top-app-bar-medium.scss +1 -1
  505. package/tokens/{v0_152 → v0_160}/_md-comp-top-app-bar-small-centered.scss +1 -1
  506. package/tokens/{v0_152 → v0_160}/_md-comp-top-app-bar-small.scss +1 -1
  507. package/tokens/{v0_152 → v0_160}/_md-ref-palette.scss +1 -1
  508. package/tokens/{v0_152 → v0_160}/_md-ref-typeface.scss +1 -1
  509. package/tokens/{v0_152 → v0_160}/_md-sys-color.scss +217 -1
  510. package/tokens/{v0_152 → v0_160}/_md-sys-elevation.scss +1 -1
  511. package/tokens/{v0_152 → v0_160}/_md-sys-motion.scss +1 -1
  512. package/tokens/{v0_152 → v0_160}/_md-sys-shape.scss +1 -1
  513. package/tokens/{v0_152 → v0_160}/_md-sys-state.scss +1 -1
  514. package/tokens/{v0_152 → v0_160}/_md-sys-typescale.scss +1 -1
  515. package/tokens/v0_161/_index.scss +107 -0
  516. package/tokens/v0_161/_md-comp-assist-chip.scss +109 -0
  517. package/tokens/v0_161/_md-comp-badge.scss +58 -0
  518. package/tokens/v0_161/_md-comp-banner.scss +75 -0
  519. package/tokens/v0_161/_md-comp-bottom-app-bar.scss +35 -0
  520. package/tokens/v0_161/_md-comp-carousel-item.scss +65 -0
  521. package/tokens/v0_161/_md-comp-checkbox.scss +126 -0
  522. package/tokens/v0_161/_md-comp-circular-progress-indicator.scss +39 -0
  523. package/tokens/v0_161/_md-comp-data-table.scss +96 -0
  524. package/tokens/v0_161/_md-comp-date-input-modal.scss +89 -0
  525. package/tokens/v0_161/_md-comp-date-picker-docked.scss +246 -0
  526. package/tokens/v0_161/_md-comp-date-picker-modal.scss +305 -0
  527. package/tokens/v0_161/_md-comp-dialog.scss +123 -0
  528. package/tokens/v0_161/_md-comp-divider.scss +25 -0
  529. package/tokens/v0_161/_md-comp-elevated-button.scss +91 -0
  530. package/tokens/v0_161/_md-comp-elevated-card.scss +59 -0
  531. package/tokens/v0_161/_md-comp-extended-fab-branded.scss +86 -0
  532. package/tokens/v0_161/_md-comp-extended-fab-primary.scss +94 -0
  533. package/tokens/v0_161/_md-comp-extended-fab-secondary.scss +95 -0
  534. package/tokens/v0_161/_md-comp-extended-fab-surface.scss +90 -0
  535. package/tokens/v0_161/_md-comp-extended-fab-tertiary.scss +95 -0
  536. package/tokens/v0_161/_md-comp-fab-branded-large.scss +60 -0
  537. package/tokens/v0_161/_md-comp-fab-branded.scss +60 -0
  538. package/tokens/v0_161/_md-comp-fab-primary-large.scss +65 -0
  539. package/tokens/v0_161/_md-comp-fab-primary-small.scss +65 -0
  540. package/tokens/v0_161/_md-comp-fab-primary.scss +65 -0
  541. package/tokens/v0_161/_md-comp-fab-secondary-large.scss +66 -0
  542. package/tokens/v0_161/_md-comp-fab-secondary-small.scss +66 -0
  543. package/tokens/v0_161/_md-comp-fab-secondary.scss +66 -0
  544. package/tokens/v0_161/_md-comp-fab-surface-large.scss +64 -0
  545. package/tokens/v0_161/_md-comp-fab-surface-small.scss +64 -0
  546. package/tokens/v0_161/_md-comp-fab-surface.scss +64 -0
  547. package/tokens/v0_161/_md-comp-fab-tertiary-large.scss +66 -0
  548. package/tokens/v0_161/_md-comp-fab-tertiary-small.scss +66 -0
  549. package/tokens/v0_161/_md-comp-fab-tertiary.scss +66 -0
  550. package/tokens/v0_161/_md-comp-filled-autocomplete.scss +267 -0
  551. package/tokens/v0_161/_md-comp-filled-button.scss +89 -0
  552. package/tokens/v0_161/_md-comp-filled-card.scss +58 -0
  553. package/tokens/v0_161/_md-comp-filled-icon-button.scss +79 -0
  554. package/tokens/v0_161/_md-comp-filled-menu-button.scss +98 -0
  555. package/tokens/v0_161/_md-comp-filled-select.scss +272 -0
  556. package/tokens/v0_161/_md-comp-filled-text-field.scss +189 -0
  557. package/tokens/v0_161/_md-comp-filled-tonal-button.scss +99 -0
  558. package/tokens/v0_161/_md-comp-filled-tonal-icon-button.scss +86 -0
  559. package/tokens/v0_161/_md-comp-filter-chip.scss +209 -0
  560. package/tokens/v0_161/_md-comp-full-screen-dialog.scss +111 -0
  561. package/tokens/v0_161/_md-comp-icon-button.scss +70 -0
  562. package/tokens/v0_161/_md-comp-input-chip.scss +184 -0
  563. package/tokens/v0_161/_md-comp-linear-progress-indicator.scss +41 -0
  564. package/tokens/v0_161/_md-comp-list.scss +248 -0
  565. package/tokens/v0_161/_md-comp-menu.scss +37 -0
  566. package/tokens/v0_161/_md-comp-navigation-bar.scss +114 -0
  567. package/tokens/v0_161/_md-comp-navigation-drawer.scss +162 -0
  568. package/tokens/v0_161/_md-comp-navigation-rail.scss +131 -0
  569. package/tokens/v0_161/_md-comp-outlined-autocomplete.scss +257 -0
  570. package/tokens/v0_161/_md-comp-outlined-button.scss +84 -0
  571. package/tokens/v0_161/_md-comp-outlined-card.scss +65 -0
  572. package/tokens/v0_161/_md-comp-outlined-icon-button.scss +79 -0
  573. package/tokens/v0_161/_md-comp-outlined-menu-button.scss +94 -0
  574. package/tokens/v0_161/_md-comp-outlined-segmented-button.scss +112 -0
  575. package/tokens/v0_161/_md-comp-outlined-select.scss +262 -0
  576. package/tokens/v0_161/_md-comp-outlined-text-field.scss +171 -0
  577. package/tokens/v0_161/_md-comp-plain-tooltip.scss +55 -0
  578. package/tokens/v0_161/_md-comp-primary-navigation-tab.scss +121 -0
  579. package/tokens/v0_161/_md-comp-radio-button.scss +68 -0
  580. package/tokens/v0_161/_md-comp-rich-tooltip.scss +121 -0
  581. package/tokens/v0_161/_md-comp-scrim.scss +25 -0
  582. package/tokens/v0_161/_md-comp-search-bar.scss +99 -0
  583. package/tokens/v0_161/_md-comp-search-view.scss +93 -0
  584. package/tokens/v0_161/_md-comp-secondary-navigation-tab.scss +84 -0
  585. package/tokens/v0_161/_md-comp-sheet-bottom.scss +45 -0
  586. package/tokens/v0_161/_md-comp-sheet-floating.scss +34 -0
  587. package/tokens/v0_161/_md-comp-sheet-side.scss +91 -0
  588. package/tokens/v0_161/_md-comp-slider.scss +114 -0
  589. package/tokens/v0_161/_md-comp-snackbar.scss +127 -0
  590. package/tokens/v0_161/_md-comp-standard-menu-button.scss +98 -0
  591. package/tokens/v0_161/_md-comp-suggestion-chip.scss +125 -0
  592. package/tokens/v0_161/_md-comp-switch.scss +136 -0
  593. package/tokens/v0_161/_md-comp-text-button.scss +77 -0
  594. package/tokens/v0_161/_md-comp-time-input.scss +218 -0
  595. package/tokens/v0_161/_md-comp-time-picker.scss +264 -0
  596. package/tokens/v0_161/_md-comp-top-app-bar-large.scss +63 -0
  597. package/tokens/v0_161/_md-comp-top-app-bar-medium.scss +63 -0
  598. package/tokens/v0_161/_md-comp-top-app-bar-small-centered.scss +66 -0
  599. package/tokens/v0_161/_md-comp-top-app-bar-small.scss +64 -0
  600. package/tokens/v0_161/_md-ref-palette.scss +107 -0
  601. package/tokens/v0_161/_md-ref-typeface.scss +21 -0
  602. package/tokens/v0_161/_md-sys-color.scss +904 -0
  603. package/tokens/v0_161/_md-sys-elevation.scss +21 -0
  604. package/tokens/v0_161/_md-sys-motion.scss +53 -0
  605. package/tokens/v0_161/_md-sys-shape.scss +30 -0
  606. package/tokens/v0_161/_md-sys-state.scss +19 -0
  607. package/tokens/v0_161/_md-sys-typescale.scss +284 -0
  608. package/tokens/v0_161/index.test.css.js +9 -0
  609. package/tokens/v0_161/index.test.css.js.map +1 -0
  610. package/tokens/v0_161/index.test.scss +584 -0
  611. package/tokens/v0_161/lib.test.css.js +9 -0
  612. package/tokens/v0_161/lib.test.css.js.map +1 -0
  613. package/tokens/v0_161/lib.test.scss +663 -0
  614. package/controller/foundation.d.ts +0 -24
  615. package/controller/foundation.js +0 -18
  616. package/controller/foundation.js.map +0 -1
  617. package/controller/observer-foundation.d.ts +0 -25
  618. package/controller/observer-foundation.js +0 -37
  619. package/controller/observer-foundation.js.map +0 -1
  620. package/controller/observer.d.ts +0 -52
  621. package/controller/observer.js +0 -149
  622. package/controller/observer.js.map +0 -1
  623. package/decorators/bound.d.ts +0 -40
  624. package/decorators/bound.js +0 -49
  625. package/decorators/bound.js.map +0 -1
  626. package/list/lib/avatar/_list-item-avatar.scss +0 -38
  627. package/list/lib/avatar/list-item-avatar-styles.css.js +0 -9
  628. package/list/lib/avatar/list-item-avatar-styles.css.js.map +0 -1
  629. package/list/lib/avatar/list-item-avatar-styles.scss +0 -8
  630. package/list/lib/avatar/list-item-avatar.d.ts +0 -21
  631. package/list/lib/avatar/list-item-avatar.js +0 -48
  632. package/list/lib/avatar/list-item-avatar.js.map +0 -1
  633. package/list/lib/icon/_list-item-icon.scss +0 -67
  634. package/list/lib/icon/list-item-icon-styles.css.js +0 -9
  635. package/list/lib/icon/list-item-icon-styles.css.js.map +0 -1
  636. package/list/lib/icon/list-item-icon-styles.scss +0 -8
  637. package/list/lib/icon/list-item-icon.d.ts +0 -9
  638. package/list/lib/icon/list-item-icon.js +0 -15
  639. package/list/lib/icon/list-item-icon.js.map +0 -1
  640. package/list/lib/image/_list-item-image.scss +0 -59
  641. package/list/lib/image/list-item-image-styles.css.js +0 -9
  642. package/list/lib/image/list-item-image-styles.css.js.map +0 -1
  643. package/list/lib/image/list-item-image-styles.scss +0 -8
  644. package/list/lib/image/list-item-image.d.ts +0 -21
  645. package/list/lib/image/list-item-image.js +0 -48
  646. package/list/lib/image/list-item-image.js.map +0 -1
  647. package/list/lib/listitem/list-item-private-styles.css.js +0 -9
  648. package/list/lib/listitem/list-item-private-styles.css.js.map +0 -1
  649. package/list/lib/video/_list-item-video.scss +0 -67
  650. package/list/lib/video/list-item-video-styles.css.d.ts +0 -1
  651. package/list/lib/video/list-item-video-styles.css.js +0 -9
  652. package/list/lib/video/list-item-video-styles.css.js.map +0 -1
  653. package/list/lib/video/list-item-video-styles.scss +0 -8
  654. package/list/lib/video/list-item-video.d.ts +0 -53
  655. package/list/lib/video/list-item-video.js +0 -115
  656. package/list/lib/video/list-item-video.js.map +0 -1
  657. package/list/list-item-avatar.d.ts +0 -20
  658. package/list/list-item-avatar.js +0 -23
  659. package/list/list-item-avatar.js.map +0 -1
  660. package/list/list-item-icon.d.ts +0 -20
  661. package/list/list-item-icon.js +0 -23
  662. package/list/list-item-icon.js.map +0 -1
  663. package/list/list-item-image.d.ts +0 -20
  664. package/list/list-item-image.js +0 -23
  665. package/list/list-item-image.js.map +0 -1
  666. package/list/list-item-video.d.ts +0 -20
  667. package/list/list-item-video.js +0 -23
  668. package/list/list-item-video.js.map +0 -1
  669. package/menu/lib/menuitem/menu-item-private-styles.css.d.ts +0 -1
  670. package/menu/lib/menuitem/menu-item-private-styles.css.js +0 -9
  671. package/menu/lib/menuitem/menu-item-private-styles.css.js.map +0 -1
  672. /package/{list/lib/avatar/list-item-avatar-styles.css.d.ts → slider/lib/forced-colors-styles.css.d.ts} +0 -0
  673. /package/{list/lib/icon/list-item-icon-styles.css.d.ts → slider/lib/slider-styles.css.d.ts} +0 -0
  674. /package/tokens/{v0_152 → v0_160}/_index.scss +0 -0
  675. /package/tokens/{v0_152 → v0_160}/index.test.css.d.ts +0 -0
  676. /package/tokens/{v0_152 → v0_160}/index.test.css.js +0 -0
  677. /package/tokens/{v0_152 → v0_160}/index.test.css.js.map +0 -0
  678. /package/tokens/{v0_152 → v0_160}/index.test.scss +0 -0
  679. /package/tokens/{v0_152 → v0_160}/lib.test.css.d.ts +0 -0
  680. /package/tokens/{v0_152 → v0_160}/lib.test.css.js +0 -0
  681. /package/tokens/{v0_152 → v0_160}/lib.test.css.js.map +0 -0
  682. /package/tokens/{v0_152 → v0_160}/lib.test.scss +0 -0
  683. /package/{list/lib/image/list-item-image-styles.css.d.ts → tokens/v0_161/index.test.css.d.ts} +0 -0
  684. /package/{list/lib/listitem/list-item-private-styles.css.d.ts → tokens/v0_161/lib.test.css.d.ts} +0 -0
@@ -4,11 +4,13 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { __decorate, __metadata } from "tslib";
7
- import { html, LitElement } from 'lit';
8
- import { property, queryAsync, state } from 'lit/decorators.js';
7
+ import { html, LitElement, nothing } from 'lit';
8
+ import { property, query, state } from 'lit/decorators.js';
9
9
  import { classMap } from 'lit/directives/class-map.js';
10
- import { createAnimationSignal, EASING } from '../../motion/animation.js';
11
- /** @soyCompatible */
10
+ import { EASING } from '../../motion/animation.js';
11
+ /**
12
+ * A field component.
13
+ */
12
14
  export class Field extends LitElement {
13
15
  constructor() {
14
16
  super(...arguments);
@@ -16,6 +18,7 @@ export class Field extends LitElement {
16
18
  this.error = false;
17
19
  this.focused = false;
18
20
  this.populated = false;
21
+ this.resizable = false;
19
22
  this.required = false;
20
23
  /**
21
24
  * Whether or not the field has leading content.
@@ -26,100 +29,6 @@ export class Field extends LitElement {
26
29
  */
27
30
  this.hasEnd = false;
28
31
  this.isAnimating = false;
29
- this.labelAnimationSignal = createAnimationSignal();
30
- }
31
- /** @soyTemplate */
32
- render() {
33
- return html `
34
- <span class="md3-field ${classMap(this.getRenderClasses())}">
35
- ${this.renderContainer()}
36
- ${this.renderSupportingText()}
37
- </span>
38
- `;
39
- }
40
- /** @soyTemplate */
41
- renderContainer() {
42
- return html `
43
- <span class="md3-field__container">
44
- ${this.renderContainerContents()}
45
- </span>
46
- `;
47
- }
48
- /** @soyTemplate */
49
- getRenderClasses() {
50
- return {
51
- 'md3-field--disabled': this.disabled,
52
- 'md3-field--error': this.error,
53
- 'md3-field--focused': this.focused,
54
- 'md3-field--with-start': this.hasStart,
55
- 'md3-field--with-end': this.hasEnd,
56
- 'md3-field--populated': this.populated,
57
- 'md3-field--required': this.required,
58
- 'md3-field--no-label': !this.label,
59
- };
60
- }
61
- /** @soyTemplate */
62
- renderContainerContents() {
63
- return html `
64
- <span class="md3-field__start">
65
- <slot name="start"></slot>
66
- </span>
67
- <span class="md3-field__middle">${this.renderMiddleContents()}</span>
68
- <span class="md3-field__end">
69
- <slot name="end"></slot>
70
- </span>
71
- `;
72
- }
73
- /** @soyTemplate */
74
- renderMiddleContents() {
75
- return html `
76
- <span class="md3-field__content"><slot></slot></span>
77
- `;
78
- }
79
- /** @soyTemplate */
80
- renderFloatingLabel() {
81
- const visible = (this.focused || this.populated) && !this.isAnimating;
82
- /** @classMap */
83
- const classes = { 'md3-field__label--hidden': !visible };
84
- return html `
85
- <span class="md3-field__label md3-field__label--floating ${classMap(classes)}"
86
- aria-hidden=${!visible}
87
- >${this.renderLabelText()}</span>
88
- `;
89
- // TODO(b/217441842): Create shared function once argument bug is fixed
90
- // return this.renderLabel(LabelType.FLOATING);
91
- }
92
- /** @soyTemplate */
93
- renderRestingLabel() {
94
- const visible = !(this.focused || this.populated) || this.isAnimating;
95
- /** @classMap */
96
- const classes = { 'md3-field__label--hidden': !visible };
97
- return html `
98
- <span class="md3-field__label md3-field__label--resting ${classMap(classes)}"
99
- aria-hidden=${!visible}
100
- >${this.renderLabelText()}</span>
101
- `;
102
- // TODO(b/217441842): Create shared function once argument bug is fixed
103
- // return this.renderLabel(LabelType.RESTING);
104
- }
105
- /** @soyTemplate */
106
- renderLabelText() {
107
- const labelText = this.label ?? '';
108
- const optionalAsterisk = this.required && labelText ? '*' : '';
109
- return labelText + optionalAsterisk;
110
- }
111
- /** @soyTemplate */
112
- renderSupportingText() {
113
- return html `
114
- <span class="md3-field__supporting-text">
115
- <span class="md3-field__supporting-text-start">
116
- <slot name="supporting-text"></slot>
117
- </span>
118
- <span class="md3-field__supporting-text-end">
119
- <slot name="supporting-text-end"></slot>
120
- </span>
121
- </span>
122
- `;
123
32
  }
124
33
  update(props) {
125
34
  // Client-side property updates
@@ -135,7 +44,81 @@ export class Field extends LitElement {
135
44
  });
136
45
  super.update(props);
137
46
  }
138
- async animateLabelIfNeeded({ wasFocused, wasPopulated }) {
47
+ render() {
48
+ const floatingLabel = this.renderLabel(/*isFloating*/ true);
49
+ const restingLabel = this.renderLabel(/*isFloating*/ false);
50
+ const outline = this.renderOutline?.(floatingLabel);
51
+ const classes = {
52
+ 'disabled': this.disabled,
53
+ 'error': this.error && !this.disabled,
54
+ 'focused': this.focused,
55
+ 'with-start': this.hasStart,
56
+ 'with-end': this.hasEnd,
57
+ 'populated': this.populated,
58
+ 'resizable': this.resizable,
59
+ 'required': this.required,
60
+ 'no-label': !this.label,
61
+ };
62
+ return html `
63
+ <div class="field ${classMap(classes)}">
64
+ <div class="container-overflow">
65
+ ${outline}
66
+ ${this.renderBackground?.()}
67
+ ${this.renderIndicator?.()}
68
+ <div class="container">
69
+ <div class="start">
70
+ <slot name="start"></slot>
71
+ </div>
72
+ <div class="middle">
73
+ ${restingLabel}
74
+ ${outline ? nothing : floatingLabel}
75
+ <div class="content">
76
+ <slot></slot>
77
+ </div>
78
+ </div>
79
+ <div class="end">
80
+ <slot name="end"></slot>
81
+ </div>
82
+ </div>
83
+ </div>
84
+
85
+ <div class="supporting-text">
86
+ <div class="supporting-text-start">
87
+ <slot name="supporting-text"></slot>
88
+ </div>
89
+ <div class="supporting-text-end">
90
+ <slot name="supporting-text-end"></slot>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ `;
95
+ }
96
+ renderLabel(isFloating) {
97
+ let visible;
98
+ if (isFloating) {
99
+ // Floating label is visible when focused/populated or when animating.
100
+ visible = this.focused || this.populated || this.isAnimating;
101
+ }
102
+ else {
103
+ // Resting label is visible when unfocused. It is never visible while
104
+ // animating.
105
+ visible = !this.focused && !this.populated && !this.isAnimating;
106
+ }
107
+ const classes = {
108
+ 'hidden': !visible,
109
+ 'floating': isFloating,
110
+ 'resting': !isFloating,
111
+ };
112
+ let labelText = this.label ?? '';
113
+ // Add '*' if a label is present and the field is required
114
+ labelText += this.required && labelText ? '*' : '';
115
+ return html `
116
+ <span class="label ${classMap(classes)}"
117
+ aria-hidden=${!visible}
118
+ >${labelText}</span>
119
+ `;
120
+ }
121
+ animateLabelIfNeeded({ wasFocused, wasPopulated }) {
139
122
  if (!this.label) {
140
123
  return;
141
124
  }
@@ -147,18 +130,12 @@ export class Field extends LitElement {
147
130
  return;
148
131
  }
149
132
  this.isAnimating = true;
150
- const signal = this.labelAnimationSignal.start();
133
+ this.labelAnimation?.cancel();
151
134
  // Only one label is visible at a time for clearer text rendering.
152
- // The resting label is visible and used during animation. At the end of the
153
- // animation, it will either remain visible (if resting) or hide and the
154
- // floating label will be shown.
155
- const labelEl = await this.restingLabelEl;
156
- const keyframes = await this.getLabelKeyframes();
157
- if (signal.aborted) {
158
- // Don't animate if this animation was requested to stop while getting
159
- // the label element or calculating keyframes
160
- return;
161
- }
135
+ // The floating label is visible and used during animation. At the end of
136
+ // the animation, it will either remain visible (if floating) or hide and
137
+ // the resting label will be shown.
138
+ //
162
139
  // We don't use forward filling because if the dimensions of the text field
163
140
  // change (leading icon removed, density changes, etc), then the animation
164
141
  // will be inaccurate.
@@ -166,42 +143,52 @@ export class Field extends LitElement {
166
143
  // Re-calculating the animation each time will prevent any visual glitches
167
144
  // from appearing.
168
145
  // TODO(b/241113345): use animation tokens
169
- const animation = labelEl.animate(keyframes, { duration: 150, easing: EASING.STANDARD });
170
- signal.addEventListener('abort', () => {
171
- // Cancel if requested (another animation starts playing).
172
- animation.cancel();
173
- });
174
- animation.addEventListener('finish', () => {
146
+ this.labelAnimation = this.floatingLabelEl?.animate(this.getLabelKeyframes(), { duration: 150, easing: EASING.STANDARD });
147
+ this.labelAnimation?.addEventListener('finish', () => {
175
148
  // At the end of the animation, update the visible label.
176
149
  this.isAnimating = false;
177
- this.labelAnimationSignal.finish();
178
150
  });
179
151
  }
180
- async getLabelKeyframes() {
181
- const floatingLabelEl = await this.floatingLabelEl;
182
- const restingLabelEl = await this.restingLabelEl;
183
- const { x: floatingX, y: floatingY, width: floatingWidth, height: floatingHeight } = floatingLabelEl.getBoundingClientRect();
184
- const { x: restingX, y: restingY, width: restingWidth, height: restingHeight } = restingLabelEl.getBoundingClientRect();
152
+ getLabelKeyframes() {
153
+ const { floatingLabelEl, restingLabelEl } = this;
154
+ if (!floatingLabelEl || !restingLabelEl) {
155
+ return [];
156
+ }
157
+ const { x: floatingX, y: floatingY, height: floatingHeight } = floatingLabelEl.getBoundingClientRect();
158
+ const { x: restingX, y: restingY, height: restingHeight } = restingLabelEl.getBoundingClientRect();
159
+ const floatingScrollWidth = floatingLabelEl.scrollWidth;
160
+ const restingScrollWidth = restingLabelEl.scrollWidth;
185
161
  // Scale by width ratio instead of font size since letter-spacing will scale
186
162
  // incorrectly. Using the width we can better approximate the adjusted
187
- // scale and compensate for tracking.
188
- const scale = floatingWidth / restingWidth;
189
- const xDelta = floatingX - restingX;
163
+ // scale and compensate for tracking and overflow.
164
+ // (use scrollWidth instead of width to account for clipped labels)
165
+ const scale = restingScrollWidth / floatingScrollWidth;
166
+ const xDelta = restingX - floatingX;
190
167
  // The line-height of the resting and floating label are different. When
191
- // we move the resting label up to the floating label's position, it won't
168
+ // we move the floating label down to the resting label's position, it won't
192
169
  // exactly match because of this. We need to adjust by half of what the
193
- // final scaled resting label's height will be.
194
- const yDelta = floatingY - restingY +
195
- Math.round((floatingHeight - restingHeight * scale) / 2);
196
- // Create the two transforms: resting to floating (using the calculations
197
- // above), and floating to resting (re-setting the transform to initial
170
+ // final scaled floating label's height will be.
171
+ const yDelta = restingY - floatingY +
172
+ Math.round((restingHeight - floatingHeight * scale) / 2);
173
+ // Create the two transforms: floating to resting (using the calculations
174
+ // above), and resting to floating (re-setting the transform to initial
198
175
  // values).
199
- const floatTransform = `translateX(${xDelta}px) translateY(calc(-50% + ${yDelta}px)) scale(${scale})`;
200
- const restTransform = `translateX(0) translateY(-50%) scale(1)`;
176
+ const restTransform = `translateX(${xDelta}px) translateY(${yDelta}px) scale(${scale})`;
177
+ const floatTransform = `translateX(0) translateY(0) scale(1)`;
178
+ // Constrain the floating labels width to a scaled percentage of the
179
+ // resting label's width. This will prevent long clipped labels from
180
+ // overflowing the container.
181
+ const restingClientWidth = restingLabelEl.clientWidth;
182
+ const isRestingClipped = restingScrollWidth > restingClientWidth;
183
+ const width = isRestingClipped ? `${restingClientWidth / scale}px` : '';
201
184
  if (this.focused || this.populated) {
202
- return [{ transform: restTransform }, { transform: floatTransform }];
185
+ return [
186
+ { transform: restTransform, width }, { transform: floatTransform, width }
187
+ ];
203
188
  }
204
- return [{ transform: floatTransform }, { transform: restTransform }];
189
+ return [
190
+ { transform: floatTransform, width }, { transform: restTransform, width }
191
+ ];
205
192
  }
206
193
  }
207
194
  __decorate([
@@ -224,6 +211,10 @@ __decorate([
224
211
  property({ type: Boolean }),
225
212
  __metadata("design:type", Object)
226
213
  ], Field.prototype, "populated", void 0);
214
+ __decorate([
215
+ property({ type: Boolean }),
216
+ __metadata("design:type", Object)
217
+ ], Field.prototype, "resizable", void 0);
227
218
  __decorate([
228
219
  property({ type: Boolean }),
229
220
  __metadata("design:type", Object)
@@ -241,11 +232,11 @@ __decorate([
241
232
  __metadata("design:type", Object)
242
233
  ], Field.prototype, "isAnimating", void 0);
243
234
  __decorate([
244
- queryAsync('.md3-field__label--floating'),
245
- __metadata("design:type", Promise)
235
+ query('.label.floating'),
236
+ __metadata("design:type", HTMLElement)
246
237
  ], Field.prototype, "floatingLabelEl", void 0);
247
238
  __decorate([
248
- queryAsync('.md3-field__label--resting'),
249
- __metadata("design:type", Promise)
239
+ query('.label.resting'),
240
+ __metadata("design:type", HTMLElement)
250
241
  ], Field.prototype, "restingLabelEl", void 0);
251
242
  //# sourceMappingURL=field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sourceRoot":"","sources":["field.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAY,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAC,qBAAqB,EAAE,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAExE,qBAAqB;AACrB,MAAM,OAAO,KAAM,SAAQ,UAAU;IAArC;;QAC6B,aAAQ,GAAG,KAAK,CAAC;QACjB,UAAK,GAAG,KAAK,CAAC;QACd,YAAO,GAAG,KAAK,CAAC;QAEhB,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QAE5C;;WAEG;QACwB,aAAQ,GAAG,KAAK,CAAC;QAC5C;;WAEG;QACwB,WAAM,GAAG,KAAK,CAAC;QAEvB,gBAAW,GAAG,KAAK,CAAC;QAEpB,yBAAoB,GAAG,qBAAqB,EAAE,CAAC;IAgOpE,CAAC;IAzNC,mBAAmB;IACV,MAAM;QACb,OAAO,IAAI,CAAA;+BACgB,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;UACtD,IAAI,CAAC,eAAe,EAAE;UACtB,IAAI,CAAC,oBAAoB,EAAE;;KAEhC,CAAC;IACJ,CAAC;IAED,mBAAmB;IACT,eAAe;QACvB,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,uBAAuB,EAAE;;KAEnC,CAAC;IACJ,CAAC;IAED,mBAAmB;IACT,gBAAgB;QACxB,OAAO;YACL,qBAAqB,EAAE,IAAI,CAAC,QAAQ;YACpC,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,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AmB;AAClB;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;uCAAkB;AAKjB;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;uCAAkB;AAIjB;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;qCAAgB;AAEjC;IAAR,KAAK,EAAE;;0CAA+B;AAKvC;IADC,UAAU,CAAC,6BAA6B,CAAC;;8CACgB;AAE1D;IADC,UAAU,CAAC,4BAA4B,CAAC;;6CACgB","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, LitElement, PropertyValues, TemplateResult} from 'lit';\nimport {property, queryAsync, state} from 'lit/decorators.js';\nimport {ClassInfo, classMap} from 'lit/directives/class-map.js';\n\nimport {createAnimationSignal, EASING} from '../../motion/animation.js';\n\n/** @soyCompatible */\nexport class Field extends LitElement {\n @property({type: Boolean}) disabled = false;\n @property({type: Boolean}) error = false;\n @property({type: Boolean}) focused = false;\n @property({type: String}) label?: string;\n @property({type: Boolean}) populated = false;\n @property({type: Boolean}) required = false;\n\n /**\n * Whether or not the field has leading content.\n */\n @property({type: Boolean}) hasStart = false;\n /**\n * Whether or not the field has trailing content.\n */\n @property({type: Boolean}) hasEnd = false;\n\n @state() protected isAnimating = false;\n\n protected readonly labelAnimationSignal = createAnimationSignal();\n\n @queryAsync('.md3-field__label--floating')\n protected readonly floatingLabelEl!: Promise<HTMLElement>;\n @queryAsync('.md3-field__label--resting')\n protected readonly restingLabelEl!: Promise<HTMLElement>;\n\n /** @soyTemplate */\n override render(): TemplateResult {\n return html`\n <span class=\"md3-field ${classMap(this.getRenderClasses())}\">\n ${this.renderContainer()}\n ${this.renderSupportingText()}\n </span>\n `;\n }\n\n /** @soyTemplate */\n protected renderContainer(): TemplateResult {\n return html`\n <span class=\"md3-field__container\">\n ${this.renderContainerContents()}\n </span>\n `;\n }\n\n /** @soyTemplate */\n protected getRenderClasses(): ClassInfo {\n return {\n 'md3-field--disabled': this.disabled,\n 'md3-field--error': this.error,\n 'md3-field--focused': this.focused,\n 'md3-field--with-start': this.hasStart,\n 'md3-field--with-end': this.hasEnd,\n 'md3-field--populated': this.populated,\n 'md3-field--required': this.required,\n 'md3-field--no-label': !this.label,\n };\n }\n\n /** @soyTemplate */\n protected renderContainerContents(): TemplateResult {\n return html`\n <span class=\"md3-field__start\">\n <slot name=\"start\"></slot>\n </span>\n <span class=\"md3-field__middle\">${this.renderMiddleContents()}</span>\n <span class=\"md3-field__end\">\n <slot name=\"end\"></slot>\n </span>\n `;\n }\n\n /** @soyTemplate */\n protected renderMiddleContents(): TemplateResult {\n return html`\n <span class=\"md3-field__content\"><slot></slot></span>\n `;\n }\n\n /** @soyTemplate */\n protected renderFloatingLabel(): TemplateResult {\n const visible = (this.focused || this.populated) && !this.isAnimating;\n /** @classMap */\n const classes = {'md3-field__label--hidden': !visible};\n return html`\n <span class=\"md3-field__label md3-field__label--floating ${\n classMap(classes)}\"\n aria-hidden=${!visible}\n >${this.renderLabelText()}</span>\n `;\n\n // TODO(b/217441842): Create shared function once argument bug is fixed\n // return this.renderLabel(LabelType.FLOATING);\n }\n\n /** @soyTemplate */\n protected renderRestingLabel(): TemplateResult {\n const visible = !(this.focused || this.populated) || this.isAnimating;\n /** @classMap */\n const classes = {'md3-field__label--hidden': !visible};\n return html`\n <span class=\"md3-field__label md3-field__label--resting ${\n classMap(classes)}\"\n aria-hidden=${!visible}\n >${this.renderLabelText()}</span>\n `;\n\n // TODO(b/217441842): Create shared function once argument bug is fixed\n // return this.renderLabel(LabelType.RESTING);\n }\n\n /** @soyTemplate */\n protected renderLabelText(): string {\n const labelText = this.label ?? '';\n const optionalAsterisk = this.required && labelText ? '*' : '';\n return labelText + optionalAsterisk;\n }\n\n /** @soyTemplate */\n protected renderSupportingText(): TemplateResult {\n return html`\n <span class=\"md3-field__supporting-text\">\n <span class=\"md3-field__supporting-text-start\">\n <slot name=\"supporting-text\"></slot>\n </span>\n <span class=\"md3-field__supporting-text-end\">\n <slot name=\"supporting-text-end\"></slot>\n </span>\n </span>\n `;\n }\n\n protected override update(props: PropertyValues<Field>) {\n // Client-side property updates\n\n // When disabling, remove focus styles if focused.\n if (this.disabled && this.focused) {\n props.set('focused', true);\n this.focused = false;\n }\n\n // Animate if focused or populated change.\n this.animateLabelIfNeeded({\n wasFocused: props.get('focused'),\n wasPopulated: props.get('populated')\n });\n\n super.update(props);\n }\n\n protected async animateLabelIfNeeded({wasFocused, wasPopulated}: {\n wasFocused?: boolean,\n wasPopulated?: boolean\n }) {\n if (!this.label) {\n return;\n }\n\n wasFocused ??= this.focused;\n wasPopulated ??= this.populated;\n const wasFloating = wasFocused || wasPopulated;\n const shouldBeFloating = this.focused || this.populated;\n if (wasFloating === shouldBeFloating) {\n return;\n }\n\n this.isAnimating = true;\n const signal = this.labelAnimationSignal.start();\n\n // Only one label is visible at a time for clearer text rendering.\n // The resting label is visible and used during animation. At the end of the\n // animation, it will either remain visible (if resting) or hide and the\n // floating label will be shown.\n const labelEl = await this.restingLabelEl;\n const keyframes = await this.getLabelKeyframes();\n if (signal.aborted) {\n // Don't animate if this animation was requested to stop while getting\n // the label element or calculating keyframes\n return;\n }\n\n // We don't use forward filling because if the dimensions of the text field\n // change (leading icon removed, density changes, etc), then the animation\n // will be inaccurate.\n //\n // Re-calculating the animation each time will prevent any visual glitches\n // from appearing.\n // TODO(b/241113345): use animation tokens\n const animation =\n labelEl.animate(keyframes, {duration: 150, easing: EASING.STANDARD});\n\n signal.addEventListener('abort', () => {\n // Cancel if requested (another animation starts playing).\n animation.cancel();\n });\n\n animation.addEventListener('finish', () => {\n // At the end of the animation, update the visible label.\n this.isAnimating = false;\n this.labelAnimationSignal.finish();\n });\n }\n\n protected async getLabelKeyframes() {\n const floatingLabelEl = await this.floatingLabelEl;\n const restingLabelEl = await this.restingLabelEl;\n const {\n x: floatingX,\n y: floatingY,\n width: floatingWidth,\n height: floatingHeight\n } = floatingLabelEl.getBoundingClientRect();\n const {\n x: restingX,\n y: restingY,\n width: restingWidth,\n height: restingHeight\n } = restingLabelEl.getBoundingClientRect();\n // Scale by width ratio instead of font size since letter-spacing will scale\n // incorrectly. Using the width we can better approximate the adjusted\n // scale and compensate for tracking.\n const scale = floatingWidth / restingWidth;\n const xDelta = floatingX - restingX;\n // The line-height of the resting and floating label are different. When\n // we move the resting label up to the floating label's position, it won't\n // exactly match because of this. We need to adjust by half of what the\n // final scaled resting label's height will be.\n const yDelta = floatingY - restingY +\n Math.round((floatingHeight - restingHeight * scale) / 2);\n\n // Create the two transforms: resting to floating (using the calculations\n // above), and floating to resting (re-setting the transform to initial\n // values).\n const floatTransform = `translateX(${xDelta}px) translateY(calc(-50% + ${\n yDelta}px)) scale(${scale})`;\n const restTransform = `translateX(0) translateY(-50%) scale(1)`;\n\n if (this.focused || this.populated) {\n return [{transform: restTransform}, {transform: floatTransform}];\n }\n\n return [{transform: floatTransform}, {transform: restTransform}];\n }\n}\n"]}
1
+ {"version":3,"file":"field.js","sourceRoot":"","sources":["field.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiC,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,MAAM,EAAC,MAAM,2BAA2B,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,UAAU;IAArC;;QAC6B,aAAQ,GAAG,KAAK,CAAC;QACjB,UAAK,GAAG,KAAK,CAAC;QACd,YAAO,GAAG,KAAK,CAAC;QAEhB,cAAS,GAAG,KAAK,CAAC;QAClB,cAAS,GAAG,KAAK,CAAC;QAClB,aAAQ,GAAG,KAAK,CAAC;QAE5C;;WAEG;QAC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;AAC5C;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;oCAAe;AACzC;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;sCAAiB;AAC3C;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;oCAAgB;AACzC;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;wCAAmB;AAC7C;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;wCAAmB;AAC7C;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;uCAAkB;AAK5C;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;uCAAkB;AAK5C;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;qCAAgB;AAE1C;IAAC,KAAK,EAAE;;0CAA6B;AAErC;IAAC,KAAK,CAAC,iBAAiB,CAAC;8BAAoC,WAAW;8CAAM;AAC9E;IAAC,KAAK,CAAC,gBAAgB,CAAC;8BAAmC,WAAW;6CAAM","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, LitElement, nothing, PropertyValues, TemplateResult} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {EASING} from '../../motion/animation.js';\n\n/**\n * A field component.\n */\nexport class Field extends LitElement {\n @property({type: Boolean}) disabled = false;\n @property({type: Boolean}) error = false;\n @property({type: Boolean}) focused = false;\n @property({type: String}) label?: string;\n @property({type: Boolean}) populated = false;\n @property({type: Boolean}) resizable = false;\n @property({type: Boolean}) required = false;\n\n /**\n * Whether or not the field has leading content.\n */\n @property({type: Boolean}) hasStart = false;\n\n /**\n * Whether or not the field has trailing content.\n */\n @property({type: Boolean}) hasEnd = false;\n\n @state() private isAnimating = false;\n private labelAnimation?: Animation;\n @query('.label.floating') private readonly floatingLabelEl!: HTMLElement|null;\n @query('.label.resting') private readonly restingLabelEl!: HTMLElement|null;\n\n protected override update(props: PropertyValues<Field>) {\n // Client-side property updates\n\n // When disabling, remove focus styles if focused.\n if (this.disabled && this.focused) {\n props.set('focused', true);\n this.focused = false;\n }\n\n // Animate if focused or populated change.\n this.animateLabelIfNeeded({\n wasFocused: props.get('focused'),\n wasPopulated: props.get('populated')\n });\n\n super.update(props);\n }\n\n protected override render() {\n const floatingLabel = this.renderLabel(/*isFloating*/ true);\n const restingLabel = this.renderLabel(/*isFloating*/ false);\n const outline = this.renderOutline?.(floatingLabel);\n const classes = {\n 'disabled': this.disabled,\n 'error': this.error && !this.disabled,\n 'focused': this.focused,\n 'with-start': this.hasStart,\n 'with-end': this.hasEnd,\n 'populated': this.populated,\n 'resizable': this.resizable,\n 'required': this.required,\n 'no-label': !this.label,\n };\n\n return html`\n <div class=\"field ${classMap(classes)}\">\n <div class=\"container-overflow\">\n ${outline}\n ${this.renderBackground?.()}\n ${this.renderIndicator?.()}\n <div class=\"container\">\n <div class=\"start\">\n <slot name=\"start\"></slot>\n </div>\n <div class=\"middle\">\n ${restingLabel}\n ${outline ? nothing : floatingLabel}\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n <div class=\"end\">\n <slot name=\"end\"></slot>\n </div>\n </div>\n </div>\n\n <div class=\"supporting-text\">\n <div class=\"supporting-text-start\">\n <slot name=\"supporting-text\"></slot>\n </div>\n <div class=\"supporting-text-end\">\n <slot name=\"supporting-text-end\"></slot>\n </div>\n </div>\n </div>\n `;\n }\n\n protected renderBackground?(): TemplateResult;\n protected renderIndicator?(): TemplateResult;\n protected renderOutline?(floatingLabel: TemplateResult): TemplateResult;\n\n private renderLabel(isFloating: boolean) {\n let visible: boolean;\n if (isFloating) {\n // Floating label is visible when focused/populated or when animating.\n visible = this.focused || this.populated || this.isAnimating;\n } else {\n // Resting label is visible when unfocused. It is never visible while\n // animating.\n visible = !this.focused && !this.populated && !this.isAnimating;\n }\n\n const classes = {\n 'hidden': !visible,\n 'floating': isFloating,\n 'resting': !isFloating,\n };\n\n let labelText = this.label ?? '';\n // Add '*' if a label is present and the field is required\n labelText += this.required && labelText ? '*' : '';\n\n return html`\n <span class=\"label ${classMap(classes)}\"\n aria-hidden=${!visible}\n >${labelText}</span>\n `;\n }\n\n private animateLabelIfNeeded({wasFocused, wasPopulated}: {\n wasFocused?: boolean,\n wasPopulated?: boolean\n }) {\n if (!this.label) {\n return;\n }\n\n wasFocused ??= this.focused;\n wasPopulated ??= this.populated;\n const wasFloating = wasFocused || wasPopulated;\n const shouldBeFloating = this.focused || this.populated;\n if (wasFloating === shouldBeFloating) {\n return;\n }\n\n this.isAnimating = true;\n this.labelAnimation?.cancel();\n\n // Only one label is visible at a time for clearer text rendering.\n // The floating label is visible and used during animation. At the end of\n // the animation, it will either remain visible (if floating) or hide and\n // the resting label will be shown.\n //\n // We don't use forward filling because if the dimensions of the text field\n // change (leading icon removed, density changes, etc), then the animation\n // will be inaccurate.\n //\n // Re-calculating the animation each time will prevent any visual glitches\n // from appearing.\n // TODO(b/241113345): use animation tokens\n this.labelAnimation = this.floatingLabelEl?.animate(\n this.getLabelKeyframes(), {duration: 150, easing: EASING.STANDARD});\n\n this.labelAnimation?.addEventListener('finish', () => {\n // At the end of the animation, update the visible label.\n this.isAnimating = false;\n });\n }\n\n private getLabelKeyframes() {\n const {floatingLabelEl, restingLabelEl} = this;\n if (!floatingLabelEl || !restingLabelEl) {\n return [];\n }\n\n const {x: floatingX, y: floatingY, height: floatingHeight} =\n floatingLabelEl.getBoundingClientRect();\n const {x: restingX, y: restingY, height: restingHeight} =\n restingLabelEl.getBoundingClientRect();\n const floatingScrollWidth = floatingLabelEl.scrollWidth;\n const restingScrollWidth = restingLabelEl.scrollWidth;\n // Scale by width ratio instead of font size since letter-spacing will scale\n // incorrectly. Using the width we can better approximate the adjusted\n // scale and compensate for tracking and overflow.\n // (use scrollWidth instead of width to account for clipped labels)\n const scale = restingScrollWidth / floatingScrollWidth;\n const xDelta = restingX - floatingX;\n // The line-height of the resting and floating label are different. When\n // we move the floating label down to the resting label's position, it won't\n // exactly match because of this. We need to adjust by half of what the\n // final scaled floating label's height will be.\n const yDelta = restingY - floatingY +\n Math.round((restingHeight - floatingHeight * scale) / 2);\n\n // Create the two transforms: floating to resting (using the calculations\n // above), and resting to floating (re-setting the transform to initial\n // values).\n const restTransform =\n `translateX(${xDelta}px) translateY(${yDelta}px) scale(${scale})`;\n const floatTransform = `translateX(0) translateY(0) scale(1)`;\n\n // Constrain the floating labels width to a scaled percentage of the\n // resting label's width. This will prevent long clipped labels from\n // overflowing the container.\n const restingClientWidth = restingLabelEl.clientWidth;\n const isRestingClipped = restingScrollWidth > restingClientWidth;\n const width = isRestingClipped ? `${restingClientWidth / scale}px` : '';\n if (this.focused || this.populated) {\n return [\n {transform: restTransform, width}, {transform: floatTransform, width}\n ];\n }\n\n return [\n {transform: floatTransform, width}, {transform: restTransform, width}\n ];\n }\n}\n"]}
@@ -3,22 +3,11 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { PropertyValues, TemplateResult } from 'lit';
7
- import { ClassInfo } from 'lit/directives/class-map.js';
8
6
  import { Field } from './field.js';
9
- /** @soyCompatible */
7
+ /**
8
+ * A filled field component.
9
+ */
10
10
  export declare class FilledField extends Field {
11
- protected strokeTransformOrigin: string;
12
- /** @soyTemplate */
13
- protected getRenderClasses(): ClassInfo;
14
- /** @soyTemplate */
15
- protected renderContainer(): TemplateResult;
16
- /** @soyTemplate */
17
- protected renderContainerContents(): TemplateResult;
18
- /** @soyTemplate */
19
- protected renderMiddleContents(): TemplateResult;
20
- /** @bubbleWizEvent */
21
- protected handleClick(event: MouseEvent | TouchEvent): void;
22
- protected update(props: PropertyValues<this>): void;
23
- protected updateStrokeTransformOrigin(event?: MouseEvent | TouchEvent): Promise<void>;
11
+ protected renderBackground(): import("lit-html").TemplateResult<1>;
12
+ protected renderIndicator(): import("lit-html").TemplateResult<1>;
24
13
  }
@@ -3,82 +3,20 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { __decorate, __metadata } from "tslib";
7
6
  import { html } from 'lit';
8
- import { state } from 'lit/decorators.js';
9
- import { styleMap } from 'lit/directives/style-map.js';
10
7
  import { Field } from './field.js';
11
- /** @soyCompatible */
8
+ /**
9
+ * A filled field component.
10
+ */
12
11
  export class FilledField extends Field {
13
- constructor() {
14
- super(...arguments);
15
- this.strokeTransformOrigin = '';
16
- }
17
- /** @soyTemplate */
18
- getRenderClasses() {
19
- return {
20
- ...super.getRenderClasses(),
21
- 'md3-field--filled': true,
22
- };
23
- }
24
- /** @soyTemplate */
25
- renderContainer() {
26
- return html `
27
- <span class="md3-field__container" @click=${this.handleClick}>
28
- ${this.renderContainerContents()}
29
- </span>
30
- `;
31
- }
32
- /** @soyTemplate */
33
- renderContainerContents() {
34
- /** @styleMap */
35
- const strokeStyle = { transformOrigin: this.strokeTransformOrigin };
36
- return html `
37
- <span class="md3-field__state-layer"></span>
38
- ${super.renderContainerContents()}
39
- <span class="md3-field__active-indicator"
40
- style="${styleMap(strokeStyle)}"></span>
41
- `;
42
- }
43
- /** @soyTemplate */
44
- renderMiddleContents() {
12
+ renderBackground() {
45
13
  return html `
46
- ${this.renderFloatingLabel()}
47
- ${this.renderRestingLabel()}
48
- ${super.renderMiddleContents()}
14
+ <div class="background"></div>
15
+ <div class="state-layer"></div>
49
16
  `;
50
17
  }
51
- /** @bubbleWizEvent */
52
- handleClick(event) {
53
- if (this.disabled) {
54
- return;
55
- }
56
- this.updateStrokeTransformOrigin(event);
57
- }
58
- update(props) {
59
- // Upon losing focus, the stroke resets to expanding from the center, such
60
- // as when re-focusing with a keyboard.
61
- const unfocusing = props.has('focused') && !this.focused;
62
- if (unfocusing) {
63
- this.updateStrokeTransformOrigin();
64
- }
65
- super.update(props);
66
- }
67
- async updateStrokeTransformOrigin(event) {
68
- let transformOrigin = '';
69
- if (event) {
70
- // Can't use instanceof TouchEvent since Firefox does not provide the
71
- // constructor globally.
72
- const isTouchEvent = 'touches' in event;
73
- const eventX = isTouchEvent ? event.touches[0].clientX : event.clientX;
74
- const rootRect = this.getBoundingClientRect();
75
- transformOrigin = `${eventX - rootRect.x}px`;
76
- }
77
- this.strokeTransformOrigin = transformOrigin;
18
+ renderIndicator() {
19
+ return html `<div class="active-indicator"></div>`;
78
20
  }
79
21
  }
80
- __decorate([
81
- state(),
82
- __metadata("design:type", Object)
83
- ], FilledField.prototype, "strokeTransformOrigin", void 0);
84
22
  //# sourceMappingURL=filled-field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filled-field.js","sourceRoot":"","sources":["filled-field.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAiC,MAAM,KAAK,CAAC;AACzD,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEjC,qBAAqB;AACrB,MAAM,OAAO,WAAY,SAAQ,KAAK;IAAtC;;QACqB,0BAAqB,GAAG,EAAE,CAAC;IAyEhD,CAAC;IAvEC,mBAAmB;IACA,gBAAgB;QACjC,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,mBAAmB,EAAE,IAAI;SAC1B,CAAC;IACJ,CAAC;IAED,mBAAmB;IACA,eAAe;QAChC,OAAO,IAAI,CAAA;kDACmC,IAAI,CAAC,WAAW;UACxD,IAAI,CAAC,uBAAuB,EAAE;;KAEnC,CAAC;IACJ,CAAC;IAED,mBAAmB;IACA,uBAAuB;QACxC,gBAAgB;QAChB,MAAM,WAAW,GAAG,EAAC,eAAe,EAAE,IAAI,CAAC,qBAAqB,EAAC,CAA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F;AAzEU;IAAR,KAAK,EAAE;;0DAAsC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, PropertyValues, TemplateResult} from 'lit';\nimport {state} from 'lit/decorators.js';\nimport {ClassInfo} from 'lit/directives/class-map.js';\nimport {styleMap} from 'lit/directives/style-map.js';\n\nimport {Field} from './field.js';\n\n/** @soyCompatible */\nexport class FilledField extends Field {\n @state() protected strokeTransformOrigin = '';\n\n /** @soyTemplate */\n protected override getRenderClasses(): ClassInfo {\n return {\n ...super.getRenderClasses(),\n 'md3-field--filled': true,\n };\n }\n\n /** @soyTemplate */\n protected override renderContainer(): TemplateResult {\n return html`\n <span class=\"md3-field__container\" @click=${this.handleClick}>\n ${this.renderContainerContents()}\n </span>\n `;\n }\n\n /** @soyTemplate */\n protected override renderContainerContents(): TemplateResult {\n /** @styleMap */\n const strokeStyle = {transformOrigin: this.strokeTransformOrigin};\n return html`\n <span class=\"md3-field__state-layer\"></span>\n ${super.renderContainerContents()}\n <span class=\"md3-field__active-indicator\"\n style=\"${styleMap(strokeStyle)}\"></span>\n `;\n }\n\n /** @soyTemplate */\n protected override renderMiddleContents(): TemplateResult {\n return html`\n ${this.renderFloatingLabel()}\n ${this.renderRestingLabel()}\n ${super.renderMiddleContents()}\n `;\n }\n\n /** @bubbleWizEvent */\n protected handleClick(event: MouseEvent|TouchEvent) {\n if (this.disabled) {\n return;\n }\n\n this.updateStrokeTransformOrigin(event);\n }\n\n protected override update(props: PropertyValues<this>) {\n // Upon losing focus, the stroke resets to expanding from the center, such\n // as when re-focusing with a keyboard.\n const unfocusing = props.has('focused') && !this.focused;\n if (unfocusing) {\n this.updateStrokeTransformOrigin();\n }\n\n super.update(props);\n }\n\n protected async updateStrokeTransformOrigin(event?: MouseEvent|TouchEvent) {\n let transformOrigin = '';\n if (event) {\n // Can't use instanceof TouchEvent since Firefox does not provide the\n // constructor globally.\n const isTouchEvent = 'touches' in event;\n const eventX = isTouchEvent ? event.touches[0].clientX : event.clientX;\n const rootRect = this.getBoundingClientRect();\n transformOrigin = `${eventX - rootRect.x}px`;\n }\n\n this.strokeTransformOrigin = transformOrigin;\n }\n}\n"]}
1
+ {"version":3,"file":"filled-field.js","sourceRoot":"","sources":["filled-field.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEjC;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACjB,gBAAgB;QACjC,OAAO,IAAI,CAAA;;;KAGV,CAAC;IACJ,CAAC;IAEkB,eAAe;QAChC,OAAO,IAAI,CAAA,sCAAsC,CAAC;IACpD,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html} from 'lit';\n\nimport {Field} from './field.js';\n\n/**\n * A filled field component.\n */\nexport class FilledField extends Field {\n protected override renderBackground() {\n return html`\n <div class=\"background\"></div>\n <div class=\"state-layer\"></div>\n `;\n }\n\n protected override renderIndicator() {\n return html`<div class=\"active-indicator\"></div>`;\n }\n}\n"]}
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `:host{--_container-shape-start-start: var(--md-filled-field-container-shape-start-start, 4px);--_container-shape-start-end: var(--md-filled-field-container-shape-start-end, 4px);--_container-shape-end-end: var(--md-filled-field-container-shape-end-end, 0px);--_container-shape-end-start: var(--md-filled-field-container-shape-end-start, 0px);--_active-indicator-color: var(--md-filled-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-field-active-indicator-height, 1px);--_container-color: var(--md-filled-field-container-color, var(--md-sys-color-surface-variant, #e7e0ec));--_disabled-active-indicator-color: var(--md-filled-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-active-indicator-height: var(--md-filled-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-field-disabled-container-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-container-opacity: var(--md-filled-field-disabled-container-opacity, 0.04);--_disabled-label-text-color: var(--md-filled-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-label-text-opacity: var(--md-filled-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-leading-icon-opacity: var(--md-filled-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-supporting-text-opacity: var(--md-filled-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-trailing-icon-opacity: var(--md-filled-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-label-text-color: var(--md-filled-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-label-text-color: var(--md-filled-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1c1b1f));--_error-hover-state-layer-opacity: var(--md-filled-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-filled-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-field-focus-active-indicator-height, 2px);--_focus-label-text-color: var(--md-filled-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1c1b1f));--_hover-active-indicator-height: var(--md-filled-field-hover-active-indicator-height, 1px);--_hover-label-text-color: var(--md-filled-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1c1b1f));--_hover-state-layer-opacity: var(--md-filled-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-filled-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-field-label-text-font, Roboto);--_label-text-line-height: var(--md-filled-field-label-text-line-height, 1.5rem);--_label-text-populated-line-height: var(--md-filled-field-label-text-populated-line-height, 1rem);--_label-text-populated-size: var(--md-filled-field-label-text-populated-size, 0.75rem);--_label-text-size: var(--md-filled-field-label-text-size, 1rem);--_label-text-tracking: var(--md-filled-field-label-text-tracking, 0.031rem);--_label-text-weight: var(--md-filled-field-label-text-weight, 400);--_leading-icon-color: var(--md-filled-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-field-supporting-text-font, Roboto);--_supporting-text-line-height: var(--md-filled-field-supporting-text-line-height, 1rem);--_supporting-text-size: var(--md-filled-field-supporting-text-size, 0.75rem);--_supporting-text-tracking: var(--md-filled-field-supporting-text-tracking, 0.025rem);--_supporting-text-weight: var(--md-filled-field-supporting-text-weight, 400);--_trailing-icon-color: var(--md-filled-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-field-trailing-icon-size, 24px);--_container-padding-horizontal: var(--md-filled-field-container-padding-horizontal, 16px);--_container-padding-vertical: var(--md-filled-field-container-padding-vertical, 16px);--_content-color: var(--md-filled-field-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-content-color: var(--md-filled-field-disabled-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-content-opacity: var(--md-filled-field-disabled-content-opacity, 0.38);--_error-content-color: var(--md-filled-field-error-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_error-focus-content-color: var(--md-filled-field-error-focus-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_error-hover-content-color: var(--md-filled-field-error-hover-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_focus-content-color: var(--md-filled-field-focus-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_hover-content-color: var(--md-filled-field-hover-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_supporting-text-padding: var(--md-filled-field-supporting-text-padding, 16px);--_supporting-text-padding-top: var(--md-filled-field-supporting-text-padding-top, 4px);--_with-label-container-padding-vertical: var(--md-filled-field-with-label-container-padding-vertical, 8px);--_label-text-populated-font: ;--_label-text-populated-tracking: ;--_label-text-populated-weight: }.md3-field__container{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);overflow:hidden;z-index:0}.md3-field__container::before{background:var(--_container-color)}.md3-field__container::after{visibility:hidden}.md3-field__container::before,.md3-field__container::after{border-radius:inherit;content:"";display:flex;height:100%;position:absolute;width:100%;z-index:-1}.md3-field__label--floating{position:absolute;top:0}.md3-field__state-layer{border-radius:inherit;height:100%;position:absolute;width:100%;visibility:hidden;z-index:-1}.md3-field:not(.md3-field--disabled):hover .md3-field__state-layer{visibility:visible}.md3-field__active-indicator{inset:auto 0 0 0;pointer-events:none;position:absolute;width:100%}.md3-field__active-indicator::before,.md3-field__active-indicator::after{border-bottom:var(--_active-indicator-height) solid var(--_active-indicator-color);inset:auto 0 0 0;content:"";position:absolute;width:100%}.md3-field__active-indicator::after{opacity:0;transform:scaleX(0);transform-origin:inherit;transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),transform 0s ease 150ms}.md3-field--focused .md3-field__active-indicator::after{opacity:1;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1)}.md3-field:not(.md3-field--with-start) .md3-field__start{padding-inline-start:var(--_container-padding-horizontal)}.md3-field:not(.md3-field--with-end) .md3-field__end{padding-inline-end:var(--_container-padding-horizontal)}.md3-field:not(.md3-field--no-label) .md3-field__container{padding-bottom:var(--_with-label-container-padding-vertical);padding-top:var(--_with-label-container-padding-vertical)}.md3-field:not(.md3-field--no-label) .md3-field__middle{padding-top:var(--_label-text-populated-line-height)}:hover .md3-field__active-indicator::before{border-bottom-color:var(--_hover-active-indicator-color);border-bottom-width:var(--_hover-active-indicator-height)}:hover .md3-field__state-layer{background:var(--_hover-state-layer-color);opacity:var(--_hover-state-layer-opacity)}.md3-field__active-indicator::after{border-bottom-color:var(--_focus-active-indicator-color);border-bottom-width:var(--_focus-active-indicator-height)}.md3-field--disabled .md3-field__active-indicator::before{border-bottom-color:var(--_disabled-active-indicator-color);border-bottom-width:var(--_disabled-active-indicator-height);opacity:var(--_disabled-active-indicator-opacity)}.md3-field--disabled .md3-field__container::before{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.md3-field--error:not(.md3-field--disabled) .md3-field__active-indicator::before{border-bottom-color:var(--_error-active-indicator-color)}.md3-field--error:not(.md3-field--disabled):hover .md3-field__active-indicator::before{border-bottom-color:var(--_error-hover-active-indicator-color)}.md3-field--error:not(.md3-field--disabled):hover .md3-field__state-layer{background:var(--_error-hover-state-layer-color);opacity:var(--_error-hover-state-layer-opacity)}.md3-field--error:not(.md3-field--disabled) .md3-field__active-indicator::after{border-bottom-color:var(--_error-focus-active-indicator-color)}/*# sourceMappingURL=filled-styles.css.map */
7
+ export const styles = css `:host{--_container-shape-start-start: var(--md-filled-field-container-shape-start-start, var(--md-filled-field-container-shape, 4px));--_container-shape-start-end: var(--md-filled-field-container-shape-start-end, var(--md-filled-field-container-shape, 4px));--_container-shape-end-end: var(--md-filled-field-container-shape-end-end, var(--md-filled-field-container-shape, 0px));--_container-shape-end-start: var(--md-filled-field-container-shape-end-start, var(--md-filled-field-container-shape, 0px));--_active-indicator-color: var(--md-filled-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-field-active-indicator-height, 1px);--_container-color: var(--md-filled-field-container-color, var(--md-sys-color-surface-variant, #e7e0ec));--_container-padding-horizontal: var(--md-filled-field-container-padding-horizontal, 16px);--_container-padding-vertical: var(--md-filled-field-container-padding-vertical, 16px);--_content-color: var(--md-filled-field-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_content-type: var(--md-filled-field-content-type, 400 1rem / 1.5rem Roboto);--_disabled-active-indicator-color: var(--md-filled-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-active-indicator-height: var(--md-filled-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-field-disabled-container-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-container-opacity: var(--md-filled-field-disabled-container-opacity, 0.04);--_disabled-content-color: var(--md-filled-field-disabled-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-content-opacity: var(--md-filled-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-label-text-opacity: var(--md-filled-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-filled-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-leading-content-opacity: var(--md-filled-field-disabled-leading-content-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-supporting-text-opacity: var(--md-filled-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-filled-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_disabled-trailing-content-opacity: var(--md-filled-field-disabled-trailing-content-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-content-color: var(--md-filled-field-error-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_error-focus-active-indicator-color: var(--md-filled-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-content-color: var(--md-filled-field-error-focus-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-label-text-color: var(--md-filled-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-filled-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-filled-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-content-color: var(--md-filled-field-error-hover-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_error-hover-label-text-color: var(--md-filled-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-filled-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1c1b1f));--_error-hover-state-layer-opacity: var(--md-filled-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-filled-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-filled-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-filled-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-filled-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-field-focus-active-indicator-height, 2px);--_focus-content-color: var(--md-filled-field-focus-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_focus-label-text-color: var(--md-filled-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-filled-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-filled-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1c1b1f));--_hover-active-indicator-height: var(--md-filled-field-hover-active-indicator-height, 1px);--_hover-content-color: var(--md-filled-field-hover-content-color, var(--md-sys-color-on-surface, #1c1b1f));--_hover-label-text-color: var(--md-filled-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-content-color: var(--md-filled-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1c1b1f));--_hover-state-layer-opacity: var(--md-filled-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-filled-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-filled-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-populated-line-height: var(--md-filled-field-label-text-populated-line-height, 1rem);--_label-text-populated-size: var(--md-filled-field-label-text-populated-size, 0.75rem);--_label-text-type: var(--md-filled-field-label-text-type, 400 1rem / 1.5rem Roboto);--_leading-content-color: var(--md-filled-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-color: var(--md-filled-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-padding: var(--md-filled-field-supporting-text-padding, 16px);--_supporting-text-padding-top: var(--md-filled-field-supporting-text-padding-top, 4px);--_supporting-text-type: var(--md-filled-field-supporting-text-type, 400 0.75rem / 1rem Roboto);--_trailing-content-color: var(--md-filled-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_with-label-container-padding-vertical: var(--md-filled-field-with-label-container-padding-vertical, 8px)}.background,.state-layer{border-radius:inherit;inset:0;pointer-events:none;position:absolute}.background{background:var(--_container-color)}.state-layer{visibility:hidden}.field:not(.disabled):hover .state-layer{visibility:visible}.label.floating{position:absolute;top:0}.active-indicator{inset:auto 0 0 0;pointer-events:none;position:absolute;width:100%}.active-indicator::before,.active-indicator::after{border-bottom:var(--_active-indicator-height) solid var(--_active-indicator-color);inset:auto 0 0 0;content:"";position:absolute;width:100%}.active-indicator::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .active-indicator::after{opacity:1}.field:not(.with-start) .start{padding-inline-start:var(--_container-padding-horizontal)}.field:not(.with-end) .end{padding-inline-end:var(--_container-padding-horizontal)}.field:not(.no-label) .container{padding-bottom:var(--_with-label-container-padding-vertical);padding-top:var(--_with-label-container-padding-vertical)}.field:not(.no-label) .middle{padding-top:var(--_label-text-populated-line-height)}:hover .active-indicator::before{border-bottom-color:var(--_hover-active-indicator-color);border-bottom-width:var(--_hover-active-indicator-height)}.active-indicator::after{border-bottom-color:var(--_focus-active-indicator-color);border-bottom-width:var(--_focus-active-indicator-height)}:hover .state-layer{background:var(--_hover-state-layer-color);opacity:var(--_hover-state-layer-opacity)}.disabled .active-indicator::before{border-bottom-color:var(--_disabled-active-indicator-color);border-bottom-width:var(--_disabled-active-indicator-height);opacity:var(--_disabled-active-indicator-opacity)}.disabled .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.error .active-indicator::before{border-bottom-color:var(--_error-active-indicator-color)}.error:hover .active-indicator::before{border-bottom-color:var(--_error-hover-active-indicator-color)}.error:hover .state-layer{background:var(--_error-hover-state-layer-color);opacity:var(--_error-hover-state-layer-opacity)}.error .active-indicator::after{border-bottom-color:var(--_error-focus-active-indicator-color)}/*# sourceMappingURL=filled-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=filled-styles.css.js.map