material 3.2.5 → 3.2.7

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 (564) hide show
  1. package/README.md +2 -2
  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/features/items.js +3 -2
  52. package/dist/components/drawer/index.d.ts +0 -4
  53. package/dist/components/drawer/types.d.ts +0 -200
  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 +0 -34
  57. package/dist/components/extended-fab/types.d.ts +0 -654
  58. package/dist/components/fab/constants.d.ts +0 -40
  59. package/dist/components/fab/fab.d.ts +0 -42
  60. package/dist/components/fab/index.d.ts +0 -33
  61. package/dist/components/fab/types.d.ts +0 -543
  62. package/dist/components/fab-menu/constants.d.ts +0 -22
  63. package/dist/components/fab-menu/fab-menu.d.ts +0 -36
  64. package/dist/components/fab-menu/types.d.ts +0 -80
  65. package/dist/components/icon-button/constants.d.ts +0 -90
  66. package/dist/components/icon-button/icon-button.d.ts +0 -83
  67. package/dist/components/icon-button/index.d.ts +0 -44
  68. package/dist/components/icon-button/types.d.ts +0 -314
  69. package/dist/components/index.d.ts +0 -9
  70. package/dist/components/list/constants.d.ts +0 -47
  71. package/dist/components/list/index.d.ts +0 -1
  72. package/dist/components/list/list.d.ts +0 -26
  73. package/dist/components/list/types.d.ts +0 -263
  74. package/dist/components/loading-indicator/constants.d.ts +0 -35
  75. package/dist/components/loading-indicator/features/renderer.d.ts +0 -14
  76. package/dist/components/loading-indicator/loading-indicator.d.ts +0 -6
  77. package/dist/components/loading-indicator/types.d.ts +0 -35
  78. package/dist/components/menu/constants.d.ts +0 -79
  79. package/dist/components/menu/index.d.ts +0 -25
  80. package/dist/components/menu/inner.d.ts +0 -3
  81. package/dist/components/menu/menu.d.ts +0 -26
  82. package/dist/components/menu/types.d.ts +0 -423
  83. package/dist/components/navigation-bar/navigation-bar.d.ts +0 -7
  84. package/dist/components/navigation-bar/types.d.ts +0 -25
  85. package/dist/components/navigation-rail/constants.d.ts +0 -2
  86. package/dist/components/navigation-rail/navigation-rail.d.ts +0 -5
  87. package/dist/components/navigation-rail/types.d.ts +0 -22
  88. package/dist/components/progress/constants.d.ts +24 -56
  89. package/dist/components/progress/progress.d.ts +0 -21
  90. package/dist/components/progress/types.d.ts +0 -251
  91. package/dist/components/radios/constants.d.ts +0 -22
  92. package/dist/components/radios/radios.d.ts +0 -5
  93. package/dist/components/radios/types.d.ts +0 -142
  94. package/dist/components/search/constants.d.ts +0 -59
  95. package/dist/components/search/search.d.ts +0 -32
  96. package/dist/components/search/types.d.ts +0 -159
  97. package/dist/components/select/constants.d.ts +0 -60
  98. package/dist/components/select/index.d.ts +0 -22
  99. package/dist/components/select/select.d.ts +0 -33
  100. package/dist/components/select/types.d.ts +0 -241
  101. package/dist/components/side-sheet/constants.d.ts +0 -28
  102. package/dist/components/side-sheet/side-sheet.d.ts +0 -21
  103. package/dist/components/side-sheet/types.d.ts +0 -82
  104. package/dist/components/slider/constants.d.ts +0 -86
  105. package/dist/components/slider/slider.d.ts +0 -16
  106. package/dist/components/slider/types.d.ts +0 -184
  107. package/dist/components/snackbar/constants.d.ts +0 -73
  108. package/dist/components/snackbar/snackbar.d.ts +0 -13
  109. package/dist/components/snackbar/types.d.ts +0 -147
  110. package/dist/components/split-button/constants.d.ts +0 -33
  111. package/dist/components/split-button/split-button.d.ts +0 -21
  112. package/dist/components/split-button/types.d.ts +0 -81
  113. package/dist/components/switch/constants.d.ts +0 -49
  114. package/dist/components/switch/switch.d.ts +0 -5
  115. package/dist/components/switch/types.d.ts +0 -80
  116. package/dist/components/tabs/constants.d.ts +0 -76
  117. package/dist/components/tabs/indicator.d.ts +0 -27
  118. package/dist/components/tabs/responsive.d.ts +0 -30
  119. package/dist/components/tabs/tab.d.ts +0 -13
  120. package/dist/components/tabs/tab.js +26 -3
  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/badge.js +45 -0
  150. package/dist/core/compose/features/checkable.d.ts +0 -36
  151. package/dist/core/compose/features/debounce.d.ts +0 -57
  152. package/dist/core/compose/features/disabled.d.ts +0 -31
  153. package/dist/core/compose/features/events.d.ts +0 -38
  154. package/dist/core/compose/features/icon.d.ts +0 -49
  155. package/dist/core/compose/features/input.d.ts +0 -82
  156. package/dist/core/compose/features/lifecycle.d.ts +0 -36
  157. package/dist/core/compose/features/position.d.ts +0 -27
  158. package/dist/core/compose/features/ripple.d.ts +0 -29
  159. package/dist/core/compose/features/size.d.ts +0 -9
  160. package/dist/core/compose/features/style.d.ts +0 -9
  161. package/dist/core/compose/features/text.d.ts +0 -45
  162. package/dist/core/compose/features/textinput.d.ts +0 -88
  163. package/dist/core/compose/features/textlabel.d.ts +0 -44
  164. package/dist/core/compose/features/throttle.d.ts +0 -54
  165. package/dist/core/compose/features/track.d.ts +0 -34
  166. package/dist/core/compose/features/variant.d.ts +0 -9
  167. package/dist/core/compose/features/withEvents.d.ts +0 -30
  168. package/dist/core/compose/index.d.ts +0 -4
  169. package/dist/core/compose/pipe.d.ts +0 -55
  170. package/dist/core/compose/utils/type-guards.d.ts +0 -15
  171. package/dist/core/config/component.d.ts +0 -45
  172. package/dist/core/config/global.d.ts +0 -43
  173. package/dist/core/config.d.ts +0 -59
  174. package/dist/core/dom/attributes.d.ts +0 -41
  175. package/dist/core/dom/classes.d.ts +0 -49
  176. package/dist/core/dom/create.d.ts +0 -98
  177. package/dist/core/dom/events.d.ts +0 -52
  178. package/dist/core/dom/focus.d.ts +0 -32
  179. package/dist/core/dom/html.d.ts +0 -24
  180. package/dist/core/dom/layer.d.ts +0 -98
  181. package/dist/core/dom/roving.d.ts +0 -19
  182. package/dist/core/index.d.ts +0 -9
  183. package/dist/core/navigation/destinations.d.ts +0 -14
  184. package/dist/core/navigation/destinations.js +18 -5
  185. package/dist/core/shapes/cubic.d.ts +24 -19
  186. package/dist/core/shapes/material.d.ts +0 -64
  187. package/dist/core/shapes/polygon.d.ts +6 -16
  188. package/dist/core/state/emitter.d.ts +0 -36
  189. package/dist/core/state/events.d.ts +0 -29
  190. package/dist/core/state/store.d.ts +0 -70
  191. package/dist/core/theme/index.d.ts +0 -3
  192. package/dist/core/theme/shape.d.ts +0 -7
  193. package/dist/core/theme/tokens.d.ts +48 -32
  194. package/dist/core/utils/background.d.ts +0 -29
  195. package/dist/core/utils/color.d.ts +0 -13
  196. package/dist/core/utils/index.d.ts +0 -11
  197. package/dist/core/utils/mobile.d.ts +0 -31
  198. package/dist/core/utils/object.d.ts +0 -11
  199. package/dist/core/utils/performance.d.ts +0 -70
  200. package/dist/core/utils/theme.d.ts +0 -36
  201. package/dist/core/utils/url.d.ts +0 -17
  202. package/dist/elements/adapter.d.ts +13 -62
  203. package/dist/elements/badge.d.ts +0 -17
  204. package/dist/elements/bottom-app-bar.d.ts +7 -17
  205. package/dist/elements/bottom-sheet.d.ts +9 -38
  206. package/dist/elements/button-group.d.ts +0 -31
  207. package/dist/elements/button.d.ts +0 -18
  208. package/dist/elements/card.d.ts +8 -24
  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/badge.css +1 -1
  213. package/dist/elements/css/badge.js +1 -1
  214. package/dist/elements/css/navigation-rail.css +1 -1
  215. package/dist/elements/css/navigation-rail.js +1 -1
  216. package/dist/elements/datepicker.d.ts +4 -48
  217. package/dist/elements/define.d.ts +3 -161
  218. package/dist/elements/dialog.d.ts +8 -39
  219. package/dist/elements/divider.d.ts +0 -14
  220. package/dist/elements/drawer.d.ts +0 -35
  221. package/dist/elements/extended-fab.d.ts +6 -18
  222. package/dist/elements/fab-menu.d.ts +5 -30
  223. package/dist/elements/fab.d.ts +4 -17
  224. package/dist/elements/icon-button.d.ts +5 -26
  225. package/dist/elements/index.d.ts +0 -16
  226. package/dist/elements/list.d.ts +0 -34
  227. package/dist/elements/loading-indicator.d.ts +4 -13
  228. package/dist/elements/menu.d.ts +5 -51
  229. package/dist/elements/navigation-bar.d.ts +4 -29
  230. package/dist/elements/navigation-rail.d.ts +8 -49
  231. package/dist/elements/preupgrade/badge.css +2 -2
  232. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  233. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  234. package/dist/elements/preupgrade/button-group.css +1 -1
  235. package/dist/elements/preupgrade/button.css +1 -1
  236. package/dist/elements/preupgrade/card.css +1 -1
  237. package/dist/elements/preupgrade/carousel.css +1 -1
  238. package/dist/elements/preupgrade/checkbox.css +1 -1
  239. package/dist/elements/preupgrade/chips.css +1 -1
  240. package/dist/elements/preupgrade/datepicker.css +1 -1
  241. package/dist/elements/preupgrade/dialog.css +1 -1
  242. package/dist/elements/preupgrade/divider.css +1 -1
  243. package/dist/elements/preupgrade/drawer.css +1 -1
  244. package/dist/elements/preupgrade/extended-fab.css +1 -1
  245. package/dist/elements/preupgrade/fab-menu.css +1 -1
  246. package/dist/elements/preupgrade/fab.css +1 -1
  247. package/dist/elements/preupgrade/icon-button.css +1 -1
  248. package/dist/elements/preupgrade/list.css +1 -1
  249. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  250. package/dist/elements/preupgrade/menu.css +1 -1
  251. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  252. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  253. package/dist/elements/preupgrade/progress.css +1 -1
  254. package/dist/elements/preupgrade/radios.css +1 -1
  255. package/dist/elements/preupgrade/search.css +1 -1
  256. package/dist/elements/preupgrade/select.css +1 -1
  257. package/dist/elements/preupgrade/side-sheet.css +1 -1
  258. package/dist/elements/preupgrade/slider.css +1 -1
  259. package/dist/elements/preupgrade/snackbar.css +1 -1
  260. package/dist/elements/preupgrade/split-button.css +1 -1
  261. package/dist/elements/preupgrade/switch.css +1 -1
  262. package/dist/elements/preupgrade/tabs.css +1 -1
  263. package/dist/elements/preupgrade/text-field.css +1 -1
  264. package/dist/elements/preupgrade/timepicker.css +1 -1
  265. package/dist/elements/preupgrade/toolbar.css +1 -1
  266. package/dist/elements/preupgrade/tooltip.css +1 -1
  267. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  268. package/dist/elements/preupgrade.css +2 -2
  269. package/dist/elements/preupgrade.d.ts +0 -1
  270. package/dist/elements/preupgrade.js +1 -1
  271. package/dist/elements/progress.d.ts +0 -15
  272. package/dist/elements/radios.d.ts +0 -22
  273. package/dist/elements/search.d.ts +5 -53
  274. package/dist/elements/select.d.ts +0 -31
  275. package/dist/elements/side-sheet.d.ts +7 -29
  276. package/dist/elements/slider.d.ts +3 -22
  277. package/dist/elements/snackbar.d.ts +4 -28
  278. package/dist/elements/split-button.d.ts +0 -30
  279. package/dist/elements/styles.d.ts +0 -63
  280. package/dist/elements/switch.d.ts +5 -17
  281. package/dist/elements/tabs.d.ts +0 -22
  282. package/dist/elements/text-field.d.ts +4 -38
  283. package/dist/elements/timepicker.d.ts +4 -44
  284. package/dist/elements/toolbar.d.ts +8 -25
  285. package/dist/elements/tooltip.d.ts +4 -30
  286. package/dist/elements/top-app-bar.d.ts +7 -23
  287. package/dist/index.d.ts +0 -11
  288. package/dist/package.json +1 -1
  289. package/dist/react/create.d.ts +0 -42
  290. package/dist/react/index.d.ts +0 -6
  291. package/dist/react/jsx.d.ts +0 -13
  292. package/dist/solid/create.d.ts +0 -48
  293. package/dist/solid/index.d.ts +0 -6
  294. package/dist/solid/jsx.d.ts +0 -9
  295. package/dist/ssr/index.d.ts +0 -49
  296. package/dist/ssr/solid.d.ts +0 -4
  297. package/dist/ssr/svelte.d.ts +0 -4
  298. package/dist/ssr/vue.d.ts +0 -4
  299. package/dist/styles/badge.css +2 -2
  300. package/dist/styles/base.css +1 -1
  301. package/dist/styles/bottom-app-bar.css +1 -1
  302. package/dist/styles/bottom-sheet.css +1 -1
  303. package/dist/styles/button-group.css +1 -1
  304. package/dist/styles/button.css +1 -1
  305. package/dist/styles/card.css +1 -1
  306. package/dist/styles/carousel.css +1 -1
  307. package/dist/styles/checkbox.css +1 -1
  308. package/dist/styles/chips.css +1 -1
  309. package/dist/styles/contrast.css +1 -1
  310. package/dist/styles/datepicker.css +1 -1
  311. package/dist/styles/dialog.css +1 -1
  312. package/dist/styles/divider.css +1 -1
  313. package/dist/styles/drawer.css +1 -1
  314. package/dist/styles/extended-fab.css +1 -1
  315. package/dist/styles/fab-menu.css +1 -1
  316. package/dist/styles/fab.css +1 -1
  317. package/dist/styles/icon-button.css +1 -1
  318. package/dist/styles/list.css +1 -1
  319. package/dist/styles/loading-indicator.css +1 -1
  320. package/dist/styles/menu.css +1 -1
  321. package/dist/styles/navigation-bar.css +1 -1
  322. package/dist/styles/navigation-rail.css +2 -2
  323. package/dist/styles/progress.css +1 -1
  324. package/dist/styles/radios.css +1 -1
  325. package/dist/styles/search.css +1 -1
  326. package/dist/styles/select.css +1 -1
  327. package/dist/styles/side-sheet.css +1 -1
  328. package/dist/styles/slider.css +1 -1
  329. package/dist/styles/snackbar.css +1 -1
  330. package/dist/styles/split-button.css +1 -1
  331. package/dist/styles/switch.css +1 -1
  332. package/dist/styles/tabs.css +1 -1
  333. package/dist/styles/text-field.css +1 -1
  334. package/dist/styles/timepicker.css +1 -1
  335. package/dist/styles/toolbar.css +1 -1
  336. package/dist/styles/tooltip.css +1 -1
  337. package/dist/styles/top-app-bar.css +1 -1
  338. package/dist/styles/typography.css +1 -1
  339. package/dist/styles/utilities.css +1 -1
  340. package/dist/styles.css +2 -2
  341. package/dist/svelte/runtime.d.ts +8 -62
  342. package/dist/themes/autumn-contrast.css +1 -1
  343. package/dist/themes/autumn.css +1 -1
  344. package/dist/themes/baseline-contrast.css +1 -1
  345. package/dist/themes/baseline.css +1 -1
  346. package/dist/themes/brownbeige-contrast.css +1 -1
  347. package/dist/themes/brownbeige.css +1 -1
  348. package/dist/themes/content-contrast.css +1 -1
  349. package/dist/themes/content.css +1 -1
  350. package/dist/themes/desert-contrast.css +1 -1
  351. package/dist/themes/desert.css +1 -1
  352. package/dist/themes/expressive-contrast.css +1 -1
  353. package/dist/themes/expressive.css +1 -1
  354. package/dist/themes/fidelity-contrast.css +1 -1
  355. package/dist/themes/fidelity.css +1 -1
  356. package/dist/themes/forest-contrast.css +1 -1
  357. package/dist/themes/forest.css +1 -1
  358. package/dist/themes/fruit-salad-contrast.css +1 -1
  359. package/dist/themes/fruit-salad.css +1 -1
  360. package/dist/themes/highcontrast-contrast.css +1 -1
  361. package/dist/themes/highcontrast.css +1 -1
  362. package/dist/themes/monochrome-contrast.css +1 -1
  363. package/dist/themes/monochrome.css +1 -1
  364. package/dist/themes/neutral-contrast.css +1 -1
  365. package/dist/themes/neutral.css +1 -1
  366. package/dist/themes/ocean-contrast.css +1 -1
  367. package/dist/themes/ocean.css +1 -1
  368. package/dist/themes/rainbow-contrast.css +1 -1
  369. package/dist/themes/rainbow.css +1 -1
  370. package/dist/themes/sageivory-contrast.css +1 -1
  371. package/dist/themes/sageivory.css +1 -1
  372. package/dist/themes/spring-contrast.css +1 -1
  373. package/dist/themes/spring.css +1 -1
  374. package/dist/themes/summer-contrast.css +1 -1
  375. package/dist/themes/summer.css +1 -1
  376. package/dist/themes/sunset-contrast.css +1 -1
  377. package/dist/themes/sunset.css +1 -1
  378. package/dist/themes/tealcaramel-contrast.css +1 -1
  379. package/dist/themes/tealcaramel.css +1 -1
  380. package/dist/themes/vibrant-contrast.css +1 -1
  381. package/dist/themes/vibrant.css +1 -1
  382. package/dist/vue/create.d.ts +15 -58
  383. package/dist/vue/index.d.ts +0 -6
  384. package/package.json +1 -1
  385. package/src/styles/components/_badge.scss +75 -38
  386. package/src/styles/components/_navigation-rail.scss +9 -6
  387. package/src/styles/elements/_badge.scss +65 -4
  388. package/dist/components/badge/api.d.ts +0 -41
  389. package/dist/components/badge/config.d.ts +0 -631
  390. package/dist/components/badge/features.d.ts +0 -38
  391. package/dist/components/bottom-app-bar/config.d.ts +0 -16
  392. package/dist/components/bottom-sheet/api.d.ts +0 -44
  393. package/dist/components/bottom-sheet/config.d.ts +0 -547
  394. package/dist/components/bottom-sheet/features/drag.d.ts +0 -35
  395. package/dist/components/bottom-sheet/features/index.d.ts +0 -3
  396. package/dist/components/bottom-sheet/features/state.d.ts +0 -31
  397. package/dist/components/bottom-sheet/features/structure.d.ts +0 -26
  398. package/dist/components/button/api.d.ts +0 -68
  399. package/dist/components/button/config.d.ts +0 -594
  400. package/dist/components/button/features/progress.d.ts +0 -43
  401. package/dist/components/button/features/toggle.d.ts +0 -43
  402. package/dist/components/button-group/config.d.ts +0 -147
  403. package/dist/components/card/api.d.ts +0 -24
  404. package/dist/components/card/config.d.ts +0 -635
  405. package/dist/components/card/features.d.ts +0 -124
  406. package/dist/components/carousel/api.d.ts +0 -20
  407. package/dist/components/carousel/arrangement.d.ts +0 -23
  408. package/dist/components/carousel/config.d.ts +0 -540
  409. package/dist/components/carousel/features/index.d.ts +0 -2
  410. package/dist/components/carousel/features/scroll.d.ts +0 -20
  411. package/dist/components/carousel/features/slides.d.ts +0 -18
  412. package/dist/components/carousel/keylines.d.ts +0 -68
  413. package/dist/components/carousel/strategy.d.ts +0 -36
  414. package/dist/components/checkbox/api.d.ts +0 -7
  415. package/dist/components/checkbox/config.d.ts +0 -568
  416. package/dist/components/chips/api.d.ts +0 -62
  417. package/dist/components/chips/chip/chip.d.ts +0 -4
  418. package/dist/components/chips/chip/constants.d.ts +0 -38
  419. package/dist/components/chips/chip/index.d.ts +0 -1
  420. package/dist/components/chips/config.d.ts +0 -583
  421. package/dist/components/chips/features/chip-items.d.ts +0 -39
  422. package/dist/components/chips/features/container.d.ts +0 -75
  423. package/dist/components/chips/features/controller.d.ts +0 -61
  424. package/dist/components/chips/features/dom.d.ts +0 -24
  425. package/dist/components/chips/features/index.d.ts +0 -4
  426. package/dist/components/chips/schema.d.ts +0 -35
  427. package/dist/components/datepicker/api.d.ts +0 -7
  428. package/dist/components/datepicker/config.d.ts +0 -542
  429. package/dist/components/datepicker/render.d.ts +0 -3
  430. package/dist/components/datepicker/utils.d.ts +0 -84
  431. package/dist/components/dialog/api.d.ts +0 -66
  432. package/dist/components/dialog/config.d.ts +0 -583
  433. package/dist/components/dialog/features.d.ts +0 -42
  434. package/dist/components/divider/features.d.ts +0 -6
  435. package/dist/components/drawer/api.d.ts +0 -55
  436. package/dist/components/drawer/config.d.ts +0 -620
  437. package/dist/components/drawer/features/headline.d.ts +0 -27
  438. package/dist/components/drawer/features/index.d.ts +0 -3
  439. package/dist/components/drawer/features/items.d.ts +0 -32
  440. package/dist/components/drawer/features/state.d.ts +0 -22
  441. package/dist/components/extended-fab/api.d.ts +0 -96
  442. package/dist/components/extended-fab/config.d.ts +0 -600
  443. package/dist/components/fab/api.d.ts +0 -74
  444. package/dist/components/fab/config.d.ts +0 -596
  445. package/dist/components/fab-menu/config.d.ts +0 -11
  446. package/dist/components/fab-menu/stagger.d.ts +0 -10
  447. package/dist/components/icon-button/api.d.ts +0 -84
  448. package/dist/components/icon-button/config.d.ts +0 -624
  449. package/dist/components/icon-button/features/toggle.d.ts +0 -133
  450. package/dist/components/list/api.d.ts +0 -156
  451. package/dist/components/list/config.d.ts +0 -625
  452. package/dist/components/list/features/anatomy.d.ts +0 -6
  453. package/dist/components/list/features/index.d.ts +0 -2
  454. package/dist/components/list/features/renderer.d.ts +0 -8
  455. package/dist/components/list/features/selection.d.ts +0 -3
  456. package/dist/components/loading-indicator/api.d.ts +0 -14
  457. package/dist/components/loading-indicator/config.d.ts +0 -557
  458. package/dist/components/loading-indicator/features/motion.d.ts +0 -22
  459. package/dist/components/menu/api.d.ts +0 -63
  460. package/dist/components/menu/config.d.ts +0 -576
  461. package/dist/components/menu/features/controller.d.ts +0 -15
  462. package/dist/components/menu/features/index.d.ts +0 -5
  463. package/dist/components/menu/features/keyboard.d.ts +0 -23
  464. package/dist/components/menu/features/layer.d.ts +0 -15
  465. package/dist/components/menu/features/loader.d.ts +0 -35
  466. package/dist/components/menu/features/opener.d.ts +0 -16
  467. package/dist/components/menu/features/position.d.ts +0 -18
  468. package/dist/components/menu/features/registry.d.ts +0 -37
  469. package/dist/components/menu/features/submenu.d.ts +0 -28
  470. package/dist/components/menu/features/tasks.d.ts +0 -9
  471. package/dist/components/navigation-bar/config.d.ts +0 -2
  472. package/dist/components/navigation-rail/config.d.ts +0 -2
  473. package/dist/components/progress/api.d.ts +0 -81
  474. package/dist/components/progress/config.d.ts +0 -620
  475. package/dist/components/progress/features/canvas.d.ts +0 -60
  476. package/dist/components/progress/features/circular.d.ts +0 -19
  477. package/dist/components/progress/features/colors.d.ts +0 -17
  478. package/dist/components/progress/features/index.d.ts +0 -8
  479. package/dist/components/progress/features/linear.d.ts +0 -25
  480. package/dist/components/progress/features/motion.d.ts +0 -43
  481. package/dist/components/progress/features/resize-observer.d.ts +0 -5
  482. package/dist/components/progress/features/state.d.ts +0 -44
  483. package/dist/components/radios/api.d.ts +0 -37
  484. package/dist/components/radios/config.d.ts +0 -568
  485. package/dist/components/radios/radio.d.ts +0 -26
  486. package/dist/components/search/api.d.ts +0 -63
  487. package/dist/components/search/config.d.ts +0 -657
  488. package/dist/components/search/features/index.d.ts +0 -4
  489. package/dist/components/search/features/input.d.ts +0 -93
  490. package/dist/components/search/features/states.d.ts +0 -111
  491. package/dist/components/search/features/structure.d.ts +0 -16
  492. package/dist/components/search/features/suggestions.d.ts +0 -60
  493. package/dist/components/select/api.d.ts +0 -8
  494. package/dist/components/select/config.d.ts +0 -18
  495. package/dist/components/select/features.d.ts +0 -14
  496. package/dist/components/side-sheet/api.d.ts +0 -34
  497. package/dist/components/side-sheet/config.d.ts +0 -547
  498. package/dist/components/side-sheet/features/index.d.ts +0 -2
  499. package/dist/components/side-sheet/features/state.d.ts +0 -28
  500. package/dist/components/side-sheet/features/structure.d.ts +0 -21
  501. package/dist/components/slider/api.d.ts +0 -65
  502. package/dist/components/slider/config.d.ts +0 -605
  503. package/dist/components/slider/features/axis.d.ts +0 -42
  504. package/dist/components/slider/features/controller.d.ts +0 -528
  505. package/dist/components/slider/features/dom.d.ts +0 -22
  506. package/dist/components/slider/features/handlers.d.ts +0 -16
  507. package/dist/components/slider/features/index.d.ts +0 -5
  508. package/dist/components/slider/features/range.d.ts +0 -14
  509. package/dist/components/slider/features/states.d.ts +0 -76
  510. package/dist/components/slider/features/tracks.d.ts +0 -50
  511. package/dist/components/snackbar/api.d.ts +0 -7
  512. package/dist/components/snackbar/config.d.ts +0 -596
  513. package/dist/components/snackbar/features.d.ts +0 -26
  514. package/dist/components/snackbar/layer.d.ts +0 -23
  515. package/dist/components/snackbar/position.d.ts +0 -16
  516. package/dist/components/snackbar/queue.d.ts +0 -15
  517. package/dist/components/split-button/api.d.ts +0 -14
  518. package/dist/components/split-button/config.d.ts +0 -553
  519. package/dist/components/split-button/features/buttons.d.ts +0 -8
  520. package/dist/components/split-button/features/menu.d.ts +0 -10
  521. package/dist/components/switch/api.d.ts +0 -7
  522. package/dist/components/switch/config.d.ts +0 -558
  523. package/dist/components/switch/features.d.ts +0 -63
  524. package/dist/components/tabs/api.d.ts +0 -54
  525. package/dist/components/tabs/config.d.ts +0 -31
  526. package/dist/components/tabs/features.d.ts +0 -131
  527. package/dist/components/tabs/scroll-indicators.d.ts +0 -18
  528. package/dist/components/tabs/state.d.ts +0 -48
  529. package/dist/components/text-field/api.d.ts +0 -29
  530. package/dist/components/text-field/config.d.ts +0 -560
  531. package/dist/components/text-field/features/counter.d.ts +0 -29
  532. package/dist/components/text-field/features/density.d.ts +0 -28
  533. package/dist/components/text-field/features/error.d.ts +0 -55
  534. package/dist/components/text-field/features/field.d.ts +0 -37
  535. package/dist/components/text-field/features/index.d.ts +0 -20
  536. package/dist/components/text-field/features/leading-icon.d.ts +0 -68
  537. package/dist/components/text-field/features/placement.d.ts +0 -30
  538. package/dist/components/text-field/features/prefix-text.d.ts +0 -67
  539. package/dist/components/text-field/features/required.d.ts +0 -33
  540. package/dist/components/text-field/features/suffix-text.d.ts +0 -67
  541. package/dist/components/text-field/features/supporting-text.d.ts +0 -59
  542. package/dist/components/timepicker/api.d.ts +0 -26
  543. package/dist/components/timepicker/config.d.ts +0 -570
  544. package/dist/components/timepicker/dial.d.ts +0 -35
  545. package/dist/components/timepicker/render.d.ts +0 -9
  546. package/dist/components/timepicker/utils.d.ts +0 -55
  547. package/dist/components/toolbar/config.d.ts +0 -19
  548. package/dist/components/tooltip/api.d.ts +0 -18
  549. package/dist/components/tooltip/config.d.ts +0 -563
  550. package/dist/components/top-app-bar/config.d.ts +0 -16
  551. package/dist/core/compose/features/constants.d.ts +0 -8
  552. package/dist/core/dom/direction.d.ts +0 -16
  553. package/dist/core/dom/form-value.d.ts +0 -24
  554. package/dist/core/dom/utils.d.ts +0 -33
  555. package/dist/core/navigation/ripple.d.ts +0 -2
  556. package/dist/core/utils/attributes.d.ts +0 -29
  557. package/dist/core/utils/validate.d.ts +0 -73
  558. package/dist/core/utils/warn.d.ts +0 -16
  559. package/dist/elements/form-button.d.ts +0 -29
  560. package/dist/elements/lifecycle.d.ts +0 -4
  561. package/dist/elements/sheet.d.ts +0 -44
  562. package/dist/react/shadow.d.ts +0 -2
  563. package/dist/solid/shadow.d.ts +0 -3
  564. package/dist/vue/shadow.d.ts +0 -7
