mtrl 0.8.0-next.8 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (871) hide show
  1. package/README.md +112 -283
  2. package/dist/README.md +112 -283
  3. package/dist/components/badge/api.d.ts +1 -1
  4. package/dist/components/badge/api.js +162 -0
  5. package/dist/components/badge/badge.d.ts +1 -1
  6. package/dist/components/badge/badge.js +18 -0
  7. package/dist/components/badge/config.d.ts +1 -1
  8. package/dist/components/badge/config.js +63 -0
  9. package/dist/components/badge/constants.js +20 -0
  10. package/dist/components/badge/features.d.ts +1 -1
  11. package/dist/components/badge/features.js +95 -0
  12. package/dist/components/badge/index.d.ts +2 -2
  13. package/dist/components/badge/index.js +1 -0
  14. package/dist/components/badge/types.js +1 -0
  15. package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +1 -1
  16. package/dist/components/bottom-app-bar/bottom-app-bar.js +91 -0
  17. package/dist/components/bottom-app-bar/config.d.ts +1 -1
  18. package/dist/components/bottom-app-bar/config.js +10 -0
  19. package/dist/components/bottom-app-bar/constants.js +13 -0
  20. package/dist/components/bottom-app-bar/index.d.ts +2 -2
  21. package/dist/components/bottom-app-bar/index.js +3 -0
  22. package/dist/components/bottom-app-bar/types.d.ts +1 -1
  23. package/dist/components/bottom-app-bar/types.js +1 -0
  24. package/dist/components/bottom-sheet/api.d.ts +43 -0
  25. package/dist/components/bottom-sheet/api.js +56 -0
  26. package/dist/components/bottom-sheet/bottom-sheet.d.ts +24 -0
  27. package/dist/components/bottom-sheet/bottom-sheet.js +18 -0
  28. package/dist/components/bottom-sheet/config.d.ts +34 -0
  29. package/dist/components/bottom-sheet/config.js +19 -0
  30. package/dist/components/bottom-sheet/constants.d.ts +65 -0
  31. package/dist/components/bottom-sheet/constants.js +35 -0
  32. package/dist/components/bottom-sheet/features/drag.d.ts +32 -0
  33. package/dist/components/bottom-sheet/features/drag.js +71 -0
  34. package/dist/components/bottom-sheet/features/index.d.ts +3 -0
  35. package/dist/components/bottom-sheet/features/index.js +3 -0
  36. package/dist/components/bottom-sheet/features/state.d.ts +31 -0
  37. package/dist/components/bottom-sheet/features/state.js +82 -0
  38. package/dist/components/bottom-sheet/features/structure.d.ts +26 -0
  39. package/dist/components/bottom-sheet/features/structure.js +88 -0
  40. package/dist/components/bottom-sheet/index.d.ts +2 -0
  41. package/dist/components/bottom-sheet/index.js +1 -0
  42. package/dist/components/bottom-sheet/types.d.ts +116 -0
  43. package/dist/components/bottom-sheet/types.js +1 -0
  44. package/dist/components/button/api.d.ts +2 -2
  45. package/dist/components/button/api.js +265 -0
  46. package/dist/components/button/button.d.ts +1 -1
  47. package/dist/components/button/button.js +25 -0
  48. package/dist/components/button/config.d.ts +1 -1
  49. package/dist/components/button/config.js +51 -0
  50. package/dist/components/button/constants.js +35 -0
  51. package/dist/components/button/features/progress.d.ts +2 -2
  52. package/dist/components/button/features/progress.js +163 -0
  53. package/dist/components/button/features/toggle.d.ts +1 -1
  54. package/dist/components/button/features/toggle.js +33 -0
  55. package/dist/components/button/index.d.ts +3 -3
  56. package/dist/components/button/index.js +1 -0
  57. package/dist/components/button/types.d.ts +3 -3
  58. package/dist/components/button/types.js +1 -0
  59. package/dist/components/button-group/button-group.d.ts +1 -1
  60. package/dist/components/button-group/button-group.js +358 -0
  61. package/dist/components/button-group/config.d.ts +10 -10
  62. package/dist/components/button-group/config.js +123 -0
  63. package/dist/components/button-group/constants.d.ts +8 -0
  64. package/dist/components/button-group/constants.js +94 -0
  65. package/dist/components/button-group/index.d.ts +4 -4
  66. package/dist/components/button-group/index.js +3 -0
  67. package/dist/components/button-group/types.d.ts +1 -1
  68. package/dist/components/button-group/types.js +1 -0
  69. package/dist/components/card/api.d.ts +1 -1
  70. package/dist/components/card/api.js +74 -0
  71. package/dist/components/card/card.d.ts +1 -1
  72. package/dist/components/card/card.js +20 -0
  73. package/dist/components/card/config.d.ts +1 -1
  74. package/dist/components/card/config.js +161 -0
  75. package/dist/components/card/constants.js +55 -0
  76. package/dist/components/card/content.d.ts +1 -1
  77. package/dist/components/card/content.js +195 -0
  78. package/dist/components/card/features.d.ts +1 -1
  79. package/dist/components/card/features.js +225 -0
  80. package/dist/components/card/index.d.ts +5 -5
  81. package/dist/components/card/index.js +4 -0
  82. package/dist/components/card/types.js +1 -0
  83. package/dist/components/carousel/api.d.ts +1 -1
  84. package/dist/components/carousel/api.js +46 -0
  85. package/dist/components/carousel/arrangement.js +61 -0
  86. package/dist/components/carousel/carousel.d.ts +1 -1
  87. package/dist/components/carousel/carousel.js +11 -0
  88. package/dist/components/carousel/config.d.ts +1 -1
  89. package/dist/components/carousel/config.js +40 -0
  90. package/dist/components/carousel/constants.js +23 -0
  91. package/dist/components/carousel/features/index.d.ts +2 -2
  92. package/dist/components/carousel/features/index.js +2 -0
  93. package/dist/components/carousel/features/scroll.d.ts +2 -2
  94. package/dist/components/carousel/features/scroll.js +345 -0
  95. package/dist/components/carousel/features/slides.d.ts +1 -1
  96. package/dist/components/carousel/features/slides.js +127 -0
  97. package/dist/components/carousel/index.d.ts +3 -3
  98. package/dist/components/carousel/index.js +2 -0
  99. package/dist/components/carousel/keylines.js +292 -0
  100. package/dist/components/carousel/strategy.d.ts +1 -1
  101. package/dist/components/carousel/strategy.js +207 -0
  102. package/dist/components/carousel/types.js +1 -0
  103. package/dist/components/checkbox/api.d.ts +1 -1
  104. package/dist/components/checkbox/api.js +82 -0
  105. package/dist/components/checkbox/checkbox.d.ts +1 -1
  106. package/dist/components/checkbox/checkbox.js +29 -0
  107. package/dist/components/checkbox/config.d.ts +1 -1
  108. package/dist/components/checkbox/config.js +44 -0
  109. package/dist/components/checkbox/constants.js +20 -0
  110. package/dist/components/checkbox/index.d.ts +3 -3
  111. package/dist/components/checkbox/index.js +2 -0
  112. package/dist/components/checkbox/types.js +1 -0
  113. package/dist/components/chips/api.d.ts +1 -1
  114. package/dist/components/chips/api.js +153 -0
  115. package/dist/components/chips/chip/api.d.ts +1 -1
  116. package/dist/components/chips/chip/api.js +186 -0
  117. package/dist/components/chips/chip/chip.d.ts +1 -1
  118. package/dist/components/chips/chip/chip.js +78 -0
  119. package/dist/components/chips/chip/config.d.ts +1 -1
  120. package/dist/components/chips/chip/config.js +53 -0
  121. package/dist/components/chips/chip/constants.js +18 -0
  122. package/dist/components/chips/chip/index.d.ts +2 -2
  123. package/dist/components/chips/chip/index.js +2 -0
  124. package/dist/components/chips/chip/types.d.ts +1 -1
  125. package/dist/components/chips/chip/types.js +1 -0
  126. package/dist/components/chips/chips.d.ts +1 -1
  127. package/dist/components/chips/chips.js +32 -0
  128. package/dist/components/chips/config.d.ts +1 -1
  129. package/dist/components/chips/config.js +82 -0
  130. package/dist/components/chips/constants.js +20 -0
  131. package/dist/components/chips/features/chip-items.d.ts +1 -1
  132. package/dist/components/chips/features/chip-items.js +17 -0
  133. package/dist/components/chips/features/container.d.ts +1 -1
  134. package/dist/components/chips/features/container.js +41 -0
  135. package/dist/components/chips/features/controller.d.ts +1 -1
  136. package/dist/components/chips/features/controller.js +309 -0
  137. package/dist/components/chips/features/dom.d.ts +2 -2
  138. package/dist/components/chips/features/dom.js +27 -0
  139. package/dist/components/chips/features/index.d.ts +5 -5
  140. package/dist/components/chips/features/index.js +5 -0
  141. package/dist/components/chips/features/label.d.ts +1 -1
  142. package/dist/components/chips/features/label.js +63 -0
  143. package/dist/components/chips/index.d.ts +3 -3
  144. package/dist/components/chips/index.js +2 -0
  145. package/dist/components/chips/schema.d.ts +1 -1
  146. package/dist/components/chips/schema.js +46 -0
  147. package/dist/components/chips/types.js +11 -0
  148. package/dist/components/datepicker/api.d.ts +1 -1
  149. package/dist/components/datepicker/api.js +180 -0
  150. package/dist/components/datepicker/config.d.ts +1 -1
  151. package/dist/components/datepicker/config.js +89 -0
  152. package/dist/components/datepicker/constants.js +50 -0
  153. package/dist/components/datepicker/datepicker.d.ts +1 -1
  154. package/dist/components/datepicker/datepicker.js +238 -0
  155. package/dist/components/datepicker/index.d.ts +3 -3
  156. package/dist/components/datepicker/index.js +2 -0
  157. package/dist/components/datepicker/render.js +290 -0
  158. package/dist/components/datepicker/types.js +18 -0
  159. package/dist/components/datepicker/utils.d.ts +1 -1
  160. package/dist/components/datepicker/utils.js +156 -0
  161. package/dist/components/dialog/api.d.ts +1 -1
  162. package/dist/components/dialog/api.js +106 -0
  163. package/dist/components/dialog/config.d.ts +2 -6
  164. package/dist/components/dialog/config.js +84 -0
  165. package/dist/components/dialog/constants.js +51 -0
  166. package/dist/components/dialog/dialog.d.ts +1 -1
  167. package/dist/components/dialog/dialog.js +25 -0
  168. package/dist/components/dialog/features.d.ts +1 -6
  169. package/dist/components/dialog/features.js +619 -0
  170. package/dist/components/dialog/index.d.ts +2 -2
  171. package/dist/components/dialog/index.js +1 -0
  172. package/dist/components/dialog/types.d.ts +14 -3
  173. package/dist/components/dialog/types.js +1 -0
  174. package/dist/components/divider/config.js +9 -0
  175. package/dist/components/divider/constants.js +18 -0
  176. package/dist/components/divider/divider.d.ts +3 -3
  177. package/dist/components/divider/divider.js +11 -0
  178. package/dist/components/divider/features.d.ts +3 -3
  179. package/dist/components/divider/features.js +141 -0
  180. package/dist/components/divider/index.d.ts +3 -3
  181. package/dist/components/divider/index.js +2 -0
  182. package/dist/components/divider/types.d.ts +1 -1
  183. package/dist/components/divider/types.js +1 -0
  184. package/dist/components/drawer/api.d.ts +1 -1
  185. package/dist/components/drawer/api.js +73 -0
  186. package/dist/components/drawer/config.d.ts +3 -2
  187. package/dist/components/drawer/config.js +66 -0
  188. package/dist/components/drawer/constants.d.ts +2 -0
  189. package/dist/components/drawer/constants.js +46 -0
  190. package/dist/components/drawer/drawer.d.ts +1 -1
  191. package/dist/components/drawer/drawer.js +42 -0
  192. package/dist/components/drawer/features/headline.d.ts +1 -1
  193. package/dist/components/drawer/features/headline.js +36 -0
  194. package/dist/components/drawer/features/index.d.ts +3 -3
  195. package/dist/components/drawer/features/index.js +3 -0
  196. package/dist/components/drawer/features/items.d.ts +1 -1
  197. package/dist/components/drawer/features/items.js +215 -0
  198. package/dist/components/drawer/features/state.d.ts +2 -10
  199. package/dist/components/drawer/features/state.js +170 -0
  200. package/dist/components/drawer/index.d.ts +2 -2
  201. package/dist/components/drawer/index.js +1 -0
  202. package/dist/components/drawer/types.d.ts +8 -2
  203. package/dist/components/drawer/types.js +1 -0
  204. package/dist/components/extended-fab/api.d.ts +1 -1
  205. package/dist/components/extended-fab/api.js +77 -0
  206. package/dist/components/extended-fab/config.d.ts +1 -1
  207. package/dist/components/extended-fab/config.js +73 -0
  208. package/dist/components/extended-fab/constants.d.ts +16 -4
  209. package/dist/components/extended-fab/constants.js +47 -0
  210. package/dist/components/extended-fab/extended-fab.d.ts +1 -1
  211. package/dist/components/extended-fab/extended-fab.js +59 -0
  212. package/dist/components/extended-fab/index.d.ts +2 -2
  213. package/dist/components/extended-fab/index.js +1 -0
  214. package/dist/components/extended-fab/types.d.ts +13 -6
  215. package/dist/components/extended-fab/types.js +1 -0
  216. package/dist/components/fab/api.d.ts +1 -1
  217. package/dist/components/fab/api.js +52 -0
  218. package/dist/components/fab/config.d.ts +1 -1
  219. package/dist/components/fab/config.js +53 -0
  220. package/dist/components/fab/constants.d.ts +18 -7
  221. package/dist/components/fab/constants.js +43 -0
  222. package/dist/components/fab/fab.d.ts +1 -1
  223. package/dist/components/fab/fab.js +17 -0
  224. package/dist/components/fab/index.d.ts +3 -3
  225. package/dist/components/fab/index.js +1 -0
  226. package/dist/components/fab/types.d.ts +10 -9
  227. package/dist/components/fab/types.js +1 -0
  228. package/dist/components/icon-button/api.d.ts +1 -1
  229. package/dist/components/icon-button/api.js +204 -0
  230. package/dist/components/icon-button/config.d.ts +1 -1
  231. package/dist/components/icon-button/config.js +91 -0
  232. package/dist/components/icon-button/constants.d.ts +21 -21
  233. package/dist/components/icon-button/constants.js +67 -0
  234. package/dist/components/icon-button/features/toggle.d.ts +1 -1
  235. package/dist/components/icon-button/features/toggle.js +122 -0
  236. package/dist/components/icon-button/icon-button.d.ts +1 -1
  237. package/dist/components/icon-button/icon-button.js +24 -0
  238. package/dist/components/icon-button/index.d.ts +4 -4
  239. package/dist/components/icon-button/index.js +2 -0
  240. package/dist/components/icon-button/types.d.ts +2 -2
  241. package/dist/components/icon-button/types.js +1 -0
  242. package/dist/components/index.d.ts +83 -69
  243. package/dist/components/index.js +41 -0
  244. package/dist/components/list/api.js +53 -0
  245. package/dist/components/list/config.d.ts +2 -2
  246. package/dist/components/list/config.js +80 -0
  247. package/dist/components/list/constants.js +35 -0
  248. package/dist/components/list/features/index.d.ts +2 -2
  249. package/dist/components/list/features/index.js +2 -0
  250. package/dist/components/list/features/renderer.js +120 -0
  251. package/dist/components/list/features/selection.js +160 -0
  252. package/dist/components/list/index.d.ts +3 -3
  253. package/dist/components/list/index.js +2 -0
  254. package/dist/components/list/list.js +19 -0
  255. package/dist/components/list/types.js +1 -0
  256. package/dist/components/loading-indicator/api.d.ts +14 -0
  257. package/dist/components/loading-indicator/api.js +122 -0
  258. package/dist/components/loading-indicator/config.d.ts +44 -0
  259. package/dist/components/loading-indicator/config.js +25 -0
  260. package/dist/components/loading-indicator/constants.d.ts +60 -0
  261. package/dist/components/loading-indicator/constants.js +32 -0
  262. package/dist/components/loading-indicator/features/motion.d.ts +22 -0
  263. package/dist/components/loading-indicator/features/motion.js +47 -0
  264. package/dist/components/loading-indicator/features/renderer.d.ts +29 -0
  265. package/dist/components/loading-indicator/features/renderer.js +115 -0
  266. package/dist/components/loading-indicator/index.d.ts +3 -0
  267. package/dist/components/loading-indicator/index.js +2 -0
  268. package/dist/components/loading-indicator/loading-indicator.d.ts +9 -0
  269. package/dist/components/loading-indicator/loading-indicator.js +17 -0
  270. package/dist/components/loading-indicator/types.d.ts +65 -0
  271. package/dist/components/loading-indicator/types.js +1 -0
  272. package/dist/components/menu/api.d.ts +1 -1
  273. package/dist/components/menu/api.js +79 -0
  274. package/dist/components/menu/config.d.ts +1 -1
  275. package/dist/components/menu/config.js +82 -0
  276. package/dist/components/menu/constants.d.ts +32 -0
  277. package/dist/components/menu/constants.js +61 -0
  278. package/dist/components/menu/features/controller.d.ts +1 -1
  279. package/dist/components/menu/features/controller.js +542 -0
  280. package/dist/components/menu/features/index.d.ts +5 -5
  281. package/dist/components/menu/features/index.js +6 -0
  282. package/dist/components/menu/features/keyboard.d.ts +3 -1
  283. package/dist/components/menu/features/keyboard.js +296 -0
  284. package/dist/components/menu/features/opener.d.ts +1 -1
  285. package/dist/components/menu/features/opener.js +300 -0
  286. package/dist/components/menu/features/position.d.ts +1 -1
  287. package/dist/components/menu/features/position.js +276 -0
  288. package/dist/components/menu/features/registry.d.ts +37 -0
  289. package/dist/components/menu/features/registry.js +13 -0
  290. package/dist/components/menu/features/submenu.d.ts +1 -1
  291. package/dist/components/menu/features/submenu.js +386 -0
  292. package/dist/components/menu/features/tasks.d.ts +9 -0
  293. package/dist/components/menu/features/tasks.js +47 -0
  294. package/dist/components/menu/index.d.ts +3 -3
  295. package/dist/components/menu/index.js +2 -0
  296. package/dist/components/menu/menu.d.ts +1 -1
  297. package/dist/components/menu/menu.js +25 -0
  298. package/dist/components/menu/types.d.ts +46 -3
  299. package/dist/components/menu/types.js +14 -0
  300. package/dist/components/navigation/api.d.ts +1 -1
  301. package/dist/components/navigation/api.js +117 -0
  302. package/dist/components/navigation/config.d.ts +1 -1
  303. package/dist/components/navigation/config.js +39 -0
  304. package/dist/components/navigation/constants.js +65 -0
  305. package/dist/components/navigation/features/controller.d.ts +1 -1
  306. package/dist/components/navigation/features/controller.js +173 -0
  307. package/dist/components/navigation/features/items.d.ts +2 -2
  308. package/dist/components/navigation/features/items.js +236 -0
  309. package/dist/components/navigation/index.d.ts +3 -3
  310. package/dist/components/navigation/index.js +2 -0
  311. package/dist/components/navigation/nav-item.d.ts +1 -1
  312. package/dist/components/navigation/nav-item.js +118 -0
  313. package/dist/components/navigation/navigation.d.ts +1 -1
  314. package/dist/components/navigation/navigation.js +52 -0
  315. package/dist/components/navigation/system/core.d.ts +1 -1
  316. package/dist/components/navigation/system/core.js +148 -0
  317. package/dist/components/navigation/system/events.d.ts +1 -1
  318. package/dist/components/navigation/system/events.js +126 -0
  319. package/dist/components/navigation/system/index.d.ts +2 -2
  320. package/dist/components/navigation/system/index.js +92 -0
  321. package/dist/components/navigation/system/mobile.d.ts +1 -1
  322. package/dist/components/navigation/system/mobile.js +139 -0
  323. package/dist/components/navigation/system/state.d.ts +1 -1
  324. package/dist/components/navigation/system/state.js +44 -0
  325. package/dist/components/navigation/system/types.js +1 -0
  326. package/dist/components/navigation/types.js +33 -0
  327. package/dist/components/navigation-rail/config.d.ts +2 -0
  328. package/dist/components/navigation-rail/config.js +15 -0
  329. package/dist/components/navigation-rail/constants.d.ts +14 -0
  330. package/dist/components/navigation-rail/constants.js +12 -0
  331. package/dist/components/navigation-rail/index.d.ts +2 -0
  332. package/dist/components/navigation-rail/index.js +1 -0
  333. package/dist/components/navigation-rail/navigation-rail.d.ts +7 -0
  334. package/dist/components/navigation-rail/navigation-rail.js +341 -0
  335. package/dist/components/navigation-rail/ripple.d.ts +2 -0
  336. package/dist/components/navigation-rail/ripple.js +41 -0
  337. package/dist/components/navigation-rail/types.d.ts +72 -0
  338. package/dist/components/navigation-rail/types.js +1 -0
  339. package/dist/components/progress/api.d.ts +3 -3
  340. package/dist/components/progress/api.js +205 -0
  341. package/dist/components/progress/config.d.ts +1 -1
  342. package/dist/components/progress/config.js +162 -0
  343. package/dist/components/progress/constants.d.ts +103 -84
  344. package/dist/components/progress/constants.js +110 -0
  345. package/dist/components/progress/features/canvas.d.ts +18 -29
  346. package/dist/components/progress/features/canvas.js +300 -0
  347. package/dist/components/progress/features/circular.d.ts +17 -7
  348. package/dist/components/progress/features/circular.js +71 -0
  349. package/dist/components/progress/features/colors.d.ts +16 -0
  350. package/dist/components/progress/features/colors.js +40 -0
  351. package/dist/components/progress/features/index.d.ts +4 -4
  352. package/dist/components/progress/features/index.js +4 -0
  353. package/dist/components/progress/features/linear.d.ts +23 -7
  354. package/dist/components/progress/features/linear.js +104 -0
  355. package/dist/components/progress/features/motion.d.ts +43 -0
  356. package/dist/components/progress/features/motion.js +105 -0
  357. package/dist/components/progress/features/resize-observer.js +40 -0
  358. package/dist/components/progress/features/state.d.ts +1 -1
  359. package/dist/components/progress/features/state.js +37 -0
  360. package/dist/components/progress/index.d.ts +2 -2
  361. package/dist/components/progress/index.js +1 -0
  362. package/dist/components/progress/progress.d.ts +1 -1
  363. package/dist/components/progress/progress.js +21 -0
  364. package/dist/components/progress/types.d.ts +19 -2
  365. package/dist/components/progress/types.js +1 -0
  366. package/dist/components/radios/api.d.ts +1 -1
  367. package/dist/components/radios/api.js +73 -0
  368. package/dist/components/radios/config.d.ts +1 -1
  369. package/dist/components/radios/config.js +28 -0
  370. package/dist/components/radios/constants.js +53 -0
  371. package/dist/components/radios/index.d.ts +3 -3
  372. package/dist/components/radios/index.js +2 -0
  373. package/dist/components/radios/radio.d.ts +1 -1
  374. package/dist/components/radios/radio.js +186 -0
  375. package/dist/components/radios/radios.d.ts +1 -1
  376. package/dist/components/radios/radios.js +21 -0
  377. package/dist/components/radios/types.js +1 -0
  378. package/dist/components/search/api.d.ts +1 -1
  379. package/dist/components/search/api.js +110 -0
  380. package/dist/components/search/config.d.ts +1 -1
  381. package/dist/components/search/config.js +66 -0
  382. package/dist/components/search/constants.js +84 -0
  383. package/dist/components/search/features/index.d.ts +4 -4
  384. package/dist/components/search/features/index.js +4 -0
  385. package/dist/components/search/features/input.d.ts +1 -1
  386. package/dist/components/search/features/input.js +245 -0
  387. package/dist/components/search/features/states.d.ts +1 -1
  388. package/dist/components/search/features/states.js +182 -0
  389. package/dist/components/search/features/structure.d.ts +1 -1
  390. package/dist/components/search/features/structure.js +165 -0
  391. package/dist/components/search/features/suggestions.d.ts +1 -1
  392. package/dist/components/search/features/suggestions.js +223 -0
  393. package/dist/components/search/index.d.ts +2 -2
  394. package/dist/components/search/index.js +1 -0
  395. package/dist/components/search/search.d.ts +1 -1
  396. package/dist/components/search/search.js +27 -0
  397. package/dist/components/search/types.js +1 -0
  398. package/dist/components/segmented-button/config.d.ts +1 -8
  399. package/dist/components/segmented-button/config.js +54 -0
  400. package/dist/components/segmented-button/constants.js +40 -0
  401. package/dist/components/segmented-button/index.d.ts +3 -3
  402. package/dist/components/segmented-button/index.js +2 -0
  403. package/dist/components/segmented-button/segment.d.ts +2 -1
  404. package/dist/components/segmented-button/segment.js +94 -0
  405. package/dist/components/segmented-button/segmented-button.d.ts +12 -1
  406. package/dist/components/segmented-button/segmented-button.js +195 -0
  407. package/dist/components/segmented-button/types.d.ts +11 -11
  408. package/dist/components/segmented-button/types.js +11 -0
  409. package/dist/components/select/api.d.ts +1 -1
  410. package/dist/components/select/api.js +89 -0
  411. package/dist/components/select/config.d.ts +1 -1
  412. package/dist/components/select/config.js +54 -0
  413. package/dist/components/select/constants.js +53 -0
  414. package/dist/components/select/features.d.ts +1 -1
  415. package/dist/components/select/features.js +246 -0
  416. package/dist/components/select/index.d.ts +3 -3
  417. package/dist/components/select/index.js +2 -0
  418. package/dist/components/select/select.d.ts +1 -1
  419. package/dist/components/select/select.js +26 -0
  420. package/dist/components/select/types.d.ts +21 -0
  421. package/dist/components/select/types.js +4 -0
  422. package/dist/components/side-sheet/api.d.ts +33 -0
  423. package/dist/components/side-sheet/api.js +50 -0
  424. package/dist/components/side-sheet/config.d.ts +34 -0
  425. package/dist/components/side-sheet/config.js +20 -0
  426. package/dist/components/side-sheet/constants.d.ts +60 -0
  427. package/dist/components/side-sheet/constants.js +32 -0
  428. package/dist/components/side-sheet/features/index.d.ts +2 -0
  429. package/dist/components/side-sheet/features/index.js +2 -0
  430. package/dist/components/side-sheet/features/state.d.ts +28 -0
  431. package/dist/components/side-sheet/features/state.js +67 -0
  432. package/dist/components/side-sheet/features/structure.d.ts +21 -0
  433. package/dist/components/side-sheet/features/structure.js +97 -0
  434. package/dist/components/side-sheet/index.d.ts +2 -0
  435. package/dist/components/side-sheet/index.js +1 -0
  436. package/dist/components/side-sheet/side-sheet.d.ts +24 -0
  437. package/dist/components/side-sheet/side-sheet.js +17 -0
  438. package/dist/components/side-sheet/types.d.ts +102 -0
  439. package/dist/components/side-sheet/types.js +1 -0
  440. package/dist/components/slider/api.d.ts +2 -2
  441. package/dist/components/slider/api.js +104 -0
  442. package/dist/components/slider/config.d.ts +1 -1
  443. package/dist/components/slider/config.js +106 -0
  444. package/dist/components/slider/constants.js +74 -0
  445. package/dist/components/slider/features/controller.d.ts +1 -1
  446. package/dist/components/slider/features/controller.js +291 -0
  447. package/dist/components/slider/features/dom.d.ts +2 -2
  448. package/dist/components/slider/features/dom.js +113 -0
  449. package/dist/components/slider/features/handlers.d.ts +1 -1
  450. package/dist/components/slider/features/handlers.js +389 -0
  451. package/dist/components/slider/features/index.d.ts +5 -5
  452. package/dist/components/slider/features/index.js +5 -0
  453. package/dist/components/slider/features/range.d.ts +1 -1
  454. package/dist/components/slider/features/range.js +70 -0
  455. package/dist/components/slider/features/states.d.ts +1 -1
  456. package/dist/components/slider/features/states.js +119 -0
  457. package/dist/components/slider/features/tracks.d.ts +13 -0
  458. package/dist/components/slider/features/tracks.js +174 -0
  459. package/dist/components/slider/index.d.ts +2 -2
  460. package/dist/components/slider/index.js +1 -0
  461. package/dist/components/slider/slider.d.ts +2 -2
  462. package/dist/components/slider/slider.js +27 -0
  463. package/dist/components/slider/types.d.ts +4 -3
  464. package/dist/components/slider/types.js +2 -0
  465. package/dist/components/snackbar/api.d.ts +2 -2
  466. package/dist/components/snackbar/api.js +173 -0
  467. package/dist/components/snackbar/config.d.ts +26 -11
  468. package/dist/components/snackbar/config.js +33 -0
  469. package/dist/components/snackbar/constants.d.ts +73 -47
  470. package/dist/components/snackbar/constants.js +60 -0
  471. package/dist/components/snackbar/features.d.ts +17 -4
  472. package/dist/components/snackbar/features.js +125 -0
  473. package/dist/components/snackbar/index.d.ts +4 -4
  474. package/dist/components/snackbar/index.js +3 -0
  475. package/dist/components/snackbar/position.d.ts +3 -2
  476. package/dist/components/snackbar/position.js +24 -0
  477. package/dist/components/snackbar/queue.d.ts +1 -1
  478. package/dist/components/snackbar/queue.js +79 -0
  479. package/dist/components/snackbar/snackbar.d.ts +1 -1
  480. package/dist/components/snackbar/snackbar.js +25 -0
  481. package/dist/components/snackbar/types.d.ts +56 -57
  482. package/dist/components/snackbar/types.js +1 -0
  483. package/dist/components/split-button/api.d.ts +14 -0
  484. package/dist/components/split-button/api.js +122 -0
  485. package/dist/components/split-button/config.d.ts +40 -0
  486. package/dist/components/split-button/config.js +19 -0
  487. package/dist/components/split-button/constants.d.ts +67 -0
  488. package/dist/components/split-button/constants.js +35 -0
  489. package/dist/components/split-button/features/buttons.d.ts +7 -0
  490. package/dist/components/split-button/features/buttons.js +39 -0
  491. package/dist/components/split-button/features/menu.d.ts +7 -0
  492. package/dist/components/split-button/features/menu.js +19 -0
  493. package/dist/components/split-button/index.d.ts +3 -0
  494. package/dist/components/split-button/index.js +2 -0
  495. package/dist/components/split-button/split-button.d.ts +24 -0
  496. package/dist/components/split-button/split-button.js +21 -0
  497. package/dist/components/split-button/types.d.ts +116 -0
  498. package/dist/components/split-button/types.js +1 -0
  499. package/dist/components/switch/api.d.ts +1 -1
  500. package/dist/components/switch/api.js +91 -0
  501. package/dist/components/switch/config.d.ts +1 -1
  502. package/dist/components/switch/config.js +27 -0
  503. package/dist/components/switch/constants.js +39 -0
  504. package/dist/components/switch/features.d.ts +3 -3
  505. package/dist/components/switch/features.js +101 -0
  506. package/dist/components/switch/index.d.ts +5 -4
  507. package/dist/components/switch/index.js +3 -0
  508. package/dist/components/switch/switch.d.ts +1 -1
  509. package/dist/components/switch/switch.js +18 -0
  510. package/dist/components/switch/types.js +4 -0
  511. package/dist/components/tabs/api.d.ts +1 -1
  512. package/dist/components/tabs/api.js +98 -0
  513. package/dist/components/tabs/config.d.ts +2 -2
  514. package/dist/components/tabs/config.js +42 -0
  515. package/dist/components/tabs/constants.js +62 -0
  516. package/dist/components/tabs/features.d.ts +2 -2
  517. package/dist/components/tabs/features.js +179 -0
  518. package/dist/components/tabs/index.d.ts +10 -9
  519. package/dist/components/tabs/index.js +10 -0
  520. package/dist/components/tabs/indicator.d.ts +1 -1
  521. package/dist/components/tabs/indicator.js +134 -0
  522. package/dist/components/tabs/responsive.d.ts +1 -1
  523. package/dist/components/tabs/responsive.js +72 -0
  524. package/dist/components/tabs/scroll-indicators.d.ts +1 -1
  525. package/dist/components/tabs/scroll-indicators.js +83 -0
  526. package/dist/components/tabs/state.d.ts +2 -2
  527. package/dist/components/tabs/state.js +84 -0
  528. package/dist/components/tabs/tab-api.d.ts +2 -2
  529. package/dist/components/tabs/tab-api.js +139 -0
  530. package/dist/components/tabs/tab.d.ts +1 -1
  531. package/dist/components/tabs/tab.js +185 -0
  532. package/dist/components/tabs/tabs.d.ts +1 -1
  533. package/dist/components/tabs/tabs.js +22 -0
  534. package/dist/components/tabs/types.d.ts +2 -2
  535. package/dist/components/tabs/types.js +1 -0
  536. package/dist/components/tabs/utils.d.ts +1 -1
  537. package/dist/components/tabs/utils.js +67 -0
  538. package/dist/components/textfield/api.d.ts +2 -1
  539. package/dist/components/textfield/api.js +190 -0
  540. package/dist/components/textfield/config.d.ts +1 -1
  541. package/dist/components/textfield/config.js +21 -0
  542. package/dist/components/textfield/constants.js +63 -0
  543. package/dist/components/textfield/features/density.d.ts +1 -1
  544. package/dist/components/textfield/features/density.js +38 -0
  545. package/dist/components/textfield/features/error.d.ts +1 -1
  546. package/dist/components/textfield/features/error.js +35 -0
  547. package/dist/components/textfield/features/index.d.ts +14 -14
  548. package/dist/components/textfield/features/index.js +8 -0
  549. package/dist/components/textfield/features/leading-icon.d.ts +1 -1
  550. package/dist/components/textfield/features/leading-icon.js +55 -0
  551. package/dist/components/textfield/features/placement.d.ts +3 -1
  552. package/dist/components/textfield/features/placement.js +184 -0
  553. package/dist/components/textfield/features/prefix-text.d.ts +1 -1
  554. package/dist/components/textfield/features/prefix-text.js +38 -0
  555. package/dist/components/textfield/features/suffix-text.d.ts +1 -1
  556. package/dist/components/textfield/features/suffix-text.js +34 -0
  557. package/dist/components/textfield/features/supporting-text.d.ts +1 -1
  558. package/dist/components/textfield/features/supporting-text.js +58 -0
  559. package/dist/components/textfield/features/trailing-icon.d.ts +1 -1
  560. package/dist/components/textfield/features/trailing-icon.js +40 -0
  561. package/dist/components/textfield/index.d.ts +2 -2
  562. package/dist/components/textfield/index.js +1 -0
  563. package/dist/components/textfield/textfield.d.ts +1 -1
  564. package/dist/components/textfield/textfield.js +18 -0
  565. package/dist/components/textfield/types.js +18 -0
  566. package/dist/components/timepicker/api.d.ts +1 -1
  567. package/dist/components/timepicker/api.js +426 -0
  568. package/dist/components/timepicker/clockdial.d.ts +1 -1
  569. package/dist/components/timepicker/clockdial.js +277 -0
  570. package/dist/components/timepicker/config.d.ts +1 -1
  571. package/dist/components/timepicker/config.js +81 -0
  572. package/dist/components/timepicker/constants.js +135 -0
  573. package/dist/components/timepicker/index.d.ts +4 -4
  574. package/dist/components/timepicker/index.js +3 -0
  575. package/dist/components/timepicker/render.d.ts +1 -1
  576. package/dist/components/timepicker/render.js +476 -0
  577. package/dist/components/timepicker/timepicker.d.ts +1 -1
  578. package/dist/components/timepicker/timepicker.js +68 -0
  579. package/dist/components/timepicker/types.js +20 -0
  580. package/dist/components/timepicker/utils.d.ts +1 -1
  581. package/dist/components/timepicker/utils.js +131 -0
  582. package/dist/components/tooltip/api.d.ts +1 -1
  583. package/dist/components/tooltip/api.js +293 -0
  584. package/dist/components/tooltip/config.d.ts +1 -1
  585. package/dist/components/tooltip/config.js +38 -0
  586. package/dist/components/tooltip/constants.js +49 -0
  587. package/dist/components/tooltip/index.d.ts +3 -3
  588. package/dist/components/tooltip/index.js +2 -0
  589. package/dist/components/tooltip/tooltip.d.ts +1 -1
  590. package/dist/components/tooltip/tooltip.js +31 -0
  591. package/dist/components/tooltip/types.js +23 -0
  592. package/dist/components/top-app-bar/config.d.ts +1 -1
  593. package/dist/components/top-app-bar/config.js +10 -0
  594. package/dist/components/top-app-bar/constants.js +33 -0
  595. package/dist/components/top-app-bar/index.d.ts +3 -3
  596. package/dist/components/top-app-bar/index.js +4 -0
  597. package/dist/components/top-app-bar/top-app-bar.d.ts +2 -2
  598. package/dist/components/top-app-bar/top-app-bar.js +155 -0
  599. package/dist/components/top-app-bar/types.d.ts +1 -1
  600. package/dist/components/top-app-bar/types.js +1 -0
  601. package/dist/core/canvas/animation.js +36 -0
  602. package/dist/core/canvas/drawing.js +62 -0
  603. package/dist/core/canvas/index.d.ts +4 -4
  604. package/dist/core/canvas/index.js +4 -0
  605. package/dist/core/canvas/resize.js +35 -0
  606. package/dist/core/canvas/utils.d.ts +5 -4
  607. package/dist/core/canvas/utils.js +116 -0
  608. package/dist/core/compose/base.js +7 -0
  609. package/dist/core/compose/cleanup.d.ts +14 -0
  610. package/dist/core/compose/cleanup.js +51 -0
  611. package/dist/core/compose/component.d.ts +2 -0
  612. package/dist/core/compose/component.js +144 -0
  613. package/dist/core/compose/features/badge.d.ts +1 -1
  614. package/dist/core/compose/features/badge.js +20 -0
  615. package/dist/core/compose/features/checkable.d.ts +1 -1
  616. package/dist/core/compose/features/checkable.js +55 -0
  617. package/dist/core/compose/features/constants.js +36 -0
  618. package/dist/core/compose/features/debounce.d.ts +1 -1
  619. package/dist/core/compose/features/debounce.js +44 -0
  620. package/dist/core/compose/features/disabled.d.ts +1 -1
  621. package/dist/core/compose/features/disabled.js +63 -0
  622. package/dist/core/compose/features/events.d.ts +1 -1
  623. package/dist/core/compose/features/events.js +23 -0
  624. package/dist/core/compose/features/icon.d.ts +1 -1
  625. package/dist/core/compose/features/icon.js +70 -0
  626. package/dist/core/compose/features/index.d.ts +34 -34
  627. package/dist/core/compose/features/index.js +19 -0
  628. package/dist/core/compose/features/input.d.ts +1 -1
  629. package/dist/core/compose/features/input.js +67 -0
  630. package/dist/core/compose/features/lifecycle.d.ts +1 -1
  631. package/dist/core/compose/features/lifecycle.js +82 -0
  632. package/dist/core/compose/features/position.d.ts +1 -1
  633. package/dist/core/compose/features/position.js +36 -0
  634. package/dist/core/compose/features/ripple.d.ts +8 -8
  635. package/dist/core/compose/features/ripple.js +87 -0
  636. package/dist/core/compose/features/size.d.ts +1 -1
  637. package/dist/core/compose/features/size.js +7 -0
  638. package/dist/core/compose/features/style.d.ts +1 -1
  639. package/dist/core/compose/features/style.js +9 -0
  640. package/dist/core/compose/features/text.d.ts +1 -1
  641. package/dist/core/compose/features/text.js +47 -0
  642. package/dist/core/compose/features/textinput.d.ts +1 -1
  643. package/dist/core/compose/features/textinput.js +162 -0
  644. package/dist/core/compose/features/textlabel.d.ts +1 -1
  645. package/dist/core/compose/features/textlabel.js +44 -0
  646. package/dist/core/compose/features/throttle.d.ts +1 -1
  647. package/dist/core/compose/features/throttle.js +44 -0
  648. package/dist/core/compose/features/track.d.ts +1 -1
  649. package/dist/core/compose/features/track.js +23 -0
  650. package/dist/core/compose/features/variant.d.ts +1 -1
  651. package/dist/core/compose/features/variant.js +7 -0
  652. package/dist/core/compose/features/withEvents.d.ts +1 -1
  653. package/dist/core/compose/features/withEvents.js +46 -0
  654. package/dist/core/compose/index.d.ts +9 -9
  655. package/dist/core/compose/index.js +5 -0
  656. package/dist/core/compose/pipe.js +6 -0
  657. package/dist/core/compose/utils/type-guards.d.ts +1 -1
  658. package/dist/core/compose/utils/type-guards.js +10 -0
  659. package/dist/core/config/component.js +71 -0
  660. package/dist/core/config/global.d.ts +4 -2
  661. package/dist/core/config/global.js +15 -0
  662. package/dist/core/config.js +72 -0
  663. package/dist/core/dom/attributes.js +39 -0
  664. package/dist/core/dom/classes.js +207 -0
  665. package/dist/core/dom/create.js +250 -0
  666. package/dist/core/dom/events.js +82 -0
  667. package/dist/core/dom/index.d.ts +6 -6
  668. package/dist/core/dom/index.js +4 -0
  669. package/dist/core/dom/utils.d.ts +1 -1
  670. package/dist/core/dom/utils.js +45 -0
  671. package/dist/core/index.d.ts +20 -20
  672. package/dist/core/index.js +13 -0
  673. package/dist/core/shapes/cubic.d.ts +30 -0
  674. package/dist/core/shapes/cubic.js +62 -0
  675. package/dist/core/shapes/index.d.ts +6 -0
  676. package/dist/core/shapes/index.js +3 -0
  677. package/dist/core/shapes/material.d.ts +24 -0
  678. package/dist/core/shapes/material.js +119 -0
  679. package/dist/core/shapes/polygon.d.ts +35 -0
  680. package/dist/core/shapes/polygon.js +221 -0
  681. package/dist/core/state/disabled.js +26 -0
  682. package/dist/core/state/emitter.js +24 -0
  683. package/dist/core/state/events.js +32 -0
  684. package/dist/core/state/index.d.ts +10 -10
  685. package/dist/core/state/index.js +5 -0
  686. package/dist/core/state/lifecycle.js +51 -0
  687. package/dist/core/state/store.js +61 -0
  688. package/dist/core/utils/background.js +35 -0
  689. package/dist/core/utils/color.js +23 -0
  690. package/dist/core/utils/index.d.ts +6 -6
  691. package/dist/core/utils/index.js +8 -0
  692. package/dist/core/utils/mobile.js +63 -0
  693. package/dist/core/utils/object.js +21 -0
  694. package/dist/core/utils/performance.d.ts +5 -2
  695. package/dist/core/utils/performance.js +117 -0
  696. package/dist/core/utils/theme.js +78 -0
  697. package/dist/core/utils/validate.js +113 -0
  698. package/dist/index.cjs +12 -18
  699. package/dist/index.d.ts +3 -3
  700. package/dist/index.js +4 -57
  701. package/dist/package.json +40 -11
  702. package/dist/styles/badge.css +2 -0
  703. package/dist/styles/badge.d.ts +1 -0
  704. package/dist/styles/badge.js +2 -0
  705. package/dist/styles/base.css +2 -0
  706. package/dist/styles/base.d.ts +1 -0
  707. package/dist/styles/base.js +2 -0
  708. package/dist/styles/bottom-app-bar.css +2 -0
  709. package/dist/styles/bottom-app-bar.d.ts +1 -0
  710. package/dist/styles/bottom-app-bar.js +2 -0
  711. package/dist/styles/bottom-sheet.css +2 -0
  712. package/dist/styles/bottom-sheet.d.ts +1 -0
  713. package/dist/styles/bottom-sheet.js +2 -0
  714. package/dist/styles/button-group.css +2 -0
  715. package/dist/styles/button-group.d.ts +1 -0
  716. package/dist/styles/button-group.js +3 -0
  717. package/dist/styles/button.css +2 -0
  718. package/dist/styles/button.d.ts +1 -0
  719. package/dist/styles/button.js +2 -0
  720. package/dist/styles/card.css +2 -0
  721. package/dist/styles/card.d.ts +1 -0
  722. package/dist/styles/card.js +2 -0
  723. package/dist/styles/carousel.css +2 -0
  724. package/dist/styles/carousel.d.ts +1 -0
  725. package/dist/styles/carousel.js +2 -0
  726. package/dist/styles/checkbox.css +2 -0
  727. package/dist/styles/checkbox.d.ts +1 -0
  728. package/dist/styles/checkbox.js +2 -0
  729. package/dist/styles/chips.css +2 -0
  730. package/dist/styles/chips.d.ts +1 -0
  731. package/dist/styles/chips.js +2 -0
  732. package/dist/styles/dialog.css +2 -0
  733. package/dist/styles/dialog.d.ts +1 -0
  734. package/dist/styles/dialog.js +3 -0
  735. package/dist/styles/divider.css +2 -0
  736. package/dist/styles/divider.d.ts +1 -0
  737. package/dist/styles/divider.js +2 -0
  738. package/dist/styles/drawer.css +2 -0
  739. package/dist/styles/drawer.d.ts +1 -0
  740. package/dist/styles/drawer.js +2 -0
  741. package/dist/styles/extended-fab.css +2 -0
  742. package/dist/styles/extended-fab.d.ts +1 -0
  743. package/dist/styles/extended-fab.js +2 -0
  744. package/dist/styles/fab.css +2 -0
  745. package/dist/styles/fab.d.ts +1 -0
  746. package/dist/styles/fab.js +2 -0
  747. package/dist/styles/icon-button.css +2 -0
  748. package/dist/styles/icon-button.d.ts +1 -0
  749. package/dist/styles/icon-button.js +2 -0
  750. package/dist/styles/list.css +2 -0
  751. package/dist/styles/list.d.ts +1 -0
  752. package/dist/styles/list.js +2 -0
  753. package/dist/styles/loading-indicator.css +2 -0
  754. package/dist/styles/loading-indicator.d.ts +1 -0
  755. package/dist/styles/loading-indicator.js +2 -0
  756. package/dist/styles/menu.css +2 -0
  757. package/dist/styles/menu.d.ts +1 -0
  758. package/dist/styles/menu.js +2 -0
  759. package/dist/styles/navigation-rail.css +2 -0
  760. package/dist/styles/navigation-rail.d.ts +1 -0
  761. package/dist/styles/navigation-rail.js +2 -0
  762. package/dist/styles/navigation.css +2 -0
  763. package/dist/styles/navigation.d.ts +1 -0
  764. package/dist/styles/navigation.js +2 -0
  765. package/dist/styles/progress.css +2 -0
  766. package/dist/styles/progress.d.ts +1 -0
  767. package/dist/styles/progress.js +2 -0
  768. package/dist/styles/radios.css +2 -0
  769. package/dist/styles/radios.d.ts +1 -0
  770. package/dist/styles/radios.js +2 -0
  771. package/dist/styles/search.css +2 -0
  772. package/dist/styles/search.d.ts +1 -0
  773. package/dist/styles/search.js +2 -0
  774. package/dist/styles/segmented-button.css +2 -0
  775. package/dist/styles/segmented-button.d.ts +1 -0
  776. package/dist/styles/segmented-button.js +2 -0
  777. package/dist/styles/select.css +2 -0
  778. package/dist/styles/select.d.ts +1 -0
  779. package/dist/styles/select.js +3 -0
  780. package/dist/styles/side-sheet.css +2 -0
  781. package/dist/styles/side-sheet.d.ts +1 -0
  782. package/dist/styles/side-sheet.js +2 -0
  783. package/dist/styles/slider.css +2 -0
  784. package/dist/styles/slider.d.ts +1 -0
  785. package/dist/styles/slider.js +2 -0
  786. package/dist/styles/snackbar.css +2 -0
  787. package/dist/styles/snackbar.d.ts +1 -0
  788. package/dist/styles/snackbar.js +3 -0
  789. package/dist/styles/split-button.css +2 -0
  790. package/dist/styles/split-button.d.ts +1 -0
  791. package/dist/styles/split-button.js +3 -0
  792. package/dist/styles/switch.css +2 -0
  793. package/dist/styles/switch.d.ts +1 -0
  794. package/dist/styles/switch.js +2 -0
  795. package/dist/styles/tabs.css +2 -0
  796. package/dist/styles/tabs.d.ts +1 -0
  797. package/dist/styles/tabs.js +3 -0
  798. package/dist/styles/textfield.css +2 -0
  799. package/dist/styles/textfield.d.ts +1 -0
  800. package/dist/styles/textfield.js +2 -0
  801. package/dist/styles/timepicker.css +2 -0
  802. package/dist/styles/timepicker.d.ts +1 -0
  803. package/dist/styles/timepicker.js +2 -0
  804. package/dist/styles/top-app-bar.css +2 -0
  805. package/dist/styles/top-app-bar.d.ts +1 -0
  806. package/dist/styles/top-app-bar.js +2 -0
  807. package/dist/styles/utilities.css +2 -0
  808. package/dist/styles/utilities.d.ts +1 -0
  809. package/dist/styles/utilities.js +2 -0
  810. package/dist/styles.css +2 -7
  811. package/dist/themes/autumn.css +2 -0
  812. package/dist/themes/baseline.css +2 -0
  813. package/dist/themes/brownbeige.css +2 -0
  814. package/dist/themes/browngreen.css +2 -0
  815. package/dist/themes/desert.css +2 -0
  816. package/dist/themes/forest.css +2 -0
  817. package/dist/themes/highcontrast.css +2 -0
  818. package/dist/themes/legacy.css +2 -0
  819. package/dist/themes/material.css +2 -0
  820. package/dist/themes/ocean.css +2 -0
  821. package/dist/themes/sageivory.css +2 -0
  822. package/dist/themes/spring.css +2 -0
  823. package/dist/themes/summer.css +2 -0
  824. package/dist/themes/sunset.css +2 -0
  825. package/dist/themes/tealcaramel.css +2 -0
  826. package/dist/themes/winter.css +2 -0
  827. package/package.json +44 -7
  828. package/src/styles/abstract/_variables.scss +18 -2
  829. package/src/styles/base/_document.scss +54 -0
  830. package/src/styles/components/_bottom-sheet.scss +167 -0
  831. package/src/styles/components/_button-group.scss +58 -38
  832. package/src/styles/components/_button.scss +9 -3
  833. package/src/styles/components/_card.scss +79 -20
  834. package/src/styles/components/_carousel.scss +3 -3
  835. package/src/styles/components/_chips.scss +2 -2
  836. package/src/styles/components/_dialog.scss +86 -22
  837. package/src/styles/components/_drawer.scss +85 -95
  838. package/src/styles/components/_extended-fab.scss +95 -111
  839. package/src/styles/components/_fab.scss +70 -87
  840. package/src/styles/components/_icon-button.scss +115 -104
  841. package/src/styles/components/_list.scss +2 -2
  842. package/src/styles/components/_loading-indicator.scss +41 -0
  843. package/src/styles/components/_menu.scss +324 -16
  844. package/src/styles/components/_navigation-rail.scss +307 -0
  845. package/src/styles/components/_navigation-system.scss +3 -1
  846. package/src/styles/components/_progress.scss +46 -53
  847. package/src/styles/components/_segmented-button.scss +71 -113
  848. package/src/styles/components/_side-sheet.scss +175 -0
  849. package/src/styles/components/_slider.scss +50 -20
  850. package/src/styles/components/_snackbar.scss +153 -167
  851. package/src/styles/components/_split-button.scss +229 -0
  852. package/src/styles/components/_textfield.scss +4 -1
  853. package/src/styles/main.scss +6 -51
  854. package/src/styles/themes/_baseline.scss +8 -0
  855. package/src/styles/utilities/_ripple.scss +12 -3
  856. package/dist/components/sheet/api.d.ts +0 -37
  857. package/dist/components/sheet/config.d.ts +0 -53
  858. package/dist/components/sheet/constants.d.ts +0 -136
  859. package/dist/components/sheet/features/content.d.ts +0 -6
  860. package/dist/components/sheet/features/gestures.d.ts +0 -6
  861. package/dist/components/sheet/features/index.d.ts +0 -5
  862. package/dist/components/sheet/features/position.d.ts +0 -7
  863. package/dist/components/sheet/features/state.d.ts +0 -6
  864. package/dist/components/sheet/features/title.d.ts +0 -6
  865. package/dist/components/sheet/index.d.ts +0 -3
  866. package/dist/components/sheet/sheet.d.ts +0 -8
  867. package/dist/components/sheet/types.d.ts +0 -250
  868. package/dist/components/slider/features/canvas.d.ts +0 -47
  869. package/dist/index.cjs.map +0 -269
  870. package/dist/index.js.map +0 -269
  871. package/src/styles/components/_sheet.scss +0 -236
