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,69 +1,17 @@
1
- /**
2
- * @module core/dom
3
- * @description DOM manipulation utilities
4
- */
5
- /**
6
- * Event manager interface for handling DOM events
7
- */
8
1
  export interface EventManager {
9
- /**
10
- * Add an event listener with options
11
- * @param event - Event name
12
- * @param handler - Event handler
13
- * @param options - addEventListener options
14
- * @returns EventManager instance for chaining
15
- */
16
2
  on: <T extends Event>(event: string, handler: (e: T) => void, options?: AddEventListenerOptions) => EventManager;
17
- /**
18
- * Remove an event listener
19
- * @param event - Event name
20
- * @param handler - Event handler
21
- * @returns EventManager instance for chaining
22
- */
23
3
  off: <T extends Event>(event: string, handler: (e: T) => void) => EventManager;
24
- /**
25
- * Temporarily disable all event listeners
26
- * @returns EventManager instance for chaining
27
- */
28
4
  pause: () => EventManager;
29
- /**
30
- * Re-enable all event listeners
31
- * @returns EventManager instance for chaining
32
- */
33
5
  resume: () => EventManager;
34
- /**
35
- * Remove all event listeners and clean up
36
- */
37
6
  destroy: () => void;
38
- /**
39
- * Get all active handlers
40
- * @returns Map of active handlers
41
- */
42
7
  getHandlers: () => Map<string, HandlerInfo>;
43
- /**
44
- * Check if a specific handler exists
45
- * @param event - Event name
46
- * @param handler - Event handler
47
- * @returns Whether handler exists
48
- */
49
8
  hasHandler: <T extends Event>(event: string, handler: (e: T) => void) => boolean;
50
9
  }
51
- /**
52
- * Handler information
53
- */
54
10
  interface HandlerInfo {
55
11
  original: EventListener;
56
12
  enhanced: EventListener;
57
13
  event: string;
58
14
  options: AddEventListenerOptions;
59
15
  }
60
- /**
61
- * Creates an event manager to handle DOM events with enhanced functionality.
62
- * Provides a robust interface for managing event listeners with error handling,
63
- * cleanup, and lifecycle management.
64
- *
65
- * @param element - DOM element to attach events to
66
- * @returns Event manager interface
67
- */
68
16
  export declare const createEventManager: (element: HTMLElement) => EventManager;
69
17
  export {};
@@ -1,36 +1,4 @@
1
- /**
2
- * The focused element as seen from a node's own root: the shadow root it
3
- * lives in, or the document.
4
- *
5
- * `document.activeElement` stops at the shadow host when focus is inside a
6
- * shadow root, so a component rendered in one never finds its focused item
7
- * there. A detached node has neither root, and gets the document's.
8
- *
9
- * @param node - A node of the component, usually its element
10
- * @returns The active element of that node's root, or null
11
- */
12
1
  export declare const activeElementOf: (node: Node) => Element | null;
13
- /**
14
- * The element that really has focus, looked for through open shadow roots:
15
- * where focus goes back to after an overlay closes, when the overlay may sit
16
- * in another root than whatever opened it.
17
- *
18
- * @returns The innermost focused element, or null
19
- */
20
2
  export declare const deepActiveElement: () => Element | null;
21
- /**
22
- * The tab stops in a container, in the order Tab reaches them: through slots
23
- * to what is assigned to them and into shadow roots, which is where the
24
- * content of a web component sits. Slots are told by shape, as the roots are
25
- * above.
26
- */
27
3
  export declare const tabStops: (container: Element) => HTMLElement[];
28
- /**
29
- * Keeps Tab inside a modal: from its last tab stop to its first, and Shift+Tab
30
- * from the first (or the modal itself) to the last. Between them the browser
31
- * moves focus as it always does. For a keydown listener on the modal.
32
- *
33
- * @param container - The modal, which the keydown reached
34
- * @param event - The keydown
35
- */
36
4
  export declare const wrapTab: (container: HTMLElement, event: KeyboardEvent) => void;