@@ -1,143 +1,13 @@
1
- /**
2
- * Configuration options for divider components
3
- *
4
- * Controls the appearance, orientation, and behavior of Material Design 3 dividers.
5
- *
6
- * @category Components
7
- */
8
1
  export interface DividerConfig {
9
- /**
10
- * CSS class prefix (defaults to 'mtrl')
11
- *
12
- * Used for generating BEM-style class names for the component
13
- */
14
2
  prefix?: string;
15
- /**
16
- * CSS class to add to the divider
17
- *
18
- * Additional classes for custom styling needs.
19
- * Can be a single class string or an array of class strings.
20
- *
21
- * @example 'my-custom-divider' or ['my-custom-divider', 'special-spacing']
22
- */
23
3
  class?: string | string[];
24
- /**
25
- * Orientation of the divider
26
- *
27
- * - 'horizontal': Creates a horizontal line (default)
28
- * - 'vertical': Creates a vertical line
29
- *
30
- * @default 'horizontal'
31
- *
32
- * @example
33
- * ```typescript
34
- * // Create a vertical divider
35
- * createDivider({ orientation: 'vertical' })
36
- * ```
37
- */
38
4
  orientation?: 'horizontal' | 'vertical';
39
- /**
40
- * Variant of the divider
41
- *
42
- * Controls how the divider is inset within its container:
43
- * - 'full-width': Spans the entire width/height (default)
44
- * - 'inset': Adds space at the start (left for horizontal, top for vertical)
45
- * - 'middle-inset': Adds space at both start and end
46
- *
47
- * Most commonly used in lists to align dividers with text content.
48
- *
49
- * @default 'full-width'
50
- *
51
- * @example
52
- * ```typescript
53
- * // Create a list divider with left inset
54
- * createDivider({ variant: 'inset' })
55
- * ```
56
- */
57
5
  variant?: 'full-width' | 'inset' | 'middle-inset';
58
- /**
59
- * Custom inset value (left margin for horizontal, top margin for vertical)
60
- *
61
- * Overrides the default inset spacing at the start of the divider.
62
- * Only applies when variant is 'inset' or 'middle-inset'.
63
- *
64
- * @default 16 for 'inset' and 'middle-inset' variants
65
- *
66
- * @example
67
- * ```typescript
68
- * // Create a divider with 24px left inset
69
- * createDivider({ variant: 'inset', insetStart: 24 })
70
- * ```
71
- */
72
6
  insetStart?: number;
73
- /**
74
- * Custom inset end value (right margin for horizontal, bottom margin for vertical)
75
- *
76
- * Overrides the default inset spacing at the end of the divider.
77
- * Only applies when variant is 'middle-inset'.
78
- *
79
- * @default 0 for 'inset', 16 for 'middle-inset'
80
- *
81
- * @example
82
- * ```typescript
83
- * // Create a divider with custom insets on both sides
84
- * createDivider({ variant: 'middle-inset', insetStart: 16, insetEnd: 24 })
85
- * ```
86
- */
87
7
  insetEnd?: number;
88
- /**
89
- * Color of the divider
90
- *
91
- * Sets a custom color for the divider. Accepts any valid CSS color value.
92
- * By default, dividers use the 'outline-variant' color from the Material theme.
93
- *
94
- * @example
95
- * ```typescript
96
- * // Create a blue divider
97
- * createDivider({ color: '#2196F3' })
98
- *
99
- * // Create a divider with a semi-transparent color
100
- * createDivider({ color: 'rgba(0, 0, 0, 0.12)' })
101
- * ```
102
- */
103
8
  color?: string;
104
- /**
105
- * Thickness of the divider in pixels
106
- *
107
- * Controls the thickness (height for horizontal, width for vertical) of the divider.
108
- * Material Design 3 typically uses 1px thickness for dividers.
109
- *
110
- * @default 1
111
- *
112
- * @example
113
- * ```typescript
114
- * // Create a bold divider
115
- * createDivider({ thickness: 2 })
116
- * ```
117
- */
118
9
  thickness?: number;
119
- /**
120
- * Used internally for component composition
121
- *
122
- * @internal
123
- */
124
10
  componentName?: string;
125
11
  }
