material 3.2.6 → 3.3.0

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 (577) hide show
  1. package/README.md +1 -1
  2. package/dist/components/badge/badge.d.ts +0 -59
  3. package/dist/components/badge/constants.d.ts +0 -15
  4. package/dist/components/badge/index.d.ts +0 -6
  5. package/dist/components/badge/types.d.ts +0 -244
  6. package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -10
  7. package/dist/components/bottom-app-bar/constants.d.ts +0 -9
  8. package/dist/components/bottom-app-bar/index.d.ts +0 -4
  9. package/dist/components/bottom-app-bar/types.d.ts +0 -76
  10. package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -21
  11. package/dist/components/bottom-sheet/constants.d.ts +0 -29
  12. package/dist/components/bottom-sheet/types.d.ts +0 -89
  13. package/dist/components/button/button.d.ts +0 -62
  14. package/dist/components/button/constants.d.ts +0 -41
  15. package/dist/components/button/index.d.ts +0 -4
  16. package/dist/components/button/types.d.ts +0 -347
  17. package/dist/components/button-group/button-group.d.ts +0 -51
  18. package/dist/components/button-group/constants.d.ts +0 -83
  19. package/dist/components/button-group/index.d.ts +0 -10
  20. package/dist/components/button-group/types.d.ts +0 -234
  21. package/dist/components/card/card.d.ts +0 -64
  22. package/dist/components/card/constants.d.ts +0 -33
  23. package/dist/components/card/content.d.ts +0 -86
  24. package/dist/components/card/index.d.ts +0 -66
  25. package/dist/components/card/types.d.ts +0 -366
  26. package/dist/components/carousel/carousel.d.ts +0 -22
  27. package/dist/components/carousel/constants.d.ts +0 -16
  28. package/dist/components/carousel/types.d.ts +0 -29
  29. package/dist/components/checkbox/checkbox.d.ts +0 -61
  30. package/dist/components/checkbox/constants.d.ts +0 -33
  31. package/dist/components/checkbox/index.d.ts +0 -25
  32. package/dist/components/checkbox/types.d.ts +0 -206
  33. package/dist/components/chips/chips.d.ts +0 -14
  34. package/dist/components/chips/constants.d.ts +0 -1
  35. package/dist/components/chips/factories.d.ts +0 -4
  36. package/dist/components/chips/types.d.ts +0 -278
  37. package/dist/components/datepicker/constants.d.ts +0 -56
  38. package/dist/components/datepicker/datepicker.d.ts +0 -5
  39. package/dist/components/datepicker/types.d.ts +12 -257
  40. package/dist/components/dialog/constants.d.ts +0 -65
  41. package/dist/components/dialog/dialog.d.ts +0 -86
  42. package/dist/components/dialog/index.d.ts +0 -12
  43. package/dist/components/dialog/types.d.ts +0 -511
  44. package/dist/components/divider/config.d.ts +0 -130
  45. package/dist/components/divider/constants.d.ts +0 -27
  46. package/dist/components/divider/divider.d.ts +0 -36
  47. package/dist/components/divider/index.d.ts +0 -29
  48. package/dist/components/divider/types.d.ts +0 -126
  49. package/dist/components/drawer/constants.d.ts +0 -53
  50. package/dist/components/drawer/drawer.d.ts +0 -56
  51. package/dist/components/drawer/index.d.ts +0 -4
  52. package/dist/components/drawer/types.d.ts +0 -200
  53. package/dist/components/extended-fab/config.js +3 -2
  54. package/dist/components/extended-fab/constants.d.ts +0 -46
  55. package/dist/components/extended-fab/extended-fab.d.ts +0 -58
  56. package/dist/components/extended-fab/index.d.ts +1 -35
  57. package/dist/components/extended-fab/types.d.ts +2 -654
  58. package/dist/components/fab/config.js +3 -2
  59. package/dist/components/fab/constants.d.ts +0 -40
  60. package/dist/components/fab/fab.d.ts +0 -42
  61. package/dist/components/fab/index.d.ts +1 -34
  62. package/dist/components/fab/types.d.ts +2 -543
  63. package/dist/components/fab-menu/constants.d.ts +0 -22
  64. package/dist/components/fab-menu/fab-menu.d.ts +0 -36
  65. package/dist/components/fab-menu/types.d.ts +0 -80
  66. package/dist/components/icon-button/constants.d.ts +0 -90
  67. package/dist/components/icon-button/icon-button.d.ts +0 -83
  68. package/dist/components/icon-button/index.d.ts +0 -44
  69. package/dist/components/icon-button/types.d.ts +0 -314
  70. package/dist/components/index.d.ts +0 -9
  71. package/dist/components/list/constants.d.ts +0 -47
  72. package/dist/components/list/index.d.ts +0 -1
  73. package/dist/components/list/list.d.ts +0 -26
  74. package/dist/components/list/types.d.ts +0 -263
  75. package/dist/components/loading-indicator/constants.d.ts +0 -35
  76. package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
  77. package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
  78. package/dist/components/loading-indicator/types.d.ts +0 -35
  79. package/dist/components/menu/constants.d.ts +0 -79
  80. package/dist/components/menu/index.d.ts +0 -25
  81. package/dist/components/menu/inner.d.ts +0 -3
  82. package/dist/components/menu/menu.d.ts +0 -26
  83. package/dist/components/menu/types.d.ts +0 -423
  84. package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
  85. package/dist/components/navigation-bar/types.d.ts +0 -25
  86. package/dist/components/navigation-rail/constants.d.ts +0 -2
  87. package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
  88. package/dist/components/navigation-rail/types.d.ts +0 -22
  89. package/dist/components/progress/constants.d.ts +24 -56
  90. package/dist/components/progress/progress.d.ts +0 -21
  91. package/dist/components/progress/types.d.ts +0 -251
  92. package/dist/components/radios/constants.d.ts +0 -22
  93. package/dist/components/radios/radios.d.ts +0 -5
  94. package/dist/components/radios/types.d.ts +0 -142
  95. package/dist/components/search/constants.d.ts +0 -59
  96. package/dist/components/search/search.d.ts +0 -32
  97. package/dist/components/search/types.d.ts +0 -159
  98. package/dist/components/select/constants.d.ts +0 -60
  99. package/dist/components/select/index.d.ts +0 -22
  100. package/dist/components/select/select.d.ts +0 -33
  101. package/dist/components/select/types.d.ts +0 -241
  102. package/dist/components/side-sheet/constants.d.ts +0 -28
  103. package/dist/components/side-sheet/side-sheet.d.ts +0 -21
  104. package/dist/components/side-sheet/types.d.ts +0 -82
  105. package/dist/components/slider/constants.d.ts +0 -86
  106. package/dist/components/slider/slider.d.ts +0 -16
  107. package/dist/components/slider/types.d.ts +0 -184
  108. package/dist/components/snackbar/constants.d.ts +0 -73
  109. package/dist/components/snackbar/snackbar.d.ts +0 -13
  110. package/dist/components/snackbar/types.d.ts +0 -147
  111. package/dist/components/split-button/constants.d.ts +0 -33
  112. package/dist/components/split-button/split-button.d.ts +0 -21
  113. package/dist/components/split-button/types.d.ts +0 -81
  114. package/dist/components/switch/constants.d.ts +0 -49
  115. package/dist/components/switch/switch.d.ts +0 -5
  116. package/dist/components/switch/types.d.ts +0 -80
  117. package/dist/components/tabs/constants.d.ts +0 -76
  118. package/dist/components/tabs/indicator.d.ts +0 -27
  119. package/dist/components/tabs/responsive.d.ts +0 -30
  120. package/dist/components/tabs/tab.d.ts +0 -13
  121. package/dist/components/tabs/tabs.d.ts +0 -24
  122. package/dist/components/tabs/types.d.ts +0 -335
  123. package/dist/components/tabs/utils.d.ts +0 -66
  124. package/dist/components/text-field/constants.d.ts +0 -82
  125. package/dist/components/text-field/features/trailing-icon.d.ts +0 -61
  126. package/dist/components/text-field/text-field.d.ts +0 -33
  127. package/dist/components/text-field/types.d.ts +0 -123
  128. package/dist/components/timepicker/constants.d.ts +0 -88
  129. package/dist/components/timepicker/types.d.ts +0 -268
  130. package/dist/components/toolbar/constants.d.ts +0 -27
  131. package/dist/components/toolbar/toolbar.d.ts +0 -25
  132. package/dist/components/toolbar/types.d.ts +0 -102
  133. package/dist/components/tooltip/constants.d.ts +0 -58
  134. package/dist/components/tooltip/tooltip.d.ts +0 -5
  135. package/dist/components/tooltip/types.d.ts +0 -140
  136. package/dist/components/top-app-bar/constants.d.ts +0 -41
  137. package/dist/components/top-app-bar/index.d.ts +0 -4
  138. package/dist/components/top-app-bar/top-app-bar.d.ts +0 -10
  139. package/dist/components/top-app-bar/types.d.ts +0 -94
  140. package/dist/core/canvas/animation.d.ts +0 -13
  141. package/dist/core/canvas/drawing.d.ts +18 -55
  142. package/dist/core/canvas/index.d.ts +0 -4
  143. package/dist/core/canvas/resize.d.ts +0 -13
  144. package/dist/core/canvas/utils.d.ts +0 -62
  145. package/dist/core/compose/base.d.ts +0 -22
  146. package/dist/core/compose/cleanup.d.ts +0 -2
  147. package/dist/core/compose/component.d.ts +0 -31
  148. package/dist/core/compose/features/badge.d.ts +0 -25
  149. package/dist/core/compose/features/checkable.d.ts +0 -36
  150. package/dist/core/compose/features/debounce.d.ts +0 -57
  151. package/dist/core/compose/features/disabled.d.ts +0 -31
  152. package/dist/core/compose/features/events.d.ts +0 -38
  153. package/dist/core/compose/features/icon.d.ts +0 -49
  154. package/dist/core/compose/features/input.d.ts +0 -82
  155. package/dist/core/compose/features/lifecycle.d.ts +0 -36
  156. package/dist/core/compose/features/position.d.ts +0 -27
  157. package/dist/core/compose/features/ripple.d.ts +0 -29
  158. package/dist/core/compose/features/size.d.ts +0 -9
  159. package/dist/core/compose/features/style.d.ts +0 -9
  160. package/dist/core/compose/features/text.d.ts +0 -45
  161. package/dist/core/compose/features/textinput.d.ts +0 -88
  162. package/dist/core/compose/features/textlabel.d.ts +0 -44
  163. package/dist/core/compose/features/throttle.d.ts +0 -54
  164. package/dist/core/compose/features/track.d.ts +0 -34
  165. package/dist/core/compose/features/variant.d.ts +0 -9
  166. package/dist/core/compose/features/withEvents.d.ts +0 -30
  167. package/dist/core/compose/index.d.ts +0 -4
  168. package/dist/core/compose/pipe.d.ts +0 -55
  169. package/dist/core/compose/utils/type-guards.d.ts +0 -15
  170. package/dist/core/config/component.d.ts +0 -45
  171. package/dist/core/config/global.d.ts +0 -43
  172. package/dist/core/config.d.ts +0 -59
  173. package/dist/core/dom/attributes.d.ts +0 -41
  174. package/dist/core/dom/classes.d.ts +0 -49
  175. package/dist/core/dom/create.d.ts +0 -98
  176. package/dist/core/dom/events.d.ts +0 -52
  177. package/dist/core/dom/focus.d.ts +0 -32
  178. package/dist/core/dom/html.d.ts +0 -24
  179. package/dist/core/dom/layer.d.ts +0 -98
  180. package/dist/core/dom/roving.d.ts +0 -19
  181. package/dist/core/index.d.ts +0 -9
  182. package/dist/core/navigation/destinations.d.ts +0 -23
  183. package/dist/core/shapes/cubic.d.ts +24 -19
  184. package/dist/core/shapes/material.d.ts +0 -64
  185. package/dist/core/shapes/polygon.d.ts +6 -16
  186. package/dist/core/state/emitter.d.ts +0 -36
  187. package/dist/core/state/events.d.ts +0 -29
  188. package/dist/core/state/store.d.ts +0 -70
  189. package/dist/core/theme/index.d.ts +0 -3
  190. package/dist/core/theme/shape.d.ts +0 -7
  191. package/dist/core/theme/tokens.d.ts +48 -32
  192. package/dist/core/utils/background.d.ts +0 -29
  193. package/dist/core/utils/color.d.ts +0 -13
  194. package/dist/core/utils/index.d.ts +0 -11
  195. package/dist/core/utils/mobile.d.ts +0 -31
  196. package/dist/core/utils/object.d.ts +0 -11
  197. package/dist/core/utils/performance.d.ts +0 -70
  198. package/dist/core/utils/theme.d.ts +0 -36
  199. package/dist/core/utils/url.d.ts +0 -17
  200. package/dist/elements/adapter.d.ts +13 -62
  201. package/dist/elements/badge.d.ts +0 -17
  202. package/dist/elements/bottom-app-bar.d.ts +7 -17
  203. package/dist/elements/bottom-sheet.d.ts +9 -38
  204. package/dist/elements/button-group.d.ts +0 -31
  205. package/dist/elements/button.d.ts +24 -18
  206. package/dist/elements/button.js +12 -0
  207. package/dist/elements/card.d.ts +12 -24
  208. package/dist/elements/card.js +3 -2
  209. package/dist/elements/carousel.d.ts +5 -29
  210. package/dist/elements/checkbox.d.ts +5 -15
  211. package/dist/elements/chips.d.ts +0 -33
  212. package/dist/elements/css/extended-fab.css +1 -1
  213. package/dist/elements/css/extended-fab.js +1 -1
  214. package/dist/elements/css/fab-menu.css +1 -1
  215. package/dist/elements/css/fab-menu.js +1 -1
  216. package/dist/elements/css/fab.css +1 -1
  217. package/dist/elements/css/fab.js +1 -1
  218. package/dist/elements/css/hosts/extended-fab.css +1 -1
  219. package/dist/elements/css/hosts/fab.css +1 -1
  220. package/dist/elements/datepicker.d.ts +4 -48
  221. package/dist/elements/define.d.ts +3 -161
  222. package/dist/elements/dialog.d.ts +8 -39
  223. package/dist/elements/divider.d.ts +0 -14
  224. package/dist/elements/drawer.d.ts +0 -35
  225. package/dist/elements/extended-fab.d.ts +10 -18
  226. package/dist/elements/extended-fab.js +3 -1
  227. package/dist/elements/fab-menu.d.ts +5 -30
  228. package/dist/elements/fab.d.ts +8 -17
  229. package/dist/elements/fab.js +3 -1
  230. package/dist/elements/floating-placement.js +1 -0
  231. package/dist/elements/icon-button.d.ts +5 -26
  232. package/dist/elements/index.d.ts +0 -16
  233. package/dist/elements/list.d.ts +0 -34
  234. package/dist/elements/loading-indicator.d.ts +4 -13
  235. package/dist/elements/menu.d.ts +5 -51
  236. package/dist/elements/navigation-bar.d.ts +4 -29
  237. package/dist/elements/navigation-rail.d.ts +8 -49
  238. package/dist/elements/preupgrade/badge.css +1 -1
  239. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  240. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  241. package/dist/elements/preupgrade/button-group.css +1 -1
  242. package/dist/elements/preupgrade/button.css +2 -2
  243. package/dist/elements/preupgrade/card.css +2 -2
  244. package/dist/elements/preupgrade/carousel.css +1 -1
  245. package/dist/elements/preupgrade/checkbox.css +1 -1
  246. package/dist/elements/preupgrade/chips.css +1 -1
  247. package/dist/elements/preupgrade/datepicker.css +1 -1
  248. package/dist/elements/preupgrade/dialog.css +1 -1
  249. package/dist/elements/preupgrade/divider.css +1 -1
  250. package/dist/elements/preupgrade/drawer.css +1 -1
  251. package/dist/elements/preupgrade/extended-fab.css +2 -2
  252. package/dist/elements/preupgrade/fab-menu.css +1 -1
  253. package/dist/elements/preupgrade/fab.css +2 -2
  254. package/dist/elements/preupgrade/icon-button.css +1 -1
  255. package/dist/elements/preupgrade/list.css +1 -1
  256. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  257. package/dist/elements/preupgrade/menu.css +1 -1
  258. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  259. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  260. package/dist/elements/preupgrade/progress.css +1 -1
  261. package/dist/elements/preupgrade/radios.css +1 -1
  262. package/dist/elements/preupgrade/search.css +1 -1
  263. package/dist/elements/preupgrade/select.css +1 -1
  264. package/dist/elements/preupgrade/side-sheet.css +1 -1
  265. package/dist/elements/preupgrade/slider.css +1 -1
  266. package/dist/elements/preupgrade/snackbar.css +1 -1
  267. package/dist/elements/preupgrade/split-button.css +1 -1
  268. package/dist/elements/preupgrade/switch.css +1 -1
  269. package/dist/elements/preupgrade/tabs.css +1 -1
  270. package/dist/elements/preupgrade/text-field.css +1 -1
  271. package/dist/elements/preupgrade/timepicker.css +1 -1
  272. package/dist/elements/preupgrade/toolbar.css +1 -1
  273. package/dist/elements/preupgrade/tooltip.css +1 -1
  274. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  275. package/dist/elements/preupgrade.css +2 -2
  276. package/dist/elements/preupgrade.d.ts +0 -1
  277. package/dist/elements/preupgrade.js +1 -1
  278. package/dist/elements/progress.d.ts +0 -15
  279. package/dist/elements/radios.d.ts +0 -22
  280. package/dist/elements/search.d.ts +5 -53
  281. package/dist/elements/select.d.ts +0 -31
  282. package/dist/elements/side-sheet.d.ts +7 -29
  283. package/dist/elements/slider.d.ts +3 -22
  284. package/dist/elements/snackbar.d.ts +4 -28
  285. package/dist/elements/split-button.d.ts +0 -30
  286. package/dist/elements/styles.d.ts +0 -63
  287. package/dist/elements/switch.d.ts +5 -17
  288. package/dist/elements/tabs.d.ts +0 -22
  289. package/dist/elements/text-field.d.ts +4 -38
  290. package/dist/elements/timepicker.d.ts +4 -44
  291. package/dist/elements/toolbar.d.ts +8 -25
  292. package/dist/elements/tooltip.d.ts +4 -30
  293. package/dist/elements/top-app-bar.d.ts +7 -23
  294. package/dist/index.d.ts +0 -11
  295. package/dist/package.json +1 -1
  296. package/dist/react/create.d.ts +0 -42
  297. package/dist/react/index.d.ts +0 -6
  298. package/dist/react/jsx.d.ts +0 -13
  299. package/dist/solid/create.d.ts +0 -48
  300. package/dist/solid/index.d.ts +0 -6
  301. package/dist/solid/jsx.d.ts +1 -10
  302. package/dist/ssr/index.d.ts +0 -49
  303. package/dist/ssr/solid.d.ts +0 -4
  304. package/dist/ssr/svelte.d.ts +0 -4
  305. package/dist/ssr/vue.d.ts +0 -4
  306. package/dist/styles/badge.css +1 -1
  307. package/dist/styles/base.css +1 -1
  308. package/dist/styles/bottom-app-bar.css +1 -1
  309. package/dist/styles/bottom-sheet.css +1 -1
  310. package/dist/styles/button-group.css +1 -1
  311. package/dist/styles/button.css +1 -1
  312. package/dist/styles/card.css +1 -1
  313. package/dist/styles/carousel.css +1 -1
  314. package/dist/styles/checkbox.css +1 -1
  315. package/dist/styles/chips.css +1 -1
  316. package/dist/styles/contrast.css +1 -1
  317. package/dist/styles/datepicker.css +1 -1
  318. package/dist/styles/dialog.css +1 -1
  319. package/dist/styles/divider.css +1 -1
  320. package/dist/styles/drawer.css +1 -1
  321. package/dist/styles/extended-fab.css +2 -2
  322. package/dist/styles/fab-menu.css +2 -2
  323. package/dist/styles/fab.css +2 -2
  324. package/dist/styles/icon-button.css +1 -1
  325. package/dist/styles/list.css +1 -1
  326. package/dist/styles/loading-indicator.css +1 -1
  327. package/dist/styles/menu.css +1 -1
  328. package/dist/styles/navigation-bar.css +1 -1
  329. package/dist/styles/navigation-rail.css +1 -1
  330. package/dist/styles/progress.css +1 -1
  331. package/dist/styles/radios.css +1 -1
  332. package/dist/styles/search.css +1 -1
  333. package/dist/styles/select.css +1 -1
  334. package/dist/styles/side-sheet.css +1 -1
  335. package/dist/styles/slider.css +1 -1
  336. package/dist/styles/snackbar.css +1 -1
  337. package/dist/styles/split-button.css +1 -1
  338. package/dist/styles/switch.css +1 -1
  339. package/dist/styles/tabs.css +1 -1
  340. package/dist/styles/text-field.css +1 -1
  341. package/dist/styles/timepicker.css +1 -1
  342. package/dist/styles/toolbar.css +1 -1
  343. package/dist/styles/tooltip.css +1 -1
  344. package/dist/styles/top-app-bar.css +1 -1
  345. package/dist/styles/typography.css +1 -1
  346. package/dist/styles/utilities.css +1 -1
  347. package/dist/styles.css +2 -2
  348. package/dist/svelte/Button.svelte +5 -4
  349. package/dist/svelte/runtime.d.ts +8 -62
  350. package/dist/themes/autumn-contrast.css +1 -1
  351. package/dist/themes/autumn.css +1 -1
  352. package/dist/themes/baseline-contrast.css +1 -1
  353. package/dist/themes/baseline.css +1 -1
  354. package/dist/themes/brownbeige-contrast.css +1 -1
  355. package/dist/themes/brownbeige.css +1 -1
  356. package/dist/themes/content-contrast.css +1 -1
  357. package/dist/themes/content.css +1 -1
  358. package/dist/themes/desert-contrast.css +1 -1
  359. package/dist/themes/desert.css +1 -1
  360. package/dist/themes/expressive-contrast.css +1 -1
  361. package/dist/themes/expressive.css +1 -1
  362. package/dist/themes/fidelity-contrast.css +1 -1
  363. package/dist/themes/fidelity.css +1 -1
  364. package/dist/themes/forest-contrast.css +1 -1
  365. package/dist/themes/forest.css +1 -1
  366. package/dist/themes/fruit-salad-contrast.css +1 -1
  367. package/dist/themes/fruit-salad.css +1 -1
  368. package/dist/themes/highcontrast-contrast.css +1 -1
  369. package/dist/themes/highcontrast.css +1 -1
  370. package/dist/themes/monochrome-contrast.css +1 -1
  371. package/dist/themes/monochrome.css +1 -1
  372. package/dist/themes/neutral-contrast.css +1 -1
  373. package/dist/themes/neutral.css +1 -1
  374. package/dist/themes/ocean-contrast.css +1 -1
  375. package/dist/themes/ocean.css +1 -1
  376. package/dist/themes/rainbow-contrast.css +1 -1
  377. package/dist/themes/rainbow.css +1 -1
  378. package/dist/themes/sageivory-contrast.css +1 -1
  379. package/dist/themes/sageivory.css +1 -1
  380. package/dist/themes/spring-contrast.css +1 -1
  381. package/dist/themes/spring.css +1 -1
  382. package/dist/themes/summer-contrast.css +1 -1
  383. package/dist/themes/summer.css +1 -1
  384. package/dist/themes/sunset-contrast.css +1 -1
  385. package/dist/themes/sunset.css +1 -1
  386. package/dist/themes/tealcaramel-contrast.css +1 -1
  387. package/dist/themes/tealcaramel.css +1 -1
  388. package/dist/themes/vibrant-contrast.css +1 -1
  389. package/dist/themes/vibrant.css +1 -1
  390. package/dist/vue/create.d.ts +15 -58
  391. package/dist/vue/index.d.ts +0 -6
  392. package/package.json +1 -1
  393. package/src/styles/abstract/_floating-placement.scss +12 -0
  394. package/src/styles/components/_extended-fab.scss +34 -8
  395. package/src/styles/components/_fab-menu.scss +58 -8
  396. package/src/styles/components/_fab.scss +34 -8
  397. package/src/styles/elements/_button.scss +27 -5
  398. package/src/styles/elements/_card.scss +14 -0
  399. package/src/styles/elements/_extended-fab.scss +2 -0
  400. package/src/styles/elements/_fab.scss +2 -0
  401. package/dist/components/badge/api.d.ts +0 -41
  402. package/dist/components/badge/config.d.ts +0 -631
  403. package/dist/components/badge/features.d.ts +0 -38
  404. package/dist/components/bottom-app-bar/config.d.ts +0 -16
  405. package/dist/components/bottom-sheet/api.d.ts +0 -44
  406. package/dist/components/bottom-sheet/config.d.ts +0 -547
  407. package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
  408. package/dist/components/bottom-sheet/features/index.d.ts +0 -3
  409. package/dist/components/bottom-sheet/features/state.d.ts +0 -31
  410. package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
  411. package/dist/components/button/api.d.ts +0 -68
  412. package/dist/components/button/config.d.ts +0 -594
  413. package/dist/components/button/features/progress.d.ts +0 -43
  414. package/dist/components/button/features/toggle.d.ts +0 -43
  415. package/dist/components/button-group/config.d.ts +0 -147
  416. package/dist/components/card/api.d.ts +0 -24
  417. package/dist/components/card/config.d.ts +0 -635
  418. package/dist/components/card/features.d.ts +0 -124
  419. package/dist/components/carousel/api.d.ts +0 -20
  420. package/dist/components/carousel/arrangement.d.ts +0 -23
  421. package/dist/components/carousel/config.d.ts +0 -540
  422. package/dist/components/carousel/features/index.d.ts +0 -2
  423. package/dist/components/carousel/features/scroll.d.ts +0 -20
  424. package/dist/components/carousel/features/slides.d.ts +0 -18
  425. package/dist/components/carousel/keylines.d.ts +0 -68
  426. package/dist/components/carousel/strategy.d.ts +0 -36
  427. package/dist/components/checkbox/api.d.ts +0 -7
  428. package/dist/components/checkbox/config.d.ts +0 -568
  429. package/dist/components/chips/api.d.ts +0 -62
  430. package/dist/components/chips/chip/chip.d.ts +0 -4
  431. package/dist/components/chips/chip/constants.d.ts +0 -38
  432. package/dist/components/chips/chip/index.d.ts +0 -1
  433. package/dist/components/chips/config.d.ts +0 -583
  434. package/dist/components/chips/features/chip-items.d.ts +0 -39
  435. package/dist/components/chips/features/container.d.ts +0 -75
  436. package/dist/components/chips/features/controller.d.ts +0 -61
  437. package/dist/components/chips/features/dom.d.ts +0 -24
  438. package/dist/components/chips/features/index.d.ts +0 -4
  439. package/dist/components/chips/schema.d.ts +0 -35
  440. package/dist/components/datepicker/api.d.ts +0 -7
  441. package/dist/components/datepicker/config.d.ts +0 -542
  442. package/dist/components/datepicker/render.d.ts +0 -3
  443. package/dist/components/datepicker/utils.d.ts +0 -84
  444. package/dist/components/dialog/api.d.ts +0 -66
  445. package/dist/components/dialog/config.d.ts +0 -583
  446. package/dist/components/dialog/features.d.ts +0 -42
  447. package/dist/components/divider/features.d.ts +0 -6
  448. package/dist/components/drawer/api.d.ts +0 -55
  449. package/dist/components/drawer/config.d.ts +0 -620
  450. package/dist/components/drawer/features/headline.d.ts +0 -27
  451. package/dist/components/drawer/features/index.d.ts +0 -3
  452. package/dist/components/drawer/features/items.d.ts +0 -32
  453. package/dist/components/drawer/features/state.d.ts +0 -22
  454. package/dist/components/extended-fab/api.d.ts +0 -96
  455. package/dist/components/extended-fab/config.d.ts +0 -600
  456. package/dist/components/fab/api.d.ts +0 -74
  457. package/dist/components/fab/config.d.ts +0 -596
  458. package/dist/components/fab-menu/config.d.ts +0 -11
  459. package/dist/components/fab-menu/stagger.d.ts +0 -10
  460. package/dist/components/icon-button/api.d.ts +0 -84
  461. package/dist/components/icon-button/config.d.ts +0 -624
  462. package/dist/components/icon-button/features/toggle.d.ts +0 -133
  463. package/dist/components/list/api.d.ts +0 -156
  464. package/dist/components/list/config.d.ts +0 -625
  465. package/dist/components/list/features/anatomy.d.ts +0 -6
  466. package/dist/components/list/features/index.d.ts +0 -2
  467. package/dist/components/list/features/renderer.d.ts +0 -8
  468. package/dist/components/list/features/selection.d.ts +0 -3
  469. package/dist/components/loading-indicator/api.d.ts +0 -14
  470. package/dist/components/loading-indicator/config.d.ts +0 -557
  471. package/dist/components/loading-indicator/features/motion.d.ts +0 -22
  472. package/dist/components/menu/api.d.ts +0 -63
  473. package/dist/components/menu/config.d.ts +0 -576
  474. package/dist/components/menu/features/controller.d.ts +0 -15
  475. package/dist/components/menu/features/index.d.ts +0 -5
  476. package/dist/components/menu/features/keyboard.d.ts +0 -23
  477. package/dist/components/menu/features/layer.d.ts +0 -15
  478. package/dist/components/menu/features/loader.d.ts +0 -35
  479. package/dist/components/menu/features/opener.d.ts +0 -16
  480. package/dist/components/menu/features/position.d.ts +0 -18
  481. package/dist/components/menu/features/registry.d.ts +0 -37
  482. package/dist/components/menu/features/submenu.d.ts +0 -28
  483. package/dist/components/menu/features/tasks.d.ts +0 -9
  484. package/dist/components/navigation-bar/config.d.ts +0 -2
  485. package/dist/components/navigation-rail/config.d.ts +0 -2
  486. package/dist/components/progress/api.d.ts +0 -81
  487. package/dist/components/progress/config.d.ts +0 -620
  488. package/dist/components/progress/features/canvas.d.ts +0 -60
  489. package/dist/components/progress/features/circular.d.ts +0 -19
  490. package/dist/components/progress/features/colors.d.ts +0 -17
  491. package/dist/components/progress/features/index.d.ts +0 -8
  492. package/dist/components/progress/features/linear.d.ts +0 -25
  493. package/dist/components/progress/features/motion.d.ts +0 -43
  494. package/dist/components/progress/features/resize-observer.d.ts +0 -5
  495. package/dist/components/progress/features/state.d.ts +0 -44
  496. package/dist/components/radios/api.d.ts +0 -37
  497. package/dist/components/radios/config.d.ts +0 -568
  498. package/dist/components/radios/radio.d.ts +0 -26
  499. package/dist/components/search/api.d.ts +0 -63
  500. package/dist/components/search/config.d.ts +0 -657
  501. package/dist/components/search/features/index.d.ts +0 -4
  502. package/dist/components/search/features/input.d.ts +0 -93
  503. package/dist/components/search/features/states.d.ts +0 -111
  504. package/dist/components/search/features/structure.d.ts +0 -16
  505. package/dist/components/search/features/suggestions.d.ts +0 -60
  506. package/dist/components/select/api.d.ts +0 -8
  507. package/dist/components/select/config.d.ts +0 -18
  508. package/dist/components/select/features.d.ts +0 -14
  509. package/dist/components/side-sheet/api.d.ts +0 -34
  510. package/dist/components/side-sheet/config.d.ts +0 -547
  511. package/dist/components/side-sheet/features/index.d.ts +0 -2
  512. package/dist/components/side-sheet/features/state.d.ts +0 -28
  513. package/dist/components/side-sheet/features/structure.d.ts +0 -21
  514. package/dist/components/slider/api.d.ts +0 -65
  515. package/dist/components/slider/config.d.ts +0 -605
  516. package/dist/components/slider/features/axis.d.ts +0 -42
  517. package/dist/components/slider/features/controller.d.ts +0 -528
  518. package/dist/components/slider/features/dom.d.ts +0 -22
  519. package/dist/components/slider/features/handlers.d.ts +0 -16
  520. package/dist/components/slider/features/index.d.ts +0 -5
  521. package/dist/components/slider/features/range.d.ts +0 -14
  522. package/dist/components/slider/features/states.d.ts +0 -76
  523. package/dist/components/slider/features/tracks.d.ts +0 -50
  524. package/dist/components/snackbar/api.d.ts +0 -7
  525. package/dist/components/snackbar/config.d.ts +0 -596
  526. package/dist/components/snackbar/features.d.ts +0 -26
  527. package/dist/components/snackbar/layer.d.ts +0 -23
  528. package/dist/components/snackbar/position.d.ts +0 -16
  529. package/dist/components/snackbar/queue.d.ts +0 -15
  530. package/dist/components/split-button/api.d.ts +0 -14
  531. package/dist/components/split-button/config.d.ts +0 -553
  532. package/dist/components/split-button/features/buttons.d.ts +0 -8
  533. package/dist/components/split-button/features/menu.d.ts +0 -10
  534. package/dist/components/switch/api.d.ts +0 -7
  535. package/dist/components/switch/config.d.ts +0 -558
  536. package/dist/components/switch/features.d.ts +0 -63
  537. package/dist/components/tabs/api.d.ts +0 -54
  538. package/dist/components/tabs/config.d.ts +0 -31
  539. package/dist/components/tabs/features.d.ts +0 -131
  540. package/dist/components/tabs/scroll-indicators.d.ts +0 -18
  541. package/dist/components/tabs/state.d.ts +0 -48
  542. package/dist/components/text-field/api.d.ts +0 -29
  543. package/dist/components/text-field/config.d.ts +0 -560
  544. package/dist/components/text-field/features/counter.d.ts +0 -29
  545. package/dist/components/text-field/features/density.d.ts +0 -28
  546. package/dist/components/text-field/features/error.d.ts +0 -55
  547. package/dist/components/text-field/features/field.d.ts +0 -37
  548. package/dist/components/text-field/features/index.d.ts +0 -20
  549. package/dist/components/text-field/features/leading-icon.d.ts +0 -68
  550. package/dist/components/text-field/features/placement.d.ts +0 -30
  551. package/dist/components/text-field/features/prefix-text.d.ts +0 -67
  552. package/dist/components/text-field/features/required.d.ts +0 -33
  553. package/dist/components/text-field/features/suffix-text.d.ts +0 -67
  554. package/dist/components/text-field/features/supporting-text.d.ts +0 -59
  555. package/dist/components/timepicker/api.d.ts +0 -26
  556. package/dist/components/timepicker/config.d.ts +0 -570
  557. package/dist/components/timepicker/dial.d.ts +0 -35
  558. package/dist/components/timepicker/render.d.ts +0 -9
  559. package/dist/components/timepicker/utils.d.ts +0 -55
  560. package/dist/components/toolbar/config.d.ts +0 -19
  561. package/dist/components/tooltip/api.d.ts +0 -18
  562. package/dist/components/tooltip/config.d.ts +0 -563
  563. package/dist/components/top-app-bar/config.d.ts +0 -16
  564. package/dist/core/compose/features/constants.d.ts +0 -8
  565. package/dist/core/dom/direction.d.ts +0 -16
  566. package/dist/core/dom/form-value.d.ts +0 -24
  567. package/dist/core/dom/utils.d.ts +0 -33
  568. package/dist/core/navigation/ripple.d.ts +0 -2
  569. package/dist/core/utils/attributes.d.ts +0 -29
  570. package/dist/core/utils/validate.d.ts +0 -73
  571. package/dist/core/utils/warn.d.ts +0 -16
  572. package/dist/elements/form-button.d.ts +0 -29
  573. package/dist/elements/lifecycle.d.ts +0 -4
  574. package/dist/elements/sheet.d.ts +0 -44
  575. package/dist/react/shadow.d.ts +0 -2
  576. package/dist/solid/shadow.d.ts +0 -3
  577. package/dist/vue/shadow.d.ts +0 -7