@@ -1,34 +1,10 @@
1
- /** A value the browser's Trusted Types API accepts for innerHTML. */
2
1
  export interface TrustedHTMLLike {
3
2
  toString(): string;
4
3
  }
5
- /** Markup a component accepts: a string, or a TrustedHTML from a policy. */
6
4
  export type HTMLInput = string | TrustedHTMLLike;
7
5
  export interface HTMLPolicy {
8
- /**
9
- * Called with every markup string before it is written. Return the markup
10
- * to write: a sanitized string, or a TrustedHTML from a Trusted Types
11
- * policy. Values that are already TrustedHTML are not passed through it.
12
- */
13
6
  sanitize: (html: string) => HTMLInput;
14
7
  }
15
- /**
16
- * Sets the policy every component's markup goes through, or clears it with
17
- * null.
18
- *
19
- * @example
20
- * // DOMPurify
21
- * configureHTML({ sanitize: (html) => DOMPurify.sanitize(html) });
22
- *
23
- * // Trusted Types: a policy the page's CSP allows
24
- * const trusted = window.trustedTypes.createPolicy('app', { createHTML: (html) => DOMPurify.sanitize(html) });
25
- * configureHTML({ sanitize: (html) => trusted.createHTML(html) });
26
- */
27
8
  export declare const configureHTML: (next: HTMLPolicy | null) => void;
28
- /** The policy in force, if any. */
29
9
  export declare const getHTMLPolicy: () => HTMLPolicy | null;
30
- /**
31
- * Writes markup into an element, through the policy when one is set.
32
- * An empty string empties the element without touching innerHTML.
33
- */
34
10
  export declare const setHTML: (element: Element, html: HTMLInput | null | undefined) => void;
@@ -1,117 +1,19 @@
1
- /**
2
- * How an element is promoted to the browser's top layer:
3
- * - `popover-auto`: `popover="auto"`, which the browser light-dismisses (a
4
- * click outside, Escape, another auto popover opening)
5
- * - `popover-manual`: `popover="manual"`, closed only by its owner
6
- * - `modal`: a `<dialog>` shown with `showModal()`, which makes the rest of
7
- * the page inert and closes on Escape
8
- */
9
1
  export type TopLayerKind = "popover-auto" | "popover-manual" | "modal";
10
2
  export interface TopLayerOptions {
11
3
  kind: TopLayerKind;
12
4
  }
13
- /**
14
- * Whether the browser can show an element of this kind in the top layer:
15
- * `showPopover` for the popovers, `HTMLDialogElement.prototype.showModal` for
16
- * a modal.
17
- *
18
- * @param kind - The kind of top-layer element
19
- * @returns True where the browser supports it
20
- */
21
5
  export declare const supportsTopLayer: (kind: TopLayerKind) => boolean;
22
- /**
23
- * Shows an element in the top layer, above everything else on the page
24
- * whatever its z-index and whatever clips or transforms its ancestors. The
25
- * element stays where it is in the DOM, so it keeps the styles of its tree,
26
- * a shadow root's included.
27
- *
28
- * The element must be connected, and for `modal` be a `<dialog>`. Showing an
29
- * element already shown does nothing.
30
- *
31
- * Where the browser has no support for the kind, nothing changes and false is
32
- * returned: the caller keeps its own positioning and stacking, which is what
33
- * it did before the top layer.
34
- *
35
- * @param element - The element to show
36
- * @param options - The kind of top-layer element
37
- * @returns True when the element is in the top layer
38
- */
39
6
  export declare const showInTopLayer: (element: HTMLElement, { kind }: TopLayerOptions) => boolean;
40
- /**
41
- * Takes an element out of the top layer. Does nothing when it is not shown.
42
- * This close is not reported to onTopLayerClose.
43
- *
44
- * @param element - The element shown with showInTopLayer
45
- */
46
7
  export declare const hideFromTopLayer: (element: HTMLElement) => void;