126
- /**
127
- * Default configuration for dividers
128
- *
129
- * @internal
130
- */
131
12
  export declare const defaultConfig: Partial<DividerConfig>;
132
- /**
133
- * Creates a base configuration object for divider
134
- *
135
- * Merges user-provided configuration with default values and ensures
136
- * all required properties have values.
137
- *
138
- * @param config - User provided configuration
139
- * @returns Complete configuration with defaults applied
140
- *
141
- * @internal
142
- */
143
13
  export declare const createBaseConfig: (config?: DividerConfig) => DividerConfig;
@@ -1,45 +1,18 @@
1
- /**
2
- * Divider orientation options
3
- */
4
1
  export declare const DIVIDER_ORIENTATIONS: {
5
- /** Horizontal divider (default) */
6
2
  readonly HORIZONTAL: "horizontal";
7
- /** Vertical divider */
8
3
  readonly VERTICAL: "vertical";
9
4
  };
10
- /**
11
- * Divider variant options
12
- */
13
5
  export declare const DIVIDER_VARIANTS: {
14
- /** Spans the entire width/height of the container (default) */
15
6
  readonly FULL_WIDTH: "full-width";
16
- /** Adds space at the start (left for horizontal, top for vertical) */
17
7
  readonly INSET: "inset";
18
- /** Adds space at both start and end */
19
8
  readonly MIDDLE_INSET: "middle-inset";
20
9
  };
