@material/web 1.0.0-pre.14 → 1.0.0-pre.15

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 (258) hide show
  1. package/README.md +5 -5
  2. package/all.d.ts +4 -8
  3. package/all.js +4 -8
  4. package/all.js.map +1 -1
  5. package/button/{_tonal-button.scss → _filled-tonal-button.scss} +1 -1
  6. package/button/{tonal-button.d.ts → filled-tonal-button.d.ts} +3 -3
  7. package/button/{tonal-button.js → filled-tonal-button.js} +9 -9
  8. package/button/filled-tonal-button.js.map +1 -0
  9. package/button/internal/{_tonal-button.scss → _filled-tonal-button.scss} +7 -7
  10. package/button/internal/_shared.scss +12 -7
  11. package/button/internal/_touch-target.scss +5 -1
  12. package/button/internal/button.d.ts +6 -10
  13. package/button/internal/button.js +10 -43
  14. package/button/internal/button.js.map +1 -1
  15. package/button/internal/elevated-styles.css.js +1 -1
  16. package/button/internal/elevated-styles.css.js.map +1 -1
  17. package/button/internal/filled-styles.css.js +1 -1
  18. package/button/internal/filled-styles.css.js.map +1 -1
  19. package/button/internal/{tonal-button.d.ts → filled-tonal-button.d.ts} +2 -2
  20. package/button/internal/{tonal-button.js → filled-tonal-button.js} +3 -3
  21. package/button/internal/filled-tonal-button.js.map +1 -0
  22. package/button/internal/filled-tonal-styles.css.js +9 -0
  23. package/button/internal/filled-tonal-styles.css.js.map +1 -0
  24. package/button/internal/{tonal-styles.scss → filled-tonal-styles.scss} +2 -2
  25. package/button/internal/outlined-styles.css.js +1 -1
  26. package/button/internal/outlined-styles.css.js.map +1 -1
  27. package/button/internal/shared-styles.css.js +1 -1
  28. package/button/internal/shared-styles.css.js.map +1 -1
  29. package/button/internal/text-styles.css.js +1 -1
  30. package/button/internal/text-styles.css.js.map +1 -1
  31. package/checkbox/internal/_checkbox.scss +22 -78
  32. package/checkbox/internal/checkbox-styles.css.js +1 -1
  33. package/checkbox/internal/checkbox-styles.css.js.map +1 -1
  34. package/checkbox/internal/checkbox.d.ts +77 -6
  35. package/checkbox/internal/checkbox.js +123 -14
  36. package/checkbox/internal/checkbox.js.map +1 -1
  37. package/chips/internal/_shared.scss +8 -0
  38. package/chips/internal/chip-set.js +1 -3
  39. package/chips/internal/chip-set.js.map +1 -1
  40. package/chips/internal/chip.js +1 -3
  41. package/chips/internal/chip.js.map +1 -1
  42. package/chips/internal/filter-chip.d.ts +1 -0
  43. package/chips/internal/filter-chip.js +12 -6
  44. package/chips/internal/filter-chip.js.map +1 -1
  45. package/chips/internal/shared-styles.css.js +1 -1
  46. package/chips/internal/shared-styles.css.js.map +1 -1
  47. package/common.d.ts +2 -6
  48. package/common.js +2 -6
  49. package/common.js.map +1 -1
  50. package/dialog/harness.d.ts +1 -6
  51. package/dialog/harness.js +2 -43
  52. package/dialog/harness.js.map +1 -1
  53. package/dialog/internal/_dialog.scss +165 -281
  54. package/dialog/internal/animations.d.ts +47 -0
  55. package/dialog/internal/animations.js +117 -0
  56. package/dialog/internal/animations.js.map +1 -0
  57. package/dialog/internal/dialog-styles.css.js +1 -1
  58. package/dialog/internal/dialog-styles.css.js.map +1 -1
  59. package/dialog/internal/dialog.d.ts +76 -169
  60. package/dialog/internal/dialog.js +251 -475
  61. package/dialog/internal/dialog.js.map +1 -1
  62. package/fab/internal/_fab.scss +4 -0
  63. package/fab/internal/_shared.scss +12 -0
  64. package/fab/internal/fab-styles.css.js +1 -1
  65. package/fab/internal/fab-styles.css.js.map +1 -1
  66. package/fab/internal/shared-styles.css.js +1 -1
  67. package/fab/internal/shared-styles.css.js.map +1 -1
  68. package/fab/internal/shared.d.ts +0 -4
  69. package/fab/internal/shared.js +3 -13
  70. package/fab/internal/shared.js.map +1 -1
  71. package/focus/internal/_focus-ring.scss +52 -48
  72. package/focus/internal/focus-ring-styles.css.js +1 -1
  73. package/focus/internal/focus-ring-styles.css.js.map +1 -1
  74. package/focus/internal/focus-ring.d.ts +2 -1
  75. package/focus/internal/focus-ring.js +10 -0
  76. package/focus/internal/focus-ring.js.map +1 -1
  77. package/icon/internal/_icon.scss +18 -17
  78. package/icon/internal/icon-styles.css.js +1 -1
  79. package/icon/internal/icon-styles.css.js.map +1 -1
  80. package/icon/internal/icon.d.ts +1 -0
  81. package/icon/internal/icon.js +9 -0
  82. package/icon/internal/icon.js.map +1 -1
  83. package/iconbutton/{_standard-icon-button.scss → _icon-button.scss} +1 -1
  84. package/iconbutton/{standard-icon-button.d.ts → icon-button.d.ts} +2 -2
  85. package/iconbutton/{standard-icon-button.js → icon-button.js} +7 -7
  86. package/iconbutton/icon-button.js.map +1 -0
  87. package/iconbutton/internal/_filled-icon-button.scss +8 -6
  88. package/iconbutton/internal/_filled-tonal-icon-button.scss +8 -6
  89. package/iconbutton/internal/{_standard-icon-button.scss → _icon-button.scss} +8 -8
  90. package/iconbutton/internal/_outlined-icon-button.scss +14 -14
  91. package/iconbutton/internal/_shared.scss +6 -9
  92. package/iconbutton/internal/filled-styles.css.js +1 -1
  93. package/iconbutton/internal/filled-styles.css.js.map +1 -1
  94. package/iconbutton/internal/filled-tonal-styles.css.js +1 -1
  95. package/iconbutton/internal/filled-tonal-styles.css.js.map +1 -1
  96. package/iconbutton/internal/icon-button.d.ts +10 -1
  97. package/iconbutton/internal/icon-button.js +17 -2
  98. package/iconbutton/internal/icon-button.js.map +1 -1
  99. package/iconbutton/internal/outlined-styles.css.js +1 -1
  100. package/iconbutton/internal/outlined-styles.css.js.map +1 -1
  101. package/iconbutton/internal/shared-styles.css.js +1 -1
  102. package/iconbutton/internal/shared-styles.css.js.map +1 -1
  103. package/iconbutton/internal/standard-styles.css.js +1 -1
  104. package/iconbutton/internal/standard-styles.css.js.map +1 -1
  105. package/iconbutton/internal/standard-styles.scss +2 -2
  106. package/internal/aria/delegate.d.ts +1 -1
  107. package/internal/aria/delegate.js +1 -1
  108. package/internal/aria/delegate.js.map +1 -1
  109. package/internal/controller/element-internals.d.ts +35 -0
  110. package/internal/controller/element-internals.js +24 -0
  111. package/internal/controller/element-internals.js.map +1 -0
  112. package/internal/controller/form-submitter.d.ts +60 -0
  113. package/internal/controller/form-submitter.js +69 -0
  114. package/internal/controller/form-submitter.js.map +1 -0
  115. package/labs/navigationbar/internal/navigation-bar.js +1 -3
  116. package/labs/navigationbar/internal/navigation-bar.js.map +1 -1
  117. package/labs/navigationdrawer/internal/navigation-drawer-modal.js +1 -3
  118. package/labs/navigationdrawer/internal/navigation-drawer-modal.js.map +1 -1
  119. package/labs/navigationdrawer/internal/navigation-drawer.js +1 -3
  120. package/labs/navigationdrawer/internal/navigation-drawer.js.map +1 -1
  121. package/labs/navigationtab/internal/navigation-tab.js +1 -3
  122. package/labs/navigationtab/internal/navigation-tab.js.map +1 -1
  123. package/labs/segmentedbutton/internal/outlined-styles.css.js +1 -1
  124. package/labs/segmentedbutton/internal/outlined-styles.css.js.map +1 -1
  125. package/labs/segmentedbutton/internal/segmented-button.js +1 -3
  126. package/labs/segmentedbutton/internal/segmented-button.js.map +1 -1
  127. package/labs/segmentedbuttonset/internal/outlined-styles.css.js +1 -1
  128. package/labs/segmentedbuttonset/internal/outlined-styles.css.js.map +1 -1
  129. package/labs/segmentedbuttonset/internal/segmented-button-set.js +1 -3
  130. package/labs/segmentedbuttonset/internal/segmented-button-set.js.map +1 -1
  131. package/list/internal/list.d.ts +2 -2
  132. package/list/internal/list.js +1 -3
  133. package/list/internal/list.js.map +1 -1
  134. package/list/internal/listitem/_list-item.scss +20 -54
  135. package/list/internal/listitem/list-item-styles.css.js +1 -1
  136. package/list/internal/listitem/list-item-styles.css.js.map +1 -1
  137. package/list/internal/listitem/list-item.d.ts +15 -3
  138. package/list/internal/listitem/list-item.js +43 -10
  139. package/list/internal/listitem/list-item.js.map +1 -1
  140. package/menu/internal/menu.js +3 -4
  141. package/menu/internal/menu.js.map +1 -1
  142. package/menu/internal/menuitem/_menu-item.scss +1 -1
  143. package/menu/internal/menuitem/forced-colors-styles.css.js +1 -1
  144. package/menu/internal/menuitem/forced-colors-styles.css.js.map +1 -1
  145. package/menu/internal/menuitem/forced-colors-styles.scss +1 -1
  146. package/menu/internal/menuitem/menu-item-styles.css.js +1 -1
  147. package/menu/internal/menuitem/menu-item-styles.css.js.map +1 -1
  148. package/menu/internal/menuitem/menu-item.d.ts +9 -0
  149. package/menu/internal/menuitem/menu-item.js +18 -4
  150. package/menu/internal/menuitem/menu-item.js.map +1 -1
  151. package/menu/internal/shared.d.ts +45 -38
  152. package/menu/internal/shared.js +29 -40
  153. package/menu/internal/shared.js.map +1 -1
  154. package/menu/internal/submenuitem/sub-menu-item.d.ts +22 -12
  155. package/menu/internal/submenuitem/sub-menu-item.js +39 -24
  156. package/menu/internal/submenuitem/sub-menu-item.js.map +1 -1
  157. package/menu/menu-item.d.ts +1 -1
  158. package/menu/menu-item.js +0 -1
  159. package/menu/menu-item.js.map +1 -1
  160. package/menu/menu.d.ts +1 -1
  161. package/menu/menu.js +0 -1
  162. package/menu/menu.js.map +1 -1
  163. package/menu/sub-menu-item.d.ts +1 -1
  164. package/menu/sub-menu-item.js +0 -1
  165. package/menu/sub-menu-item.js.map +1 -1
  166. package/package.json +1 -3
  167. package/progress/internal/progress.js +1 -3
  168. package/progress/internal/progress.js.map +1 -1
  169. package/radio/internal/_radio.scss +38 -24
  170. package/radio/internal/forced-colors-styles.css.js +1 -1
  171. package/radio/internal/forced-colors-styles.css.js.map +1 -1
  172. package/radio/internal/forced-colors-styles.scss +4 -4
  173. package/radio/internal/radio-styles.css.js +1 -1
  174. package/radio/internal/radio-styles.css.js.map +1 -1
  175. package/radio/internal/radio.js +7 -6
  176. package/radio/internal/radio.js.map +1 -1
  177. package/select/internal/_filled-select.scss +2 -2
  178. package/select/internal/_outlined-select.scss +2 -2
  179. package/select/internal/_shared.scss +30 -0
  180. package/select/internal/filled-select-styles.css.js +1 -1
  181. package/select/internal/filled-select-styles.css.js.map +1 -1
  182. package/select/internal/outlined-select-styles.css.js +1 -1
  183. package/select/internal/outlined-select-styles.css.js.map +1 -1
  184. package/select/internal/select.d.ts +0 -5
  185. package/select/internal/select.js +11 -16
  186. package/select/internal/select.js.map +1 -1
  187. package/select/internal/selectoption/select-option.d.ts +5 -6
  188. package/select/internal/selectoption/select-option.js +8 -9
  189. package/select/internal/selectoption/select-option.js.map +1 -1
  190. package/select/internal/shared-styles.css.js +1 -1
  191. package/select/internal/shared-styles.css.js.map +1 -1
  192. package/select/internal/shared.d.ts +5 -9
  193. package/select/internal/shared.js +13 -11
  194. package/select/internal/shared.js.map +1 -1
  195. package/slider/internal/slider.js +1 -3
  196. package/slider/internal/slider.js.map +1 -1
  197. package/switch/internal/_handle.scss +12 -12
  198. package/switch/internal/_icon.scss +8 -8
  199. package/switch/internal/_track.scss +10 -10
  200. package/switch/internal/forced-colors-styles.css.js +1 -1
  201. package/switch/internal/forced-colors-styles.css.js.map +1 -1
  202. package/switch/internal/forced-colors-styles.scss +12 -12
  203. package/switch/internal/switch-styles.css.js +1 -1
  204. package/switch/internal/switch-styles.css.js.map +1 -1
  205. package/switch/internal/switch.js +1 -3
  206. package/switch/internal/switch.js.map +1 -1
  207. package/tabs/internal/_tab.scss +1 -1
  208. package/tabs/internal/_tabs.scss +1 -0
  209. package/tabs/internal/tab.d.ts +3 -9
  210. package/tabs/internal/tab.js +4 -7
  211. package/tabs/internal/tab.js.map +1 -1
  212. package/tabs/internal/tabs.d.ts +1 -4
  213. package/tabs/internal/tabs.js +5 -10
  214. package/tabs/internal/tabs.js.map +1 -1
  215. package/textfield/harness.js +4 -0
  216. package/textfield/harness.js.map +1 -1
  217. package/textfield/internal/text-field.js +1 -4
  218. package/textfield/internal/text-field.js.map +1 -1
  219. package/tokens/_index.scss +1 -0
  220. package/tokens/_md-comp-checkbox.scss +16 -16
  221. package/tokens/_md-comp-dialog.scss +2 -1
  222. package/tokens/_md-comp-elevated-button.scss +14 -12
  223. package/tokens/_md-comp-filled-button.scss +14 -12
  224. package/tokens/_md-comp-filled-icon-button.scss +23 -8
  225. package/tokens/_md-comp-filled-select.scss +19 -1
  226. package/tokens/_md-comp-filled-tonal-button.scss +14 -12
  227. package/tokens/_md-comp-filled-tonal-icon-button.scss +23 -8
  228. package/tokens/_md-comp-icon-button.scss +24 -11
  229. package/tokens/_md-comp-icon.scss +32 -0
  230. package/tokens/_md-comp-outlined-button.scss +14 -12
  231. package/tokens/_md-comp-outlined-icon-button.scss +26 -12
  232. package/tokens/_md-comp-outlined-segmented-button.scss +2 -2
  233. package/tokens/_md-comp-radio-button.scss +20 -9
  234. package/tokens/_md-comp-switch.scss +66 -32
  235. package/tokens/_md-comp-text-button.scss +14 -12
  236. package/button/internal/tonal-button.js.map +0 -1
  237. package/button/internal/tonal-styles.css.js +0 -9
  238. package/button/internal/tonal-styles.css.js.map +0 -1
  239. package/button/tonal-button.js.map +0 -1
  240. package/dialog/internal/_tokens.scss +0 -66
  241. package/icon/internal/_md-comp-icon.scss +0 -18
  242. package/iconbutton/standard-icon-button.js.map +0 -1
  243. package/list/internal/listitemlink/list-item-link-only.d.ts +0 -23
  244. package/list/internal/listitemlink/list-item-link-only.js +0 -36
  245. package/list/internal/listitemlink/list-item-link-only.js.map +0 -1
  246. package/list/internal/listitemlink/list-item-link.d.ts +0 -18
  247. package/list/internal/listitemlink/list-item-link.js +0 -42
  248. package/list/internal/listitemlink/list-item-link.js.map +0 -1
  249. package/list/list-item-link.d.ts +0 -53
  250. package/list/list-item-link.js +0 -57
  251. package/list/list-item-link.js.map +0 -1
  252. package/menu/internal/menuitemlink/menu-item-link.d.ts +0 -23
  253. package/menu/internal/menuitemlink/menu-item-link.js +0 -49
  254. package/menu/internal/menuitemlink/menu-item-link.js.map +0 -1
  255. package/menu/menu-item-link.d.ts +0 -33
  256. package/menu/menu-item-link.js +0 -38
  257. package/menu/menu-item-link.js.map +0 -1
  258. /package/button/internal/{tonal-styles.css.d.ts → filled-tonal-styles.css.d.ts} +0 -0
