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
@@ -1,18 +1,22 @@
1
+ /** Toolbar variants (m3.material.io toolbars) */
1
2
  export declare const TOOLBAR_VARIANTS: {
2
3
  readonly DOCKED: "docked";
3
4
  readonly FLOATING: "floating";
4
5
  };
5
6
  export type ToolbarVariant = (typeof TOOLBAR_VARIANTS)[keyof typeof TOOLBAR_VARIANTS];
7
+ /** Toolbar colours - standard: surface container, low emphasis - vibrant: primary container, high emphasis (e.g. */
6
8
  export declare const TOOLBAR_COLORS: {
7
9
  readonly STANDARD: "standard";
8
10
  readonly VIBRANT: "vibrant";
9
11
  };
10
12
  export type ToolbarColor = (typeof TOOLBAR_COLORS)[keyof typeof TOOLBAR_COLORS];
13
+ /** Floating toolbar layouts. */
11
14
  export declare const TOOLBAR_ORIENTATIONS: {
12
15
  readonly HORIZONTAL: "horizontal";
13
16
  readonly VERTICAL: "vertical";
14
17
  };
15
18
  export type ToolbarOrientation = (typeof TOOLBAR_ORIENTATIONS)[keyof typeof TOOLBAR_ORIENTATIONS];