@@ -1,452 +1,105 @@
1
1
  import { BaseComponentConfig } from "../../core/config/component.js";
2
2
  import { ProgressConfig, ProgressComponent } from "../progress/types.js";
3
3
  import { ButtonSize, ButtonShape } from "./constants.js";
4
- /**
5
- * Button variant types - controls the visual style of the button
6
- * @category Components
7
- * @remarks
8
- * - filled: Primary action button with solid background (high emphasis)
9
- * - tonal: Secondary action button with medium emphasis
10
- * - outlined: Button with outline border and transparent background
11
- * - elevated: Button with slight elevation/shadow
12
- * - text: Button that appears as text without background or border (low emphasis)
13
- */
14
4
  export type ButtonVariant = "filled" | "tonal" | "outlined" | "elevated" | "text";
15
- /**
16
- * Configuration interface for the Button component
17
- * @category Components
18
- */
19
5
  export interface ButtonConfig extends BaseComponentConfig {
20
- /**
21
- * Button variant that determines visual styling
22
- * @default 'filled'
23
- */
24
6
  variant?: ButtonVariant | string;
25
- /**
26
- * Button size variant
27
- * @default 's'
28
- */
29
7
  size?: ButtonSize | string;
30
- /**
31
- * Button shape variant
32
- * @default 'round'
33
- */
34
8
  shape?: ButtonShape | string;
35
- /**
36
- * Whether the button is initially disabled
37
- * @default false
38
- */
39
9
  disabled?: boolean;
40
- /**
41
- * Initial button text content, or a node placed where the text goes (the
42
- * web component passes a `<slot>` so the page's content is the label)
43
- * @example 'Submit'
44
- */
45
10
  text?: string | Node;
46
- /**
47
- * Initial button icon HTML content.
48
- * Markup (HTML). Not sanitized by default: see Markup and sanitizing.
49
- * @example '<svg>...</svg>'
50
- */
51
11
  icon?: string;
52
- /**
53
- * Icon size in pixels or other CSS units
54
- * @example '18px'
55
- */
56
12
  iconSize?: string;
57
- /**
58
- * Additional CSS classes to add to the button
59
- * @example 'form-submit header-action'
60
- */
61
13
  class?: string;
62
- /**
63
- * Button value attribute
64
- */
65
14
  value?: string;
66
- /**
67
- * Button type attribute
68
- * @default 'button'
69
- */
70
15
  type?: "button" | "submit" | "reset";
71
- /**
72
- * Whether to enable ripple effect
73
- * @default true
74
- */
75
16
  ripple?: boolean;
76
- /**
77
- * Component prefix for class names
78
- * @default 'mtrl'
79
- */
80
17
  prefix?: string;
81
- /**
82
- * Component name used in class generation
83
- */
84
18
  componentName?: string;
85
- /**
86
- * Ripple effect configuration
87
- */
88
19
  rippleConfig?: {
89
- /** How long, in milliseconds, a released wave lingers before it is removed */
90
20
  duration?: number;
91
21
  };
92
- /**
93
- * Accessible name for the button (aria-label)
94
- * Required for icon-only buttons without text
95
- */
96
22
  ariaLabel?: string;
97
- /**
98
- * Progress indicator configuration
99
- * When provided, integrates a progress component as the button's icon
100
- */
101
23
  progress?: ProgressConfig | boolean;
102
- /**
103
- * Whether to show progress initially
104
- * @default false
105
- */
106
24
  showProgress?: boolean;
107
- /**
108
- * Makes the button a toggle button: a click flips its selected state,
109
- * the element carries aria-pressed, and the selected state uses the M3
110
- * toggle colours and swaps the resting shape (round to square, square
111
- * to round). Text buttons have no toggle style.
112
- * @default false
113
- */
114
25
  toggle?: boolean;
115
- /**
116
- * Initial selected state of a toggle button
117
- * @default false
118
- */
119
26
  selected?: boolean;
120
- /**
121
- * Whether a click flips the selected state of a toggle button. Set to
122
- * false when a container (button group) owns the selection.
123
- * @default true
124
- */
125
27
  toggleOnClick?: boolean;
126
28
  }
