material 3.8.0 → 3.8.2

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 (462) hide show
  1. package/README.md +2 -2
  2. package/dist/components/badge/badge.d.ts +4 -0
  3. package/dist/components/badge/constants.d.ts +4 -0
  4. package/dist/components/badge/index.d.ts +1 -0
  5. package/dist/components/badge/types.d.ts +102 -0
  6. package/dist/components/bottom-app-bar/bottom-app-bar.d.ts +4 -0
  7. package/dist/components/bottom-app-bar/constants.d.ts +3 -0
  8. package/dist/components/bottom-app-bar/types.d.ts +42 -0
  9. package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
  10. package/dist/components/bottom-sheet/constants.d.ts +9 -0
  11. package/dist/components/bottom-sheet/types.d.ts +52 -0
  12. package/dist/components/button/button.d.ts +4 -0
  13. package/dist/components/button/constants.d.ts +20 -0
  14. package/dist/components/button/index.d.ts +1 -0
  15. package/dist/components/button/types.d.ts +190 -0
  16. package/dist/components/button-group/button-group.d.ts +4 -0
  17. package/dist/components/button-group/constants.d.ts +54 -0
  18. package/dist/components/button-group/index.d.ts +1 -0
  19. package/dist/components/button-group/types.d.ts +125 -0
  20. package/dist/components/card/card.d.ts +4 -0
  21. package/dist/components/card/constants.d.ts +11 -0
  22. package/dist/components/card/content.d.ts +16 -0
  23. package/dist/components/card/index.d.ts +2 -0
  24. package/dist/components/card/types.d.ts +123 -0
  25. package/dist/components/carousel/carousel.d.ts +1 -0
  26. package/dist/components/carousel/constants.d.ts +10 -0
  27. package/dist/components/carousel/features/scroll.js +1 -0
  28. package/dist/components/carousel/types.d.ts +16 -0
  29. package/dist/components/checkbox/checkbox.d.ts +5 -0
  30. package/dist/components/checkbox/constants.d.ts +13 -0
  31. package/dist/components/checkbox/index.d.ts +2 -0
  32. package/dist/components/checkbox/types.d.ts +94 -0
  33. package/dist/components/chips/chips.d.ts +4 -0
  34. package/dist/components/chips/constants.d.ts +1 -0
  35. package/dist/components/chips/factories.d.ts +4 -0
  36. package/dist/components/chips/features/controller.js +4 -6
  37. package/dist/components/chips/types.d.ts +140 -0
  38. package/dist/components/datepicker/constants.d.ts +38 -0
  39. package/dist/components/datepicker/datepicker.d.ts +2 -0
  40. package/dist/components/datepicker/types.d.ts +139 -0
  41. package/dist/components/dialog/constants.d.ts +45 -0
  42. package/dist/components/dialog/dialog.d.ts +5 -0
  43. package/dist/components/dialog/index.d.ts +1 -0
  44. package/dist/components/dialog/types.d.ts +196 -0
  45. package/dist/components/divider/config.d.ts +30 -0
  46. package/dist/components/divider/constants.d.ts +15 -0
  47. package/dist/components/divider/divider.d.ts +4 -0
  48. package/dist/components/divider/types.d.ts +27 -0
  49. package/dist/components/drawer/constants.d.ts +39 -0
  50. package/dist/components/drawer/drawer.d.ts +4 -0
  51. package/dist/components/drawer/index.d.ts +1 -0
  52. package/dist/components/drawer/types.d.ts +109 -0
  53. package/dist/components/extended-fab/constants.d.ts +32 -0
  54. package/dist/components/extended-fab/extended-fab.d.ts +4 -0
  55. package/dist/components/extended-fab/types.d.ts +123 -0
  56. package/dist/components/fab/constants.d.ts +26 -0
  57. package/dist/components/fab/fab.d.ts +4 -0
  58. package/dist/components/fab/types.d.ts +100 -0
  59. package/dist/components/fab-menu/constants.d.ts +9 -0
  60. package/dist/components/fab-menu/fab-menu.d.ts +4 -0
  61. package/dist/components/fab-menu/types.d.ts +41 -0
  62. package/dist/components/icon-button/constants.d.ts +34 -0
  63. package/dist/components/icon-button/icon-button.d.ts +4 -0
  64. package/dist/components/icon-button/types.d.ts +157 -0
  65. package/dist/components/index.d.ts +1 -0
  66. package/dist/components/list/constants.d.ts +30 -0
  67. package/dist/components/list/index.d.ts +1 -0
  68. package/dist/components/list/list.d.ts +4 -0
  69. package/dist/components/list/types.d.ts +110 -0
  70. package/dist/components/loading-indicator/constants.d.ts +16 -0
  71. package/dist/components/loading-indicator/features/renderer.d.ts +13 -0
  72. package/dist/components/loading-indicator/loading-indicator.d.ts +4 -0
  73. package/dist/components/loading-indicator/types.d.ts +21 -0
  74. package/dist/components/menu/constants.d.ts +51 -0
  75. package/dist/components/menu/features/controller.js +1 -1
  76. package/dist/components/menu/features/keyboard.js +8 -3
  77. package/dist/components/menu/features/opener.js +2 -16
  78. package/dist/components/menu/index.d.ts +2 -0
  79. package/dist/components/menu/inner.d.ts +2 -0
  80. package/dist/components/menu/menu.d.ts +4 -0
  81. package/dist/components/menu/on-demand.d.ts +9 -0
  82. package/dist/components/menu/types.d.ts +185 -1
  83. package/dist/components/navigation-bar/navigation-bar.d.ts +1 -0
  84. package/dist/components/navigation-bar/types.d.ts +12 -0
  85. package/dist/components/navigation-rail/constants.d.ts +2 -0
  86. package/dist/components/navigation-rail/navigation-rail.d.ts +1 -0
  87. package/dist/components/navigation-rail/types.d.ts +18 -0
  88. package/dist/components/progress/constants.d.ts +37 -0
  89. package/dist/components/progress/progress.d.ts +4 -0
  90. package/dist/components/progress/types.d.ts +136 -0
  91. package/dist/components/radios/constants.d.ts +14 -0
  92. package/dist/components/radios/radios.d.ts +4 -0
  93. package/dist/components/radios/types.d.ts +89 -0
  94. package/dist/components/search/constants.d.ts +34 -0
  95. package/dist/components/search/search.d.ts +4 -0
  96. package/dist/components/search/types.d.ts +109 -0
  97. package/dist/components/select/constants.d.ts +46 -0
  98. package/dist/components/select/features.js +9 -1
  99. package/dist/components/select/index.d.ts +2 -0
  100. package/dist/components/select/select.d.ts +4 -0
  101. package/dist/components/select/types.d.ts +95 -0
  102. package/dist/components/side-sheet/constants.d.ts +9 -0
  103. package/dist/components/side-sheet/side-sheet.d.ts +4 -0
  104. package/dist/components/side-sheet/types.d.ts +51 -0
  105. package/dist/components/slider/constants.d.ts +62 -0
  106. package/dist/components/slider/slider.d.ts +4 -0
  107. package/dist/components/slider/types.d.ts +78 -0
  108. package/dist/components/snackbar/constants.d.ts +37 -0
  109. package/dist/components/snackbar/snackbar.d.ts +5 -0
  110. package/dist/components/snackbar/types.d.ts +67 -0
  111. package/dist/components/split-button/api.js +13 -3
  112. package/dist/components/split-button/constants.d.ts +13 -0
  113. package/dist/components/split-button/split-button.d.ts +4 -0
  114. package/dist/components/split-button/types.d.ts +50 -0
  115. package/dist/components/switch/constants.d.ts +34 -0
  116. package/dist/components/switch/switch.d.ts +4 -0
  117. package/dist/components/switch/types.d.ts +55 -0
  118. package/dist/components/tabs/constants.d.ts +49 -0
  119. package/dist/components/tabs/indicator.d.ts +22 -0
  120. package/dist/components/tabs/responsive.d.ts +17 -0
  121. package/dist/components/tabs/tab.d.ts +5 -0
  122. package/dist/components/tabs/tabs.d.ts +4 -0
  123. package/dist/components/tabs/types.d.ts +170 -0
  124. package/dist/components/tabs/utils.d.ts +24 -0
  125. package/dist/components/text-field/constants.d.ts +61 -0
  126. package/dist/components/text-field/features/trailing-icon.d.ts +25 -0
  127. package/dist/components/text-field/text-field.d.ts +4 -0
  128. package/dist/components/text-field/types.d.ts +84 -0
  129. package/dist/components/timepicker/constants.d.ts +61 -0
  130. package/dist/components/timepicker/types.d.ts +145 -0
  131. package/dist/components/toolbar/constants.d.ts +8 -0
  132. package/dist/components/toolbar/toolbar.d.ts +4 -0
  133. package/dist/components/toolbar/types.d.ts +75 -0
  134. package/dist/components/tooltip/constants.d.ts +43 -0
  135. package/dist/components/tooltip/tooltip.d.ts +4 -0
  136. package/dist/components/tooltip/types.d.ts +78 -0
  137. package/dist/components/top-app-bar/constants.d.ts +29 -0
  138. package/dist/components/top-app-bar/top-app-bar.d.ts +4 -0
  139. package/dist/components/top-app-bar/types.d.ts +55 -0
  140. package/dist/core/canvas/animation.d.ts +6 -0
  141. package/dist/core/canvas/drawing.d.ts +47 -0
  142. package/dist/core/canvas/index.d.ts +1 -0
  143. package/dist/core/canvas/resize.d.ts +7 -0
  144. package/dist/core/canvas/utils.d.ts +39 -0
  145. package/dist/core/compose/base.d.ts +9 -0
  146. package/dist/core/compose/cleanup.d.ts +2 -0
  147. package/dist/core/compose/component.d.ts +13 -0
  148. package/dist/core/compose/features/badge.d.ts +10 -0
  149. package/dist/core/compose/features/checkable.d.ts +13 -0
  150. package/dist/core/compose/features/debounce.d.ts +19 -0
  151. package/dist/core/compose/features/disabled.d.ts +11 -0
  152. package/dist/core/compose/features/events.d.ts +19 -0
  153. package/dist/core/compose/features/icon.d.ts +20 -0
  154. package/dist/core/compose/features/input.d.ts +31 -0
  155. package/dist/core/compose/features/lifecycle.d.ts +16 -0
  156. package/dist/core/compose/features/position.d.ts +13 -0
  157. package/dist/core/compose/features/ripple.d.ts +17 -0
  158. package/dist/core/compose/features/size.d.ts +5 -0
  159. package/dist/core/compose/features/style.d.ts +5 -0
  160. package/dist/core/compose/features/text.d.ts +20 -0
  161. package/dist/core/compose/features/textinput.d.ts +39 -0
  162. package/dist/core/compose/features/textlabel.d.ts +18 -0
  163. package/dist/core/compose/features/throttle.d.ts +18 -0
  164. package/dist/core/compose/features/track.d.ts +12 -0
  165. package/dist/core/compose/features/variant.d.ts +5 -0
  166. package/dist/core/compose/features/withEvents.d.ts +12 -0
  167. package/dist/core/compose/pipe.d.ts +12 -0
  168. package/dist/core/compose/utils/type-guards.d.ts +5 -0
  169. package/dist/core/config/component.d.ts +17 -0
  170. package/dist/core/config/global.d.ts +15 -0
  171. package/dist/core/config.d.ts +34 -0
  172. package/dist/core/dom/attributes.d.ts +25 -0
  173. package/dist/core/dom/classes.d.ts +24 -0
  174. package/dist/core/dom/create.d.ts +47 -0
  175. package/dist/core/dom/events.d.ts +26 -0
  176. package/dist/core/dom/focus.d.ts +11 -0
  177. package/dist/core/dom/html.d.ts +6 -0
  178. package/dist/core/dom/layer.d.ts +36 -0
  179. package/dist/core/dom/roving.d.ts +7 -0
  180. package/dist/core/navigation/destinations.d.ts +10 -0
  181. package/dist/core/shapes/cubic.d.ts +8 -0
  182. package/dist/core/shapes/material.d.ts +45 -0
  183. package/dist/core/shapes/polygon.d.ts +11 -0
  184. package/dist/core/state/emitter.d.ts +19 -0
  185. package/dist/core/state/events.d.ts +17 -0
  186. package/dist/core/state/store.d.ts +40 -0
  187. package/dist/core/theme/shape.d.ts +3 -0
  188. package/dist/core/theme/tokens.d.ts +6 -0
  189. package/dist/core/utils/background.d.ts +7 -0
  190. package/dist/core/utils/color.d.ts +5 -0
  191. package/dist/core/utils/index.d.ts +9 -0
  192. package/dist/core/utils/mobile.d.ts +10 -0
  193. package/dist/core/utils/object.d.ts +9 -0
  194. package/dist/core/utils/performance.d.ts +20 -0
  195. package/dist/core/utils/theme.d.ts +8 -0
  196. package/dist/core/utils/url.d.ts +3 -0
  197. package/dist/elements/adapter.d.ts +24 -0
  198. package/dist/elements/badge.d.ts +4 -0
  199. package/dist/elements/bottom-app-bar.d.ts +4 -0
  200. package/dist/elements/bottom-sheet.d.ts +6 -0
  201. package/dist/elements/button-group.d.ts +8 -0
  202. package/dist/elements/button.d.ts +5 -0
  203. package/dist/elements/card.d.ts +4 -0
  204. package/dist/elements/carousel.d.ts +5 -0
  205. package/dist/elements/checkbox.d.ts +4 -0
  206. package/dist/elements/chips.d.ts +9 -0
  207. package/dist/elements/css/button.css +1 -1
  208. package/dist/elements/css/button.js +1 -1
  209. package/dist/elements/css/carousel.css +1 -1
  210. package/dist/elements/css/carousel.js +1 -1
  211. package/dist/elements/css/chips.css +1 -1
  212. package/dist/elements/css/chips.js +1 -1
  213. package/dist/elements/css/dialog.css +1 -1
  214. package/dist/elements/css/dialog.js +1 -1
  215. package/dist/elements/css/drawer.css +1 -1
  216. package/dist/elements/css/drawer.js +1 -1
  217. package/dist/elements/css/fab-menu.css +1 -1
  218. package/dist/elements/css/fab-menu.js +1 -1
  219. package/dist/elements/css/hosts/badge.css +1 -1
  220. package/dist/elements/css/hosts/bottom-app-bar.css +1 -1
  221. package/dist/elements/css/hosts/bottom-sheet.css +1 -1
  222. package/dist/elements/css/hosts/button-group.css +1 -1
  223. package/dist/elements/css/hosts/button.css +1 -1
  224. package/dist/elements/css/hosts/card.css +1 -1
  225. package/dist/elements/css/hosts/carousel.css +1 -1
  226. package/dist/elements/css/hosts/checkbox.css +1 -1
  227. package/dist/elements/css/hosts/chips.css +1 -1
  228. package/dist/elements/css/hosts/datepicker.css +1 -1
  229. package/dist/elements/css/hosts/dialog.css +1 -1
  230. package/dist/elements/css/hosts/divider.css +1 -1
  231. package/dist/elements/css/hosts/drawer.css +1 -1
  232. package/dist/elements/css/hosts/extended-fab.css +1 -1
  233. package/dist/elements/css/hosts/fab-menu.css +1 -1
  234. package/dist/elements/css/hosts/fab.css +1 -1
  235. package/dist/elements/css/hosts/icon-button.css +1 -1
  236. package/dist/elements/css/hosts/list.css +1 -1
  237. package/dist/elements/css/hosts/loading-indicator.css +1 -1
  238. package/dist/elements/css/hosts/menu.css +1 -1
  239. package/dist/elements/css/hosts/navigation-bar.css +1 -1
  240. package/dist/elements/css/hosts/navigation-rail.css +1 -1
  241. package/dist/elements/css/hosts/progress.css +1 -1
  242. package/dist/elements/css/hosts/radios.css +1 -1
  243. package/dist/elements/css/hosts/search.css +1 -1
  244. package/dist/elements/css/hosts/select.css +1 -1
  245. package/dist/elements/css/hosts/side-sheet.css +1 -1
  246. package/dist/elements/css/hosts/slider.css +1 -1
  247. package/dist/elements/css/hosts/snackbar.css +1 -1
  248. package/dist/elements/css/hosts/split-button.css +1 -1
  249. package/dist/elements/css/hosts/switch.css +1 -1
  250. package/dist/elements/css/hosts/tabs.css +1 -1
  251. package/dist/elements/css/hosts/text-field.css +1 -1
  252. package/dist/elements/css/hosts/timepicker.css +1 -1
  253. package/dist/elements/css/hosts/toolbar.css +1 -1
  254. package/dist/elements/css/hosts/tooltip.css +1 -1
  255. package/dist/elements/css/hosts/top-app-bar.css +1 -1
  256. package/dist/elements/css/icon-button.css +1 -1
  257. package/dist/elements/css/icon-button.js +1 -1
  258. package/dist/elements/css/menu.css +1 -1
  259. package/dist/elements/css/menu.js +1 -1
  260. package/dist/elements/css/navigation-bar.css +1 -1
  261. package/dist/elements/css/navigation-bar.js +1 -1
  262. package/dist/elements/css/navigation-rail.css +1 -1
  263. package/dist/elements/css/navigation-rail.js +1 -1
  264. package/dist/elements/css/search.css +1 -1
  265. package/dist/elements/css/search.js +1 -1
  266. package/dist/elements/css/slider.css +1 -1
  267. package/dist/elements/css/slider.js +1 -1
  268. package/dist/elements/css/text-field.css +1 -1
  269. package/dist/elements/css/text-field.js +1 -1
  270. package/dist/elements/css/timepicker.css +1 -1
  271. package/dist/elements/css/timepicker.js +1 -1
  272. package/dist/elements/datepicker.d.ts +6 -0
  273. package/dist/elements/define.d.ts +48 -0
  274. package/dist/elements/define.js +1 -1
  275. package/dist/elements/dialog.d.ts +5 -0
  276. package/dist/elements/divider.d.ts +4 -0
  277. package/dist/elements/drawer.d.ts +6 -0
  278. package/dist/elements/extended-fab.d.ts +5 -0
  279. package/dist/elements/fab-menu.d.ts +10 -0
  280. package/dist/elements/fab.d.ts +5 -0
  281. package/dist/elements/icon-button.d.ts +6 -0
  282. package/dist/elements/index.d.ts +4 -0
  283. package/dist/elements/list.d.ts +8 -0
  284. package/dist/elements/loading-indicator.d.ts +4 -0
  285. package/dist/elements/menu.d.ts +12 -0
  286. package/dist/elements/navigation-bar.d.ts +6 -0
  287. package/dist/elements/navigation-rail.d.ts +10 -0
  288. package/dist/elements/preupgrade/badge.css +1 -1
  289. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  290. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  291. package/dist/elements/preupgrade/button-group.css +1 -1
  292. package/dist/elements/preupgrade/button.css +1 -1
  293. package/dist/elements/preupgrade/card.css +1 -1
  294. package/dist/elements/preupgrade/carousel.css +1 -1
  295. package/dist/elements/preupgrade/checkbox.css +1 -1
  296. package/dist/elements/preupgrade/chips.css +1 -1
  297. package/dist/elements/preupgrade/datepicker.css +1 -1
  298. package/dist/elements/preupgrade/dialog.css +1 -1
  299. package/dist/elements/preupgrade/divider.css +1 -1
  300. package/dist/elements/preupgrade/drawer.css +1 -1
  301. package/dist/elements/preupgrade/extended-fab.css +1 -1
  302. package/dist/elements/preupgrade/fab-menu.css +1 -1
  303. package/dist/elements/preupgrade/fab.css +1 -1
  304. package/dist/elements/preupgrade/icon-button.css +1 -1
  305. package/dist/elements/preupgrade/list.css +1 -1
  306. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  307. package/dist/elements/preupgrade/menu.css +1 -1
  308. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  309. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  310. package/dist/elements/preupgrade/progress.css +1 -1
  311. package/dist/elements/preupgrade/radios.css +1 -1
  312. package/dist/elements/preupgrade/search.css +1 -1
  313. package/dist/elements/preupgrade/select.css +1 -1
  314. package/dist/elements/preupgrade/side-sheet.css +1 -1
  315. package/dist/elements/preupgrade/slider.css +1 -1
  316. package/dist/elements/preupgrade/snackbar.css +1 -1
  317. package/dist/elements/preupgrade/split-button.css +1 -1
  318. package/dist/elements/preupgrade/switch.css +1 -1
  319. package/dist/elements/preupgrade/tabs.css +1 -1
  320. package/dist/elements/preupgrade/text-field.css +1 -1
  321. package/dist/elements/preupgrade/timepicker.css +1 -1
  322. package/dist/elements/preupgrade/toolbar.css +1 -1
  323. package/dist/elements/preupgrade/tooltip.css +1 -1
  324. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  325. package/dist/elements/preupgrade.css +1 -1
  326. package/dist/elements/progress.d.ts +4 -0
  327. package/dist/elements/radios.d.ts +5 -0
  328. package/dist/elements/search.d.ts +15 -0
  329. package/dist/elements/select.d.ts +6 -0
  330. package/dist/elements/side-sheet.d.ts +5 -0
  331. package/dist/elements/slider.d.ts +7 -0
  332. package/dist/elements/snackbar.d.ts +4 -0
  333. package/dist/elements/split-button.d.ts +8 -0
  334. package/dist/elements/styles.d.ts +11 -0
  335. package/dist/elements/switch.d.ts +5 -0
  336. package/dist/elements/tabs.d.ts +6 -0
  337. package/dist/elements/text-field.d.ts +9 -0
  338. package/dist/elements/timepicker.d.ts +9 -0
  339. package/dist/elements/toolbar.d.ts +4 -0
  340. package/dist/elements/tooltip.d.ts +4 -0
  341. package/dist/elements/top-app-bar.d.ts +4 -0
  342. package/dist/index.d.ts +1 -0
  343. package/dist/react/create.d.ts +15 -0
  344. package/dist/react/index.d.ts +1 -0
  345. package/dist/react/jsx.d.ts +3 -0
  346. package/dist/solid/create.d.ts +16 -0
  347. package/dist/solid/index.d.ts +1 -0
  348. package/dist/solid/jsx.d.ts +4 -0
  349. package/dist/ssr/index.d.ts +3 -0
  350. package/dist/ssr/solid.d.ts +1 -0
  351. package/dist/ssr/svelte.d.ts +1 -0
  352. package/dist/ssr/vue.d.ts +1 -0
  353. package/dist/styles/badge.css +1 -1
  354. package/dist/styles/base-lite.css +2 -2
  355. package/dist/styles/base.css +2 -2
  356. package/dist/styles/bottom-app-bar.css +1 -1
  357. package/dist/styles/bottom-sheet.css +1 -1
  358. package/dist/styles/button-group.css +1 -1
  359. package/dist/styles/button.css +2 -2
  360. package/dist/styles/card.css +1 -1
  361. package/dist/styles/carousel.css +2 -2
  362. package/dist/styles/checkbox.css +1 -1
  363. package/dist/styles/chips.css +2 -2
  364. package/dist/styles/contrast.css +1 -1
  365. package/dist/styles/datepicker.css +1 -1
  366. package/dist/styles/dialog.css +2 -2
  367. package/dist/styles/divider.css +1 -1
  368. package/dist/styles/drawer.css +2 -2
  369. package/dist/styles/extended-fab.css +1 -1
  370. package/dist/styles/fab-menu.css +2 -2
  371. package/dist/styles/fab.css +1 -1
  372. package/dist/styles/icon-button.css +2 -2
  373. package/dist/styles/list.css +1 -1
  374. package/dist/styles/loading-indicator.css +1 -1
  375. package/dist/styles/menu.css +2 -2
  376. package/dist/styles/navigation-bar.css +2 -2
  377. package/dist/styles/navigation-rail.css +2 -2
  378. package/dist/styles/progress.css +1 -1
  379. package/dist/styles/radios.css +1 -1
  380. package/dist/styles/search.css +2 -2
  381. package/dist/styles/select.css +1 -1
  382. package/dist/styles/side-sheet.css +1 -1
  383. package/dist/styles/slider.css +2 -2
  384. package/dist/styles/snackbar.css +1 -1
  385. package/dist/styles/split-button.css +1 -1
  386. package/dist/styles/switch.css +1 -1
  387. package/dist/styles/tabs.css +1 -1
  388. package/dist/styles/text-field.css +2 -2
  389. package/dist/styles/timepicker.css +2 -2
  390. package/dist/styles/toolbar.css +1 -1
  391. package/dist/styles/tooltip.css +1 -1
  392. package/dist/styles/top-app-bar.css +1 -1
  393. package/dist/styles/typography.css +1 -1
  394. package/dist/styles/utilities.css +1 -1
  395. package/dist/styles.css +2 -2
  396. package/dist/svelte/runtime.d.ts +21 -0
  397. package/dist/theme/image.d.ts +2 -0
  398. package/dist/theme/index.d.ts +20 -0
  399. package/dist/theme/variants.d.ts +6 -0
  400. package/dist/theme/vendor/dynamiccolor/color_spec_2021.d.ts +1 -0
  401. package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +39 -0
  402. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +13 -0
  403. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.d.ts +1 -0
  404. package/dist/theme/vendor/hct/hct.d.ts +9 -0
  405. package/dist/themes/autumn-contrast.css +1 -1
  406. package/dist/themes/autumn.css +1 -1
  407. package/dist/themes/baseline-contrast.css +1 -1
  408. package/dist/themes/baseline.css +1 -1
  409. package/dist/themes/brownbeige-contrast.css +1 -1
  410. package/dist/themes/brownbeige.css +1 -1
  411. package/dist/themes/content-contrast.css +1 -1
  412. package/dist/themes/content.css +1 -1
  413. package/dist/themes/desert-contrast.css +1 -1
  414. package/dist/themes/desert.css +1 -1
  415. package/dist/themes/expressive-contrast.css +1 -1
  416. package/dist/themes/expressive.css +1 -1
  417. package/dist/themes/fidelity-contrast.css +1 -1
  418. package/dist/themes/fidelity.css +1 -1
  419. package/dist/themes/forest-contrast.css +1 -1
  420. package/dist/themes/forest.css +1 -1
  421. package/dist/themes/fruit-salad-contrast.css +1 -1
  422. package/dist/themes/fruit-salad.css +1 -1
  423. package/dist/themes/highcontrast-contrast.css +1 -1
  424. package/dist/themes/highcontrast.css +1 -1
  425. package/dist/themes/monochrome-contrast.css +1 -1
  426. package/dist/themes/monochrome.css +1 -1
  427. package/dist/themes/neutral-contrast.css +1 -1
  428. package/dist/themes/neutral.css +1 -1
  429. package/dist/themes/ocean-contrast.css +1 -1
  430. package/dist/themes/ocean.css +1 -1
  431. package/dist/themes/rainbow-contrast.css +1 -1
  432. package/dist/themes/rainbow.css +1 -1
  433. package/dist/themes/sageivory-contrast.css +1 -1
  434. package/dist/themes/sageivory.css +1 -1
  435. package/dist/themes/spring-contrast.css +1 -1
  436. package/dist/themes/spring.css +1 -1
  437. package/dist/themes/summer-contrast.css +1 -1
  438. package/dist/themes/summer.css +1 -1
  439. package/dist/themes/sunset-contrast.css +1 -1
  440. package/dist/themes/sunset.css +1 -1
  441. package/dist/themes/tealcaramel-contrast.css +1 -1
  442. package/dist/themes/tealcaramel.css +1 -1
  443. package/dist/themes/vibrant-contrast.css +1 -1
  444. package/dist/themes/vibrant.css +1 -1
  445. package/dist/vue/create.d.ts +18 -0
  446. package/dist/vue/index.d.ts +1 -0
  447. package/package.json +1 -1
  448. package/src/styles/abstract/_mixins.scss +1 -1
  449. package/src/styles/components/_button.scss +1 -0
  450. package/src/styles/components/_carousel.scss +18 -4
  451. package/src/styles/components/_chips.scss +3 -2
  452. package/src/styles/components/_dialog.scss +1 -1
  453. package/src/styles/components/_drawer.scss +6 -3
  454. package/src/styles/components/_fab-menu.scss +1 -1
  455. package/src/styles/components/_icon-button.scss +2 -1
  456. package/src/styles/components/_menu.scss +14 -1
  457. package/src/styles/components/_navigation-bar.scss +6 -1
  458. package/src/styles/components/_navigation-rail.scss +5 -0
  459. package/src/styles/components/_search.scss +13 -0
  460. package/src/styles/components/_slider.scss +16 -39
  461. package/src/styles/components/_text-field.scss +9 -0
  462. package/src/styles/components/_timepicker.scss +1 -1
