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

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 (423) hide show
  1. package/README.md +66 -19
  2. package/autocomplete/lib/_filled-autocomplete.scss +1 -34
  3. package/autocomplete/lib/_outlined-autocomplete.scss +1 -34
  4. package/autocomplete/lib/autocomplete.d.ts +0 -4
  5. package/autocomplete/lib/autocomplete.js +5 -12
  6. package/autocomplete/lib/autocomplete.js.map +1 -1
  7. package/autocomplete/lib/autocompleteitem/autocomplete-item.d.ts +2 -2
  8. package/autocomplete/lib/autocompleteitem/autocomplete-item.js +2 -2
  9. package/autocomplete/lib/autocompleteitem/autocomplete-item.js.map +1 -1
  10. package/autocomplete/lib/autocompletelist/autocomplete-list.d.ts +1 -1
  11. package/autocomplete/lib/autocompletelist/autocomplete-list.js +2 -2
  12. package/autocomplete/lib/autocompletelist/autocomplete-list.js.map +1 -1
  13. package/autocomplete/lib/filled-styles.css.js +1 -1
  14. package/autocomplete/lib/filled-styles.css.js.map +1 -1
  15. package/autocomplete/lib/outlined-styles.css.js +1 -1
  16. package/autocomplete/lib/outlined-styles.css.js.map +1 -1
  17. package/button/lib/_elevation.scss +1 -1
  18. package/button/lib/_icon.scss +12 -29
  19. package/button/lib/_shared.scss +1 -0
  20. package/button/lib/button.d.ts +1 -14
  21. package/button/lib/button.js +6 -42
  22. package/button/lib/button.js.map +1 -1
  23. package/button/lib/filled-styles.css.js +1 -1
  24. package/button/lib/filled-styles.css.js.map +1 -1
  25. package/button/lib/link-button.d.ts +0 -1
  26. package/button/lib/link-button.js +0 -5
  27. package/button/lib/link-button.js.map +1 -1
  28. package/button/lib/shared-elevation-styles.css.js +1 -1
  29. package/button/lib/shared-elevation-styles.css.js.map +1 -1
  30. package/button/lib/shared-styles.css.js +1 -1
  31. package/button/lib/shared-styles.css.js.map +1 -1
  32. package/checkbox/checkbox.d.ts +11 -2
  33. package/checkbox/checkbox.js +11 -2
  34. package/checkbox/checkbox.js.map +1 -1
  35. package/checkbox/lib/checkbox.d.ts +28 -0
  36. package/checkbox/lib/checkbox.js +30 -1
  37. package/checkbox/lib/checkbox.js.map +1 -1
  38. package/chips/chip/lib/_chip-theme.scss +1 -1
  39. package/dialog/_dialog.scss +6 -0
  40. package/dialog/dialog.d.ts +38 -0
  41. package/dialog/dialog.js +41 -0
  42. package/dialog/dialog.js.map +1 -0
  43. package/dialog/harness.d.ts +18 -0
  44. package/dialog/harness.js +55 -0
  45. package/dialog/harness.js.map +1 -0
  46. package/dialog/lib/_dialog.scss +386 -0
  47. package/dialog/lib/_tokens.scss +86 -0
  48. package/{elevationold/lib/elevation-overlay-styles.css.d.ts → dialog/lib/dialog-styles.css.d.ts} +0 -0
  49. package/dialog/lib/dialog-styles.css.js +9 -0
  50. package/dialog/lib/dialog-styles.css.js.map +1 -0
  51. package/dialog/lib/dialog-styles.scss +8 -0
  52. package/dialog/lib/dialog.d.ts +190 -0
  53. package/dialog/lib/dialog.js +566 -0
  54. package/dialog/lib/dialog.js.map +1 -0
  55. package/divider/_divider.scss +6 -0
  56. package/divider/divider.d.ts +24 -0
  57. package/divider/divider.js +27 -0
  58. package/divider/divider.js.map +1 -0
  59. package/divider/lib/_divider.scss +54 -0
  60. package/{list/lib/divider/list-divider-styles.css.d.ts → divider/lib/divider-styles.css.d.ts} +0 -0
  61. package/divider/lib/divider-styles.css.js +9 -0
  62. package/divider/lib/divider-styles.css.js.map +1 -0
  63. package/divider/lib/divider-styles.scss +8 -0
  64. package/divider/lib/divider.d.ts +23 -0
  65. package/divider/lib/divider.js +41 -0
  66. package/divider/lib/divider.js.map +1 -0
  67. package/elevation/lib/_elevation.scss +1 -1
  68. package/elevation/lib/_md-comp-elevation.scss +1 -1
  69. package/elevation/lib/elevation-styles.css.js +1 -1
  70. package/elevation/lib/elevation-styles.css.js.map +1 -1
  71. package/fab/lib/_shared.scss +1 -1
  72. package/fab/lib/fab-shared-styles.css.js +1 -1
  73. package/fab/lib/fab-shared-styles.css.js.map +1 -1
  74. package/field/lib/_filled-field.scss +5 -2
  75. package/field/lib/_md-comp-filled-field.scss +3 -1
  76. package/field/lib/_md-comp-outlined-field.scss +1 -1
  77. package/field/lib/_shared.scss +2 -0
  78. package/field/lib/field.d.ts +0 -2
  79. package/field/lib/field.js +2 -4
  80. package/field/lib/field.js.map +1 -1
  81. package/field/lib/filled-styles.css.js +1 -1
  82. package/field/lib/filled-styles.css.js.map +1 -1
  83. package/field/lib/outlined-styles.css.js +1 -1
  84. package/field/lib/outlined-styles.css.js.map +1 -1
  85. package/field/lib/shared-styles.css.js +1 -1
  86. package/field/lib/shared-styles.css.js.map +1 -1
  87. package/focus/lib/_focus-ring.scss +3 -10
  88. package/focus/lib/focus-ring-styles.css.js +1 -1
  89. package/focus/lib/focus-ring-styles.css.js.map +1 -1
  90. package/focus/lib/focus-ring.d.ts +1 -4
  91. package/focus/lib/focus-ring.js +2 -11
  92. package/focus/lib/focus-ring.js.map +1 -1
  93. package/icon/lib/_icon.scss +8 -5
  94. package/icon/lib/icon-styles.css.js +1 -1
  95. package/icon/lib/icon-styles.css.js.map +1 -1
  96. package/iconbutton/lib/_filled-icon-button.scss +1 -1
  97. package/iconbutton/lib/_filled-tonal-icon-button.scss +1 -1
  98. package/iconbutton/lib/_outlined-icon-button.scss +9 -22
  99. package/iconbutton/lib/_shared.scss +14 -40
  100. package/iconbutton/lib/_standard-icon-button.scss +6 -14
  101. package/iconbutton/lib/filled-styles.css.js +1 -1
  102. package/iconbutton/lib/filled-styles.css.js.map +1 -1
  103. package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
  104. package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
  105. package/iconbutton/lib/icon-button-toggle.d.ts +13 -42
  106. package/iconbutton/lib/icon-button-toggle.js +33 -103
  107. package/iconbutton/lib/icon-button-toggle.js.map +1 -1
  108. package/iconbutton/lib/icon-button.d.ts +2 -4
  109. package/iconbutton/lib/icon-button.js +3 -9
  110. package/iconbutton/lib/icon-button.js.map +1 -1
  111. package/iconbutton/lib/outlined-styles.css.js +1 -1
  112. package/iconbutton/lib/outlined-styles.css.js.map +1 -1
  113. package/iconbutton/lib/shared-styles.css.js +1 -1
  114. package/iconbutton/lib/shared-styles.css.js.map +1 -1
  115. package/iconbutton/lib/standard-styles.css.js +1 -1
  116. package/iconbutton/lib/standard-styles.css.js.map +1 -1
  117. package/list/lib/_list.scss +32 -40
  118. package/list/lib/avatar/_list-item-avatar.scss +1 -1
  119. package/list/lib/avatar/list-item-avatar-styles.css.js +1 -1
  120. package/list/lib/avatar/list-item-avatar-styles.css.js.map +1 -1
  121. package/list/lib/avatar/list-item-avatar.d.ts +9 -4
  122. package/list/lib/avatar/list-item-avatar.js +24 -11
  123. package/list/lib/avatar/list-item-avatar.js.map +1 -1
  124. package/list/lib/icon/_list-item-icon.scss +3 -1
  125. package/list/lib/icon/list-item-icon-styles.css.js +1 -1
  126. package/list/lib/icon/list-item-icon-styles.css.js.map +1 -1
  127. package/list/lib/icon/list-item-icon.d.ts +0 -3
  128. package/list/lib/icon/list-item-icon.js +1 -12
  129. package/list/lib/icon/list-item-icon.js.map +1 -1
  130. package/list/lib/image/_list-item-image.scss +1 -1
  131. package/list/lib/image/list-item-image-styles.css.js +1 -1
  132. package/list/lib/image/list-item-image-styles.css.js.map +1 -1
  133. package/list/lib/image/list-item-image.d.ts +11 -4
  134. package/list/lib/image/list-item-image.js +24 -13
  135. package/list/lib/image/list-item-image.js.map +1 -1
  136. package/list/lib/list-styles.css.js +1 -1
  137. package/list/lib/list-styles.css.js.map +1 -1
  138. package/list/lib/list.d.ts +99 -28
  139. package/list/lib/list.js +210 -111
  140. package/list/lib/list.js.map +1 -1
  141. package/list/lib/listitem/_list-item.scss +104 -39
  142. package/list/lib/listitem/harness.js +2 -1
  143. package/list/lib/listitem/harness.js.map +1 -1
  144. package/{menu/lib/menu-button-styles.css.d.ts → list/lib/listitem/list-item-private-styles.css.d.ts} +0 -0
  145. package/list/lib/listitem/list-item-private-styles.css.js +9 -0
  146. package/list/lib/listitem/list-item-private-styles.css.js.map +1 -0
  147. package/list/lib/listitem/list-item-private-styles.scss +8 -0
  148. package/list/lib/listitem/list-item-styles.css.js +1 -1
  149. package/list/lib/listitem/list-item-styles.css.js.map +1 -1
  150. package/list/lib/listitem/list-item.d.ts +99 -43
  151. package/list/lib/listitem/list-item.js +201 -172
  152. package/list/lib/listitem/list-item.js.map +1 -1
  153. package/list/lib/listitemlink/list-item-link.d.ts +17 -0
  154. package/list/lib/listitemlink/list-item-link.js +42 -0
  155. package/list/lib/listitemlink/list-item-link.js.map +1 -0
  156. package/list/lib/video/_list-item-video.scss +10 -4
  157. package/list/lib/video/list-item-video-styles.css.js +1 -1
  158. package/list/lib/video/list-item-video-styles.css.js.map +1 -1
  159. package/list/lib/video/list-item-video.d.ts +43 -4
  160. package/list/lib/video/list-item-video.js +90 -12
  161. package/list/lib/video/list-item-video.js.map +1 -1
  162. package/list/list-item-avatar.d.ts +2 -1
  163. package/list/list-item-avatar.js +2 -1
  164. package/list/list-item-avatar.js.map +1 -1
  165. package/list/list-item-icon.d.ts +2 -1
  166. package/list/list-item-icon.js +2 -1
  167. package/list/list-item-icon.js.map +1 -1
  168. package/list/list-item-image.d.ts +2 -1
  169. package/list/list-item-image.js +2 -1
  170. package/list/list-item-image.js.map +1 -1
  171. package/list/list-item-link.d.ts +35 -0
  172. package/list/list-item-link.js +39 -0
  173. package/list/list-item-link.js.map +1 -0
  174. package/list/list-item-video.d.ts +2 -1
  175. package/list/list-item-video.js +2 -1
  176. package/list/list-item-video.js.map +1 -1
  177. package/list/list-item.d.ts +18 -2
  178. package/list/list-item.js +20 -3
  179. package/list/list-item.js.map +1 -1
  180. package/list/list.d.ts +15 -1
  181. package/list/list.js +15 -1
  182. package/list/list.js.map +1 -1
  183. package/menu/_menu-item.scss +6 -0
  184. package/menu/_menu.scss +6 -0
  185. package/menu/harness.d.ts +5 -0
  186. package/menu/harness.js +22 -0
  187. package/menu/harness.js.map +1 -1
  188. package/menu/lib/_menu.scss +61 -62
  189. package/menu/lib/menu-styles.css.js +1 -1
  190. package/menu/lib/menu-styles.css.js.map +1 -1
  191. package/menu/lib/menu.d.ts +176 -42
  192. package/menu/lib/menu.js +506 -246
  193. package/menu/lib/menu.js.map +1 -1
  194. package/menu/lib/menuitem/_menu-item.scss +115 -0
  195. package/{tokens/v0_150/index.test.css.d.ts → menu/lib/menuitem/menu-item-private-styles.css.d.ts} +0 -0
  196. package/menu/lib/menuitem/menu-item-private-styles.css.js +9 -0
  197. package/menu/lib/menuitem/menu-item-private-styles.css.js.map +1 -0
  198. package/menu/lib/menuitem/menu-item-private-styles.scss +8 -0
  199. package/{tokens/v0_150/lib.test.css.d.ts → menu/lib/menuitem/menu-item-styles.css.d.ts} +0 -0
  200. package/menu/lib/menuitem/menu-item-styles.css.js +9 -0
  201. package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -0
  202. package/menu/lib/menuitem/menu-item-styles.scss +8 -0
  203. package/menu/lib/menuitem/menu-item.d.ts +20 -3
  204. package/menu/lib/menuitem/menu-item.js +42 -3
  205. package/menu/lib/menuitem/menu-item.js.map +1 -1
  206. package/menu/lib/menuitemlink/menu-item-link.d.ts +25 -0
  207. package/menu/lib/menuitemlink/menu-item-link.js +51 -0
  208. package/menu/lib/menuitemlink/menu-item-link.js.map +1 -0
  209. package/menu/lib/shared.d.ts +134 -0
  210. package/menu/lib/shared.js +85 -0
  211. package/menu/lib/shared.js.map +1 -0
  212. package/menu/lib/submenuitem/harness.d.ts +11 -0
  213. package/menu/lib/submenuitem/harness.js +12 -0
  214. package/menu/lib/submenuitem/harness.js.map +1 -0
  215. package/menu/lib/submenuitem/sub-menu-item.d.ts +89 -0
  216. package/menu/lib/submenuitem/sub-menu-item.js +266 -0
  217. package/menu/lib/submenuitem/sub-menu-item.js.map +1 -0
  218. package/menu/lib/surfacePositionController.d.ts +117 -0
  219. package/menu/lib/surfacePositionController.js +196 -0
  220. package/menu/lib/surfacePositionController.js.map +1 -0
  221. package/menu/lib/typeaheadController.d.ts +144 -0
  222. package/menu/lib/typeaheadController.js +242 -0
  223. package/menu/lib/typeaheadController.js.map +1 -0
  224. package/menu/menu-item-link.d.ts +33 -0
  225. package/menu/menu-item-link.js +37 -0
  226. package/menu/menu-item-link.js.map +1 -0
  227. package/menu/menu-item.d.ts +19 -2
  228. package/menu/menu-item.js +22 -4
  229. package/menu/menu-item.js.map +1 -1
  230. package/menu/menu.d.ts +45 -0
  231. package/menu/menu.js +43 -0
  232. package/menu/menu.js.map +1 -1
  233. package/menu/sub-menu-item.d.ts +60 -0
  234. package/menu/sub-menu-item.js +64 -0
  235. package/menu/sub-menu-item.js.map +1 -0
  236. package/menusurface/lib/_menu-surface.scss +1 -1
  237. package/menusurface/lib/menu-surface-styles.css.js +1 -1
  238. package/menusurface/lib/menu-surface-styles.css.js.map +1 -1
  239. package/motion/animation.d.ts +20 -3
  240. package/motion/animation.js +39 -4
  241. package/motion/animation.js.map +1 -1
  242. package/navigationbar/lib/_navigation-bar.scss +9 -9
  243. package/navigationbar/lib/navigation-bar-styles.css.js +1 -1
  244. package/navigationbar/lib/navigation-bar-styles.css.js.map +1 -1
  245. package/navigationdrawer/lib/_navigation-drawer.scss +1 -1
  246. package/navigationdrawer/lib/navigation-drawer-styles.css.js +1 -1
  247. package/navigationdrawer/lib/navigation-drawer-styles.css.js.map +1 -1
  248. package/navigationtab/lib/_navigation-tab.scss +8 -19
  249. package/navigationtab/lib/navigation-tab-styles.css.js +1 -1
  250. package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -1
  251. package/package.json +1 -8
  252. package/radio/lib/_radio.scss +21 -22
  253. package/radio/lib/radio-styles.css.js +1 -1
  254. package/radio/lib/radio-styles.css.js.map +1 -1
  255. package/radio/lib/radio.d.ts +10 -1
  256. package/radio/lib/radio.js +12 -3
  257. package/radio/lib/radio.js.map +1 -1
  258. package/radio/radio.d.ts +16 -1
  259. package/radio/radio.js +16 -1
  260. package/radio/radio.js.map +1 -1
  261. package/ripple/lib/_ripple.scss +5 -21
  262. package/ripple/lib/ripple-styles.css.js +1 -1
  263. package/ripple/lib/ripple-styles.css.js.map +1 -1
  264. package/ripple/lib/ripple.js +2 -2
  265. package/ripple/lib/ripple.js.map +1 -1
  266. package/sass/_map-ext.scss +24 -0
  267. package/sass/_string-ext.scss +23 -0
  268. package/segmentedbuttonset/lib/segmented-button-set.d.ts +0 -2
  269. package/segmentedbuttonset/lib/segmented-button-set.js +0 -2
  270. package/segmentedbuttonset/lib/segmented-button-set.js.map +1 -1
  271. package/switch/lib/_handle.scss +56 -9
  272. package/switch/lib/_icon.scss +36 -0
  273. package/switch/lib/_switch.scss +1 -115
  274. package/switch/lib/_track.scss +39 -0
  275. package/switch/lib/switch-styles.css.js +1 -1
  276. package/switch/lib/switch-styles.css.js.map +1 -1
  277. package/switch/lib/switch.d.ts +3 -0
  278. package/switch/lib/switch.js +3 -0
  279. package/switch/lib/switch.js.map +1 -1
  280. package/textfield/lib/_filled-text-field.scss +4 -2
  281. package/textfield/lib/_outlined-text-field.scss +3 -2
  282. package/textfield/lib/filled-styles.css.js +1 -1
  283. package/textfield/lib/filled-styles.css.js.map +1 -1
  284. package/textfield/lib/outlined-styles.css.js +1 -1
  285. package/textfield/lib/outlined-styles.css.js.map +1 -1
  286. package/textfield/lib/text-field.d.ts +0 -2
  287. package/textfield/lib/text-field.js +0 -2
  288. package/textfield/lib/text-field.js.map +1 -1
  289. package/tokens/_index.scss +1 -1
  290. package/tokens/{v0_150 → v0_152}/_index.scss +1 -1
  291. package/tokens/{v0_150 → v0_152}/_md-comp-assist-chip.scss +2 -2
  292. package/tokens/{v0_150 → v0_152}/_md-comp-badge.scss +2 -2
  293. package/tokens/{v0_150 → v0_152}/_md-comp-banner.scss +2 -43
  294. package/tokens/{v0_150 → v0_152}/_md-comp-bottom-app-bar.scss +3 -4
  295. package/tokens/{v0_150 → v0_152}/_md-comp-carousel-item.scss +2 -2
  296. package/tokens/{v0_150 → v0_152}/_md-comp-checkbox.scss +2 -12
  297. package/tokens/{v0_150 → v0_152}/_md-comp-circular-progress-indicator.scss +2 -2
  298. package/tokens/{v0_150 → v0_152}/_md-comp-data-table.scss +2 -4
  299. package/tokens/{v0_150 → v0_152}/_md-comp-date-input-modal.scss +2 -2
  300. package/tokens/{v0_150 → v0_152}/_md-comp-date-picker-docked.scss +2 -2
  301. package/tokens/{v0_150 → v0_152}/_md-comp-date-picker-modal.scss +2 -2
  302. package/tokens/{v0_150 → v0_152}/_md-comp-dialog.scss +2 -25
  303. package/tokens/{v0_150 → v0_152}/_md-comp-divider.scss +2 -2
  304. package/tokens/{v0_150 → v0_152}/_md-comp-elevated-button.scss +2 -2
  305. package/tokens/{v0_150 → v0_152}/_md-comp-elevated-card.scss +2 -2
  306. package/tokens/{v0_150 → v0_152}/_md-comp-extended-fab-branded.scss +2 -2
  307. package/tokens/{v0_150 → v0_152}/_md-comp-extended-fab-primary.scss +2 -2
  308. package/tokens/{v0_150 → v0_152}/_md-comp-extended-fab-secondary.scss +2 -2
  309. package/tokens/{v0_150 → v0_152}/_md-comp-extended-fab-surface.scss +2 -2
  310. package/tokens/{v0_150 → v0_152}/_md-comp-extended-fab-tertiary.scss +2 -4
  311. package/tokens/{v0_150 → v0_152}/_md-comp-fab-branded-large.scss +2 -3
  312. package/tokens/{v0_150 → v0_152}/_md-comp-fab-branded.scss +2 -2
  313. package/tokens/{v0_150 → v0_152}/_md-comp-fab-primary-large.scss +2 -2
  314. package/tokens/{v0_150 → v0_152}/_md-comp-fab-primary-small.scss +2 -2
  315. package/tokens/{v0_150 → v0_152}/_md-comp-fab-primary.scss +2 -2
  316. package/tokens/{v0_150 → v0_152}/_md-comp-fab-secondary-large.scss +2 -2
  317. package/tokens/{v0_150 → v0_152}/_md-comp-fab-secondary-small.scss +2 -2
  318. package/tokens/{v0_150 → v0_152}/_md-comp-fab-secondary.scss +2 -2
  319. package/tokens/{v0_150 → v0_152}/_md-comp-fab-surface-large.scss +2 -2
  320. package/tokens/{v0_150 → v0_152}/_md-comp-fab-surface-small.scss +2 -2
  321. package/tokens/{v0_150 → v0_152}/_md-comp-fab-surface.scss +2 -2
  322. package/tokens/{v0_150 → v0_152}/_md-comp-fab-tertiary-large.scss +2 -2
  323. package/tokens/{v0_150 → v0_152}/_md-comp-fab-tertiary-small.scss +2 -2
  324. package/tokens/{v0_150 → v0_152}/_md-comp-fab-tertiary.scss +2 -2
  325. package/tokens/{v0_150 → v0_152}/_md-comp-filled-autocomplete.scss +2 -3
  326. package/tokens/{v0_150 → v0_152}/_md-comp-filled-button.scss +2 -8
  327. package/tokens/{v0_150 → v0_152}/_md-comp-filled-card.scss +2 -4
  328. package/tokens/{v0_150 → v0_152}/_md-comp-filled-icon-button.scss +2 -2
  329. package/tokens/{v0_150 → v0_152}/_md-comp-filled-menu-button.scss +2 -2
  330. package/tokens/{v0_150 → v0_152}/_md-comp-filled-select.scss +2 -6
  331. package/tokens/{v0_150 → v0_152}/_md-comp-filled-text-field.scss +2 -3
  332. package/tokens/{v0_150 → v0_152}/_md-comp-filled-tonal-button.scss +2 -2
  333. package/tokens/{v0_150 → v0_152}/_md-comp-filled-tonal-icon-button.scss +2 -2
  334. package/tokens/{v0_150 → v0_152}/_md-comp-filter-chip.scss +2 -30
  335. package/tokens/{v0_150 → v0_152}/_md-comp-full-screen-dialog.scss +3 -53
  336. package/tokens/{v0_150 → v0_152}/_md-comp-icon-button.scss +3 -3
  337. package/tokens/{v0_150 → v0_152}/_md-comp-input-chip.scss +2 -52
  338. package/tokens/{v0_150 → v0_152}/_md-comp-linear-progress-indicator.scss +2 -2
  339. package/tokens/{v0_150 → v0_152}/_md-comp-list.scss +3 -12
  340. package/tokens/{v0_150 → v0_152}/_md-comp-menu.scss +2 -4
  341. package/tokens/{v0_150 → v0_152}/_md-comp-navigation-bar.scss +2 -9
  342. package/tokens/{v0_150 → v0_152}/_md-comp-navigation-drawer.scss +2 -8
  343. package/tokens/{v0_150 → v0_152}/_md-comp-navigation-rail.scss +2 -39
  344. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-autocomplete.scss +2 -3
  345. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-button.scss +2 -6
  346. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-card.scss +2 -2
  347. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-icon-button.scss +2 -4
  348. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-menu-button.scss +2 -2
  349. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-segmented-button.scss +2 -2
  350. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-select.scss +2 -6
  351. package/tokens/{v0_150 → v0_152}/_md-comp-outlined-text-field.scss +2 -3
  352. package/tokens/{v0_150 → v0_152}/_md-comp-plain-tooltip.scss +2 -2
  353. package/tokens/{v0_150 → v0_152}/_md-comp-primary-navigation-tab.scss +2 -2
  354. package/tokens/{v0_150 → v0_152}/_md-comp-radio-button.scss +2 -2
  355. package/tokens/{v0_150 → v0_152}/_md-comp-rich-tooltip.scss +2 -2
  356. package/tokens/{v0_150 → v0_152}/_md-comp-scrim.scss +2 -2
  357. package/tokens/{v0_150 → v0_152}/_md-comp-search-bar.scss +2 -2
  358. package/tokens/{v0_150 → v0_152}/_md-comp-search-view.scss +2 -2
  359. package/tokens/{v0_150 → v0_152}/_md-comp-secondary-navigation-tab.scss +2 -2
  360. package/tokens/{v0_150 → v0_152}/_md-comp-sheet-bottom.scss +2 -2
  361. package/tokens/{v0_150 → v0_152}/_md-comp-sheet-floating.scss +2 -2
  362. package/tokens/{v0_150 → v0_152}/_md-comp-sheet-side.scss +4 -2
  363. package/tokens/{v0_150 → v0_152}/_md-comp-slider.scss +2 -4
  364. package/tokens/{v0_150 → v0_152}/_md-comp-snackbar.scss +2 -2
  365. package/tokens/{v0_150 → v0_152}/_md-comp-standard-menu-button.scss +2 -2
  366. package/tokens/{v0_150 → v0_152}/_md-comp-suggestion-chip.scss +2 -2
  367. package/tokens/{v0_150 → v0_152}/_md-comp-switch.scss +2 -11
  368. package/tokens/{v0_150 → v0_152}/_md-comp-text-button.scss +2 -6
  369. package/tokens/{v0_150 → v0_152}/_md-comp-time-input.scss +2 -2
  370. package/tokens/{v0_150 → v0_152}/_md-comp-time-picker.scss +2 -5
  371. package/tokens/{v0_150 → v0_152}/_md-comp-top-app-bar-large.scss +2 -2
  372. package/tokens/{v0_150 → v0_152}/_md-comp-top-app-bar-medium.scss +2 -2
  373. package/tokens/{v0_150 → v0_152}/_md-comp-top-app-bar-small-centered.scss +2 -3
  374. package/tokens/{v0_150 → v0_152}/_md-comp-top-app-bar-small.scss +2 -3
  375. package/tokens/{v0_150 → v0_152}/_md-ref-palette.scss +2 -2
  376. package/tokens/{v0_150 → v0_152}/_md-ref-typeface.scss +2 -2
  377. package/tokens/{v0_150 → v0_152}/_md-sys-color.scss +2 -20
  378. package/tokens/{v0_150 → v0_152}/_md-sys-elevation.scss +4 -13
  379. package/tokens/{v0_150 → v0_152}/_md-sys-motion.scss +2 -2
  380. package/tokens/{v0_150 → v0_152}/_md-sys-shape.scss +2 -2
  381. package/tokens/{v0_150 → v0_152}/_md-sys-state.scss +2 -2
  382. package/tokens/{v0_150 → v0_152}/_md-sys-typescale.scss +2 -3
  383. package/tokens/v0_152/index.test.css.d.ts +1 -0
  384. package/tokens/{v0_150 → v0_152}/index.test.css.js +0 -0
  385. package/tokens/{v0_150 → v0_152}/index.test.css.js.map +0 -0
  386. package/tokens/{v0_150 → v0_152}/index.test.scss +1 -1
  387. package/tokens/v0_152/lib.test.css.d.ts +1 -0
  388. package/tokens/{v0_150 → v0_152}/lib.test.css.js +0 -0
  389. package/tokens/{v0_150 → v0_152}/lib.test.css.js.map +0 -0
  390. package/tokens/{v0_150 → v0_152}/lib.test.scss +1 -1
  391. package/CHANGELOG.md +0 -141
  392. package/elevationold/lib/elevation-overlay-styles.css.js +0 -9
  393. package/elevationold/lib/elevation-overlay-styles.css.js.map +0 -1
  394. package/list/lib/_tokens.scss +0 -80
  395. package/list/lib/divider/_list-divider.scss +0 -46
  396. package/list/lib/divider/list-divider-styles.css.js +0 -9
  397. package/list/lib/divider/list-divider-styles.css.js.map +0 -1
  398. package/list/lib/divider/list-divider-styles.scss +0 -8
  399. package/list/lib/divider/list-divider.d.ts +0 -13
  400. package/list/lib/divider/list-divider.js +0 -32
  401. package/list/lib/divider/list-divider.js.map +0 -1
  402. package/list/list-divider.d.ts +0 -19
  403. package/list/list-divider.js +0 -22
  404. package/list/list-divider.js.map +0 -1
  405. package/menu/lib/_menu-button.scss +0 -14
  406. package/menu/lib/adapter.d.ts +0 -66
  407. package/menu/lib/adapter.js +0 -7
  408. package/menu/lib/adapter.js.map +0 -1
  409. package/menu/lib/constants.d.ts +0 -22
  410. package/menu/lib/constants.js +0 -23
  411. package/menu/lib/constants.js.map +0 -1
  412. package/menu/lib/foundation.d.ts +0 -49
  413. package/menu/lib/foundation.js +0 -123
  414. package/menu/lib/foundation.js.map +0 -1
  415. package/menu/lib/menu-button-styles.css.js +0 -9
  416. package/menu/lib/menu-button-styles.css.js.map +0 -1
  417. package/menu/lib/menu-button-styles.scss +0 -8
  418. package/menu/lib/menu-button.d.ts +0 -27
  419. package/menu/lib/menu-button.js +0 -93
  420. package/menu/lib/menu-button.js.map +0 -1
  421. package/menu/menu-button.d.ts +0 -14
  422. package/menu/menu-button.js +0 -17
  423. package/menu/menu-button.js.map +0 -1
