mtrl 0.8.0-next.9 → 0.9.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 (905) 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 +3 -3
  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 +5 -5
  45. package/dist/components/button/api.js +265 -0
  46. package/dist/components/button/button.d.ts +2 -2
  47. package/dist/components/button/button.js +25 -0
  48. package/dist/components/button/config.d.ts +3 -3
  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 +18 -6
  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 +30 -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 +11 -2
  70. package/dist/components/card/api.js +79 -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 +15 -9
  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 +3 -2
  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.d.ts +5 -4
  83. package/dist/components/card/types.js +1 -0
  84. package/dist/components/carousel/api.d.ts +1 -1
  85. package/dist/components/carousel/api.js +46 -0
  86. package/dist/components/carousel/arrangement.js +61 -0
  87. package/dist/components/carousel/carousel.d.ts +1 -1
  88. package/dist/components/carousel/carousel.js +11 -0
  89. package/dist/components/carousel/config.d.ts +3 -3
  90. package/dist/components/carousel/config.js +40 -0
  91. package/dist/components/carousel/constants.js +23 -0
  92. package/dist/components/carousel/features/index.d.ts +2 -2
  93. package/dist/components/carousel/features/index.js +2 -0
  94. package/dist/components/carousel/features/scroll.d.ts +2 -2
  95. package/dist/components/carousel/features/scroll.js +345 -0
  96. package/dist/components/carousel/features/slides.d.ts +1 -1
  97. package/dist/components/carousel/features/slides.js +127 -0
  98. package/dist/components/carousel/index.d.ts +3 -3
  99. package/dist/components/carousel/index.js +2 -0
  100. package/dist/components/carousel/keylines.js +292 -0
  101. package/dist/components/carousel/strategy.d.ts +1 -1
  102. package/dist/components/carousel/strategy.js +207 -0
  103. package/dist/components/carousel/types.js +1 -0
  104. package/dist/components/checkbox/api.d.ts +1 -1
  105. package/dist/components/checkbox/api.js +82 -0
  106. package/dist/components/checkbox/checkbox.d.ts +1 -1
  107. package/dist/components/checkbox/checkbox.js +29 -0
  108. package/dist/components/checkbox/config.d.ts +3 -3
  109. package/dist/components/checkbox/config.js +44 -0
  110. package/dist/components/checkbox/constants.js +20 -0
  111. package/dist/components/checkbox/index.d.ts +3 -3
  112. package/dist/components/checkbox/index.js +2 -0
  113. package/dist/components/checkbox/types.d.ts +15 -16
  114. package/dist/components/checkbox/types.js +1 -0
  115. package/dist/components/chips/api.d.ts +6 -6
  116. package/dist/components/chips/api.js +153 -0
  117. package/dist/components/chips/chip/api.d.ts +3 -3
  118. package/dist/components/chips/chip/api.js +186 -0
  119. package/dist/components/chips/chip/chip.d.ts +1 -1
  120. package/dist/components/chips/chip/chip.js +78 -0
  121. package/dist/components/chips/chip/config.d.ts +7 -8
  122. package/dist/components/chips/chip/config.js +53 -0
  123. package/dist/components/chips/chip/constants.js +18 -0
  124. package/dist/components/chips/chip/index.d.ts +2 -2
  125. package/dist/components/chips/chip/index.js +2 -0
  126. package/dist/components/chips/chip/types.d.ts +1 -1
  127. package/dist/components/chips/chip/types.js +1 -0
  128. package/dist/components/chips/chips.d.ts +1 -1
  129. package/dist/components/chips/chips.js +32 -0
  130. package/dist/components/chips/config.d.ts +3 -3
  131. package/dist/components/chips/config.js +82 -0
  132. package/dist/components/chips/constants.js +20 -0
  133. package/dist/components/chips/features/chip-items.d.ts +1 -1
  134. package/dist/components/chips/features/chip-items.js +17 -0
  135. package/dist/components/chips/features/container.d.ts +1 -1
  136. package/dist/components/chips/features/container.js +41 -0
  137. package/dist/components/chips/features/controller.d.ts +1 -1
  138. package/dist/components/chips/features/controller.js +309 -0
  139. package/dist/components/chips/features/dom.d.ts +2 -2
  140. package/dist/components/chips/features/dom.js +26 -0
  141. package/dist/components/chips/features/index.d.ts +5 -5
  142. package/dist/components/chips/features/index.js +5 -0
  143. package/dist/components/chips/features/label.d.ts +1 -1
  144. package/dist/components/chips/features/label.js +63 -0
  145. package/dist/components/chips/index.d.ts +3 -3
  146. package/dist/components/chips/index.js +2 -0
  147. package/dist/components/chips/schema.d.ts +1 -1
  148. package/dist/components/chips/schema.js +46 -0
  149. package/dist/components/chips/types.d.ts +12 -1
  150. package/dist/components/chips/types.js +11 -0
  151. package/dist/components/datepicker/api.d.ts +5 -2
  152. package/dist/components/datepicker/api.js +180 -0
  153. package/dist/components/datepicker/config.d.ts +17 -14
  154. package/dist/components/datepicker/config.js +89 -0
  155. package/dist/components/datepicker/constants.js +50 -0
  156. package/dist/components/datepicker/datepicker.d.ts +1 -1
  157. package/dist/components/datepicker/datepicker.js +244 -0
  158. package/dist/components/datepicker/index.d.ts +3 -3
  159. package/dist/components/datepicker/index.js +2 -0
  160. package/dist/components/datepicker/render.d.ts +14 -6
  161. package/dist/components/datepicker/render.js +290 -0
  162. package/dist/components/datepicker/types.d.ts +51 -3
  163. package/dist/components/datepicker/types.js +18 -0
  164. package/dist/components/datepicker/utils.d.ts +1 -1
  165. package/dist/components/datepicker/utils.js +156 -0
  166. package/dist/components/dialog/api.d.ts +2 -2
  167. package/dist/components/dialog/api.js +106 -0
  168. package/dist/components/dialog/config.d.ts +5 -10
  169. package/dist/components/dialog/config.js +84 -0
  170. package/dist/components/dialog/constants.js +51 -0
  171. package/dist/components/dialog/dialog.d.ts +1 -1
  172. package/dist/components/dialog/dialog.js +25 -0
  173. package/dist/components/dialog/features.d.ts +1 -6
  174. package/dist/components/dialog/features.js +619 -0
  175. package/dist/components/dialog/index.d.ts +2 -2
  176. package/dist/components/dialog/index.js +1 -0
  177. package/dist/components/dialog/types.d.ts +15 -4
  178. package/dist/components/dialog/types.js +1 -0
  179. package/dist/components/divider/config.js +9 -0
  180. package/dist/components/divider/constants.js +18 -0
  181. package/dist/components/divider/divider.d.ts +3 -3
  182. package/dist/components/divider/divider.js +11 -0
  183. package/dist/components/divider/features.d.ts +3 -3
  184. package/dist/components/divider/features.js +143 -0
  185. package/dist/components/divider/index.d.ts +3 -3
  186. package/dist/components/divider/index.js +2 -0
  187. package/dist/components/divider/types.d.ts +1 -1
  188. package/dist/components/divider/types.js +1 -0
  189. package/dist/components/drawer/api.d.ts +4 -4
  190. package/dist/components/drawer/api.js +73 -0
  191. package/dist/components/drawer/config.d.ts +5 -4
  192. package/dist/components/drawer/config.js +66 -0
  193. package/dist/components/drawer/constants.d.ts +2 -0
  194. package/dist/components/drawer/constants.js +46 -0
  195. package/dist/components/drawer/drawer.d.ts +2 -2
  196. package/dist/components/drawer/drawer.js +42 -0
  197. package/dist/components/drawer/features/headline.d.ts +13 -3
  198. package/dist/components/drawer/features/headline.js +36 -0
  199. package/dist/components/drawer/features/index.d.ts +3 -3
  200. package/dist/components/drawer/features/index.js +3 -0
  201. package/dist/components/drawer/features/items.d.ts +17 -3
  202. package/dist/components/drawer/features/items.js +215 -0
  203. package/dist/components/drawer/features/state.d.ts +14 -10
  204. package/dist/components/drawer/features/state.js +170 -0
  205. package/dist/components/drawer/index.d.ts +2 -2
  206. package/dist/components/drawer/index.js +1 -0
  207. package/dist/components/drawer/types.d.ts +8 -2
  208. package/dist/components/drawer/types.js +1 -0
  209. package/dist/components/extended-fab/api.d.ts +13 -5
  210. package/dist/components/extended-fab/api.js +89 -0
  211. package/dist/components/extended-fab/config.d.ts +10 -10
  212. package/dist/components/extended-fab/config.js +73 -0
  213. package/dist/components/extended-fab/constants.d.ts +16 -4
  214. package/dist/components/extended-fab/constants.js +47 -0
  215. package/dist/components/extended-fab/extended-fab.d.ts +1 -1
  216. package/dist/components/extended-fab/extended-fab.js +59 -0
  217. package/dist/components/extended-fab/index.d.ts +2 -2
  218. package/dist/components/extended-fab/index.js +1 -0
  219. package/dist/components/extended-fab/types.d.ts +17 -8
  220. package/dist/components/extended-fab/types.js +1 -0
  221. package/dist/components/fab/api.d.ts +10 -3
  222. package/dist/components/fab/api.js +64 -0
  223. package/dist/components/fab/config.d.ts +8 -8
  224. package/dist/components/fab/config.js +53 -0
  225. package/dist/components/fab/constants.d.ts +18 -7
  226. package/dist/components/fab/constants.js +43 -0
  227. package/dist/components/fab/fab.d.ts +1 -1
  228. package/dist/components/fab/fab.js +17 -0
  229. package/dist/components/fab/index.d.ts +3 -3
  230. package/dist/components/fab/index.js +1 -0
  231. package/dist/components/fab/types.d.ts +12 -10
  232. package/dist/components/fab/types.js +1 -0
  233. package/dist/components/icon-button/api.d.ts +1 -1
  234. package/dist/components/icon-button/api.js +204 -0
  235. package/dist/components/icon-button/config.d.ts +3 -3
  236. package/dist/components/icon-button/config.js +91 -0
  237. package/dist/components/icon-button/constants.d.ts +21 -21
  238. package/dist/components/icon-button/constants.js +67 -0
  239. package/dist/components/icon-button/features/toggle.d.ts +2 -6
  240. package/dist/components/icon-button/features/toggle.js +122 -0
  241. package/dist/components/icon-button/icon-button.d.ts +1 -1
  242. package/dist/components/icon-button/icon-button.js +24 -0
  243. package/dist/components/icon-button/index.d.ts +4 -4
  244. package/dist/components/icon-button/index.js +2 -0
  245. package/dist/components/icon-button/types.d.ts +8 -2
  246. package/dist/components/icon-button/types.js +1 -0
  247. package/dist/components/index.d.ts +83 -69
  248. package/dist/components/index.js +41 -0
  249. package/dist/components/list/api.d.ts +18 -18
  250. package/dist/components/list/api.js +53 -0
  251. package/dist/components/list/config.d.ts +7 -4
  252. package/dist/components/list/config.js +79 -0
  253. package/dist/components/list/constants.js +35 -0
  254. package/dist/components/list/features/index.d.ts +2 -2
  255. package/dist/components/list/features/index.js +2 -0
  256. package/dist/components/list/features/renderer.js +120 -0
  257. package/dist/components/list/features/selection.js +160 -0
  258. package/dist/components/list/index.d.ts +3 -3
  259. package/dist/components/list/index.js +2 -0
  260. package/dist/components/list/list.d.ts +20 -1
  261. package/dist/components/list/list.js +19 -0
  262. package/dist/components/list/types.d.ts +32 -32
  263. package/dist/components/list/types.js +1 -0
  264. package/dist/components/loading-indicator/api.d.ts +14 -0
  265. package/dist/components/loading-indicator/api.js +122 -0
  266. package/dist/components/loading-indicator/config.d.ts +44 -0
  267. package/dist/components/loading-indicator/config.js +25 -0
  268. package/dist/components/loading-indicator/constants.d.ts +60 -0
  269. package/dist/components/loading-indicator/constants.js +32 -0
  270. package/dist/components/loading-indicator/features/motion.d.ts +22 -0
  271. package/dist/components/loading-indicator/features/motion.js +47 -0
  272. package/dist/components/loading-indicator/features/renderer.d.ts +29 -0
  273. package/dist/components/loading-indicator/features/renderer.js +115 -0
  274. package/dist/components/loading-indicator/index.d.ts +3 -0
  275. package/dist/components/loading-indicator/index.js +2 -0
  276. package/dist/components/loading-indicator/loading-indicator.d.ts +9 -0
  277. package/dist/components/loading-indicator/loading-indicator.js +17 -0
  278. package/dist/components/loading-indicator/types.d.ts +67 -0
  279. package/dist/components/loading-indicator/types.js +1 -0
  280. package/dist/components/menu/api.d.ts +6 -5
  281. package/dist/components/menu/api.js +79 -0
  282. package/dist/components/menu/config.d.ts +3 -3
  283. package/dist/components/menu/config.js +82 -0
  284. package/dist/components/menu/constants.d.ts +32 -0
  285. package/dist/components/menu/constants.js +61 -0
  286. package/dist/components/menu/features/controller.d.ts +1 -1
  287. package/dist/components/menu/features/controller.js +542 -0
  288. package/dist/components/menu/features/index.d.ts +5 -5
  289. package/dist/components/menu/features/index.js +6 -0
  290. package/dist/components/menu/features/keyboard.d.ts +21 -9
  291. package/dist/components/menu/features/keyboard.js +296 -0
  292. package/dist/components/menu/features/opener.d.ts +1 -1
  293. package/dist/components/menu/features/opener.js +300 -0
  294. package/dist/components/menu/features/position.d.ts +1 -1
  295. package/dist/components/menu/features/position.js +276 -0
  296. package/dist/components/menu/features/registry.d.ts +37 -0
  297. package/dist/components/menu/features/registry.js +13 -0
  298. package/dist/components/menu/features/submenu.d.ts +1 -1
  299. package/dist/components/menu/features/submenu.js +386 -0
  300. package/dist/components/menu/features/tasks.d.ts +9 -0
  301. package/dist/components/menu/features/tasks.js +47 -0
  302. package/dist/components/menu/index.d.ts +3 -3
  303. package/dist/components/menu/index.js +2 -0
  304. package/dist/components/menu/menu.d.ts +1 -1
  305. package/dist/components/menu/menu.js +25 -0
  306. package/dist/components/menu/types.d.ts +70 -11
  307. package/dist/components/menu/types.js +14 -0
  308. package/dist/components/navigation/api.d.ts +1 -1
  309. package/dist/components/navigation/api.js +117 -0
  310. package/dist/components/navigation/config.d.ts +3 -3
  311. package/dist/components/navigation/config.js +39 -0
  312. package/dist/components/navigation/constants.js +65 -0
  313. package/dist/components/navigation/features/controller.d.ts +2 -4
  314. package/dist/components/navigation/features/controller.js +173 -0
  315. package/dist/components/navigation/features/items.d.ts +3 -4
  316. package/dist/components/navigation/features/items.js +236 -0
  317. package/dist/components/navigation/index.d.ts +3 -3
  318. package/dist/components/navigation/index.js +2 -0
  319. package/dist/components/navigation/nav-item.d.ts +1 -1
  320. package/dist/components/navigation/nav-item.js +118 -0
  321. package/dist/components/navigation/navigation.d.ts +1 -1
  322. package/dist/components/navigation/navigation.js +52 -0
  323. package/dist/components/navigation/system/core.d.ts +6 -6
  324. package/dist/components/navigation/system/core.js +148 -0
  325. package/dist/components/navigation/system/events.d.ts +3 -3
  326. package/dist/components/navigation/system/events.js +126 -0
  327. package/dist/components/navigation/system/index.d.ts +2 -2
  328. package/dist/components/navigation/system/index.js +92 -0
  329. package/dist/components/navigation/system/mobile.d.ts +6 -6
  330. package/dist/components/navigation/system/mobile.js +139 -0
  331. package/dist/components/navigation/system/state.d.ts +3 -3
  332. package/dist/components/navigation/system/state.js +44 -0
  333. package/dist/components/navigation/system/types.d.ts +43 -11
  334. package/dist/components/navigation/system/types.js +1 -0
  335. package/dist/components/navigation/types.d.ts +15 -6
  336. package/dist/components/navigation/types.js +33 -0
  337. package/dist/components/navigation-rail/config.d.ts +2 -0
  338. package/dist/components/navigation-rail/config.js +15 -0
  339. package/dist/components/navigation-rail/constants.d.ts +14 -0
  340. package/dist/components/navigation-rail/constants.js +12 -0
  341. package/dist/components/navigation-rail/index.d.ts +2 -0
  342. package/dist/components/navigation-rail/index.js +1 -0
  343. package/dist/components/navigation-rail/navigation-rail.d.ts +7 -0
  344. package/dist/components/navigation-rail/navigation-rail.js +341 -0
  345. package/dist/components/navigation-rail/ripple.d.ts +2 -0
  346. package/dist/components/navigation-rail/ripple.js +41 -0
  347. package/dist/components/navigation-rail/types.d.ts +72 -0
  348. package/dist/components/navigation-rail/types.js +1 -0
  349. package/dist/components/progress/api.d.ts +3 -3
  350. package/dist/components/progress/api.js +204 -0
  351. package/dist/components/progress/config.d.ts +3 -3
  352. package/dist/components/progress/config.js +162 -0
  353. package/dist/components/progress/constants.d.ts +103 -84
  354. package/dist/components/progress/constants.js +110 -0
  355. package/dist/components/progress/features/canvas.d.ts +29 -31
  356. package/dist/components/progress/features/canvas.js +300 -0
  357. package/dist/components/progress/features/circular.d.ts +17 -7
  358. package/dist/components/progress/features/circular.js +71 -0
  359. package/dist/components/progress/features/colors.d.ts +16 -0
  360. package/dist/components/progress/features/colors.js +40 -0
  361. package/dist/components/progress/features/index.d.ts +4 -4
  362. package/dist/components/progress/features/index.js +4 -0
  363. package/dist/components/progress/features/linear.d.ts +23 -7
  364. package/dist/components/progress/features/linear.js +104 -0
  365. package/dist/components/progress/features/motion.d.ts +43 -0
  366. package/dist/components/progress/features/motion.js +105 -0
  367. package/dist/components/progress/features/resize-observer.js +40 -0
  368. package/dist/components/progress/features/state.d.ts +2 -3
  369. package/dist/components/progress/features/state.js +37 -0
  370. package/dist/components/progress/index.d.ts +2 -2
  371. package/dist/components/progress/index.js +1 -0
  372. package/dist/components/progress/progress.d.ts +1 -1
  373. package/dist/components/progress/progress.js +21 -0
  374. package/dist/components/progress/types.d.ts +20 -3
  375. package/dist/components/progress/types.js +1 -0
  376. package/dist/components/radios/api.d.ts +1 -1
  377. package/dist/components/radios/api.js +73 -0
  378. package/dist/components/radios/config.d.ts +3 -3
  379. package/dist/components/radios/config.js +28 -0
  380. package/dist/components/radios/constants.js +53 -0
  381. package/dist/components/radios/index.d.ts +3 -3
  382. package/dist/components/radios/index.js +2 -0
  383. package/dist/components/radios/radio.d.ts +1 -1
  384. package/dist/components/radios/radio.js +186 -0
  385. package/dist/components/radios/radios.d.ts +1 -1
  386. package/dist/components/radios/radios.js +21 -0
  387. package/dist/components/radios/types.js +1 -0
  388. package/dist/components/search/api.d.ts +1 -1
  389. package/dist/components/search/api.js +110 -0
  390. package/dist/components/search/config.d.ts +3 -3
  391. package/dist/components/search/config.js +66 -0
  392. package/dist/components/search/constants.js +84 -0
  393. package/dist/components/search/features/index.d.ts +4 -4
  394. package/dist/components/search/features/index.js +4 -0
  395. package/dist/components/search/features/input.d.ts +1 -1
  396. package/dist/components/search/features/input.js +245 -0
  397. package/dist/components/search/features/states.d.ts +1 -1
  398. package/dist/components/search/features/states.js +182 -0
  399. package/dist/components/search/features/structure.d.ts +1 -1
  400. package/dist/components/search/features/structure.js +165 -0
  401. package/dist/components/search/features/suggestions.d.ts +1 -3
  402. package/dist/components/search/features/suggestions.js +223 -0
  403. package/dist/components/search/index.d.ts +2 -2
  404. package/dist/components/search/index.js +1 -0
  405. package/dist/components/search/search.d.ts +1 -1
  406. package/dist/components/search/search.js +27 -0
  407. package/dist/components/search/types.js +1 -0
  408. package/dist/components/segmented-button/config.d.ts +2 -13
  409. package/dist/components/segmented-button/config.js +54 -0
  410. package/dist/components/segmented-button/constants.js +40 -0
  411. package/dist/components/segmented-button/index.d.ts +3 -3
  412. package/dist/components/segmented-button/index.js +2 -0
  413. package/dist/components/segmented-button/segment.d.ts +2 -1
  414. package/dist/components/segmented-button/segment.js +94 -0
  415. package/dist/components/segmented-button/segmented-button.d.ts +12 -1
  416. package/dist/components/segmented-button/segmented-button.js +195 -0
  417. package/dist/components/segmented-button/types.d.ts +11 -11
  418. package/dist/components/segmented-button/types.js +11 -0
  419. package/dist/components/select/api.d.ts +2 -2
  420. package/dist/components/select/api.js +89 -0
  421. package/dist/components/select/config.d.ts +1 -1
  422. package/dist/components/select/config.js +54 -0
  423. package/dist/components/select/constants.js +53 -0
  424. package/dist/components/select/features.d.ts +3 -3
  425. package/dist/components/select/features.js +247 -0
  426. package/dist/components/select/index.d.ts +3 -3
  427. package/dist/components/select/index.js +2 -0
  428. package/dist/components/select/select.d.ts +1 -1
  429. package/dist/components/select/select.js +26 -0
  430. package/dist/components/select/types.d.ts +58 -20
  431. package/dist/components/select/types.js +4 -0
  432. package/dist/components/side-sheet/api.d.ts +33 -0
  433. package/dist/components/side-sheet/api.js +50 -0
  434. package/dist/components/side-sheet/config.d.ts +34 -0
  435. package/dist/components/side-sheet/config.js +20 -0
  436. package/dist/components/side-sheet/constants.d.ts +60 -0
  437. package/dist/components/side-sheet/constants.js +32 -0
  438. package/dist/components/side-sheet/features/index.d.ts +2 -0
  439. package/dist/components/side-sheet/features/index.js +2 -0
  440. package/dist/components/side-sheet/features/state.d.ts +28 -0
  441. package/dist/components/side-sheet/features/state.js +67 -0
  442. package/dist/components/side-sheet/features/structure.d.ts +21 -0
  443. package/dist/components/side-sheet/features/structure.js +97 -0
  444. package/dist/components/side-sheet/index.d.ts +2 -0
  445. package/dist/components/side-sheet/index.js +1 -0
  446. package/dist/components/side-sheet/side-sheet.d.ts +24 -0
  447. package/dist/components/side-sheet/side-sheet.js +17 -0
  448. package/dist/components/side-sheet/types.d.ts +102 -0
  449. package/dist/components/side-sheet/types.js +1 -0
  450. package/dist/components/slider/api.d.ts +8 -8
  451. package/dist/components/slider/api.js +104 -0
  452. package/dist/components/slider/config.d.ts +3 -3
  453. package/dist/components/slider/config.js +106 -0
  454. package/dist/components/slider/constants.js +74 -0
  455. package/dist/components/slider/features/controller.d.ts +1 -1
  456. package/dist/components/slider/features/controller.js +291 -0
  457. package/dist/components/slider/features/dom.d.ts +2 -2
  458. package/dist/components/slider/features/dom.js +113 -0
  459. package/dist/components/slider/features/handlers.d.ts +1 -1
  460. package/dist/components/slider/features/handlers.js +389 -0
  461. package/dist/components/slider/features/index.d.ts +5 -5
  462. package/dist/components/slider/features/index.js +5 -0
  463. package/dist/components/slider/features/range.d.ts +1 -1
  464. package/dist/components/slider/features/range.js +70 -0
  465. package/dist/components/slider/features/states.d.ts +1 -1
  466. package/dist/components/slider/features/states.js +119 -0
  467. package/dist/components/slider/features/tracks.d.ts +13 -0
  468. package/dist/components/slider/features/tracks.js +174 -0
  469. package/dist/components/slider/index.d.ts +2 -2
  470. package/dist/components/slider/index.js +1 -0
  471. package/dist/components/slider/slider.d.ts +2 -2
  472. package/dist/components/slider/slider.js +27 -0
  473. package/dist/components/slider/types.d.ts +6 -5
  474. package/dist/components/slider/types.js +2 -0
  475. package/dist/components/snackbar/api.d.ts +2 -2
  476. package/dist/components/snackbar/api.js +173 -0
  477. package/dist/components/snackbar/config.d.ts +28 -13
  478. package/dist/components/snackbar/config.js +33 -0
  479. package/dist/components/snackbar/constants.d.ts +73 -47
  480. package/dist/components/snackbar/constants.js +60 -0
  481. package/dist/components/snackbar/features.d.ts +19 -6
  482. package/dist/components/snackbar/features.js +125 -0
  483. package/dist/components/snackbar/index.d.ts +4 -4
  484. package/dist/components/snackbar/index.js +3 -0
  485. package/dist/components/snackbar/position.d.ts +4 -3
  486. package/dist/components/snackbar/position.js +24 -0
  487. package/dist/components/snackbar/queue.d.ts +1 -1
  488. package/dist/components/snackbar/queue.js +79 -0
  489. package/dist/components/snackbar/snackbar.d.ts +1 -1
  490. package/dist/components/snackbar/snackbar.js +25 -0
  491. package/dist/components/snackbar/types.d.ts +57 -59
  492. package/dist/components/snackbar/types.js +1 -0
  493. package/dist/components/split-button/api.d.ts +14 -0
  494. package/dist/components/split-button/api.js +120 -0
  495. package/dist/components/split-button/config.d.ts +40 -0
  496. package/dist/components/split-button/config.js +19 -0
  497. package/dist/components/split-button/constants.d.ts +67 -0
  498. package/dist/components/split-button/constants.js +35 -0
  499. package/dist/components/split-button/features/buttons.d.ts +8 -0
  500. package/dist/components/split-button/features/buttons.js +39 -0
  501. package/dist/components/split-button/features/menu.d.ts +8 -0
  502. package/dist/components/split-button/features/menu.js +19 -0
  503. package/dist/components/split-button/index.d.ts +3 -0
  504. package/dist/components/split-button/index.js +2 -0
  505. package/dist/components/split-button/split-button.d.ts +24 -0
  506. package/dist/components/split-button/split-button.js +21 -0
  507. package/dist/components/split-button/types.d.ts +127 -0
  508. package/dist/components/split-button/types.js +1 -0
  509. package/dist/components/switch/api.d.ts +1 -1
  510. package/dist/components/switch/api.js +91 -0
  511. package/dist/components/switch/config.d.ts +3 -3
  512. package/dist/components/switch/config.js +27 -0
  513. package/dist/components/switch/constants.js +39 -0
  514. package/dist/components/switch/features.d.ts +3 -3
  515. package/dist/components/switch/features.js +101 -0
  516. package/dist/components/switch/index.d.ts +5 -4
  517. package/dist/components/switch/index.js +3 -0
  518. package/dist/components/switch/switch.d.ts +1 -1
  519. package/dist/components/switch/switch.js +18 -0
  520. package/dist/components/switch/types.d.ts +0 -1
  521. package/dist/components/switch/types.js +4 -0
  522. package/dist/components/tabs/api.d.ts +9 -6
  523. package/dist/components/tabs/api.js +98 -0
  524. package/dist/components/tabs/config.d.ts +10 -2
  525. package/dist/components/tabs/config.js +42 -0
  526. package/dist/components/tabs/constants.js +62 -0
  527. package/dist/components/tabs/features.d.ts +9 -13
  528. package/dist/components/tabs/features.js +180 -0
  529. package/dist/components/tabs/index.d.ts +10 -9
  530. package/dist/components/tabs/index.js +10 -0
  531. package/dist/components/tabs/indicator.d.ts +1 -1
  532. package/dist/components/tabs/indicator.js +136 -0
  533. package/dist/components/tabs/responsive.d.ts +1 -1
  534. package/dist/components/tabs/responsive.js +73 -0
  535. package/dist/components/tabs/scroll-indicators.d.ts +1 -1
  536. package/dist/components/tabs/scroll-indicators.js +83 -0
  537. package/dist/components/tabs/state.d.ts +2 -2
  538. package/dist/components/tabs/state.js +84 -0
  539. package/dist/components/tabs/tab-api.d.ts +12 -6
  540. package/dist/components/tabs/tab-api.js +139 -0
  541. package/dist/components/tabs/tab.d.ts +1 -1
  542. package/dist/components/tabs/tab.js +193 -0
  543. package/dist/components/tabs/tabs.d.ts +1 -1
  544. package/dist/components/tabs/tabs.js +22 -0
  545. package/dist/components/tabs/types.d.ts +11 -4
  546. package/dist/components/tabs/types.js +1 -0
  547. package/dist/components/tabs/utils.d.ts +15 -4
  548. package/dist/components/tabs/utils.js +67 -0
  549. package/dist/components/textfield/api.d.ts +3 -2
  550. package/dist/components/textfield/api.js +190 -0
  551. package/dist/components/textfield/config.d.ts +3 -3
  552. package/dist/components/textfield/config.js +21 -0
  553. package/dist/components/textfield/constants.js +63 -0
  554. package/dist/components/textfield/features/density.d.ts +1 -1
  555. package/dist/components/textfield/features/density.js +38 -0
  556. package/dist/components/textfield/features/error.d.ts +2 -3
  557. package/dist/components/textfield/features/error.js +35 -0
  558. package/dist/components/textfield/features/index.d.ts +14 -14
  559. package/dist/components/textfield/features/index.js +8 -0
  560. package/dist/components/textfield/features/leading-icon.d.ts +2 -3
  561. package/dist/components/textfield/features/leading-icon.js +55 -0
  562. package/dist/components/textfield/features/placement.d.ts +3 -1
  563. package/dist/components/textfield/features/placement.js +184 -0
  564. package/dist/components/textfield/features/prefix-text.d.ts +2 -3
  565. package/dist/components/textfield/features/prefix-text.js +38 -0
  566. package/dist/components/textfield/features/suffix-text.d.ts +2 -3
  567. package/dist/components/textfield/features/suffix-text.js +34 -0
  568. package/dist/components/textfield/features/supporting-text.d.ts +2 -3
  569. package/dist/components/textfield/features/supporting-text.js +58 -0
  570. package/dist/components/textfield/features/trailing-icon.d.ts +2 -3
  571. package/dist/components/textfield/features/trailing-icon.js +40 -0
  572. package/dist/components/textfield/index.d.ts +2 -2
  573. package/dist/components/textfield/index.js +1 -0
  574. package/dist/components/textfield/textfield.d.ts +1 -1
  575. package/dist/components/textfield/textfield.js +18 -0
  576. package/dist/components/textfield/types.d.ts +0 -2
  577. package/dist/components/textfield/types.js +18 -0
  578. package/dist/components/timepicker/api.d.ts +6 -5
  579. package/dist/components/timepicker/api.js +426 -0
  580. package/dist/components/timepicker/clockdial.d.ts +1 -1
  581. package/dist/components/timepicker/clockdial.js +277 -0
  582. package/dist/components/timepicker/config.d.ts +15 -12
  583. package/dist/components/timepicker/config.js +81 -0
  584. package/dist/components/timepicker/constants.js +135 -0
  585. package/dist/components/timepicker/index.d.ts +4 -4
  586. package/dist/components/timepicker/index.js +3 -0
  587. package/dist/components/timepicker/render.d.ts +1 -1
  588. package/dist/components/timepicker/render.js +476 -0
  589. package/dist/components/timepicker/timepicker.d.ts +1 -1
  590. package/dist/components/timepicker/timepicker.js +68 -0
  591. package/dist/components/timepicker/types.js +20 -0
  592. package/dist/components/timepicker/utils.d.ts +1 -1
  593. package/dist/components/timepicker/utils.js +131 -0
  594. package/dist/components/tooltip/api.d.ts +1 -1
  595. package/dist/components/tooltip/api.js +293 -0
  596. package/dist/components/tooltip/config.d.ts +3 -3
  597. package/dist/components/tooltip/config.js +38 -0
  598. package/dist/components/tooltip/constants.js +49 -0
  599. package/dist/components/tooltip/index.d.ts +3 -3
  600. package/dist/components/tooltip/index.js +2 -0
  601. package/dist/components/tooltip/tooltip.d.ts +2 -2
  602. package/dist/components/tooltip/tooltip.js +31 -0
  603. package/dist/components/tooltip/types.js +23 -0
  604. package/dist/components/top-app-bar/config.d.ts +1 -1
  605. package/dist/components/top-app-bar/config.js +10 -0
  606. package/dist/components/top-app-bar/constants.js +33 -0
  607. package/dist/components/top-app-bar/index.d.ts +3 -3
  608. package/dist/components/top-app-bar/index.js +4 -0
  609. package/dist/components/top-app-bar/top-app-bar.d.ts +2 -2
  610. package/dist/components/top-app-bar/top-app-bar.js +155 -0
  611. package/dist/components/top-app-bar/types.d.ts +1 -1
  612. package/dist/components/top-app-bar/types.js +1 -0
  613. package/dist/core/canvas/animation.js +36 -0
  614. package/dist/core/canvas/drawing.js +62 -0
  615. package/dist/core/canvas/index.d.ts +4 -4
  616. package/dist/core/canvas/index.js +4 -0
  617. package/dist/core/canvas/resize.js +35 -0
  618. package/dist/core/canvas/utils.d.ts +5 -4
  619. package/dist/core/canvas/utils.js +116 -0
  620. package/dist/core/compose/base.d.ts +2 -2
  621. package/dist/core/compose/base.js +7 -0
  622. package/dist/core/compose/cleanup.d.ts +14 -0
  623. package/dist/core/compose/cleanup.js +51 -0
  624. package/dist/core/compose/component.d.ts +15 -4
  625. package/dist/core/compose/component.js +144 -0
  626. package/dist/core/compose/features/badge.d.ts +4 -5
  627. package/dist/core/compose/features/badge.js +20 -0
  628. package/dist/core/compose/features/checkable.d.ts +4 -5
  629. package/dist/core/compose/features/checkable.js +55 -0
  630. package/dist/core/compose/features/constants.js +36 -0
  631. package/dist/core/compose/features/debounce.d.ts +3 -4
  632. package/dist/core/compose/features/debounce.js +44 -0
  633. package/dist/core/compose/features/disabled.d.ts +2 -3
  634. package/dist/core/compose/features/disabled.js +63 -0
  635. package/dist/core/compose/features/events.d.ts +5 -4
  636. package/dist/core/compose/features/events.js +23 -0
  637. package/dist/core/compose/features/icon.d.ts +2 -6
  638. package/dist/core/compose/features/icon.js +70 -0
  639. package/dist/core/compose/features/index.d.ts +34 -34
  640. package/dist/core/compose/features/index.js +19 -0
  641. package/dist/core/compose/features/input.d.ts +3 -4
  642. package/dist/core/compose/features/input.js +67 -0
  643. package/dist/core/compose/features/lifecycle.d.ts +3 -3
  644. package/dist/core/compose/features/lifecycle.js +82 -0
  645. package/dist/core/compose/features/position.d.ts +2 -3
  646. package/dist/core/compose/features/position.js +36 -0
  647. package/dist/core/compose/features/ripple.d.ts +9 -10
  648. package/dist/core/compose/features/ripple.js +87 -0
  649. package/dist/core/compose/features/size.d.ts +2 -3
  650. package/dist/core/compose/features/size.js +7 -0
  651. package/dist/core/compose/features/style.d.ts +2 -3
  652. package/dist/core/compose/features/style.js +9 -0
  653. package/dist/core/compose/features/text.d.ts +2 -6
  654. package/dist/core/compose/features/text.js +47 -0
  655. package/dist/core/compose/features/textinput.d.ts +3 -4
  656. package/dist/core/compose/features/textinput.js +162 -0
  657. package/dist/core/compose/features/textlabel.d.ts +2 -3
  658. package/dist/core/compose/features/textlabel.js +44 -0
  659. package/dist/core/compose/features/throttle.d.ts +2 -3
  660. package/dist/core/compose/features/throttle.js +44 -0
  661. package/dist/core/compose/features/track.d.ts +1 -2
  662. package/dist/core/compose/features/track.js +23 -0
  663. package/dist/core/compose/features/variant.d.ts +2 -3
  664. package/dist/core/compose/features/variant.js +7 -0
  665. package/dist/core/compose/features/withEvents.d.ts +1 -1
  666. package/dist/core/compose/features/withEvents.js +46 -0
  667. package/dist/core/compose/index.d.ts +9 -9
  668. package/dist/core/compose/index.js +5 -0
  669. package/dist/core/compose/pipe.d.ts +43 -3
  670. package/dist/core/compose/pipe.js +10 -0
  671. package/dist/core/compose/utils/type-guards.d.ts +5 -5
  672. package/dist/core/compose/utils/type-guards.js +10 -0
  673. package/dist/core/config/component.d.ts +12 -9
  674. package/dist/core/config/component.js +71 -0
  675. package/dist/core/config/global.d.ts +16 -10
  676. package/dist/core/config/global.js +15 -0
  677. package/dist/core/config.d.ts +1 -1
  678. package/dist/core/config.js +72 -0
  679. package/dist/core/dom/attributes.d.ts +6 -6
  680. package/dist/core/dom/attributes.js +40 -0
  681. package/dist/core/dom/classes.js +207 -0
  682. package/dist/core/dom/create.d.ts +27 -10
  683. package/dist/core/dom/create.js +226 -0
  684. package/dist/core/dom/events.js +82 -0
  685. package/dist/core/dom/index.d.ts +6 -6
  686. package/dist/core/dom/index.js +4 -0
  687. package/dist/core/dom/utils.d.ts +2 -2
  688. package/dist/core/dom/utils.js +45 -0
  689. package/dist/core/index.d.ts +20 -20
  690. package/dist/core/index.js +13 -0
  691. package/dist/core/shapes/cubic.d.ts +30 -0
  692. package/dist/core/shapes/cubic.js +62 -0
  693. package/dist/core/shapes/index.d.ts +6 -0
  694. package/dist/core/shapes/index.js +3 -0
  695. package/dist/core/shapes/material.d.ts +24 -0
  696. package/dist/core/shapes/material.js +119 -0
  697. package/dist/core/shapes/polygon.d.ts +35 -0
  698. package/dist/core/shapes/polygon.js +221 -0
  699. package/dist/core/state/disabled.js +26 -0
  700. package/dist/core/state/emitter.d.ts +2 -2
  701. package/dist/core/state/emitter.js +24 -0
  702. package/dist/core/state/events.d.ts +3 -3
  703. package/dist/core/state/events.js +32 -0
  704. package/dist/core/state/index.d.ts +10 -10
  705. package/dist/core/state/index.js +5 -0
  706. package/dist/core/state/lifecycle.d.ts +0 -1
  707. package/dist/core/state/lifecycle.js +51 -0
  708. package/dist/core/state/store.d.ts +3 -3
  709. package/dist/core/state/store.js +61 -0
  710. package/dist/core/utils/background.js +35 -0
  711. package/dist/core/utils/color.js +23 -0
  712. package/dist/core/utils/index.d.ts +6 -6
  713. package/dist/core/utils/index.js +8 -0
  714. package/dist/core/utils/mobile.js +63 -0
  715. package/dist/core/utils/object.d.ts +2 -2
  716. package/dist/core/utils/object.js +21 -0
  717. package/dist/core/utils/performance.d.ts +8 -5
  718. package/dist/core/utils/performance.js +117 -0
  719. package/dist/core/utils/theme.js +78 -0
  720. package/dist/core/utils/validate.d.ts +6 -6
  721. package/dist/core/utils/validate.js +114 -0
  722. package/dist/index.cjs +12 -18
  723. package/dist/index.d.ts +3 -3
  724. package/dist/index.js +4 -57
  725. package/dist/package.json +40 -11
  726. package/dist/styles/badge.css +2 -0
  727. package/dist/styles/badge.d.ts +1 -0
  728. package/dist/styles/badge.js +2 -0
  729. package/dist/styles/base.css +2 -0
  730. package/dist/styles/base.d.ts +1 -0
  731. package/dist/styles/base.js +2 -0
  732. package/dist/styles/bottom-app-bar.css +2 -0
  733. package/dist/styles/bottom-app-bar.d.ts +1 -0
  734. package/dist/styles/bottom-app-bar.js +2 -0
  735. package/dist/styles/bottom-sheet.css +2 -0
  736. package/dist/styles/bottom-sheet.d.ts +1 -0
  737. package/dist/styles/bottom-sheet.js +2 -0
  738. package/dist/styles/button-group.css +2 -0
  739. package/dist/styles/button-group.d.ts +1 -0
  740. package/dist/styles/button-group.js +3 -0
  741. package/dist/styles/button.css +2 -0
  742. package/dist/styles/button.d.ts +1 -0
  743. package/dist/styles/button.js +2 -0
  744. package/dist/styles/card.css +2 -0
  745. package/dist/styles/card.d.ts +1 -0
  746. package/dist/styles/card.js +2 -0
  747. package/dist/styles/carousel.css +2 -0
  748. package/dist/styles/carousel.d.ts +1 -0
  749. package/dist/styles/carousel.js +2 -0
  750. package/dist/styles/checkbox.css +2 -0
  751. package/dist/styles/checkbox.d.ts +1 -0
  752. package/dist/styles/checkbox.js +2 -0
  753. package/dist/styles/chips.css +2 -0
  754. package/dist/styles/chips.d.ts +1 -0
  755. package/dist/styles/chips.js +2 -0
  756. package/dist/styles/dialog.css +2 -0
  757. package/dist/styles/dialog.d.ts +1 -0
  758. package/dist/styles/dialog.js +3 -0
  759. package/dist/styles/divider.css +2 -0
  760. package/dist/styles/divider.d.ts +1 -0
  761. package/dist/styles/divider.js +2 -0
  762. package/dist/styles/drawer.css +2 -0
  763. package/dist/styles/drawer.d.ts +1 -0
  764. package/dist/styles/drawer.js +2 -0
  765. package/dist/styles/extended-fab.css +2 -0
  766. package/dist/styles/extended-fab.d.ts +1 -0
  767. package/dist/styles/extended-fab.js +2 -0
  768. package/dist/styles/fab.css +2 -0
  769. package/dist/styles/fab.d.ts +1 -0
  770. package/dist/styles/fab.js +2 -0
  771. package/dist/styles/icon-button.css +2 -0
  772. package/dist/styles/icon-button.d.ts +1 -0
  773. package/dist/styles/icon-button.js +2 -0
  774. package/dist/styles/list.css +2 -0
  775. package/dist/styles/list.d.ts +1 -0
  776. package/dist/styles/list.js +2 -0
  777. package/dist/styles/loading-indicator.css +2 -0
  778. package/dist/styles/loading-indicator.d.ts +1 -0
  779. package/dist/styles/loading-indicator.js +2 -0
  780. package/dist/styles/menu.css +2 -0
  781. package/dist/styles/menu.d.ts +1 -0
  782. package/dist/styles/menu.js +2 -0
  783. package/dist/styles/navigation-rail.css +2 -0
  784. package/dist/styles/navigation-rail.d.ts +1 -0
  785. package/dist/styles/navigation-rail.js +2 -0
  786. package/dist/styles/navigation.css +2 -0
  787. package/dist/styles/navigation.d.ts +1 -0
  788. package/dist/styles/navigation.js +2 -0
  789. package/dist/styles/progress.css +2 -0
  790. package/dist/styles/progress.d.ts +1 -0
  791. package/dist/styles/progress.js +2 -0
  792. package/dist/styles/radios.css +2 -0
  793. package/dist/styles/radios.d.ts +1 -0
  794. package/dist/styles/radios.js +2 -0
  795. package/dist/styles/search.css +2 -0
  796. package/dist/styles/search.d.ts +1 -0
  797. package/dist/styles/search.js +2 -0
  798. package/dist/styles/segmented-button.css +2 -0
  799. package/dist/styles/segmented-button.d.ts +1 -0
  800. package/dist/styles/segmented-button.js +2 -0
  801. package/dist/styles/select.css +2 -0
  802. package/dist/styles/select.d.ts +1 -0
  803. package/dist/styles/select.js +3 -0
  804. package/dist/styles/side-sheet.css +2 -0
  805. package/dist/styles/side-sheet.d.ts +1 -0
  806. package/dist/styles/side-sheet.js +2 -0
  807. package/dist/styles/slider.css +2 -0
  808. package/dist/styles/slider.d.ts +1 -0
  809. package/dist/styles/slider.js +2 -0
  810. package/dist/styles/snackbar.css +2 -0
  811. package/dist/styles/snackbar.d.ts +1 -0
  812. package/dist/styles/snackbar.js +3 -0
  813. package/dist/styles/split-button.css +2 -0
  814. package/dist/styles/split-button.d.ts +1 -0
  815. package/dist/styles/split-button.js +3 -0
  816. package/dist/styles/switch.css +2 -0
  817. package/dist/styles/switch.d.ts +1 -0
  818. package/dist/styles/switch.js +2 -0
  819. package/dist/styles/tabs.css +2 -0
  820. package/dist/styles/tabs.d.ts +1 -0
  821. package/dist/styles/tabs.js +3 -0
  822. package/dist/styles/textfield.css +2 -0
  823. package/dist/styles/textfield.d.ts +1 -0
  824. package/dist/styles/textfield.js +2 -0
  825. package/dist/styles/timepicker.css +2 -0
  826. package/dist/styles/timepicker.d.ts +1 -0
  827. package/dist/styles/timepicker.js +2 -0
  828. package/dist/styles/tooltip.css +2 -0
  829. package/dist/styles/tooltip.d.ts +1 -0
  830. package/dist/styles/tooltip.js +2 -0
  831. package/dist/styles/top-app-bar.css +2 -0
  832. package/dist/styles/top-app-bar.d.ts +1 -0
  833. package/dist/styles/top-app-bar.js +2 -0
  834. package/dist/styles/utilities.css +2 -0
  835. package/dist/styles/utilities.d.ts +1 -0
  836. package/dist/styles/utilities.js +2 -0
  837. package/dist/styles.css +2 -7
  838. package/dist/themes/autumn.css +2 -0
  839. package/dist/themes/baseline.css +2 -0
  840. package/dist/themes/brownbeige.css +2 -0
  841. package/dist/themes/browngreen.css +2 -0
  842. package/dist/themes/desert.css +2 -0
  843. package/dist/themes/forest.css +2 -0
  844. package/dist/themes/highcontrast.css +2 -0
  845. package/dist/themes/legacy.css +2 -0
  846. package/dist/themes/material.css +2 -0
  847. package/dist/themes/ocean.css +2 -0
  848. package/dist/themes/sageivory.css +2 -0
  849. package/dist/themes/spring.css +2 -0
  850. package/dist/themes/summer.css +2 -0
  851. package/dist/themes/sunset.css +2 -0
  852. package/dist/themes/tealcaramel.css +2 -0
  853. package/dist/themes/winter.css +2 -0
  854. package/package.json +44 -7
  855. package/src/styles/abstract/_mixins.scss +5 -1
  856. package/src/styles/abstract/_variables.scss +18 -2
  857. package/src/styles/base/_document.scss +54 -0
  858. package/src/styles/components/_bottom-sheet.scss +167 -0
  859. package/src/styles/components/_button-group.scss +58 -38
  860. package/src/styles/components/_button.scss +9 -3
  861. package/src/styles/components/_card.scss +79 -20
  862. package/src/styles/components/_carousel.scss +3 -3
  863. package/src/styles/components/_checkbox.scss +27 -7
  864. package/src/styles/components/_chips.scss +15 -15
  865. package/src/styles/components/_datepicker.scss +5 -5
  866. package/src/styles/components/_dialog.scss +88 -24
  867. package/src/styles/components/_drawer.scss +85 -95
  868. package/src/styles/components/_extended-fab.scss +95 -111
  869. package/src/styles/components/_fab.scss +70 -87
  870. package/src/styles/components/_icon-button.scss +115 -104
  871. package/src/styles/components/_list.scss +2 -2
  872. package/src/styles/components/_loading-indicator.scss +41 -0
  873. package/src/styles/components/_menu.scss +324 -16
  874. package/src/styles/components/_navigation-rail.scss +307 -0
  875. package/src/styles/components/_navigation-system.scss +3 -1
  876. package/src/styles/components/_progress.scss +46 -53
  877. package/src/styles/components/_radios.scss +30 -30
  878. package/src/styles/components/_segmented-button.scss +71 -113
  879. package/src/styles/components/_side-sheet.scss +175 -0
  880. package/src/styles/components/_slider.scss +50 -20
  881. package/src/styles/components/_snackbar.scss +153 -167
  882. package/src/styles/components/_split-button.scss +229 -0
  883. package/src/styles/components/_switch.scss +36 -26
  884. package/src/styles/components/_tabs.scss +59 -58
  885. package/src/styles/components/_textfield.scss +4 -1
  886. package/src/styles/components/_timepicker.scss +3 -3
  887. package/src/styles/main.scss +7 -51
  888. package/src/styles/themes/_baseline.scss +8 -0
  889. package/src/styles/utilities/_ripple.scss +12 -3
  890. package/dist/components/sheet/api.d.ts +0 -37
  891. package/dist/components/sheet/config.d.ts +0 -53
  892. package/dist/components/sheet/constants.d.ts +0 -136
  893. package/dist/components/sheet/features/content.d.ts +0 -6
  894. package/dist/components/sheet/features/gestures.d.ts +0 -6
  895. package/dist/components/sheet/features/index.d.ts +0 -5
  896. package/dist/components/sheet/features/position.d.ts +0 -7
  897. package/dist/components/sheet/features/state.d.ts +0 -6
  898. package/dist/components/sheet/features/title.d.ts +0 -6
  899. package/dist/components/sheet/index.d.ts +0 -3
  900. package/dist/components/sheet/sheet.d.ts +0 -8
  901. package/dist/components/sheet/types.d.ts +0 -250
  902. package/dist/components/slider/features/canvas.d.ts +0 -47
  903. package/dist/index.cjs.map +0 -269
  904. package/dist/index.js.map +0 -269
  905. package/src/styles/components/_sheet.scss +0 -236
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * @packageDocumentation
9
9
  */
