@material/web 1.0.0-pre.4 → 1.0.0-pre.5

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 (522) hide show
  1. package/README.md +5 -5
  2. package/badge/lib/_badge.scss +2 -10
  3. package/button/lib/_elevated-button.scss +5 -30
  4. package/button/lib/_elevation.scss +1 -16
  5. package/button/lib/_filled-button.scss +4 -31
  6. package/button/lib/_icon.scss +1 -0
  7. package/button/lib/_outlined-button.scss +6 -23
  8. package/button/lib/_shared.scss +20 -54
  9. package/button/lib/_text-button.scss +8 -34
  10. package/button/lib/_tonal-button.scss +5 -28
  11. package/button/lib/button.d.ts +2 -0
  12. package/button/lib/button.js +5 -1
  13. package/button/lib/button.js.map +1 -1
  14. package/button/lib/elevated-styles.css.js +1 -1
  15. package/button/lib/elevated-styles.css.js.map +1 -1
  16. package/button/lib/filled-styles.css.js +1 -1
  17. package/button/lib/filled-styles.css.js.map +1 -1
  18. package/button/lib/outlined-styles.css.js +1 -1
  19. package/button/lib/outlined-styles.css.js.map +1 -1
  20. package/button/lib/shared-styles.css.js +1 -1
  21. package/button/lib/shared-styles.css.js.map +1 -1
  22. package/button/lib/text-styles.css.js +1 -1
  23. package/button/lib/text-styles.css.js.map +1 -1
  24. package/button/lib/tonal-styles.css.js +1 -1
  25. package/button/lib/tonal-styles.css.js.map +1 -1
  26. package/checkbox/lib/_checkbox.scss +1 -2
  27. package/checkbox/lib/checkbox-styles.css.js +1 -1
  28. package/checkbox/lib/checkbox-styles.css.js.map +1 -1
  29. package/chips/_assist-chip.scss +6 -0
  30. package/chips/_suggestion-chip.scss +6 -0
  31. package/chips/assist-chip.d.ts +20 -0
  32. package/chips/assist-chip.js +24 -0
  33. package/chips/assist-chip.js.map +1 -0
  34. package/chips/lib/_assist-chip.scss +27 -0
  35. package/chips/lib/_shared.scss +183 -0
  36. package/chips/lib/_suggestion-chip.scss +30 -0
  37. package/chips/lib/assist-chip.d.ts +11 -0
  38. package/chips/lib/assist-chip.js +12 -0
  39. package/chips/lib/assist-chip.js.map +1 -0
  40. package/chips/lib/assist-styles.css.js +9 -0
  41. package/chips/lib/assist-styles.css.js.map +1 -0
  42. package/{menusurface/lib/menu-surface-styles.scss → chips/lib/assist-styles.scss} +3 -3
  43. package/chips/lib/chip.d.ts +29 -0
  44. package/chips/lib/chip.js +110 -0
  45. package/chips/lib/chip.js.map +1 -0
  46. package/chips/lib/shared-styles.css.js +9 -0
  47. package/chips/lib/shared-styles.css.js.map +1 -0
  48. package/{autocomplete → chips}/lib/shared-styles.scss +1 -1
  49. package/chips/lib/suggestion-chip.d.ts +11 -0
  50. package/chips/lib/suggestion-chip.js +12 -0
  51. package/chips/lib/suggestion-chip.js.map +1 -0
  52. package/chips/lib/suggestion-styles.css.js +9 -0
  53. package/chips/lib/suggestion-styles.css.js.map +1 -0
  54. package/{autocomplete/lib/autocompletelist/autocomplete-list-styles.scss → chips/lib/suggestion-styles.scss} +3 -3
  55. package/chips/suggestion-chip.d.ts +20 -0
  56. package/chips/suggestion-chip.js +24 -0
  57. package/chips/suggestion-chip.js.map +1 -0
  58. package/dialog/lib/_dialog.scss +7 -5
  59. package/dialog/lib/_tokens.scss +1 -2
  60. package/dialog/lib/dialog-styles.css.js +1 -1
  61. package/dialog/lib/dialog-styles.css.js.map +1 -1
  62. package/dialog/lib/dialog.js +1 -1
  63. package/dialog/lib/dialog.js.map +1 -1
  64. package/elevation/lib/_elevation.scss +1 -21
  65. package/elevation/lib/elevation-styles.css.js +1 -1
  66. package/elevation/lib/elevation-styles.css.js.map +1 -1
  67. package/fab/lib/_fab-extended.scss +3 -10
  68. package/fab/lib/_fab.scss +0 -3
  69. package/fab/lib/_shared.scss +3 -25
  70. package/fab/lib/fab-extended-styles.css.js +1 -1
  71. package/fab/lib/fab-extended-styles.css.js.map +1 -1
  72. package/fab/lib/fab-shared-styles.css.js +1 -1
  73. package/fab/lib/fab-shared-styles.css.js.map +1 -1
  74. package/fab/lib/fab-shared.d.ts +0 -1
  75. package/fab/lib/fab-shared.js +1 -7
  76. package/fab/lib/fab-shared.js.map +1 -1
  77. package/field/lib/field.d.ts +4 -1
  78. package/field/lib/field.js +7 -0
  79. package/field/lib/field.js.map +1 -1
  80. package/focus/lib/_focus-ring.scss +13 -7
  81. package/focus/lib/_md-comp-focus-ring.scss +1 -2
  82. package/focus/lib/focus-ring-styles.css.js +1 -1
  83. package/focus/lib/focus-ring-styles.css.js.map +1 -1
  84. package/iconbutton/lib/_filled-icon-button.scss +1 -12
  85. package/iconbutton/lib/_filled-tonal-icon-button.scss +1 -12
  86. package/iconbutton/lib/_outlined-icon-button.scss +1 -13
  87. package/iconbutton/lib/_shared.scss +10 -6
  88. package/iconbutton/lib/_standard-icon-button.scss +5 -12
  89. package/iconbutton/lib/filled-styles.css.js +1 -1
  90. package/iconbutton/lib/filled-styles.css.js.map +1 -1
  91. package/iconbutton/lib/filled-tonal-styles.css.js +1 -1
  92. package/iconbutton/lib/filled-tonal-styles.css.js.map +1 -1
  93. package/iconbutton/lib/icon-button.js +0 -2
  94. package/iconbutton/lib/icon-button.js.map +1 -1
  95. package/iconbutton/lib/outlined-styles.css.js +1 -1
  96. package/iconbutton/lib/outlined-styles.css.js.map +1 -1
  97. package/iconbutton/lib/shared-styles.css.js +1 -1
  98. package/iconbutton/lib/shared-styles.css.js.map +1 -1
  99. package/iconbutton/lib/standard-styles.css.js +1 -1
  100. package/iconbutton/lib/standard-styles.css.js.map +1 -1
  101. package/list/lib/_list.scss +15 -8
  102. package/list/lib/list-styles.css.js +1 -1
  103. package/list/lib/list-styles.css.js.map +1 -1
  104. package/list/lib/listitem/_list-item.scss +41 -44
  105. package/list/lib/listitem/list-item-styles.css.js +1 -1
  106. package/list/lib/listitem/list-item-styles.css.js.map +1 -1
  107. package/list/lib/listitem/list-item.d.ts +1 -0
  108. package/list/lib/listitem/list-item.js +4 -1
  109. package/list/lib/listitem/list-item.js.map +1 -1
  110. package/menu/lib/_menu.scss +6 -9
  111. package/menu/lib/menu-styles.css.js +1 -1
  112. package/menu/lib/menu-styles.css.js.map +1 -1
  113. package/menu/lib/menu.d.ts +22 -9
  114. package/menu/lib/menu.js +74 -26
  115. package/menu/lib/menu.js.map +1 -1
  116. package/menu/lib/menuitem/menu-item.js +1 -1
  117. package/menu/lib/menuitem/menu-item.js.map +1 -1
  118. package/menu/lib/menuitemlink/menu-item-link.js +2 -1
  119. package/menu/lib/menuitemlink/menu-item-link.js.map +1 -1
  120. package/menu/lib/shared.d.ts +16 -0
  121. package/menu/lib/shared.js +16 -0
  122. package/menu/lib/shared.js.map +1 -1
  123. package/menu/lib/submenuitem/sub-menu-item.d.ts +4 -0
  124. package/menu/lib/submenuitem/sub-menu-item.js +9 -2
  125. package/menu/lib/submenuitem/sub-menu-item.js.map +1 -1
  126. package/menu/lib/surfacePositionController.d.ts +10 -2
  127. package/menu/lib/surfacePositionController.js +6 -2
  128. package/menu/lib/surfacePositionController.js.map +1 -1
  129. package/menu/lib/typeaheadController.d.ts +5 -0
  130. package/menu/lib/typeaheadController.js +7 -3
  131. package/menu/lib/typeaheadController.js.map +1 -1
  132. package/navigationbar/lib/_navigation-bar.scss +1 -4
  133. package/navigationdrawer/lib/_navigation-drawer-modal.scss +0 -3
  134. package/navigationdrawer/lib/_navigation-drawer.scss +0 -3
  135. package/navigationdrawer/lib/_shared.scss +0 -9
  136. package/navigationtab/lib/_navigation-tab.scss +4 -10
  137. package/navigationtab/lib/navigation-tab-styles.css.js +1 -1
  138. package/navigationtab/lib/navigation-tab-styles.css.js.map +1 -1
  139. package/package.json +1 -1
  140. package/radio/lib/_radio.scss +1 -2
  141. package/radio/lib/radio-styles.css.js +1 -1
  142. package/radio/lib/radio-styles.css.js.map +1 -1
  143. package/segmentedbutton/lib/_shared.scss +0 -2
  144. package/segmentedbuttonset/lib/outlined-styles.css.js +1 -1
  145. package/segmentedbuttonset/lib/outlined-styles.css.js.map +1 -1
  146. package/slider/lib/_slider.scss +1 -4
  147. package/slider/lib/_tokens.scss +2 -8
  148. package/slider/lib/slider-styles.css.js +1 -1
  149. package/slider/lib/slider-styles.css.js.map +1 -1
  150. package/textfield/lib/_filled-text-field.scss +1 -7
  151. package/textfield/lib/_outlined-text-field.scss +1 -7
  152. package/tokens/_index.scss +101 -2
  153. package/tokens/_md-comp-assist-chip.scss +68 -0
  154. package/tokens/_md-comp-badge.scss +34 -0
  155. package/tokens/_md-comp-banner.scss +23 -0
  156. package/tokens/_md-comp-bottom-app-bar.scss +21 -0
  157. package/tokens/_md-comp-carousel-item.scss +23 -0
  158. package/tokens/_md-comp-checkbox.scss +21 -0
  159. package/tokens/_md-comp-circular-progress-indicator.scss +22 -0
  160. package/tokens/_md-comp-data-table.scss +23 -0
  161. package/tokens/_md-comp-date-input-modal.scss +23 -0
  162. package/tokens/_md-comp-date-picker-docked.scss +25 -0
  163. package/tokens/_md-comp-date-picker-modal.scss +25 -0
  164. package/tokens/_md-comp-dialog.scss +43 -0
  165. package/tokens/_md-comp-divider.scss +17 -0
  166. package/tokens/_md-comp-elevated-button.scss +58 -0
  167. package/tokens/_md-comp-elevated-card.scss +23 -0
  168. package/tokens/_md-comp-extended-fab-branded.scss +38 -0
  169. package/tokens/_md-comp-extended-fab-primary.scss +38 -0
  170. package/tokens/_md-comp-extended-fab-secondary.scss +41 -0
  171. package/tokens/_md-comp-extended-fab-surface.scss +38 -0
  172. package/tokens/_md-comp-extended-fab-tertiary.scss +41 -0
  173. package/tokens/_md-comp-fab-branded-large.scss +23 -0
  174. package/tokens/_md-comp-fab-branded.scss +23 -0
  175. package/tokens/_md-comp-fab-primary-large.scss +23 -0
  176. package/tokens/_md-comp-fab-primary-small.scss +23 -0
  177. package/tokens/_md-comp-fab-primary.scss +23 -0
  178. package/tokens/_md-comp-fab-secondary-large.scss +23 -0
  179. package/tokens/_md-comp-fab-secondary-small.scss +23 -0
  180. package/tokens/_md-comp-fab-secondary.scss +23 -0
  181. package/tokens/_md-comp-fab-surface-large.scss +23 -0
  182. package/tokens/_md-comp-fab-surface-small.scss +23 -0
  183. package/tokens/_md-comp-fab-surface.scss +23 -0
  184. package/tokens/_md-comp-fab-tertiary-large.scss +23 -0
  185. package/tokens/_md-comp-fab-tertiary-small.scss +23 -0
  186. package/tokens/_md-comp-fab-tertiary.scss +23 -0
  187. package/tokens/_md-comp-filled-autocomplete.scss +25 -0
  188. package/tokens/_md-comp-filled-button.scss +58 -0
  189. package/tokens/_md-comp-filled-card.scss +23 -0
  190. package/tokens/_md-comp-filled-icon-button.scss +21 -0
  191. package/tokens/_md-comp-filled-menu-button.scss +25 -0
  192. package/tokens/_md-comp-filled-select.scss +25 -0
  193. package/tokens/_md-comp-filled-text-field.scss +46 -0
  194. package/tokens/_md-comp-filled-tonal-button.scss +59 -0
  195. package/tokens/_md-comp-filled-tonal-icon-button.scss +24 -0
  196. package/tokens/_md-comp-filter-chip.scss +38 -0
  197. package/tokens/_md-comp-full-screen-dialog.scss +25 -0
  198. package/tokens/_md-comp-icon-button.scss +21 -0
  199. package/tokens/_md-comp-input-chip.scss +38 -0
  200. package/tokens/_md-comp-linear-progress-indicator.scss +22 -0
  201. package/tokens/_md-comp-list.scss +58 -0
  202. package/tokens/_md-comp-menu.scss +21 -0
  203. package/tokens/_md-comp-navigation-bar.scss +25 -0
  204. package/tokens/_md-comp-navigation-drawer.scss +25 -0
  205. package/tokens/_md-comp-navigation-rail.scss +25 -0
  206. package/tokens/_md-comp-outlined-autocomplete.scss +28 -0
  207. package/tokens/_md-comp-outlined-button.scss +56 -0
  208. package/tokens/_md-comp-outlined-card.scss +23 -0
  209. package/tokens/_md-comp-outlined-icon-button.scss +21 -0
  210. package/tokens/_md-comp-outlined-menu-button.scss +23 -0
  211. package/tokens/_md-comp-outlined-segmented-button.scss +38 -0
  212. package/tokens/_md-comp-outlined-select.scss +25 -0
  213. package/tokens/_md-comp-outlined-text-field.scss +44 -0
  214. package/tokens/_md-comp-plain-tooltip.scss +21 -0
  215. package/tokens/_md-comp-primary-navigation-tab.scss +41 -0
  216. package/tokens/_md-comp-radio-button.scss +19 -0
  217. package/tokens/_md-comp-rich-tooltip.scss +25 -0
  218. package/tokens/_md-comp-scrim.scss +17 -0
  219. package/tokens/_md-comp-search-bar.scss +25 -0
  220. package/tokens/_md-comp-search-view.scss +23 -0
  221. package/tokens/_md-comp-secondary-navigation-tab.scss +41 -0
  222. package/tokens/_md-comp-sheet-bottom.scss +21 -0
  223. package/tokens/_md-comp-sheet-floating.scss +21 -0
  224. package/tokens/_md-comp-sheet-side.scss +25 -0
  225. package/tokens/_md-comp-slider.scss +38 -0
  226. package/tokens/_md-comp-snackbar.scss +25 -0
  227. package/tokens/_md-comp-standard-menu-button.scss +23 -0
  228. package/tokens/_md-comp-suggestion-chip.scss +72 -0
  229. package/tokens/_md-comp-switch.scss +21 -0
  230. package/tokens/_md-comp-text-button.scss +56 -0
  231. package/tokens/_md-comp-time-input.scss +25 -0
  232. package/tokens/_md-comp-time-picker.scss +25 -0
  233. package/tokens/_md-comp-top-app-bar-large.scss +23 -0
  234. package/tokens/_md-comp-top-app-bar-medium.scss +23 -0
  235. package/tokens/_md-comp-top-app-bar-small-centered.scss +26 -0
  236. package/tokens/_md-comp-top-app-bar-small.scss +23 -0
  237. package/tokens/_md-ref-palette.scss +12 -0
  238. package/tokens/_md-ref-typeface.scss +12 -0
  239. package/tokens/_md-sys-color.scss +25 -0
  240. package/tokens/_md-sys-elevation.scss +30 -0
  241. package/tokens/_md-sys-motion.scss +12 -0
  242. package/tokens/_md-sys-shape.scss +12 -0
  243. package/tokens/_md-sys-state.scss +12 -0
  244. package/tokens/_md-sys-typescale.scss +17 -0
  245. package/autocomplete/_filled-autocomplete.scss +0 -6
  246. package/autocomplete/_outlined-autocomplete.scss +0 -6
  247. package/autocomplete/autocomplete-item.d.ts +0 -19
  248. package/autocomplete/autocomplete-item.js +0 -22
  249. package/autocomplete/autocomplete-item.js.map +0 -1
  250. package/autocomplete/autocomplete-list.d.ts +0 -19
  251. package/autocomplete/autocomplete-list.js +0 -23
  252. package/autocomplete/autocomplete-list.js.map +0 -1
  253. package/autocomplete/autocomplete-surface.d.ts +0 -19
  254. package/autocomplete/autocomplete-surface.js +0 -23
  255. package/autocomplete/autocomplete-surface.js.map +0 -1
  256. package/autocomplete/filled-autocomplete.d.ts +0 -28
  257. package/autocomplete/filled-autocomplete.js +0 -46
  258. package/autocomplete/filled-autocomplete.js.map +0 -1
  259. package/autocomplete/lib/_filled-autocomplete.scss +0 -189
  260. package/autocomplete/lib/_outlined-autocomplete.scss +0 -178
  261. package/autocomplete/lib/_shared.scss +0 -25
  262. package/autocomplete/lib/autocomplete.d.ts +0 -54
  263. package/autocomplete/lib/autocomplete.js +0 -265
  264. package/autocomplete/lib/autocomplete.js.map +0 -1
  265. package/autocomplete/lib/autocompleteitem/autocomplete-item.d.ts +0 -11
  266. package/autocomplete/lib/autocompleteitem/autocomplete-item.js +0 -14
  267. package/autocomplete/lib/autocompleteitem/autocomplete-item.js.map +0 -1
  268. package/autocomplete/lib/autocompleteitem/harness.d.ts +0 -11
  269. package/autocomplete/lib/autocompleteitem/harness.js +0 -12
  270. package/autocomplete/lib/autocompleteitem/harness.js.map +0 -1
  271. package/autocomplete/lib/autocompletelist/_autocomplete-list.scss +0 -13
  272. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js +0 -9
  273. package/autocomplete/lib/autocompletelist/autocomplete-list-styles.css.js.map +0 -1
  274. package/autocomplete/lib/autocompletelist/autocomplete-list.d.ts +0 -14
  275. package/autocomplete/lib/autocompletelist/autocomplete-list.js +0 -21
  276. package/autocomplete/lib/autocompletelist/autocomplete-list.js.map +0 -1
  277. package/autocomplete/lib/autocompletelist/harness.d.ts +0 -11
  278. package/autocomplete/lib/autocompletelist/harness.js +0 -12
  279. package/autocomplete/lib/autocompletelist/harness.js.map +0 -1
  280. package/autocomplete/lib/autocompletesurface/_autocomplete-surface.scss +0 -13
  281. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js +0 -9
  282. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.js.map +0 -1
  283. package/autocomplete/lib/autocompletesurface/autocomplete-surface-styles.scss +0 -10
  284. package/autocomplete/lib/autocompletesurface/autocomplete-surface.d.ts +0 -13
  285. package/autocomplete/lib/autocompletesurface/autocomplete-surface.js +0 -21
  286. package/autocomplete/lib/autocompletesurface/autocomplete-surface.js.map +0 -1
  287. package/autocomplete/lib/filled-styles.css.d.ts +0 -1
  288. package/autocomplete/lib/filled-styles.css.js +0 -9
  289. package/autocomplete/lib/filled-styles.css.js.map +0 -1
  290. package/autocomplete/lib/filled-styles.scss +0 -10
  291. package/autocomplete/lib/outlined-styles.css.d.ts +0 -1
  292. package/autocomplete/lib/outlined-styles.css.js +0 -9
  293. package/autocomplete/lib/outlined-styles.css.js.map +0 -1
  294. package/autocomplete/lib/outlined-styles.scss +0 -10
  295. package/autocomplete/lib/shared-styles.css.js +0 -9
  296. package/autocomplete/lib/shared-styles.css.js.map +0 -1
  297. package/autocomplete/outlined-autocomplete.d.ts +0 -28
  298. package/autocomplete/outlined-autocomplete.js +0 -46
  299. package/autocomplete/outlined-autocomplete.js.map +0 -1
  300. package/chips/action/delete-action.d.ts +0 -18
  301. package/chips/action/delete-action.js +0 -20
  302. package/chips/action/delete-action.js.map +0 -1
  303. package/chips/action/lib/action.d.ts +0 -47
  304. package/chips/action/lib/action.js +0 -162
  305. package/chips/action/lib/action.js.map +0 -1
  306. package/chips/action/lib/constants.d.ts +0 -62
  307. package/chips/action/lib/constants.js +0 -69
  308. package/chips/action/lib/constants.js.map +0 -1
  309. package/chips/action/lib/delete-action.d.ts +0 -20
  310. package/chips/action/lib/delete-action.js +0 -65
  311. package/chips/action/lib/delete-action.js.map +0 -1
  312. package/chips/action/lib/events.d.ts +0 -14
  313. package/chips/action/lib/events.js +0 -16
  314. package/chips/action/lib/events.js.map +0 -1
  315. package/chips/action/lib/link-action.d.ts +0 -19
  316. package/chips/action/lib/link-action.js +0 -55
  317. package/chips/action/lib/link-action.js.map +0 -1
  318. package/chips/action/lib/presentational-action.d.ts +0 -15
  319. package/chips/action/lib/presentational-action.js +0 -30
  320. package/chips/action/lib/presentational-action.js.map +0 -1
  321. package/chips/action/lib/primary-action.d.ts +0 -28
  322. package/chips/action/lib/primary-action.js +0 -88
  323. package/chips/action/lib/primary-action.js.map +0 -1
  324. package/chips/action/lib/selectable-action.d.ts +0 -17
  325. package/chips/action/lib/selectable-action.js +0 -67
  326. package/chips/action/lib/selectable-action.js.map +0 -1
  327. package/chips/action/lib/types.d.ts +0 -23
  328. package/chips/action/lib/types.js +0 -7
  329. package/chips/action/lib/types.js.map +0 -1
  330. package/chips/action/link-action.d.ts +0 -18
  331. package/chips/action/link-action.js +0 -20
  332. package/chips/action/link-action.js.map +0 -1
  333. package/chips/action/presentational-action.d.ts +0 -18
  334. package/chips/action/presentational-action.js +0 -20
  335. package/chips/action/presentational-action.js.map +0 -1
  336. package/chips/action/primary-action.d.ts +0 -18
  337. package/chips/action/primary-action.js +0 -20
  338. package/chips/action/primary-action.js.map +0 -1
  339. package/chips/action/selectable-action.d.ts +0 -18
  340. package/chips/action/selectable-action.js +0 -20
  341. package/chips/action/selectable-action.js.map +0 -1
  342. package/chips/chip/lib/_assist-chip-theme.scss +0 -99
  343. package/chips/chip/lib/_chip-theme.scss +0 -1285
  344. package/chips/chip/lib/_chip.scss +0 -444
  345. package/chips/chip/lib/_filter-chip-theme.scss +0 -130
  346. package/chips/chip/lib/_input-chip-theme.scss +0 -91
  347. package/chips/chip/lib/_suggestion-chip-theme.scss +0 -92
  348. package/chips/chip/lib/action-chip.d.ts +0 -18
  349. package/chips/chip/lib/action-chip.js +0 -39
  350. package/chips/chip/lib/action-chip.js.map +0 -1
  351. package/chips/chip/lib/adapter.d.ts +0 -50
  352. package/chips/chip/lib/adapter.js +0 -7
  353. package/chips/chip/lib/adapter.js.map +0 -1
  354. package/chips/chip/lib/animationframe.d.ts +0 -31
  355. package/chips/chip/lib/animationframe.js +0 -66
  356. package/chips/chip/lib/animationframe.js.map +0 -1
  357. package/chips/chip/lib/chip.d.ts +0 -43
  358. package/chips/chip/lib/chip.js +0 -134
  359. package/chips/chip/lib/chip.js.map +0 -1
  360. package/chips/chip/lib/constants.d.ts +0 -43
  361. package/chips/chip/lib/constants.js +0 -48
  362. package/chips/chip/lib/constants.js.map +0 -1
  363. package/chips/chip/lib/foundation.d.ts +0 -41
  364. package/chips/chip/lib/foundation.js +0 -255
  365. package/chips/chip/lib/foundation.js.map +0 -1
  366. package/chips/chip/lib/link-chip.d.ts +0 -21
  367. package/chips/chip/lib/link-chip.js +0 -53
  368. package/chips/chip/lib/link-chip.js.map +0 -1
  369. package/chips/chip/lib/presentational-chip.d.ts +0 -18
  370. package/chips/chip/lib/presentational-chip.js +0 -39
  371. package/chips/chip/lib/presentational-chip.js.map +0 -1
  372. package/chips/chip/lib/selectable-chip.d.ts +0 -22
  373. package/chips/chip/lib/selectable-chip.js +0 -57
  374. package/chips/chip/lib/selectable-chip.js.map +0 -1
  375. package/chips/chip/lib/types.d.ts +0 -42
  376. package/chips/chip/lib/types.js +0 -7
  377. package/chips/chip/lib/types.js.map +0 -1
  378. package/chips/chipset/lib/_chip-set-theme.scss +0 -50
  379. package/chips/chipset/lib/_chip-set.scss +0 -48
  380. package/chips/chipset/lib/adapter.d.ts +0 -45
  381. package/chips/chipset/lib/adapter.js +0 -7
  382. package/chips/chipset/lib/adapter.js.map +0 -1
  383. package/chips/chipset/lib/constants.d.ts +0 -26
  384. package/chips/chipset/lib/constants.js +0 -30
  385. package/chips/chipset/lib/constants.js.map +0 -1
  386. package/chips/chipset/lib/foundation.d.ts +0 -68
  387. package/chips/chipset/lib/foundation.js +0 -314
  388. package/chips/chipset/lib/foundation.js.map +0 -1
  389. package/chips/chipset/lib/types.d.ts +0 -41
  390. package/chips/chipset/lib/types.js +0 -7
  391. package/chips/chipset/lib/types.js.map +0 -1
  392. package/menusurface/_menu-surface.scss +0 -6
  393. package/menusurface/lib/_md-comp-menu-surface.scss +0 -31
  394. package/menusurface/lib/_menu-surface.scss +0 -122
  395. package/menusurface/lib/adapter.d.ts +0 -46
  396. package/menusurface/lib/adapter.js +0 -7
  397. package/menusurface/lib/adapter.js.map +0 -1
  398. package/menusurface/lib/constants.d.ts +0 -71
  399. package/menusurface/lib/constants.js +0 -83
  400. package/menusurface/lib/constants.js.map +0 -1
  401. package/menusurface/lib/foundation.d.ts +0 -176
  402. package/menusurface/lib/foundation.js +0 -544
  403. package/menusurface/lib/foundation.js.map +0 -1
  404. package/menusurface/lib/menu-surface-styles.css.d.ts +0 -1
  405. package/menusurface/lib/menu-surface-styles.css.js +0 -9
  406. package/menusurface/lib/menu-surface-styles.css.js.map +0 -1
  407. package/menusurface/lib/menu-surface.d.ts +0 -62
  408. package/menusurface/lib/menu-surface.js +0 -347
  409. package/menusurface/lib/menu-surface.js.map +0 -1
  410. package/menusurface/lib/types.d.ts +0 -19
  411. package/menusurface/lib/types.js +0 -7
  412. package/menusurface/lib/types.js.map +0 -1
  413. package/menusurface/menu-surface.d.ts +0 -14
  414. package/menusurface/menu-surface.js +0 -17
  415. package/menusurface/menu-surface.js.map +0 -1
  416. package/sass/_elevation.scss +0 -159
  417. package/sass/_resolvers.scss +0 -16
  418. package/sass/_typography.scss +0 -39
  419. package/tokens/v0_160/_index.scss +0 -107
  420. package/tokens/v0_160/_md-comp-assist-chip.scss +0 -109
  421. package/tokens/v0_160/_md-comp-badge.scss +0 -58
  422. package/tokens/v0_160/_md-comp-banner.scss +0 -75
  423. package/tokens/v0_160/_md-comp-bottom-app-bar.scss +0 -35
  424. package/tokens/v0_160/_md-comp-carousel-item.scss +0 -65
  425. package/tokens/v0_160/_md-comp-checkbox.scss +0 -126
  426. package/tokens/v0_160/_md-comp-circular-progress-indicator.scss +0 -39
  427. package/tokens/v0_160/_md-comp-data-table.scss +0 -96
  428. package/tokens/v0_160/_md-comp-date-input-modal.scss +0 -89
  429. package/tokens/v0_160/_md-comp-date-picker-docked.scss +0 -246
  430. package/tokens/v0_160/_md-comp-date-picker-modal.scss +0 -305
  431. package/tokens/v0_160/_md-comp-dialog.scss +0 -123
  432. package/tokens/v0_160/_md-comp-divider.scss +0 -25
  433. package/tokens/v0_160/_md-comp-elevated-button.scss +0 -91
  434. package/tokens/v0_160/_md-comp-elevated-card.scss +0 -59
  435. package/tokens/v0_160/_md-comp-extended-fab-branded.scss +0 -86
  436. package/tokens/v0_160/_md-comp-extended-fab-primary.scss +0 -94
  437. package/tokens/v0_160/_md-comp-extended-fab-secondary.scss +0 -95
  438. package/tokens/v0_160/_md-comp-extended-fab-surface.scss +0 -90
  439. package/tokens/v0_160/_md-comp-extended-fab-tertiary.scss +0 -95
  440. package/tokens/v0_160/_md-comp-fab-branded-large.scss +0 -60
  441. package/tokens/v0_160/_md-comp-fab-branded.scss +0 -60
  442. package/tokens/v0_160/_md-comp-fab-primary-large.scss +0 -65
  443. package/tokens/v0_160/_md-comp-fab-primary-small.scss +0 -65
  444. package/tokens/v0_160/_md-comp-fab-primary.scss +0 -65
  445. package/tokens/v0_160/_md-comp-fab-secondary-large.scss +0 -66
  446. package/tokens/v0_160/_md-comp-fab-secondary-small.scss +0 -66
  447. package/tokens/v0_160/_md-comp-fab-secondary.scss +0 -66
  448. package/tokens/v0_160/_md-comp-fab-surface-large.scss +0 -64
  449. package/tokens/v0_160/_md-comp-fab-surface-small.scss +0 -64
  450. package/tokens/v0_160/_md-comp-fab-surface.scss +0 -64
  451. package/tokens/v0_160/_md-comp-fab-tertiary-large.scss +0 -66
  452. package/tokens/v0_160/_md-comp-fab-tertiary-small.scss +0 -66
  453. package/tokens/v0_160/_md-comp-fab-tertiary.scss +0 -66
  454. package/tokens/v0_160/_md-comp-filled-autocomplete.scss +0 -267
  455. package/tokens/v0_160/_md-comp-filled-button.scss +0 -89
  456. package/tokens/v0_160/_md-comp-filled-card.scss +0 -58
  457. package/tokens/v0_160/_md-comp-filled-icon-button.scss +0 -79
  458. package/tokens/v0_160/_md-comp-filled-menu-button.scss +0 -98
  459. package/tokens/v0_160/_md-comp-filled-select.scss +0 -272
  460. package/tokens/v0_160/_md-comp-filled-text-field.scss +0 -189
  461. package/tokens/v0_160/_md-comp-filled-tonal-button.scss +0 -99
  462. package/tokens/v0_160/_md-comp-filled-tonal-icon-button.scss +0 -86
  463. package/tokens/v0_160/_md-comp-filter-chip.scss +0 -209
  464. package/tokens/v0_160/_md-comp-full-screen-dialog.scss +0 -111
  465. package/tokens/v0_160/_md-comp-icon-button.scss +0 -70
  466. package/tokens/v0_160/_md-comp-input-chip.scss +0 -184
  467. package/tokens/v0_160/_md-comp-linear-progress-indicator.scss +0 -41
  468. package/tokens/v0_160/_md-comp-list.scss +0 -248
  469. package/tokens/v0_160/_md-comp-menu.scss +0 -121
  470. package/tokens/v0_160/_md-comp-navigation-bar.scss +0 -114
  471. package/tokens/v0_160/_md-comp-navigation-drawer.scss +0 -162
  472. package/tokens/v0_160/_md-comp-navigation-rail.scss +0 -131
  473. package/tokens/v0_160/_md-comp-outlined-autocomplete.scss +0 -257
  474. package/tokens/v0_160/_md-comp-outlined-button.scss +0 -84
  475. package/tokens/v0_160/_md-comp-outlined-card.scss +0 -65
  476. package/tokens/v0_160/_md-comp-outlined-icon-button.scss +0 -79
  477. package/tokens/v0_160/_md-comp-outlined-menu-button.scss +0 -94
  478. package/tokens/v0_160/_md-comp-outlined-segmented-button.scss +0 -112
  479. package/tokens/v0_160/_md-comp-outlined-select.scss +0 -262
  480. package/tokens/v0_160/_md-comp-outlined-text-field.scss +0 -171
  481. package/tokens/v0_160/_md-comp-plain-tooltip.scss +0 -55
  482. package/tokens/v0_160/_md-comp-primary-navigation-tab.scss +0 -121
  483. package/tokens/v0_160/_md-comp-radio-button.scss +0 -68
  484. package/tokens/v0_160/_md-comp-rich-tooltip.scss +0 -121
  485. package/tokens/v0_160/_md-comp-scrim.scss +0 -25
  486. package/tokens/v0_160/_md-comp-search-bar.scss +0 -99
  487. package/tokens/v0_160/_md-comp-search-view.scss +0 -93
  488. package/tokens/v0_160/_md-comp-secondary-navigation-tab.scss +0 -84
  489. package/tokens/v0_160/_md-comp-sheet-bottom.scss +0 -45
  490. package/tokens/v0_160/_md-comp-sheet-floating.scss +0 -34
  491. package/tokens/v0_160/_md-comp-sheet-side.scss +0 -91
  492. package/tokens/v0_160/_md-comp-slider.scss +0 -114
  493. package/tokens/v0_160/_md-comp-snackbar.scss +0 -127
  494. package/tokens/v0_160/_md-comp-standard-menu-button.scss +0 -98
  495. package/tokens/v0_160/_md-comp-suggestion-chip.scss +0 -125
  496. package/tokens/v0_160/_md-comp-switch.scss +0 -136
  497. package/tokens/v0_160/_md-comp-text-button.scss +0 -77
  498. package/tokens/v0_160/_md-comp-time-input.scss +0 -218
  499. package/tokens/v0_160/_md-comp-time-picker.scss +0 -264
  500. package/tokens/v0_160/_md-comp-top-app-bar-large.scss +0 -63
  501. package/tokens/v0_160/_md-comp-top-app-bar-medium.scss +0 -63
  502. package/tokens/v0_160/_md-comp-top-app-bar-small-centered.scss +0 -66
  503. package/tokens/v0_160/_md-comp-top-app-bar-small.scss +0 -64
  504. package/tokens/v0_160/_md-ref-palette.scss +0 -107
  505. package/tokens/v0_160/_md-ref-typeface.scss +0 -21
  506. package/tokens/v0_160/_md-sys-color.scss +0 -904
  507. package/tokens/v0_160/_md-sys-elevation.scss +0 -21
  508. package/tokens/v0_160/_md-sys-motion.scss +0 -53
  509. package/tokens/v0_160/_md-sys-shape.scss +0 -30
  510. package/tokens/v0_160/_md-sys-state.scss +0 -19
  511. package/tokens/v0_160/_md-sys-typescale.scss +0 -284
  512. package/tokens/v0_160/index.test.css.d.ts +0 -1
  513. package/tokens/v0_160/index.test.css.js +0 -9
  514. package/tokens/v0_160/index.test.css.js.map +0 -1
  515. package/tokens/v0_160/index.test.scss +0 -584
  516. package/tokens/v0_160/lib.test.css.d.ts +0 -1
  517. package/tokens/v0_160/lib.test.css.js +0 -9
  518. package/tokens/v0_160/lib.test.css.js.map +0 -1
  519. package/tokens/v0_160/lib.test.scss +0 -663
  520. /package/{autocomplete/lib/autocompletelist/autocomplete-list-styles.css.d.ts → chips/lib/assist-styles.css.d.ts} +0 -0
  521. /package/{autocomplete → chips}/lib/shared-styles.css.d.ts +0 -0
  522. /package/{autocomplete/lib/autocompletesurface/autocomplete-surface-styles.css.d.ts → chips/lib/suggestion-styles.css.d.ts} +0 -0