127
- /**
128
- * Icon API interface for managing button icons
129
- * @category Components
130
- */
131
29
  export interface IconAPI {
132
- /**
133
- * Sets the icon HTML content
134
- * @param html - HTML string for the icon
135
- * @returns The icon API for chaining
136
- */
137
30
  setIcon: (html: string) => IconAPI;
138
- /**
139
- * Gets the current icon HTML content
140
- * @returns HTML string for the icon
141
- */
142
31
  getIcon: () => string;
143
- /**
144
- * Gets the icon DOM element
145
- * @returns The icon element or null if not present
146
- */
147
32
  getElement: () => HTMLElement | null;
148
33
  }
149
- /**
150
- * Text API interface for managing button text
151
- * @category Components
152
- */
153
34
  export interface TextAPI {
154
- /**
155
- * Sets the text content
156
- * @param content - Text content
157
- * @returns The text API for chaining
158
- */
159
35
  setText: (content: string) => TextAPI;
160
- /**
161
- * Gets the current text content
162
- * @returns Button text content
163
- */
164
36
  getText: () => string;
165
- /**
166
- * Gets the text DOM element
167
- * @returns The text element or null if not present
168
- */
169
37
  getElement: () => HTMLElement | null;
170
38
  }
171
- /**
172
- * Button component interface
173
- * @category Components
174
- */
175
- /**
176
- * What a forwarded DOM event hands a button listener.
177
- *
178
- * The button does not emit events of its own: `click`, `focus` and `blur` are
179
- * native events forwarded from its element by `forwardEvents` in config.ts,
180
- * and the forwarder wraps each one in this shape.
181
- */
182
39
  export interface ButtonEventPayload<E extends Event = Event> {
183
- /** The DOM event that triggered the forward. */
184
40
  event: E;
185
- /** The button's root element, which is the element listened on. */
186
41
  element: HTMLElement;
187
- /** The same DOM event as `event`; both names have always been provided. */
188
42
  originalEvent: E;
189
43
  }
