@material/web 2.5.1-nightly.70e259d.0 → 2.5.1-nightly.8f78cc3.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 (400) hide show
  1. package/button/internal/button.d.ts +10 -0
  2. package/button/internal/button.js +27 -4
  3. package/button/internal/button.js.map +1 -1
  4. package/checkbox/internal/checkbox.js +2 -1
  5. package/checkbox/internal/checkbox.js.map +1 -1
  6. package/chips/internal/assist-chip.d.ts +10 -0
  7. package/chips/internal/assist-chip.js +23 -2
  8. package/chips/internal/assist-chip.js.map +1 -1
  9. package/chips/internal/chip.js +3 -1
  10. package/chips/internal/chip.js.map +1 -1
  11. package/chips/internal/filter-chip.js +2 -1
  12. package/chips/internal/filter-chip.js.map +1 -1
  13. package/chips/internal/input-chip.d.ts +10 -0
  14. package/chips/internal/input-chip.js +27 -3
  15. package/chips/internal/input-chip.js.map +1 -1
  16. package/custom-elements.json +16806 -7092
  17. package/dialog/internal/dialog.js +2 -1
  18. package/dialog/internal/dialog.js.map +1 -1
  19. package/fab/internal/shared.js +3 -2
  20. package/fab/internal/shared.js.map +1 -1
  21. package/field/internal/_content.scss +4 -0
  22. package/field/internal/_shared.scss +12 -0
  23. package/field/internal/shared-styles.css +1 -1
  24. package/field/internal/shared-styles.css.map +1 -1
  25. package/field/internal/shared-styles.cssresult.js +1 -1
  26. package/field/internal/shared-styles.cssresult.js.map +1 -1
  27. package/iconbutton/internal/icon-button.d.ts +10 -0
  28. package/iconbutton/internal/icon-button.js +26 -5
  29. package/iconbutton/internal/icon-button.js.map +1 -1
  30. package/internal/aria/aria.d.ts +1 -0
  31. package/internal/aria/aria.js +1 -0
  32. package/internal/aria/aria.js.map +1 -1
  33. package/internal/directives/safe-href.d.ts +23 -0
  34. package/internal/directives/safe-href.js +44 -0
  35. package/internal/directives/safe-href.js.map +1 -0
  36. package/labs/aria/buttons/keyboard_click_handler.d.ts +25 -0
  37. package/labs/aria/buttons/keyboard_click_handler.js +74 -0
  38. package/labs/aria/buttons/keyboard_click_handler.js.map +1 -0
  39. package/labs/aria/buttons/md-aria-toggle.d.ts +29 -0
  40. package/labs/aria/buttons/md-aria-toggle.js +67 -0
  41. package/labs/aria/buttons/md-aria-toggle.js.map +1 -0
  42. package/labs/aria/buttons/toggle.d.ts +40 -0
  43. package/labs/aria/buttons/toggle.js +100 -0
  44. package/labs/aria/buttons/toggle.js.map +1 -0
  45. package/labs/aria/command.d.ts +18 -0
  46. package/labs/aria/command.js +204 -0
  47. package/labs/aria/command.js.map +1 -0
  48. package/labs/aria/menu/fieldset.d.ts +36 -0
  49. package/labs/aria/menu/fieldset.js +103 -0
  50. package/labs/aria/menu/fieldset.js.map +1 -0
  51. package/labs/aria/menu/internal.d.ts +15 -0
  52. package/labs/aria/menu/internal.js +16 -0
  53. package/labs/aria/menu/internal.js.map +1 -0
  54. package/labs/aria/menu/md-aria-fieldset.d.ts +11 -0
  55. package/labs/aria/menu/md-aria-fieldset.js +8 -0
  56. package/labs/aria/menu/md-aria-fieldset.js.map +1 -0
  57. package/labs/aria/menu/md-aria-menubar.d.ts +11 -0
  58. package/labs/aria/menu/md-aria-menubar.js +8 -0
  59. package/labs/aria/menu/md-aria-menubar.js.map +1 -0
  60. package/labs/aria/menu/md-aria-menuitem.d.ts +11 -0
  61. package/labs/aria/menu/md-aria-menuitem.js +8 -0
  62. package/labs/aria/menu/md-aria-menuitem.js.map +1 -0
  63. package/labs/aria/menu/md-aria-menulist.d.ts +11 -0
  64. package/labs/aria/menu/md-aria-menulist.js +8 -0
  65. package/labs/aria/menu/md-aria-menulist.js.map +1 -0
  66. package/labs/aria/menu/menubar.d.ts +15 -0
  67. package/labs/aria/menu/menubar.js +45 -0
  68. package/labs/aria/menu/menubar.js.map +1 -0
  69. package/labs/aria/menu/menuitem.d.ts +59 -0
  70. package/labs/aria/menu/menuitem.js +237 -0
  71. package/labs/aria/menu/menuitem.js.map +1 -0
  72. package/labs/aria/menu/menulist.d.ts +21 -0
  73. package/labs/aria/menu/menulist.js +104 -0
  74. package/labs/aria/menu/menulist.js.map +1 -0
  75. package/labs/aria/menu/shared-slotted-content.d.ts +10 -0
  76. package/labs/aria/menu/shared-slotted-content.js +51 -0
  77. package/labs/aria/menu/shared-slotted-content.js.map +1 -0
  78. package/labs/aria/pseudo-classes.d.ts +19 -0
  79. package/labs/aria/pseudo-classes.js +22 -0
  80. package/labs/aria/pseudo-classes.js.map +1 -0
  81. package/labs/aria/tabs/tab.js +5 -0
  82. package/labs/aria/tabs/tab.js.map +1 -1
  83. package/labs/aria/tabs/tablist.d.ts +3 -5
  84. package/labs/aria/tabs/tablist.js +23 -88
  85. package/labs/aria/tabs/tablist.js.map +1 -1
  86. package/labs/gb/components/all.d.ts +72 -0
  87. package/labs/gb/components/all.js +81 -0
  88. package/labs/gb/components/all.js.map +1 -0
  89. package/labs/gb/components/appbar/app-bar-element.d.ts +1 -0
  90. package/labs/gb/components/appbar/app-bar-element.js +1 -0
  91. package/labs/gb/components/appbar/app-bar-element.js.map +1 -1
  92. package/labs/gb/components/appbar/app-bar.css +1 -1
  93. package/labs/gb/components/appbar/app-bar.css.map +1 -1
  94. package/labs/gb/components/appbar/app-bar.cssresult.js +1 -1
  95. package/labs/gb/components/appbar/app-bar.cssresult.js.map +1 -1
  96. package/labs/gb/components/appbar/app-bar.scss +1 -0
  97. package/labs/gb/components/badge/badge-element.d.ts +1 -0
  98. package/labs/gb/components/badge/badge-element.js +1 -0
  99. package/labs/gb/components/badge/badge-element.js.map +1 -1
  100. package/labs/gb/components/badge/badge.css +1 -1
  101. package/labs/gb/components/badge/badge.css.map +1 -1
  102. package/labs/gb/components/badge/badge.cssresult.js +1 -1
  103. package/labs/gb/components/badge/badge.cssresult.js.map +1 -1
  104. package/labs/gb/components/badge/badge.scss +1 -0
  105. package/labs/gb/components/button/_button-tokens.scss +33 -22
  106. package/labs/gb/components/button/button-element.d.ts +21 -14
  107. package/labs/gb/components/button/button-element.js +52 -74
  108. package/labs/gb/components/button/button-element.js.map +1 -1
  109. package/labs/gb/components/button/button.css +1 -1
  110. package/labs/gb/components/button/button.css.map +1 -1
  111. package/labs/gb/components/button/button.cssresult.js +1 -1
  112. package/labs/gb/components/button/button.cssresult.js.map +1 -1
  113. package/labs/gb/components/button/button.js +1 -1
  114. package/labs/gb/components/button/button.js.map +1 -1
  115. package/labs/gb/components/button/button.scss +19 -9
  116. package/labs/gb/components/buttongroup/_button-group-tokens.scss +124 -0
  117. package/labs/gb/components/buttongroup/button-group-element.d.ts +68 -0
  118. package/labs/gb/components/buttongroup/button-group-element.js +320 -0
  119. package/labs/gb/components/buttongroup/button-group-element.js.map +1 -0
  120. package/labs/gb/components/buttongroup/button-group.css +5 -0
  121. package/labs/gb/components/buttongroup/button-group.css.map +1 -0
  122. package/labs/gb/components/buttongroup/button-group.cssresult.d.ts +3 -0
  123. package/labs/gb/components/buttongroup/button-group.cssresult.js +15 -0
  124. package/labs/gb/components/buttongroup/button-group.cssresult.js.map +1 -0
  125. package/labs/gb/components/buttongroup/button-group.d.ts +96 -0
  126. package/labs/gb/components/buttongroup/button-group.js +105 -0
  127. package/labs/gb/components/buttongroup/button-group.js.map +1 -0
  128. package/labs/gb/components/buttongroup/button-group.scss +335 -0
  129. package/labs/gb/components/buttongroup/md-gb-button-group.d.ts +12 -0
  130. package/labs/gb/components/buttongroup/md-gb-button-group.js +8 -0
  131. package/labs/gb/components/buttongroup/md-gb-button-group.js.map +1 -0
  132. package/labs/gb/components/card/card-element.d.ts +2 -9
  133. package/labs/gb/components/card/card-element.js +8 -61
  134. package/labs/gb/components/card/card-element.js.map +1 -1
  135. package/labs/gb/components/card/card.css +1 -1
  136. package/labs/gb/components/card/card.css.map +1 -1
  137. package/labs/gb/components/card/card.cssresult.js +1 -1
  138. package/labs/gb/components/card/card.cssresult.js.map +1 -1
  139. package/labs/gb/components/card/card.scss +18 -5
  140. package/labs/gb/components/checkbox/checkbox-element.d.ts +1 -0
  141. package/labs/gb/components/checkbox/checkbox-element.js +3 -1
  142. package/labs/gb/components/checkbox/checkbox-element.js.map +1 -1
  143. package/labs/gb/components/checkbox/checkbox.css +1 -1
  144. package/labs/gb/components/checkbox/checkbox.css.map +1 -1
  145. package/labs/gb/components/checkbox/checkbox.cssresult.js +1 -1
  146. package/labs/gb/components/checkbox/checkbox.cssresult.js.map +1 -1
  147. package/labs/gb/components/checkbox/checkbox.scss +1 -0
  148. package/labs/gb/components/chip/chip-element.d.ts +11 -0
  149. package/labs/gb/components/chip/chip-element.js +28 -6
  150. package/labs/gb/components/chip/chip-element.js.map +1 -1
  151. package/labs/gb/components/chip/chip.css +1 -1
  152. package/labs/gb/components/chip/chip.css.map +1 -1
  153. package/labs/gb/components/chip/chip.cssresult.js +1 -1
  154. package/labs/gb/components/chip/chip.cssresult.js.map +1 -1
  155. package/labs/gb/components/chip/chip.js +1 -1
  156. package/labs/gb/components/chip/chip.js.map +1 -1
  157. package/labs/gb/components/chip/chip.scss +5 -1
  158. package/labs/gb/components/divider/divider-element.d.ts +1 -0
  159. package/labs/gb/components/divider/divider-element.js +1 -0
  160. package/labs/gb/components/divider/divider-element.js.map +1 -1
  161. package/labs/gb/components/fab/_fab-tokens.scss +4 -1
  162. package/labs/gb/components/fab/fab-element.d.ts +2 -0
  163. package/labs/gb/components/fab/fab-element.js +2 -0
  164. package/labs/gb/components/fab/fab-element.js.map +1 -1
  165. package/labs/gb/components/fab/fab.css +1 -1
  166. package/labs/gb/components/fab/fab.css.map +1 -1
  167. package/labs/gb/components/fab/fab.cssresult.js +1 -1
  168. package/labs/gb/components/fab/fab.cssresult.js.map +1 -1
  169. package/labs/gb/components/fab/fab.scss +3 -2
  170. package/labs/gb/components/iconbutton/_icon-button-tokens.scss +13 -4
  171. package/labs/gb/components/iconbutton/icon-button-element.d.ts +15 -1
  172. package/labs/gb/components/iconbutton/icon-button-element.js +42 -6
  173. package/labs/gb/components/iconbutton/icon-button-element.js.map +1 -1
  174. package/labs/gb/components/iconbutton/icon-button.css +1 -1
  175. package/labs/gb/components/iconbutton/icon-button.css.map +1 -1
  176. package/labs/gb/components/iconbutton/icon-button.cssresult.js +1 -1
  177. package/labs/gb/components/iconbutton/icon-button.cssresult.js.map +1 -1
  178. package/labs/gb/components/iconbutton/icon-button.js +1 -1
  179. package/labs/gb/components/iconbutton/icon-button.js.map +1 -1
  180. package/labs/gb/components/iconbutton/icon-button.scss +13 -2
  181. package/labs/gb/components/list/_list-tokens.scss +11 -14
  182. package/labs/gb/components/list/list-element.d.ts +1 -0
  183. package/labs/gb/components/list/list-element.js +1 -0
  184. package/labs/gb/components/list/list-element.js.map +1 -1
  185. package/labs/gb/components/list/list-item-element.d.ts +5 -0
  186. package/labs/gb/components/list/list-item-element.js +8 -2
  187. package/labs/gb/components/list/list-item-element.js.map +1 -1
  188. package/labs/gb/components/list/list.css +1 -1
  189. package/labs/gb/components/list/list.css.map +1 -1
  190. package/labs/gb/components/list/list.cssresult.js +1 -1
  191. package/labs/gb/components/list/list.cssresult.js.map +1 -1
  192. package/labs/gb/components/list/list.scss +7 -0
  193. package/labs/gb/components/menu/_menu-tokens.scss +45 -16
  194. package/labs/gb/components/menu/menu-element.d.ts +1 -0
  195. package/labs/gb/components/menu/menu-element.js +1 -0
  196. package/labs/gb/components/menu/menu-element.js.map +1 -1
  197. package/labs/gb/components/menu/menu-group-element.d.ts +1 -0
  198. package/labs/gb/components/menu/menu-group-element.js +1 -0
  199. package/labs/gb/components/menu/menu-group-element.js.map +1 -1
  200. package/labs/gb/components/menu/menu-item-element.d.ts +5 -1
  201. package/labs/gb/components/menu/menu-item-element.js +5 -1
  202. package/labs/gb/components/menu/menu-item-element.js.map +1 -1
  203. package/labs/gb/components/menu/menu.css +1 -1
  204. package/labs/gb/components/menu/menu.css.map +1 -1
  205. package/labs/gb/components/menu/menu.cssresult.js +1 -1
  206. package/labs/gb/components/menu/menu.cssresult.js.map +1 -1
  207. package/labs/gb/components/menu/menu.scss +5 -0
  208. package/labs/gb/components/navbar/_nav-bar-tokens.scss +57 -0
  209. package/labs/gb/components/navbar/md-gb-nav-bar-item.d.ts +12 -0
  210. package/labs/gb/components/navbar/md-gb-nav-bar-item.js +10 -0
  211. package/labs/gb/components/navbar/md-gb-nav-bar-item.js.map +1 -0
  212. package/labs/gb/components/navbar/md-gb-nav-bar.d.ts +12 -0
  213. package/labs/gb/components/navbar/md-gb-nav-bar.js +10 -0
  214. package/labs/gb/components/navbar/md-gb-nav-bar.js.map +1 -0
  215. package/labs/gb/components/navbar/nav-bar-element.d.ts +60 -0
  216. package/labs/gb/components/navbar/nav-bar-element.js +118 -0
  217. package/labs/gb/components/navbar/nav-bar-element.js.map +1 -0
  218. package/labs/gb/components/navbar/nav-bar-item-element.d.ts +41 -0
  219. package/labs/gb/components/navbar/nav-bar-item-element.js +150 -0
  220. package/labs/gb/components/navbar/nav-bar-item-element.js.map +1 -0
  221. package/labs/gb/components/navbar/nav-bar.css +4 -0
  222. package/labs/gb/components/navbar/nav-bar.css.map +1 -0
  223. package/labs/gb/components/navbar/nav-bar.cssresult.d.ts +3 -0
  224. package/labs/gb/components/navbar/nav-bar.cssresult.js +14 -0
  225. package/labs/gb/components/navbar/nav-bar.cssresult.js.map +1 -0
  226. package/labs/gb/components/navbar/nav-bar.d.ts +86 -0
  227. package/labs/gb/components/navbar/nav-bar.js +92 -0
  228. package/labs/gb/components/navbar/nav-bar.js.map +1 -0
  229. package/labs/gb/components/navbar/nav-bar.scss +340 -0
  230. package/labs/gb/components/navrail/_nav-rail-tokens.scss +123 -0
  231. package/labs/gb/components/navrail/md-gb-nav-rail-item.d.ts +12 -0
  232. package/labs/gb/components/navrail/md-gb-nav-rail-item.js +10 -0
  233. package/labs/gb/components/navrail/md-gb-nav-rail-item.js.map +1 -0
  234. package/labs/gb/components/navrail/md-gb-nav-rail.d.ts +12 -0
  235. package/labs/gb/components/navrail/md-gb-nav-rail.js +10 -0
  236. package/labs/gb/components/navrail/md-gb-nav-rail.js.map +1 -0
  237. package/labs/gb/components/navrail/nav-rail-element.d.ts +120 -0
  238. package/labs/gb/components/navrail/nav-rail-element.js +366 -0
  239. package/labs/gb/components/navrail/nav-rail-element.js.map +1 -0
  240. package/labs/gb/components/navrail/nav-rail-item-element.d.ts +44 -0
  241. package/labs/gb/components/navrail/nav-rail-item-element.js +178 -0
  242. package/labs/gb/components/navrail/nav-rail-item-element.js.map +1 -0
  243. package/labs/gb/components/navrail/nav-rail.css +4 -0
  244. package/labs/gb/components/navrail/nav-rail.css.map +1 -0
  245. package/labs/gb/components/navrail/nav-rail.cssresult.d.ts +3 -0
  246. package/labs/gb/components/navrail/nav-rail.cssresult.js +14 -0
  247. package/labs/gb/components/navrail/nav-rail.cssresult.js.map +1 -0
  248. package/labs/gb/components/navrail/nav-rail.d.ts +108 -0
  249. package/labs/gb/components/navrail/nav-rail.js +115 -0
  250. package/labs/gb/components/navrail/nav-rail.js.map +1 -0
  251. package/labs/gb/components/navrail/nav-rail.scss +419 -0
  252. package/labs/gb/components/radio/radio-element.d.ts +1 -0
  253. package/labs/gb/components/radio/radio-element.js +1 -0
  254. package/labs/gb/components/radio/radio-element.js.map +1 -1
  255. package/labs/gb/components/radio/radio.css +1 -1
  256. package/labs/gb/components/radio/radio.css.map +1 -1
  257. package/labs/gb/components/radio/radio.cssresult.js +1 -1
  258. package/labs/gb/components/radio/radio.cssresult.js.map +1 -1
  259. package/labs/gb/components/radio/radio.scss +1 -0
  260. package/labs/gb/components/shared/fx.d.ts +67 -0
  261. package/labs/gb/components/shared/fx.js +106 -0
  262. package/labs/gb/components/shared/fx.js.map +1 -0
  263. package/labs/gb/components/shared/pseudo-classes.d.ts +1 -7
  264. package/labs/gb/components/shared/pseudo-classes.js +1 -9
  265. package/labs/gb/components/shared/pseudo-classes.js.map +1 -1
  266. package/labs/gb/components/shared/update-class-list.d.ts +22 -0
  267. package/labs/gb/components/shared/update-class-list.js +26 -0
  268. package/labs/gb/components/shared/update-class-list.js.map +1 -0
  269. package/labs/gb/components/slider/_slider-tokens.scss +86 -0
  270. package/labs/gb/components/slider/md-gb-slider.d.ts +12 -0
  271. package/labs/gb/components/slider/md-gb-slider.js +8 -0
  272. package/labs/gb/components/slider/md-gb-slider.js.map +1 -0
  273. package/labs/gb/components/slider/slider-element.d.ts +147 -0
  274. package/labs/gb/components/slider/slider-element.js +981 -0
  275. package/labs/gb/components/slider/slider-element.js.map +1 -0
  276. package/labs/gb/components/slider/slider.css +1 -0
  277. package/labs/gb/components/slider/slider.css.map +1 -0
  278. package/labs/gb/components/slider/slider.cssresult.d.ts +3 -0
  279. package/labs/gb/components/slider/slider.cssresult.js +11 -0
  280. package/labs/gb/components/slider/slider.cssresult.js.map +1 -0
  281. package/labs/gb/components/slider/slider.d.ts +181 -0
  282. package/labs/gb/components/slider/slider.js +510 -0
  283. package/labs/gb/components/slider/slider.js.map +1 -0
  284. package/labs/gb/components/slider/slider.scss +711 -0
  285. package/labs/gb/components/snackbar/_snackbar-tokens.scss +86 -0
  286. package/labs/gb/components/snackbar/harness.d.ts +32 -0
  287. package/labs/gb/components/snackbar/harness.js +64 -0
  288. package/labs/gb/components/snackbar/harness.js.map +1 -0
  289. package/labs/gb/components/snackbar/md-gb-snackbar.d.ts +12 -0
  290. package/labs/gb/components/snackbar/md-gb-snackbar.js +8 -0
  291. package/labs/gb/components/snackbar/md-gb-snackbar.js.map +1 -0
  292. package/labs/gb/components/snackbar/snackbar-element.d.ts +123 -0
  293. package/labs/gb/components/snackbar/snackbar-element.js +448 -0
  294. package/labs/gb/components/snackbar/snackbar-element.js.map +1 -0
  295. package/labs/gb/components/snackbar/snackbar.css +5 -0
  296. package/labs/gb/components/snackbar/snackbar.css.map +1 -0
  297. package/labs/gb/components/snackbar/snackbar.cssresult.d.ts +3 -0
  298. package/labs/gb/components/snackbar/snackbar.cssresult.js +15 -0
  299. package/labs/gb/components/snackbar/snackbar.cssresult.js.map +1 -0
  300. package/labs/gb/components/snackbar/snackbar.d.ts +54 -0
  301. package/labs/gb/components/snackbar/snackbar.js +72 -0
  302. package/labs/gb/components/snackbar/snackbar.js.map +1 -0
  303. package/labs/gb/components/snackbar/snackbar.scss +384 -0
  304. package/labs/gb/components/splitbutton/split-button-element.d.ts +1 -0
  305. package/labs/gb/components/splitbutton/split-button-element.js +1 -0
  306. package/labs/gb/components/splitbutton/split-button-element.js.map +1 -1
  307. package/labs/gb/components/switch/switch-element.d.ts +1 -0
  308. package/labs/gb/components/switch/switch-element.js +3 -1
  309. package/labs/gb/components/switch/switch-element.js.map +1 -1
  310. package/labs/gb/components/switch/switch.css +1 -1
  311. package/labs/gb/components/switch/switch.css.map +1 -1
  312. package/labs/gb/components/switch/switch.cssresult.js +1 -1
  313. package/labs/gb/components/switch/switch.cssresult.js.map +1 -1
  314. package/labs/gb/components/switch/switch.js +5 -2
  315. package/labs/gb/components/switch/switch.js.map +1 -1
  316. package/labs/gb/components/switch/switch.scss +4 -2
  317. package/labs/gb/components/tabs/_tabs-tokens.scss +177 -0
  318. package/labs/gb/components/tabs/md-gb-tab.d.ts +12 -0
  319. package/labs/gb/components/tabs/md-gb-tab.js +8 -0
  320. package/labs/gb/components/tabs/md-gb-tab.js.map +1 -0
  321. package/labs/gb/components/tabs/md-gb-tabs.d.ts +12 -0
  322. package/labs/gb/components/tabs/md-gb-tabs.js +8 -0
  323. package/labs/gb/components/tabs/md-gb-tabs.js.map +1 -0
  324. package/labs/gb/components/tabs/tab-element.d.ts +42 -0
  325. package/labs/gb/components/tabs/tab-element.js +75 -0
  326. package/labs/gb/components/tabs/tab-element.js.map +1 -0
  327. package/labs/gb/components/tabs/tabs-element.d.ts +37 -0
  328. package/labs/gb/components/tabs/tabs-element.js +67 -0
  329. package/labs/gb/components/tabs/tabs-element.js.map +1 -0
  330. package/labs/gb/components/tabs/tabs.css +4 -0
  331. package/labs/gb/components/tabs/tabs.css.map +1 -0
  332. package/labs/gb/components/tabs/tabs.cssresult.d.ts +3 -0
  333. package/labs/gb/components/tabs/tabs.cssresult.js +14 -0
  334. package/labs/gb/components/tabs/tabs.cssresult.js.map +1 -0
  335. package/labs/gb/components/tabs/tabs.d.ts +98 -0
  336. package/labs/gb/components/tabs/tabs.js +112 -0
  337. package/labs/gb/components/tabs/tabs.js.map +1 -0
  338. package/labs/gb/components/tabs/tabs.scss +301 -0
  339. package/labs/gb/components/toolbar/_toolbar-tokens.scss +70 -0
  340. package/labs/gb/components/toolbar/md-gb-toolbar.d.ts +12 -0
  341. package/labs/gb/components/toolbar/md-gb-toolbar.js +8 -0
  342. package/labs/gb/components/toolbar/md-gb-toolbar.js.map +1 -0
  343. package/labs/gb/components/toolbar/toolbar-element.d.ts +56 -0
  344. package/labs/gb/components/toolbar/toolbar-element.js +120 -0
  345. package/labs/gb/components/toolbar/toolbar-element.js.map +1 -0
  346. package/labs/gb/components/toolbar/toolbar.css +4 -0
  347. package/labs/gb/components/toolbar/toolbar.css.map +1 -0
  348. package/labs/gb/components/toolbar/toolbar.cssresult.d.ts +3 -0
  349. package/labs/gb/components/toolbar/toolbar.cssresult.js +14 -0
  350. package/labs/gb/components/toolbar/toolbar.cssresult.js.map +1 -0
  351. package/labs/gb/components/toolbar/toolbar.d.ts +56 -0
  352. package/labs/gb/components/toolbar/toolbar.js +60 -0
  353. package/labs/gb/components/toolbar/toolbar.js.map +1 -0
  354. package/labs/gb/components/toolbar/toolbar.scss +240 -0
  355. package/labs/gb/styles/icon/icon-element.d.ts +1 -0
  356. package/labs/gb/styles/icon/icon-element.js +1 -0
  357. package/labs/gb/styles/icon/icon-element.js.map +1 -1
  358. package/labs/gb/styles/tailwind.css +1 -1
  359. package/labs/gb/styles/tailwind.css.map +1 -1
  360. package/labs/gb/styles/tailwind.cssresult.js +1 -1
  361. package/labs/gb/styles/tailwind.cssresult.js.map +1 -1
  362. package/labs/gb/styles/tailwind.scss +2 -0
  363. package/labs/navigationbar/internal/navigation-bar.js +2 -1
  364. package/labs/navigationbar/internal/navigation-bar.js.map +1 -1
  365. package/labs/navigationdrawer/internal/navigation-drawer-modal.js +2 -1
  366. package/labs/navigationdrawer/internal/navigation-drawer-modal.js.map +1 -1
  367. package/labs/navigationdrawer/internal/navigation-drawer.js +2 -1
  368. package/labs/navigationdrawer/internal/navigation-drawer.js.map +1 -1
  369. package/labs/navigationtab/internal/navigation-tab.js +2 -1
  370. package/labs/navigationtab/internal/navigation-tab.js.map +1 -1
  371. package/labs/segmentedbutton/internal/segmented-button.js +2 -1
  372. package/labs/segmentedbutton/internal/segmented-button.js.map +1 -1
  373. package/labs/segmentedbuttonset/internal/segmented-button-set.js +2 -1
  374. package/labs/segmentedbuttonset/internal/segmented-button-set.js.map +1 -1
  375. package/list/internal/listitem/list-item.d.ts +10 -0
  376. package/list/internal/listitem/list-item.js +21 -1
  377. package/list/internal/listitem/list-item.js.map +1 -1
  378. package/menu/internal/menuitem/menu-item.d.ts +10 -0
  379. package/menu/internal/menuitem/menu-item.js +21 -1
  380. package/menu/internal/menuitem/menu-item.js.map +1 -1
  381. package/package.json +2 -1
  382. package/progress/internal/progress.js +2 -1
  383. package/progress/internal/progress.js.map +1 -1
  384. package/radio/internal/single-selection-controller.js +4 -1
  385. package/radio/internal/single-selection-controller.js.map +1 -1
  386. package/select/internal/selectoption/select-option.js +1 -0
  387. package/select/internal/selectoption/select-option.js.map +1 -1
  388. package/slider/internal/slider.js +1 -0
  389. package/slider/internal/slider.js.map +1 -1
  390. package/switch/internal/switch.js +1 -0
  391. package/switch/internal/switch.js.map +1 -1
  392. package/testing/harness.js +3 -0
  393. package/testing/harness.js.map +1 -1
  394. package/textfield/internal/_shared.scss +1 -0
  395. package/textfield/internal/shared-styles.css +1 -1
  396. package/textfield/internal/shared-styles.css.map +1 -1
  397. package/textfield/internal/shared-styles.cssresult.js +1 -1
  398. package/textfield/internal/shared-styles.cssresult.js.map +1 -1
  399. package/types/command-event.d.ts +34 -0
  400. package/types/popover.d.ts +25 -0