47
- /**
48
- * Reports the closes the browser makes on its own: a light dismiss or Escape
49
- * for `popover="auto"` (a `toggle` event to `closed`), Escape or a form for a
50
- * modal dialog (its `close` event, which follows an uncanceled `cancel`).
51
- * Closes made with hideFromTopLayer are not reported, nor is a close the
52
- * element was shown again after.
53
- *
54
- * @param element - The element shown with showInTopLayer
55
- * @param callback - Called once for each close
56
- * @returns A function that stops the reports
57
- */
58
8
  export declare const onTopLayerClose: (element: HTMLElement, callback: () => void) => (() => void);
59
- /**
60
- * A modal outside the top layer: makes everything but `keep` inert,
61
- * as showModal() does for a top-layer dialog. The siblings of `keep` and of
62
- * each of its ancestors, up to the body, crossing shadow roots, get `inert`;
63
- * elements already inert are left alone. Returns the undo, which removes
64
- * `inert` from exactly the elements it set it on.
65
- */
66
9
  export declare const inertOutside: (keep: Element) => (() => void);
67
- /** What eventsFrom returns: see there. */
68
10
  export interface EventsFrom {
69
- /** Whether the event's dispatch began after the call */
70
11
  after: (event: Event) => boolean;
71
- /** Releases the marker. Harmless when called again. */
72
12
  stop: () => void;
73
13
  }
74
- /**
75
- * Tells the events that came after this call from the one that was already
76
- * on its way: "the event that opened an overlay never dismisses it".
77
- *
78
- * An overlay adds its dismiss listeners in `open()`, and the click or the key
79
- * press that called `open()` then reaches them, on its way up. It is not
80
- * told apart by time (event times are whole milliseconds in some browsers,
81
- * and equal times cannot be ordered) nor by the task (a real key press can
82
- * be delivered before any timer has run), but by the dispatch itself: every
83
- * event passes the window's capture phase first, where one listener numbers
84
- * it. An event numbered after the call came after it; the one in flight has
85
- * an earlier number, or none.
86
- *
87
- * The browser's own `cancel` for a modal `<dialog>` is not covered: it is a
88
- * new event, created after `open()` (see `ModalEscape.opening`).
89
- *
90
- * @param element - An element of the overlay, which says which window it is in
91
- * @returns `after(event)`, and `stop()` for when the overlay closes
92
- */
93
14
  export declare const eventsFrom: (element: HTMLElement) => EventsFrom;
94
- /** A modal's place in the Escape stack: see onModalEscape. */
95
15
  export interface ModalEscape {
96
- /**
97
- * True for the rest of the task the modal opened in, for the one event the
98
- * marker cannot number: the `cancel` the browser sends the topmost modal
99
- * `<dialog>` for the key press that opened it, when the page stopped that
100
- * key press before it reached the window.
101
- */
102
16
  opening: boolean;
103
- /** Takes the modal off the stack. Harmless when called again. */
104
17
  stop: () => void;
105
18
  }
106
- /**
107
- * Escape for a modal, handled as a key press. One bubble listener on the
108
- * window serves every open modal: after the listeners on the document, so
109
- * whatever is open inside the modal keeps a key it has used, and wherever
110
- * focus is, the body included. Only the topmost modal is told, and never for
111
- * the key press that opened it (see eventsFrom).
112
- *
113
- * @param element - The modal's element, which says which window it is in
114
- * @param escape - Called for an Escape that is the modal's: it closes, or refuses
115
- * @returns The modal's entry: `opening`, and `stop()` for when it closes
116
- */
117
19
  export declare const onModalEscape: (element: HTMLElement, escape: () => void) => ModalEscape;
@@ -1,30 +1,11 @@
1
- /**
2
- * Whether the arrow keys, Home and End belong to an element: a text input, a
3
- * textarea or editable content, where they move the caret.
4
- */
5
1
  export declare const isTextEditable: (element: EventTarget | null | undefined) => boolean;
6
2
  export interface RovingOptions {
7
- /** The composite: it receives the key and focus listeners. */
8
3
  container: HTMLElement;
9
- /**
10
- * The focus targets in order. A target is an element that takes focus itself:
11
- * a control, or the host of a web component that delegates focus to one.
12
- */
13
4
  targets: () => HTMLElement[];
14
- /** Whether Up and Down move focus instead of Left and Right. */
15
5
  vertical?: () => boolean;
16
6
  }