21
- /**
22
- * Default divider thickness in pixels
23
- * Following Material Design 3 guidelines
24
- */
25
10
  export declare const DEFAULT_DIVIDER_THICKNESS = 1;
26
- /**
27
- * Default inset value in pixels
28
- * Applied when variant is 'inset' or 'middle-inset'
29
- */
30
11
  export declare const DEFAULT_INSET_VALUE = 16;
31
- /**
32
- * CSS classes used by the divider component
33
- */
34
12
  export declare const DIVIDER_CLASSES: {
35
- /** Root divider element */
36
13
  readonly ROOT: "divider";
37
- /** Applied to horizontal dividers */
38
14
  readonly HORIZONTAL: "divider--horizontal";
39
- /** Applied to vertical dividers */
40
15
  readonly VERTICAL: "divider--vertical";
41
- /** Applied to inset dividers */
42
16
  readonly INSET: "divider--inset";
43
- /** Applied to middle-inset dividers */
44
17
  readonly MIDDLE_INSET: "divider--middle-inset";
45
18
  };
@@ -1,39 +1,3 @@
1
1
  import { DividerConfig } from "./config.js";
2
2
  import { DividerComponent } from "./types.js";
3
- /**
4
- * Creates a new Divider component with the specified configuration.
5
- *
6
- * Dividers are thin lines that separate content into distinct sections following
7
- * Material Design 3 guidelines. They can be horizontal or vertical, and offer
8
- * various customization options for inset, thickness, and color.
9
- *
10
- * @param config - Divider configuration options
11
- * @returns Divider component instance with methods for managing appearance and behavior
12
- *
13
- * @throws {Error} If divider creation fails due to invalid configuration
14
- *
15
- * @category Components
16
- *
17
- * @example
18
- * ```typescript
19
- * // Create a basic horizontal divider
20
- * const divider = createDivider();
21
- * container.appendChild(divider.element);
22
- *
23
- * // Create a vertical divider with custom styling
24
- * const separator = createDivider({
25
- * orientation: 'vertical',
26
- * thickness: 2,
27
- * color: '#2196F3',
28
- * variant: 'middle-inset',
29
- * insetStart: 8,
30
- * insetEnd: 8
31
- * });
32
- *
33
- * // Later, change the divider's appearance
34
- * divider.setColor('var(--mtrl-sys-color-outline)');
35
- * divider.setThickness(1);
36
- * divider.setVariant('inset');
37
- * ```
38
- */
39
3
  export declare const createDivider: (config?: DividerConfig) => DividerComponent;
