material 3.8.0 → 3.8.1

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 (382) hide show
  1. package/README.md +1 -1
  2. package/dist/components/badge/badge.d.ts +4 -0
  3. package/dist/components/badge/constants.d.ts +4 -0
  4. package/dist/components/badge/index.d.ts +1 -0
  5. package/dist/components/badge/types.d.ts +102 -0
  6. package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +4 -0
  7. package/dist/components/bottom-app-bar/constants.d.ts +3 -0
  8. package/dist/components/bottom-app-bar/types.d.ts +42 -0
  9. package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
  10. package/dist/components/bottom-sheet/constants.d.ts +9 -0
  11. package/dist/components/bottom-sheet/types.d.ts +52 -0
  12. package/dist/components/button/button.d.ts +4 -0
  13. package/dist/components/button/constants.d.ts +20 -0
  14. package/dist/components/button/index.d.ts +1 -0
  15. package/dist/components/button/types.d.ts +190 -0
  16. package/dist/components/button-group/button-group.d.ts +4 -0
  17. package/dist/components/button-group/constants.d.ts +54 -0
  18. package/dist/components/button-group/index.d.ts +1 -0
  19. package/dist/components/button-group/types.d.ts +125 -0
  20. package/dist/components/card/card.d.ts +4 -0
  21. package/dist/components/card/constants.d.ts +11 -0
  22. package/dist/components/card/content.d.ts +16 -0
  23. package/dist/components/card/index.d.ts +2 -0
  24. package/dist/components/card/types.d.ts +123 -0
  25. package/dist/components/carousel/carousel.d.ts +1 -0
  26. package/dist/components/carousel/constants.d.ts +10 -0
  27. package/dist/components/carousel/types.d.ts +16 -0
  28. package/dist/components/checkbox/checkbox.d.ts +5 -0
  29. package/dist/components/checkbox/constants.d.ts +13 -0
  30. package/dist/components/checkbox/index.d.ts +2 -0
  31. package/dist/components/checkbox/types.d.ts +94 -0
  32. package/dist/components/chips/chips.d.ts +4 -0
  33. package/dist/components/chips/constants.d.ts +1 -0
  34. package/dist/components/chips/factories.d.ts +4 -0
  35. package/dist/components/chips/types.d.ts +140 -0
  36. package/dist/components/datepicker/constants.d.ts +38 -0
  37. package/dist/components/datepicker/datepicker.d.ts +2 -0
  38. package/dist/components/datepicker/types.d.ts +139 -0
  39. package/dist/components/dialog/constants.d.ts +45 -0
  40. package/dist/components/dialog/dialog.d.ts +5 -0
  41. package/dist/components/dialog/index.d.ts +1 -0
  42. package/dist/components/dialog/types.d.ts +196 -0
  43. package/dist/components/divider/config.d.ts +30 -0
  44. package/dist/components/divider/constants.d.ts +15 -0
  45. package/dist/components/divider/divider.d.ts +4 -0
  46. package/dist/components/divider/types.d.ts +27 -0
  47. package/dist/components/drawer/constants.d.ts +39 -0
  48. package/dist/components/drawer/drawer.d.ts +4 -0
  49. package/dist/components/drawer/index.d.ts +1 -0
  50. package/dist/components/drawer/types.d.ts +109 -0
  51. package/dist/components/extended-fab/constants.d.ts +32 -0
  52. package/dist/components/extended-fab/extended-fab.d.ts +4 -0
  53. package/dist/components/extended-fab/types.d.ts +123 -0
  54. package/dist/components/fab/constants.d.ts +26 -0
  55. package/dist/components/fab/fab.d.ts +4 -0
  56. package/dist/components/fab/types.d.ts +100 -0
  57. package/dist/components/fab-menu/constants.d.ts +9 -0
  58. package/dist/components/fab-menu/fab-menu.d.ts +4 -0
  59. package/dist/components/fab-menu/types.d.ts +41 -0
  60. package/dist/components/icon-button/constants.d.ts +34 -0
  61. package/dist/components/icon-button/icon-button.d.ts +4 -0
  62. package/dist/components/icon-button/types.d.ts +157 -0
  63. package/dist/components/index.d.ts +1 -0
  64. package/dist/components/list/constants.d.ts +30 -0
  65. package/dist/components/list/index.d.ts +1 -0
  66. package/dist/components/list/list.d.ts +4 -0
  67. package/dist/components/list/types.d.ts +110 -0
  68. package/dist/components/loading-indicator/constants.d.ts +16 -0
  69. package/dist/components/loading-indicator/features/renderer.d.ts +13 -0
  70. package/dist/components/loading-indicator/loading-indicator.d.ts +4 -0
  71. package/dist/components/loading-indicator/types.d.ts +21 -0
  72. package/dist/components/menu/constants.d.ts +51 -0
  73. package/dist/components/menu/features/controller.js +1 -1
  74. package/dist/components/menu/features/keyboard.js +8 -3
  75. package/dist/components/menu/features/opener.js +2 -16
  76. package/dist/components/menu/index.d.ts +2 -0
  77. package/dist/components/menu/inner.d.ts +2 -0
  78. package/dist/components/menu/menu.d.ts +4 -0
  79. package/dist/components/menu/on-demand.d.ts +9 -0
  80. package/dist/components/menu/types.d.ts +185 -1
  81. package/dist/components/navigation-bar/navigation-bar.d.ts +1 -0
  82. package/dist/components/navigation-bar/types.d.ts +12 -0
  83. package/dist/components/navigation-rail/constants.d.ts +2 -0
  84. package/dist/components/navigation-rail/navigation-rail.d.ts +1 -0
  85. package/dist/components/navigation-rail/types.d.ts +18 -0
  86. package/dist/components/progress/constants.d.ts +37 -0
  87. package/dist/components/progress/progress.d.ts +4 -0
  88. package/dist/components/progress/types.d.ts +136 -0
  89. package/dist/components/radios/constants.d.ts +14 -0
  90. package/dist/components/radios/radios.d.ts +4 -0
  91. package/dist/components/radios/types.d.ts +89 -0
  92. package/dist/components/search/constants.d.ts +34 -0
  93. package/dist/components/search/search.d.ts +4 -0
  94. package/dist/components/search/types.d.ts +109 -0
  95. package/dist/components/select/constants.d.ts +46 -0
  96. package/dist/components/select/features.js +9 -1
  97. package/dist/components/select/index.d.ts +2 -0
  98. package/dist/components/select/select.d.ts +4 -0
  99. package/dist/components/select/types.d.ts +95 -0
  100. package/dist/components/side-sheet/constants.d.ts +9 -0
  101. package/dist/components/side-sheet/side-sheet.d.ts +4 -0
  102. package/dist/components/side-sheet/types.d.ts +51 -0
  103. package/dist/components/slider/constants.d.ts +62 -0
  104. package/dist/components/slider/slider.d.ts +4 -0
  105. package/dist/components/slider/types.d.ts +78 -0
  106. package/dist/components/snackbar/constants.d.ts +37 -0
  107. package/dist/components/snackbar/snackbar.d.ts +5 -0
  108. package/dist/components/snackbar/types.d.ts +67 -0
  109. package/dist/components/split-button/api.js +13 -3
  110. package/dist/components/split-button/constants.d.ts +13 -0
  111. package/dist/components/split-button/split-button.d.ts +4 -0
  112. package/dist/components/split-button/types.d.ts +50 -0
  113. package/dist/components/switch/constants.d.ts +34 -0
  114. package/dist/components/switch/switch.d.ts +4 -0
  115. package/dist/components/switch/types.d.ts +55 -0
  116. package/dist/components/tabs/constants.d.ts +49 -0
  117. package/dist/components/tabs/indicator.d.ts +22 -0
  118. package/dist/components/tabs/responsive.d.ts +17 -0
  119. package/dist/components/tabs/tab.d.ts +5 -0
  120. package/dist/components/tabs/tabs.d.ts +4 -0
  121. package/dist/components/tabs/types.d.ts +170 -0
  122. package/dist/components/tabs/utils.d.ts +24 -0
  123. package/dist/components/text-field/constants.d.ts +61 -0
  124. package/dist/components/text-field/features/trailing-icon.d.ts +25 -0
  125. package/dist/components/text-field/text-field.d.ts +4 -0
  126. package/dist/components/text-field/types.d.ts +84 -0
  127. package/dist/components/timepicker/constants.d.ts +61 -0
  128. package/dist/components/timepicker/types.d.ts +145 -0
  129. package/dist/components/toolbar/constants.d.ts +8 -0
  130. package/dist/components/toolbar/toolbar.d.ts +4 -0
  131. package/dist/components/toolbar/types.d.ts +75 -0
  132. package/dist/components/tooltip/constants.d.ts +43 -0
  133. package/dist/components/tooltip/tooltip.d.ts +4 -0
  134. package/dist/components/tooltip/types.d.ts +78 -0
  135. package/dist/components/top-app-bar/constants.d.ts +29 -0
  136. package/dist/components/top-app-bar/top-app-bar.d.ts +4 -0
  137. package/dist/components/top-app-bar/types.d.ts +55 -0
  138. package/dist/core/canvas/animation.d.ts +6 -0
  139. package/dist/core/canvas/drawing.d.ts +47 -0
  140. package/dist/core/canvas/index.d.ts +1 -0
  141. package/dist/core/canvas/resize.d.ts +7 -0
  142. package/dist/core/canvas/utils.d.ts +39 -0
  143. package/dist/core/compose/base.d.ts +9 -0
  144. package/dist/core/compose/cleanup.d.ts +2 -0
  145. package/dist/core/compose/component.d.ts +13 -0
  146. package/dist/core/compose/features/badge.d.ts +10 -0
  147. package/dist/core/compose/features/checkable.d.ts +13 -0
  148. package/dist/core/compose/features/debounce.d.ts +19 -0
  149. package/dist/core/compose/features/disabled.d.ts +11 -0
  150. package/dist/core/compose/features/events.d.ts +19 -0
  151. package/dist/core/compose/features/icon.d.ts +20 -0
  152. package/dist/core/compose/features/input.d.ts +31 -0
  153. package/dist/core/compose/features/lifecycle.d.ts +16 -0
  154. package/dist/core/compose/features/position.d.ts +13 -0
  155. package/dist/core/compose/features/ripple.d.ts +17 -0
  156. package/dist/core/compose/features/size.d.ts +5 -0
  157. package/dist/core/compose/features/style.d.ts +5 -0
  158. package/dist/core/compose/features/text.d.ts +20 -0
  159. package/dist/core/compose/features/textinput.d.ts +39 -0
  160. package/dist/core/compose/features/textlabel.d.ts +18 -0
  161. package/dist/core/compose/features/throttle.d.ts +18 -0
  162. package/dist/core/compose/features/track.d.ts +12 -0
  163. package/dist/core/compose/features/variant.d.ts +5 -0
  164. package/dist/core/compose/features/withEvents.d.ts +12 -0
  165. package/dist/core/compose/pipe.d.ts +12 -0
  166. package/dist/core/compose/utils/type-guards.d.ts +5 -0
  167. package/dist/core/config/component.d.ts +17 -0
  168. package/dist/core/config/global.d.ts +15 -0
  169. package/dist/core/config.d.ts +34 -0
  170. package/dist/core/dom/attributes.d.ts +25 -0
  171. package/dist/core/dom/classes.d.ts +24 -0
  172. package/dist/core/dom/create.d.ts +47 -0
  173. package/dist/core/dom/events.d.ts +26 -0
  174. package/dist/core/dom/focus.d.ts +11 -0
  175. package/dist/core/dom/html.d.ts +6 -0
  176. package/dist/core/dom/layer.d.ts +36 -0
  177. package/dist/core/dom/roving.d.ts +7 -0
  178. package/dist/core/navigation/destinations.d.ts +10 -0
  179. package/dist/core/shapes/cubic.d.ts +8 -0
  180. package/dist/core/shapes/material.d.ts +45 -0
  181. package/dist/core/shapes/polygon.d.ts +11 -0
  182. package/dist/core/state/emitter.d.ts +19 -0
  183. package/dist/core/state/events.d.ts +17 -0
  184. package/dist/core/state/store.d.ts +40 -0
  185. package/dist/core/theme/shape.d.ts +3 -0
  186. package/dist/core/theme/tokens.d.ts +6 -0
  187. package/dist/core/utils/background.d.ts +7 -0
  188. package/dist/core/utils/color.d.ts +5 -0
  189. package/dist/core/utils/index.d.ts +9 -0
  190. package/dist/core/utils/mobile.d.ts +10 -0
  191. package/dist/core/utils/object.d.ts +9 -0
  192. package/dist/core/utils/performance.d.ts +20 -0
  193. package/dist/core/utils/theme.d.ts +8 -0
  194. package/dist/core/utils/url.d.ts +3 -0
  195. package/dist/elements/adapter.d.ts +24 -0
  196. package/dist/elements/badge.d.ts +4 -0
  197. package/dist/elements/bottom-app-bar.d.ts +4 -0
  198. package/dist/elements/bottom-sheet.d.ts +6 -0
  199. package/dist/elements/button-group.d.ts +8 -0
  200. package/dist/elements/button.d.ts +5 -0
  201. package/dist/elements/card.d.ts +4 -0
  202. package/dist/elements/carousel.d.ts +5 -0
  203. package/dist/elements/checkbox.d.ts +4 -0
  204. package/dist/elements/chips.d.ts +9 -0
  205. package/dist/elements/css/menu.css +1 -1
  206. package/dist/elements/css/menu.js +1 -1
  207. package/dist/elements/datepicker.d.ts +6 -0
  208. package/dist/elements/define.d.ts +48 -0
  209. package/dist/elements/dialog.d.ts +5 -0
  210. package/dist/elements/divider.d.ts +4 -0
  211. package/dist/elements/drawer.d.ts +6 -0
  212. package/dist/elements/extended-fab.d.ts +5 -0
  213. package/dist/elements/fab-menu.d.ts +10 -0
  214. package/dist/elements/fab.d.ts +5 -0
  215. package/dist/elements/icon-button.d.ts +6 -0
  216. package/dist/elements/index.d.ts +4 -0
  217. package/dist/elements/list.d.ts +8 -0
  218. package/dist/elements/loading-indicator.d.ts +4 -0
  219. package/dist/elements/menu.d.ts +12 -0
  220. package/dist/elements/navigation-bar.d.ts +6 -0
  221. package/dist/elements/navigation-rail.d.ts +10 -0
  222. package/dist/elements/preupgrade/badge.css +1 -1
  223. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  224. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  225. package/dist/elements/preupgrade/button-group.css +1 -1
  226. package/dist/elements/preupgrade/button.css +1 -1
  227. package/dist/elements/preupgrade/card.css +1 -1
  228. package/dist/elements/preupgrade/carousel.css +1 -1
  229. package/dist/elements/preupgrade/checkbox.css +1 -1
  230. package/dist/elements/preupgrade/chips.css +1 -1
  231. package/dist/elements/preupgrade/datepicker.css +1 -1
  232. package/dist/elements/preupgrade/dialog.css +1 -1
  233. package/dist/elements/preupgrade/divider.css +1 -1
  234. package/dist/elements/preupgrade/drawer.css +1 -1
  235. package/dist/elements/preupgrade/extended-fab.css +1 -1
  236. package/dist/elements/preupgrade/fab-menu.css +1 -1
  237. package/dist/elements/preupgrade/fab.css +1 -1
  238. package/dist/elements/preupgrade/icon-button.css +1 -1
  239. package/dist/elements/preupgrade/list.css +1 -1
  240. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  241. package/dist/elements/preupgrade/menu.css +1 -1
  242. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  243. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  244. package/dist/elements/preupgrade/progress.css +1 -1
  245. package/dist/elements/preupgrade/radios.css +1 -1
  246. package/dist/elements/preupgrade/search.css +1 -1
  247. package/dist/elements/preupgrade/select.css +1 -1
  248. package/dist/elements/preupgrade/side-sheet.css +1 -1
  249. package/dist/elements/preupgrade/slider.css +1 -1
  250. package/dist/elements/preupgrade/snackbar.css +1 -1
  251. package/dist/elements/preupgrade/split-button.css +1 -1
  252. package/dist/elements/preupgrade/switch.css +1 -1
  253. package/dist/elements/preupgrade/tabs.css +1 -1
  254. package/dist/elements/preupgrade/text-field.css +1 -1
  255. package/dist/elements/preupgrade/timepicker.css +1 -1
  256. package/dist/elements/preupgrade/toolbar.css +1 -1
  257. package/dist/elements/preupgrade/tooltip.css +1 -1
  258. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  259. package/dist/elements/preupgrade.css +1 -1
  260. package/dist/elements/progress.d.ts +4 -0
  261. package/dist/elements/radios.d.ts +5 -0
  262. package/dist/elements/search.d.ts +15 -0
  263. package/dist/elements/select.d.ts +6 -0
  264. package/dist/elements/side-sheet.d.ts +5 -0
  265. package/dist/elements/slider.d.ts +7 -0
  266. package/dist/elements/snackbar.d.ts +4 -0
  267. package/dist/elements/split-button.d.ts +8 -0
  268. package/dist/elements/styles.d.ts +11 -0
  269. package/dist/elements/switch.d.ts +5 -0
  270. package/dist/elements/tabs.d.ts +6 -0
  271. package/dist/elements/text-field.d.ts +9 -0
  272. package/dist/elements/timepicker.d.ts +9 -0
  273. package/dist/elements/toolbar.d.ts +4 -0
  274. package/dist/elements/tooltip.d.ts +4 -0
  275. package/dist/elements/top-app-bar.d.ts +4 -0
  276. package/dist/index.d.ts +1 -0
  277. package/dist/react/create.d.ts +15 -0
  278. package/dist/react/index.d.ts +1 -0
  279. package/dist/react/jsx.d.ts +3 -0
  280. package/dist/solid/create.d.ts +16 -0
  281. package/dist/solid/index.d.ts +1 -0
  282. package/dist/solid/jsx.d.ts +4 -0
  283. package/dist/ssr/index.d.ts +3 -0
  284. package/dist/ssr/solid.d.ts +1 -0
  285. package/dist/ssr/svelte.d.ts +1 -0
  286. package/dist/ssr/vue.d.ts +1 -0
  287. package/dist/styles/badge.css +1 -1
  288. package/dist/styles/base-lite.css +1 -1
  289. package/dist/styles/base.css +1 -1
  290. package/dist/styles/bottom-app-bar.css +1 -1
  291. package/dist/styles/bottom-sheet.css +1 -1
  292. package/dist/styles/button-group.css +1 -1
  293. package/dist/styles/button.css +1 -1
  294. package/dist/styles/card.css +1 -1
  295. package/dist/styles/carousel.css +1 -1
  296. package/dist/styles/checkbox.css +1 -1
  297. package/dist/styles/chips.css +1 -1
  298. package/dist/styles/contrast.css +1 -1
  299. package/dist/styles/datepicker.css +1 -1
  300. package/dist/styles/dialog.css +1 -1
  301. package/dist/styles/divider.css +1 -1
  302. package/dist/styles/drawer.css +1 -1
  303. package/dist/styles/extended-fab.css +1 -1
  304. package/dist/styles/fab-menu.css +1 -1
  305. package/dist/styles/fab.css +1 -1
  306. package/dist/styles/icon-button.css +1 -1
  307. package/dist/styles/list.css +1 -1
  308. package/dist/styles/loading-indicator.css +1 -1
  309. package/dist/styles/menu.css +2 -2
  310. package/dist/styles/navigation-bar.css +1 -1
  311. package/dist/styles/navigation-rail.css +1 -1
  312. package/dist/styles/progress.css +1 -1
  313. package/dist/styles/radios.css +1 -1
  314. package/dist/styles/search.css +1 -1
  315. package/dist/styles/select.css +1 -1
  316. package/dist/styles/side-sheet.css +1 -1
  317. package/dist/styles/slider.css +1 -1
  318. package/dist/styles/snackbar.css +1 -1
  319. package/dist/styles/split-button.css +1 -1
  320. package/dist/styles/switch.css +1 -1
  321. package/dist/styles/tabs.css +1 -1
  322. package/dist/styles/text-field.css +1 -1
  323. package/dist/styles/timepicker.css +1 -1
  324. package/dist/styles/toolbar.css +1 -1
  325. package/dist/styles/tooltip.css +1 -1
  326. package/dist/styles/top-app-bar.css +1 -1
  327. package/dist/styles/typography.css +1 -1
  328. package/dist/styles/utilities.css +1 -1
  329. package/dist/styles.css +2 -2
  330. package/dist/svelte/runtime.d.ts +21 -0
  331. package/dist/theme/image.d.ts +2 -0
  332. package/dist/theme/index.d.ts +20 -0
  333. package/dist/theme/variants.d.ts +6 -0
  334. package/dist/theme/vendor/dynamiccolor/color_spec_2021.d.ts +1 -0
  335. package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +39 -0
  336. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +13 -0
  337. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.d.ts +1 -0
  338. package/dist/theme/vendor/hct/hct.d.ts +9 -0
  339. package/dist/themes/autumn-contrast.css +1 -1
  340. package/dist/themes/autumn.css +1 -1
  341. package/dist/themes/baseline-contrast.css +1 -1
  342. package/dist/themes/baseline.css +1 -1
  343. package/dist/themes/brownbeige-contrast.css +1 -1
  344. package/dist/themes/brownbeige.css +1 -1
  345. package/dist/themes/content-contrast.css +1 -1
  346. package/dist/themes/content.css +1 -1
  347. package/dist/themes/desert-contrast.css +1 -1
  348. package/dist/themes/desert.css +1 -1
  349. package/dist/themes/expressive-contrast.css +1 -1
  350. package/dist/themes/expressive.css +1 -1
  351. package/dist/themes/fidelity-contrast.css +1 -1
  352. package/dist/themes/fidelity.css +1 -1
  353. package/dist/themes/forest-contrast.css +1 -1
  354. package/dist/themes/forest.css +1 -1
  355. package/dist/themes/fruit-salad-contrast.css +1 -1
  356. package/dist/themes/fruit-salad.css +1 -1
  357. package/dist/themes/highcontrast-contrast.css +1 -1
  358. package/dist/themes/highcontrast.css +1 -1
  359. package/dist/themes/monochrome-contrast.css +1 -1
  360. package/dist/themes/monochrome.css +1 -1
  361. package/dist/themes/neutral-contrast.css +1 -1
  362. package/dist/themes/neutral.css +1 -1
  363. package/dist/themes/ocean-contrast.css +1 -1
  364. package/dist/themes/ocean.css +1 -1
  365. package/dist/themes/rainbow-contrast.css +1 -1
  366. package/dist/themes/rainbow.css +1 -1
  367. package/dist/themes/sageivory-contrast.css +1 -1
  368. package/dist/themes/sageivory.css +1 -1
  369. package/dist/themes/spring-contrast.css +1 -1
  370. package/dist/themes/spring.css +1 -1
  371. package/dist/themes/summer-contrast.css +1 -1
  372. package/dist/themes/summer.css +1 -1
  373. package/dist/themes/sunset-contrast.css +1 -1
  374. package/dist/themes/sunset.css +1 -1
  375. package/dist/themes/tealcaramel-contrast.css +1 -1
  376. package/dist/themes/tealcaramel.css +1 -1
  377. package/dist/themes/vibrant-contrast.css +1 -1
  378. package/dist/themes/vibrant.css +1 -1
  379. package/dist/vue/create.d.ts +18 -0
  380. package/dist/vue/index.d.ts +1 -0
  381. package/package.json +1 -1
  382. package/src/styles/components/_menu.scss +14 -1