190
- /** A toggle button's `change`. */
191
44
  export interface ButtonChangePayload {
192
- /** Whether the button is now selected */
193
45
  selected: boolean;
194
- /** The button's value, as `getValue()` returns it */
195
46
  value: string;
196
47
  }
197
- /**
198
- * The events a button reports, and what each hands its handler.
199
- *
200
- * `on` and `off` are generic over these keys, so a misspelled event name is a
201
- * compile error rather than a listener that never fires, and a handler's
202
- * payload is typed rather than `any`.
203
- *
204
- * Native forwarding and toggle selection are reported here. `mount` and `unmount` are *not* here: the lifecycle
205
- * feature keeps its own emitter and exposes them as `lifecycle.onMount` and
206
- * `lifecycle.onUnmount`, so they never reach `component.on`.
207
- */
208
48
  export interface ButtonEvents {
209
- /**
210
- * A toggle button's selected state changed on a click. `value` is the
211
- * button's value (`getValue()`), as every model event carries;
212
- * `selected` is the toggled state.
213
- */
214
49
  change: (payload: ButtonChangePayload) => void;
215
- /** The button was clicked. Not forwarded while the button is disabled. */
216
50
  click: (payload: ButtonEventPayload<MouseEvent>) => void;
217
- /** The button took focus. */
218
51
  focus: (payload: ButtonEventPayload<FocusEvent>) => void;
219
- /** The button lost focus. */
220
52
  blur: (payload: ButtonEventPayload<FocusEvent>) => void;
221
53
  }