17
7
  export interface Roving {
18
- /** Puts the one tab stop back on the current target, or the first enabled one. */
19
8
  sync(): void;
20
- /** Removes the listeners. */
21
9
  destroy(): void;
22
10
  }
23
- /**
24
- * A roving tab index over a composite's focus targets (the WAI-ARIA toolbar
25
- * pattern): one tab stop, kept on the target focused last; the arrow keys along
26
- * the layout, Left and Right following the reading direction; Home and End to
27
- * the ends. Disabled targets are skipped and the ends do not wrap. Inside a
28
- * text input the keys stay with the caret.
29
- */
30
11
  export declare const createRoving: ({ container, targets, vertical }: RovingOptions) => Roving;
@@ -1,12 +1,3 @@
1
- /**
2
- * @module core
3
- * @description Core utilities and building blocks for the component system
4
- *
5
- * This module provides the foundational elements used to build components
6
- * in a functional, composable way.
7
- *
8
- * @packageDocumentation
9
- */
10
1
  export * from "./compose/index.js";
11
2
  export * from "./dom/index.js";
12
3
  export { schemeToTokens, THEME_ROLES } from "./theme/index.js";
@@ -1,33 +1,19 @@
1
- /** One destination, as both components take it. */
2
1
  export interface DestinationConfig {
3
2
  id: string;
4
3
  label: string;
5
- /** Markup (HTML). Not sanitized by default: see Markup and sanitizing. */
6
4
  icon: string;
7
- /** Markup (HTML). Not sanitized by default: see Markup and sanitizing. Shown while this destination is active. */
8
5
  activeIcon?: string;
9
6
  href?: string;
10
- /** A count, a short text, or `true` for the dot */
11
7
  badge?: string | number | boolean;
12
8
  badgeLabel?: string;
13
9
  active?: boolean;
14
10
  disabled?: boolean;
15
11
  }
16
- /** The component's class for a part: `__item`, `__badge`, … */
17
12
  export type PartClass = (part: string) => string;
18
- /** A copy of the items with unique ids, labels and icons, and one active at most. */
19
13
  export declare const copyDestinations: <T extends DestinationConfig>(items: T[], component: string) => T[];
20
- /** Shows, updates or removes the item's badge, and names the destination with it. */
21
14
  export declare const updateBadge: (item: DestinationConfig, element: HTMLElement, cls: PartClass) => void;
22
- /** The destination's element: a link or a button, its indicator, icon, label and badge. */
23
15
  export declare const createDestination: (item: DestinationConfig, cls: PartClass) => HTMLElement;
24
- /** Marks the active destination, and shows its active icon. */
25
16
  export declare const updateSelection: (items: DestinationConfig[], nodes: Map<string, HTMLElement>, cls: PartClass) => void;
