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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (522) hide show
  1. package/README.md +5 -5
  2. package/badge/lib/_badge.scss +2 -10
  3. package/button/lib/_elevated-button.scss +5 -30
  4. package/button/lib/_elevation.scss +1 -16
  5. package/button/lib/_filled-button.scss +4 -31
  6. package/button/lib/_icon.scss +1 -0
  7. package/button/lib/_outlined-button.scss +6 -23
  8. package/button/lib/_shared.scss +20 -54
  9. package/button/lib/_text-button.scss +8 -34
  10. package/button/lib/_tonal-button.scss +5 -28
  11. package/button/lib/button.d.ts +2 -0
  12. package/button/lib/button.js +5 -1
  13. package/button/lib/button.js.map +1 -1
  14. package/button/lib/elevated-styles.css.js +1 -1
  15. package/button/lib/elevated-styles.css.js.map +1 -1
  16. package/button/lib/filled-styles.css.js +1 -1
  17. package/button/lib/filled-styles.css.js.map +1 -1
  18. package/button/lib/outlined-styles.css.js +1 -1
  19. package/button/lib/outlined-styles.css.js.map +1 -1
  20. package/button/lib/shared-styles.css.js +1 -1
  21. package/button/lib/shared-styles.css.js.map +1 -1
  22. package/button/lib/text-styles.css.js +1 -1
  23. package/button/lib/text-styles.css.js.map +1 -1
  24. package/button/lib/tonal-styles.css.js +1 -1
  25. package/button/lib/tonal-styles.css.js.map +1 -1
  26. package/checkbox/lib/_checkbox.scss +1 -2
  27. package/checkbox/lib/checkbox-styles.css.js +1 -1
  28. package/checkbox/lib/checkbox-styles.css.js.map +1 -1
  29. package/chips/_assist-chip.scss +6 -0
  30. package/chips/_suggestion-chip.scss +6 -0
  31. package/chips/assist-chip.d.ts +20 -0
  32. package/chips/assist-chip.js +24 -0
  33. package/chips/assist-chip.js.map +1 -0
  34. package/chips/lib/_assist-chip.scss +27 -0
  35. package/chips/lib/_shared.scss +183 -0
  36. package/chips/lib/_suggestion-chip.scss +30 -0
  37. package/chips/lib/assist-chip.d.ts +11 -0
  38. package/chips/lib/assist-chip.js +12 -0
  39. package/chips/lib/assist-chip.js.map +1 -0
  40. package/chips/lib/assist-styles.css.js +9 -0
  41. package/chips/lib/assist-styles.css.js.map +1 -0
  42. package/{menusurface/lib/menu-surface-styles.scss → chips/lib/assist-styles.scss} +3 -3
  43. package/chips/lib/chip.d.ts +29 -0
  44. package/chips/lib/chip.js +110 -0
  45. package/chips/lib/chip.js.map +1 -0
  46. package/chips/lib/shared-styles.css.js +9 -0
  47. package/chips/lib/shared-styles.css.js.map +1 -0
  48. package/{autocomplete → chips}/lib/shared-styles.scss +1 -1
  49. package/chips/lib/suggestion-chip.d.ts +11 -0
  50. package/chips/lib/suggestion-chip.js +12 -0
  51. package/chips/lib/suggestion-chip.js.map +1 -0
  52. package/chips/lib/suggestion-styles.css.js +9 -0
  53. package/chips/lib/suggestion-styles.css.js.map +1 -0
  54. package/{autocomplete/lib/autocompletelist/autocomplete-list-styles.scss → chips/lib/suggestion-styles.scss} +3 -3
  55. package/chips/suggestion-chip.d.ts +20 -0
  56. package/chips/suggestion-chip.js +24 -0
  57. package/chips/suggestion-chip.js.map +1 -0
  58. package/dialog/lib/_dialog.scss +7 -5
  59. package/dialog/lib/_tokens.scss +1 -2
  60. package/dialog/lib/dialog-styles.css.js +1 -1
  61. package/dialog/lib/dialog-styles.css.js.map +1 -1
  62. package/dialog/lib/dialog.js +1 -1
  63. package/dialog/lib/dialog.js.map +1 -1
  64. package/elevation/lib/_elevation.scss +1 -21
  65. package/elevation/lib/elevation-styles.css.js +1 -1
  66. package/elevation/lib/elevation-styles.css.js.map +1 -1
  67. package/fab/lib/_fab-extended.scss +3 -10
  68. package/fab/lib/_fab.scss +0 -3
  69. package/fab/lib/_shared.scss +3 -25
  70. package/fab/lib/fab-extended-styles.css.js +1 -1
  71. package/fab/lib/fab-extended-styles.css.js.map +1 -1
  72. package/fab/lib/fab-shared-styles.css.js +1 -1
  73. package/fab/lib/fab-shared-styles.css.js.map +1 -1
  74. package/fab/lib/fab-shared.d.ts +0 -1
  75. package/fab/lib/fab-shared.js +1 -7
  76. package/fab/lib/fab-shared.js.map +1 -1
  77. package/field/lib/field.d.ts +4 -1
  78. package/field/lib/field.js +7 -0
  79. package/field/lib/field.js.map +1 -1
  80. package/focus/lib/_focus-ring.scss +13 -7
  81. package/focus/lib/_md-comp-focus-ring.scss +1 -2
  82. package/focus/lib/focus-ring-styles.css.js +1 -1
  83. package/focus/lib/focus-ring-styles.css.js.map +1 -1
  84. package/iconbutton/lib/_filled-icon-button.scss +1 -12
  85. package/iconbutton/lib/_filled-tonal-icon-button.scss +1 -12
  86. package/iconbutton/lib/_outlined-icon-button.scss +1 -13
  87. package/iconbutton/lib/_shared.scss +10 -6
  88. package/iconbutton/lib/_standard-icon-button.scss +5 -12
  89. package/iconbutton/lib/filled-styles.css.js +1 -1
  90. package/iconbutton/lib/filled-styles.css.js.map +1 -1
  91. package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
  92. package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
  93. package/iconbutton/lib/icon-button.js +0 -2
  94. package/iconbutton/lib/icon-button.js.map +1 -1
  95. package/iconbutton/lib/outlined-styles.css.js +1 -1
  96. package/iconbutton/lib/outlined-styles.css.js.map +1 -1
  97. package/iconbutton/lib/shared-styles.css.js +1 -1
  98. package/iconbutton/lib/shared-styles.css.js.map +1 -1
  99. package/iconbutton/lib/standard-styles.css.js +1 -1
  100. package/iconbutton/lib/standard-styles.css.js.map +1 -1
  101. package/list/lib/_list.scss +15 -8
  102. package/list/lib/list-styles.css.js +1 -1
  103. package/list/lib/list-styles.css.js.map +1 -1
  104. package/list/lib/listitem/_list-item.scss +41 -44
  105. package/list/lib/listitem/list-item-styles.css.js +1 -1
  106. package/list/lib/listitem/list-item-styles.css.js.map +1 -1
  107. package/list/lib/listitem/list-item.d.ts +1 -0
  108. package/list/lib/listitem/list-item.js +4 -1
  109. package/list/lib/listitem/list-item.js.map +1 -1
  110. package/menu/lib/_menu.scss +6 -9
  111. package/menu/lib/menu-styles.css.js +1 -1
  112. package/menu/lib/menu-styles.css.js.map +1 -1
  113. package/menu/lib/menu.d.ts +22 -9
  114. package/menu/lib/menu.js +74 -26
  115. package/menu/lib/menu.js.map +1 -1
  116. package/menu/lib/menuitem/menu-item.js +1 -1
  117. package/menu/lib/menuitem/menu-item.js.map +1 -1
  118. package/menu/lib/menuitemlink/menu-item-link.js +2 -1
  119. package/menu/lib/menuitemlink/menu-item-link.js.map +1 -1
  120. package/menu/lib/shared.d.ts +16 -0
  121. package/menu/lib/shared.js +16 -0
  122. package/menu/lib/shared.js.map +1 -1
  123. package/menu/lib/submenuitem/sub-menu-item.d.ts +4 -0
  124. package/menu/lib/submenuitem/sub-menu-item.js +9 -2
  125. package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
  126. package/menu/lib/surfacePositionController.d.ts +10 -2
  127. package/menu/lib/surfacePositionController.js +6 -2
  128. package/menu/lib/surfacePositionController.js.map +1 -1
  129. package/menu/lib/typeaheadController.d.ts +5 -0
  130. package/menu/lib/typeaheadController.js +7 -3
  131. package/menu/lib/typeaheadController.js.map +1 -1
  132. package/navigationbar/lib/_navigation-bar.scss +1 -4
  133. package/navigationdrawer/lib/_navigation-drawer-modal.scss +0 -3
  134. package/navigationdrawer/lib/_navigation-drawer.scss +0 -3
  135. package/navigationdrawer/lib/_shared.scss +0 -9
  136. package/navigationtab/lib/_navigation-tab.scss +4 -10
  137. package/navigationtab/lib/navigation-tab-styles.css.js +1 -1
  138. package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -1
  139. package/package.json +1 -1
  140. package/radio/lib/_radio.scss +1 -2
  141. package/radio/lib/radio-styles.css.js +1 -1
  142. package/radio/lib/radio-styles.css.js.map +1 -1
  143. package/segmentedbutton/lib/_shared.scss +0 -2
  144. package/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
  145. package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
  146. package/slider/lib/_slider.scss +1 -4
  147. package/slider/lib/_tokens.scss +2 -8
  148. package/slider/lib/slider-styles.css.js +1 -1
  149. package/slider/lib/slider-styles.css.js.map +1 -1
  150. package/textfield/lib/_filled-text-field.scss +1 -7
  151. package/textfield/lib/_outlined-text-field.scss +1 -7
  152. package/tokens/_index.scss +101 -2
  153. package/tokens/_md-comp-assist-chip.scss +68 -0
  154. package/tokens/_md-comp-badge.scss +34 -0
  155. package/tokens/_md-comp-banner.scss +23 -0
  156. package/tokens/_md-comp-bottom-app-bar.scss +21 -0
  157. package/tokens/_md-comp-carousel-item.scss +23 -0
  158. package/tokens/_md-comp-checkbox.scss +21 -0
  159. package/tokens/_md-comp-circular-progress-indicator.scss +22 -0
  160. package/tokens/_md-comp-data-table.scss +23 -0
  161. package/tokens/_md-comp-date-input-modal.scss +23 -0
  162. package/tokens/_md-comp-date-picker-docked.scss +25 -0
  163. package/tokens/_md-comp-date-picker-modal.scss +25 -0
  164. package/tokens/_md-comp-dialog.scss +43 -0
  165. package/tokens/_md-comp-divider.scss +17 -0
  166. package/tokens/_md-comp-elevated-button.scss +58 -0
  167. package/tokens/_md-comp-elevated-card.scss +23 -0
  168. package/tokens/_md-comp-extended-fab-branded.scss +38 -0
  169. package/tokens/_md-comp-extended-fab-primary.scss +38 -0
  170. package/tokens/_md-comp-extended-fab-secondary.scss +41 -0
  171. package/tokens/_md-comp-extended-fab-surface.scss +38 -0
  172. package/tokens/_md-comp-extended-fab-tertiary.scss +41 -0
  173. package/tokens/_md-comp-fab-branded-large.scss +23 -0
  174. package/tokens/_md-comp-fab-branded.scss +23 -0
  175. package/tokens/_md-comp-fab-primary-large.scss +23 -0
  176. package/tokens/_md-comp-fab-primary-small.scss +23 -0
  177. package/tokens/_md-comp-fab-primary.scss +23 -0
  178. package/tokens/_md-comp-fab-secondary-large.scss +23 -0
  179. package/tokens/_md-comp-fab-secondary-small.scss +23 -0
  180. package/tokens/_md-comp-fab-secondary.scss +23 -0
  181. package/tokens/_md-comp-fab-surface-large.scss +23 -0
  182. package/tokens/_md-comp-fab-surface-small.scss +23 -0
  183. package/tokens/_md-comp-fab-surface.scss +23 -0
  184. package/tokens/_md-comp-fab-tertiary-large.scss +23 -0
  185. package/tokens/_md-comp-fab-tertiary-small.scss +23 -0
  186. package/tokens/_md-comp-fab-tertiary.scss +23 -0
  187. package/tokens/_md-comp-filled-autocomplete.scss +25 -0
  188. package/tokens/_md-comp-filled-button.scss +58 -0
  189. package/tokens/_md-comp-filled-card.scss +23 -0
  190. package/tokens/_md-comp-filled-icon-button.scss +21 -0
  191. package/tokens/_md-comp-filled-menu-button.scss +25 -0
  192. package/tokens/_md-comp-filled-select.scss +25 -0
  193. package/tokens/_md-comp-filled-text-field.scss +46 -0
  194. package/tokens/_md-comp-filled-tonal-button.scss +59 -0
  195. package/tokens/_md-comp-filled-tonal-icon-button.scss +24 -0
  196. package/tokens/_md-comp-filter-chip.scss +38 -0
  197. package/tokens/_md-comp-full-screen-dialog.scss +25 -0
  198. package/tokens/_md-comp-icon-button.scss +21 -0
  199. package/tokens/_md-comp-input-chip.scss +38 -0
  200. package/tokens/_md-comp-linear-progress-indicator.scss +22 -0
  201. package/tokens/_md-comp-list.scss +58 -0
  202. package/tokens/_md-comp-menu.scss +21 -0
  203. package/tokens/_md-comp-navigation-bar.scss +25 -0
  204. package/tokens/_md-comp-navigation-drawer.scss +25 -0
  205. package/tokens/_md-comp-navigation-rail.scss +25 -0
  206. package/tokens/_md-comp-outlined-autocomplete.scss +28 -0
  207. package/tokens/_md-comp-outlined-button.scss +56 -0
  208. package/tokens/_md-comp-outlined-card.scss +23 -0
  209. package/tokens/_md-comp-outlined-icon-button.scss +21 -0
  210. package/tokens/_md-comp-outlined-menu-button.scss +23 -0
  211. package/tokens/_md-comp-outlined-segmented-button.scss +38 -0
  212. package/tokens/_md-comp-outlined-select.scss +25 -0
  213. package/tokens/_md-comp-outlined-text-field.scss +44 -0
  214. package/tokens/_md-comp-plain-tooltip.scss +21 -0
  215. package/tokens/_md-comp-primary-navigation-tab.scss +41 -0
  216. package/tokens/_md-comp-radio-button.scss +19 -0
  217. package/tokens/_md-comp-rich-tooltip.scss +25 -0
  218. package/tokens/_md-comp-scrim.scss +17 -0
  219. package/tokens/_md-comp-search-bar.scss +25 -0
  220. package/tokens/_md-comp-search-view.scss +23 -0
  221. package/tokens/_md-comp-secondary-navigation-tab.scss +41 -0
  222. package/tokens/_md-comp-sheet-bottom.scss +21 -0
  223. package/tokens/_md-comp-sheet-floating.scss +21 -0
  224. package/tokens/_md-comp-sheet-side.scss +25 -0
  225. package/tokens/_md-comp-slider.scss +38 -0
  226. package/tokens/_md-comp-snackbar.scss +25 -0
  227. package/tokens/_md-comp-standard-menu-button.scss +23 -0
  228. package/tokens/_md-comp-suggestion-chip.scss +72 -0
  229. package/tokens/_md-comp-switch.scss +21 -0
  230. package/tokens/_md-comp-text-button.scss +56 -0
  231. package/tokens/_md-comp-time-input.scss +25 -0
  232. package/tokens/_md-comp-time-picker.scss +25 -0
  233. package/tokens/_md-comp-top-app-bar-large.scss +23 -0
  234. package/tokens/_md-comp-top-app-bar-medium.scss +23 -0
  235. package/tokens/_md-comp-top-app-bar-small-centered.scss +26 -0
  236. package/tokens/_md-comp-top-app-bar-small.scss +23 -0
  237. package/tokens/_md-ref-palette.scss +12 -0
  238. package/tokens/_md-ref-typeface.scss +12 -0
  239. package/tokens/_md-sys-color.scss +25 -0
  240. package/tokens/_md-sys-elevation.scss +30 -0
  241. package/tokens/_md-sys-motion.scss +12 -0
  242. package/tokens/_md-sys-shape.scss +12 -0
  243. package/tokens/_md-sys-state.scss +12 -0
  244. package/tokens/_md-sys-typescale.scss +17 -0
  245. package/autocomplete/_filled-autocomplete.scss +0 -6
  246. package/autocomplete/_outlined-autocomplete.scss +0 -6
  247. package/autocomplete/autocomplete-item.d.ts +0 -19
  248. package/autocomplete/autocomplete-item.js +0 -22
  249. package/autocomplete/autocomplete-item.js.map +0 -1
  250. package/autocomplete/autocomplete-list.d.ts +0 -19
  251. package/autocomplete/autocomplete-list.js +0 -23
  252. package/autocomplete/autocomplete-list.js.map +0 -1
  253. package/autocomplete/autocomplete-surface.d.ts +0 -19
  254. package/autocomplete/autocomplete-surface.js +0 -23
  255. package/autocomplete/autocomplete-surface.js.map +0 -1
  256. package/autocomplete/filled-autocomplete.d.ts +0 -28
  257. package/autocomplete/filled-autocomplete.js +0 -46
  258. package/autocomplete/filled-autocomplete.js.map +0 -1
  259. package/autocomplete/lib/_filled-autocomplete.scss +0 -189
  260. package/autocomplete/lib/_outlined-autocomplete.scss +0 -178
  261. package/autocomplete/lib/_shared.scss +0 -25
  262. package/autocomplete/lib/autocomplete.d.ts +0 -54
  263. package/autocomplete/lib/autocomplete.js +0 -265
  264. package/autocomplete/lib/autocomplete.js.map +0 -1
  265. package/autocomplete/lib/autocompleteitem/autocomplete-item.d.ts +0 -11
  266. package/autocomplete/lib/autocompleteitem/autocomplete-item.js +0 -14
  267. package/autocomplete/lib/autocompleteitem/autocomplete-item.js.map +0 -1
  268. package/autocomplete/lib/autocompleteitem/harness.d.ts +0 -11
  269. package/autocomplete/lib/autocompleteitem/harness.js +0 -12
  270. package/autocomplete/lib/autocompleteitem/harness.js.map +0 -1
  271. package/autocomplete/lib/autocompletelist/_autocomplete-list.scss +0 -13
  272. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js +0 -9
  273. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js.map +0 -1
  274. package/autocomplete/lib/autocompletelist/autocomplete-list.d.ts +0 -14
  275. package/autocomplete/lib/autocompletelist/autocomplete-list.js +0 -21
  276. package/autocomplete/lib/autocompletelist/autocomplete-list.js.map +0 -1
  277. package/autocomplete/lib/autocompletelist/harness.d.ts +0 -11
  278. package/autocomplete/lib/autocompletelist/harness.js +0 -12
  279. package/autocomplete/lib/autocompletelist/harness.js.map +0 -1
  280. package/autocomplete/lib/autocompletesurface/_autocomplete-surface.scss +0 -13
  281. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js +0 -9
  282. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js.map +0 -1
  283. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.scss +0 -10
  284. package/autocomplete/lib/autocompletesurface/autocomplete-surface.d.ts +0 -13
  285. package/autocomplete/lib/autocompletesurface/autocomplete-surface.js +0 -21
  286. package/autocomplete/lib/autocompletesurface/autocomplete-surface.js.map +0 -1
  287. package/autocomplete/lib/filled-styles.css.d.ts +0 -1
  288. package/autocomplete/lib/filled-styles.css.js +0 -9
  289. package/autocomplete/lib/filled-styles.css.js.map +0 -1
  290. package/autocomplete/lib/filled-styles.scss +0 -10
  291. package/autocomplete/lib/outlined-styles.css.d.ts +0 -1
  292. package/autocomplete/lib/outlined-styles.css.js +0 -9
  293. package/autocomplete/lib/outlined-styles.css.js.map +0 -1
  294. package/autocomplete/lib/outlined-styles.scss +0 -10
  295. package/autocomplete/lib/shared-styles.css.js +0 -9
  296. package/autocomplete/lib/shared-styles.css.js.map +0 -1
  297. package/autocomplete/outlined-autocomplete.d.ts +0 -28
  298. package/autocomplete/outlined-autocomplete.js +0 -46
  299. package/autocomplete/outlined-autocomplete.js.map +0 -1
  300. package/chips/action/delete-action.d.ts +0 -18
  301. package/chips/action/delete-action.js +0 -20
  302. package/chips/action/delete-action.js.map +0 -1
  303. package/chips/action/lib/action.d.ts +0 -47
  304. package/chips/action/lib/action.js +0 -162
  305. package/chips/action/lib/action.js.map +0 -1
  306. package/chips/action/lib/constants.d.ts +0 -62
  307. package/chips/action/lib/constants.js +0 -69
  308. package/chips/action/lib/constants.js.map +0 -1
  309. package/chips/action/lib/delete-action.d.ts +0 -20
  310. package/chips/action/lib/delete-action.js +0 -65
  311. package/chips/action/lib/delete-action.js.map +0 -1
  312. package/chips/action/lib/events.d.ts +0 -14
  313. package/chips/action/lib/events.js +0 -16
  314. package/chips/action/lib/events.js.map +0 -1
  315. package/chips/action/lib/link-action.d.ts +0 -19
  316. package/chips/action/lib/link-action.js +0 -55
  317. package/chips/action/lib/link-action.js.map +0 -1
  318. package/chips/action/lib/presentational-action.d.ts +0 -15
  319. package/chips/action/lib/presentational-action.js +0 -30
  320. package/chips/action/lib/presentational-action.js.map +0 -1
  321. package/chips/action/lib/primary-action.d.ts +0 -28
  322. package/chips/action/lib/primary-action.js +0 -88
  323. package/chips/action/lib/primary-action.js.map +0 -1
  324. package/chips/action/lib/selectable-action.d.ts +0 -17
  325. package/chips/action/lib/selectable-action.js +0 -67
  326. package/chips/action/lib/selectable-action.js.map +0 -1
  327. package/chips/action/lib/types.d.ts +0 -23
  328. package/chips/action/lib/types.js +0 -7
  329. package/chips/action/lib/types.js.map +0 -1
  330. package/chips/action/link-action.d.ts +0 -18
  331. package/chips/action/link-action.js +0 -20
  332. package/chips/action/link-action.js.map +0 -1
  333. package/chips/action/presentational-action.d.ts +0 -18
  334. package/chips/action/presentational-action.js +0 -20
  335. package/chips/action/presentational-action.js.map +0 -1
  336. package/chips/action/primary-action.d.ts +0 -18
  337. package/chips/action/primary-action.js +0 -20
  338. package/chips/action/primary-action.js.map +0 -1
  339. package/chips/action/selectable-action.d.ts +0 -18
  340. package/chips/action/selectable-action.js +0 -20
  341. package/chips/action/selectable-action.js.map +0 -1
  342. package/chips/chip/lib/_assist-chip-theme.scss +0 -99
  343. package/chips/chip/lib/_chip-theme.scss +0 -1285
  344. package/chips/chip/lib/_chip.scss +0 -444
  345. package/chips/chip/lib/_filter-chip-theme.scss +0 -130
  346. package/chips/chip/lib/_input-chip-theme.scss +0 -91
  347. package/chips/chip/lib/_suggestion-chip-theme.scss +0 -92
  348. package/chips/chip/lib/action-chip.d.ts +0 -18
  349. package/chips/chip/lib/action-chip.js +0 -39
  350. package/chips/chip/lib/action-chip.js.map +0 -1
  351. package/chips/chip/lib/adapter.d.ts +0 -50
  352. package/chips/chip/lib/adapter.js +0 -7
  353. package/chips/chip/lib/adapter.js.map +0 -1
  354. package/chips/chip/lib/animationframe.d.ts +0 -31
  355. package/chips/chip/lib/animationframe.js +0 -66
  356. package/chips/chip/lib/animationframe.js.map +0 -1
  357. package/chips/chip/lib/chip.d.ts +0 -43
  358. package/chips/chip/lib/chip.js +0 -134
  359. package/chips/chip/lib/chip.js.map +0 -1
  360. package/chips/chip/lib/constants.d.ts +0 -43
  361. package/chips/chip/lib/constants.js +0 -48
  362. package/chips/chip/lib/constants.js.map +0 -1
  363. package/chips/chip/lib/foundation.d.ts +0 -41
  364. package/chips/chip/lib/foundation.js +0 -255
  365. package/chips/chip/lib/foundation.js.map +0 -1
  366. package/chips/chip/lib/link-chip.d.ts +0 -21
  367. package/chips/chip/lib/link-chip.js +0 -53
  368. package/chips/chip/lib/link-chip.js.map +0 -1
  369. package/chips/chip/lib/presentational-chip.d.ts +0 -18
  370. package/chips/chip/lib/presentational-chip.js +0 -39
  371. package/chips/chip/lib/presentational-chip.js.map +0 -1
  372. package/chips/chip/lib/selectable-chip.d.ts +0 -22
  373. package/chips/chip/lib/selectable-chip.js +0 -57
  374. package/chips/chip/lib/selectable-chip.js.map +0 -1
  375. package/chips/chip/lib/types.d.ts +0 -42
  376. package/chips/chip/lib/types.js +0 -7
  377. package/chips/chip/lib/types.js.map +0 -1
  378. package/chips/chipset/lib/_chip-set-theme.scss +0 -50
  379. package/chips/chipset/lib/_chip-set.scss +0 -48
  380. package/chips/chipset/lib/adapter.d.ts +0 -45
  381. package/chips/chipset/lib/adapter.js +0 -7
  382. package/chips/chipset/lib/adapter.js.map +0 -1
  383. package/chips/chipset/lib/constants.d.ts +0 -26
  384. package/chips/chipset/lib/constants.js +0 -30
  385. package/chips/chipset/lib/constants.js.map +0 -1
  386. package/chips/chipset/lib/foundation.d.ts +0 -68
  387. package/chips/chipset/lib/foundation.js +0 -314
  388. package/chips/chipset/lib/foundation.js.map +0 -1
  389. package/chips/chipset/lib/types.d.ts +0 -41
  390. package/chips/chipset/lib/types.js +0 -7
  391. package/chips/chipset/lib/types.js.map +0 -1
  392. package/menusurface/_menu-surface.scss +0 -6
  393. package/menusurface/lib/_md-comp-menu-surface.scss +0 -31
  394. package/menusurface/lib/_menu-surface.scss +0 -122
  395. package/menusurface/lib/adapter.d.ts +0 -46
  396. package/menusurface/lib/adapter.js +0 -7
  397. package/menusurface/lib/adapter.js.map +0 -1
  398. package/menusurface/lib/constants.d.ts +0 -71
  399. package/menusurface/lib/constants.js +0 -83
  400. package/menusurface/lib/constants.js.map +0 -1
  401. package/menusurface/lib/foundation.d.ts +0 -176
  402. package/menusurface/lib/foundation.js +0 -544
  403. package/menusurface/lib/foundation.js.map +0 -1
  404. package/menusurface/lib/menu-surface-styles.css.d.ts +0 -1
  405. package/menusurface/lib/menu-surface-styles.css.js +0 -9
  406. package/menusurface/lib/menu-surface-styles.css.js.map +0 -1
  407. package/menusurface/lib/menu-surface.d.ts +0 -62
  408. package/menusurface/lib/menu-surface.js +0 -347
  409. package/menusurface/lib/menu-surface.js.map +0 -1
  410. package/menusurface/lib/types.d.ts +0 -19
  411. package/menusurface/lib/types.js +0 -7
  412. package/menusurface/lib/types.js.map +0 -1
  413. package/menusurface/menu-surface.d.ts +0 -14
  414. package/menusurface/menu-surface.js +0 -17
  415. package/menusurface/menu-surface.js.map +0 -1
  416. package/sass/_elevation.scss +0 -159
  417. package/sass/_resolvers.scss +0 -16
  418. package/sass/_typography.scss +0 -39
  419. package/tokens/v0_160/_index.scss +0 -107
  420. package/tokens/v0_160/_md-comp-assist-chip.scss +0 -109
  421. package/tokens/v0_160/_md-comp-badge.scss +0 -58
  422. package/tokens/v0_160/_md-comp-banner.scss +0 -75
  423. package/tokens/v0_160/_md-comp-bottom-app-bar.scss +0 -35
  424. package/tokens/v0_160/_md-comp-carousel-item.scss +0 -65
  425. package/tokens/v0_160/_md-comp-checkbox.scss +0 -126
  426. package/tokens/v0_160/_md-comp-circular-progress-indicator.scss +0 -39
  427. package/tokens/v0_160/_md-comp-data-table.scss +0 -96
  428. package/tokens/v0_160/_md-comp-date-input-modal.scss +0 -89
  429. package/tokens/v0_160/_md-comp-date-picker-docked.scss +0 -246
  430. package/tokens/v0_160/_md-comp-date-picker-modal.scss +0 -305
  431. package/tokens/v0_160/_md-comp-dialog.scss +0 -123
  432. package/tokens/v0_160/_md-comp-divider.scss +0 -25
  433. package/tokens/v0_160/_md-comp-elevated-button.scss +0 -91
  434. package/tokens/v0_160/_md-comp-elevated-card.scss +0 -59
  435. package/tokens/v0_160/_md-comp-extended-fab-branded.scss +0 -86
  436. package/tokens/v0_160/_md-comp-extended-fab-primary.scss +0 -94
  437. package/tokens/v0_160/_md-comp-extended-fab-secondary.scss +0 -95
  438. package/tokens/v0_160/_md-comp-extended-fab-surface.scss +0 -90
  439. package/tokens/v0_160/_md-comp-extended-fab-tertiary.scss +0 -95
  440. package/tokens/v0_160/_md-comp-fab-branded-large.scss +0 -60
  441. package/tokens/v0_160/_md-comp-fab-branded.scss +0 -60
  442. package/tokens/v0_160/_md-comp-fab-primary-large.scss +0 -65
  443. package/tokens/v0_160/_md-comp-fab-primary-small.scss +0 -65
  444. package/tokens/v0_160/_md-comp-fab-primary.scss +0 -65
  445. package/tokens/v0_160/_md-comp-fab-secondary-large.scss +0 -66
  446. package/tokens/v0_160/_md-comp-fab-secondary-small.scss +0 -66
  447. package/tokens/v0_160/_md-comp-fab-secondary.scss +0 -66
  448. package/tokens/v0_160/_md-comp-fab-surface-large.scss +0 -64
  449. package/tokens/v0_160/_md-comp-fab-surface-small.scss +0 -64
  450. package/tokens/v0_160/_md-comp-fab-surface.scss +0 -64
  451. package/tokens/v0_160/_md-comp-fab-tertiary-large.scss +0 -66
  452. package/tokens/v0_160/_md-comp-fab-tertiary-small.scss +0 -66
  453. package/tokens/v0_160/_md-comp-fab-tertiary.scss +0 -66
  454. package/tokens/v0_160/_md-comp-filled-autocomplete.scss +0 -267
  455. package/tokens/v0_160/_md-comp-filled-button.scss +0 -89
  456. package/tokens/v0_160/_md-comp-filled-card.scss +0 -58
  457. package/tokens/v0_160/_md-comp-filled-icon-button.scss +0 -79
  458. package/tokens/v0_160/_md-comp-filled-menu-button.scss +0 -98
  459. package/tokens/v0_160/_md-comp-filled-select.scss +0 -272
  460. package/tokens/v0_160/_md-comp-filled-text-field.scss +0 -189
  461. package/tokens/v0_160/_md-comp-filled-tonal-button.scss +0 -99
  462. package/tokens/v0_160/_md-comp-filled-tonal-icon-button.scss +0 -86
  463. package/tokens/v0_160/_md-comp-filter-chip.scss +0 -209
  464. package/tokens/v0_160/_md-comp-full-screen-dialog.scss +0 -111
  465. package/tokens/v0_160/_md-comp-icon-button.scss +0 -70
  466. package/tokens/v0_160/_md-comp-input-chip.scss +0 -184
  467. package/tokens/v0_160/_md-comp-linear-progress-indicator.scss +0 -41
  468. package/tokens/v0_160/_md-comp-list.scss +0 -248
  469. package/tokens/v0_160/_md-comp-menu.scss +0 -121
  470. package/tokens/v0_160/_md-comp-navigation-bar.scss +0 -114
  471. package/tokens/v0_160/_md-comp-navigation-drawer.scss +0 -162
  472. package/tokens/v0_160/_md-comp-navigation-rail.scss +0 -131
  473. package/tokens/v0_160/_md-comp-outlined-autocomplete.scss +0 -257
  474. package/tokens/v0_160/_md-comp-outlined-button.scss +0 -84
  475. package/tokens/v0_160/_md-comp-outlined-card.scss +0 -65
  476. package/tokens/v0_160/_md-comp-outlined-icon-button.scss +0 -79
  477. package/tokens/v0_160/_md-comp-outlined-menu-button.scss +0 -94
  478. package/tokens/v0_160/_md-comp-outlined-segmented-button.scss +0 -112
  479. package/tokens/v0_160/_md-comp-outlined-select.scss +0 -262
  480. package/tokens/v0_160/_md-comp-outlined-text-field.scss +0 -171
  481. package/tokens/v0_160/_md-comp-plain-tooltip.scss +0 -55
  482. package/tokens/v0_160/_md-comp-primary-navigation-tab.scss +0 -121
  483. package/tokens/v0_160/_md-comp-radio-button.scss +0 -68
  484. package/tokens/v0_160/_md-comp-rich-tooltip.scss +0 -121
  485. package/tokens/v0_160/_md-comp-scrim.scss +0 -25
  486. package/tokens/v0_160/_md-comp-search-bar.scss +0 -99
  487. package/tokens/v0_160/_md-comp-search-view.scss +0 -93
  488. package/tokens/v0_160/_md-comp-secondary-navigation-tab.scss +0 -84
  489. package/tokens/v0_160/_md-comp-sheet-bottom.scss +0 -45
  490. package/tokens/v0_160/_md-comp-sheet-floating.scss +0 -34
  491. package/tokens/v0_160/_md-comp-sheet-side.scss +0 -91
  492. package/tokens/v0_160/_md-comp-slider.scss +0 -114
  493. package/tokens/v0_160/_md-comp-snackbar.scss +0 -127
  494. package/tokens/v0_160/_md-comp-standard-menu-button.scss +0 -98
  495. package/tokens/v0_160/_md-comp-suggestion-chip.scss +0 -125
  496. package/tokens/v0_160/_md-comp-switch.scss +0 -136
  497. package/tokens/v0_160/_md-comp-text-button.scss +0 -77
  498. package/tokens/v0_160/_md-comp-time-input.scss +0 -218
  499. package/tokens/v0_160/_md-comp-time-picker.scss +0 -264
  500. package/tokens/v0_160/_md-comp-top-app-bar-large.scss +0 -63
  501. package/tokens/v0_160/_md-comp-top-app-bar-medium.scss +0 -63
  502. package/tokens/v0_160/_md-comp-top-app-bar-small-centered.scss +0 -66
  503. package/tokens/v0_160/_md-comp-top-app-bar-small.scss +0 -64
  504. package/tokens/v0_160/_md-ref-palette.scss +0 -107
  505. package/tokens/v0_160/_md-ref-typeface.scss +0 -21
  506. package/tokens/v0_160/_md-sys-color.scss +0 -904
  507. package/tokens/v0_160/_md-sys-elevation.scss +0 -21
  508. package/tokens/v0_160/_md-sys-motion.scss +0 -53
  509. package/tokens/v0_160/_md-sys-shape.scss +0 -30
  510. package/tokens/v0_160/_md-sys-state.scss +0 -19
  511. package/tokens/v0_160/_md-sys-typescale.scss +0 -284
  512. package/tokens/v0_160/index.test.css.d.ts +0 -1
  513. package/tokens/v0_160/index.test.css.js +0 -9
  514. package/tokens/v0_160/index.test.css.js.map +0 -1
  515. package/tokens/v0_160/index.test.scss +0 -584
  516. package/tokens/v0_160/lib.test.css.d.ts +0 -1
  517. package/tokens/v0_160/lib.test.css.js +0 -9
  518. package/tokens/v0_160/lib.test.css.js.map +0 -1
  519. package/tokens/v0_160/lib.test.scss +0 -663
  520. /package/{autocomplete/lib/autocompletelist/autocomplete-list-styles.css.d.ts → chips/lib/assist-styles.css.d.ts} +0 -0
  521. /package/{autocomplete → chips}/lib/shared-styles.css.d.ts +0 -0
  522. /package/{autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.d.ts → chips/lib/suggestion-styles.css.d.ts} +0 -0