19
+ /** Where the toolbar sits in its positioned container. */
16
20
  export declare const TOOLBAR_PLACEMENTS: {
17
21
  readonly NONE: "none";
18
22
  readonly BOTTOM: "bottom";
@@ -21,17 +25,21 @@ export declare const TOOLBAR_PLACEMENTS: {
21
25
  readonly END: "end";
22
26
  };
23
27
  export type ToolbarPlacement = (typeof TOOLBAR_PLACEMENTS)[keyof typeof TOOLBAR_PLACEMENTS];
28
+ /** How a docked toolbar lays out its items: spread evenly across the width (compact windows), or centred 32dp apart (medium windows and up). */
24
29
  export declare const TOOLBAR_ARRANGEMENTS: {
25
30
  readonly SPREAD: "spread";
26
31
  readonly CENTER: "center";
27
32
  };
28
33
  export type ToolbarArrangement = (typeof TOOLBAR_ARRANGEMENTS)[keyof typeof TOOLBAR_ARRANGEMENTS];
34
+ /** Scroll behaviours: stay on screen, or leave it while scrolling forward. */
29
35
  export declare const TOOLBAR_SCROLL_BEHAVIORS: {
30
36
  readonly NONE: "none";
31
37
  readonly EXIT: "exit";
32
38
  };
33
39
  export type ToolbarScrollBehavior = (typeof TOOLBAR_SCROLL_BEHAVIORS)[keyof typeof TOOLBAR_SCROLL_BEHAVIORS];
40
+ /** Which side of a floating toolbar its FAB sits on, along the toolbar. */
34
41
  export type ToolbarFabPosition = "start" | "end";
42
+ /** The scroll distance, in px, that hides or shows the toolbar (Compose FloatingToolbarDefaults.ScrollDistanceThreshold, 40dp). */
35
43
  export declare const TOOLBAR_SCROLL_THRESHOLD = 40;
36
44
  export declare const TOOLBAR_EVENTS: {
37
45
  readonly SHOW: "show";
@@ -1,4 +1,8 @@
1
1
  import type { ToolbarConfig, ToolbarComponent } from "./types.js";
2
+ /**
3
+ * Creates a toolbar: M3 Expressive's docked and floating toolbars.
4
+ * @param config
5
+ */
2
6
  declare const createToolbar: (config?: ToolbarConfig) => ToolbarComponent;
3
7
  export default createToolbar;
4
8
  export { createToolbar };
@@ -3,48 +3,123 @@ import type { BaseComponentConfig } from "../../core/config/component.js";
3
3
  import type { ButtonConfig } from "../button/types.js";
4
4
  import type { IconButtonConfig } from "../icon-button/types.js";
5
5
  import type { ToolbarVariant, ToolbarColor, ToolbarOrientation, ToolbarPlacement, ToolbarArrangement, ToolbarScrollBehavior, ToolbarFabPosition } from "./constants.js";
6
+ /** Anything the toolbar can hold that already exists: an element, or a component carrying one. */
6
7
  export type ToolbarElementItem = HTMLElement | {
7
8
  element: HTMLElement;
8
9
  };
10
+ /** A button the toolbar creates from its config: a label is what makes it a button. */
9
11
  export type ToolbarButtonItem = ButtonConfig & {
10
12
  text: string;
11
13
  };
14
+ /** An item of the toolbar: - an icon button config (`icon`, `ariaLabel`, and `toggle`, `selected`, `variant`, `width` as on createIconButton), created by the toolbar; - a button config with `text`, created by the toolbar; - an element or a component, such as a text field or a divider, added as it is. */
12
15
  export type ToolbarItem = ToolbarElementItem | ToolbarButtonItem | IconButtonConfig;
16
+ /** Configuration of a toolbar */
13
17
  export interface ToolbarConfig extends BaseComponentConfig {
18
+ /**
19
+ * Docked (full width, global actions) or floating (a pill, contextual actions)
20
+ * @default 'docked'
21
+ */
14
22
  variant?: ToolbarVariant | string;
23
+ /**
24
+ * Standard (surface container) or vibrant (primary container)
25
+ * @default 'standard'
26
+ */
15
27
  color?: ToolbarColor | string;
28
+ /**
29
+ * Layout of a floating toolbar.
30
+ * @default 'horizontal'
31
+ */
16
32
  orientation?: ToolbarOrientation | string;
33
+ /**
34
+ * Where the toolbar sits in its positioned container: `'none'` leaves it in the flow.
35
+ * @default 'none'
36
+ */
17
37
  placement?: ToolbarPlacement | string;
38
+ /**
39
+ * How a docked toolbar lays out its items: spread across the width, or centred 32dp apart
40
+ * @default 'spread'
41
+ */
18
42
  arrangement?: ToolbarArrangement | string;
43
+ /**
44
+ * Whether a floating toolbar casts a shadow (elevation level 1).
45
+ * @default true for floating
46
+ */
19
47
  elevated?: boolean;
48
+ /** The items, in order */
20
49
  items?: ToolbarItem[];
50
+ /** A FAB paired with a floating toolbar, outside its tab stop. */
21
51
  fab?: ToolbarElementItem;
52
+ /**
53
+ * Which end of the toolbar the FAB sits at, along its layout
54
+ * @default 'end'
55
+ */
22
56
  fabPosition?: ToolbarFabPosition | string;
57
+ /** Adds a trailing "more" icon button and calls this with it, to build the overflow menu the button opens: `(opener) => createMenu({ opener, items })`. */
23
58
  overflow?: (opener: HTMLElement) => unknown;
59
+ /**
60
+ * Icon of the overflow button
61
+ * @default a "more vertical" icon
62
+ */
24
63
  overflowIcon?: string;
64
+ /**
65
+ * Accessible name of the overflow button
66
+ * @default 'More options'
67
+ */
25
68
  overflowLabel?: string;
69
+ /**
70
+ * `'exit'` hides the toolbar while the content scrolls forward and shows it
71
+ * @default 'none'
72
+ */
26
73
  scrollBehavior?: ToolbarScrollBehavior | string;
74
+ /**
75
+ * What scrolls, for `scrollBehavior: 'exit'`
76
+ * @default window
77
+ */
27
78
  scrollTarget?: HTMLElement | Window;
79
+ /**
80
+ * The scroll distance, in px, that hides or shows the toolbar
81
+ * @default 40
82
+ */
28
83
  scrollThreshold?: number;
84
+ /**
85
+ * Accessible name of the toolbar
86
+ * @default 'Toolbar'
87
+ */
29
88
  ariaLabel?: string;
89
+ /** Additional CSS classes */
30
90
  class?: string;
31
91
  }
92
+ /** Events of a toolbar */
32
93
  export interface ToolbarEvents {
94
+ /** The toolbar came back on screen */
33
95
  show: () => void;
96
+ /** The toolbar left the screen */
34
97
  hide: () => void;
35
98
  }
99
+ /** A toolbar */
36
100
  export interface ToolbarComponent extends ElementComponent {
101
+ /** The element with the `toolbar` role, which holds the items */
37
102
  bar: HTMLElement;
103
+ /** The overflow button, when `overflow` is set */
38
104
  overflowButton: HTMLElement | null;
105
+ /** Adds an item at the end, before the overflow button */
39
106
  add(item: ToolbarItem): HTMLElement;
107
+ /** Removes an item; one the toolbar created is destroyed */
40
108
  remove(item: ToolbarElementItem): this;
109
+ /** The item elements, in order, without the overflow button */
41
110
  getItems(): HTMLElement[];
111
+ /** Brings the toolbar back on screen */
42
112
  show(): this;
113
+ /** Moves the toolbar off screen and out of the focus order */
43
114
  hide(): this;
115
+ /** Whether the toolbar is on screen */
44
116
  isVisible(): boolean;
117
+ /** Changes the colour */
45
118
  setColor(color: ToolbarColor | string): this;
119
+ /** The current colour */
46
120
  getColor(): ToolbarColor;
47
121
  on<K extends keyof ToolbarEvents>(event: K, handler: ToolbarEvents[K]): this;
48
122
  off<K extends keyof ToolbarEvents>(event: K, handler: ToolbarEvents[K]): this;
123
+ /** Removes the toolbar, its listeners and the items it created */
49
124
  destroy(): void;
50
125
  }
@@ -1,48 +1,91 @@
1
+ /** Tooltip positions */
1
2
  export declare const TOOLTIP_POSITIONS: {
3
+ /** Position above the target element */
2
4
  readonly TOP: "top";
5
+ /** Position to the right of the target element */
3
6
  readonly RIGHT: "right";
7
+ /** Position below the target element */
4
8
  readonly BOTTOM: "bottom";
9
+ /** Position to the left of the target element */
5
10
  readonly LEFT: "left";
11
+ /** Position above and aligned to the start of the target */
6
12
  readonly TOP_START: "top-start";
13
+ /** Position above and aligned to the end of the target */
7
14
  readonly TOP_END: "top-end";
15
+ /** Position to the right and aligned to the start of the target */
8
16
  readonly RIGHT_START: "right-start";
17
+ /** Position to the right and aligned to the end of the target */
9
18
  readonly RIGHT_END: "right-end";
19
+ /** Position below and aligned to the start of the target */
10
20
  readonly BOTTOM_START: "bottom-start";
21
+ /** Position below and aligned to the end of the target */
11
22
  readonly BOTTOM_END: "bottom-end";
23
+ /** Position to the left and aligned to the start of the target */
12
24
  readonly LEFT_START: "left-start";
25
+ /** Position to the left and aligned to the end of the target */
13
26
  readonly LEFT_END: "left-end";
14
27
  };
28
+ /** Tooltip visual variants */
15
29
  export declare const TOOLTIP_VARIANTS: {
30
+ /** Standard tooltip with background and arrow */
16
31
  readonly DEFAULT: "default";
32
+ /** Rich tooltip with support for HTML content */
17
33
  readonly RICH: "rich";
34
+ /** Plain text tooltip with minimal styling */
18
35
  readonly PLAIN: "plain";
19
36
  };
37
+ /** Tooltip events */
20
38
  export declare const TOOLTIP_EVENTS: {
39
+ /** Fired when tooltip becomes visible */
21
40
  readonly SHOW: "show";
41
+ /** Fired when tooltip becomes hidden */
22
42
  readonly HIDE: "hide";
43
+ /** Fired when mouse enters target element */
23
44
  readonly ENTER: "enter";
45
+ /** Fired when mouse leaves target element */
24
46
  readonly LEAVE: "leave";
25
47
  };
48
+ /** Default configuration values for tooltip */
26
49
  export declare const TOOLTIP_DEFAULTS: {
50
+ /** Default tooltip position */
27
51
  readonly POSITION: "bottom";
52
+ /** Default visual variant */
28
53
  readonly VARIANT: "default";
54
+ /** Default visibility state */
29
55
  readonly VISIBLE: false;
56
+ /** Default show delay in milliseconds */
30
57
  readonly SHOW_DELAY: 300;
58
+ /** Default hide delay in milliseconds */
31
59
  readonly HIDE_DELAY: 100;
60
+ /** Default offset from target in pixels */
32
61
  readonly OFFSET: 8;
62
+ /** Default arrow size in pixels */
33
63
  readonly ARROW_SIZE: 8;
64
+ /** Whether to show tooltip on focus by default */
34
65
  readonly SHOW_ON_FOCUS: true;
66
+ /** Whether to show tooltip on hover by default */
35
67
  readonly SHOW_ON_HOVER: true;
36
68
  };
69
+ /** CSS class names used by the tooltip component */
37
70
  export declare const TOOLTIP_CLASSES: {
71
+ /** Root element class */
38
72
  readonly ROOT: "tooltip";
73
+ /** Reserved slot; the current tooltip renders content directly in its root. */
39
74
  readonly CONTAINER: "tooltip__container";
75
+ /** Arrow element class */
40
76
  readonly ARROW: "tooltip__arrow";
77
+ /** Reserved slot; the current tooltip renders content directly in its root. */
41
78
  readonly CONTENT: "tooltip__content";
79
+ /** Visible state class */
42
80
  readonly VISIBLE: "tooltip--visible";
81
+ /** Hidden state class */
43
82
  readonly HIDDEN: "tooltip--hidden";
83
+ /** Default variant class */
44
84
  readonly DEFAULT: "tooltip--default";
85
+ /** Rich variant class */
45
86
  readonly RICH: "tooltip--rich";
87
+ /** Plain variant class */
46
88
  readonly PLAIN: "tooltip--plain";
89
+ /** Position prefix - append position name (e.g. */
47
90
  readonly POSITION_PREFIX: "tooltip--";
48
91
  };
@@ -1,3 +1,7 @@
1
1
  import { TooltipConfig, TooltipComponent } from "./types.js";
2
+ /**
3
+ * Creates a new Tooltip component
4
+ * @param config
5
+ */
2
6
  declare const createTooltip: (config?: TooltipConfig) => TooltipComponent;
3
7
  export default createTooltip;
@@ -1,3 +1,4 @@
1
+ /** Tooltip positions */
1
2
  export declare const TOOLTIP_POSITIONS: {
2
3
  readonly TOP: "top";
3
4
  readonly RIGHT: "right";
@@ -12,48 +13,125 @@ export declare const TOOLTIP_POSITIONS: {
12
13
  readonly LEFT_START: "left-start";
13
14
  readonly LEFT_END: "left-end";
14
15
  };
16
+ /** Tooltip variants */
15
17
  export declare const TOOLTIP_VARIANTS: {
16
18
  readonly DEFAULT: "default";
17
19
  readonly RICH: "rich";
18
20
  readonly PLAIN: "plain";
19
21
  };
22
+ /** Default values */
20
23
  export declare const DEFAULT_SHOW_DELAY = 300;
21
24
  export declare const DEFAULT_HIDE_DELAY = 100;
22
25
  export declare const DEFAULT_OFFSET = 8;
23
26
  export declare const DEFAULT_ARROW_SIZE = 8;
27
+ /** Available Tooltip variants */
24
28
  export type TooltipVariant = 'default' | 'rich' | 'plain';
29
+ /** Available Tooltip positions */
25
30
  export type TooltipPosition = typeof TOOLTIP_POSITIONS[keyof typeof TOOLTIP_POSITIONS];
31
+ /** Configuration interface for the Tooltip component */
26
32
  export interface TooltipConfig {
33
+ /** Tooltip content text */
27
34
  text?: string;
35
+ /** HTML element that triggers the tooltip */
28
36
  target?: HTMLElement;
37
+ /**
38
+ * Tooltip position relative to the target
39
+ * @default 'bottom'
40
+ */
29
41
  position?: TooltipPosition | string;
42
+ /**
43
+ * Tooltip variant that determines visual styling
44
+ * @default 'default'
45
+ */
30
46
  variant?: TooltipVariant | string;
47
+ /**
48
+ * Whether the tooltip is initially visible
49
+ * @default false
50
+ */
31
51
  visible?: boolean;
52
+ /**
53
+ * Show delay in milliseconds
54
+ * @default 300
55
+ */
32
56
  showDelay?: number;
57
+ /**
58
+ * Hide delay in milliseconds
59
+ * @default 100
60
+ */
33
61
  hideDelay?: number;
62
+ /**
63
+ * Whether to show the tooltip on focus
64
+ * @default true
65
+ */
34
66
  showOnFocus?: boolean;
67
+ /**
68
+ * Whether to show the tooltip on hover
69
+ * @default true
70
+ */
35
71
  showOnHover?: boolean;
72
+ /** Additional CSS classes to add to the tooltip */
36
73
  class?: string;
74
+ /**
75
+ * Component prefix for class names
76
+ * @default 'mtrl'
77
+ */
37
78
  prefix?: string;
79
+ /** Component name used in class generation */
38
80
  componentName?: string;
81
+ /** Optional z-index for the tooltip */
39
82
  zIndex?: number;
83
+ /** `"top"` renders the tooltip in place, after its target, and shows it in the browser's top layer as a `popover="manual"` element: above every z-index, outside any clipping ancestor, and in the target's tree (a shadow root's included), so it takes that tree's styles. */
40
84
  layer?: "top";
41
85
  }
86
+ /** Tooltip component interface */
42
87
  export interface TooltipComponent {
88
+ /** The tooltip's DOM element */
43
89
  element: HTMLElement;
90
+ /** The tooltip's target element */
44
91
  target: HTMLElement | null;
92
+ /** API for managing component lifecycle */
45
93
  lifecycle: {
94
+ /** Destroys the component and cleans up resources */
46
95
  destroy: () => void;
47
96
  };
97
+ /**
98
+ * Gets a class name with the component's prefix
99
+ * @param name
100
+ */
48
101
  getClass: (name: string) => string;
102
+ /**
103
+ * Sets the tooltip text content
104
+ * @param text
105
+ */
49
106
  setText: (text: string) => TooltipComponent;
107
+ /** Gets the tooltip text content */
50
108
  getText: () => string;
109
+ /**
110
+ * Sets the tooltip position
111
+ * @param position
112
+ */
51
113
  setPosition: (position: TooltipPosition) => TooltipComponent;
114
+ /** Gets the current tooltip position */
52
115
  getPosition: () => TooltipPosition;
116
+ /**
117
+ * Sets the tooltip target element
118
+ * @param target
119
+ */
53
120
  setTarget: (target: HTMLElement) => TooltipComponent;
121
+ /**
122
+ * Shows the tooltip.
123
+ * @param immediate
124
+ */
54
125
  show: (immediate?: boolean) => TooltipComponent;
126
+ /**
127
+ * Hides the tooltip, after the hide delay and without an event; `hide(true)` hides it at once.
128
+ * @param immediate
129
+ */
55
130
  hide: (immediate?: boolean) => TooltipComponent;
131
+ /** Checks if the tooltip is currently visible */
56
132
  isVisible: () => boolean;
133
+ /** Updates the tooltip's position relative to its target */
57
134
  updatePosition: () => TooltipComponent;
135
+ /** Destroys the tooltip component and cleans up resources */
58
136
  destroy: () => void;
59
137
  }
@@ -1,33 +1,62 @@
1
+ /** Top App Bar types */
1
2
  export declare const TOP_APP_BAR_TYPES: {
3
+ /** Small height app bar */
2
4
  readonly SMALL: "small";
5
+ /** Medium height app bar */
3
6
  readonly MEDIUM: "medium";
7
+ /** Large height app bar */
4
8
  readonly LARGE: "large";
9
+ /** Center-aligned app bar */
5
10
  readonly CENTER: "center";
6
11
  };
12
+ /** Top App Bar states */
7
13
  export declare const TOP_APP_BAR_STATES: {
14
+ /** Default state */
8
15
  readonly DEFAULT: "default";
16
+ /** Scrolled state */
9
17
  readonly SCROLLED: "scrolled";
18
+ /** Fixed state */
10
19
  readonly FIXED: "fixed";
11
20
  };
21
+ /** Default configuration values for top app bar */
12
22
  export declare const TOP_APP_BAR_DEFAULTS: {
23
+ /** Default HTML tag */
13
24
  readonly TAG: "header";
25
+ /** Default bar type */
14
26
  readonly TYPE: "small";
27
+ /** Whether to enable scrolling behavior */
15
28
  readonly SCROLLABLE: true;
29
+ /** Whether to compress medium/large variants on scroll */
16
30
  readonly COMPRESSIBLE: true;
31
+ /** Scroll threshold in pixels to trigger scrolled state */
17
32
  readonly SCROLL_THRESHOLD: 4;
18
33
  };
34
+ /** CSS class names used by the top app bar component */
19
35
  export declare const TOP_APP_BAR_CLASSES: {
36
+ /** Root element class */
20
37
  readonly ROOT: "top-app-bar";
38
+ /** Small variant class */
21
39
  readonly SMALL: "top-app-bar--small";
40
+ /** Medium variant class */
22
41
  readonly MEDIUM: "top-app-bar--medium";
42
+ /** Large variant class */
23
43
  readonly LARGE: "top-app-bar--large";
44
+ /** Center-aligned variant class */
24
45
  readonly CENTER: "top-app-bar--center";
46
+ /** Scrolled state class */
25
47
  readonly SCROLLED: "top-app-bar--scrolled";
48
+ /** Fixed state class */
26
49
  readonly FIXED: "top-app-bar--fixed";
50
+ /** Row container class */
27
51
  readonly ROW: "top-app-bar__row";
52
+ /** Section container class */
28
53
  readonly SECTION: "top-app-bar__section";
54
+ /** Leading section class */
29
55
  readonly SECTION_LEADING: "top-app-bar__section--leading";
56
+ /** Headline section class */
30
57
  readonly SECTION_HEADLINE: "top-app-bar__section--headline";
58
+ /** Trailing section class */
31
59
  readonly SECTION_TRAILING: "top-app-bar__section--trailing";
60
+ /** Title element class */
32
61
  readonly TITLE: "top-app-bar__title";
33
62
  };
@@ -1,3 +1,7 @@
1
1
  import type { TopAppBarComponent, TopAppBarConfig } from "./types.js";
2
2
  export type { TopAppBarComponent };
3
+ /**
4
+ * Creates a top app bar component
5
+ * @param config
6
+ */
3
7
  export declare const createTopAppBar: (config?: TopAppBarConfig) => TopAppBarComponent;
@@ -1,25 +1,80 @@
1
1
  import { ElementComponent } from "../../core/compose/index.js";
2
+ /** Top App Bar types */
2
3
  export type TopAppBarType = 'small' | 'medium' | 'large' | 'center';
4
+ /** Configuration options for Top App Bar component */
3
5
  export interface TopAppBarConfig {
6
+ /**
7
+ * Element to use for the container
8
+ * @default 'header'
9
+ */
4
10
  tag?: string;
11
+ /**
12
+ * Type of top app bar to display
13
+ * @default 'small'
14
+ */
5
15
  type?: TopAppBarType;
16
+ /** Title text to display in the app bar */
6
17
  title?: string;
18
+ /**
19
+ * Whether to enable scrolling behavior
20
+ * @default true
21
+ */
7
22
  scrollable?: boolean;
23
+ /**
24
+ * Whether to compress medium/large variants to small on scroll
25
+ * @default true
26
+ */
8
27
  compressible?: boolean;
28
+ /**
29
+ * Scroll threshold in pixels to trigger the scrolled state
30
+ * @default 4
31
+ */
9
32
  scrollThreshold?: number;
33
+ /** Additional CSS classes to apply */
10
34
  class?: string;
35
+ /** Called with the new scrolled state when scrolling changes the bar. */
11
36
  onScroll?: (scrolled: boolean) => void;
37
+ /**
38
+ * Component prefix for class names
39
+ * @default 'mtrl'
40
+ */
12
41
  prefix?: string;
42
+ /** Component name for class generation */
13
43
  componentName?: string;
14
44
  }
45
+ /** Top App Bar component interface */
15
46
  export interface TopAppBarComponent extends ElementComponent {
47
+ /**
48
+ * Sets the title of the top app bar
49
+ * @param title
50
+ */
16
51
  setTitle(title: string): this;
52
+ /** Gets the current title */
17
53
  getTitle: () => string;
54
+ /**
55
+ * Adds a leading navigation icon or element
56
+ * @param element
57
+ */
18
58
  addLeadingElement(element: HTMLElement): this;
59
+ /**
60
+ * Adds a trailing action icon or element
61
+ * @param element
62
+ */
19
63
  addTrailingElement(element: HTMLElement): this;
64
+ /**
65
+ * Changes the top app bar type
66
+ * @param type
67
+ */
20
68
  setType(type: TopAppBarType): this;
69
+ /**
70
+ * Manually sets the scrolled state
71
+ * @param scrolled
72
+ */
21
73
  setScrollState(scrolled: boolean): this;
74
+ /** Gets the headline element */
22
75
  getHeadlineElement: () => HTMLElement;
76
+ /** Gets the leading container element */
23
77
  getLeadingContainer: () => HTMLElement;
78
+ /** Gets the trailing container element */
24
79
  getTrailingContainer: () => HTMLElement;
25
80
  }
@@ -1,10 +1,16 @@
1
+ /**
2
+ * Easing function for smooth animations (Material Design standard)
3
+ * @param t
4
+ */
1
5
  export declare const easeOutCubic: (t: number) => number;
6
+ /** Standard Material Design animation durations */
2
7
  export declare const ANIMATION_DURATIONS: {
3
8
  SHORT: number;
4
9
  MEDIUM: number;
5
10
  LONG: number;
6
11
  EXTRA_LONG: number;
7
12
  };
13
+ /** Common easing functions */
8
14
  export declare const EASING_FUNCTIONS: {
9
15
  linear: (t: number) => number;
10
16
  easeIn: (t: number) => number;
@@ -1,20 +1,67 @@
1
+ /** Canvas drawing utilities */
2
+ /**
3
+ * Creates a rounded rectangle path
4
+ * @param ctx
5
+ * @param x
6
+ * @param y
7
+ * @param width
8
+ * @param height
9
+ * @param radius
10
+ */
1
11
  export declare const createRoundedRectPath: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [
2
12
  number,
3
13
  number,
4
14
  number,
5
15
  number
6
16
  ]) => void;
17
+ /**
18
+ * Draws a filled rounded rectangle
19
+ * @param ctx
20
+ * @param x
21
+ * @param y
22
+ * @param width
23
+ * @param height
24
+ * @param radius
25
+ * @param fillStyle
26
+ */
7
27
  export declare const fillRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [
8
28
  number,
9
29
  number,
10
30
  number,
11
31
  number
12
32
  ], fillStyle?: string | CanvasGradient | CanvasPattern) => void;
33
+ /**
34
+ * Creates a clipping region with rounded corners
35
+ * @param ctx
36
+ * @param x
37
+ * @param y
38
+ * @param width
39
+ * @param height
40
+ * @param radius
41
+ */
13
42
  export declare const clipRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number | [
14
43
  number,
15
44
  number,
16
45
  number,
17
46
  number
18
47
  ]) => (() => void);
48
+ /**
49
+ * Draws a rounded rectangle with different left and right radii
50
+ * @param ctx
51
+ * @param x
52
+ * @param y
53
+ * @param width
54
+ * @param height
55
+ * @param leftRadius
56
+ * @param rightRadius
57
+ * @param fillStyle
58
+ */
19
59
  export declare const fillRoundedRectLR: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, leftRadius: number, rightRadius: number, fillStyle?: string | CanvasGradient | CanvasPattern) => void;
60
+ /**
61
+ * Clears a canvas with optional background color
62
+ * @param ctx
63
+ * @param width
64
+ * @param height
65
+ * @param backgroundColor
66
+ */
20
67
  export declare const clearCanvas: (ctx: CanvasRenderingContext2D, width: number, height: number, backgroundColor?: string) => void;
@@ -1,3 +1,4 @@
1
+ /** Canvas utilities for high-performance rendering */
1
2
  export * from "./drawing.js";
2
3
  export * from "./resize.js";
3
4
  export * from "./animation.js";
@@ -1 +1,8 @@
1
+ /** Canvas resize utilities */
2
+ /**
3
+ * Observes an element for the two things that change a canvas backing store: its width, and the devicePixelRatio.
4
+ * @param element
5
+ * @param canvas
6
+ * @param onResize
7
+ */
1
8
  export declare const observeCanvasResize: (element: HTMLElement, canvas: HTMLCanvasElement | null | undefined, onResize: () => void) => (() => void);