26
- /**
27
- * Moves focus between the enabled destinations: `next` and `previous` are the
28
- * arrow keys of the component's axis, Home and End go to the ends. Returns
29
- * whether it moved.
30
- */
31
17
  export declare const moveDestinationFocus: (event: KeyboardEvent, nodes: Map<string, HTMLElement>, container: HTMLElement, keys: {
32
18
  next: string;
33
19
  previous: string;
@@ -1,6 +1,17 @@
1
1
  import { safeUrl } from "../utils/url.js";
2
2
  import { setHTML } from "../dom/html.js";
3
3
  import { activeElementOf } from "../dom/focus.js";
4
+ const BADGE_MAX_CHARACTERS = 4;
5
+ const formatBadgeText = (badge) => {
6
+ const text = String(badge);
7
+ if (text.length <= BADGE_MAX_CHARACTERS)
8
+ return text;
9
+ const numeric = Number(badge);
10
+ if (Number.isNaN(numeric))
11
+ return text.slice(0, BADGE_MAX_CHARACTERS);
12
+ return numeric >= 1000 ? "999+" : `${text.slice(0, BADGE_MAX_CHARACTERS - 1)}+`;
13
+ };
14
+ const isEmptyBadgeText = (text) => text === "" || text === "0";
4
15
  export const copyDestinations = (items, component) => {
5
16
  const ids = new Set();
6
17
  let selected = false;
@@ -15,7 +26,9 @@ export const copyDestinations = (items, component) => {
15
26
  };
16
27
  export const updateBadge = (item, element, cls) => {
17
28
  let badge = element.querySelector(`.${cls("__badge")}`);
18
- const visible = item.badge !== undefined && item.badge !== false && item.badge !== "";
29
+ const dot = item.badge === true;
30
+ const text = dot ? "" : formatBadgeText(String(item.badge ?? ""));
31
+ const visible = dot || (item.badge !== undefined && item.badge !== null && item.badge !== false && !isEmptyBadgeText(text));
19
32
  if (!visible) {
20
33
  badge?.remove();
21
34
  element.classList.remove(cls("__item--badged"));
@@ -28,10 +41,10 @@ export const updateBadge = (item, element, cls) => {
28
41
  badge.setAttribute("aria-hidden", "true");
29
42
  element.querySelector(`.${cls("__content")}`).append(badge);
30
43
  }
31
- badge.classList.toggle(cls("__badge--dot"), item.badge === true);
32
- badge.textContent = item.badge === true ? "" : String(item.badge);
33
- element.classList.toggle(cls("__item--badged"), item.badge !== true);
34
- element.setAttribute("aria-label", `${item.label}, ${item.badgeLabel || (item.badge === true ? "New activity" : String(item.badge))}`);
44
+ badge.classList.toggle(cls("__badge--dot"), dot);
45
+ badge.textContent = text;
46
+ element.classList.toggle(cls("__item--badged"), !dot);
47
+ element.setAttribute("aria-label", `${item.label}, ${item.badgeLabel || (dot ? "New notification" : text)}`);
35
48
  };
36
49
  export const createDestination = (item, cls) => {
37
50
  const element = document.createElement(item.href ? "a" : "button");
@@ -1,32 +1,37 @@
1
- /** A cubic Bézier: anchor 0, control 0, control 1, anchor 1 */
2
- export type Cubic = readonly [number, number, number, number, number, number, number, number];
3
- /** A 2D point */
4
- export type Point = readonly [number, number];
5
- /** Below this distance two points are the same point */
1
+ export type Cubic = readonly [
2
+ number,
3
+ number,
4
+ number,
5
+ number,
6
+ number,
7
+ number,
8
+ number,
9
+ number
10
+ ];
11
+ export type Point = readonly [
12
+ number,
13
+ number
14
+ ];
6
15
  export declare const DISTANCE_EPSILON = 0.0001;
7
16
  export declare const lerp: (start: number, stop: number, fraction: number) => number;
8
17
  export declare const distance: (x: number, y: number) => number;
9
- /** Unit vector in the direction of (x, y) */
10
18
  export declare const direction: (x: number, y: number) => Point;
11
19
  export declare const rotate90: ([x, y]: Point) => Point;
12
20
  export declare const dot: (a: Point, b: Point) => number;
13
- /** A straight segment expressed as a cubic */
14
21
  export declare const straightLine: (x0: number, y0: number, x1: number, y1: number) => Cubic;
15
- /**
16
- * A circular arc from (x0, y0) to (x1, y1) around (centerX, centerY),
17
- * approximated by one cubic; the arc must be under 180 degrees.
18
- */
19
22
  export declare const circularArc: (centerX: number, centerY: number, x0: number, y0: number, x1: number, y1: number) => Cubic;
20
23
  export declare const pointOnCurve: (c: Cubic, t: number) => Point;
21
- /** Splits a cubic at `t` into two that together trace it (de Casteljau) */
22
- export declare const splitCubic: (c: Cubic, t: number) => [Cubic, Cubic];
24
+ export declare const splitCubic: (c: Cubic, t: number) => [
25
+ Cubic,
26
+ Cubic
27
+ ];
23
28
  export declare const reverseCubic: (c: Cubic) => Cubic;
24
29
  export declare const zeroLength: (c: Cubic) => boolean;
25
30
  export type PointTransformer = (x: number, y: number) => Point;
26
31
  export declare const transformCubic: (c: Cubic, f: PointTransformer) => Cubic;
27
- /**
28
- * The bounding box of a cubic as [left, top, right, bottom]. The approximate
29
- * box is the hull of anchors and controls, which is what the library uses to
30
- * normalise shapes.
31
- */
32
- export declare const cubicBounds: (c: Cubic) => [number, number, number, number];
32
+ export declare const cubicBounds: (c: Cubic) => [
33
+ number,
34
+ number,
35
+ number,
36
+ number
37
+ ];
@@ -1,73 +1,38 @@
1
1
  import { RoundedPolygon, polygonMaxRadius } from "./polygon.js";
2
- /** Circle */
3
2
  export declare const shapeCircle: () => RoundedPolygon;
4
- /** A rounded square */
5
3
  export declare const shapeSquare: () => RoundedPolygon;
6
- /** A slanted square */
7
4
  export declare const shapeSlanted: () => RoundedPolygon;
8
- /** An arch */
9
5
  export declare const shapeArch: () => RoundedPolygon;
10
- /** A fan */
11
6
  export declare const shapeFan: () => RoundedPolygon;
12
- /** An arrow */
13
7
  export declare const shapeArrow: () => RoundedPolygon;
14
- /** A semicircle */
15
8
  export declare const shapeSemiCircle: () => RoundedPolygon;
16
- /** An oval */
17
9
  export declare const shapeOval: () => RoundedPolygon;
18
- /** A pill */
19
10
  export declare const shapePill: () => RoundedPolygon;
20
- /** A triangle */
21
11
  export declare const shapeTriangle: () => RoundedPolygon;
22
- /** A diamond */
23
12
  export declare const shapeDiamond: () => RoundedPolygon;
24
- /** A clam shell */
25
13
  export declare const shapeClamShell: () => RoundedPolygon;
26
- /** A pentagon */
27
14
  export declare const shapePentagon: () => RoundedPolygon;
28
- /** A gem */
29
15
  export declare const shapeGem: () => RoundedPolygon;
30
- /** A sunny shape: an 8-point star */
31
16
  export declare const shapeSunny: () => RoundedPolygon;
32
- /** A very sunny shape */
33
17
  export declare const shapeVerySunny: () => RoundedPolygon;
34
- /** A 4-sided cookie */
35
18
  export declare const shapeCookie4Sided: () => RoundedPolygon;
36
- /** A 6-sided cookie */
37
19
  export declare const shapeCookie6Sided: () => RoundedPolygon;
38
- /** A 7-sided cookie */
39
20
  export declare const shapeCookie7Sided: () => RoundedPolygon;
40
- /** A 9-sided cookie */
41
21
  export declare const shapeCookie9Sided: () => RoundedPolygon;
42
- /** A 12-sided cookie */
43
22
  export declare const shapeCookie12Sided: () => RoundedPolygon;
44
- /** A ghost-ish shape */
45
23
  export declare const shapeGhostish: () => RoundedPolygon;
46
- /** A 4-leaf clover */
47
24
  export declare const shapeClover4Leaf: () => RoundedPolygon;
48
- /** An 8-leaf clover */
49
25
  export declare const shapeClover8Leaf: () => RoundedPolygon;
50
- /** A burst */
51
26
  export declare const shapeBurst: () => RoundedPolygon;
52
- /** A soft burst */
53
27
  export declare const shapeSoftBurst: () => RoundedPolygon;
54
- /** A boom */
55
28
  export declare const shapeBoom: () => RoundedPolygon;
56
- /** A soft boom */
57
29
  export declare const shapeSoftBoom: () => RoundedPolygon;
58
- /** A flower */
59
30
  export declare const shapeFlower: () => RoundedPolygon;
60
- /** A puffy shape */
61
31
  export declare const shapePuffy: () => RoundedPolygon;
62
- /** A puffy diamond */
63
32
  export declare const shapePuffyDiamond: () => RoundedPolygon;
64
- /** A pixelated circle */
65
33
  export declare const shapePixelCircle: () => RoundedPolygon;
66
- /** A pixelated triangle */
67
34
  export declare const shapePixelTriangle: () => RoundedPolygon;
68
- /** A bun */
69
35
  export declare const shapeBun: () => RoundedPolygon;
70
- /** A heart */
71
36
  export declare const shapeHeart: () => RoundedPolygon;
72
37
  declare const byName: {
73
38
  circle: () => RoundedPolygon;
@@ -106,45 +71,16 @@ declare const byName: {
106
71
  bun: () => RoundedPolygon;
107
72
  heart: () => RoundedPolygon;
108
73
  };
109
- /**
110
- * Names of the Material shapes: Compose's, camelCased. material 3.0.0 removed 0.10's
111
- * 'cookie4' and 'cookie9' aliases: use 'cookie4Sided' and 'cookie9Sided'.
112
- */
113
74
  export type MaterialShapeName = keyof typeof byName;
114
- /** A Material shape by name, normalised into the unit square. Carries every shape; import `shapeX` to carry one. */
115
75
  export declare const materialShape: (name: MaterialShapeName) => RoundedPolygon;
116
- /**
117
- * A polygon's outline as an SVG path ("M … C … Z"), scaled by `size`: a
118
- * normalised shape fills a `size` × `size` box. Coordinates keep three decimals.
119
- */
120
76
  export declare const polygonPath: (polygon: RoundedPolygon, size?: number) => string;
121
- /** A Material shape as an SVG path in a `size` × `size` box. Carries every shape, as materialShape does. */
122
77
  export declare const materialShapePath: (name: MaterialShapeName, size?: number) => string;
123
- /** A shape's outline as radii at evenly spaced angles around its centre */
124
78
  export interface RadialProfile {
125
- /** Radius at angle i * 2π / radii.length, clockwise from the positive x axis on a y-down canvas */
126
79
  radii: Float32Array;
127
- /** The area centroid the radii are measured from */
128
80
  centerX: number;
129
81
  centerY: number;
130
- /** The largest radius, for fitting the shape into a circle */
131
82
  maxRadius: number;
132
83
  }
133
- /**
134
- * radialProfile without its star-shape check, for callers whose shapes are
135
- * known to be star-shaped: the loading indicator's, which the tests check.
136
- * The centroid, not the bounds centre, is the pivot: a pentagon's mass sits
137
- * below the middle of its box, and turning it about the box would make it
138
- * orbit.
139
- * @internal
140
- */
141
84
  export declare const sampleProfile: (polygon: RoundedPolygon, samples?: number, stepsPerCubic?: number) => RadialProfile;
142
- /**
143
- * Samples the outline at `samples` angles around the shape's area centroid.
144
- * Throws for a shape that is not star-shaped around it. Of the Material
145
- * shapes, 33 are; Puffy and PixelTriangle are not (their outlines double back
146
- * as seen from the centroid, Puffy by about 0.1°): a ray from the centroid
147
- * would cross the outline more than once, and the profile would be wrong.
148
- */
149
85
  export declare const radialProfile: (polygon: RoundedPolygon, samples?: number, stepsPerCubic?: number) => RadialProfile;
150
86
  export { polygonMaxRadius };
@@ -1,37 +1,27 @@
1
1
  import { Cubic, PointTransformer } from "./cubic.js";
2
- /** How a vertex is rounded: the radius, and how much the curve is smoothed into the sides (0–1) */
3
2
  export interface CornerRounding {
4
3
  radius: number;
5
4
  smoothing?: number;
6
5
  }
7
6
  export declare const UNROUNDED: CornerRounding;
8
- /** A closed shape made of contiguous cubics */
9
7
  export interface RoundedPolygon {
10
8
  cubics: Cubic[];
11
9
  centerX: number;
12
10
  centerY: number;
13
11
  }
14
- /**
15
- * Builds a rounded polygon from a flat list of vertex coordinates
16
- * [x0, y0, x1, y1, ...], a rounding for every vertex or one per vertex, and
17
- * an optional centre (the vertices' centroid by default).
18
- */
19
12
  export declare const roundedPolygon: (vertices: number[], rounding?: CornerRounding, perVertexRounding?: CornerRounding[], centerX?: number, centerY?: number) => RoundedPolygon;
20
- /** A regular polygon, first vertex at angle 0 */
21
13
  export declare const regularPolygon: (numVertices: number, radius?: number, centerX?: number, centerY?: number, rounding?: CornerRounding, perVertexRounding?: CornerRounding[]) => RoundedPolygon;
22
- /** A circle approximated by a fully rounded polygon */
23
14
  export declare const circle: (numVertices?: number, radius?: number, centerX?: number, centerY?: number) => RoundedPolygon;
24
- /** A star with `numVerticesPerRadius` outer and inner vertices, outer first at angle 0 */
25
15
  export declare const star: (numVerticesPerRadius: number, radius?: number, innerRadius?: number, rounding?: CornerRounding, innerRounding?: CornerRounding, perVertexRounding?: CornerRounding[], centerX?: number, centerY?: number) => RoundedPolygon;
26
- /** A rectangle centred on (centerX, centerY), its first vertex at the bottom right (graphics-shapes rectangle) */
27
16
  export declare const rectangle: (width?: number, height?: number, rounding?: CornerRounding, perVertexRounding?: CornerRounding[], centerX?: number, centerY?: number) => RoundedPolygon;
28
17
  export declare const transformPolygon: (polygon: RoundedPolygon, f: PointTransformer) => RoundedPolygon;
29
- /** Rotation about the origin, in degrees, positive clockwise on a y-down canvas */
30
18
  export declare const rotatePolygon: (polygon: RoundedPolygon, degrees: number) => RoundedPolygon;
31
19
  export declare const scalePolygon: (polygon: RoundedPolygon, sx: number, sy?: number) => RoundedPolygon;
32
- /** Bounding box [left, top, right, bottom] from the hull of anchors and controls */
33
- export declare const polygonBounds: (polygon: RoundedPolygon) => [number, number, number, number];
34
- /** The farthest any anchor or curve midpoint gets from the centre */
20
+ export declare const polygonBounds: (polygon: RoundedPolygon) => [
21
+ number,
22
+ number,
23
+ number,
24
+ number
25
+ ];
35
26
  export declare const polygonMaxRadius: (polygon: RoundedPolygon) => number;
36
- /** Fits the shape into the unit square, centred, keeping its aspect ratio */
37
27
  export declare const normalizePolygon: (polygon: RoundedPolygon) => RoundedPolygon;
@@ -1,46 +1,10 @@
1
- /**
2
- * @module core/state
3
- */
4
- /**
5
- * An event handler. A handler that declares its payload type is accepted as
6
- * one, and a handler that doesn't gets `unknown` to narrow. It was
7
- * `(...args: never[]) => void`, which inferred every such payload as `never`
8
- * The method-signature form keeps parameter bivariance, which is
9
- * what lets a typed handler through.
10
- */
11
1
  export type EventCallback = {
12
2
  handler(...args: unknown[]): void;
13
3
  }["handler"];
14
- /**
15
- * Interface for the event emitter
16
- */
17
4
  export interface Emitter {
18
- /**
19
- * Subscribe to an event
20
- * @param event - Event name
21
- * @param callback - Event handler
22
- * @returns Unsubscribe function
23
- */
24
5
  on(event: string, callback: EventCallback): () => void;
25
- /**
26
- * Unsubscribe from an event
27
- * @param event - Event name
28
- * @param callback - Event handler to remove
29
- */
30
6
  off(event: string, callback: EventCallback): void;
31
- /**
32
- * Emit an event
33
- * @param event - Event name
34
- * @param args - Event arguments
35
- */
36
7
  emit(event: string, ...args: unknown[]): void;
37
- /**
38
- * Clear all event listeners
39
- */
40
8
  clear(): void;
41
9
  }
42
- /**
43
- * Creates an event emitter with subscription management
44
- * @returns Event emitter interface
45
- */
46
10
  export declare const createEmitter: () => Emitter;