@@ -1 +1 @@
1
- {"version":3,"file":"button.cssresult.js","sourceRoot":"","sources":["button.cssresult.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;CAIxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/gb/components/button/button.css.\nimport {css} from 'lit';\nexport const styles = css`/*!\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */@layer md.sys, md.comp.ripple, md.comp.focus-ring;@layer md.comp.button{.btn{--container-color: transparent;--container-height: auto;--container-elevation: var(--md-sys-elevation-shadow-0);--container-shape: calc(var(--container-height) / 2);--outline-width: 0;--outline-color: transparent;--icon-label-space: 8px;--icon-color: currentColor;--icon-size: 20px;--label-text: var(--md-sys-typescale-label-lg);--label-text-tracking: var(--md-sys-typescale-label-lg-tracking);--label-text-color: currentColor;--leading-space: 0;--state-layer-color: transparent;--trailing-space: 0}.btn:is(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-md)}.btn.btn-filled{--container-color: var(--md-sys-color-primary);--icon-color: var(--md-sys-color-on-primary);--label-text-color: var(--md-sys-color-on-primary)}.btn.btn-filled:where(.btn-unselected,[aria-pressed=false]){--container-color: var(--md-sys-color-surface-container);--icon-color: var(--md-sys-color-on-surface-variant);--label-text-color: var(--md-sys-color-on-surface-variant)}.btn.btn-filled:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-primary);--icon-color: var(--md-sys-color-on-primary);--label-text-color: var(--md-sys-color-on-primary)}.btn.btn-elevated{--container-color: var(--md-sys-color-surface-container-low);--container-elevation: var(--md-sys-elevation-shadow-1);--icon-color: var(--md-sys-color-primary);--label-text-color: var(--md-sys-color-primary)}.btn.btn-elevated:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-primary);--icon-color: var(--md-sys-color-on-primary);--label-text-color: var(--md-sys-color-on-primary)}.btn.btn-tonal{--container-color: var(--md-sys-color-secondary-container);--icon-color: var(--md-sys-color-on-secondary-container);--label-text-color: var(--md-sys-color-on-secondary-container)}.btn.btn-tonal:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-secondary);--icon-color: var(--md-sys-color-on-secondary);--label-text-color: var(--md-sys-color-on-secondary)}.btn.btn-outlined{--icon-color: var(--md-sys-color-on-surface-variant);--label-text-color: var(--md-sys-color-on-surface-variant);--outline-color: var(--md-sys-color-outline-variant);--outline-width: 1px}.btn.btn-outlined:where(.btn-lg){--outline-width: 2px}.btn.btn-outlined:where(.btn-xl){--outline-width: 3px}.btn.btn-outlined:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-inverse-surface);--icon-color: var(--md-sys-color-inverse-on-surface);--label-text-color: var(--md-sys-color-inverse-on-surface)}.btn.btn-text{--label-text-color: var(--md-sys-color-primary);--icon-color: var(--md-sys-color-primary);--state-layer-color: var(--md-sys-color-primary)}.btn.btn-xs{--container-height: 32px;--leading-space: 12px;--trailing-space: 12px}.btn.btn-sm{--container-height: 40px;--leading-space: 16px;--trailing-space: 16px}.btn.btn-md{--container-height: 56px;--leading-space: 24px;--trailing-space: 24px;--icon-size: 24px;--label-text: var(--md-sys-typescale-title-md);--label-text-tracking: var(--md-sys-typescale-title-md-tracking)}.btn.btn-md:where(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-lg)}.btn.btn-lg{--container-height: 96px;--icon-label-space: 12px;--icon-size: 32px;--leading-space: 48px;--trailing-space: 48px;--label-text: var(--md-sys-typescale-headline-sm);--label-text-tracking: var(--md-sys-typescale-headline-sm-tracking)}.btn.btn-lg:where(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-xl{--container-height: 136px;--icon-label-space: 16px;--icon-size: 40px;--leading-space: 64px;--trailing-space: 64px;--label-text: var(--md-sys-typescale-headline-lg);--label-text-tracking: var(--md-sys-typescale-headline-lg-tracking)}.btn.btn-xl:where(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-square{--container-shape: var(--md-sys-shape-corner-md)}.btn.btn-square:where(.btn-md){--container-shape: var(--md-sys-shape-corner-lg)}.btn.btn-square:where(.btn-lg){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-square:where(.btn-xl){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-square:where(.btn-selected,[aria-pressed=true]){--container-shape: calc(var(--container-height) / 2)}.btn:is(:active,.active):where(:not(:disabled,.disabled)){--container-shape: var(--md-sys-shape-corner-sm)}.btn:is(:active,.active):where(:not(:disabled,.disabled)):where(.btn-md){--container-shape: var(--md-sys-shape-corner-md)}.btn:is(:active,.active):where(:not(:disabled,.disabled)):where(.btn-lg){--container-shape: var(--md-sys-shape-corner-lg)}.btn:is(:active,.active):where(:not(:disabled,.disabled)):where(.btn-xl){--container-shape: var(--md-sys-shape-corner-lg)}.btn:is(:disabled,.disabled){--container-color: hsl(from var(--md-sys-color-on-surface) h s l / 10%);--container-elevation: var(--md-sys-elevation-shadow-0);--icon-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%);--label-text-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%)}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:var(--container-height);gap:var(--icon-label-space);padding-inline:var(--leading-space) var(--trailing-space);border:var(--outline-width) solid var(--outline-color);border-radius:var(--container-shape);box-shadow:var(--container-elevation);background-color:var(--container-color);color:var(--label-text-color);font:var(--label-text);letter-spacing:var(--label-text-tracking);transition:border-radius 350ms cubic-bezier(0.42, 1.67, 0.21, 0.9),var(--ripple-transition);--md-icon-color: var(--icon-color);--md-icon-size: var(--icon-size)}.btn:not(:disabled,.disabled){cursor:pointer}}\n`;\nexport default styles.styleSheet!;\n"]}
1
+ {"version":3,"file":"button.cssresult.js","sourceRoot":"","sources":["button.cssresult.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mEAAmE;AACnE,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;CAIxB,CAAC;AACF,eAAe,MAAM,CAAC,UAAW,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./labs/gb/components/button/button.css.\nimport {css} from 'lit';\nexport const styles = css`/*!\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */@layer md.sys, md.comp.ripple, md.comp.focus-ring;@layer md.comp.button{.btn{--container-color: transparent;--container-elevation: var(--md-sys-elevation-shadow-0);--container-height: auto;--container-shape: calc(var(--container-height) / 2);--icon-color: currentColor;--icon-label-space: 8px;--icon-size: 20px;--label-text: var(--md-sys-typescale-label-lg);--label-text-axes: var(--md-sys-typescale-label-lg-axes);--label-text-color: currentColor;--label-text-tracking: var(--md-sys-typescale-label-lg-tracking);--leading-space: 0;--md-icon-fill: 1;--outline-color: transparent;--outline-width: 0;--state-layer-color: transparent;--trailing-space: 0}.btn:where(.btn-unselected,[aria-pressed=false]){--md-icon-fill: 0}.btn:is(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-md);--md-icon-fill: 1}.btn.btn-filled{--container-color: var(--md-sys-color-primary);--icon-color: var(--md-sys-color-on-primary);--label-text-color: var(--md-sys-color-on-primary)}.btn.btn-filled:where(.btn-unselected,[aria-pressed=false]){--container-color: var(--md-sys-color-surface-container);--icon-color: var(--md-sys-color-on-surface-variant);--label-text-color: var(--md-sys-color-on-surface-variant)}.btn.btn-filled:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-primary);--icon-color: var(--md-sys-color-on-primary);--label-text-color: var(--md-sys-color-on-primary)}.btn.btn-elevated{--container-color: var(--md-sys-color-surface-container-low);--container-elevation: var(--md-sys-elevation-shadow-1);--icon-color: var(--md-sys-color-primary);--label-text-color: var(--md-sys-color-primary)}.btn.btn-elevated:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-primary);--icon-color: var(--md-sys-color-on-primary);--label-text-color: var(--md-sys-color-on-primary)}.btn.btn-tonal{--container-color: var(--md-sys-color-secondary-container);--icon-color: var(--md-sys-color-on-secondary-container);--label-text-color: var(--md-sys-color-on-secondary-container)}.btn.btn-tonal:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-secondary);--icon-color: var(--md-sys-color-on-secondary);--label-text-color: var(--md-sys-color-on-secondary)}.btn.btn-outlined{--icon-color: var(--md-sys-color-on-surface-variant);--label-text-color: var(--md-sys-color-on-surface-variant);--outline-color: var(--md-sys-color-outline-variant)}.btn.btn-outlined:where(.btn-selected,[aria-pressed=true]){--container-color: var(--md-sys-color-inverse-surface);--icon-color: var(--md-sys-color-inverse-on-surface);--label-text-color: var(--md-sys-color-inverse-on-surface);--outline-color: transparent}.btn.btn-text{--icon-color: var(--md-sys-color-primary);--label-text-color: var(--md-sys-color-primary);--state-layer-color: var(--md-sys-color-primary)}.btn.btn-xs{--container-height: 32px;--leading-space: 12px;--outline-width: 1px;--trailing-space: 12px}.btn.btn-sm{--container-height: 40px;--leading-space: 16px;--outline-width: 1px;--trailing-space: 16px}.btn.btn-md{--container-height: 56px;--icon-size: 24px;--label-text: var(--md-sys-typescale-title-md);--label-text-axes: var(--md-sys-typescale-title-md-axes);--label-text-tracking: var(--md-sys-typescale-title-md-tracking);--leading-space: 24px;--outline-width: 1px;--trailing-space: 24px}.btn.btn-md:where(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-lg)}.btn.btn-lg{--container-height: 96px;--icon-label-space: 12px;--icon-size: 32px;--label-text: var(--md-sys-typescale-headline-sm);--label-text-axes: var(--md-sys-typescale-headline-sm-axes);--label-text-tracking: var(--md-sys-typescale-headline-sm-tracking);--leading-space: 48px;--outline-width: 2px;--trailing-space: 48px}.btn.btn-lg:where(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-xl{--container-height: 136px;--icon-label-space: 16px;--icon-size: 40px;--label-text: var(--md-sys-typescale-headline-lg);--label-text-axes: var(--md-sys-typescale-headline-lg-axes);--label-text-tracking: var(--md-sys-typescale-headline-lg-tracking);--leading-space: 64px;--outline-width: 3px;--trailing-space: 64px}.btn.btn-xl:where(.btn-selected,[aria-pressed=true]){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-square{--container-shape: var(--md-sys-shape-corner-md)}.btn.btn-square:where(.btn-md){--container-shape: var(--md-sys-shape-corner-lg)}.btn.btn-square:where(.btn-lg){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-square:where(.btn-xl){--container-shape: var(--md-sys-shape-corner-xl)}.btn.btn-square:where(.btn-selected,[aria-pressed=true]){--container-shape: calc(var(--container-height) / 2)}.btn:is(:active,.active):where(:not(:disabled,.disabled,[aria-disabled=true])){--container-shape: var(--md-sys-shape-corner-sm)}.btn:is(:active,.active):where(:not(:disabled,.disabled,[aria-disabled=true])):where(.btn-md){--container-shape: var(--md-sys-shape-corner-md)}.btn:is(:active,.active):where(:not(:disabled,.disabled,[aria-disabled=true])):where(.btn-lg){--container-shape: var(--md-sys-shape-corner-lg)}.btn:is(:active,.active):where(:not(:disabled,.disabled,[aria-disabled=true])):where(.btn-xl){--container-shape: var(--md-sys-shape-corner-lg)}.btn:is(:disabled,.disabled,[aria-disabled=true]){--container-color: hsl(from var(--md-sys-color-on-surface) h s l / 10%);--container-elevation: var(--md-sys-elevation-shadow-0);--icon-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%);--label-text-color: hsl(from var(--md-sys-color-on-surface) h s l / 38%);--disabled: true}.btn:is(:disabled,.disabled,[aria-disabled=true]):where(.btn-outlined:not(.btn-selected,[aria-pressed=true])){--container-color: transparent}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:var(--container-height);gap:var(--icon-label-space);padding-inline:var(--leading-space) var(--trailing-space);border:var(--outline-width) solid var(--outline-color);border-radius:var(--container-shape);box-shadow:var(--container-elevation);background-color:var(--container-color);color:var(--label-text-color);font:var(--label-text);letter-spacing:var(--label-text-tracking);font-variation-settings:var(--label-text-axes);-webkit-font-smoothing:antialiased;transition:border-radius 350ms cubic-bezier(0.42, 1.67, 0.21, 0.9),var(--ripple-transition);--md-icon-color: var(--icon-color);--md-icon-size: var(--icon-size)}.btn:not(:disabled,.disabled,[aria-disabled=true]){cursor:pointer}.btn:has(.fx-playing){--outline-color: transparent;--container-elevation: none}}\n`;\nexport default styles.styleSheet!;\n"]}
@@ -102,7 +102,7 @@ export function setupButton(button, opts) {
102
102
  button.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));