10
- export { default as createButtonGroup } from './button-group';
11
- export { default } from './button-group';
12
- export type { ButtonGroupConfig, ButtonGroupComponent, ButtonGroupItemConfig, ButtonGroupEvent, ButtonGroupEventType, ButtonGroupVariant, ButtonGroupOrientation, ButtonGroupDensity } from './types';
13
- export { BUTTON_GROUP_VARIANTS, BUTTON_GROUP_ORIENTATIONS, BUTTON_GROUP_DENSITY, BUTTON_GROUP_EVENTS, BUTTON_GROUP_DEFAULTS, BUTTON_GROUP_CLASSES } from './constants';
10
+ export { default as createButtonGroup } from "./button-group.js";
11
+ export { default } from "./button-group.js";
12
+ export type { ButtonGroupConfig, ButtonGroupComponent, ButtonGroupItemConfig, ButtonGroupEvent, ButtonGroupEventType, ButtonGroupVariant, ButtonGroupOrientation, ButtonGroupDensity } from "./types.js";
13
+ export { BUTTON_GROUP_VARIANTS, BUTTON_GROUP_ORIENTATIONS, BUTTON_GROUP_DENSITY, BUTTON_GROUP_EVENTS, BUTTON_GROUP_DEFAULTS, BUTTON_GROUP_CLASSES } from "./constants.js";
@@ -0,0 +1,3 @@
1
+ export { default as createButtonGroup } from "./button-group.js";
2
+ export { default } from "./button-group.js";
3
+ export { BUTTON_GROUP_VARIANTS, BUTTON_GROUP_ORIENTATIONS, BUTTON_GROUP_DENSITY, BUTTON_GROUP_EVENTS, BUTTON_GROUP_DEFAULTS, BUTTON_GROUP_CLASSES } from "./constants.js";
@@ -1,4 +1,4 @@
1
- import type { ButtonConfig, ButtonComponent } from "../button/types";
1
+ import type { ButtonConfig, ButtonComponent } from "../button/types.js";
2
2
  /**
3
3
  * Button group orientation
4
4
  * @category Components
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { BaseComponent, CardComponent, ApiOptions } from './types';
1
+ import { BaseComponent, CardComponent, ApiOptions } from "./types.js";
2
2
  /**
3
3
  * Enhances a card component with API methods.
4
4
  * This follows the higher-order function pattern to add public API methods
@@ -8,4 +8,13 @@ import { BaseComponent, CardComponent, ApiOptions } from './types';
8
8
  * @returns {Function} Higher-order function that adds API methods to component
9
9
  * @category Components
10
10
  */