@@ -1,32 +1,3 @@
1
- /**
2
- * @module Divider
3
- *
4
- * The Divider component provides horizontal or vertical lines that separate content into distinct sections.
5
- * Dividers follow Material Design 3 guidelines for separating content in lists, layouts, and other UI containers.
6
- *
7
- * Features:
8
- * - Horizontal and vertical orientations
9
- * - Multiple inset variants (full-width, inset, middle-inset)
10
- * - Customizable thickness and color
11
- * - Responsive to parent container
12
- *
13
- * @example
14
- * ```typescript
15
- * // Create a standard horizontal divider
16
- * const divider = createDivider();
17
- * document.body.appendChild(divider.element);
18
- *
19
- * // Create a vertical divider with custom styles
20
- * const verticalDivider = createDivider({
21
- * orientation: 'vertical',
22
- * thickness: 2,
23
- * color: '#2196F3',
24
- * variant: 'middle-inset'
25
- * });
26
- * ```
27
- *
28
- * @category Components
29
- */
30
1
  import { createDivider } from "./divider.js";
31
2
  export { createDivider, createDivider as default };
32
3
  export type { DividerConfig } from "./config.js";
@@ -1,142 +1,16 @@
1
1
  import { BaseComponent, ElementComponent } from "../../core/compose/index.js";
