@material/web 2.4.2-nightly.a589695.0 → 2.4.2-nightly.b4af72e.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 (605) hide show
  1. package/button/elevated-button.js +3 -3
  2. package/button/elevated-button.js.map +1 -1
  3. package/button/filled-button.js +3 -3
  4. package/button/filled-button.js.map +1 -1
  5. package/button/filled-tonal-button.js +3 -3
  6. package/button/filled-tonal-button.js.map +1 -1
  7. package/button/internal/_touch-target.scss +1 -1
  8. package/button/internal/button.d.ts +0 -4
  9. package/button/internal/button.js.map +1 -1
  10. package/button/internal/shared-styles.css +1 -1
  11. package/button/internal/shared-styles.css.map +1 -1
  12. package/button/internal/shared-styles.cssresult.js +1 -1
  13. package/button/internal/shared-styles.cssresult.js.map +1 -1
  14. package/button/outlined-button.js +2 -2
  15. package/button/outlined-button.js.map +1 -1
  16. package/button/text-button.js +2 -2
  17. package/button/text-button.js.map +1 -1
  18. package/checkbox/checkbox.js +1 -1
  19. package/checkbox/checkbox.js.map +1 -1
  20. package/checkbox/internal/checkbox.d.ts +2 -2
  21. package/checkbox/internal/checkbox.js.map +1 -1
  22. package/chips/assist-chip.js +8 -4
  23. package/chips/assist-chip.js.map +1 -1
  24. package/chips/chip-set.js +1 -1
  25. package/chips/chip-set.js.map +1 -1
  26. package/chips/filter-chip.js +5 -5
  27. package/chips/filter-chip.js.map +1 -1
  28. package/chips/input-chip.js +4 -4
  29. package/chips/input-chip.js.map +1 -1
  30. package/chips/internal/chip.d.ts +2 -0
  31. package/chips/suggestion-chip.js +8 -4
  32. package/chips/suggestion-chip.js.map +1 -1
  33. package/custom-elements.json +45050 -0
  34. package/dialog/dialog.js +1 -1
  35. package/dialog/dialog.js.map +1 -1
  36. package/divider/divider.js +1 -1
  37. package/divider/divider.js.map +1 -1
  38. package/elevation/elevation.js +1 -1
  39. package/elevation/elevation.js.map +1 -1
  40. package/fab/branded-fab.js +3 -3
  41. package/fab/branded-fab.js.map +1 -1
  42. package/fab/fab.js +8 -4
  43. package/fab/fab.js.map +1 -1
  44. package/field/filled-field.js +2 -2
  45. package/field/filled-field.js.map +1 -1
  46. package/field/outlined-field.js +2 -2
  47. package/field/outlined-field.js.map +1 -1
  48. package/focus/md-focus-ring.js +1 -1
  49. package/focus/md-focus-ring.js.map +1 -1
  50. package/icon/icon.js +1 -1
  51. package/icon/icon.js.map +1 -1
  52. package/icon/internal/icon.d.ts +1 -1
  53. package/icon/internal/icon.js +1 -1
  54. package/icon/internal/icon.js.map +1 -1
  55. package/iconbutton/filled-icon-button.js +2 -2
  56. package/iconbutton/filled-icon-button.js.map +1 -1
  57. package/iconbutton/filled-tonal-icon-button.js +2 -2
  58. package/iconbutton/filled-tonal-icon-button.js.map +1 -1
  59. package/iconbutton/icon-button.js +2 -2
  60. package/iconbutton/icon-button.js.map +1 -1
  61. package/iconbutton/internal/icon-button.d.ts +0 -4
  62. package/iconbutton/internal/icon-button.js.map +1 -1
  63. package/iconbutton/outlined-icon-button.js +2 -2
  64. package/iconbutton/outlined-icon-button.js.map +1 -1
  65. package/internal/aria/aria.d.ts +1 -1
  66. package/internal/events/dispatch-hooks.js +31 -35
  67. package/internal/events/dispatch-hooks.js.map +1 -1
  68. package/labs/badge/badge.js +1 -1
  69. package/labs/badge/badge.js.map +1 -1
  70. package/labs/behaviors/form-associated.d.ts +0 -22
  71. package/labs/behaviors/form-associated.js +0 -11
  72. package/labs/behaviors/form-associated.js.map +1 -1
  73. package/labs/card/elevated-card.js +2 -2
  74. package/labs/card/elevated-card.js.map +1 -1
  75. package/labs/card/filled-card.js +2 -2
  76. package/labs/card/filled-card.js.map +1 -1
  77. package/labs/card/outlined-card.js +2 -2
  78. package/labs/card/outlined-card.js.map +1 -1
  79. package/labs/gb/components/badge/_badge-tokens.scss +18 -0
  80. package/labs/gb/components/badge/badge.css +4 -0
  81. package/labs/gb/components/badge/badge.css.map +1 -0
  82. package/labs/gb/components/badge/badge.cssresult.js +14 -0
  83. package/labs/gb/components/badge/badge.cssresult.js.map +1 -0
  84. package/labs/gb/components/badge/badge.d.ts +32 -0
  85. package/labs/gb/components/badge/badge.js +35 -0
  86. package/labs/gb/components/badge/badge.js.map +1 -0
  87. package/labs/gb/components/badge/badge.scss +49 -0
  88. package/labs/gb/components/badge/md-badge.d.ts +21 -0
  89. package/labs/gb/components/badge/md-badge.js +53 -0
  90. package/labs/gb/components/badge/md-badge.js.map +1 -0
  91. package/labs/gb/components/button/_button-tokens.scss +194 -0
  92. package/labs/gb/components/button/button.css +4 -0
  93. package/labs/gb/components/button/button.css.map +1 -0
  94. package/labs/gb/components/button/button.cssresult.js +14 -0
  95. package/labs/gb/components/button/button.cssresult.js.map +1 -0
  96. package/labs/gb/components/button/button.d.ts +85 -0
  97. package/labs/gb/components/button/button.js +119 -0
  98. package/labs/gb/components/button/button.js.map +1 -0
  99. package/labs/gb/components/button/button.scss +132 -0
  100. package/labs/gb/components/button/md-button.d.ts +104 -0
  101. package/labs/gb/components/button/md-button.js +283 -0
  102. package/labs/gb/components/button/md-button.js.map +1 -0
  103. package/labs/gb/components/card/_card-tokens.scss +56 -0
  104. package/labs/gb/components/card/card.css +4 -0
  105. package/labs/gb/components/card/card.css.map +1 -0
  106. package/labs/gb/components/card/card.cssresult.js +14 -0
  107. package/labs/gb/components/card/card.cssresult.js.map +1 -0
  108. package/labs/gb/components/card/card.d.ts +57 -0
  109. package/labs/gb/components/card/card.js +58 -0
  110. package/labs/gb/components/card/card.js.map +1 -0
  111. package/labs/gb/components/card/card.scss +74 -0
  112. package/labs/gb/components/card/md-card.d.ts +49 -0
  113. package/labs/gb/components/card/md-card.js +173 -0
  114. package/labs/gb/components/card/md-card.js.map +1 -0
  115. package/labs/gb/components/checkbox/_checkbox-tokens.scss +66 -0
  116. package/labs/gb/components/checkbox/checkbox.css +4 -0
  117. package/labs/gb/components/checkbox/checkbox.css.map +1 -0
  118. package/labs/gb/components/checkbox/checkbox.cssresult.js +14 -0
  119. package/labs/gb/components/checkbox/checkbox.cssresult.js.map +1 -0
  120. package/labs/gb/components/checkbox/checkbox.d.ts +59 -0
  121. package/labs/gb/components/checkbox/checkbox.js +62 -0
  122. package/labs/gb/components/checkbox/checkbox.js.map +1 -0
  123. package/labs/gb/components/checkbox/checkbox.scss +105 -0
  124. package/labs/gb/components/checkbox/md-checkbox.d.ts +90 -0
  125. package/labs/gb/components/checkbox/md-checkbox.js +188 -0
  126. package/labs/gb/components/checkbox/md-checkbox.js.map +1 -0
  127. package/labs/gb/components/divider/_divider-tokens.scss +11 -0
  128. package/labs/gb/components/divider/divider.css +4 -0
  129. package/labs/gb/components/divider/divider.css.map +1 -0
  130. package/labs/gb/components/divider/divider.cssresult.js +14 -0
  131. package/labs/gb/components/divider/divider.cssresult.js.map +1 -0
  132. package/labs/gb/components/divider/divider.d.ts +44 -0
  133. package/labs/gb/components/divider/divider.js +47 -0
  134. package/labs/gb/components/divider/divider.js.map +1 -0
  135. package/labs/gb/components/divider/divider.scss +31 -0
  136. package/labs/gb/components/divider/md-divider.d.ts +27 -0
  137. package/labs/gb/components/divider/md-divider.js +55 -0
  138. package/labs/gb/components/divider/md-divider.js.map +1 -0
  139. package/labs/gb/components/fab/_fab-tokens.scss +86 -0
  140. package/labs/gb/components/fab/fab.css +4 -0
  141. package/labs/gb/components/fab/fab.css.map +1 -0
  142. package/labs/gb/components/fab/fab.cssresult.js +14 -0
  143. package/labs/gb/components/fab/fab.cssresult.js.map +1 -0
  144. package/labs/gb/components/fab/fab.d.ts +84 -0
  145. package/labs/gb/components/fab/fab.js +92 -0
  146. package/labs/gb/components/fab/fab.js.map +1 -0
  147. package/labs/gb/components/fab/fab.scss +77 -0
  148. package/labs/gb/components/fab/md-fab.d.ts +37 -0
  149. package/labs/gb/components/fab/md-fab.js +71 -0
  150. package/labs/gb/components/fab/md-fab.js.map +1 -0
  151. package/labs/gb/components/focus/focus-ring.css +4 -0
  152. package/labs/gb/components/focus/focus-ring.css.map +1 -0
  153. package/labs/gb/components/focus/focus-ring.cssresult.js +14 -0
  154. package/labs/gb/components/focus/focus-ring.cssresult.js.map +1 -0
  155. package/labs/gb/components/focus/focus-ring.d.ts +36 -0
  156. package/labs/gb/components/focus/focus-ring.js +34 -0
  157. package/labs/gb/components/focus/focus-ring.js.map +1 -0
  158. package/labs/gb/components/focus/focus-ring.scss +91 -0
  159. package/labs/gb/components/iconbutton/_icon-button-tokens.scss +204 -0
  160. package/labs/gb/components/iconbutton/icon-button.css +4 -0
  161. package/labs/gb/components/iconbutton/icon-button.css.map +1 -0
  162. package/labs/gb/components/iconbutton/icon-button.cssresult.js +14 -0
  163. package/labs/gb/components/iconbutton/icon-button.cssresult.js.map +1 -0
  164. package/labs/gb/components/iconbutton/icon-button.d.ts +97 -0
  165. package/labs/gb/components/iconbutton/icon-button.js +122 -0
  166. package/labs/gb/components/iconbutton/icon-button.js.map +1 -0
  167. package/labs/gb/components/iconbutton/icon-button.scss +153 -0
  168. package/labs/gb/components/iconbutton/md-icon-button.d.ts +87 -0
  169. package/labs/gb/components/iconbutton/md-icon-button.js +190 -0
  170. package/labs/gb/components/iconbutton/md-icon-button.js.map +1 -0
  171. package/labs/gb/components/list/_list-tokens.scss +106 -0
  172. package/labs/gb/components/list/list.css +4 -0
  173. package/labs/gb/components/list/list.css.map +1 -0
  174. package/labs/gb/components/list/list.cssresult.js +14 -0
  175. package/labs/gb/components/list/list.cssresult.js.map +1 -0
  176. package/labs/gb/components/list/list.d.ts +103 -0
  177. package/labs/gb/components/list/list.js +109 -0
  178. package/labs/gb/components/list/list.js.map +1 -0
  179. package/labs/gb/components/list/list.scss +212 -0
  180. package/labs/gb/components/list/md-list-item.d.ts +83 -0
  181. package/labs/gb/components/list/md-list-item.js +161 -0
  182. package/labs/gb/components/list/md-list-item.js.map +1 -0
  183. package/labs/gb/components/list/md-list.d.ts +31 -0
  184. package/labs/gb/components/list/md-list.js +56 -0
  185. package/labs/gb/components/list/md-list.js.map +1 -0
  186. package/labs/gb/components/menu/_menu-tokens.scss +132 -0
  187. package/labs/gb/components/menu/md-menu-group.d.ts +28 -0
  188. package/labs/gb/components/menu/md-menu-group.js +69 -0
  189. package/labs/gb/components/menu/md-menu-group.js.map +1 -0
  190. package/labs/gb/components/menu/md-menu-item.d.ts +61 -0
  191. package/labs/gb/components/menu/md-menu-item.js +197 -0
  192. package/labs/gb/components/menu/md-menu-item.js.map +1 -0
  193. package/labs/gb/components/menu/md-menu.d.ts +38 -0
  194. package/labs/gb/components/menu/md-menu.js +151 -0
  195. package/labs/gb/components/menu/md-menu.js.map +1 -0
  196. package/labs/gb/components/menu/menu.css +4 -0
  197. package/labs/gb/components/menu/menu.css.map +1 -0
  198. package/labs/gb/components/menu/menu.cssresult.js +14 -0
  199. package/labs/gb/components/menu/menu.cssresult.js.map +1 -0
  200. package/labs/gb/components/menu/menu.d.ts +117 -0
  201. package/labs/gb/components/menu/menu.js +107 -0
  202. package/labs/gb/components/menu/menu.js.map +1 -0
  203. package/labs/gb/components/menu/menu.scss +171 -0
  204. package/labs/gb/components/radio/_radio-tokens.scss +39 -0
  205. package/labs/gb/components/radio/md-radio.d.ts +71 -0
  206. package/labs/gb/components/radio/md-radio.js +195 -0
  207. package/labs/gb/components/radio/md-radio.js.map +1 -0
  208. package/labs/gb/components/radio/radio.css +4 -0
  209. package/labs/gb/components/radio/radio.css.map +1 -0
  210. package/labs/gb/components/radio/radio.cssresult.js +14 -0
  211. package/labs/gb/components/radio/radio.cssresult.js.map +1 -0
  212. package/labs/gb/components/radio/radio.d.ts +57 -0
  213. package/labs/gb/components/radio/radio.js +62 -0
  214. package/labs/gb/components/radio/radio.js.map +1 -0
  215. package/labs/gb/components/radio/radio.scss +74 -0
  216. package/labs/gb/components/ripple/ripple.css +4 -0
  217. package/labs/gb/components/ripple/ripple.css.map +1 -0
  218. package/labs/gb/components/ripple/ripple.cssresult.js +14 -0
  219. package/labs/gb/components/ripple/ripple.cssresult.js.map +1 -0
  220. package/labs/gb/components/ripple/ripple.d.ts +77 -0
  221. package/labs/gb/components/ripple/ripple.js +148 -0
  222. package/labs/gb/components/ripple/ripple.js.map +1 -0
  223. package/labs/gb/components/ripple/ripple.scss +103 -0
  224. package/labs/gb/components/shared/directives.d.ts +93 -0
  225. package/labs/gb/components/shared/directives.js +111 -0
  226. package/labs/gb/components/shared/directives.js.map +1 -0
  227. package/labs/gb/components/shared/has-slotted.d.ts +10 -0
  228. package/labs/gb/components/shared/has-slotted.js +19 -0
  229. package/labs/gb/components/shared/has-slotted.js.map +1 -0
  230. package/labs/gb/components/shared/pseudo-classes.d.ts +33 -0
  231. package/labs/gb/components/shared/pseudo-classes.js +36 -0
  232. package/labs/gb/components/shared/pseudo-classes.js.map +1 -0
  233. package/labs/gb/components/splitbutton/_split-button-tokens.scss +139 -0
  234. package/labs/gb/components/splitbutton/md-split-button.d.ts +39 -0
  235. package/labs/gb/components/splitbutton/md-split-button.js +132 -0
  236. package/labs/gb/components/splitbutton/md-split-button.js.map +1 -0
  237. package/labs/gb/components/splitbutton/split-button.css +4 -0
  238. package/labs/gb/components/splitbutton/split-button.css.map +1 -0
  239. package/labs/gb/components/splitbutton/split-button.cssresult.js +14 -0
  240. package/labs/gb/components/splitbutton/split-button.cssresult.js.map +1 -0
  241. package/labs/gb/components/splitbutton/split-button.d.ts +47 -0
  242. package/labs/gb/components/splitbutton/split-button.js +46 -0
  243. package/labs/gb/components/splitbutton/split-button.js.map +1 -0
  244. package/labs/gb/components/splitbutton/split-button.scss +164 -0
  245. package/labs/gb/components/switch/_switch-tokens.scss +58 -0
  246. package/labs/gb/components/switch/md-switch.d.ts +84 -0
  247. package/labs/gb/components/switch/md-switch.js +180 -0
  248. package/labs/gb/components/switch/md-switch.js.map +1 -0
  249. package/labs/gb/components/switch/switch.css +4 -0
  250. package/labs/gb/components/switch/switch.css.map +1 -0
  251. package/labs/gb/components/switch/switch.cssresult.js +14 -0
  252. package/labs/gb/components/switch/switch.cssresult.js.map +1 -0
  253. package/labs/gb/components/switch/switch.d.ts +54 -0
  254. package/labs/gb/components/switch/switch.js +85 -0
  255. package/labs/gb/components/switch/switch.js.map +1 -0
  256. package/labs/gb/components/switch/switch.scss +109 -0
  257. package/labs/gb/styles/adopt-styles.d.ts +41 -0
  258. package/labs/gb/styles/adopt-styles.js +62 -0
  259. package/labs/gb/styles/adopt-styles.js.map +1 -0
  260. package/labs/gb/styles/color/internal/_color-tokens.scss +95 -0
  261. package/labs/gb/styles/color/md-color-tokens-full.css +4 -0
  262. package/labs/gb/styles/color/md-color-tokens-full.css.map +1 -0
  263. package/labs/gb/styles/color/md-color-tokens-full.cssresult.js +14 -0
  264. package/labs/gb/styles/color/md-color-tokens-full.cssresult.js.map +1 -0
  265. package/labs/gb/styles/color/md-color-tokens-full.scss +17 -0
  266. package/labs/gb/styles/color/md-color-tokens.css +4 -0
  267. package/labs/gb/styles/color/md-color-tokens.css.map +1 -0
  268. package/labs/gb/styles/color/md-color-tokens.cssresult.js +14 -0
  269. package/labs/gb/styles/color/md-color-tokens.cssresult.js.map +1 -0
  270. package/labs/gb/styles/color/md-color-tokens.scss +15 -0
  271. package/labs/gb/styles/elevation/md-elevation-tokens.css +4 -0
  272. package/labs/gb/styles/elevation/md-elevation-tokens.css.map +1 -0
  273. package/labs/gb/styles/elevation/md-elevation-tokens.cssresult.js +14 -0
  274. package/labs/gb/styles/elevation/md-elevation-tokens.cssresult.js.map +1 -0
  275. package/labs/gb/styles/elevation/md-elevation-tokens.scss +25 -0
  276. package/labs/gb/styles/icon/md-icon.css +4 -0
  277. package/labs/gb/styles/icon/md-icon.css.map +1 -0
  278. package/labs/gb/styles/icon/md-icon.cssresult.js +14 -0
  279. package/labs/gb/styles/icon/md-icon.cssresult.js.map +1 -0
  280. package/labs/gb/styles/icon/md-icon.d.ts +20 -0
  281. package/labs/gb/styles/icon/md-icon.js +27 -0
  282. package/labs/gb/styles/icon/md-icon.js.map +1 -0
  283. package/labs/gb/styles/icon/md-icon.scss +63 -0
  284. package/labs/gb/styles/m3.css +25 -0
  285. package/labs/gb/styles/m3.css.map +1 -0
  286. package/labs/gb/styles/m3.cssresult.js +35 -0
  287. package/labs/gb/styles/m3.cssresult.js.map +1 -0
  288. package/labs/gb/styles/m3.scss +14 -0
  289. package/labs/gb/styles/motion/md-motion-tokens-easing.css +4 -0
  290. package/labs/gb/styles/motion/md-motion-tokens-easing.css.map +1 -0
  291. package/labs/gb/styles/motion/md-motion-tokens-easing.cssresult.js +14 -0
  292. package/labs/gb/styles/motion/md-motion-tokens-easing.cssresult.js.map +1 -0
  293. package/labs/gb/styles/motion/md-motion-tokens-easing.scss +35 -0
  294. package/labs/gb/styles/shape/md-shape-tokens.css +4 -0
  295. package/labs/gb/styles/shape/md-shape-tokens.css.map +1 -0
  296. package/labs/gb/styles/shape/md-shape-tokens.cssresult.js +14 -0
  297. package/labs/gb/styles/shape/md-shape-tokens.cssresult.js.map +1 -0
  298. package/labs/gb/styles/shape/md-shape-tokens.scss +23 -0
  299. package/labs/gb/styles/space/md-space-tokens.css +4 -0
  300. package/labs/gb/styles/space/md-space-tokens.css.map +1 -0
  301. package/labs/gb/styles/space/md-space-tokens.cssresult.js +14 -0
  302. package/labs/gb/styles/space/md-space-tokens.cssresult.js.map +1 -0
  303. package/labs/gb/styles/space/md-space-tokens.scss +28 -0
  304. package/labs/gb/styles/tailwind.css +4 -0
  305. package/labs/gb/styles/tailwind.css.map +1 -0
  306. package/labs/gb/styles/tailwind.cssresult.js +14 -0
  307. package/labs/gb/styles/tailwind.cssresult.js.map +1 -0
  308. package/labs/gb/styles/tailwind.scss +349 -0
  309. package/labs/gb/styles/typography/internal/_typography-tokens.scss +149 -0
  310. package/labs/gb/styles/typography/md-typography-tokens.css +4 -0
  311. package/labs/gb/styles/typography/md-typography-tokens.css.map +1 -0
  312. package/labs/gb/styles/typography/md-typography-tokens.cssresult.js +14 -0
  313. package/labs/gb/styles/typography/md-typography-tokens.cssresult.js.map +1 -0
  314. package/labs/gb/styles/typography/md-typography-tokens.scss +14 -0
  315. package/labs/item/item.js +1 -1
  316. package/labs/item/item.js.map +1 -1
  317. package/labs/navigationbar/navigation-bar.js +1 -1
  318. package/labs/navigationbar/navigation-bar.js.map +1 -1
  319. package/labs/navigationdrawer/navigation-drawer-modal.js +2 -2
  320. package/labs/navigationdrawer/navigation-drawer-modal.js.map +1 -1
  321. package/labs/navigationdrawer/navigation-drawer.js +2 -2
  322. package/labs/navigationdrawer/navigation-drawer.js.map +1 -1
  323. package/labs/navigationtab/navigation-tab.js +1 -1
  324. package/labs/navigationtab/navigation-tab.js.map +1 -1
  325. package/labs/segmentedbutton/outlined-segmented-button.js +2 -2
  326. package/labs/segmentedbutton/outlined-segmented-button.js.map +1 -1
  327. package/labs/segmentedbuttonset/outlined-segmented-button-set.js +2 -2
  328. package/labs/segmentedbuttonset/outlined-segmented-button-set.js.map +1 -1
  329. package/list/internal/listitem/list-item.d.ts +6 -1
  330. package/list/internal/listitem/list-item.js +4 -1
  331. package/list/internal/listitem/list-item.js.map +1 -1
  332. package/list/list-item.js +1 -1
  333. package/list/list-item.js.map +1 -1
  334. package/list/list.js +1 -1
  335. package/list/list.js.map +1 -1
  336. package/menu/internal/menuitem/menu-item.d.ts +2 -0
  337. package/menu/internal/submenu/sub-menu.d.ts +5 -1
  338. package/menu/internal/submenu/sub-menu.js +5 -1
  339. package/menu/internal/submenu/sub-menu.js.map +1 -1
  340. package/menu/menu-item.js +1 -1
  341. package/menu/menu-item.js.map +1 -1
  342. package/menu/menu.js +1 -1
  343. package/menu/menu.js.map +1 -1
  344. package/menu/sub-menu.js +1 -1
  345. package/menu/sub-menu.js.map +1 -1
  346. package/package.json +54 -27
  347. package/progress/circular-progress.js +1 -1
  348. package/progress/circular-progress.js.map +1 -1
  349. package/progress/linear-progress.js +1 -1
  350. package/progress/linear-progress.js.map +1 -1
  351. package/radio/internal/radio.d.ts +0 -2
  352. package/radio/internal/radio.js.map +1 -1
  353. package/radio/radio.js +1 -1
  354. package/radio/radio.js.map +1 -1
  355. package/ripple/ripple.js +1 -1
  356. package/ripple/ripple.js.map +1 -1
  357. package/select/filled-select.js +2 -2
  358. package/select/filled-select.js.map +1 -1
  359. package/select/internal/select.d.ts +2 -2
  360. package/select/internal/select.js.map +1 -1
  361. package/select/internal/selectoption/select-option.d.ts +2 -0
  362. package/select/outlined-select.js +2 -2
  363. package/select/outlined-select.js.map +1 -1
  364. package/select/select-option.js +1 -1
  365. package/select/select-option.js.map +1 -1
  366. package/slider/internal/slider.d.ts +0 -2
  367. package/slider/internal/slider.js.map +1 -1
  368. package/slider/slider.js +2 -2
  369. package/slider/slider.js.map +1 -1
  370. package/switch/internal/_switch.scss +1 -0
  371. package/switch/internal/switch-styles.css +1 -1
  372. package/switch/internal/switch-styles.css.map +1 -1
  373. package/switch/internal/switch-styles.cssresult.js +1 -1
  374. package/switch/internal/switch-styles.cssresult.js.map +1 -1
  375. package/switch/internal/switch.d.ts +0 -2
  376. package/switch/internal/switch.js.map +1 -1
  377. package/switch/switch.js +1 -1
  378. package/switch/switch.js.map +1 -1
  379. package/tabs/primary-tab.js +2 -2
  380. package/tabs/primary-tab.js.map +1 -1
  381. package/tabs/secondary-tab.js +2 -2
  382. package/tabs/secondary-tab.js.map +1 -1
  383. package/tabs/tabs.js +1 -1
  384. package/tabs/tabs.js.map +1 -1
  385. package/textfield/filled-text-field.js +2 -2
  386. package/textfield/filled-text-field.js.map +1 -1
  387. package/textfield/outlined-text-field.js +2 -2
  388. package/textfield/outlined-text-field.js.map +1 -1
  389. package/types/css-imports.d.ts +12 -0
  390. package/typography/md-typescale-styles.d.ts +6 -3
  391. package/typography/md-typescale-styles.js +1 -5
  392. package/typography/md-typescale-styles.js.map +1 -1
  393. package/button/internal/elevated-styles.js +0 -11
  394. package/button/internal/elevated-styles.js.map +0 -1
  395. package/button/internal/filled-styles.js +0 -11
  396. package/button/internal/filled-styles.js.map +0 -1
  397. package/button/internal/filled-tonal-styles.js +0 -11
  398. package/button/internal/filled-tonal-styles.js.map +0 -1
  399. package/button/internal/outlined-styles.js +0 -11
  400. package/button/internal/outlined-styles.js.map +0 -1
  401. package/button/internal/shared-elevation-styles.js +0 -11
  402. package/button/internal/shared-elevation-styles.js.map +0 -1
  403. package/button/internal/shared-styles.js +0 -11
  404. package/button/internal/shared-styles.js.map +0 -1
  405. package/button/internal/text-styles.js +0 -11
  406. package/button/internal/text-styles.js.map +0 -1
  407. package/checkbox/internal/checkbox-styles.js +0 -11
  408. package/checkbox/internal/checkbox-styles.js.map +0 -1
  409. package/chips/internal/assist-styles.js +0 -11
  410. package/chips/internal/assist-styles.js.map +0 -1
  411. package/chips/internal/chip-set-styles.js +0 -11
  412. package/chips/internal/chip-set-styles.js.map +0 -1
  413. package/chips/internal/elevated-styles.js +0 -11
  414. package/chips/internal/elevated-styles.js.map +0 -1
  415. package/chips/internal/filter-styles.js +0 -11
  416. package/chips/internal/filter-styles.js.map +0 -1
  417. package/chips/internal/input-styles.js +0 -11
  418. package/chips/internal/input-styles.js.map +0 -1
  419. package/chips/internal/selectable-styles.js +0 -11
  420. package/chips/internal/selectable-styles.js.map +0 -1
  421. package/chips/internal/shared-styles.js +0 -11
  422. package/chips/internal/shared-styles.js.map +0 -1
  423. package/chips/internal/suggestion-styles.js +0 -11
  424. package/chips/internal/suggestion-styles.js.map +0 -1
  425. package/chips/internal/trailing-icon-styles.js +0 -11
  426. package/chips/internal/trailing-icon-styles.js.map +0 -1
  427. package/dialog/internal/dialog-styles.js +0 -11
  428. package/dialog/internal/dialog-styles.js.map +0 -1
  429. package/divider/internal/divider-styles.js +0 -11
  430. package/divider/internal/divider-styles.js.map +0 -1
  431. package/elevation/internal/elevation-styles.js +0 -11
  432. package/elevation/internal/elevation-styles.js.map +0 -1
  433. package/fab/internal/fab-branded-styles.js +0 -11
  434. package/fab/internal/fab-branded-styles.js.map +0 -1
  435. package/fab/internal/fab-styles.js +0 -11
  436. package/fab/internal/fab-styles.js.map +0 -1
  437. package/fab/internal/forced-colors-styles.js +0 -11
  438. package/fab/internal/forced-colors-styles.js.map +0 -1
  439. package/fab/internal/shared-styles.js +0 -11
  440. package/fab/internal/shared-styles.js.map +0 -1
  441. package/field/internal/filled-styles.d.ts +0 -3
  442. package/field/internal/filled-styles.js +0 -11
  443. package/field/internal/filled-styles.js.map +0 -1
  444. package/field/internal/outlined-styles.d.ts +0 -3
  445. package/field/internal/outlined-styles.js +0 -11
  446. package/field/internal/outlined-styles.js.map +0 -1
  447. package/field/internal/shared-styles.d.ts +0 -3
  448. package/field/internal/shared-styles.js +0 -11
  449. package/field/internal/shared-styles.js.map +0 -1
  450. package/focus/internal/focus-ring-styles.d.ts +0 -3
  451. package/focus/internal/focus-ring-styles.js +0 -11
  452. package/focus/internal/focus-ring-styles.js.map +0 -1
  453. package/icon/internal/icon-styles.d.ts +0 -3
  454. package/icon/internal/icon-styles.js +0 -11
  455. package/icon/internal/icon-styles.js.map +0 -1
  456. package/iconbutton/internal/filled-styles.d.ts +0 -3
  457. package/iconbutton/internal/filled-styles.js +0 -11
  458. package/iconbutton/internal/filled-styles.js.map +0 -1
  459. package/iconbutton/internal/filled-tonal-styles.d.ts +0 -3
  460. package/iconbutton/internal/filled-tonal-styles.js +0 -11
  461. package/iconbutton/internal/filled-tonal-styles.js.map +0 -1
  462. package/iconbutton/internal/outlined-styles.d.ts +0 -3
  463. package/iconbutton/internal/outlined-styles.js +0 -11
  464. package/iconbutton/internal/outlined-styles.js.map +0 -1
  465. package/iconbutton/internal/shared-styles.d.ts +0 -3
  466. package/iconbutton/internal/shared-styles.js +0 -11
  467. package/iconbutton/internal/shared-styles.js.map +0 -1
  468. package/iconbutton/internal/standard-styles.d.ts +0 -3
  469. package/iconbutton/internal/standard-styles.js +0 -11
  470. package/iconbutton/internal/standard-styles.js.map +0 -1
  471. package/labs/badge/internal/badge-styles.d.ts +0 -3
  472. package/labs/badge/internal/badge-styles.js +0 -11
  473. package/labs/badge/internal/badge-styles.js.map +0 -1
  474. package/labs/card/internal/elevated-styles.d.ts +0 -3
  475. package/labs/card/internal/elevated-styles.js +0 -11
  476. package/labs/card/internal/elevated-styles.js.map +0 -1
  477. package/labs/card/internal/filled-styles.d.ts +0 -3
  478. package/labs/card/internal/filled-styles.js +0 -11
  479. package/labs/card/internal/filled-styles.js.map +0 -1
  480. package/labs/card/internal/outlined-styles.d.ts +0 -3
  481. package/labs/card/internal/outlined-styles.js +0 -11
  482. package/labs/card/internal/outlined-styles.js.map +0 -1
  483. package/labs/card/internal/shared-styles.d.ts +0 -3
  484. package/labs/card/internal/shared-styles.js +0 -11
  485. package/labs/card/internal/shared-styles.js.map +0 -1
  486. package/labs/item/internal/item-styles.d.ts +0 -3
  487. package/labs/item/internal/item-styles.js +0 -11
  488. package/labs/item/internal/item-styles.js.map +0 -1
  489. package/labs/navigationbar/internal/navigation-bar-styles.d.ts +0 -3
  490. package/labs/navigationbar/internal/navigation-bar-styles.js +0 -11
  491. package/labs/navigationbar/internal/navigation-bar-styles.js.map +0 -1
  492. package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.d.ts +0 -3
  493. package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.js +0 -11
  494. package/labs/navigationdrawer/internal/navigation-drawer-modal-styles.js.map +0 -1
  495. package/labs/navigationdrawer/internal/navigation-drawer-styles.d.ts +0 -3
  496. package/labs/navigationdrawer/internal/navigation-drawer-styles.js +0 -11
  497. package/labs/navigationdrawer/internal/navigation-drawer-styles.js.map +0 -1
  498. package/labs/navigationdrawer/internal/shared-styles.d.ts +0 -3
  499. package/labs/navigationdrawer/internal/shared-styles.js +0 -11
  500. package/labs/navigationdrawer/internal/shared-styles.js.map +0 -1
  501. package/labs/navigationtab/internal/navigation-tab-styles.d.ts +0 -3
  502. package/labs/navigationtab/internal/navigation-tab-styles.js +0 -11
  503. package/labs/navigationtab/internal/navigation-tab-styles.js.map +0 -1
  504. package/labs/segmentedbutton/internal/outlined-styles.d.ts +0 -3
  505. package/labs/segmentedbutton/internal/outlined-styles.js +0 -11
  506. package/labs/segmentedbutton/internal/outlined-styles.js.map +0 -1
  507. package/labs/segmentedbutton/internal/shared-styles.d.ts +0 -3
  508. package/labs/segmentedbutton/internal/shared-styles.js +0 -11
  509. package/labs/segmentedbutton/internal/shared-styles.js.map +0 -1
  510. package/labs/segmentedbuttonset/internal/outlined-styles.d.ts +0 -3
  511. package/labs/segmentedbuttonset/internal/outlined-styles.js +0 -11
  512. package/labs/segmentedbuttonset/internal/outlined-styles.js.map +0 -1
  513. package/labs/segmentedbuttonset/internal/shared-styles.d.ts +0 -3
  514. package/labs/segmentedbuttonset/internal/shared-styles.js +0 -11
  515. package/labs/segmentedbuttonset/internal/shared-styles.js.map +0 -1
  516. package/list/internal/list-styles.d.ts +0 -3
  517. package/list/internal/list-styles.js +0 -11
  518. package/list/internal/list-styles.js.map +0 -1
  519. package/list/internal/listitem/list-item-styles.d.ts +0 -3
  520. package/list/internal/listitem/list-item-styles.js +0 -11
  521. package/list/internal/listitem/list-item-styles.js.map +0 -1
  522. package/menu/internal/menu-styles.d.ts +0 -3
  523. package/menu/internal/menu-styles.js +0 -11
  524. package/menu/internal/menu-styles.js.map +0 -1
  525. package/menu/internal/menuitem/menu-item-styles.d.ts +0 -3
  526. package/menu/internal/menuitem/menu-item-styles.js +0 -11
  527. package/menu/internal/menuitem/menu-item-styles.js.map +0 -1
  528. package/menu/internal/submenu/sub-menu-styles.d.ts +0 -3
  529. package/menu/internal/submenu/sub-menu-styles.js +0 -11
  530. package/menu/internal/submenu/sub-menu-styles.js.map +0 -1
  531. package/progress/internal/circular-progress-styles.d.ts +0 -3
  532. package/progress/internal/circular-progress-styles.js +0 -11
  533. package/progress/internal/circular-progress-styles.js.map +0 -1
  534. package/progress/internal/linear-progress-styles.d.ts +0 -3
  535. package/progress/internal/linear-progress-styles.js +0 -11
  536. package/progress/internal/linear-progress-styles.js.map +0 -1
  537. package/radio/internal/radio-styles.d.ts +0 -3
  538. package/radio/internal/radio-styles.js +0 -11
  539. package/radio/internal/radio-styles.js.map +0 -1
  540. package/ripple/internal/ripple-styles.d.ts +0 -3
  541. package/ripple/internal/ripple-styles.js +0 -11
  542. package/ripple/internal/ripple-styles.js.map +0 -1
  543. package/select/internal/filled-select-styles.d.ts +0 -3
  544. package/select/internal/filled-select-styles.js +0 -11
  545. package/select/internal/filled-select-styles.js.map +0 -1
  546. package/select/internal/outlined-select-styles.d.ts +0 -3
  547. package/select/internal/outlined-select-styles.js +0 -11
  548. package/select/internal/outlined-select-styles.js.map +0 -1
  549. package/select/internal/shared-styles.d.ts +0 -3
  550. package/select/internal/shared-styles.js +0 -11
  551. package/select/internal/shared-styles.js.map +0 -1
  552. package/slider/internal/forced-colors-styles.d.ts +0 -3
  553. package/slider/internal/forced-colors-styles.js +0 -11
  554. package/slider/internal/forced-colors-styles.js.map +0 -1
  555. package/slider/internal/slider-styles.d.ts +0 -3
  556. package/slider/internal/slider-styles.js +0 -11
  557. package/slider/internal/slider-styles.js.map +0 -1
  558. package/switch/internal/switch-styles.d.ts +0 -3
  559. package/switch/internal/switch-styles.js +0 -11
  560. package/switch/internal/switch-styles.js.map +0 -1
  561. package/tabs/internal/primary-tab-styles.d.ts +0 -3
  562. package/tabs/internal/primary-tab-styles.js +0 -11
  563. package/tabs/internal/primary-tab-styles.js.map +0 -1
  564. package/tabs/internal/secondary-tab-styles.d.ts +0 -3
  565. package/tabs/internal/secondary-tab-styles.js +0 -11
  566. package/tabs/internal/secondary-tab-styles.js.map +0 -1
  567. package/tabs/internal/tab-styles.d.ts +0 -3
  568. package/tabs/internal/tab-styles.js +0 -11
  569. package/tabs/internal/tab-styles.js.map +0 -1
  570. package/tabs/internal/tabs-styles.d.ts +0 -3
  571. package/tabs/internal/tabs-styles.js +0 -11
  572. package/tabs/internal/tabs-styles.js.map +0 -1
  573. package/textfield/internal/filled-styles.d.ts +0 -3
  574. package/textfield/internal/filled-styles.js +0 -11
  575. package/textfield/internal/filled-styles.js.map +0 -1
  576. package/textfield/internal/outlined-styles.d.ts +0 -3
  577. package/textfield/internal/outlined-styles.js +0 -11
  578. package/textfield/internal/outlined-styles.js.map +0 -1
  579. package/textfield/internal/shared-styles.d.ts +0 -3
  580. package/textfield/internal/shared-styles.js +0 -11
  581. package/textfield/internal/shared-styles.js.map +0 -1
  582. /package/{button/internal/elevated-styles.d.ts → labs/gb/components/badge/badge.cssresult.d.ts} +0 -0
  583. /package/{button/internal/filled-styles.d.ts → labs/gb/components/button/button.cssresult.d.ts} +0 -0
  584. /package/{button/internal/filled-tonal-styles.d.ts → labs/gb/components/card/card.cssresult.d.ts} +0 -0
  585. /package/{button/internal/outlined-styles.d.ts → labs/gb/components/checkbox/checkbox.cssresult.d.ts} +0 -0
  586. /package/{button/internal/shared-elevation-styles.d.ts → labs/gb/components/divider/divider.cssresult.d.ts} +0 -0
  587. /package/{button/internal/shared-styles.d.ts → labs/gb/components/fab/fab.cssresult.d.ts} +0 -0
  588. /package/{button/internal/text-styles.d.ts → labs/gb/components/focus/focus-ring.cssresult.d.ts} +0 -0
  589. /package/{checkbox/internal/checkbox-styles.d.ts → labs/gb/components/iconbutton/icon-button.cssresult.d.ts} +0 -0
  590. /package/{chips/internal/assist-styles.d.ts → labs/gb/components/list/list.cssresult.d.ts} +0 -0
  591. /package/{chips/internal/chip-set-styles.d.ts → labs/gb/components/menu/menu.cssresult.d.ts} +0 -0
  592. /package/{chips/internal/elevated-styles.d.ts → labs/gb/components/radio/radio.cssresult.d.ts} +0 -0
  593. /package/{chips/internal/filter-styles.d.ts → labs/gb/components/ripple/ripple.cssresult.d.ts} +0 -0
  594. /package/{chips/internal/input-styles.d.ts → labs/gb/components/splitbutton/split-button.cssresult.d.ts} +0 -0
  595. /package/{chips/internal/selectable-styles.d.ts → labs/gb/components/switch/switch.cssresult.d.ts} +0 -0
  596. /package/{chips/internal/shared-styles.d.ts → labs/gb/styles/color/md-color-tokens-full.cssresult.d.ts} +0 -0
  597. /package/{chips/internal/suggestion-styles.d.ts → labs/gb/styles/color/md-color-tokens.cssresult.d.ts} +0 -0
  598. /package/{chips/internal/trailing-icon-styles.d.ts → labs/gb/styles/elevation/md-elevation-tokens.cssresult.d.ts} +0 -0
  599. /package/{dialog/internal/dialog-styles.d.ts → labs/gb/styles/icon/md-icon.cssresult.d.ts} +0 -0
  600. /package/{divider/internal/divider-styles.d.ts → labs/gb/styles/m3.cssresult.d.ts} +0 -0
  601. /package/{elevation/internal/elevation-styles.d.ts → labs/gb/styles/motion/md-motion-tokens-easing.cssresult.d.ts} +0 -0
  602. /package/{fab/internal/fab-branded-styles.d.ts → labs/gb/styles/shape/md-shape-tokens.cssresult.d.ts} +0 -0
  603. /package/{fab/internal/fab-styles.d.ts → labs/gb/styles/space/md-space-tokens.cssresult.d.ts} +0 -0
  604. /package/{fab/internal/forced-colors-styles.d.ts → labs/gb/styles/tailwind.cssresult.d.ts} +0 -0
  605. /package/{fab/internal/shared-styles.d.ts → labs/gb/styles/typography/md-typography-tokens.cssresult.d.ts} +0 -0