package/README.md CHANGED
@@ -94,7 +94,7 @@ What a bundler keeps, minified and gzipped (kB is 1,000 bytes), measured from th
94
94
  | `createButton` from `material`, with code splitting: the initial chunks (the progress indicator loads on demand) | 7.6 kB |
95
95
  | `createButton`, without code splitting (the progress indicator included) | 13.9 kB |
96
96
  | `createButton`, `createTextField` and `createCheckbox`, without code splitting | 20.4 kB |
97
- | Everything the root exports (`export * from 'material'`), without code splitting | 127.2 kB |
97
+ | Everything the root exports (`export * from 'material'`), without code splitting | 127.3 kB |
98
98
  | `material/styles/base` | 3.0 kB |
99
99
  | `material/styles/base-lite` | 1.6 kB |
100
100
  | `material/styles/base` and `material/styles/button` | 5.2 kB |
@@ -1,3 +1,7 @@
1
1
  import { BadgeConfig, BadgeComponent } from "./types.js";
2
+ /**
3
+ * Creates a new Badge component following Material Design 3 guidelines.
4
+ * @param config
5
+ */
2
6
  declare const createBadge: (config?: BadgeConfig) => BadgeComponent;
3
7
  export default createBadge;
@@ -1,7 +1,9 @@
1
+ /** Badge variants */
1
2
  export declare const BADGE_VARIANTS: {
2
3
  readonly SMALL: "small";
3
4
  readonly LARGE: "large";
4
5
  };