@@ -1,4 +1,4 @@
1
- import { BadgeConfig } from "./types";
1
+ import { BadgeConfig } from "./types.js";
2
2
  /**
3
3
  * Default configuration for the Badge component
4
4
  * These values will be used when not explicitly specified by the user.
@@ -0,0 +1,63 @@
1
+ import { createComponentConfig, createElementConfig, } from "../../core/config/component.js";
2
+ import { BADGE_VARIANTS, BADGE_COLORS, BADGE_POSITIONS, BADGE_MAX_CHARACTERS, } from "./constants.js";
3
+ export const defaultConfig = {
4
+ variant: BADGE_VARIANTS.LARGE,
5
+ color: BADGE_COLORS.ERROR,
6
+ position: BADGE_POSITIONS.TOP_RIGHT,
7
+ label: "",
8
+ visible: true,
9
+ };
10
+ export const createBaseConfig = (config = {}) => createComponentConfig(defaultConfig, config, "badge");
11
+ export const getElementConfig = (config) => {
12
+ const attributes = {};
13
+ if (config.variant !== "small") {
14
+ attributes.role = "status";
15
+ }
16
+ const formattedLabel = config.variant === "small"
17
+ ? ""
18
+ : formatBadgeLabel(config.label || "", config.max);
19
+ return createElementConfig(config, {
20
+ tag: "span",
21
+ attributes,
22
+ className: config.class,
23
+ text: formattedLabel,
24
+ });
25
+ };
26
+ export const getApiConfig = (comp) => ({
27
+ visibility: {
28
+ show: () => comp.visibility.show(),
29
+ hide: () => comp.visibility.hide(),
30
+ toggle: (visible) => comp.visibility.toggle(visible),
31
+ isVisible: () => comp.visibility.isVisible(),
32
+ },
33
+ lifecycle: {
34
+ destroy: () => comp.lifecycle.destroy(),
35
+ },
36
+ });
37
+ export const formatBadgeLabel = (label, max) => {
38
+ if (label === undefined || label === null || label === "") {
39
+ return "";
40
+ }
41
+ let formattedLabel = String(label);
42
+ const numericLabel = Number(label);
43
+ if (max !== undefined && !isNaN(numericLabel) && numericLabel > max) {
44
+ formattedLabel = `${max}+`;
45
+ }
46
+ if (formattedLabel.length > BADGE_MAX_CHARACTERS) {
47
+ const numericValue = Number(label);
48
+ if (!isNaN(numericValue)) {
49
+ if (numericValue >= 1000) {
50
+ formattedLabel = "999+";
51
+ }
52
+ else {
53
+ formattedLabel =
54
+ formattedLabel.substring(0, BADGE_MAX_CHARACTERS - 1) + "+";
55
+ }
56
+ }
57
+ else {
58
+ formattedLabel = formattedLabel.substring(0, BADGE_MAX_CHARACTERS);
59
+ }
60
+ }
61
+ return formattedLabel;
62
+ };
63
+ export default defaultConfig;
@@ -0,0 +1,20 @@
1
+ export const BADGE_VARIANTS = {
2
+ SMALL: 'small',
3
+ LARGE: 'large'
4
+ };
5
+ export const BADGE_COLORS = {
6
+ ERROR: 'error',
7
+ PRIMARY: 'primary',
8
+ SECONDARY: 'secondary',
9
+ TERTIARY: 'tertiary',
10
+ SUCCESS: 'success',
11
+ WARNING: 'warning',
12
+ INFO: 'info'
13
+ };
14
+ export const BADGE_POSITIONS = {
15
+ TOP_RIGHT: 'top-right',
16
+ TOP_LEFT: 'top-left',
17
+ BOTTOM_RIGHT: 'bottom-right',
18
+ BOTTOM_LEFT: 'bottom-left'
19
+ };
20
+ export const BADGE_MAX_CHARACTERS = 4;
@@ -1,4 +1,4 @@
1
- import { BadgeConfig } from './types';
1
+ import { BadgeConfig } from "./types.js";
2
2
  /**
3
3
  * Higher-order function that adds visibility control features to a component
4
4
  * @returns {Function} Component enhancer with visibility features
@@ -0,0 +1,95 @@
1
+ import { formatBadgeLabel } from "./config.js";
2
+ const VARIANT_SMALL = 'small';
3
+ const VARIANT_LARGE = 'large';
4
+ const COLOR_ERROR = 'error';
5
+ const POSITION_TOP_RIGHT = 'top-right';
6
+ export const withVisibility = () => component => {
7
+ const visible = component.config.visible !== false;
8
+ if (!visible) {
9
+ component.element.classList.add(`${component.getClass('badge')}--invisible`);
10
+ }
11
+ return {
12
+ ...component,
13
+ visibility: {
14
+ show() {
15
+ component.element.classList.remove(`${component.getClass('badge')}--invisible`);
16
+ },
17
+ hide() {
18
+ component.element.classList.add(`${component.getClass('badge')}--invisible`);
19
+ },
20
+ toggle(visible) {
21
+ if (visible === undefined) {
22
+ component.element.classList.toggle(`${component.getClass('badge')}--invisible`);
23
+ }
24
+ else if (visible) {
25
+ this.show();
26
+ }
27
+ else {
28
+ this.hide();
29
+ }
30
+ },
31
+ isVisible() {
32
+ return !component.element.classList.contains(`${component.getClass('badge')}--invisible`);
33
+ }
34
+ }
35
+ };
36
+ };
37
+ export const withVariant = (config) => component => {
38
+ const variant = config.variant || VARIANT_LARGE;
39
+ component.element.classList.add(`${component.getClass('badge')}--${variant}`);
40
+ if (variant === VARIANT_SMALL) {
41
+ component.element.textContent = '';
42
+ component.element.setAttribute('aria-hidden', 'true');
43
+ }
44
+ else {
45
+ component.element.setAttribute('role', 'status');
46
+ if (config.label !== undefined && config.label !== '') {
47
+ const formattedLabel = formatBadgeLabel(config.label, config.max);
48
+ component.element.textContent = formattedLabel;
49
+ }
50
+ }
51
+ return component;
52
+ };
53
+ export const withColor = (config) => component => {
54
+ const color = config.color || COLOR_ERROR;
55
+ component.element.classList.add(`${component.getClass('badge')}--${color}`);
56
+ return component;
57
+ };
58
+ export const withPosition = (config) => component => {
59
+ const position = config.position || POSITION_TOP_RIGHT;
60
+ component.element.classList.add(`${component.getClass('badge')}--${position}`);
61
+ if (config.target) {
62
+ component.element.classList.add(`${component.getClass('badge')}--positioned`);
63
+ }
64
+ return component;
65
+ };
66
+ export const withMax = (config) => component => {
67
+ if (config.max === undefined || config.variant === VARIANT_SMALL) {
68
+ return component;
69
+ }
70
+ component.config.max = config.max;
71
+ if (config.label !== undefined && config.label !== '') {
72
+ const formattedLabel = formatBadgeLabel(config.label, config.max);
73
+ component.element.textContent = formattedLabel;
74
+ if (typeof config.label === 'number' && config.label > config.max) {
75
+ component.element.classList.add(`${component.getClass('badge')}--overflow`);
76
+ }
77
+ }
78
+ return component;
79
+ };
80
+ export const withAttachment = (config) => component => {
81
+ if (!config.target) {
82
+ return component;
83
+ }
84
+ const wrapper = document.createElement('div');
85
+ wrapper.classList.add(component.getClass('badge-wrapper'));
86
+ wrapper.style.position = 'relative';
87
+ const parent = config.target.parentNode;
88
+ if (parent) {
89
+ parent.replaceChild(wrapper, config.target);
90
+ wrapper.appendChild(config.target);
91
+ wrapper.appendChild(component.element);
92
+ component.wrapper = wrapper;
93
+ }
94
+ return component;
95
+ };
@@ -4,5 +4,5 @@
4
4
  * @description A small element that communicates status, shows a count,
5
5
  * or highlights an element requiring attention.
6
6
  */