@@ -1,4 +1,5 @@
1
1
  import { BaseComponent, ElementComponent } from "../../../core/compose/component.js";
2
+ /** Extended element component with input field */
2
3
  interface InputElementComponent extends ElementComponent {
3
4
  input?: HTMLInputElement | HTMLTextAreaElement;
4
5
  emit?: (event: string, data?: unknown) => void;
@@ -6,24 +7,48 @@ interface InputElementComponent extends ElementComponent {
6
7
  destroy: () => void;
7
8
  };
8
9
  }
10
+ /** What an interactive trailing icon's `trailing` event carries */
9
11
  export interface TextFieldTrailingPayload {
12
+ /** The field's value when the icon was activated */
10
13
  value: string;
14
+ /** The click (Enter and Space reach a button as one) */
11
15
  event: MouseEvent;
12
16
  }
17
+ /** Configuration for trailing icon feature */
13
18
  export interface TrailingIconConfig {
19
+ /** Trailing icon HTML content */
14
20
  trailingIcon?: string;
21
+ /** Makes the trailing icon a button with this accessible name: clear, show password, open a menu. */
15
22
  trailingIconLabel?: string;
23
+ /** `trailing` listener. */
16
24
  onTrailingClick?: (event: TextFieldTrailingPayload) => void;
25
+ /** Whether the field starts disabled; the trailing button is disabled with it */
17
26
  disabled?: boolean;
27
+ /** CSS class prefix */
18
28
  prefix?: string;
29
+ /** Component name */
19
30
  componentName?: string;
20
31
  }
