material 3.9.0 → 3.10.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 (569) hide show
  1. package/README.md +5 -5
  2. package/dist/components/badge/index.d.ts +167 -3
  3. package/dist/components/bottom-app-bar/index.d.ts +141 -4
  4. package/dist/components/bottom-sheet/index.d.ts +114 -2
  5. package/dist/components/button/index.d.ts +10 -5
  6. package/dist/components/button-group/button-group.js +1 -0
  7. package/dist/components/button-group/config.js +9 -6
  8. package/dist/components/button-group/index.d.ts +250 -6
  9. package/dist/components/card/api.js +19 -0
  10. package/dist/components/card/index.d.ts +326 -5
  11. package/dist/components/carousel/features/slides.js +17 -7
  12. package/dist/components/carousel/index.d.ts +102 -3
  13. package/dist/components/checkbox/index.d.ts +217 -5
  14. package/dist/components/chips/chip/chip.js +4 -3
  15. package/dist/components/chips/index.d.ts +343 -3
  16. package/dist/components/datepicker/datepicker.js +62 -84
  17. package/dist/components/datepicker/index.d.ts +313 -2
  18. package/dist/components/datepicker/render.js +22 -18
  19. package/dist/components/datepicker/utils.js +66 -111
  20. package/dist/components/dialog/features.js +1 -1
  21. package/dist/components/dialog/index.d.ts +333 -3
  22. package/dist/components/divider/index.d.ts +99 -3
  23. package/dist/components/drawer/features/items.js +10 -2
  24. package/dist/components/drawer/index.d.ts +196 -3
  25. package/dist/components/extended-fab/index.d.ts +224 -2
  26. package/dist/components/fab/index.d.ts +183 -2
  27. package/dist/components/fab-menu/index.d.ts +106 -6
  28. package/dist/components/icon-button/index.d.ts +11 -4
  29. package/dist/components/list/features/anatomy.js +25 -6
  30. package/dist/components/list/features/selection.js +30 -2
  31. package/dist/components/list/index.d.ts +299 -6
  32. package/dist/components/loading-indicator/index.d.ts +94 -3
  33. package/dist/components/menu/features/controller.js +2 -0
  34. package/dist/components/menu/index.d.ts +10 -6
  35. package/dist/components/menu/types.d.ts +5 -0
  36. package/dist/components/navigation-bar/index.d.ts +70 -2
  37. package/dist/components/navigation-rail/index.d.ts +98 -2
  38. package/dist/components/progress/index.d.ts +9 -2
  39. package/dist/components/radios/index.d.ts +158 -3
  40. package/dist/components/search/features/states.js +3 -3
  41. package/dist/components/search/features/structure.js +24 -4
  42. package/dist/components/search/features/suggestions.js +4 -0
  43. package/dist/components/search/index.d.ts +255 -2
  44. package/dist/components/select/index.d.ts +252 -6
  45. package/dist/components/side-sheet/index.d.ts +104 -2
  46. package/dist/components/slider/index.d.ts +236 -2
  47. package/dist/components/snackbar/api.js +26 -0
  48. package/dist/components/snackbar/constants.d.ts +4 -0
  49. package/dist/components/snackbar/constants.js +3 -1
  50. package/dist/components/snackbar/index.d.ts +215 -4
  51. package/dist/components/split-button/index.d.ts +10 -3
  52. package/dist/components/switch/index.d.ts +190 -3
  53. package/dist/components/tabs/index.d.ts +476 -12
  54. package/dist/components/tabs/index.js +1 -1
  55. package/dist/components/tabs/responsive-legacy.js +65 -0
  56. package/dist/components/tabs/responsive.d.ts +7 -32
  57. package/dist/components/tabs/responsive.js +4 -63
  58. package/dist/components/tabs/tabs.js +1 -0
  59. package/dist/components/text-field/config.js +3 -4
  60. package/dist/components/text-field/features/field.js +61 -0
  61. package/dist/components/text-field/features/leading-icon.js +12 -45
  62. package/dist/components/text-field/features/prefix-text.js +6 -40
  63. package/dist/components/text-field/features/suffix-text.js +6 -40
  64. package/dist/components/text-field/index.d.ts +345 -3
  65. package/dist/components/timepicker/constants.d.ts +4 -4
  66. package/dist/components/timepicker/constants.js +2 -2
  67. package/dist/components/timepicker/index.d.ts +279 -5
  68. package/dist/components/timepicker/render.js +4 -1
  69. package/dist/components/toolbar/index.d.ts +145 -6
  70. package/dist/components/tooltip/index.d.ts +155 -3
  71. package/dist/components/top-app-bar/index.d.ts +92 -5
  72. package/dist/core/canvas/index.d.ts +172 -5
  73. package/dist/core/compose/features/icon-opt-in.js +5 -0
  74. package/dist/core/compose/features/icon-slot.js +100 -0
  75. package/dist/core/compose/features/textinput.js +2 -0
  76. package/dist/core/compose/features/track.js +4 -0
  77. package/dist/core/compose/index.d.ts +744 -8
  78. package/dist/core/dom/index.d.ts +245 -12
  79. package/dist/core/index.d.ts +93 -14
  80. package/dist/core/shapes/index.d.ts +286 -6
  81. package/dist/core/state/index.d.ts +98 -5
  82. package/dist/core/theme/index.d.ts +80 -4
  83. package/dist/core/utils/index.d.ts +98 -9
  84. package/dist/elements/css/bottom-sheet.css +1 -1
  85. package/dist/elements/css/button-group.css +1 -1
  86. package/dist/elements/css/button.css +1 -1
  87. package/dist/elements/css/datepicker.css +1 -1
  88. package/dist/elements/css/dialog.css +1 -1
  89. package/dist/elements/css/drawer.css +1 -1
  90. package/dist/elements/css/icon-button.css +1 -1
  91. package/dist/elements/css/list.css +1 -1
  92. package/dist/elements/css/menu.css +1 -1
  93. package/dist/elements/css/side-sheet.css +1 -1
  94. package/dist/elements/css/snackbar.css +1 -1
  95. package/dist/elements/css/text-field.css +1 -1
  96. package/dist/elements/css/timepicker.css +1 -1
  97. package/dist/elements/css/toolbar.css +1 -1
  98. package/dist/elements/datepicker.js +1 -0
  99. package/dist/elements/define.js +12 -1
  100. package/dist/elements/drawer.js +2 -0
  101. package/dist/elements/index.d.ts +3974 -107
  102. package/dist/elements/preupgrade/badge.css +1 -1
  103. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  104. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  105. package/dist/elements/preupgrade/button-group.css +2 -2
  106. package/dist/elements/preupgrade/button.css +2 -2
  107. package/dist/elements/preupgrade/card.css +1 -1
  108. package/dist/elements/preupgrade/carousel.css +1 -1
  109. package/dist/elements/preupgrade/checkbox.css +1 -1
  110. package/dist/elements/preupgrade/chips.css +1 -1
  111. package/dist/elements/preupgrade/datepicker.css +1 -1
  112. package/dist/elements/preupgrade/dialog.css +1 -1
  113. package/dist/elements/preupgrade/divider.css +1 -1
  114. package/dist/elements/preupgrade/drawer.css +2 -2
  115. package/dist/elements/preupgrade/extended-fab.css +1 -1
  116. package/dist/elements/preupgrade/fab-menu.css +1 -1
  117. package/dist/elements/preupgrade/fab.css +1 -1
  118. package/dist/elements/preupgrade/icon-button.css +2 -2
  119. package/dist/elements/preupgrade/list.css +2 -2
  120. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  121. package/dist/elements/preupgrade/menu.css +1 -1
  122. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  123. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  124. package/dist/elements/preupgrade/progress.css +1 -1
  125. package/dist/elements/preupgrade/radios.css +1 -1
  126. package/dist/elements/preupgrade/search.css +1 -1
  127. package/dist/elements/preupgrade/select.css +2 -2
  128. package/dist/elements/preupgrade/side-sheet.css +1 -1
  129. package/dist/elements/preupgrade/slider.css +1 -1
  130. package/dist/elements/preupgrade/snackbar.css +1 -1
  131. package/dist/elements/preupgrade/split-button.css +1 -1
  132. package/dist/elements/preupgrade/switch.css +1 -1
  133. package/dist/elements/preupgrade/tabs.css +1 -1
  134. package/dist/elements/preupgrade/text-field.css +2 -2
  135. package/dist/elements/preupgrade/timepicker.css +1 -1
  136. package/dist/elements/preupgrade/toolbar.css +1 -1
  137. package/dist/elements/preupgrade/tooltip.css +1 -1
  138. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  139. package/dist/elements/preupgrade.css +2 -2
  140. package/dist/elements/snackbar.js +2 -0
  141. package/dist/elements/styles.js +15 -15
  142. package/dist/elements/text-field.js +2 -0
  143. package/dist/index.d.ts +78 -4
  144. package/dist/react/index.d.ts +106 -52
  145. package/dist/react/jsx.d.ts +49 -49
  146. package/dist/solid/index.d.ts +106 -52
  147. package/dist/solid/jsx.d.ts +51 -50
  148. package/dist/styles/badge.css +1 -1
  149. package/dist/styles/base-lite.css +2 -2
  150. package/dist/styles/base.css +2 -2
  151. package/dist/styles/bottom-app-bar.css +1 -1
  152. package/dist/styles/bottom-sheet.css +2 -2
  153. package/dist/styles/button-group.css +2 -2
  154. package/dist/styles/button.css +2 -2
  155. package/dist/styles/card.css +1 -1
  156. package/dist/styles/carousel.css +1 -1
  157. package/dist/styles/checkbox.css +1 -1
  158. package/dist/styles/chips.css +1 -1
  159. package/dist/styles/contrast.css +1 -1
  160. package/dist/styles/datepicker.css +2 -2
  161. package/dist/styles/dialog.css +2 -2
  162. package/dist/styles/divider.css +1 -1
  163. package/dist/styles/drawer.css +2 -2
  164. package/dist/styles/extended-fab.css +1 -1
  165. package/dist/styles/fab-menu.css +1 -1
  166. package/dist/styles/fab.css +1 -1
  167. package/dist/styles/icon-button.css +2 -2
  168. package/dist/styles/list.css +2 -2
  169. package/dist/styles/loading-indicator.css +1 -1
  170. package/dist/styles/menu.css +2 -2
  171. package/dist/styles/navigation-bar.css +1 -1
  172. package/dist/styles/navigation-rail.css +1 -1
  173. package/dist/styles/progress.css +1 -1
  174. package/dist/styles/radios.css +1 -1
  175. package/dist/styles/search.css +1 -1
  176. package/dist/styles/select.css +1 -1
  177. package/dist/styles/side-sheet.css +2 -2
  178. package/dist/styles/slider.css +1 -1
  179. package/dist/styles/snackbar.css +2 -2
  180. package/dist/styles/split-button.css +1 -1
  181. package/dist/styles/switch.css +1 -1
  182. package/dist/styles/tabs.css +1 -1
  183. package/dist/styles/text-field.css +2 -2
  184. package/dist/styles/timepicker.css +2 -2
  185. package/dist/styles/toolbar.css +2 -2
  186. package/dist/styles/tooltip.css +1 -1
  187. package/dist/styles/top-app-bar.css +1 -1
  188. package/dist/styles/typography.css +1 -1
  189. package/dist/styles/utilities.css +1 -1
  190. package/dist/styles.css +2 -2
  191. package/dist/themes/autumn-contrast.css +1 -1
  192. package/dist/themes/autumn.css +1 -1
  193. package/dist/themes/baseline-contrast.css +1 -1
  194. package/dist/themes/baseline.css +1 -1
  195. package/dist/themes/brownbeige-contrast.css +1 -1
  196. package/dist/themes/brownbeige.css +1 -1
  197. package/dist/themes/content-contrast.css +1 -1
  198. package/dist/themes/content.css +1 -1
  199. package/dist/themes/desert-contrast.css +1 -1
  200. package/dist/themes/desert.css +1 -1
  201. package/dist/themes/expressive-contrast.css +1 -1
  202. package/dist/themes/expressive.css +1 -1
  203. package/dist/themes/fidelity-contrast.css +1 -1
  204. package/dist/themes/fidelity.css +1 -1
  205. package/dist/themes/forest-contrast.css +1 -1
  206. package/dist/themes/forest.css +1 -1
  207. package/dist/themes/fruit-salad-contrast.css +1 -1
  208. package/dist/themes/fruit-salad.css +1 -1
  209. package/dist/themes/highcontrast-contrast.css +1 -1
  210. package/dist/themes/highcontrast.css +1 -1
  211. package/dist/themes/monochrome-contrast.css +1 -1
  212. package/dist/themes/monochrome.css +1 -1
  213. package/dist/themes/neutral-contrast.css +1 -1
  214. package/dist/themes/neutral.css +1 -1
  215. package/dist/themes/ocean-contrast.css +1 -1
  216. package/dist/themes/ocean.css +1 -1
  217. package/dist/themes/rainbow-contrast.css +1 -1
  218. package/dist/themes/rainbow.css +1 -1
  219. package/dist/themes/sageivory-contrast.css +1 -1
  220. package/dist/themes/sageivory.css +1 -1
  221. package/dist/themes/spring-contrast.css +1 -1
  222. package/dist/themes/spring.css +1 -1
  223. package/dist/themes/summer-contrast.css +1 -1
  224. package/dist/themes/summer.css +1 -1
  225. package/dist/themes/sunset-contrast.css +1 -1
  226. package/dist/themes/sunset.css +1 -1
  227. package/dist/themes/tealcaramel-contrast.css +1 -1
  228. package/dist/themes/tealcaramel.css +1 -1
  229. package/dist/themes/vibrant-contrast.css +1 -1
  230. package/dist/themes/vibrant.css +1 -1
  231. package/dist/vue/index.d.ts +192 -53
  232. package/package.json +5 -1
  233. package/src/styles/abstract/_functions.scss +22 -1
  234. package/src/styles/abstract/_variables.scss +0 -2
  235. package/src/styles/base/_tokens.scss +12 -0
  236. package/src/styles/components/_bottom-sheet.scss +1 -0
  237. package/src/styles/components/_button-group.scss +9 -5
  238. package/src/styles/components/_button.scss +9 -12
  239. package/src/styles/components/_datepicker.scss +1 -0
  240. package/src/styles/components/_dialog.scss +1 -0
  241. package/src/styles/components/_drawer.scss +33 -65
  242. package/src/styles/components/_icon-button.scss +32 -33
  243. package/src/styles/components/_list.scss +19 -5
  244. package/src/styles/components/_menu.scss +1 -0
  245. package/src/styles/components/_side-sheet.scss +1 -0
  246. package/src/styles/components/_snackbar.scss +1 -0
  247. package/src/styles/components/_text-field.scss +17 -109
  248. package/src/styles/components/_timepicker.scss +2 -1
  249. package/src/styles/components/_toolbar.scss +4 -4
  250. package/src/styles/elements/_button-group.scss +17 -4
  251. package/src/styles/elements/_button.scss +3 -2
  252. package/src/styles/elements/_drawer.scss +2 -1
  253. package/src/styles/elements/_field.scss +25 -14
  254. package/src/styles/elements/_icon-button.scss +8 -3
  255. package/src/styles/elements/_list.scss +3 -2
  256. package/src/styles/elements/_text-field.scss +71 -47
  257. package/dist/components/badge/badge.d.ts +0 -7
  258. package/dist/components/badge/types.d.ts +0 -152
  259. package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +0 -12
  260. package/dist/components/bottom-app-bar/types.d.ts +0 -124
  261. package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -7
  262. package/dist/components/bottom-sheet/types.d.ts +0 -100
  263. package/dist/components/button/button.d.ts +0 -7
  264. package/dist/components/button-group/button-group.d.ts +0 -7
  265. package/dist/components/button-group/types.d.ts +0 -227
  266. package/dist/components/card/card.d.ts +0 -7
  267. package/dist/components/card/content.d.ts +0 -22
  268. package/dist/components/card/types.d.ts +0 -272
  269. package/dist/components/carousel/carousel.d.ts +0 -4
  270. package/dist/components/carousel/types.d.ts +0 -81
  271. package/dist/components/checkbox/checkbox.d.ts +0 -8
  272. package/dist/components/checkbox/types.d.ts +0 -199
  273. package/dist/components/chips/chips.d.ts +0 -7
  274. package/dist/components/chips/factories.d.ts +0 -9
  275. package/dist/components/chips/types.d.ts +0 -304
  276. package/dist/components/datepicker/datepicker.d.ts +0 -7
  277. package/dist/components/datepicker/types.d.ts +0 -300
  278. package/dist/components/datepicker/types.js +0 -17
  279. package/dist/components/dialog/dialog.d.ts +0 -8
  280. package/dist/components/dialog/types.d.ts +0 -311
  281. package/dist/components/divider/config.d.ts +0 -43
  282. package/dist/components/divider/divider.d.ts +0 -7
  283. package/dist/components/divider/types.d.ts +0 -43
  284. package/dist/components/drawer/drawer.d.ts +0 -7
  285. package/dist/components/drawer/types.d.ts +0 -179
  286. package/dist/components/extended-fab/extended-fab.d.ts +0 -7
  287. package/dist/components/extended-fab/types.d.ts +0 -208
  288. package/dist/components/fab/fab.d.ts +0 -7
  289. package/dist/components/fab/types.d.ts +0 -168
  290. package/dist/components/fab-menu/fab-menu.d.ts +0 -8
  291. package/dist/components/fab-menu/types.d.ts +0 -91
  292. package/dist/components/icon-button/icon-button.d.ts +0 -7
  293. package/dist/components/index.d.ts +0 -82
  294. package/dist/components/list/features/listbox.d.ts +0 -16
  295. package/dist/components/list/list.d.ts +0 -7
  296. package/dist/components/list/types.d.ts +0 -257
  297. package/dist/components/loading-indicator/features/renderer.d.ts +0 -28
  298. package/dist/components/loading-indicator/loading-indicator.d.ts +0 -7
  299. package/dist/components/loading-indicator/types.d.ts +0 -53
  300. package/dist/components/menu/menu.d.ts +0 -7
  301. package/dist/components/navigation-bar/navigation-bar.d.ts +0 -3
  302. package/dist/components/navigation-bar/types.d.ts +0 -59
  303. package/dist/components/navigation-rail/navigation-rail.d.ts +0 -3
  304. package/dist/components/navigation-rail/types.d.ts +0 -87
  305. package/dist/components/progress/progress.d.ts +0 -7
  306. package/dist/components/radios/radios.d.ts +0 -7
  307. package/dist/components/radios/types.d.ts +0 -144
  308. package/dist/components/search/search.d.ts +0 -7
  309. package/dist/components/search/types.d.ts +0 -235
  310. package/dist/components/select/select.d.ts +0 -7
  311. package/dist/components/select/types.d.ts +0 -232
  312. package/dist/components/side-sheet/side-sheet.d.ts +0 -7
  313. package/dist/components/side-sheet/types.d.ts +0 -91
  314. package/dist/components/slider/slider.d.ts +0 -7
  315. package/dist/components/slider/types.d.ts +0 -218
  316. package/dist/components/snackbar/snackbar.d.ts +0 -9
  317. package/dist/components/snackbar/types.d.ts +0 -180
  318. package/dist/components/split-button/split-button.d.ts +0 -7
  319. package/dist/components/switch/switch.d.ts +0 -7
  320. package/dist/components/switch/types.d.ts +0 -171
  321. package/dist/components/tabs/indicator.d.ts +0 -44
  322. package/dist/components/tabs/tab.d.ts +0 -7
  323. package/dist/components/tabs/tabs.d.ts +0 -7
  324. package/dist/components/tabs/types.d.ts +0 -304
  325. package/dist/components/tabs/utils.d.ts +0 -46
  326. package/dist/components/text-field/features/trailing-icon.d.ts +0 -54
  327. package/dist/components/text-field/text-field.d.ts +0 -7
  328. package/dist/components/text-field/types.d.ts +0 -261
  329. package/dist/components/timepicker/timepicker.d.ts +0 -3
  330. package/dist/components/timepicker/types.d.ts +0 -258
  331. package/dist/components/toolbar/toolbar.d.ts +0 -8
  332. package/dist/components/toolbar/types.d.ts +0 -129
  333. package/dist/components/tooltip/tooltip.d.ts +0 -7
  334. package/dist/components/tooltip/types.d.ts +0 -137
  335. package/dist/components/top-app-bar/top-app-bar.d.ts +0 -7
  336. package/dist/components/top-app-bar/types.d.ts +0 -80
  337. package/dist/core/canvas/animation.d.ts +0 -20
  338. package/dist/core/canvas/drawing.d.ts +0 -67
  339. package/dist/core/canvas/resize.d.ts +0 -8
  340. package/dist/core/canvas/utils.d.ts +0 -62
  341. package/dist/core/compose/base.d.ts +0 -18
  342. package/dist/core/compose/features/badge.d.ts +0 -27
  343. package/dist/core/compose/features/checkable.d.ts +0 -33
  344. package/dist/core/compose/features/debounce.d.ts +0 -45
  345. package/dist/core/compose/features/disabled.d.ts +0 -26
  346. package/dist/core/compose/features/events.d.ts +0 -31
  347. package/dist/core/compose/features/index.d.ts +0 -34
  348. package/dist/core/compose/features/input.d.ts +0 -54
  349. package/dist/core/compose/features/lifecycle.d.ts +0 -41
  350. package/dist/core/compose/features/position.d.ts +0 -36
  351. package/dist/core/compose/features/ripple.d.ts +0 -35
  352. package/dist/core/compose/features/size.d.ts +0 -12
  353. package/dist/core/compose/features/style.d.ts +0 -11
  354. package/dist/core/compose/features/textinput.d.ts +0 -66
  355. package/dist/core/compose/features/textlabel.d.ts +0 -34
  356. package/dist/core/compose/features/throttle.d.ts +0 -38
  357. package/dist/core/compose/features/track.d.ts +0 -24
  358. package/dist/core/compose/features/variant.d.ts +0 -12
  359. package/dist/core/compose/features/withEvents.d.ts +0 -27
  360. package/dist/core/compose/pipe.d.ts +0 -55
  361. package/dist/core/compose/utils/type-guards.d.ts +0 -17
  362. package/dist/core/config.d.ts +0 -72
  363. package/dist/core/dom/attributes.d.ts +0 -34
  364. package/dist/core/dom/classes.d.ts +0 -29
  365. package/dist/core/dom/events.d.ts +0 -43
  366. package/dist/core/dom/focus.d.ts +0 -15
  367. package/dist/core/dom/html.d.ts +0 -16
  368. package/dist/core/dom/layer.d.ts +0 -57
  369. package/dist/core/dom/roving.d.ts +0 -18
  370. package/dist/core/shapes/cubic.d.ts +0 -45
  371. package/dist/core/shapes/material.d.ts +0 -131
  372. package/dist/core/shapes/polygon.d.ts +0 -38
  373. package/dist/core/state/events.d.ts +0 -25
  374. package/dist/core/state/store.d.ts +0 -60
  375. package/dist/core/theme/shape.d.ts +0 -5
  376. package/dist/core/theme/tokens.d.ts +0 -67
  377. package/dist/core/utils/background.d.ts +0 -13
  378. package/dist/core/utils/color.d.ts +0 -6
  379. package/dist/core/utils/object.d.ts +0 -11
  380. package/dist/core/utils/performance.d.ts +0 -32
  381. package/dist/core/utils/theme.d.ts +0 -17
  382. package/dist/core/utils/url.d.ts +0 -6
  383. package/dist/elements/badge.d.ts +0 -57
  384. package/dist/elements/bottom-app-bar.d.ts +0 -66
  385. package/dist/elements/bottom-sheet.d.ts +0 -107
  386. package/dist/elements/button-group.d.ts +0 -142
  387. package/dist/elements/button.d.ts +0 -101
  388. package/dist/elements/card.d.ts +0 -69
  389. package/dist/elements/carousel.d.ts +0 -119
  390. package/dist/elements/checkbox.d.ts +0 -97
  391. package/dist/elements/chips.d.ts +0 -126
  392. package/dist/elements/datepicker.d.ts +0 -131
  393. package/dist/elements/dialog.d.ts +0 -101
  394. package/dist/elements/divider.d.ts +0 -52
  395. package/dist/elements/drawer.d.ts +0 -119
  396. package/dist/elements/extended-fab.d.ts +0 -97
  397. package/dist/elements/fab-menu.d.ts +0 -102
  398. package/dist/elements/fab.d.ts +0 -71
  399. package/dist/elements/list.d.ts +0 -127
  400. package/dist/elements/loading-indicator.d.ts +0 -47
  401. package/dist/elements/menu.d.ts +0 -144
  402. package/dist/elements/navigation-bar.d.ts +0 -104
  403. package/dist/elements/navigation-rail.d.ts +0 -145
  404. package/dist/elements/progress.d.ts +0 -87
  405. package/dist/elements/radios.d.ts +0 -92
  406. package/dist/elements/search.d.ts +0 -202
  407. package/dist/elements/select.d.ts +0 -119
  408. package/dist/elements/side-sheet.d.ts +0 -86
  409. package/dist/elements/slider.d.ts +0 -160
  410. package/dist/elements/snackbar.d.ts +0 -87
  411. package/dist/elements/split-button.d.ts +0 -87
  412. package/dist/elements/switch.d.ts +0 -98
  413. package/dist/elements/tabs.d.ts +0 -76
  414. package/dist/elements/text-field.d.ts +0 -170
  415. package/dist/elements/timepicker.d.ts +0 -148
  416. package/dist/elements/toolbar.d.ts +0 -98
  417. package/dist/elements/tooltip.d.ts +0 -75
  418. package/dist/elements/top-app-bar.d.ts +0 -60
  419. package/dist/react/badge.d.ts +0 -4
  420. package/dist/react/bottom-app-bar.d.ts +0 -5
  421. package/dist/react/bottom-sheet.d.ts +0 -4
  422. package/dist/react/button-group-item.d.ts +0 -3
  423. package/dist/react/button-group.d.ts +0 -7
  424. package/dist/react/button.d.ts +0 -5
  425. package/dist/react/card.d.ts +0 -4
  426. package/dist/react/carousel-item.d.ts +0 -3
  427. package/dist/react/carousel.d.ts +0 -4
  428. package/dist/react/checkbox.d.ts +0 -4
  429. package/dist/react/chip.d.ts +0 -3
  430. package/dist/react/chips.d.ts +0 -4
  431. package/dist/react/datepicker.d.ts +0 -4
  432. package/dist/react/dialog.d.ts +0 -7
  433. package/dist/react/divider.d.ts +0 -4
  434. package/dist/react/drawer-item.d.ts +0 -3
  435. package/dist/react/drawer.d.ts +0 -4
  436. package/dist/react/extended-fab.d.ts +0 -4
  437. package/dist/react/fab-menu-item.d.ts +0 -3
  438. package/dist/react/fab-menu.d.ts +0 -6
  439. package/dist/react/fab.d.ts +0 -4
  440. package/dist/react/icon-button.d.ts +0 -4
  441. package/dist/react/list-item.d.ts +0 -3
  442. package/dist/react/list.d.ts +0 -4
  443. package/dist/react/loading-indicator.d.ts +0 -4
  444. package/dist/react/menu-item.d.ts +0 -3
  445. package/dist/react/menu.d.ts +0 -4
  446. package/dist/react/navigation-bar-item.d.ts +0 -3
  447. package/dist/react/navigation-bar.d.ts +0 -4
  448. package/dist/react/navigation-rail-item.d.ts +0 -3
  449. package/dist/react/navigation-rail.d.ts +0 -4
  450. package/dist/react/progress.d.ts +0 -4
  451. package/dist/react/radio.d.ts +0 -3
  452. package/dist/react/radios.d.ts +0 -4
  453. package/dist/react/search-suggestion.d.ts +0 -3
  454. package/dist/react/search.d.ts +0 -4
  455. package/dist/react/select-option.d.ts +0 -3
  456. package/dist/react/select.d.ts +0 -6
  457. package/dist/react/side-sheet.d.ts +0 -4
  458. package/dist/react/slider.d.ts +0 -4
  459. package/dist/react/snackbar.d.ts +0 -7
  460. package/dist/react/split-button.d.ts +0 -7
  461. package/dist/react/switch.d.ts +0 -4
  462. package/dist/react/tab.d.ts +0 -3
  463. package/dist/react/tabs.d.ts +0 -7
  464. package/dist/react/text-field.d.ts +0 -4
  465. package/dist/react/timepicker.d.ts +0 -4
  466. package/dist/react/toolbar.d.ts +0 -5
  467. package/dist/react/tooltip.d.ts +0 -4
  468. package/dist/react/top-app-bar.d.ts +0 -4
  469. package/dist/solid/badge.d.ts +0 -4
  470. package/dist/solid/bottom-app-bar.d.ts +0 -5
  471. package/dist/solid/bottom-sheet.d.ts +0 -4
  472. package/dist/solid/button-group-item.d.ts +0 -3
  473. package/dist/solid/button-group.d.ts +0 -7
  474. package/dist/solid/button.d.ts +0 -5
  475. package/dist/solid/card.d.ts +0 -4
  476. package/dist/solid/carousel-item.d.ts +0 -3
  477. package/dist/solid/carousel.d.ts +0 -4
  478. package/dist/solid/checkbox.d.ts +0 -4
  479. package/dist/solid/chip.d.ts +0 -3
  480. package/dist/solid/chips.d.ts +0 -4
  481. package/dist/solid/datepicker.d.ts +0 -4
  482. package/dist/solid/dialog.d.ts +0 -7
  483. package/dist/solid/divider.d.ts +0 -4
  484. package/dist/solid/drawer-item.d.ts +0 -3
  485. package/dist/solid/drawer.d.ts +0 -4
  486. package/dist/solid/extended-fab.d.ts +0 -4
  487. package/dist/solid/fab-menu-item.d.ts +0 -3
  488. package/dist/solid/fab-menu.d.ts +0 -6
  489. package/dist/solid/fab.d.ts +0 -4
  490. package/dist/solid/icon-button.d.ts +0 -4
  491. package/dist/solid/list-item.d.ts +0 -3
  492. package/dist/solid/list.d.ts +0 -4
  493. package/dist/solid/loading-indicator.d.ts +0 -4
  494. package/dist/solid/menu-item.d.ts +0 -3
  495. package/dist/solid/menu.d.ts +0 -4
  496. package/dist/solid/navigation-bar-item.d.ts +0 -3
  497. package/dist/solid/navigation-bar.d.ts +0 -4
  498. package/dist/solid/navigation-rail-item.d.ts +0 -3
  499. package/dist/solid/navigation-rail.d.ts +0 -4
  500. package/dist/solid/progress.d.ts +0 -4
  501. package/dist/solid/radio.d.ts +0 -3
  502. package/dist/solid/radios.d.ts +0 -4
  503. package/dist/solid/search-suggestion.d.ts +0 -3
  504. package/dist/solid/search.d.ts +0 -4
  505. package/dist/solid/select-option.d.ts +0 -3
  506. package/dist/solid/select.d.ts +0 -6
  507. package/dist/solid/side-sheet.d.ts +0 -4
  508. package/dist/solid/slider.d.ts +0 -4
  509. package/dist/solid/snackbar.d.ts +0 -7
  510. package/dist/solid/split-button.d.ts +0 -7
  511. package/dist/solid/switch.d.ts +0 -4
  512. package/dist/solid/tab.d.ts +0 -3
  513. package/dist/solid/tabs.d.ts +0 -7
  514. package/dist/solid/text-field.d.ts +0 -4
  515. package/dist/solid/timepicker.d.ts +0 -4
  516. package/dist/solid/toolbar.d.ts +0 -5
  517. package/dist/solid/tooltip.d.ts +0 -4
  518. package/dist/solid/top-app-bar.d.ts +0 -4
  519. package/dist/vue/badge.d.ts +0 -4
  520. package/dist/vue/bottom-app-bar.d.ts +0 -5
  521. package/dist/vue/bottom-sheet.d.ts +0 -4
  522. package/dist/vue/button-group-item.d.ts +0 -3
  523. package/dist/vue/button-group.d.ts +0 -7
  524. package/dist/vue/button.d.ts +0 -5
  525. package/dist/vue/card.d.ts +0 -4
  526. package/dist/vue/carousel-item.d.ts +0 -3
  527. package/dist/vue/carousel.d.ts +0 -4
  528. package/dist/vue/checkbox.d.ts +0 -4
  529. package/dist/vue/chip.d.ts +0 -3
  530. package/dist/vue/chips.d.ts +0 -4
  531. package/dist/vue/create.d.ts +0 -73
  532. package/dist/vue/datepicker.d.ts +0 -4
  533. package/dist/vue/dialog.d.ts +0 -7
  534. package/dist/vue/divider.d.ts +0 -4
  535. package/dist/vue/drawer-item.d.ts +0 -3
  536. package/dist/vue/drawer.d.ts +0 -4
  537. package/dist/vue/extended-fab.d.ts +0 -4
  538. package/dist/vue/fab-menu-item.d.ts +0 -3
  539. package/dist/vue/fab-menu.d.ts +0 -6
  540. package/dist/vue/fab.d.ts +0 -4
  541. package/dist/vue/icon-button.d.ts +0 -4
  542. package/dist/vue/list-item.d.ts +0 -3
  543. package/dist/vue/list.d.ts +0 -4
  544. package/dist/vue/loading-indicator.d.ts +0 -4
  545. package/dist/vue/menu-item.d.ts +0 -3
  546. package/dist/vue/menu.d.ts +0 -4
  547. package/dist/vue/navigation-bar-item.d.ts +0 -3
  548. package/dist/vue/navigation-bar.d.ts +0 -4
  549. package/dist/vue/navigation-rail-item.d.ts +0 -3
  550. package/dist/vue/navigation-rail.d.ts +0 -4
  551. package/dist/vue/progress.d.ts +0 -4
  552. package/dist/vue/radio.d.ts +0 -3
  553. package/dist/vue/radios.d.ts +0 -4
  554. package/dist/vue/search-suggestion.d.ts +0 -3
  555. package/dist/vue/search.d.ts +0 -4
  556. package/dist/vue/select-option.d.ts +0 -3
  557. package/dist/vue/select.d.ts +0 -6
  558. package/dist/vue/side-sheet.d.ts +0 -4
  559. package/dist/vue/slider.d.ts +0 -4
  560. package/dist/vue/snackbar.d.ts +0 -7
  561. package/dist/vue/split-button.d.ts +0 -7
  562. package/dist/vue/switch.d.ts +0 -4
  563. package/dist/vue/tab.d.ts +0 -3
  564. package/dist/vue/tabs.d.ts +0 -7
  565. package/dist/vue/text-field.d.ts +0 -4
  566. package/dist/vue/timepicker.d.ts +0 -4
  567. package/dist/vue/toolbar.d.ts +0 -5
  568. package/dist/vue/tooltip.d.ts +0 -4
  569. package/dist/vue/top-app-bar.d.ts +0 -4