11
- export declare const withAPI: ({ lifecycle }: ApiOptions) => (component: BaseComponent) => CardComponent;
11
+ /**
12
+ * The card as the pipe hands it over: the API sets `config` from the options,
13
+ * and addClass returns the card itself once the API wraps it
14
+ * @internal
15
+ */
16
+ type ComponentWithElements = Omit<BaseComponent, 'config' | 'addClass'> & {
17
+ addClass: (...classes: string[]) => unknown;
18
+ };
19
+ export declare const withAPI: ({ lifecycle, config }: ApiOptions) => (component: ComponentWithElements) => CardComponent;
20
+ export {};
@@ -0,0 +1,79 @@
1
+ export const withAPI = ({ lifecycle, config }) => (component) => ({
2
+ ...component,
3
+ element: component.element,
4
+ config,
5
+ addContent(contentElement) {
6
+ if (contentElement && contentElement.classList.contains(`${component.getClass('card')}-content`)) {
7
+ component.element.appendChild(contentElement);
8
+ }
9
+ return this;
10
+ },
11
+ setHeader(headerElement) {
12
+ if (headerElement && headerElement.classList.contains(`${component.getClass('card')}-header`)) {
13
+ const existingHeader = component.element.querySelector(`.${component.getClass('card')}-header`);
14
+ if (existingHeader) {
15
+ existingHeader.remove();
16
+ }
17
+ const mediaElement = component.element.querySelector(`.${component.getClass('card')}-media`);
18
+ if (mediaElement) {
19
+ const mediaElements = component.element.querySelectorAll(`.${component.getClass('card')}-media`);
20
+ const lastMedia = mediaElements[mediaElements.length - 1];
21
+ if (lastMedia.nextSibling) {
22
+ component.element.insertBefore(headerElement, lastMedia.nextSibling);
23
+ }
24
+ else {
25
+ component.element.appendChild(headerElement);
26
+ }
27
+ }
28
+ else {
29
+ component.element.insertBefore(headerElement, component.element.firstChild);
30
+ }
31
+ }
32
+ return this;
33
+ },
34
+ addMedia(mediaElement, position = 'top') {
35
+ if (mediaElement && mediaElement.classList.contains(`${component.getClass('card')}-media`)) {
36
+ if (position === 'top') {
37
+ component.element.insertBefore(mediaElement, component.element.firstChild);
38
+ }
39
+ else {
40
+ component.element.appendChild(mediaElement);
41
+ }
42
+ }
43
+ return this;
44
+ },
45
+ setActions(actionsElement) {
46
+ if (actionsElement && actionsElement.classList.contains(`${component.getClass('card')}-actions`)) {
47
+ const existingActions = component.element.querySelector(`.${component.getClass('card')}-actions`);
48
+ if (existingActions) {
49
+ existingActions.remove();
50
+ }
51
+ component.element.appendChild(actionsElement);
52
+ }
53
+ return this;
54
+ },
55
+ makeDraggable(dragStartCallback) {
56
+ component.element.setAttribute('draggable', 'true');
57
+ component.element.setAttribute('aria-grabbed', 'false');
58
+ component.element.addEventListener('dragstart', (e) => {
59
+ component.element.setAttribute('aria-grabbed', 'true');
60
+ if (typeof dragStartCallback === 'function')
61
+ dragStartCallback(e);
62
+ });
63
+ component.element.addEventListener('dragend', () => {
64
+ component.element.setAttribute('aria-grabbed', 'false');
65
+ });
66
+ return this;
67
+ },
68
+ focus() {
69
+ component.element.focus();
70
+ return this;
71
+ },
72
+ addClass(...classes) {
73
+ component.addClass(...classes);
74
+ return this;
75
+ },
76
+ destroy() {
77
+ lifecycle.destroy();
78
+ }
79
+ });
@@ -1,4 +1,4 @@
1
- import { CardComponent, CardSchema } from './types';
1
+ import { CardComponent, CardSchema } from "./types.js";
2
2
  /**
3
3
  * Creates a new Card component following Material Design 3 principles.
4
4
  *
@@ -0,0 +1,20 @@
1
+ import { pipe } from "../../core/compose/index.js";
2
+ import { createBase, withElement } from "../../core/compose/component.js";
3
+ import { withEvents, withVariant, withRipple, withLifecycle } from "../../core/compose/features/index.js";
4
+ import { withAPI } from "./api.js";
5
+ import { createBaseConfig, getElementConfig, getApiConfig, withInteractiveBehavior, processInlineConfig, applyInlineConfiguration } from "./config.js";
6
+ import { withElevation } from "./features.js";
7
+ const createCard = (config = {}) => {
8
+ const processedConfig = processInlineConfig(config);
9
+ const baseConfig = createBaseConfig(processedConfig);
10
+ try {
11
+ const card = pipe(createBase, withEvents(), withElement(getElementConfig(baseConfig)), withVariant(baseConfig), baseConfig.clickable ? withRipple(baseConfig) : (c) => c, withLifecycle(), withInteractiveBehavior, withElevation, comp => withAPI({ ...getApiConfig(comp), config: baseConfig })(comp))(baseConfig);
12
+ applyInlineConfiguration(card, processedConfig);
13
+ return card;
14
+ }
15
+ catch (error) {
16
+ console.error('Card creation error:', error instanceof Error ? error.message : String(error));
17
+ throw new Error(`Failed to create card: ${error instanceof Error ? error.message : String(error)}`);
18
+ }
19
+ };
20
+ export default createCard;
@@ -1,4 +1,6 @@
1
- import { CardComponent, CardSchema, BaseComponent } from "./types";
1
+ import type { ElementComponent } from "../../core/compose/component.js";
2
+ import type { EventComponent } from "../../core/compose/features/index.js";
3
+ import { CardComponent, CardComponentConfig, CardSchema } from "./types.js";
2
4
  /**
3
5
  * Default configuration for the Card component.
4
6
  * These values are used when no configuration is provided.
@@ -42,7 +44,7 @@ export declare const applyInlineConfiguration: (card: CardComponent, config: Car
42
44
  * @category Components
43
45
  *
44
46
  */