32
+ /** Component with trailing icon capabilities */
33
+ /** What this feature installs. */
21
34
  export interface TrailingIconFeature {
35
+ /** Trailing icon element */
22
36
  trailingIcon: HTMLElement | null;
37
+ /**
38
+ * Sets trailing icon content
39
+ * @param html
40
+ * @param label
41
+ */
23
42
  setTrailingIcon: (html: string, label?: string) => TrailingIconComponent;
43
+ /** Removes trailing icon */
24
44
  removeTrailingIcon: () => TrailingIconComponent;
25
45
  }
46
+ /** Component with trailingicon capabilities */
26
47
  export interface TrailingIconComponent extends BaseComponent, TrailingIconFeature {
27
48
  }
49
+ /**
50
+ * Adds trailing icon to a text field component
51
+ * @param config
52
+ */
28
53
  export declare const withTrailingIcon: <T extends TrailingIconConfig & object>(config: T) => <C extends InputElementComponent>(component: C) => C & TrailingIconFeature;
29
54
  export {};
@@ -1,3 +1,7 @@
1
1
  import { TextFieldConfig, TextFieldComponent } from "./types.js";
2
+ /**
3
+ * Creates a new TextField component Text fields allow users to enter text into a UI.
4
+ * @param config
5
+ */
2
6
  declare const createTextField: (config?: TextFieldConfig) => TextFieldComponent;
