material 3.7.3 → 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 (440) hide show
  1. package/NOTICE +223 -0
  2. package/README.md +6 -4
  3. package/dist/components/badge/badge.d.ts +4 -0
  4. package/dist/components/badge/constants.d.ts +4 -0
  5. package/dist/components/badge/index.d.ts +1 -0
  6. package/dist/components/badge/types.d.ts +102 -0
  7. package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +4 -0
  8. package/dist/components/bottom-app-bar/constants.d.ts +3 -0
  9. package/dist/components/bottom-app-bar/types.d.ts +42 -0
  10. package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
  11. package/dist/components/bottom-sheet/constants.d.ts +9 -0
  12. package/dist/components/bottom-sheet/types.d.ts +52 -0
  13. package/dist/components/button/button.d.ts +4 -0
  14. package/dist/components/button/constants.d.ts +20 -0
  15. package/dist/components/button/index.d.ts +1 -0
  16. package/dist/components/button/types.d.ts +190 -0
  17. package/dist/components/button-group/button-group.d.ts +4 -0
  18. package/dist/components/button-group/constants.d.ts +54 -0
  19. package/dist/components/button-group/index.d.ts +1 -0
  20. package/dist/components/button-group/types.d.ts +125 -0
  21. package/dist/components/card/card.d.ts +4 -0
  22. package/dist/components/card/constants.d.ts +11 -0
  23. package/dist/components/card/content.d.ts +16 -0
  24. package/dist/components/card/index.d.ts +2 -0
  25. package/dist/components/card/types.d.ts +123 -0
  26. package/dist/components/carousel/carousel.d.ts +1 -0
  27. package/dist/components/carousel/constants.d.ts +10 -0
  28. package/dist/components/carousel/types.d.ts +16 -0
  29. package/dist/components/checkbox/checkbox.d.ts +5 -0
  30. package/dist/components/checkbox/constants.d.ts +13 -0
  31. package/dist/components/checkbox/index.d.ts +2 -0
  32. package/dist/components/checkbox/types.d.ts +94 -0
  33. package/dist/components/chips/chips.d.ts +4 -0
  34. package/dist/components/chips/constants.d.ts +1 -0
  35. package/dist/components/chips/factories.d.ts +4 -0
  36. package/dist/components/chips/types.d.ts +140 -0
  37. package/dist/components/datepicker/constants.d.ts +38 -0
  38. package/dist/components/datepicker/datepicker.d.ts +2 -0
  39. package/dist/components/datepicker/types.d.ts +139 -0
  40. package/dist/components/dialog/constants.d.ts +45 -0
  41. package/dist/components/dialog/dialog.d.ts +5 -0
  42. package/dist/components/dialog/index.d.ts +1 -0
  43. package/dist/components/dialog/types.d.ts +196 -0
  44. package/dist/components/divider/config.d.ts +30 -0
  45. package/dist/components/divider/constants.d.ts +15 -0
  46. package/dist/components/divider/divider.d.ts +4 -0
  47. package/dist/components/divider/types.d.ts +27 -0
  48. package/dist/components/drawer/constants.d.ts +39 -0
  49. package/dist/components/drawer/drawer.d.ts +4 -0
  50. package/dist/components/drawer/index.d.ts +1 -0
  51. package/dist/components/drawer/types.d.ts +109 -0
  52. package/dist/components/extended-fab/constants.d.ts +32 -0
  53. package/dist/components/extended-fab/extended-fab.d.ts +4 -0
  54. package/dist/components/extended-fab/types.d.ts +126 -0
  55. package/dist/components/fab/constants.d.ts +26 -0
  56. package/dist/components/fab/fab.d.ts +4 -0
  57. package/dist/components/fab/types.d.ts +103 -0
  58. package/dist/components/fab-menu/constants.d.ts +9 -0
  59. package/dist/components/fab-menu/fab-menu.d.ts +4 -0
  60. package/dist/components/fab-menu/types.d.ts +41 -0
  61. package/dist/components/icon-button/constants.d.ts +34 -0
  62. package/dist/components/icon-button/icon-button.d.ts +4 -0
  63. package/dist/components/icon-button/types.d.ts +157 -0
  64. package/dist/components/index.d.ts +1 -0
  65. package/dist/components/list/constants.d.ts +30 -0
  66. package/dist/components/list/index.d.ts +1 -0
  67. package/dist/components/list/list.d.ts +4 -0
  68. package/dist/components/list/types.d.ts +110 -0
  69. package/dist/components/loading-indicator/constants.d.ts +16 -0
  70. package/dist/components/loading-indicator/features/renderer.d.ts +13 -0
  71. package/dist/components/loading-indicator/loading-indicator.d.ts +4 -0
  72. package/dist/components/loading-indicator/types.d.ts +21 -0
  73. package/dist/components/menu/constants.d.ts +51 -0
  74. package/dist/components/menu/features/controller.js +1 -1
  75. package/dist/components/menu/features/keyboard.js +8 -3
  76. package/dist/components/menu/features/opener.js +2 -16
  77. package/dist/components/menu/index.d.ts +2 -0
  78. package/dist/components/menu/inner.d.ts +2 -0
  79. package/dist/components/menu/menu.d.ts +4 -0
  80. package/dist/components/menu/on-demand.d.ts +9 -0
  81. package/dist/components/menu/types.d.ts +185 -1
  82. package/dist/components/navigation-bar/navigation-bar.d.ts +1 -0
  83. package/dist/components/navigation-bar/types.d.ts +12 -0
  84. package/dist/components/navigation-rail/constants.d.ts +2 -0
  85. package/dist/components/navigation-rail/navigation-rail.d.ts +1 -0
  86. package/dist/components/navigation-rail/types.d.ts +18 -0
  87. package/dist/components/progress/constants.d.ts +37 -0
  88. package/dist/components/progress/progress.d.ts +4 -0
  89. package/dist/components/progress/types.d.ts +136 -0
  90. package/dist/components/radios/constants.d.ts +14 -0
  91. package/dist/components/radios/radios.d.ts +4 -0
  92. package/dist/components/radios/types.d.ts +89 -0
  93. package/dist/components/search/constants.d.ts +34 -0
  94. package/dist/components/search/search.d.ts +4 -0
  95. package/dist/components/search/types.d.ts +109 -0
  96. package/dist/components/select/constants.d.ts +46 -0
  97. package/dist/components/select/features.js +9 -1
  98. package/dist/components/select/index.d.ts +2 -0
  99. package/dist/components/select/select.d.ts +4 -0
  100. package/dist/components/select/types.d.ts +95 -0
  101. package/dist/components/side-sheet/constants.d.ts +9 -0
  102. package/dist/components/side-sheet/side-sheet.d.ts +4 -0
  103. package/dist/components/side-sheet/types.d.ts +51 -0
  104. package/dist/components/slider/constants.d.ts +62 -0
  105. package/dist/components/slider/slider.d.ts +4 -0
  106. package/dist/components/slider/types.d.ts +78 -0
  107. package/dist/components/snackbar/constants.d.ts +37 -0
  108. package/dist/components/snackbar/snackbar.d.ts +5 -0
  109. package/dist/components/snackbar/types.d.ts +67 -0
  110. package/dist/components/split-button/api.js +13 -3
  111. package/dist/components/split-button/constants.d.ts +13 -0
  112. package/dist/components/split-button/split-button.d.ts +4 -0
  113. package/dist/components/split-button/types.d.ts +50 -0
  114. package/dist/components/switch/constants.d.ts +34 -0
  115. package/dist/components/switch/switch.d.ts +4 -0
  116. package/dist/components/switch/types.d.ts +55 -0
  117. package/dist/components/tabs/constants.d.ts +49 -0
  118. package/dist/components/tabs/indicator.d.ts +22 -0
  119. package/dist/components/tabs/responsive.d.ts +17 -0
  120. package/dist/components/tabs/tab.d.ts +5 -0
  121. package/dist/components/tabs/tabs.d.ts +4 -0
  122. package/dist/components/tabs/types.d.ts +170 -0
  123. package/dist/components/tabs/utils.d.ts +24 -0
  124. package/dist/components/text-field/constants.d.ts +61 -0
  125. package/dist/components/text-field/features/trailing-icon.d.ts +25 -0
  126. package/dist/components/text-field/text-field.d.ts +4 -0
  127. package/dist/components/text-field/types.d.ts +84 -0
  128. package/dist/components/timepicker/constants.d.ts +61 -0
  129. package/dist/components/timepicker/types.d.ts +145 -0
  130. package/dist/components/toolbar/constants.d.ts +8 -0
  131. package/dist/components/toolbar/toolbar.d.ts +4 -0
  132. package/dist/components/toolbar/types.d.ts +75 -0
  133. package/dist/components/tooltip/constants.d.ts +43 -0
  134. package/dist/components/tooltip/tooltip.d.ts +4 -0
  135. package/dist/components/tooltip/types.d.ts +78 -0
  136. package/dist/components/top-app-bar/constants.d.ts +29 -0
  137. package/dist/components/top-app-bar/top-app-bar.d.ts +4 -0
  138. package/dist/components/top-app-bar/types.d.ts +55 -0
  139. package/dist/core/canvas/animation.d.ts +6 -0
  140. package/dist/core/canvas/drawing.d.ts +47 -0
  141. package/dist/core/canvas/index.d.ts +1 -0
  142. package/dist/core/canvas/resize.d.ts +7 -0
  143. package/dist/core/canvas/utils.d.ts +39 -0
  144. package/dist/core/compose/base.d.ts +9 -0
  145. package/dist/core/compose/cleanup.d.ts +2 -0
  146. package/dist/core/compose/component.d.ts +13 -0
  147. package/dist/core/compose/features/badge.d.ts +10 -0
  148. package/dist/core/compose/features/checkable.d.ts +13 -0
  149. package/dist/core/compose/features/debounce.d.ts +19 -0
  150. package/dist/core/compose/features/disabled.d.ts +11 -0
  151. package/dist/core/compose/features/events.d.ts +19 -0
  152. package/dist/core/compose/features/icon.d.ts +20 -0
  153. package/dist/core/compose/features/input.d.ts +31 -0
  154. package/dist/core/compose/features/lifecycle.d.ts +16 -0
  155. package/dist/core/compose/features/position.d.ts +13 -0
  156. package/dist/core/compose/features/ripple.d.ts +17 -0
  157. package/dist/core/compose/features/size.d.ts +5 -0
  158. package/dist/core/compose/features/style.d.ts +5 -0
  159. package/dist/core/compose/features/text.d.ts +20 -0
  160. package/dist/core/compose/features/textinput.d.ts +39 -0
  161. package/dist/core/compose/features/textlabel.d.ts +18 -0
  162. package/dist/core/compose/features/throttle.d.ts +18 -0
  163. package/dist/core/compose/features/track.d.ts +12 -0
  164. package/dist/core/compose/features/variant.d.ts +5 -0
  165. package/dist/core/compose/features/withEvents.d.ts +12 -0
  166. package/dist/core/compose/pipe.d.ts +12 -0
  167. package/dist/core/compose/utils/type-guards.d.ts +5 -0
  168. package/dist/core/config/component.d.ts +17 -0
  169. package/dist/core/config/global.d.ts +15 -0
  170. package/dist/core/config.d.ts +34 -0
  171. package/dist/core/dom/attributes.d.ts +25 -0
  172. package/dist/core/dom/classes.d.ts +24 -0
  173. package/dist/core/dom/create.d.ts +47 -0
  174. package/dist/core/dom/events.d.ts +26 -0
  175. package/dist/core/dom/focus.d.ts +11 -0
  176. package/dist/core/dom/html.d.ts +6 -0
  177. package/dist/core/dom/layer.d.ts +36 -0
  178. package/dist/core/dom/roving.d.ts +7 -0
  179. package/dist/core/navigation/destinations.d.ts +10 -0
  180. package/dist/core/shapes/cubic.d.ts +8 -0
  181. package/dist/core/shapes/material.d.ts +45 -0
  182. package/dist/core/shapes/polygon.d.ts +11 -0
  183. package/dist/core/state/emitter.d.ts +19 -0
  184. package/dist/core/state/events.d.ts +17 -0
  185. package/dist/core/state/store.d.ts +40 -0
  186. package/dist/core/theme/shape.d.ts +3 -0
  187. package/dist/core/theme/tokens.d.ts +6 -0
  188. package/dist/core/utils/background.d.ts +7 -0
  189. package/dist/core/utils/color.d.ts +5 -0
  190. package/dist/core/utils/index.d.ts +9 -0
  191. package/dist/core/utils/mobile.d.ts +10 -0
  192. package/dist/core/utils/object.d.ts +9 -0
  193. package/dist/core/utils/performance.d.ts +20 -0
  194. package/dist/core/utils/theme.d.ts +8 -0
  195. package/dist/core/utils/url.d.ts +3 -0
  196. package/dist/elements/adapter.d.ts +24 -0
  197. package/dist/elements/badge.d.ts +4 -0
  198. package/dist/elements/bottom-app-bar.d.ts +4 -0
  199. package/dist/elements/bottom-sheet.d.ts +6 -0
  200. package/dist/elements/button-group.d.ts +8 -0
  201. package/dist/elements/button.d.ts +5 -0
  202. package/dist/elements/card.d.ts +4 -0
  203. package/dist/elements/carousel.d.ts +5 -0
  204. package/dist/elements/checkbox.d.ts +4 -0
  205. package/dist/elements/chips.d.ts +9 -0
  206. package/dist/elements/css/menu.css +1 -1
  207. package/dist/elements/css/menu.js +1 -1
  208. package/dist/elements/datepicker.d.ts +6 -0
  209. package/dist/elements/define.d.ts +48 -0
  210. package/dist/elements/dialog.d.ts +5 -0
  211. package/dist/elements/divider.d.ts +4 -0
  212. package/dist/elements/drawer.d.ts +6 -0
  213. package/dist/elements/extended-fab.d.ts +6 -0
  214. package/dist/elements/fab-menu.d.ts +10 -0
  215. package/dist/elements/fab.d.ts +6 -0
  216. package/dist/elements/icon-button.d.ts +6 -0
  217. package/dist/elements/index.d.ts +4 -0
  218. package/dist/elements/list.d.ts +8 -0
  219. package/dist/elements/loading-indicator.d.ts +4 -0
  220. package/dist/elements/menu.d.ts +12 -0
  221. package/dist/elements/navigation-bar.d.ts +6 -0
  222. package/dist/elements/navigation-rail.d.ts +10 -0
  223. package/dist/elements/preupgrade/badge.css +1 -1
  224. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  225. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  226. package/dist/elements/preupgrade/button-group.css +1 -1
  227. package/dist/elements/preupgrade/button.css +1 -1
  228. package/dist/elements/preupgrade/card.css +1 -1
  229. package/dist/elements/preupgrade/carousel.css +1 -1
  230. package/dist/elements/preupgrade/checkbox.css +1 -1
  231. package/dist/elements/preupgrade/chips.css +1 -1
  232. package/dist/elements/preupgrade/datepicker.css +1 -1
  233. package/dist/elements/preupgrade/dialog.css +1 -1
  234. package/dist/elements/preupgrade/divider.css +1 -1
  235. package/dist/elements/preupgrade/drawer.css +1 -1
  236. package/dist/elements/preupgrade/extended-fab.css +1 -1
  237. package/dist/elements/preupgrade/fab-menu.css +1 -1
  238. package/dist/elements/preupgrade/fab.css +1 -1
  239. package/dist/elements/preupgrade/icon-button.css +1 -1
  240. package/dist/elements/preupgrade/list.css +1 -1
  241. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  242. package/dist/elements/preupgrade/menu.css +1 -1
  243. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  244. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  245. package/dist/elements/preupgrade/progress.css +1 -1
  246. package/dist/elements/preupgrade/radios.css +1 -1
  247. package/dist/elements/preupgrade/search.css +1 -1
  248. package/dist/elements/preupgrade/select.css +1 -1
  249. package/dist/elements/preupgrade/side-sheet.css +1 -1
  250. package/dist/elements/preupgrade/slider.css +1 -1
  251. package/dist/elements/preupgrade/snackbar.css +1 -1
  252. package/dist/elements/preupgrade/split-button.css +1 -1
  253. package/dist/elements/preupgrade/switch.css +1 -1
  254. package/dist/elements/preupgrade/tabs.css +1 -1
  255. package/dist/elements/preupgrade/text-field.css +1 -1
  256. package/dist/elements/preupgrade/timepicker.css +1 -1
  257. package/dist/elements/preupgrade/toolbar.css +1 -1
  258. package/dist/elements/preupgrade/tooltip.css +1 -1
  259. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  260. package/dist/elements/preupgrade.css +1 -1
  261. package/dist/elements/progress.d.ts +4 -0
  262. package/dist/elements/radios.d.ts +5 -0
  263. package/dist/elements/search.d.ts +15 -0
  264. package/dist/elements/select.d.ts +6 -0
  265. package/dist/elements/side-sheet.d.ts +5 -0
  266. package/dist/elements/slider.d.ts +7 -0
  267. package/dist/elements/snackbar.d.ts +4 -0
  268. package/dist/elements/split-button.d.ts +8 -0
  269. package/dist/elements/styles.d.ts +11 -0
  270. package/dist/elements/switch.d.ts +5 -0
  271. package/dist/elements/tabs.d.ts +6 -0
  272. package/dist/elements/text-field.d.ts +9 -0
  273. package/dist/elements/timepicker.d.ts +9 -0
  274. package/dist/elements/toolbar.d.ts +4 -0
  275. package/dist/elements/tooltip.d.ts +4 -0
  276. package/dist/elements/top-app-bar.d.ts +4 -0
  277. package/dist/index.d.ts +1 -0
  278. package/dist/react/create.d.ts +15 -0
  279. package/dist/react/index.d.ts +1 -0
  280. package/dist/react/jsx.d.ts +3 -0
  281. package/dist/solid/create.d.ts +16 -0
  282. package/dist/solid/index.d.ts +1 -0
  283. package/dist/solid/jsx.d.ts +4 -0
  284. package/dist/ssr/index.d.ts +3 -0
  285. package/dist/ssr/solid.d.ts +1 -0
  286. package/dist/ssr/svelte.d.ts +1 -0
  287. package/dist/ssr/vue.d.ts +1 -0
  288. package/dist/styles/badge.css +1 -1
  289. package/dist/styles/base-lite.css +2 -2
  290. package/dist/styles/base.css +2 -2
  291. package/dist/styles/bottom-app-bar.css +1 -1
  292. package/dist/styles/bottom-sheet.css +1 -1
  293. package/dist/styles/button-group.css +1 -1
  294. package/dist/styles/button.css +1 -1
  295. package/dist/styles/card.css +1 -1
  296. package/dist/styles/carousel.css +1 -1
  297. package/dist/styles/checkbox.css +1 -1
  298. package/dist/styles/chips.css +1 -1
  299. package/dist/styles/contrast.css +2 -2
  300. package/dist/styles/datepicker.css +1 -1
  301. package/dist/styles/dialog.css +1 -1
  302. package/dist/styles/divider.css +1 -1
  303. package/dist/styles/drawer.css +1 -1
  304. package/dist/styles/extended-fab.css +1 -1
  305. package/dist/styles/fab-menu.css +1 -1
  306. package/dist/styles/fab.css +1 -1
  307. package/dist/styles/icon-button.css +1 -1
  308. package/dist/styles/list.css +1 -1
  309. package/dist/styles/loading-indicator.css +1 -1
  310. package/dist/styles/menu.css +2 -2
  311. package/dist/styles/navigation-bar.css +1 -1
  312. package/dist/styles/navigation-rail.css +1 -1
  313. package/dist/styles/progress.css +1 -1
  314. package/dist/styles/radios.css +1 -1
  315. package/dist/styles/search.css +1 -1
  316. package/dist/styles/select.css +1 -1
  317. package/dist/styles/side-sheet.css +1 -1
  318. package/dist/styles/slider.css +1 -1
  319. package/dist/styles/snackbar.css +1 -1
  320. package/dist/styles/split-button.css +1 -1
  321. package/dist/styles/switch.css +1 -1
  322. package/dist/styles/tabs.css +1 -1
  323. package/dist/styles/text-field.css +1 -1
  324. package/dist/styles/timepicker.css +1 -1
  325. package/dist/styles/toolbar.css +1 -1
  326. package/dist/styles/tooltip.css +1 -1
  327. package/dist/styles/top-app-bar.css +1 -1
  328. package/dist/styles/typography.css +1 -1
  329. package/dist/styles/utilities.css +1 -1
  330. package/dist/styles.css +2 -2
  331. package/dist/svelte/runtime.d.ts +21 -0
  332. package/dist/theme/image.d.ts +4 -0
  333. package/dist/theme/image.js +5 -0
  334. package/dist/theme/index.d.ts +43 -0
  335. package/dist/theme/index.js +32 -0
  336. package/dist/theme/roles.js +68 -0
  337. package/dist/theme/variants.d.ts +15 -0
  338. package/dist/theme/variants.js +17 -0
  339. package/dist/theme/vendor/contrast/contrast.js +72 -0
  340. package/dist/theme/vendor/dislike/dislike_analyzer.js +31 -0
  341. package/dist/theme/vendor/dynamiccolor/color_spec_2021.d.ts +64 -0
  342. package/dist/theme/vendor/dynamiccolor/color_spec_2021.js +663 -0
  343. package/dist/theme/vendor/dynamiccolor/contrast_curve.js +42 -0
  344. package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +63 -0
  345. package/dist/theme/vendor/dynamiccolor/dynamic_color.js +264 -0
  346. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +100 -0
  347. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.js +418 -0
  348. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.d.ts +125 -0
  349. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.js +311 -0
  350. package/dist/theme/vendor/dynamiccolor/tone_delta_pair.js +27 -0
  351. package/dist/theme/vendor/dynamiccolor/variant.js +28 -0
  352. package/dist/theme/vendor/hct/cam16.js +249 -0
  353. package/dist/theme/vendor/hct/hct.d.ts +32 -0
  354. package/dist/theme/vendor/hct/hct.js +86 -0
  355. package/dist/theme/vendor/hct/hct_solver.js +390 -0
  356. package/dist/theme/vendor/hct/viewing_conditions.js +73 -0
  357. package/dist/theme/vendor/palettes/tonal_palette.js +114 -0
  358. package/dist/theme/vendor/quantize/lab_point_provider.js +31 -0
  359. package/dist/theme/vendor/quantize/quantizer_celebi.js +25 -0
  360. package/dist/theme/vendor/quantize/quantizer_map.js +31 -0
  361. package/dist/theme/vendor/quantize/quantizer_wsmeans.js +178 -0
  362. package/dist/theme/vendor/quantize/quantizer_wu.js +342 -0
  363. package/dist/theme/vendor/scheme/scheme_content.js +30 -0
  364. package/dist/theme/vendor/scheme/scheme_expressive.js +30 -0
  365. package/dist/theme/vendor/scheme/scheme_fidelity.js +30 -0
  366. package/dist/theme/vendor/scheme/scheme_monochrome.js +30 -0
  367. package/dist/theme/vendor/scheme/scheme_neutral.js +30 -0
  368. package/dist/theme/vendor/scheme/scheme_tonal_spot.js +30 -0
  369. package/dist/theme/vendor/scheme/scheme_vibrant.js +30 -0
  370. package/dist/theme/vendor/score/score.js +100 -0
  371. package/dist/theme/vendor/temperature/temperature_cache.js +198 -0
  372. package/dist/theme/vendor/utils/color_utils.js +173 -0
  373. package/dist/theme/vendor/utils/image_utils.js +72 -0
  374. package/dist/theme/vendor/utils/math_utils.js +75 -0
  375. package/dist/theme/vendor/utils/string_utils.js +61 -0
  376. package/dist/themes/autumn-contrast.css +2 -2
  377. package/dist/themes/autumn.css +2 -2
  378. package/dist/themes/baseline-contrast.css +2 -2
  379. package/dist/themes/baseline.css +2 -2
  380. package/dist/themes/brownbeige-contrast.css +2 -2
  381. package/dist/themes/brownbeige.css +2 -2
  382. package/dist/themes/content-contrast.css +2 -2
  383. package/dist/themes/content.css +2 -2
  384. package/dist/themes/desert-contrast.css +2 -2
  385. package/dist/themes/desert.css +2 -2
  386. package/dist/themes/expressive-contrast.css +2 -2
  387. package/dist/themes/expressive.css +2 -2
  388. package/dist/themes/fidelity-contrast.css +2 -2
  389. package/dist/themes/fidelity.css +2 -2
  390. package/dist/themes/forest-contrast.css +2 -2
  391. package/dist/themes/forest.css +2 -2
  392. package/dist/themes/fruit-salad-contrast.css +2 -2
  393. package/dist/themes/fruit-salad.css +2 -2
  394. package/dist/themes/highcontrast-contrast.css +2 -2
  395. package/dist/themes/highcontrast.css +2 -2
  396. package/dist/themes/monochrome-contrast.css +2 -2
  397. package/dist/themes/monochrome.css +2 -2
  398. package/dist/themes/neutral-contrast.css +2 -2
  399. package/dist/themes/neutral.css +2 -2
  400. package/dist/themes/ocean-contrast.css +2 -2
  401. package/dist/themes/ocean.css +2 -2
  402. package/dist/themes/rainbow-contrast.css +2 -2
  403. package/dist/themes/rainbow.css +2 -2
  404. package/dist/themes/sageivory-contrast.css +2 -2
  405. package/dist/themes/sageivory.css +2 -2
  406. package/dist/themes/spring-contrast.css +2 -2
  407. package/dist/themes/spring.css +2 -2
  408. package/dist/themes/summer-contrast.css +2 -2
  409. package/dist/themes/summer.css +2 -2
  410. package/dist/themes/sunset-contrast.css +2 -2
  411. package/dist/themes/sunset.css +2 -2
  412. package/dist/themes/tealcaramel-contrast.css +2 -2
  413. package/dist/themes/tealcaramel.css +2 -2
  414. package/dist/themes/vibrant-contrast.css +2 -2
  415. package/dist/themes/vibrant.css +2 -2
  416. package/dist/vue/create.d.ts +18 -0
  417. package/dist/vue/index.d.ts +1 -0
  418. package/package.json +14 -1
  419. package/src/styles/components/_menu.scss +14 -1
  420. package/src/styles/themes/_autumn.scss +20 -2
  421. package/src/styles/themes/_base-theme.scss +34 -24
  422. package/src/styles/themes/_baseline.scss +18 -0
  423. package/src/styles/themes/_brownbeige.scss +30 -2
  424. package/src/styles/themes/_content.scss +30 -2
  425. package/src/styles/themes/_desert.scss +30 -2
  426. package/src/styles/themes/_expressive.scss +30 -2
  427. package/src/styles/themes/_fidelity.scss +30 -2
  428. package/src/styles/themes/_forest.scss +20 -2
  429. package/src/styles/themes/_fruit-salad.scss +30 -2
  430. package/src/styles/themes/_highcontrast.scss +21 -2
  431. package/src/styles/themes/_monochrome.scss +30 -2
  432. package/src/styles/themes/_neutral.scss +30 -2
  433. package/src/styles/themes/_ocean.scss +20 -2
  434. package/src/styles/themes/_rainbow.scss +30 -2
  435. package/src/styles/themes/_sageivory.scss +30 -2
  436. package/src/styles/themes/_spring.scss +20 -2
  437. package/src/styles/themes/_summer.scss +30 -2
  438. package/src/styles/themes/_sunset.scss +20 -2
  439. package/src/styles/themes/_tealcaramel.scss +30 -2
  440. package/src/styles/themes/_vibrant.scss +30 -2