@@ -1,6 +0,0 @@
1
- //
2
- // Copyright 2022 Google LLC
3
- // SPDX-License-Identifier: Apache-2.0
4
- //
5
-
6
- @forward './lib/menu-surface' show theme;
@@ -1,31 +0,0 @@
1
- //
2
- // Copyright 2022 Google LLC
3
- // SPDX-License-Identifier: Apache-2.0
4
- //
5
-
6
- // go/keep-sorted start
7
- @use 'sass:map';
8
- // go/keep-sorted end
9
- // go/keep-sorted start
10
- @use '../../elevation/lib/elevation';
11
- @use '../../tokens/v0_160' as tokens; // TODO(b/270568087): update to latest
12
- // go/keep-sorted end
13
-
14
- $_default-deps: (
15
- md-sys-color: tokens.md-sys-color-values-light(),
16
- md-sys-elevation: tokens.md-sys-elevation-values(),
17
- md-sys-shape: tokens.md-sys-shape-values(),
18
- );
19
-
20
- @function values($deps: $_default-deps, $exclude-hardcoded-values: false) {
21
- // Use menu tokens for default menu surface values.
22
- $menu-values: tokens.md-comp-menu-values($deps, $exclude-hardcoded-values);
23
-
24
- @return (
25
- container-elevation: map.get($menu-values, container-elevation),
26
- container-shadow-color: map.get($menu-values, container-shadow-color),
27
- container-shape: map.get($menu-values, container-shape),
28
- container-surface-tint-layer-color:
29
- map.get($menu-values, container-surface-tint-layer-color)
30
- );
31
- }
@@ -1,122 +0,0 @@
1
- //
2
- // Copyright 2022 Google LLC
3
- // SPDX-License-Identifier: Apache-2.0
4
- //
5
-
6
- // stylelint-disable selector-class-pattern --
7
- // Selector '.md3-*' should only be used in this project.
8
-
9
- // go/keep-sorted start
10
- @use 'sass:map';
11
- // go/keep-sorted end
12
- // go/keep-sorted start
13
- @use '../../elevation/lib/elevation';
14
- @use '../../sass/theme';
15
- @use './md-comp-menu-surface';
16
- // go/keep-sorted end
17
-
18
- $_custom-property-prefix: 'menu-surface';
19
- $_fade-in-duration: 0.03s;
20
- $_fade-out-duration: 0.075s;
21
- $_scale-duration: 0.12s;
22
- $_min-distance-from-edge: 32px;
23
- $_max-width: calc(100vw - #{$_min-distance-from-edge});
24
- $_max-height: calc(100vh - #{$_min-distance-from-edge});
25
- $_z-index: 8; // One above md3-dialog
26
- $_deceleration-curve-timing-function: cubic-bezier(0, 0, 0.2, 1) !default;
27
-
28
- @mixin theme($tokens) {
29
- $tokens: theme.validate-theme(md-comp-menu-surface.values(), $tokens);
30
- $tokens: elevation.resolve-tokens($tokens, 'container-elevation');
31
- $tokens: theme.create-theme-vars($tokens, $_custom-property-prefix);
32
-
33
- @include theme.emit-theme-vars($tokens);
34
- }
35
-
36
- @mixin styles() {
37
- $tokens: md-comp-menu-surface.values();
38
- $tokens: elevation.resolve-tokens($tokens, 'container-elevation');
39
- $tokens: theme.create-theme-vars($tokens, $_custom-property-prefix);
40
-
41
- :host {
42
- @each $token, $value in $tokens {
43
- --_#{$token}: #{$value};
44
- }
45
- }
46
-
47
- .md3-menu-surface {
48
- border-radius: var(--_container-shape);
49
- box-sizing: border-box;
50
- display: none;
51
- opacity: 0;
52
- overflow: auto;
53
- margin: 0;
54
- max-height: $_max-height;
55
- max-width: $_max-width;
56
- padding: 0;
57
- position: absolute;
58
- transform: scale(1);
59
- transform-origin: top left;
60
- transition: opacity $_fade-in-duration linear,
61
- transform $_scale-duration $_deceleration-curve-timing-function,
62
- height 250ms $_deceleration-curve-timing-function;
63
- will-change: transform, opacity;
64
- z-index: $_z-index;
65
-
66
- @include elevation.theme(
67
- (
68
- level: var(--_container-elevation),
69
- shadow-color: var(--_container-shadow-color),
70
- surface-tint: var(--_container-surface-tint-layer-color),
71
- )
72
- );
73
-
74
- md-elevation {
75
- z-index: 0;
76
- }
77
-
78
- &:focus {
79
- outline: none;
80
- }
81
-
82
- &--animating-open {
83
- display: inline-block;
84
- opacity: 0;
85
- transform: scale(0.8);
86
- }
87
-
88
- // Render this after `--animating-open` to override `opacity` & `transform`
89
- // CSS properties.
90
- &--open {
91
- display: inline-block;
92
- opacity: 1;
93
- transform: scale(1);
94
- }
95
-
96
- &--animating-closed {
97
- display: inline-block;
98
- opacity: 0;
99
- transition: opacity $_fade-out-duration linear;
100
- }
101
- }
102
-
103
- .md3-menu-surface--anchor {
104
- overflow: visible;
105
- position: relative;
106
- }
107
-
108
- .md3-menu-surface--fixed {
109
- position: fixed;
110
- }
111
-
112
- .md3-menu-surface--fullwidth {
113
- width: 100%;
114
- }
115
-
116
- // Used by filled variants of GM components to conditionally flatten the top
117
- // corners of the menu.
118
- .md3-menu-surface--is-open-below {
119
- border-top-left-radius: 0px;
120
- border-top-right-radius: 0px;
121
- }
122
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { MDCMenuDimensions, MDCMenuDistance, MDCMenuPoint } from './types.js';
7
- /**
8
- * Defines the shape of the adapter expected by the foundation.
9
- * Implement this adapter for your framework of choice to delegate updates to
10
- * the component in your framework of choice. See architecture documentation
11
- * for more details.
12
- * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md
13
- */
14
- export interface MDCMenuSurfaceAdapter {
15
- addClass(className: string): void;
16
- removeClass(className: string): void;
17
- hasClass(className: string): boolean;
18
- hasAnchor(): boolean;
19
- isElementInContainer(el: Element): boolean;
20
- isFocused(): boolean;
21
- isRtl(): boolean;
22
- getInnerDimensions(): MDCMenuDimensions;
23
- getAnchorDimensions(): DOMRect | null;
24
- getWindowDimensions(): MDCMenuDimensions;
25
- getBodyDimensions(): MDCMenuDimensions;
26
- getWindowScroll(): MDCMenuPoint;
27
- setPosition(position: Partial<MDCMenuDistance>): void;
28
- setMaxHeight(height: string): void;
29
- setTransformOrigin(origin: string): void;
30
- getOwnerDocument?(): Document;
31
- /** Saves the element that was focused before the menu surface was opened. */
32
- saveFocus(): void;
33
- /**
34
- * Restores focus to the element that was focused before the menu surface was
35
- * opened.
36
- */
37
- restoreFocus(): void;
38
- /** Emits an event when the menu surface is closed. */
39
- notifyClose(): void;
40
- /** Emits an event when the menu surface is closing. */
41
- notifyClosing(): void;
42
- /** Emits an event when the menu surface is opened. */
43
- notifyOpen(): void;
44
- /** Emits an event when the menu surface is opening. */
45
- notifyOpening(): void;
46
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export {};
7
- //# sourceMappingURL=adapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["adapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {MDCMenuDimensions, MDCMenuDistance, MDCMenuPoint} from './types.js';\n\n/**\n * Defines the shape of the adapter expected by the foundation.\n * Implement this adapter for your framework of choice to delegate updates to\n * the component in your framework of choice. See architecture documentation\n * for more details.\n * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md\n */\nexport interface MDCMenuSurfaceAdapter {\n addClass(className: string): void;\n removeClass(className: string): void;\n hasClass(className: string): boolean;\n hasAnchor(): boolean;\n\n isElementInContainer(el: Element): boolean;\n isFocused(): boolean;\n isRtl(): boolean;\n\n getInnerDimensions(): MDCMenuDimensions;\n getAnchorDimensions(): DOMRect|null;\n getWindowDimensions(): MDCMenuDimensions;\n getBodyDimensions(): MDCMenuDimensions;\n getWindowScroll(): MDCMenuPoint;\n setPosition(position: Partial<MDCMenuDistance>): void;\n setMaxHeight(height: string): void;\n setTransformOrigin(origin: string): void;\n getOwnerDocument?(): Document;\n\n /** Saves the element that was focused before the menu surface was opened. */\n saveFocus(): void;\n\n /**\n * Restores focus to the element that was focused before the menu surface was\n * opened.\n */\n restoreFocus(): void;\n\n /** Emits an event when the menu surface is closed. */\n notifyClose(): void;\n\n /** Emits an event when the menu surface is closing. */\n notifyClosing(): void;\n\n /** Emits an event when the menu surface is opened. */\n notifyOpen(): void;\n\n /** Emits an event when the menu surface is opening. */\n notifyOpening(): void;\n}\n"]}
@@ -1,71 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- declare const cssClasses: {
7
- ANCHOR: string;
8
- ANIMATING_CLOSED: string;
9
- ANIMATING_OPEN: string;
10
- FIXED: string;
11
- IS_OPEN_BELOW: string;
12
- OPEN: string;
13
- ROOT: string;
14
- };
15
- declare const strings: {
16
- CLOSED_EVENT: string;
17
- CLOSING_EVENT: string;
18
- OPENED_EVENT: string;
19
- OPENING_EVENT: string;
20
- FOCUSABLE_ELEMENTS: string;
21
- };
22
- declare const numbers: {
23
- /** Total duration of menu-surface open animation. */
24
- TRANSITION_OPEN_DURATION: number;
25
- /** Total duration of menu-surface close animation. */
26
- TRANSITION_CLOSE_DURATION: number;
27
- /**
28
- * Margin left to the edge of the viewport when menu-surface is at maximum
29
- * possible height. Also used as a viewport margin.
30
- */
31
- MARGIN_TO_EDGE: number;
32
- /**
33
- * Ratio of anchor width to menu-surface width for switching from corner
34
- * positioning to center positioning.
35
- */
36
- ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO: number;
37
- /**
38
- * Amount of time to wait before restoring focus when closing the menu
39
- * surface. This is important because if a touch event triggered the menu
40
- * close, and the subsequent mouse event occurs after focus is restored, then
41
- * the restored focus would be lost.
42
- */
43
- TOUCH_EVENT_WAIT_MS: number;
44
- };
45
- /**
46
- * Enum for bits in the {@see Corner) bitmap.
47
- */
48
- declare enum CornerBit {
49
- BOTTOM = 1,
50
- CENTER = 2,
51
- RIGHT = 4,
52
- FLIP_RTL = 8
53
- }
54
- /**
55
- * Enum for representing an element corner for positioning the menu-surface.
56
- *
57
- * The START constants map to LEFT if element directionality is left
58
- * to right and RIGHT if the directionality is right to left.
59
- * Likewise END maps to RIGHT or LEFT depending on the directionality.
60
- */
61
- declare enum Corner {
62
- TOP_LEFT = 0,
63
- TOP_RIGHT = 4,
64
- BOTTOM_LEFT = 1,
65
- BOTTOM_RIGHT = 5,
66
- TOP_START = 8,
67
- TOP_END = 12,
68
- BOTTOM_START = 9,
69
- BOTTOM_END = 13
70
- }
71
- export { cssClasses, strings, numbers, CornerBit, Corner };
@@ -1,83 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- const cssClasses = {
7
- ANCHOR: 'md3-menu-surface--anchor',
8
- ANIMATING_CLOSED: 'md3-menu-surface--animating-closed',
9
- ANIMATING_OPEN: 'md3-menu-surface--animating-open',
10
- FIXED: 'md3-menu-surface--fixed',
11
- IS_OPEN_BELOW: 'md3-menu-surface--is-open-below',
12
- OPEN: 'md3-menu-surface--open',
13
- ROOT: 'md3-menu-surface',
14
- };
15
- // tslint:disable:object-literal-sort-keys
16
- const strings = {
17
- CLOSED_EVENT: 'MDCMenuSurface:closed',
18
- CLOSING_EVENT: 'MDCMenuSurface:closing',
19
- OPENED_EVENT: 'MDCMenuSurface:opened',
20
- OPENING_EVENT: 'MDCMenuSurface:opening',
21
- FOCUSABLE_ELEMENTS: [
22
- 'button:not(:disabled)',
23
- '[href]:not([aria-disabled="true"])',
24
- 'input:not(:disabled)',
25
- 'select:not(:disabled)',
26
- 'textarea:not(:disabled)',
27
- '[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])',
28
- ].join(', '),
29
- };
30
- // tslint:enable:object-literal-sort-keys
31
- const numbers = {
32
- /** Total duration of menu-surface open animation. */
33
- TRANSITION_OPEN_DURATION: 120,
34
- /** Total duration of menu-surface close animation. */
35
- TRANSITION_CLOSE_DURATION: 75,
36
- /**
37
- * Margin left to the edge of the viewport when menu-surface is at maximum
38
- * possible height. Also used as a viewport margin.
39
- */
40
- MARGIN_TO_EDGE: 32,
41
- /**
42
- * Ratio of anchor width to menu-surface width for switching from corner
43
- * positioning to center positioning.
44
- */
45
- ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO: 0.67,
46
- /**
47
- * Amount of time to wait before restoring focus when closing the menu
48
- * surface. This is important because if a touch event triggered the menu
49
- * close, and the subsequent mouse event occurs after focus is restored, then
50
- * the restored focus would be lost.
51
- */
52
- TOUCH_EVENT_WAIT_MS: 30,
53
- };
54
- /**
55
- * Enum for bits in the {@see Corner) bitmap.
56
- */
57
- var CornerBit;
58
- (function (CornerBit) {
59
- CornerBit[CornerBit["BOTTOM"] = 1] = "BOTTOM";
60
- CornerBit[CornerBit["CENTER"] = 2] = "CENTER";
61
- CornerBit[CornerBit["RIGHT"] = 4] = "RIGHT";
62
- CornerBit[CornerBit["FLIP_RTL"] = 8] = "FLIP_RTL";
63
- })(CornerBit || (CornerBit = {}));
64
- /**
65
- * Enum for representing an element corner for positioning the menu-surface.
66
- *
67
- * The START constants map to LEFT if element directionality is left
68
- * to right and RIGHT if the directionality is right to left.
69
- * Likewise END maps to RIGHT or LEFT depending on the directionality.
70
- */
71
- var Corner;
72
- (function (Corner) {
73
- Corner[Corner["TOP_LEFT"] = 0] = "TOP_LEFT";
74
- Corner[Corner["TOP_RIGHT"] = 4] = "TOP_RIGHT";
75
- Corner[Corner["BOTTOM_LEFT"] = 1] = "BOTTOM_LEFT";
76
- Corner[Corner["BOTTOM_RIGHT"] = 5] = "BOTTOM_RIGHT";
77
- Corner[Corner["TOP_START"] = 8] = "TOP_START";
78
- Corner[Corner["TOP_END"] = 12] = "TOP_END";
79
- Corner[Corner["BOTTOM_START"] = 9] = "BOTTOM_START";
80
- Corner[Corner["BOTTOM_END"] = 13] = "BOTTOM_END";
81
- })(Corner || (Corner = {}));
82
- export { cssClasses, strings, numbers, CornerBit, Corner };
83
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,0BAA0B;IAClC,gBAAgB,EAAE,oCAAoC;IACtD,cAAc,EAAE,kCAAkC;IAClD,KAAK,EAAE,yBAAyB;IAChC,aAAa,EAAE,iCAAiC;IAChD,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE,kBAAkB;CACzB,CAAC;AAEF,0CAA0C;AAC1C,MAAM,OAAO,GAAG;IACd,YAAY,EAAE,uBAAuB;IACrC,aAAa,EAAE,wBAAwB;IACvC,YAAY,EAAE,uBAAuB;IACrC,aAAa,EAAE,wBAAwB;IACvC,kBAAkB,EAAE;QAClB,uBAAuB;QACvB,oCAAoC;QACpC,sBAAsB;QACtB,uBAAuB;QACvB,yBAAyB;QACzB,6DAA6D;KAC9D,CAAC,IAAI,CAAC,IAAI,CAAC;CACb,CAAC;AACF,yCAAyC;AAEzC,MAAM,OAAO,GAAG;IACd,qDAAqD;IACrD,wBAAwB,EAAE,GAAG;IAE7B,sDAAsD;IACtD,yBAAyB,EAAE,EAAE;IAE7B;;;OAGG;IACH,cAAc,EAAE,EAAE;IAElB;;;OAGG;IACH,kCAAkC,EAAE,IAAI;IAExC;;;;;OAKG;IACH,mBAAmB,EAAE,EAAE;CACxB,CAAC;AAEF;;GAEG;AACH,IAAK,SAKJ;AALD,WAAK,SAAS;IACZ,6CAAU,CAAA;IACV,6CAAU,CAAA;IACV,2CAAS,CAAA;IACT,iDAAY,CAAA;AACd,CAAC,EALI,SAAS,KAAT,SAAS,QAKb;AAED;;;;;;GAMG;AACH,IAAK,MAaJ;AAbD,WAAK,MAAM;IACT,2CAAY,CAAA;IACZ,6CAA2B,CAAA;IAC3B,iDAA8B,CAAA;IAC9B,mDACsC,CAAA;IACtC,6CAA8B,CAAA;IAC9B,0CACwC,CAAA;IACxC,mDACyC,CAAA;IACzC,gDACsB,CAAA;AACxB,CAAC,EAbI,MAAM,KAAN,MAAM,QAaV;AAED,OAAO,EAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nconst cssClasses = {\n ANCHOR: 'md3-menu-surface--anchor',\n ANIMATING_CLOSED: 'md3-menu-surface--animating-closed',\n ANIMATING_OPEN: 'md3-menu-surface--animating-open',\n FIXED: 'md3-menu-surface--fixed',\n IS_OPEN_BELOW: 'md3-menu-surface--is-open-below',\n OPEN: 'md3-menu-surface--open',\n ROOT: 'md3-menu-surface',\n};\n\n// tslint:disable:object-literal-sort-keys\nconst strings = {\n CLOSED_EVENT: 'MDCMenuSurface:closed',\n CLOSING_EVENT: 'MDCMenuSurface:closing',\n OPENED_EVENT: 'MDCMenuSurface:opened',\n OPENING_EVENT: 'MDCMenuSurface:opening',\n FOCUSABLE_ELEMENTS: [\n 'button:not(:disabled)',\n '[href]:not([aria-disabled=\"true\"])',\n 'input:not(:disabled)',\n 'select:not(:disabled)',\n 'textarea:not(:disabled)',\n '[tabindex]:not([tabindex=\"-1\"]):not([aria-disabled=\"true\"])',\n ].join(', '),\n};\n// tslint:enable:object-literal-sort-keys\n\nconst numbers = {\n /** Total duration of menu-surface open animation. */\n TRANSITION_OPEN_DURATION: 120,\n\n /** Total duration of menu-surface close animation. */\n TRANSITION_CLOSE_DURATION: 75,\n\n /**\n * Margin left to the edge of the viewport when menu-surface is at maximum\n * possible height. Also used as a viewport margin.\n */\n MARGIN_TO_EDGE: 32,\n\n /**\n * Ratio of anchor width to menu-surface width for switching from corner\n * positioning to center positioning.\n */\n ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO: 0.67,\n\n /**\n * Amount of time to wait before restoring focus when closing the menu\n * surface. This is important because if a touch event triggered the menu\n * close, and the subsequent mouse event occurs after focus is restored, then\n * the restored focus would be lost.\n */\n TOUCH_EVENT_WAIT_MS: 30,\n};\n\n/**\n * Enum for bits in the {@see Corner) bitmap.\n */\nenum CornerBit {\n BOTTOM = 1, // 0001\n CENTER = 2, // 0010\n RIGHT = 4, // 0100\n FLIP_RTL = 8, // 1000\n}\n\n/**\n * Enum for representing an element corner for positioning the menu-surface.\n *\n * The START constants map to LEFT if element directionality is left\n * to right and RIGHT if the directionality is right to left.\n * Likewise END maps to RIGHT or LEFT depending on the directionality.\n */\nenum Corner {\n TOP_LEFT = 0,\n TOP_RIGHT = CornerBit.RIGHT,\n BOTTOM_LEFT = CornerBit.BOTTOM,\n BOTTOM_RIGHT =\n CornerBit.BOTTOM | CornerBit.RIGHT, // tslint:disable-line:no-bitwise\n TOP_START = CornerBit.FLIP_RTL,\n TOP_END =\n CornerBit.FLIP_RTL | CornerBit.RIGHT, // tslint:disable-line:no-bitwise\n BOTTOM_START =\n CornerBit.BOTTOM | CornerBit.FLIP_RTL, // tslint:disable-line:no-bitwise\n BOTTOM_END = CornerBit.BOTTOM | CornerBit.RIGHT |\n CornerBit.FLIP_RTL, // tslint:disable-line:no-bitwise\n}\n\nexport {cssClasses, strings, numbers, CornerBit, Corner};\n"]}
@@ -1,176 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { MDCMenuSurfaceAdapter } from './adapter.js';
7
- import { Corner } from './constants.js';
8
- import { MDCMenuDistance } from './types.js';
9
- export declare class MDCMenuSurfaceFoundation {
10
- static get cssClasses(): {
11
- ANCHOR: string;
12
- ANIMATING_CLOSED: string;
13
- ANIMATING_OPEN: string;
14
- FIXED: string;
15
- IS_OPEN_BELOW: string;
16
- OPEN: string;
17
- ROOT: string;
18
- };
19
- static get strings(): {
20
- CLOSED_EVENT: string;
21
- CLOSING_EVENT: string;
22
- OPENED_EVENT: string;
23
- OPENING_EVENT: string;
24
- FOCUSABLE_ELEMENTS: string;
25
- };
26
- static get numbers(): {
27
- TRANSITION_OPEN_DURATION: number;
28
- TRANSITION_CLOSE_DURATION: number;
29
- MARGIN_TO_EDGE: number;
30
- ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO: number;
31
- TOUCH_EVENT_WAIT_MS: number;
32
- };
33
- static get Corner(): typeof Corner;
34
- /**
35
- * @see {@link MDCMenuSurfaceAdapter} for typing information on parameters and return types.
36
- */
37
- static get defaultAdapter(): MDCMenuSurfaceAdapter;
38
- private readonly adapter;
39
- private isSurfaceOpen;
40
- private isQuickOpen;
41
- private isHoistedElement;
42
- private isFixedPosition;
43
- private isHorizontallyCenteredOnViewport;
44
- private maxHeight;
45
- private openBottomBias;
46
- private openAnimationEndTimerId;
47
- private closeAnimationEndTimerId;
48
- private animationRequestId;
49
- private anchorCorner;
50
- /**
51
- * Corner of the menu surface to which menu surface is attached to anchor.
52
- *
53
- * Anchor corner --->+----------+
54
- * | ANCHOR |
55
- * +----------+
56
- * Origin corner --->+--------------+
57
- * | |
58
- * | |
59
- * | MENU SURFACE |
60
- * | |
61
- * | |
62
- * +--------------+
63
- */
64
- private originCorner;
65
- private readonly anchorMargin;
66
- private readonly position;
67
- private dimensions;
68
- private measurements;
69
- constructor(adapter: Partial<MDCMenuSurfaceAdapter>);
70
- init(): void;
71
- destroy(): void;
72
- /**
73
- * @param corner Default anchor corner alignment of top-left menu surface
74
- * corner.
75
- */
76
- setAnchorCorner(corner: Corner): void;
77
- /**
78
- * Flips menu corner horizontally.
79
- */
80
- flipCornerHorizontally(): void;
81
- /**
82
- * @param margin Set of margin values from anchor.
83
- */
84
- setAnchorMargin(margin: Partial<MDCMenuDistance>): void;
85
- /** Used to indicate if the menu-surface is hoisted to the body. */
86
- setIsHoisted(isHoisted: boolean): void;
87
- /**
88
- * Used to set the menu-surface calculations based on a fixed position menu.
89
- */
90
- setFixedPosition(isFixedPosition: boolean): void;
91
- /**
92
- * @return Returns true if menu is in fixed (`position: fixed`) position.
93
- */
94
- isFixed(): boolean;
95
- /** Sets the menu-surface position on the page. */
96
- setAbsolutePosition(x: number, y: number): void;
97
- /** Sets whether menu-surface should be horizontally centered to viewport. */
98
- setIsHorizontallyCenteredOnViewport(isCentered: boolean): void;
99
- setQuickOpen(quickOpen: boolean): void;
100
- /**
101
- * Sets maximum menu-surface height on open.
102
- * @param maxHeight The desired max-height. Set to 0 (default) to
103
- * automatically calculate max height based on available viewport space.
104
- */
105
- setMaxHeight(maxHeight: number): void;
106
- /**
107
- * Set to a positive integer to influence the menu to preferentially open
108
- * below the anchor instead of above.
109
- * @param bias A value of `x` simulates an extra `x` pixels of available space
110
- * below the menu during positioning calculations.
111
- */
112
- setOpenBottomBias(bias: number): void;
113
- isOpen(): boolean;
114
- /**
115
- * Open the menu surface.
116
- */
117
- open(): void;
118
- /**
119
- * Closes the menu surface.
120
- */
121
- close(skipRestoreFocus?: boolean): void;
122
- /** Handle clicks and close if not within menu-surface element. */
123
- handleBodyClick(evt: MouseEvent): void;
124
- /** Handle keys that close the surface. */
125
- handleKeydown(evt: KeyboardEvent): void;
126
- private autoposition;
127
- /**
128
- * @return Measurements used to position menu surface popup.
129
- */
130
- private getAutoLayoutmeasurements;
131
- /**
132
- * Computes the corner of the anchor from which to animate and position the
133
- * menu surface.
134
- *
135
- * Only LEFT or RIGHT bit is used to position the menu surface ignoring RTL
136
- * context. E.g., menu surface will be positioned from right side on TOP_END.
137
- */
138
- private getOriginCorner;
139
- /**
140
- * @param corner Origin corner of the menu surface.
141
- * @return Maximum height of the menu surface, based on available space. 0
142
- * indicates should not be set.
143
- */
144
- private getMenuSurfaceMaxHeight;
145
- /**
146
- * @param corner Origin corner of the menu surface.
147
- * @return Horizontal offset of menu surface origin corner from corresponding
148
- * anchor corner.
149
- */
150
- private getHorizontalOriginOffset;
151
- /**
152
- * @param corner Origin corner of the menu surface.
153
- * @return Vertical offset of menu surface origin corner from corresponding
154
- * anchor corner.
155
- */
156
- private getVerticalOriginOffset;
157
- /**
158
- * Calculates the offsets for positioning the menu-surface when the
159
- * menu-surface has been hoisted to the body.
160
- */
161
- private adjustPositionForHoistedElement;
162
- /**
163
- * The last focused element when the menu surface was opened should regain
164
- * focus, if the user is focused on or within the menu surface when it is
165
- * closed.
166
- */
167
- private maybeRestoreFocus;
168
- private hasBit;
169
- private setBit;
170
- private unsetBit;
171
- /**
172
- * isFinite that doesn't force conversion to number type.
173
- * Equivalent to Number.isFinite in ES2015, which is not supported in IE.
174
- */
175
- private isFinite;
176
- }