@material/web 1.0.0-pre.3 → 1.0.0-pre.5

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 (636) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +41 -41
  3. package/badge/lib/_badge.scss +2 -10
  4. package/button/lib/_elevated-button.scss +5 -30
  5. package/button/lib/_elevation.scss +1 -16
  6. package/button/lib/_filled-button.scss +4 -31
  7. package/button/lib/_icon.scss +1 -0
  8. package/button/lib/_outlined-button.scss +6 -23
  9. package/button/lib/_shared.scss +20 -54
  10. package/button/lib/_text-button.scss +8 -34
  11. package/button/lib/_tonal-button.scss +5 -28
  12. package/button/lib/button.d.ts +2 -0
  13. package/button/lib/button.js +5 -1
  14. package/button/lib/button.js.map +1 -1
  15. package/button/lib/elevated-styles.css.js +1 -1
  16. package/button/lib/elevated-styles.css.js.map +1 -1
  17. package/button/lib/filled-styles.css.js +1 -1
  18. package/button/lib/filled-styles.css.js.map +1 -1
  19. package/button/lib/outlined-styles.css.js +1 -1
  20. package/button/lib/outlined-styles.css.js.map +1 -1
  21. package/button/lib/shared-styles.css.js +1 -1
  22. package/button/lib/shared-styles.css.js.map +1 -1
  23. package/button/lib/text-styles.css.js +1 -1
  24. package/button/lib/text-styles.css.js.map +1 -1
  25. package/button/lib/tonal-styles.css.js +1 -1
  26. package/button/lib/tonal-styles.css.js.map +1 -1
  27. package/checkbox/lib/_checkbox.scss +1 -2
  28. package/checkbox/lib/checkbox-styles.css.js +1 -1
  29. package/checkbox/lib/checkbox-styles.css.js.map +1 -1
  30. package/chips/_assist-chip.scss +6 -0
  31. package/chips/_suggestion-chip.scss +6 -0
  32. package/chips/assist-chip.d.ts +20 -0
  33. package/chips/assist-chip.js +24 -0
  34. package/chips/assist-chip.js.map +1 -0
  35. package/chips/lib/_assist-chip.scss +27 -0
  36. package/chips/lib/_shared.scss +183 -0
  37. package/chips/lib/_suggestion-chip.scss +30 -0
  38. package/chips/lib/assist-chip.d.ts +11 -0
  39. package/chips/lib/assist-chip.js +12 -0
  40. package/chips/lib/assist-chip.js.map +1 -0
  41. package/chips/lib/assist-styles.css.js +9 -0
  42. package/chips/lib/assist-styles.css.js.map +1 -0
  43. package/{list/lib/listitem/list-item-private-styles.scss → chips/lib/assist-styles.scss} +2 -2
  44. package/chips/lib/chip.d.ts +29 -0
  45. package/chips/lib/chip.js +110 -0
  46. package/chips/lib/chip.js.map +1 -0
  47. package/chips/lib/shared-styles.css.js +9 -0
  48. package/chips/lib/shared-styles.css.js.map +1 -0
  49. package/{autocomplete → chips}/lib/shared-styles.scss +1 -1
  50. package/chips/lib/suggestion-chip.d.ts +11 -0
  51. package/chips/lib/suggestion-chip.js +12 -0
  52. package/chips/lib/suggestion-chip.js.map +1 -0
  53. package/chips/lib/suggestion-styles.css.js +9 -0
  54. package/chips/lib/suggestion-styles.css.js.map +1 -0
  55. package/{menu/lib/menuitem/menu-item-private-styles.scss → chips/lib/suggestion-styles.scss} +2 -2
  56. package/chips/suggestion-chip.d.ts +20 -0
  57. package/chips/suggestion-chip.js +24 -0
  58. package/chips/suggestion-chip.js.map +1 -0
  59. package/controller/form-controller.d.ts +1 -1
  60. package/controller/form-controller.js +21 -29
  61. package/controller/form-controller.js.map +1 -1
  62. package/dialog/lib/_dialog.scss +7 -5
  63. package/dialog/lib/_tokens.scss +1 -2
  64. package/dialog/lib/dialog-styles.css.js +1 -1
  65. package/dialog/lib/dialog-styles.css.js.map +1 -1
  66. package/dialog/lib/dialog.js +1 -1
  67. package/dialog/lib/dialog.js.map +1 -1
  68. package/elevation/lib/_elevation.scss +1 -21
  69. package/elevation/lib/elevation-styles.css.js +1 -1
  70. package/elevation/lib/elevation-styles.css.js.map +1 -1
  71. package/fab/lib/_fab-extended.scss +3 -10
  72. package/fab/lib/_fab.scss +0 -3
  73. package/fab/lib/_shared.scss +3 -25
  74. package/fab/lib/fab-extended-styles.css.js +1 -1
  75. package/fab/lib/fab-extended-styles.css.js.map +1 -1
  76. package/fab/lib/fab-shared-styles.css.js +1 -1
  77. package/fab/lib/fab-shared-styles.css.js.map +1 -1
  78. package/fab/lib/fab-shared.d.ts +0 -1
  79. package/fab/lib/fab-shared.js +1 -7
  80. package/fab/lib/fab-shared.js.map +1 -1
  81. package/field/lib/_content.scss +91 -13
  82. package/field/lib/_filled-field.scss +19 -57
  83. package/field/lib/_label.scss +1 -2
  84. package/field/lib/_md-comp-filled-field.scss +123 -64
  85. package/field/lib/_md-comp-outlined-field.scss +100 -59
  86. package/field/lib/_outlined-field.scss +13 -11
  87. package/field/lib/_shared.scss +21 -17
  88. package/field/lib/field.d.ts +6 -2
  89. package/field/lib/field.js +80 -62
  90. package/field/lib/field.js.map +1 -1
  91. package/field/lib/filled-field.d.ts +0 -5
  92. package/field/lib/filled-field.js +2 -41
  93. package/field/lib/filled-field.js.map +1 -1
  94. package/field/lib/filled-styles.css.js +1 -1
  95. package/field/lib/filled-styles.css.js.map +1 -1
  96. package/field/lib/outlined-field.js +1 -1
  97. package/field/lib/outlined-field.js.map +1 -1
  98. package/field/lib/outlined-styles.css.js +1 -1
  99. package/field/lib/outlined-styles.css.js.map +1 -1
  100. package/field/lib/shared-styles.css.js +1 -1
  101. package/field/lib/shared-styles.css.js.map +1 -1
  102. package/focus/lib/_focus-ring.scss +13 -7
  103. package/focus/lib/_md-comp-focus-ring.scss +1 -2
  104. package/focus/lib/focus-ring-styles.css.js +1 -1
  105. package/focus/lib/focus-ring-styles.css.js.map +1 -1
  106. package/icon/lib/_icon.scss +1 -1
  107. package/icon/lib/_md-comp-icon.scss +1 -2
  108. package/icon/lib/icon-styles.css.js +1 -1
  109. package/icon/lib/icon-styles.css.js.map +1 -1
  110. package/iconbutton/lib/_filled-icon-button.scss +1 -12
  111. package/iconbutton/lib/_filled-tonal-icon-button.scss +1 -12
  112. package/iconbutton/lib/_outlined-icon-button.scss +1 -13
  113. package/iconbutton/lib/_shared.scss +10 -6
  114. package/iconbutton/lib/_standard-icon-button.scss +5 -12
  115. package/iconbutton/lib/filled-styles.css.js +1 -1
  116. package/iconbutton/lib/filled-styles.css.js.map +1 -1
  117. package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
  118. package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
  119. package/iconbutton/lib/icon-button.js +0 -2
  120. package/iconbutton/lib/icon-button.js.map +1 -1
  121. package/iconbutton/lib/outlined-styles.css.js +1 -1
  122. package/iconbutton/lib/outlined-styles.css.js.map +1 -1
  123. package/iconbutton/lib/shared-styles.css.js +1 -1
  124. package/iconbutton/lib/shared-styles.css.js.map +1 -1
  125. package/iconbutton/lib/standard-styles.css.js +1 -1
  126. package/iconbutton/lib/standard-styles.css.js.map +1 -1
  127. package/list/lib/_list.scss +34 -17
  128. package/list/lib/list-styles.css.js +1 -1
  129. package/list/lib/list-styles.css.js.map +1 -1
  130. package/list/lib/listitem/_list-item.scss +312 -124
  131. package/list/lib/listitem/list-item-styles.css.js +1 -1
  132. package/list/lib/listitem/list-item-styles.css.js.map +1 -1
  133. package/list/lib/listitem/list-item.d.ts +8 -6
  134. package/list/lib/listitem/list-item.js +26 -27
  135. package/list/lib/listitem/list-item.js.map +1 -1
  136. package/list/list-item-link.d.ts +18 -0
  137. package/list/list-item-link.js +19 -2
  138. package/list/list-item-link.js.map +1 -1
  139. package/list/list-item.d.ts +19 -0
  140. package/list/list-item.js +20 -2
  141. package/list/list-item.js.map +1 -1
  142. package/menu/lib/_menu.scss +26 -8
  143. package/menu/lib/menu-styles.css.js +1 -1
  144. package/menu/lib/menu-styles.css.js.map +1 -1
  145. package/menu/lib/menu.d.ts +22 -9
  146. package/menu/lib/menu.js +76 -27
  147. package/menu/lib/menu.js.map +1 -1
  148. package/menu/lib/menuitem/_menu-item.scss +39 -79
  149. package/menu/lib/menuitem/menu-item-styles.css.js +1 -1
  150. package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -1
  151. package/menu/lib/menuitem/menu-item.js +1 -1
  152. package/menu/lib/menuitem/menu-item.js.map +1 -1
  153. package/menu/lib/menuitemlink/menu-item-link.js +2 -1
  154. package/menu/lib/menuitemlink/menu-item-link.js.map +1 -1
  155. package/menu/lib/shared.d.ts +16 -0
  156. package/menu/lib/shared.js +16 -0
  157. package/menu/lib/shared.js.map +1 -1
  158. package/menu/lib/submenuitem/sub-menu-item.d.ts +4 -1
  159. package/menu/lib/submenuitem/sub-menu-item.js +9 -3
  160. package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
  161. package/menu/lib/surfacePositionController.d.ts +10 -2
  162. package/menu/lib/surfacePositionController.js +6 -2
  163. package/menu/lib/surfacePositionController.js.map +1 -1
  164. package/menu/lib/typeaheadController.d.ts +5 -0
  165. package/menu/lib/typeaheadController.js +7 -3
  166. package/menu/lib/typeaheadController.js.map +1 -1
  167. package/menu/menu-item-link.js +1 -2
  168. package/menu/menu-item-link.js.map +1 -1
  169. package/menu/menu-item.js +2 -3
  170. package/menu/menu-item.js.map +1 -1
  171. package/menu/sub-menu-item.js +1 -2
  172. package/menu/sub-menu-item.js.map +1 -1
  173. package/navigationbar/lib/_navigation-bar.scss +1 -4
  174. package/navigationdrawer/lib/_navigation-drawer-modal.scss +0 -3
  175. package/navigationdrawer/lib/_navigation-drawer.scss +0 -3
  176. package/navigationdrawer/lib/_shared.scss +0 -9
  177. package/navigationtab/lib/_navigation-tab.scss +4 -10
  178. package/navigationtab/lib/navigation-tab-styles.css.js +1 -1
  179. package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -1
  180. package/package.json +1 -1
  181. package/radio/lib/_radio.scss +1 -2
  182. package/radio/lib/radio-styles.css.js +1 -1
  183. package/radio/lib/radio-styles.css.js.map +1 -1
  184. package/segmentedbutton/lib/_shared.scss +0 -2
  185. package/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
  186. package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
  187. package/slider/lib/_slider.scss +1 -4
  188. package/slider/lib/_tokens.scss +2 -8
  189. package/slider/lib/slider-styles.css.js +1 -1
  190. package/slider/lib/slider-styles.css.js.map +1 -1
  191. package/textfield/lib/_filled-text-field.scss +99 -103
  192. package/textfield/lib/_icon.scss +11 -55
  193. package/textfield/lib/_input.scss +4 -6
  194. package/textfield/lib/_outlined-text-field.scss +88 -95
  195. package/textfield/lib/filled-styles.css.js +1 -1
  196. package/textfield/lib/filled-styles.css.js.map +1 -1
  197. package/textfield/lib/outlined-styles.css.js +1 -1
  198. package/textfield/lib/outlined-styles.css.js.map +1 -1
  199. package/textfield/lib/shared-styles.css.js +1 -1
  200. package/textfield/lib/shared-styles.css.js.map +1 -1
  201. package/tokens/_index.scss +101 -2
  202. package/tokens/_md-comp-assist-chip.scss +68 -0
  203. package/tokens/_md-comp-badge.scss +34 -0
  204. package/tokens/_md-comp-banner.scss +23 -0
  205. package/tokens/_md-comp-bottom-app-bar.scss +21 -0
  206. package/tokens/_md-comp-carousel-item.scss +23 -0
  207. package/tokens/_md-comp-checkbox.scss +21 -0
  208. package/tokens/_md-comp-circular-progress-indicator.scss +22 -0
  209. package/tokens/_md-comp-data-table.scss +23 -0
  210. package/tokens/_md-comp-date-input-modal.scss +23 -0
  211. package/tokens/_md-comp-date-picker-docked.scss +25 -0
  212. package/tokens/_md-comp-date-picker-modal.scss +25 -0
  213. package/tokens/_md-comp-dialog.scss +43 -0
  214. package/tokens/_md-comp-divider.scss +17 -0
  215. package/tokens/_md-comp-elevated-button.scss +58 -0
  216. package/tokens/_md-comp-elevated-card.scss +23 -0
  217. package/tokens/_md-comp-extended-fab-branded.scss +38 -0
  218. package/tokens/_md-comp-extended-fab-primary.scss +38 -0
  219. package/tokens/_md-comp-extended-fab-secondary.scss +41 -0
  220. package/tokens/_md-comp-extended-fab-surface.scss +38 -0
  221. package/tokens/_md-comp-extended-fab-tertiary.scss +41 -0
  222. package/tokens/_md-comp-fab-branded-large.scss +23 -0
  223. package/tokens/_md-comp-fab-branded.scss +23 -0
  224. package/tokens/_md-comp-fab-primary-large.scss +23 -0
  225. package/tokens/_md-comp-fab-primary-small.scss +23 -0
  226. package/tokens/_md-comp-fab-primary.scss +23 -0
  227. package/tokens/_md-comp-fab-secondary-large.scss +23 -0
  228. package/tokens/_md-comp-fab-secondary-small.scss +23 -0
  229. package/tokens/_md-comp-fab-secondary.scss +23 -0
  230. package/tokens/_md-comp-fab-surface-large.scss +23 -0
  231. package/tokens/_md-comp-fab-surface-small.scss +23 -0
  232. package/tokens/_md-comp-fab-surface.scss +23 -0
  233. package/tokens/_md-comp-fab-tertiary-large.scss +23 -0
  234. package/tokens/_md-comp-fab-tertiary-small.scss +23 -0
  235. package/tokens/_md-comp-fab-tertiary.scss +23 -0
  236. package/tokens/_md-comp-filled-autocomplete.scss +25 -0
  237. package/tokens/_md-comp-filled-button.scss +58 -0
  238. package/tokens/_md-comp-filled-card.scss +23 -0
  239. package/tokens/_md-comp-filled-icon-button.scss +21 -0
  240. package/tokens/_md-comp-filled-menu-button.scss +25 -0
  241. package/tokens/_md-comp-filled-select.scss +25 -0
  242. package/tokens/_md-comp-filled-text-field.scss +46 -0
  243. package/tokens/_md-comp-filled-tonal-button.scss +59 -0
  244. package/tokens/_md-comp-filled-tonal-icon-button.scss +24 -0
  245. package/tokens/_md-comp-filter-chip.scss +38 -0
  246. package/tokens/_md-comp-full-screen-dialog.scss +25 -0
  247. package/tokens/_md-comp-icon-button.scss +21 -0
  248. package/tokens/_md-comp-input-chip.scss +38 -0
  249. package/tokens/_md-comp-linear-progress-indicator.scss +22 -0
  250. package/tokens/_md-comp-list.scss +58 -0
  251. package/tokens/_md-comp-menu.scss +21 -0
  252. package/tokens/_md-comp-navigation-bar.scss +25 -0
  253. package/tokens/_md-comp-navigation-drawer.scss +25 -0
  254. package/tokens/_md-comp-navigation-rail.scss +25 -0
  255. package/tokens/_md-comp-outlined-autocomplete.scss +28 -0
  256. package/tokens/_md-comp-outlined-button.scss +56 -0
  257. package/tokens/_md-comp-outlined-card.scss +23 -0
  258. package/tokens/_md-comp-outlined-icon-button.scss +21 -0
  259. package/tokens/_md-comp-outlined-menu-button.scss +23 -0
  260. package/tokens/_md-comp-outlined-segmented-button.scss +38 -0
  261. package/tokens/_md-comp-outlined-select.scss +25 -0
  262. package/tokens/_md-comp-outlined-text-field.scss +44 -0
  263. package/tokens/_md-comp-plain-tooltip.scss +21 -0
  264. package/tokens/_md-comp-primary-navigation-tab.scss +41 -0
  265. package/tokens/_md-comp-radio-button.scss +19 -0
  266. package/tokens/_md-comp-rich-tooltip.scss +25 -0
  267. package/tokens/_md-comp-scrim.scss +17 -0
  268. package/tokens/_md-comp-search-bar.scss +25 -0
  269. package/tokens/_md-comp-search-view.scss +23 -0
  270. package/tokens/_md-comp-secondary-navigation-tab.scss +41 -0
  271. package/tokens/_md-comp-sheet-bottom.scss +21 -0
  272. package/tokens/_md-comp-sheet-floating.scss +21 -0
  273. package/tokens/_md-comp-sheet-side.scss +25 -0
  274. package/tokens/_md-comp-slider.scss +38 -0
  275. package/tokens/_md-comp-snackbar.scss +25 -0
  276. package/tokens/_md-comp-standard-menu-button.scss +23 -0
  277. package/tokens/_md-comp-suggestion-chip.scss +72 -0
  278. package/tokens/_md-comp-switch.scss +21 -0
  279. package/tokens/_md-comp-text-button.scss +56 -0
  280. package/tokens/_md-comp-time-input.scss +25 -0
  281. package/tokens/_md-comp-time-picker.scss +25 -0
  282. package/tokens/_md-comp-top-app-bar-large.scss +23 -0
  283. package/tokens/_md-comp-top-app-bar-medium.scss +23 -0
  284. package/tokens/_md-comp-top-app-bar-small-centered.scss +26 -0
  285. package/tokens/_md-comp-top-app-bar-small.scss +23 -0
  286. package/tokens/_md-ref-palette.scss +12 -0
  287. package/tokens/_md-ref-typeface.scss +12 -0
  288. package/tokens/_md-sys-color.scss +25 -0
  289. package/tokens/_md-sys-elevation.scss +30 -0
  290. package/tokens/_md-sys-motion.scss +12 -0
  291. package/tokens/_md-sys-shape.scss +12 -0
  292. package/tokens/_md-sys-state.scss +12 -0
  293. package/tokens/_md-sys-typescale.scss +17 -0
  294. package/tokens/{v0_160 → v0_161}/_md-comp-assist-chip.scss +1 -1
  295. package/tokens/{v0_160 → v0_161}/_md-comp-badge.scss +1 -1
  296. package/tokens/{v0_160 → v0_161}/_md-comp-banner.scss +1 -1
  297. package/tokens/{v0_160 → v0_161}/_md-comp-bottom-app-bar.scss +1 -1
  298. package/tokens/{v0_160 → v0_161}/_md-comp-carousel-item.scss +1 -1
  299. package/tokens/{v0_160 → v0_161}/_md-comp-checkbox.scss +1 -1
  300. package/tokens/{v0_160 → v0_161}/_md-comp-circular-progress-indicator.scss +1 -1
  301. package/tokens/{v0_160 → v0_161}/_md-comp-data-table.scss +1 -1
  302. package/tokens/{v0_160 → v0_161}/_md-comp-date-input-modal.scss +1 -1
  303. package/tokens/{v0_160 → v0_161}/_md-comp-date-picker-docked.scss +1 -1
  304. package/tokens/{v0_160 → v0_161}/_md-comp-date-picker-modal.scss +3 -3
  305. package/tokens/{v0_160 → v0_161}/_md-comp-dialog.scss +1 -1
  306. package/tokens/{v0_160 → v0_161}/_md-comp-divider.scss +1 -1
  307. package/tokens/{v0_160 → v0_161}/_md-comp-elevated-button.scss +1 -1
  308. package/tokens/{v0_160 → v0_161}/_md-comp-elevated-card.scss +1 -1
  309. package/tokens/{v0_160 → v0_161}/_md-comp-extended-fab-branded.scss +1 -1
  310. package/tokens/{v0_160 → v0_161}/_md-comp-extended-fab-primary.scss +1 -1
  311. package/tokens/{v0_160 → v0_161}/_md-comp-extended-fab-secondary.scss +1 -1
  312. package/tokens/{v0_160 → v0_161}/_md-comp-extended-fab-surface.scss +1 -1
  313. package/tokens/{v0_160 → v0_161}/_md-comp-extended-fab-tertiary.scss +1 -1
  314. package/tokens/{v0_160 → v0_161}/_md-comp-fab-branded-large.scss +1 -1
  315. package/tokens/{v0_160 → v0_161}/_md-comp-fab-branded.scss +1 -1
  316. package/tokens/{v0_160 → v0_161}/_md-comp-fab-primary-large.scss +1 -1
  317. package/tokens/{v0_160 → v0_161}/_md-comp-fab-primary-small.scss +1 -1
  318. package/tokens/{v0_160 → v0_161}/_md-comp-fab-primary.scss +1 -1
  319. package/tokens/{v0_160 → v0_161}/_md-comp-fab-secondary-large.scss +1 -1
  320. package/tokens/{v0_160 → v0_161}/_md-comp-fab-secondary-small.scss +1 -1
  321. package/tokens/{v0_160 → v0_161}/_md-comp-fab-secondary.scss +1 -1
  322. package/tokens/{v0_160 → v0_161}/_md-comp-fab-surface-large.scss +1 -1
  323. package/tokens/{v0_160 → v0_161}/_md-comp-fab-surface-small.scss +1 -1
  324. package/tokens/{v0_160 → v0_161}/_md-comp-fab-surface.scss +1 -1
  325. package/tokens/{v0_160 → v0_161}/_md-comp-fab-tertiary-large.scss +1 -1
  326. package/tokens/{v0_160 → v0_161}/_md-comp-fab-tertiary-small.scss +1 -1
  327. package/tokens/{v0_160 → v0_161}/_md-comp-fab-tertiary.scss +1 -1
  328. package/tokens/{v0_160 → v0_161}/_md-comp-filled-autocomplete.scss +1 -1
  329. package/tokens/{v0_160 → v0_161}/_md-comp-filled-button.scss +1 -1
  330. package/tokens/{v0_160 → v0_161}/_md-comp-filled-card.scss +1 -1
  331. package/tokens/{v0_160 → v0_161}/_md-comp-filled-icon-button.scss +1 -1
  332. package/tokens/{v0_160 → v0_161}/_md-comp-filled-menu-button.scss +1 -1
  333. package/tokens/{v0_160 → v0_161}/_md-comp-filled-select.scss +1 -1
  334. package/tokens/{v0_160 → v0_161}/_md-comp-filled-text-field.scss +1 -1
  335. package/tokens/{v0_160 → v0_161}/_md-comp-filled-tonal-button.scss +1 -1
  336. package/tokens/{v0_160 → v0_161}/_md-comp-filled-tonal-icon-button.scss +1 -1
  337. package/tokens/{v0_160 → v0_161}/_md-comp-filter-chip.scss +1 -1
  338. package/tokens/{v0_160 → v0_161}/_md-comp-full-screen-dialog.scss +1 -1
  339. package/tokens/{v0_160 → v0_161}/_md-comp-icon-button.scss +1 -1
  340. package/tokens/{v0_160 → v0_161}/_md-comp-input-chip.scss +1 -1
  341. package/tokens/{v0_160 → v0_161}/_md-comp-linear-progress-indicator.scss +1 -1
  342. package/tokens/{v0_160 → v0_161}/_md-comp-list.scss +1 -1
  343. package/tokens/v0_161/_md-comp-menu.scss +37 -0
  344. package/tokens/{v0_160 → v0_161}/_md-comp-navigation-bar.scss +1 -1
  345. package/tokens/{v0_160 → v0_161}/_md-comp-navigation-drawer.scss +1 -1
  346. package/tokens/{v0_160 → v0_161}/_md-comp-navigation-rail.scss +1 -1
  347. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-autocomplete.scss +1 -1
  348. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-button.scss +1 -1
  349. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-card.scss +1 -1
  350. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-icon-button.scss +1 -1
  351. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-menu-button.scss +1 -1
  352. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-segmented-button.scss +1 -1
  353. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-select.scss +1 -1
  354. package/tokens/{v0_160 → v0_161}/_md-comp-outlined-text-field.scss +1 -1
  355. package/tokens/{v0_160 → v0_161}/_md-comp-plain-tooltip.scss +1 -1
  356. package/tokens/{v0_160 → v0_161}/_md-comp-primary-navigation-tab.scss +1 -1
  357. package/tokens/{v0_160 → v0_161}/_md-comp-radio-button.scss +1 -1
  358. package/tokens/{v0_160 → v0_161}/_md-comp-rich-tooltip.scss +1 -1
  359. package/tokens/{v0_160 → v0_161}/_md-comp-scrim.scss +1 -1
  360. package/tokens/{v0_160 → v0_161}/_md-comp-search-bar.scss +1 -1
  361. package/tokens/{v0_160 → v0_161}/_md-comp-search-view.scss +1 -1
  362. package/tokens/{v0_160 → v0_161}/_md-comp-secondary-navigation-tab.scss +1 -1
  363. package/tokens/{v0_160 → v0_161}/_md-comp-sheet-bottom.scss +1 -1
  364. package/tokens/{v0_160 → v0_161}/_md-comp-sheet-floating.scss +1 -1
  365. package/tokens/{v0_160 → v0_161}/_md-comp-sheet-side.scss +1 -1
  366. package/tokens/{v0_160 → v0_161}/_md-comp-slider.scss +1 -1
  367. package/tokens/{v0_160 → v0_161}/_md-comp-snackbar.scss +1 -1
  368. package/tokens/{v0_160 → v0_161}/_md-comp-standard-menu-button.scss +1 -1
  369. package/tokens/{v0_160 → v0_161}/_md-comp-suggestion-chip.scss +1 -1
  370. package/tokens/{v0_160 → v0_161}/_md-comp-switch.scss +1 -1
  371. package/tokens/{v0_160 → v0_161}/_md-comp-text-button.scss +1 -1
  372. package/tokens/{v0_160 → v0_161}/_md-comp-time-input.scss +1 -1
  373. package/tokens/{v0_160 → v0_161}/_md-comp-time-picker.scss +1 -1
  374. package/tokens/{v0_160 → v0_161}/_md-comp-top-app-bar-large.scss +1 -1
  375. package/tokens/{v0_160 → v0_161}/_md-comp-top-app-bar-medium.scss +1 -1
  376. package/tokens/{v0_160 → v0_161}/_md-comp-top-app-bar-small-centered.scss +1 -1
  377. package/tokens/{v0_160 → v0_161}/_md-comp-top-app-bar-small.scss +1 -1
  378. package/tokens/{v0_160 → v0_161}/_md-ref-palette.scss +1 -1
  379. package/tokens/{v0_160 → v0_161}/_md-ref-typeface.scss +1 -1
  380. package/tokens/{v0_160 → v0_161}/_md-sys-color.scss +1 -1
  381. package/tokens/{v0_160 → v0_161}/_md-sys-elevation.scss +1 -1
  382. package/tokens/{v0_160 → v0_161}/_md-sys-motion.scss +1 -1
  383. package/tokens/{v0_160 → v0_161}/_md-sys-shape.scss +1 -1
  384. package/tokens/{v0_160 → v0_161}/_md-sys-state.scss +1 -1
  385. package/tokens/{v0_160 → v0_161}/_md-sys-typescale.scss +1 -1
  386. package/autocomplete/_filled-autocomplete.scss +0 -6
  387. package/autocomplete/_outlined-autocomplete.scss +0 -6
  388. package/autocomplete/autocomplete-item.d.ts +0 -19
  389. package/autocomplete/autocomplete-item.js +0 -22
  390. package/autocomplete/autocomplete-item.js.map +0 -1
  391. package/autocomplete/autocomplete-list.d.ts +0 -19
  392. package/autocomplete/autocomplete-list.js +0 -23
  393. package/autocomplete/autocomplete-list.js.map +0 -1
  394. package/autocomplete/autocomplete-surface.d.ts +0 -19
  395. package/autocomplete/autocomplete-surface.js +0 -23
  396. package/autocomplete/autocomplete-surface.js.map +0 -1
  397. package/autocomplete/filled-autocomplete.d.ts +0 -28
  398. package/autocomplete/filled-autocomplete.js +0 -46
  399. package/autocomplete/filled-autocomplete.js.map +0 -1
  400. package/autocomplete/lib/_filled-autocomplete.scss +0 -189
  401. package/autocomplete/lib/_outlined-autocomplete.scss +0 -178
  402. package/autocomplete/lib/_shared.scss +0 -25
  403. package/autocomplete/lib/autocomplete.d.ts +0 -54
  404. package/autocomplete/lib/autocomplete.js +0 -265
  405. package/autocomplete/lib/autocomplete.js.map +0 -1
  406. package/autocomplete/lib/autocompleteitem/autocomplete-item.d.ts +0 -11
  407. package/autocomplete/lib/autocompleteitem/autocomplete-item.js +0 -14
  408. package/autocomplete/lib/autocompleteitem/autocomplete-item.js.map +0 -1
  409. package/autocomplete/lib/autocompleteitem/harness.d.ts +0 -11
  410. package/autocomplete/lib/autocompleteitem/harness.js +0 -12
  411. package/autocomplete/lib/autocompleteitem/harness.js.map +0 -1
  412. package/autocomplete/lib/autocompletelist/_autocomplete-list.scss +0 -13
  413. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js +0 -9
  414. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js.map +0 -1
  415. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.scss +0 -10
  416. package/autocomplete/lib/autocompletelist/autocomplete-list.d.ts +0 -14
  417. package/autocomplete/lib/autocompletelist/autocomplete-list.js +0 -21
  418. package/autocomplete/lib/autocompletelist/autocomplete-list.js.map +0 -1
  419. package/autocomplete/lib/autocompletelist/harness.d.ts +0 -11
  420. package/autocomplete/lib/autocompletelist/harness.js +0 -12
  421. package/autocomplete/lib/autocompletelist/harness.js.map +0 -1
  422. package/autocomplete/lib/autocompletesurface/_autocomplete-surface.scss +0 -13
  423. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js +0 -9
  424. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js.map +0 -1
  425. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.scss +0 -10
  426. package/autocomplete/lib/autocompletesurface/autocomplete-surface.d.ts +0 -13
  427. package/autocomplete/lib/autocompletesurface/autocomplete-surface.js +0 -21
  428. package/autocomplete/lib/autocompletesurface/autocomplete-surface.js.map +0 -1
  429. package/autocomplete/lib/filled-styles.css.d.ts +0 -1
  430. package/autocomplete/lib/filled-styles.css.js +0 -9
  431. package/autocomplete/lib/filled-styles.css.js.map +0 -1
  432. package/autocomplete/lib/filled-styles.scss +0 -10
  433. package/autocomplete/lib/outlined-styles.css.d.ts +0 -1
  434. package/autocomplete/lib/outlined-styles.css.js +0 -9
  435. package/autocomplete/lib/outlined-styles.css.js.map +0 -1
  436. package/autocomplete/lib/outlined-styles.scss +0 -10
  437. package/autocomplete/lib/shared-styles.css.js +0 -9
  438. package/autocomplete/lib/shared-styles.css.js.map +0 -1
  439. package/autocomplete/outlined-autocomplete.d.ts +0 -28
  440. package/autocomplete/outlined-autocomplete.js +0 -46
  441. package/autocomplete/outlined-autocomplete.js.map +0 -1
  442. package/chips/action/delete-action.d.ts +0 -18
  443. package/chips/action/delete-action.js +0 -20
  444. package/chips/action/delete-action.js.map +0 -1
  445. package/chips/action/lib/action.d.ts +0 -47
  446. package/chips/action/lib/action.js +0 -162
  447. package/chips/action/lib/action.js.map +0 -1
  448. package/chips/action/lib/constants.d.ts +0 -62
  449. package/chips/action/lib/constants.js +0 -69
  450. package/chips/action/lib/constants.js.map +0 -1
  451. package/chips/action/lib/delete-action.d.ts +0 -20
  452. package/chips/action/lib/delete-action.js +0 -65
  453. package/chips/action/lib/delete-action.js.map +0 -1
  454. package/chips/action/lib/events.d.ts +0 -14
  455. package/chips/action/lib/events.js +0 -16
  456. package/chips/action/lib/events.js.map +0 -1
  457. package/chips/action/lib/link-action.d.ts +0 -19
  458. package/chips/action/lib/link-action.js +0 -55
  459. package/chips/action/lib/link-action.js.map +0 -1
  460. package/chips/action/lib/presentational-action.d.ts +0 -15
  461. package/chips/action/lib/presentational-action.js +0 -30
  462. package/chips/action/lib/presentational-action.js.map +0 -1
  463. package/chips/action/lib/primary-action.d.ts +0 -28
  464. package/chips/action/lib/primary-action.js +0 -88
  465. package/chips/action/lib/primary-action.js.map +0 -1
  466. package/chips/action/lib/selectable-action.d.ts +0 -17
  467. package/chips/action/lib/selectable-action.js +0 -67
  468. package/chips/action/lib/selectable-action.js.map +0 -1
  469. package/chips/action/lib/types.d.ts +0 -23
  470. package/chips/action/lib/types.js +0 -7
  471. package/chips/action/lib/types.js.map +0 -1
  472. package/chips/action/link-action.d.ts +0 -18
  473. package/chips/action/link-action.js +0 -20
  474. package/chips/action/link-action.js.map +0 -1
  475. package/chips/action/presentational-action.d.ts +0 -18
  476. package/chips/action/presentational-action.js +0 -20
  477. package/chips/action/presentational-action.js.map +0 -1
  478. package/chips/action/primary-action.d.ts +0 -18
  479. package/chips/action/primary-action.js +0 -20
  480. package/chips/action/primary-action.js.map +0 -1
  481. package/chips/action/selectable-action.d.ts +0 -18
  482. package/chips/action/selectable-action.js +0 -20
  483. package/chips/action/selectable-action.js.map +0 -1
  484. package/chips/chip/lib/_assist-chip-theme.scss +0 -99
  485. package/chips/chip/lib/_chip-theme.scss +0 -1285
  486. package/chips/chip/lib/_chip.scss +0 -444
  487. package/chips/chip/lib/_filter-chip-theme.scss +0 -130
  488. package/chips/chip/lib/_input-chip-theme.scss +0 -91
  489. package/chips/chip/lib/_suggestion-chip-theme.scss +0 -92
  490. package/chips/chip/lib/action-chip.d.ts +0 -18
  491. package/chips/chip/lib/action-chip.js +0 -39
  492. package/chips/chip/lib/action-chip.js.map +0 -1
  493. package/chips/chip/lib/adapter.d.ts +0 -50
  494. package/chips/chip/lib/adapter.js +0 -7
  495. package/chips/chip/lib/adapter.js.map +0 -1
  496. package/chips/chip/lib/animationframe.d.ts +0 -31
  497. package/chips/chip/lib/animationframe.js +0 -66
  498. package/chips/chip/lib/animationframe.js.map +0 -1
  499. package/chips/chip/lib/chip.d.ts +0 -43
  500. package/chips/chip/lib/chip.js +0 -134
  501. package/chips/chip/lib/chip.js.map +0 -1
  502. package/chips/chip/lib/constants.d.ts +0 -43
  503. package/chips/chip/lib/constants.js +0 -48
  504. package/chips/chip/lib/constants.js.map +0 -1
  505. package/chips/chip/lib/foundation.d.ts +0 -41
  506. package/chips/chip/lib/foundation.js +0 -255
  507. package/chips/chip/lib/foundation.js.map +0 -1
  508. package/chips/chip/lib/link-chip.d.ts +0 -21
  509. package/chips/chip/lib/link-chip.js +0 -53
  510. package/chips/chip/lib/link-chip.js.map +0 -1
  511. package/chips/chip/lib/presentational-chip.d.ts +0 -18
  512. package/chips/chip/lib/presentational-chip.js +0 -39
  513. package/chips/chip/lib/presentational-chip.js.map +0 -1
  514. package/chips/chip/lib/selectable-chip.d.ts +0 -22
  515. package/chips/chip/lib/selectable-chip.js +0 -57
  516. package/chips/chip/lib/selectable-chip.js.map +0 -1
  517. package/chips/chip/lib/types.d.ts +0 -42
  518. package/chips/chip/lib/types.js +0 -7
  519. package/chips/chip/lib/types.js.map +0 -1
  520. package/chips/chipset/lib/_chip-set-theme.scss +0 -50
  521. package/chips/chipset/lib/_chip-set.scss +0 -48
  522. package/chips/chipset/lib/adapter.d.ts +0 -45
  523. package/chips/chipset/lib/adapter.js +0 -7
  524. package/chips/chipset/lib/adapter.js.map +0 -1
  525. package/chips/chipset/lib/constants.d.ts +0 -26
  526. package/chips/chipset/lib/constants.js +0 -30
  527. package/chips/chipset/lib/constants.js.map +0 -1
  528. package/chips/chipset/lib/foundation.d.ts +0 -68
  529. package/chips/chipset/lib/foundation.js +0 -314
  530. package/chips/chipset/lib/foundation.js.map +0 -1
  531. package/chips/chipset/lib/types.d.ts +0 -41
  532. package/chips/chipset/lib/types.js +0 -7
  533. package/chips/chipset/lib/types.js.map +0 -1
  534. package/controller/foundation.d.ts +0 -24
  535. package/controller/foundation.js +0 -18
  536. package/controller/foundation.js.map +0 -1
  537. package/controller/observer-foundation.d.ts +0 -25
  538. package/controller/observer-foundation.js +0 -37
  539. package/controller/observer-foundation.js.map +0 -1
  540. package/controller/observer.d.ts +0 -52
  541. package/controller/observer.js +0 -149
  542. package/controller/observer.js.map +0 -1
  543. package/decorators/bound.d.ts +0 -40
  544. package/decorators/bound.js +0 -49
  545. package/decorators/bound.js.map +0 -1
  546. package/list/lib/avatar/_list-item-avatar.scss +0 -40
  547. package/list/lib/avatar/list-item-avatar-styles.css.d.ts +0 -1
  548. package/list/lib/avatar/list-item-avatar-styles.css.js +0 -9
  549. package/list/lib/avatar/list-item-avatar-styles.css.js.map +0 -1
  550. package/list/lib/avatar/list-item-avatar-styles.scss +0 -10
  551. package/list/lib/avatar/list-item-avatar.d.ts +0 -21
  552. package/list/lib/avatar/list-item-avatar.js +0 -48
  553. package/list/lib/avatar/list-item-avatar.js.map +0 -1
  554. package/list/lib/icon/_list-item-icon.scss +0 -71
  555. package/list/lib/icon/list-item-icon-styles.css.d.ts +0 -1
  556. package/list/lib/icon/list-item-icon-styles.css.js +0 -9
  557. package/list/lib/icon/list-item-icon-styles.css.js.map +0 -1
  558. package/list/lib/icon/list-item-icon-styles.scss +0 -10
  559. package/list/lib/icon/list-item-icon.d.ts +0 -9
  560. package/list/lib/icon/list-item-icon.js +0 -15
  561. package/list/lib/icon/list-item-icon.js.map +0 -1
  562. package/list/lib/image/_list-item-image.scss +0 -63
  563. package/list/lib/image/list-item-image-styles.css.d.ts +0 -1
  564. package/list/lib/image/list-item-image-styles.css.js +0 -9
  565. package/list/lib/image/list-item-image-styles.css.js.map +0 -1
  566. package/list/lib/image/list-item-image-styles.scss +0 -10
  567. package/list/lib/image/list-item-image.d.ts +0 -21
  568. package/list/lib/image/list-item-image.js +0 -48
  569. package/list/lib/image/list-item-image.js.map +0 -1
  570. package/list/lib/listitem/list-item-private-styles.css.d.ts +0 -1
  571. package/list/lib/listitem/list-item-private-styles.css.js +0 -9
  572. package/list/lib/listitem/list-item-private-styles.css.js.map +0 -1
  573. package/list/lib/video/_list-item-video.scss +0 -71
  574. package/list/lib/video/list-item-video-styles.css.d.ts +0 -1
  575. package/list/lib/video/list-item-video-styles.css.js +0 -9
  576. package/list/lib/video/list-item-video-styles.css.js.map +0 -1
  577. package/list/lib/video/list-item-video-styles.scss +0 -10
  578. package/list/lib/video/list-item-video.d.ts +0 -53
  579. package/list/lib/video/list-item-video.js +0 -115
  580. package/list/lib/video/list-item-video.js.map +0 -1
  581. package/list/list-item-avatar.d.ts +0 -20
  582. package/list/list-item-avatar.js +0 -23
  583. package/list/list-item-avatar.js.map +0 -1
  584. package/list/list-item-icon.d.ts +0 -20
  585. package/list/list-item-icon.js +0 -23
  586. package/list/list-item-icon.js.map +0 -1
  587. package/list/list-item-image.d.ts +0 -20
  588. package/list/list-item-image.js +0 -23
  589. package/list/list-item-image.js.map +0 -1
  590. package/list/list-item-video.d.ts +0 -20
  591. package/list/list-item-video.js +0 -23
  592. package/list/list-item-video.js.map +0 -1
  593. package/menu/lib/menuitem/menu-item-private-styles.css.d.ts +0 -1
  594. package/menu/lib/menuitem/menu-item-private-styles.css.js +0 -9
  595. package/menu/lib/menuitem/menu-item-private-styles.css.js.map +0 -1
  596. package/menusurface/_menu-surface.scss +0 -6
  597. package/menusurface/lib/_md-comp-menu-surface.scss +0 -31
  598. package/menusurface/lib/_menu-surface.scss +0 -122
  599. package/menusurface/lib/adapter.d.ts +0 -46
  600. package/menusurface/lib/adapter.js +0 -7
  601. package/menusurface/lib/adapter.js.map +0 -1
  602. package/menusurface/lib/constants.d.ts +0 -71
  603. package/menusurface/lib/constants.js +0 -83
  604. package/menusurface/lib/constants.js.map +0 -1
  605. package/menusurface/lib/foundation.d.ts +0 -176
  606. package/menusurface/lib/foundation.js +0 -544
  607. package/menusurface/lib/foundation.js.map +0 -1
  608. package/menusurface/lib/menu-surface-styles.css.d.ts +0 -1
  609. package/menusurface/lib/menu-surface-styles.css.js +0 -9
  610. package/menusurface/lib/menu-surface-styles.css.js.map +0 -1
  611. package/menusurface/lib/menu-surface-styles.scss +0 -10
  612. package/menusurface/lib/menu-surface.d.ts +0 -62
  613. package/menusurface/lib/menu-surface.js +0 -347
  614. package/menusurface/lib/menu-surface.js.map +0 -1
  615. package/menusurface/lib/types.d.ts +0 -19
  616. package/menusurface/lib/types.js +0 -7
  617. package/menusurface/lib/types.js.map +0 -1
  618. package/menusurface/menu-surface.d.ts +0 -14
  619. package/menusurface/menu-surface.js +0 -17
  620. package/menusurface/menu-surface.js.map +0 -1
  621. package/sass/_elevation.scss +0 -159
  622. package/sass/_resolvers.scss +0 -16
  623. package/sass/_typography.scss +0 -39
  624. package/tokens/v0_160/_md-comp-menu.scss +0 -121
  625. /package/{autocomplete/lib/autocompletelist/autocomplete-list-styles.css.d.ts → chips/lib/assist-styles.css.d.ts} +0 -0
  626. /package/{autocomplete → chips}/lib/shared-styles.css.d.ts +0 -0
  627. /package/{autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.d.ts → chips/lib/suggestion-styles.css.d.ts} +0 -0
  628. /package/tokens/{v0_160 → v0_161}/_index.scss +0 -0
  629. /package/tokens/{v0_160 → v0_161}/index.test.css.d.ts +0 -0
  630. /package/tokens/{v0_160 → v0_161}/index.test.css.js +0 -0
  631. /package/tokens/{v0_160 → v0_161}/index.test.css.js.map +0 -0
  632. /package/tokens/{v0_160 → v0_161}/index.test.scss +0 -0
  633. /package/tokens/{v0_160 → v0_161}/lib.test.css.d.ts +0 -0
  634. /package/tokens/{v0_160 → v0_161}/lib.test.css.js +0 -0
  635. /package/tokens/{v0_160 → v0_161}/lib.test.css.js.map +0 -0
  636. /package/tokens/{v0_160 → v0_161}/lib.test.scss +0 -0