222
54
  export interface ButtonComponent {
223
- /** The button's DOM element */
224
55
  element: HTMLButtonElement;
225
- /** API for managing button text */
226
56
  text: TextAPI;
227
- /** API for managing button icons */
228
57
  icon: IconAPI;
229
- /** API for managing disabled state */
230
58
  disabled: {
231
- /** Enables the button */
232
59
  enable: () => void;
233
- /** Disables the button */
234
60
  disable: () => void;
235
- /** Checks if the button is disabled */
236
61
  isDisabled: () => boolean;
237
62
  };
238
- /** API for managing component lifecycle */
239
63
  lifecycle: {
240
- /** Destroys the component and cleans up resources */
241
64
  destroy: () => void;
242
65
  };
243
- /**
244
- * Gets a class name with the component's prefix
245
- * @param name - Base class name
246
- * @returns Prefixed class name
247
- */
248
66
  getClass: (name: string) => string;
249
- /**
250
- * Gets the button's value attribute
251
- * @returns Button value
252
- */
253
67
  getValue: () => string;
254
- /**
255
- * Sets the button's value attribute
256
- * @param value - New value
257
- * @returns The button component for chaining
258
- */
259
68
  setValue: (value: string) => ButtonComponent;
260
- /**
261
- * Gets the button's current variant
262
- * @returns Current variant name ('filled', 'outlined', etc.)
263
- */
264
69
  getVariant: () => ButtonVariant | string;
265
- /**
266
- * Sets the button's variant (visual style)
267
- * @param variant - New variant to apply ('filled', 'outlined', 'text', etc.)
268
- * @returns The button component for chaining
269
- */
270
70
  setVariant: (variant: ButtonVariant | string) => ButtonComponent;
271
- /**
272
- * Gets the button's current size
273
- * @returns Current size name ('xs', 's', 'm', 'l', 'xl')
274
- */
275
71
  getSize: () => ButtonSize | string;
276
- /**
277
- * Sets the button's size
278
- * @param size - New size to apply ('xs', 's', 'm', 'l', 'xl')
279
- * @returns The button component for chaining
280
- */
281
72
  setSize: (size: ButtonSize | string) => ButtonComponent;
282
- /**
283
- * Gets the button's current shape
284
- * @returns Current shape name ('round', 'square')
285
- */
286
73
  getShape: () => ButtonShape | string;
287
- /**
288
- * Sets the button's shape
289
- * @param shape - New shape to apply ('round', 'square')
290
- * @returns The button component for chaining
291
- */
292
74
  setShape: (shape: ButtonShape | string) => ButtonComponent;
293
- /**
294
- * Enables the button (removes disabled attribute)
295
- * @returns The button component for chaining
296
- */
297
75
  enable: () => ButtonComponent;
298
- /**
299
- * Disables the button (adds disabled attribute)
300
- * @returns The button component for chaining
301
- */
302
76
  disable: () => ButtonComponent;
303
- /** Whether the button is disabled */
304
77
  isDisabled: () => boolean;
305
- /**
306
- * Sets the button's text content
307
- * @param content - Text content
308
- * @returns The button component for chaining
309
- */
310
78
  setText: (content: string) => ButtonComponent;
311
- /**
312
- * Gets the button's text content
313
- * @returns Button text content
314
- */
315
79
  getText: () => string;
316
- /**
317
- * Checks if the button has an icon
318
- * @returns True if the button has an icon, false otherwise
319
- */
320
80
  hasIcon: () => boolean;
321
- /**
322
- * Sets the button's icon
323
- * If empty string is provided, removes the icon completely
324
- * @param icon - Icon HTML content, or empty string to remove
325
- * @returns The button component for chaining
326
- */
327
81
  setIcon: (icon: string) => ButtonComponent;
328
- /**
329
- * Gets the button's icon HTML content
330
- * @returns Icon HTML
331
- */
332
82
  getIcon: () => string;
333
- /**
334
- * Destroys the button component and cleans up resources
335
- */
336
83
  destroy: () => void;
337
- /**
338
- * Sets the active state of the button
339
- * Used to visually indicate the button's active state, such as when it has a menu open
340
- *
341
- * @param active - Whether the button should appear active
342
- * @returns The button component for chaining
343
- */
344
84
  setActive: (active: boolean) => ButtonComponent;
345
- /**
346
- * Sets the selected state of a toggle button (no-op unless `toggle` is set)
347
- * @param selected - Whether the button is selected
348
- * @returns The button component for chaining
349
- */
350
85
  setSelected: (selected: boolean) => ButtonComponent;
351
- /**
352
- * Whether a toggle button is selected
353
- * @returns true when selected, false otherwise or when not a toggle button
354
- */
355
86
  isSelected: () => boolean;
356
- /**
357
- * Adds an event listener to the button
358
- * @param event - One of the events in {@link ButtonEvents}
359
- * @param handler - Receives the payload declared for that event
360
- * @returns The button component for chaining
361
- */
362
87
  on: <K extends keyof ButtonEvents>(event: K, handler: ButtonEvents[K]) => ButtonComponent;
363
- /**
364
- * Removes an event listener from the button
365
- * @param event - One of the events in {@link ButtonEvents}
366
- * @param handler - The same handler that was passed to `on`
367
- * @returns The button component for chaining
368
- */
369
88
  off: <K extends keyof ButtonEvents>(event: K, handler: ButtonEvents[K]) => ButtonComponent;
370
- /**
371
- * Adds CSS classes to the button element
372
- * @param classes - One or more class names to add
373
- * @returns The button component for chaining
374
- */
375
89
  addClass: (...classes: string[]) => ButtonComponent;
376
- /**
377
- * Sets the aria-label attribute for accessibility
378
- * @param label - Aria label text
379
- * @returns The button component for chaining
380
- */
381
90
  setAriaLabel: (label: string) => ButtonComponent;
382
- /**
383
- * Progress component instance (if progress is enabled)
384
- */
385
91
  progress?: ProgressComponent;
386
- /**
387
- * Shows the progress indicator (if progress is enabled)
388
- * @returns The button component for chaining
389
- */
390
92
  showProgress?: () => Promise<ButtonComponent>;
391
- /**
392
- * Shows the progress indicator synchronously (if progress is enabled)
393
- * @returns The button component for chaining
394
- */
395
93
  showProgressSync?: () => ButtonComponent;
396
- /**
397
- * Hides the progress indicator (if progress is enabled)
398
- * @returns The button component for chaining
399
- */
400
94
  hideProgress?: () => Promise<ButtonComponent>;
401
- /**
402
- * Hides the progress indicator synchronously (if progress is enabled)
403
- * @returns The button component for chaining
404
- */
405
95
  hideProgressSync?: () => ButtonComponent;
406
- /**
407
- * Sets the progress value (0-100) (if progress is enabled)
408
- * @param value - Progress value
409
- * @returns The button component for chaining
410
- */
411
96
  setProgress?: (value: number) => Promise<ButtonComponent>;
412
- /**
413
- * Sets the progress value synchronously (0-100) (if progress is enabled)
414
- * @param value - Progress value
415
- * @returns The button component for chaining
416
- */
417
97
  setProgressSync?: (value: number) => ButtonComponent;
418
- /**
419
- * Sets the progress to indeterminate mode (if progress is enabled)
420
- * @param indeterminate - Whether progress should be indeterminate
421
- * @returns The button component for chaining
422
- */
423
98
  setIndeterminate?: (indeterminate: boolean) => Promise<ButtonComponent>;
424
- /**
425
- * Sets the progress to indeterminate mode synchronously (if progress is enabled)
426
- * @param indeterminate - Whether progress should be indeterminate
427
- * @returns The button component for chaining
428
- */
429
99
  setIndeterminateSync?: (indeterminate: boolean) => ButtonComponent;
430
- /**
431
- * Updates both button text and progress for loading states (if progress is enabled)
432
- * @param loading - Whether to show loading state
433
- * @param text - Optional text to display while loading
434
- * @returns The button component for chaining
435
- */
436
100
  setLoading?: (loading: boolean, text?: string) => Promise<ButtonComponent>;
437
- /**
438
- * Updates both button text and progress for loading states synchronously (if progress is enabled)
439
- * @param loading - Whether to show loading state
440
- * @param text - Optional text to display while loading
441
- * @returns The button component for chaining
442
- */
443
101
  setLoadingSync?: (loading: boolean, text?: string) => ButtonComponent;
444
102
  }