@@ -4,257 +4,286 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { __decorate, __metadata } from "tslib";
7
+ // Required for @ariaProperty
8
+ // tslint:disable:no-new-decorators
7
9
  import '../../../ripple/ripple.js';
8
10
  import '../../../focus/focus-ring.js';
9
- import { ActionElement } from '../../../actionelement/action-element.js';
11
+ import { html, LitElement, nothing } from 'lit';
12
+ import { property, query, queryAsync, state } from 'lit/decorators.js';
13
+ import { classMap } from 'lit/directives/class-map.js';
10
14
  import { ariaProperty } from '../../../decorators/aria-property.js';
11
15
  import { pointerPress, shouldShowStrongFocus } from '../../../focus/strong-focus.js';
12
- import { MdRipple } from '../../../ripple/ripple.js';
13
- import { html } from 'lit';
14
- import { property, query } from 'lit/decorators.js';
15
- import { classMap } from 'lit/directives/class-map.js';
16
- import { ifDefined } from 'lit/directives/if-defined.js';
17
- /** @soyCompatible */
18
- export class ListItem extends ActionElement {
16
+ import { ripple } from '../../../ripple/directive.js';
17
+ // tslint:disable-next-line:enforce-comments-on-exported-symbols
18
+ export class ListItemEl extends LitElement {
19
19
  constructor() {
20
20
  super(...arguments);
21
21
  // @ts-ignore(b/264292293): Use `override` with TS 4.9+
22
22
  this.role = 'listitem';
23
+ /**
24
+ * The primary, headline text of the list item.
25
+ */
26
+ this.headline = '';
27
+ /**
28
+ * The one-line supporting text below the headline.
29
+ */
23
30
  this.supportingText = '';
31
+ /**
32
+ * The multi-line supporting text below the headline. __NOTE:__ if set to a
33
+ * truthy value, overrides the visibility and behavior of `supportingText`.
34
+ */
24
35
  this.multiLineSupportingText = '';
36
+ /**
37
+ * The supporting text placed at the end of the item. Overriden by elements
38
+ * slotted into the `end` slot.
39
+ */
25
40
  this.trailingSupportingText = '';
41
+ /**
42
+ * Disables the item and makes it non-selectable and non-interactive.
43
+ */
26
44
  this.disabled = false;
45
+ /**
46
+ * The tabindex of the underlying item.
47
+ *
48
+ * __NOTE:__ this is overriden by the keyboard behavior of `md-list` and by
49
+ * setting `selected`.
50
+ */
27
51
  this.itemTabIndex = -1;
28
- this.headline = '';
52
+ /**
53
+ * Whether or not the element is in the selected visual state. When active,
54
+ * tabindex is set to 0, and in some list item variants (like md-list-item),
55
+ * focuses the underlying item.
56
+ */
57
+ this.active = false;
58
+ /**
59
+ * READONLY. Sets the `md-list-item` attribute on the element.
60
+ */
61
+ this.isListItem = true;
29
62
  this.showFocusRing = false;
63
+ this.showRipple = false;
64
+ /**
65
+ * Only meant to be overriden by subclassing and not by the user. This is
66
+ * so that we have control over focus on specific variants such as disabling
67
+ * focus on <md-autocomplete-item> but enabling it for <md-menu-item>.
68
+ */
69
+ this.focusOnSelection = true;
70
+ this.getRipple = () => {
71
+ this.showRipple = true;
72
+ return this.ripple;
73
+ };
74
+ this.isFirstUpdate = true;
75
+ }
76
+ willUpdate(changed) {
77
+ if (changed.has('active') && !this.disabled) {
78
+ if (this.active) {
79
+ this.itemTabIndex = 0;
80
+ if (this.focusOnSelection) {
81
+ this.showFocusRing = shouldShowStrongFocus();
82
+ }
83
+ // Do not reset anything if it's the first render because user could
84
+ // have set `itemTabIndex` manually.
85
+ }
86
+ else if (!this.isFirstUpdate) {
87
+ this.itemTabIndex = -1;
88
+ }
89
+ }
30
90
  }
31
- /** @soyTemplate */
32
91
  render() {
92
+ return this.renderListItem(html `
93
+ ${this.renderStart()}
94
+ ${this.renderBody()}
95
+ ${this.renderEnd()}
96
+ <div class="ripple">
97
+ ${this.renderRipple()}
98
+ </div>
99
+ <div class="focus-ring">
100
+ ${this.renderFocusRing()}
101
+ </div>`);
102
+ }
103
+ /**
104
+ * Renders the root list item.
105
+ *
106
+ * @param content {unkown} the child content of the list item.
107
+ */
108
+ renderListItem(content) {
33
109
  return html `
34
110
  <li
35
- tabindex=${this.itemTabIndex}
111
+ tabindex=${this.disabled ? -1 : this.itemTabIndex}
36
112
  role=${this.role}
37
- aria-selected=${ifDefined(this.ariaSelected || undefined)}
38
- aria-checked=${ifDefined(this.ariaChecked || undefined)}
39
- id=${ifDefined(this.itemId || undefined)}
40
- data-query-md3-list-item
41
- class="md3-list-item ${classMap(this.getRenderClasses())}"
42
- @pointerdown=${this.handlePointerDown}
43
- @pointerenter=${this.handlePointerEnter}
44
- @pointerup=${this.handlePointerUp}
45
- @pointercancel=${this.handlePointerCancel}
46
- @pointerleave=${this.handlePointerLeave}
47
- @keydown=${this.handleKeyDown}
48
- @keyup=${this.handleKeyUp}
49
- @click=${this.handleClick}
50
- @contextmenu=${this.handleContextMenu}
51
- @focus=${this.handleFocus}
52
- @blur=${this.handleBlur}
53
- >
54
- ${this.renderStart()}
55
- ${this.renderBody()}
56
- ${this.renderEnd()}
57
- <div class="md3-list-item__ripple">
58
- ${this.renderRipple()}
59
- </div>
60
- <div class="md3-list-item__focus-ring">
61
- ${this.renderFocusRing()}
62
- </div>
63
- </li>`;
113
+ aria-selected=${this.ariaSelected || nothing}
114
+ aria-checked=${this.ariaChecked || nothing}
115
+ class="list-item ${classMap(this.getRenderClasses())}"
116
+ @pointerdown=${this.onPointerdown}
117
+ @focus=${this.onFocus}
118
+ @blur=${this.onBlur}
119
+ @click=${this.onClick}
120
+ @pointerenter=${this.onPointerenter}
121
+ @pointerleave=${this.onPointerleave}
122
+ @keydown=${this.onKeydown}
123
+ ${ripple(this.getRipple)}>${content}</li>`;
64
124
  }
65
- /** @soyTemplate */
125
+ /**
126
+ * Handles rendering of the ripple element.
127
+ */
66
128
  renderRipple() {
67
- return html `<md-ripple ?disabled="${this.disabled}"></md-ripple>`;
129
+ return this.showRipple ?
130
+ html `<md-ripple ?disabled="${this.disabled}"></md-ripple>` :
131
+ nothing;
68
132
  }
69
- /** @soyTemplate */
133
+ /**
134
+ * Handles rendering of the focus ring.
135
+ */
70
136
  renderFocusRing() {
71
137
  return html `<md-focus-ring .visible="${this.showFocusRing}"></md-focus-ring>`;
72
138
  }
73
- /** @soyTemplate */
74
- getAriaRole() {
75
- return 'listitem';
76
- }
77
- /** @soyTemplate */
139
+ /**
140
+ * Classes applied to the list item root.
141
+ */
78
142
  getRenderClasses() {
79
143
  return {
80
- 'md3-list-item--with-one-line': this.supportingText === '' && this.multiLineSupportingText === '',
81
- 'md3-list-item--with-two-line': this.supportingText !== '' && this.multiLineSupportingText === '',
82
- 'md3-list-item--with-three-line': this.multiLineSupportingText !== '',
83
- 'md3-list-item--disabled': this.disabled,
84
- 'md3-list-item--enabled': !this.disabled,
144
+ 'with-one-line': this.supportingText === '' && this.multiLineSupportingText === '',
145
+ 'with-two-line': this.supportingText !== '' && this.multiLineSupportingText === '',
146
+ 'with-three-line': this.multiLineSupportingText !== '',
147
+ 'disabled': this.disabled,
148
+ 'enabled': !this.disabled,
85
149
  };
86
150
  }
87
- /** @soyTemplate */
151
+ /**
152
+ * The content rendered at the start of the list item.
153
+ */
88
154
  renderStart() {
89
- return html `<div class="md3-list-item__start"><!--
90
- --><slot name="start" @slotchange=${this.handleSlotChange}></slot><!--
91
- --></div>`;
155
+ return html `<div class="start"><slot name="start"></slot></div>`;
92
156
  }
93
- /** @soyTemplate */
157
+ /**
158
+ * Handles rendering the headline and supporting text.
159
+ */
94
160
  renderBody() {
95
- return html `<div class="md3-list-item__body"><!--
96
- --><span class="md3-list-item__label-text"><!--
97
- -->${this.headline}<!--
98
- --></span><!--
99
- -->${this.multiLineSupportingText !== '' ?
161
+ const supportingText = this.multiLineSupportingText !== '' ?
100
162
  this.renderMultiLineSupportingText() :
101
163
  this.supportingText !== '' ? this.renderSupportingText() :
102
- ''}<!--
103
- --></div>`;
164
+ '';
165
+ return html `<div class="body"
166
+ ><span class="label-text">${this.headline}</span>${supportingText}</div>`;
104
167
  }
105
- /** @soyTemplate */
168
+ /**
169
+ * Renders the one-line supporting text.
170
+ */
106
171
  renderSupportingText() {
107
- return html `<span class="md3-list-item__supporting-text"><!--
108
- -->${this.supportingText}<!--
109
- --></span>`;
172
+ return html `<span class="supporting-text">${this.supportingText}</span>`;
110
173
  }
111
- /** @soyTemplate */
174
+ /**
175
+ * Renders the multi-line supporting text
176
+ */
112
177
  renderMultiLineSupportingText() {
113
- return html `<span class="md3-list-item__supporting-text md3-list-item__supporting-text--multi-line"><!--
114
- -->${this.multiLineSupportingText}<!--
115
- --></span>`;
178
+ return html `<span class="supporting-text supporting-text--multi-line"
179
+ >${this.multiLineSupportingText}</span>`;
116
180
  }
117
- /** @soyTemplate */
181
+ /**
182
+ * The content rendered at the end of the list item.
183
+ */
118
184
  renderEnd() {
119
- return html `<div class="md3-list-item__end"><!--
120
- --><slot name="end" @slotchange=${this.handleSlotChange}><!--
121
- -->${this.trailingSupportingText !== '' ?
185
+ const supportingText = this.trailingSupportingText !== '' ?
122
186
  this.renderTrailingSupportingText() :
123
- ''}<!--
124
- --></slot><!--
125
- --></div>`;
187
+ '';
188
+ return html `<div class="end"
189
+ ><slot name="end">${supportingText}</slot></div>`;
126
190
  }
127
- /** @soyTemplate */
191
+ /**
192
+ * Renders the supporting text at the end of the list item.
193
+ */
128
194
  renderTrailingSupportingText() {
129
- return html `<span class="md3-list-item__trailing-supporting-text"><!--
130
- -->${this.trailingSupportingText}<!--
131
- --></span>`;
132
- }
133
- handleSlotChange() {
134
- this.requestUpdate();
195
+ return html `<span class="trailing-supporting-text"
196
+ >${this.trailingSupportingText}</span>`;
135
197
  }
136
- beginPress({ positionEvent }) {
137
- this.ripple.beginPress(positionEvent);
138
- }
139
- endPress({ cancelled }) {
140
- this.ripple.endPress();
141
- if (cancelled)
142
- return;
143
- super.endPress({ cancelled, actionData: { item: this } });
144
- }
145
- handleFocus() {
146
- this.showFocusRing = shouldShowStrongFocus();
147
- }
148
- handleBlur() {
149
- this.showFocusRing = false;
150
- }
151
- handlePointerDown(e) {
152
- super.handlePointerDown(e);
198
+ onPointerdown() {
153
199
  pointerPress();
154
200
  this.showFocusRing = shouldShowStrongFocus();
155
201
  }
156
- handlePointerEnter(e) {
157
- this.ripple.beginHover(e);
158
- }
159
- handlePointerLeave(e) {
160
- super.handlePointerLeave(e);
161
- this.ripple.endHover();
162
- }
163
- /** @bubbleWizEvent */
164
- handleKeyDown(e) {
165
- if (e.key !== ' ' && e.key !== 'Enter')
166
- return;
167
- e.preventDefault();
168
- // TODO(b/240124486): Replace with beginPress provided by action
169
- // element.
170
- this.ripple.beginPress(e);
171
- }
172
- handleKeyUp(e) {
173
- if (e.key !== ' ' && e.key !== 'Enter')
174
- return;
175
- e.preventDefault();
176
- // TODO(b/240124486): Replace with beginPress provided by action element.
177
- super.endPress({ cancelled: false, actionData: { item: this } });
178
- this.ripple.endPress();
179
- }
180
- /**
181
- * Focuses list item and makes list item focusable via keyboard.
182
- */
183
- activate() {
184
- this.itemTabIndex = 0;
185
- this.listItemRoot.focus();
186
- this.showFocusRing = true;
202
+ onFocus() {
203
+ this.showFocusRing = shouldShowStrongFocus();
187
204
  }
188
- /**
189
- * Returns true if list item is currently focused and is focusable.
190
- */
191
- isActive() {
192
- return this.itemTabIndex === 0 && this.showFocusRing;
205
+ onBlur() {
206
+ this.showFocusRing = false;
193
207
  }
194
- /**
195
- * Removes list item from sequential keyboard navigation.
196
- */
197
- deactivate() {
198
- this.itemTabIndex = -1;
208
+ // For easier overriding in menu-item
209
+ onClick(e) { }
210
+ onKeydown(e) { }
211
+ onPointerenter(e) { }
212
+ onPointerleave(e) { }
213
+ updated(changed) {
214
+ super.updated(changed);
215
+ // will focus the list item root if it is selected but not on the first
216
+ // update or else it may cause the page to jump on first load.
217
+ if (changed.has('active') && !this.isFirstUpdate && this.active &&
218
+ this.focusOnSelection) {
219
+ this.listItemRoot.focus();
220
+ }
221
+ this.isFirstUpdate = false;
199
222
  }
200
223
  }
201
224
  __decorate([
202
- ariaProperty // tslint:disable-line:no-new-decorators
203
- // tslint:disable-next-line:decorator-placement
225
+ ariaProperty
226
+ // tslint:disable-next-line
204
227
  ,
205
228
  property({ type: String, attribute: 'data-role', noAccessor: true }),
206
229
  __metadata("design:type", String)
207
- ], ListItem.prototype, "role", void 0);
230
+ ], ListItemEl.prototype, "role", void 0);
208
231
  __decorate([
209
- ariaProperty // tslint:disable-line:no-new-decorators
210
- ,
232
+ ariaProperty,
211
233
  property({ type: String, attribute: 'data-aria-selected', noAccessor: true }),
212
234
  __metadata("design:type", String)
213
- ], ListItem.prototype, "ariaSelected", void 0);
235
+ ], ListItemEl.prototype, "ariaSelected", void 0);
214
236
  __decorate([
215
- ariaProperty // tslint:disable-line:no-new-decorators
216
- ,
237
+ ariaProperty,
217
238
  property({ type: String, attribute: 'data-aria-checked', noAccessor: true }),
218
239
  __metadata("design:type", String)
219
- ], ListItem.prototype, "ariaChecked", void 0);
240
+ ], ListItemEl.prototype, "ariaChecked", void 0);
220
241
  __decorate([
221
- property({ type: String }),
222
- __metadata("design:type", String)
223
- ], ListItem.prototype, "itemId", void 0);
242
+ property(),
243
+ __metadata("design:type", Object)
244
+ ], ListItemEl.prototype, "headline", void 0);
224
245
  __decorate([
225
- property({ type: String }),
246
+ property(),
226
247
  __metadata("design:type", Object)
227
- ], ListItem.prototype, "supportingText", void 0);
248
+ ], ListItemEl.prototype, "supportingText", void 0);
228
249
  __decorate([
229
- property({ type: String }),
250
+ property(),
230
251
  __metadata("design:type", Object)
231
- ], ListItem.prototype, "multiLineSupportingText", void 0);
252
+ ], ListItemEl.prototype, "multiLineSupportingText", void 0);
232
253
  __decorate([
233
- property({ type: String }),
254
+ property(),
234
255
  __metadata("design:type", Object)
235
- ], ListItem.prototype, "trailingSupportingText", void 0);
256
+ ], ListItemEl.prototype, "trailingSupportingText", void 0);
236
257
  __decorate([
237
258
  property({ type: Boolean }),
238
259
  __metadata("design:type", Object)
239
- ], ListItem.prototype, "disabled", void 0);
260
+ ], ListItemEl.prototype, "disabled", void 0);
240
261
  __decorate([
241
262
  property({ type: Number }),
242
263
  __metadata("design:type", Object)
243
- ], ListItem.prototype, "itemTabIndex", void 0);
264
+ ], ListItemEl.prototype, "itemTabIndex", void 0);
265
+ __decorate([
266
+ property({ type: Boolean, reflect: true }),
267
+ __metadata("design:type", Object)
268
+ ], ListItemEl.prototype, "active", void 0);
244
269
  __decorate([
245
- property({ type: String }),
270
+ property({ type: Boolean, attribute: 'md-list-item', reflect: true }),
246
271
  __metadata("design:type", Object)
247
- ], ListItem.prototype, "headline", void 0);
272
+ ], ListItemEl.prototype, "isListItem", void 0);
248
273
  __decorate([
249
- query('md-ripple'),
250
- __metadata("design:type", MdRipple)
251
- ], ListItem.prototype, "ripple", void 0);
274
+ queryAsync('md-ripple'),
275
+ __metadata("design:type", Promise)
276
+ ], ListItemEl.prototype, "ripple", void 0);
252
277
  __decorate([
253
- query('[data-query-md3-list-item]'),
278
+ query('.list-item'),
254
279
  __metadata("design:type", HTMLElement)
255
- ], ListItem.prototype, "listItemRoot", void 0);
280
+ ], ListItemEl.prototype, "listItemRoot", void 0);
256
281
  __decorate([
257
- property({ type: Boolean }),
282
+ state(),
283
+ __metadata("design:type", Object)
284
+ ], ListItemEl.prototype, "showFocusRing", void 0);
285
+ __decorate([
286
+ state(),
258
287
  __metadata("design:type", Object)
259
- ], ListItem.prototype, "showFocusRing", void 0);
288
+ ], ListItemEl.prototype, "showRipple", void 0);
260
289
  //# sourceMappingURL=list-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-item.js","sourceRoot":"","sources":["list-item.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,aAAa,EAAmC,MAAM,0CAA0C,CAAC;AACzG,OAAO,EAAC,YAAY,EAAC,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAC,YAAY,EAAE,qBAAqB,EAAC,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAC,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAC,IAAI,EAAiB,MAAM,KAAK,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAY,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AAEvD,qBAAqB;AACrB,MAAM,OAAO,QAAS,SAAQ,aAAa;IAA3C;;QAKE,AADA,uDAAuD;QACvD,SAAI,GAAa,UAAU,CAAC;QAYF,mBAAc,GAAG,EAAE,CAAC;QACpB,4BAAuB,GAAG,EAAE,CAAC;QAC7B,2BAAsB,GAAG,EAAE,CAAC;QAC3B,aAAQ,GAAG,KAAK,CAAC;QAClB,iBAAY,GAAG,CAAC,CAAC,CAAC;QAClB,aAAQ,GAAG,EAAE,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AM,EAAC,CAAC;;gDAAqB;AACpB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;yDAA8B;AAC7B;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;wDAA6B;AAC3B;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;0CAAkB;AAClB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;8CAAmB;AAClB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;0CAAe;AACpB;IAAnB,KAAK,CAAC,WAAW,CAAC;8BAAU,QAAQ;wCAAC;AACD;IAApC,KAAK,CAAC,4BAA4B,CAAC;8BAAgB,WAAW;8CAAC;AACrC;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;+CAAuB","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../ripple/ripple.js';\nimport '../../../focus/focus-ring.js';\n\nimport {ActionElement, BeginPressConfig, EndPressConfig} from '../../../actionelement/action-element.js';\nimport {ariaProperty} from '../../../decorators/aria-property.js';\nimport {pointerPress, shouldShowStrongFocus} from '../../../focus/strong-focus.js';\nimport {MdRipple} from '../../../ripple/ripple.js';\nimport {ARIARole} from '../../../types/aria.js';\nimport {html, TemplateResult} from 'lit';\nimport {property, query} from 'lit/decorators.js';\nimport {ClassInfo, classMap} from 'lit/directives/class-map.js';\nimport {ifDefined} from 'lit/directives/if-defined.js';\n\n/** @soyCompatible */\nexport class ListItem extends ActionElement {\n @ariaProperty // tslint:disable-line:no-new-decorators\n // tslint:disable-next-line:decorator-placement\n @property({type: String, attribute: 'data-role', noAccessor: true})\n // @ts-ignore(b/264292293): Use `override` with TS 4.9+\n role: ARIARole = 'listitem';\n\n @ariaProperty // tslint:disable-line:no-new-decorators\n @property({type: String, attribute: 'data-aria-selected', noAccessor: true})\n override ariaSelected!: 'true'|'false';\n\n @ariaProperty // tslint:disable-line:no-new-decorators\n @property({type: String, attribute: 'data-aria-checked', noAccessor: true})\n override ariaChecked!: 'true'|'false';\n\n @property({type: String}) itemId!: string;\n\n @property({type: String}) supportingText = '';\n @property({type: String}) multiLineSupportingText = '';\n @property({type: String}) trailingSupportingText = '';\n @property({type: Boolean}) disabled = false;\n @property({type: Number}) itemTabIndex = -1;\n @property({type: String}) headline = '';\n @query('md-ripple') ripple!: MdRipple;\n @query('[data-query-md3-list-item]') listItemRoot!: HTMLElement;\n @property({type: Boolean}) showFocusRing = false;\n\n /** @soyTemplate */\n override render(): TemplateResult {\n return html`\n <li\n tabindex=${this.itemTabIndex}\n role=${this.role}\n aria-selected=${ifDefined(this.ariaSelected || undefined)}\n aria-checked=${ifDefined(this.ariaChecked || undefined)}\n id=${ifDefined(this.itemId || undefined)}\n data-query-md3-list-item\n class=\"md3-list-item ${classMap(this.getRenderClasses())}\"\n @pointerdown=${this.handlePointerDown}\n @pointerenter=${this.handlePointerEnter}\n @pointerup=${this.handlePointerUp}\n @pointercancel=${this.handlePointerCancel}\n @pointerleave=${this.handlePointerLeave}\n @keydown=${this.handleKeyDown}\n @keyup=${this.handleKeyUp}\n @click=${this.handleClick}\n @contextmenu=${this.handleContextMenu}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n >\n ${this.renderStart()}\n ${this.renderBody()}\n ${this.renderEnd()}\n <div class=\"md3-list-item__ripple\">\n ${this.renderRipple()}\n </div>\n <div class=\"md3-list-item__focus-ring\">\n ${this.renderFocusRing()}\n </div>\n </li>`;\n }\n\n /** @soyTemplate */\n protected renderRipple(): TemplateResult {\n return html`<md-ripple ?disabled=\"${this.disabled}\"></md-ripple>`;\n }\n\n /** @soyTemplate */\n protected renderFocusRing(): TemplateResult {\n return html`<md-focus-ring .visible=\"${\n this.showFocusRing}\"></md-focus-ring>`;\n }\n\n /** @soyTemplate */\n protected getAriaRole(): ARIARole {\n return 'listitem';\n }\n\n /** @soyTemplate */\n protected getRenderClasses(): ClassInfo {\n return {\n 'md3-list-item--with-one-line':\n this.supportingText === '' && this.multiLineSupportingText === '',\n 'md3-list-item--with-two-line':\n this.supportingText !== '' && this.multiLineSupportingText === '',\n 'md3-list-item--with-three-line': this.multiLineSupportingText !== '',\n 'md3-list-item--disabled': this.disabled,\n 'md3-list-item--enabled': !this.disabled,\n };\n }\n\n /** @soyTemplate */\n protected renderStart(): TemplateResult {\n return html`<div class=\"md3-list-item__start\"><!--\n --><slot name=\"start\" @slotchange=${this.handleSlotChange}></slot><!--\n --></div>`;\n }\n\n /** @soyTemplate */\n protected renderBody(): TemplateResult {\n return html`<div class=\"md3-list-item__body\"><!--\n --><span class=\"md3-list-item__label-text\"><!--\n -->${this.headline}<!--\n --></span><!--\n -->${\n this.multiLineSupportingText !== '' ?\n this.renderMultiLineSupportingText() :\n this.supportingText !== '' ? this.renderSupportingText() :\n ''}<!--\n --></div>`;\n }\n\n /** @soyTemplate */\n protected renderSupportingText(): TemplateResult {\n return html`<span class=\"md3-list-item__supporting-text\"><!--\n -->${this.supportingText}<!--\n --></span>`;\n }\n\n /** @soyTemplate */\n protected renderMultiLineSupportingText(): TemplateResult {\n return html`<span class=\"md3-list-item__supporting-text md3-list-item__supporting-text--multi-line\"><!--\n -->${this.multiLineSupportingText}<!--\n --></span>`;\n }\n\n /** @soyTemplate */\n protected renderEnd(): TemplateResult {\n return html`<div class=\"md3-list-item__end\"><!--\n --><slot name=\"end\" @slotchange=${this.handleSlotChange}><!--\n -->${\n this.trailingSupportingText !== '' ?\n this.renderTrailingSupportingText() :\n ''}<!--\n --></slot><!--\n --></div>`;\n }\n\n /** @soyTemplate */\n protected renderTrailingSupportingText(): TemplateResult {\n return html`<span class=\"md3-list-item__trailing-supporting-text\"><!--\n -->${this.trailingSupportingText}<!--\n --></span>`;\n }\n\n protected handleSlotChange() {\n this.requestUpdate();\n }\n\n override beginPress({positionEvent}: BeginPressConfig) {\n this.ripple.beginPress(positionEvent);\n }\n\n override endPress({cancelled}: EndPressConfig) {\n this.ripple.endPress();\n\n if (cancelled) return;\n\n super.endPress({cancelled, actionData: {item: this}});\n }\n\n protected handleFocus() {\n this.showFocusRing = shouldShowStrongFocus();\n }\n\n protected handleBlur() {\n this.showFocusRing = false;\n }\n\n override handlePointerDown(e: PointerEvent) {\n super.handlePointerDown(e);\n\n pointerPress();\n this.showFocusRing = shouldShowStrongFocus();\n }\n\n protected handlePointerEnter(e: PointerEvent) {\n this.ripple.beginHover(e);\n }\n\n override handlePointerLeave(e: PointerEvent) {\n super.handlePointerLeave(e);\n\n this.ripple.endHover();\n }\n\n /** @bubbleWizEvent */\n protected handleKeyDown(e: KeyboardEvent) {\n if (e.key !== ' ' && e.key !== 'Enter') return;\n\n e.preventDefault();\n // TODO(b/240124486): Replace with beginPress provided by action\n // element.\n this.ripple.beginPress(e);\n }\n\n protected handleKeyUp(e: KeyboardEvent) {\n if (e.key !== ' ' && e.key !== 'Enter') return;\n\n e.preventDefault();\n // TODO(b/240124486): Replace with beginPress provided by action element.\n super.endPress({cancelled: false, actionData: {item: this}});\n this.ripple.endPress();\n }\n\n /**\n * Focuses list item and makes list item focusable via keyboard.\n */\n activate() {\n this.itemTabIndex = 0;\n this.listItemRoot.focus();\n this.showFocusRing = true;\n }\n\n /**\n * Returns true if list item is currently focused and is focusable.\n */\n isActive() {\n return this.itemTabIndex === 0 && this.showFocusRing;\n }\n\n /**\n * Removes list item from sequential keyboard navigation.\n */\n deactivate() {\n this.itemTabIndex = -1;\n }\n}\n"]}
1
+ {"version":3,"file":"list-item.js","sourceRoot":"","sources":["list-item.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,6BAA6B;AAC7B,mCAAmC;AAEnC,OAAO,2BAA2B,CAAC;AACnC,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiC,MAAM,KAAK,CAAC;AAC9E,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,YAAY;IACZ,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC;;+CACrC;AAK1B;IAAX,QAAQ,EAAE;;4CAAe;AAKd;IAAX,QAAQ,EAAE;;kDAAqB;AAMpB;IAAX,QAAQ,EAAE;;2DAA8B;AAM7B;IAAX,QAAQ,EAAE;;0DAA6B;AAKb;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;4CAAkB;AAQlB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;gDAAmB;AAOD;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;0CAAgB;AAM1D;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;8CAClD;AAEO;IAAxB,UAAU,CAAC,WAAW,CAAC;;0CAA2C;AAC9C;IAApB,KAAK,CAAC,YAAY,CAAC;8BAA0B,WAAW;gDAAC;AAEjD;IAAR,KAAK,EAAE;;iDAAiC;AAChC;IAAR,KAAK,EAAE;;8CAA8B","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Required for @ariaProperty\n// tslint:disable:no-new-decorators\n\nimport '../../../ripple/ripple.js';\nimport '../../../focus/focus-ring.js';\n\nimport {html, LitElement, nothing, PropertyValues, TemplateResult} from 'lit';\nimport {property, query, queryAsync, state} from 'lit/decorators.js';\nimport {ClassInfo, classMap} from 'lit/directives/class-map.js';\n\nimport {ariaProperty} from '../../../decorators/aria-property.js';\nimport {pointerPress, shouldShowStrongFocus} from '../../../focus/strong-focus.js';\nimport {ripple} from '../../../ripple/directive.js';\nimport {MdRipple} from '../../../ripple/ripple.js';\nimport {ARIARole} from '../../../types/aria.js';\n\ninterface ListItemSelf {\n active: boolean;\n disabled: boolean;\n}\n\n/**\n * The interface of an item that is compatible with md-list. An item that is\n * selectable and disablable.\n */\nexport type ListItem = ListItemSelf&HTMLElement;\n\n// tslint:disable-next-line:enforce-comments-on-exported-symbols\nexport class ListItemEl extends LitElement implements ListItem {\n @ariaProperty\n // tslint:disable-next-line\n @property({type: String, attribute: 'data-role', noAccessor: true})\n // @ts-ignore(b/264292293): Use `override` with TS 4.9+\n role: ARIARole = 'listitem';\n @ariaProperty\n @property({type: String, attribute: 'data-aria-selected', noAccessor: true})\n override ariaSelected!: 'true'|'false';\n @ariaProperty\n @property({type: String, attribute: 'data-aria-checked', noAccessor: true})\n override ariaChecked!: 'true'|'false';\n\n /**\n * The primary, headline text of the list item.\n */\n @property() headline = '';\n\n /**\n * The one-line supporting text below the headline.\n */\n @property() supportingText = '';\n\n /**\n * The multi-line supporting text below the headline. __NOTE:__ if set to a\n * truthy value, overrides the visibility and behavior of `supportingText`.\n */\n @property() multiLineSupportingText = '';\n\n /**\n * The supporting text placed at the end of the item. Overriden by elements\n * slotted into the `end` slot.\n */\n @property() trailingSupportingText = '';\n\n /**\n * Disables the item and makes it non-selectable and non-interactive.\n */\n @property({type: Boolean}) disabled = false;\n\n /**\n * The tabindex of the underlying item.\n *\n * __NOTE:__ this is overriden by the keyboard behavior of `md-list` and by\n * setting `selected`.\n */\n @property({type: Number}) itemTabIndex = -1;\n\n /**\n * Whether or not the element is in the selected visual state. When active,\n * tabindex is set to 0, and in some list item variants (like md-list-item),\n * focuses the underlying item.\n */\n @property({type: Boolean, reflect: true}) active = false;\n\n /**\n * READONLY. Sets the `md-list-item` attribute on the element.\n */\n @property({type: Boolean, attribute: 'md-list-item', reflect: true})\n isListItem = true;\n\n @queryAsync('md-ripple') protected ripple!: Promise<MdRipple|null>;\n @query('.list-item') protected listItemRoot!: HTMLElement;\n\n @state() protected showFocusRing = false;\n @state() protected showRipple = false;\n\n /**\n * Only meant to be overriden by subclassing and not by the user. This is\n * so that we have control over focus on specific variants such as disabling\n * focus on <md-autocomplete-item> but enabling it for <md-menu-item>.\n */\n protected focusOnSelection = true;\n\n protected getRipple = () => {\n this.showRipple = true;\n return this.ripple;\n };\n\n private isFirstUpdate = true;\n\n override willUpdate(changed: PropertyValues<this>) {\n if (changed.has('active') && !this.disabled) {\n if (this.active) {\n this.itemTabIndex = 0;\n\n if (this.focusOnSelection) {\n this.showFocusRing = shouldShowStrongFocus();\n }\n\n // Do not reset anything if it's the first render because user could\n // have set `itemTabIndex` manually.\n } else if (!this.isFirstUpdate) {\n this.itemTabIndex = -1;\n }\n }\n }\n\n override render(): TemplateResult {\n return this.renderListItem(html`\n ${this.renderStart()}\n ${this.renderBody()}\n ${this.renderEnd()}\n <div class=\"ripple\">\n ${this.renderRipple()}\n </div>\n <div class=\"focus-ring\">\n ${this.renderFocusRing()}\n </div>`);\n }\n\n /**\n * Renders the root list item.\n *\n * @param content {unkown} the child content of the list item.\n */\n protected renderListItem(content: unknown) {\n return html`\n <li\n tabindex=${this.disabled ? -1 : this.itemTabIndex}\n role=${this.role}\n aria-selected=${this.ariaSelected || nothing}\n aria-checked=${this.ariaChecked || nothing}\n class=\"list-item ${classMap(this.getRenderClasses())}\"\n @pointerdown=${this.onPointerdown}\n @focus=${this.onFocus}\n @blur=${this.onBlur}\n @click=${this.onClick}\n @pointerenter=${this.onPointerenter}\n @pointerleave=${this.onPointerleave}\n @keydown=${this.onKeydown}\n ${ripple(this.getRipple)}>${content}</li>`;\n }\n\n /**\n * Handles rendering of the ripple element.\n */\n protected renderRipple(): TemplateResult|typeof nothing {\n return this.showRipple ?\n html`<md-ripple ?disabled=\"${this.disabled}\"></md-ripple>` :\n nothing;\n }\n\n /**\n * Handles rendering of the focus ring.\n */\n protected renderFocusRing(): TemplateResult {\n return html`<md-focus-ring .visible=\"${\n this.showFocusRing}\"></md-focus-ring>`;\n }\n\n /**\n * Classes applied to the list item root.\n */\n protected getRenderClasses(): ClassInfo {\n return {\n 'with-one-line':\n this.supportingText === '' && this.multiLineSupportingText === '',\n 'with-two-line':\n this.supportingText !== '' && this.multiLineSupportingText === '',\n 'with-three-line': this.multiLineSupportingText !== '',\n 'disabled': this.disabled,\n 'enabled': !this.disabled,\n };\n }\n\n /**\n * The content rendered at the start of the list item.\n */\n protected renderStart(): TemplateResult {\n return html`<div class=\"start\"><slot name=\"start\"></slot></div>`;\n }\n\n /**\n * Handles rendering the headline and supporting text.\n */\n protected renderBody(): TemplateResult {\n const supportingText = this.multiLineSupportingText !== '' ?\n this.renderMultiLineSupportingText() :\n this.supportingText !== '' ? this.renderSupportingText() :\n '';\n\n return html`<div class=\"body\"\n ><span class=\"label-text\">${this.headline}</span>${supportingText}</div>`;\n }\n\n /**\n * Renders the one-line supporting text.\n */\n protected renderSupportingText(): TemplateResult {\n return html`<span class=\"supporting-text\">${this.supportingText}</span>`;\n }\n\n /**\n * Renders the multi-line supporting text\n */\n protected renderMultiLineSupportingText(): TemplateResult {\n return html`<span class=\"supporting-text supporting-text--multi-line\"\n >${this.multiLineSupportingText}</span>`;\n }\n\n /**\n * The content rendered at the end of the list item.\n */\n protected renderEnd(): TemplateResult {\n const supportingText = this.trailingSupportingText !== '' ?\n this.renderTrailingSupportingText() :\n '';\n return html`<div class=\"end\"\n ><slot name=\"end\">${supportingText}</slot></div>`;\n }\n\n /**\n * Renders the supporting text at the end of the list item.\n */\n protected renderTrailingSupportingText(): TemplateResult {\n return html`<span class=\"trailing-supporting-text\"\n >${this.trailingSupportingText}</span>`;\n }\n\n protected onPointerdown() {\n pointerPress();\n this.showFocusRing = shouldShowStrongFocus();\n }\n\n protected onFocus() {\n this.showFocusRing = shouldShowStrongFocus();\n }\n\n protected onBlur() {\n this.showFocusRing = false;\n }\n\n // For easier overriding in menu-item\n protected onClick(e: Event) {}\n protected onKeydown(e: KeyboardEvent) {}\n protected onPointerenter(e: Event) {}\n protected onPointerleave(e: Event) {}\n\n override updated(changed: PropertyValues<this>) {\n super.updated(changed);\n\n // will focus the list item root if it is selected but not on the first\n // update or else it may cause the page to jump on first load.\n if (changed.has('active') && !this.isFirstUpdate && this.active &&\n this.focusOnSelection) {\n this.listItemRoot.focus();\n }\n\n this.isFirstUpdate = false;\n }\n}\n"]}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ListItemEl } from '../listitem/list-item.js';
7
+ export declare class ListItemLink extends ListItemEl {
8
+ /**
9
+ * Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.
10
+ */
11
+ href: string;
12
+ /**
13
+ * Sets the underlying `HTMLAnchorElement`'s `target` attribute.
14
+ */
15
+ target: string;
16
+ protected renderListItem(content: unknown): import("lit-html").TemplateResult<1>;
17
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { __decorate, __metadata } from "tslib";
7
+ import { html, nothing } from 'lit';
8
+ import { property } from 'lit/decorators.js';
9
+ import { classMap } from 'lit/directives/class-map.js';
10
+ import { ripple } from '../../../ripple/directive.js';
11
+ import { ListItemEl } from '../listitem/list-item.js';
12
+ // tslint:disable-next-line:enforce-comments-on-exported-symbols
13
+ export class ListItemLink extends ListItemEl {
14
+ renderListItem(content) {
15
+ return html `
16
+ <a
17
+ tabindex=${this.disabled ? -1 : this.itemTabIndex}
18
+ role=${this.role}
19
+ aria-selected=${this.ariaSelected || nothing}
20
+ aria-checked=${this.ariaChecked || nothing}
21
+ class="list-item ${classMap(this.getRenderClasses())}"
22
+ href=${this.href}
23
+ target=${this.target || nothing}
24
+ @pointerdown=${this.onPointerdown}
25
+ @focus=${this.onFocus}
26
+ @blur=${this.onBlur}
27
+ @click=${this.onClick}
28
+ @pointerenter=${this.onPointerenter}
29
+ @pointerleave=${this.onPointerleave}
30
+ @keydown=${this.onKeydown}
31
+ ${ripple(this.getRipple)}>${content}</a>`;
32
+ }
33
+ }
34
+ __decorate([
35
+ property(),
36
+ __metadata("design:type", String)
37
+ ], ListItemLink.prototype, "href", void 0);
38
+ __decorate([
39
+ property(),
40
+ __metadata("design:type", String)
41
+ ], ListItemLink.prototype, "target", void 0);
42
+ //# sourceMappingURL=list-item-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-item-link.js","sourceRoot":"","sources":["list-item-link.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAClC,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAC,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAIpD,gEAAgE;AAChE,MAAM,OAAO,YAAa,SAAQ,UAAU;IAUvB,cAAc,CAAC,OAAgB;QAChD,OAAO,IAAI,CAAA;;qBAEM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY;iBAC1C,IAAI,CAAC,IAAI;0BACA,IAAI,CAAC,YAAY,IAAI,OAAO;yBAC7B,IAAI,CAAC,WAAW,IAAI,OAAO;6BACvB,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;iBAC7C,IAAI,CAAC,IAAI;mBACP,IAAI,CAAC,MAAoB,IAAI,OAAO;yBAC9B,IAAI,CAAC,aAAa;mBACxB,IAAI,CAAC,OAAO;kBACb,IAAI,CAAC,MAAM;mBACV,IAAI,CAAC,OAAO;0BACL,IAAI,CAAC,cAAc;0BACnB,IAAI,CAAC,cAAc;qBACxB,IAAI,CAAC,SAAS;YACvB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,OAAO,MAAM,CAAC;IAClD,CAAC;CACF;AAzBa;IAAX,QAAQ,EAAE;;0CAAe;AAKd;IAAX,QAAQ,EAAE;;4CAAiB","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {html, nothing} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {ripple} from '../../../ripple/directive.js';\nimport {ListItemEl} from '../listitem/list-item.js';\n\ntype LinkTarget = '_blank'|'_parent'|'_self'|'_top';\n\n// tslint:disable-next-line:enforce-comments-on-exported-symbols\nexport class ListItemLink extends ListItemEl {\n /**\n * Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.\n */\n @property() href!: string;\n\n /**\n * Sets the underlying `HTMLAnchorElement`'s `target` attribute.\n */\n @property() target!: string;\n protected override renderListItem(content: unknown) {\n return html`\n <a\n tabindex=${this.disabled ? -1 : this.itemTabIndex}\n role=${this.role}\n aria-selected=${this.ariaSelected || nothing}\n aria-checked=${this.ariaChecked || nothing}\n class=\"list-item ${classMap(this.getRenderClasses())}\"\n href=${this.href}\n target=${this.target as LinkTarget || nothing}\n @pointerdown=${this.onPointerdown}\n @focus=${this.onFocus}\n @blur=${this.onBlur}\n @click=${this.onClick}\n @pointerenter=${this.onPointerenter}\n @pointerleave=${this.onPointerleave}\n @keydown=${this.onKeydown}\n ${ripple(this.getRipple)}>${content}</a>`;\n }\n}"]}
@@ -9,7 +9,7 @@
9
9
  @use 'sass:map';
10
10
  @use '../../../sass/theme';
11
11
  @use '../../../sass/map-ext';
12
- @use '../tokens';
12
+ @use '../../../tokens';
13
13
 
14
14
  $_custom-property-prefix: 'list-item-video';
15
15
 
@@ -17,7 +17,8 @@ $_custom-property-prefix: 'list-item-video';
17
17
  $reference: map-ext.pick(
18
18
  tokens.md-comp-list-values(),
19
19
  (
20
- list-item-leading-video-height,
20
+ list-item-small-leading-video-height,
21
+ list-item-large-leading-video-height,
21
22
  list-item-leading-video-width,
22
23
  list-item-leading-video-shape
23
24
  )
@@ -33,7 +34,8 @@ $_custom-property-prefix: 'list-item-video';
33
34
  $tokens: map-ext.pick(
34
35
  tokens.md-comp-list-values(),
35
36
  (
36
- list-item-leading-video-height,
37
+ list-item-small-leading-video-height,
38
+ list-item-large-leading-video-height,
37
39
  list-item-leading-video-width,
38
40
  list-item-leading-video-shape
39
41
  )
@@ -54,8 +56,12 @@ $_custom-property-prefix: 'list-item-video';
54
56
  margin-block-end: 12px;
55
57
  margin-block-start: 12px;
56
58
  object-fit: cover;
57
- height: var(--_list-item-leading-video-height);
59
+ height: var(--_list-item-small-leading-video-height);
58
60
  width: var(--_list-item-leading-video-width);
59
61
  border-radius: var(--_list-item-leading-video-shape);
62
+
63
+ &.large {
64
+ height: var(--_list-item-large-leading-video-height);
65
+ }
60
66
  }
61
67
  }
@@ -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{--_list-item-leading-video-height: var(--md-list-item-video-list-item-leading-video-height, 64px);--_list-item-leading-video-width: var(--md-list-item-video-list-item-leading-video-width, 114px);--_list-item-leading-video-shape: var(--md-list-item-video-list-item-leading-video-shape, 0px);display:inline-flex}.md3-list-item__video{display:inline-flex;margin-block-end:12px;margin-block-start:12px;object-fit:cover;height:var(--_list-item-leading-video-height);width:var(--_list-item-leading-video-width);border-radius:var(--_list-item-leading-video-shape)}/*# sourceMappingURL=list-item-video-styles.css.map */
7
+ export const styles = css `:host{--_list-item-small-leading-video-height: var(--md-list-item-video-list-item-small-leading-video-height, 56px);--_list-item-large-leading-video-height: var(--md-list-item-video-list-item-large-leading-video-height, 69px);--_list-item-leading-video-width: var(--md-list-item-video-list-item-leading-video-width, 100px);--_list-item-leading-video-shape: var(--md-list-item-video-list-item-leading-video-shape, 0px);display:inline-flex}.md3-list-item__video{display:inline-flex;margin-block-end:12px;margin-block-start:12px;object-fit:cover;height:var(--_list-item-small-leading-video-height);width:var(--_list-item-leading-video-width);border-radius:var(--_list-item-leading-video-shape)}.md3-list-item__video.large{height:var(--_list-item-large-leading-video-height)}/*# sourceMappingURL=list-item-video-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=list-item-video-styles.css.js.map