@@ -3,8 +3,6 @@
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { __decorate, __metadata } from "tslib";
7
- import { bound } from '../decorators/bound.js';
8
6
  import { isFormAssociated } from './form-associated.js';
9
7
  import { shimLabelSupport, SUPPORTS_FACE_LABEL } from './shim-label-activation.js';
10
8
  /**
@@ -30,6 +28,27 @@ export class FormController {
30
28
  */
31
29
  constructor(element) {
32
30
  this.element = element;
31
+ this.formDataListener = (event) => {
32
+ if (this.element.disabled) {
33
+ // Check for truthiness since some elements may not support disabling.
34
+ return;
35
+ }
36
+ const value = this.element[getFormValue]();
37
+ // If given a `FormData` instance, append all values to the form. This
38
+ // allows elements to customize what is added beyond a single name/value
39
+ // pair.
40
+ if (value instanceof FormData) {
41
+ for (const [key, dataValue] of value) {
42
+ event.formData.append(key, dataValue);
43
+ }
44
+ return;
45
+ }
46
+ // Do not associate the value with the form if there is no value or no name.
47
+ if (value === null || !this.element.name) {
48
+ return;
49
+ }
50
+ event.formData.append(this.element.name, value);
51
+ };
33
52
  }
34
53
  hostConnected() {
35
54
  // If the component internals are not in Shadow DOM, subscribing to form
@@ -51,32 +70,5 @@ export class FormController {
51
70
  hostDisconnected() {
52
71
  this.form?.removeEventListener('formdata', this.formDataListener);
53
72
  }
54
- formDataListener(event) {
55
- if (this.element.disabled) {
56
- // Check for truthiness since some elements may not support disabling.
57
- return;
58
- }
59
- const value = this.element[getFormValue]();
60
- // If given a `FormData` instance, append all values to the form. This
61
- // allows elements to customize what is added beyond a single name/value
62
- // pair.
63
- if (value instanceof FormData) {
64
- for (const [key, dataValue] of value) {
65
- event.formData.append(key, dataValue);
66
- }
67
- return;
68
- }
69
- // Do not associate the value with the form if there is no value or no name.
70
- if (value === null || !this.element.name) {
71
- return;
72
- }
73
- event.formData.append(this.element.name, value);
74
- }
75
73
  }
76
- __decorate([
77
- bound,
78
- __metadata("design:type", Function),
79
- __metadata("design:paramtypes", [FormDataEvent]),
80
- __metadata("design:returntype", void 0)
81
- ], FormController.prototype, "formDataListener", null);
82
74
  //# sourceMappingURL=form-controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":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IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3C,sEAAsE;QACtE,wEAAwE;QACxE,QAAQ;QACR,IAAI,KAAK,YAAY,QAAQ,EAAE;YAC7B,KAAK,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,KAAK,EAAE;gBACpC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;aACvC;YACD,OAAO;SACR;QAED,4EAA4E;QAC5E,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;YACxC,OAAO;SACR;QAED,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;CACF;AAzBC;IAAC,KAAK;;qCAC0B,aAAa;;sDAuB5C","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ReactiveController, ReactiveControllerHost} from 'lit';\n\nimport {bound} from '../decorators/bound.js';\n\nimport {isFormAssociated} from './form-associated.js';\nimport {shimLabelSupport, SUPPORTS_FACE_LABEL} from './shim-label-activation.js';\n\ndeclare global {\n interface Window {\n ShadyDOM?: {inUse: boolean;};\n }\n}\n\n/**\n * An element that `FormController` may use.\n */\nexport interface FormElement extends ReactiveControllerHost, HTMLElement {\n /**\n * The `<form>` that this element is associated with.\n */\n readonly form: HTMLFormElement|null;\n /**\n * The name of the element in the form. This property should reflect to a\n * `name` attribute.\n */\n name: string;\n /**\n * Whether or not this element is disabled. If present, this property should\n * reflect to a `disabled` attribute.\n */\n disabled?: boolean;\n /**\n * A function that retrieves the current form value for this element.\n *\n * @return The current form value, or `null` if there is no value.\n */\n [getFormValue](): string|File|FormData|null;\n}\n\n/**\n * A unique symbol key for `FormController` elements to implement their\n * `getFormValue()` function.\n */\nexport const getFormValue = Symbol('getFormValue');\n\n/**\n * A `ReactiveController` that adds `<form>` support to an element.\n *\n * Elements should also set `static formAssociated = true` which\n * provides platform support for forms. When an element is form associated,\n * it can be activated via clicks on associated label elements. It is the\n * responsibility of the element to process this click and perform any necessary\n * activation tasks, for example focusing and clicking on an internal element.\n *\n */\nexport class FormController implements ReactiveController {\n private form?: HTMLFormElement|null;\n\n /**\n * Creates a new `FormController` for the given element.\n *\n * @param element The element to add `<form>` support to.\n */\n constructor(private readonly element: FormElement) {}\n\n hostConnected() {\n // If the component internals are not in Shadow DOM, subscribing to form\n // data events could lead to duplicated data, which may not work correctly\n // on the server side.\n if (!this.element.shadowRoot || window.ShadyDOM?.inUse) {\n return;\n }\n\n // Preserve a reference to the form, since on hostDisconnected it may be\n // null if the child was removed.\n this.form = this.element.form;\n this.form?.addEventListener('formdata', this.formDataListener);\n\n // TODO(b/261871554) Label activation shim is currently only needed for\n // Safari. Remove it when no longer needed.\n if (isFormAssociated(this.element) && !SUPPORTS_FACE_LABEL) {\n shimLabelSupport(this.element.getRootNode() as Document | ShadowRoot);\n }\n }\n\n hostDisconnected() {\n this.form?.removeEventListener('formdata', this.formDataListener);\n }\n\n @bound\n private formDataListener(event: FormDataEvent) {\n if (this.element.disabled) {\n // Check for truthiness since some elements may not support disabling.\n return;\n }\n\n const value = this.element[getFormValue]();\n // If given a `FormData` instance, append all values to the form. This\n // allows elements to customize what is added beyond a single name/value\n // pair.\n if (value instanceof FormData) {\n for (const [key, dataValue] of value) {\n event.formData.append(key, dataValue);\n }\n return;\n }\n\n // Do not associate the value with the form if there is no value or no name.\n if (value === null || !this.element.name) {\n return;\n }\n\n event.formData.append(this.element.name, value);\n }\n}\n"]}
1
+ {"version":3,"file":"form-controller.js","sourceRoot":"","sources":["form-controller.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAk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,uEAAuE;QACvE,2CAA2C;QAC3C,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC1D,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAA2B,CAAC,CAAC;SACvE;IACH,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,EAAE,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IACpE,CAAC;CA0BF","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ReactiveController, ReactiveControllerHost} from 'lit';\n\nimport {isFormAssociated} from './form-associated.js';\nimport {shimLabelSupport, SUPPORTS_FACE_LABEL} from './shim-label-activation.js';\n\ndeclare global {\n interface Window {\n ShadyDOM?: {inUse: boolean;};\n }\n}\n\n/**\n * An element that `FormController` may use.\n */\nexport interface FormElement extends ReactiveControllerHost, HTMLElement {\n /**\n * The `<form>` that this element is associated with.\n */\n readonly form: HTMLFormElement|null;\n /**\n * The name of the element in the form. This property should reflect to a\n * `name` attribute.\n */\n name: string;\n /**\n * Whether or not this element is disabled. If present, this property should\n * reflect to a `disabled` attribute.\n */\n disabled?: boolean;\n /**\n * A function that retrieves the current form value for this element.\n *\n * @return The current form value, or `null` if there is no value.\n */\n [getFormValue](): string|File|FormData|null;\n}\n\n/**\n * A unique symbol key for `FormController` elements to implement their\n * `getFormValue()` function.\n */\nexport const getFormValue = Symbol('getFormValue');\n\n/**\n * A `ReactiveController` that adds `<form>` support to an element.\n *\n * Elements should also set `static formAssociated = true` which\n * provides platform support for forms. When an element is form associated,\n * it can be activated via clicks on associated label elements. It is the\n * responsibility of the element to process this click and perform any necessary\n * activation tasks, for example focusing and clicking on an internal element.\n *\n */\nexport class FormController implements ReactiveController {\n private form?: HTMLFormElement|null;\n\n /**\n * Creates a new `FormController` for the given element.\n *\n * @param element The element to add `<form>` support to.\n */\n constructor(private readonly element: FormElement) {}\n\n hostConnected() {\n // If the component internals are not in Shadow DOM, subscribing to form\n // data events could lead to duplicated data, which may not work correctly\n // on the server side.\n if (!this.element.shadowRoot || window.ShadyDOM?.inUse) {\n return;\n }\n\n // Preserve a reference to the form, since on hostDisconnected it may be\n // null if the child was removed.\n this.form = this.element.form;\n this.form?.addEventListener('formdata', this.formDataListener);\n\n // TODO(b/261871554) Label activation shim is currently only needed for\n // Safari. Remove it when no longer needed.\n if (isFormAssociated(this.element) && !SUPPORTS_FACE_LABEL) {\n shimLabelSupport(this.element.getRootNode() as Document | ShadowRoot);\n }\n }\n\n hostDisconnected() {\n this.form?.removeEventListener('formdata', this.formDataListener);\n }\n\n private readonly formDataListener = (event: FormDataEvent) => {\n if (this.element.disabled) {\n // Check for truthiness since some elements may not support disabling.\n return;\n }\n\n const value = this.element[getFormValue]();\n // If given a `FormData` instance, append all values to the form. This\n // allows elements to customize what is added beyond a single name/value\n // pair.\n if (value instanceof FormData) {\n for (const [key, dataValue] of value) {\n event.formData.append(key, dataValue);\n }\n return;\n }\n\n // Do not associate the value with the form if there is no value or no name.\n if (value === null || !this.element.name) {\n return;\n }\n\n event.formData.append(this.element.name, value);\n };\n}\n"]}
@@ -9,8 +9,8 @@
9
9
  @use 'sass:map';
10
10
  // go/keep-sorted end
11
11
  // go/keep-sorted start
12
+ @use '../../elevation/elevation';
12
13
  @use '../../sass/color';
13
- @use '../../sass/resolvers';
14
14
  @use '../../sass/shape';
15
15
  @use '../../sass/theme';
16
16
  @use '../../sass/var';
@@ -118,11 +118,13 @@
118
118
  md-elevation {
119
119
  position: absolute;
120
120
  inset: 0;
121
- pointer-events: none;
122
121
  border-radius: inherit;
123
- --md-elevation-level: var(--_container-elevation);
124
- --md-elevation-surface-tine-color: var(
125
- --_container-surface-tint-layer-color
122
+
123
+ @include elevation.theme(
124
+ (
125
+ level: var(--_container-elevation),
126
+ surface-tint: var(--_container-surface-tint-layer-color),
127
+ )
126
128
  );
127
129
  }
128
130
 
@@ -12,7 +12,6 @@
12
12
  @use '../../sass/shape';
13
13
  @use '../../sass/string-ext';
14
14
  @use '../../sass/theme';
15
- @use '../../sass/typography';
16
15
  @use '../../sass/var';
17
16
  @use '../../tokens';
18
17
  // go/keep-sorted end
@@ -75,7 +74,7 @@ $_fullscreen-tokens: (
75
74
  $remove-prefix: 'action-';
76
75
  $tokens: _map-without-keys-with-prefix($tokens, $remove-prefix);
77
76
 
78
- @return typography.resolve-tokens($tokens, 'headline', 'supporting-text');
77
+ @return $tokens;
79
78
  }
80
79
 
81
80
  /**
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `:host{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface, #fffbfe));--_container-elevation: var(--md-dialog-container-elevation, 6);--_container-shape: var(--md-dialog-container-shape, 28px);--_container-surface-tint-layer-color: var(--md-dialog-container-surface-tint-layer-color, var(--md-sys-color-primary, #6750a4));--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1c1b1f));--_headline-type: var(--md-dialog-headline-type, 400 1.5rem / 2rem Roboto);--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-dialog-supporting-text-type, 400 0.875rem / 1.25rem Roboto);--_with-icon-icon-color: var(--md-dialog-with-icon-icon-color, var(--md-sys-color-secondary, #625b71));--_with-icon-icon-size: var(--md-dialog-with-icon-icon-size, 24px);--_container-max-inline-size: var(--md-dialog-container-max-inline-size, min(560px, 100% - 48px));--_container-min-inline-size: var(--md-dialog-container-min-inline-size, 280px);--_container-max-block-size: var(--md-dialog-container-max-block-size, min(560px, 100% - 48px));--_container-min-block-size: var(--md-dialog-container-min-block-size, 140px);--_container-inset-inline-start: var(--md-dialog-container-inset-inline-start, auto);--_container-inset-inline-end: var(--md-dialog-container-inset-inline-end, auto);--_container-inset-block-start: var(--md-dialog-container-inset-block-start, auto);--_container-inset-block-end: var(--md-dialog-container-inset-block-end, auto);--_opening-transition-duration: var(--md-dialog-opening-transition-duration, 400ms);--_opening-transition-easing: var(--md-dialog-opening-transition-easing, cubic-bezier(0.05, 0.7, 0.1, 1));--_closing-transition-duration: var(--md-dialog-closing-transition-duration, 200ms);--_closing-transition-easing: var(--md-dialog-closing-transition-easing, cubic-bezier(0.3, 0, 0.8, 0.15));--_scrim-color: var(--md-dialog-scrim-color, rgba(0, 0, 0, 0.32));--_container-block-padding: var(--md-dialog-container-block-padding, 24px);--_container-inline-padding: var(--md-dialog-container-inline-padding, 24px);--_header-spacing: var(--md-dialog-header-spacing, 16px);--_action-spacing: var(--md-dialog-action-spacing, 8px);--_content-block-start-spacing: var(--md-dialog-content-block-start-spacing, 16px);--_content-block-end-spacing: var(--md-dialog-content-block-end-spacing, 24px);--_with-divider-divider-height: var(--md-dialog-with-divider-divider-height, 1px);--_with-divider-divider-color: var(--md-dialog-with-divider-divider-color, var(--md-sys-color-outline, #79747e));--_fullscreen-header-block-size: var(--md-dialog-fullscreen-header-block-size, 56px);--_fullscreen-footer-block-size: var(--md-dialog-fullscreen-footer-block-size, 56px);--_fullscreen-container-block-padding: var(--md-dialog-fullscreen-container-block-padding, 8px);--_container-drag-inline-start: initial;--_container-drag-block-start: initial}@media(prefers-reduced-motion: reduce){:host{--_opening-transition-duration: 0;--_closing-transition-duration: 0}}.dialog{position:fixed;align-items:center;justify-content:center;box-sizing:border-box;inset:0;block-size:100vh;inline-size:100vw;max-block-size:100vh;max-inline-size:100vw;border:none;background:rgba(0,0,0,0);padding:0;margin:0;overflow:clip}.dialog:not(:modal){z-index:10000;pointer-events:none}.dialog[open]{display:flex}.dialog::backdrop{background:none}.dialog::before{content:"";position:absolute;z-index:-1;inset:0;block-size:100vh;inline-size:100vw;pointer-events:none}:host([modeless]) .dialog:before{display:none}.container{position:absolute;inset-inline-start:var(--_container-drag-inline-start, var(--_container-inset-inline-start));inset-inline-end:var(--_container-inset-inline-end);inset-block-start:var(--_container-drag-block-start, var(--_container-inset-block-start));inset-block-end:var(--_container-inset-block-end);background-color:var(--_container-color);border-radius:var(--_container-shape);display:flex;flex-direction:column;box-sizing:border-box;pointer-events:auto;min-block-size:var(--_container-min-block-size);max-block-size:var(--_container-max-block-size);min-inline-size:var(--_container-min-inline-size);max-inline-size:var(--_container-max-inline-size);padding-block-start:var(--_container-block-padding);padding-block-end:var(--_container-block-padding)}md-elevation{position:absolute;inset:0;pointer-events:none;border-radius:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-surface-tine-color: var( --_container-surface-tint-layer-color )}.container>*{box-sizing:border-box;padding-inline-start:var(--_container-inline-padding);padding-inline-end:var(--_container-inline-padding)}.header{display:flex;flex-direction:column;align-items:center;gap:var(--_header-spacing);-webkit-font-smoothing:antialiased;color:var(--_headline-color);font:var(--_headline-type)}.content{flex:1;overflow:auto;margin-block-start:var(--_content-block-start-spacing);margin-block-end:var(--_content-block-end-spacing);-webkit-font-smoothing:antialiased;color:var(--_supporting-text-color);font:var(--_supporting-text-type)}.footer{display:flex;position:relative;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;gap:var(--_action-spacing)}.footerHidden{--_content-block-end-spacing: 0px}.footerHidden .footer{display:none}.stacked .footer{flex-direction:column;align-items:flex-end}.scrollable .content{border-block-start:var(--_with-divider-divider-height) solid rgba(0,0,0,0);border-block-end:var(--_with-divider-divider-height) solid rgba(0,0,0,0)}.scroll-divider-header .content{border-block-start-color:var(--_with-divider-divider-color)}.scroll-divider-footer:not(.footerHidden) .content{border-block-end-color:var(--_with-divider-divider-color)}.dragging{user-select:none;cursor:move;touch-action:none}.container{will-change:transform,opacity;transition-property:transform;overflow:hidden}.container>*{transition-timing-function:inherit;transition-duration:inherit;transition-property:opacity,transform;will-change:transform,opacity;opacity:0}:host([transition][showing-open]) .container>*{opacity:1;transform:none}:host([transition][showing-open]) .container{opacity:1;transform:none}.dialog::before{transition:background-color linear;background-color:rgba(0,0,0,0)}:host([showing-open]) .dialog::before{background-color:var(--_scrim-color)}:host([opening]) .dialog::before{transition-duration:calc(var(--_opening-transition-duration)/2)}:host([closing]) .dialog::before{transition-duration:calc(var(--_closing-transition-duration)/2)}:host([opening]) .container{transition-duration:var(--_opening-transition-duration);transition-timing-function:var(--_opening-transition-easing)}:host([closing]) .container{transition-duration:var(--_closing-transition-duration);transition-timing-function:var(--_closing-transition-easing)}:host([trasition][closing]) .container>*{transform:none;opacity:0}:host([transition=grow-down]){--_opening-transform: scale(1, 0.1) translateY(-20%);--_closing-transform: scale(1, 0.9) translateY(-10%);--_origin: top;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-up]){--_opening-transform: scale(1, 0.1) translateY(20%);--_closing-transform: scale(1, 0.9) translateY(10%);--_origin: bottom;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-left]){--_opening-transform: scale(0.1, 1) translateX(20%);--_closing-transform: scale(0.9, 1) translateX(10%);--_origin: right;--_opening-content-transform: none;--_origin-footer: none}:host([transition=grow-right]){--_opening-transform: scale(0.1, 1) translateX(-20%);--_closing-transform: scale(0.9, 1) translateX(-10%);--_origin: left;--_opening-content-transform: none;--_origin-footer: none}:host([transition^=grow-]) .container{transform-origin:var(--_origin);transform:var(--_opening-transform)}:host([transition^=grow-]) .container>*{transform-origin:var(--_origin);transform:var(--_opening-content-transform)}:host([transition^=grow-]) .footer{transform-origin:var(--_origin-footer)}:host([transition^=grow-][closing]){transform:var(--_closing-transform)}:host([transition=shrink]) .container{transform:scale(1.2)}:host([transition=grow]) .container{transform:scale(0.8)}:host([transition=shrink][closing]) .container,:host([transition=grow][closing]) .container{transition-duration:0;transform:none}:host([showing-fullscreen]){--_container-max-block-size: none;--_container-max-inline-size: none}:host([showing-fullscreen]) .container{block-size:100vh;inline-size:100vw;border-radius:0px;padding-block-start:0;padding-block-end:0}:host([showing-fullscreen]) .header{justify-content:space-between;flex-direction:row;max-block-size:var(--_fullscreen-header-block-size);padding-block-start:var(--_fullscreen-container-block-padding);padding-inline:4px;--_header-spacing: 4px}:host([showing-fullscreen]) .content{margin-block-start:0;margin-block-end:0}:host([showing-fullscreen]) .footer{max-block-size:var(--_fullscreen-footer-block-size);padding-block-end:var(--_fullscreen-container-block-padding)}:host([showing-fullscreen]) .scroll-divider-footer .content{border-block-end-color:rgba(0,0,0,0)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.container{outline:windowtext solid 2px}}[name=headline-prefix]::slotted(*),[name=headline-suffix]::slotted(*){color:var(--_with-icon-icon-color);font-size:var(--_with-icon-icon-size)}[name=header]::slotted(*){flex:1;align-self:stretch;display:flex;align-items:center}:host([showing-fullscreen]) [name=headline]::slotted(*){flex:1}/*# sourceMappingURL=dialog-styles.css.map */
7
+ export const styles = css `:host{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface, #fffbfe));--_container-elevation: var(--md-dialog-container-elevation, 3);--_container-shape: var(--md-dialog-container-shape, 28px);--_container-surface-tint-layer-color: var(--md-dialog-container-surface-tint-layer-color, var(--md-sys-color-primary, #6750a4));--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1c1b1f));--_headline-type: var(--md-dialog-headline-type, 400 1.5rem / 2rem Roboto);--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-dialog-supporting-text-type, 400 0.875rem / 1.25rem Roboto);--_with-icon-icon-color: var(--md-dialog-with-icon-icon-color, var(--md-sys-color-secondary, #625b71));--_with-icon-icon-size: var(--md-dialog-with-icon-icon-size, 24px);--_container-max-inline-size: var(--md-dialog-container-max-inline-size, min(560px, 100% - 48px));--_container-min-inline-size: var(--md-dialog-container-min-inline-size, 280px);--_container-max-block-size: var(--md-dialog-container-max-block-size, min(560px, 100% - 48px));--_container-min-block-size: var(--md-dialog-container-min-block-size, 140px);--_container-inset-inline-start: var(--md-dialog-container-inset-inline-start, auto);--_container-inset-inline-end: var(--md-dialog-container-inset-inline-end, auto);--_container-inset-block-start: var(--md-dialog-container-inset-block-start, auto);--_container-inset-block-end: var(--md-dialog-container-inset-block-end, auto);--_opening-transition-duration: var(--md-dialog-opening-transition-duration, 400ms);--_opening-transition-easing: var(--md-dialog-opening-transition-easing, cubic-bezier(0.05, 0.7, 0.1, 1));--_closing-transition-duration: var(--md-dialog-closing-transition-duration, 200ms);--_closing-transition-easing: var(--md-dialog-closing-transition-easing, cubic-bezier(0.3, 0, 0.8, 0.15));--_scrim-color: var(--md-dialog-scrim-color, rgba(0, 0, 0, 0.32));--_container-block-padding: var(--md-dialog-container-block-padding, 24px);--_container-inline-padding: var(--md-dialog-container-inline-padding, 24px);--_header-spacing: var(--md-dialog-header-spacing, 16px);--_action-spacing: var(--md-dialog-action-spacing, 8px);--_content-block-start-spacing: var(--md-dialog-content-block-start-spacing, 16px);--_content-block-end-spacing: var(--md-dialog-content-block-end-spacing, 24px);--_with-divider-divider-height: var(--md-dialog-with-divider-divider-height, 1px);--_with-divider-divider-color: var(--md-dialog-with-divider-divider-color, var(--md-sys-color-outline, #79747e));--_fullscreen-header-block-size: var(--md-dialog-fullscreen-header-block-size, 56px);--_fullscreen-footer-block-size: var(--md-dialog-fullscreen-footer-block-size, 56px);--_fullscreen-container-block-padding: var(--md-dialog-fullscreen-container-block-padding, 8px);--_container-drag-inline-start: initial;--_container-drag-block-start: initial}@media(prefers-reduced-motion: reduce){:host{--_opening-transition-duration: 0;--_closing-transition-duration: 0}}.dialog{position:fixed;align-items:center;justify-content:center;box-sizing:border-box;inset:0;block-size:100vh;inline-size:100vw;max-block-size:100vh;max-inline-size:100vw;border:none;background:rgba(0,0,0,0);padding:0;margin:0;overflow:clip}.dialog:not(:modal){z-index:10000;pointer-events:none}.dialog[open]{display:flex}.dialog::backdrop{background:none}.dialog::before{content:"";position:absolute;z-index:-1;inset:0;block-size:100vh;inline-size:100vw;pointer-events:none}:host([modeless]) .dialog:before{display:none}.container{position:absolute;inset-inline-start:var(--_container-drag-inline-start, var(--_container-inset-inline-start));inset-inline-end:var(--_container-inset-inline-end);inset-block-start:var(--_container-drag-block-start, var(--_container-inset-block-start));inset-block-end:var(--_container-inset-block-end);background-color:var(--_container-color);border-radius:var(--_container-shape);display:flex;flex-direction:column;box-sizing:border-box;pointer-events:auto;min-block-size:var(--_container-min-block-size);max-block-size:var(--_container-max-block-size);min-inline-size:var(--_container-min-inline-size);max-inline-size:var(--_container-max-inline-size);padding-block-start:var(--_container-block-padding);padding-block-end:var(--_container-block-padding)}md-elevation{position:absolute;inset:0;border-radius:inherit;--md-elevation-level:var(--_container-elevation);--md-elevation-surface-tint:var(--_container-surface-tint-layer-color)}.container>*{box-sizing:border-box;padding-inline-start:var(--_container-inline-padding);padding-inline-end:var(--_container-inline-padding)}.header{display:flex;flex-direction:column;align-items:center;gap:var(--_header-spacing);-webkit-font-smoothing:antialiased;color:var(--_headline-color);font:var(--_headline-type)}.content{flex:1;overflow:auto;margin-block-start:var(--_content-block-start-spacing);margin-block-end:var(--_content-block-end-spacing);-webkit-font-smoothing:antialiased;color:var(--_supporting-text-color);font:var(--_supporting-text-type)}.footer{display:flex;position:relative;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;gap:var(--_action-spacing)}.footerHidden{--_content-block-end-spacing: 0px}.footerHidden .footer{display:none}.stacked .footer{flex-direction:column;align-items:flex-end}.scrollable .content{border-block-start:var(--_with-divider-divider-height) solid rgba(0,0,0,0);border-block-end:var(--_with-divider-divider-height) solid rgba(0,0,0,0)}.scroll-divider-header .content{border-block-start-color:var(--_with-divider-divider-color)}.scroll-divider-footer:not(.footerHidden) .content{border-block-end-color:var(--_with-divider-divider-color)}.dragging{user-select:none;cursor:move;touch-action:none}.container{will-change:transform,opacity;transition-property:transform;overflow:hidden}.container>*{transition-timing-function:inherit;transition-duration:inherit;transition-property:opacity,transform;will-change:transform,opacity;opacity:0}:host([transition][showing-open]) .container>*{opacity:1;transform:none}:host([transition][showing-open]) .container{opacity:1;transform:none}.dialog::before{transition:background-color linear;background-color:rgba(0,0,0,0)}:host([showing-open]) .dialog::before{background-color:var(--_scrim-color)}:host([opening]) .dialog::before{transition-duration:calc(var(--_opening-transition-duration)/2)}:host([closing]) .dialog::before{transition-duration:calc(var(--_closing-transition-duration)/2)}:host([opening]) .container{transition-duration:var(--_opening-transition-duration);transition-timing-function:var(--_opening-transition-easing)}:host([closing]) .container{transition-duration:var(--_closing-transition-duration);transition-timing-function:var(--_closing-transition-easing)}:host([trasition][closing]) .container>*{transform:none;opacity:0}:host([transition=grow-down]){--_opening-transform: scale(1, 0.1) translateY(-20%);--_closing-transform: scale(1, 0.9) translateY(-10%);--_origin: top;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-up]){--_opening-transform: scale(1, 0.1) translateY(20%);--_closing-transform: scale(1, 0.9) translateY(10%);--_origin: bottom;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-left]){--_opening-transform: scale(0.1, 1) translateX(20%);--_closing-transform: scale(0.9, 1) translateX(10%);--_origin: right;--_opening-content-transform: none;--_origin-footer: none}:host([transition=grow-right]){--_opening-transform: scale(0.1, 1) translateX(-20%);--_closing-transform: scale(0.9, 1) translateX(-10%);--_origin: left;--_opening-content-transform: none;--_origin-footer: none}:host([transition^=grow-]) .container{transform-origin:var(--_origin);transform:var(--_opening-transform)}:host([transition^=grow-]) .container>*{transform-origin:var(--_origin);transform:var(--_opening-content-transform)}:host([transition^=grow-]) .footer{transform-origin:var(--_origin-footer)}:host([transition^=grow-][closing]){transform:var(--_closing-transform)}:host([transition=shrink]) .container{transform:scale(1.2)}:host([transition=grow]) .container{transform:scale(0.8)}:host([transition=shrink][closing]) .container,:host([transition=grow][closing]) .container{transition-duration:0;transform:none}:host([showing-fullscreen]){--_container-max-block-size: none;--_container-max-inline-size: none}:host([showing-fullscreen]) .container{block-size:100vh;inline-size:100vw;border-radius:0px;padding-block-start:0;padding-block-end:0}:host([showing-fullscreen]) .header{justify-content:space-between;flex-direction:row;max-block-size:var(--_fullscreen-header-block-size);padding-block-start:var(--_fullscreen-container-block-padding);padding-inline:4px;--_header-spacing: 4px}:host([showing-fullscreen]) .content{margin-block-start:0;margin-block-end:0}:host([showing-fullscreen]) .footer{max-block-size:var(--_fullscreen-footer-block-size);padding-block-end:var(--_fullscreen-container-block-padding)}:host([showing-fullscreen]) .scroll-divider-footer .content{border-block-end-color:rgba(0,0,0,0)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.container{outline:windowtext solid 2px}}[name=headline-prefix]::slotted(*),[name=headline-suffix]::slotted(*){color:var(--_with-icon-icon-color);font-size:var(--_with-icon-icon-size)}[name=header]::slotted(*){flex:1;align-self:stretch;display:flex;align-items:center}:host([showing-fullscreen]) [name=headline]::slotted(*){flex:1}/*# sourceMappingURL=dialog-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=dialog-styles.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-styles.css.js","sourceRoot":"","sources":["dialog-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{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface, #fffbfe));--_container-elevation: var(--md-dialog-container-elevation, 6);--_container-shape: var(--md-dialog-container-shape, 28px);--_container-surface-tint-layer-color: var(--md-dialog-container-surface-tint-layer-color, var(--md-sys-color-primary, #6750a4));--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1c1b1f));--_headline-type: var(--md-dialog-headline-type, 400 1.5rem / 2rem Roboto);--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-dialog-supporting-text-type, 400 0.875rem / 1.25rem Roboto);--_with-icon-icon-color: var(--md-dialog-with-icon-icon-color, var(--md-sys-color-secondary, #625b71));--_with-icon-icon-size: var(--md-dialog-with-icon-icon-size, 24px);--_container-max-inline-size: var(--md-dialog-container-max-inline-size, min(560px, 100% - 48px));--_container-min-inline-size: var(--md-dialog-container-min-inline-size, 280px);--_container-max-block-size: var(--md-dialog-container-max-block-size, min(560px, 100% - 48px));--_container-min-block-size: var(--md-dialog-container-min-block-size, 140px);--_container-inset-inline-start: var(--md-dialog-container-inset-inline-start, auto);--_container-inset-inline-end: var(--md-dialog-container-inset-inline-end, auto);--_container-inset-block-start: var(--md-dialog-container-inset-block-start, auto);--_container-inset-block-end: var(--md-dialog-container-inset-block-end, auto);--_opening-transition-duration: var(--md-dialog-opening-transition-duration, 400ms);--_opening-transition-easing: var(--md-dialog-opening-transition-easing, cubic-bezier(0.05, 0.7, 0.1, 1));--_closing-transition-duration: var(--md-dialog-closing-transition-duration, 200ms);--_closing-transition-easing: var(--md-dialog-closing-transition-easing, cubic-bezier(0.3, 0, 0.8, 0.15));--_scrim-color: var(--md-dialog-scrim-color, rgba(0, 0, 0, 0.32));--_container-block-padding: var(--md-dialog-container-block-padding, 24px);--_container-inline-padding: var(--md-dialog-container-inline-padding, 24px);--_header-spacing: var(--md-dialog-header-spacing, 16px);--_action-spacing: var(--md-dialog-action-spacing, 8px);--_content-block-start-spacing: var(--md-dialog-content-block-start-spacing, 16px);--_content-block-end-spacing: var(--md-dialog-content-block-end-spacing, 24px);--_with-divider-divider-height: var(--md-dialog-with-divider-divider-height, 1px);--_with-divider-divider-color: var(--md-dialog-with-divider-divider-color, var(--md-sys-color-outline, #79747e));--_fullscreen-header-block-size: var(--md-dialog-fullscreen-header-block-size, 56px);--_fullscreen-footer-block-size: var(--md-dialog-fullscreen-footer-block-size, 56px);--_fullscreen-container-block-padding: var(--md-dialog-fullscreen-container-block-padding, 8px);--_container-drag-inline-start: initial;--_container-drag-block-start: initial}@media(prefers-reduced-motion: reduce){:host{--_opening-transition-duration: 0;--_closing-transition-duration: 0}}.dialog{position:fixed;align-items:center;justify-content:center;box-sizing:border-box;inset:0;block-size:100vh;inline-size:100vw;max-block-size:100vh;max-inline-size:100vw;border:none;background:rgba(0,0,0,0);padding:0;margin:0;overflow:clip}.dialog:not(:modal){z-index:10000;pointer-events:none}.dialog[open]{display:flex}.dialog::backdrop{background:none}.dialog::before{content:\"\";position:absolute;z-index:-1;inset:0;block-size:100vh;inline-size:100vw;pointer-events:none}:host([modeless]) .dialog:before{display:none}.container{position:absolute;inset-inline-start:var(--_container-drag-inline-start, var(--_container-inset-inline-start));inset-inline-end:var(--_container-inset-inline-end);inset-block-start:var(--_container-drag-block-start, var(--_container-inset-block-start));inset-block-end:var(--_container-inset-block-end);background-color:var(--_container-color);border-radius:var(--_container-shape);display:flex;flex-direction:column;box-sizing:border-box;pointer-events:auto;min-block-size:var(--_container-min-block-size);max-block-size:var(--_container-max-block-size);min-inline-size:var(--_container-min-inline-size);max-inline-size:var(--_container-max-inline-size);padding-block-start:var(--_container-block-padding);padding-block-end:var(--_container-block-padding)}md-elevation{position:absolute;inset:0;pointer-events:none;border-radius:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-surface-tine-color: var( --_container-surface-tint-layer-color )}.container>*{box-sizing:border-box;padding-inline-start:var(--_container-inline-padding);padding-inline-end:var(--_container-inline-padding)}.header{display:flex;flex-direction:column;align-items:center;gap:var(--_header-spacing);-webkit-font-smoothing:antialiased;color:var(--_headline-color);font:var(--_headline-type)}.content{flex:1;overflow:auto;margin-block-start:var(--_content-block-start-spacing);margin-block-end:var(--_content-block-end-spacing);-webkit-font-smoothing:antialiased;color:var(--_supporting-text-color);font:var(--_supporting-text-type)}.footer{display:flex;position:relative;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;gap:var(--_action-spacing)}.footerHidden{--_content-block-end-spacing: 0px}.footerHidden .footer{display:none}.stacked .footer{flex-direction:column;align-items:flex-end}.scrollable .content{border-block-start:var(--_with-divider-divider-height) solid rgba(0,0,0,0);border-block-end:var(--_with-divider-divider-height) solid rgba(0,0,0,0)}.scroll-divider-header .content{border-block-start-color:var(--_with-divider-divider-color)}.scroll-divider-footer:not(.footerHidden) .content{border-block-end-color:var(--_with-divider-divider-color)}.dragging{user-select:none;cursor:move;touch-action:none}.container{will-change:transform,opacity;transition-property:transform;overflow:hidden}.container>*{transition-timing-function:inherit;transition-duration:inherit;transition-property:opacity,transform;will-change:transform,opacity;opacity:0}:host([transition][showing-open]) .container>*{opacity:1;transform:none}:host([transition][showing-open]) .container{opacity:1;transform:none}.dialog::before{transition:background-color linear;background-color:rgba(0,0,0,0)}:host([showing-open]) .dialog::before{background-color:var(--_scrim-color)}:host([opening]) .dialog::before{transition-duration:calc(var(--_opening-transition-duration)/2)}:host([closing]) .dialog::before{transition-duration:calc(var(--_closing-transition-duration)/2)}:host([opening]) .container{transition-duration:var(--_opening-transition-duration);transition-timing-function:var(--_opening-transition-easing)}:host([closing]) .container{transition-duration:var(--_closing-transition-duration);transition-timing-function:var(--_closing-transition-easing)}:host([trasition][closing]) .container>*{transform:none;opacity:0}:host([transition=grow-down]){--_opening-transform: scale(1, 0.1) translateY(-20%);--_closing-transform: scale(1, 0.9) translateY(-10%);--_origin: top;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-up]){--_opening-transform: scale(1, 0.1) translateY(20%);--_closing-transform: scale(1, 0.9) translateY(10%);--_origin: bottom;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-left]){--_opening-transform: scale(0.1, 1) translateX(20%);--_closing-transform: scale(0.9, 1) translateX(10%);--_origin: right;--_opening-content-transform: none;--_origin-footer: none}:host([transition=grow-right]){--_opening-transform: scale(0.1, 1) translateX(-20%);--_closing-transform: scale(0.9, 1) translateX(-10%);--_origin: left;--_opening-content-transform: none;--_origin-footer: none}:host([transition^=grow-]) .container{transform-origin:var(--_origin);transform:var(--_opening-transform)}:host([transition^=grow-]) .container>*{transform-origin:var(--_origin);transform:var(--_opening-content-transform)}:host([transition^=grow-]) .footer{transform-origin:var(--_origin-footer)}:host([transition^=grow-][closing]){transform:var(--_closing-transform)}:host([transition=shrink]) .container{transform:scale(1.2)}:host([transition=grow]) .container{transform:scale(0.8)}:host([transition=shrink][closing]) .container,:host([transition=grow][closing]) .container{transition-duration:0;transform:none}:host([showing-fullscreen]){--_container-max-block-size: none;--_container-max-inline-size: none}:host([showing-fullscreen]) .container{block-size:100vh;inline-size:100vw;border-radius:0px;padding-block-start:0;padding-block-end:0}:host([showing-fullscreen]) .header{justify-content:space-between;flex-direction:row;max-block-size:var(--_fullscreen-header-block-size);padding-block-start:var(--_fullscreen-container-block-padding);padding-inline:4px;--_header-spacing: 4px}:host([showing-fullscreen]) .content{margin-block-start:0;margin-block-end:0}:host([showing-fullscreen]) .footer{max-block-size:var(--_fullscreen-footer-block-size);padding-block-end:var(--_fullscreen-container-block-padding)}:host([showing-fullscreen]) .scroll-divider-footer .content{border-block-end-color:rgba(0,0,0,0)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.container{outline:windowtext solid 2px}}[name=headline-prefix]::slotted(*),[name=headline-suffix]::slotted(*){color:var(--_with-icon-icon-color);font-size:var(--_with-icon-icon-size)}[name=header]::slotted(*){flex:1;align-self:stretch;display:flex;align-items:center}:host([showing-fullscreen]) [name=headline]::slotted(*){flex:1}/*# sourceMappingURL=dialog-styles.css.map */\n`;\n "]}
1
+ {"version":3,"file":"dialog-styles.css.js","sourceRoot":"","sources":["dialog-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{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface, #fffbfe));--_container-elevation: var(--md-dialog-container-elevation, 3);--_container-shape: var(--md-dialog-container-shape, 28px);--_container-surface-tint-layer-color: var(--md-dialog-container-surface-tint-layer-color, var(--md-sys-color-primary, #6750a4));--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1c1b1f));--_headline-type: var(--md-dialog-headline-type, 400 1.5rem / 2rem Roboto);--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var(--md-dialog-supporting-text-type, 400 0.875rem / 1.25rem Roboto);--_with-icon-icon-color: var(--md-dialog-with-icon-icon-color, var(--md-sys-color-secondary, #625b71));--_with-icon-icon-size: var(--md-dialog-with-icon-icon-size, 24px);--_container-max-inline-size: var(--md-dialog-container-max-inline-size, min(560px, 100% - 48px));--_container-min-inline-size: var(--md-dialog-container-min-inline-size, 280px);--_container-max-block-size: var(--md-dialog-container-max-block-size, min(560px, 100% - 48px));--_container-min-block-size: var(--md-dialog-container-min-block-size, 140px);--_container-inset-inline-start: var(--md-dialog-container-inset-inline-start, auto);--_container-inset-inline-end: var(--md-dialog-container-inset-inline-end, auto);--_container-inset-block-start: var(--md-dialog-container-inset-block-start, auto);--_container-inset-block-end: var(--md-dialog-container-inset-block-end, auto);--_opening-transition-duration: var(--md-dialog-opening-transition-duration, 400ms);--_opening-transition-easing: var(--md-dialog-opening-transition-easing, cubic-bezier(0.05, 0.7, 0.1, 1));--_closing-transition-duration: var(--md-dialog-closing-transition-duration, 200ms);--_closing-transition-easing: var(--md-dialog-closing-transition-easing, cubic-bezier(0.3, 0, 0.8, 0.15));--_scrim-color: var(--md-dialog-scrim-color, rgba(0, 0, 0, 0.32));--_container-block-padding: var(--md-dialog-container-block-padding, 24px);--_container-inline-padding: var(--md-dialog-container-inline-padding, 24px);--_header-spacing: var(--md-dialog-header-spacing, 16px);--_action-spacing: var(--md-dialog-action-spacing, 8px);--_content-block-start-spacing: var(--md-dialog-content-block-start-spacing, 16px);--_content-block-end-spacing: var(--md-dialog-content-block-end-spacing, 24px);--_with-divider-divider-height: var(--md-dialog-with-divider-divider-height, 1px);--_with-divider-divider-color: var(--md-dialog-with-divider-divider-color, var(--md-sys-color-outline, #79747e));--_fullscreen-header-block-size: var(--md-dialog-fullscreen-header-block-size, 56px);--_fullscreen-footer-block-size: var(--md-dialog-fullscreen-footer-block-size, 56px);--_fullscreen-container-block-padding: var(--md-dialog-fullscreen-container-block-padding, 8px);--_container-drag-inline-start: initial;--_container-drag-block-start: initial}@media(prefers-reduced-motion: reduce){:host{--_opening-transition-duration: 0;--_closing-transition-duration: 0}}.dialog{position:fixed;align-items:center;justify-content:center;box-sizing:border-box;inset:0;block-size:100vh;inline-size:100vw;max-block-size:100vh;max-inline-size:100vw;border:none;background:rgba(0,0,0,0);padding:0;margin:0;overflow:clip}.dialog:not(:modal){z-index:10000;pointer-events:none}.dialog[open]{display:flex}.dialog::backdrop{background:none}.dialog::before{content:\"\";position:absolute;z-index:-1;inset:0;block-size:100vh;inline-size:100vw;pointer-events:none}:host([modeless]) .dialog:before{display:none}.container{position:absolute;inset-inline-start:var(--_container-drag-inline-start, var(--_container-inset-inline-start));inset-inline-end:var(--_container-inset-inline-end);inset-block-start:var(--_container-drag-block-start, var(--_container-inset-block-start));inset-block-end:var(--_container-inset-block-end);background-color:var(--_container-color);border-radius:var(--_container-shape);display:flex;flex-direction:column;box-sizing:border-box;pointer-events:auto;min-block-size:var(--_container-min-block-size);max-block-size:var(--_container-max-block-size);min-inline-size:var(--_container-min-inline-size);max-inline-size:var(--_container-max-inline-size);padding-block-start:var(--_container-block-padding);padding-block-end:var(--_container-block-padding)}md-elevation{position:absolute;inset:0;border-radius:inherit;--md-elevation-level:var(--_container-elevation);--md-elevation-surface-tint:var(--_container-surface-tint-layer-color)}.container>*{box-sizing:border-box;padding-inline-start:var(--_container-inline-padding);padding-inline-end:var(--_container-inline-padding)}.header{display:flex;flex-direction:column;align-items:center;gap:var(--_header-spacing);-webkit-font-smoothing:antialiased;color:var(--_headline-color);font:var(--_headline-type)}.content{flex:1;overflow:auto;margin-block-start:var(--_content-block-start-spacing);margin-block-end:var(--_content-block-end-spacing);-webkit-font-smoothing:antialiased;color:var(--_supporting-text-color);font:var(--_supporting-text-type)}.footer{display:flex;position:relative;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;gap:var(--_action-spacing)}.footerHidden{--_content-block-end-spacing: 0px}.footerHidden .footer{display:none}.stacked .footer{flex-direction:column;align-items:flex-end}.scrollable .content{border-block-start:var(--_with-divider-divider-height) solid rgba(0,0,0,0);border-block-end:var(--_with-divider-divider-height) solid rgba(0,0,0,0)}.scroll-divider-header .content{border-block-start-color:var(--_with-divider-divider-color)}.scroll-divider-footer:not(.footerHidden) .content{border-block-end-color:var(--_with-divider-divider-color)}.dragging{user-select:none;cursor:move;touch-action:none}.container{will-change:transform,opacity;transition-property:transform;overflow:hidden}.container>*{transition-timing-function:inherit;transition-duration:inherit;transition-property:opacity,transform;will-change:transform,opacity;opacity:0}:host([transition][showing-open]) .container>*{opacity:1;transform:none}:host([transition][showing-open]) .container{opacity:1;transform:none}.dialog::before{transition:background-color linear;background-color:rgba(0,0,0,0)}:host([showing-open]) .dialog::before{background-color:var(--_scrim-color)}:host([opening]) .dialog::before{transition-duration:calc(var(--_opening-transition-duration)/2)}:host([closing]) .dialog::before{transition-duration:calc(var(--_closing-transition-duration)/2)}:host([opening]) .container{transition-duration:var(--_opening-transition-duration);transition-timing-function:var(--_opening-transition-easing)}:host([closing]) .container{transition-duration:var(--_closing-transition-duration);transition-timing-function:var(--_closing-transition-easing)}:host([trasition][closing]) .container>*{transform:none;opacity:0}:host([transition=grow-down]){--_opening-transform: scale(1, 0.1) translateY(-20%);--_closing-transform: scale(1, 0.9) translateY(-10%);--_origin: top;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-up]){--_opening-transform: scale(1, 0.1) translateY(20%);--_closing-transform: scale(1, 0.9) translateY(10%);--_origin: bottom;--_opening-content-transform: scale(1, 2);--_origin-footer: bottom}:host([transition=grow-left]){--_opening-transform: scale(0.1, 1) translateX(20%);--_closing-transform: scale(0.9, 1) translateX(10%);--_origin: right;--_opening-content-transform: none;--_origin-footer: none}:host([transition=grow-right]){--_opening-transform: scale(0.1, 1) translateX(-20%);--_closing-transform: scale(0.9, 1) translateX(-10%);--_origin: left;--_opening-content-transform: none;--_origin-footer: none}:host([transition^=grow-]) .container{transform-origin:var(--_origin);transform:var(--_opening-transform)}:host([transition^=grow-]) .container>*{transform-origin:var(--_origin);transform:var(--_opening-content-transform)}:host([transition^=grow-]) .footer{transform-origin:var(--_origin-footer)}:host([transition^=grow-][closing]){transform:var(--_closing-transform)}:host([transition=shrink]) .container{transform:scale(1.2)}:host([transition=grow]) .container{transform:scale(0.8)}:host([transition=shrink][closing]) .container,:host([transition=grow][closing]) .container{transition-duration:0;transform:none}:host([showing-fullscreen]){--_container-max-block-size: none;--_container-max-inline-size: none}:host([showing-fullscreen]) .container{block-size:100vh;inline-size:100vw;border-radius:0px;padding-block-start:0;padding-block-end:0}:host([showing-fullscreen]) .header{justify-content:space-between;flex-direction:row;max-block-size:var(--_fullscreen-header-block-size);padding-block-start:var(--_fullscreen-container-block-padding);padding-inline:4px;--_header-spacing: 4px}:host([showing-fullscreen]) .content{margin-block-start:0;margin-block-end:0}:host([showing-fullscreen]) .footer{max-block-size:var(--_fullscreen-footer-block-size);padding-block-end:var(--_fullscreen-container-block-padding)}:host([showing-fullscreen]) .scroll-divider-footer .content{border-block-end-color:rgba(0,0,0,0)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.container{outline:windowtext solid 2px}}[name=headline-prefix]::slotted(*),[name=headline-suffix]::slotted(*){color:var(--_with-icon-icon-color);font-size:var(--_with-icon-icon-size)}[name=header]::slotted(*){flex:1;align-self:stretch;display:flex;align-items:center}:host([showing-fullscreen]) [name=headline]::slotted(*){flex:1}/*# sourceMappingURL=dialog-styles.css.map */\n`;\n "]}
@@ -229,6 +229,7 @@ export class Dialog extends LitElement {
229
229
  @pointermove=${this.handlePointerMove}
230
230
  @pointerup=${this.handleDragEnd}
231
231
  >
232
+ <md-elevation surface></md-elevation>
232
233
  <header class="header">
233
234
  <slot name="header">
234
235
  <slot name="headline-prefix"></slot>
@@ -242,7 +243,6 @@ export class Dialog extends LitElement {
242
243
  <footer class="footer">
243
244
  <slot name="footer"></slot>
244
245
  </footer>
245
- <md-elevation surface></md-elevation>
246
246
  </div>
247
247
  </dialog>`;
248
248
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["dialog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAE7E,mCAAmC;AACnC,mCAAmC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC,MAAM,uBAAuB,GAAG,gCAAgC,CAAC;AACjE,MAAM,uBAAuB,GAAG,gCAAgC,CAAC;AAEjE;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAAtC;;QA6BE;;WAEG;QACwB,SAAI,GAAG,KAAK,CAAC;QAExC;;;;;;;;;;;;;;;;WAgBG;QACwB,eAAU,GAAG,KAAK,CAAC;QAE9C;;;;;;;WAOG;QAEH,yBAAoB,GAAG,yCAAyC,CAAC;QAEjE;;;WAGG;QACwB,iBAAY,GAAG,KAAK,CAAC;QAEhD;;;WAGG;QACwB,YAAO,GAAG,KAAK,CAAC;QAE3C;;;;;;;;;WASG;QACS,kBAAa,GAAG,YAAY,C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EAAE;;wCAA0B","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\n\nimport {html, LitElement, PropertyValues} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {createThrottle, msFromTimeCSSValue} from '../../motion/animation.js';\n\n// This is required for decorators.\n// tslint:disable:no-new-decorators\n\n/**\n * Default close action.\n */\nexport const CLOSE_ACTION = 'close';\n\nconst OPENING_TRANSITION_PROP = '--_opening-transition-duration';\nconst CLOSING_TRANSITION_PROP = '--_closing-transition-duration';\n\n/**\n * A dialog component.\n */\nexport class Dialog extends LitElement {\n private static preventedScrollingCount = 0;\n private static scrollbarTester: HTMLDivElement;\n\n private static setDocumentScrollingDisabled(disabled = false) {\n let {preventedScrollingCount, scrollbarTester} = Dialog;\n Dialog.preventedScrollingCount = preventedScrollingCount =\n Math.max(preventedScrollingCount + (Number(disabled) || -1), 0);\n const shouldPrevent = Boolean(preventedScrollingCount);\n const {style} = document.body;\n if (shouldPrevent && style.overflow === 'hidden') {\n return;\n }\n if (scrollbarTester === undefined) {\n Dialog.scrollbarTester = scrollbarTester = document.createElement('div');\n scrollbarTester.style.cssText =\n `position: absolute; height: 0; width: 100%; visibility: hidden; pointer-events: none;`;\n }\n // Appends an element to see if its offsetWidth changes when overflow is\n // altered. If it does, then add end inline padding to restore the width to\n // avoid a visible layout shift.\n document.body.append(scrollbarTester);\n const {offsetWidth} = scrollbarTester;\n style.overflow = shouldPrevent ? 'hidden' : '';\n const scrollbarWidth = scrollbarTester.offsetWidth - offsetWidth;\n scrollbarTester.remove();\n style.paddingInlineEnd = shouldPrevent ? `${scrollbarWidth}px` : '';\n }\n\n /**\n * Opens the dialog when set to `true` and closes it when set to `false`.\n */\n @property({type: Boolean}) open = false;\n\n /**\n * Setting fullscreen displays the dialog fullscreen on small screens.\n * This can be customized via the `fullscreenBreakpoint` property.\n * When showing fullscreen, the header will take up less vertical space, and\n * the dialog will have a `showing-fullscreen`attribute, allowing content to\n * be styled in this state.\n *\n * Dialogs can be sized by setting:\n *\n * * --md-dialog-container-min-block-size\n * * --md-dialog-container-max-block-size\n * * --md-dialog-container-min-inline-size\n * * --md-dialog-container-max-inline-size\n *\n * These are typically configured via media queries and are independent of the\n * fullscreen setting.\n */\n @property({type: Boolean}) fullscreen = false;\n\n /**\n * A media query string specifying the breakpoint at which the dialog\n * should be shown fullscreen. Note, this only applies when the `fullscreen`\n * property is set.\n *\n * By default, the dialog is shown fullscreen on screens less than 600px wide\n * or 400px tall.\n */\n @property({type: String})\n fullscreenBreakpoint = '(max-width: 600px), (max-height: 400px)';\n\n /**\n * Hides the dialog footer, making any content slotted into the footer\n * inaccessible.\n */\n @property({type: Boolean}) footerHidden = false;\n\n /**\n * Renders footer content in a vertically stacked alignment rather than the\n * normal horizontal alignment.\n */\n @property({type: Boolean}) stacked = false;\n\n /**\n * When the dialog is closed it disptaches `closing` and `closed` events.\n * These events have an action property which has a default value of\n * the value of this property. Specific actions have explicit values but when\n * a value is not specified, the default is used. For example, clicking the\n * scrim, pressing escape, or clicking a button with an action attribute set\n * produce an explicit action.\n *\n * Defaults to `close`.\n */\n @property() defaultAction = CLOSE_ACTION;\n\n /**\n * The name of an attribute which can be placed on any element slotted into\n * the dialog. If an element has an action attribute set, clicking it will\n * close the dialog and the `closing` and `closed` events dispatched will\n * have their action property set the the value of this attribute on the\n * clicked element.The default valus is `dialogAction`. For example,\n *\n * <md-dialog>\n * Content\n * <md-filled-button slot=\"footer\"dialogAction=\"buy\">\n * Buy\n * </md-filled-button>\n * </md-dialog>\n */\n @property() actionAttribute = 'dialogAction';\n\n /**\n * When the dialog is opened, it will focus the first element which has\n * an attribute name matching this property. The default value is\n * `dialogFocus`. For example:\n *\n * <md-dialog>\n * <md-filled-text-field\n * label=\"Enter some text\"\n * dialogFocus\n * >\n * </md-filled-text-field>\n * </md-dialog>\n */\n @property() focusAttribute = 'dialogFocus';\n\n /**\n * Clicking on the scrim surrounding the dialog closes the dialog.\n * The `closing` and `closed` events this produces have an `action` property\n * which is the value of this property and defaults to `close`.\n */\n @property({type: String}) scrimClickAction = CLOSE_ACTION;\n\n /**\n * Pressing the `escape` key while the dialog is open closes the dialog.\n * The `closing` and `closed` events this produces have an `action` property\n * which is the value of this property and defaults to `close`.\n */\n @property({type: String}) escapeKeyAction = CLOSE_ACTION;\n\n /**\n * When opened, the dialog is displayed modeless or non-modal. This\n * allows users to interact with content outside the dialog without\n * closing the dialog and does not display the scrim around the dialog.\n */\n @property({type: Boolean, reflect: true}) modeless = false;\n\n /**\n * Set to make the dialog position draggable.\n */\n @property({type: Boolean}) override draggable = false;\n\n private readonly throttle = createThrottle();\n\n @query('.dialog', true) private readonly dialogElement!: HTMLDialogElement;\n\n // slots tracked to find focusable elements.\n @query('slot[name=footer]', true)\n private readonly footerSlot!: HTMLSlotElement;\n @query('slot:not([name])', true)\n private readonly contentSlot!: HTMLSlotElement;\n // for scrolling related styling\n @query(`.content`, true) private readonly contentElement!: HTMLDivElement;\n // used to determine container size for dragging\n @query(`.container`, true) private readonly containerElement!: HTMLDivElement;\n // used to determin where users can drag from.\n @query(`.header`, true) private readonly headerElement!: HTMLDivElement;\n\n /**\n * Private properties that reflect for styling manually in `updated`.\n */\n @state() private showingFullscreen = false;\n @state() private showingOpen = false;\n @state() private opening = false;\n @state() private closing = false;\n\n /**\n * Transition kind. Supported options include: grow, shrink, grow-down,\n * grow-up, grow-left, and grow-right.\n *\n * Defaults to grow-down.\n */\n @property({reflect: true}) transition = 'grow-down';\n\n private currentAction: string|undefined;\n\n @state() private dragging = false;\n private readonly dragMargin = 8;\n private dragInfo?: [number, number, number, number]|undefined;\n\n /**\n * Opens and shows the dialog. This is equivalent to setting the `open`\n * property to true.\n */\n show() {\n this.open = true;\n }\n\n /**\n * Closes the dialog. This is equivalent to setting the `open`\n * property to false.\n */\n close(action = '') {\n this.currentAction = action;\n this.open = false;\n }\n\n /**\n * Opens and shows the dialog if it is closed; otherwise closes it.\n */\n toggleShow() {\n if (this.open) {\n this.close(this.currentAction);\n } else {\n this.show();\n }\n }\n\n private getContentScrollInfo() {\n if (!this.hasUpdated) {\n return {isScrollable: false, isAtScrollTop: true, isAtScrollBottom: true};\n }\n const {scrollTop, scrollHeight, offsetHeight, clientHeight} =\n this.contentElement;\n return {\n isScrollable: scrollHeight > offsetHeight,\n isAtScrollTop: scrollTop === 0,\n isAtScrollBottom:\n Math.abs(Math.round(scrollHeight - scrollTop) - clientHeight) <= 2\n };\n }\n\n protected override render() {\n const {isScrollable, isAtScrollTop, isAtScrollBottom} =\n this.getContentScrollInfo();\n return html`\n <dialog\n @close=${this.handleDialogDismiss}\n @cancel=${this.handleDialogDismiss}\n @click=${this.handleDialogClick}\n class=\"dialog ${classMap({\n 'stacked': this.stacked,\n 'scrollable': isScrollable,\n 'scroll-divider-header': !isAtScrollTop,\n 'scroll-divider-footer': !isAtScrollBottom,\n 'footerHidden': this.footerHidden\n })}\"\n aria-labelledby=\"header\"\n aria-describedby=\"content\"\n >\n <div class=\"container ${classMap({\n 'dragging': this.dragging\n })}\"\n @pointermove=${this.handlePointerMove}\n @pointerup=${this.handleDragEnd}\n >\n <header class=\"header\">\n <slot name=\"header\">\n <slot name=\"headline-prefix\"></slot>\n <slot name=\"headline\"></slot>\n <slot name=\"headline-suffix\"></slot>\n </slot>\n </header>\n <section class=\"content\" @scroll=${this.handleContentScroll}>\n <slot></slot>\n </section>\n <footer class=\"footer\">\n <slot name=\"footer\"></slot>\n </footer>\n <md-elevation surface></md-elevation>\n </div>\n </dialog>`;\n }\n\n protected override willUpdate(changed: PropertyValues) {\n if (changed.has('open')) {\n this.opening = this.open;\n // only closing if was opened previously...\n this.closing = !this.open && changed.get('open');\n }\n if (changed.has('fullscreen') || changed.has('fullscreenBreakpoint')) {\n this.updateFullscreen();\n }\n }\n\n protected override firstUpdated() {\n // Update when content size changes to show/hide scroll dividers.\n new ResizeObserver(() => {\n if (this.showingOpen) {\n this.requestUpdate();\n }\n }).observe(this.contentElement);\n }\n\n protected override updated(changed: PropertyValues) {\n if (changed.get('draggable') && !this.draggable) {\n this.style.removeProperty('--_container-drag-inline-start');\n this.style.removeProperty('--_container-drag-block-start');\n }\n // Reflect internal state to facilitate styling.\n this.reflectStateProp(changed, 'opening', this.opening);\n this.reflectStateProp(changed, 'closing', this.closing);\n this.reflectStateProp(\n changed, 'showingFullscreen', this.showingFullscreen,\n 'showing-fullscreen');\n this.reflectStateProp(\n changed, 'showingOpen', this.showingOpen, 'showing-open');\n if (!changed.has('open')) {\n return;\n }\n // prevent body scrolling early only when opening to avoid layout\n // shift when closing.\n if (!this.modeless && this.open) {\n Dialog.setDocumentScrollingDisabled(this.open);\n }\n if (this.open) {\n this.contentElement.scrollTop = 0;\n if (this.modeless) {\n this.dialogElement.show();\n } else {\n // Note, native focus handling fails when focused element is in an\n // overflow: auto container.\n this.dialogElement.showModal();\n }\n }\n // Avoids dispatching initial state.\n const shouldDispatchAction = changed.get('open') !== undefined;\n this.performTransition(shouldDispatchAction);\n }\n\n /**\n * Internal state is reflected here as attributes to effect styling. This\n * could be done via internal classes, but it's published on the host\n * to facilitate the (currently undocumented) possibility of customizing\n * styling of user content based on these states.\n * Note, in the future this could be done with `:state(...)` when browser\n * support improves.\n */\n private reflectStateProp(\n changed: PropertyValues, key: string, value: unknown,\n attribute?: string) {\n attribute ??= key;\n if (!changed.has(key)) {\n return;\n }\n if (value) {\n this.setAttribute(attribute, '');\n } else {\n this.removeAttribute(attribute);\n }\n }\n\n private dialogClosedResolver?: () => void;\n\n protected async performTransition(shouldDispatchAction: boolean) {\n // TODO: pause here only to avoid a double update warning.\n await this.updateComplete;\n this.showingOpen = this.open;\n if (shouldDispatchAction) {\n this.dispatchActionEvent(this.open ? 'opening' : 'closing');\n }\n // Compute desired transition duration.\n const duration = msFromTimeCSSValue(getComputedStyle(this).getPropertyValue(\n this.open ? OPENING_TRANSITION_PROP : CLOSING_TRANSITION_PROP));\n let promise = this.updateComplete;\n if (duration > 0) {\n promise = new Promise((r) => {\n setTimeout(r, duration);\n });\n }\n await promise;\n this.opening = false;\n this.closing = false;\n if (!this.open && this.dialogElement.open) {\n // Closing the dialog triggers an asynchronous `close` event.\n // It's important to wait for this event to fire since it changes the\n // state of `open` to false.\n // Without waiting, this element's `closed` event can be called before\n // the dialog's `close` event, which is problematic since the user\n // can set `open` in the `closed` event.\n // The timing of the event appears to vary via browser and does *not*\n // seem to resolve by \"task\" timing; therefore an explicit promise is\n // used.\n const closedPromise = new Promise<void>(resolve => {\n this.dialogClosedResolver = resolve;\n });\n this.dialogElement.close(this.currentAction || this.defaultAction);\n await closedPromise;\n // enable scrolling late to avoid layout shift when closing\n if (!this.modeless) {\n Dialog.setDocumentScrollingDisabled(this.open);\n }\n }\n // Focus initial element.\n if (this.open) {\n this.focus();\n }\n if (shouldDispatchAction) {\n this.dispatchActionEvent(this.open ? 'opened' : 'closed');\n }\n this.currentAction = undefined;\n }\n\n protected dispatchActionEvent(type: string) {\n const detail = {action: this.open ? 'none' : this.currentAction};\n this.dispatchEvent(new CustomEvent(type, {detail, bubbles: true}));\n }\n\n /* Live media query for matching user specified fullscreen breakpoint. */\n private fullscreenQuery?: MediaQueryList;\n private fullscreenQueryListener:\n ((e: MediaQueryListEvent) => void)|undefined = undefined;\n protected updateFullscreen() {\n if (this.fullscreenQuery !== undefined) {\n this.fullscreenQuery.removeEventListener(\n 'change', this.fullscreenQueryListener!);\n this.fullscreenQuery = this.fullscreenQueryListener = undefined;\n }\n if (!this.fullscreen) {\n this.showingFullscreen = false;\n return;\n }\n this.fullscreenQuery = window.matchMedia(this.fullscreenBreakpoint);\n this.fullscreenQuery.addEventListener(\n 'change',\n (this.fullscreenQueryListener = (event: MediaQueryListEvent) => {\n this.showingFullscreen = event.matches;\n }));\n this.showingFullscreen = this.fullscreenQuery.matches;\n }\n\n // handles native close/cancel events and we just ensure\n // internal state is in sync.\n protected handleDialogDismiss(e: Event) {\n if (e.type === 'cancel') {\n this.currentAction = this.escapeKeyAction;\n }\n this.dialogClosedResolver?.();\n this.dialogClosedResolver = undefined;\n this.open = false;\n this.opening = false;\n this.closing = false;\n }\n\n protected handleDialogClick(e: Event) {\n if (!this.open) {\n return;\n }\n this.currentAction =\n (e.target as Element).getAttribute(this.actionAttribute) ??\n (!this.modeless && !e.composedPath().includes(this.containerElement) ?\n this.scrimClickAction :\n '');\n if (this.currentAction !== '') {\n this.close(this.currentAction);\n }\n }\n\n /* This allows the dividers to dynamically show based on scrolling. */\n protected handleContentScroll() {\n this.throttle('scroll', () => {\n this.requestUpdate();\n });\n }\n\n protected getFocusElement(): HTMLElement|null {\n const selector = `[${this.focusAttribute}]`;\n const slotted = [this.footerSlot, this.contentSlot].flatMap(\n slot => slot.assignedElements({flatten: true}));\n for (const el of slotted) {\n const focusEl = el.matches(selector) ? el : el.querySelector(selector);\n if (focusEl) {\n return focusEl as HTMLElement;\n }\n }\n return null;\n }\n\n override focus() {\n this.getFocusElement()?.focus();\n }\n\n override blur() {\n this.getFocusElement()?.blur();\n }\n\n protected canStartDrag(e: PointerEvent) {\n if (this.draggable === false || e.defaultPrevented || !(e.buttons & 1) ||\n !e.composedPath().includes(this.headerElement)) {\n return false;\n }\n return true;\n }\n\n protected handlePointerMove(e: PointerEvent) {\n if (!this.dragging && !this.canStartDrag(e)) {\n return;\n }\n const {top, left, height, width} =\n this.containerElement.getBoundingClientRect();\n if (!this.dragging) {\n this.containerElement.setPointerCapture(e.pointerId);\n this.dragging = true;\n const {x, y} = e;\n this.dragInfo = [x, y, top, left];\n }\n const [sx, sy, st, sl] = this.dragInfo ?? [0, 0, 0, 0];\n const dx = e.x - sx;\n const dy = e.y - sy;\n const ml = window.innerWidth - width - this.dragMargin;\n const mt = window.innerHeight - height - this.dragMargin;\n const l = Math.max(this.dragMargin, Math.min(ml, dx + sl));\n const t = Math.max(this.dragMargin, Math.min(mt, dy + st));\n this.style.setProperty('--_container-drag-inline-start', `${l}px`);\n this.style.setProperty('--_container-drag-block-start', `${t}px`);\n }\n\n protected handleDragEnd(e: PointerEvent) {\n if (!this.dragging) {\n return;\n }\n this.containerElement.releasePointerCapture(e.pointerId);\n this.dragging = false;\n this.dragInfo = undefined;\n }\n}"]}
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["dialog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAE7E,mCAAmC;AACnC,mCAAmC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AAEpC,MAAM,uBAAuB,GAAG,gCAAgC,CAAC;AACjE,MAAM,uBAAuB,GAAG,gCAAgC,CAAC;AAEjE;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAAtC;;QA6BE;;WAEG;QACwB,SAAI,GAAG,KAAK,CAAC;QAExC;;;;;;;;;;;;;;;;WAgBG;QACwB,eAAU,GAAG,KAAK,CAAC;QAE9C;;;;;;;WAOG;QAEH,yBAAoB,GAAG,yCAAyC,CAAC;QAEjE;;;WAGG;QACwB,iBAAY,GAAG,KAAK,CAAC;QAEhD;;;WAGG;QACwB,YAAO,GAAG,KAAK,CAAC;QAE3C;;;;;;;;;WASG;QACS,kBAAa,GAAG,YAAY,CAAC;QAEzC;;;;;;;;;;;;;WAaG;QACS,oBAAe,GAAG,cAAc,CAAC;QAE7C;;;;;;;;;;;;WAYG;QACS,mBAAc,GAAG,aAAa,CAAC;QAE3C;;;;WAIG;QACuB,qBAAgB,GAAG,YAAY,CAAC;QAE1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,EAAE;;6CAA8B;AAgBzC;IAAC,QAAQ,EAAE;;+CAAkC;AAe7C;IAAC,QAAQ,EAAE;;8CAAgC;AAO3C;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;gDAAiC;AAO1D;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;;+CAAgC;AAOzD;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;wCAAkB;AAK3D;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;;yCAA4B;AAItD;IAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC;8BAAkC,iBAAiB;6CAAC;AAG3E;IAAC,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC;8BACH,eAAe;0CAAC;AAC9C;IAAC,KAAK,CAAC,kBAAkB,EAAE,IAAI,CAAC;8BACD,eAAe;2CAAC;AAE/C;IAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC;8BAAmC,cAAc;8CAAC;AAE1E;IAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC;8BAAqC,cAAc;gDAAC;AAE9E;IAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC;8BAAkC,cAAc;6CAAC;AAKxE;IAAC,KAAK,EAAE;;iDAAmC;AAC3C;IAAC,KAAK,EAAE;;2CAA6B;AACrC;IAAC,KAAK,EAAE;;uCAAyB;AACjC;IAAC,KAAK,EAAE;;uCAAyB;AAQjC;IAAC,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;;0CAA0B;AAIpD;IAAC,KAAK,EAAE;;wCAA0B","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\n\nimport {html, LitElement, PropertyValues} from 'lit';\nimport {property, query, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\n\nimport {createThrottle, msFromTimeCSSValue} from '../../motion/animation.js';\n\n// This is required for decorators.\n// tslint:disable:no-new-decorators\n\n/**\n * Default close action.\n */\nexport const CLOSE_ACTION = 'close';\n\nconst OPENING_TRANSITION_PROP = '--_opening-transition-duration';\nconst CLOSING_TRANSITION_PROP = '--_closing-transition-duration';\n\n/**\n * A dialog component.\n */\nexport class Dialog extends LitElement {\n private static preventedScrollingCount = 0;\n private static scrollbarTester: HTMLDivElement;\n\n private static setDocumentScrollingDisabled(disabled = false) {\n let {preventedScrollingCount, scrollbarTester} = Dialog;\n Dialog.preventedScrollingCount = preventedScrollingCount =\n Math.max(preventedScrollingCount + (Number(disabled) || -1), 0);\n const shouldPrevent = Boolean(preventedScrollingCount);\n const {style} = document.body;\n if (shouldPrevent && style.overflow === 'hidden') {\n return;\n }\n if (scrollbarTester === undefined) {\n Dialog.scrollbarTester = scrollbarTester = document.createElement('div');\n scrollbarTester.style.cssText =\n `position: absolute; height: 0; width: 100%; visibility: hidden; pointer-events: none;`;\n }\n // Appends an element to see if its offsetWidth changes when overflow is\n // altered. If it does, then add end inline padding to restore the width to\n // avoid a visible layout shift.\n document.body.append(scrollbarTester);\n const {offsetWidth} = scrollbarTester;\n style.overflow = shouldPrevent ? 'hidden' : '';\n const scrollbarWidth = scrollbarTester.offsetWidth - offsetWidth;\n scrollbarTester.remove();\n style.paddingInlineEnd = shouldPrevent ? `${scrollbarWidth}px` : '';\n }\n\n /**\n * Opens the dialog when set to `true` and closes it when set to `false`.\n */\n @property({type: Boolean}) open = false;\n\n /**\n * Setting fullscreen displays the dialog fullscreen on small screens.\n * This can be customized via the `fullscreenBreakpoint` property.\n * When showing fullscreen, the header will take up less vertical space, and\n * the dialog will have a `showing-fullscreen`attribute, allowing content to\n * be styled in this state.\n *\n * Dialogs can be sized by setting:\n *\n * * --md-dialog-container-min-block-size\n * * --md-dialog-container-max-block-size\n * * --md-dialog-container-min-inline-size\n * * --md-dialog-container-max-inline-size\n *\n * These are typically configured via media queries and are independent of the\n * fullscreen setting.\n */\n @property({type: Boolean}) fullscreen = false;\n\n /**\n * A media query string specifying the breakpoint at which the dialog\n * should be shown fullscreen. Note, this only applies when the `fullscreen`\n * property is set.\n *\n * By default, the dialog is shown fullscreen on screens less than 600px wide\n * or 400px tall.\n */\n @property({type: String})\n fullscreenBreakpoint = '(max-width: 600px), (max-height: 400px)';\n\n /**\n * Hides the dialog footer, making any content slotted into the footer\n * inaccessible.\n */\n @property({type: Boolean}) footerHidden = false;\n\n /**\n * Renders footer content in a vertically stacked alignment rather than the\n * normal horizontal alignment.\n */\n @property({type: Boolean}) stacked = false;\n\n /**\n * When the dialog is closed it disptaches `closing` and `closed` events.\n * These events have an action property which has a default value of\n * the value of this property. Specific actions have explicit values but when\n * a value is not specified, the default is used. For example, clicking the\n * scrim, pressing escape, or clicking a button with an action attribute set\n * produce an explicit action.\n *\n * Defaults to `close`.\n */\n @property() defaultAction = CLOSE_ACTION;\n\n /**\n * The name of an attribute which can be placed on any element slotted into\n * the dialog. If an element has an action attribute set, clicking it will\n * close the dialog and the `closing` and `closed` events dispatched will\n * have their action property set the the value of this attribute on the\n * clicked element.The default valus is `dialogAction`. For example,\n *\n * <md-dialog>\n * Content\n * <md-filled-button slot=\"footer\"dialogAction=\"buy\">\n * Buy\n * </md-filled-button>\n * </md-dialog>\n */\n @property() actionAttribute = 'dialogAction';\n\n /**\n * When the dialog is opened, it will focus the first element which has\n * an attribute name matching this property. The default value is\n * `dialogFocus`. For example:\n *\n * <md-dialog>\n * <md-filled-text-field\n * label=\"Enter some text\"\n * dialogFocus\n * >\n * </md-filled-text-field>\n * </md-dialog>\n */\n @property() focusAttribute = 'dialogFocus';\n\n /**\n * Clicking on the scrim surrounding the dialog closes the dialog.\n * The `closing` and `closed` events this produces have an `action` property\n * which is the value of this property and defaults to `close`.\n */\n @property({type: String}) scrimClickAction = CLOSE_ACTION;\n\n /**\n * Pressing the `escape` key while the dialog is open closes the dialog.\n * The `closing` and `closed` events this produces have an `action` property\n * which is the value of this property and defaults to `close`.\n */\n @property({type: String}) escapeKeyAction = CLOSE_ACTION;\n\n /**\n * When opened, the dialog is displayed modeless or non-modal. This\n * allows users to interact with content outside the dialog without\n * closing the dialog and does not display the scrim around the dialog.\n */\n @property({type: Boolean, reflect: true}) modeless = false;\n\n /**\n * Set to make the dialog position draggable.\n */\n @property({type: Boolean}) override draggable = false;\n\n private readonly throttle = createThrottle();\n\n @query('.dialog', true) private readonly dialogElement!: HTMLDialogElement;\n\n // slots tracked to find focusable elements.\n @query('slot[name=footer]', true)\n private readonly footerSlot!: HTMLSlotElement;\n @query('slot:not([name])', true)\n private readonly contentSlot!: HTMLSlotElement;\n // for scrolling related styling\n @query(`.content`, true) private readonly contentElement!: HTMLDivElement;\n // used to determine container size for dragging\n @query(`.container`, true) private readonly containerElement!: HTMLDivElement;\n // used to determin where users can drag from.\n @query(`.header`, true) private readonly headerElement!: HTMLDivElement;\n\n /**\n * Private properties that reflect for styling manually in `updated`.\n */\n @state() private showingFullscreen = false;\n @state() private showingOpen = false;\n @state() private opening = false;\n @state() private closing = false;\n\n /**\n * Transition kind. Supported options include: grow, shrink, grow-down,\n * grow-up, grow-left, and grow-right.\n *\n * Defaults to grow-down.\n */\n @property({reflect: true}) transition = 'grow-down';\n\n private currentAction: string|undefined;\n\n @state() private dragging = false;\n private readonly dragMargin = 8;\n private dragInfo?: [number, number, number, number]|undefined;\n\n /**\n * Opens and shows the dialog. This is equivalent to setting the `open`\n * property to true.\n */\n show() {\n this.open = true;\n }\n\n /**\n * Closes the dialog. This is equivalent to setting the `open`\n * property to false.\n */\n close(action = '') {\n this.currentAction = action;\n this.open = false;\n }\n\n /**\n * Opens and shows the dialog if it is closed; otherwise closes it.\n */\n toggleShow() {\n if (this.open) {\n this.close(this.currentAction);\n } else {\n this.show();\n }\n }\n\n private getContentScrollInfo() {\n if (!this.hasUpdated) {\n return {isScrollable: false, isAtScrollTop: true, isAtScrollBottom: true};\n }\n const {scrollTop, scrollHeight, offsetHeight, clientHeight} =\n this.contentElement;\n return {\n isScrollable: scrollHeight > offsetHeight,\n isAtScrollTop: scrollTop === 0,\n isAtScrollBottom:\n Math.abs(Math.round(scrollHeight - scrollTop) - clientHeight) <= 2\n };\n }\n\n protected override render() {\n const {isScrollable, isAtScrollTop, isAtScrollBottom} =\n this.getContentScrollInfo();\n return html`\n <dialog\n @close=${this.handleDialogDismiss}\n @cancel=${this.handleDialogDismiss}\n @click=${this.handleDialogClick}\n class=\"dialog ${classMap({\n 'stacked': this.stacked,\n 'scrollable': isScrollable,\n 'scroll-divider-header': !isAtScrollTop,\n 'scroll-divider-footer': !isAtScrollBottom,\n 'footerHidden': this.footerHidden\n })}\"\n aria-labelledby=\"header\"\n aria-describedby=\"content\"\n >\n <div class=\"container ${classMap({\n 'dragging': this.dragging\n })}\"\n @pointermove=${this.handlePointerMove}\n @pointerup=${this.handleDragEnd}\n >\n <md-elevation surface></md-elevation>\n <header class=\"header\">\n <slot name=\"header\">\n <slot name=\"headline-prefix\"></slot>\n <slot name=\"headline\"></slot>\n <slot name=\"headline-suffix\"></slot>\n </slot>\n </header>\n <section class=\"content\" @scroll=${this.handleContentScroll}>\n <slot></slot>\n </section>\n <footer class=\"footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </dialog>`;\n }\n\n protected override willUpdate(changed: PropertyValues) {\n if (changed.has('open')) {\n this.opening = this.open;\n // only closing if was opened previously...\n this.closing = !this.open && changed.get('open');\n }\n if (changed.has('fullscreen') || changed.has('fullscreenBreakpoint')) {\n this.updateFullscreen();\n }\n }\n\n protected override firstUpdated() {\n // Update when content size changes to show/hide scroll dividers.\n new ResizeObserver(() => {\n if (this.showingOpen) {\n this.requestUpdate();\n }\n }).observe(this.contentElement);\n }\n\n protected override updated(changed: PropertyValues) {\n if (changed.get('draggable') && !this.draggable) {\n this.style.removeProperty('--_container-drag-inline-start');\n this.style.removeProperty('--_container-drag-block-start');\n }\n // Reflect internal state to facilitate styling.\n this.reflectStateProp(changed, 'opening', this.opening);\n this.reflectStateProp(changed, 'closing', this.closing);\n this.reflectStateProp(\n changed, 'showingFullscreen', this.showingFullscreen,\n 'showing-fullscreen');\n this.reflectStateProp(\n changed, 'showingOpen', this.showingOpen, 'showing-open');\n if (!changed.has('open')) {\n return;\n }\n // prevent body scrolling early only when opening to avoid layout\n // shift when closing.\n if (!this.modeless && this.open) {\n Dialog.setDocumentScrollingDisabled(this.open);\n }\n if (this.open) {\n this.contentElement.scrollTop = 0;\n if (this.modeless) {\n this.dialogElement.show();\n } else {\n // Note, native focus handling fails when focused element is in an\n // overflow: auto container.\n this.dialogElement.showModal();\n }\n }\n // Avoids dispatching initial state.\n const shouldDispatchAction = changed.get('open') !== undefined;\n this.performTransition(shouldDispatchAction);\n }\n\n /**\n * Internal state is reflected here as attributes to effect styling. This\n * could be done via internal classes, but it's published on the host\n * to facilitate the (currently undocumented) possibility of customizing\n * styling of user content based on these states.\n * Note, in the future this could be done with `:state(...)` when browser\n * support improves.\n */\n private reflectStateProp(\n changed: PropertyValues, key: string, value: unknown,\n attribute?: string) {\n attribute ??= key;\n if (!changed.has(key)) {\n return;\n }\n if (value) {\n this.setAttribute(attribute, '');\n } else {\n this.removeAttribute(attribute);\n }\n }\n\n private dialogClosedResolver?: () => void;\n\n protected async performTransition(shouldDispatchAction: boolean) {\n // TODO: pause here only to avoid a double update warning.\n await this.updateComplete;\n this.showingOpen = this.open;\n if (shouldDispatchAction) {\n this.dispatchActionEvent(this.open ? 'opening' : 'closing');\n }\n // Compute desired transition duration.\n const duration = msFromTimeCSSValue(getComputedStyle(this).getPropertyValue(\n this.open ? OPENING_TRANSITION_PROP : CLOSING_TRANSITION_PROP));\n let promise = this.updateComplete;\n if (duration > 0) {\n promise = new Promise((r) => {\n setTimeout(r, duration);\n });\n }\n await promise;\n this.opening = false;\n this.closing = false;\n if (!this.open && this.dialogElement.open) {\n // Closing the dialog triggers an asynchronous `close` event.\n // It's important to wait for this event to fire since it changes the\n // state of `open` to false.\n // Without waiting, this element's `closed` event can be called before\n // the dialog's `close` event, which is problematic since the user\n // can set `open` in the `closed` event.\n // The timing of the event appears to vary via browser and does *not*\n // seem to resolve by \"task\" timing; therefore an explicit promise is\n // used.\n const closedPromise = new Promise<void>(resolve => {\n this.dialogClosedResolver = resolve;\n });\n this.dialogElement.close(this.currentAction || this.defaultAction);\n await closedPromise;\n // enable scrolling late to avoid layout shift when closing\n if (!this.modeless) {\n Dialog.setDocumentScrollingDisabled(this.open);\n }\n }\n // Focus initial element.\n if (this.open) {\n this.focus();\n }\n if (shouldDispatchAction) {\n this.dispatchActionEvent(this.open ? 'opened' : 'closed');\n }\n this.currentAction = undefined;\n }\n\n protected dispatchActionEvent(type: string) {\n const detail = {action: this.open ? 'none' : this.currentAction};\n this.dispatchEvent(new CustomEvent(type, {detail, bubbles: true}));\n }\n\n /* Live media query for matching user specified fullscreen breakpoint. */\n private fullscreenQuery?: MediaQueryList;\n private fullscreenQueryListener:\n ((e: MediaQueryListEvent) => void)|undefined = undefined;\n protected updateFullscreen() {\n if (this.fullscreenQuery !== undefined) {\n this.fullscreenQuery.removeEventListener(\n 'change', this.fullscreenQueryListener!);\n this.fullscreenQuery = this.fullscreenQueryListener = undefined;\n }\n if (!this.fullscreen) {\n this.showingFullscreen = false;\n return;\n }\n this.fullscreenQuery = window.matchMedia(this.fullscreenBreakpoint);\n this.fullscreenQuery.addEventListener(\n 'change',\n (this.fullscreenQueryListener = (event: MediaQueryListEvent) => {\n this.showingFullscreen = event.matches;\n }));\n this.showingFullscreen = this.fullscreenQuery.matches;\n }\n\n // handles native close/cancel events and we just ensure\n // internal state is in sync.\n protected handleDialogDismiss(e: Event) {\n if (e.type === 'cancel') {\n this.currentAction = this.escapeKeyAction;\n }\n this.dialogClosedResolver?.();\n this.dialogClosedResolver = undefined;\n this.open = false;\n this.opening = false;\n this.closing = false;\n }\n\n protected handleDialogClick(e: Event) {\n if (!this.open) {\n return;\n }\n this.currentAction =\n (e.target as Element).getAttribute(this.actionAttribute) ??\n (!this.modeless && !e.composedPath().includes(this.containerElement) ?\n this.scrimClickAction :\n '');\n if (this.currentAction !== '') {\n this.close(this.currentAction);\n }\n }\n\n /* This allows the dividers to dynamically show based on scrolling. */\n protected handleContentScroll() {\n this.throttle('scroll', () => {\n this.requestUpdate();\n });\n }\n\n protected getFocusElement(): HTMLElement|null {\n const selector = `[${this.focusAttribute}]`;\n const slotted = [this.footerSlot, this.contentSlot].flatMap(\n slot => slot.assignedElements({flatten: true}));\n for (const el of slotted) {\n const focusEl = el.matches(selector) ? el : el.querySelector(selector);\n if (focusEl) {\n return focusEl as HTMLElement;\n }\n }\n return null;\n }\n\n override focus() {\n this.getFocusElement()?.focus();\n }\n\n override blur() {\n this.getFocusElement()?.blur();\n }\n\n protected canStartDrag(e: PointerEvent) {\n if (this.draggable === false || e.defaultPrevented || !(e.buttons & 1) ||\n !e.composedPath().includes(this.headerElement)) {\n return false;\n }\n return true;\n }\n\n protected handlePointerMove(e: PointerEvent) {\n if (!this.dragging && !this.canStartDrag(e)) {\n return;\n }\n const {top, left, height, width} =\n this.containerElement.getBoundingClientRect();\n if (!this.dragging) {\n this.containerElement.setPointerCapture(e.pointerId);\n this.dragging = true;\n const {x, y} = e;\n this.dragInfo = [x, y, top, left];\n }\n const [sx, sy, st, sl] = this.dragInfo ?? [0, 0, 0, 0];\n const dx = e.x - sx;\n const dy = e.y - sy;\n const ml = window.innerWidth - width - this.dragMargin;\n const mt = window.innerHeight - height - this.dragMargin;\n const l = Math.max(this.dragMargin, Math.min(ml, dx + sl));\n const t = Math.max(this.dragMargin, Math.min(mt, dy + st));\n this.style.setProperty('--_container-drag-inline-start', `${l}px`);\n this.style.setProperty('--_container-drag-block-start', `${t}px`);\n }\n\n protected handleDragEnd(e: PointerEvent) {\n if (!this.dragging) {\n return;\n }\n this.containerElement.releasePointerCapture(e.pointerId);\n this.dragging = false;\n this.dragInfo = undefined;\n }\n}\n"]}
@@ -4,7 +4,6 @@
4
4
  //
5
5
 
6
6
  // go/keep-sorted start
7
- @use 'sass:list';
8
7
  @use 'sass:map';
9
8
  // go/keep-sorted end
10
9
  // go/keep-sorted start
@@ -13,34 +12,14 @@
13
12
  @use './md-comp-elevation';
14
13
  // go/keep-sorted end
15
14
 
16
- // TODO(b/261603279): remove once tokens are updated to use level instead of dp
17
- @function resolve-tokens($tokens, $elevation-keys...) {
18
- @each $elevation-key in $elevation-keys {
19
- $dp: map.get($tokens, $elevation-key);
20
- @if $dp != null and not var.is-var($dp) {
21
- $valid-dps: (0, 1, 3, 6, 8, 12);
22
- @if list.index($valid-dps, $dp) == null {
23
- @error '#{$elevation-key} must be expressed in dp values (#{$valid-dps}), but received #{$dp}. See b/261603279.';
24
- }
25
-
26
- $dp-to-level: list.index($valid-dps, $dp) - 1;
27
- $tokens: map.set($tokens, $elevation-key, $dp-to-level);
28
- }
29
- }
30
-
31
- @return $tokens;
32
- }
33
-
34
15
  @mixin theme($tokens) {
35
16
  $tokens: theme.validate-theme(md-comp-elevation.values(), $tokens);
36
- $tokens: resolve-tokens($tokens, 'level');
37
17
  $tokens: theme.create-theme-vars($tokens, 'elevation');
38
18
  @include theme.emit-theme-vars($tokens);
39
19
  }
40
20
 
41
21
  @mixin styles() {
42
22
  $tokens: md-comp-elevation.values();
43
- $tokens: resolve-tokens($tokens, 'level');
44
23
  $tokens: theme.create-theme-vars($tokens, 'elevation');
45
24
 
46
25
  :host {
@@ -50,6 +29,7 @@
50
29
 
51
30
  border-radius: inherit;
52
31
  display: flex;
32
+ pointer-events: none;
53
33
  position: relative;
54
34
  }
55
35
 
@@ -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{--_duration: var(--md-elevation-duration, 0s);--_easing: var(--md-elevation-easing, cubic-bezier(0.2, 0, 0, 1));--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000));--_surface-tint: var(--md-elevation-surface-tint, var(--md-sys-color-primary, #6750a4));border-radius:inherit;display:flex;position:relative}:host(:not([surface])) .surface,:host(:not([shadow])) .shadow{display:none}.surface,.shadow,.shadow::before,.shadow::after{border-radius:inherit;content:"";inset:0;position:absolute;transition-property:box-shadow,opacity;transition-duration:var(--_duration);transition-timing-function:var(--_easing)}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{opacity:.15;box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color)}.surface{background:var(--_surface-tint);opacity:calc(clamp(0,var(--_level),.05) + clamp(0,var(--_level) - 1,.03) + clamp(0,var(--_level) - 2,.03) + clamp(0,var(--_level) - 3,.01) + clamp(0,var(--_level) - 4,.02))}/*# sourceMappingURL=elevation-styles.css.map */
7
+ export const styles = css `:host{--_duration: var(--md-elevation-duration, 0s);--_easing: var(--md-elevation-easing, cubic-bezier(0.2, 0, 0, 1));--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000));--_surface-tint: var(--md-elevation-surface-tint, var(--md-sys-color-primary, #6750a4));border-radius:inherit;display:flex;pointer-events:none;position:relative}:host(:not([surface])) .surface,:host(:not([shadow])) .shadow{display:none}.surface,.shadow,.shadow::before,.shadow::after{border-radius:inherit;content:"";inset:0;position:absolute;transition-property:box-shadow,opacity;transition-duration:var(--_duration);transition-timing-function:var(--_easing)}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{opacity:.15;box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color)}.surface{background:var(--_surface-tint);opacity:calc(clamp(0,var(--_level),.05) + clamp(0,var(--_level) - 1,.03) + clamp(0,var(--_level) - 2,.03) + clamp(0,var(--_level) - 3,.01) + clamp(0,var(--_level) - 4,.02))}/*# sourceMappingURL=elevation-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=elevation-styles.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elevation-styles.css.js","sourceRoot":"","sources":["elevation-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{--_duration: var(--md-elevation-duration, 0s);--_easing: var(--md-elevation-easing, cubic-bezier(0.2, 0, 0, 1));--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000));--_surface-tint: var(--md-elevation-surface-tint, var(--md-sys-color-primary, #6750a4));border-radius:inherit;display:flex;position:relative}:host(:not([surface])) .surface,:host(:not([shadow])) .shadow{display:none}.surface,.shadow,.shadow::before,.shadow::after{border-radius:inherit;content:\"\";inset:0;position:absolute;transition-property:box-shadow,opacity;transition-duration:var(--_duration);transition-timing-function:var(--_easing)}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{opacity:.15;box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color)}.surface{background:var(--_surface-tint);opacity:calc(clamp(0,var(--_level),.05) + clamp(0,var(--_level) - 1,.03) + clamp(0,var(--_level) - 2,.03) + clamp(0,var(--_level) - 3,.01) + clamp(0,var(--_level) - 4,.02))}/*# sourceMappingURL=elevation-styles.css.map */\n`;\n "]}
1
+ {"version":3,"file":"elevation-styles.css.js","sourceRoot":"","sources":["elevation-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{--_duration: var(--md-elevation-duration, 0s);--_easing: var(--md-elevation-easing, cubic-bezier(0.2, 0, 0, 1));--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000));--_surface-tint: var(--md-elevation-surface-tint, var(--md-sys-color-primary, #6750a4));border-radius:inherit;display:flex;pointer-events:none;position:relative}:host(:not([surface])) .surface,:host(:not([shadow])) .shadow{display:none}.surface,.shadow,.shadow::before,.shadow::after{border-radius:inherit;content:\"\";inset:0;position:absolute;transition-property:box-shadow,opacity;transition-duration:var(--_duration);transition-timing-function:var(--_easing)}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{opacity:.15;box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color)}.surface{background:var(--_surface-tint);opacity:calc(clamp(0,var(--_level),.05) + clamp(0,var(--_level) - 1,.03) + clamp(0,var(--_level) - 2,.03) + clamp(0,var(--_level) - 3,.01) + clamp(0,var(--_level) - 4,.02))}/*# sourceMappingURL=elevation-styles.css.map */\n`;\n "]}
@@ -12,17 +12,15 @@
12
12
  // go/keep-sorted start
13
13
  @use '../../sass/shape';
14
14
  @use '../../sass/theme';
15
- @use '../../sass/typography';
16
15
  @use '../../tokens';
17
16
  @use './shared';
18
17
  // go/keep-sorted end
19
18
 
20
19
  @mixin theme($tokens) {
21
20
  $tokens: theme.validate-theme(
22
- _resolve-typography(tokens.md-comp-extended-fab-surface-values()),
23
- _resolve-typography($tokens)
21
+ tokens.md-comp-extended-fab-surface-values(),
22
+ $tokens
24
23
  );
25
- $tokens: shared.resolve-tokens($tokens);
26
24
  $tokens: theme.create-theme-vars($tokens, 'fab-extended');
27
25
  $tokens: shape.resolve-tokens($tokens, 'container-shape');
28
26
 
@@ -30,8 +28,7 @@
30
28
  }
31
29
 
32
30
  @mixin styles() {
33
- $tokens: _resolve-typography(tokens.md-comp-extended-fab-surface-values());
34
- $tokens: shared.resolve-tokens($tokens);
31
+ $tokens: tokens.md-comp-extended-fab-surface-values();
35
32
  $tokens: theme.create-theme-vars($tokens, 'fab-extended');
36
33
  $tokens: shape.resolve-tokens($tokens, 'container-shape');
37
34
 
@@ -74,7 +71,3 @@
74
71
  }
75
72
  }
76
73
  }
77
-
78
- @function _resolve-typography($tokens) {
79
- @return typography.resolve-tokens($tokens, 'label-text');
80
- }
package/fab/lib/_fab.scss CHANGED
@@ -15,7 +15,6 @@
15
15
 
16
16
  @mixin theme($tokens) {
17
17
  $tokens: theme.validate-theme(tokens.md-comp-fab-surface-values(), $tokens);
18
- $tokens: shared.resolve-tokens($tokens);
19
18
  $tokens: theme.create-theme-vars($tokens, 'fab');
20
19
  $tokens: shape.resolve-tokens($tokens, 'container-shape');
21
20
 
@@ -24,8 +23,6 @@
24
23
 
25
24
  @mixin styles() {
26
25
  $tokens: tokens.md-comp-fab-surface-values();
27
-
28
- $tokens: shared.resolve-tokens($tokens);
29
26
  $tokens: theme.create-theme-vars($tokens, 'fab');
30
27
  $tokens: shape.resolve-tokens($tokens, 'container-shape');
31
28
 
@@ -11,7 +11,7 @@
11
11
  @use 'sass:meta';
12
12
  // go/keep-sorted end
13
13
  // go/keep-sorted start
14
- @use '../../elevation/lib/elevation';
14
+ @use '../../elevation/elevation';
15
15
  @use '../../focus/focus-ring';
16
16
  @use '../../ripple/ripple';
17
17
  @use '../../sass/shape';
@@ -32,11 +32,6 @@
32
32
  vertical-align: top;
33
33
  }
34
34
 
35
- :host([disabled]) {
36
- cursor: default;
37
- pointer-events: none;
38
- }
39
-
40
35
  .md3-fab {
41
36
  display: inline-flex;
42
37
  border: none;
@@ -53,7 +48,7 @@
53
48
 
54
49
  @include focus-ring.theme(
55
50
  (
56
- shape: shape.corners-to-shape-token(--_container-shape),
51
+ shape: shape.corners-to-shape-token('--_container-shape'),
57
52
  )
58
53
  );
59
54
 
@@ -193,27 +188,10 @@
193
188
  // Adjust the focus ring padding to account for the 1px border in HCM.
194
189
  @include focus-ring.theme(
195
190
  (
196
- offset-vertical: 3px,
197
- offset-horizontal: 3px,
191
+ offset: 3px,
198
192
  )
199
193
  );
200
194
  border: 1px solid ButtonText;
201
195
  }
202
196
  }
203
197
  }
204
-
205
- @function resolve-tokens($tokens) {
206
- $tokens: elevation.resolve-tokens(
207
- $tokens,
208
- 'container-elevation',
209
- 'focus-container-elevation',
210
- 'hover-container-elevation',
211
- 'pressed-container-elevation',
212
- 'lowered-container-elevation',
213
- 'lowered-focus-container-elevation',
214
- 'lowered-hover-container-elevation',
215
- 'lowered-pressed-container-elevation'
216
- );
217
-
218
- @return $tokens;
219
- }