@francofantomius/material-components 1.1.1 → 1.2.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 (380) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +2 -1
  3. package/custom-elements.json +1049 -300
  4. package/dist/chunks/{account-menu-Dau0UHTl.js → account-menu-Bo7NghIm.js} +181 -223
  5. package/dist/chunks/{account-menu-Dau0UHTl.js.map → account-menu-Bo7NghIm.js.map} +1 -1
  6. package/dist/chunks/app-drawer-DjKSuatE.js +855 -0
  7. package/dist/chunks/{app-drawer-Du1ePzxZ.js.map → app-drawer-DjKSuatE.js.map} +1 -1
  8. package/dist/chunks/{badge-G4EjcMoy.js → badge-sZzNelZz.js} +30 -34
  9. package/dist/chunks/{badge-G4EjcMoy.js.map → badge-sZzNelZz.js.map} +1 -1
  10. package/dist/chunks/{bottom-sheet-q79BBYAj.js → bottom-sheet-BGgbUmKd.js} +98 -109
  11. package/dist/chunks/{bottom-sheet-q79BBYAj.js.map → bottom-sheet-BGgbUmKd.js.map} +1 -1
  12. package/dist/chunks/{button-D2vn7kJ8.js → button-DeQQlYds.js} +62 -72
  13. package/dist/chunks/{button-D2vn7kJ8.js.map → button-DeQQlYds.js.map} +1 -1
  14. package/dist/chunks/button-group-R2jN8FXK.js +136 -0
  15. package/dist/chunks/{button-group-CNqvJx1n.js.map → button-group-R2jN8FXK.js.map} +1 -1
  16. package/dist/chunks/{card-DVffdPpv.js → card-CVhWizDF.js} +45 -50
  17. package/dist/chunks/{card-DVffdPpv.js.map → card-CVhWizDF.js.map} +1 -1
  18. package/dist/chunks/{carousel-item-BG6kjjjk.js → carousel-item-DNp2zhP9.js} +62 -73
  19. package/dist/chunks/{carousel-item-BG6kjjjk.js.map → carousel-item-DNp2zhP9.js.map} +1 -1
  20. package/dist/chunks/{checkbox-BqlboAHd.js → checkbox-CsqUHVOF.js} +59 -64
  21. package/dist/chunks/{checkbox-BqlboAHd.js.map → checkbox-CsqUHVOF.js.map} +1 -1
  22. package/dist/chunks/{chip-CI1ZINnr.js → chip-B5c-I8bj.js} +56 -63
  23. package/dist/chunks/{chip-CI1ZINnr.js.map → chip-B5c-I8bj.js.map} +1 -1
  24. package/dist/chunks/code-CM6hIZNx.js +1531 -0
  25. package/dist/chunks/{code-C5UFBkCh.js.map → code-CM6hIZNx.js.map} +1 -1
  26. package/dist/chunks/date-picker-B15_rR0f.js +774 -0
  27. package/dist/chunks/date-picker-B15_rR0f.js.map +1 -0
  28. package/dist/chunks/decorate-DknOJ8FJ.js +40 -0
  29. package/dist/chunks/{decorate-DXuynaiA.js.map → decorate-DknOJ8FJ.js.map} +1 -1
  30. package/dist/chunks/{dialog-DGVEE5m_.js → dialog-Czknf8dl.js} +47 -52
  31. package/dist/chunks/{dialog-DGVEE5m_.js.map → dialog-Czknf8dl.js.map} +1 -1
  32. package/dist/chunks/divider-DIyCOosa.js +78 -0
  33. package/dist/chunks/{divider-DNepwoZv.js.map → divider-DIyCOosa.js.map} +1 -1
  34. package/dist/chunks/{fab-C9j3WBHE.js → fab-aZC0-lHo.js} +38 -44
  35. package/dist/chunks/{fab-C9j3WBHE.js.map → fab-aZC0-lHo.js.map} +1 -1
  36. package/dist/chunks/{fab-menu.css-3pu930sZ.js → fab-menu.css-BdVg1k4c.js} +5 -6
  37. package/dist/chunks/{fab-menu.css-3pu930sZ.js.map → fab-menu.css-BdVg1k4c.js.map} +1 -1
  38. package/dist/chunks/focus-ring-K6SY_mIm.js +69 -0
  39. package/dist/chunks/{focus-ring-CuiJuM-y.js.map → focus-ring-K6SY_mIm.js.map} +1 -1
  40. package/dist/chunks/form-associated-Do5uXckv.js +69 -0
  41. package/dist/chunks/{form-associated-Cty_ZaS9.js.map → form-associated-Do5uXckv.js.map} +1 -1
  42. package/dist/chunks/icon-FvKeXi61.js +59 -0
  43. package/dist/chunks/{icon-DrNqcNEL.js.map → icon-FvKeXi61.js.map} +1 -1
  44. package/dist/chunks/{icon-button-BQz73GLa.js → icon-button-CulnCZpZ.js} +58 -67
  45. package/dist/chunks/{icon-button-BQz73GLa.js.map → icon-button-CulnCZpZ.js.map} +1 -1
  46. package/dist/chunks/{list-D8olR7oZ.js → list-D7yrbJRL.js} +64 -72
  47. package/dist/chunks/{list-D8olR7oZ.js.map → list-D7yrbJRL.js.map} +1 -1
  48. package/dist/chunks/{loading-indicator-CvWnZr9o.js → loading-indicator-D9AyxNQh.js} +41 -46
  49. package/dist/chunks/{loading-indicator-CvWnZr9o.js.map → loading-indicator-D9AyxNQh.js.map} +1 -1
  50. package/dist/chunks/{menu-item-BBSp5Cqc.js → menu-item-C3entPo7.js} +77 -91
  51. package/dist/chunks/{menu-item-BBSp5Cqc.js.map → menu-item-C3entPo7.js.map} +1 -1
  52. package/dist/chunks/{navigation-bar-item-C9DfOEzg.js → navigation-bar-item-CWHCQeNw.js} +98 -115
  53. package/dist/chunks/{navigation-bar-item-C9DfOEzg.js.map → navigation-bar-item-CWHCQeNw.js.map} +1 -1
  54. package/dist/chunks/{navigation-drawer-CKl44Ef5.js → navigation-drawer-pGer0t4z.js} +116 -138
  55. package/dist/chunks/{navigation-drawer-CKl44Ef5.js.map → navigation-drawer-pGer0t4z.js.map} +1 -1
  56. package/dist/chunks/{navigation-rail-item-6pdhNHJK.js → navigation-rail-item-CWvGjLjC.js} +70 -86
  57. package/dist/chunks/{navigation-rail-item-6pdhNHJK.js.map → navigation-rail-item-CWvGjLjC.js.map} +1 -1
  58. package/dist/chunks/{player-C4ydiIpr.js → player-dT08kxeG.js} +423 -466
  59. package/dist/chunks/{player-C4ydiIpr.js.map → player-dT08kxeG.js.map} +1 -1
  60. package/dist/chunks/{progress-LQmLMDjX.js → progress-etZuX_VD.js} +46 -53
  61. package/dist/chunks/{progress-LQmLMDjX.js.map → progress-etZuX_VD.js.map} +1 -1
  62. package/dist/chunks/radio-jPCwykIa.js +197 -0
  63. package/dist/chunks/{radio-Bily78NT.js.map → radio-jPCwykIa.js.map} +1 -1
  64. package/dist/chunks/ripple-CBOKeVfm.js +132 -0
  65. package/dist/chunks/{ripple-squbKHhj.js.map → ripple-CBOKeVfm.js.map} +1 -1
  66. package/dist/chunks/{search-bar-fUD0qU2P.js → search-bar-B6xxVT7u.js} +244 -203
  67. package/dist/chunks/search-bar-B6xxVT7u.js.map +1 -0
  68. package/dist/chunks/segmented-button-Fon9kOHV.js +253 -0
  69. package/dist/chunks/{segmented-button-B0BvGSQ7.js.map → segmented-button-Fon9kOHV.js.map} +1 -1
  70. package/dist/chunks/{side-sheet-S2w081AK.js → side-sheet-sQ8qGKVm.js} +73 -81
  71. package/dist/chunks/{side-sheet-S2w081AK.js.map → side-sheet-sQ8qGKVm.js.map} +1 -1
  72. package/dist/chunks/slider-OIyEcUU9.js +448 -0
  73. package/dist/chunks/slider-OIyEcUU9.js.map +1 -0
  74. package/dist/chunks/{snackbar-Wsz3BzEY.js → snackbar-Yi6fF9vM.js} +57 -62
  75. package/dist/chunks/{snackbar-Wsz3BzEY.js.map → snackbar-Yi6fF9vM.js.map} +1 -1
  76. package/dist/chunks/{split-button-DUfjukQY.js → split-button-CLjVJe3I.js} +155 -172
  77. package/dist/chunks/{split-button-DUfjukQY.js.map → split-button-CLjVJe3I.js.map} +1 -1
  78. package/dist/chunks/{switch-DdukrvXb.js → switch-mtu6AVEh.js} +54 -57
  79. package/dist/chunks/{switch-DdukrvXb.js.map → switch-mtu6AVEh.js.map} +1 -1
  80. package/dist/chunks/table-C5rCvdFc.js +724 -0
  81. package/dist/chunks/{table-CqHnneAj.js.map → table-C5rCvdFc.js.map} +1 -1
  82. package/dist/chunks/tabs-C0mtURlT.js +182 -0
  83. package/dist/chunks/{tabs-BfOtoeir.js.map → tabs-C0mtURlT.js.map} +1 -1
  84. package/dist/chunks/{text-field-hN6-2HQy.js → text-field-MifFD7uk.js} +92 -110
  85. package/dist/chunks/{text-field-hN6-2HQy.js.map → text-field-MifFD7uk.js.map} +1 -1
  86. package/dist/chunks/time-picker-JTcLcJuz.js +810 -0
  87. package/dist/chunks/time-picker-JTcLcJuz.js.map +1 -0
  88. package/dist/chunks/{toolbar-DXVQbQKJ.js → toolbar-CsxKc2Yd.js} +48 -55
  89. package/dist/chunks/{toolbar-DXVQbQKJ.js.map → toolbar-CsxKc2Yd.js.map} +1 -1
  90. package/dist/chunks/tooltip-Ds3lNowS.js +380 -0
  91. package/dist/chunks/{tooltip-CE7JMHMu.js.map → tooltip-Ds3lNowS.js.map} +1 -1
  92. package/dist/chunks/{top-app-bar-Dgbp6CFv.js → top-app-bar-TrnjKzOX.js} +52 -53
  93. package/dist/chunks/top-app-bar-TrnjKzOX.js.map +1 -0
  94. package/dist/components/account-menu/account-menu.js +2 -8
  95. package/dist/components/app-drawer/app-drawer.js +2 -9
  96. package/dist/components/badge/badge.js +2 -4
  97. package/dist/components/bottom-sheet/bottom-sheet.js +2 -4
  98. package/dist/components/button/button.js +2 -4
  99. package/dist/components/button-group/button-group.js +2 -4
  100. package/dist/components/card/card.js +2 -4
  101. package/dist/components/carousel/carousel-item.js +2 -4
  102. package/dist/components/carousel/carousel.js +214 -232
  103. package/dist/components/carousel/carousel.js.map +1 -1
  104. package/dist/components/checkbox/checkbox.js +2 -4
  105. package/dist/components/chip/chip.js +2 -5
  106. package/dist/components/code/code.js +2 -5
  107. package/dist/components/date-picker/date-picker.js +2 -4
  108. package/dist/components/dialog/dialog.js +2 -4
  109. package/dist/components/divider/divider.js +2 -4
  110. package/dist/components/fab/fab.js +2 -4
  111. package/dist/components/fab-menu/fab-menu-item.js +53 -61
  112. package/dist/components/fab-menu/fab-menu-item.js.map +1 -1
  113. package/dist/components/fab-menu/fab-menu.js +98 -111
  114. package/dist/components/fab-menu/fab-menu.js.map +1 -1
  115. package/dist/components/icon/icon.js +2 -4
  116. package/dist/components/icon-button/icon-button.js +2 -4
  117. package/dist/components/list/list.js +2 -5
  118. package/dist/components/loading-indicator/loading-indicator.js +2 -4
  119. package/dist/components/menu/menu-item.js +2 -4
  120. package/dist/components/menu/menu.js +165 -183
  121. package/dist/components/menu/menu.js.map +1 -1
  122. package/dist/components/navigation-bar/navigation-bar-item.js +2 -5
  123. package/dist/components/navigation-bar/navigation-bar.js +131 -143
  124. package/dist/components/navigation-bar/navigation-bar.js.map +1 -1
  125. package/dist/components/navigation-drawer/navigation-drawer.js +2 -8
  126. package/dist/components/navigation-rail/navigation-rail-item.js +2 -5
  127. package/dist/components/navigation-rail/navigation-rail.js +92 -102
  128. package/dist/components/navigation-rail/navigation-rail.js.map +1 -1
  129. package/dist/components/player/player.js +2 -7
  130. package/dist/components/progress/progress.js +2 -5
  131. package/dist/components/radio/radio.js +2 -5
  132. package/dist/components/search-bar/search-bar.js +2 -5
  133. package/dist/components/segmented-button/segmented-button.js +2 -5
  134. package/dist/components/side-sheet/side-sheet.js +2 -4
  135. package/dist/components/slider/slider.js +2 -4
  136. package/dist/components/snackbar/snackbar.js +2 -4
  137. package/dist/components/split-button/split-button.js +2 -4
  138. package/dist/components/switch/switch.js +2 -4
  139. package/dist/components/table/table.js +2 -13
  140. package/dist/components/tabs/tabs.js +2 -5
  141. package/dist/components/text-field/text-field.js +2 -4
  142. package/dist/components/time-picker/time-picker.js +2 -4
  143. package/dist/components/toolbar/toolbar.js +2 -4
  144. package/dist/components/tooltip/tooltip.js +2 -4
  145. package/dist/components/top-app-bar/top-app-bar.js +2 -5
  146. package/dist/index.js +52 -150
  147. package/dist/internal/focus-ring/focus-ring.js +2 -4
  148. package/dist/internal/ripple/ripple.js +2 -4
  149. package/dist/tokens/index.js +468 -314
  150. package/dist/tokens/index.js.map +1 -1
  151. package/llms.txt +74 -8
  152. package/package.json +2 -14
  153. package/dist/chunks/app-drawer-Du1ePzxZ.js +0 -903
  154. package/dist/chunks/button-group-CNqvJx1n.js +0 -143
  155. package/dist/chunks/code-C5UFBkCh.js +0 -1830
  156. package/dist/chunks/date-picker-DJeHi4w-.js +0 -777
  157. package/dist/chunks/date-picker-DJeHi4w-.js.map +0 -1
  158. package/dist/chunks/decorate-DXuynaiA.js +0 -39
  159. package/dist/chunks/divider-DNepwoZv.js +0 -82
  160. package/dist/chunks/focus-ring-CuiJuM-y.js +0 -71
  161. package/dist/chunks/form-associated-Cty_ZaS9.js +0 -73
  162. package/dist/chunks/icon-DrNqcNEL.js +0 -62
  163. package/dist/chunks/radio-Bily78NT.js +0 -205
  164. package/dist/chunks/ripple-squbKHhj.js +0 -135
  165. package/dist/chunks/search-bar-fUD0qU2P.js.map +0 -1
  166. package/dist/chunks/segmented-button-B0BvGSQ7.js +0 -265
  167. package/dist/chunks/slider-D-mnO8yQ.js +0 -450
  168. package/dist/chunks/slider-D-mnO8yQ.js.map +0 -1
  169. package/dist/chunks/table-CqHnneAj.js +0 -773
  170. package/dist/chunks/tabs-BfOtoeir.js +0 -191
  171. package/dist/chunks/time-picker-CZnb2sWz.js +0 -785
  172. package/dist/chunks/time-picker-CZnb2sWz.js.map +0 -1
  173. package/dist/chunks/tooltip-CE7JMHMu.js +0 -398
  174. package/dist/chunks/top-app-bar-Dgbp6CFv.js.map +0 -1
  175. package/dist/components/account-menu/account-menu.css.d.ts +0 -3
  176. package/dist/components/account-menu/account-menu.css.d.ts.map +0 -1
  177. package/dist/components/account-menu/account-menu.d.ts +0 -111
  178. package/dist/components/account-menu/account-menu.d.ts.map +0 -1
  179. package/dist/components/app-drawer/app-drawer.css.d.ts +0 -3
  180. package/dist/components/app-drawer/app-drawer.css.d.ts.map +0 -1
  181. package/dist/components/app-drawer/app-drawer.d.ts +0 -173
  182. package/dist/components/app-drawer/app-drawer.d.ts.map +0 -1
  183. package/dist/components/badge/badge.css.d.ts +0 -2
  184. package/dist/components/badge/badge.css.d.ts.map +0 -1
  185. package/dist/components/badge/badge.d.ts +0 -16
  186. package/dist/components/badge/badge.d.ts.map +0 -1
  187. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts +0 -2
  188. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts.map +0 -1
  189. package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -69
  190. package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +0 -1
  191. package/dist/components/button/button.css.d.ts +0 -2
  192. package/dist/components/button/button.css.d.ts.map +0 -1
  193. package/dist/components/button/button.d.ts +0 -25
  194. package/dist/components/button/button.d.ts.map +0 -1
  195. package/dist/components/button-group/button-group.css.d.ts +0 -2
  196. package/dist/components/button-group/button-group.css.d.ts.map +0 -1
  197. package/dist/components/button-group/button-group.d.ts +0 -28
  198. package/dist/components/button-group/button-group.d.ts.map +0 -1
  199. package/dist/components/card/card.css.d.ts +0 -2
  200. package/dist/components/card/card.css.d.ts.map +0 -1
  201. package/dist/components/card/card.d.ts +0 -18
  202. package/dist/components/card/card.d.ts.map +0 -1
  203. package/dist/components/carousel/carousel-item.d.ts +0 -33
  204. package/dist/components/carousel/carousel-item.d.ts.map +0 -1
  205. package/dist/components/carousel/carousel.css.d.ts +0 -3
  206. package/dist/components/carousel/carousel.css.d.ts.map +0 -1
  207. package/dist/components/carousel/carousel.d.ts +0 -81
  208. package/dist/components/carousel/carousel.d.ts.map +0 -1
  209. package/dist/components/checkbox/checkbox.css.d.ts +0 -2
  210. package/dist/components/checkbox/checkbox.css.d.ts.map +0 -1
  211. package/dist/components/checkbox/checkbox.d.ts +0 -24
  212. package/dist/components/checkbox/checkbox.d.ts.map +0 -1
  213. package/dist/components/chip/chip.css.d.ts +0 -3
  214. package/dist/components/chip/chip.css.d.ts.map +0 -1
  215. package/dist/components/chip/chip.d.ts +0 -27
  216. package/dist/components/chip/chip.d.ts.map +0 -1
  217. package/dist/components/code/code.css.d.ts +0 -2
  218. package/dist/components/code/code.css.d.ts.map +0 -1
  219. package/dist/components/code/code.d.ts +0 -106
  220. package/dist/components/code/code.d.ts.map +0 -1
  221. package/dist/components/code/highlighter.d.ts +0 -8
  222. package/dist/components/code/highlighter.d.ts.map +0 -1
  223. package/dist/components/code/linter.d.ts +0 -44
  224. package/dist/components/code/linter.d.ts.map +0 -1
  225. package/dist/components/date-picker/date-picker.css.d.ts +0 -2
  226. package/dist/components/date-picker/date-picker.css.d.ts.map +0 -1
  227. package/dist/components/date-picker/date-picker.d.ts +0 -59
  228. package/dist/components/date-picker/date-picker.d.ts.map +0 -1
  229. package/dist/components/dialog/dialog.css.d.ts +0 -2
  230. package/dist/components/dialog/dialog.css.d.ts.map +0 -1
  231. package/dist/components/dialog/dialog.d.ts +0 -22
  232. package/dist/components/dialog/dialog.d.ts.map +0 -1
  233. package/dist/components/divider/divider.css.d.ts +0 -2
  234. package/dist/components/divider/divider.css.d.ts.map +0 -1
  235. package/dist/components/divider/divider.d.ts +0 -16
  236. package/dist/components/divider/divider.d.ts.map +0 -1
  237. package/dist/components/fab/fab.css.d.ts +0 -2
  238. package/dist/components/fab/fab.css.d.ts.map +0 -1
  239. package/dist/components/fab/fab.d.ts +0 -19
  240. package/dist/components/fab/fab.d.ts.map +0 -1
  241. package/dist/components/fab-menu/fab-menu-item.d.ts +0 -35
  242. package/dist/components/fab-menu/fab-menu-item.d.ts.map +0 -1
  243. package/dist/components/fab-menu/fab-menu.css.d.ts +0 -3
  244. package/dist/components/fab-menu/fab-menu.css.d.ts.map +0 -1
  245. package/dist/components/fab-menu/fab-menu.d.ts +0 -72
  246. package/dist/components/fab-menu/fab-menu.d.ts.map +0 -1
  247. package/dist/components/icon/icon.css.d.ts +0 -2
  248. package/dist/components/icon/icon.css.d.ts.map +0 -1
  249. package/dist/components/icon/icon.d.ts +0 -15
  250. package/dist/components/icon/icon.d.ts.map +0 -1
  251. package/dist/components/icon-button/icon-button.css.d.ts +0 -2
  252. package/dist/components/icon-button/icon-button.css.d.ts.map +0 -1
  253. package/dist/components/icon-button/icon-button.d.ts +0 -22
  254. package/dist/components/icon-button/icon-button.d.ts.map +0 -1
  255. package/dist/components/list/list.css.d.ts +0 -3
  256. package/dist/components/list/list.css.d.ts.map +0 -1
  257. package/dist/components/list/list.d.ts +0 -25
  258. package/dist/components/list/list.d.ts.map +0 -1
  259. package/dist/components/loading-indicator/loading-indicator.css.d.ts +0 -2
  260. package/dist/components/loading-indicator/loading-indicator.css.d.ts.map +0 -1
  261. package/dist/components/loading-indicator/loading-indicator.d.ts +0 -48
  262. package/dist/components/loading-indicator/loading-indicator.d.ts.map +0 -1
  263. package/dist/components/menu/menu-item.d.ts +0 -41
  264. package/dist/components/menu/menu-item.d.ts.map +0 -1
  265. package/dist/components/menu/menu.css.d.ts +0 -3
  266. package/dist/components/menu/menu.css.d.ts.map +0 -1
  267. package/dist/components/menu/menu.d.ts +0 -91
  268. package/dist/components/menu/menu.d.ts.map +0 -1
  269. package/dist/components/navigation-bar/navigation-bar-item.d.ts +0 -49
  270. package/dist/components/navigation-bar/navigation-bar-item.d.ts.map +0 -1
  271. package/dist/components/navigation-bar/navigation-bar.css.d.ts +0 -3
  272. package/dist/components/navigation-bar/navigation-bar.css.d.ts.map +0 -1
  273. package/dist/components/navigation-bar/navigation-bar.d.ts +0 -50
  274. package/dist/components/navigation-bar/navigation-bar.d.ts.map +0 -1
  275. package/dist/components/navigation-drawer/navigation-drawer.css.d.ts +0 -3
  276. package/dist/components/navigation-drawer/navigation-drawer.css.d.ts.map +0 -1
  277. package/dist/components/navigation-drawer/navigation-drawer.d.ts +0 -76
  278. package/dist/components/navigation-drawer/navigation-drawer.d.ts.map +0 -1
  279. package/dist/components/navigation-rail/navigation-rail-item.d.ts +0 -36
  280. package/dist/components/navigation-rail/navigation-rail-item.d.ts.map +0 -1
  281. package/dist/components/navigation-rail/navigation-rail.css.d.ts +0 -3
  282. package/dist/components/navigation-rail/navigation-rail.css.d.ts.map +0 -1
  283. package/dist/components/navigation-rail/navigation-rail.d.ts +0 -43
  284. package/dist/components/navigation-rail/navigation-rail.d.ts.map +0 -1
  285. package/dist/components/player/player.css.d.ts +0 -2
  286. package/dist/components/player/player.css.d.ts.map +0 -1
  287. package/dist/components/player/player.d.ts +0 -99
  288. package/dist/components/player/player.d.ts.map +0 -1
  289. package/dist/components/progress/progress.css.d.ts +0 -2
  290. package/dist/components/progress/progress.css.d.ts.map +0 -1
  291. package/dist/components/progress/progress.d.ts +0 -21
  292. package/dist/components/progress/progress.d.ts.map +0 -1
  293. package/dist/components/radio/radio.css.d.ts +0 -3
  294. package/dist/components/radio/radio.css.d.ts.map +0 -1
  295. package/dist/components/radio/radio.d.ts +0 -38
  296. package/dist/components/radio/radio.d.ts.map +0 -1
  297. package/dist/components/search-bar/search-bar.css.d.ts +0 -2
  298. package/dist/components/search-bar/search-bar.css.d.ts.map +0 -1
  299. package/dist/components/search-bar/search-bar.d.ts +0 -81
  300. package/dist/components/search-bar/search-bar.d.ts.map +0 -1
  301. package/dist/components/segmented-button/segmented-button.css.d.ts +0 -3
  302. package/dist/components/segmented-button/segmented-button.css.d.ts.map +0 -1
  303. package/dist/components/segmented-button/segmented-button.d.ts +0 -40
  304. package/dist/components/segmented-button/segmented-button.d.ts.map +0 -1
  305. package/dist/components/side-sheet/side-sheet.css.d.ts +0 -2
  306. package/dist/components/side-sheet/side-sheet.css.d.ts.map +0 -1
  307. package/dist/components/side-sheet/side-sheet.d.ts +0 -57
  308. package/dist/components/side-sheet/side-sheet.d.ts.map +0 -1
  309. package/dist/components/slider/slider.css.d.ts +0 -2
  310. package/dist/components/slider/slider.css.d.ts.map +0 -1
  311. package/dist/components/slider/slider.d.ts +0 -51
  312. package/dist/components/slider/slider.d.ts.map +0 -1
  313. package/dist/components/snackbar/snackbar.css.d.ts +0 -2
  314. package/dist/components/snackbar/snackbar.css.d.ts.map +0 -1
  315. package/dist/components/snackbar/snackbar.d.ts +0 -24
  316. package/dist/components/snackbar/snackbar.d.ts.map +0 -1
  317. package/dist/components/split-button/split-button.css.d.ts +0 -2
  318. package/dist/components/split-button/split-button.css.d.ts.map +0 -1
  319. package/dist/components/split-button/split-button.d.ts +0 -89
  320. package/dist/components/split-button/split-button.d.ts.map +0 -1
  321. package/dist/components/switch/switch.css.d.ts +0 -2
  322. package/dist/components/switch/switch.css.d.ts.map +0 -1
  323. package/dist/components/switch/switch.d.ts +0 -22
  324. package/dist/components/switch/switch.d.ts.map +0 -1
  325. package/dist/components/table/table.css.d.ts +0 -8
  326. package/dist/components/table/table.css.d.ts.map +0 -1
  327. package/dist/components/table/table.d.ts +0 -158
  328. package/dist/components/table/table.d.ts.map +0 -1
  329. package/dist/components/tabs/tabs.css.d.ts +0 -3
  330. package/dist/components/tabs/tabs.css.d.ts.map +0 -1
  331. package/dist/components/tabs/tabs.d.ts +0 -33
  332. package/dist/components/tabs/tabs.d.ts.map +0 -1
  333. package/dist/components/text-field/text-field.css.d.ts +0 -2
  334. package/dist/components/text-field/text-field.css.d.ts.map +0 -1
  335. package/dist/components/text-field/text-field.d.ts +0 -40
  336. package/dist/components/text-field/text-field.d.ts.map +0 -1
  337. package/dist/components/time-picker/time-picker.css.d.ts +0 -2
  338. package/dist/components/time-picker/time-picker.css.d.ts.map +0 -1
  339. package/dist/components/time-picker/time-picker.d.ts +0 -87
  340. package/dist/components/time-picker/time-picker.d.ts.map +0 -1
  341. package/dist/components/toolbar/toolbar.css.d.ts +0 -2
  342. package/dist/components/toolbar/toolbar.css.d.ts.map +0 -1
  343. package/dist/components/toolbar/toolbar.d.ts +0 -53
  344. package/dist/components/toolbar/toolbar.d.ts.map +0 -1
  345. package/dist/components/tooltip/tooltip.css.d.ts +0 -2
  346. package/dist/components/tooltip/tooltip.css.d.ts.map +0 -1
  347. package/dist/components/tooltip/tooltip.d.ts +0 -89
  348. package/dist/components/tooltip/tooltip.d.ts.map +0 -1
  349. package/dist/components/top-app-bar/top-app-bar.css.d.ts +0 -2
  350. package/dist/components/top-app-bar/top-app-bar.css.d.ts.map +0 -1
  351. package/dist/components/top-app-bar/top-app-bar.d.ts +0 -29
  352. package/dist/components/top-app-bar/top-app-bar.d.ts.map +0 -1
  353. package/dist/index.d.ts +0 -52
  354. package/dist/index.d.ts.map +0 -1
  355. package/dist/internal/base-component.d.ts +0 -13
  356. package/dist/internal/base-component.d.ts.map +0 -1
  357. package/dist/internal/focus-ring/focus-ring.css.d.ts +0 -2
  358. package/dist/internal/focus-ring/focus-ring.css.d.ts.map +0 -1
  359. package/dist/internal/focus-ring/focus-ring.d.ts +0 -18
  360. package/dist/internal/focus-ring/focus-ring.d.ts.map +0 -1
  361. package/dist/internal/form-associated.d.ts +0 -26
  362. package/dist/internal/form-associated.d.ts.map +0 -1
  363. package/dist/internal/ripple/ripple.css.d.ts +0 -2
  364. package/dist/internal/ripple/ripple.css.d.ts.map +0 -1
  365. package/dist/internal/ripple/ripple.d.ts +0 -23
  366. package/dist/internal/ripple/ripple.d.ts.map +0 -1
  367. package/dist/tokens/colors.d.ts +0 -42
  368. package/dist/tokens/colors.d.ts.map +0 -1
  369. package/dist/tokens/elevation.d.ts +0 -9
  370. package/dist/tokens/elevation.d.ts.map +0 -1
  371. package/dist/tokens/index.d.ts +0 -7
  372. package/dist/tokens/index.d.ts.map +0 -1
  373. package/dist/tokens/motion.d.ts +0 -21
  374. package/dist/tokens/motion.d.ts.map +0 -1
  375. package/dist/tokens/shape.d.ts +0 -10
  376. package/dist/tokens/shape.d.ts.map +0 -1
  377. package/dist/tokens/theme.css.d.ts +0 -4
  378. package/dist/tokens/theme.css.d.ts.map +0 -1
  379. package/dist/tokens/typography.d.ts +0 -101
  380. package/dist/tokens/typography.d.ts.map +0 -1