7
- export { default } from "./badge";
8
- export type { BadgeConfig, BadgeComponent, BadgeVariant, BadgeColor, BadgePosition, } from "./types";
7
+ export { default } from "./badge.js";
8
+ export type { BadgeConfig, BadgeComponent, BadgeVariant, BadgeColor, BadgePosition, } from "./types.js";
@@ -0,0 +1 @@
1
+ export { default } from "./badge.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,7 @@
2
2
  * @module components/bottom-app-bar
3
3
  * @description Bottom app bar implementation
4
4
  */
5
- import { BottomAppBar, BottomAppBarConfig } from "./types";
5
+ import { BottomAppBar, BottomAppBarConfig } from "./types.js";
6
6
  /**
7
7
  * Creates a bottom app bar component
8
8
  *
@@ -0,0 +1,91 @@
1
+ import { createBase, withElement, withEvents, withLifecycle, } from "../../core/compose/index.js";
2
+ import { createConfig } from "./config.js";
3
+ export const createBottomAppBar = (config = {}) => {
4
+ const componentConfig = createConfig(config);
5
+ const component = createBase(componentConfig);
6
+ const actionsContainer = document.createElement("div");
7
+ actionsContainer.className = `${component.getClass("bottom-app-bar")}-actions`;
8
+ const fabContainer = document.createElement("div");
9
+ fabContainer.className = `${component.getClass("bottom-app-bar")}-fab-container`;
10
+ const enhancedComponent = withElement({
11
+ tag: componentConfig.tag,
12
+ componentName: "bottom-app-bar",
13
+ className: [
14
+ componentConfig.hasFab
15
+ ? `${component.getClass("bottom-app-bar")}--with-fab`
16
+ : "",
17
+ componentConfig.fabPosition === "center"
18
+ ? `${component.getClass("bottom-app-bar")}--fab-center`
19
+ : "",
20
+ componentConfig.class,
21
+ ],
22
+ attributes: {
23
+ role: "toolbar",
24
+ "aria-label": "Bottom app bar",
25
+ },
26
+ interactive: true,
27
+ })(component);
28
+ const withEventsComponent = withEvents()(enhancedComponent);
29
+ const withLifecycleComponent = withLifecycle()(withEventsComponent);
30
+ withLifecycleComponent.element.appendChild(actionsContainer);
31
+ withLifecycleComponent.element.appendChild(fabContainer);
32
+ let isVisible = true;
33
+ let prevScrollY = window.scrollY;
34
+ if (componentConfig.autoHide) {
35
+ const handleScroll = () => {
36
+ const currentScrollY = window.scrollY;
37
+ if (currentScrollY > prevScrollY + 10) {
38
+ if (isVisible) {
39
+ bottomBar.hide();
40
+ componentConfig.onVisibilityChange?.(false);
41
+ }
42
+ }
43
+ else if (currentScrollY < prevScrollY - 10) {
44
+ if (!isVisible) {
45
+ bottomBar.show();
46
+ componentConfig.onVisibilityChange?.(true);
47
+ }
48
+ }
49
+ prevScrollY = currentScrollY;
50
+ };
51
+ window.addEventListener("scroll", handleScroll, { passive: true });
52
+ const originalDestroy = withLifecycleComponent.lifecycle.destroy;
53
+ withLifecycleComponent.lifecycle.destroy = () => {
54
+ window.removeEventListener("scroll", handleScroll);
55
+ originalDestroy();
56
+ };
57
+ }
58
+ const bottomBar = {
59
+ ...withLifecycleComponent,
60
+ addAction(button) {
61
+ actionsContainer.appendChild(button);
62
+ return this;
63
+ },
64
+ addFab(fab) {
65
+ fabContainer.innerHTML = "";
66
+ fabContainer.appendChild(fab);
67
+ this.element.classList.add(`${component.getClass("bottom-app-bar")}--with-fab`);
68
+ return this;
69
+ },
70
+ show() {
71
+ this.element.classList.remove(`${component.getClass("bottom-app-bar")}--hidden`);
72
+ isVisible = true;
73
+ return this;
74
+ },
75
+ hide() {
76
+ this.element.classList.add(`${component.getClass("bottom-app-bar")}--hidden`);
77
+ isVisible = false;
78
+ return this;
79
+ },
80
+ isVisible() {
81
+ return isVisible;
82
+ },
83
+ getActionsContainer() {
84
+ return actionsContainer;
85
+ },
86
+ };
87
+ if (componentConfig.autoHide && componentConfig.transitionDuration) {
88
+ bottomBar.element.style.transition = `transform ${componentConfig.transitionDuration}ms ease-in-out`;
89
+ }
90
+ return bottomBar;
91
+ };
@@ -2,7 +2,7 @@
2
2
  * @module components/bottom-app-bar
3
3
  * @description Configuration for bottom app bar component
4
4
  */