2
- /**
3
- * The three slices of a divider, one per enhancer in features.ts.
4
- *
5
- * Each is its own interface rather than a Pick of DividerComponent: an indexed
6
- * access binds `this` to the type being indexed, so a setter reached through a
7
- * Pick reports the whole DividerComponent instead of the component it was
8
- * called on -- which is the defect these setters used to paper over with
9
- * `return this as unknown as DividerComponent`.
10
- */
11
2
  export interface DividerOrientation {
12
- /**
13
- * Gets current orientation of the divider
14
- *
15
- * @returns Current orientation ('horizontal' or 'vertical')
16
- *
17
- * @example
18
- * ```typescript
19
- * const divider = createDivider();
20
- * const orientation = divider.getOrientation(); // Returns 'horizontal' by default
21
- * ```
22
- */
23
3
  getOrientation(): 'horizontal' | 'vertical';
24
- /**
25
- * Sets orientation of the divider
26
- *
27
- * Changes the divider's orientation between horizontal (default) and vertical.
28
- * This affects the divider's positioning, dimension constraints, and how insets are applied.
29
- *
30
- * @param orientation - New orientation ('horizontal' or 'vertical')
31
- * @returns DividerComponent instance for chaining
32
- *
33
- * @example
34
- * ```typescript
35
- * // Change a divider from horizontal to vertical
36
- * divider.setOrientation('vertical');
37
- * ```
38
- */
39
4
  setOrientation(orientation: 'horizontal' | 'vertical'): this;
40
5
  }