6
+ /** Badge colors */
5
7
  export declare const BADGE_COLORS: {
6
8
  readonly ERROR: "error";
7
9
  readonly PRIMARY: "primary";
@@ -11,10 +13,12 @@ export declare const BADGE_COLORS: {
11
13
  readonly WARNING: "warning";
12
14
  readonly INFO: "info";
13
15
  };
16
+ /** Badge positions relative to its container */
14
17
  export declare const BADGE_POSITIONS: {
15
18
  readonly TOP_RIGHT: "top-right";
16
19
  readonly TOP_LEFT: "top-left";
17
20
  readonly BOTTOM_RIGHT: "bottom-right";
18
21
  readonly BOTTOM_LEFT: "bottom-left";
19
22
  };
23
+ /** Maximum character count for badge labels */
20
24
  export declare const BADGE_MAX_CHARACTERS = 4;
@@ -1,2 +1,3 @@
1
+ /** Badge component module */
1
2
  export { default, default as createBadge } from "./badge.js";
2
3
  export type { BadgeConfig, BadgeComponent, BadgeVariant, BadgeColor, BadgePosition, } from "./types.js";
@@ -1,50 +1,152 @@
1
1
  import { ElementComponent } from "../../core/compose/component.js";
2
+ /** Badge variant types - determines the badge size and appearance */
2
3
  export type BadgeVariant = 'small' | 'large';
4
+ /** Badge color types - determines the badge's background color */
3
5
  export type BadgeColor = 'error' | 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'info';
6
+ /** Badge position types - determines where the badge appears relative to its target */
4
7
  export type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
8
+ /** Configuration interface for the Badge component */
5
9
  export interface BadgeConfig {
10
+ /**
11
+ * Badge variant (small dot or large numbered)
12
+ * @default 'large'
13
+ */
6
14
  variant?: BadgeVariant | string;
15
+ /**
16
+ * Badge color (follows Material Design 3 color system)
17
+ * @default 'error'
18
+ */
7
19
  color?: BadgeColor | string;
20
+ /**
21
+ * Badge position relative to its container element
22
+ * @default 'top-right'
23
+ */
8
24
  position?: BadgePosition | string;
25
+ /** Text label inside the badge (for large badges) Up to 4 characters, numbers exceeding max will show "{max}+" For a small dot, nonnumeric text supplies its accessible announcement; otherwise it announces "New notification" without rendering text. */
9
26
  label?: string | number;
27
+ /** Maximum value to display (shows "{max}+" if label exceeds max) */
10
28
  max?: number;
29
+ /**
30
+ * Whether the badge should be initially visible
31
+ * @default true
32
+ */
11
33
  visible?: boolean;
34
+ /** Target element to which badge will be attached */
12
35
  target?: HTMLElement;
36
+ /** Additional CSS classes to apply to the badge element */
13
37
  class?: string;
38
+ /**
39
+ * CSS class prefix for all badge classes
40
+ * @default "mtrl"
41
+ */
14
42
  prefix?: string;
43
+ /**
44
+ * Component name used in CSS class generation
45
+ * @default "badge"
46
+ */
15
47
  componentName?: string;
16
48
  }
49
+ /** The visibility control withVisibility installs on a badge. */
17
50
  export interface BadgeVisibility {
51
+ /** Shows the badge */
18
52
  show: () => void;
53
+ /** Hides the badge */
19
54
  hide: () => void;
55
+ /** Toggles badge visibility, or forces it when given a flag */
20
56
  toggle: (visible?: boolean) => void;
57
+ /** Whether the badge is currently visible */
21
58
  isVisible: () => boolean;
22
59
  }
60
+ /** What a badge feature enhancer needs from the component it is handed. */
23
61
  export interface BadgeFeatureHost extends ElementComponent {
24
62
  config: BadgeConfig & Record<string, unknown>;
25
63
  wrapper?: HTMLElement;
26
64
  }
65
+ /** Badge component interface */
27
66
  export interface BadgeComponent {
67
+ /** The badge's root DOM element */
28
68
  element: HTMLElement;
69
+ /** Badge wrapper element (if badge is attached to target) */
29
70
  wrapper?: HTMLElement;
71
+ /**
72
+ * Sets the badge's text label
73
+ * @param label
74
+ */
30
75
  setLabel: (label: string | number) => BadgeComponent;
76
+ /** Gets the badge's current text label */
31
77
  getLabel: () => string;
78
+ /**
79
+ * Sets the badge's content (alias for setLabel)
80
+ * @param content
81
+ */
32
82
  setContent: (content: string | number) => BadgeComponent;
83
+ /** Gets the badge's current content (alias for getLabel) */
33
84
  getContent: () => string;
85
+ /** Shows the badge (makes it visible) */
34
86
  show: () => BadgeComponent;
87
+ /** Hides the badge (makes it invisible) */
35
88
  hide: () => BadgeComponent;
89
+ /**
90
+ * Toggles badge visibility
91
+ * @param visible
92
+ */
36
93
  toggle: (visible?: boolean) => BadgeComponent;
94
+ /** Checks if the badge is currently visible */
37
95
  isVisible: () => boolean;
96
+ /**
97
+ * Sets maximum value (after which badge shows max+)
98
+ * @param max
99
+ */
38
100
  setMax: (max: number) => BadgeComponent;
101
+ /**
102
+ * Sets badge color
103
+ * @param color
104
+ */
39
105
  setColor: (color: BadgeColor | string) => BadgeComponent;
106
+ /**
107
+ * Sets badge variant (size style)
108
+ * @param variant
109
+ */
40
110
  setVariant: (variant: BadgeVariant | string) => BadgeComponent;
111
+ /**
112
+ * Sets badge position relative to target
113
+ * @param position
114
+ */
41
115
  setPosition: (position: BadgePosition | string) => BadgeComponent;
116
+ /**
117
+ * Attaches badge to a target element
118
+ * @param target
119
+ */
42
120
  attachTo: (target: HTMLElement) => BadgeComponent;
121
+ /** Makes badge standalone (removes from wrapper) */
43
122
  detach: () => BadgeComponent;
123
+ /** Destroys the badge component and cleans up resources */
44
124
  destroy: () => void;
125
+ /**
126
+ * Gets a class name with the component's prefix
127
+ * @param name
128
+ */
45
129
  getClass: (name: string) => string;
130
+ /**
131
+ * Adds CSS classes to the badge element
132
+ * @param classes
133
+ */
46
134
  addClass: (...classes: string[]) => BadgeComponent;
135
+ /**
136
+ * Removes CSS classes from the badge element
137
+ * @param classes
138
+ */
47
139
  removeClass: (...classes: string[]) => BadgeComponent;
140
+ /**
141
+ * Adds an event listener to the badge
142
+ * @param event
143
+ * @param handler
144
+ */
48
145
  on: (event: string, handler: Function) => BadgeComponent;
146
+ /**
147
+ * Removes an event listener from the badge
148
+ * @param event
149
+ * @param handler
150
+ */
49
151
  off: (event: string, handler: Function) => BadgeComponent;
50
152
  }
@@ -1,2 +1,6 @@
1
1
  import { BottomAppBarComponent, BottomAppBarConfig } from "./types.js";
2
+ /**
3
+ * Creates a bottom app bar component
4
+ * @param config
5
+ */
2
6
  export declare const createBottomAppBar: (config?: BottomAppBarConfig) => BottomAppBarComponent;
@@ -1,8 +1,11 @@
1
+ /** FAB position constants for Bottom App Bar */
1
2
  export declare const FAB_POSITIONS: {
2
3
  readonly CENTER: "center";
3
4
  readonly END: "end";
4
5
  };
6
+ /** Default transition duration for show/hide animations */
5
7
  export declare const DEFAULT_TRANSITION_DURATION = 300;
8
+ /** CSS class names used in the bottom app bar component */
6
9
  export declare const BOTTOM_APP_BAR_CLASSES: {
7
10
  readonly ROOT: "bottom-app-bar";
8
11
  readonly ACTIONS: "bottom-app-bar__actions";
@@ -1,21 +1,63 @@
1
1
  import { ElementComponent } from "../../core/compose/index.js";
2
+ /** FAB position type for Bottom App Bar */
2
3
  export type FabPosition = 'center' | 'end';
4
+ /** Configuration options for Bottom App Bar component */
3
5
  export interface BottomAppBarConfig {
6
+ /**
7
+ * Element to use for the container
8
+ * @default 'div'
9
+ */
4
10
  tag?: string;
11
+ /**
12
+ * Whether to show FAB in the bottom bar
13
+ * @default false
14
+ */
5
15
  hasFab?: boolean;
16
+ /**
17
+ * FAB position in bottom bar
18
+ * @default 'end'
19
+ */
6
20
  fabPosition?: FabPosition;
21
+ /** Additional CSS classes to apply */
7
22
  class?: string;
23
+ /**
24
+ * Whether to enable auto-hide on scroll
25
+ * @default false
26
+ */
8
27
  autoHide?: boolean;
28
+ /**
29
+ * Transition duration for show/hide in ms
30
+ * @default 300
31
+ */
9
32
  transitionDuration?: number;
33
+ /** Called with the new visibility when it changes. */
10
34
  onVisibilityChange?: (visible: boolean) => void;
35
+ /**
36
+ * Component prefix for class names
37
+ * @default 'mtrl'
38
+ */
11
39
  prefix?: string;
40
+ /** Component name for class generation */
12
41
  componentName?: string;
13
42
  }
43
+ /** Bottom App Bar component interface */
14
44
  export interface BottomAppBarComponent extends ElementComponent {
45
+ /**
46
+ * Adds an action button to the bottom bar
47
+ * @param button
48
+ */
15
49
  addAction(button: HTMLElement): this;
50
+ /**
51
+ * Adds a floating action button to the bottom bar
52
+ * @param fab
53
+ */
16
54
  addFab(fab: HTMLElement): this;
55
+ /** Shows the bottom bar */
17
56
  show(): this;
57
+ /** Hides the bottom bar */
18
58
  hide(): this;
59
+ /** Checks if the bottom bar is visible */
19
60
  isVisible: () => boolean;
61
+ /** Get the actions container element */
20
62
  getActionsContainer: () => HTMLElement;
21
63
  }
@@ -1,3 +1,7 @@
1
1
  import { BottomSheetConfig, BottomSheetComponent } from "./types.js";
2
+ /**
3
+ * Creates a bottom sheet: a surface anchored to the bottom edge holding content secondary to the page.
4
+ * @param config
5
+ */
2
6
  declare const createBottomSheet: (config?: BottomSheetConfig) => BottomSheetComponent;
3
7
  export default createBottomSheet;
@@ -1,21 +1,29 @@
1
+ /** Bottom sheet variants. */
1
2
  export declare const BOTTOM_SHEET_VARIANTS: {
2
3
  readonly STANDARD: "standard";
3
4
  readonly MODAL: "modal";
4
5
  };
6
+ /** How far the sheet is open. */
5
7
  export declare const BOTTOM_SHEET_STATES: {
6
8
  readonly HIDDEN: "hidden";
7
9
  readonly PARTIAL: "partial";
8
10
  readonly EXPANDED: "expanded";
9
11
  };
12
+ /** Defaults, from Compose BottomSheetDefaults and SheetBottomTokens. */
10
13
  export declare const BOTTOM_SHEET_DEFAULTS: {
11
14
  readonly VARIANT: "modal";
15
+ /** BottomSheetDefaults.SheetMaxWidth; wider viewports centre the sheet */
12
16
  readonly MAX_WIDTH: 640;
17
+ /** A drag handle is part of the anatomy, so it is on unless asked otherwise */
13
18
  readonly DRAG_HANDLE: true;
14
19
  readonly CLOSE_ON_SCRIM_CLICK: true;
15
20
  readonly CLOSE_ON_ESCAPE: true;
21
+ /** BottomSheetDefaults.PositionalThreshold: how far the sheet must be dragged before it settles at the next anchor rather than springing back. */
16
22
  readonly POSITIONAL_THRESHOLD: 56;
23
+ /** BottomSheetDefaults.VelocityThreshold, in dp per second */
17
24
  readonly VELOCITY_THRESHOLD: 125;
18
25
  };
26
+ /** Class names, without the prefix. */
19
27
  export declare const BOTTOM_SHEET_CLASSES: {
20
28
  readonly ROOT: "bottom-sheet";
21
29
  readonly SCRIM: "bottom-sheet__scrim";
@@ -25,6 +33,7 @@ export declare const BOTTOM_SHEET_CLASSES: {
25
33
  readonly TITLE: "bottom-sheet__title";
26
34
  readonly CONTENT: "bottom-sheet__content";
27
35
  };
36
+ /** Events the sheet emits. */
28
37
  export declare const BOTTOM_SHEET_EVENTS: {
29
38
  readonly OPEN: "open";
30
39
  readonly CLOSE: "close";
@@ -1,10 +1,16 @@
1
1
  import { BOTTOM_SHEET_VARIANTS, BOTTOM_SHEET_STATES } from "./constants.js";
2
+ /** Standard or modal */
2
3
  export type BottomSheetVariant = (typeof BOTTOM_SHEET_VARIANTS)[keyof typeof BOTTOM_SHEET_VARIANTS];
4
+ /** How far the sheet is open */
3
5
  export type BottomSheetState = (typeof BOTTOM_SHEET_STATES)[keyof typeof BOTTOM_SHEET_STATES];
6
+ /** What a state change reports */
4
7
  export interface BottomSheetStateEvent {
8
+ /** The state the sheet has moved to */
5
9
  state: BottomSheetState;
10
+ /** The state it came from */
6
11
  previous: BottomSheetState;
7
12
  }
13
+ /** Handlers accepted at creation, one per event name */
8
14
  export interface BottomSheetEventHandlers {
9
15
  open?: () => void;
10
16
  close?: () => void;
@@ -12,35 +18,81 @@ export interface BottomSheetEventHandlers {
12
18
  dragStart?: () => void;
13
19
  dragEnd?: (event: BottomSheetStateEvent) => void;
14
20
  }
21
+ /** Configuration for the bottom sheet. */
15
22
  export interface BottomSheetConfig {
23
+ /**
24
+ * Standard sheets leave the page usable; modal sheets cover it with a scrim and take focus.
25
+ * @default 'modal'
26
+ */
16
27
  variant?: BottomSheetVariant;
28
+ /** Headline shown above the content. */
17
29
  title?: string;
30
+ /** Body of the sheet, as markup or an element */
18
31
  content?: string | HTMLElement;
32
+ /**
33
+ * The 32x4dp bar at the top edge, which says the sheet can be dragged.
34
+ * @default true
35
+ */
19
36
  dragHandle?: boolean;
37
+ /** Height of the partially expanded state, in pixels: a sheet with more content shows this much of it until it is expanded. */
20
38
  peekHeight?: number;
39
+ /**
40
+ * The sheet stops growing at this width and centres itself, so it does not stretch across a desktop window.
41
+ * @default 640
42
+ */
21
43
  maxWidth?: number;
44
+ /**
45
+ * State to start in.
46
+ * @default 'hidden'
47
+ */
22
48
  initialState?: BottomSheetState;
49
+ /**
50
+ * Whether a click on the scrim closes a modal sheet.
51
+ * @default true
52
+ */
23
53
  closeOnScrimClick?: boolean;
54
+ /**
55
+ * Whether Escape closes a modal sheet.
56
+ * @default true
57
+ */
24
58
  closeOnEscape?: boolean;
59
+ /** Where to mount the sheet. */
25
60
  container?: HTMLElement;
61
+ /** `"top"` makes a modal sheet's root a `<dialog>` element, rendered in `container` like any sheet, and opens it with `showModal()`: in the browser's top layer, above every z-index and outside any clipping ancestor, with the rest of the page inert. */
26
62
  layer?: "top";
63
+ /** Handlers registered at creation, equivalent to calling `on` for each */
27
64
  on?: BottomSheetEventHandlers;
65
+ /** Extra classes for the root element */
28
66
  class?: string;
29
67
  prefix?: string;
30
68
  componentName?: string;
31
69
  }
70
+ /** A bottom sheet instance. */
32
71
  export interface BottomSheetComponent {
72
+ /** The root element, which holds the scrim and the container */
33
73
  element: HTMLElement;
74
+ /** Opens the sheet, partially expanded */
34
75
  open: () => BottomSheetComponent;
76
+ /** Closes the sheet */
35
77
  close: () => BottomSheetComponent;
78
+ /** Opens the sheet to its full height */
36
79
  expand: () => BottomSheetComponent;
80
+ /** Returns the sheet to the peek height */
37
81
  collapse: () => BottomSheetComponent;
82
+ /** Whether the sheet is showing at all */
38
83
  isOpen: () => boolean;
84
+ /** How far the sheet is open */
39
85
  getState: () => BottomSheetState;
86
+ /** Replaces the body of the sheet */
40
87
  setContent: (content: string | HTMLElement) => BottomSheetComponent;
88
+ /** Replaces the headline */
41
89
  setTitle: (title: string) => BottomSheetComponent;
90
+ /** Adds an event listener */
42
91
  on: <T extends keyof BottomSheetEventHandlers>(event: T, handler: NonNullable<BottomSheetEventHandlers[T]>) => BottomSheetComponent;
92
+ /** Removes an event listener */
43
93
  off: <T extends keyof BottomSheetEventHandlers>(event: T, handler: NonNullable<BottomSheetEventHandlers[T]>) => BottomSheetComponent;
94
+ /** Removes the sheet from the page and releases its listeners */
44
95
  destroy: () => void;
96
+ /** Prefixes a class name, for styling hooks */
45
97
  getClass: (name: string) => string;
46
98
  }
@@ -1,3 +1,7 @@
1
1
  import { ButtonConfig, ButtonComponent } from "./types.js";
2
+ /**
3
+ * Creates a new Button component with the specified configuration.
4
+ * @param config
5
+ */
2
6
  declare const createButton: (config?: ButtonConfig) => ButtonComponent;
3
7
  export default createButton;
@@ -1,28 +1,47 @@
1
+ /** Button variants */
1
2
  export declare const BUTTON_VARIANTS: {
3
+ /** Primary action button with solid background (high emphasis) */
2
4
  readonly FILLED: "filled";
5
+ /** Secondary action button with medium emphasis */
3
6
  readonly TONAL: "tonal";
7
+ /** Button with outline border and transparent background */
4
8
  readonly OUTLINED: "outlined";
9
+ /** Button with slight elevation/shadow */
5
10
  readonly ELEVATED: "elevated";
11
+ /** Button that appears as text without background or border (low emphasis) */
6
12
  readonly TEXT: "text";
7
13
  };
14
+ /** Available button size variants matching MD3 specifications */
8
15
  export declare const BUTTON_SIZES: {
16
+ /** Extra small size - 32px height */
9
17
  readonly XS: "xs";
18
+ /** Small size - 40px height (default) */
10
19
  readonly S: "s";
20
+ /** Medium size - 56px height */
11
21
  readonly M: "m";
22
+ /** Large size - 96px height */
12
23
  readonly L: "l";
24
+ /** Extra large size - 136px height */
13
25
  readonly XL: "xl";
14
26
  };
27
+ /** Button size type */
15
28
  export type ButtonSize = keyof typeof BUTTON_SIZES;
29
+ /** Available button shape variants */
16
30
  export declare const BUTTON_SHAPES: {
31
+ /** Round shape - pill-shaped buttons (default) */
17
32
  readonly ROUND: "round";
33
+ /** Square shape - buttons with size-specific corner radius */
18
34
  readonly SQUARE: "square";
19
35
  };
36
+ /** Button shape type */
20
37
  export type ButtonShape = keyof typeof BUTTON_SHAPES;
38
+ /** Default button types */
21
39
  export declare const BUTTON_TYPES: {
22
40
  readonly BUTTON: "button";
23
41
  readonly SUBMIT: "submit";
24
42
  readonly RESET: "reset";
25
43
  };
44
+ /** CSS classes used by the button component */
26
45
  export declare const BUTTON_CLASSES: {
27
46
  readonly ROOT: "button";
28
47
  readonly ICON: "button__icon";
@@ -30,6 +49,7 @@ export declare const BUTTON_CLASSES: {
30
49
  readonly ACTIVE: "button--active";
31
50
  readonly DISABLED: "button--disabled";
32
51
  };
52
+ /** Default ripple effect configuration */
33
53
  export declare const DEFAULT_RIPPLE_CONFIG: {
34
54
  readonly DURATION: 450;
35
55
  };
@@ -1,3 +1,4 @@
1
+ /** Button component module */
1
2
  export { default, default as createButton } from "./button.js";
2
3
  export type { ButtonConfig, ButtonComponent, ButtonVariant, ButtonChangePayload } from "./types.js";
3
4
  export type { ButtonEvents } from "./types.js";