5
- import { BottomAppBarConfig } from "./types";
5
+ import { BottomAppBarConfig } from "./types.js";
6
6
  /**
7
7
  * Default configuration for bottom app bar
8
8
  */
@@ -0,0 +1,10 @@
1
+ import { createComponentConfig } from "../../core/config/component.js";
2
+ import { FAB_POSITIONS, DEFAULT_TRANSITION_DURATION } from "./constants.js";
3
+ export const defaultConfig = {
4
+ tag: "div",
5
+ hasFab: false,
6
+ fabPosition: FAB_POSITIONS.END,
7
+ autoHide: false,
8
+ transitionDuration: DEFAULT_TRANSITION_DURATION,
9
+ };
10
+ export const createConfig = (config = {}) => createComponentConfig(defaultConfig, config, "bottom-app-bar");
@@ -0,0 +1,13 @@
1
+ export const FAB_POSITIONS = {
2
+ CENTER: 'center',
3
+ END: 'end'
4
+ };
5
+ export const DEFAULT_TRANSITION_DURATION = 300;
6
+ export const BOTTOM_APP_BAR_CLASSES = {
7
+ ROOT: 'bottom-app-bar',
8
+ ACTIONS: 'bottom-app-bar-actions',
9
+ FAB_CONTAINER: 'bottom-app-bar-fab',
10
+ HIDDEN: 'bottom-app-bar--hidden',
11
+ FAB_CENTER: 'bottom-app-bar--fab-center',
12
+ FAB_END: 'bottom-app-bar--fab-end'
13
+ };
@@ -2,7 +2,7 @@
2
2
  * @module components/bottom-app-bar