41
- /** The inset slice. See DividerOrientation for why these are split. */
42
6
  export interface DividerInset {
43
- /**
44
- * Gets current variant of the divider
45
- *
46
- * @returns Current variant ('full-width', 'inset', or 'middle-inset')
47
- *
48
- * @example
49
- * ```typescript
50
- * const variant = divider.getVariant(); // Returns 'full-width' by default
51
- * ```
52
- */
53
7
  getVariant(): 'full-width' | 'inset' | 'middle-inset';
54
- /**
55
- * Sets variant of the divider
56
- *
57
- * Changes how the divider is inset within its container:
58
- * - 'full-width': Spans the entire width/height of the container (default)
59
- * - 'inset': Adds space at the start (left for horizontal, top for vertical)
60
- * - 'middle-inset': Adds space at both start and end
61
- *
62
- * @param variant - New variant
63
- * @returns DividerComponent instance for chaining
64
- *
65
- * @example
66
- * ```typescript
67
- * // Create a list divider with left inset
68
- * divider.setVariant('inset');
69
- *
70
- * // Create a divider with space on both sides
71
- * divider.setVariant('middle-inset');
72
- * ```
73
- */
74
8
  setVariant(variant: 'full-width' | 'inset' | 'middle-inset'): this;
75
- /**
76
- * Sets custom inset values for the divider
77
- *
78
- * Allows fine-grained control over inset spacing, overriding the default values
79
- * applied by the variant. Only applies if variant is 'inset' or 'middle-inset'.
80
- *
81
- * @param insetStart - Start inset value in pixels (left for horizontal, top for vertical)
82
- * @param insetEnd - End inset value in pixels (right for horizontal, bottom for vertical)
83
- * @returns DividerComponent instance for chaining
84
- *
85
- * @example
86
- * ```typescript
87
- * // Create a divider with custom insets
88
- * const divider = createDivider({ variant: 'inset' });
89
- * divider.setInset(24, 8); // 24px from start, 8px from end
90
- * ```
91
- */
92
9
  setInset(insetStart?: number, insetEnd?: number): this;
93
10
  }
94
- /** The style slice. See DividerOrientation for why these are split. */
95
11
  export interface DividerStyle {
96
- /**
97
- * Sets thickness of the divider
98
- *
99
- * Changes the divider's thickness (height for horizontal, width for vertical).
100
- * The default thickness is 1px, following Material Design 3 guidelines.
101
- *
102
- * @param thickness - Thickness in pixels
103
- * @returns DividerComponent instance for chaining
104
- *
105
- * @example
106
- * ```typescript
107
- * // Create a bold divider
108
- * divider.setThickness(2);
109
- * ```
110
- */
111
12
  setThickness(thickness: number): this;
112
- /**
113
- * Sets custom color for the divider
114
- *
115
- * By default, dividers use the 'outline-variant' color from the theme.
116
- * This method allows setting a custom color via any valid CSS color value.
117
- *
118
- * @param color - CSS color value (hex, rgb, rgba, hsl, etc.)
119
- * @returns DividerComponent instance for chaining
120
- *
121
- * @example
122
- * ```typescript
123
- * // Create a blue divider
124
- * divider.setColor('#2196F3');
125
- *
126
- * // Create a semi-transparent divider
127
- * divider.setColor('rgba(0, 0, 0, 0.12)');
128
- * ```
129
- */
130
13
  setColor(color: string): this;
131
14
  }
132
- /**
133
- * Divider component interface
134
- *
135
- * Represents a Material Design 3 divider that separates content into distinct
136
- * sections. Provides methods for configuring the appearance, orientation, and
137
- * inset behavior.
138
- *
139
- * @category Components
140
- */
141
15
  export interface DividerComponent extends BaseComponent, ElementComponent, DividerOrientation, DividerInset, DividerStyle {
142
16
  }
@@ -1,99 +1,46 @@
1
- /**
2
- * Drawer variants matching MD3 navigation drawer specification
3
- */
4
1
  export declare const DRAWER_VARIANTS: {
5
- /** Standard drawer — inline, can be permanently visible or toggled */
6
2
  readonly STANDARD: "standard";
7
- /** Modal drawer — overlays content with scrim, for compact/medium screens */
8
3
  readonly MODAL: "modal";
9
4
  };
10
- /**
11
- * Drawer positions (anchor edge)
12
- */
13
5
  export declare const DRAWER_POSITIONS: {
14
- /** Start edge (left in LTR, right in RTL) — default per MD3 */
15
6
  readonly START: "start";
16
- /** End edge (right in LTR, left in RTL) */
17
7
  readonly END: "end";
18
8
  };
19
- /**
20
- * Drawer item types for the items configuration array
21
- */
22
9
  export declare const DRAWER_ITEM_TYPES: {
23
- /** Navigation destination item */
24
10
  readonly ITEM: "item";
25
- /** Visual separator between groups */
26
11
  readonly DIVIDER: "divider";
27
- /** Section label / subhead for grouping */
28
12
  readonly SECTION: "section";
29
13
  };
30
- /**
31
- * Drawer events
32
- */
33
14
  export declare const DRAWER_EVENTS: {
34
- /** Fired when the drawer opens */
35
15
  readonly OPEN: "open";
36
- /** Fired when the drawer closes */
37
16
  readonly CLOSE: "close";
38
- /** Fired when a navigation item is selected */
39
17
  readonly SELECT: "select";
40
18
  };