@@ -1,1285 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2022 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
-
7
- // Selector '.md3-*' should only be used in this project.
8
- // stylelint-disable selector-class-pattern --
9
- // Internal styling for Chip MDC component.
10
-
11
- // go/keep-sorted start
12
- @use 'sass:color';
13
- @use 'sass:map';
14
- @use 'sass:math';
15
- // go/keep-sorted end
16
- // go/keep-sorted start
17
- @use '../../../elevation/lib/elevation';
18
- @use '../../../ripple/ripple';
19
- @use '../../../sass/dom';
20
- @use '../../../sass/resolvers';
21
- @use '../../../sass/theme';
22
- @use '../../../sass/typography';
23
- // TODO(b/240224981): Uncomment when styles are traslated to md3 shape.
24
- // @use '../../../sass/shape';
25
- // go/keep-sorted end
26
-
27
- $height: 32px;
28
- $minimum-height: 24px;
29
- $maximum-height: $height;
30
- $density-scale: 0;
31
- $density-config: (
32
- height: (
33
- default: $height,
34
- maximum: $maximum-height,
35
- minimum: $minimum-height,
36
- ),
37
- );
38
- $radius: math.div($height, 2);
39
- $type-scale: body2;
40
- $container-color: color.mix(#000, #fff, 12%);
41
- $text-label-color: rgba(#000, 0.87);
42
- $icon-color: rgba(#000, 0.87);
43
- $checkmark-color: rgba(#000, 0.87);
44
- $delete-action-color: rgba(#000, 0.87);
45
- $ripple-color: on-surface;
46
- $checkmark-size: 20px;
47
- $leading-icon-size: 20px;
48
- $delete-action-size: 18px;
49
- $leading-padding: 12px;
50
- $trailing-padding: 12px;
51
- $avatar-size: 24px;
52
- $avatar-leading-padding: 4px;
53
- $avatar-trailing-padding: 8px;
54
- $graphic-leading-padding: 6px;
55
- $graphic-trailing-padding: 6px;
56
- $delete-action-leading-padding: 8px;
57
- $delete-action-trailing-padding: 8px;
58
- $ripple-target: '.md3-chip__ripple';
59
- $ripple-target-primary: '.md3-chip__ripple--primary';
60
- $ripple-target-delete: '.md3-chip__ripple--delete';
61
-
62
- // Filter chip colors
63
- $filter-selected-container-color: color.mix(#000, $container-color, 8%);
64
-
65
- $_light-theme: (
66
- container-elevation: null,
67
- container-height: null,
68
- container-shadow-color: null,
69
- container-shape: null,
70
- disabled-label-text-color: null,
71
- disabled-label-text-opacity: null,
72
- disabled-outline-color: null,
73
- disabled-outline-opacity: null,
74
- elevated-container-color: null,
75
- elevated-container-elevation: null,
76
- elevated-container-shadow-color: null,
77
- container-surface-tint-layer-color: null,
78
- elevated-disabled-container-color: null,
79
- elevated-disabled-container-elevation: null,
80
- elevated-disabled-container-opacity: null,
81
- elevated-focus-container-elevation: null,
82
- elevated-hover-container-elevation: null,
83
- elevated-pressed-container-elevation: null,
84
- elevated-selected-container-color: null,
85
- elevated-selected-container-elevation: null,
86
- elevated-unselected-container-color: null,
87
- flat-container-elevation: null,
88
- flat-disabled-outline-color: null,
89
- flat-disabled-outline-opacity: null,
90
- flat-disabled-selected-outline-color: null,
91
- flat-disabled-selected-outline-opacity: null,
92
- flat-disabled-unselected-outline-color: null,
93
- flat-disabled-unselected-outline-opacity: null,
94
- flat-focus-outline-color: null,
95
- flat-outline-color: null,
96
- flat-outline-width: null,
97
- flat-selected-container-color: null,
98
- flat-selected-focus-container-elevation: null,
99
- flat-selected-hover-container-elevation: null,
100
- flat-selected-outline-color: null,
101
- flat-selected-outline-width: null,
102
- flat-selected-pressed-container-elevation: null,
103
- flat-unselected-focus-container-elevation: null,
104
- flat-unselected-focus-outline-color: null,
105
- flat-unselected-hover-container-elevation: null,
106
- flat-unselected-outline-color: null,
107
- flat-unselected-outline-width: null,
108
- flat-unselected-pressed-container-elevation: null,
109
- focus-label-text-color: null,
110
- focus-outline-color: null,
111
- focus-state-layer-color: null,
112
- focus-state-layer-opacity: null,
113
- hover-label-text-color: null,
114
- hover-state-layer-color: null,
115
- hover-state-layer-opacity: null,
116
- label-text-color: null,
117
- label-text-font: null,
118
- label-text-line-height: null,
119
- label-text-size: null,
120
- label-text-tracking: null,
121
- label-text-weight: null,
122
- outline-color: null,
123
- outline-width: null,
124
- pressed-label-text-color: null,
125
- pressed-state-layer-color: null,
126
- pressed-state-layer-opacity: null,
127
- selected-focus-label-text-color: null,
128
- selected-focus-state-layer-color: null,
129
- selected-focus-state-layer-opacity: null,
130
- selected-hover-label-text-color: null,
131
- selected-hover-state-layer-color: null,
132
- selected-hover-state-layer-opacity: null,
133
- selected-label-text-color: null,
134
- selected-pressed-label-text-color: null,
135
- selected-pressed-state-layer-color: null,
136
- selected-pressed-state-layer-opacity: null,
137
- unselected-focus-label-text-color: null,
138
- unselected-focus-state-layer-color: null,
139
- unselected-focus-state-layer-opacity: null,
140
- unselected-hover-label-text-color: null,
141
- unselected-hover-state-layer-color: null,
142
- unselected-hover-state-layer-opacity: null,
143
- unselected-label-text-color: null,
144
- unselected-pressed-label-text-color: null,
145
- unselected-pressed-state-layer-color: null,
146
- unselected-pressed-state-layer-opacity: null,
147
- with-avatar-avatar-shape: null,
148
- with-avatar-avatar-size: null,
149
- with-avatar-disabled-avatar-opacity: null,
150
- with-icon-disabled-icon-color: null,
151
- with-icon-disabled-icon-opacity: null,
152
- with-icon-focus-icon-color: null,
153
- with-icon-hover-icon-color: null,
154
- with-icon-icon-color: null,
155
- with-icon-icon-size: null,
156
- with-icon-pressed-icon-color: null,
157
- with-icon-selected-focus-icon-color: null,
158
- with-icon-selected-hover-icon-color: null,
159
- with-icon-selected-icon-color: null,
160
- with-icon-selected-pressed-icon-color: null,
161
- with-icon-unselected-focus-icon-color: null,
162
- with-icon-unselected-hover-icon-color: null,
163
- with-icon-unselected-icon-color: null,
164
- with-icon-unselected-pressed-icon-color: null,
165
- with-leading-icon-disabled-leading-icon-color: null,
166
- with-leading-icon-disabled-leading-icon-opacity: null,
167
- with-leading-icon-focus-leading-icon-color: null,
168
- with-leading-icon-hover-leading-icon-color: null,
169
- with-leading-icon-leading-icon-color: null,
170
- with-leading-icon-leading-icon-size: null,
171
- with-leading-icon-pressed-leading-icon-color: null,
172
- with-delete-icon-disabled-delete-icon-color: null,
173
- with-delete-icon-disabled-delete-icon-opacity: null,
174
- with-delete-icon-focus-delete-icon-color: null,
175
- with-delete-icon-hover-delete-icon-color: null,
176
- with-delete-icon-pressed-delete-icon-color: null,
177
- with-delete-icon-delete-icon-color: null,
178
- with-delete-icon-delete-icon-size: null,
179
- );
180
- $_custom-property-prefix: 'chip';
181
-
182
- @mixin theme($theme, $resolvers: resolvers.$material) {
183
- @include theme.validate-theme($_light-theme, $theme);
184
- $theme: _resolve-theme($theme, $resolvers: $resolvers);
185
- $theme: theme.create-theme-vars($theme, $_custom-property-prefix);
186
- @include theme.emit-theme-vars($theme);
187
- }
188
-
189
- @mixin theme-styles($theme, $resolvers: resolvers.$material) {
190
- @include theme.validate-theme-keys($_light-theme, $theme);
191
- $theme: theme.create-theme-vars($theme, $_custom-property-prefix);
192
-
193
- @include _container-shape(map.get($theme, container-shape));
194
- @include _avatar-shape(map.get($theme, with-avatar-avatar-shape));
195
- @include graphic-size(map.get($theme, with-avatar-avatar-size));
196
- @include height(map.get($theme, container-height));
197
- @include elevation.theme(
198
- (
199
- shadow-color: map.get($theme, elevated-container-shadow-color),
200
- surface-tint: map.get($theme, container-surface-tint-layer-color),
201
- )
202
- );
203
- @include _container-elevation(
204
- map.get($resolvers, elevation),
205
- $shadow-color: map.get($theme, container-shadow-color),
206
- $map: (default: map.get($theme, container-elevation))
207
- );
208
- @include _container-elevation(
209
- map.get($resolvers, elevation),
210
- $shadow-color: map.get($theme, flat-container-shadow-color),
211
- $map: (enabled: map.get($theme, flat-container-elevation))
212
- );
213
- @include _container-elevation(
214
- map.get($resolvers, elevation),
215
- $shadow-color: map.get($theme, elevated-container-shadow-color),
216
- $map: (
217
- enabled: map.get($theme, elevated-container-elevation),
218
- disabled: map.get($theme, elevated-disabled-container-elevation),
219
- hover: map.get($theme, elevated-hover-container-elevation),
220
- focus: map.get($theme, elevated-focus-container-elevation),
221
- pressed: map.get($theme, elevated-pressed-container-elevation)
222
- )
223
- );
224
- @include _selected-container-elevation(
225
- map.get($resolvers, elevation),
226
- $shadow-color: map.get($theme, elevated-container-shadow-color),
227
- $map: (
228
- enabled: map.get($theme, elevated-selected-container-elevation),
229
- disabled: map.get($theme, elevated-selected-disabled-container-elevation),
230
- hover: map.get($theme, elevated-selected-hover-container-elevation),
231
- focus: map.get($theme, elevated-selected-focus-container-elevation),
232
- pressed: map.get($theme, elevated-selected-pressed-container-elevation)
233
- )
234
- );
235
- @include _selected-container-elevation(
236
- map.get($resolvers, elevation),
237
- $shadow-color: map.get($theme, elevated-container-shadow-color),
238
- $map: (
239
- enabled: map.get($theme, flat-selected-container-elevation),
240
- disabled: map.get($theme, flat-selected-disabled-container-elevation),
241
- hover: map.get($theme, flat-selected-hover-container-elevation),
242
- focus: map.get($theme, flat-selected-focus-container-elevation),
243
- pressed: map.get($theme, flat-selected-pressed-container-elevation)
244
- )
245
- );
246
- @include _unselected-container-elevation(
247
- map.get($resolvers, elevation),
248
- $shadow-color: map.get($theme, elevated-container-shadow-color),
249
- $map: (
250
- enabled: map.get($theme, flat-unselected-container-elevation),
251
- disabled: map.get($theme, flat-unselected-disabled-container-elevation),
252
- hover: map.get($theme, flat-unselected-hover-container-elevation),
253
- focus: map.get($theme, flat-unselected-focus-container-elevation),
254
- pressed: map.get($theme, flat-unselected-pressed-container-elevation)
255
- )
256
- );
257
- @include outline-color(
258
- (
259
- enabled: map.get($theme, flat-outline-color),
260
- focus: map.get($theme, flat-focus-outline-color),
261
- disabled: map.get($theme, flat-disabled-outline-color),
262
- )
263
- );
264
- @include selected-outline-color(
265
- (
266
- enabled: map.get($theme, flat-selected-outline-color),
267
- disabled: map.get($theme, flat-disabled-selected-outline-color),
268
- )
269
- );
270
- @include _unselected-outline-color(
271
- (
272
- disabled: map.get($theme, flat-disabled-unselected-outline-color),
273
- focus: map.get($theme, flat-unselected-focus-outline-color),
274
- enabled: map.get($theme, flat-unselected-outline-color),
275
- )
276
- );
277
- @include outline-width(map.get($theme, outline-width));
278
- @include outline-width(map.get($theme, flat-outline-width));
279
- @include _selected-outline-width(
280
- map.get($theme, flat-selected-outline-width)
281
- );
282
- @include _unselected-outline-width(
283
- map.get($theme, flat-unselected-outline-width)
284
- );
285
- @include container-color(
286
- (
287
- enabled: map.get($theme, elevated-container-color),
288
- disabled: map.get($theme, elevated-disabled-container-color),
289
- )
290
- );
291
- @include selected-container-color(
292
- (
293
- enabled: map.get($theme, elevated-selected-container-color),
294
- )
295
- );
296
- @include selected-container-color(
297
- (
298
- enabled: map.get($theme, flat-selected-container-color),
299
- )
300
- );
301
- @include _unselected-container-color(
302
- (
303
- enabled: map.get($theme, elevated-unselected-container-color),
304
- )
305
- );
306
- @include _label-text-typography(
307
- (
308
- font: map.get($theme, label-text-font),
309
- line-height: map.get($theme, label-text-line-height),
310
- size: map.get($theme, label-text-size),
311
- weight: map.get($theme, label-text-weight),
312
- tracking: map.get($theme, label-text-tracking),
313
- )
314
- );
315
- @include text-label-color(
316
- (
317
- enabled: map.get($theme, label-text-color),
318
- hover: map.get($theme, hover-label-text-color),
319
- focus: map.get($theme, focus-label-text-color),
320
- pressed: map.get($theme, pressed-label-text-color),
321
- disabled: map.get($theme, disabled-label-text-color),
322
- )
323
- );
324
- @include selected-text-label-color(
325
- (
326
- enabled: map.get($theme, selected-label-text-color),
327
- hover: map.get($theme, selected-hover-label-text-color),
328
- focus: map.get($theme, selected-focus-label-text-color),
329
- pressed: map.get($theme, selected-pressed-label-text-color),
330
- disabled: map.get($theme, selected-disabled-label-text-color),
331
- )
332
- );
333
- @include _unselected-text-label-color(
334
- (
335
- enabled: map.get($theme, unselected-label-text-color),
336
- hover: map.get($theme, unselected-hover-label-text-color),
337
- focus: map.get($theme, unselected-focus-label-text-color),
338
- pressed: map.get($theme, unselected-pressed-label-text-color),
339
- disabled: map.get($theme, unselected-disabled-label-text-color),
340
- )
341
- );
342
-
343
- @include icon-size(map.get($theme, with-icon-icon-size));
344
- @include icon-color(
345
- (
346
- enabled: map.get($theme, with-icon-icon-color),
347
- disabled: map.get($theme, with-icon-disabled-icon-color),
348
- hover: map.get($theme, with-icon-hover-icon-color),
349
- focus: map.get($theme, with-icon-focus-icon-color),
350
- pressed: map.get($theme, with-icon-pressed-icon-color),
351
- )
352
- );
353
- @include _selected-icon-color(
354
- (
355
- enabled: map.get($theme, with-icon-selected-icon-color),
356
- disabled: map.get($theme, with-icon-selected-disabled-icon-color),
357
- hover: map.get($theme, with-icon-selected-hover-icon-color),
358
- focus: map.get($theme, with-icon-selected-focus-icon-color),
359
- pressed: map.get($theme, with-icon-selected-pressed-icon-color),
360
- )
361
- );
362
- @include _unselected-icon-color(
363
- (
364
- enabled: map.get($theme, with-icon-unselected-icon-color),
365
- disabled: map.get($theme, with-icon-unselected-disabled-icon-color),
366
- hover: map.get($theme, with-icon-unselected-hover-icon-color),
367
- focus: map.get($theme, with-icon-unselected-focus-icon-color),
368
- pressed: map.get($theme, with-icon-unselected-pressed-icon-color),
369
- )
370
- );
371
- @include icon-color(
372
- (
373
- disabled: map.get($theme, with-leading-icon-disabled-leading-icon-color),
374
- focus: map.get($theme, with-leading-icon-focus-leading-icon-color),
375
- hover: map.get($theme, with-leading-icon-hover-leading-icon-color),
376
- enabled: map.get($theme, with-leading-icon-leading-icon-color),
377
- pressed: map.get($theme, with-leading-icon-pressed-leading-icon-color),
378
- )
379
- );
380
- @include delete-action-color(
381
- (
382
- disabled: map.get($theme, with-delete-icon-disabled-delete-icon-color),
383
- focus: map.get($theme, with-delete-icon-focus-delete-icon-color),
384
- hover: map.get($theme, with-delete-icon-hover-delete-icon-color),
385
- enabled: map.get($theme, with-delete-icon-delete-icon-color),
386
- pressed: map.get($theme, with-delete-icon-pressed-delete-icon-color),
387
- )
388
- );
389
- @include _ripple-theme(
390
- (
391
- focus-color: map.get($theme, focus-state-layer-color),
392
- focus-opacity: map.get($theme, focus-state-layer-opacity),
393
- hover-color: map.get($theme, hover-state-layer-color),
394
- hover-opacity: map.get($theme, hover-state-layer-opacity),
395
- pressed-color: map.get($theme, pressed-state-layer-color),
396
- pressed-opacity: map.get($theme, pressed-state-layer-opacity),
397
- )
398
- );
399
- @include _selected-ripple-theme(
400
- (
401
- focus-color: map.get($theme, selected-focus-state-layer-color),
402
- focus-opacity: map.get($theme, selected-focus-state-layer-opacity),
403
- hover-color: map.get($theme, selected-hover-state-layer-color),
404
- hover-opacity: map.get($theme, selected-hover-state-layer-opacity),
405
- pressed-color: map.get($theme, selected-pressed-state-layer-color),
406
- pressed-opacity: map.get($theme, selected-pressed-state-layer-opacity),
407
- )
408
- );
409
- @include _unselected-ripple-theme(
410
- (
411
- focus-color: map.get($theme, unselected-focus-state-layer-color),
412
- focus-opacity: map.get($theme, unselected-focus-state-layer-opacity),
413
- hover-color: map.get($theme, unselected-hover-state-layer-color),
414
- hover-opacity: map.get($theme, unselected-hover-state-layer-opacity),
415
- pressed-color: map.get($theme, unselected-pressed-state-layer-color),
416
- pressed-opacity: map.get($theme, unselected-pressed-state-layer-opacity),
417
- )
418
- );
419
- }
420
-
421
- @function _resolve-theme($theme, $resolvers) {
422
- $theme: elevation.resolve-tokens(
423
- $theme,
424
- 'container-elevation',
425
- 'elevated-container-elevation',
426
- 'elevated-disabled-container-elevation',
427
- 'elevated-focus-container-elevation',
428
- 'elevated-hover-container-elevation',
429
- 'elevated-pressed-container-elevation',
430
- 'elevated-selected-container-elevation',
431
- 'flat-container-elevation',
432
- 'flat-selected-focus-container-elevation',
433
- 'flat-selected-hover-container-elevation',
434
- 'flat-selected-pressed-container-elevation',
435
- 'flat-unselected-focus-container-elevation',
436
- 'flat-unselected-hover-container-elevation',
437
- 'flat-unselected-pressed-container-elevation'
438
- );
439
- @return $theme;
440
- }
441
-
442
- @mixin _ripple-theme($ripple-theme) {
443
- .md3-chip__action--primary {
444
- @include ripple.theme(
445
- (
446
- focus-color: map.get($ripple-theme, focus-state-layer-color),
447
- focus-opacity: map.get($ripple-theme, focus-state-layer-opacity),
448
- hover-color: map.get($ripple-theme, hover-state-layer-color),
449
- hover-opacity: map.get($ripple-theme, hover-state-layer-opacity),
450
- pressed-color: map.get($ripple-theme, pressed-state-layer-color),
451
- pressed-opacity: map.get($ripple-theme, pressed-state-layer-opacity),
452
- ),
453
- $ripple-target: $ripple-target
454
- );
455
- }
456
- }
457
-
458
- @mixin _selected-ripple-theme($ripple-theme) {
459
- @include _is-selected() {
460
- @include _ripple-theme($ripple-theme);
461
- }
462
- }
463
-
464
- @mixin _unselected-ripple-theme($ripple-theme) {
465
- @include _is-unselected() {
466
- @include _ripple-theme($ripple-theme);
467
- }
468
- }
469
-
470
- ///
471
- /// Sets the ripple color of the chip.
472
- /// @param {Color} $color - The color of the ripple.
473
- /// @param {Map} $opacity-map [null] - The optional opacity map for the states.
474
- ///
475
- @mixin ripple-color($color, $opacity-map: null) {
476
- @include _ripple-color($color, $opacity-map);
477
- }
478
-
479
- ///
480
- /// Sets the selected ripple color of the chip.
481
- /// @param {Color} $color - The color of the ripple.
482
- /// @param {Map} $opacity-map [null] - The optional opacity map for the states.
483
- ///
484
- @mixin selected-ripple-color($color, $opacity-map: null) {
485
- &.md3-chip--selected {
486
- @include ripple-color($color, $opacity-map);
487
- }
488
- }
489
-
490
- @mixin _ripple-color($color, $opacity-map) {
491
- .md3-chip__action--primary {
492
- // TODO(b/240224981): Translate to md3 ripple
493
- // @include ripple.states(
494
- // $color: $color,
495
- // $opacity-map: $opacity-map,
496
- // $ripple-target: $ripple-target
497
- // );
498
- }
499
- }
500
-
501
- ///
502
- /// Sets the ripple color of the chip's delete action.
503
- /// @param {Color} $color - The color of the ripple.
504
- /// @param {Map} $opacity-map [null] - The optional opacity map for the states.
505
- ///
506
- @mixin delete-action-ripple-color($color, $opacity-map: null) {
507
- .md3-chip__action--delete {
508
- // TODO(b/240224981): Translate to md3 ripple
509
- // @include ripple.states(
510
- // $color: $color,
511
- // $opacity-map: $opacity-map,
512
- // $ripple-target: $ripple-target
513
- // );
514
- }
515
- }
516
-
517
- ///
518
- /// Sets the size of the delete action's ripple.
519
- /// @param {Number} $size - The size of the ripple.
520
- ///
521
- @mixin delete-action-ripple-size($size) {
522
- .md3-chip__ripple--delete {
523
- height: $size;
524
- width: $size;
525
- }
526
- }
527
-
528
- ///
529
- /// Sets the density scale for the chip.
530
- /// @param {Number | String} $density-scale - Density scale value for component.
531
- /// Supported density scale values are `-2`, `-1`, `0`.
532
- ///
533
- // @mixin density($density-scale) {
534
- // $height: density.prop-value(
535
- // $density-config: $density-config,
536
- // $density-scale: $density-scale,
537
- // $property-name: height,
538
- // );
539
-
540
- // @include height($height);
541
-
542
- // @if $density-scale != 0 {
543
- // @include _reset-touch-target();
544
- // }
545
- // }
546
-
547
- ///
548
- /// Resets touch target-related styles. This is called from the density mixin to
549
- /// automatically remove the increased touch target, since dense components
550
- /// don't have the same default a11y requirements.
551
- /// @access private
552
- ///
553
- @mixin _reset-touch-target() {
554
- .md3-chip__action-touch {
555
- display: none;
556
- }
557
- }
558
-
559
- ///
560
- /// Sets custom height for the chip.
561
- /// @param {Number} $height - The height of the chip.
562
- ///
563
- @mixin height($height) {
564
- height: $height;
565
- }
566
-
567
- @mixin _container-shape($radius) {
568
- // TODO(b/240224981): Translate to md3 shape
569
- // @include shape.radius($radius);
570
-
571
- #{$ripple-target} {
572
- // TODO(b/240224981): Translate to md3 shape
573
- // @include shape.radius($radius);
574
- }
575
-
576
- .md3-chip__action--primary:before {
577
- // TODO(b/240224981): Translate to md3 shape
578
- // @include shape.radius($radius);
579
- }
580
- }
581
-
582
- @mixin _avatar-shape($radius) {
583
- .md3-chip__icon--primary {
584
- // TODO(b/240224981): Translate to md3 shape
585
- // @include shape.radius($radius);
586
- }
587
- }
588
-
589
- ///
590
- /// Sets the shape radius of the chip.
591
- /// @param {Number|List} $radius - Shape radius in `border-radius` CSS format.
592
- /// @param {Boolean} $rtl-reflexive - True flips radius corners in RTL.
593
- ///
594
- @mixin shape-radius(
595
- $radius,
596
- $rtl-reflexive: false,
597
- $density-scale: $density-scale
598
- ) {
599
- // $height: density.prop-value(
600
- // $density-config: $density-config,
601
- // $density-scale: $density-scale,
602
- // $property-name: height,
603
- // );
604
-
605
- // TODO(b/240224981): Translate to md3 shape
606
- // @include shape.radius(
607
- // $radius,
608
- // $rtl-reflexive,
609
- // $component-height: $height,
610
- // );
611
-
612
- // #{$ripple-target} {
613
- // @include shape.radius(
614
- // $radius,
615
- // $rtl-reflexive,
616
- // $component-height: $height,
617
- // );
618
- // }
619
-
620
- // .md3-chip__action--primary:before {
621
- // @include shape.radius(
622
- // $radius,
623
- // $rtl-reflexive,
624
- // $component-height: $height,
625
- // );
626
- // }
627
-
628
- // .md3-chip__icon--primary {
629
- // @include shape.radius(
630
- // $radius,
631
- // $rtl-reflexive,
632
- // $component-height: $height,
633
- // );
634
- // }
635
- }
636
-
637
- ///
638
- /// Sets the width of the chip outline.
639
- /// @param {Number} $width - The width of the chip outline.
640
- ///
641
- @mixin outline-width($width) {
642
- .md3-chip__action--primary:before {
643
- border-width: $width;
644
- }
645
- }
646
-
647
- @mixin _selected-outline-width($width) {
648
- @include _is-selected() {
649
- @include outline-width($width);
650
- }
651
- }
652
-
653
- @mixin _unselected-outline-width($width) {
654
- @include _is-unselected() {
655
- @include outline-width($width);
656
- }
657
- }
658
-
659
- ///
660
- /// Customizes the outline color, using a Color or state Map.
661
- /// - To set only the default color, provide a single Color.
662
- /// - To set one or more state colors, provide a state Map with optional keys.
663
- /// - Supported state Map keys: `default`, `enabled`, `focus`, `disabled`.
664
- ///
665
- /// @example
666
- /// @include outline-color(blue);
667
- /// @include outline-color((disabled: gray));
668
- ///
669
- /// @param {Color | Map} $color-or-map - The outline's color or a state Map
670
- ///
671
- @mixin outline-color($color-or-map) {
672
- @include _outline-color(map.get($color-or-map, default));
673
- @include _is-enabled() {
674
- @include _outline-color(map.get($color-or-map, enabled));
675
- }
676
- @include _focus-outline-color(map.get($color-or-map, focus));
677
- @include _is-disabled() {
678
- @include _outline-color(map.get($color-or-map, disabled));
679
- }
680
- }
681
-
682
- @mixin _selected-outline-color($color-or-map) {
683
- @include _is-selected() {
684
- @include _outline-color($color-or-map);
685
- }
686
- }
687
-
688
- ///
689
- /// Customizes the selected outline color, using a Color or state Map.
690
- /// - To set only the default color, provide a single Color.
691
- /// - To set one or more state colors, provide a state Map with optional keys.
692
- /// - Supported state Map keys: `default`, `enabled`, `focus`, `disabled`.
693
- ///
694
- /// @example
695
- /// @include selected-outline-color(blue);
696
- /// @include selected-outline-color((disabled: gray));
697
- ///
698
- /// @param {Color | Map} $color-or-map - The outline's color or a state Map
699
- ///
700
- @mixin selected-outline-color($color-or-map) {
701
- @include _is-selected() {
702
- @include outline-color($color-or-map);
703
- }
704
- }
705
-
706
- @mixin _unselected-outline-color($color-or-map) {
707
- @include _is-unselected() {
708
- @include outline-color($color-or-map);
709
- }
710
- }
711
-
712
- @mixin _outline-color($color) {
713
- .md3-chip__action--primary:before {
714
- @if $color {
715
- border-color: $color;
716
- }
717
-
718
- // TODO(b/206694742): Find a better solution.
719
- @if $color == transparent {
720
- @include dom.forced-colors-mode() {
721
- border-color: CanvasText;
722
- }
723
- }
724
- }
725
- }
726
-
727
- @mixin _focus-outline-color($color) {
728
- .md3-chip__action--primary:not(.md3-chip__action--presentational) {
729
- // TODO(b/240224981): Translate to md3 ripple
730
- // @include ripple.focus() {
731
- // &:before {
732
- // @if $color {
733
- // border-color: $color;
734
- // }
735
- // }
736
- // }
737
- }
738
- }
739
-
740
- ///
741
- /// Sets the style of the chip outline.
742
- /// @param {String} $style - The style of the chip outline.
743
- ///
744
- @mixin outline-style($style) {
745
- .md3-chip__action--primary:before {
746
- border-style: $style;
747
- }
748
- }
749
-
750
- ///
751
- /// Customizes the container color, using a Color or state Map.
752
- /// - To set only the default color, provide a single Color.
753
- /// - To set one or more state colors, provide a state Map with optional keys.
754
- /// - Supported state Map keys: `default`, `enabled`, `disabled`.
755
- ///
756
- /// @example
757
- /// @include container-color(blue);
758
- /// @include container-color((disabled: gray));
759
- ///
760
- /// @param {Color | Map} $color-or-map - The container's color or a state Map
761
- ///
762
- @mixin container-color($color-or-map) {
763
- @include _container-color(map.get($color-or-map, default));
764
- @include _is-enabled() {
765
- @include _container-color(map.get($color-or-map, enabled));
766
- }
767
- @include _is-disabled() {
768
- @include _container-color(map.get($color-or-map, disabled));
769
- }
770
- }
771
-
772
- ///
773
- /// Customizes the selected container color, using a Color or state Map.
774
- /// - To set only the default color, provide a single Color.
775
- /// - To set one or more state colors, provide a state Map with optional keys.
776
- /// - Supported state Map keys: `default`, `enabled`, `disabled`.
777
- ///
778
- /// @example
779
- /// @include selected-container-color(blue);
780
- /// @include selected-container-color((disabled: gray));
781
- ///
782
- /// @param {Color | Map} $color-or-map - The container's color or a state Map
783
- ///
784
- @mixin selected-container-color($color-or-map) {
785
- @include _is-selected() {
786
- @include container-color($color-or-map);
787
- }
788
- }
789
-
790
- @mixin _unselected-container-color($color-or-map) {
791
- @include _is-unselected() {
792
- @include container-color($color-or-map);
793
- }
794
- }
795
-
796
- @mixin _container-color($color) {
797
- @if $color {
798
- background-color: $color;
799
- }
800
- }
801
-
802
- ///
803
- /// Customizes the text label color, using a Color or state Map.
804
- /// - To set only the default color, provide a single Color.
805
- /// - To set one or more state colors, provide a state Map with optional keys.
806
- /// - Supported state Map keys: `default`, `enabled`, `hover`, `focus`, `disabled`.
807
- ///
808
- /// @example
809
- /// @include text-label-color(blue);
810
- /// @include text-label-color((disabled: gray));
811
- ///
812
- /// @param {Color | Map} $color-or-map - The label's color or a state Map
813
- ///
814
- @mixin text-label-color($color-or-map) {
815
- @include _text-label-color(map.get($color-or-map, default));
816
- @include _is-enabled() {
817
- @include _text-label-color(map.get($color-or-map, enabled));
818
- }
819
- .md3-chip__action--primary:not(.md3-chip__action--presentational):hover {
820
- @include _text-label-color(map.get($color-or-map, hover));
821
- }
822
-
823
- .md3-chip__action--primary:not(.md3-chip__action--presentational) {
824
- // TODO(b/240224981): Translate to md3 ripple
825
- // @include ripple.focus() {
826
- // @include _text-label-color(map.get($color-or-map, focus));
827
- // }
828
- }
829
-
830
- @include _is-disabled() {
831
- @include _text-label-color(map.get($color-or-map, disabled));
832
- }
833
- }
834
-
835
- @mixin _label-text-typography($typography-theme) {
836
- .md3-chip__text-label {
837
- @include typography.theme-styles($typography-theme);
838
- }
839
- }
840
-
841
- ///
842
- /// Customizes the selected text label color, using a Color or state Map.
843
- /// - To set only the default color, provide a single Color.
844
- /// - To set one or more state colors, provide a state Map with optional keys.
845
- /// - Supported state Map keys: `default`, `hover`, `focus`, `disabled`.
846
- ///
847
- /// @example
848
- /// @include selected-text-label-color(blue);
849
- /// @include selected-text-label-color((disabled: gray));
850
- ///
851
- /// @param {Color | Map} $color-or-map - The label's color or a state Map
852
- ///
853
- @mixin selected-text-label-color($color-or-map) {
854
- @include _is-selected() {
855
- @include text-label-color($color-or-map);
856
- }
857
- }
858
-
859
- @mixin _unselected-text-label-color($color-or-map) {
860
- @include _is-unselected() {
861
- @include text-label-color($color-or-map);
862
- }
863
- }
864
-
865
- @mixin _text-label-color($color) {
866
- .md3-chip__text-label {
867
- @if $color {
868
- color: $color;
869
- }
870
- }
871
- }
872
-
873
- ///
874
- /// Sets the type scale of the text label.
875
- /// @param {String} $type-scale - The type scale of the text label.
876
- ///
877
- @mixin text-label-type-scale($type-scale) {
878
- .md3-chip__text-label {
879
- // TODO(b/240224981): Translate to md3 typography
880
- // @include typography.typography($type-scale);
881
- }
882
- }
883
-
884
- ///
885
- /// Sets the size of the graphic.
886
- /// @param {Number} $size - The size of the graphic.
887
- ///
888
- @mixin graphic-size($size) {
889
- // Expose the width as a readable custom property that can be used when
890
- // computing the chip bounding client rect as an additive value for the chip
891
- // width. This solves for selectable chips without icons growing/shrinking as
892
- // they toggle their selected state. The ripple dimensions will have been
893
- // computed based on the unselected bounding client react which will not have
894
- // enough horizontal space to account for the growth in width.
895
- &.md3-chip--selectable:not(.md3-chip--with-primary-icon) {
896
- @if $size {
897
- @include theme.property(--md3-chip-graphic-selected-width, $size);
898
- }
899
- }
900
-
901
- .md3-chip__graphic {
902
- height: $size;
903
- width: $size;
904
- font-size: $size;
905
- }
906
- }
907
-
908
- ///
909
- /// Customizes the icon color, using a Color or state Map.
910
- /// - To set only the default color, provide a single Color.
911
- /// - To set one or more state colors, provide a state Map with optional keys.
912
- /// - Supported state Map keys: `default`, `enabled`, `focus`, `disabled`.
913
- ///
914
- /// @example
915
- /// @include icon-color(blue);
916
- /// @include icon-color((disabled: gray));
917
- ///
918
- /// @param {Color | Map} $color-or-map - The icon's color or a state Map
919
- ///
920
- @mixin icon-color($color-or-map) {
921
- @include _icon-color(map.get($color-or-map, default));
922
-
923
- @include _is-enabled() {
924
- @include _icon-color(map.get($color-or-map, enabled));
925
- }
926
-
927
- .md3-chip__action--primary:not(.md3-chip__action--presentational):hover {
928
- @include _icon-color(map.get($color-or-map, hover));
929
- }
930
-
931
- .md3-chip__action--primary:not(.md3-chip__action--presentational) {
932
- // TODO(b/240224981): Translate to md3 ripple
933
- // @include ripple.focus() {
934
- // @include _icon-color(map.get($color-or-map, focus));
935
- // }
936
- }
937
-
938
- @include _is-disabled() {
939
- @include _icon-color(map.get($color-or-map, disabled));
940
- }
941
- }
942
-
943
- @mixin _selected-icon-color($color-or-map) {
944
- @include checkmark-color($color-or-map);
945
- }
946
-
947
- @mixin _unselected-icon-color($color-or-map) {
948
- @include _is-unselected() {
949
- @include icon-color($color-or-map);
950
- }
951
- }
952
-
953
- @mixin _icon-color($color) {
954
- .md3-chip__icon--primary {
955
- color: $color;
956
- }
957
- }
958
-
959
- ///
960
- /// Customizes the icon container color, using a Color or state Map.
961
- /// - To set only the default color, provide a single Color.
962
- /// - To set one or more state colors, provide a state Map with optional keys.
963
- /// - Supported state Map keys: `default`, `hover`, `focus`, `disabled`.
964
- ///
965
- /// @example
966
- /// @include icon-container-color(blue);
967
- /// @include icon-container-color((disabled: gray));
968
- ///
969
- /// @param {Color | Map} $color-or-map - The icon's container color or a state Map
970
- ///
971
- @mixin icon-container-color($color-or-map) {
972
- @include _icon-container-color(map.get($color-or-map, default));
973
-
974
- .md3-chip__action--primary:not(.md3-chip__action--presentational):hover {
975
- @include _icon-container-color(map.get($color-or-map, hover));
976
- }
977
-
978
- .md3-chip__action--primary:not(.md3-chip__action--presentational) {
979
- // TODO(b/240224981): Translate to md3 ripple
980
- // @include ripple.focus() {
981
- // @include _icon-container-color(
982
- // map.get($color-or-map, focus)
983
- // );
984
- // }
985
- }
986
-
987
- &.md3-chip--disabled {
988
- @include _icon-container-color(map.get($color-or-map, disabled));
989
- }
990
- }
991
-
992
- @mixin _icon-container-color($color) {
993
- .md3-chip__icon--primary {
994
- @if $color {
995
- background-color: $color;
996
- }
997
- }
998
- }
999
-
1000
- ///
1001
- /// Sets the size of the icon.
1002
- /// @param {Number} $size - The size of the icon.
1003
- ///
1004
- @mixin icon-size($size) {
1005
- .md3-chip__icon--primary {
1006
- height: $size;
1007
- width: $size;
1008
- font-size: $size;
1009
- }
1010
- }
1011
-
1012
- ///
1013
- /// Sets the size of the delete action.
1014
- /// @param {Number} $size - The size of the delete action.
1015
- ///
1016
- @mixin delete-action-size($size) {
1017
- .md3-chip__icon--delete {
1018
- height: $size;
1019
- width: $size;
1020
- font-size: $size;
1021
- }
1022
- }
1023
-
1024
- ///
1025
- /// Customizes the delete action color, using a Color or state Map.
1026
- /// - To set only the default color, provide a single Color.
1027
- /// - To set one or more state colors, provide a state Map with optional keys.
1028
- /// - Supported state Map keys: `default`, `hover`, `focus`, `disabled`.
1029
- ///
1030
- /// @example
1031
- /// @include delete-action-color(blue);
1032
- /// @include delete-action-color((disabled: gray));
1033
- ///
1034
- /// @param {Color | Map} $color-or-map - The delete action's color or a state Map
1035
- ///
1036
- @mixin delete-action-color($color-or-map) {
1037
- @include _delete-action-color(map.get($color-or-map, default));
1038
-
1039
- @include _is-enabled() {
1040
- @include _delete-action-color(map.get($color-or-map, enabled));
1041
- }
1042
-
1043
- .md3-chip__action--delete:hover {
1044
- @include _delete-action-color(map.get($color-or-map, hover));
1045
- }
1046
-
1047
- .md3-chip__action--delete {
1048
- // TODO(b/240224981): Translate to md3 ripple
1049
- // @include ripple.focus() {
1050
- // @include _delete-action-color(
1051
- // map.get($color-or-map, focus)
1052
- // );
1053
- // }
1054
- }
1055
-
1056
- @include _is-disabled() {
1057
- @include _delete-action-color(map.get($color-or-map, disabled));
1058
- }
1059
- }
1060
-
1061
- @mixin _delete-action-color($color) {
1062
- .md3-chip__icon--delete {
1063
- @if $color {
1064
- color: $color;
1065
- }
1066
- }
1067
- }
1068
-
1069
- ///
1070
- /// Sets the size of the checkmark.
1071
- /// @param {Number} $size - The size of the checkmark.
1072
- ///
1073
- @mixin checkmark-size($size) {
1074
- .md3-chip__checkmark {
1075
- height: $size;
1076
- width: $size;
1077
- }
1078
- }
1079
-
1080
- ///
1081
- /// Customizes the checkmark color, using a Color or state Map.
1082
- /// - To set only the default color, provide a single Color.
1083
- /// - To set one or more state colors, provide a state Map with optional keys.
1084
- /// - Supported state Map keys: `default`, `enabled`, `hover`, `focus`, `disabled`.
1085
- ///
1086
- /// @example
1087
- /// @include checkmark-color(blue);
1088
- /// @include checkmark-color((disabled: gray));
1089
- ///
1090
- /// @param {Color | Map} $color-or-map - The checkmark's color or a state Map
1091
- ///
1092
- @mixin checkmark-color($color-or-map) {
1093
- @include _checkmark-color(map.get($color-or-map, default));
1094
-
1095
- @include _is-enabled() {
1096
- @include _checkmark-color(map.get($color-or-map, enabled));
1097
- }
1098
-
1099
- .md3-chip__action--primary:not(.md3-chip__action--presentational):hover {
1100
- @include _checkmark-color(map.get($color-or-map, hover));
1101
- }
1102
-
1103
- .md3-chip__action--primary {
1104
- // TODO(b/240224981): Translate to md3 ripple
1105
- // @include ripple.focus() {
1106
- // @include _checkmark-color(map.get($color-or-map, focus));
1107
- // }
1108
- }
1109
-
1110
- @include _is-disabled() {
1111
- @include _checkmark-color(map.get($color-or-map, disabled));
1112
- }
1113
- }
1114
-
1115
- @mixin _checkmark-color($color) {
1116
- .md3-chip__checkmark {
1117
- @if $color {
1118
- color: $color;
1119
- }
1120
- }
1121
- }
1122
-
1123
- ///
1124
- /// Customizes the checkmark container color, using a Color or state Map.
1125
- /// - To set only the default color, provide a single Color.
1126
- /// - To set one or more state colors, provide a state Map with optional keys.
1127
- /// - Supported state Map keys: `default`, `hover`, `focus`, `disabled`.
1128
- ///
1129
- /// @example
1130
- /// @include checkmark-container-color(blue);
1131
- /// @include checkmark-container-color((disabled: gray));
1132
- ///
1133
- /// @param {Color | Map} $color-or-map - The checkmark container's color or a state Map
1134
- ///
1135
- @mixin checkmark-container-color($color-or-map) {
1136
- @include _checkmark-container-color(map.get($color-or-map, default));
1137
-
1138
- &.md3-chip--disabled {
1139
- @include _checkmark-container-color(map.get($color-or-map, disabled));
1140
- }
1141
- }
1142
-
1143
- @mixin _checkmark-container-color($color) {
1144
- .md3-chip__checkmark-background {
1145
- @if $color {
1146
- background-color: $color;
1147
- }
1148
- }
1149
- }
1150
-
1151
- ///
1152
- /// Sets the horizontal padding for the chip.
1153
- /// @param {Number} $leading - The leading padding for the chip.
1154
- /// @param {Number} $trailing [$leading] - The trailing padding for the chip.
1155
- ///
1156
- @mixin horizontal-padding($leading, $trailing: $leading) {
1157
- .md3-chip__action--primary {
1158
- padding-inline: $leading $trailing;
1159
- }
1160
- }
1161
-
1162
- ///
1163
- /// Sets the horizontal padding for chips with a graphic.
1164
- /// @param {Number} $graphic-leading - The leading padding for the graphic.
1165
- /// @param {Number} $graphic-trailing - The trailing padding for the graphic.
1166
- /// @param {Number} $primary-trailing - The trailing padding for the primary action.
1167
- ///
1168
- @mixin with-graphic-horizontal-padding(
1169
- $graphic-leading,
1170
- $graphic-trailing,
1171
- $primary-trailing
1172
- ) {
1173
- &.md3-chip--with-primary-graphic {
1174
- .md3-chip__graphic {
1175
- padding-inline: $graphic-leading $graphic-trailing;
1176
- }
1177
-
1178
- .md3-chip__action--primary {
1179
- padding-inline-end: $primary-trailing;
1180
- }
1181
- }
1182
- }
1183
-
1184
- ///
1185
- /// Sets the horizontal padding for chips with a delete action.
1186
- /// @param {Number} $primary-leading - The leading padding for the primary action.
1187
- /// @param {Number} $delete-action-leading - The leading padding for the delete action.
1188
- /// @param {Number} $delete-action-trailing - The trailing padding for the delete action.
1189
- ///
1190
- @mixin with-delete-action-horizontal-padding(
1191
- $primary-leading,
1192
- $delete-action-leading,
1193
- $delete-action-trailing
1194
- ) {
1195
- &.md3-chip--with-delete-action {
1196
- .md3-chip__action--delete {
1197
- padding-inline: $delete-action-leading $delete-action-trailing;
1198
- }
1199
-
1200
- #{$ripple-target-delete} {
1201
- inset-inline-start: $delete-action-leading;
1202
- }
1203
-
1204
- .md3-chip__action--primary {
1205
- padding-inline-start: $primary-leading;
1206
- }
1207
- }
1208
- }
1209
-
1210
- ///
1211
- /// Sets the horizontal padding for chips with a graphic and delete action.
1212
- /// @param {Number} $graphic-leading - The leading padding for the graphic.
1213
- /// @param {Number} $graphic-trailing - The trailing padding for the graphic.
1214
- /// @param {Number} $delete-action-leading - The leading padding for the delete action.
1215
- /// @param {Number} $delete-action-trailing - The trailing padding for the delete action.
1216
- ///
1217
- @mixin with-graphic-and-delete-action-horizontal-padding(
1218
- $graphic-leading,
1219
- $graphic-trailing,
1220
- $delete-action-leading,
1221
- $delete-action-trailing
1222
- ) {
1223
- &.md3-chip--with-primary-graphic.md3-chip--with-delete-action {
1224
- .md3-chip__graphic {
1225
- padding-inline: $graphic-leading $graphic-trailing;
1226
- }
1227
-
1228
- .md3-chip__action--delete {
1229
- padding-inline: $delete-action-leading $delete-action-trailing;
1230
- }
1231
-
1232
- #{$ripple-target-delete} {
1233
- inset-inline-start: $delete-action-leading;
1234
- }
1235
-
1236
- .md3-chip__action--primary {
1237
- padding-inline: 0 0;
1238
- }
1239
- }
1240
- }
1241
-
1242
- @mixin _container-elevation($resolver, $shadow-color, $map) {
1243
- // TODO(b/240224981): Use M3 resolver.
1244
- @include elevation-theme.theme-styles(
1245
- (
1246
- shadow: $shadow-color,
1247
- )
1248
- );
1249
- }
1250
-
1251
- @mixin _selected-container-elevation($resolver, $shadow-color, $map) {
1252
- @include _is-selected() {
1253
- @include _container-elevation($resolver, $shadow-color, $map);
1254
- }
1255
- }
1256
-
1257
- @mixin _unselected-container-elevation($resolver, $shadow-color, $map) {
1258
- @include _is-unselected() {
1259
- @include _container-elevation($resolver, $shadow-color, $map);
1260
- }
1261
- }
1262
-
1263
- @mixin _is-enabled() {
1264
- &:not(.md3-chip--disabled) {
1265
- @content;
1266
- }
1267
- }
1268
-
1269
- @mixin _is-disabled() {
1270
- &.md3-chip--disabled {
1271
- @content;
1272
- }
1273
- }
1274
-
1275
- @mixin _is-selected() {
1276
- &.md3-chip--selected {
1277
- @content;
1278
- }
1279
- }
1280
-
1281
- @mixin _is-unselected() {
1282
- &:not(.md3-chip--selected) {
1283
- @content;
1284
- }
1285
- }