@@ -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-container-color: var(--md-list-item-list-item-container-color, var(--md-sys-color-surface, #fef7ff));--_list-item-container-shape: var(--md-list-item-list-item-container-shape, 0px);--_list-item-disabled-label-text-color: var(--md-list-item-list-item-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-label-text-opacity: var(--md-list-item-list-item-disabled-label-text-opacity, 0.3);--_list-item-disabled-leading-icon-color: var(--md-list-item-list-item-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-leading-icon-opacity: var(--md-list-item-list-item-disabled-leading-icon-opacity, 0.38);--_list-item-disabled-trailing-icon-color: var(--md-list-item-list-item-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-trailing-icon-opacity: var(--md-list-item-list-item-disabled-trailing-icon-opacity, 0.38);--_list-item-focus-label-text-color: var(--md-list-item-list-item-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-focus-leading-icon-icon-color: var(--md-list-item-list-item-focus-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-focus-trailing-icon-icon-color: var(--md-list-item-list-item-focus-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-label-text-color: var(--md-list-item-list-item-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-leading-icon-icon-color: var(--md-list-item-list-item-hover-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-state-layer-color: var(--md-list-item-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-state-layer-opacity: var(--md-list-item-list-item-hover-state-layer-opacity, 0.08);--_list-item-hover-trailing-icon-icon-color: var(--md-list-item-list-item-hover-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-label-text-color: var(--md-list-item-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-label-text-line-height: var(--md-list-item-list-item-label-text-line-height, 1.5rem);--_list-item-label-text-type: var(--md-list-item-list-item-label-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-large-leading-video-height: var(--md-list-item-list-item-large-leading-video-height, 69px);--_list-item-leading-avatar-label-color: var(--md-list-item-list-item-leading-avatar-label-color, var(--md-sys-color-on-primary-container, #21005d));--_list-item-leading-avatar-label-type: var(--md-list-item-list-item-leading-avatar-label-type, var(--md-sys-typescale-title-medium, 500 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-leading-avatar-color: var(--md-list-item-list-item-leading-avatar-color, var(--md-sys-color-primary-container, #eaddff));--_list-item-leading-avatar-shape: var(--md-list-item-list-item-leading-avatar-shape, 9999px);--_list-item-leading-avatar-size: var(--md-list-item-list-item-leading-avatar-size, 40px);--_list-item-leading-icon-color: var(--md-list-item-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-leading-icon-size: var(--md-list-item-list-item-leading-icon-size, 18px);--_list-item-leading-image-height: var(--md-list-item-list-item-leading-image-height, 56px);--_list-item-leading-image-shape: var(--md-list-item-list-item-leading-image-shape, 0px);--_list-item-leading-image-width: var(--md-list-item-list-item-leading-image-width, 56px);--_list-item-leading-video-shape: var(--md-list-item-list-item-leading-video-shape, 0px);--_list-item-leading-video-width: var(--md-list-item-list-item-leading-video-width, 100px);--_list-item-one-line-container-height: var(--md-list-item-list-item-one-line-container-height, 56px);--_list-item-pressed-label-text-color: var(--md-list-item-list-item-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-leading-icon-icon-color: var(--md-list-item-list-item-pressed-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-pressed-state-layer-color: var(--md-list-item-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-state-layer-opacity: var(--md-list-item-list-item-pressed-state-layer-opacity, 0.12);--_list-item-pressed-trailing-icon-icon-color: var(--md-list-item-list-item-pressed-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-small-leading-video-height: var(--md-list-item-list-item-small-leading-video-height, 56px);--_list-item-supporting-text-color: var(--md-list-item-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-supporting-text-type: var(--md-list-item-list-item-supporting-text-type, var(--md-sys-typescale-body-medium, 400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto)));--_list-item-three-line-container-height: var(--md-list-item-list-item-three-line-container-height, 88px);--_list-item-trailing-icon-color: var(--md-list-item-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-icon-size: var(--md-list-item-list-item-trailing-icon-size, 24px);--_list-item-trailing-supporting-text-color: var(--md-list-item-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-supporting-text-line-height: var(--md-list-item-list-item-trailing-supporting-text-line-height, 1rem);--_list-item-trailing-supporting-text-type: var(--md-list-item-list-item-trailing-supporting-text-type, var(--md-sys-typescale-label-small, 500 0.688rem / 1rem var(--md-ref-typeface-plain, Roboto)));--_list-item-two-line-container-height: var(--md-list-item-list-item-two-line-container-height, 72px);--_list-item-leading-element-leading-space: var(--md-list-item-list-item-leading-element-leading-space, 16px);--_list-item-leading-space: var(--md-list-item-list-item-leading-space, 16px);--_list-item-leading-video-leading-space: var(--md-list-item-list-item-leading-video-leading-space, 0px);--_list-item-trailing-element-headline-trailing-element-space: var(--md-list-item-list-item-trailing-element-headline-trailing-element-space, 16px);--_list-item-trailing-space: var(--md-list-item-list-item-trailing-space, 24px)}:host{color:unset;--md-ripple-hover-color: var(--_list-item-hover-state-layer-color);--md-ripple-hover-opacity: var(--_list-item-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_list-item-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_list-item-pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape: 8px}.list-item{align-items:center;box-sizing:border-box;display:flex;outline:none;position:relative;width:100%;text-decoration:none;background-color:var(--_list-item-container-color);border-radius:var(--_list-item-container-shape);-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled):not(.noninteractive){cursor:pointer}.list-item.disabled{pointer-events:none}.content-wrapper{display:flex;width:100%;box-sizing:border-box;border-radius:inherit;padding-inline-end:var(--_list-item-trailing-space)}md-ripple{border-radius:inherit}.with-one-line{min-height:var(--_list-item-one-line-container-height)}.with-two-line{min-height:var(--_list-item-two-line-container-height)}.with-three-line{min-height:var(--_list-item-three-line-container-height)}.start{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;flex:0 0 auto;z-index:1}.with-three-line .start{justify-content:start}slot[name=start]::slotted([data-variant=icon]),slot[name=start]::slotted([data-variant=image]),slot[name=start]::slotted([data-variant=avatar]){margin-inline-start:var(--_list-item-leading-element-leading-space)}.body{display:inline-flex;justify-content:center;flex-direction:column;box-sizing:border-box;flex:1 0 0;padding-inline-start:var(--_list-item-leading-space);z-index:1}.end{display:inline-flex;flex-direction:column;justify-content:center;flex:0 0 auto;z-index:1}.with-three-line .end{justify-content:start}slot[name=end]::slotted(*),.trailing-supporting-text{margin-inline-start:var(--_list-item-trailing-element-headline-trailing-element-space)}.label-text{display:flex;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;color:var(--_list-item-label-text-color);font:var(--_list-item-label-text-type)}:hover .label-text{color:var(--_list-item-hover-label-text-color)}:focus .label-text{color:var(--_list-item-focus-label-text-color)}:active .label-text{color:var(--_list-item-pressed-label-text-color)}.disabled .label-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text{text-overflow:ellipsis;white-space:normal;overflow:hidden;width:100%;color:var(--_list-item-supporting-text-color);font:var(--_list-item-supporting-text-type);-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box}.disabled .supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text--multi-line{-webkit-line-clamp:2}.trailing-supporting-text{padding-inline-start:16px;font:var(--_list-item-trailing-supporting-text-type)}.list-item:not(.disabled) .trailing-supporting-text{color:var(--_list-item-trailing-supporting-text-color)}.disabled .trailing-supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.with-three-line .trailing-supporting-text{padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-supporting-text-line-height))/2)}.focus-ring{z-index:1}::slotted([data-variant=image]){display:inline-flex;height:var(--_list-item-leading-image-height);width:var(--_list-item-leading-image-width);border-radius:var(--_list-item-leading-image-shape);padding-block:calc((var(--_list-item-two-line-container-height) - var(--_list-item-leading-image-height))/2)}.with-three-line ::slotted([data-variant=image]){padding-block:0}slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-leading-icon-color);--md-icon-size:var(--_list-item-leading-icon-size)}.with-three-line slot[name=start]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-leading-icon-size))/2)}slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-trailing-icon-color);--md-icon-size:var(--_list-item-trailing-icon-size)}.with-three-line slot[name=end]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-icon-size))/2)}:hover slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-hover-leading-icon-icon-color)}:hover slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-hover-trailing-icon-icon-color)}:focus slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-focus-leading-icon-icon-color)}:focus slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-focus-trailing-icon-icon-color)}:active slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-pressed-leading-icon-icon-color)}:active slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-pressed-trailing-icon-icon-color)}.disabled slot[name=start]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-leading-icon-opacity);--md-icon-color:var(--_list-item-disabled-leading-icon-color)}.disabled slot[name=end]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-trailing-icon-opacity);--md-icon-color:var(--_list-item-disabled-trailing-icon-color)}::slotted([data-variant=avatar]){display:inline-flex;justify-content:center;align-items:center;background-color:var(--_list-item-leading-avatar-color);height:var(--_list-item-leading-avatar-size);width:var(--_list-item-leading-avatar-size);border-radius:var(--_list-item-leading-avatar-shape);color:var(--_list-item-leading-avatar-label-color);font:var(--_list-item-leading-avatar-label-type)}::slotted([data-variant=video]),::slotted([data-variant=video-large]){display:inline-flex;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);margin-inline-start:var(--_list-item-leading-video-leading-space);padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-small-leading-video-height))/2)}.with-three-line ::slotted([data-variant=video]),.with-three-line ::slotted([data-variant=video-large]){padding-block:0}::slotted([data-variant=video-large]){padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-large-leading-video-height))/2);height:var(--_list-item-large-leading-video-height)}/*# sourceMappingURL=list-item-styles.css.map */
7
+ export const styles = css `:host{--_list-item-container-color: var(--md-list-item-list-item-container-color, var(--md-sys-color-surface, #fef7ff));--_list-item-container-shape: var(--md-list-item-list-item-container-shape, 0px);--_list-item-disabled-label-text-color: var(--md-list-item-list-item-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-label-text-opacity: var(--md-list-item-list-item-disabled-label-text-opacity, 0.3);--_list-item-disabled-leading-icon-color: var(--md-list-item-list-item-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-leading-icon-opacity: var(--md-list-item-list-item-disabled-leading-icon-opacity, 0.38);--_list-item-disabled-trailing-icon-color: var(--md-list-item-list-item-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-trailing-icon-opacity: var(--md-list-item-list-item-disabled-trailing-icon-opacity, 0.38);--_list-item-focus-label-text-color: var(--md-list-item-list-item-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-focus-leading-icon-icon-color: var(--md-list-item-list-item-focus-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-focus-trailing-icon-icon-color: var(--md-list-item-list-item-focus-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-label-text-color: var(--md-list-item-list-item-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-leading-icon-icon-color: var(--md-list-item-list-item-hover-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-state-layer-color: var(--md-list-item-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-state-layer-opacity: var(--md-list-item-list-item-hover-state-layer-opacity, 0.08);--_list-item-hover-trailing-icon-icon-color: var(--md-list-item-list-item-hover-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-label-text-color: var(--md-list-item-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-label-text-line-height: var(--md-list-item-list-item-label-text-line-height, 1.5rem);--_list-item-label-text-type: var(--md-list-item-list-item-label-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-large-leading-video-height: var(--md-list-item-list-item-large-leading-video-height, 69px);--_list-item-leading-avatar-label-color: var(--md-list-item-list-item-leading-avatar-label-color, var(--md-sys-color-on-primary-container, #21005d));--_list-item-leading-avatar-label-type: var(--md-list-item-list-item-leading-avatar-label-type, var(--md-sys-typescale-title-medium, 500 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-leading-avatar-color: var(--md-list-item-list-item-leading-avatar-color, var(--md-sys-color-primary-container, #eaddff));--_list-item-leading-avatar-shape: var(--md-list-item-list-item-leading-avatar-shape, 9999px);--_list-item-leading-avatar-size: var(--md-list-item-list-item-leading-avatar-size, 40px);--_list-item-leading-icon-color: var(--md-list-item-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-leading-icon-size: var(--md-list-item-list-item-leading-icon-size, 18px);--_list-item-leading-image-height: var(--md-list-item-list-item-leading-image-height, 56px);--_list-item-leading-image-shape: var(--md-list-item-list-item-leading-image-shape, 0px);--_list-item-leading-image-width: var(--md-list-item-list-item-leading-image-width, 56px);--_list-item-leading-video-shape: var(--md-list-item-list-item-leading-video-shape, 0px);--_list-item-leading-video-width: var(--md-list-item-list-item-leading-video-width, 100px);--_list-item-one-line-container-height: var(--md-list-item-list-item-one-line-container-height, 56px);--_list-item-pressed-label-text-color: var(--md-list-item-list-item-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-leading-icon-icon-color: var(--md-list-item-list-item-pressed-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-pressed-state-layer-color: var(--md-list-item-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-state-layer-opacity: var(--md-list-item-list-item-pressed-state-layer-opacity, 0.12);--_list-item-pressed-trailing-icon-icon-color: var(--md-list-item-list-item-pressed-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-small-leading-video-height: var(--md-list-item-list-item-small-leading-video-height, 56px);--_list-item-supporting-text-color: var(--md-list-item-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-supporting-text-type: var(--md-list-item-list-item-supporting-text-type, var(--md-sys-typescale-body-medium, 400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto)));--_list-item-three-line-container-height: var(--md-list-item-list-item-three-line-container-height, 88px);--_list-item-trailing-icon-color: var(--md-list-item-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-icon-size: var(--md-list-item-list-item-trailing-icon-size, 24px);--_list-item-trailing-supporting-text-color: var(--md-list-item-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-supporting-text-line-height: var(--md-list-item-list-item-trailing-supporting-text-line-height, 1rem);--_list-item-trailing-supporting-text-type: var(--md-list-item-list-item-trailing-supporting-text-type, var(--md-sys-typescale-label-small, 500 0.688rem / 1rem var(--md-ref-typeface-plain, Roboto)));--_list-item-two-line-container-height: var(--md-list-item-list-item-two-line-container-height, 72px);--_list-item-leading-element-leading-space: var(--md-list-item-list-item-leading-element-leading-space, 16px);--_list-item-leading-space: var(--md-list-item-list-item-leading-space, 16px);--_list-item-leading-video-leading-space: var(--md-list-item-list-item-leading-video-leading-space, 0px);--_list-item-trailing-element-headline-trailing-element-space: var(--md-list-item-list-item-trailing-element-headline-trailing-element-space, 16px);--_list-item-trailing-space: var(--md-list-item-list-item-trailing-space, 24px)}:host{color:unset;--md-ripple-hover-color: var(--_list-item-hover-state-layer-color);--md-ripple-hover-opacity: var(--_list-item-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_list-item-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_list-item-pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape: 8px}.list-item{align-items:center;box-sizing:border-box;display:flex;outline:none;position:relative;width:100%;text-decoration:none;background-color:var(--_list-item-container-color);border-radius:var(--_list-item-container-shape);-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled):not(.noninteractive){cursor:pointer}.list-item.disabled{pointer-events:none}.content-wrapper{display:flex;width:100%;box-sizing:border-box;border-radius:inherit;padding-inline-end:var(--_list-item-trailing-space)}md-ripple{border-radius:inherit}.with-one-line{min-height:var(--_list-item-one-line-container-height)}.with-two-line{min-height:var(--_list-item-two-line-container-height)}.with-three-line{min-height:var(--_list-item-three-line-container-height)}.start{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;flex:0 0 auto;z-index:1}.with-three-line .start{justify-content:start}slot[name=start]::slotted([data-variant=icon]),slot[name=start]::slotted([data-variant=image]),slot[name=start]::slotted([data-variant=avatar]){margin-inline-start:var(--_list-item-leading-element-leading-space)}.body{display:inline-flex;justify-content:center;flex-direction:column;box-sizing:border-box;flex:1 0 0;padding-inline-start:var(--_list-item-leading-space);z-index:1}.end{display:inline-flex;flex-direction:column;justify-content:center;flex:0 0 auto;z-index:1}.with-three-line .end{justify-content:start}slot[name=end]::slotted(*),.trailing-supporting-text{margin-inline-start:var(--_list-item-trailing-element-headline-trailing-element-space)}.label-text{display:flex;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;color:var(--_list-item-label-text-color);font:var(--_list-item-label-text-type)}:hover .label-text{color:var(--_list-item-hover-label-text-color)}:focus .label-text{color:var(--_list-item-focus-label-text-color)}:active .label-text{color:var(--_list-item-pressed-label-text-color)}.disabled .label-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text{text-overflow:ellipsis;white-space:normal;overflow:hidden;width:100%;color:var(--_list-item-supporting-text-color);font:var(--_list-item-supporting-text-type);-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box}.disabled .supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text--multi-line{-webkit-line-clamp:2}.trailing-supporting-text{padding-inline-start:16px;font:var(--_list-item-trailing-supporting-text-type)}.list-item:not(.disabled) .trailing-supporting-text{color:var(--_list-item-trailing-supporting-text-color)}.disabled .trailing-supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.with-three-line .trailing-supporting-text{padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-supporting-text-line-height))/2)}.focus-ring{z-index:1}::slotted([data-variant=image]){display:inline-flex;height:var(--_list-item-leading-image-height);width:var(--_list-item-leading-image-width);border-radius:var(--_list-item-leading-image-shape);padding-block:calc((var(--_list-item-two-line-container-height) - var(--_list-item-leading-image-height))/2)}.with-three-line ::slotted([data-variant=image]){padding-block:0}::slotted(*){fill:currentColor}slot[name=start]::slotted([data-variant=icon]){font-size:var(--_list-item-leading-icon-size);width:var(--_list-item-leading-icon-size);height:var(--_list-item-leading-icon-size);color:var(--_list-item-leading-icon-color)}.with-three-line slot[name=start]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-leading-icon-size))/2)}slot[name=end]::slotted([data-variant=icon]){font-size:var(--_list-item-trailing-icon-size);width:var(--_list-item-trailing-icon-size);height:var(--_list-item-trailing-icon-size);color:var(--_list-item-trailing-icon-color)}.with-three-line slot[name=end]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-icon-size))/2)}:hover slot[name=start]::slotted([data-variant=icon]){color:var(--_list-item-hover-leading-icon-icon-color)}:hover slot[name=end]::slotted([data-variant=icon]){color:var(--_list-item-hover-trailing-icon-icon-color)}:focus slot[name=start]::slotted([data-variant=icon]){color:var(--_list-item-focus-leading-icon-icon-color)}:focus slot[name=end]::slotted([data-variant=icon]){color:var(--_list-item-focus-trailing-icon-icon-color)}:active slot[name=start]::slotted([data-variant=icon]){color:var(--_list-item-pressed-leading-icon-icon-color)}:active slot[name=end]::slotted([data-variant=icon]){color:var(--_list-item-pressed-trailing-icon-icon-color)}.disabled slot[name=start]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-leading-icon-opacity);color:var(--_list-item-disabled-leading-icon-color)}.disabled slot[name=end]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-trailing-icon-opacity);color:var(--_list-item-disabled-trailing-icon-color)}::slotted([data-variant=avatar]){display:inline-flex;justify-content:center;align-items:center;background-color:var(--_list-item-leading-avatar-color);height:var(--_list-item-leading-avatar-size);width:var(--_list-item-leading-avatar-size);border-radius:var(--_list-item-leading-avatar-shape);color:var(--_list-item-leading-avatar-label-color);font:var(--_list-item-leading-avatar-label-type)}::slotted([data-variant=video]),::slotted([data-variant=video-large]){display:inline-flex;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);margin-inline-start:var(--_list-item-leading-video-leading-space);padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-small-leading-video-height))/2)}.with-three-line ::slotted([data-variant=video]),.with-three-line ::slotted([data-variant=video-large]){padding-block:0}::slotted([data-variant=video-large]){padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-large-leading-video-height))/2);height:var(--_list-item-large-leading-video-height)}/*# sourceMappingURL=list-item-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=list-item-styles.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list-item-styles.css.js","sourceRoot":"","sources":["list-item-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_list-item-container-color: var(--md-list-item-list-item-container-color, var(--md-sys-color-surface, #fef7ff));--_list-item-container-shape: var(--md-list-item-list-item-container-shape, 0px);--_list-item-disabled-label-text-color: var(--md-list-item-list-item-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-label-text-opacity: var(--md-list-item-list-item-disabled-label-text-opacity, 0.3);--_list-item-disabled-leading-icon-color: var(--md-list-item-list-item-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-leading-icon-opacity: var(--md-list-item-list-item-disabled-leading-icon-opacity, 0.38);--_list-item-disabled-trailing-icon-color: var(--md-list-item-list-item-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-trailing-icon-opacity: var(--md-list-item-list-item-disabled-trailing-icon-opacity, 0.38);--_list-item-focus-label-text-color: var(--md-list-item-list-item-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-focus-leading-icon-icon-color: var(--md-list-item-list-item-focus-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-focus-trailing-icon-icon-color: var(--md-list-item-list-item-focus-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-label-text-color: var(--md-list-item-list-item-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-leading-icon-icon-color: var(--md-list-item-list-item-hover-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-state-layer-color: var(--md-list-item-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-state-layer-opacity: var(--md-list-item-list-item-hover-state-layer-opacity, 0.08);--_list-item-hover-trailing-icon-icon-color: var(--md-list-item-list-item-hover-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-label-text-color: var(--md-list-item-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-label-text-line-height: var(--md-list-item-list-item-label-text-line-height, 1.5rem);--_list-item-label-text-type: var(--md-list-item-list-item-label-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-large-leading-video-height: var(--md-list-item-list-item-large-leading-video-height, 69px);--_list-item-leading-avatar-label-color: var(--md-list-item-list-item-leading-avatar-label-color, var(--md-sys-color-on-primary-container, #21005d));--_list-item-leading-avatar-label-type: var(--md-list-item-list-item-leading-avatar-label-type, var(--md-sys-typescale-title-medium, 500 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-leading-avatar-color: var(--md-list-item-list-item-leading-avatar-color, var(--md-sys-color-primary-container, #eaddff));--_list-item-leading-avatar-shape: var(--md-list-item-list-item-leading-avatar-shape, 9999px);--_list-item-leading-avatar-size: var(--md-list-item-list-item-leading-avatar-size, 40px);--_list-item-leading-icon-color: var(--md-list-item-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-leading-icon-size: var(--md-list-item-list-item-leading-icon-size, 18px);--_list-item-leading-image-height: var(--md-list-item-list-item-leading-image-height, 56px);--_list-item-leading-image-shape: var(--md-list-item-list-item-leading-image-shape, 0px);--_list-item-leading-image-width: var(--md-list-item-list-item-leading-image-width, 56px);--_list-item-leading-video-shape: var(--md-list-item-list-item-leading-video-shape, 0px);--_list-item-leading-video-width: var(--md-list-item-list-item-leading-video-width, 100px);--_list-item-one-line-container-height: var(--md-list-item-list-item-one-line-container-height, 56px);--_list-item-pressed-label-text-color: var(--md-list-item-list-item-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-leading-icon-icon-color: var(--md-list-item-list-item-pressed-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-pressed-state-layer-color: var(--md-list-item-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-state-layer-opacity: var(--md-list-item-list-item-pressed-state-layer-opacity, 0.12);--_list-item-pressed-trailing-icon-icon-color: var(--md-list-item-list-item-pressed-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-small-leading-video-height: var(--md-list-item-list-item-small-leading-video-height, 56px);--_list-item-supporting-text-color: var(--md-list-item-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-supporting-text-type: var(--md-list-item-list-item-supporting-text-type, var(--md-sys-typescale-body-medium, 400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto)));--_list-item-three-line-container-height: var(--md-list-item-list-item-three-line-container-height, 88px);--_list-item-trailing-icon-color: var(--md-list-item-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-icon-size: var(--md-list-item-list-item-trailing-icon-size, 24px);--_list-item-trailing-supporting-text-color: var(--md-list-item-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-supporting-text-line-height: var(--md-list-item-list-item-trailing-supporting-text-line-height, 1rem);--_list-item-trailing-supporting-text-type: var(--md-list-item-list-item-trailing-supporting-text-type, var(--md-sys-typescale-label-small, 500 0.688rem / 1rem var(--md-ref-typeface-plain, Roboto)));--_list-item-two-line-container-height: var(--md-list-item-list-item-two-line-container-height, 72px);--_list-item-leading-element-leading-space: var(--md-list-item-list-item-leading-element-leading-space, 16px);--_list-item-leading-space: var(--md-list-item-list-item-leading-space, 16px);--_list-item-leading-video-leading-space: var(--md-list-item-list-item-leading-video-leading-space, 0px);--_list-item-trailing-element-headline-trailing-element-space: var(--md-list-item-list-item-trailing-element-headline-trailing-element-space, 16px);--_list-item-trailing-space: var(--md-list-item-list-item-trailing-space, 24px)}:host{color:unset;--md-ripple-hover-color: var(--_list-item-hover-state-layer-color);--md-ripple-hover-opacity: var(--_list-item-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_list-item-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_list-item-pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape: 8px}.list-item{align-items:center;box-sizing:border-box;display:flex;outline:none;position:relative;width:100%;text-decoration:none;background-color:var(--_list-item-container-color);border-radius:var(--_list-item-container-shape);-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled):not(.noninteractive){cursor:pointer}.list-item.disabled{pointer-events:none}.content-wrapper{display:flex;width:100%;box-sizing:border-box;border-radius:inherit;padding-inline-end:var(--_list-item-trailing-space)}md-ripple{border-radius:inherit}.with-one-line{min-height:var(--_list-item-one-line-container-height)}.with-two-line{min-height:var(--_list-item-two-line-container-height)}.with-three-line{min-height:var(--_list-item-three-line-container-height)}.start{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;flex:0 0 auto;z-index:1}.with-three-line .start{justify-content:start}slot[name=start]::slotted([data-variant=icon]),slot[name=start]::slotted([data-variant=image]),slot[name=start]::slotted([data-variant=avatar]){margin-inline-start:var(--_list-item-leading-element-leading-space)}.body{display:inline-flex;justify-content:center;flex-direction:column;box-sizing:border-box;flex:1 0 0;padding-inline-start:var(--_list-item-leading-space);z-index:1}.end{display:inline-flex;flex-direction:column;justify-content:center;flex:0 0 auto;z-index:1}.with-three-line .end{justify-content:start}slot[name=end]::slotted(*),.trailing-supporting-text{margin-inline-start:var(--_list-item-trailing-element-headline-trailing-element-space)}.label-text{display:flex;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;color:var(--_list-item-label-text-color);font:var(--_list-item-label-text-type)}:hover .label-text{color:var(--_list-item-hover-label-text-color)}:focus .label-text{color:var(--_list-item-focus-label-text-color)}:active .label-text{color:var(--_list-item-pressed-label-text-color)}.disabled .label-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text{text-overflow:ellipsis;white-space:normal;overflow:hidden;width:100%;color:var(--_list-item-supporting-text-color);font:var(--_list-item-supporting-text-type);-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box}.disabled .supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text--multi-line{-webkit-line-clamp:2}.trailing-supporting-text{padding-inline-start:16px;font:var(--_list-item-trailing-supporting-text-type)}.list-item:not(.disabled) .trailing-supporting-text{color:var(--_list-item-trailing-supporting-text-color)}.disabled .trailing-supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.with-three-line .trailing-supporting-text{padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-supporting-text-line-height))/2)}.focus-ring{z-index:1}::slotted([data-variant=image]){display:inline-flex;height:var(--_list-item-leading-image-height);width:var(--_list-item-leading-image-width);border-radius:var(--_list-item-leading-image-shape);padding-block:calc((var(--_list-item-two-line-container-height) - var(--_list-item-leading-image-height))/2)}.with-three-line ::slotted([data-variant=image]){padding-block:0}slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-leading-icon-color);--md-icon-size:var(--_list-item-leading-icon-size)}.with-three-line slot[name=start]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-leading-icon-size))/2)}slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-trailing-icon-color);--md-icon-size:var(--_list-item-trailing-icon-size)}.with-three-line slot[name=end]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-icon-size))/2)}:hover slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-hover-leading-icon-icon-color)}:hover slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-hover-trailing-icon-icon-color)}:focus slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-focus-leading-icon-icon-color)}:focus slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-focus-trailing-icon-icon-color)}:active slot[name=start]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-pressed-leading-icon-icon-color)}:active slot[name=end]::slotted([data-variant=icon]){--md-icon-color:var(--_list-item-pressed-trailing-icon-icon-color)}.disabled slot[name=start]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-leading-icon-opacity);--md-icon-color:var(--_list-item-disabled-leading-icon-color)}.disabled slot[name=end]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-trailing-icon-opacity);--md-icon-color:var(--_list-item-disabled-trailing-icon-color)}::slotted([data-variant=avatar]){display:inline-flex;justify-content:center;align-items:center;background-color:var(--_list-item-leading-avatar-color);height:var(--_list-item-leading-avatar-size);width:var(--_list-item-leading-avatar-size);border-radius:var(--_list-item-leading-avatar-shape);color:var(--_list-item-leading-avatar-label-color);font:var(--_list-item-leading-avatar-label-type)}::slotted([data-variant=video]),::slotted([data-variant=video-large]){display:inline-flex;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);margin-inline-start:var(--_list-item-leading-video-leading-space);padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-small-leading-video-height))/2)}.with-three-line ::slotted([data-variant=video]),.with-three-line ::slotted([data-variant=video-large]){padding-block:0}::slotted([data-variant=video-large]){padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-large-leading-video-height))/2);height:var(--_list-item-large-leading-video-height)}/*# sourceMappingURL=list-item-styles.css.map */\n`;\n "]}
1
+ {"version":3,"file":"list-item-styles.css.js","sourceRoot":"","sources":["list-item-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{--_list-item-container-color: var(--md-list-item-list-item-container-color, var(--md-sys-color-surface, #fef7ff));--_list-item-container-shape: var(--md-list-item-list-item-container-shape, 0px);--_list-item-disabled-label-text-color: var(--md-list-item-list-item-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-label-text-opacity: var(--md-list-item-list-item-disabled-label-text-opacity, 0.3);--_list-item-disabled-leading-icon-color: var(--md-list-item-list-item-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-leading-icon-opacity: var(--md-list-item-list-item-disabled-leading-icon-opacity, 0.38);--_list-item-disabled-trailing-icon-color: var(--md-list-item-list-item-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-disabled-trailing-icon-opacity: var(--md-list-item-list-item-disabled-trailing-icon-opacity, 0.38);--_list-item-focus-label-text-color: var(--md-list-item-list-item-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-focus-leading-icon-icon-color: var(--md-list-item-list-item-focus-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-focus-trailing-icon-icon-color: var(--md-list-item-list-item-focus-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-label-text-color: var(--md-list-item-list-item-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-leading-icon-icon-color: var(--md-list-item-list-item-hover-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-hover-state-layer-color: var(--md-list-item-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-hover-state-layer-opacity: var(--md-list-item-list-item-hover-state-layer-opacity, 0.08);--_list-item-hover-trailing-icon-icon-color: var(--md-list-item-list-item-hover-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-label-text-color: var(--md-list-item-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-label-text-line-height: var(--md-list-item-list-item-label-text-line-height, 1.5rem);--_list-item-label-text-type: var(--md-list-item-list-item-label-text-type, var(--md-sys-typescale-body-large, 400 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-large-leading-video-height: var(--md-list-item-list-item-large-leading-video-height, 69px);--_list-item-leading-avatar-label-color: var(--md-list-item-list-item-leading-avatar-label-color, var(--md-sys-color-on-primary-container, #21005d));--_list-item-leading-avatar-label-type: var(--md-list-item-list-item-leading-avatar-label-type, var(--md-sys-typescale-title-medium, 500 1rem / 1.5rem var(--md-ref-typeface-plain, Roboto)));--_list-item-leading-avatar-color: var(--md-list-item-list-item-leading-avatar-color, var(--md-sys-color-primary-container, #eaddff));--_list-item-leading-avatar-shape: var(--md-list-item-list-item-leading-avatar-shape, 9999px);--_list-item-leading-avatar-size: var(--md-list-item-list-item-leading-avatar-size, 40px);--_list-item-leading-icon-color: var(--md-list-item-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-leading-icon-size: var(--md-list-item-list-item-leading-icon-size, 18px);--_list-item-leading-image-height: var(--md-list-item-list-item-leading-image-height, 56px);--_list-item-leading-image-shape: var(--md-list-item-list-item-leading-image-shape, 0px);--_list-item-leading-image-width: var(--md-list-item-list-item-leading-image-width, 56px);--_list-item-leading-video-shape: var(--md-list-item-list-item-leading-video-shape, 0px);--_list-item-leading-video-width: var(--md-list-item-list-item-leading-video-width, 100px);--_list-item-one-line-container-height: var(--md-list-item-list-item-one-line-container-height, 56px);--_list-item-pressed-label-text-color: var(--md-list-item-list-item-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-leading-icon-icon-color: var(--md-list-item-list-item-pressed-leading-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-pressed-state-layer-color: var(--md-list-item-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_list-item-pressed-state-layer-opacity: var(--md-list-item-list-item-pressed-state-layer-opacity, 0.12);--_list-item-pressed-trailing-icon-icon-color: var(--md-list-item-list-item-pressed-trailing-icon-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-small-leading-video-height: var(--md-list-item-list-item-small-leading-video-height, 56px);--_list-item-supporting-text-color: var(--md-list-item-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-supporting-text-type: var(--md-list-item-list-item-supporting-text-type, var(--md-sys-typescale-body-medium, 400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto)));--_list-item-three-line-container-height: var(--md-list-item-list-item-three-line-container-height, 88px);--_list-item-trailing-icon-color: var(--md-list-item-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-icon-size: var(--md-list-item-list-item-trailing-icon-size, 24px);--_list-item-trailing-supporting-text-color: var(--md-list-item-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_list-item-trailing-supporting-text-line-height: var(--md-list-item-list-item-trailing-supporting-text-line-height, 1rem);--_list-item-trailing-supporting-text-type: var(--md-list-item-list-item-trailing-supporting-text-type, var(--md-sys-typescale-label-small, 500 0.688rem / 1rem var(--md-ref-typeface-plain, Roboto)));--_list-item-two-line-container-height: var(--md-list-item-list-item-two-line-container-height, 72px);--_list-item-leading-element-leading-space: var(--md-list-item-list-item-leading-element-leading-space, 16px);--_list-item-leading-space: var(--md-list-item-list-item-leading-space, 16px);--_list-item-leading-video-leading-space: var(--md-list-item-list-item-leading-video-leading-space, 0px);--_list-item-trailing-element-headline-trailing-element-space: var(--md-list-item-list-item-trailing-element-headline-trailing-element-space, 16px);--_list-item-trailing-space: var(--md-list-item-list-item-trailing-space, 24px)}:host{color:unset;--md-ripple-hover-color: var(--_list-item-hover-state-layer-color);--md-ripple-hover-opacity: var(--_list-item-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_list-item-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_list-item-pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape: 8px}.list-item{align-items:center;box-sizing:border-box;display:flex;outline:none;position:relative;width:100%;text-decoration:none;background-color:var(--_list-item-container-color);border-radius:var(--_list-item-container-shape);-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled):not(.noninteractive){cursor:pointer}.list-item.disabled{pointer-events:none}.content-wrapper{display:flex;width:100%;box-sizing:border-box;border-radius:inherit;padding-inline-end:var(--_list-item-trailing-space)}md-ripple{border-radius:inherit}.with-one-line{min-height:var(--_list-item-one-line-container-height)}.with-two-line{min-height:var(--_list-item-two-line-container-height)}.with-three-line{min-height:var(--_list-item-three-line-container-height)}.start{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;flex:0 0 auto;z-index:1}.with-three-line .start{justify-content:start}slot[name=start]::slotted([data-variant=icon]),slot[name=start]::slotted([data-variant=image]),slot[name=start]::slotted([data-variant=avatar]){margin-inline-start:var(--_list-item-leading-element-leading-space)}.body{display:inline-flex;justify-content:center;flex-direction:column;box-sizing:border-box;flex:1 0 0;padding-inline-start:var(--_list-item-leading-space);z-index:1}.end{display:inline-flex;flex-direction:column;justify-content:center;flex:0 0 auto;z-index:1}.with-three-line .end{justify-content:start}slot[name=end]::slotted(*),.trailing-supporting-text{margin-inline-start:var(--_list-item-trailing-element-headline-trailing-element-space)}.label-text{display:flex;text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;color:var(--_list-item-label-text-color);font:var(--_list-item-label-text-type)}:hover .label-text{color:var(--_list-item-hover-label-text-color)}:focus .label-text{color:var(--_list-item-focus-label-text-color)}:active .label-text{color:var(--_list-item-pressed-label-text-color)}.disabled .label-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text{text-overflow:ellipsis;white-space:normal;overflow:hidden;width:100%;color:var(--_list-item-supporting-text-color);font:var(--_list-item-supporting-text-type);-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box}.disabled .supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.supporting-text--multi-line{-webkit-line-clamp:2}.trailing-supporting-text{padding-inline-start:16px;font:var(--_list-item-trailing-supporting-text-type)}.list-item:not(.disabled) .trailing-supporting-text{color:var(--_list-item-trailing-supporting-text-color)}.disabled .trailing-supporting-text{color:var(--_list-item-disabled-label-text-color);opacity:var(--_list-item-disabled-label-text-opacity)}.with-three-line .trailing-supporting-text{padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-supporting-text-line-height))/2)}.focus-ring{z-index:1}::slotted([data-variant=image]){display:inline-flex;height:var(--_list-item-leading-image-height);width:var(--_list-item-leading-image-width);border-radius:var(--_list-item-leading-image-shape);padding-block:calc((var(--_list-item-two-line-container-height) - var(--_list-item-leading-image-height))/2)}.with-three-line ::slotted([data-variant=image]){padding-block:0}::slotted(*){fill:currentColor}slot[name=start]::slotted([data-variant=icon]){font-size:var(--_list-item-leading-icon-size);width:var(--_list-item-leading-icon-size);height:var(--_list-item-leading-icon-size);color:var(--_list-item-leading-icon-color)}.with-three-line slot[name=start]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-leading-icon-size))/2)}slot[name=end]::slotted([data-variant=icon]){font-size:var(--_list-item-trailing-icon-size);width:var(--_list-item-trailing-icon-size);height:var(--_list-item-trailing-icon-size);color:var(--_list-item-trailing-icon-color)}.with-three-line slot[name=end]::slotted([data-variant=icon]){padding-block-start:calc((var(--_list-item-label-text-line-height) - var(--_list-item-trailing-icon-size))/2)}:hover slot[name=start]::slotted([data-variant=icon]){color:var(--_list-item-hover-leading-icon-icon-color)}:hover slot[name=end]::slotted([data-variant=icon]){color:var(--_list-item-hover-trailing-icon-icon-color)}:focus slot[name=start]::slotted([data-variant=icon]){color:var(--_list-item-focus-leading-icon-icon-color)}:focus slot[name=end]::slotted([data-variant=icon]){color:var(--_list-item-focus-trailing-icon-icon-color)}:active slot[name=start]::slotted([data-variant=icon]){color:var(--_list-item-pressed-leading-icon-icon-color)}:active slot[name=end]::slotted([data-variant=icon]){color:var(--_list-item-pressed-trailing-icon-icon-color)}.disabled slot[name=start]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-leading-icon-opacity);color:var(--_list-item-disabled-leading-icon-color)}.disabled slot[name=end]::slotted([data-variant=icon]){opacity:var(--_list-item-disabled-trailing-icon-opacity);color:var(--_list-item-disabled-trailing-icon-color)}::slotted([data-variant=avatar]){display:inline-flex;justify-content:center;align-items:center;background-color:var(--_list-item-leading-avatar-color);height:var(--_list-item-leading-avatar-size);width:var(--_list-item-leading-avatar-size);border-radius:var(--_list-item-leading-avatar-shape);color:var(--_list-item-leading-avatar-label-color);font:var(--_list-item-leading-avatar-label-type)}::slotted([data-variant=video]),::slotted([data-variant=video-large]){display:inline-flex;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);margin-inline-start:var(--_list-item-leading-video-leading-space);padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-small-leading-video-height))/2)}.with-three-line ::slotted([data-variant=video]),.with-three-line ::slotted([data-variant=video-large]){padding-block:0}::slotted([data-variant=video-large]){padding-block:calc((var(--_list-item-three-line-container-height) - var(--_list-item-large-leading-video-height))/2);height:var(--_list-item-large-leading-video-height)}/*# sourceMappingURL=list-item-styles.css.map */\n`;\n "]}
@@ -57,13 +57,24 @@ export declare class ListItemEl extends LitElement implements ListItem {
57
57
  */
58
58
  active: boolean;
59
59
  /**
60
- * Sets the role of the list item. Set to '' to clear the role.
60
+ * Sets the role of the list item. Set to 'nothing' to clear the role. This
61
+ * property will be ignored if `href` is set since the underlying element will
62
+ * be a native anchor tag.
61
63
  */
62
64
  type: ListItemRole;
63
65
  /**
64
66
  * READONLY. Sets the `md-list-item` attribute on the element.
65
67
  */
66
68
  isListItem: boolean;
69
+ /**
70
+ * Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.
71
+ */
72
+ href: string;
73
+ /**
74
+ * Sets the underlying `HTMLAnchorElement`'s `target` attribute when `href` is
75
+ * set.
76
+ */
77
+ target: '_blank' | '_parent' | '_self' | '_top' | '';
67
78
  protected readonly listItemRoot: HTMLElement | null;
68
79
  /**
69
80
  * Only meant to be overridden by subclassing and not by the user. This is
@@ -73,13 +84,13 @@ export declare class ListItemEl extends LitElement implements ListItem {
73
84
  protected focusOnActivation: boolean;
74
85
  protected isFirstUpdate: boolean;
75
86
  protected willUpdate(changed: PropertyValues<this>): void;
76
- protected render(): TemplateResult<1>;
87
+ protected render(): TemplateResult<2 | 1>;
77
88
  /**
78
89
  * Renders the root list item.
79
90
  *
80
91
  * @param content the child content of the list item.
81
92
  */
82
- protected renderListItem(content: unknown): TemplateResult<1>;
93
+ protected renderListItem(content: unknown): TemplateResult<2 | 1>;
83
94
  /**
84
95
  * Handles rendering of the ripple element.
85
96
  */
@@ -88,6 +99,7 @@ export declare class ListItemEl extends LitElement implements ListItem {
88
99
  * Handles rendering of the focus ring.
89
100
  */
90
101
  protected renderFocusRing(): TemplateResult | typeof nothing;
102
+ protected onFocusRingVisibilityChanged(e: Event): void;
91
103
  /**
92
104
  * Classes applied to the list item root.
93
105
  */
@@ -3,13 +3,13 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- var _a;
7
6
  import { __decorate } from "tslib";
8
7
  import '../../../ripple/ripple.js';
9
8
  import '../../../focus/md-focus-ring.js';
10
9
  import { html, LitElement, nothing } from 'lit';
11
10
  import { property, query } from 'lit/decorators.js';
12
11
  import { classMap } from 'lit/directives/class-map.js';
12
+ import { html as staticHtml, literal } from 'lit/static-html.js';
13
13
  import { requestUpdateOnAriaChange } from '../../../internal/aria/delegate.js';
14
14
  // tslint:disable-next-line:enforce-comments-on-exported-symbols
15
15
  export class ListItemEl extends LitElement {
@@ -52,13 +52,24 @@ export class ListItemEl extends LitElement {
52
52
  */
53
53
  this.active = false;
54
54
  /**
55
- * Sets the role of the list item. Set to '' to clear the role.
55
+ * Sets the role of the list item. Set to 'nothing' to clear the role. This
56
+ * property will be ignored if `href` is set since the underlying element will
57
+ * be a native anchor tag.
56
58
  */
57
59
  this.type = 'listitem';
58
60
  /**
59
61
  * READONLY. Sets the `md-list-item` attribute on the element.
60
62
  */
61
63
  this.isListItem = true;
64
+ /**
65
+ * Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.
66
+ */
67
+ this.href = '';
68
+ /**
69
+ * Sets the underlying `HTMLAnchorElement`'s `target` attribute when `href` is
70
+ * set.
71
+ */
72
+ this.target = '';
62
73
  /**
63
74
  * Only meant to be overridden by subclassing and not by the user. This is
64
75
  * so that we have control over focus on specific variants such as disabling
@@ -96,33 +107,50 @@ export class ListItemEl extends LitElement {
96
107
  * @param content the child content of the list item.
97
108
  */
98
109
  renderListItem(content) {
99
- return html `
100
- <li
110
+ const isAnchor = !!this.href;
111
+ const tag = isAnchor ? literal `a` : literal `li`;
112
+ const role = isAnchor || this.type === 'none' ? nothing : this.type;
113
+ const target = isAnchor && !!this.target ? this.target : nothing;
114
+ return staticHtml `
115
+ <${tag}
101
116
  id="item"
102
117
  tabindex=${this.disabled ? -1 : this.itemTabIndex}
103
- role=${this.type === 'none' ? nothing : this.type}
118
+ role=${role}
104
119
  aria-selected=${this.ariaSelected || nothing}
105
120
  aria-checked=${this.ariaChecked || nothing}
106
121
  class="list-item ${classMap(this.getRenderClasses())}"
122
+ href=${this.href || nothing}
123
+ target=${target}
107
124
  @click=${this.onClick}
108
125
  @pointerenter=${this.onPointerenter}
109
126
  @pointerleave=${this.onPointerleave}
110
127
  @keydown=${this.onKeydown}
111
- >${content}</li>
128
+ >${content}</${tag}>
112
129
  `;
113
130
  }
114
131
  /**
115
132
  * Handles rendering of the ripple element.
116
133
  */
117
134
  renderRipple() {
118
- return html `<md-ripple for="item" ?disabled=${this.disabled}></md-ripple>`;
135
+ return html `
136
+ <md-ripple
137
+ part="ripple"
138
+ for="item"
139
+ ?disabled=${this.disabled}></md-ripple>`;
119
140
  }
120
141
  /**
121
142
  * Handles rendering of the focus ring.
122
143
  */
123
144
  renderFocusRing() {
124
- return html `<md-focus-ring class="focus-ring" part="focus-ring" for="item" inward></md-focus-ring>`;
145
+ return html `
146
+ <md-focus-ring
147
+ @visibility-changed=${this.onFocusRingVisibilityChanged}
148
+ class="focus-ring"
149
+ part="focus-ring"
150
+ for="item"
151
+ inward></md-focus-ring>`;
125
152
  }
153
+ onFocusRingVisibilityChanged(e) { }
126
154
  /**
127
155
  * Classes applied to the list item root.
128
156
  */
@@ -193,9 +221,8 @@ export class ListItemEl extends LitElement {
193
221
  this.listItemRoot?.focus?.();
194
222
  }
195
223
  }
196
- _a = ListItemEl;
197
224
  (() => {
198
- requestUpdateOnAriaChange(_a);
225
+ requestUpdateOnAriaChange(ListItemEl);
199
226
  })();
200
227
  __decorate([
201
228
  property()
@@ -224,6 +251,12 @@ __decorate([
224
251
  __decorate([
225
252
  property({ type: Boolean, attribute: 'md-list-item', reflect: true })
226
253
  ], ListItemEl.prototype, "isListItem", void 0);
254
+ __decorate([
255
+ property()
256
+ ], ListItemEl.prototype, "href", void 0);
257
+ __decorate([
258
+ property()
259
+ ], ListItemEl.prototype, "target", void 0);
227
260
  __decorate([
228
261
  query('.list-item')
229
262
  ], ListItemEl.prototype, "listItemRoot", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"list-item.js","sourceRoot":"","sources":["list-item.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,iCAAiC,CAAC;AAEzC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAiC,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAGrD,OAAO,EAAC,yBAAyB,EAAC,MAAM,oCAAoC,CAAC;AAkB7E,gEAAgE;AAChE,MAAM,OAAO,UAAW,SAAQ,UAAU;IAA1C;;QAKE;;WAEG;QACS,aAAQ,GAAG,EAAE,CAAC;QAE1B;;;;WAIG;QACuC,mBAAc,GAAG,EAAE,CAAC;QAE9D;;WAEG;QAEH,4BAAuB,GAAG,KAAK,CAAC;QAEhC;;;WAGG;QAEH,2BAAsB,GAAG,EAAE,CAAC;QAE5B;;WAEG;QACwB,aAAQ,GAAG,KAAK,CAAC;QAE5C;;;;;WAKG;QACmD,iBAAY,GAAG,CAAC,CAAC,CAAC;QAExE;;;;WAIG;QACuC,WAAM,GAAG,KAAK,CAAC;QAEzD;;WAEG;QAEH,SAAI,GAAiB,UAAU,CAAC;QAEhC;;WAEG;QAEH,eAAU,GAAG,IAAI,CAAC;QAIlB;;;;WAIG;QACO,sBAAiB,GAAG,IAAI,CAAC;QAEzB,kBAAa,GAAG,IAAI,CAAC;IAuJjC,CAAC;IArJoB,UAAU,CAAC,OAA6B;QACzD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC3C,IAAI,IAAI,CAAC,MAAM,E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AAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,MAAM;YAC3D,IAAI,CAAC,iBAAiB,EAAE;YAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;SACd;QAED,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;IAEQ,KAAK;QACZ,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAAC;IAC/B,CAAC;CACF;;AA7NC;IACE,yBAAyB,CAAC,EAAI,CAAC,CAAC;AAClC,CAAC,GAAA,CAAA;AAKW;IAAX,QAAQ,EAAE;4CAAe;AAOgB;IAAzC,QAAQ,CAAC,EAAC,SAAS,EAAE,iBAAiB,EAAC,CAAC;kDAAqB;AAM9D;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAC,CAAC;2DACnC;AAOhC;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,0BAA0B,EAAC,CAAC;0DACtB;AAKD;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;4CAAkB;AAQU;IAArD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAC,CAAC;gDAAmB;AAO9B;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;0CAAgB;AAMzD;IADC,QAAQ,EAAE;wCACqB;AAMhC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;8CAClD;AAEG;IAApB,KAAK,CAAC,YAAY,CAAC;gDAAoD","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../ripple/ripple.js';\nimport '../../../focus/md-focus-ring.js';\n\nimport {html, LitElement, nothing, PropertyValues, TemplateResult} from 'lit';\nimport {property, query} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\n\n/**\n * Supported roles for a list item.\n */\nexport type ListItemRole = 'listitem'|'menuitem'|'option'|'link'|'none';\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 static {\n requestUpdateOnAriaChange(this);\n }\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. Set\n * `multiLineSupportingText` to `true` to support multiple lines in the\n * supporting text.\n */\n @property({attribute: 'supporting-text'}) supportingText = '';\n\n /**\n * Modifies `supportingText` to support multiple lines.\n */\n @property({type: Boolean, attribute: 'multi-line-supporting-text'})\n multiLineSupportingText = false;\n\n /**\n * The supporting text placed at the end of the item. Overridden by elements\n * slotted into the `end` slot.\n */\n @property({attribute: 'trailing-supporting-text'})\n 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 overridden by the keyboard behavior of `md-list` and by\n * setting `selected`.\n */\n @property({type: Number, attribute: 'item-tabindex'}) itemTabIndex = -1;\n\n /**\n * Whether or not the element is actively being interacted with by md-list.\n * When active, tabindex is set to 0, and in some list item variants (like\n * md-list-item), focuses the underlying item.\n */\n @property({type: Boolean, reflect: true}) active = false;\n\n /**\n * Sets the role of the list item. Set to '' to clear the role.\n */\n @property()\n type: ListItemRole = 'listitem';\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 @query('.list-item') protected readonly listItemRoot!: HTMLElement|null;\n\n /**\n * Only meant to be overridden 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 focusOnActivation = true;\n\n protected isFirstUpdate = true;\n\n protected override willUpdate(changed: PropertyValues<this>) {\n if (changed.has('active') && !this.disabled) {\n if (this.active) {\n this.itemTabIndex = 0;\n } else if (!this.isFirstUpdate) {\n // Do not reset anything if it's the first render because user could\n // have set `itemTabIndex` manually.\n this.itemTabIndex = -1;\n }\n }\n }\n\n protected override render() {\n return this.renderListItem(html`\n <div class=\"content-wrapper\">\n ${this.renderStart()}\n ${this.renderBody()}\n ${this.renderEnd()}\n ${this.renderRipple()}\n ${this.renderFocusRing()}\n </div>\n `);\n }\n\n /**\n * Renders the root list item.\n *\n * @param content the child content of the list item.\n */\n protected renderListItem(content: unknown) {\n return html`\n <li\n id=\"item\"\n tabindex=${this.disabled ? -1 : this.itemTabIndex}\n role=${this.type === 'none' ? nothing : this.type}\n aria-selected=${(this as ARIAMixinStrict).ariaSelected || nothing}\n aria-checked=${(this as ARIAMixinStrict).ariaChecked || nothing}\n class=\"list-item ${classMap(this.getRenderClasses())}\"\n @click=${this.onClick}\n @pointerenter=${this.onPointerenter}\n @pointerleave=${this.onPointerleave}\n @keydown=${this.onKeydown}\n >${content}</li>\n `;\n }\n\n /**\n * Handles rendering of the ripple element.\n */\n protected renderRipple(): TemplateResult|typeof nothing {\n return html`<md-ripple for=\"item\" ?disabled=${this.disabled}></md-ripple>`;\n }\n\n /**\n * Handles rendering of the focus ring.\n */\n protected renderFocusRing(): TemplateResult|typeof nothing {\n return html`<md-focus-ring class=\"focus-ring\" part=\"focus-ring\" for=\"item\" inward></md-focus-ring>`;\n }\n\n /**\n * Classes applied to the list item root.\n */\n protected getRenderClasses() {\n return {\n 'with-one-line': this.supportingText === '',\n 'with-two-line':\n this.supportingText !== '' && !this.multiLineSupportingText,\n 'with-three-line':\n this.supportingText !== '' && this.multiLineSupportingText,\n 'disabled': this.disabled\n };\n }\n\n /**\n * The content rendered at the start of the list item.\n */\n protected renderStart() {\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() {\n const supportingText =\n this.supportingText !== '' ? this.renderSupportingText() : '';\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() {\n return html`<span\n class=\"supporting-text ${classMap(this.getSupportingTextClasses())}\"\n >${this.supportingText}</span>`;\n }\n\n /**\n * Gets the classes for the supporting text node\n */\n protected getSupportingTextClasses() {\n return {'supporting-text--multi-line': this.multiLineSupportingText};\n }\n\n /**\n * The content rendered at the end of the list item.\n */\n protected renderEnd() {\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() {\n return html`<span class=\"trailing-supporting-text\"\n >${this.trailingSupportingText}</span>`;\n }\n\n // For easier overriding in menu-item\n protected onClick?(event: Event): void;\n protected onKeydown?(event: KeyboardEvent): void;\n protected onPointerenter?(event: Event): void;\n protected onPointerleave?(event: Event): void;\n\n protected 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.focusOnActivation) {\n this.focus();\n }\n\n this.isFirstUpdate = false;\n }\n\n override focus() {\n this.listItemRoot?.focus?.();\n }\n}\n"]}
1
+ {"version":3,"file":"list-item.js","sourceRoot":"","sources":["list-item.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,2BAA2B,CAAC;AACnC,OAAO,iCAAiC,CAAC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AC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;0CAAgB;AAO7C;IAAX,QAAQ,EAAE;wCAAiC;AAM5C;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;8CAClD;AAKN;IAAX,QAAQ,EAAE;wCAAW;AAMV;IAAX,QAAQ,EAAE;0CAAmD;AAEzC;IAApB,KAAK,CAAC,YAAY,CAAC;gDAAoD","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../../ripple/ripple.js';\nimport '../../../focus/md-focus-ring.js';\n\nimport {html, LitElement, nothing, PropertyValues, TemplateResult} from 'lit';\nimport {property, query} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {html as staticHtml, literal} from 'lit/static-html.js';\n\nimport {ARIAMixinStrict} from '../../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../../internal/aria/delegate.js';\n\n/**\n * Supported roles for a list item.\n */\nexport type ListItemRole = 'listitem'|'menuitem'|'option'|'link'|'none';\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 static {\n requestUpdateOnAriaChange(ListItemEl);\n }\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. Set\n * `multiLineSupportingText` to `true` to support multiple lines in the\n * supporting text.\n */\n @property({attribute: 'supporting-text'}) supportingText = '';\n\n /**\n * Modifies `supportingText` to support multiple lines.\n */\n @property({type: Boolean, attribute: 'multi-line-supporting-text'})\n multiLineSupportingText = false;\n\n /**\n * The supporting text placed at the end of the item. Overridden by elements\n * slotted into the `end` slot.\n */\n @property({attribute: 'trailing-supporting-text'})\n 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 overridden by the keyboard behavior of `md-list` and by\n * setting `selected`.\n */\n @property({type: Number, attribute: 'item-tabindex'}) itemTabIndex = -1;\n\n /**\n * Whether or not the element is actively being interacted with by md-list.\n * When active, tabindex is set to 0, and in some list item variants (like\n * md-list-item), focuses the underlying item.\n */\n @property({type: Boolean, reflect: true}) active = false;\n\n /**\n * Sets the role of the list item. Set to 'nothing' to clear the role. This\n * property will be ignored if `href` is set since the underlying element will\n * be a native anchor tag.\n */\n @property() type: ListItemRole = 'listitem';\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 /**\n * Sets the underlying `HTMLAnchorElement`'s `href` resource attribute.\n */\n @property() href = '';\n\n /**\n * Sets the underlying `HTMLAnchorElement`'s `target` attribute when `href` is\n * set.\n */\n @property() target: '_blank'|'_parent'|'_self'|'_top'|'' = '';\n\n @query('.list-item') protected readonly listItemRoot!: HTMLElement|null;\n\n /**\n * Only meant to be overridden 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 focusOnActivation = true;\n\n protected isFirstUpdate = true;\n\n protected override willUpdate(changed: PropertyValues<this>) {\n if (changed.has('active') && !this.disabled) {\n if (this.active) {\n this.itemTabIndex = 0;\n } else if (!this.isFirstUpdate) {\n // Do not reset anything if it's the first render because user could\n // have set `itemTabIndex` manually.\n this.itemTabIndex = -1;\n }\n }\n }\n\n protected override render() {\n return this.renderListItem(html`\n <div class=\"content-wrapper\">\n ${this.renderStart()}\n ${this.renderBody()}\n ${this.renderEnd()}\n ${this.renderRipple()}\n ${this.renderFocusRing()}\n </div>\n `);\n }\n\n /**\n * Renders the root list item.\n *\n * @param content the child content of the list item.\n */\n protected renderListItem(content: unknown) {\n const isAnchor = !!this.href;\n const tag = isAnchor ? literal`a` : literal`li`;\n const role = isAnchor || this.type === 'none' ? nothing : this.type;\n const target = isAnchor && !!this.target ? this.target : nothing;\n return staticHtml`\n <${tag}\n id=\"item\"\n tabindex=${this.disabled ? -1 : this.itemTabIndex}\n role=${role}\n aria-selected=${(this as ARIAMixinStrict).ariaSelected || nothing}\n aria-checked=${(this as ARIAMixinStrict).ariaChecked || nothing}\n class=\"list-item ${classMap(this.getRenderClasses())}\"\n href=${this.href || nothing}\n target=${target}\n @click=${this.onClick}\n @pointerenter=${this.onPointerenter}\n @pointerleave=${this.onPointerleave}\n @keydown=${this.onKeydown}\n >${content}</${tag}>\n `;\n }\n\n /**\n * Handles rendering of the ripple element.\n */\n protected renderRipple(): TemplateResult|typeof nothing {\n return html`\n <md-ripple\n part=\"ripple\"\n for=\"item\"\n ?disabled=${this.disabled}></md-ripple>`;\n }\n\n /**\n * Handles rendering of the focus ring.\n */\n protected renderFocusRing(): TemplateResult|typeof nothing {\n return html`\n <md-focus-ring\n @visibility-changed=${this.onFocusRingVisibilityChanged}\n class=\"focus-ring\"\n part=\"focus-ring\"\n for=\"item\"\n inward></md-focus-ring>`;\n }\n\n protected onFocusRingVisibilityChanged(e: Event) {}\n\n /**\n * Classes applied to the list item root.\n */\n protected getRenderClasses() {\n return {\n 'with-one-line': this.supportingText === '',\n 'with-two-line':\n this.supportingText !== '' && !this.multiLineSupportingText,\n 'with-three-line':\n this.supportingText !== '' && this.multiLineSupportingText,\n 'disabled': this.disabled\n };\n }\n\n /**\n * The content rendered at the start of the list item.\n */\n protected renderStart() {\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() {\n const supportingText =\n this.supportingText !== '' ? this.renderSupportingText() : '';\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() {\n return html`<span\n class=\"supporting-text ${classMap(this.getSupportingTextClasses())}\"\n >${this.supportingText}</span>`;\n }\n\n /**\n * Gets the classes for the supporting text node\n */\n protected getSupportingTextClasses() {\n return {'supporting-text--multi-line': this.multiLineSupportingText};\n }\n\n /**\n * The content rendered at the end of the list item.\n */\n protected renderEnd() {\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() {\n return html`<span class=\"trailing-supporting-text\"\n >${this.trailingSupportingText}</span>`;\n }\n\n // For easier overriding in menu-item\n protected onClick?(event: Event): void;\n protected onKeydown?(event: KeyboardEvent): void;\n protected onPointerenter?(event: Event): void;\n protected onPointerleave?(event: Event): void;\n\n protected 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.focusOnActivation) {\n this.focus();\n }\n\n this.isFirstUpdate = false;\n }\n\n override focus() {\n this.listItemRoot?.focus?.();\n }\n}\n"]}
@@ -3,7 +3,6 @@
3
3
  * Copyright 2022 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- var _a;
7
6
  import { __decorate } from "tslib";
8
7
  import '../../list/list.js';
9
8
  import '../../focus/md-focus-ring.js';
@@ -291,6 +290,7 @@ export class Menu extends LitElement {
291
290
  const { ariaLabel } = this;
292
291
  return html `
293
292
  <md-list
293
+ part="list"
294
294
  id="list"
295
295
  aria-label=${ariaLabel || nothing}
296
296
  type=${this.type}
@@ -315,7 +315,7 @@ export class Menu extends LitElement {
315
315
  * Renders the elevation component.
316
316
  */
317
317
  renderElevation() {
318
- return html `<md-elevation></md-elevation>`;
318
+ return html `<md-elevation part="elevation"></md-elevation>`;
319
319
  }
320
320
  /**
321
321
  * Renders the focus ring component.
@@ -603,9 +603,8 @@ export class Menu extends LitElement {
603
603
  return this.listElement?.activatePreviousItem() ?? null;
604
604
  }
605
605
  }
606
- _a = Menu;
607
606
  (() => {
608
- requestUpdateOnAriaChange(_a);
607
+ requestUpdateOnAriaChange(Menu);
609
608
  })();
610
609
  __decorate([
611
610
  query('md-list')
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sourceRoot":"","sources":["menu.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,8BAA8B,CAAC;AACtC,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AACxD,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAGrD,OAAO,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,qBAAqB,EAAE,MAAM,EAAC,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAC,IAAI,EAAC,MAAM,6BAA6B,CAAC;AAEjD,OAAO,EAAmD,aAAa,EAAE,kBAAkB,EAAW,MAAM,aAAa,CAAC;AAC1H,OAAO,EAAS,yBAAyB,EAAwB,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAI7D;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAOjD;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAC,YAAiC,QAAQ;IAElE,MAAM,QAAQ,GAAG,SAAS,CAAC,a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CAAqB;AAKhC;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;kCAAc;AASN;IAAhD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAC,CAAC;qCAAa;AAOZ;IAAhD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAC,CAAC;qCAAa;AAIP;IAArD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAC,CAAC;0CAAkB;AAI3D;IAAX,QAAQ,EAAE;kCAAyB;AAMpC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAC,CAAC;4CACR;AAKP;IAAvC,QAAQ,CAAC,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC;0CAAoC;AAKrC;IAArC,QAAQ,CAAC,EAAC,SAAS,EAAE,aAAa,EAAC,CAAC;wCAAoC;AAQzE;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAC,CAAC;oDACpC;AAQ/B;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAC,CAAC;gDACnC;AAM3B;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAC,CAAC;8CAClC;AAKzB;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC;0CACO;AAErC;IAAR,KAAK,EAAE;6CAAgC;AAwKxC;IADC,YAAY,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;6CAS7B","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../list/list.js';\nimport '../../focus/md-focus-ring.js';\nimport '../../elevation/elevation.js';\n\nimport {html, isServer, LitElement, nothing} from 'lit';\nimport {eventOptions, property, query, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {styleMap} from 'lit/directives/style-map.js';\n\nimport {ARIAMixinStrict, ARIARole} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\nimport {createAnimationSignal, EASING} from '../../internal/motion/animation.js';\nimport {List} from '../../list/internal/list.js';\n\nimport {ActivateTypeaheadEvent, DeactivateTypeaheadEvent, isClosableKey, isElementInSubtree, MenuItem} from './shared.js';\nimport {Corner, SurfacePositionController, SurfacePositionTarget} from './surfacePositionController.js';\nimport {TypeaheadController} from './typeaheadController.js';\n\nexport {Corner} from './surfacePositionController.js';\n\n/**\n * The default value for the typeahead buffer time in Milliseconds.\n */\nexport const DEFAULT_TYPEAHEAD_BUFFER_TIME = 200;\n\n/**\n * Element to focus on when menu is first opened.\n */\nexport type DefaultFocusState = 'NONE'|'LIST_ROOT'|'FIRST_ITEM'|'LAST_ITEM';\n\n/**\n * Gets the currently focused element on the page.\n *\n * @param activeDoc The document or shadowroot from which to start the search.\n * Defaults to `window.document`\n * @return Returns the currently deeply focused element or `null` if none.\n */\nfunction getFocusedElement(activeDoc: Document|ShadowRoot = document):\n HTMLElement|null {\n const activeEl = activeDoc.activeElement as HTMLElement | null;\n\n if (!activeEl) {\n return null;\n }\n\n if (activeEl.shadowRoot) {\n return getFocusedElement(activeEl.shadowRoot) ?? activeEl;\n }\n\n return activeEl;\n}\n\n/**\n * @fires opening Fired before the opening animation begins\n * @fires opened Fired once the menu is open, after any animations\n * @fires closing Fired before the closing animation begins\n * @fires closed Fired once the menu is closed, after any animations\n */\nexport abstract class Menu extends LitElement {\n static {\n requestUpdateOnAriaChange(this);\n }\n\n @query('md-list') private readonly listElement!: List|null;\n @query('.menu') private readonly surfaceEl!: HTMLElement|null;\n @query('slot') private readonly slotEl!: HTMLSlotElement|null;\n\n /**\n * The element in which the menu should align to.\n */\n @property({attribute: false})\n anchor: HTMLElement&Partial<SurfacePositionTarget>|null = null;\n /**\n * Makes the element use `position:fixed` instead of `position:absolute`. In\n * most cases, the menu should position itself above most other\n * `position:absolute` or `position:fixed` elements when placed inside of\n * them. e.g. using a menu inside of an `md-dialog`.\n *\n * __NOTE__: Fixed menus will not scroll with the page and will be fixed to\n * the window instead.\n */\n @property({type: Boolean}) fixed = false;\n /**\n * Skips the opening and closing animations.\n */\n @property({type: Boolean}) quick = false;\n /**\n * Displays overflow content like a submenu.\n *\n * __NOTE__: This may cause adverse effects if you set\n * `md-menu {max-height:...}`\n * and have items overflowing items in the \"y\" direction.\n */\n @property({type: Boolean, attribute: 'has-overflow'}) hasOverflow = false;\n /**\n * Opens the menu and makes it visible. Alternative to the `.show()` and\n * `.close()` methods\n */\n @property({type: Boolean, reflect: true}) open = false;\n /**\n * Offsets the menu's inline alignment from the anchor by the given number in\n * pixels. This value is direction aware and will follow the LTR / RTL\n * direction.\n *\n * e.g. LTR: positive -> right, negative -> left\n * RTL: positive -> left, negative -> right\n */\n @property({type: Number, attribute: 'x-offset'}) xOffset = 0;\n /**\n * Offsets the menu's block alignment from the anchor by the given number in\n * pixels.\n *\n * e.g. positive -> down, negative -> up\n */\n @property({type: Number, attribute: 'y-offset'}) yOffset = 0;\n /**\n * The tabindex of the underlying list element.\n */\n @property({type: Number, attribute: 'list-tabindex'}) listTabIndex = 0;\n /**\n * The role of the underlying list element.\n */\n @property() type: ARIARole = 'menu';\n /**\n * The max time between the keystrokes of the typeahead menu behavior before\n * it clears the typeahead buffer.\n */\n @property({type: Number, attribute: 'typeahead-delay'})\n typeaheadDelay = DEFAULT_TYPEAHEAD_BUFFER_TIME;\n /**\n * The corner of the anchor which to align the menu in the standard logical\n * property style of <block>_<inline>.\n */\n @property({attribute: 'anchor-corner'}) anchorCorner: Corner = 'END_START';\n /**\n * The corner of the menu which to align the anchor in the standard logical\n * property style of <block>_<inline>.\n */\n @property({attribute: 'menu-corner'}) menuCorner: Corner = 'START_START';\n /**\n * Keeps the user clicks outside the menu.\n *\n * NOTE: clicking outside may still cause focusout to close the menu so see\n * `stayOpenOnFocusout`.\n */\n @property({type: Boolean, attribute: 'stay-open-on-outside-click'})\n stayOpenOnOutsideClick = false;\n /**\n * Keeps the menu open when focus leaves the menu's composed subtree.\n *\n * NOTE: Focusout behavior will stop propagation of the focusout event. Set\n * this property to true to opt-out of menu's focuout handling altogether.\n */\n @property({type: Boolean, attribute: 'stay-open-on-focusout'})\n stayOpenOnFocusout = false;\n /**\n * After closing, does not restore focus to the last focused element before\n * the menu was opened.\n */\n @property({type: Boolean, attribute: 'skip-restore-focus'})\n skipRestoreFocus = false;\n /**\n * The element that should be focused by default once opened.\n */\n @property({attribute: 'default-focus'})\n defaultFocus: DefaultFocusState = 'LIST_ROOT';\n\n @state() private typeaheadActive = true;\n\n private readonly openCloseAnimationSignal = createAnimationSignal();\n\n /**\n * Whether the menu is animating upwards or downwards when opening. This is\n * helpful for calculating some animation calculations.\n */\n private get openDirection(): 'UP'|'DOWN' {\n const menuCornerBlock = this.menuCorner.split('_')[0];\n return menuCornerBlock === 'START' ? 'DOWN' : 'UP';\n }\n\n /**\n * The element that was focused before the menu opened.\n */\n private lastFocusedElement: HTMLElement|null = null;\n\n /**\n * Handles typeahead navigation through the menu.\n */\n typeaheadController = new TypeaheadController(() => {\n return {\n getItems: () => this.items,\n typeaheadBufferTime: this.typeaheadDelay,\n active: this.typeaheadActive\n };\n });\n\n /**\n * Handles positioning the surface and aligning it to the anchor.\n */\n private readonly menuPositionController =\n new SurfacePositionController(this, () => {\n return {\n anchorCorner: this.anchorCorner,\n surfaceCorner: this.menuCorner,\n surfaceEl: this.surfaceEl,\n anchorEl: this.anchor,\n isTopLayer: this.fixed,\n isOpen: this.open,\n xOffset: this.xOffset,\n yOffset: this.yOffset,\n onOpen: this.onOpened,\n beforeClose: this.beforeClose,\n onClose: this.onClosed,\n };\n });\n\n /**\n * The menu items associated with this menu. The items must be `MenuItem`s and\n * have both the `md-menu-item` and `md-list-item` attributes.\n */\n get items(): MenuItem[] {\n const listElement = this.listElement;\n\n if (listElement) {\n return listElement.items.filter(el => el.hasAttribute('md-menu-item')) as\n MenuItem[];\n }\n\n return [];\n }\n\n protected override render() {\n return this.renderSurface();\n }\n\n /**\n * Renders the positionable surface element and its contents.\n */\n private renderSurface() {\n // TODO(b/274140618): elevation should be an underlay, not an overlay that\n // tints content\n return html`\n <div\n class=\"menu ${classMap(this.getSurfaceClasses())}\"\n style=${styleMap(this.menuPositionController.surfaceStyles)}\n @focusout=${this.handleFocusout}>\n ${this.renderElevation()}\n ${this.renderList()}\n ${this.renderFocusRing()}\n </div>\n `;\n }\n\n /**\n * Renders the List element and its items\n */\n private renderList() {\n // Needed for closure conformance\n const {ariaLabel} = this as ARIAMixinStrict;\n return html`\n <md-list\n id=\"list\"\n aria-label=${ariaLabel || nothing}\n type=${this.type}\n listTabIndex=${this.listTabIndex}\n @keydown=${this.handleListKeydown}>\n ${this.renderMenuItems()}\n </md-list>`;\n }\n\n /**\n * Renders the menu items' slot\n */\n private renderMenuItems() {\n return html`<slot\n @close-menu=${this.onCloseMenu}\n @deactivate-items=${this.onDeactivateItems}\n @deactivate-typeahead=${this.handleDeactivateTypeahead}\n @activate-typeahead=${this.handleActivateTypeahead}\n @stay-open-on-focusout=${this.handleStayOpenOnFocusout}\n @close-on-focusout=${this.handleCloseOnFocusout}></slot>`;\n }\n\n /**\n * Renders the elevation component.\n */\n private renderElevation() {\n return html`<md-elevation></md-elevation>`;\n }\n\n /**\n * Renders the focus ring component.\n */\n private renderFocusRing() {\n return html`<md-focus-ring part=\"focus-ring\" for=\"list\"></md-focus-ring>`;\n }\n\n private getSurfaceClasses() {\n return {\n open: this.open,\n fixed: this.fixed,\n 'has-overflow': this.hasOverflow,\n };\n }\n\n private async handleFocusout(event: FocusEvent) {\n if (this.stayOpenOnFocusout) {\n return;\n }\n\n // Stop propagation to prevent nested menus from interfering with each other\n event.stopPropagation();\n\n if (event.relatedTarget) {\n // Don't close the menu if we are switching focus between menu,\n // md-menu-item, and md-list\n if (isElementInSubtree(event.relatedTarget, this)) {\n return;\n }\n }\n\n const oldRestoreFocus = this.skipRestoreFocus;\n // allow focus to continue to the next focused object rather than returning\n this.skipRestoreFocus = true;\n this.close();\n // await for close\n await this.updateComplete;\n // return to previous behavior\n this.skipRestoreFocus = oldRestoreFocus;\n }\n\n // Capture so that we can grab the event before it reaches the list item\n // istelf. Specifically useful for the case where typeahead encounters a space\n // and we don't want the menu item to close the menu.\n @eventOptions({capture: true})\n private handleListKeydown(event: KeyboardEvent) {\n if (event.target === this.listElement && !event.defaultPrevented &&\n isClosableKey(event.code)) {\n event.preventDefault();\n this.close();\n }\n\n this.typeaheadController.onKeydown(event);\n }\n\n /**\n * Saves the last focused element focuses the new element based on\n * `defaultFocus`, and animates open.\n */\n private readonly onOpened = () => {\n this.lastFocusedElement = getFocusedElement();\n\n if (!this.listElement) return;\n\n const items = this.listElement.items;\n const activeItemRecord = List.getActiveItem(items);\n\n if (activeItemRecord && this.defaultFocus !== 'NONE') {\n activeItemRecord.item.active = false;\n }\n\n switch (this.defaultFocus) {\n case 'FIRST_ITEM':\n const first = List.getFirstActivatableItem(items);\n if (first) {\n first.active = true;\n }\n break;\n case 'LAST_ITEM':\n const last = List.getLastActivatableItem(items);\n if (last) {\n last.active = true;\n }\n break;\n case 'LIST_ROOT':\n this.listElement?.focus();\n break;\n default:\n case 'NONE':\n // Do nothing.\n break;\n }\n\n if (this.quick) {\n this.dispatchEvent(new Event('opening'));\n this.dispatchEvent(new Event('opened'));\n } else {\n this.animateOpen();\n }\n };\n\n /**\n * Animates closed.\n */\n private readonly beforeClose = async () => {\n this.open = false;\n\n if (!this.skipRestoreFocus) {\n this.lastFocusedElement?.focus?.();\n }\n\n if (!this.quick) {\n await this.animateClose();\n }\n };\n\n /**\n * Focuses the last focused element.\n */\n private readonly onClosed = () => {\n if (this.quick) {\n this.dispatchEvent(new Event('closing'));\n this.dispatchEvent(new Event('closed'));\n }\n };\n\n /**\n * Performs the opening animation:\n *\n * https://direct.googleplex.com/#/spec/295000003+271060003\n */\n private animateOpen() {\n const surfaceEl = this.surfaceEl;\n const slotEl = this.slotEl;\n\n if (!surfaceEl || !slotEl) return;\n\n const openDirection = this.openDirection;\n this.dispatchEvent(new Event('opening'));\n // needs to be imperative because we don't want to mix animation and Lit\n // render timing\n surfaceEl.classList.toggle('animating', true);\n\n const signal = this.openCloseAnimationSignal.start();\n const height = surfaceEl.offsetHeight;\n const openingUpwards = openDirection === 'UP';\n const children = this.items;\n const FULL_DURATION = 500;\n const SURFACE_OPACITY_DURATION = 50;\n const ITEM_OPACITY_DURATION = 250;\n // We want to fit every child fade-in animation within the full duration of\n // the animation.\n const DELAY_BETWEEN_ITEMS =\n (FULL_DURATION - ITEM_OPACITY_DURATION) / children.length;\n\n const surfaceHeightAnimation =\n surfaceEl.animate([{height: '0px'}, {height: `${height}px`}], {\n duration: FULL_DURATION,\n easing: EASING.EMPHASIZED,\n });\n // When we are opening upwards, we want to make sure the last item is always\n // in view, so we need to translate it upwards the opposite direction of the\n // height animation\n const upPositionCorrectionAnimation = slotEl.animate(\n [\n {transform: openingUpwards ? `translateY(-${height}px)` : ''},\n {transform: ''}\n ],\n {duration: FULL_DURATION, easing: EASING.EMPHASIZED});\n\n const surfaceOpacityAnimation = surfaceEl.animate(\n [{opacity: 0}, {opacity: 1}], SURFACE_OPACITY_DURATION);\n\n const childrenAnimations: Array<[HTMLElement, Animation]> = [];\n\n for (let i = 0; i < children.length; i++) {\n // If we are animating upwards, then reverse the children list.\n const directionalIndex = openingUpwards ? children.length - 1 - i : i;\n const child = children[directionalIndex];\n const animation = child.animate([{opacity: 0}, {opacity: 1}], {\n duration: ITEM_OPACITY_DURATION,\n delay: DELAY_BETWEEN_ITEMS * i,\n });\n\n // Make them all initially hidden and then clean up at the end of each\n // animation.\n child.classList.toggle('hidden', true);\n animation.addEventListener('finish', () => {\n child.classList.toggle('hidden', false);\n });\n\n childrenAnimations.push([child, animation]);\n }\n\n signal.addEventListener('abort', () => {\n surfaceHeightAnimation.cancel();\n upPositionCorrectionAnimation.cancel();\n surfaceOpacityAnimation.cancel();\n childrenAnimations.forEach(([child, animation]) => {\n child.classList.toggle('hidden', false);\n animation.cancel();\n });\n });\n\n surfaceHeightAnimation.addEventListener('finish', () => {\n surfaceEl.classList.toggle('animating', false);\n this.openCloseAnimationSignal.finish();\n this.dispatchEvent(new Event('opened'));\n });\n }\n\n /**\n * Performs the closing animation:\n *\n * https://direct.googleplex.com/#/spec/295000003+271060003\n */\n private animateClose() {\n let resolve!: (value: unknown) => void;\n let reject!: () => void;\n\n // This promise blocks the surface position controller from setting\n // display: none on the surface which will interfere with this animation.\n const animationEnded = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const surfaceEl = this.surfaceEl;\n const slotEl = this.slotEl;\n\n if (!surfaceEl || !slotEl) {\n reject();\n return animationEnded;\n }\n\n const openDirection = this.openDirection;\n const closingDownwards = openDirection === 'UP';\n this.dispatchEvent(new Event('closing'));\n // needs to be imperative because we don't want to mix animation and Lit\n // render timing\n surfaceEl.classList.toggle('animating', true);\n const signal = this.openCloseAnimationSignal.start();\n const height = surfaceEl.offsetHeight;\n const children = this.items;\n const FULL_DURATION = 150;\n const SURFACE_OPACITY_DURATION = 50;\n // The surface fades away at the very end\n const SURFACE_OPACITY_DELAY = FULL_DURATION - SURFACE_OPACITY_DURATION;\n const ITEM_OPACITY_DURATION = 50;\n const ITEM_OPACITY_INITIAL_DELAY = 50;\n const END_HEIGHT_PERCENTAGE = .35;\n\n // We want to fit every child fade-out animation within the full duration of\n // the animation.\n const DELAY_BETWEEN_ITEMS =\n (FULL_DURATION - ITEM_OPACITY_INITIAL_DELAY - ITEM_OPACITY_DURATION) /\n children.length;\n\n // The mock has the animation shrink to 35%\n const surfaceHeightAnimation = surfaceEl.animate(\n [\n {height: `${height}px`},\n {height: `${height * END_HEIGHT_PERCENTAGE}px`}\n ],\n {\n duration: FULL_DURATION,\n easing: EASING.EMPHASIZED_ACCELERATE,\n });\n\n // When we are closing downwards, we want to make sure the last item is\n // always in view, so we need to translate it upwards the opposite direction\n // of the height animation\n const downPositionCorrectionAnimation = slotEl.animate(\n [\n {transform: ''}, {\n transform: closingDownwards ?\n `translateY(-${height * (1 - END_HEIGHT_PERCENTAGE)}px)` :\n ''\n }\n ],\n {duration: FULL_DURATION, easing: EASING.EMPHASIZED_ACCELERATE});\n\n const surfaceOpacityAnimation = surfaceEl.animate(\n [{opacity: 1}, {opacity: 0}],\n {duration: SURFACE_OPACITY_DURATION, delay: SURFACE_OPACITY_DELAY});\n\n const childrenAnimations: Array<[HTMLElement, Animation]> = [];\n\n for (let i = 0; i < children.length; i++) {\n // If the animation is closing upwards, then reverse the list of\n // children so that we animate in the opposite direction.\n const directionalIndex = closingDownwards ? i : children.length - 1 - i;\n const child = children[directionalIndex];\n const animation = child.animate([{opacity: 1}, {opacity: 0}], {\n duration: ITEM_OPACITY_DURATION,\n delay: ITEM_OPACITY_INITIAL_DELAY + DELAY_BETWEEN_ITEMS * i,\n });\n\n // Make sure the items stay hidden at the end of each child animation.\n // We clean this up at the end of the overall animation.\n animation.addEventListener('finish', () => {\n child.classList.toggle('hidden', true);\n });\n childrenAnimations.push([child, animation]);\n }\n\n signal.addEventListener('abort', () => {\n surfaceHeightAnimation.cancel();\n downPositionCorrectionAnimation.cancel();\n surfaceOpacityAnimation.cancel();\n childrenAnimations.forEach(([child, animation]) => {\n animation.cancel();\n child.classList.toggle('hidden', false);\n });\n reject();\n });\n\n surfaceHeightAnimation.addEventListener('finish', () => {\n surfaceEl.classList.toggle('animating', false);\n childrenAnimations.forEach(([child]) => {\n child.classList.toggle('hidden', false);\n });\n this.openCloseAnimationSignal.finish();\n this.dispatchEvent(new Event('closed'));\n resolve(true);\n });\n\n return animationEnded;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n if (!isServer) {\n window.addEventListener('click', this.onWindowClick, {capture: true});\n }\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n if (!isServer) {\n window.removeEventListener('click', this.onWindowClick, {capture: true});\n }\n }\n\n private readonly onWindowClick = (event: MouseEvent) => {\n if (!this.stayOpenOnOutsideClick && !event.composedPath().includes(this)) {\n this.open = false;\n }\n };\n\n private onCloseMenu() {\n this.close();\n }\n\n private onDeactivateItems(event: Event) {\n event.stopPropagation();\n const items = this.items;\n for (const item of items) {\n item.active = false;\n item.selected = false;\n }\n }\n\n private handleDeactivateTypeahead(event: DeactivateTypeaheadEvent) {\n // stopPropagation so that this does not deactivate any typeaheads in menus\n // nested above it e.g. md-sub-menu-item\n event.stopPropagation();\n this.typeaheadActive = false;\n }\n\n private handleActivateTypeahead(event: ActivateTypeaheadEvent) {\n // stopPropagation so that this does not activate any typeaheads in menus\n // nested above it e.g. md-sub-menu-item\n event.stopPropagation();\n this.typeaheadActive = true;\n }\n\n private handleStayOpenOnFocusout(event: Event) {\n event.stopPropagation();\n this.stayOpenOnFocusout = true;\n }\n\n private handleCloseOnFocusout(event: Event) {\n event.stopPropagation();\n this.stayOpenOnFocusout = false;\n }\n\n override focus() {\n this.listElement?.focus();\n }\n\n close() {\n this.open = false;\n this.items.forEach(item => {\n item.close?.();\n });\n }\n\n show() {\n this.open = true;\n }\n\n /**\n * Activates the next item in the menu. If at the end of the menu, the first\n * item will be activated.\n *\n * @return The activated menu item or `null` if there are no items.\n */\n activateNextItem() {\n return this.listElement?.activateNextItem() as MenuItem ?? null;\n }\n\n /**\n * Activates the previous item in the menu. If at the start of the menu, the\n * last item will be activated.\n *\n * @return The activated menu item or `null` if there are no items.\n */\n activatePreviousItem() {\n return this.listElement?.activatePreviousItem() as MenuItem ?? null;\n }\n}\n"]}
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["menu.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,8BAA8B,CAAC;AACtC,OAAO,8BAA8B,C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EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAC,CAAC;4CACR;AAKP;IAAvC,QAAQ,CAAC,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC;0CAAoC;AAKrC;IAArC,QAAQ,CAAC,EAAC,SAAS,EAAE,aAAa,EAAC,CAAC;wCAAoC;AAQzE;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAC,CAAC;oDACpC;AAQ/B;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAC,CAAC;gDACnC;AAM3B;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAC,CAAC;8CAClC;AAKzB;IADC,QAAQ,CAAC,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC;0CACO;AAErC;IAAR,KAAK,EAAE;6CAAgC;AAyKxC;IADC,YAAY,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;6CAS7B","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../list/list.js';\nimport '../../focus/md-focus-ring.js';\nimport '../../elevation/elevation.js';\n\nimport {html, isServer, LitElement, nothing} from 'lit';\nimport {eventOptions, property, query, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {styleMap} from 'lit/directives/style-map.js';\n\nimport {ARIAMixinStrict, ARIARole} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\nimport {createAnimationSignal, EASING} from '../../internal/motion/animation.js';\nimport {List} from '../../list/internal/list.js';\n\nimport {ActivateTypeaheadEvent, DeactivateTypeaheadEvent, isClosableKey, isElementInSubtree, MenuItem} from './shared.js';\nimport {Corner, SurfacePositionController, SurfacePositionTarget} from './surfacePositionController.js';\nimport {TypeaheadController} from './typeaheadController.js';\n\nexport {Corner} from './surfacePositionController.js';\n\n/**\n * The default value for the typeahead buffer time in Milliseconds.\n */\nexport const DEFAULT_TYPEAHEAD_BUFFER_TIME = 200;\n\n/**\n * Element to focus on when menu is first opened.\n */\nexport type DefaultFocusState = 'NONE'|'LIST_ROOT'|'FIRST_ITEM'|'LAST_ITEM';\n\n/**\n * Gets the currently focused element on the page.\n *\n * @param activeDoc The document or shadowroot from which to start the search.\n * Defaults to `window.document`\n * @return Returns the currently deeply focused element or `null` if none.\n */\nfunction getFocusedElement(activeDoc: Document|ShadowRoot = document):\n HTMLElement|null {\n const activeEl = activeDoc.activeElement as HTMLElement | null;\n\n if (!activeEl) {\n return null;\n }\n\n if (activeEl.shadowRoot) {\n return getFocusedElement(activeEl.shadowRoot) ?? activeEl;\n }\n\n return activeEl;\n}\n\n/**\n * @fires opening Fired before the opening animation begins\n * @fires opened Fired once the menu is open, after any animations\n * @fires closing Fired before the closing animation begins\n * @fires closed Fired once the menu is closed, after any animations\n */\nexport abstract class Menu extends LitElement {\n static {\n requestUpdateOnAriaChange(Menu);\n }\n\n @query('md-list') private readonly listElement!: List|null;\n @query('.menu') private readonly surfaceEl!: HTMLElement|null;\n @query('slot') private readonly slotEl!: HTMLSlotElement|null;\n\n /**\n * The element in which the menu should align to.\n */\n @property({attribute: false})\n anchor: HTMLElement&Partial<SurfacePositionTarget>|null = null;\n /**\n * Makes the element use `position:fixed` instead of `position:absolute`. In\n * most cases, the menu should position itself above most other\n * `position:absolute` or `position:fixed` elements when placed inside of\n * them. e.g. using a menu inside of an `md-dialog`.\n *\n * __NOTE__: Fixed menus will not scroll with the page and will be fixed to\n * the window instead.\n */\n @property({type: Boolean}) fixed = false;\n /**\n * Skips the opening and closing animations.\n */\n @property({type: Boolean}) quick = false;\n /**\n * Displays overflow content like a submenu.\n *\n * __NOTE__: This may cause adverse effects if you set\n * `md-menu {max-height:...}`\n * and have items overflowing items in the \"y\" direction.\n */\n @property({type: Boolean, attribute: 'has-overflow'}) hasOverflow = false;\n /**\n * Opens the menu and makes it visible. Alternative to the `.show()` and\n * `.close()` methods\n */\n @property({type: Boolean, reflect: true}) open = false;\n /**\n * Offsets the menu's inline alignment from the anchor by the given number in\n * pixels. This value is direction aware and will follow the LTR / RTL\n * direction.\n *\n * e.g. LTR: positive -> right, negative -> left\n * RTL: positive -> left, negative -> right\n */\n @property({type: Number, attribute: 'x-offset'}) xOffset = 0;\n /**\n * Offsets the menu's block alignment from the anchor by the given number in\n * pixels.\n *\n * e.g. positive -> down, negative -> up\n */\n @property({type: Number, attribute: 'y-offset'}) yOffset = 0;\n /**\n * The tabindex of the underlying list element.\n */\n @property({type: Number, attribute: 'list-tabindex'}) listTabIndex = 0;\n /**\n * The role of the underlying list element.\n */\n @property() type: ARIARole = 'menu';\n /**\n * The max time between the keystrokes of the typeahead menu behavior before\n * it clears the typeahead buffer.\n */\n @property({type: Number, attribute: 'typeahead-delay'})\n typeaheadDelay = DEFAULT_TYPEAHEAD_BUFFER_TIME;\n /**\n * The corner of the anchor which to align the menu in the standard logical\n * property style of <block>_<inline>.\n */\n @property({attribute: 'anchor-corner'}) anchorCorner: Corner = 'END_START';\n /**\n * The corner of the menu which to align the anchor in the standard logical\n * property style of <block>_<inline>.\n */\n @property({attribute: 'menu-corner'}) menuCorner: Corner = 'START_START';\n /**\n * Keeps the user clicks outside the menu.\n *\n * NOTE: clicking outside may still cause focusout to close the menu so see\n * `stayOpenOnFocusout`.\n */\n @property({type: Boolean, attribute: 'stay-open-on-outside-click'})\n stayOpenOnOutsideClick = false;\n /**\n * Keeps the menu open when focus leaves the menu's composed subtree.\n *\n * NOTE: Focusout behavior will stop propagation of the focusout event. Set\n * this property to true to opt-out of menu's focuout handling altogether.\n */\n @property({type: Boolean, attribute: 'stay-open-on-focusout'})\n stayOpenOnFocusout = false;\n /**\n * After closing, does not restore focus to the last focused element before\n * the menu was opened.\n */\n @property({type: Boolean, attribute: 'skip-restore-focus'})\n skipRestoreFocus = false;\n /**\n * The element that should be focused by default once opened.\n */\n @property({attribute: 'default-focus'})\n defaultFocus: DefaultFocusState = 'LIST_ROOT';\n\n @state() private typeaheadActive = true;\n\n private readonly openCloseAnimationSignal = createAnimationSignal();\n\n /**\n * Whether the menu is animating upwards or downwards when opening. This is\n * helpful for calculating some animation calculations.\n */\n private get openDirection(): 'UP'|'DOWN' {\n const menuCornerBlock = this.menuCorner.split('_')[0];\n return menuCornerBlock === 'START' ? 'DOWN' : 'UP';\n }\n\n /**\n * The element that was focused before the menu opened.\n */\n private lastFocusedElement: HTMLElement|null = null;\n\n /**\n * Handles typeahead navigation through the menu.\n */\n typeaheadController = new TypeaheadController(() => {\n return {\n getItems: () => this.items,\n typeaheadBufferTime: this.typeaheadDelay,\n active: this.typeaheadActive\n };\n });\n\n /**\n * Handles positioning the surface and aligning it to the anchor.\n */\n private readonly menuPositionController =\n new SurfacePositionController(this, () => {\n return {\n anchorCorner: this.anchorCorner,\n surfaceCorner: this.menuCorner,\n surfaceEl: this.surfaceEl,\n anchorEl: this.anchor,\n isTopLayer: this.fixed,\n isOpen: this.open,\n xOffset: this.xOffset,\n yOffset: this.yOffset,\n onOpen: this.onOpened,\n beforeClose: this.beforeClose,\n onClose: this.onClosed,\n };\n });\n\n /**\n * The menu items associated with this menu. The items must be `MenuItem`s and\n * have both the `md-menu-item` and `md-list-item` attributes.\n */\n get items(): MenuItem[] {\n const listElement = this.listElement;\n\n if (listElement) {\n return listElement.items.filter(el => el.hasAttribute('md-menu-item')) as\n MenuItem[];\n }\n\n return [];\n }\n\n protected override render() {\n return this.renderSurface();\n }\n\n /**\n * Renders the positionable surface element and its contents.\n */\n private renderSurface() {\n // TODO(b/274140618): elevation should be an underlay, not an overlay that\n // tints content\n return html`\n <div\n class=\"menu ${classMap(this.getSurfaceClasses())}\"\n style=${styleMap(this.menuPositionController.surfaceStyles)}\n @focusout=${this.handleFocusout}>\n ${this.renderElevation()}\n ${this.renderList()}\n ${this.renderFocusRing()}\n </div>\n `;\n }\n\n /**\n * Renders the List element and its items\n */\n private renderList() {\n // Needed for closure conformance\n const {ariaLabel} = this as ARIAMixinStrict;\n return html`\n <md-list\n part=\"list\"\n id=\"list\"\n aria-label=${ariaLabel || nothing}\n type=${this.type}\n listTabIndex=${this.listTabIndex}\n @keydown=${this.handleListKeydown}>\n ${this.renderMenuItems()}\n </md-list>`;\n }\n\n /**\n * Renders the menu items' slot\n */\n private renderMenuItems() {\n return html`<slot\n @close-menu=${this.onCloseMenu}\n @deactivate-items=${this.onDeactivateItems}\n @deactivate-typeahead=${this.handleDeactivateTypeahead}\n @activate-typeahead=${this.handleActivateTypeahead}\n @stay-open-on-focusout=${this.handleStayOpenOnFocusout}\n @close-on-focusout=${this.handleCloseOnFocusout}></slot>`;\n }\n\n /**\n * Renders the elevation component.\n */\n private renderElevation() {\n return html`<md-elevation part=\"elevation\"></md-elevation>`;\n }\n\n /**\n * Renders the focus ring component.\n */\n private renderFocusRing() {\n return html`<md-focus-ring part=\"focus-ring\" for=\"list\"></md-focus-ring>`;\n }\n\n private getSurfaceClasses() {\n return {\n open: this.open,\n fixed: this.fixed,\n 'has-overflow': this.hasOverflow,\n };\n }\n\n private async handleFocusout(event: FocusEvent) {\n if (this.stayOpenOnFocusout) {\n return;\n }\n\n // Stop propagation to prevent nested menus from interfering with each other\n event.stopPropagation();\n\n if (event.relatedTarget) {\n // Don't close the menu if we are switching focus between menu,\n // md-menu-item, and md-list\n if (isElementInSubtree(event.relatedTarget, this)) {\n return;\n }\n }\n\n const oldRestoreFocus = this.skipRestoreFocus;\n // allow focus to continue to the next focused object rather than returning\n this.skipRestoreFocus = true;\n this.close();\n // await for close\n await this.updateComplete;\n // return to previous behavior\n this.skipRestoreFocus = oldRestoreFocus;\n }\n\n // Capture so that we can grab the event before it reaches the list item\n // istelf. Specifically useful for the case where typeahead encounters a space\n // and we don't want the menu item to close the menu.\n @eventOptions({capture: true})\n private handleListKeydown(event: KeyboardEvent) {\n if (event.target === this.listElement && !event.defaultPrevented &&\n isClosableKey(event.code)) {\n event.preventDefault();\n this.close();\n }\n\n this.typeaheadController.onKeydown(event);\n }\n\n /**\n * Saves the last focused element focuses the new element based on\n * `defaultFocus`, and animates open.\n */\n private readonly onOpened = () => {\n this.lastFocusedElement = getFocusedElement();\n\n if (!this.listElement) return;\n\n const items = this.listElement.items;\n const activeItemRecord = List.getActiveItem(items);\n\n if (activeItemRecord && this.defaultFocus !== 'NONE') {\n activeItemRecord.item.active = false;\n }\n\n switch (this.defaultFocus) {\n case 'FIRST_ITEM':\n const first = List.getFirstActivatableItem(items);\n if (first) {\n first.active = true;\n }\n break;\n case 'LAST_ITEM':\n const last = List.getLastActivatableItem(items);\n if (last) {\n last.active = true;\n }\n break;\n case 'LIST_ROOT':\n this.listElement?.focus();\n break;\n default:\n case 'NONE':\n // Do nothing.\n break;\n }\n\n if (this.quick) {\n this.dispatchEvent(new Event('opening'));\n this.dispatchEvent(new Event('opened'));\n } else {\n this.animateOpen();\n }\n };\n\n /**\n * Animates closed.\n */\n private readonly beforeClose = async () => {\n this.open = false;\n\n if (!this.skipRestoreFocus) {\n this.lastFocusedElement?.focus?.();\n }\n\n if (!this.quick) {\n await this.animateClose();\n }\n };\n\n /**\n * Focuses the last focused element.\n */\n private readonly onClosed = () => {\n if (this.quick) {\n this.dispatchEvent(new Event('closing'));\n this.dispatchEvent(new Event('closed'));\n }\n };\n\n /**\n * Performs the opening animation:\n *\n * https://direct.googleplex.com/#/spec/295000003+271060003\n */\n private animateOpen() {\n const surfaceEl = this.surfaceEl;\n const slotEl = this.slotEl;\n\n if (!surfaceEl || !slotEl) return;\n\n const openDirection = this.openDirection;\n this.dispatchEvent(new Event('opening'));\n // needs to be imperative because we don't want to mix animation and Lit\n // render timing\n surfaceEl.classList.toggle('animating', true);\n\n const signal = this.openCloseAnimationSignal.start();\n const height = surfaceEl.offsetHeight;\n const openingUpwards = openDirection === 'UP';\n const children = this.items;\n const FULL_DURATION = 500;\n const SURFACE_OPACITY_DURATION = 50;\n const ITEM_OPACITY_DURATION = 250;\n // We want to fit every child fade-in animation within the full duration of\n // the animation.\n const DELAY_BETWEEN_ITEMS =\n (FULL_DURATION - ITEM_OPACITY_DURATION) / children.length;\n\n const surfaceHeightAnimation =\n surfaceEl.animate([{height: '0px'}, {height: `${height}px`}], {\n duration: FULL_DURATION,\n easing: EASING.EMPHASIZED,\n });\n // When we are opening upwards, we want to make sure the last item is always\n // in view, so we need to translate it upwards the opposite direction of the\n // height animation\n const upPositionCorrectionAnimation = slotEl.animate(\n [\n {transform: openingUpwards ? `translateY(-${height}px)` : ''},\n {transform: ''}\n ],\n {duration: FULL_DURATION, easing: EASING.EMPHASIZED});\n\n const surfaceOpacityAnimation = surfaceEl.animate(\n [{opacity: 0}, {opacity: 1}], SURFACE_OPACITY_DURATION);\n\n const childrenAnimations: Array<[HTMLElement, Animation]> = [];\n\n for (let i = 0; i < children.length; i++) {\n // If we are animating upwards, then reverse the children list.\n const directionalIndex = openingUpwards ? children.length - 1 - i : i;\n const child = children[directionalIndex];\n const animation = child.animate([{opacity: 0}, {opacity: 1}], {\n duration: ITEM_OPACITY_DURATION,\n delay: DELAY_BETWEEN_ITEMS * i,\n });\n\n // Make them all initially hidden and then clean up at the end of each\n // animation.\n child.classList.toggle('hidden', true);\n animation.addEventListener('finish', () => {\n child.classList.toggle('hidden', false);\n });\n\n childrenAnimations.push([child, animation]);\n }\n\n signal.addEventListener('abort', () => {\n surfaceHeightAnimation.cancel();\n upPositionCorrectionAnimation.cancel();\n surfaceOpacityAnimation.cancel();\n childrenAnimations.forEach(([child, animation]) => {\n child.classList.toggle('hidden', false);\n animation.cancel();\n });\n });\n\n surfaceHeightAnimation.addEventListener('finish', () => {\n surfaceEl.classList.toggle('animating', false);\n this.openCloseAnimationSignal.finish();\n this.dispatchEvent(new Event('opened'));\n });\n }\n\n /**\n * Performs the closing animation:\n *\n * https://direct.googleplex.com/#/spec/295000003+271060003\n */\n private animateClose() {\n let resolve!: (value: unknown) => void;\n let reject!: () => void;\n\n // This promise blocks the surface position controller from setting\n // display: none on the surface which will interfere with this animation.\n const animationEnded = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n const surfaceEl = this.surfaceEl;\n const slotEl = this.slotEl;\n\n if (!surfaceEl || !slotEl) {\n reject();\n return animationEnded;\n }\n\n const openDirection = this.openDirection;\n const closingDownwards = openDirection === 'UP';\n this.dispatchEvent(new Event('closing'));\n // needs to be imperative because we don't want to mix animation and Lit\n // render timing\n surfaceEl.classList.toggle('animating', true);\n const signal = this.openCloseAnimationSignal.start();\n const height = surfaceEl.offsetHeight;\n const children = this.items;\n const FULL_DURATION = 150;\n const SURFACE_OPACITY_DURATION = 50;\n // The surface fades away at the very end\n const SURFACE_OPACITY_DELAY = FULL_DURATION - SURFACE_OPACITY_DURATION;\n const ITEM_OPACITY_DURATION = 50;\n const ITEM_OPACITY_INITIAL_DELAY = 50;\n const END_HEIGHT_PERCENTAGE = .35;\n\n // We want to fit every child fade-out animation within the full duration of\n // the animation.\n const DELAY_BETWEEN_ITEMS =\n (FULL_DURATION - ITEM_OPACITY_INITIAL_DELAY - ITEM_OPACITY_DURATION) /\n children.length;\n\n // The mock has the animation shrink to 35%\n const surfaceHeightAnimation = surfaceEl.animate(\n [\n {height: `${height}px`},\n {height: `${height * END_HEIGHT_PERCENTAGE}px`}\n ],\n {\n duration: FULL_DURATION,\n easing: EASING.EMPHASIZED_ACCELERATE,\n });\n\n // When we are closing downwards, we want to make sure the last item is\n // always in view, so we need to translate it upwards the opposite direction\n // of the height animation\n const downPositionCorrectionAnimation = slotEl.animate(\n [\n {transform: ''}, {\n transform: closingDownwards ?\n `translateY(-${height * (1 - END_HEIGHT_PERCENTAGE)}px)` :\n ''\n }\n ],\n {duration: FULL_DURATION, easing: EASING.EMPHASIZED_ACCELERATE});\n\n const surfaceOpacityAnimation = surfaceEl.animate(\n [{opacity: 1}, {opacity: 0}],\n {duration: SURFACE_OPACITY_DURATION, delay: SURFACE_OPACITY_DELAY});\n\n const childrenAnimations: Array<[HTMLElement, Animation]> = [];\n\n for (let i = 0; i < children.length; i++) {\n // If the animation is closing upwards, then reverse the list of\n // children so that we animate in the opposite direction.\n const directionalIndex = closingDownwards ? i : children.length - 1 - i;\n const child = children[directionalIndex];\n const animation = child.animate([{opacity: 1}, {opacity: 0}], {\n duration: ITEM_OPACITY_DURATION,\n delay: ITEM_OPACITY_INITIAL_DELAY + DELAY_BETWEEN_ITEMS * i,\n });\n\n // Make sure the items stay hidden at the end of each child animation.\n // We clean this up at the end of the overall animation.\n animation.addEventListener('finish', () => {\n child.classList.toggle('hidden', true);\n });\n childrenAnimations.push([child, animation]);\n }\n\n signal.addEventListener('abort', () => {\n surfaceHeightAnimation.cancel();\n downPositionCorrectionAnimation.cancel();\n surfaceOpacityAnimation.cancel();\n childrenAnimations.forEach(([child, animation]) => {\n animation.cancel();\n child.classList.toggle('hidden', false);\n });\n reject();\n });\n\n surfaceHeightAnimation.addEventListener('finish', () => {\n surfaceEl.classList.toggle('animating', false);\n childrenAnimations.forEach(([child]) => {\n child.classList.toggle('hidden', false);\n });\n this.openCloseAnimationSignal.finish();\n this.dispatchEvent(new Event('closed'));\n resolve(true);\n });\n\n return animationEnded;\n }\n\n override connectedCallback() {\n super.connectedCallback();\n if (!isServer) {\n window.addEventListener('click', this.onWindowClick, {capture: true});\n }\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n if (!isServer) {\n window.removeEventListener('click', this.onWindowClick, {capture: true});\n }\n }\n\n private readonly onWindowClick = (event: MouseEvent) => {\n if (!this.stayOpenOnOutsideClick && !event.composedPath().includes(this)) {\n this.open = false;\n }\n };\n\n private onCloseMenu() {\n this.close();\n }\n\n private onDeactivateItems(event: Event) {\n event.stopPropagation();\n const items = this.items;\n for (const item of items) {\n item.active = false;\n item.selected = false;\n }\n }\n\n private handleDeactivateTypeahead(event: DeactivateTypeaheadEvent) {\n // stopPropagation so that this does not deactivate any typeaheads in menus\n // nested above it e.g. md-sub-menu-item\n event.stopPropagation();\n this.typeaheadActive = false;\n }\n\n private handleActivateTypeahead(event: ActivateTypeaheadEvent) {\n // stopPropagation so that this does not activate any typeaheads in menus\n // nested above it e.g. md-sub-menu-item\n event.stopPropagation();\n this.typeaheadActive = true;\n }\n\n private handleStayOpenOnFocusout(event: Event) {\n event.stopPropagation();\n this.stayOpenOnFocusout = true;\n }\n\n private handleCloseOnFocusout(event: Event) {\n event.stopPropagation();\n this.stayOpenOnFocusout = false;\n }\n\n override focus() {\n this.listElement?.focus();\n }\n\n close() {\n this.open = false;\n this.items.forEach(item => {\n item.close?.();\n });\n }\n\n show() {\n this.open = true;\n }\n\n /**\n * Activates the next item in the menu. If at the end of the menu, the first\n * item will be activated.\n *\n * @return The activated menu item or `null` if there are no items.\n */\n activateNextItem() {\n return this.listElement?.activateNextItem() as MenuItem ?? null;\n }\n\n /**\n * Activates the previous item in the menu. If at the start of the menu, the\n * last item will be activated.\n *\n * @return The activated menu item or `null` if there are no items.\n */\n activatePreviousItem() {\n return this.listElement?.activatePreviousItem() as MenuItem ?? null;\n }\n}\n"]}
@@ -47,7 +47,7 @@
47
47
  }
48
48
 
49
49
  // Set the ripple opacity to 0 if there is a submenu that is hovered.
50
- .list-item:has(.submenu:hover) {
50
+ .submenu-hover {
51
51
  // Have to use ripple theme directly because :has selector in this case does
52
52
  // not work in this case with the :has selector, thus we cannot override the
53
53
  // custom props set in :host
@@ -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 `@media(forced-colors: active){.list-item{position:relative}:host([selected]) .list-item:not(:has(.focus-ring[visible]))::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}/*# sourceMappingURL=forced-colors-styles.css.map */
7
+ export const styles = css `@media(forced-colors: active){.list-item{position:relative}:host([selected]) .list-item:not(.has-focus-ring)::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}/*# sourceMappingURL=forced-colors-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=forced-colors-styles.css.js.map