41
- /**
42
- * CSS classes used by the drawer component
43
- */
44
19
  export declare const DRAWER_CLASSES: {
45
- /** Root container */
46
20
  readonly ROOT: "drawer";
47
- /** Scrim overlay (modal variant only) */
48
21
  readonly SCRIM: "drawer__scrim";
49
- /** Inner sheet / panel */
50
22
  readonly SHEET: "drawer__sheet";
51
- /** Headline text */
52
23
  readonly HEADLINE: "drawer__headline";
53
- /** Scrollable items container */
54
24
  readonly ITEMS: "drawer__items";
55
- /** Single navigation item */
56
25
  readonly ITEM: "drawer__item";
57
- /** Item icon */
58
26
  readonly ITEM_ICON: "drawer__item-icon";
59
- /** Item label text */
60
27
  readonly ITEM_LABEL: "drawer__item-label";
61
- /** Item badge */
62
28
  readonly ITEM_BADGE: "drawer__item-badge";
63
- /** Active indicator shape */
64
29
  readonly ACTIVE_INDICATOR: "drawer__active-indicator";
65
- /** Dense/compact variant */
66
30
  readonly DENSE: "drawer--dense";
67
- /** Divider separator */
68
31
  readonly DIVIDER: "drawer__divider";
69
- /** Section label */
70
32
  readonly SECTION_LABEL: "drawer__section-label";
71
33
  };
72
- /**
73
- * Default animation configuration
74
- */
75
34
  export declare const DRAWER_ANIMATION: {
76
- /** Animation duration in milliseconds */
77
35
  readonly DURATION: 300;
78
- /** Easing for opening */
79
36
  readonly EASING_OPEN: "cubic-bezier(0.0, 0.0, 0.2, 1.0)";
80
- /** Easing for closing */
81
37
  readonly EASING_CLOSE: "cubic-bezier(0.3, 0.0, 1.0, 1.0)";
82
38
  };
83
- /**
84
- * Drawer default values
85
- */
86
39
  export declare const DRAWER_DEFAULTS: {
87
- /** Default variant */
88
40
  readonly VARIANT: "standard";
89
- /** Default position */
90
41
  readonly POSITION: "start";
91
- /** Whether drawer is open by default */
92
42
  readonly OPEN: false;
93
- /** Whether modal can be dismissed via scrim */
94
43
  readonly DISMISSIBLE: true;
95
- /** Default drawer width in pixels */
96
44
  readonly WIDTH: 360;
97
- /** Whether items ripple on press */
98
45
  readonly RIPPLE: true;
99
46
  };
@@ -1,59 +1,3 @@
1
1
  import { DrawerConfig, DrawerComponent } from "./types.js";
2
- /**
3
- * Creates a new Drawer component with the specified configuration.
4
- *
5
- * The Drawer component implements Material Design 3 navigation drawer with
6
- * support for standard (inline) and modal (overlay) variants. It provides
7
- * navigation destinations with icons, labels, badges, dividers, and section
8
- * labels following the MD3 specification.
9
- *
10
- * The Drawer component is created using a functional composition pattern,
11
- * applying various features through the pipe function.
12
- *
13
- * @param {DrawerConfig} config - Configuration options for the drawer
14
- * This can include variant, items, headline, position, open state,
15
- * and other drawer properties. See {@link DrawerConfig} for available options.
16
- *
17
- * @returns {DrawerComponent} A fully configured drawer component instance with
18
- * all requested features applied. The returned component has methods for
19
- * state management, item selection, and lifecycle management.
20
- *
21
- * @throws {Error} Throws an error if drawer creation fails for any reason
22
- *
23
- * @example
24
- * ```ts
25
- * // Create a standard navigation drawer
26
- * const drawer = createDrawer({
27
- * variant: 'standard',
28
- * headline: 'Mail',
29
- * open: true,
30
- * items: [
31
- * { id: 'inbox', label: 'Inbox', icon: '<svg>...</svg>', badge: '24', active: true },
32
- * { id: 'outbox', label: 'Outbox', icon: '<svg>...</svg>' },
33
- * { type: 'divider' },
34
- * { type: 'section', label: 'Labels' },
35
- * { id: 'family', label: 'Family', icon: '<svg>...</svg>' },
36
- * ],
37
- * onSelect: (event) => console.log('Selected:', event.id),
38
- * });
39
- *
40
- * document.body.appendChild(drawer.element);
41
- *
42
- * // Create a modal drawer
43
- * const modalDrawer = createDrawer({
44
- * variant: 'modal',
45
- * headline: 'Navigation',
46
- * items: [
47
- * { id: 'home', label: 'Home', icon: '<svg>...</svg>', active: true },
48
- * { id: 'settings', label: 'Settings', icon: '<svg>...</svg>' },
49
- * ],
50
- * });
51
- *
52
- * document.body.appendChild(modalDrawer.element);
53
- * modalDrawer.open();
54
- * ```
55
- *
56
- * @category Components
57
- */
58
2
  declare const createDrawer: (config?: DrawerConfig) => DrawerComponent;
59
3
  export default createDrawer;
@@ -2,6 +2,7 @@ import { DRAWER_EVENTS } from "../constants.js";
2
2
  import { createRipple, } from "../../../core/compose/features/ripple.js";
3
3
  import { setHTML } from "../../../core/dom/html.js";
4
4
  import { activeElementOf } from "../../../core/dom/focus.js";
5
+ const hasBadge = (badge) => !!badge && badge !== "0";
5
6
  const createItemElement = (item, getClass) => {
6
7
  const el = document.createElement("button");
7
8
  el.className = getClass("drawer__item");
@@ -30,7 +31,7 @@ const createItemElement = (item, getClass) => {
30
31
  labelEl.textContent = item.label;
31
32
  el.appendChild(labelEl);
32
33
  }
33
- if (item.badge) {
34
+ if (hasBadge(item.badge)) {
34
35
  const badgeEl = document.createElement("span");
35
36
  badgeEl.className = getClass("drawer__item-badge");
36
37
  badgeEl.textContent = item.badge;
@@ -143,7 +144,7 @@ export const withItems = (config) => (component) => {
143
144
  if (!itemEl)
144
145
  return;
145
146
  let badgeEl = itemEl.querySelector(`.${component.getClass("drawer__item-badge")}`);
146
- if (badge) {
147
+ if (hasBadge(badge)) {
147
148
  if (!badgeEl) {
148
149
  badgeEl = document.createElement("span");
149
150
  badgeEl.className = component.getClass("drawer__item-badge");
@@ -1,6 +1,2 @@
1
- /**
2
- * Drawer component module
3
- * @module components/drawer
4
- */
5
1
  export { default, default as createDrawer } from "./drawer.js";
6
2
  export type { DrawerConfig, DrawerComponent, DrawerVariant, DrawerPosition, DrawerItemConfig, DrawerSelectEvent, DrawerEvents, } from "./types.js";