103
103
  button.dispatchEvent(new Event('change', { bubbles: true }));
104
104
  });
105
- }, opts);
105
+ }, { ...opts, capture: true });
106
106
  }
107
107
  /**
108
108
  * A Lit directive that adds button styling and functionality to its element.
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["button.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,aAAa,EACb,kBAAkB,GACnB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAC,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAC,aAAa,EAAE,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAC,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAKvE,mCAAmC;AACnC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;CACJ,CAAC;AAKX,kCAAkC;AAClC,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAA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,CACZ,IAAI,cAAc,CAAC,WAAW,KAAK,cAAc,CAAC,aAAa,EAAE,CAClE,CAAC;YACJ,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACxC,OAAO;YACT,CAAC;YAED,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,KAAK,MAAM,CAAC;YAChD,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;YACxC,wDAAwD;YACxD,MAAM,CAAC,aAAa,CAClB,IAAI,UAAU,CAAC,OAAO,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CACzD,CAAC;YACF,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC,EACD,IAAI,CACL,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,uBAAuB,CAAC;IAC5C,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,WAAW;CAC1B,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {type ClassInfo} from 'lit/directives/class-map.js';\nimport {\n afterDispatch,\n setupDispatchHooks,\n} from '../../../../internal/events/dispatch-hooks.js';\nimport {focusRingClasses} from '../focus/focus-ring.js';\nimport {rippleClasses, setupRipple} from '../ripple/ripple.js';\nimport {createClassMapDirective} from '../shared/directives.js';\nimport {isDisabled, PSEUDO_CLASSES} from '../shared/pseudo-classes.js';\n\n/** Button color configuration types. */\nexport type ButtonColor = 'filled' | 'elevated' | 'tonal' | 'outlined' | 'text';\n\n/** Button color configurations. */\nexport const BUTTON_COLORS = {\n filled: 'filled',\n elevated: 'elevated',\n tonal: 'tonal',\n outlined: 'outlined',\n text: 'text',\n} as const;\n\n/** Button size configuration types. */\nexport type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Button size configurations. */\nexport const BUTTON_SIZES = {\n xs: 'xs',\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n xl: 'xl',\n} as const;\n\n/** Button classes. */\nexport const BUTTON_CLASSES = {\n btn: 'btn',\n btnFilled: 'btn-filled',\n btnElevated: 'btn-elevated',\n btnTonal: 'btn-tonal',\n btnOutlined: 'btn-outlined',\n btnText: 'btn-text',\n btnXs: 'btn-xs',\n btnSm: 'btn-sm',\n btnMd: 'btn-md',\n btnLg: 'btn-lg',\n btnXl: 'btn-xl',\n btnSquare: 'btn-square',\n btnUnselected: 'btn-unselected',\n btnSelected: 'btn-selected',\n active: PSEUDO_CLASSES.active,\n disabled: PSEUDO_CLASSES.disabled,\n};\n\n/** The state provided to the `buttonClasses()` function. */\nexport interface ButtonClassesState {\n /** The color of the button. */\n color?: ButtonColor;\n /** The size of the button. */\n size?: ButtonSize;\n /** Whether the button is a square shape. */\n square?: boolean;\n /** Whether the toggle button is selected, if not undefined. */\n selected?: boolean;\n /** Emulates `:active`. */\n active?: boolean;\n /** Emulates `:disabled`. */\n disabled?: boolean;\n}\n\n/**\n * Returns the button classes to apply to an element based on the given state.\n *\n * @param state The state of the button.\n * @return An object of class names and truthy values if they apply.\n */\nexport function buttonClasses({\n color,\n size,\n square = false,\n selected,\n active = false,\n disabled = false,\n}: ButtonClassesState = {}): ClassInfo {\n return {\n ...rippleClasses(),\n ...focusRingClasses(),\n [BUTTON_CLASSES.btn]: true,\n [BUTTON_CLASSES.btnFilled]: color === BUTTON_COLORS.filled,\n [BUTTON_CLASSES.btnElevated]: color === BUTTON_COLORS.elevated,\n [BUTTON_CLASSES.btnTonal]: color === BUTTON_COLORS.tonal,\n [BUTTON_CLASSES.btnOutlined]: color === BUTTON_COLORS.outlined,\n [BUTTON_CLASSES.btnText]: color === BUTTON_COLORS.text || !color,\n [BUTTON_CLASSES.btnXs]: size === BUTTON_SIZES.xs,\n [BUTTON_CLASSES.btnSm]: size === BUTTON_SIZES.sm || !size,\n [BUTTON_CLASSES.btnMd]: size === BUTTON_SIZES.md,\n [BUTTON_CLASSES.btnLg]: size === BUTTON_SIZES.lg,\n [BUTTON_CLASSES.btnXl]: size === BUTTON_SIZES.xl,\n [BUTTON_CLASSES.btnSquare]: square,\n [BUTTON_CLASSES.btnUnselected]: selected === false,\n [BUTTON_CLASSES.btnSelected]: selected === true,\n [BUTTON_CLASSES.active]: active,\n [BUTTON_CLASSES.disabled]: disabled,\n };\n}\n\n/**\n * Sets up button functionality for the given element.\n *\n * @param button The element on which to set up button functionality.\n * @param opts Setup options, supports a cleanup `signal`.\n */\nexport function setupButton(\n button: HTMLElement,\n opts?: {signal?: AbortSignal},\n): void {\n setupDispatchHooks(button, 'click');\n setupRipple(button, opts);\n button.addEventListener(\n 'click',\n (event) => {\n // When disabled, explicitly prevent the click from propagating to other\n // event listeners as well as prevent the default action. This is because\n // the underlying element may not actually be `:disabled`, such as an\n // anchor tag or a soft-disabled button.\n if (isDisabled(button)) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n afterDispatch(event, () => {\n const isToggle =\n button.hasAttribute('aria-pressed') ||\n button.matches(\n `.${BUTTON_CLASSES.btnSelected},.${BUTTON_CLASSES.btnUnselected}`,\n );\n if (event.defaultPrevented || !isToggle) {\n return;\n }\n\n const isPressed = button.ariaPressed === 'true';\n button.ariaPressed = String(!isPressed);\n // Mimic native browser input and change event behavior.\n button.dispatchEvent(\n new InputEvent('input', {bubbles: true, composed: true}),\n );\n button.dispatchEvent(new Event('change', {bubbles: true}));\n });\n },\n opts,\n );\n}\n\n/**\n * A Lit directive that adds button styling and functionality to its element.\n *\n * @example\n * ```ts\n * html`<button class=\"${button({color: 'filled'})}\">Filled</button>`;\n * ```\n */\nexport const button = createClassMapDirective({\n getClasses: buttonClasses,\n setupElement: setupButton,\n});\n"]}
1
+ {"version":3,"file":"button.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I,EAAE,OAAO,EAAE,IAAI,EAAC,CACzB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,uBAAuB,CAAC;IAC5C,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,WAAW;CAC1B,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {type ClassInfo} from 'lit/directives/class-map.js';\nimport {\n afterDispatch,\n setupDispatchHooks,\n} from '../../../../internal/events/dispatch-hooks.js';\nimport {focusRingClasses} from '../focus/focus-ring.js';\nimport {rippleClasses, setupRipple} from '../ripple/ripple.js';\nimport {createClassMapDirective} from '../shared/directives.js';\nimport {isDisabled, PSEUDO_CLASSES} from '../shared/pseudo-classes.js';\n\n/** Button color configuration types. */\nexport type ButtonColor = 'filled' | 'elevated' | 'tonal' | 'outlined' | 'text';\n\n/** Button color configurations. */\nexport const BUTTON_COLORS = {\n filled: 'filled',\n elevated: 'elevated',\n tonal: 'tonal',\n outlined: 'outlined',\n text: 'text',\n} as const;\n\n/** Button size configuration types. */\nexport type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Button size configurations. */\nexport const BUTTON_SIZES = {\n xs: 'xs',\n sm: 'sm',\n md: 'md',\n lg: 'lg',\n xl: 'xl',\n} as const;\n\n/** Button classes. */\nexport const BUTTON_CLASSES = {\n btn: 'btn',\n btnFilled: 'btn-filled',\n btnElevated: 'btn-elevated',\n btnTonal: 'btn-tonal',\n btnOutlined: 'btn-outlined',\n btnText: 'btn-text',\n btnXs: 'btn-xs',\n btnSm: 'btn-sm',\n btnMd: 'btn-md',\n btnLg: 'btn-lg',\n btnXl: 'btn-xl',\n btnSquare: 'btn-square',\n btnUnselected: 'btn-unselected',\n btnSelected: 'btn-selected',\n active: PSEUDO_CLASSES.active,\n disabled: PSEUDO_CLASSES.disabled,\n};\n\n/** The state provided to the `buttonClasses()` function. */\nexport interface ButtonClassesState {\n /** The color of the button. */\n color?: ButtonColor;\n /** The size of the button. */\n size?: ButtonSize;\n /** Whether the button is a square shape. */\n square?: boolean;\n /** Whether the toggle button is selected, if not undefined. */\n selected?: boolean;\n /** Emulates `:active`. */\n active?: boolean;\n /** Emulates `:disabled`. */\n disabled?: boolean;\n}\n\n/**\n * Returns the button classes to apply to an element based on the given state.\n *\n * @param state The state of the button.\n * @return An object of class names and truthy values if they apply.\n */\nexport function buttonClasses({\n color,\n size,\n square = false,\n selected,\n active = false,\n disabled = false,\n}: ButtonClassesState = {}): ClassInfo {\n return {\n ...rippleClasses(),\n ...focusRingClasses(),\n [BUTTON_CLASSES.btn]: true,\n [BUTTON_CLASSES.btnFilled]: color === BUTTON_COLORS.filled,\n [BUTTON_CLASSES.btnElevated]: color === BUTTON_COLORS.elevated,\n [BUTTON_CLASSES.btnTonal]: color === BUTTON_COLORS.tonal,\n [BUTTON_CLASSES.btnOutlined]: color === BUTTON_COLORS.outlined,\n [BUTTON_CLASSES.btnText]: color === BUTTON_COLORS.text || !color,\n [BUTTON_CLASSES.btnXs]: size === BUTTON_SIZES.xs,\n [BUTTON_CLASSES.btnSm]: size === BUTTON_SIZES.sm || !size,\n [BUTTON_CLASSES.btnMd]: size === BUTTON_SIZES.md,\n [BUTTON_CLASSES.btnLg]: size === BUTTON_SIZES.lg,\n [BUTTON_CLASSES.btnXl]: size === BUTTON_SIZES.xl,\n [BUTTON_CLASSES.btnSquare]: square,\n [BUTTON_CLASSES.btnUnselected]: selected === false,\n [BUTTON_CLASSES.btnSelected]: selected === true,\n [BUTTON_CLASSES.active]: active,\n [BUTTON_CLASSES.disabled]: disabled,\n };\n}\n\n/**\n * Sets up button functionality for the given element.\n *\n * @param button The element on which to set up button functionality.\n * @param opts Setup options, supports a cleanup `signal`.\n */\nexport function setupButton(\n button: HTMLElement,\n opts?: {signal?: AbortSignal},\n): void {\n setupDispatchHooks(button, 'click');\n setupRipple(button, opts);\n button.addEventListener(\n 'click',\n (event) => {\n // When disabled, explicitly prevent the click from propagating to other\n // event listeners as well as prevent the default action. This is because\n // the underlying element may not actually be `:disabled`, such as an\n // anchor tag or a soft-disabled button.\n if (isDisabled(button)) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n afterDispatch(event, () => {\n const isToggle =\n button.hasAttribute('aria-pressed') ||\n button.matches(\n `.${BUTTON_CLASSES.btnSelected},.${BUTTON_CLASSES.btnUnselected}`,\n );\n if (event.defaultPrevented || !isToggle) {\n return;\n }\n\n const isPressed = button.ariaPressed === 'true';\n button.ariaPressed = String(!isPressed);\n // Mimic native browser input and change event behavior.\n button.dispatchEvent(\n new InputEvent('input', {bubbles: true, composed: true}),\n );\n button.dispatchEvent(new Event('change', {bubbles: true}));\n });\n },\n {...opts, capture: true},\n );\n}\n\n/**\n * A Lit directive that adds button styling and functionality to its element.\n *\n * @example\n * ```ts\n * html`<button class=\"${button({color: 'filled'})}\">Filled</button>`;\n * ```\n */\nexport const button = createClassMapDirective({\n getClasses: buttonClasses,\n setupElement: setupButton,\n});\n"]}
@@ -11,6 +11,9 @@
11
11
  @layer md.comp.button {
12
12
  .btn {
13
13
  @include button-tokens.root;
14
+ &:where(.btn-unselected, [aria-pressed='false']) {
15
+ @include button-tokens.unselected;
16
+ }
14
17
  &:is(.btn-selected, [aria-pressed='true']) {
15
18
  @include button-tokens.selected;
16
19
  }
@@ -37,12 +40,6 @@
37
40
  }
38
41
  &.btn-outlined {
39
42
  @include button-tokens.outlined;
40
- &:where(.btn-lg) {
41
- @include button-tokens.outlined-lg;
42
- }
43
- &:where(.btn-xl) {
44
- @include button-tokens.outlined-xl;
45
- }
46
43
  &:where(.btn-selected, [aria-pressed='true']) {
47
44
  @include button-tokens.outlined-selected;
48
45
  }
@@ -89,7 +86,9 @@
89
86
  @include button-tokens.square-selected;
90
87
  }
91
88
  }
92
- &:is(:active, .active):where(:not(:disabled, .disabled)) {
89
+ &:is(:active, .active):where(
90
+ :not(:disabled, .disabled, [aria-disabled='true'])
91
+ ) {
93
92
  @include button-tokens.pressed;
94
93
  &:where(.btn-md) {
95
94
  @include button-tokens.pressed-md;
@@ -101,8 +100,13 @@
101
100
  @include button-tokens.pressed-xl;
102
101
  }
103
102
  }
104
- &:is(:disabled, .disabled) {
103
+ &:is(:disabled, .disabled, [aria-disabled='true']) {
105
104
  @include button-tokens.disabled;
105
+ --disabled: true;
106
+
107
+ &:where(.btn-outlined:not(.btn-selected, [aria-pressed='true'])) {
108
+ @include button-tokens.outlined-disabled;
109
+ }
106
110
  }
107
111
 
108
112
  & {
@@ -119,14 +123,20 @@
119
123
  color: var(--label-text-color);
120
124
  font: var(--label-text);
121
125
  letter-spacing: var(--label-text-tracking);
126
+ font-variation-settings: var(--label-text-axes);
127
+ -webkit-font-smoothing: antialiased;
122
128
  transition:
123
129
  border-radius 350ms cubic-bezier(0.42, 1.67, 0.21, 0.9),
124
130
  var(--ripple-transition);
125
131
  --md-icon-color: var(--icon-color);
126
132
  --md-icon-size: var(--icon-size);
127
133
  }
128
- &:not(:disabled, .disabled) {
134
+ &:not(:disabled, .disabled, [aria-disabled='true']) {
129
135
  cursor: pointer;
130
136
  }
137
+ &:has(.fx-playing) {
138
+ --outline-color: transparent;
139
+ --container-elevation: none;
140
+ }
131
141
  }
132
142
  }
@@ -0,0 +1,124 @@
1
+ //
2
+ // Copyright 2026 Google LLC
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ //
5
+
6
+ @mixin root {
7
+ // LINT.IfChange
8
+ --between-space: 8px;
9
+ --pressed-item-size: size;
10
+ --pressed-item-width-multiplier: 1.15;
11
+ --motion-spring-fast-spatial: linear(
12
+ 0,
13
+ 0.099,
14
+ 0.317,
15
+ 0.561,
16
+ 0.775,
17
+ 0.934,
18
+ 1.034,
19
+ 1.083,
20
+ 1.095,
21
+ 1.084,
22
+ 1.063,
23
+ 1.04,
24
+ 1.02,
25
+ 1.005,
26
+ 0.996,
27
+ 0.992,
28
+ 0.991,
29
+ 0.992,
30
+ 0.994,
31
+ 0.996,
32
+ 1
33
+ );
34
+ --motion-spring-fast-spatial-duration: 350ms;
35
+ --inner-corner-size: var(--md-sys-shape-corner-sm);
36
+ --pressed-inner-corner-size: var(--md-sys-shape-corner-xs);
37
+ --outer-corner-size: calc(var(--container-height) / 2);
38
+ --outer-corner-square-size: var(--md-sys-shape-corner-sm);
39
+ // LINT.ThenChange(button-group-element.ts) keep in sync with `@cssprop` jsdoc tags
40
+ }
41
+
42
+ @mixin standard-xs {
43
+ --between-space: 18px;
44
+ }
45
+
46
+ @mixin standard-sm {
47
+ --between-space: 12px;
48
+ }
49
+
50
+ @mixin standard-md {
51
+ --between-space: 8px;
52
+ }
53
+
54
+ @mixin standard-lg {
55
+ --between-space: 8px;
56
+ }
57
+
58
+ @mixin standard-xl {
59
+ --between-space: 8px;
60
+ }
61
+
62
+ @mixin connected {
63
+ --between-space: 2px;
64
+ }
65
+
66
+ @mixin inner-corner-xs {
67
+ // Design override of GM3 v35: inner corners for XS are 4px (corner-xs)
68
+ --inner-corner-size: var(--md-sys-shape-corner-xs);
69
+ --pressed-inner-corner-size: var(--md-sys-shape-corner-xs);
70
+ }
71
+
72
+ @mixin inner-corner-sm {
73
+ --inner-corner-size: var(--md-sys-shape-corner-sm);
74
+ --pressed-inner-corner-size: var(--md-sys-shape-corner-xs);
75
+ }
76
+
77
+ @mixin inner-corner-md {
78
+ --inner-corner-size: var(--md-sys-shape-corner-sm);
79
+ --pressed-inner-corner-size: var(--md-sys-shape-corner-xs);
80
+ }
81
+
82
+ @mixin inner-corner-lg {
83
+ --inner-corner-size: var(--md-sys-shape-corner-lg);
84
+ --pressed-inner-corner-size: var(--md-sys-shape-corner-md);
85
+ }
86
+
87
+ @mixin inner-corner-xl {
88
+ --inner-corner-size: var(--md-sys-shape-corner-lg-increased);
89
+ --pressed-inner-corner-size: var(--md-sys-shape-corner-lg);
90
+ }
91
+
92
+ @mixin outer-corner-round {
93
+ --outer-corner-size: calc(var(--container-height) / 2);
94
+ }
95
+
96
+ @mixin outer-corner-square-xs {
97
+ // Design override of GM3 v35: outer corner square XS is 4px (corner-xs)
98
+ --outer-corner-square-size: var(--md-sys-shape-corner-xs);
99
+ --outer-corner-size: var(--md-sys-shape-corner-xs);
100
+ }
101
+
102
+ @mixin outer-corner-square-sm {
103
+ // Design override of GM3 v35: outer corner square SM is 8px (corner-sm)
104
+ --outer-corner-square-size: var(--md-sys-shape-corner-sm);
105
+ --outer-corner-size: var(--md-sys-shape-corner-sm);
106
+ }
107
+
108
+ @mixin outer-corner-square-md {
109
+ // Design override of GM3 v35: outer corner square MD is 8px (corner-sm)
110
+ --outer-corner-square-size: var(--md-sys-shape-corner-sm);
111
+ --outer-corner-size: var(--md-sys-shape-corner-sm);
112
+ }
113
+
114
+ @mixin outer-corner-square-lg {
115
+ // Design override of GM3 v35: outer corner square LG is 16px (corner-lg)
116
+ --outer-corner-square-size: var(--md-sys-shape-corner-lg);
117
+ --outer-corner-size: var(--md-sys-shape-corner-lg);
118
+ }
119
+
120
+ @mixin outer-corner-square-xl {
121
+ // Design override of GM3 v35: outer corner square XL is 20px (corner-lg-increased)
122
+ --outer-corner-square-size: var(--md-sys-shape-corner-lg-increased);
123
+ --outer-corner-size: var(--md-sys-shape-corner-lg-increased);
124
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CSSResultOrNative, LitElement, PropertyValues } from 'lit';
7
+ import { type ButtonElement } from '../button/button-element.js';
8
+ import { type ButtonGroupSelection, type ButtonGroupVariant } from './button-group.js';
9
+ declare const baseClass: import("@material/web/labs/behaviors/mixin.js").MixinReturn<typeof LitElement, import("../../../behaviors/element-internals.js").WithElementInternals>;
10
+ /**
11
+ * A Material Design button group component.
12
+ *
13
+ * @slot - Used to display buttons.
14
+ * @fires {InputEvent} input - Fired when selection changes. --bubbles --composed
15
+ * @fires {Event} change - Fired when selection changes. --bubbles
16
+ * @cssprop --between-space
17
+ * @cssprop --pressed-item-size
18
+ * @cssprop --pressed-item-width-multiplier
19
+ * @cssprop --motion-spring-fast-spatial
20
+ * @cssprop --motion-spring-fast-spatial-duration
21
+ * @cssprop --inner-corner-size
22
+ * @cssprop --pressed-inner-corner-size
23
+ * @cssprop --outer-corner-size
24
+ * @cssprop --outer-corner-square-size
25
+ */
26
+ export declare class ButtonGroupElement extends baseClass {
27
+ /** @nocollapse */
28
+ static styles: CSSResultOrNative[];
29
+ constructor();
30
+ /** The visual variant of the button group. */
31
+ variant: ButtonGroupVariant;
32
+ /** The selection mode. */
33
+ selection: ButtonGroupSelection;
34
+ /** Whether selection is required in single-select mode. */
35
+ required: boolean;
36
+ /** Whether the button group is disabled. */
37
+ disabled: boolean;
38
+ private readonly assignedElementsList;
39
+ private readonly groupDisabledButtons;
40
+ private readonly pressedSizeStyleSheet;
41
+ private readonly childObserver;
42
+ /** Returns all child `md-gb-button` elements. */
43
+ get buttons(): ButtonElement[];
44
+ /** Returns currently selected buttons. */
45
+ get selectedButtons(): ButtonElement[];
46
+ /** Returns index of first selected button or -1. */
47
+ get selectedIndex(): number;
48
+ /** Returns indices of all selected buttons. */
49
+ get selectedIndices(): number[];
50
+ /** Value of the currently selected button (or first selected). */
51
+ get value(): string;
52
+ /** Silent setter for single-select mode. */
53
+ set value(val: string);
54
+ /** Values of all currently selected buttons. */
55
+ get values(): string[];
56
+ connectedCallback(): void;
57
+ disconnectedCallback(): void;
58
+ protected firstUpdated(changedProperties: PropertyValues<this>): void;
59
+ protected updated(changedProperties: PropertyValues<this>): void;
60
+ private syncSelectionFromChild;
61
+ private syncButtonsDisabledAndType;
62
+ private normalizeGroupSelection;
63
+ private syncPressedButtonSize;
64
+ private observeChildren;
65
+ protected handleSlotChange(): void;
66
+ protected render(): import("lit-html").TemplateResult<1>;
67
+ }
68
+ export {};
@@ -0,0 +1,320 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { __decorate } from "tslib";
7
+ import { html, LitElement } from 'lit';
8
+ import { property, queryAssignedElements } from 'lit/decorators.js';
9
+ import { internals, mixinElementInternals, } from '../../../behaviors/element-internals.js';
10
+ import { adoptStyles } from '../../styles/adopt-styles.js';
11
+ import { updateClassList } from '../shared/update-class-list.js';
12
+ import { buttonGroupClasses, normalizeSelection, shouldBlockToggle, } from './button-group.js';
13
+ import buttonGroupStyles from './button-group.css' with { type: 'css' }; // github-only
14
+ // import buttonGroupStyles from './button-group.cssresult.js'; // google3-only
15
+ // Separate variable needed for closure.
16
+ const baseClass = mixinElementInternals(LitElement);
17
+ /**
18
+ * A Material Design button group component.
19
+ *
20
+ * @slot - Used to display buttons.
21
+ * @fires {InputEvent} input - Fired when selection changes. --bubbles --composed
22
+ * @fires {Event} change - Fired when selection changes. --bubbles
23
+ * @cssprop --between-space
24
+ * @cssprop --pressed-item-size
25
+ * @cssprop --pressed-item-width-multiplier
26
+ * @cssprop --motion-spring-fast-spatial
27
+ * @cssprop --motion-spring-fast-spatial-duration
28
+ * @cssprop --inner-corner-size
29
+ * @cssprop --pressed-inner-corner-size
30
+ * @cssprop --outer-corner-size
31
+ * @cssprop --outer-corner-square-size
32
+ */
33
+ export class ButtonGroupElement extends baseClass {
34
+ constructor() {
35
+ super();
36
+ /** The visual variant of the button group. */
37
+ this.variant = 'standard';
38
+ /** The selection mode. */
39
+ this.selection = 'none';
40
+ /** Whether selection is required in single-select mode. */
41
+ this.required = false;
42
+ /** Whether the button group is disabled. */
43
+ this.disabled = false;
44
+ this.groupDisabledButtons = new WeakSet();
45
+ this.pressedSizeStyleSheet = new CSSStyleSheet();
46
+ this.childObserver = new MutationObserver((mutations) => {
47
+ for (const mutation of mutations) {
48
+ if (mutation.attributeName === 'class') {
49
+ this.syncPressedButtonSize();
50
+ }
51
+ else if (mutation.attributeName === 'selected') {
52
+ const target = mutation.target;
53
+ if (this.selection === 'single') {
54
+ if (target.selected) {
55
+ this.normalizeGroupSelection({ preferred: target });
56
+ }
57
+ else if (this.required) {
58
+ const anySelected = this.buttons.some((b) => b.selected);
59
+ if (!anySelected) {
60
+ this.normalizeGroupSelection();
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ });
67
+ this[internals].role = 'toolbar';
68
+ const handlePointerDown = (event) => {
69
+ const path = event.composedPath();
70
+ const button = this.buttons.find((b) => path.includes(b));
71
+ this.syncPressedButtonSize(button ?? null);
72
+ };
73
+ const handlePointerEnd = () => {
74
+ this.syncPressedButtonSize(null);
75
+ };
76
+ const handleClick = (event) => {
77
+ const path = event.composedPath();
78
+ const button = this.buttons.find((b) => path.includes(b));
79
+ if (!button)
80
+ return;
81
+ if (button.disabled || button.softDisabled) {
82
+ event.preventDefault();
83
+ event.stopImmediatePropagation();
84
+ return;
85
+ }
86
+ const index = this.buttons.indexOf(button);
87
+ if (shouldBlockToggle(this.buttons, index, {
88
+ selection: this.selection,
89
+ required: this.required,
90
+ })) {
91
+ event.preventDefault();
92
+ }
93
+ };
94
+ const handleInput = (event) => {
95
+ if (event.target === this)
96
+ return;
97
+ const path = event.composedPath();
98
+ const child = this.buttons.find((b) => path.includes(b));
99
+ if (!child || child.disabled || child.softDisabled)
100
+ return;
101
+ event.stopImmediatePropagation();
102
+ this.syncSelectionFromChild(child);
103
+ this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));
104
+ };
105
+ const handleChange = (event) => {
106
+ if (event.target === this)
107
+ return;
108
+ const path = event.composedPath();
109
+ const child = this.buttons.find((b) => path.includes(b));
110
+ if (!child || child.disabled || child.softDisabled)
111
+ return;
112
+ event.stopImmediatePropagation();
113
+ this.syncSelectionFromChild(child);
114
+ this.dispatchEvent(new Event('change', { bubbles: true }));
115
+ };
116
+ this.addEventListener('pointerdown', handlePointerDown);
117
+ this.addEventListener('pointerup', handlePointerEnd);
118
+ this.addEventListener('pointercancel', handlePointerEnd);
119
+ this.addEventListener('pointerleave', handlePointerEnd);
120
+ this.addEventListener('click', handleClick);
121
+ this.addEventListener('input', handleInput);
122
+ this.addEventListener('change', handleChange);
123
+ }
124
+ /** Returns all child `md-gb-button` elements. */
125
+ get buttons() {
126
+ return this.assignedElementsList.filter((node) => node.localName === 'md-gb-button');
127
+ }
128
+ /** Returns currently selected buttons. */
129
+ get selectedButtons() {
130
+ return this.buttons.filter((b) => b.selected);
131
+ }
132
+ /** Returns index of first selected button or -1. */
133
+ get selectedIndex() {
134
+ return this.buttons.findIndex((b) => b.selected);
135
+ }
136
+ /** Returns indices of all selected buttons. */
137
+ get selectedIndices() {
138
+ const indices = [];
139
+ const buttons = this.buttons;
140
+ for (let i = 0; i < buttons.length; i++) {
141
+ if (buttons[i].selected) {
142
+ indices.push(i);
143
+ }
144
+ }
145
+ return indices;
146
+ }
147
+ /** Value of the currently selected button (or first selected). */
148
+ get value() {
149
+ return this.selectedButtons[0]?.value ?? '';
150
+ }
151
+ /** Silent setter for single-select mode. */
152
+ set value(val) {
153
+ if (this.selection !== 'single')
154
+ return;
155
+ for (const b of this.buttons) {
156
+ b.selected = b.value === val;
157
+ }
158
+ this.normalizeGroupSelection();
159
+ }
160
+ /** Values of all currently selected buttons. */
161
+ get values() {
162
+ return this.selectedButtons.map((b) => b.value);
163
+ }
164
+ connectedCallback() {
165
+ super.connectedCallback();
166
+ adoptStyles(this, buttonGroupStyles);
167
+ adoptStyles(this.shadowRoot, this.pressedSizeStyleSheet);
168
+ updateClassList(this, buttonGroupClasses({
169
+ variant: this.variant,
170
+ disabled: this.disabled,
171
+ }));
172
+ if (this.hasUpdated) {
173
+ this.observeChildren();
174
+ }
175
+ }
176
+ disconnectedCallback() {
177
+ super.disconnectedCallback();
178
+ this.childObserver.disconnect();
179
+ }
180
+ firstUpdated(changedProperties) {
181
+ super.firstUpdated(changedProperties);
182
+ adoptStyles(this.shadowRoot, this.pressedSizeStyleSheet);
183
+ this.syncButtonsDisabledAndType();
184
+ this.normalizeGroupSelection();
185
+ this.observeChildren();
186
+ }
187
+ updated(changedProperties) {
188
+ super.updated(changedProperties);
189
+ if (!this.hasAttribute('focusgroup')) {
190
+ this.setAttribute('focusgroup', 'toolbar wrap inline');
191
+ }
192
+ if (changedProperties.has('variant') || changedProperties.has('disabled')) {
193
+ updateClassList(this, buttonGroupClasses({
194
+ variant: this.variant,
195
+ disabled: this.disabled,
196
+ }));
197
+ }
198
+ if (changedProperties.has('selection') ||
199
+ changedProperties.has('disabled')) {
200
+ this.syncButtonsDisabledAndType();
201
+ }
202
+ if (changedProperties.has('selection') ||
203
+ changedProperties.has('required')) {
204
+ this.normalizeGroupSelection();
205
+ this.observeChildren();
206
+ }
207
+ }
208
+ syncSelectionFromChild(child) {
209
+ // ButtonElement updates its own `selected` property on the `change` event;
210
+ // during an `input` event, the custom element's `selected` property has not
211
+ // yet been updated by its internal listener, so we inspect `aria-pressed` on
212
+ // the inner button element to capture the immediate interactive toggle state.
213
+ const innerBtn = child.shadowRoot?.querySelector('[part="btn"]');
214
+ if (innerBtn) {
215
+ const isPressed = innerBtn.getAttribute('aria-pressed') === 'true' ||
216
+ innerBtn.ariaPressed === 'true';
217
+ child.selected = isPressed;
218
+ }
219
+ if (this.selection === 'single') {
220
+ if (child.selected) {
221
+ for (const button of this.buttons) {
222
+ if (button !== child) {
223
+ button.selected = false;
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+ syncButtonsDisabledAndType() {
230
+ const buttons = this.buttons;
231
+ for (const button of buttons) {
232
+ const hasHref = button.hasAttribute('href') || Boolean(button.href);
233
+ if (!hasHref) {
234
+ const targetType = this.selection === 'none' ? 'button' : 'toggle';
235
+ button.setAttribute('type', targetType);
236
+ }
237
+ if (this.disabled) {
238
+ if (!button.disabled) {
239
+ this.groupDisabledButtons.add(button);
240
+ button.disabled = true;
241
+ }
242
+ }
243
+ else {
244
+ if (this.groupDisabledButtons.has(button)) {
245
+ this.groupDisabledButtons.delete(button);
246
+ button.disabled = false;
247
+ }
248
+ }
249
+ }
250
+ }
251
+ normalizeGroupSelection(options = {}) {
252
+ normalizeSelection(this.buttons, {
253
+ selection: this.selection,
254
+ required: this.required,
255
+ preferred: options.preferred,
256
+ });
257
+ this.childObserver.takeRecords();
258
+ }
259
+ syncPressedButtonSize(pressedButton) {
260
+ if (this.variant === 'connected' || this.disabled) {
261
+ this.pressedSizeStyleSheet.replaceSync('');
262
+ return;
263
+ }
264
+ const activeButton = pressedButton !== undefined
265
+ ? pressedButton
266
+ : (this.buttons.find((b) => !b.disabled &&
267
+ !b.softDisabled &&
268
+ (b.classList.contains('active') || b.matches(':active'))) ?? null);
269
+ if (!activeButton || activeButton.disabled || activeButton.softDisabled) {
270
+ this.pressedSizeStyleSheet.replaceSync('');
271
+ return;
272
+ }
273
+ this.pressedSizeStyleSheet.replaceSync(':host { --pressed-item-width-multiplier: 1 !important; ' +
274
+ '--motion-spring-fast-spatial-duration: 0s !important; }');
275
+ const width = activeButton.getBoundingClientRect().width;
276
+ if (width > 0) {
277
+ this.pressedSizeStyleSheet.replaceSync(`:host { --pressed-item-size: ${width}px !important; }`);
278
+ }
279
+ else {
280
+ this.pressedSizeStyleSheet.replaceSync('');
281
+ }
282
+ }
283
+ observeChildren() {
284
+ this.childObserver.disconnect();
285
+ for (const button of this.buttons) {
286
+ this.childObserver.observe(button, {
287
+ attributes: true,
288
+ attributeFilter: ['selected', 'class'],
289
+ });
290
+ }
291
+ }
292
+ handleSlotChange() {
293
+ this.syncButtonsDisabledAndType();
294
+ const selected = this.buttons.filter((b) => b.selected);
295
+ const preferred = selected[selected.length - 1];
296
+ this.normalizeGroupSelection({ preferred });
297
+ this.observeChildren();
298
+ }
299
+ render() {
300
+ return html `<slot @slotchange=${this.handleSlotChange}></slot>`;
301
+ }
302
+ }
303
+ /** @nocollapse */
304
+ ButtonGroupElement.styles = [buttonGroupStyles];
305
+ __decorate([
306
+ property({ reflect: true })
307
+ ], ButtonGroupElement.prototype, "variant", void 0);
308
+ __decorate([
309
+ property({ reflect: true })
310
+ ], ButtonGroupElement.prototype, "selection", void 0);
311
+ __decorate([
312
+ property({ type: Boolean, reflect: true })
313
+ ], ButtonGroupElement.prototype, "required", void 0);
314
+ __decorate([
315
+ property({ type: Boolean, reflect: true })
316
+ ], ButtonGroupElement.prototype, "disabled", void 0);
317
+ __decorate([
318
+ queryAssignedElements({ flatten: true })
319
+ ], ButtonGroupElement.prototype, "assignedElementsList", void 0);
320
+ //# sourceMappingURL=button-group-element.js.map