@@ -1,777 +0,0 @@
1
- import { t as i } from "./decorate-DXuynaiA.js";
2
- import { t as $ } from "./form-associated-Cty_ZaS9.js";
3
- import "./ripple-squbKHhj.js";
4
- import "./focus-ring-CuiJuM-y.js";
5
- import "./icon-DrNqcNEL.js";
6
- import "./button-D2vn7kJ8.js";
7
- import "./icon-button-BQz73GLa.js";
8
- import { css as C, html as n, nothing as x } from "lit";
9
- import { customElement as T, property as s, query as A, state as y } from "lit/decorators.js";
10
- var z = C`
11
- :host {
12
- display: inline-block;
13
- font-family: var(--md-sys-typescale-font-family, Roboto, sans-serif);
14
- color: var(--md-sys-color-on-surface, #1D1B20);
15
- box-sizing: border-box;
16
- }
17
-
18
- :host([variant="modal"]) {
19
- display: contents;
20
- }
21
-
22
- *, *::before, *::after {
23
- box-sizing: border-box;
24
- }
25
-
26
- /* --- Picker Surface Container --- */
27
- .picker-surface {
28
- display: flex;
29
- flex-direction: column;
30
- width: 328px;
31
- background-color: var(--md-sys-color-surface-container-high, #ECE6F0);
32
- border-radius: var(--md-sys-shape-corner-extra-large, 28px);
33
- overflow: hidden;
34
- position: relative;
35
- box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0, 0, 0, 0.15));
36
- user-select: none;
37
- transition: box-shadow 200ms cubic-bezier(0.2, 0, 0, 1);
38
- }
39
-
40
- :host([variant="docked"]) .picker-surface {
41
- border: 1px solid var(--md-sys-color-outline-variant, #CAC4D0);
42
- box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0, 0, 0, 0.15));
43
- }
44
-
45
- :host([disabled]) {
46
- pointer-events: none;
47
- opacity: 0.38;
48
- }
49
-
50
- /* --- Header --- */
51
- .header {
52
- padding: 20px 24px 16px 24px;
53
- display: flex;
54
- flex-direction: column;
55
- gap: 8px;
56
- position: relative;
57
- }
58
-
59
- .header-top {
60
- display: flex;
61
- align-items: center;
62
- justify-content: space-between;
63
- }
64
-
65
- .subhead {
66
- font-size: var(--md-sys-typescale-label-medium-size, 12px);
67
- line-height: 16px;
68
- font-weight: 500;
69
- color: var(--md-sys-color-on-surface-variant, #49454F);
70
- letter-spacing: 0.5px;
71
- text-transform: uppercase;
72
- }
73
-
74
- .headline {
75
- font-size: var(--md-sys-typescale-headline-large-size, 28px);
76
- line-height: 36px;
77
- font-weight: 400;
78
- color: var(--md-sys-color-on-surface, #1D1B20);
79
- min-height: 36px;
80
- display: flex;
81
- align-items: center;
82
- word-break: break-word;
83
- }
84
-
85
- .headline.placeholder {
86
- color: var(--md-sys-color-on-surface-variant, #49454F);
87
- font-size: 24px;
88
- }
89
-
90
- .header-divider {
91
- height: 1px;
92
- background-color: var(--md-sys-color-outline-variant, #CAC4D0);
93
- margin: 0 16px;
94
- }
95
-
96
- /* --- Navigation Controls --- */
97
- .navigation {
98
- display: flex;
99
- align-items: center;
100
- justify-content: space-between;
101
- padding: 12px 16px 4px 16px;
102
- }
103
-
104
- .month-year-btn {
105
- display: inline-flex;
106
- align-items: center;
107
- gap: 4px;
108
- background: transparent;
109
- border: none;
110
- padding: 8px 12px;
111
- border-radius: var(--md-sys-shape-corner-full, 9999px);
112
- font-family: inherit;
113
- font-size: var(--md-sys-typescale-label-large-size, 14px);
114
- font-weight: 500;
115
- color: var(--md-sys-color-on-surface-variant, #49454F);
116
- cursor: pointer;
117
- transition: background-color 150ms ease, color 150ms ease;
118
- }
119
-
120
- .month-year-btn:hover {
121
- background-color: rgba(73, 69, 79, 0.08);
122
- color: var(--md-sys-color-on-surface, #1D1B20);
123
- }
124
-
125
- .month-year-btn .dropdown-icon {
126
- transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
127
- }
128
-
129
- .month-year-btn.open .dropdown-icon {
130
- transform: rotate(180deg);
131
- }
132
-
133
- .nav-arrows {
134
- display: flex;
135
- align-items: center;
136
- gap: 4px;
137
- }
138
-
139
- /* --- Calendar View --- */
140
- .calendar-content {
141
- padding: 0 12px 12px 12px;
142
- }
143
-
144
- .weekdays {
145
- display: grid;
146
- grid-template-columns: repeat(7, 1fr);
147
- text-align: center;
148
- padding: 8px 0;
149
- }
150
-
151
- .weekday {
152
- font-size: var(--md-sys-typescale-body-small-size, 12px);
153
- font-weight: 500;
154
- color: var(--md-sys-color-on-surface, #1D1B20);
155
- height: 24px;
156
- display: flex;
157
- align-items: center;
158
- justify-content: center;
159
- }
160
-
161
- .days-grid {
162
- display: grid;
163
- grid-template-columns: repeat(7, 1fr);
164
- row-gap: 4px;
165
- }
166
-
167
- .day-cell {
168
- position: relative;
169
- height: 40px;
170
- display: flex;
171
- align-items: center;
172
- justify-content: center;
173
- }
174
-
175
- /* Range Highlight Band */
176
- .range-band {
177
- position: absolute;
178
- top: 0;
179
- bottom: 0;
180
- left: 0;
181
- right: 0;
182
- background-color: var(--md-sys-color-primary-container, #EADDFF);
183
- z-index: 0;
184
- }
185
-
186
- .day-cell.range-start .range-band {
187
- left: 50%;
188
- }
189
-
190
- .day-cell.range-end .range-band {
191
- right: 50%;
192
- }
193
-
194
- .day-cell.range-start.range-end .range-band {
195
- display: none;
196
- }
197
-
198
- /* Day Button */
199
- .day-btn {
200
- position: relative;
201
- z-index: 1;
202
- width: 36px;
203
- height: 36px;
204
- border-radius: var(--md-sys-shape-corner-full, 50%);
205
- border: 1px solid transparent;
206
- background: transparent;
207
- color: var(--md-sys-color-on-surface, #1D1B20);
208
- font-family: inherit;
209
- font-size: var(--md-sys-typescale-body-medium-size, 14px);
210
- font-weight: 400;
211
- display: flex;
212
- align-items: center;
213
- justify-content: center;
214
- cursor: pointer;
215
- padding: 0;
216
- outline: none;
217
- transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
218
- }
219
-
220
- .day-btn:hover:not(.disabled):not(.selected):not(.range-start):not(.range-end) {
221
- background-color: rgba(103, 80, 164, 0.08);
222
- }
223
-
224
- /* Today state */
225
- .day-btn.today {
226
- border-color: var(--md-sys-color-primary, #6750A4);
227
- color: var(--md-sys-color-primary, #6750A4);
228
- font-weight: 500;
229
- }
230
-
231
- /* In range middle state */
232
- .day-cell.in-range .day-btn {
233
- color: var(--md-sys-color-on-primary-container, #21005D);
234
- background-color: transparent;
235
- }
236
-
237
- /* Selected / Range Start / Range End */
238
- .day-btn.selected,
239
- .day-btn.range-start,
240
- .day-btn.range-end {
241
- background-color: var(--md-sys-color-primary, #6750A4);
242
- color: var(--md-sys-color-on-primary, #FFFFFF);
243
- font-weight: 500;
244
- }
245
-
246
- .day-btn.disabled {
247
- color: var(--md-sys-color-on-surface, #1D1B20);
248
- opacity: 0.38;
249
- cursor: not-allowed;
250
- pointer-events: none;
251
- }
252
-
253
- /* --- Year Picker View --- */
254
- .year-picker-view {
255
- height: 280px;
256
- overflow-y: auto;
257
- display: grid;
258
- grid-template-columns: repeat(3, 1fr);
259
- gap: 8px;
260
- padding: 12px 16px;
261
- align-content: start;
262
- }
263
-
264
- .year-btn {
265
- background: transparent;
266
- border: 1px solid transparent;
267
- border-radius: var(--md-sys-shape-corner-full, 9999px);
268
- padding: 10px 0;
269
- font-family: inherit;
270
- font-size: var(--md-sys-typescale-label-large-size, 14px);
271
- color: var(--md-sys-color-on-surface, #1D1B20);
272
- cursor: pointer;
273
- text-align: center;
274
- transition: background-color 150ms ease, color 150ms ease;
275
- }
276
-
277
- .year-btn:hover:not(.selected) {
278
- background-color: rgba(103, 80, 164, 0.08);
279
- }
280
-
281
- .year-btn.selected {
282
- background-color: var(--md-sys-color-primary, #6750A4);
283
- color: var(--md-sys-color-on-primary, #FFFFFF);
284
- font-weight: 500;
285
- }
286
-
287
- .year-btn.current {
288
- border-color: var(--md-sys-color-primary, #6750A4);
289
- color: var(--md-sys-color-primary, #6750A4);
290
- }
291
-
292
- /* --- Actions Footer --- */
293
- .actions {
294
- display: flex;
295
- align-items: center;
296
- justify-content: flex-end;
297
- gap: 8px;
298
- padding: 8px 16px 16px 16px;
299
- }
300
-
301
- /* --- Supporting / Error Text --- */
302
- .supporting-text {
303
- padding: 4px 16px 0;
304
- font-size: var(--md-sys-typescale-body-small-size, 12px);
305
- line-height: 16px;
306
- color: var(--md-sys-color-on-surface-variant, #49454F);
307
- }
308
-
309
- :host([error]) .supporting-text {
310
- color: var(--md-sys-color-error, #B3261E);
311
- }
312
-
313
- /* --- Modal Scrim & Dialog Container --- */
314
- dialog {
315
- padding: 0;
316
- border: none;
317
- border-radius: var(--md-sys-shape-corner-extra-large, 28px);
318
- background: transparent;
319
- color: inherit;
320
- box-shadow: var(--md-sys-elevation-level3, 0px 1px 3px 0px rgba(0, 0, 0, 0.30));
321
- position: fixed;
322
- inset: 0;
323
- margin: auto;
324
- z-index: 1000;
325
- overflow: visible;
326
- }
327
-
328
- dialog::backdrop {
329
- background-color: rgba(0, 0, 0, 0.32);
330
- backdrop-filter: blur(2px);
331
- animation: md-fade-in 150ms ease-out forwards;
332
- }
333
-
334
- dialog[open] {
335
- animation: md-dialog-in 150ms cubic-bezier(0.2, 0, 0, 1) forwards;
336
- }
337
-
338
- @keyframes md-fade-in {
339
- from { opacity: 0; }
340
- to { opacity: 1; }
341
- }
342
-
343
- @keyframes md-dialog-in {
344
- from {
345
- opacity: 0;
346
- transform: scale(0.92);
347
- }
348
- to {
349
- opacity: 1;
350
- transform: scale(1);
351
- }
352
- }
353
- `, V = [
354
- "January",
355
- "February",
356
- "March",
357
- "April",
358
- "May",
359
- "June",
360
- "July",
361
- "August",
362
- "September",
363
- "October",
364
- "November",
365
- "December"
366
- ], N = [
367
- "S",
368
- "M",
369
- "T",
370
- "W",
371
- "T",
372
- "F",
373
- "S"
374
- ], B = [
375
- "M",
376
- "T",
377
- "W",
378
- "T",
379
- "F",
380
- "S",
381
- "S"
382
- ];
383
- function M(r) {
384
- return r < 10 ? `0${r}` : `${r}`;
385
- }
386
- function E(r, e, t) {
387
- return `${r}-${M(e + 1)}-${M(t)}`;
388
- }
389
- function p(r) {
390
- if (!r || typeof r != "string") return null;
391
- const e = r.split("-");
392
- if (e.length !== 3) return null;
393
- const t = parseInt(e[0], 10), l = parseInt(e[1], 10) - 1, o = parseInt(e[2], 10);
394
- return isNaN(t) || isNaN(l) || isNaN(o) ? null : {
395
- year: t,
396
- month: l,
397
- day: o
398
- };
399
- }
400
- function _() {
401
- const r = /* @__PURE__ */ new Date();
402
- return E(r.getFullYear(), r.getMonth(), r.getDate());
403
- }
404
- function I(r) {
405
- const e = p(r);
406
- return e ? new Date(e.year, e.month, e.day).toLocaleDateString("en-US", {
407
- weekday: "short",
408
- month: "short",
409
- day: "numeric"
410
- }) : "";
411
- }
412
- function v(r) {
413
- const e = p(r);
414
- return e ? new Date(e.year, e.month, e.day).toLocaleDateString("en-US", {
415
- month: "short",
416
- day: "numeric"
417
- }) : "";
418
- }
419
- var a = class extends $ {
420
- constructor(...e) {
421
- super(...e), this.variant = "docked", this.range = !1, this.value = "", this.startDate = "", this.endDate = "", this.min = "", this.max = "", this.label = "", this.headline = "", this.open = !1, this.error = !1, this.errorText = "", this.supportingText = "", this.firstDayOfWeek = 0, this.showActions = !1, this.viewYear = (/* @__PURE__ */ new Date()).getFullYear(), this.viewMonth = (/* @__PURE__ */ new Date()).getMonth(), this.viewMode = "calendar", this.hoverDate = null, this.selectingEnd = !1, this.handlePrevMonth = () => {
422
- this.viewMonth === 0 ? (this.viewMonth = 11, this.viewYear -= 1) : this.viewMonth -= 1;
423
- }, this.handleNextMonth = () => {
424
- this.viewMonth === 11 ? (this.viewMonth = 0, this.viewYear += 1) : this.viewMonth += 1;
425
- }, this.toggleViewMode = () => {
426
- this.viewMode = this.viewMode === "calendar" ? "year" : "calendar";
427
- }, this.selectYear = (t) => {
428
- this.viewYear = t, this.viewMode = "calendar";
429
- }, this.handleDayClick = (t) => {
430
- if (!this.isDateDisabled(t)) {
431
- if (!this.range) {
432
- this.value = t, this.setFormValue(this.value), this.emitEvent("input", { value: this.value }), this.emitEvent("change", { value: this.value }), this.emitEvent("select", {
433
- date: t,
434
- type: "single"
435
- });
436
- return;
437
- }
438
- !this.selectingEnd || !this.startDate ? (this.startDate = t, this.endDate = "", this.value = t, this.selectingEnd = !0, this.setFormValue(this.value), this.emitEvent("select", {
439
- date: t,
440
- type: "start"
441
- }), this.emitEvent("input", { value: this.value })) : t < this.startDate ? (this.startDate = t, this.endDate = "", this.value = t, this.selectingEnd = !0, this.setFormValue(this.value), this.emitEvent("select", {
442
- date: t,
443
- type: "start"
444
- }), this.emitEvent("input", { value: this.value })) : (this.endDate = t, this.value = `${this.startDate}/${this.endDate}`, this.selectingEnd = !1, this.setFormValue(this.value), this.emitEvent("select", {
445
- date: t,
446
- type: "end"
447
- }), this.emitEvent("input", { value: this.value }), this.emitEvent("change", {
448
- value: this.value,
449
- startDate: this.startDate,
450
- endDate: this.endDate
451
- }));
452
- }
453
- }, this.handleDayMouseEnter = (t) => {
454
- this.range && this.selectingEnd && this.startDate && (this.hoverDate = t);
455
- }, this.handleDayMouseLeave = () => {
456
- this.hoverDate = null;
457
- }, this.handleCancel = (t) => {
458
- t && t.preventDefault(), this.emitEvent("cancel"), this.close();
459
- }, this.handleConfirm = () => {
460
- this.emitEvent("change", {
461
- value: this.value,
462
- startDate: this.startDate,
463
- endDate: this.endDate
464
- }), this.close();
465
- };
466
- }
467
- static {
468
- this.styles = [$.styles, z];
469
- }
470
- connectedCallback() {
471
- super.connectedCallback(), this.syncInitialState(), this.setFormValue(this.value);
472
- }
473
- willUpdate(e) {
474
- if (super.willUpdate(e), e.has("value") && (this.handleValueChange(), this.setFormValue(this.value), this.validateInput()), (e.has("startDate") || e.has("endDate")) && this.range) {
475
- const t = this.startDate && this.endDate ? `${this.startDate}/${this.endDate}` : this.startDate || "";
476
- this.value !== t && (this.value = t, this.setFormValue(this.value));
477
- }
478
- (e.has("min") || e.has("max") || e.has("required")) && this.validateInput();
479
- }
480
- updated(e) {
481
- super.updated(e), e.has("open") && this.variant === "modal" && (this.open ? (this.dialogElement && !this.dialogElement.open && this.dialogElement.showModal(), this.emitEvent("open")) : (this.dialogElement && this.dialogElement.open && this.dialogElement.close(), this.emitEvent("close")));
482
- }
483
- syncInitialState() {
484
- const e = p(this.startDate || (this.range ? this.value.split("/")[0] ?? "" : this.value));
485
- if (e)
486
- this.viewYear = e.year, this.viewMonth = e.month;
487
- else {
488
- const t = /* @__PURE__ */ new Date();
489
- this.viewYear = t.getFullYear(), this.viewMonth = t.getMonth();
490
- }
491
- if (this.range && this.value && this.value.includes("/")) {
492
- const [t, l] = this.value.split("/");
493
- this.startDate = t || "", this.endDate = l || "";
494
- }
495
- }
496
- handleValueChange() {
497
- if (this.range)
498
- if (this.value.includes("/")) {
499
- const [e, t] = this.value.split("/");
500
- this.startDate = e || "", this.endDate = t || "";
501
- } else
502
- this.startDate = this.value, this.endDate = "";
503
- else {
504
- const e = p(this.value);
505
- e && (this.viewYear = e.year, this.viewMonth = e.month);
506
- }
507
- }
508
- formResetCallback() {
509
- this.value = "", this.startDate = "", this.endDate = "", this.error = !1, this.selectingEnd = !1, this.setFormValue(null);
510
- const e = /* @__PURE__ */ new Date();
511
- this.viewYear = e.getFullYear(), this.viewMonth = e.getMonth(), this.viewMode = "calendar";
512
- }
513
- showModal() {
514
- this.open = !0;
515
- }
516
- show() {
517
- this.open = !0;
518
- }
519
- close() {
520
- this.open = !1;
521
- }
522
- reset() {
523
- this.formResetCallback();
524
- }
525
- validateInput() {
526
- if (this.required && !this.value) {
527
- this.setValidity({ valueMissing: !0 }, this.errorText || "A date is required"), this.error = !0;
528
- return;
529
- }
530
- if (this.min && this.value) {
531
- const e = this.range ? this.startDate : this.value;
532
- if (e && e < this.min) {
533
- this.setValidity({ rangeUnderflow: !0 }, this.errorText || `Date must be after ${this.min}`), this.error = !0;
534
- return;
535
- }
536
- }
537
- if (this.max && this.value) {
538
- const e = this.range ? this.endDate || this.startDate : this.value;
539
- if (e && e > this.max) {
540
- this.setValidity({ rangeOverflow: !0 }, this.errorText || `Date must be before ${this.max}`), this.error = !0;
541
- return;
542
- }
543
- }
544
- this.setValidity({}), this.errorText || (this.error = !1);
545
- }
546
- isDateDisabled(e) {
547
- return !!(this.disabled || this.min && e < this.min || this.max && e > this.max);
548
- }
549
- getFormattedHeadline() {
550
- if (this.headline) return this.headline;
551
- if (!this.range)
552
- return this.value ? I(this.value) : "Select date";
553
- if (!this.startDate && !this.endDate) return "Select range";
554
- if (this.startDate && !this.endDate) return `${v(this.startDate)} – End date`;
555
- if (this.startDate && this.endDate) {
556
- const e = p(this.startDate), t = p(this.endDate);
557
- return e && t && e.year === t.year ? `${v(this.startDate)} – ${v(this.endDate)}, ${e.year}` : `${v(this.startDate)} – ${v(this.endDate)}`;
558
- }
559
- return "Select range";
560
- }
561
- renderCalendarGrid() {
562
- const e = this.viewYear, t = this.viewMonth, l = new Date(e, t + 1, 0).getDate();
563
- let o = new Date(e, t, 1).getDay();
564
- this.firstDayOfWeek === 1 && (o = (o + 6) % 7);
565
- const d = this.firstDayOfWeek === 1 ? B : N, D = _(), u = [];
566
- for (let c = 0; c < o; c++) u.push(n`<div class="day-cell empty"></div>`);
567
- for (let c = 1; c <= l; c++) {
568
- const h = E(e, t, c), F = h === D, w = this.isDateDisabled(h);
569
- let m = !1, g = !1, f = !1, k = !1;
570
- if (!this.range) m = this.value === h;
571
- else {
572
- const b = this.endDate || (this.selectingEnd ? this.hoverDate : null);
573
- g = this.startDate === h, f = b === h, m = g || f, this.startDate && b && b > this.startDate && (k = h >= this.startDate && h <= b);
574
- }
575
- const S = [
576
- "day-cell",
577
- g ? "range-start" : "",
578
- f ? "range-end" : "",
579
- k ? "in-range" : ""
580
- ].filter(Boolean).join(" "), Y = [
581
- "day-btn",
582
- m ? "selected" : "",
583
- F ? "today" : "",
584
- g ? "range-start" : "",
585
- f ? "range-end" : "",
586
- w ? "disabled" : ""
587
- ].filter(Boolean).join(" ");
588
- u.push(n`
589
- <div class=${S}>
590
- ${k ? n`<div class="range-band"></div>` : x}
591
- <button
592
- type="button"
593
- class=${Y}
594
- ?disabled=${w}
595
- aria-label=${h}
596
- aria-selected=${m ? "true" : "false"}
597
- @click=${() => this.handleDayClick(h)}
598
- @mouseenter=${() => this.handleDayMouseEnter(h)}
599
- @mouseleave=${this.handleDayMouseLeave}
600
- >
601
- <md-ripple ?disabled=${w}></md-ripple>
602
- ${c}
603
- </button>
604
- </div>
605
- `);
606
- }
607
- return n`
608
- <div class="calendar-content">
609
- <div class="weekdays" role="row">
610
- ${d.map((c) => n`<div class="weekday" role="columnheader">${c}</div>`)}
611
- </div>
612
- <div class="days-grid" role="grid">
613
- ${u}
614
- </div>
615
- </div>
616
- `;
617
- }
618
- renderYearPicker() {
619
- const e = (/* @__PURE__ */ new Date()).getFullYear(), t = e - 50, l = e + 50, o = [];
620
- for (let d = t; d <= l; d++) {
621
- const D = d === this.viewYear, u = d === e;
622
- o.push(n`
623
- <button
624
- type="button"
625
- class="year-btn ${D ? "selected" : ""} ${u ? "current" : ""}"
626
- @click=${() => this.selectYear(d)}
627
- >
628
- <md-ripple></md-ripple>
629
- ${d}
630
- </button>
631
- `);
632
- }
633
- return n`
634
- <div class="year-picker-view">
635
- ${o}
636
- </div>
637
- `;
638
- }
639
- renderPickerSurface() {
640
- const e = this.viewMode === "year", t = this.label || (this.range ? "Select range" : "Select date"), l = this.getFormattedHeadline(), o = !!(this.range ? this.startDate : this.value), d = this.showActions || this.variant === "modal";
641
- return n`
642
- <div class="picker-surface">
643
- <div class="header">
644
- <div class="header-top">
645
- <span class="subhead">${t}</span>
646
- <md-icon-button
647
- icon=${e ? "calendar_month" : "edit_calendar"}
648
- aria-label=${e ? "Switch to calendar view" : "Switch to year view"}
649
- @click=${this.toggleViewMode}
650
- ></md-icon-button>
651
- </div>
652
- <div class="headline ${o ? "" : "placeholder"}">
653
- ${l}
654
- </div>
655
- </div>
656
-
657
- <div class="header-divider"></div>
658
-
659
- <div class="navigation">
660
- <button
661
- type="button"
662
- class="month-year-btn ${e ? "open" : ""}"
663
- @click=${this.toggleViewMode}
664
- aria-label="Toggle year selection"
665
- >
666
- <span>${V[this.viewMonth]} ${this.viewYear}</span>
667
- <md-icon class="dropdown-icon" name="arrow_drop_down"></md-icon>
668
- </button>
669
-
670
- ${e ? x : n`
671
- <div class="nav-arrows">
672
- <md-icon-button
673
- icon="chevron_left"
674
- aria-label="Previous month"
675
- @click=${this.handlePrevMonth}
676
- ></md-icon-button>
677
- <md-icon-button
678
- icon="chevron_right"
679
- aria-label="Next month"
680
- @click=${this.handleNextMonth}
681
- ></md-icon-button>
682
- </div>
683
- `}
684
- </div>
685
-
686
- ${e ? this.renderYearPicker() : this.renderCalendarGrid()}
687
-
688
- ${d ? n`
689
- <div class="actions">
690
- <slot name="actions">
691
- <md-button variant="text" @click=${this.handleCancel}>Cancel</md-button>
692
- <md-button variant="text" @click=${this.handleConfirm}>OK</md-button>
693
- </slot>
694
- </div>
695
- ` : x}
696
- </div>
697
-
698
- ${this.supportingText || this.errorText ? n`
699
- <div class="supporting-text">
700
- ${this.error ? this.errorText || this.supportingText : this.supportingText}
701
- </div>
702
- ` : x}
703
- `;
704
- }
705
- render() {
706
- return this.variant === "modal" ? n`
707
- <dialog
708
- @cancel=${this.handleCancel}
709
- @click=${(e) => {
710
- e.target === this.dialogElement && this.handleCancel();
711
- }}
712
- >
713
- ${this.renderPickerSurface()}
714
- </dialog>
715
- ` : this.renderPickerSurface();
716
- }
717
- };
718
- i([s({
719
- type: String,
720
- reflect: !0
721
- })], a.prototype, "variant", void 0);
722
- i([s({
723
- type: Boolean,
724
- reflect: !0
725
- })], a.prototype, "range", void 0);
726
- i([s({
727
- type: String,
728
- reflect: !0
729
- })], a.prototype, "value", void 0);
730
- i([s({
731
- type: String,
732
- attribute: "start-date"
733
- })], a.prototype, "startDate", void 0);
734
- i([s({
735
- type: String,
736
- attribute: "end-date"
737
- })], a.prototype, "endDate", void 0);
738
- i([s({ type: String })], a.prototype, "min", void 0);
739
- i([s({ type: String })], a.prototype, "max", void 0);
740
- i([s({ type: String })], a.prototype, "label", void 0);
741
- i([s({ type: String })], a.prototype, "headline", void 0);
742
- i([s({
743
- type: Boolean,
744
- reflect: !0
745
- })], a.prototype, "open", void 0);
746
- i([s({
747
- type: Boolean,
748
- reflect: !0
749
- })], a.prototype, "error", void 0);
750
- i([s({
751
- type: String,
752
- attribute: "error-text"
753
- })], a.prototype, "errorText", void 0);
754
- i([s({
755
- type: String,
756
- attribute: "supporting-text"
757
- })], a.prototype, "supportingText", void 0);
758
- i([s({
759
- type: Number,
760
- attribute: "first-day-of-week"
761
- })], a.prototype, "firstDayOfWeek", void 0);
762
- i([s({
763
- type: Boolean,
764
- attribute: "show-actions"
765
- })], a.prototype, "showActions", void 0);
766
- i([y()], a.prototype, "viewYear", void 0);
767
- i([y()], a.prototype, "viewMonth", void 0);
768
- i([y()], a.prototype, "viewMode", void 0);
769
- i([y()], a.prototype, "hoverDate", void 0);
770
- i([y()], a.prototype, "selectingEnd", void 0);
771
- i([A("dialog")], a.prototype, "dialogElement", void 0);
772
- a = i([T("md-date-picker")], a);
773
- export {
774
- a as t
775
- };
776
-
777
- //# sourceMappingURL=date-picker-DJeHi4w-.js.map