package/NOTICE ADDED
@@ -0,0 +1,223 @@
1
+ material
2
+ Icon glyphs (Material Symbols and Material Icons)
3
+
4
+ The package embeds SVG path data from Material Symbols and Material Icons
5
+ (https://github.com/google/material-design-icons), Copyright Google LLC,
6
+ licensed under the Apache License, Version 2.0. The glyphs ship compiled into
7
+ the JavaScript under dist/, and one ships as a CSS mask data URI in the menu
8
+ stylesheet. In the repository they are declared in:
9
+
10
+ - src/components/chips/chip/chip.ts
11
+ - src/components/datepicker/constants.ts
12
+ - src/components/fab-menu/config.ts
13
+ - src/components/navigation-rail/constants.ts
14
+ - src/components/search/constants.ts
15
+ - src/components/select/constants.ts
16
+ - src/components/select/features.ts
17
+ - src/components/side-sheet/features/structure.ts
18
+ - src/components/snackbar/constants.ts
19
+ - src/components/split-button/constants.ts
20
+ - src/components/toolbar/config.ts
21
+ - src/styles/components/_menu.scss
22
+
23
+ Runtime colour (material/theme)
24
+
25
+ The files under src/theme/vendor are a copy of material-color-utilities
26
+ (https://github.com/material-foundation/material-color-utilities),
27
+ Copyright 2021 Google LLC, licensed under the Apache License, Version 2.0.
28
+ Each copied file keeps its original copyright and licence header.
29
+
30
+ The full licence text follows.
31
+
32
+
33
+
34
+ Apache License
35
+ Version 2.0, January 2004
36
+ http://www.apache.org/licenses/
37
+
38
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
39
+
40
+ 1. Definitions.
41
+
42
+ "License" shall mean the terms and conditions for use, reproduction,
43
+ and distribution as defined by Sections 1 through 9 of this document.
44
+
45
+ "Licensor" shall mean the copyright owner or entity authorized by
46
+ the copyright owner that is granting the License.
47
+
48
+ "Legal Entity" shall mean the union of the acting entity and all
49
+ other entities that control, are controlled by, or are under common
50
+ control with that entity. For the purposes of this definition,
51
+ "control" means (i) the power, direct or indirect, to cause the
52
+ direction or management of such entity, whether by contract or
53
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
54
+ outstanding shares, or (iii) beneficial ownership of such entity.
55
+
56
+ "You" (or "Your") shall mean an individual or Legal Entity
57
+ exercising permissions granted by this License.
58
+
59
+ "Source" form shall mean the preferred form for making modifications,
60
+ including but not limited to software source code, documentation
61
+ source, and configuration files.
62
+
63
+ "Object" form shall mean any form resulting from mechanical
64
+ transformation or translation of a Source form, including but
65
+ not limited to compiled object code, generated documentation,
66
+ and conversions to other media types.
67
+
68
+ "Work" shall mean the work of authorship, whether in Source or
69
+ Object form, made available under the License, as indicated by a
70
+ copyright notice that is included in or attached to the work
71
+ (an example is provided in the Appendix below).
72
+
73
+ "Derivative Works" shall mean any work, whether in Source or Object
74
+ form, that is based on (or derived from) the Work and for which the
75
+ editorial revisions, annotations, elaborations, or other modifications
76
+ represent, as a whole, an original work of authorship. For the purposes
77
+ of this License, Derivative Works shall not include works that remain
78
+ separable from, or merely link (or bind by name) to the interfaces of,
79
+ the Work and Derivative Works thereof.
80
+
81
+ "Contribution" shall mean any work of authorship, including
82
+ the original version of the Work and any modifications or additions
83
+ to that Work or Derivative Works thereof, that is intentionally
84
+ submitted to Licensor for inclusion in the Work by the copyright owner
85
+ or by an individual or Legal Entity authorized to submit on behalf of
86
+ the copyright owner. For the purposes of this definition, "submitted"
87
+ means any form of electronic, verbal, or written communication sent
88
+ to the Licensor or its representatives, including but not limited to
89
+ communication on electronic mailing lists, source code control systems,
90
+ and issue tracking systems that are managed by, or on behalf of, the
91
+ Licensor for the purpose of discussing and improving the Work, but
92
+ excluding communication that is conspicuously marked or otherwise
93
+ designated in writing by the copyright owner as "Not a Contribution."
94
+
95
+ "Contributor" shall mean Licensor and any individual or Legal Entity
96
+ on behalf of whom a Contribution has been received by Licensor and
97
+ subsequently incorporated within the Work.
98
+
99
+ 2. Grant of Copyright License. Subject to the terms and conditions of
100
+ this License, each Contributor hereby grants to You a perpetual,
101
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
102
+ copyright license to reproduce, prepare Derivative Works of,
103
+ publicly display, publicly perform, sublicense, and distribute the
104
+ Work and such Derivative Works in Source or Object form.
105
+
106
+ 3. Grant of Patent License. Subject to the terms and conditions of
107
+ this License, each Contributor hereby grants to You a perpetual,
108
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
109
+ (except as stated in this section) patent license to make, have made,
110
+ use, offer to sell, sell, import, and otherwise transfer the Work,
111
+ where such license applies only to those patent claims licensable
112
+ by such Contributor that are necessarily infringed by their
113
+ Contribution(s) alone or by combination of their Contribution(s)
114
+ with the Work to which such Contribution(s) was submitted. If You
115
+ institute patent litigation against any entity (including a
116
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
117
+ or a Contribution incorporated within the Work constitutes direct
118
+ or contributory patent infringement, then any patent licenses
119
+ granted to You under this License for that Work shall terminate
120
+ as of the date such litigation is filed.
121
+
122
+ 4. Redistribution. You may reproduce and distribute copies of the
123
+ Work or Derivative Works thereof in any medium, with or without
124
+ modifications, and in Source or Object form, provided that You
125
+ meet the following conditions:
126
+
127
+ (a) You must give any other recipients of the Work or
128
+ Derivative Works a copy of this License; and
129
+
130
+ (b) You must cause any modified files to carry prominent notices
131
+ stating that You changed the files; and
132
+
133
+ (c) You must retain, in the Source form of any Derivative Works
134
+ that You distribute, all copyright, patent, trademark, and
135
+ attribution notices from the Source form of the Work,
136
+ excluding those notices that do not pertain to any part of
137
+ the Derivative Works; and
138
+
139
+ (d) If the Work includes a "NOTICE" text file as part of its
140
+ distribution, then any Derivative Works that You distribute must
141
+ include a readable copy of the attribution notices contained
142
+ within such NOTICE file, excluding those notices that do not
143
+ pertain to any part of the Derivative Works, in at least one
144
+ of the following places: within a NOTICE text file distributed
145
+ as part of the Derivative Works; within the Source form or
146
+ documentation, if provided along with the Derivative Works; or,
147
+ within a display generated by the Derivative Works, if and
148
+ wherever such third-party notices normally appear. The contents
149
+ of the NOTICE file are for informational purposes only and
150
+ do not modify the License. You may add Your own attribution
151
+ notices within Derivative Works that You distribute, alongside
152
+ or as an addendum to the NOTICE text from the Work, provided
153
+ that such additional attribution notices cannot be construed
154
+ as modifying the License.
155
+
156
+ You may add Your own copyright statement to Your modifications and
157
+ may provide additional or different license terms and conditions
158
+ for use, reproduction, or distribution of Your modifications, or
159
+ for any such Derivative Works as a whole, provided Your use,
160
+ reproduction, and distribution of the Work otherwise complies with
161
+ the conditions stated in this License.
162
+
163
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
164
+ any Contribution intentionally submitted for inclusion in the Work
165
+ by You to the Licensor shall be under the terms and conditions of
166
+ this License, without any additional terms or conditions.
167
+ Notwithstanding the above, nothing herein shall supersede or modify
168
+ the terms of any separate license agreement you may have executed
169
+ with Licensor regarding such Contributions.
170
+
171
+ 6. Trademarks. This License does not grant permission to use the trade
172
+ names, trademarks, service marks, or product names of the Licensor,
173
+ except as required for reasonable and customary use in describing the
174
+ origin of the Work and reproducing the content of the NOTICE file.
175
+
176
+ 7. Disclaimer of Warranty. Unless required by applicable law or
177
+ agreed to in writing, Licensor provides the Work (and each
178
+ Contributor provides its Contributions) on an "AS IS" BASIS,
179
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
180
+ implied, including, without limitation, any warranties or conditions
181
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
182
+ PARTICULAR PURPOSE. You are solely responsible for determining the
183
+ appropriateness of using or redistributing the Work and assume any
184
+ risks associated with Your exercise of permissions under this License.
185
+
186
+ 8. Limitation of Liability. In no event and under no legal theory,
187
+ whether in tort (including negligence), contract, or otherwise,
188
+ unless required by applicable law (such as deliberate and grossly
189
+ negligent acts) or agreed to in writing, shall any Contributor be
190
+ liable to You for damages, including any direct, indirect, special,
191
+ incidental, or consequential damages of any character arising as a
192
+ result of this License or out of the use or inability to use the
193
+ Work (including but not limited to damages for loss of goodwill,
194
+ work stoppage, computer failure or malfunction, or any and all
195
+ other commercial damages or losses), even if such Contributor
196
+ has been advised of the possibility of such damages.
197
+
198
+ 9. Accepting Warranty or Additional Liability. While redistributing
199
+ the Work or Derivative Works thereof, You may choose to offer,
200
+ and charge a fee for, acceptance of support, warranty, indemnity,
201
+ or other liability obligations and/or rights consistent with this
202
+ License. However, in accepting such obligations, You may act only
203
+ on Your own behalf and on Your sole responsibility, not on behalf
204
+ of any other Contributor, and only if You agree to indemnify,
205
+ defend, and hold each Contributor harmless for any liability
206
+ incurred by, or claims asserted against, such Contributor by reason
207
+ of your accepting any such warranty or additional liability.
208
+
209
+ END OF TERMS AND CONDITIONS
210
+
211
+ Copyright Google LLC
212
+
213
+ Licensed under the Apache License, Version 2.0 (the "License");
214
+ you may not use this file except in compliance with the License.
215
+ You may obtain a copy of the License at
216
+
217
+ http://www.apache.org/licenses/LICENSE-2.0
218
+
219
+ Unless required by applicable law or agreed to in writing, software
220
+ distributed under the License is distributed on an "AS IS" BASIS,
221
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
222
+ See the License for the specific language governing permissions and
223
+ limitations under the License.
package/README.md CHANGED
@@ -94,11 +94,11 @@ 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 |
98
- | `material/styles/base` | 2.9 kB |
97
+ | Everything the root exports (`export * from 'material'`), without code splitting | 127.3 kB |
98
+ | `material/styles/base` | 3.0 kB |
99
99
  | `material/styles/base-lite` | 1.6 kB |
100
- | `material/styles/base` and `material/styles/button` | 5.1 kB |
101
- | `material/styles`, the full stylesheet | 57.6 kB |
100
+ | `material/styles/base` and `material/styles/button` | 5.2 kB |
101
+ | `material/styles`, the full stylesheet | 58.7 kB |
102
102
  <!-- /sizes -->
103
103
 
104
104
  `material` publishes ESM only, so bundlers drop what you do not import. Each component's page on [md3.io/components](https://md3.io/components/) gives its size.
@@ -124,3 +124,5 @@ Versions of `material` up to 1.0.4 are an earlier, separate library (GPL-3), sti
124
124
  ## License
125
125
 
126
126
  MIT, see [LICENSE](https://github.com/floor/material/blob/main/LICENSE).
127
+
128
+ Third-party notices: the package ships Material Symbols and Material Icons glyphs, copyright Google LLC, under the Apache License 2.0; [NOTICE](https://github.com/floor/material/blob/main/NOTICE) includes the licence text and lists the files that declare them.
@@ -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;