3
3
  * @description Bottom app bar component for mobile interfaces
4
4
  */
5
- import { createBottomAppBar } from './bottom-app-bar';
5
+ import { createBottomAppBar } from "./bottom-app-bar.js";
6
6
  export default createBottomAppBar;
7
7
  export { createBottomAppBar };
8
- export type { BottomAppBarConfig, BottomAppBar } from './types';
8
+ export type { BottomAppBarConfig, BottomAppBar } from "./types.js";
@@ -0,0 +1,3 @@
1
+ import { createBottomAppBar } from "./bottom-app-bar.js";
2
+ export default createBottomAppBar;
3
+ export { createBottomAppBar };
@@ -2,7 +2,7 @@
2
2
  * @module components/bottom-app-bar
3
3
  * @description Type definitions for Bottom App Bar component
4
4
  */
5
- import { ElementComponent } from '../../core/compose';
5
+ import { ElementComponent } from "../../core/compose/index.js";
6
6
  /**
7
7
  * FAB position type for Bottom App Bar
8
8
  * @category Components
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ import { BottomSheetComponent, BottomSheetEventHandlers, BottomSheetState } from "./types.js";
2
+ interface ApiOptions {
3
+ state: {
4
+ open: () => void;
5
+ close: () => void;
6
+ expand: () => void;
7
+ collapse: () => void;
8
+ isOpen: () => boolean;
9
+ getState: () => BottomSheetState;
10
+ release: () => void;
11
+ };
12
+ structure: {
13
+ setContent: (content: string | HTMLElement) => void;
14
+ setTitle: (title: string) => void;
15
+ };
16
+ drag: {
17
+ release: () => void;
18
+ };
19
+ lifecycle: {
20
+ destroy: () => void;
21
+ };
22
+ }
23
+ interface BaseComponent {
24
+ element: HTMLElement;
25
+ getClass: (name: string) => string;
26
+ on: (event: string, handler: (...args: never[]) => void) => unknown;
27
+ off: (event: string, handler: (...args: never[]) => void) => unknown;
28
+ }
29
+ /**
30
+ * The public surface. Every method here is backed by a feature above it; none
31
+ * is declared and left unwired.
32
+ */
33
+ export declare const withAPI: ({ state, structure, drag, lifecycle }: ApiOptions) => <C extends BaseComponent>(component: C) => BottomSheetComponent;
34
+ /**
35
+ * Registers the handlers given at creation.
36
+ *
37
+ * Several components in this library declare an `on` option and never read it,
38
+ * so handlers passed at creation are silently dropped. This one reads it.
39
+ */
40
+ export declare const applyEventHandlers: (component: {
41
+ on: (event: string, handler: (...args: never[]) => void) => unknown;
42
+ }, handlers?: BottomSheetEventHandlers) => void;
43
+ export {};
@@ -0,0 +1,56 @@
1
+ export const withAPI = ({ state, structure, drag, lifecycle }) => (component) => {
2
+ const api = {
3
+ element: component.element,
4
+ getClass: component.getClass,
5
+ open() {
6
+ state.open();
7
+ return this;
8
+ },
9
+ close() {
10
+ state.close();
11
+ return this;
12
+ },
13
+ expand() {
14
+ state.expand();
15
+ return this;
16
+ },
17
+ collapse() {
18
+ state.collapse();
19
+ return this;
20
+ },
21
+ isOpen: () => state.isOpen(),
22
+ getState: () => state.getState(),
23
+ setContent(content) {
24
+ structure.setContent(content);
25
+ return this;
26
+ },
27
+ setTitle(title) {
28
+ structure.setTitle(title);
29
+ return this;
30
+ },
31
+ on(event, handler) {
32
+ component.on(event, handler);
33
+ return this;
34
+ },
35
+ off(event, handler) {
36
+ component.off(event, handler);
37
+ return this;
38
+ },
39
+ destroy() {
40
+ drag.release();
41
+ state.release();
42
+ lifecycle.destroy();
43
+ component.element.remove();
44
+ },
45
+ };
46
+ return api;
47
+ };
48
+ export const applyEventHandlers = (component, handlers) => {
49
+ if (!handlers)
50
+ return;
51
+ for (const [event, handler] of Object.entries(handlers)) {
52
+ if (typeof handler === "function") {
53
+ component.on(event, handler);
54
+ }
55
+ }
56
+ };
@@ -0,0 +1,24 @@
1
+ import { BottomSheetConfig, BottomSheetComponent } from "./types.js";
2
+ /**
3
+ * Creates a bottom sheet: a surface anchored to the bottom edge holding
4
+ * content secondary to the page.
5
+ *
6
+ * A modal sheet covers the page with a scrim and takes focus, for a task that
7
+ * must finish first. A standard sheet leaves the page usable alongside it.
8
+ *
9
+ * @param {BottomSheetConfig} config - Bottom sheet configuration
10
+ * @returns {BottomSheetComponent} Bottom sheet instance
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const sheet = createBottomSheet({
15
+ * title: 'Share',
16
+ * content: '<p>Choose where to send it.</p>',
17
+ * on: { close: () => console.info('closed') }
18
+ * });
19
+ *
20
+ * sheet.open();
21
+ * ```
22
+ */
23
+ declare const createBottomSheet: (config?: BottomSheetConfig) => BottomSheetComponent;
24
+ export default createBottomSheet;
@@ -0,0 +1,18 @@
1
+ import { pipe } from "../../core/compose/index.js";
2
+ import { createBase, withElement } from "../../core/compose/component.js";
3
+ import { withEvents, withLifecycle } from "../../core/compose/features/index.js";
4
+ import { withStructure, withState, withDrag } from "./features/index.js";
5
+ import { withAPI, applyEventHandlers } from "./api.js";
6
+ import { createBaseConfig, getElementConfig } from "./config.js";
7
+ const createBottomSheet = (config = {}) => {
8
+ const baseConfig = createBaseConfig(config);
9
+ const component = pipe(createBase, withEvents(), withElement(getElementConfig(baseConfig)), withStructure(baseConfig), withState(baseConfig), withDrag(baseConfig), withLifecycle())(baseConfig);
10
+ applyEventHandlers(component, baseConfig.on);
11
+ return withAPI({
12
+ state: component.state,
13
+ structure: component.structure,
14
+ drag: component.drag,
15
+ lifecycle: { destroy: component.lifecycle?.destroy ?? (() => { }) },
16
+ })(component);
17
+ };
18
+ export default createBottomSheet;
@@ -0,0 +1,34 @@
1
+ import { BottomSheetConfig } from "./types.js";
2
+ /**
3
+ * What the component applies when the caller says nothing.
4
+ */
5
+ export declare const defaultConfig: Partial<BottomSheetConfig>;
6
+ /**
7
+ * Merges the caller's configuration over the defaults.
8
+ */
9
+ export declare const createBaseConfig: (config?: BottomSheetConfig) => BottomSheetConfig;
10
+ /**
11
+ * The root element: a fixed layer holding the scrim and the sheet itself.
12
+ */
13
+ export declare const getElementConfig: (config: BottomSheetConfig) => {
14
+ tag: string;
15
+ componentName: string;
16
+ attributes: Record<string, any>;
17
+ className: string[];
18
+ rawClass: string | string[];
19
+ id: string;
20
+ name: string;
21
+ title: string;
22
+ tabIndex: number;
23
+ style: string | Partial<CSSStyleDeclaration>;
24
+ data: Record<string, string>;
25
+ role: string;
26
+ ariaLabel: string;
27
+ ariaDescribedBy: string;
28
+ ariaLabelledBy: string;
29
+ ariaHidden: boolean;
30
+ html: string;
31
+ text: string;
32
+ forwardEvents: Record<string, boolean | ((component: any, event: Event) => boolean)>;
33
+ interactive: boolean;
34
+ };
@@ -0,0 +1,19 @@
1
+ import { createComponentConfig, createElementConfig, } from "../../core/config/component.js";
2
+ import { BOTTOM_SHEET_DEFAULTS, BOTTOM_SHEET_STATES, } from "./constants.js";
3
+ export const defaultConfig = {
4
+ variant: BOTTOM_SHEET_DEFAULTS.VARIANT,
5
+ dragHandle: BOTTOM_SHEET_DEFAULTS.DRAG_HANDLE,
6
+ peekHeight: BOTTOM_SHEET_DEFAULTS.PEEK_HEIGHT,
7
+ maxWidth: BOTTOM_SHEET_DEFAULTS.MAX_WIDTH,
8
+ initialState: BOTTOM_SHEET_STATES.HIDDEN,
9
+ closeOnScrimClick: BOTTOM_SHEET_DEFAULTS.CLOSE_ON_SCRIM_CLICK,
10
+ closeOnEscape: BOTTOM_SHEET_DEFAULTS.CLOSE_ON_ESCAPE,
11
+ };
12
+ export const createBaseConfig = (config = {}) => createComponentConfig(defaultConfig, config, "bottom-sheet");
13
+ export const getElementConfig = (config) => createElementConfig(config, {
14
+ tag: "div",
15
+ className: [config.class].filter(Boolean),
16
+ attributes: {
17
+ "aria-hidden": "true",
18
+ },
19
+ });
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Bottom sheet variants.
3
+ *
4
+ * A standard sheet sits alongside the page and leaves it usable. A modal sheet
5
+ * puts a scrim over the page and takes focus, so it is the one to reach for
6
+ * when the sheet's task must finish before anything else continues.
7
+ */
8
+ export declare const BOTTOM_SHEET_VARIANTS: {
9
+ readonly STANDARD: "standard";
10
+ readonly MODAL: "modal";
11
+ };
12
+ /**
13
+ * How far the sheet is open.
14
+ *
15
+ * `partial` shows the peek height, enough to say what the sheet holds without
16
+ * covering the page. `expanded` shows as much as the content needs.
17
+ */
18
+ export declare const BOTTOM_SHEET_STATES: {
19
+ readonly HIDDEN: "hidden";
20
+ readonly PARTIAL: "partial";
21
+ readonly EXPANDED: "expanded";
22
+ };
23
+ /**
24
+ * Defaults, from Compose BottomSheetDefaults and SheetBottomTokens.
25
+ */
26
+ export declare const BOTTOM_SHEET_DEFAULTS: {
27
+ readonly VARIANT: "modal";
28
+ /** BottomSheetDefaults.SheetPeekHeight */
29
+ readonly PEEK_HEIGHT: 56;
30
+ /** BottomSheetDefaults.SheetMaxWidth; wider viewports centre the sheet */
31
+ readonly MAX_WIDTH: 640;
32
+ /** A drag handle is part of the anatomy, so it is on unless asked otherwise */
33
+ readonly DRAG_HANDLE: true;
34
+ readonly CLOSE_ON_SCRIM_CLICK: true;
35
+ readonly CLOSE_ON_ESCAPE: true;
36
+ /**
37
+ * BottomSheetDefaults.PositionalThreshold: how far the sheet must be dragged
38
+ * before it settles at the next anchor rather than springing back.
39
+ */
40
+ readonly POSITIONAL_THRESHOLD: 56;
41
+ /** BottomSheetDefaults.VelocityThreshold, in dp per second */
42
+ readonly VELOCITY_THRESHOLD: 125;
43
+ };
44
+ /**
45
+ * Class names, without the prefix. `getClass` adds it.
46
+ */
47
+ export declare const BOTTOM_SHEET_CLASSES: {
48
+ readonly ROOT: "bottom-sheet";
49
+ readonly SCRIM: "bottom-sheet-scrim";
50
+ readonly CONTAINER: "bottom-sheet-container";
51
+ readonly HANDLE: "bottom-sheet-handle";
52
+ readonly HEADER: "bottom-sheet-header";
53
+ readonly TITLE: "bottom-sheet-title";
54
+ readonly CONTENT: "bottom-sheet-content";
55
+ };
56
+ /**
57
+ * Events the sheet emits.
58
+ */
59
+ export declare const BOTTOM_SHEET_EVENTS: {
60
+ readonly OPEN: "open";
61
+ readonly CLOSE: "close";
62
+ readonly STATE_CHANGE: "stateChange";
63
+ readonly DRAG_START: "dragStart";
64
+ readonly DRAG_END: "dragEnd";
65
+ };