@@ -1,199 +0,0 @@
1
- import type { TouchEvents } from "../../core/utils/mobile.js";
2
- import type { EventCallback } from "../../core/state/emitter.js";
3
- /** Checkbox label position types - controls where the label appears */
4
- export type CheckboxLabelPosition = "start" | "end";
5
- /** Configuration interface for the Checkbox component */
6
- export interface CheckboxConfig {
7
- /** Input name attribute, used for form submission */
8
- name?: string;
9
- /**
10
- * Initial checked state
11
- * @default false
12
- */
13
- checked?: boolean;
14
- /**
15
- * Initial indeterminate state (partially checked)
16
- * @default false
17
- */
18
- indeterminate?: boolean;
19
- /**
20
- * Whether input is required for form validation
21
- * @default false
22
- */
23
- required?: boolean;
24
- /**
25
- * Whether checkbox is disabled (non-interactive)
26
- * @default false
27
- */
28
- disabled?: boolean;
29
- /** Input value attribute, used for form submission */
30
- value?: string;
31
- /** Label text displayed next to the checkbox */
32
- label?: string;
33
- /**
34
- * Label position (start/end)
35
- * @default "end"
36
- */
37
- labelPosition?: CheckboxLabelPosition | string;
38
- /**
39
- * Error state: the outline, the selected container and the state layers take the error role, and the input is marked `aria-invalid`.
40
- * @default false
41
- */
42
- error?: boolean;
43
- /** Accessible name when there is no visible label */
44
- ariaLabel?: string;
45
- /**
46
- * Put ariaLabel only on the input/handle, omitting the generated wrapper label.
47
- * @default false
48
- */
49
- controlLabelOnly?: boolean;
50
- /** Whether Enter toggles as Space does. */
51
- enterToggles?: boolean;
52
- /** Additional CSS classes to apply to the checkbox */
53
- class?: string;
54
- /**
55
- * CSS class prefix for all checkbox classes
56
- * @default "mtrl"
57
- */
58
- prefix?: string;
59
- /**
60
- * Component name used in CSS class generation
61
- * @default "checkbox"
62
- */
63
- componentName?: string;
64
- }
65
- /** A checked-state change from native input activation. */
66
- export interface CheckboxChangePayload {
67
- /** The new checked state. */
68
- checked: boolean;
69
- /** The checked model value, matching getValue() at dispatch. */
70
- value: boolean;
71
- /** The input's HTML value attribute, used for native form submission. */
72
- valueAttribute: string;
73
- /** The original native change event, when supplied by the emitter. */
74
- nativeEvent?: Event;
75
- }
76
- /** Events emitted by the checkbox API. */
77
- export interface CheckboxEvents extends TouchEvents {
78
- change: (payload: CheckboxChangePayload) => void;
79
- }
80
- /** Checkbox component interface */
81
- export interface CheckboxComponent {
82
- /** The checkbox's root DOM element (container) */
83
- element: HTMLElement;
84
- /** The actual input element (native checkbox) */
85
- input: HTMLInputElement;
86
- /** Gets the checkbox's checked state (boolean) for form compatibility */
87
- getValue: () => boolean;
88
- /**
89
- * Sets the checkbox's checked state.
90
- * @param value
91
- */
92
- setValue: (value: boolean | string) => CheckboxComponent;
93
- /** Gets the HTML value attribute (rarely needed) */
94
- getValueAttribute: () => string;
95
- /**
96
- * Sets the HTML value attribute (rarely needed)
97
- * @param value
98
- */
99
- setValueAttribute: (value: string) => CheckboxComponent;
100
- /** Checks the checkbox (sets checked=true). */
101
- check: () => CheckboxComponent;
102
- /** Unchecks the checkbox (sets checked=false). */
103
- uncheck: () => CheckboxComponent;
104
- /** Toggles the checkbox's checked state. */
105
- toggle: () => CheckboxComponent;
106
- /** Checks if the checkbox is currently checked */
107
- isChecked: () => boolean;
108
- /**
109
- * Sets the checkbox's indeterminate state
110
- * @param state
111
- */
112
- setIndeterminate: (state: boolean) => CheckboxComponent;
113
- /**
114
- * Sets or clears the error state
115
- * @param error
116
- */
117
- setError: (error: boolean) => CheckboxComponent;
118
- /**
119
- * Sets the checkbox's label text
120
- * @param text
121
- */
122
- setLabel: (text: string) => CheckboxComponent;
123
- /** Gets the checkbox's current label text */
124
- getLabel: () => string;
125
- /**
126
- * Adds an event listener to the checkbox
127
- * @param event
128
- * @param handler
129
- */
130
- on: <K extends keyof CheckboxEvents>(event: K, handler: CheckboxEvents[K]) => CheckboxComponent;
131
- /**
132
- * Removes an event listener from the checkbox
133
- * @param event
134
- * @param handler
135
- */
136
- off: <K extends keyof CheckboxEvents>(event: K, handler: CheckboxEvents[K]) => CheckboxComponent;
137
- /** Enables the checkbox, making it interactive */
138
- enable: () => CheckboxComponent;
139
- /** Disables the checkbox, making it non-interactive */
140
- disable: () => CheckboxComponent;
141
- /** Whether the checkbox is disabled */
142
- isDisabled: () => boolean;
143
- /** Destroys the checkbox component and cleans up resources */
144
- destroy: () => void;
145
- }
146
- /** API options interface for internal use */
147
- export interface ApiOptions {
148
- disabled: {
149
- enable: () => void;
150
- disable: () => void;
151
- isDisabled: () => boolean;
152
- };
153
- lifecycle: {
154
- destroy: () => void;
155
- };
156
- checkable: {
157
- check: () => void;
158
- uncheck: () => void;
159
- toggle: () => void;
160
- isChecked: () => boolean;
161
- };
162
- }
163
- /** Base component interface for internal composition */
164
- export interface BaseComponent {
165
- element: HTMLElement;
166
- input?: HTMLInputElement;
167
- getValue?: () => boolean;
168
- setValue?: (value: boolean) => void;
169
- setIndeterminate?: (state: boolean) => void;
170
- setError?: (error: boolean) => void;
171
- label?: {
172
- setText: (content: string) => void;
173
- getText: () => string;
174
- };
175
- on?: (event: string, handler: EventCallback) => this;
176
- off?: (event: string, handler: EventCallback) => this;
177
- disabled?: {
178
- enable: () => void;
179
- disable: () => void;
180
- isDisabled: () => boolean;
181
- };
182
- lifecycle?: {
183
- destroy: () => void;
184
- };
185
- checkable?: {
186
- check: () => void;
187
- uncheck: () => void;
188
- toggle: () => void;
189
- isChecked: () => boolean;
190
- };
191
- }
192
- /** Component as it reaches the API step of the pipeline. */
193
- export type ApiComponent = BaseComponent & Required<Pick<BaseComponent, "checkable" | "disabled" | "lifecycle">>;
194
- /** Registers CheckboxConfig with the global defaults map, so `setComponentDefaults("checkbox", ...)` is typed without core importing anything from this component. */
195
- declare module "../../core/config/global" {
196
- interface ComponentConfigMap {
197
- checkbox?: Partial<CheckboxConfig>;
198
- }
199
- }
@@ -1,7 +0,0 @@
1
- import { ChipsConfig, ChipsComponent } from "./types.js";
2
- /**
3
- * Creates a chips container for grouping related chips Chips follows a clear architectural pattern: 1.
4
- * @param config
5
- */
6
- declare const createChips: (config?: ChipsConfig) => ChipsComponent;
7
- export default createChips;
@@ -1,9 +0,0 @@
1
- import type { AssistChipConfig, FilterChipConfig, InputChipConfig, SuggestionChipConfig, ChipComponent } from "./types.js";
2
- /** Action chip; flat and outlined by default. */
3
- export declare const createAssistChip: (config: AssistChipConfig) => ChipComponent;
4
- /** Toggleable filter; selected chips show a checkmark. */
5
- export declare const createFilterChip: (config: FilterChipConfig) => ChipComponent;
6
- /** Selectable input token with an optional independent removal action. */
7
- export declare const createInputChip: (config: InputChipConfig) => ChipComponent;
8
- /** Suggested action; flat and outlined by default. */
9
- export declare const createSuggestionChip: (config: SuggestionChipConfig) => ChipComponent;
@@ -1,304 +0,0 @@
1
- import type { EventCallback } from "../../core/state/emitter.js";
2
- import type { ForwardedEventPayload } from "../../core/dom/index.js";
3
- export type ChipType = "assist" | "filter" | "input" | "suggestion";
4
- /** Shared chip options. */
5
- export interface ChipConfig {
6
- type?: ChipType;
7
- label?: string;
8
- /** Accessible name for the primary focus target. */
9
- ariaLabel?: string;
10
- value?: string;
11
- disabled?: boolean;
12
- /** In a single-select set, selecting this chip replaces the previous selection; the last selected config wins. */
13
- selected?: boolean;
14
- /** Elevated styling is supported by assist, filter and suggestion chips. */
15
- elevated?: boolean;
16
- /** Markup (HTML). */
17
- leadingIcon?: string;
18
- /** Markup (HTML). */
19
- icon?: string;
20
- /** Markup (HTML). */
21
- trailingIcon?: string;
22
- /** Decorative avatar for an input chip; takes precedence over leadingIcon. */
23
- avatar?: string;
24
- /** Called when an input chip is removed, from its remove button or with Backspace or Delete. */
25
- onRemove?: ChipEvents["remove"];
26
- removeLabel?: string;
27
- /** Filter chips: gives the trailing icon its own button, which calls this (the m3.material.io chips' trailing icon that "can be used to open a menu or remove the chip"). */
28
- onTrailingClick?: ChipEvents["trailing"];
29
- /** The trailing button's accessible name; "{label} options" for a menu, "Remove {label}" otherwise. */
30
- trailingLabel?: string;
31
- /** The trailing button opens a menu: aria-haspopup="menu", and a drop-down arrow unless trailingIcon is set. */
32
- trailingMenu?: boolean;
33
- /** Same payload as a `click` listener. */
34
- onClick?: ChipEvents["click"];
35
- /** Same payload as a `change` listener: `{ selected, chip, value }`. */
36
- onChange?: ChipEvents["change"];
37
- /** Called with the chip when the user toggles a selectable chip, not when a `selectionRequired` set refuses the click. */
38
- onSelect?: (chip: ChipComponent) => void;
39
- class?: string;
40
- prefix?: string;
41
- componentName?: string;
42
- ripple?: boolean;
43
- }
44
- export interface ChipOptions extends ChipConfig {
45
- /** Selection belongs to the chips container. */
46
- managedSelection?: boolean;
47
- /** Notify the owning set when a chip becomes selected. */
48
- onSelected?: (chip: ChipComponent) => void;
49
- /** The owning set removes the chip, once its `remove` listeners have run. */
50
- onRemoved?: (chip: ChipComponent) => void;
51
- /** The chip is a cell of a chip set's grid: the root is a `gridcell`, and a one-action chip's cell is its focus target. */
52
- cell?: boolean;
53
- }
54
- type NamedChipConfig = Omit<ChipConfig, "type" | "text" | "selected" | "avatar" | "onRemove" | "removeLabel" | "onChange" | "onSelect" | "onTrailingClick" | "trailingLabel" | "trailingMenu"> & {
55
- label: string;
56
- };
57
- export type AssistChipConfig = NamedChipConfig;
58
- export type SuggestionChipConfig = Omit<NamedChipConfig, "trailingIcon">;
59
- export type FilterChipConfig = NamedChipConfig & Pick<ChipConfig, "selected" | "onChange" | "onSelect" | "onTrailingClick" | "trailingLabel" | "trailingMenu">;
60
- export type InputChipConfig = Omit<FilterChipConfig, "elevated" | "onTrailingClick" | "trailingLabel" | "trailingMenu"> & Pick<ChipConfig, "avatar" | "onRemove" | "removeLabel">;
61
- export interface ChipChangePayload {
62
- selected: boolean;
63
- chip: ChipComponent;
64
- /** The chip's value, as `getValue()` returns it; every model event carries it */
65
- value: string | null;
66
- }
67
- export interface ChipEvents {
68
- click: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
69
- keydown: (payload: ForwardedEventPayload<KeyboardEvent, HTMLElement>) => void;
70
- focus: (payload: ForwardedEventPayload<FocusEvent, HTMLElement>) => void;
71
- blur: (payload: ForwardedEventPayload<FocusEvent, HTMLElement>) => void;
72
- change: (payload: ChipChangePayload) => void;
73
- remove: (chip: ChipComponent) => void;
74
- /** A filter chip's trailing button was activated. */
75
- trailing: (chip: ChipComponent) => void;
76
- }
77
- /** Shared API. */
78
- export interface ChipComponent {
79
- element: HTMLElement;
80
- /** Native primary action. */
81
- action: HTMLButtonElement;
82
- /** A filter chip's trailing button, when it has one (`onTrailingClick`): anchor a menu to it and keep its aria-expanded in step. */
83
- trailingAction?: HTMLButtonElement;
84
- getType: () => ChipType;
85
- getValue: () => string | null;
86
- setValue: (value: string) => ChipComponent;
87
- enable: () => ChipComponent;
88
- disable: () => ChipComponent;
89
- isDisabled: () => boolean;
90
- setLabel: (label: string) => ChipComponent;
91
- getLabel: () => string;
92
- /** Alias of setLabel for chips-container consumers. */
93
- setText: (text: string) => ChipComponent;
94
- getText: () => string;
95
- setIcon: (icon: string) => ChipComponent;
96
- getIcon: () => string;
97
- setLeadingIcon: (icon: string) => ChipComponent;
98
- setTrailingIcon: (icon: string) => ChipComponent;
99
- isSelected: () => boolean;
100
- /** Selects or deselects this chip silently. */
101
- setSelected: (selected: boolean) => ChipComponent;
102
- toggleSelected: () => ChipComponent;
103
- focus: () => ChipComponent;
104
- destroy: () => void;
105
- on: <K extends keyof ChipEvents>(event: K, handler: ChipEvents[K]) => ChipComponent;
106
- off: <K extends keyof ChipEvents>(event: K, handler: ChipEvents[K]) => ChipComponent;
107
- addClass: (...classes: string[]) => ChipComponent;
108
- }
109
- /** Configuration interface for the Chips component */
110
- export interface ChipsConfig {
111
- /**
112
- * Array of chip configurations to initialize
113
- * @default []
114
- */
115
- chips?: ChipConfig[];
116
- /**
117
- * Whether the chip set is horizontally scrollable
118
- * @default false
119
- */
120
- scrollable?: boolean;
121
- /**
122
- * Whether the chip set is vertically stacked
123
- * @default false
124
- */
125
- vertical?: boolean;
126
- /** Additional CSS classes */
127
- class?: string;
128
- /** CSS selector for filtering behavior */
129
- selector?: string | null;
130
- /**
131
- * Whether several chips can be selected at once.
132
- * @default true
133
- */
134
- multiSelect?: boolean;
135
- /**
136
- * Whether the set keeps at least one chip selected: deselecting the last selected chip is refused, and a refused click emits no `change`, on the chip or on the set.
137
- * @default false
138
- */
139
- selectionRequired?: boolean;
140
- /** Same payload as an `on("change")` listener. */
141
- onChange?: ChipsEvents["change"];
142
- /**
143
- * Component prefix for class names
144
- * @default 'mtrl'
145
- */
146
- prefix?: string;
147
- /** Label text for the chips container */
148
- label?: string;
149
- /**
150
- * Position of the label (start or end)
151
- * @default 'start'
152
- */
153
- labelPosition?: "start" | "end";
154
- /** Schema definition for the component structure */
155
- schema?: unknown;
156
- /** Event handlers for component events */
157
- on?: Partial<ChipsEvents>;
158
- }
159
- /** Chips component interface */
160
- /** What a chips feature needs from the component it is handed. */
161
- export interface ChipsFeatureComponent {
162
- element: HTMLElement;
163
- getClass: (name: string) => string;
164
- emit?: (event: string, data: unknown) => unknown;
165
- /** withDom builds this; the controller appends chips to it */
166
- chipContainer?: HTMLElement;
167
- /** withChipItems keeps the live chips here. */
168
- chipInstances: ChipComponent[];
169
- /** withContainer installs this whole, so the members are not optional in it */
170
- layout?: {
171
- isVertical: () => boolean;
172
- isScrollable: () => boolean;
173
- };
174
- resources?: import("../../core/compose/cleanup.js").CleanupScope;
175
- lifecycle?: {
176
- destroy: () => void;
177
- };
178
- }
179
- /** The handlers the chips controller keeps per event name. */
180
- export type ChipsEventListeners = Record<string, EventCallback[]>;
181
- /** The payload of the chips set's `change`. */
182
- export interface ChipsChangeEvent {
183
- /** The selection in the `value` property's shape: a string or null for a single-select set, an array for a multi-select one. */
184
- value: string | string[] | null;
185
- /** The values of the selected chips, in chip order (a chip without a value gives null) */
186
- selected: (string | null)[];
187
- /** The value of the chip the user toggled; null for a change made by a method */
188
- changed: string | null;
189
- }
190
- /** A chip joined the set; `value` is the selection after insertion. */
191
- export interface ChipsAddEvent {
192
- value: string | string[] | null;
193
- chip: ChipComponent;
194
- }
195
- /** A chip left the set; `value` is the remaining selection. */
196
- export interface ChipsRemoveEvent extends ChipsAddEvent {
197
- /** The selection after removal, in the same shape as the set's `getValue()`. */
198
- value: string | string[] | null;
199
- /** The removed chip's value, captured before destruction. */
200
- chipValue: string | null;
201
- }
202
- /** Events emitted by the chips container's controller. */
203
- export interface ChipsEvents {
204
- /** The selection after the change. */
205
- change: (event: ChipsChangeEvent) => void;
206
- /** The newly created chip and the selection after insertion. */
207
- add: (event: ChipsAddEvent) => void;
208
- /** The removed chip and the selection after removal. */
209
- remove: (event: ChipsRemoveEvent) => void;
210
- }
211
- export interface ChipsComponent {
212
- /** The chips container's DOM element */
213
- element: HTMLElement;
214
- /**
215
- * Adds a new chip to the chips container.
216
- * @param chipConfig
217
- */
218
- addChip: (chipConfig: ChipConfig) => ChipsComponent;
219
- /**
220
- * Removes a chip from the chips container
221
- * @param chipOrIndex
222
- */
223
- removeChip: (chipOrIndex: ChipComponent | number) => ChipsComponent;
224
- /** Gets all chip instances in the set */
225
- getChips: () => ChipComponent[];
226
- /** Gets currently selected chips */
227
- getSelectedChips: () => ChipComponent[];
228
- /** Gets the values of selected chips */
229
- getSelectedValues: () => (string | null)[];
230
- /** Gets the current value - form field compatibility */
231
- getValue: () => string | string[] | null;
232
- /**
233
- * Sets the value by selecting chips by value, without a change event - form field compatibility
234
- * @param values
235
- */
236
- setValue: (values: string | string[] | null | undefined) => ChipsComponent;
237
- /**
238
- * Selects chips by their values
239
- * @param values
240
- * @param triggerEvent
241
- */
242
- selectByValue: (values: string | string[], triggerEvent?: boolean) => ChipsComponent;
243
- /** Clears all selections. */
244
- clearSelection: () => ChipsComponent;
245
- /**
246
- * Sets the scrollable state of the chips container
247
- * @param isScrollable
248
- */
249
- setScrollable: (isScrollable: boolean) => ChipsComponent;
250
- /**
251
- * Sets the vertical layout state
252
- * @param isVertical
253
- */
254
- setVertical: (isVertical: boolean) => ChipsComponent;
255
- /**
256
- * Sets the label text
257
- * @param text
258
- */
259
- setLabel: (text: string) => ChipsComponent;
260
- /** Gets the label text */
261
- getLabel: () => string;
262
- /**
263
- * Sets the label position
264
- * @param position
265
- */
266
- setLabelPosition: (position: "start" | "end") => ChipsComponent;
267
- /** Gets the label position */
268
- getLabelPosition: () => string;
269
- /**
270
- * Scrolls to a specific chip.
271
- * @param chipOrIndex
272
- */
273
- scrollToChip: (chipOrIndex: ChipComponent | number) => ChipsComponent;
274
- /** Enables keyboard navigation between chips in the set */
275
- enableKeyboardNavigation: () => ChipsComponent;
276
- /** Turns keyboard navigation between the chips on and off: while disabled, */
277
- keyboard: {
278
- /** Moves focus with the arrows, Home and End again */
279
- enable: () => void;
280
- /** Stops moving focus with the arrows, Home and End */
281
- disable: () => void;
282
- };
283
- /** Destroys the chips container and all contained chips */
284
- destroy: () => void;
285
- /**
286
- * Adds an event listener to the chips container
287
- * @param event
288
- * @param handler
289
- */
290
- on: <K extends keyof ChipsEvents>(event: K, handler: ChipsEvents[K]) => ChipsComponent;
291
- /**
292
- * Removes an event listener from the chips container
293
- * @param event
294
- * @param handler
295
- */
296
- off: <K extends keyof ChipsEvents>(event: K, handler: ChipsEvents[K]) => ChipsComponent;
297
- }
298
- /** Registers ChipConfig with the global defaults map, so `setComponentDefaults("chip", ...)` is typed without core importing anything from this component. */
299
- declare module "../../core/config/global" {
300
- interface ComponentConfigMap {
301
- chip?: Partial<ChipConfig>;
302
- }
303
- }
304
- export {};
@@ -1,7 +0,0 @@
1
- import type { DatePickerComponent, DatePickerConfig, DatePickerValueOf } from "./types.js";
2
- /** M3 calendar/input modes share a draft; modal acceptance is the commit boundary. */
3
- /** The value's type follows a literal selectionMode: `'range'` makes it a pair, the default a date. */
4
- declare const createDatePicker: <M extends string = "single">(config?: DatePickerConfig & {
5
- selectionMode?: M;
6
- }) => DatePickerComponent<DatePickerValueOf<M>>;
7
- export default createDatePicker;