45
- export declare const createBaseConfig: (config?: CardSchema) => CardSchema;
47
+ export declare const createBaseConfig: (config?: CardSchema) => CardComponentConfig;
46
48
  /**
47
49
  * Generates element configuration for the Card component.
48
50
  * Sets up DOM attributes, accessibility features, and event forwarding
@@ -56,7 +58,7 @@ export declare const createBaseConfig: (config?: CardSchema) => CardSchema;
56
58
  export declare const getElementConfig: (config: CardSchema) => {
57
59
  tag: string;
58
60
  componentName: string;
59
- attributes: Record<string, any>;
61
+ attributes: Record<string, unknown>;
60
62
  className: string[];
61
63
  rawClass: string | string[];
62
64
  id: string;
@@ -72,7 +74,7 @@ export declare const getElementConfig: (config: CardSchema) => {
72
74
  ariaHidden: boolean;
73
75
  html: string;
74
76
  text: string;
75
- forwardEvents: Record<string, boolean | ((component: any, event: Event) => boolean)>;
77
+ forwardEvents: Record<string, import("../../core/dom/create.js").EventCondition>;
76
78
  interactive: boolean;
77
79
  };
78
80
  /**
@@ -84,9 +86,13 @@ export declare const getElementConfig: (config: CardSchema) => {
84
86
  * @category Components
85
87
  *
86
88
  */
