@material/web 1.0.0-pre.6 → 1.0.0-pre.7

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 (334) hide show
  1. package/README.md +7 -7
  2. package/aria/aria.d.ts +43 -0
  3. package/aria/aria.js +56 -0
  4. package/aria/aria.js.map +1 -0
  5. package/aria/delegate.d.ts +37 -0
  6. package/aria/delegate.js +53 -0
  7. package/aria/delegate.js.map +1 -0
  8. package/badge/badge.d.ts +0 -1
  9. package/badge/badge.js +0 -1
  10. package/badge/badge.js.map +1 -1
  11. package/badge/lib/badge.d.ts +8 -7
  12. package/badge/lib/badge.js +5 -6
  13. package/badge/lib/badge.js.map +1 -1
  14. package/button/lib/_elevation.scss +13 -3
  15. package/button/lib/button.d.ts +1 -12
  16. package/button/lib/button.js +29 -60
  17. package/button/lib/button.js.map +1 -1
  18. package/button/lib/shared-elevation-styles.css.js +1 -1
  19. package/button/lib/shared-elevation-styles.css.js.map +1 -1
  20. package/checkbox/lib/checkbox.d.ts +0 -1
  21. package/checkbox/lib/checkbox.js +33 -43
  22. package/checkbox/lib/checkbox.js.map +1 -1
  23. package/chips/_filter-chip.scss +6 -0
  24. package/chips/filter-chip.d.ts +20 -0
  25. package/chips/filter-chip.js +24 -0
  26. package/chips/filter-chip.js.map +1 -0
  27. package/chips/lib/_filter-chip.scss +141 -0
  28. package/chips/lib/_shared.scss +18 -14
  29. package/chips/lib/assist-styles.css.js +1 -1
  30. package/chips/lib/assist-styles.css.js.map +1 -1
  31. package/chips/lib/chip.d.ts +8 -3
  32. package/chips/lib/chip.js +29 -30
  33. package/chips/lib/chip.js.map +1 -1
  34. package/chips/lib/filter-chip.d.ts +21 -0
  35. package/chips/lib/filter-chip.js +47 -0
  36. package/chips/lib/filter-chip.js.map +1 -0
  37. package/chips/lib/filter-styles.css.js +9 -0
  38. package/chips/lib/filter-styles.css.js.map +1 -0
  39. package/{fab/lib/fab-extended-styles.scss → chips/lib/filter-styles.scss} +3 -3
  40. package/chips/lib/shared-styles.css.js +1 -1
  41. package/chips/lib/shared-styles.css.js.map +1 -1
  42. package/chips/lib/suggestion-styles.css.js +1 -1
  43. package/chips/lib/suggestion-styles.css.js.map +1 -1
  44. package/circularprogress/harness.d.ts +1 -0
  45. package/circularprogress/harness.js +4 -0
  46. package/circularprogress/harness.js.map +1 -1
  47. package/circularprogress/lib/circular-progress.d.ts +0 -1
  48. package/circularprogress/lib/circular-progress.js +16 -19
  49. package/circularprogress/lib/circular-progress.js.map +1 -1
  50. package/dialog/lib/_dialog.scss +8 -8
  51. package/dialog/lib/dialog-styles.css.js +1 -1
  52. package/dialog/lib/dialog-styles.css.js.map +1 -1
  53. package/dialog/lib/dialog.js +25 -49
  54. package/dialog/lib/dialog.js.map +1 -1
  55. package/divider/lib/divider.js +4 -7
  56. package/divider/lib/divider.js.map +1 -1
  57. package/elevation/lib/_elevation.scss +5 -7
  58. package/elevation/lib/elevation-styles.css.js +1 -1
  59. package/elevation/lib/elevation-styles.css.js.map +1 -1
  60. package/fab/_fab.scss +1 -0
  61. package/fab/branded-fab.d.ts +53 -0
  62. package/fab/branded-fab.js +56 -0
  63. package/fab/branded-fab.js.map +1 -0
  64. package/fab/fab.d.ts +25 -5
  65. package/fab/fab.js +27 -10
  66. package/fab/fab.js.map +1 -1
  67. package/fab/harness.d.ts +1 -2
  68. package/fab/harness.js +1 -1
  69. package/fab/harness.js.map +1 -1
  70. package/fab/lib/_fab-branded.scss +27 -0
  71. package/fab/lib/_fab.scss +144 -16
  72. package/fab/lib/_shared.scss +155 -130
  73. package/fab/lib/fab-branded-styles.css.js +9 -0
  74. package/fab/lib/fab-branded-styles.css.js.map +1 -0
  75. package/fab/lib/fab-branded-styles.scss +10 -0
  76. package/fab/lib/fab-styles.css.js +1 -1
  77. package/fab/lib/fab-styles.css.js.map +1 -1
  78. package/fab/lib/fab.d.ts +14 -10
  79. package/fab/lib/fab.js +19 -12
  80. package/fab/lib/fab.js.map +1 -1
  81. package/fab/lib/forced-colors-styles.css.d.ts +1 -0
  82. package/fab/lib/forced-colors-styles.css.js +9 -0
  83. package/fab/lib/forced-colors-styles.css.js.map +1 -0
  84. package/fab/lib/forced-colors-styles.scss +26 -0
  85. package/fab/lib/shared-styles.css.d.ts +1 -0
  86. package/fab/lib/shared-styles.css.js +9 -0
  87. package/fab/lib/shared-styles.css.js.map +1 -0
  88. package/fab/lib/{fab-shared-styles.scss → shared-styles.scss} +1 -1
  89. package/fab/lib/{fab-shared.d.ts → shared.d.ts} +24 -16
  90. package/fab/lib/shared.js +137 -0
  91. package/fab/lib/shared.js.map +1 -0
  92. package/field/lib/field.js +14 -27
  93. package/field/lib/field.js.map +1 -1
  94. package/focus/focus-ring.d.ts +0 -1
  95. package/focus/focus-ring.js +0 -1
  96. package/focus/focus-ring.js.map +1 -1
  97. package/focus/lib/focus-ring.js +2 -3
  98. package/focus/lib/focus-ring.js.map +1 -1
  99. package/focus/strong-focus.js +5 -0
  100. package/focus/strong-focus.js.map +1 -1
  101. package/icon/icon.d.ts +0 -1
  102. package/icon/icon.js +0 -1
  103. package/icon/icon.js.map +1 -1
  104. package/icon/lib/_icon.scss +2 -0
  105. package/icon/lib/icon-styles.css.js +1 -1
  106. package/icon/lib/icon-styles.css.js.map +1 -1
  107. package/icon/lib/icon.d.ts +5 -4
  108. package/icon/lib/icon.js +3 -2
  109. package/icon/lib/icon.js.map +1 -1
  110. package/iconbutton/lib/icon-button.d.ts +0 -4
  111. package/iconbutton/lib/icon-button.js +28 -48
  112. package/iconbutton/lib/icon-button.js.map +1 -1
  113. package/linearprogress/_linear-progress.scss +6 -0
  114. package/linearprogress/harness.d.ts +13 -0
  115. package/linearprogress/harness.js +18 -0
  116. package/linearprogress/harness.js.map +1 -0
  117. package/linearprogress/lib/_linear-progress.scss +380 -0
  118. package/linearprogress/lib/linear-progress-styles.css.d.ts +1 -0
  119. package/linearprogress/lib/linear-progress-styles.css.js +9 -0
  120. package/linearprogress/lib/linear-progress-styles.css.js.map +1 -0
  121. package/linearprogress/lib/linear-progress-styles.scss +8 -0
  122. package/linearprogress/lib/linear-progress.d.ts +35 -0
  123. package/linearprogress/lib/linear-progress.js +127 -0
  124. package/linearprogress/lib/linear-progress.js.map +1 -0
  125. package/linearprogress/linear-progress.d.ts +23 -0
  126. package/linearprogress/linear-progress.js +26 -0
  127. package/linearprogress/linear-progress.js.map +1 -0
  128. package/list/lib/_list.scss +6 -49
  129. package/list/lib/list-styles.css.js +1 -1
  130. package/list/lib/list-styles.css.js.map +1 -1
  131. package/list/lib/list.d.ts +1 -3
  132. package/list/lib/list.js +18 -34
  133. package/list/lib/list.js.map +1 -1
  134. package/list/lib/listitem/_list-item.scss +10 -69
  135. package/list/lib/listitem/forced-colors-styles.css.js +1 -1
  136. package/list/lib/listitem/forced-colors-styles.css.js.map +1 -1
  137. package/list/lib/listitem/list-item-styles.css.js +1 -1
  138. package/list/lib/listitem/list-item-styles.css.js.map +1 -1
  139. package/list/lib/listitem/list-item.d.ts +2 -4
  140. package/list/lib/listitem/list-item.js +24 -53
  141. package/list/lib/listitem/list-item.js.map +1 -1
  142. package/list/lib/listitemlink/list-item-link.js +4 -6
  143. package/list/lib/listitemlink/list-item-link.js.map +1 -1
  144. package/menu/lib/_menu.scss +6 -28
  145. package/menu/lib/menu-styles.css.js +1 -1
  146. package/menu/lib/menu-styles.css.js.map +1 -1
  147. package/menu/lib/menu.d.ts +1 -2
  148. package/menu/lib/menu.js +38 -63
  149. package/menu/lib/menu.js.map +1 -1
  150. package/menu/lib/menuitem/_menu-item.scss +13 -32
  151. package/menu/lib/menuitem/menu-item-styles.css.js +1 -1
  152. package/menu/lib/menuitem/menu-item-styles.css.js.map +1 -1
  153. package/menu/lib/menuitem/menu-item.d.ts +1 -1
  154. package/menu/lib/menuitem/menu-item.js +4 -6
  155. package/menu/lib/menuitem/menu-item.js.map +1 -1
  156. package/menu/lib/menuitemlink/menu-item-link.d.ts +0 -2
  157. package/menu/lib/menuitemlink/menu-item-link.js +3 -6
  158. package/menu/lib/menuitemlink/menu-item-link.js.map +1 -1
  159. package/menu/lib/shared.d.ts +6 -2
  160. package/menu/lib/shared.js.map +1 -1
  161. package/menu/lib/submenuitem/sub-menu-item.d.ts +0 -2
  162. package/menu/lib/submenuitem/sub-menu-item.js +7 -15
  163. package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
  164. package/navigationbar/lib/_navigation-bar.scss +7 -1
  165. package/navigationbar/lib/navigation-bar-styles.css.js +1 -1
  166. package/navigationbar/lib/navigation-bar-styles.css.js.map +1 -1
  167. package/navigationbar/lib/navigation-bar.d.ts +5 -5
  168. package/navigationbar/lib/navigation-bar.js +17 -18
  169. package/navigationbar/lib/navigation-bar.js.map +1 -1
  170. package/navigationbar/navigation-bar.d.ts +0 -1
  171. package/navigationbar/navigation-bar.js +0 -1
  172. package/navigationbar/navigation-bar.js.map +1 -1
  173. package/navigationdrawer/lib/navigation-drawer-modal.d.ts +5 -10
  174. package/navigationdrawer/lib/navigation-drawer-modal.js +19 -41
  175. package/navigationdrawer/lib/navigation-drawer-modal.js.map +1 -1
  176. package/navigationdrawer/lib/navigation-drawer.d.ts +5 -9
  177. package/navigationdrawer/lib/navigation-drawer.js +17 -38
  178. package/navigationdrawer/lib/navigation-drawer.js.map +1 -1
  179. package/navigationdrawer/navigation-drawer-modal.d.ts +0 -1
  180. package/navigationdrawer/navigation-drawer-modal.js +0 -1
  181. package/navigationdrawer/navigation-drawer-modal.js.map +1 -1
  182. package/navigationdrawer/navigation-drawer.d.ts +0 -1
  183. package/navigationdrawer/navigation-drawer.js +0 -1
  184. package/navigationdrawer/navigation-drawer.js.map +1 -1
  185. package/navigationtab/lib/navigation-tab.d.ts +19 -24
  186. package/navigationtab/lib/navigation-tab.js +48 -68
  187. package/navigationtab/lib/navigation-tab.js.map +1 -1
  188. package/navigationtab/navigation-tab.d.ts +0 -1
  189. package/navigationtab/navigation-tab.js +0 -1
  190. package/navigationtab/navigation-tab.js.map +1 -1
  191. package/package.json +1 -1
  192. package/radio/lib/radio.d.ts +0 -1
  193. package/radio/lib/radio.js +30 -37
  194. package/radio/lib/radio.js.map +1 -1
  195. package/ripple/lib/ripple.js +7 -13
  196. package/ripple/lib/ripple.js.map +1 -1
  197. package/segmentedbutton/lib/outlined-segmented-button.d.ts +16 -7
  198. package/segmentedbutton/lib/outlined-segmented-button.js +3 -3
  199. package/segmentedbutton/lib/outlined-segmented-button.js.map +1 -1
  200. package/segmentedbutton/lib/segmented-button.d.ts +27 -33
  201. package/segmentedbutton/lib/segmented-button.js +42 -75
  202. package/segmentedbutton/lib/segmented-button.js.map +1 -1
  203. package/segmentedbutton/outlined-segmented-button.d.ts +0 -1
  204. package/segmentedbutton/outlined-segmented-button.js +0 -1
  205. package/segmentedbutton/outlined-segmented-button.js.map +1 -1
  206. package/segmentedbuttonset/lib/outlined-segmented-button-set.d.ts +6 -4
  207. package/segmentedbuttonset/lib/outlined-segmented-button-set.js +3 -2
  208. package/segmentedbuttonset/lib/outlined-segmented-button-set.js.map +1 -1
  209. package/segmentedbuttonset/lib/segmented-button-set.d.ts +3 -9
  210. package/segmentedbuttonset/lib/segmented-button-set.js +14 -20
  211. package/segmentedbuttonset/lib/segmented-button-set.js.map +1 -1
  212. package/segmentedbuttonset/outlined-segmented-button-set.d.ts +0 -1
  213. package/segmentedbuttonset/outlined-segmented-button-set.js +0 -1
  214. package/segmentedbuttonset/outlined-segmented-button-set.js.map +1 -1
  215. package/select/_filled-select.scss +6 -0
  216. package/select/_outlined-select.scss +6 -0
  217. package/select/filled-select.d.ts +41 -0
  218. package/select/filled-select.js +46 -0
  219. package/select/filled-select.js.map +1 -0
  220. package/select/harness.d.ts +24 -0
  221. package/select/harness.js +53 -0
  222. package/select/harness.js.map +1 -0
  223. package/select/lib/_filled-select.scss +163 -0
  224. package/select/lib/_outlined-select.scss +146 -0
  225. package/select/lib/_shared.scss +48 -0
  226. package/select/lib/filled-forced-colors-styles.css.d.ts +1 -0
  227. package/select/lib/filled-forced-colors-styles.css.js +9 -0
  228. package/select/lib/filled-forced-colors-styles.css.js.map +1 -0
  229. package/select/lib/filled-forced-colors-styles.scss +29 -0
  230. package/select/lib/filled-select-styles.css.d.ts +1 -0
  231. package/select/lib/filled-select-styles.css.js +9 -0
  232. package/select/lib/filled-select-styles.css.js.map +1 -0
  233. package/select/lib/filled-select-styles.scss +10 -0
  234. package/select/lib/filled-select.d.ts +10 -0
  235. package/select/lib/filled-select.js +16 -0
  236. package/select/lib/filled-select.js.map +1 -0
  237. package/select/lib/outlined-forced-colors-styles.css.d.ts +1 -0
  238. package/select/lib/outlined-forced-colors-styles.css.js +9 -0
  239. package/select/lib/outlined-forced-colors-styles.css.js.map +1 -0
  240. package/select/lib/outlined-forced-colors-styles.scss +29 -0
  241. package/select/lib/outlined-select-styles.css.d.ts +1 -0
  242. package/select/lib/outlined-select-styles.css.js +9 -0
  243. package/select/lib/outlined-select-styles.css.js.map +1 -0
  244. package/select/lib/outlined-select-styles.scss +10 -0
  245. package/select/lib/outlined-select.d.ts +10 -0
  246. package/select/lib/outlined-select.js +16 -0
  247. package/select/lib/outlined-select.js.map +1 -0
  248. package/select/lib/select.d.ts +218 -0
  249. package/select/lib/select.js +587 -0
  250. package/select/lib/select.js.map +1 -0
  251. package/select/lib/selectoption/harness.d.ts +11 -0
  252. package/select/lib/selectoption/harness.js +12 -0
  253. package/select/lib/selectoption/harness.js.map +1 -0
  254. package/select/lib/selectoption/select-option.d.ts +30 -0
  255. package/select/lib/selectoption/select-option.js +71 -0
  256. package/select/lib/selectoption/select-option.js.map +1 -0
  257. package/select/lib/shared-styles.css.d.ts +1 -0
  258. package/select/lib/shared-styles.css.js +9 -0
  259. package/select/lib/shared-styles.css.js.map +1 -0
  260. package/select/lib/shared-styles.scss +10 -0
  261. package/select/lib/shared.d.ts +52 -0
  262. package/select/lib/shared.js +41 -0
  263. package/select/lib/shared.js.map +1 -0
  264. package/select/outlined-select.d.ts +41 -0
  265. package/select/outlined-select.js +46 -0
  266. package/select/outlined-select.js.map +1 -0
  267. package/select/select-option.d.ts +44 -0
  268. package/select/select-option.js +51 -0
  269. package/select/select-option.js.map +1 -0
  270. package/slider/harness.d.ts +1 -0
  271. package/slider/harness.js +5 -0
  272. package/slider/harness.js.map +1 -1
  273. package/slider/lib/_slider.scss +146 -164
  274. package/slider/lib/forced-colors-styles.css.js +1 -1
  275. package/slider/lib/forced-colors-styles.css.js.map +1 -1
  276. package/slider/lib/forced-colors-styles.scss +2 -2
  277. package/slider/lib/slider-styles.css.js +1 -1
  278. package/slider/lib/slider-styles.css.js.map +1 -1
  279. package/slider/lib/slider.d.ts +2 -7
  280. package/slider/lib/slider.js +64 -118
  281. package/slider/lib/slider.js.map +1 -1
  282. package/switch/lib/switch.d.ts +0 -2
  283. package/switch/lib/switch.js +32 -54
  284. package/switch/lib/switch.js.map +1 -1
  285. package/textfield/lib/text-field.d.ts +0 -10
  286. package/textfield/lib/text-field.js +45 -115
  287. package/textfield/lib/text-field.js.map +1 -1
  288. package/tokens/_index.scss +3 -0
  289. package/tokens/_md-comp-assist-chip.scss +25 -20
  290. package/tokens/_md-comp-elevation.scss +0 -4
  291. package/tokens/_md-comp-fab-branded.scss +109 -1
  292. package/tokens/_md-comp-fab.scss +290 -0
  293. package/tokens/_md-comp-filled-select.scss +150 -1
  294. package/tokens/_md-comp-filter-chip.scss +103 -93
  295. package/tokens/_md-comp-input-chip.scss +77 -85
  296. package/tokens/_md-comp-linear-progress-indicator.scss +14 -1
  297. package/tokens/_md-comp-list-item.scss +201 -0
  298. package/tokens/_md-comp-list.scss +107 -26
  299. package/tokens/_md-comp-menu-item.scss +76 -0
  300. package/tokens/_md-comp-menu.scss +52 -2
  301. package/tokens/_md-comp-outlined-select.scss +150 -1
  302. package/tokens/_md-comp-slider.scss +13 -1
  303. package/tokens/_md-comp-suggestion-chip.scss +29 -21
  304. package/tokens/_values.scss +5 -2
  305. package/types/aria.d.ts +61 -1
  306. package/actionelement/action-element.d.ts +0 -79
  307. package/actionelement/action-element.js +0 -97
  308. package/actionelement/action-element.js.map +0 -1
  309. package/button/lib/state.d.ts +0 -10
  310. package/button/lib/state.js +0 -7
  311. package/button/lib/state.js.map +0 -1
  312. package/controller/action-controller.d.ts +0 -147
  313. package/controller/action-controller.js +0 -286
  314. package/controller/action-controller.js.map +0 -1
  315. package/decorators/aria-property.d.ts +0 -32
  316. package/decorators/aria-property.js +0 -99
  317. package/decorators/aria-property.js.map +0 -1
  318. package/fab/_fab-extended.scss +0 -6
  319. package/fab/fab-extended.d.ts +0 -23
  320. package/fab/fab-extended.js +0 -29
  321. package/fab/fab-extended.js.map +0 -1
  322. package/fab/lib/_fab-extended.scss +0 -73
  323. package/fab/lib/fab-extended-styles.css.js +0 -9
  324. package/fab/lib/fab-extended-styles.css.js.map +0 -1
  325. package/fab/lib/fab-extended.d.ts +0 -19
  326. package/fab/lib/fab-extended.js +0 -28
  327. package/fab/lib/fab-extended.js.map +0 -1
  328. package/fab/lib/fab-shared-styles.css.js +0 -9
  329. package/fab/lib/fab-shared-styles.css.js.map +0 -1
  330. package/fab/lib/fab-shared.js +0 -121
  331. package/fab/lib/fab-shared.js.map +0 -1
  332. package/slider/lib/_tokens.scss +0 -65
  333. /package/{fab/lib/fab-extended-styles.css.d.ts → chips/lib/filter-styles.css.d.ts} +0 -0
  334. /package/fab/lib/{fab-shared-styles.css.d.ts → fab-branded-styles.css.d.ts} +0 -0
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `:host{--_container-color: var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-dialog-container-elevation, 3);--_container-shape: var(--md-dialog-container-shape, 28px);--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));--_headline-type: var(--md-dialog-headline-type, var(--md-sys-typescale-headline-small, 400 1.5rem / 2rem var(--md-ref-typeface-brand, 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 var(--md-ref-typeface-plain, 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{--md-elevation-level:var(--_container-elevation)}.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-container-high, #ece6f0));--_container-elevation: var(--md-dialog-container-elevation, 3);--_container-shape: var(--md-dialog-container-shape, 28px);--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));--_headline-type: var(--md-dialog-headline-type, var(--md-sys-typescale-headline-small, 400 1.5rem / 2rem var(--md-ref-typeface-brand, 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 var(--md-ref-typeface-plain, 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:100dvh;inline-size:100dvw;max-block-size:100dvh;max-inline-size:100dvw;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:100dvh;inline-size:100dvw;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{--md-elevation-level:var(--_container-elevation)}.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:100dvh;inline-size:100dvw;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-container-high, #ece6f0));--_container-elevation: var(--md-dialog-container-elevation, 3);--_container-shape: var(--md-dialog-container-shape, 28px);--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));--_headline-type: var(--md-dialog-headline-type, var(--md-sys-typescale-headline-small, 400 1.5rem / 2rem var(--md-ref-typeface-brand, 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 var(--md-ref-typeface-plain, 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{--md-elevation-level:var(--_container-elevation)}.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-container-high, #ece6f0));--_container-elevation: var(--md-dialog-container-elevation, 3);--_container-shape: var(--md-dialog-container-shape, 28px);--_headline-color: var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));--_headline-type: var(--md-dialog-headline-type, var(--md-sys-typescale-headline-small, 400 1.5rem / 2rem var(--md-ref-typeface-brand, 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 var(--md-ref-typeface-plain, 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:100dvh;inline-size:100dvw;max-block-size:100dvh;max-inline-size:100dvw;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:100dvh;inline-size:100dvw;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{--md-elevation-level:var(--_container-elevation)}.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:100dvh;inline-size:100dvw;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 "]}
@@ -3,7 +3,7 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { __decorate, __metadata } from "tslib";
6
+ import { __decorate } from "tslib";
7
7
  import '../../elevation/elevation.js';
8
8
  import { html, LitElement } from 'lit';
9
9
  import { property, query, state } from 'lit/decorators.js';
@@ -470,99 +470,75 @@ export class Dialog extends LitElement {
470
470
  }
471
471
  Dialog.preventedScrollingCount = 0;
472
472
  __decorate([
473
- property({ type: Boolean }),
474
- __metadata("design:type", Object)
473
+ property({ type: Boolean })
475
474
  ], Dialog.prototype, "open", void 0);
476
475
  __decorate([
477
- property({ type: Boolean }),
478
- __metadata("design:type", Object)
476
+ property({ type: Boolean })
479
477
  ], Dialog.prototype, "fullscreen", void 0);
480
478
  __decorate([
481
- property({ type: String }),
482
- __metadata("design:type", Object)
479
+ property()
483
480
  ], Dialog.prototype, "fullscreenBreakpoint", void 0);
484
481
  __decorate([
485
- property({ type: Boolean }),
486
- __metadata("design:type", Object)
482
+ property({ type: Boolean })
487
483
  ], Dialog.prototype, "footerHidden", void 0);
488
484
  __decorate([
489
- property({ type: Boolean }),
490
- __metadata("design:type", Object)
485
+ property({ type: Boolean })
491
486
  ], Dialog.prototype, "stacked", void 0);
492
487
  __decorate([
493
- property(),
494
- __metadata("design:type", Object)
488
+ property()
495
489
  ], Dialog.prototype, "defaultAction", void 0);
496
490
  __decorate([
497
- property(),
498
- __metadata("design:type", Object)
491
+ property()
499
492
  ], Dialog.prototype, "actionAttribute", void 0);
500
493
  __decorate([
501
- property(),
502
- __metadata("design:type", Object)
494
+ property()
503
495
  ], Dialog.prototype, "focusAttribute", void 0);
504
496
  __decorate([
505
- property({ type: String }),
506
- __metadata("design:type", Object)
497
+ property()
507
498
  ], Dialog.prototype, "scrimClickAction", void 0);
508
499
  __decorate([
509
- property({ type: String }),
510
- __metadata("design:type", Object)
500
+ property()
511
501
  ], Dialog.prototype, "escapeKeyAction", void 0);
512
502
  __decorate([
513
- property({ type: Boolean, reflect: true }),
514
- __metadata("design:type", Object)
503
+ property({ type: Boolean, reflect: true })
515
504
  ], Dialog.prototype, "modeless", void 0);
516
505
  __decorate([
517
- property({ type: Boolean }),
518
- __metadata("design:type", Object)
506
+ property({ type: Boolean })
519
507
  ], Dialog.prototype, "draggable", void 0);
520
508
  __decorate([
521
- query('.dialog', true),
522
- __metadata("design:type", HTMLDialogElement)
509
+ query('.dialog', true)
523
510
  ], Dialog.prototype, "dialogElement", void 0);
524
511
  __decorate([
525
- query('slot[name=footer]', true),
526
- __metadata("design:type", HTMLSlotElement)
512
+ query('slot[name=footer]', true)
527
513
  ], Dialog.prototype, "footerSlot", void 0);
528
514
  __decorate([
529
- query('slot:not([name])', true),
530
- __metadata("design:type", HTMLSlotElement)
515
+ query('slot:not([name])', true)
531
516
  ], Dialog.prototype, "contentSlot", void 0);
532
517
  __decorate([
533
- query(`.content`, true),
534
- __metadata("design:type", HTMLDivElement)
518
+ query(`.content`, true)
535
519
  ], Dialog.prototype, "contentElement", void 0);
536
520
  __decorate([
537
- query(`.container`, true),
538
- __metadata("design:type", HTMLDivElement)
521
+ query(`.container`, true)
539
522
  ], Dialog.prototype, "containerElement", void 0);
540
523
  __decorate([
541
- query(`.header`, true),
542
- __metadata("design:type", HTMLDivElement)
524
+ query(`.header`, true)
543
525
  ], Dialog.prototype, "headerElement", void 0);
544
526
  __decorate([
545
- state(),
546
- __metadata("design:type", Object)
527
+ state()
547
528
  ], Dialog.prototype, "showingFullscreen", void 0);
548
529
  __decorate([
549
- state(),
550
- __metadata("design:type", Object)
530
+ state()
551
531
  ], Dialog.prototype, "showingOpen", void 0);
552
532
  __decorate([
553
- state(),
554
- __metadata("design:type", Object)
533
+ state()
555
534
  ], Dialog.prototype, "opening", void 0);
556
535
  __decorate([
557
- state(),
558
- __metadata("design:type", Object)
536
+ state()
559
537
  ], Dialog.prototype, "closing", void 0);
560
538
  __decorate([
561
- property({ reflect: true }),
562
- __metadata("design:type", Object)
539
+ property({ reflect: true })
563
540
  ], Dialog.prototype, "transition", void 0);
564
541
  __decorate([
565
- state(),
566
- __metadata("design:type", Object)
542
+ state()
567
543
  ], Dialog.prototype, "dragging", void 0);
568
544
  //# sourceMappingURL=dialog.js.map
@@ -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;;;WAG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C,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></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"]}
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;QACS,yBAAoB,GAAG,yCAAyC,CAAC;QAE7E;;;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,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,EAAC,CAAC;uCAAiB;AAY/B;IAAX,QAAQ,EAAE;6CAA8B;AAgB7B;IAAX,QAAQ,EAAE;+CAAkC;AAejC;IAAX,QAAQ,EAAE;8CAAgC;AAO/B;IAAX,QAAQ,EAAE;gDAAiC;AAOhC;IAAX,QAAQ,EAAE;+CAAgC;AAOD;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;wCAAkB;AAKhC;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;yCAA4B;AAI9B;IAAvB,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC;6CAAoD;AAI3E;IADC,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC;0CACa;AAE9C;IADC,KAAK,CAAC,kBAAkB,EAAE,IAAI,CAAC;2CACe;AAEtB;IAAxB,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC;8CAAkD;AAE/C;IAA1B,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC;gDAAoD;AAEtD;IAAvB,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC;6CAAiD;AAK/D;IAAR,KAAK,EAAE;iDAAmC;AAClC;IAAR,KAAK,EAAE;2CAA6B;AAC5B;IAAR,KAAK,EAAE;uCAAyB;AACxB;IAAR,KAAK,EAAE;uCAAyB;AAQN;IAA1B,QAAQ,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;0CAA0B;AAI3C;IAAR,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() 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() 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() 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></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"]}
@@ -3,7 +3,7 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { __decorate, __metadata } from "tslib";
6
+ import { __decorate } from "tslib";
7
7
  import { LitElement } from 'lit';
8
8
  import { property } from 'lit/decorators.js';
9
9
  /**
@@ -27,15 +27,12 @@ export class Divider extends LitElement {
27
27
  }
28
28
  }
29
29
  __decorate([
30
- property({ type: Boolean, reflect: true }),
31
- __metadata("design:type", Object)
30
+ property({ type: Boolean, reflect: true })
32
31
  ], Divider.prototype, "inset", void 0);
33
32
  __decorate([
34
- property({ type: Boolean, reflect: true, attribute: 'inset-start' }),
35
- __metadata("design:type", Object)
33
+ property({ type: Boolean, reflect: true, attribute: 'inset-start' })
36
34
  ], Divider.prototype, "insetStart", void 0);
37
35
  __decorate([
38
- property({ type: Boolean, reflect: true, attribute: 'inset-end' }),
39
- __metadata("design:type", Object)
36
+ property({ type: Boolean, reflect: true, attribute: 'inset-end' })
40
37
  ], Divider.prototype, "insetEnd", void 0);
41
38
  //# sourceMappingURL=divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sourceRoot":"","sources":["divider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,UAAU;IAAvC;;QACE;;WAEG;QACuC,UAAK,GAAG,KAAK,CAAC;QAExD;;WAEG;QAEH,eAAU,GAAG,KAAK,CAAC;QAEnB;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;IACnB,CAAC;CAAA;AAbC;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;;sCAAe;AAKxD;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAC,CAAC;;2CAChD;AAKnB;IAAC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAC,CAAC;;yCAChD","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {LitElement} from 'lit';\nimport {property} from 'lit/decorators.js';\n\n/**\n * A divider component.\n */\nexport class Divider extends LitElement {\n /**\n * Indents the divider with equal padding on both sides.\n */\n @property({type: Boolean, reflect: true}) inset = false;\n\n /**\n * Indents the divider with padding on the leading side.\n */\n @property({type: Boolean, reflect: true, attribute: 'inset-start'})\n insetStart = false;\n\n /**\n * Indents the divider with padding on the trailing side.\n */\n @property({type: Boolean, reflect: true, attribute: 'inset-end'})\n insetEnd = false;\n}\n"]}
1
+ {"version":3,"file":"divider.js","sourceRoot":"","sources":["divider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,UAAU;IAAvC;;QACE;;WAEG;QACuC,UAAK,GAAG,KAAK,CAAC;QAExD;;WAEG;QAEH,eAAU,GAAG,KAAK,CAAC;QAEnB;;WAEG;QAEH,aAAQ,GAAG,KAAK,CAAC;IACnB,CAAC;CAAA;AAb2C;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;sCAAe;AAMxD;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAC,CAAC;2CAChD;AAMnB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAC,CAAC;yCAChD","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {LitElement} from 'lit';\nimport {property} from 'lit/decorators.js';\n\n/**\n * A divider component.\n */\nexport class Divider extends LitElement {\n /**\n * Indents the divider with equal padding on both sides.\n */\n @property({type: Boolean, reflect: true}) inset = false;\n\n /**\n * Indents the divider with padding on the leading side.\n */\n @property({type: Boolean, reflect: true, attribute: 'inset-start'})\n insetStart = false;\n\n /**\n * Indents the divider with padding on the trailing side.\n */\n @property({type: Boolean, reflect: true, attribute: 'inset-end'})\n insetEnd = false;\n}\n"]}
@@ -29,8 +29,6 @@
29
29
 
30
30
  display: flex;
31
31
  pointer-events: none;
32
- transition-duration: var(--_duration);
33
- transition-timing-function: var(--_easing);
34
32
  }
35
33
 
36
34
  :host,
@@ -40,17 +38,17 @@
40
38
  border-radius: inherit;
41
39
  inset: 0;
42
40
  position: absolute;
41
+ transition-duration: inherit;
42
+ transition-timing-function: inherit;
43
43
  }
44
44
 
45
45
  .shadow::before,
46
46
  .shadow::after {
47
47
  content: '';
48
- transition-duration: inherit;
49
48
  transition-property: box-shadow, opacity;
50
- transition-timing-function: inherit;
51
49
  }
52
50
 
53
- // Key box shadows
51
+ // Key box shadow
54
52
  .shadow::before {
55
53
  // level0: box-shadow: 0px 0px 0px 0px;
56
54
  // level1: box-shadow: 0px 1px 2px 0px;
@@ -96,7 +94,7 @@
96
94
  opacity: 0.3;
97
95
  }
98
96
 
99
- // Ambient box shadows
97
+ // Ambient box shadow
100
98
  .shadow::after {
101
99
  // level0: box-shadow: 0px 0px 0px 0px;
102
100
  // level1: box-shadow: 0px 1px 3px 1px;
@@ -161,7 +159,7 @@
161
159
  // Convert to px.
162
160
  $spread: calc(1px * ($level1to4-spread + $level5-spread));
163
161
 
164
- opacity: 0.15;
165
162
  box-shadow: 0px $y $blur $spread var(--_shadow-color);
163
+ opacity: 0.15;
166
164
  }
167
165
  }
@@ -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));display:flex;pointer-events:none;transition-duration:var(--_duration);transition-timing-function:var(--_easing)}:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute}.shadow::before,.shadow::after{content:"";transition-duration:inherit;transition-property:box-shadow,opacity;transition-timing-function:inherit}.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)}/*# sourceMappingURL=elevation-styles.css.map */
7
+ export const styles = css `:host{--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000));display:flex;pointer-events:none}:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-timing-function:inherit}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity}.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{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);opacity:.15}/*# 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));display:flex;pointer-events:none;transition-duration:var(--_duration);transition-timing-function:var(--_easing)}:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute}.shadow::before,.shadow::after{content:\"\";transition-duration:inherit;transition-property:box-shadow,opacity;transition-timing-function:inherit}.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)}/*# 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{--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000));display:flex;pointer-events:none}:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-timing-function:inherit}.shadow::before,.shadow::after{content:\"\";transition-property:box-shadow,opacity}.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{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);opacity:.15}/*# sourceMappingURL=elevation-styles.css.map */\n`;\n "]}
package/fab/_fab.scss CHANGED
@@ -3,4 +3,5 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  //
5
5
 
6
+ @forward './lib/fab-branded' as branded-* show branded-theme;
6
7
  @forward './lib/fab' show theme;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Fab, Variant } from './lib/fab.js';
7
+ export { FabSize } from './lib/shared.js';
8
+ declare global {
9
+ interface HTMLElementTagNameMap {
10
+ 'md-branded-fab': MdBrandedFab;
11
+ }
12
+ }
13
+ /**
14
+ * @summary Floating action buttons (FABs) help people take primary actions.
15
+ * They’re used to represent the most important action on a screen, such as
16
+ * Create or Reply.
17
+ *
18
+ * @description
19
+ * __Emphasis:__ High emphasis – For the primary, most important, or most common
20
+ * action on a screen
21
+ *
22
+ * __Rationale:__ The FAB remains the default component for a screen’s primary
23
+ * action. It comes in three sizes: small FAB, FAB, and large FAB. The extended
24
+ * FAB’s wider format and text label give it more visual prominence than a FAB.
25
+ * It’s often used on larger screens where a FAB would seem too small. Branded
26
+ * FABs are used to specifically call attention to branded logo icons.
27
+ *
28
+ * __Example usages:__
29
+ * - FAB
30
+ * - Create
31
+ * - Compose
32
+ * - Extended FAB
33
+ * - Create
34
+ * - Compose
35
+ * - New Thread
36
+ * - New File
37
+ *
38
+ * @final
39
+ * @suppress {visibility}
40
+ */
41
+ export declare class MdBrandedFab extends Fab {
42
+ /**
43
+ * Branded FABs have no variants
44
+ */
45
+ variant: Variant;
46
+ getRenderClasses(): {
47
+ primary: boolean;
48
+ secondary: boolean;
49
+ tertiary: boolean;
50
+ small: boolean;
51
+ };
52
+ static styles: import("lit").CSSResult[];
53
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { __decorate } from "tslib";
7
+ import { customElement } from 'lit/decorators.js';
8
+ import { Fab } from './lib/fab.js';
9
+ import { styles } from './lib/fab-branded-styles.css.js';
10
+ import { styles as forcedColors } from './lib/forced-colors-styles.css.js';
11
+ import { styles as sharedStyles } from './lib/shared-styles.css.js';
12
+ /**
13
+ * @summary Floating action buttons (FABs) help people take primary actions.
14
+ * They’re used to represent the most important action on a screen, such as
15
+ * Create or Reply.
16
+ *
17
+ * @description
18
+ * __Emphasis:__ High emphasis – For the primary, most important, or most common
19
+ * action on a screen
20
+ *
21
+ * __Rationale:__ The FAB remains the default component for a screen’s primary
22
+ * action. It comes in three sizes: small FAB, FAB, and large FAB. The extended
23
+ * FAB’s wider format and text label give it more visual prominence than a FAB.
24
+ * It’s often used on larger screens where a FAB would seem too small. Branded
25
+ * FABs are used to specifically call attention to branded logo icons.
26
+ *
27
+ * __Example usages:__
28
+ * - FAB
29
+ * - Create
30
+ * - Compose
31
+ * - Extended FAB
32
+ * - Create
33
+ * - Compose
34
+ * - New Thread
35
+ * - New File
36
+ *
37
+ * @final
38
+ * @suppress {visibility}
39
+ */
40
+ let MdBrandedFab = class MdBrandedFab extends Fab {
41
+ getRenderClasses() {
42
+ return {
43
+ ...super.getRenderClasses(),
44
+ 'primary': false,
45
+ 'secondary': false,
46
+ 'tertiary': false,
47
+ 'small': false,
48
+ };
49
+ }
50
+ };
51
+ MdBrandedFab.styles = [sharedStyles, styles, forcedColors];
52
+ MdBrandedFab = __decorate([
53
+ customElement('md-branded-fab')
54
+ ], MdBrandedFab);
55
+ export { MdBrandedFab };
56
+ //# sourceMappingURL=branded-fab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branded-fab.js","sourceRoot":"","sources":["branded-fab.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAC,GAAG,EAAU,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAC,MAAM,EAAC,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,MAAM,4BAA4B,CAAC;AAUlE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,GAAG;IAM1B,gBAAgB;QACvB,OAAO;YACL,GAAG,KAAK,CAAC,gBAAgB,EAAE;YAC3B,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;;AACe,mBAAM,GAClB,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;AAhB9B,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CAiBxB;SAjBY,YAAY","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {customElement} from 'lit/decorators.js';\n\nimport {Fab, Variant} from './lib/fab.js';\nimport {styles} from './lib/fab-branded-styles.css.js';\nimport {styles as forcedColors} from './lib/forced-colors-styles.css.js';\nimport {styles as sharedStyles} from './lib/shared-styles.css.js';\n\nexport {FabSize} from './lib/shared.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-branded-fab': MdBrandedFab;\n }\n}\n\n/**\n * @summary Floating action buttons (FABs) help people take primary actions.\n * They’re used to represent the most important action on a screen, such as\n * Create or Reply.\n *\n * @description\n * __Emphasis:__ High emphasis – For the primary, most important, or most common\n * action on a screen\n *\n * __Rationale:__ The FAB remains the default component for a screen’s primary\n * action. It comes in three sizes: small FAB, FAB, and large FAB. The extended\n * FAB’s wider format and text label give it more visual prominence than a FAB.\n * It’s often used on larger screens where a FAB would seem too small. Branded\n * FABs are used to specifically call attention to branded logo icons.\n *\n * __Example usages:__\n * - FAB\n * - Create\n * - Compose\n * - Extended FAB\n * - Create\n * - Compose\n * - New Thread\n * - New File\n *\n * @final\n * @suppress {visibility}\n */\n@customElement('md-branded-fab')\nexport class MdBrandedFab extends Fab {\n /**\n * Branded FABs have no variants\n */\n override variant!: Variant;\n\n override getRenderClasses() {\n return {\n ...super.getRenderClasses(),\n 'primary': false,\n 'secondary': false,\n 'tertiary': false,\n 'small': false,\n };\n }\n static override styles =\n [sharedStyles, styles, forcedColors];\n}\n"]}