445
- /**
446
- * Registers ButtonConfig with the global defaults map, so
447
- * `setComponentDefaults("button", ...)` is typed without core
448
- * importing anything from this component.
449
- */
450
103
  declare module "../../core/config/global" {
451
104
  interface ComponentConfigMap {
452
105
  button?: Partial<ButtonConfig>;
@@ -1,54 +1,3 @@
1
1
  import { ButtonGroupConfig, ButtonGroupComponent } from "./types.js";
2
- /**
3
- * Creates a new Button Group component
4
- *
5
- * The Button Group component provides a container for grouping related action buttons.
6
- * A standard group holds related actions, each button acting on its own; a
7
- * connected group (`kind: "connected"`, with `selection`) is M3's replacement for
8
- * the segmented button, which material 3.0.0 removed.
9
- *
10
- * Per Material Design 3 specifications:
11
- * - Standard groups space their buttons (18/12/8/8/8dp by size) and a
12
- * pressed button briefly widens while its neighbours narrow
13
- * - Connected groups space their buttons 2dp apart with square inner
14
- * corners and round outer corners; a selected button becomes a pill
15
- * - All buttons share the same variant, size and shape
16
- * - Supports horizontal and vertical orientations
17
- * - Supports density scaling (4dp per step)
18
- *
19
- * @param {ButtonGroupConfig} config - Button Group configuration
20
- * @returns {ButtonGroupComponent} Button Group component instance
21
- *
22
- * @example
23
- * // Create a horizontal button group for text formatting
24
- * const formattingTools = createButtonGroup({
25
- * buttons: [
26
- * { icon: boldIcon, ariaLabel: 'Bold' },
27
- * { icon: italicIcon, ariaLabel: 'Italic' },
28
- * { icon: underlineIcon, ariaLabel: 'Underline' }
29
- * ],
30
- * variant: 'outlined',
31
- * ariaLabel: 'Text formatting options'
32
- * });
33
- *
34
- * // Listen for button clicks
35
- * formattingTools.on('click', (event) => {
36
- * console.log('Button clicked:', event.index);
37
- * });
38
- *
39
- * @example
40
- * // Create a vertical button group with text labels
41
- * const navigationGroup = createButtonGroup({
42
- * buttons: [
43
- * { text: 'Previous', icon: prevIcon },
44
- * { text: 'Play', icon: playIcon },
45
- * { text: 'Next', icon: nextIcon }
46
- * ],
47
- * orientation: 'vertical',
48
- * variant: 'tonal'
49
- * });
50
- *
51
- * @category Components
52
- */
53
2
  declare const createButtonGroup: (config?: ButtonGroupConfig) => ButtonGroupComponent;
54
3
  export default createButtonGroup;
@@ -1,59 +1,29 @@
1
- /**
2
- * Button group variants
3
- * All buttons in the group share the same variant for visual consistency
4
- */
5
1
  export declare const BUTTON_GROUP_VARIANTS: {
6
- /** Primary action buttons with solid background */
7
2
  readonly FILLED: "filled";
8
- /** Secondary action buttons with medium emphasis */
9
3
  readonly TONAL: "tonal";
10
- /** Buttons with outline border (default for button groups per MD3) */
11
4
  readonly OUTLINED: "outlined";
12
- /** Buttons with slight elevation/shadow */
13
5
  readonly ELEVATED: "elevated";
14
- /** Text-only buttons without background or border */
15
6
  readonly TEXT: "text";
16
7
  };
17
- /**
18
- * Button group orientations
19
- */
20
8
  export declare const BUTTON_GROUP_ORIENTATIONS: {
21
- /** Buttons arranged horizontally (default) */
22
9
  readonly HORIZONTAL: "horizontal";
23
- /** Buttons arranged vertically */
24
10
  readonly VERTICAL: "vertical";
25
11
  };
26
- /**
27
- * Density levels for button groups
28
- * Controls sizing and spacing per MD3 density specifications
29
- */
30
12
  export declare const BUTTON_GROUP_DENSITY: {
31
- /** Default size with standard spacing (40px height) */
32
13
  readonly DEFAULT: "default";
33
- /** Reduced size and spacing (36px height) */
34
14
  readonly COMFORTABLE: "comfortable";
35
- /** Minimal size and spacing (32px height) */
36
15
  readonly COMPACT: "compact";
37
16
  };
38
- /**
39
- * Button group events
40
- */
41
17
  export declare const BUTTON_GROUP_EVENTS: {
42
- /** Fired when any button in the group is clicked */
43
18
  readonly CLICK: "click";
44
- /** Fired when a button receives focus */
45
19
  readonly FOCUS: "focus";
46
- /** Fired when a button loses focus */
47
20
  readonly BLUR: "blur";
48
- /** Fired when the selection changes (selection groups) */
49
21
  readonly CHANGE: "change";
50
22
  };
51
- /** Material 3 button group kinds */
52
23
  export declare const BUTTON_GROUP_KINDS: {
53
24
  readonly STANDARD: "standard";
54
25
  readonly CONNECTED: "connected";
55
26
  };
56
- /** Selection behaviour of the group */
57
27
  export declare const BUTTON_GROUP_SELECTION: {
58
28
  readonly NONE: "none";
59
29
  readonly SINGLE: "single";
@@ -70,12 +40,6 @@ export declare const BUTTON_GROUP_SIZES: {
70
40
  readonly L: "l";
71
41
  readonly XL: "xl";
72
42
  };
73
- /**
74
- * Material 3 button group tokens per size (dp): container height, button
75
- * icon size, standard between-space, connected inner corner and its shape
76
- * scale step (m3.material.io button group specs; ButtonGroupSmallTokens.kt and
77
- * ConnectedButtonGroupSmallTokens.kt for the s size)
78
- */
79
43
  export declare const BUTTON_GROUP_SIZE_TOKENS: {
80
44
  readonly xs: {
81
45
  readonly height: 32;
@@ -113,31 +77,12 @@ export declare const BUTTON_GROUP_SIZE_TOKENS: {
113
77
  readonly connectedStep: "large-increased";
114
78
  };
115
79
  };
116
- /** Connected groups use 2dp between buttons at every size */
117
80
  export declare const BUTTON_GROUP_CONNECTED_GAP = 2;
118
- /** Connected pressed inner corner: extra-small (ConnectedButtonGroupSmallTokens.PressedInnerCornerCornerSize) */
119
81
  export declare const BUTTON_GROUP_CONNECTED_PRESSED_CORNER = 4;
120
- /** Connected xs and s groups keep a 48dp minimum width per button */
121
82
  export declare const BUTTON_GROUP_CONNECTED_MIN_WIDTH = 48;
122
- /**
123
- * Standard groups: a pressed button widens by this share of its width and
124
- * its neighbours give up the difference (ButtonGroupDefaults.ExpandedRatio)
125
- */
126
83
  export declare const BUTTON_GROUP_EXPANDED_RATIO = 0.15;
127
- /**
128
- * The most a neighbour gives up when a button in a standard group is pressed:
129
- * the trailing content padding of a button (Compose ButtonGroup compression
130
- * limit, ButtonDefaults.ContentPadding end, BaselineButtonTokens.TrailingSpace).
131
- * It applies to every neighbour, so an icon button with no padding still makes
132
- * room for the pressed button.
133
- */
134
84
  export declare const BUTTON_GROUP_COMPRESSION_LIMIT = 24;
135
- /** Density reduces the container height by 4dp per step */
136
85
  export declare const BUTTON_GROUP_DENSITY_STEP = 4;
137
- /**
138
- * Default configuration values
139
- */
140
- /** Label display in selection groups */
141
86
  export declare const BUTTON_GROUP_LABELS: {
142
87
  readonly ALWAYS: "always";
143
88
  readonly SELECTED: "selected";
@@ -148,58 +93,30 @@ export declare const BUTTON_GROUP_DEFAULTS: {
148
93
  readonly SHAPE: "round";
149
94
  readonly SIZE: "s";
150
95
  readonly LABELS: "always";
151
- /** Default variant (outlined per MD3 button group specs) */
152
96
  readonly VARIANT: "outlined";
153
- /** Default orientation */
154
97
  readonly ORIENTATION: "horizontal";
155
- /** Default density level */
156
98
  readonly DENSITY: "default";
157
- /** Whether ripple effect is enabled by default */
158
99
  readonly RIPPLE: true;
159
- /** Whether buttons have equal width by default */
160
100
  readonly EQUAL_WIDTH: false;
161
- /** Default ripple animation duration in milliseconds */
162
101
  readonly RIPPLE_DURATION: 300;
163
102
  };
164
- /**
165
- * CSS classes for button group elements
166
- * Following BEM naming convention
167
- */
168
103
  export declare const BUTTON_GROUP_CLASSES: {
169
- /** Container element */
170
104
  readonly ROOT: "button-group";
171
- /** Individual button within group */
172
105
  readonly BUTTON: "button-group__button";
173
- /** First button in group */
174
106
  readonly FIRST: "button-group__button--first";
175
- /** Last button in group */
176
107
  readonly LAST: "button-group__button--last";
177
- /** Middle buttons (neither first nor last) */
178
108
  readonly MIDDLE: "button-group__button--middle";
179
- /** Single button (only one in group) */
180
109
  readonly SINGLE: "button-group__button--single";
181
- /** Disabled state */
182
110
  readonly DISABLED: "button-group--disabled";
183
- /** Horizontal orientation */
184
111
  readonly HORIZONTAL: "button-group--horizontal";
185
- /** Vertical orientation */
186
112
  readonly VERTICAL: "button-group--vertical";
187
- /** Equal width buttons */
188
113
  readonly EQUAL_WIDTH: "button-group--equal-width";
189
- /** Filled variant */
190
114
  readonly FILLED: "button-group--filled";
191
- /** Tonal variant */
192
115
  readonly TONAL: "button-group--tonal";
193
- /** Outlined variant */
194
116
  readonly OUTLINED: "button-group--outlined";
195
- /** Elevated variant */
196
117
  readonly ELEVATED: "button-group--elevated";
197
- /** Text variant */
198
118
  readonly TEXT: "button-group--text";
199
- /** Default density */
200
119
  readonly DENSITY_DEFAULT: "button-group--density-default";
201
- /** Comfortable density */
202
120
  readonly DENSITY_COMFORTABLE: "button-group--density-comfortable";
203
- /** Compact density */
204
121
  readonly DENSITY_COMPACT: "button-group--density-compact";
205
122
  };
@@ -1,13 +1,3 @@
1
- /**
2
- * Button Group component exports
3
- *
4
- * The Button Group component provides a container for grouping related action buttons.
5
- * A standard group holds related actions, each button acting on its own; a
6
- * connected group (`kind: "connected"`, with `selection`) is M3's replacement for
7
- * the segmented button, which material 3.0.0 removed.
8
- *
9
- * @packageDocumentation
10
- */
11
1
  export { default as createButtonGroup } from "./button-group.js";
12
2
  export { default } from "./button-group.js";
13
3
  export type { ButtonGroupConfig, ButtonGroupComponent, ButtonGroupItemConfig, ButtonGroupEvent, ButtonGroupEventType, ButtonGroupVariant, ButtonGroupOrientation, ButtonGroupDensity } from "./types.js";