3
7
  export default createTextField;
@@ -1,18 +1,25 @@
1
1
  import type { EventCallback } from "../../core/state/emitter.js";
2
2
  import type { TextFieldTrailingPayload } from "./features/trailing-icon.js";
3
3
  export type { TextFieldTrailingPayload };
4
+ /** Available TextField variants */
4
5
  export type TextFieldVariant = "filled" | "outlined";
6
+ /** TextField variant constants */
5
7
  export declare const TEXT_FIELD_VARIANTS: {
6
8
  readonly FILLED: "filled";
7
9
  readonly OUTLINED: "outlined";
8
10
  };
11
+ /** Available TextField states */
9
12
  export type TextFieldStates = "active" | "inactive" | "disabled";
13
+ /** Available TextField density levels */
10
14
  export type TextFieldDensity = "default" | "compact";
15
+ /** TextField density constants */
11
16
  export declare const TEXT_FIELD_DENSITY: {
12
17
  readonly DEFAULT: "default";
13
18
  readonly COMPACT: "compact";
14
19
  };
20
+ /** Available TextField types */
15
21
  export type TextFieldTypes = "text" | "password" | "email" | "number" | "tel" | "url" | "search" | "multiline";
22
+ /** TextField type constants */
16
23
  export declare const TEXT_FIELD_TYPES: {
17
24
  readonly TEXT: "text";
18
25
  readonly PASSWORD: "password";
@@ -23,91 +30,165 @@ export declare const TEXT_FIELD_TYPES: {
23
30
  readonly SEARCH: "search";
24
31
  readonly MULTILINE: "multiline";
25
32
  };
33
+ /** Configuration interface for the TextField component */
26
34
  export interface TextFieldConfig {
35
+ /** Input type (text, password, email, etc.) */
27
36
  type?: TextFieldTypes | string;
37
+ /** Visual variant (filled, outlined) */
28
38
  variant?: TextFieldVariant | string;
39
+ /** Density level (default, compact) */
29
40
  density?: TextFieldDensity | string;
41
+ /** Input name attribute */
30
42
  name?: string;
43
+ /** Label text */
31
44
  label?: string;
45
+ /** Accessible name for the input; the visible label is the fallback. */
32
46
  ariaLabel?: string;
47
+ /** Initial value */
33
48
  value?: string;
49
+ /** Placeholder text */
34
50
  placeholder?: string;
51
+ /** Whether input is required; the label gets an asterisk */
35
52
  required?: boolean;
53
+ /** No asterisk on a required field: M3 lets a form whose fields are mostly */
36
54
  noAsterisk?: boolean;
55
+ /** Whether text field is disabled */
37
56
  disabled?: boolean;
57
+ /** Whether text field is readonly */
38
58
  readonly?: boolean;
59
+ /** Maximum input length */
39
60
  maxLength?: number;
61
+ /** Input pattern for validation */
40
62
  pattern?: string;
63
+ /** Autocomplete attribute */
41
64
  autocomplete?: string;
65
+ /** Leading icon HTML content. */
42
66
  leadingIcon?: string;
67
+ /** Trailing icon HTML content. */
43
68
  trailingIcon?: string;
69
+ /** Makes the trailing icon a button with this accessible name (clear, show password, …), emitting `trailing` when activated. */
44
70
  trailingIconLabel?: string;
71
+ /** `trailing` listener registered at creation. */
45
72
  onTrailingClick?: TextFieldEvents["trailing"];
73
+ /** Supporting text content */
46
74
  supportingText?: string;
75
+ /** Whether supporting text indicates an error */
47
76
  error?: boolean;
77
+ /** Prefix text to display before the input */
48
78
  prefixText?: string;
79
+ /** Suffix text to display after the input */
49
80
  suffixText?: string;
81
+ /** Additional CSS classes */
50
82
  class?: string;
83
+ /** Prefix for class names */
51
84
  prefix?: string;
85
+ /** Component name */
52
86
  componentName?: string;
53
87
  }
88
+ /** Payload emitted by native input/change and autofill detection. */
54
89
  export interface TextFieldValuePayload {
55
90
  value: string;
56
91
  isEmpty: boolean;
57
92
  isAutofilled: boolean;
58
93
  }
94
+ /** Focus and blur report whether the input is empty, without a native event. */
59
95
  export interface TextFieldFocusPayload {
60
96
  isEmpty: boolean;
61
97
  }
98
+ /** Events emitted by the text input feature. */
62
99
  export interface TextFieldEvents {
100
+ /** The trailing icon button was activated (`trailingIconLabel`) */
63
101
  trailing: (payload: TextFieldTrailingPayload) => void;
64
102
  input: (payload: TextFieldValuePayload) => void;
65
103
  change: (payload: TextFieldValuePayload) => void;
66
104
  focus: (payload: TextFieldFocusPayload) => void;
67
105
  blur: (payload: TextFieldFocusPayload) => void;
68
106
  }
107
+ /** TextField component interface */
69
108
  export interface TextFieldComponent {
109
+ /** The root element of the text field */
70
110
  element: HTMLElement;
111
+ /** The container: label, input, outline, icons and affixes, above the supporting text row. */
71
112
  field: HTMLElement;
113
+ /** The input element */
72
114
  input: HTMLInputElement | HTMLTextAreaElement;
115
+ /** Gets the text field's value */
73
116
  getValue: () => string;
117
+ /** Sets the text field's value */
74
118
  setValue: (value: string) => TextFieldComponent;
119
+ /** Sets an attribute on the input element */
75
120
  setAttribute: (name: string, value: string) => TextFieldComponent;
121
+ /** Gets an attribute from the input element */
76
122
  getAttribute: (name: string) => string | null;
123
+ /** Removes an attribute from the input element */
77
124
  removeAttribute: (name: string) => TextFieldComponent;
125
+ /** Sets the text field's variant (filled or outlined) */
78
126
  setVariant: (variant: TextFieldVariant) => TextFieldComponent;
127
+ /** Gets the text field's current variant */
79
128
  getVariant: () => TextFieldVariant;
129
+ /** Sets the text field's label text */
80
130
  setLabel: (text: string) => TextFieldComponent;
131
+ /** Gets the text field's label text */
81
132
  getLabel: () => string;
133
+ /** Leading icon element (if present) */
82
134
  leadingIcon: HTMLElement | null;
135
+ /** Sets the leading icon HTML content */
83
136
  setLeadingIcon: (html: string) => TextFieldComponent;
137
+ /** Removes the leading icon */
84
138
  removeLeadingIcon: () => TextFieldComponent;
139
+ /** Trailing icon element (if present) */
85
140
  trailingIcon: HTMLElement | null;
141
+ /** Sets the trailing icon HTML content */
142
+ /** Sets the trailing icon. */
86
143
  setTrailingIcon: (html: string, label?: string) => TextFieldComponent;
144
+ /** Removes the trailing icon */
87
145
  removeTrailingIcon: () => TextFieldComponent;
146
+ /** Makes the field required or optional, the label's asterisk with it */
88
147
  setRequired: (required: boolean) => TextFieldComponent;
148
+ /** Whether the field is required */
89
149
  isRequired: () => boolean;
150
+ /** Supporting text element (if present) */
90
151
  supportingTextElement: HTMLElement | null;
152
+ /** Sets the supporting text content */
91
153
  setSupportingText: (text: string, isError?: boolean) => TextFieldComponent;
154
+ /** Removes the supporting text */
92
155
  removeSupportingText: () => TextFieldComponent;
156
+ /** Prefix text element (if present) */
93
157
  prefixTextElement: HTMLElement | null;
158
+ /** Sets the prefix text content */
94
159
  setPrefixText: (text: string) => TextFieldComponent;
160
+ /** Removes the prefix text */
95
161
  removePrefixText: () => TextFieldComponent;
162
+ /** Suffix text element (if present) */
96
163
  suffixTextElement: HTMLElement | null;
164
+ /** Sets the suffix text content */
97
165
  setSuffixText: (text: string) => TextFieldComponent;
166
+ /** Removes the suffix text */
98
167
  removeSuffixText: () => TextFieldComponent;
168
+ /** Manually update element positions (useful after DOM changes) */
99
169
  updatePositions: () => TextFieldComponent;
170
+ /** Sets the error state of the text field */
100
171
  setError: (error: boolean, message?: string) => TextFieldComponent;
172
+ /** Gets the current error state */
101
173
  isError: () => boolean;
174
+ /** Sets the density of the text field */
102
175
  setDensity: (density: TextFieldDensity | string) => TextFieldComponent;
176
+ /** Gets the current density setting */
103
177
  getDensity: () => string;
178
+ /** Subscribes to input state events; keyboard events use input.addEventListener. */
104
179
  on: <K extends keyof TextFieldEvents>(event: K, handler: TextFieldEvents[K]) => TextFieldComponent;
180
+ /** Removes event listener */
105
181
  off: <K extends keyof TextFieldEvents>(event: K, handler: TextFieldEvents[K]) => TextFieldComponent;
182
+ /** Enables the text field */
106
183
  enable: () => TextFieldComponent;
184
+ /** Disables the text field */
107
185
  disable: () => TextFieldComponent;
186
+ /** Whether the text field is disabled */
108
187
  isDisabled: () => boolean;
188
+ /** Destroys the text field component and cleans up resources */
109
189
  destroy: () => void;
110
190
  }
191
+ /** API options interface */
111
192
  export interface ApiOptions {
112
193
  disabled: {
113
194
  enable: () => void;
@@ -118,8 +199,10 @@ export interface ApiOptions {
118
199
  destroy: () => void;
119
200
  };
120
201
  }
202
+ /** Base component interface */
121
203
  export interface BaseComponent {
122
204
  element: HTMLElement;
205
+ /** The prefixed class name, from createBase */
123
206
  getClass: (name: string) => string;
124
207
  input?: HTMLInputElement | HTMLTextAreaElement;
125
208
  config?: {
@@ -165,6 +248,7 @@ export interface BaseComponent {
165
248
  setError?: (error: boolean, message?: string) => void;
166
249
  isError?: () => boolean;
167
250
  }
251
+ /** Registers TextFieldConfig with the global defaults map, so `setComponentDefaults("text-field", ...)` is typed without core importing anything from this component. */
168
252
  declare module "../../core/config/global" {
169
253
  interface ComponentConfigMap {
170
254
  "text-field"?: Partial<TextFieldConfig>;
@@ -1,70 +1,131 @@
1
+ /** Time picker display types */
1
2
  export declare const TIMEPICKER_TYPES: {
3
+ /** Clock dial-based time picker */
2
4
  readonly DIAL: "dial";
5
+ /** Text input-based time picker */
3
6
  readonly INPUT: "input";
4
7
  };
8
+ /** Time picker orientations */
5
9
  export declare const TIMEPICKER_ORIENTATIONS: {
10
+ /** Vertical layout (default on mobile) */
6
11
  readonly VERTICAL: "vertical";
12
+ /** Horizontal layout */
7
13
  readonly HORIZONTAL: "horizontal";
8
14
  };
15
+ /** Time formats */
9
16
  export declare const TIMEPICKER_FORMATS: {
17
+ /** 12-hour format with AM/PM */
10
18
  readonly AMPM: "12h";
19
+ /** 24-hour format */
11
20
  readonly MILITARY: "24h";
12
21
  };
22
+ /** Time periods for 12-hour format */
13
23
  export declare const TIMEPICKER_PERIODS: {
24
+ /** Morning */
14
25
  readonly AM: "AM";
26
+ /** Afternoon/Evening */
15
27
  readonly PM: "PM";
16
28
  };
29
+ /** Time picker event types */
17
30
  export declare const TIMEPICKER_EVENTS: {
31
+ /** Fired when the committed time changes: on OK, or setValue */
18
32
  readonly CHANGE: "change";
33
+ /** Fired as the dial, fields or AM/PM change the draft, while open */
19
34
  readonly INPUT: "input";
35
+ /** Fired when time picker opens */
20
36
  readonly OPEN: "open";
37
+ /** Fired when time picker closes */
21
38
  readonly CLOSE: "close";
39
+ /** Fired when time is confirmed */
22
40
  readonly CONFIRM: "confirm";
41
+ /** Fired when time picker is canceled */
23
42
  readonly CANCEL: "cancel";
24
43
  };
44
+ /** Time constants used for generating clock numbers and validation */
25
45
  export declare const TIMEPICKER_VALUES: {
46
+ /** Hours for 12-hour format (1-12) */
26
47
  readonly HOURS_12: number[];
48
+ /** Hours for 24-hour format (0-23) */
27
49
  readonly HOURS_24: number[];
50
+ /** Minutes (0-59) */
28
51
  readonly MINUTES: number[];
52
+ /** Seconds (0-59) */
29
53
  readonly SECONDS: number[];
30
54
  };
55
+ /** Element class selectors for time picker components */
31
56
  export declare const TIMEPICKER_SELECTORS: {
57
+ /** Main container selector */
32
58
  readonly CONTAINER: ".mtrl-time-picker";
59
+ /** Dialog container selector */
33
60
  readonly DIALOG: ".mtrl-time-picker__dialog";
61
+ /** Title element selector */
34
62
  readonly TITLE: ".mtrl-time-picker__title";
63
+ /** Content container selector */
35
64
  readonly CONTENT: ".mtrl-time-picker__content";
65
+ /** Clock dial container selector */
36
66
  readonly DIAL: ".mtrl-time-picker__dial";
67
+ /** Clock dial face selector */
37
68
  readonly DIAL_FACE: ".mtrl-time-picker__dial-face";
69
+ /** Clock centre dot selector */
38
70
  readonly DIAL_CENTER: ".mtrl-time-picker__dial-centre";
71
+ /** Clock numbers container selector */
39
72
  readonly DIAL_NUMBERS: ".mtrl-time-picker__dial-numbers";
73
+ /** Individual number element selector */
40
74
  readonly DIAL_NUMBER: ".mtrl-time-picker__dial-number";
75
+ /** Input container selector */
41
76
  readonly INPUT_CONTAINER: ".mtrl-time-picker__input-container";
77
+ /** Hours input selector */
42
78
  readonly HOURS_INPUT: ".mtrl-time-picker__hours";
79
+ /** Minutes input selector */
43
80
  readonly MINUTES_INPUT: ".mtrl-time-picker__minutes";
81
+ /** Seconds input selector */
44
82
  readonly SECONDS_INPUT: ".mtrl-time-picker__seconds";
83
+ /** Time separator selector */
45
84
  readonly SEPARATOR: ".mtrl-time-picker__separator";
85
+ /** AM/PM selector container */
46
86
  readonly PERIOD_CONTAINER: ".mtrl-time-picker__period";
87
+ /** AM button selector */
47
88
  readonly PERIOD_AM: ".mtrl-time-picker__period-am";
89
+ /** PM button selector */
48
90
  readonly PERIOD_PM: ".mtrl-time-picker__period-pm";
91
+ /** Actions container selector */
49
92
  readonly ACTIONS: ".mtrl-time-picker__actions";
93
+ /** Toggle type button selector */
50
94
  readonly TOGGLE_TYPE_BUTTON: ".mtrl-time-picker__toggle-type";
95
+ /** Cancel button selector */
51
96
  readonly CANCEL_BUTTON: ".mtrl-time-picker__cancel";
97
+ /** Confirm button selector */
52
98
  readonly CONFIRM_BUTTON: ".mtrl-time-picker__confirm";
53
99
  };
100
+ /** Default icons for the time picker */
54
101
  export declare const TIMEPICKER_ICONS: {
102
+ /** Default clock icon */
55
103
  readonly CLOCK: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <polyline points=\"12 6 12 12 16 14\"></polyline>\n </svg>";
104
+ /** Default keyboard icon */
56
105
  readonly KEYBOARD: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"6\" y1=\"8\" x2=\"6\" y2=\"8\"></line>\n <line x1=\"10\" y1=\"8\" x2=\"10\" y2=\"8\"></line>\n <line x1=\"14\" y1=\"8\" x2=\"14\" y2=\"8\"></line>\n <line x1=\"18\" y1=\"8\" x2=\"18\" y2=\"8\"></line>\n <line x1=\"6\" y1=\"12\" x2=\"6\" y2=\"12\"></line>\n <line x1=\"10\" y1=\"12\" x2=\"10\" y2=\"12\"></line>\n <line x1=\"14\" y1=\"12\" x2=\"14\" y2=\"12\"></line>\n <line x1=\"18\" y1=\"12\" x2=\"18\" y2=\"12\"></line>\n <line x1=\"6\" y1=\"16\" x2=\"18\" y2=\"16\"></line>\n </svg>";
57
106
  };
107
+ /** Default configuration values for the time picker */
58
108
  export declare const TIMEPICKER_DEFAULTS: {
109
+ /** Default picker type */
59
110
  readonly TYPE: "dial";
111
+ /** Default time format */
60
112
  readonly FORMAT: "12h";
113
+ /** Default orientation */
61
114
  readonly ORIENTATION: "vertical";
115
+ /** Whether to show seconds selector */
62
116
  readonly SHOW_SECONDS: false;
117
+ /** Step interval for minute selection */
63
118
  readonly MINUTE_STEP: 1;
119
+ /** Step interval for second selection */
64
120
  readonly SECOND_STEP: 1;
121
+ /** Default cancel button text */
65
122
  readonly CANCEL_TEXT: "Cancel";
123
+ /** Default confirm button text */
66
124
  readonly CONFIRM_TEXT: "OK";
125
+ /** Whether picker is initially open: the default of the `open` option */
67
126
  readonly OPEN: false;
127
+ /** Default clock icon */
68
128
  readonly CLOCK_ICON: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <polyline points=\"12 6 12 12 16 14\"></polyline>\n </svg>";
129
+ /** Default keyboard icon */
69
130
  readonly KEYBOARD_ICON: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" ry=\"2\"></rect>\n <line x1=\"6\" y1=\"8\" x2=\"6\" y2=\"8\"></line>\n <line x1=\"10\" y1=\"8\" x2=\"10\" y2=\"8\"></line>\n <line x1=\"14\" y1=\"8\" x2=\"14\" y2=\"8\"></line>\n <line x1=\"18\" y1=\"8\" x2=\"18\" y2=\"8\"></line>\n <line x1=\"6\" y1=\"12\" x2=\"6\" y2=\"12\"></line>\n <line x1=\"10\" y1=\"12\" x2=\"10\" y2=\"12\"></line>\n <line x1=\"14\" y1=\"12\" x2=\"14\" y2=\"12\"></line>\n <line x1=\"18\" y1=\"12\" x2=\"18\" y2=\"12\"></line>\n <line x1=\"6\" y1=\"16\" x2=\"18\" y2=\"16\"></line>\n </svg>";
70
131
  };
@@ -1,109 +1,254 @@
1
1
  import type { ForwardedEventPayload } from "../../core/dom/index.js";
2
2
  import type { NormalizedEvent } from "../../core/utils/mobile.js";
3
+ /** Normalized touch-end event emitted by the interactive root on touch devices. */
3
4
  export type TimePickerTapPayload = NormalizedEvent;
5
+ /** Horizontal swipe emitted by the interactive root on touch devices. */
4
6
  export interface TimePickerSwipePayload {
5
7
  direction: "left" | "right";
6
8
  deltaX: number;
7
9
  deltaY: number;
8
10
  }
11
+ /** The committed 24-hour value carried by `change` and `confirm`. */
9
12
  export interface TimePickerValueEvent {
13
+ /** HH:MM, or HH:MM:SS with showSeconds */
10
14
  value: string;
11
15
  }
16
+ /** A draft edit while the committed value remains available as `value`. */
12
17
  export interface TimePickerInputEvent extends TimePickerValueEvent {
18
+ /** The uncommitted 24-hour value shown in the open picker. */
13
19
  draftValue: string;
14
20
  }
21
+ /** Events emitted by the picker API and its interactive root. */
15
22
  export interface TimePickerEvents {
23
+ /** The committed 24-hour value (HH:MM, or HH:MM:SS with showSeconds), also submitted by the form: once when OK commits a different time. */
16
24
  change: (event: TimePickerValueEvent) => void;
25
+ /** The committed value and draft as the dial, fields or AM/PM change. */
17
26
  input: (event: TimePickerInputEvent) => void;
27
+ /** The confirmed 24-hour value, matching getValue() and the submitted form value. */
18
28
  confirm: (event: TimePickerValueEvent) => void;
19
29
  open: () => void;
20
30
  close: () => void;
21
31
  cancel: () => void;
32
+ /** Root events; the dialog is inside the root, so its clicks and keys reach these too. */
22
33
  click: (payload: ForwardedEventPayload<MouseEvent, HTMLElement>) => void;
23
34
  keydown: (payload: ForwardedEventPayload<KeyboardEvent, HTMLElement>) => void;
24
35
  tap: (payload: TimePickerTapPayload) => void;
25
36
  swipe: (payload: TimePickerSwipePayload) => void;
26
37
  }
38
+ /** Time picker display type */
27
39
  export declare enum TIME_PICKER_TYPE {
40
+ /** Clock dial-based time picker */
28
41
  DIAL = "dial",
42
+ /** Text input-based time picker */
29
43
  INPUT = "input"
30
44
  }
45
+ /** Time picker orientation */
31
46
  export declare enum TIME_PICKER_ORIENTATION {
47
+ /** Vertical layout (default on mobile) */
32
48
  VERTICAL = "vertical",
49
+ /** Horizontal layout */
33
50
  HORIZONTAL = "horizontal"
34
51
  }
52
+ /** Time format (12-hour or 24-hour) */
35
53
  export declare enum TIME_FORMAT {
54
+ /** 12-hour format with AM/PM */
36
55
  AMPM = "12h",
56
+ /** 24-hour format */
37
57
  MILITARY = "24h"
38
58
  }
59
+ /** A time format as the enum or its string value, `'12h'` or `'24h'` */
39
60
  export type TimeFormat = TIME_FORMAT | `${TIME_FORMAT}`;
61
+ /** A time picker type as the enum or its string value, `'dial'` or `'input'` */
40
62
  export type TimePickerType = TIME_PICKER_TYPE | `${TIME_PICKER_TYPE}`;
63
+ /** An orientation as the enum or its string value, `'vertical'` or `'horizontal'` */
41
64
  export type TimePickerOrientation = TIME_PICKER_ORIENTATION | `${TIME_PICKER_ORIENTATION}`;
65
+ /** Period of day for 12-hour format */
42
66
  export declare enum TIME_PERIOD {
67
+ /** Morning */
43
68
  AM = "AM",
69
+ /** Afternoon/Evening */
44
70
  PM = "PM"
45
71
  }
72
+ /** Configuration interface for the TimePicker component */
46
73
  export interface TimePickerConfig {
74
+ /** Initial time value in 24-hour format (HH:MM) */
47
75
  value?: string;
76
+ /** Form field name. */
48
77
  name?: string;
78
+ /**
79
+ * Type of time picker to display
80
+ * @default TIME_PICKER_TYPE.DIAL
81
+ */
49
82
  type?: TimePickerType;
83
+ /**
84
+ * Time format to use (12h or 24h)
85
+ * @default TIME_FORMAT.AMPM
86
+ */
50
87
  format?: TimeFormat;
88
+ /**
89
+ * Layout orientation for the time picker
90
+ * @default TIME_PICKER_ORIENTATION.VERTICAL
91
+ */
51
92
  orientation?: TimePickerOrientation;
93
+ /** Title text for the time picker */
52
94
  title?: string;
95
+ /**
96
+ * Whether to show seconds selector
97
+ * @default false
98
+ */
53
99
  showSeconds?: boolean;
100
+ /** Additional CSS classes to add to the time picker */
54
101
  class?: string;
102
+ /**
103
+ * Component prefix for class names
104
+ * @default 'mtrl'
105
+ */
55
106
  prefix?: string;
107
+ /** Component name used in class generation */
56
108
  componentName?: string;
109
+ /** Earliest selectable time, 24-hour `HH:MM` or `HH:MM:SS`. */
57
110
  minTime?: string;
111
+ /** Latest selectable time, 24-hour `HH:MM` or `HH:MM:SS`; as `minTime`, at the other end. */
58
112
  maxTime?: string;
113
+ /**
114
+ * Minute step: dial minutes off it are disabled, a pointer between them picks the nearest, and a typed minute rounds to it when committed.
115
+ * @default 1
116
+ */
59
117
  minuteStep?: number;
118
+ /**
119
+ * Second step, as `minuteStep`, when seconds are shown.
120
+ * @default 1
121
+ */
60
122
  secondStep?: number;
123
+ /**
124
+ * Custom text for cancel button
125
+ * @default 'Cancel'
126
+ */
61
127
  cancelText?: string;
128
+ /**
129
+ * Custom text for confirm button
130
+ * @default 'OK'
131
+ */
62
132
  confirmText?: string;
133
+ /**
134
+ * Whether the time picker is open when the factory returns: `isOpen()` is true and `open` has been emitted (to `onOpen`).
135
+ * @default false
136
+ */
63
137
  open?: boolean;
138
+ /**
139
+ * Whether the picker is disabled: it does not open
140
+ * @default false
141
+ */
64
142
  disabled?: boolean;
143
+ /**
144
+ * Where the dialog is appended.
145
+ * @default the component's element
146
+ */
65
147
  container?: string | HTMLElement;
148
+ /** Custom icon for the clock button */
66
149
  clockIcon?: string;
150
+ /** Custom icon for the keyboard button */
67
151
  keyboardIcon?: string;
152
+ /** `change` listener registered at creation. */
68
153
  onChange?: TimePickerEvents["change"];
154
+ /** `input` listener registered at creation, as the draft changes while the picker is open. */
69
155
  onInput?: TimePickerEvents["input"];
156
+ /** `open` listener registered at creation. */
70
157
  onOpen?: TimePickerEvents["open"];
158
+ /** `close` listener registered at creation. */
71
159
  onClose?: TimePickerEvents["close"];
160
+ /** `confirm` listener registered at creation. */
72
161
  onConfirm?: TimePickerEvents["confirm"];
162
+ /** `cancel` listener registered at creation. */
73
163
  onCancel?: TimePickerEvents["cancel"];
74
164
  }
165
+ /** Configuration as it leaves `createBaseConfig`. */
75
166
  export type ResolvedTimePickerConfig = TimePickerConfig & Required<Pick<TimePickerConfig, "type" | "format" | "orientation" | "showSeconds" | "minuteStep" | "secondStep" | "cancelText" | "confirmText" | "open" | "clockIcon" | "keyboardIcon" | "prefix">> & {
167
+ /** The dialog title's id, unique per picker. */
76
168
  titleId?: string;
77
169
  };
170
+ /** Time value object */
78
171
  export interface TimeValue {
172
+ /** Hours (0-23) */
79
173
  hours: number;
174
+ /** Minutes (0-59) */
80
175
  minutes: number;
176
+ /** Seconds (0-59), optional */
81
177
  seconds?: number;
178
+ /** AM/PM for 12-hour format */
82
179
  period?: TIME_PERIOD;
83
180
  }
181
+ /** TimePicker component interface */
84
182
  export interface TimePickerComponent {
183
+ /** The time picker's container DOM element */
85
184
  element: HTMLElement;
185
+ /** Modal container element */
86
186
  modalElement: HTMLElement;
187
+ /** Dialog container element */
87
188
  dialogElement: HTMLElement;
189
+ /** Whether the time picker is currently open */
88
190
  isOpen: () => boolean;
191
+ /** Opens the time picker. */
89
192
  open: () => TimePickerComponent;
193
+ /** Closes the time picker */
90
194
  close: () => TimePickerComponent;
195
+ /** Toggles the time picker open/closed state */
91
196
  toggle: () => TimePickerComponent;
197
+ /** Gets the current time value */
92
198
  getValue: () => string;
199
+ /** Gets the current time as a TimeValue object */
93
200
  getTimeObject: () => TimeValue;
201
+ /**
202
+ * Sets the time value.
203
+ * @param time
204
+ */
94
205
  setValue: (time: string) => TimePickerComponent;
206
+ /**
207
+ * Sets the time picker type (dial or input)
208
+ * @param type
209
+ */
95
210
  setType: (type: TimePickerType) => TimePickerComponent;
211
+ /** Gets the current time picker type */
96
212
  getType: () => TIME_PICKER_TYPE;
213
+ /**
214
+ * Sets the time format (12h or 24h)
215
+ * @param format
216
+ */
97
217
  setFormat: (format: TimeFormat) => TimePickerComponent;
218
+ /** Gets the current time format */
98
219
  getFormat: () => TIME_FORMAT;
220
+ /**
221
+ * Sets the time picker orientation
222
+ * @param orientation
223
+ */
99
224
  setOrientation: (orientation: TimePickerOrientation) => TimePickerComponent;
225
+ /** Gets the current time picker orientation */
100
226
  getOrientation: () => TIME_PICKER_ORIENTATION;
227
+ /**
228
+ * Sets the time picker title
229
+ * @param title
230
+ */
101
231
  setTitle: (title: string) => TimePickerComponent;
232
+ /** Gets the current time picker title */
102
233
  getTitle: () => string;
234
+ /** Enables the picker */
103
235
  enable: () => TimePickerComponent;
236
+ /** Disables the picker: it does not open, and an open one is cancelled */
104
237
  disable: () => TimePickerComponent;
238
+ /** Whether the picker is disabled */
105
239
  isDisabled: () => boolean;
240
+ /** Destroys the time picker component and cleans up resources */
106
241
  destroy: () => void;
242
+ /**
243
+ * Adds an event listener to the time picker
244
+ * @param event
245
+ * @param handler
246
+ */
107
247
  on: <K extends keyof TimePickerEvents>(event: K, handler: TimePickerEvents[K]) => TimePickerComponent;
248
+ /**
249
+ * Removes an event listener from the time picker
250
+ * @param event
251
+ * @param handler
252
+ */
108
253
  off: <K extends keyof TimePickerEvents>(event: K, handler: TimePickerEvents[K]) => TimePickerComponent;
109
254
  }