@@ -0,0 +1,104 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CSSResultOrNative, LitElement, PropertyValues } from 'lit';
7
+ declare global {
8
+ interface HTMLElementTagNameMap {
9
+ /** A Material Design button. */
10
+ 'md-gb-button': Button;
11
+ }
12
+ }
13
+ declare const baseClass: import("@material/web/labs/behaviors/mixin.js").MixinReturn<import("@material/web/labs/behaviors/mixin.js").MixinReturn<import("@material/web/labs/behaviors/mixin.js").MixinReturn<(abstract new (...args: any[]) => import("../../../behaviors/element-internals.js").WithElementInternals) & typeof LitElement & import("../../../behaviors/form-associated.js").FormAssociatedConstructor, import("../../../behaviors/form-associated.js").FormAssociated>, import("../../../behaviors/form-submitter.js").FormSubmitter>>;
14
+ /**
15
+ * A Material Design button.
16
+ *
17
+ * @slot - Used to display a label and optional icon.
18
+ * @slot container - Used to set a custom background container for the button.
19
+ * @fires {InputEvent} input - Fired when a toggle button is selected or unselected. --bubbles --composed
20
+ * @fires {Event} change - Fired when a toggle button is selected or unselected. --bubbles
21
+ * @csspart btn - The button's root element.
22
+ * @cssprop --container-color
23
+ * @cssprop --container-height
24
+ * @cssprop --container-elevation
25
+ * @cssprop --container-shape
26
+ * @cssprop --outline-width
27
+ * @cssprop --outline-color
28
+ * @cssprop --icon-label-space
29
+ * @cssprop --icon-color
30
+ * @cssprop --icon-size
31
+ * @cssprop --label-text
32
+ * @cssprop --label-text-tracking
33
+ * @cssprop --label-text-color
34
+ * @cssprop --leading-space
35
+ * @cssprop --state-layer-color
36
+ * @cssprop --trailing-space
37
+ */
38
+ export declare class Button extends baseClass {
39
+ /** @nocollapse */
40
+ static shadowRootOptions: ShadowRootInit;
41
+ static styles: CSSResultOrNative[];
42
+ private hideOutline;
43
+ /**
44
+ * The color of the button.
45
+ */
46
+ color: 'filled' | 'elevated' | 'tonal' | 'outlined' | 'text';
47
+ /**
48
+ * The size of the button.
49
+ */
50
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
51
+ /**
52
+ * Changes the shape of the button to be square.
53
+ */
54
+ square: boolean;
55
+ /**
56
+ * A string indicating the behavior of the button.
57
+ *
58
+ * - "submit" (default): A button that submits its associated form.
59
+ * - "reset": A button that resets its associated form.
60
+ * - "button": A normal button.
61
+ * - "toggle": A toggle button using the `selected` property.
62
+ * - "link": An anchor link (`<a>`). Type is always "link" when `href` is set.
63
+ */
64
+ get type(): string;
65
+ set type(type: string);
66
+ /**
67
+ * Whether or not the button is "soft-disabled" (disabled but still
68
+ * focusable).
69
+ *
70
+ * Use this when a button needs increased visibility when disabled. See
71
+ * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls
72
+ * for more guidance on when this is needed.
73
+ */
74
+ softDisabled: boolean;
75
+ /**
76
+ * Whether or not the button is selected, when `type="toggle"`.
77
+ */
78
+ selected: boolean;
79
+ /**
80
+ * The URL that the link button points to.
81
+ */
82
+ href: string;
83
+ /**
84
+ * The filename to use when downloading the linked resource.
85
+ * If not specified, the browser will determine a filename.
86
+ * This is only applicable when the button is used as a link (`href` is set).
87
+ */
88
+ download: string;
89
+ /**
90
+ * Where to display the linked `href` URL for a link button. Common options
91
+ * include `_blank` to open in a new tab.
92
+ */
93
+ target: '_blank' | '_parent' | '_self' | '_top' | '';
94
+ private lastFiredEnabledState?;
95
+ connectedCallback(): void;
96
+ disconnectedCallback(): void;
97
+ private readonly handleSetShowOutline;
98
+ protected updated(changedProperties: PropertyValues): void;
99
+ private dispatchSetEnabledEvent;
100
+ protected render(): import("lit-html").TemplateResult<1>;
101
+ private handleContainerSlotChange;
102
+ private handleChange;
103
+ }
104
+ export {};
@@ -0,0 +1,283 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { __decorate } from "tslib";
7
+ import { css, html, LitElement, nothing, } from 'lit';
8
+ import { customElement, property, state } from 'lit/decorators.js';
9
+ import { mixinDelegatesAria } from '../../../../internal/aria/delegate.js';
10
+ import { redispatchEvent } from '../../../../internal/events/redispatch-event.js';
11
+ import { mixinElementInternals } from '../../../behaviors/element-internals.js';
12
+ import { mixinFormAssociated } from '../../../behaviors/form-associated.js';
13
+ import { mixinFormSubmitter } from '../../../behaviors/form-submitter.js';
14
+ import focusRingStyles from '../focus/focus-ring.css' with { type: 'css' }; // github-only
15
+ // import focusRingStyles from '../focus/focus-ring.cssresult.js'; // google3-only
16
+ import rippleStyles from '../ripple/ripple.css' with { type: 'css' }; // github-only
17
+ // import rippleStyles from '../ripple/ripple.cssresult.js'; // google3-only
18
+ import { hasSlotted } from '../shared/has-slotted.js';
19
+ import buttonStyles from './button.css' with { type: 'css' }; // github-only
20
+ // import buttonStyles from './button.cssresult.js'; // google3-only
21
+ import { button } from './button.js';
22
+ // Separate variable needed for closure.
23
+ const baseClass = mixinDelegatesAria(mixinFormSubmitter(mixinFormAssociated(mixinElementInternals(LitElement))));
24
+ /**
25
+ * A Material Design button.
26
+ *
27
+ * @slot - Used to display a label and optional icon.
28
+ * @slot container - Used to set a custom background container for the button.
29
+ * @fires {InputEvent} input - Fired when a toggle button is selected or unselected. --bubbles --composed
30
+ * @fires {Event} change - Fired when a toggle button is selected or unselected. --bubbles
31
+ * @csspart btn - The button's root element.
32
+ * @cssprop --container-color
33
+ * @cssprop --container-height
34
+ * @cssprop --container-elevation
35
+ * @cssprop --container-shape
36
+ * @cssprop --outline-width
37
+ * @cssprop --outline-color
38
+ * @cssprop --icon-label-space
39
+ * @cssprop --icon-color
40
+ * @cssprop --icon-size
41
+ * @cssprop --label-text
42
+ * @cssprop --label-text-tracking
43
+ * @cssprop --label-text-color
44
+ * @cssprop --leading-space
45
+ * @cssprop --state-layer-color
46
+ * @cssprop --trailing-space
47
+ */
48
+ let Button = class Button extends baseClass {
49
+ constructor() {
50
+ super(...arguments);
51
+ this.hideOutline = false;
52
+ /**
53
+ * The color of the button.
54
+ */
55
+ this.color = 'text';
56
+ /**
57
+ * The size of the button.
58
+ */
59
+ this.size = 'sm';
60
+ /**
61
+ * Changes the shape of the button to be square.
62
+ */
63
+ this.square = false;
64
+ /**
65
+ * Whether or not the button is "soft-disabled" (disabled but still
66
+ * focusable).
67
+ *
68
+ * Use this when a button needs increased visibility when disabled. See
69
+ * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls
70
+ * for more guidance on when this is needed.
71
+ */
72
+ this.softDisabled = false;
73
+ /**
74
+ * Whether or not the button is selected, when `type="toggle"`.
75
+ */
76
+ this.selected = false;
77
+ /**
78
+ * The URL that the link button points to.
79
+ */
80
+ this.href = '';
81
+ /**
82
+ * The filename to use when downloading the linked resource.
83
+ * If not specified, the browser will determine a filename.
84
+ * This is only applicable when the button is used as a link (`href` is set).
85
+ */
86
+ this.download = '';
87
+ /**
88
+ * Where to display the linked `href` URL for a link button. Common options
89
+ * include `_blank` to open in a new tab.
90
+ */
91
+ this.target = '';
92
+ this.handleSetShowOutline = (event) => {
93
+ const customEvent = event;
94
+ this.hideOutline = !customEvent.detail.shown;
95
+ };
96
+ }
97
+ /**
98
+ * A string indicating the behavior of the button.
99
+ *
100
+ * - "submit" (default): A button that submits its associated form.
101
+ * - "reset": A button that resets its associated form.
102
+ * - "button": A normal button.
103
+ * - "toggle": A toggle button using the `selected` property.
104
+ * - "link": An anchor link (`<a>`). Type is always "link" when `href` is set.
105
+ */
106
+ get type() {
107
+ return this.href ? 'link' : super.type;
108
+ }
109
+ set type(type) {
110
+ if (this.href && type !== 'link') {
111
+ return;
112
+ }
113
+ super.type = type;
114
+ }
115
+ connectedCallback() {
116
+ super.connectedCallback();
117
+ this.addEventListener('md-gb:set-show-outline', this.handleSetShowOutline);
118
+ }
119
+ disconnectedCallback() {
120
+ super.disconnectedCallback();
121
+ this.removeEventListener('md-gb:set-show-outline', this.handleSetShowOutline);
122
+ }
123
+ updated(changedProperties) {
124
+ super.updated(changedProperties);
125
+ if (changedProperties.has('disabled') ||
126
+ changedProperties.has('softDisabled')) {
127
+ this.dispatchSetEnabledEvent();
128
+ }
129
+ }
130
+ dispatchSetEnabledEvent() {
131
+ const enabled = !(this.disabled || this.softDisabled);
132
+ if (this.lastFiredEnabledState === enabled)
133
+ return;
134
+ const slot = this.shadowRoot?.querySelector('slot[name="container"]');
135
+ if (slot) {
136
+ for (const element of slot.assignedElements({ flatten: true })) {
137
+ element.dispatchEvent(new CustomEvent('md-gb:set-enabled', {
138
+ detail: { enabled },
139
+ }));
140
+ }
141
+ }
142
+ this.lastFiredEnabledState = enabled;
143
+ }
144
+ render() {
145
+ const classes = button({
146
+ color: this.color,
147
+ size: this.size,
148
+ square: this.square,
149
+ // Emulate `:disabled` when soft-disabled
150
+ disabled: this.softDisabled,
151
+ classes: {
152
+ 'btn-hide-outline': this.hideOutline,
153
+ },
154
+ });
155
+ // Needed for closure conformance
156
+ const { ariaLabel, ariaHasPopup, ariaExpanded } = this;
157
+ if (this.type === 'link') {
158
+ return html `<a
159
+ part="btn"
160
+ class=${classes}
161
+ href=${this.href}
162
+ download=${this.download || nothing}
163
+ target=${this.target || nothing}
164
+ aria-label=${ariaLabel || nothing}
165
+ aria-haspopup=${ariaHasPopup || nothing}
166
+ aria-expanded=${ariaExpanded || nothing}
167
+ aria-disabled=${this.disabled || this.softDisabled || nothing}
168
+ tabindex=${this.disabled && !this.softDisabled ? -1 : nothing}>
169
+ <slot></slot>
170
+ <slot
171
+ name="container"
172
+ ${hasSlotted()}
173
+ @slotchange=${this.handleContainerSlotChange}></slot>
174
+ </a>`;
175
+ }
176
+ return html `<button
177
+ part="btn"
178
+ class=${classes}
179
+ ?disabled=${this.disabled}
180
+ aria-disabled=${this.softDisabled || nothing}
181
+ aria-label=${ariaLabel || nothing}
182
+ aria-pressed=${this.type === 'toggle' ? this.selected : nothing}
183
+ aria-haspopup=${ariaHasPopup || nothing}
184
+ aria-expanded=${ariaExpanded || nothing}
185
+ @change=${this.handleChange}>
186
+ <slot></slot>
187
+ <slot
188
+ name="container"
189
+ ${hasSlotted()}
190
+ @slotchange=${this.handleContainerSlotChange}></slot>
191
+ </button>`;
192
+ }
193
+ handleContainerSlotChange(event) {
194
+ const slot = event.target;
195
+ const enabled = !(this.disabled || this.softDisabled);
196
+ for (const element of slot.assignedElements({ flatten: true })) {
197
+ element.dispatchEvent(new CustomEvent('md-gb:change-container-slot'));
198
+ element.dispatchEvent(new CustomEvent('md-gb:set-enabled', {
199
+ detail: { enabled },
200
+ }));
201
+ }
202
+ }
203
+ handleChange(event) {
204
+ this.selected = event.target.ariaPressed === 'true';
205
+ redispatchEvent(this, event);
206
+ }
207
+ };
208
+ /** @nocollapse */
209
+ Button.shadowRootOptions = {
210
+ mode: 'open',
211
+ delegatesFocus: true,
212
+ };
213
+ Button.styles = [
214
+ focusRingStyles,
215
+ rippleStyles,
216
+ buttonStyles,
217
+ css `
218
+ :host {
219
+ display: inline-flex;
220
+ isolation: isolate;
221
+ }
222
+ .btn {
223
+ flex: 1;
224
+ position: relative;
225
+ }
226
+ .btn:has([name='container'].has-slotted) {
227
+ background-color: transparent;
228
+ }
229
+ .btn.btn-hide-outline {
230
+ --outline-color: transparent;
231
+ --container-elevation: var(--md-sys-elevation-shadow-0);
232
+ }
233
+ slot[name='container'] {
234
+ display: block;
235
+ position: absolute;
236
+ inset: 0;
237
+ border-radius: inherit;
238
+ pointer-events: none;
239
+ --color: var(--container-color);
240
+ z-index: -1;
241
+ transition: inherit;
242
+ }
243
+ slot[name='container']::slotted(*) {
244
+ width: 100%;
245
+ height: 100%;
246
+ }
247
+ `,
248
+ ];
249
+ __decorate([
250
+ state()
251
+ ], Button.prototype, "hideOutline", void 0);
252
+ __decorate([
253
+ property()
254
+ ], Button.prototype, "color", void 0);
255
+ __decorate([
256
+ property()
257
+ ], Button.prototype, "size", void 0);
258
+ __decorate([
259
+ property({ type: Boolean })
260
+ ], Button.prototype, "square", void 0);
261
+ __decorate([
262
+ property({ noAccessor: true })
263
+ ], Button.prototype, "type", null);
264
+ __decorate([
265
+ property({ type: Boolean, attribute: 'soft-disabled', reflect: true })
266
+ ], Button.prototype, "softDisabled", void 0);
267
+ __decorate([
268
+ property({ type: Boolean })
269
+ ], Button.prototype, "selected", void 0);
270
+ __decorate([
271
+ property()
272
+ ], Button.prototype, "href", void 0);
273
+ __decorate([
274
+ property()
275
+ ], Button.prototype, "download", void 0);
276
+ __decorate([
277
+ property()
278
+ ], Button.prototype, "target", void 0);
279
+ Button = __decorate([
280
+ customElement('md-gb-button')
281
+ ], Button);
282
+ export { Button };
283
+ //# sourceMappingURL=md-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"md-button.js","sourceRoot":"","sources":["md-button.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n css,\n CSSResultOrNative,\n html,\n LitElement,\n nothing,\n PropertyValues,\n} from 'lit';\nimport {customElement, property, state} from 'lit/decorators.js';\nimport {ARIAMixinStrict} from '../../../../internal/aria/aria.js';\nimport {mixinDelegatesAria} from '../../../../internal/aria/delegate.js';\nimport {redispatchEvent} from '../../../../internal/events/redispatch-event.js';\nimport {mixinElementInternals} from '../../../behaviors/element-internals.js';\nimport {mixinFormAssociated} from '../../../behaviors/form-associated.js';\nimport {mixinFormSubmitter} from '../../../behaviors/form-submitter.js';\n\nimport focusRingStyles from '../focus/focus-ring.css' with {type: 'css'}; // github-only\n// import focusRingStyles from '../focus/focus-ring.cssresult.js'; // google3-only\nimport rippleStyles from '../ripple/ripple.css' with {type: 'css'}; // github-only\n// import rippleStyles from '../ripple/ripple.cssresult.js'; // google3-only\n\nimport {hasSlotted} from '../shared/has-slotted.js';\n\nimport buttonStyles from './button.css' with {type: 'css'}; // github-only\n// import buttonStyles from './button.cssresult.js'; // google3-only\n\nimport {button} from './button.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n /** A Material Design button. */\n 'md-gb-button': Button;\n }\n}\n\n// Separate variable needed for closure.\nconst baseClass = mixinDelegatesAria(\n mixinFormSubmitter(mixinFormAssociated(mixinElementInternals(LitElement))),\n);\n\n/**\n * A Material Design button.\n *\n * @slot - Used to display a label and optional icon.\n * @slot container - Used to set a custom background container for the button.\n * @fires {InputEvent} input - Fired when a toggle button is selected or unselected. --bubbles --composed\n * @fires {Event} change - Fired when a toggle button is selected or unselected. --bubbles\n * @csspart btn - The button's root element.\n * @cssprop --container-color\n * @cssprop --container-height\n * @cssprop --container-elevation\n * @cssprop --container-shape\n * @cssprop --outline-width\n * @cssprop --outline-color\n * @cssprop --icon-label-space\n * @cssprop --icon-color\n * @cssprop --icon-size\n * @cssprop --label-text\n * @cssprop --label-text-tracking\n * @cssprop --label-text-color\n * @cssprop --leading-space\n * @cssprop --state-layer-color\n * @cssprop --trailing-space\n */\n@customElement('md-gb-button')\nexport class Button extends baseClass {\n /** @nocollapse */\n static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n delegatesFocus: true,\n };\n\n static override styles: CSSResultOrNative[] = [\n focusRingStyles,\n rippleStyles,\n buttonStyles,\n css`\n :host {\n display: inline-flex;\n isolation: isolate;\n }\n .btn {\n flex: 1;\n position: relative;\n }\n .btn:has([name='container'].has-slotted) {\n background-color: transparent;\n }\n .btn.btn-hide-outline {\n --outline-color: transparent;\n --container-elevation: var(--md-sys-elevation-shadow-0);\n }\n slot[name='container'] {\n display: block;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n --color: var(--container-color);\n z-index: -1;\n transition: inherit;\n }\n slot[name='container']::slotted(*) {\n width: 100%;\n height: 100%;\n }\n `,\n ];\n\n @state() private hideOutline = false;\n\n /**\n * The color of the button.\n */\n @property()\n color: 'filled' | 'elevated' | 'tonal' | 'outlined' | 'text' = 'text';\n\n /**\n * The size of the button.\n */\n @property() size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n\n /**\n * Changes the shape of the button to be square.\n */\n @property({type: Boolean}) square = false;\n\n /**\n * A string indicating the behavior of the button.\n *\n * - \"submit\" (default): A button that submits its associated form.\n * - \"reset\": A button that resets its associated form.\n * - \"button\": A normal button.\n * - \"toggle\": A toggle button using the `selected` property.\n * - \"link\": An anchor link (`<a>`). Type is always \"link\" when `href` is set.\n */\n @property({noAccessor: true})\n override get type(): string {\n return this.href ? 'link' : super.type;\n }\n override set type(type: string) {\n if (this.href && type !== 'link') {\n return;\n }\n super.type = type;\n }\n\n /**\n * Whether or not the button is \"soft-disabled\" (disabled but still\n * focusable).\n *\n * Use this when a button needs increased visibility when disabled. See\n * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls\n * for more guidance on when this is needed.\n */\n @property({type: Boolean, attribute: 'soft-disabled', reflect: true})\n softDisabled = false;\n\n /**\n * Whether or not the button is selected, when `type=\"toggle\"`.\n */\n @property({type: Boolean}) selected = false;\n\n /**\n * The URL that the link button points to.\n */\n @property() href = '';\n\n /**\n * The filename to use when downloading the linked resource.\n * If not specified, the browser will determine a filename.\n * This is only applicable when the button is used as a link (`href` is set).\n */\n @property() download = '';\n\n /**\n * Where to display the linked `href` URL for a link button. Common options\n * include `_blank` to open in a new tab.\n */\n @property() target: '_blank' | '_parent' | '_self' | '_top' | '' = '';\n\n private lastFiredEnabledState?: boolean;\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('md-gb:set-show-outline', this.handleSetShowOutline);\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener(\n 'md-gb:set-show-outline',\n this.handleSetShowOutline,\n );\n }\n\n private readonly handleSetShowOutline = (event: Event) => {\n const customEvent = event as CustomEvent<{shown: boolean}>;\n this.hideOutline = !customEvent.detail.shown;\n };\n\n protected override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (\n changedProperties.has('disabled') ||\n changedProperties.has('softDisabled')\n ) {\n this.dispatchSetEnabledEvent();\n }\n }\n\n private dispatchSetEnabledEvent() {\n const enabled = !(this.disabled || this.softDisabled);\n\n if (this.lastFiredEnabledState === enabled) return;\n\n const slot = this.shadowRoot?.querySelector(\n 'slot[name=\"container\"]',\n ) as HTMLSlotElement;\n if (slot) {\n for (const element of slot.assignedElements({flatten: true})) {\n element.dispatchEvent(\n new CustomEvent('md-gb:set-enabled', {\n detail: {enabled},\n }),\n );\n }\n }\n this.lastFiredEnabledState = enabled;\n }\n\n protected override render() {\n const classes = button({\n color: this.color,\n size: this.size,\n square: this.square,\n // Emulate `:disabled` when soft-disabled\n disabled: this.softDisabled,\n classes: {\n 'btn-hide-outline': this.hideOutline,\n },\n });\n\n // Needed for closure conformance\n const {ariaLabel, ariaHasPopup, ariaExpanded} = this as ARIAMixinStrict;\n if (this.type === 'link') {\n return html`<a\n part=\"btn\"\n class=${classes}\n href=${this.href}\n download=${this.download || nothing}\n target=${this.target || nothing}\n aria-label=${ariaLabel || nothing}\n aria-haspopup=${ariaHasPopup || nothing}\n aria-expanded=${ariaExpanded || nothing}\n aria-disabled=${this.disabled || this.softDisabled || nothing}\n tabindex=${this.disabled && !this.softDisabled ? -1 : nothing}>\n <slot></slot>\n <slot\n name=\"container\"\n ${hasSlotted()}\n @slotchange=${this.handleContainerSlotChange}></slot>\n </a>`;\n }\n\n return html`<button\n part=\"btn\"\n class=${classes}\n ?disabled=${this.disabled}\n aria-disabled=${this.softDisabled || nothing}\n aria-label=${ariaLabel || nothing}\n aria-pressed=${this.type === 'toggle' ? this.selected : nothing}\n aria-haspopup=${ariaHasPopup || nothing}\n aria-expanded=${ariaExpanded || nothing}\n @change=${this.handleChange}>\n <slot></slot>\n <slot\n name=\"container\"\n ${hasSlotted()}\n @slotchange=${this.handleContainerSlotChange}></slot>\n </button>`;\n }\n\n private handleContainerSlotChange(event: Event) {\n const slot = event.target as HTMLSlotElement;\n\n const enabled = !(this.disabled || this.softDisabled);\n\n for (const element of slot.assignedElements({flatten: true})) {\n element.dispatchEvent(new CustomEvent('md-gb:change-container-slot'));\n element.dispatchEvent(\n new CustomEvent('md-gb:set-enabled', {\n detail: {enabled},\n }),\n );\n }\n }\n\n private handleChange(event: Event) {\n this.selected = (event.target as HTMLElement).ariaPressed === 'true';\n redispatchEvent(this, event);\n }\n}\n"]}
@@ -0,0 +1,56 @@
1
+ //
2
+ // Copyright 2026 Google LLC
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ //
5
+
6
+ @mixin root {
7
+ // LINT.IfChange
8
+ --container-color: transparent;
9
+ --container-elevation: var(--md-sys-elevation-shadow-0);
10
+ --container-shape: var(--md-sys-shape-corner-md);
11
+ --outline-color: transparent;
12
+ --outline-width: 0;
13
+ --state-layer-color: var(--md-sys-color-on-surface);
14
+ // LINT.ThenChange(md-card.ts) keep in sync with `@cssprop` jsdoc tags
15
+ }
16
+
17
+ @mixin hover {
18
+ --container-elevation: var(--md-sys-elevation-shadow-1);
19
+ }
20
+
21
+ @mixin filled {
22
+ --container-color: var(--md-sys-color-surface-container-highest);
23
+ }
24
+
25
+ @mixin filled-disabled {
26
+ --container-color: hsl(
27
+ from var(--md-sys-color-surface-container-highest) h s l / 38%
28
+ );
29
+ }
30
+
31
+ @mixin outlined {
32
+ --container-color: var(--md-sys-color-surface);
33
+ --outline-color: var(--md-sys-color-outline-variant);
34
+ --outline-width: 1px;
35
+ }
36
+
37
+ @mixin outlined-focus {
38
+ --outline-color: var(--md-sys-color-on-surface);
39
+ }
40
+
41
+ @mixin outlined-disabled {
42
+ --outline-color: hsl(from var(--md-sys-color-outline) h s l / 12%);
43
+ }
44
+
45
+ @mixin elevated {
46
+ --container-color: var(--md-sys-color-surface-container-low);
47
+ --container-elevation: var(--md-sys-elevation-shadow-1);
48
+ }
49
+
50
+ @mixin elevated-hover {
51
+ --container-elevation: var(--md-sys-elevation-shadow-2);
52
+ }
53
+
54
+ @mixin elevated-disabled {
55
+ --container-color: hsl(from var(--md-sys-color-surface) h s l / 38%);
56
+ }
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Copyright 2026 Google LLC
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */@layer md.sys, md.comp.ripple, md.comp.focus-ring;@layer md.comp.card{.card{--container-color: transparent;--container-elevation: var(--md-sys-elevation-shadow-0);--container-shape: var(--md-sys-shape-corner-md);--outline-color: transparent;--outline-width: 0;--state-layer-color: var(--md-sys-color-on-surface)}.card:is(:hover,.hover):where(:has(.card-btn:not(:disabled,.disabled))){--container-elevation: var(--md-sys-elevation-shadow-1)}.card.card-filled{--container-color: var(--md-sys-color-surface-container-highest)}.card.card-filled:where(:disabled,.disabled){--container-color: hsl( from var(--md-sys-color-surface-container-highest) h s l / 38% )}.card.card-outlined{--container-color: var(--md-sys-color-surface);--outline-color: var(--md-sys-color-outline-variant);--outline-width: 1px}.card.card-outlined:where(:focus-within,.focus){--outline-color: var(--md-sys-color-on-surface)}.card.card-outlined:where(:disabled,.disabled){--outline-color: hsl(from var(--md-sys-color-outline) h s l / 12%)}.card.card-elevated{--container-color: var(--md-sys-color-surface-container-low);--container-elevation: var(--md-sys-elevation-shadow-1)}.card.card-elevated:is(:hover,.hover):where(:has(.card-btn:not(:disabled,.disabled))){--container-elevation: var(--md-sys-elevation-shadow-2)}.card.card-elevated:where(:disabled,.disabled){--container-color: hsl(from var(--md-sys-color-surface) h s l / 38%)}.card{display:flex;flex-direction:column;position:relative;overflow:hidden;background-color:var(--container-color);border-radius:var(--container-shape);box-shadow:var(--container-elevation);border:var(--outline-width) solid var(--outline-color)}.card .card-btn{appearance:none;background-color:rgba(0,0,0,0);border:none;outline:none;position:absolute;inset:0;color:var(--state-layer-color)}}/*# sourceMappingURL=card.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["card.scss","_card-tokens.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA,GASA,kDACA,oBAEI,MCLF,+BACA,wDACA,iDACA,6BACA,mBACA,oDDIE,wECCF,wDDGE,kBCCF,iEDEI,6CCEJ,yFDGE,oBCGF,+CACA,qDACA,qBDFI,gDCMJ,gDDFI,+CCMJ,mEDDE,oBCKF,6DACA,wDDHI,sFCOJ,wDDHI,+CCOJ,qEDFE,MACE,aACA,sBACA,kBACA,gBACA,wCACA,qCACA,sCACA,uDAGF,gBACE,gBACA,+BACA,YACA,aACA,kBACA,QACA","file":"card.css"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ // Generated stylesheet for ./labs/gb/components/card/card.css.
7
+ import { css } from 'lit';
8
+ export const styles = css `/*!
9
+ * Copyright 2026 Google LLC
10
+ * SPDX-License-Identifier: Apache-2.0
11
+ */@layer md.sys, md.comp.ripple, md.comp.focus-ring;@layer md.comp.card{.card{--container-color: transparent;--container-elevation: var(--md-sys-elevation-shadow-0);--container-shape: var(--md-sys-shape-corner-md);--outline-color: transparent;--outline-width: 0;--state-layer-color: var(--md-sys-color-on-surface)}.card:is(:hover,.hover):where(:has(.card-btn:not(:disabled,.disabled))){--container-elevation: var(--md-sys-elevation-shadow-1)}.card.card-filled{--container-color: var(--md-sys-color-surface-container-highest)}.card.card-filled:where(:disabled,.disabled){--container-color: hsl( from var(--md-sys-color-surface-container-highest) h s l / 38% )}.card.card-outlined{--container-color: var(--md-sys-color-surface);--outline-color: var(--md-sys-color-outline-variant);--outline-width: 1px}.card.card-outlined:where(:focus-within,.focus){--outline-color: var(--md-sys-color-on-surface)}.card.card-outlined:where(:disabled,.disabled){--outline-color: hsl(from var(--md-sys-color-outline) h s l / 12%)}.card.card-elevated{--container-color: var(--md-sys-color-surface-container-low);--container-elevation: var(--md-sys-elevation-shadow-1)}.card.card-elevated:is(:hover,.hover):where(:has(.card-btn:not(:disabled,.disabled))){--container-elevation: var(--md-sys-elevation-shadow-2)}.card.card-elevated:where(:disabled,.disabled){--container-color: hsl(from var(--md-sys-color-surface) h s l / 38%)}.card{display:flex;flex-direction:column;position:relative;overflow:hidden;background-color:var(--container-color);border-radius:var(--container-shape);box-shadow:var(--container-elevation);border:var(--outline-width) solid var(--outline-color)}.card .card-btn{appearance:none;background-color:rgba(0,0,0,0);border:none;outline:none;position:absolute;inset:0;color:var(--state-layer-color)}}
12
+ `;
13
+ export default styles.styleSheet;
14
+ //# sourceMappingURL=card.cssresult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.cssresult.js","sourceRoot":"","sources":["card.cssresult.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,+DAA+D;AAC/D,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/card/card.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.card{.card{--container-color: transparent;--container-elevation: var(--md-sys-elevation-shadow-0);--container-shape: var(--md-sys-shape-corner-md);--outline-color: transparent;--outline-width: 0;--state-layer-color: var(--md-sys-color-on-surface)}.card:is(:hover,.hover):where(:has(.card-btn:not(:disabled,.disabled))){--container-elevation: var(--md-sys-elevation-shadow-1)}.card.card-filled{--container-color: var(--md-sys-color-surface-container-highest)}.card.card-filled:where(:disabled,.disabled){--container-color: hsl( from var(--md-sys-color-surface-container-highest) h s l / 38% )}.card.card-outlined{--container-color: var(--md-sys-color-surface);--outline-color: var(--md-sys-color-outline-variant);--outline-width: 1px}.card.card-outlined:where(:focus-within,.focus){--outline-color: var(--md-sys-color-on-surface)}.card.card-outlined:where(:disabled,.disabled){--outline-color: hsl(from var(--md-sys-color-outline) h s l / 12%)}.card.card-elevated{--container-color: var(--md-sys-color-surface-container-low);--container-elevation: var(--md-sys-elevation-shadow-1)}.card.card-elevated:is(:hover,.hover):where(:has(.card-btn:not(:disabled,.disabled))){--container-elevation: var(--md-sys-elevation-shadow-2)}.card.card-elevated:where(:disabled,.disabled){--container-color: hsl(from var(--md-sys-color-surface) h s l / 38%)}.card{display:flex;flex-direction:column;position:relative;overflow:hidden;background-color:var(--container-color);border-radius:var(--container-shape);box-shadow:var(--container-elevation);border:var(--outline-width) solid var(--outline-color)}.card .card-btn{appearance:none;background-color:rgba(0,0,0,0);border:none;outline:none;position:absolute;inset:0;color:var(--state-layer-color)}}\n`;\nexport default styles.styleSheet!;\n"]}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type ClassInfo } from 'lit/directives/class-map.js';
7
+ /** Card color configuration types. */
8
+ export type CardColor = 'elevated' | 'filled' | 'outlined';
9
+ /** Card color configurations. */
10
+ export declare const CARD_COLORS: {
11
+ readonly elevated: "elevated";
12
+ readonly filled: "filled";
13
+ readonly outlined: "outlined";
14
+ };
15
+ /** Card classes. */
16
+ export declare const CARD_CLASSES: {
17
+ readonly card: "card";
18
+ readonly cardElevated: "card-elevated";
19
+ readonly cardFilled: "card-filled";
20
+ readonly cardOutlined: "card-outlined";
21
+ readonly hover: string;
22
+ readonly focus: string;
23
+ readonly disabled: string;
24
+ };
25
+ /** The state provided to the `cardClasses()` function. */
26
+ export interface CardClassesState {
27
+ /** The color of the card. */
28
+ color?: CardColor;
29
+ /** Whether the card is interactive. */
30
+ interactive?: boolean;
31
+ /** Emulates `:hover`. */
32
+ hover?: boolean;
33
+ /** Emulates `:focus`. */
34
+ focus?: boolean;
35
+ /** Emulates `:disabled`. */
36
+ disabled?: boolean;
37
+ }
38
+ /**
39
+ * Returns the card classes to apply to an element based on the given state.
40
+ *
41
+ * @param state The state of the card.
42
+ * @return An object of class names and truthy values if they apply.
43
+ */
44
+ export declare function cardClasses({ color, interactive, hover, focus, disabled, }?: CardClassesState): ClassInfo;
45
+ /**
46
+ * A Lit directive that adds card styling and functionality to its element.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * html`
51
+ * <div class="${card({color: 'filled'})} flex flex-row p-4">
52
+ * Card content
53
+ * </div>
54
+ * `
55
+ * ```
56
+ */
57
+ export declare const card: (state?: CardClassesState & import("../shared/directives.js").AdditionalClasses) => import("lit-html/directive.js").DirectiveResult;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { FOCUS_RING_CLASSES } from '../focus/focus-ring.js';
7
+ import { createClassMapDirective } from '../shared/directives.js';
8
+ import { PSEUDO_CLASSES } from '../shared/pseudo-classes.js';
9
+ /** Card color configurations. */
10
+ export const CARD_COLORS = {
11
+ elevated: 'elevated',
12
+ filled: 'filled',
13
+ outlined: 'outlined',
14
+ };
15
+ /** Card classes. */
16
+ export const CARD_CLASSES = {
17
+ card: 'card',
18
+ cardElevated: 'card-elevated',
19
+ cardFilled: 'card-filled',
20
+ cardOutlined: 'card-outlined',
21
+ hover: PSEUDO_CLASSES.hover,
22
+ focus: PSEUDO_CLASSES.focus,
23
+ disabled: PSEUDO_CLASSES.disabled,
24
+ };
25
+ /**
26
+ * Returns the card classes to apply to an element based on the given state.
27
+ *
28
+ * @param state The state of the card.
29
+ * @return An object of class names and truthy values if they apply.
30
+ */
31
+ export function cardClasses({ color, interactive = false, hover = false, focus = false, disabled = false, } = {}) {
32
+ return {
33
+ [FOCUS_RING_CLASSES.focusRingOuter]: interactive,
34
+ [CARD_CLASSES.card]: true,
35
+ [CARD_CLASSES.cardElevated]: color === CARD_COLORS.elevated,
36
+ [CARD_CLASSES.cardFilled]: color === CARD_COLORS.filled,
37
+ [CARD_CLASSES.cardOutlined]: color === CARD_COLORS.outlined || !color,
38
+ [CARD_CLASSES.hover]: hover,
39
+ [CARD_CLASSES.focus]: focus,
40
+ [CARD_CLASSES.disabled]: disabled,
41
+ };
42
+ }
43
+ /**
44
+ * A Lit directive that adds card styling and functionality to its element.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * html`
49
+ * <div class="${card({color: 'filled'})} flex flex-row p-4">
50
+ * Card content
51
+ * </div>
52
+ * `
53
+ * ```
54
+ */
55
+ export const card = createClassMapDirective({
56
+ getClasses: cardClasses,
57
+ });
58
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["card.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAC,uBAAuB,EAAC,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAK3D,iCAAiC;AACjC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAEX,oBAAoB;AACpB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,eAAe;IAC7B,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,eAAe;IAC7B,KAAK,EAAE,cAAc,CAAC,KAAK;IAC3B,KAAK,EAAE,cAAc,CAAC,KAAK;IAC3B,QAAQ,EAAE,cAAc,CAAC,QAAQ;CACzB,CAAC;AAgBX;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,KAAK,EACb,KAAK,GAAG,KAAK,EACb,QAAQ,GAAG,KAAK,MACI,EAAE;IACtB,OAAO;QACL,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,WAAW;QAChD,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI;QACzB,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,KAAK,KAAK,WAAW,CAAC,QAAQ;QAC3D,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,KAAK,KAAK,WAAW,CAAC,MAAM;QACvD,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,KAAK,KAAK,WAAW,CAAC,QAAQ,IAAI,CAAC,KAAK;QACrE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,KAAK;QAC3B,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,KAAK;QAC3B,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,QAAQ;KAClC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,uBAAuB,CAAC;IAC1C,UAAU,EAAE,WAAW;CACxB,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 {FOCUS_RING_CLASSES} from '../focus/focus-ring.js';\nimport {createClassMapDirective} from '../shared/directives.js';\nimport {PSEUDO_CLASSES} from '../shared/pseudo-classes.js';\n\n/** Card color configuration types. */\nexport type CardColor = 'elevated' | 'filled' | 'outlined';\n\n/** Card color configurations. */\nexport const CARD_COLORS = {\n elevated: 'elevated',\n filled: 'filled',\n outlined: 'outlined',\n} as const;\n\n/** Card classes. */\nexport const CARD_CLASSES = {\n card: 'card',\n cardElevated: 'card-elevated',\n cardFilled: 'card-filled',\n cardOutlined: 'card-outlined',\n hover: PSEUDO_CLASSES.hover,\n focus: PSEUDO_CLASSES.focus,\n disabled: PSEUDO_CLASSES.disabled,\n} as const;\n\n/** The state provided to the `cardClasses()` function. */\nexport interface CardClassesState {\n /** The color of the card. */\n color?: CardColor;\n /** Whether the card is interactive. */\n interactive?: boolean;\n /** Emulates `:hover`. */\n hover?: boolean;\n /** Emulates `:focus`. */\n focus?: boolean;\n /** Emulates `:disabled`. */\n disabled?: boolean;\n}\n\n/**\n * Returns the card classes to apply to an element based on the given state.\n *\n * @param state The state of the card.\n * @return An object of class names and truthy values if they apply.\n */\nexport function cardClasses({\n color,\n interactive = false,\n hover = false,\n focus = false,\n disabled = false,\n}: CardClassesState = {}): ClassInfo {\n return {\n [FOCUS_RING_CLASSES.focusRingOuter]: interactive,\n [CARD_CLASSES.card]: true,\n [CARD_CLASSES.cardElevated]: color === CARD_COLORS.elevated,\n [CARD_CLASSES.cardFilled]: color === CARD_COLORS.filled,\n [CARD_CLASSES.cardOutlined]: color === CARD_COLORS.outlined || !color,\n [CARD_CLASSES.hover]: hover,\n [CARD_CLASSES.focus]: focus,\n [CARD_CLASSES.disabled]: disabled,\n };\n}\n\n/**\n * A Lit directive that adds card styling and functionality to its element.\n *\n * @example\n * ```ts\n * html`\n * <div class=\"${card({color: 'filled'})} flex flex-row p-4\">\n * Card content\n * </div>\n * `\n * ```\n */\nexport const card = createClassMapDirective({\n getClasses: cardClasses,\n});\n"]}