87
- export declare const getApiConfig: (comp: any) => {
89
+ export declare const getApiConfig: (comp: {
90
+ lifecycle?: {
91
+ destroy?: () => void;
92
+ };
93
+ }) => {
88
94
  lifecycle: {
89
- destroy: () => any;
95
+ destroy: () => void;
90
96
  };
91
97
  };
92
98
  /**
@@ -107,10 +113,10 @@ export declare const CARD_ELEVATION_LEVELS: {
107
113
  * guidelines. Implements mouse, keyboard, and touch interactions with appropriate
108
114
  * visual feedback and accessibility support.
109
115
  *
110
- * @param {BaseComponent} comp - Card component
111
- * @returns {BaseComponent} Enhanced card component
116
+ * @param {ElementComponent} comp - Card component
117
+ * @returns {ElementComponent} Enhanced card component
112
118
  * @category Components
113
119
  *
114
120
  */
115
- export declare const withInteractiveBehavior: (comp: BaseComponent) => BaseComponent;
121
+ export declare const withInteractiveBehavior: <C extends ElementComponent & EventComponent>(comp: C) => C;
116
122
  export default defaultConfig;
@@ -0,0 +1,161 @@
1
+ import { createComponentConfig, createElementConfig, } from "../../core/config/component.js";
2
+ import { createCardHeader, createCardContent, createCardMedia, createCardActions, } from "./content.js";
3
+ import { CARD_VARIANTS, CARD_ELEVATIONS } from "./constants.js";
4
+ export const defaultConfig = {
5
+ variant: CARD_VARIANTS.ELEVATED,
6
+ interactive: false,
7
+ fullWidth: false,
8
+ clickable: false,
9
+ draggable: false,
10
+ };
11
+ export const processInlineConfig = (config) => {
12
+ const processedConfig = { ...config };
13
+ if (config.header) {
14
+ processedConfig.headerConfig = config.header;
15
+ }
16
+ if (config.content) {
17
+ processedConfig.contentConfig = config.content;
18
+ }
19
+ if (config.media) {
20
+ processedConfig.mediaConfig = config.media;
21
+ }
22
+ if (config.actions) {
23
+ processedConfig.actionsConfig = config.actions;
24
+ }
25
+ return processedConfig;
26
+ };
27
+ export const applyInlineConfiguration = (card, config) => {
28
+ if (config.mediaConfig &&
29
+ (!config.mediaConfig.position || config.mediaConfig.position === "top")) {
30
+ const mediaElement = createCardMedia({
31
+ ...config.mediaConfig,
32
+ position: undefined,
33
+ });
34
+ card.addMedia(mediaElement, "top");
35
+ }
36
+ if (config.headerConfig) {
37
+ const headerElement = createCardHeader(config.headerConfig);
38
+ card.setHeader(headerElement);
39
+ }
40
+ if (config.contentConfig) {
41
+ const contentElement = createCardContent(config.contentConfig);
42
+ card.addContent(contentElement);
43
+ }
44
+ if (config.mediaConfig && config.mediaConfig.position === "bottom") {
45
+ const mediaElement = createCardMedia({
46
+ ...config.mediaConfig,
47
+ position: undefined,
48
+ });
49
+ card.addMedia(mediaElement, "bottom");
50
+ }
51
+ if (config.actionsConfig) {
52
+ const actionsElement = createCardActions(config.actionsConfig);
53
+ card.setActions(actionsElement);
54
+ }
55
+ if (Array.isArray(config.buttons) && config.buttons.length > 0) {
56
+ import("../button/index.js")
57
+ .then(({ default: createButton }) => {
58
+ const actionButtons = config.buttons.map((buttonConfig) => createButton(buttonConfig).element);
59
+ const actionsElement = createCardActions({
60
+ actions: actionButtons,
61
+ align: config.actionsConfig?.align || "end",
62
+ });
63
+ card.setActions(actionsElement);
64
+ })
65
+ .catch((error) => {
66
+ console.error("Error processing buttons:", error);
67
+ });
68
+ }
69
+ };
70
+ export const createBaseConfig = (config = {}) => createComponentConfig(defaultConfig, config, "card");
71
+ export const getElementConfig = (config) => {
72
+ const isInteractive = config.interactive || config.clickable;
73
+ const defaultRole = isInteractive ? "button" : "region";
74
+ const ariaAttributes = {};
75
+ if (config.aria) {
76
+ Object.entries(config.aria).forEach(([key, value]) => {
77
+ if (value !== undefined) {
78
+ const attrName = key.startsWith("aria-") ? key : `aria-${key}`;
79
+ ariaAttributes[attrName] = value;
80
+ }
81
+ });
82
+ }
83
+ if (!ariaAttributes["role"] && !config.aria?.role) {
84
+ ariaAttributes["role"] = defaultRole;
85
+ }
86
+ if (isInteractive && !ariaAttributes["tabindex"]) {
87
+ ariaAttributes["tabindex"] = "0";
88
+ }
89
+ return createElementConfig(config, {
90
+ tag: "div",
91
+ className: [
92
+ config.class,
93
+ config.fullWidth ? `${config.prefix}-card--full-width` : null,
94
+ isInteractive ? `${config.prefix}-card--interactive` : null,
95
+ ],
96
+ attributes: ariaAttributes,
97
+ forwardEvents: {
98
+ click: () => !!config.clickable,
99
+ mouseenter: () => !!isInteractive,
100
+ mouseleave: () => !!isInteractive,
101
+ keydown: () => !!isInteractive,
102
+ focus: () => !!isInteractive,
103
+ blur: () => !!isInteractive,
104
+ },
105
+ interactive: isInteractive,
106
+ });
107
+ };
108
+ export const getApiConfig = (comp) => ({
109
+ lifecycle: {
110
+ destroy: () => comp.lifecycle?.destroy?.(),
111
+ },
112
+ });
113
+ export const CARD_ELEVATION_LEVELS = CARD_ELEVATIONS;
114
+ export const withInteractiveBehavior = (comp) => {
115
+ const config = comp.config;
116
+ const isInteractive = config.interactive || config.clickable;
117
+ if (isInteractive) {
118
+ comp.element.addEventListener("mouseenter", () => {
119
+ if (config.variant === CARD_VARIANTS.ELEVATED) {
120
+ comp.element.style.setProperty(`--${config.prefix}-card-elevation`, String(CARD_ELEVATION_LEVELS.LEVEL2));
121
+ }
122
+ });
123
+ comp.element.addEventListener("mouseleave", () => {
124
+ if (config.variant === CARD_VARIANTS.ELEVATED) {
125
+ comp.element.style.setProperty(`--${config.prefix}-card-elevation`, String(CARD_ELEVATION_LEVELS.LEVEL1));
126
+ }
127
+ });
128
+ comp.element.addEventListener("keydown", (e) => {
129
+ if ((e.key === "Enter" || e.key === " ") && config.clickable) {
130
+ e.preventDefault();
131
+ comp.element.click();
132
+ }
133
+ });
134
+ comp.element.addEventListener("focus", () => {
135
+ comp.element.classList.add(`${comp.getClass("card")}--focused`);
136
+ });
137
+ comp.element.addEventListener("blur", () => {
138
+ comp.element.classList.remove(`${comp.getClass("card")}--focused`);
139
+ });
140
+ }
141
+ if (config.draggable) {
142
+ comp.element.setAttribute("draggable", "true");
143
+ comp.element.addEventListener("dragstart", (e) => {
144
+ comp.element.style.setProperty(`--${config.prefix}-card-elevation`, String(CARD_ELEVATION_LEVELS.LEVEL4));
145
+ comp.element.classList.add(`${comp.getClass("card")}--dragging`);
146
+ comp.emit?.("dragstart", { event: e });
147
+ if (e.dataTransfer) {
148
+ const cardTitle = comp.element.querySelector(`.${comp.getClass("card")}-header-title`)
149
+ ?.textContent || "Card";
150
+ e.dataTransfer.setData("text/plain", cardTitle);
151
+ }
152
+ });
153
+ comp.element.addEventListener("dragend", (e) => {
154
+ comp.element.style.setProperty(`--${config.prefix}-card-elevation`, String(CARD_ELEVATION_LEVELS.LEVEL1));
155
+ comp.element.classList.remove(`${comp.getClass("card")}--dragging`);
156
+ comp.emit?.("dragend", { event: e });
157
+ });
158
+ }
159
+ return comp;
160
+ };
161
+ export default defaultConfig;
@@ -0,0 +1,55 @@
1
+ export const CARD_VARIANTS = {
2
+ ELEVATED: 'elevated',
3
+ FILLED: 'filled',
4
+ OUTLINED: 'outlined'
5
+ };
6
+ export const CARD_ELEVATIONS = {
7
+ LEVEL0: 0,
8
+ LEVEL1: 1,
9
+ LEVEL2: 2,
10
+ LEVEL4: 4
11
+ };
12
+ export const CARD_WIDTHS = {
13
+ SMALL: '344px',
14
+ MEDIUM: '480px',
15
+ LARGE: '624px',
16
+ FULL: '100%'
17
+ };
18
+ export const CARD_CORNER_RADIUS = {
19
+ SMALL: '8px',
20
+ MEDIUM: '12px',
21
+ LARGE: '16px'
22
+ };
23
+ export const CARD_ASPECT_RATIOS = {
24
+ SQUARE: '1:1',
25
+ STANDARD: '4:3',
26
+ WIDESCREEN: '16:9'
27
+ };
28
+ export const CARD_ACTION_ALIGNMENT = {
29
+ START: 'start',
30
+ CENTER: 'center',
31
+ END: 'end',
32
+ SPACE_BETWEEN: 'space-between'
33
+ };
34
+ export const CARD_MEDIA_POSITION = {
35
+ TOP: 'top',
36
+ BOTTOM: 'bottom'
37
+ };
38
+ export const CARD_CLASSES = {
39
+ ROOT: 'card',
40
+ HEADER: 'card-header',
41
+ TITLE: 'card-title',
42
+ SUBTITLE: 'card-subtitle',
43
+ AVATAR: 'card-avatar',
44
+ HEADER_ACTION: 'card-header-action',
45
+ CONTENT: 'card-content',
46
+ MEDIA: 'card-media',
47
+ ACTIONS: 'card-actions',
48
+ DRAGGABLE: 'card-draggable',
49
+ INTERACTIVE: 'card-interactive',
50
+ FULL_WIDTH: 'card-full-width',
51
+ CLICKABLE: 'card-clickable',
52
+ LOADING: 'card-loading',
53
+ EXPANDED: 'card-expanded',
54
+ ELEVATION_PREFIX: 'card-elevation-'
55
+ };
@@ -1,4 +1,4 @@
1
- import { CardContentConfig, CardHeaderConfig, CardMediaConfig, CardActionsConfig } from './types';
1
+ import { CardContentConfig, CardHeaderConfig, CardMediaConfig, CardActionsConfig } from "./types.js";
2
2
  export declare const CARD_CONTENT_PADDING = true;
3
3
  /**
4
4
  * Creates a card content component
@@ -0,0 +1,195 @@
1
+ import { PREFIX } from "../../core/config.js";
2
+ import { pipe } from "../../core/compose/index.js";
3
+ import { createBase, withElement } from "../../core/compose/component.js";
4
+ import { createElement } from "../../core/dom/create.js";
5
+ export const CARD_CONTENT_PADDING = true;
6
+ export const createCardContent = (config = {}) => {
7
+ const baseConfig = {
8
+ ...config,
9
+ componentName: 'card-content',
10
+ prefix: PREFIX
11
+ };
12
+ try {
13
+ const content = pipe(createBase, withElement({
14
+ tag: 'div',
15
+ componentName: 'card-content',
16
+ className: [
17
+ config.class,
18
+ config.padding === false ? `${PREFIX}-card-content--no-padding` : null
19
+ ],
20
+ attributes: {
21
+ 'role': 'region',
22
+ 'style': 'display: block; color: inherit;'
23
+ }
24
+ }))(baseConfig);
25
+ if (config.html) {
26
+ content.element.innerHTML = config.html;
27
+ }
28
+ else if (config.text) {
29
+ content.element.innerHTML = `<p>${config.text}</p>`;
30
+ }
31
+ if (Array.isArray(config.children)) {
32
+ config.children.forEach(child => {
33
+ if (child instanceof HTMLElement) {
34
+ content.element.appendChild(child);
35
+ }
36
+ });
37
+ }
38
+ return content.element;
39
+ }
40
+ catch (error) {
41
+ console.error('Card content creation error:', error instanceof Error ? error.message : String(error));
42
+ throw new Error(`Failed to create card content: ${error instanceof Error ? error.message : String(error)}`);
43
+ }
44
+ };
45
+ export const createCardHeader = (config = {}) => {
46
+ const baseConfig = {
47
+ ...config,
48
+ componentName: 'card-header',
49
+ prefix: PREFIX
50
+ };
51
+ try {
52
+ const header = pipe(createBase, withElement({
53
+ tag: 'div',
54
+ componentName: 'card-header',
55
+ className: config.class,
56
+ attributes: {
57
+ 'role': 'heading',
58
+ 'aria-level': '3'
59
+ }
60
+ }))(baseConfig);
61
+ const textContainer = createElement({
62
+ tag: 'div',
63
+ className: `${PREFIX}-card-header-text`,
64
+ container: header.element
65
+ });
66
+ if (config.title) {
67
+ createElement({
68
+ tag: 'h3',
69
+ className: `${PREFIX}-card-header-title`,
70
+ text: config.title,
71
+ container: textContainer,
72
+ attributes: {
73
+ id: `${header.element.id || 'card-header'}-title`
74
+ }
75
+ });
76
+ const parentCard = header.element.closest(`.${PREFIX}-card`);
77
+ if (parentCard && !parentCard.hasAttribute('aria-labelledby')) {
78
+ parentCard.setAttribute('aria-labelledby', `${header.element.id || 'card-header'}-title`);
79
+ }
80
+ }
81
+ if (config.subtitle) {
82
+ createElement({
83
+ tag: 'h4',
84
+ className: `${PREFIX}-card-header-subtitle`,
85
+ text: config.subtitle,
86
+ container: textContainer
87
+ });
88
+ }
89
+ if (config.avatar) {
90
+ const avatarElement = typeof config.avatar === 'string'
91
+ ? createElement({
92
+ tag: 'div',
93
+ className: `${PREFIX}-card-header-avatar`,
94
+ html: config.avatar
95
+ })
96
+ : config.avatar;
97
+ const avatarImg = avatarElement.querySelector('img');
98
+ if (avatarImg && !avatarImg.hasAttribute('alt')) {
99
+ avatarImg.setAttribute('alt', '');
100
+ avatarImg.setAttribute('aria-hidden', 'true');
101
+ }
102
+ header.element.insertBefore(avatarElement, header.element.firstChild);
103
+ }
104
+ if (config.action) {
105
+ const actionElement = typeof config.action === 'string'
106
+ ? createElement({
107
+ tag: 'div',
108
+ className: `${PREFIX}-card-header-action`,
109
+ html: config.action
110
+ })
111
+ : config.action;
112
+ header.element.appendChild(actionElement);
113
+ }
114
+ return header.element;
115
+ }
116
+ catch (error) {
117
+ console.error('Card header creation error:', error instanceof Error ? error.message : String(error));
118
+ throw new Error(`Failed to create card header: ${error instanceof Error ? error.message : String(error)}`);
119
+ }
120
+ };
121
+ export const createCardActions = (config = {}) => {
122
+ const baseConfig = {
123
+ ...config,
124
+ componentName: 'card-actions',
125
+ prefix: PREFIX
126
+ };
127
+ try {
128
+ const actions = pipe(createBase, withElement({
129
+ tag: 'div',
130
+ componentName: 'card-actions',
131
+ className: [
132
+ config.class,
133
+ config.fullBleed ? `${PREFIX}-card-actions--full-bleed` : null,
134
+ config.vertical ? `${PREFIX}-card-actions--vertical` : null,
135
+ config.align ? `${PREFIX}-card-actions--${config.align}` : null
136
+ ],
137
+ attributes: {
138
+ 'role': 'group'
139
+ }
140
+ }))(baseConfig);
141
+ if (Array.isArray(config.actions)) {
142
+ config.actions.forEach((action, index) => {
143
+ if (action instanceof HTMLElement) {
144
+ if (!action.hasAttribute('aria-label') &&
145
+ !action.hasAttribute('aria-labelledby') &&
146
+ action.textContent?.trim() === '') {
147
+ action.setAttribute('aria-label', `Action ${index + 1}`);
148
+ }
149
+ actions.element.appendChild(action);
150
+ }
151
+ });
152
+ }
153
+ return actions.element;
154
+ }
155
+ catch (error) {
156
+ console.error('Card actions creation error:', error instanceof Error ? error.message : String(error));
157
+ throw new Error(`Failed to create card actions: ${error instanceof Error ? error.message : String(error)}`);
158
+ }
159
+ };
160
+ export const createCardMedia = (config = {}) => {
161
+ const baseConfig = {
162
+ ...config,
163
+ componentName: 'card-media',
164
+ prefix: PREFIX
165
+ };
166
+ try {
167
+ const media = pipe(createBase, withElement({
168
+ tag: 'div',
169
+ componentName: 'card-media',
170
+ className: [
171
+ config.class,
172
+ config.aspectRatio ? `${PREFIX}-card-media--${config.aspectRatio.replace(':', '-')}` : null,
173
+ config.contain ? `${PREFIX}-card-media--contain` : null
174
+ ]
175
+ }))(baseConfig);
176
+ if (config.element instanceof HTMLElement) {
177
+ media.element.appendChild(config.element);
178
+ }
179
+ else if (config.src) {
180
+ const img = document.createElement('img');
181
+ img.src = config.src;
182
+ img.className = `${PREFIX}-card-media-img`;
183
+ img.alt = config.alt || '';
184
+ if (!config.alt) {
185
+ img.setAttribute('aria-hidden', 'true');
186
+ }
187
+ media.element.appendChild(img);
188
+ }
189
+ return media.element;
190
+ }
191
+ catch (error) {
192
+ console.error('Card media creation error:', error instanceof Error ? error.message : String(error));
193
+ throw new Error(`Failed to create card media: ${error instanceof Error ? error.message : String(error)}`);
194
+ }
195
+ };
@@ -1,4 +1,5 @@
1
- import { BaseComponent, CardComponent, LoadingFeature, ExpandableFeature, SwipeableFeature } from "./types";
1
+ import type { ElementComponent } from "../../core/compose/component.js";
2
+ import { BaseComponent, CardComponent, LoadingFeature, ExpandableFeature, SwipeableFeature } from "./types.js";
2
3
  interface LoadingConfig {
3
4
  initialState?: boolean;
4
5
  }
@@ -73,7 +74,7 @@ export declare const withLoading: (config?: LoadingConfig) => (component: BaseCo
73
74
  * )(baseConfig);
74
75
  * ```
75
76
  */
76
- export declare const withElevation: (component: BaseComponent) => BaseComponent;
77
+ export declare const withElevation: <C extends ElementComponent>(component: C) => C;
77
78
  /**
78
79
  * Higher-order function to add expandable behavior to a card.
79
80
  * Creates a collapsible section with proper accessibility attributes and