@maicol07/material-web 2.3.0 → 2.5.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 (503) hide show
  1. package/button/internal/_shared.scss +2 -2
  2. package/button/internal/_touch-target.scss +1 -1
  3. package/labs/gb/components/appbar/_app-bar-tokens.scss +136 -0
  4. package/labs/gb/components/appbar/app-bar.scss +167 -0
  5. package/labs/gb/components/badge/_badge-tokens.scss +18 -0
  6. package/labs/gb/components/badge/badge.scss +49 -0
  7. package/labs/gb/components/button/_button-tokens.scss +200 -0
  8. package/labs/gb/components/button/button.scss +130 -0
  9. package/labs/gb/components/card/_card-tokens.scss +56 -0
  10. package/labs/gb/components/card/card.scss +74 -0
  11. package/labs/gb/components/checkbox/_checkbox-tokens.scss +66 -0
  12. package/labs/gb/components/checkbox/checkbox.scss +105 -0
  13. package/labs/gb/components/chip/_chip-tokens.scss +167 -0
  14. package/labs/gb/components/chip/chip.scss +99 -0
  15. package/labs/gb/components/divider/_divider-tokens.scss +11 -0
  16. package/labs/gb/components/divider/divider.scss +31 -0
  17. package/labs/gb/components/fab/_fab-tokens.scss +89 -0
  18. package/labs/gb/components/fab/fab.scss +78 -0
  19. package/labs/gb/components/focus/focus-ring.scss +91 -0
  20. package/labs/gb/components/iconbutton/_icon-button-tokens.scss +213 -0
  21. package/labs/gb/components/iconbutton/icon-button.scss +160 -0
  22. package/labs/gb/components/list/_list-tokens.scss +103 -0
  23. package/labs/gb/components/list/list.scss +217 -0
  24. package/labs/gb/components/menu/_menu-tokens.scss +161 -0
  25. package/labs/gb/components/menu/menu.scss +174 -0
  26. package/labs/gb/components/radio/_radio-tokens.scss +39 -0
  27. package/labs/gb/components/radio/radio.scss +74 -0
  28. package/labs/gb/components/ripple/ripple.scss +103 -0
  29. package/labs/gb/components/splitbutton/_split-button-tokens.scss +139 -0
  30. package/labs/gb/components/splitbutton/split-button.scss +164 -0
  31. package/labs/gb/components/switch/_switch-tokens.scss +58 -0
  32. package/labs/gb/components/switch/switch.scss +109 -0
  33. package/labs/gb/styles/color/internal/_color-tokens.scss +95 -0
  34. package/labs/gb/styles/color/md-color-tokens-full.scss +17 -0
  35. package/labs/gb/styles/color/md-color-tokens.scss +15 -0
  36. package/labs/gb/styles/elevation/md-elevation-tokens.scss +25 -0
  37. package/labs/gb/styles/icon/md-icon.scss +63 -0
  38. package/labs/gb/styles/m3.scss +14 -0
  39. package/labs/gb/styles/motion/md-motion-tokens-easing.scss +35 -0
  40. package/labs/gb/styles/shape/md-shape-tokens.scss +23 -0
  41. package/labs/gb/styles/space/md-space-tokens.scss +28 -0
  42. package/labs/gb/styles/tailwind.scss +349 -0
  43. package/labs/gb/styles/typography/internal/_typography-tokens.scss +149 -0
  44. package/labs/gb/styles/typography/md-typography-tokens.scss +14 -0
  45. package/list/internal/listitem/_list-item.scss +3 -0
  46. package/menu/internal/menuitem/_menu-item.scss +4 -1
  47. package/package.json +102 -21
  48. package/sass/ext/_assert.scss +82 -0
  49. package/sass/ext/_list_ext.scss +114 -0
  50. package/sass/ext/_map_ext.scss +222 -0
  51. package/sass/ext/_string_ext.scss +153 -0
  52. package/sass/ext/_throw.scss +83 -0
  53. package/sass/ext/_type.scss +66 -0
  54. package/{internal/sass → sass/ext}/_var.scss +86 -96
  55. package/sass/ext/tests.scss +18 -0
  56. package/slider/internal/_slider.scss +1 -0
  57. package/switch/internal/_switch.scss +1 -0
  58. package/tabs/internal/_tab.scss +0 -1
  59. package/tokens/_index.scss +57 -57
  60. package/tokens/_md-comp-assist-chip.scss +8 -8
  61. package/tokens/_md-comp-badge.scss +4 -4
  62. package/tokens/_md-comp-checkbox.scss +6 -6
  63. package/tokens/_md-comp-circular-progress.scss +4 -4
  64. package/tokens/_md-comp-dialog.scss +8 -8
  65. package/tokens/_md-comp-divider.scss +3 -3
  66. package/tokens/_md-comp-elevated-button.scss +8 -8
  67. package/tokens/_md-comp-elevated-card.scss +6 -6
  68. package/tokens/_md-comp-elevation.scss +3 -3
  69. package/tokens/_md-comp-fab-branded.scss +10 -10
  70. package/tokens/_md-comp-fab.scss +17 -17
  71. package/tokens/_md-comp-filled-button.scss +8 -8
  72. package/tokens/_md-comp-filled-card.scss +6 -6
  73. package/tokens/_md-comp-filled-field.scss +7 -7
  74. package/tokens/_md-comp-filled-icon-button.scss +6 -6
  75. package/tokens/_md-comp-filled-select.scss +8 -8
  76. package/tokens/_md-comp-filled-text-field.scss +7 -7
  77. package/tokens/_md-comp-filled-tonal-button.scss +8 -8
  78. package/tokens/_md-comp-filled-tonal-icon-button.scss +6 -6
  79. package/tokens/_md-comp-filter-chip.scss +8 -8
  80. package/tokens/_md-comp-focus-ring.scss +5 -5
  81. package/tokens/_md-comp-full-screen-dialog.scss +6 -6
  82. package/tokens/_md-comp-icon-button.scss +5 -5
  83. package/tokens/_md-comp-icon.scss +1 -1
  84. package/tokens/_md-comp-input-chip.scss +8 -8
  85. package/tokens/_md-comp-item.scss +4 -4
  86. package/tokens/_md-comp-linear-progress.scss +4 -4
  87. package/tokens/_md-comp-list-item.scss +5 -5
  88. package/tokens/_md-comp-list.scss +3 -3
  89. package/tokens/_md-comp-menu-item.scss +8 -8
  90. package/tokens/_md-comp-menu.scss +5 -5
  91. package/tokens/_md-comp-navigation-bar.scss +6 -6
  92. package/tokens/_md-comp-navigation-drawer.scss +6 -6
  93. package/tokens/_md-comp-outlined-button.scss +7 -7
  94. package/tokens/_md-comp-outlined-card.scss +6 -6
  95. package/tokens/_md-comp-outlined-field.scss +7 -7
  96. package/tokens/_md-comp-outlined-icon-button.scss +6 -6
  97. package/tokens/_md-comp-outlined-segmented-button.scss +7 -7
  98. package/tokens/_md-comp-outlined-select.scss +8 -8
  99. package/tokens/_md-comp-outlined-text-field.scss +6 -6
  100. package/tokens/_md-comp-primary-tab.scss +8 -8
  101. package/tokens/_md-comp-radio.scss +4 -4
  102. package/tokens/_md-comp-ripple.scss +4 -4
  103. package/tokens/_md-comp-secondary-tab.scss +8 -8
  104. package/tokens/_md-comp-slider.scss +7 -7
  105. package/tokens/_md-comp-suggestion-chip.scss +8 -8
  106. package/tokens/_md-comp-switch.scss +6 -6
  107. package/tokens/_md-comp-test-table.scss +2 -2
  108. package/tokens/_md-comp-text-button.scss +7 -7
  109. package/tokens/_md-ref-palette.scss +2 -2
  110. package/tokens/_md-ref-typeface.scss +2 -2
  111. package/tokens/_md-sys-color.scss +3 -3
  112. package/tokens/_md-sys-elevation.scss +1 -1
  113. package/tokens/_md-sys-motion.scss +1 -1
  114. package/tokens/_md-sys-shape.scss +2 -2
  115. package/tokens/_md-sys-state.scss +1 -1
  116. package/tokens/_md-sys-typescale.scss +3 -3
  117. package/tokens/v0_192/_index.scss +3 -102
  118. package/tokens/v0_192/_md-comp-assist-chip.scss +1 -106
  119. package/tokens/v0_192/_md-comp-badge.scss +1 -56
  120. package/tokens/v0_192/_md-comp-banner.scss +1 -71
  121. package/tokens/v0_192/_md-comp-bottom-app-bar.scss +1 -31
  122. package/tokens/v0_192/_md-comp-carousel-item.scss +1 -61
  123. package/tokens/v0_192/_md-comp-checkbox.scss +1 -124
  124. package/tokens/v0_192/_md-comp-circular-progress-indicator.scss +1 -36
  125. package/tokens/v0_192/_md-comp-data-table.scss +1 -94
  126. package/tokens/v0_192/_md-comp-date-input-modal.scss +1 -85
  127. package/tokens/v0_192/_md-comp-date-picker-docked.scss +1 -242
  128. package/tokens/v0_192/_md-comp-date-picker-modal.scss +1 -301
  129. package/tokens/v0_192/_md-comp-dialog.scss +1 -119
  130. package/tokens/v0_192/_md-comp-divider.scss +1 -23
  131. package/tokens/v0_192/_md-comp-elevated-button.scss +1 -87
  132. package/tokens/v0_192/_md-comp-elevated-card.scss +1 -55
  133. package/tokens/v0_192/_md-comp-extended-fab-branded.scss +1 -84
  134. package/tokens/v0_192/_md-comp-extended-fab-primary.scss +1 -92
  135. package/tokens/v0_192/_md-comp-extended-fab-secondary.scss +1 -93
  136. package/tokens/v0_192/_md-comp-extended-fab-surface.scss +1 -88
  137. package/tokens/v0_192/_md-comp-extended-fab-tertiary.scss +1 -93
  138. package/tokens/v0_192/_md-comp-fab-branded-large.scss +1 -58
  139. package/tokens/v0_192/_md-comp-fab-branded.scss +1 -58
  140. package/tokens/v0_192/_md-comp-fab-primary-large.scss +1 -63
  141. package/tokens/v0_192/_md-comp-fab-primary-small.scss +1 -63
  142. package/tokens/v0_192/_md-comp-fab-primary.scss +1 -63
  143. package/tokens/v0_192/_md-comp-fab-secondary-large.scss +1 -64
  144. package/tokens/v0_192/_md-comp-fab-secondary-small.scss +1 -64
  145. package/tokens/v0_192/_md-comp-fab-secondary.scss +1 -64
  146. package/tokens/v0_192/_md-comp-fab-surface-large.scss +1 -62
  147. package/tokens/v0_192/_md-comp-fab-surface-small.scss +1 -62
  148. package/tokens/v0_192/_md-comp-fab-surface.scss +1 -62
  149. package/tokens/v0_192/_md-comp-fab-tertiary-large.scss +1 -64
  150. package/tokens/v0_192/_md-comp-fab-tertiary-small.scss +1 -64
  151. package/tokens/v0_192/_md-comp-fab-tertiary.scss +1 -64
  152. package/tokens/v0_192/_md-comp-filled-autocomplete.scss +1 -234
  153. package/tokens/v0_192/_md-comp-filled-button.scss +1 -87
  154. package/tokens/v0_192/_md-comp-filled-card.scss +1 -57
  155. package/tokens/v0_192/_md-comp-filled-icon-button.scss +1 -78
  156. package/tokens/v0_192/_md-comp-filled-menu-button.scss +1 -96
  157. package/tokens/v0_192/_md-comp-filled-select.scss +1 -268
  158. package/tokens/v0_192/_md-comp-filled-text-field.scss +1 -188
  159. package/tokens/v0_192/_md-comp-filled-tonal-button.scss +1 -97
  160. package/tokens/v0_192/_md-comp-filled-tonal-icon-button.scss +1 -85
  161. package/tokens/v0_192/_md-comp-filter-chip.scss +1 -205
  162. package/tokens/v0_192/_md-comp-full-screen-dialog.scss +1 -109
  163. package/tokens/v0_192/_md-comp-icon-button.scss +1 -69
  164. package/tokens/v0_192/_md-comp-input-chip.scss +1 -182
  165. package/tokens/v0_192/_md-comp-linear-progress-indicator.scss +1 -38
  166. package/tokens/v0_192/_md-comp-list.scss +1 -250
  167. package/tokens/v0_192/_md-comp-menu.scss +1 -39
  168. package/tokens/v0_192/_md-comp-navigation-bar.scss +1 -110
  169. package/tokens/v0_192/_md-comp-navigation-drawer.scss +1 -160
  170. package/tokens/v0_192/_md-comp-navigation-rail.scss +1 -114
  171. package/tokens/v0_192/_md-comp-outlined-autocomplete.scss +1 -224
  172. package/tokens/v0_192/_md-comp-outlined-button.scss +1 -82
  173. package/tokens/v0_192/_md-comp-outlined-card.scss +1 -61
  174. package/tokens/v0_192/_md-comp-outlined-icon-button.scss +1 -78
  175. package/tokens/v0_192/_md-comp-outlined-menu-button.scss +1 -92
  176. package/tokens/v0_192/_md-comp-outlined-segmented-button.scss +1 -110
  177. package/tokens/v0_192/_md-comp-outlined-select.scss +1 -258
  178. package/tokens/v0_192/_md-comp-outlined-text-field.scss +1 -169
  179. package/tokens/v0_192/_md-comp-plain-tooltip.scss +1 -53
  180. package/tokens/v0_192/_md-comp-primary-navigation-tab.scss +1 -119
  181. package/tokens/v0_192/_md-comp-radio-button.scss +1 -66
  182. package/tokens/v0_192/_md-comp-rich-tooltip.scss +1 -117
  183. package/tokens/v0_192/_md-comp-scrim.scss +1 -23
  184. package/tokens/v0_192/_md-comp-search-bar.scss +1 -95
  185. package/tokens/v0_192/_md-comp-search-view.scss +1 -89
  186. package/tokens/v0_192/_md-comp-secondary-navigation-tab.scss +1 -82
  187. package/tokens/v0_192/_md-comp-sheet-bottom.scss +1 -41
  188. package/tokens/v0_192/_md-comp-sheet-floating.scss +1 -30
  189. package/tokens/v0_192/_md-comp-sheet-side.scss +1 -89
  190. package/tokens/v0_192/_md-comp-slider.scss +1 -113
  191. package/tokens/v0_192/_md-comp-snackbar.scss +1 -125
  192. package/tokens/v0_192/_md-comp-standard-menu-button.scss +1 -96
  193. package/tokens/v0_192/_md-comp-suggestion-chip.scss +1 -122
  194. package/tokens/v0_192/_md-comp-switch.scss +1 -136
  195. package/tokens/v0_192/_md-comp-text-button.scss +1 -75
  196. package/tokens/v0_192/_md-comp-time-input.scss +1 -215
  197. package/tokens/v0_192/_md-comp-time-picker.scss +1 -262
  198. package/tokens/v0_192/_md-comp-top-app-bar-large.scss +1 -59
  199. package/tokens/v0_192/_md-comp-top-app-bar-medium.scss +1 -59
  200. package/tokens/v0_192/_md-comp-top-app-bar-small-centered.scss +1 -66
  201. package/tokens/v0_192/_md-comp-top-app-bar-small.scss +1 -62
  202. package/tokens/v0_192/_md-ref-palette.scss +1 -104
  203. package/tokens/v0_192/_md-ref-typeface.scss +1 -18
  204. package/tokens/v0_192/_md-sys-color.scss +1 -130
  205. package/tokens/v0_192/_md-sys-elevation.scss +1 -19
  206. package/tokens/v0_192/_md-sys-motion.scss +1 -50
  207. package/tokens/v0_192/_md-sys-shape.scss +1 -28
  208. package/tokens/v0_192/_md-sys-state.scss +1 -17
  209. package/tokens/v0_192/_md-sys-typescale.scss +1 -281
  210. package/tokens/versions/latest/sass/_index.scss +241 -0
  211. package/tokens/versions/latest/sass/_md-comp-app-bar-large-flexible.scss +31 -0
  212. package/tokens/versions/latest/sass/_md-comp-app-bar-large.scss +35 -0
  213. package/tokens/versions/latest/sass/_md-comp-app-bar-medium-flexible.scss +31 -0
  214. package/tokens/versions/latest/sass/_md-comp-app-bar-medium.scss +35 -0
  215. package/tokens/versions/latest/sass/_md-comp-app-bar-small.scss +42 -0
  216. package/tokens/versions/latest/sass/_md-comp-app-bar.scss +59 -0
  217. package/tokens/versions/latest/sass/_md-comp-assist-chip.scss +134 -0
  218. package/tokens/versions/latest/sass/_md-comp-badge.scss +53 -0
  219. package/tokens/versions/latest/sass/_md-comp-banner.scss +147 -0
  220. package/tokens/versions/latest/sass/_md-comp-banners-basic.scss +86 -0
  221. package/tokens/versions/latest/sass/_md-comp-banners-rich.scss +89 -0
  222. package/tokens/versions/latest/sass/_md-comp-banners.scss +43 -0
  223. package/tokens/versions/latest/sass/_md-comp-bottom-app-bar.scss +37 -0
  224. package/tokens/versions/latest/sass/_md-comp-button-elevated.scss +125 -0
  225. package/tokens/versions/latest/sass/_md-comp-button-filled.scss +125 -0
  226. package/tokens/versions/latest/sass/_md-comp-button-group-connected-large.scss +31 -0
  227. package/tokens/versions/latest/sass/_md-comp-button-group-connected-medium.scss +31 -0
  228. package/tokens/versions/latest/sass/_md-comp-button-group-connected-small.scss +31 -0
  229. package/tokens/versions/latest/sass/_md-comp-button-group-connected-xlarge.scss +31 -0
  230. package/tokens/versions/latest/sass/_md-comp-button-group-connected-xsmall.scss +31 -0
  231. package/tokens/versions/latest/sass/_md-comp-button-group-standard-large.scss +29 -0
  232. package/tokens/versions/latest/sass/_md-comp-button-group-standard-medium.scss +29 -0
  233. package/tokens/versions/latest/sass/_md-comp-button-group-standard-small.scss +29 -0
  234. package/tokens/versions/latest/sass/_md-comp-button-group-standard-xlarge.scss +29 -0
  235. package/tokens/versions/latest/sass/_md-comp-button-group-standard-xsmall.scss +29 -0
  236. package/tokens/versions/latest/sass/_md-comp-button-large.scss +51 -0
  237. package/tokens/versions/latest/sass/_md-comp-button-medium.scss +51 -0
  238. package/tokens/versions/latest/sass/_md-comp-button-outlined.scss +124 -0
  239. package/tokens/versions/latest/sass/_md-comp-button-small.scss +51 -0
  240. package/tokens/versions/latest/sass/_md-comp-button-text.scss +60 -0
  241. package/tokens/versions/latest/sass/_md-comp-button-tonal.scss +125 -0
  242. package/tokens/versions/latest/sass/_md-comp-button-xlarge.scss +51 -0
  243. package/tokens/versions/latest/sass/_md-comp-button-xsmall.scss +51 -0
  244. package/tokens/versions/latest/sass/_md-comp-button.scss +163 -0
  245. package/tokens/versions/latest/sass/_md-comp-carousel-item.scss +79 -0
  246. package/tokens/versions/latest/sass/_md-comp-checkbox.scss +216 -0
  247. package/tokens/versions/latest/sass/_md-comp-circular-progress-indicator.scss +52 -0
  248. package/tokens/versions/latest/sass/_md-comp-data-table.scss +110 -0
  249. package/tokens/versions/latest/sass/_md-comp-date-input-modal.scss +80 -0
  250. package/tokens/versions/latest/sass/_md-comp-date-picker-docked.scss +241 -0
  251. package/tokens/versions/latest/sass/_md-comp-date-picker-modal.scss +295 -0
  252. package/tokens/versions/latest/sass/_md-comp-dialog.scss +157 -0
  253. package/tokens/versions/latest/sass/_md-comp-divider.scss +23 -0
  254. package/tokens/versions/latest/sass/_md-comp-drag-handle.scss +54 -0
  255. package/tokens/versions/latest/sass/_md-comp-elevated-button.scss +190 -0
  256. package/tokens/versions/latest/sass/_md-comp-elevated-card.scss +75 -0
  257. package/tokens/versions/latest/sass/_md-comp-extended-fab-branded.scss +100 -0
  258. package/tokens/versions/latest/sass/_md-comp-extended-fab-large.scss +36 -0
  259. package/tokens/versions/latest/sass/_md-comp-extended-fab-medium.scss +36 -0
  260. package/tokens/versions/latest/sass/_md-comp-extended-fab-primary-container.scss +61 -0
  261. package/tokens/versions/latest/sass/_md-comp-extended-fab-primary.scss +174 -0
  262. package/tokens/versions/latest/sass/_md-comp-extended-fab-secondary-container.scss +61 -0
  263. package/tokens/versions/latest/sass/_md-comp-extended-fab-secondary.scss +174 -0
  264. package/tokens/versions/latest/sass/_md-comp-extended-fab-small.scss +36 -0
  265. package/tokens/versions/latest/sass/_md-comp-extended-fab-surface.scss +108 -0
  266. package/tokens/versions/latest/sass/_md-comp-extended-fab-tertiary-container.scss +61 -0
  267. package/tokens/versions/latest/sass/_md-comp-extended-fab-tertiary.scss +174 -0
  268. package/tokens/versions/latest/sass/_md-comp-extended-fab.scss +36 -0
  269. package/tokens/versions/latest/sass/_md-comp-fab-branded-large.scss +127 -0
  270. package/tokens/versions/latest/sass/_md-comp-fab-branded.scss +75 -0
  271. package/tokens/versions/latest/sass/_md-comp-fab-large.scss +27 -0
  272. package/tokens/versions/latest/sass/_md-comp-fab-medium.scss +27 -0
  273. package/tokens/versions/latest/sass/_md-comp-fab-menu-primary-close-button.scss +51 -0
  274. package/tokens/versions/latest/sass/_md-comp-fab-menu-primary-container.scss +59 -0
  275. package/tokens/versions/latest/sass/_md-comp-fab-menu-secondary-close-button.scss +51 -0
  276. package/tokens/versions/latest/sass/_md-comp-fab-menu-secondary-container.scss +59 -0
  277. package/tokens/versions/latest/sass/_md-comp-fab-menu-tertiary-close-button.scss +51 -0
  278. package/tokens/versions/latest/sass/_md-comp-fab-menu-tertiary-container.scss +59 -0
  279. package/tokens/versions/latest/sass/_md-comp-fab-menu.scss +53 -0
  280. package/tokens/versions/latest/sass/_md-comp-fab-primary-container.scss +53 -0
  281. package/tokens/versions/latest/sass/_md-comp-fab-primary-large.scss +131 -0
  282. package/tokens/versions/latest/sass/_md-comp-fab-primary-small.scss +131 -0
  283. package/tokens/versions/latest/sass/_md-comp-fab-primary.scss +131 -0
  284. package/tokens/versions/latest/sass/_md-comp-fab-secondary-container.scss +53 -0
  285. package/tokens/versions/latest/sass/_md-comp-fab-secondary-large.scss +131 -0
  286. package/tokens/versions/latest/sass/_md-comp-fab-secondary-small.scss +131 -0
  287. package/tokens/versions/latest/sass/_md-comp-fab-secondary.scss +131 -0
  288. package/tokens/versions/latest/sass/_md-comp-fab-small.scss +27 -0
  289. package/tokens/versions/latest/sass/_md-comp-fab-surface-large.scss +139 -0
  290. package/tokens/versions/latest/sass/_md-comp-fab-surface.scss +83 -0
  291. package/tokens/versions/latest/sass/_md-comp-fab-tertiary-container.scss +53 -0
  292. package/tokens/versions/latest/sass/_md-comp-fab-tertiary-large.scss +131 -0
  293. package/tokens/versions/latest/sass/_md-comp-fab-tertiary-small.scss +131 -0
  294. package/tokens/versions/latest/sass/_md-comp-fab-tertiary.scss +131 -0
  295. package/tokens/versions/latest/sass/_md-comp-fab.scss +27 -0
  296. package/tokens/versions/latest/sass/_md-comp-filled-autocomplete.scss +279 -0
  297. package/tokens/versions/latest/sass/_md-comp-filled-button.scss +206 -0
  298. package/tokens/versions/latest/sass/_md-comp-filled-card.scss +75 -0
  299. package/tokens/versions/latest/sass/_md-comp-filled-icon-button.scss +178 -0
  300. package/tokens/versions/latest/sass/_md-comp-filled-menu-button.scss +118 -0
  301. package/tokens/versions/latest/sass/_md-comp-filled-select.scss +269 -0
  302. package/tokens/versions/latest/sass/_md-comp-filled-text-field.scss +221 -0
  303. package/tokens/versions/latest/sass/_md-comp-filled-tonal-button.scss +186 -0
  304. package/tokens/versions/latest/sass/_md-comp-filled-tonal-icon-button.scss +178 -0
  305. package/tokens/versions/latest/sass/_md-comp-filter-chip.scss +276 -0
  306. package/tokens/versions/latest/sass/_md-comp-full-screen-dialog.scss +199 -0
  307. package/tokens/versions/latest/sass/_md-comp-icon-button-filled.scss +82 -0
  308. package/tokens/versions/latest/sass/_md-comp-icon-button-large.scss +52 -0
  309. package/tokens/versions/latest/sass/_md-comp-icon-button-medium.scss +52 -0
  310. package/tokens/versions/latest/sass/_md-comp-icon-button-outlined.scss +86 -0
  311. package/tokens/versions/latest/sass/_md-comp-icon-button-small.scss +52 -0
  312. package/tokens/versions/latest/sass/_md-comp-icon-button-standard.scss +72 -0
  313. package/tokens/versions/latest/sass/_md-comp-icon-button-tonal.scss +82 -0
  314. package/tokens/versions/latest/sass/_md-comp-icon-button-xlarge.scss +52 -0
  315. package/tokens/versions/latest/sass/_md-comp-icon-button-xsmall.scss +52 -0
  316. package/tokens/versions/latest/sass/_md-comp-icon-button.scss +193 -0
  317. package/tokens/versions/latest/sass/_md-comp-input-chip.scss +300 -0
  318. package/tokens/versions/latest/sass/_md-comp-linear-progress-indicator.scss +60 -0
  319. package/tokens/versions/latest/sass/_md-comp-list-expand.scss +36 -0
  320. package/tokens/versions/latest/sass/_md-comp-list-reorder.scss +45 -0
  321. package/tokens/versions/latest/sass/_md-comp-list-reveal.scss +50 -0
  322. package/tokens/versions/latest/sass/_md-comp-list.scss +408 -0
  323. package/tokens/versions/latest/sass/_md-comp-loading-indicator.scss +38 -0
  324. package/tokens/versions/latest/sass/_md-comp-menu.scss +218 -0
  325. package/tokens/versions/latest/sass/_md-comp-menus-standard.scss +188 -0
  326. package/tokens/versions/latest/sass/_md-comp-menus-vibrant.scss +160 -0
  327. package/tokens/versions/latest/sass/_md-comp-menus.scss +141 -0
  328. package/tokens/versions/latest/sass/_md-comp-nav-bar-item-horizontal.scss +31 -0
  329. package/tokens/versions/latest/sass/_md-comp-nav-bar-item-vertical.scss +31 -0
  330. package/tokens/versions/latest/sass/_md-comp-nav-bar.scss +68 -0
  331. package/tokens/versions/latest/sass/_md-comp-nav-rail-collapsed.scss +35 -0
  332. package/tokens/versions/latest/sass/_md-comp-nav-rail-expanded.scss +47 -0
  333. package/tokens/versions/latest/sass/_md-comp-nav-rail-item-horizontal.scss +31 -0
  334. package/tokens/versions/latest/sass/_md-comp-nav-rail-item-vertical.scss +33 -0
  335. package/tokens/versions/latest/sass/_md-comp-nav-rail-item.scss +39 -0
  336. package/tokens/versions/latest/sass/_md-comp-nav-rail.scss +48 -0
  337. package/tokens/versions/latest/sass/_md-comp-navigation-bar.scss +150 -0
  338. package/tokens/versions/latest/sass/_md-comp-navigation-drawer.scss +187 -0
  339. package/tokens/versions/latest/sass/_md-comp-navigation-rail.scss +233 -0
  340. package/tokens/versions/latest/sass/_md-comp-outlined-autocomplete.scss +275 -0
  341. package/tokens/versions/latest/sass/_md-comp-outlined-button.scss +182 -0
  342. package/tokens/versions/latest/sass/_md-comp-outlined-card.scss +87 -0
  343. package/tokens/versions/latest/sass/_md-comp-outlined-menu-button.scss +117 -0
  344. package/tokens/versions/latest/sass/_md-comp-outlined-segmented-button.scss +121 -0
  345. package/tokens/versions/latest/sass/_md-comp-outlined-select.scss +266 -0
  346. package/tokens/versions/latest/sass/_md-comp-outlined-text-field.scss +216 -0
  347. package/tokens/versions/latest/sass/_md-comp-plain-tooltip.scss +45 -0
  348. package/tokens/versions/latest/sass/_md-comp-primary-navigation-tab.scss +130 -0
  349. package/tokens/versions/latest/sass/_md-comp-progress-indicator-circular.scss +47 -0
  350. package/tokens/versions/latest/sass/_md-comp-progress-indicator-linear.scss +65 -0
  351. package/tokens/versions/latest/sass/_md-comp-progress-indicator.scss +48 -0
  352. package/tokens/versions/latest/sass/_md-comp-radio-button.scss +72 -0
  353. package/tokens/versions/latest/sass/_md-comp-rich-tooltip.scss +113 -0
  354. package/tokens/versions/latest/sass/_md-comp-scrim.scss +23 -0
  355. package/tokens/versions/latest/sass/_md-comp-search-bar.scss +137 -0
  356. package/tokens/versions/latest/sass/_md-comp-search-view.scss +108 -0
  357. package/tokens/versions/latest/sass/_md-comp-secondary-navigation-tab.scss +104 -0
  358. package/tokens/versions/latest/sass/_md-comp-sheet-bottom.scss +52 -0
  359. package/tokens/versions/latest/sass/_md-comp-sheet-floating.scss +31 -0
  360. package/tokens/versions/latest/sass/_md-comp-sheet-side.scss +96 -0
  361. package/tokens/versions/latest/sass/_md-comp-slider-large.scss +31 -0
  362. package/tokens/versions/latest/sass/_md-comp-slider-medium.scss +31 -0
  363. package/tokens/versions/latest/sass/_md-comp-slider-small.scss +27 -0
  364. package/tokens/versions/latest/sass/_md-comp-slider-xlarge.scss +31 -0
  365. package/tokens/versions/latest/sass/_md-comp-slider-xsmall.scss +27 -0
  366. package/tokens/versions/latest/sass/_md-comp-slider.scss +307 -0
  367. package/tokens/versions/latest/sass/_md-comp-snackbar.scss +115 -0
  368. package/tokens/versions/latest/sass/_md-comp-split-button-large.scss +43 -0
  369. package/tokens/versions/latest/sass/_md-comp-split-button-medium.scss +43 -0
  370. package/tokens/versions/latest/sass/_md-comp-split-button-small.scss +43 -0
  371. package/tokens/versions/latest/sass/_md-comp-split-button-xlarge.scss +43 -0
  372. package/tokens/versions/latest/sass/_md-comp-split-button-xsmall.scss +45 -0
  373. package/tokens/versions/latest/sass/_md-comp-standard-menu-button.scss +103 -0
  374. package/tokens/versions/latest/sass/_md-comp-suggestion-chip.scss +134 -0
  375. package/tokens/versions/latest/sass/_md-comp-switch.scss +191 -0
  376. package/tokens/versions/latest/sass/_md-comp-text-button.scss +154 -0
  377. package/tokens/versions/latest/sass/_md-comp-time-input.scss +206 -0
  378. package/tokens/versions/latest/sass/_md-comp-time-picker.scss +257 -0
  379. package/tokens/versions/latest/sass/_md-comp-toolbar-docked.scss +36 -0
  380. package/tokens/versions/latest/sass/_md-comp-toolbar-floating-fab.scss +51 -0
  381. package/tokens/versions/latest/sass/_md-comp-toolbar-floating.scss +75 -0
  382. package/tokens/versions/latest/sass/_md-comp-toolbar-standard.scss +87 -0
  383. package/tokens/versions/latest/sass/_md-comp-toolbar-vibrant.scss +87 -0
  384. package/tokens/versions/latest/sass/_md-comp-top-app-bar-large.scss +92 -0
  385. package/tokens/versions/latest/sass/_md-comp-top-app-bar-medium.scss +92 -0
  386. package/tokens/versions/latest/sass/_md-comp-top-app-bar-small-centered.scss +112 -0
  387. package/tokens/versions/latest/sass/_md-comp-top-app-bar-small.scss +104 -0
  388. package/tokens/versions/latest/sass/_md-fab-surface-small.scss +139 -0
  389. package/tokens/versions/latest/sass/_md-outlined-icon-button.scss +166 -0
  390. package/tokens/versions/latest/sass/_md-ref-palette.scss +495 -0
  391. package/tokens/versions/latest/sass/_md-ref-typeface.scss +27 -0
  392. package/tokens/versions/latest/sass/_md-sys-color.scss +209 -0
  393. package/tokens/versions/latest/sass/_md-sys-color__dark.scss +209 -0
  394. package/tokens/versions/latest/sass/_md-sys-color__dark__high-contrast.scss +209 -0
  395. package/tokens/versions/latest/sass/_md-sys-color__dark__medium-contrast.scss +209 -0
  396. package/tokens/versions/latest/sass/_md-sys-color__high-contrast.scss +209 -0
  397. package/tokens/versions/latest/sass/_md-sys-color__medium-contrast.scss +209 -0
  398. package/tokens/versions/latest/sass/_md-sys-elevation.scss +35 -0
  399. package/tokens/versions/latest/sass/_md-sys-motion.scss +107 -0
  400. package/tokens/versions/latest/sass/_md-sys-shape.scss +67 -0
  401. package/tokens/versions/latest/sass/_md-sys-state-focus-indicator.scss +23 -0
  402. package/tokens/versions/latest/sass/_md-sys-state.scss +27 -0
  403. package/tokens/versions/latest/sass/_md-sys-typescale-emphasized.scss +559 -0
  404. package/tokens/versions/latest/sass/_md-sys-typescale.scss +571 -0
  405. package/tokens/versions/v0_192/_index.scss +107 -0
  406. package/tokens/versions/v0_192/_md-comp-assist-chip.scss +111 -0
  407. package/tokens/versions/v0_192/_md-comp-badge.scss +61 -0
  408. package/tokens/versions/v0_192/_md-comp-banner.scss +76 -0
  409. package/tokens/versions/v0_192/_md-comp-bottom-app-bar.scss +36 -0
  410. package/tokens/versions/v0_192/_md-comp-carousel-item.scss +66 -0
  411. package/tokens/versions/v0_192/_md-comp-checkbox.scss +129 -0
  412. package/tokens/versions/v0_192/_md-comp-circular-progress-indicator.scss +41 -0
  413. package/tokens/versions/v0_192/_md-comp-data-table.scss +99 -0
  414. package/tokens/versions/v0_192/_md-comp-date-input-modal.scss +90 -0
  415. package/tokens/versions/v0_192/_md-comp-date-picker-docked.scss +247 -0
  416. package/tokens/versions/v0_192/_md-comp-date-picker-modal.scss +306 -0
  417. package/tokens/versions/v0_192/_md-comp-dialog.scss +124 -0
  418. package/tokens/versions/v0_192/_md-comp-divider.scss +28 -0
  419. package/tokens/versions/v0_192/_md-comp-elevated-button.scss +92 -0
  420. package/tokens/versions/v0_192/_md-comp-elevated-card.scss +60 -0
  421. package/tokens/versions/v0_192/_md-comp-extended-fab-branded.scss +89 -0
  422. package/tokens/versions/v0_192/_md-comp-extended-fab-primary.scss +97 -0
  423. package/tokens/versions/v0_192/_md-comp-extended-fab-secondary.scss +98 -0
  424. package/tokens/versions/v0_192/_md-comp-extended-fab-surface.scss +93 -0
  425. package/tokens/versions/v0_192/_md-comp-extended-fab-tertiary.scss +98 -0
  426. package/tokens/versions/v0_192/_md-comp-fab-branded-large.scss +63 -0
  427. package/tokens/versions/v0_192/_md-comp-fab-branded.scss +63 -0
  428. package/tokens/versions/v0_192/_md-comp-fab-primary-large.scss +68 -0
  429. package/tokens/versions/v0_192/_md-comp-fab-primary-small.scss +68 -0
  430. package/tokens/versions/v0_192/_md-comp-fab-primary.scss +68 -0
  431. package/tokens/versions/v0_192/_md-comp-fab-secondary-large.scss +69 -0
  432. package/tokens/versions/v0_192/_md-comp-fab-secondary-small.scss +69 -0
  433. package/tokens/versions/v0_192/_md-comp-fab-secondary.scss +69 -0
  434. package/tokens/versions/v0_192/_md-comp-fab-surface-large.scss +67 -0
  435. package/tokens/versions/v0_192/_md-comp-fab-surface-small.scss +67 -0
  436. package/tokens/versions/v0_192/_md-comp-fab-surface.scss +67 -0
  437. package/tokens/versions/v0_192/_md-comp-fab-tertiary-large.scss +69 -0
  438. package/tokens/versions/v0_192/_md-comp-fab-tertiary-small.scss +69 -0
  439. package/tokens/versions/v0_192/_md-comp-fab-tertiary.scss +69 -0
  440. package/tokens/versions/v0_192/_md-comp-filled-autocomplete.scss +239 -0
  441. package/tokens/versions/v0_192/_md-comp-filled-button.scss +92 -0
  442. package/tokens/versions/v0_192/_md-comp-filled-card.scss +62 -0
  443. package/tokens/versions/v0_192/_md-comp-filled-icon-button.scss +83 -0
  444. package/tokens/versions/v0_192/_md-comp-filled-menu-button.scss +101 -0
  445. package/tokens/versions/v0_192/_md-comp-filled-select.scss +273 -0
  446. package/tokens/versions/v0_192/_md-comp-filled-text-field.scss +193 -0
  447. package/tokens/versions/v0_192/_md-comp-filled-tonal-button.scss +102 -0
  448. package/tokens/versions/v0_192/_md-comp-filled-tonal-icon-button.scss +90 -0
  449. package/tokens/versions/v0_192/_md-comp-filter-chip.scss +210 -0
  450. package/tokens/versions/v0_192/_md-comp-full-screen-dialog.scss +114 -0
  451. package/tokens/versions/v0_192/_md-comp-icon-button.scss +74 -0
  452. package/tokens/versions/v0_192/_md-comp-input-chip.scss +187 -0
  453. package/tokens/versions/v0_192/_md-comp-linear-progress-indicator.scss +43 -0
  454. package/tokens/versions/v0_192/_md-comp-list.scss +255 -0
  455. package/tokens/versions/v0_192/_md-comp-menu.scss +44 -0
  456. package/tokens/versions/v0_192/_md-comp-navigation-bar.scss +115 -0
  457. package/tokens/versions/v0_192/_md-comp-navigation-drawer.scss +165 -0
  458. package/tokens/versions/v0_192/_md-comp-navigation-rail.scss +119 -0
  459. package/tokens/versions/v0_192/_md-comp-outlined-autocomplete.scss +229 -0
  460. package/tokens/versions/v0_192/_md-comp-outlined-button.scss +87 -0
  461. package/tokens/versions/v0_192/_md-comp-outlined-card.scss +66 -0
  462. package/tokens/versions/v0_192/_md-comp-outlined-icon-button.scss +83 -0
  463. package/tokens/versions/v0_192/_md-comp-outlined-menu-button.scss +97 -0
  464. package/tokens/versions/v0_192/_md-comp-outlined-segmented-button.scss +115 -0
  465. package/tokens/versions/v0_192/_md-comp-outlined-select.scss +263 -0
  466. package/tokens/versions/v0_192/_md-comp-outlined-text-field.scss +174 -0
  467. package/tokens/versions/v0_192/_md-comp-plain-tooltip.scss +58 -0
  468. package/tokens/versions/v0_192/_md-comp-primary-navigation-tab.scss +124 -0
  469. package/tokens/versions/v0_192/_md-comp-radio-button.scss +71 -0
  470. package/tokens/versions/v0_192/_md-comp-rich-tooltip.scss +122 -0
  471. package/tokens/versions/v0_192/_md-comp-scrim.scss +28 -0
  472. package/tokens/versions/v0_192/_md-comp-search-bar.scss +100 -0
  473. package/tokens/versions/v0_192/_md-comp-search-view.scss +94 -0
  474. package/tokens/versions/v0_192/_md-comp-secondary-navigation-tab.scss +87 -0
  475. package/tokens/versions/v0_192/_md-comp-sheet-bottom.scss +46 -0
  476. package/tokens/versions/v0_192/_md-comp-sheet-floating.scss +35 -0
  477. package/tokens/versions/v0_192/_md-comp-sheet-side.scss +94 -0
  478. package/tokens/versions/v0_192/_md-comp-slider.scss +118 -0
  479. package/tokens/versions/v0_192/_md-comp-snackbar.scss +130 -0
  480. package/tokens/versions/v0_192/_md-comp-standard-menu-button.scss +101 -0
  481. package/tokens/versions/v0_192/_md-comp-suggestion-chip.scss +127 -0
  482. package/tokens/versions/v0_192/_md-comp-switch.scss +141 -0
  483. package/tokens/versions/v0_192/_md-comp-text-button.scss +80 -0
  484. package/tokens/versions/v0_192/_md-comp-time-input.scss +220 -0
  485. package/tokens/versions/v0_192/_md-comp-time-picker.scss +267 -0
  486. package/tokens/versions/v0_192/_md-comp-top-app-bar-large.scss +64 -0
  487. package/tokens/versions/v0_192/_md-comp-top-app-bar-medium.scss +64 -0
  488. package/tokens/versions/v0_192/_md-comp-top-app-bar-small-centered.scss +71 -0
  489. package/tokens/versions/v0_192/_md-comp-top-app-bar-small.scss +67 -0
  490. package/tokens/versions/v0_192/_md-ref-palette.scss +109 -0
  491. package/tokens/versions/v0_192/_md-ref-typeface.scss +23 -0
  492. package/tokens/versions/v0_192/_md-sys-color.scss +135 -0
  493. package/tokens/versions/v0_192/_md-sys-elevation.scss +24 -0
  494. package/tokens/versions/v0_192/_md-sys-motion.scss +55 -0
  495. package/tokens/versions/v0_192/_md-sys-shape.scss +33 -0
  496. package/tokens/versions/v0_192/_md-sys-state.scss +22 -0
  497. package/tokens/versions/v0_192/_md-sys-typescale.scss +286 -0
  498. package/tokens/versions/v0_192/index.test.scss +584 -0
  499. package/tokens/versions/v0_192/lib.test.scss +663 -0
  500. package/types/command-event.d.ts +22 -0
  501. package/types/css-imports.d.ts +12 -0
  502. package/types/popover.d.ts +22 -0
  503. package/internal/sass/_string-ext.scss +0 -195
@@ -3,90 +3,79 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  //
5
5
 
6
- // go/keep-sorted start
6
+ // Utility functions for "var()" custom property string manipulation.
7
+
8
+ // go/keep-sorted start by_regex='(.+) prefix_order=sass:
7
9
  @use 'sass:map';
8
10
  @use 'sass:meta';
9
11
  @use 'sass:string';
10
- // go/keep-sorted end
11
- // go/keep-sorted start
12
- @use './string-ext';
12
+ @use 'assert';
13
+ @use 'string_ext';
14
+ @use 'throw';
13
15
  // go/keep-sorted end
14
16
 
15
17
  /// Creates a custom property `var()` string.
16
18
  ///
17
- /// @param {String} $name - The name of the custom property.
19
+ /// @example scss
20
+ /// @debug var.create(--foo); // "var(--foo)"
21
+ /// @debug var.create(--foo, 8px); // "var(--foo, 8px)"
22
+ ///
23
+ /// @param {string} $name - The name of the custom property.
18
24
  /// @param {*} $fallback [null] - Optional `var()` fallback value.
19
- /// @return {String} A custom property `var()` string.
25
+ /// @return {string} A custom property `var()` string.
20
26
  @function create($name, $fallback: null) {
21
- $name: create-name($name);
22
- @if $fallback == null {
23
- @return var(#{$name});
27
+ $name: assert.is-type($name, 'string');
28
+ @if throw.get-error($name) {
29
+ @return $name;
24
30
  }
25
-
26
- @if is-var($fallback) {
27
- $fallback-name: name($fallback);
28
- $fallback-fallback: fallback($fallback);
29
- @return var(#{$name}, create($fallback-name, $fallback-fallback));
31
+ @if not string_ext.starts-with($name, '--') {
32
+ @return throw.error(
33
+ 'Custom property names must start with "--". $name: #{meta.inspect($name)}',
34
+ $source: 'var.create'
35
+ );
30
36
  }
31
37
 
32
- @return var(#{$name}, $fallback);
33
- }
34
-
35
- /// Create a custom property variable name.
36
- ///
37
- /// Providing a custom property name with `--*` will ignore the global prefix.
38
- ///
39
- /// @example - scss
40
- /// .foo {
41
- /// color: var(#{var.create-name(foo)});
42
- /// background: var(#{var.create-name(--bar)});
43
- /// }
44
- ///
45
- /// @example - css
46
- /// .foo {
47
- /// color: var(--md-foo);
48
- /// background: var(--bar);
49
- /// }
50
- ///
51
- /// @param {String} $name - The name of the custom property.
52
- /// @return {String} The full valid CSS custom property variable name.
53
- @function create-name($name) {
54
- @if string-ext.has-prefix($name, '--') {
55
- @return $name;
38
+ @if $fallback == null {
39
+ @return var(#{$name});
56
40
  }
57
41
 
58
- @return string.unquote('--md-#{$name}');
42
+ @return var(#{$name}, #{$fallback});
59
43
  }
60
44
 
61
45
  /// Returns the custom property variable name of `var()` string.
62
46
  ///
47
+ /// @example scss
48
+ /// $var: var(--foo);
49
+ /// @debug var.name($var); // "--foo"
50
+ ///
51
+ /// @param {string} $var - A custom property `var()` string.
52
+ /// @return {string} The custom property variable name.
63
53
  /// @throw If the value is not a custom property.
64
- /// @param {String} $var - A custom property `var()` string.
65
- /// @return {String} The custom property variable name.
66
54
  @function name($var) {
67
55
  $var: _parse-and-validate($var);
68
- @return map.get($var, name);
56
+ @if throw.get-error($var) {
57
+ @return $var;
58
+ }
59
+ @return map.get($var, 'name');
69
60
  }
70
61
 
71
62
  /// Returns the fallback value of a custom property `var()` string. The value
72
63
  /// may be null if the `var()` does not have a fallback value.
73
64
  ///
74
- /// @example - scss
75
- /// $fallback: var.fallback(var(--foo, var(--bar, 8px));
76
- /// // "var(--bar, 8px)"
65
+ /// @example scss
66
+ /// $var: var(--foo, var(--bar, 8px));
67
+ /// @debug var.fallback($var); // "var(--bar, 8px)"
77
68
  ///
78
- /// @throw If the value is not a custom property.
79
- /// @param {String} $var - A custom property `var()` string.
80
- /// @return {String} The fallback value of the `var()` string. May be null if
69
+ /// @param {string} $var - A custom property `var()` string.
70
+ /// @return {string} The fallback value of the `var()` string. May be null if
81
71
  /// the `var()` does not have a fallback value.
72
+ /// @throw If the value is not a custom property.
82
73
  @function fallback($var) {
83
74
  $var: _parse-and-validate($var);
84
- $fallback: map.get($var, fallback);
85
- @if is-var($fallback) {
86
- @return create(name($fallback), fallback($fallback));
75
+ @if throw.get-error($var) {
76
+ @return $var;
87
77
  }
88
-
89
- @return $fallback;
78
+ @return map.get($var, 'fallback');
90
79
  }
91
80
 
92
81
  /// Returns the deep fallback value of a custom property `var()` string. The
@@ -95,18 +84,18 @@
95
84
  /// If a fallback value is another `var()`, this function will return the final
96
85
  /// concrete value in the chain.
97
86
  ///
98
- /// @example - scss
99
- /// $fallback: var.deep-fallback(var(--foo, var(--bar, 8px));
100
- /// // "8px"
87
+ /// @example scss
88
+ /// $var: var(--foo, var(--bar, 8px));
89
+ /// @debug var.deep-fallback($var); // "8px"
101
90
  ///
102
- /// @throw If the value is not a custom property.
103
- /// @param {String} $var - A custom property `var()` string.
104
- /// @return {String} The deep fallback value of the `var()` string. May be null
91
+ /// @param {string} $var - A custom property `var()` string.
92
+ /// @return {string} The deep fallback value of the `var()` string. May be null
105
93
  /// if the `var()` does not have a fallback value.
94
+ /// @throw If the value is not a custom property.
106
95
  @function deep-fallback($var) {
107
96
  $fallback: fallback($var);
108
- @if is-var($fallback) {
109
- @return deep-fallback($fallback);
97
+ @while is-var($fallback) {
98
+ $fallback: fallback($fallback);
110
99
  }
111
100
 
112
101
  @return $fallback;
@@ -115,16 +104,17 @@
115
104
  /// Creates a new custom property `var()` string and returns it with the
116
105
  /// specified new fallback value.
117
106
  ///
118
- /// @example - scss
119
- /// $new-var: set-fallback(var(--foo, var(--bar, 8px)), 16px);
120
- /// // "var(--foo, 16px)"
107
+ /// @example scss
108
+ /// $var: var(--foo, var(--bar, 8px));
109
+ /// $new-var: set-fallback($var, 16px);
110
+ /// @debug $new-var; // "var(--foo, 16px)"
121
111
  ///
122
- /// @throw If the value is not a custom property.
123
- /// @param {String} $var - A custom property `var()` string.
112
+ /// @param {string} $var - A custom property `var()` string.
124
113
  /// @param {*} $new-fallback - The new fallback value. May be null to remove a
125
114
  /// value.
126
- /// @return {String} A custom property `var()` string with the new fallback
115
+ /// @return {string} A custom property `var()` string with the new fallback
127
116
  /// value.
117
+ /// @throw If the value is not a custom property.
128
118
  @function set-fallback($var, $new-fallback) {
129
119
  $name: name($var);
130
120
  @return create($name, $new-fallback);
@@ -136,16 +126,17 @@
136
126
  /// If the provided `var()` string's fallback value is another `var()`, this
137
127
  /// function will set the final fallback value in the chain.
138
128
  ///
139
- /// @example - scss
140
- /// $new-var: deep-set-fallback(var(--foo, var(--bar, 8px)), 16px);
141
- /// // "var(--foo, var(--bar, 16px))"
129
+ /// @example scss
130
+ /// $var: var(--foo, var(--bar, 8px));
131
+ /// $new-var: var.deep-set-fallback($var, 16px);
132
+ /// @debug $new-var; // "var(--foo, var(--bar, 16px))"
142
133
  ///
143
- /// @throw If the value is not a custom property.
144
- /// @param {String} $var - A custom property `var()` string.
134
+ /// @param {string} $var - A custom property `var()` string.
145
135
  /// @param {*} $new-fallback - The new fallback value. May be null to remove a
146
136
  /// value.
147
- /// @return {String} A custom property `var()` string with the new deep
137
+ /// @return {string} A custom property `var()` string with the new deep
148
138
  /// fallback value.
139
+ /// @throw If the value is not a custom property.
149
140
  @function deep-set-fallback($var, $new-fallback) {
150
141
  $old-fallback: fallback($var);
151
142
  @if is-var($old-fallback) {
@@ -157,11 +148,12 @@
157
148
 
158
149
  /// Indicates whether or not a value is a custom property `var()` string.
159
150
  ///
160
- /// @example - scss
161
- /// $is-var: var.is-var('var(--foo)'); // true
151
+ /// @example scss
152
+ /// $var: var(--foo);
153
+ /// @debug var.is-var($var); // true
162
154
  ///
163
155
  /// @param {*} $var - The value to test.
164
- /// @return {Bool} True if the value is a custom property `var()` string, or
156
+ /// @return {boolean} True if the value is a custom property `var()` string, or
165
157
  /// false if not.
166
158
  @function is-var($var) {
167
159
  @return _parse($var) != null;
@@ -170,24 +162,25 @@
170
162
  /// Indicates whether or not a value is a `var()` string.
171
163
  ///
172
164
  /// @param {*} $var - The value to test.
173
- /// @return {Bool} True if the value is a custom property `var()` string, or
165
+ /// @return {boolean} True if the value is a custom property `var()` string, or
174
166
  /// false if not.
175
167
  @function _is-var-string($var) {
176
- @return meta.type-of($var) == 'string' and string-ext.has-prefix($var, 'var(');
168
+ @return meta.type-of($var) == 'string' and
169
+ string_ext.starts-with($var, 'var(');
177
170
  }
178
171
 
179
172
  /// Parses a `var()` string into a Map with `name` and `fallback` keys. This
180
173
  /// function returns null if the value is invalid.
181
174
  ///
182
175
  /// @param {*} $var - The value to parse.
183
- /// @return {Map} A Map containing a string `name` key with the custom property
176
+ /// @return {map} A Map containing a string `name` key with the custom property
184
177
  /// name and a `fallback` key with the fallback value (which may be null).
185
178
  /// The returned Map itself may be null if the provided value is not valid.
186
179
  @function _parse($var) {
187
180
  @if meta.type-of($var) ==
188
181
  'map' and
189
- map.has-key($var, name) and
190
- map.has-key($var, fallback)
182
+ map.has-key($var, 'name') and
183
+ map.has-key($var, 'fallback')
191
184
  {
192
185
  @return $var;
193
186
  }
@@ -197,40 +190,37 @@
197
190
  }
198
191
 
199
192
  // Remove function name and parens
200
- $var: string-ext.trim($var, 'var(', ')');
193
+ $var: string_ext.replace-start($var, 'var(', '');
194
+ $var: string_ext.replace-end($var, ')', '');
201
195
 
202
- $name: string-ext.trim-repeating($var, ' ');
196
+ $name: string_ext.trim($var);
203
197
  $fallback: null;
204
198
  $comma: string.index($var, ',');
205
199
  @if $comma != null {
206
- $name: string-ext.trim-repeating(string.slice($var, 1, $comma - 1), ' ');
207
- $fallback: string-ext.trim-repeating(string.slice($var, $comma + 1), ' ');
208
- @if _is-var-string($fallback) {
209
- $fallback: _parse($fallback);
210
- @if $fallback == null {
211
- // Invalid var() fallback string
212
- @return null;
213
- }
214
- }
200
+ $name: string_ext.trim(string.slice($var, 1, $comma - 1));
201
+ $fallback: string_ext.trim(string.slice($var, $comma + 1));
215
202
  }
216
203
 
217
204
  @if $name == '' or $fallback == '' {
218
205
  @return null;
219
206
  }
220
207
 
221
- @return (name: $name, fallback: $fallback);
208
+ @return ('name': $name, 'fallback': $fallback);
222
209
  }
223
210
 
224
211
  /// Parses a `var()` string into a Map with `name` and `fallback` keys.
225
212
  ///
226
- /// @throw If the value is not a custom property.
227
213
  /// @param {*} $var - The value to parse.
228
- /// @return {Map} A Map containing a string `name` key with the custom property
214
+ /// @return {map} A Map containing a string `name` key with the custom property
229
215
  /// name and a `fallback` key with the fallback value (which may be null).
216
+ /// @throw If the value is not a custom property.
230
217
  @function _parse-and-validate($var) {
231
218
  $var-map: _parse($var);
232
219
  @if $var-map == null {
233
- @error '"#{$var}" is not a valid var() string';
220
+ @return throw.error(
221
+ '#{meta.inspect($var)} is not a valid var() string',
222
+ $source: 'var._parse-and-validate'
223
+ );
234
224
  }
235
225
 
236
226
  @return $var-map;
@@ -0,0 +1,18 @@
1
+ //
2
+ // Copyright 2021 Google LLC
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ //
5
+
6
+ @use 'true' as test with (
7
+ $catch-errors: true
8
+ );
9
+
10
+ // go/keep-sorted start
11
+ @use 'assert_test';
12
+ @use 'list_ext_test';
13
+ @use 'map_ext_test';
14
+ @use 'string_ext_test';
15
+ @use 'throw_test';
16
+ @use 'type_test';
17
+ @use 'var_test';
18
+ // go/keep-sorted end
@@ -121,6 +121,7 @@ $_md-sys-shape: tokens.md-sys-shape-values();
121
121
  pointer-events: none;
122
122
  // ensure scrolling is prevented on mobile.
123
123
  touch-action: none;
124
+ user-select: none;
124
125
  }
125
126
 
126
127
  .track,
@@ -78,6 +78,7 @@
78
78
  // Input is also touch target
79
79
  input {
80
80
  appearance: none;
81
+ background: none; // Needed for Firefox v150+
81
82
  height: max(100%, map.get($tokens, 'touch-target-size'));
82
83
  outline: none;
83
84
  margin: 0;
@@ -10,7 +10,6 @@
10
10
  // go/keep-sorted start
11
11
  @use '../../elevation/elevation';
12
12
  @use '../../focus/focus-ring';
13
- @use '../../internal/sass/string-ext';
14
13
  @use '../../ripple/ripple';
15
14
  @use '../../tokens';
16
15
  // go/keep-sorted end
@@ -4,63 +4,63 @@
4
4
  //
5
5
 
6
6
  // go/keep-sorted start
7
- @forward './md-comp-assist-chip' as md-comp-assist-chip-*;
8
- @forward './md-comp-badge' as md-comp-badge-*;
9
- @forward './md-comp-checkbox' as md-comp-checkbox-*;
10
- @forward './md-comp-circular-progress' as md-comp-circular-progress-*;
11
- @forward './md-comp-dialog' as md-comp-dialog-*;
12
- @forward './md-comp-divider' as md-comp-divider-*;
13
- @forward './md-comp-elevated-button' as md-comp-elevated-button-*;
14
- @forward './md-comp-elevated-card' as md-comp-elevated-card-*;
15
- @forward './md-comp-elevation' as md-comp-elevation-*;
16
- @forward './md-comp-fab' as md-comp-fab-*;
17
- @forward './md-comp-fab-branded' as md-comp-fab-branded-*;
18
- @forward './md-comp-filled-button' as md-comp-filled-button-*;
19
- @forward './md-comp-filled-card' as md-comp-filled-card-*;
20
- @forward './md-comp-filled-field' as md-comp-filled-field-*;
21
- @forward './md-comp-filled-icon-button' as md-comp-filled-icon-button-*;
22
- @forward './md-comp-filled-select' as md-comp-filled-select-*;
23
- @forward './md-comp-filled-text-field' as md-comp-filled-text-field-*;
24
- @forward './md-comp-filled-tonal-button' as md-comp-filled-tonal-button-*;
25
- @forward './md-comp-filled-tonal-icon-button' as
7
+ @forward 'md-comp-assist-chip' as md-comp-assist-chip-*;
8
+ @forward 'md-comp-badge' as md-comp-badge-*;
9
+ @forward 'md-comp-checkbox' as md-comp-checkbox-*;
10
+ @forward 'md-comp-circular-progress' as md-comp-circular-progress-*;
11
+ @forward 'md-comp-dialog' as md-comp-dialog-*;
12
+ @forward 'md-comp-divider' as md-comp-divider-*;
13
+ @forward 'md-comp-elevated-button' as md-comp-elevated-button-*;
14
+ @forward 'md-comp-elevated-card' as md-comp-elevated-card-*;
15
+ @forward 'md-comp-elevation' as md-comp-elevation-*;
16
+ @forward 'md-comp-fab' as md-comp-fab-*;
17
+ @forward 'md-comp-fab-branded' as md-comp-fab-branded-*;
18
+ @forward 'md-comp-filled-button' as md-comp-filled-button-*;
19
+ @forward 'md-comp-filled-card' as md-comp-filled-card-*;
20
+ @forward 'md-comp-filled-field' as md-comp-filled-field-*;
21
+ @forward 'md-comp-filled-icon-button' as md-comp-filled-icon-button-*;
22
+ @forward 'md-comp-filled-select' as md-comp-filled-select-*;
23
+ @forward 'md-comp-filled-text-field' as md-comp-filled-text-field-*;
24
+ @forward 'md-comp-filled-tonal-button' as md-comp-filled-tonal-button-*;
25
+ @forward 'md-comp-filled-tonal-icon-button' as
26
26
  md-comp-filled-tonal-icon-button-*;
27
- @forward './md-comp-filter-chip' as md-comp-filter-chip-*;
28
- @forward './md-comp-focus-ring' as md-comp-focus-ring-*;
29
- @forward './md-comp-full-screen-dialog' as md-comp-full-screen-dialog-*;
30
- @forward './md-comp-icon' as md-comp-icon-*;
31
- @forward './md-comp-icon-button' as md-comp-icon-button-*;
32
- @forward './md-comp-input-chip' as md-comp-input-chip-*;
33
- @forward './md-comp-item' as md-comp-item-*;
34
- @forward './md-comp-linear-progress' as md-comp-linear-progress-*;
35
- @forward './md-comp-list' as md-comp-list-*;
36
- @forward './md-comp-list-item' as md-comp-list-item-*;
37
- @forward './md-comp-menu' as md-comp-menu-*;
38
- @forward './md-comp-menu-item' as md-comp-menu-item-*;
39
- @forward './md-comp-navigation-bar' as md-comp-navigation-bar-*;
40
- @forward './md-comp-navigation-drawer' as md-comp-navigation-drawer-*;
41
- @forward './md-comp-outlined-button' as md-comp-outlined-button-*;
42
- @forward './md-comp-outlined-card' as md-comp-outlined-card-*;
43
- @forward './md-comp-outlined-field' as md-comp-outlined-field-*;
44
- @forward './md-comp-outlined-icon-button' as md-comp-outlined-icon-button-*;
45
- @forward './md-comp-outlined-segmented-button' as
27
+ @forward 'md-comp-filter-chip' as md-comp-filter-chip-*;
28
+ @forward 'md-comp-focus-ring' as md-comp-focus-ring-*;
29
+ @forward 'md-comp-full-screen-dialog' as md-comp-full-screen-dialog-*;
30
+ @forward 'md-comp-icon' as md-comp-icon-*;
31
+ @forward 'md-comp-icon-button' as md-comp-icon-button-*;
32
+ @forward 'md-comp-input-chip' as md-comp-input-chip-*;
33
+ @forward 'md-comp-item' as md-comp-item-*;
34
+ @forward 'md-comp-linear-progress' as md-comp-linear-progress-*;
35
+ @forward 'md-comp-list' as md-comp-list-*;
36
+ @forward 'md-comp-list-item' as md-comp-list-item-*;
37
+ @forward 'md-comp-menu' as md-comp-menu-*;
38
+ @forward 'md-comp-menu-item' as md-comp-menu-item-*;
39
+ @forward 'md-comp-navigation-bar' as md-comp-navigation-bar-*;
40
+ @forward 'md-comp-navigation-drawer' as md-comp-navigation-drawer-*;
41
+ @forward 'md-comp-outlined-button' as md-comp-outlined-button-*;
42
+ @forward 'md-comp-outlined-card' as md-comp-outlined-card-*;
43
+ @forward 'md-comp-outlined-field' as md-comp-outlined-field-*;
44
+ @forward 'md-comp-outlined-icon-button' as md-comp-outlined-icon-button-*;
45
+ @forward 'md-comp-outlined-segmented-button' as
46
46
  md-comp-outlined-segmented-button-*;
47
- @forward './md-comp-outlined-select' as md-comp-outlined-select-*;
48
- @forward './md-comp-outlined-text-field' as md-comp-outlined-text-field-*;
49
- @forward './md-comp-primary-tab' as md-comp-primary-tab-*;
50
- @forward './md-comp-radio' as md-comp-radio-*;
51
- @forward './md-comp-ripple' as md-comp-ripple-*;
52
- @forward './md-comp-secondary-tab' as md-comp-secondary-tab-*;
53
- @forward './md-comp-slider' as md-comp-slider-*;
54
- @forward './md-comp-suggestion-chip' as md-comp-suggestion-chip-*;
55
- @forward './md-comp-switch' as md-comp-switch-*;
56
- @forward './md-comp-test-table' as md-comp-test-table-*;
57
- @forward './md-comp-text-button' as md-comp-text-button-*;
58
- @forward './md-ref-palette' as md-ref-palette-*;
59
- @forward './md-ref-typeface' as md-ref-typeface-*;
60
- @forward './md-sys-color' as md-sys-color-*;
61
- @forward './md-sys-elevation' as md-sys-elevation-*;
62
- @forward './md-sys-motion' as md-sys-motion-*;
63
- @forward './md-sys-shape' as md-sys-shape-*;
64
- @forward './md-sys-state' as md-sys-state-*;
65
- @forward './md-sys-typescale' as md-sys-typescale-*;
47
+ @forward 'md-comp-outlined-select' as md-comp-outlined-select-*;
48
+ @forward 'md-comp-outlined-text-field' as md-comp-outlined-text-field-*;
49
+ @forward 'md-comp-primary-tab' as md-comp-primary-tab-*;
50
+ @forward 'md-comp-radio' as md-comp-radio-*;
51
+ @forward 'md-comp-ripple' as md-comp-ripple-*;
52
+ @forward 'md-comp-secondary-tab' as md-comp-secondary-tab-*;
53
+ @forward 'md-comp-slider' as md-comp-slider-*;
54
+ @forward 'md-comp-suggestion-chip' as md-comp-suggestion-chip-*;
55
+ @forward 'md-comp-switch' as md-comp-switch-*;
56
+ @forward 'md-comp-test-table' as md-comp-test-table-*;
57
+ @forward 'md-comp-text-button' as md-comp-text-button-*;
58
+ @forward 'md-ref-palette' as md-ref-palette-*;
59
+ @forward 'md-ref-typeface' as md-ref-typeface-*;
60
+ @forward 'md-sys-color' as md-sys-color-*;
61
+ @forward 'md-sys-elevation' as md-sys-elevation-*;
62
+ @forward 'md-sys-motion' as md-sys-motion-*;
63
+ @forward 'md-sys-shape' as md-sys-shape-*;
64
+ @forward 'md-sys-state' as md-sys-state-*;
65
+ @forward 'md-sys-typescale' as md-sys-typescale-*;
66
66
  // go/keep-sorted end
@@ -8,14 +8,14 @@
8
8
  @use 'sass:string';
9
9
  // go/keep-sorted end
10
10
  // go/keep-sorted start
11
- @use './internal/shape';
12
- @use './internal/validate';
13
- @use './md-sys-color';
14
- @use './md-sys-elevation';
15
- @use './md-sys-shape';
16
- @use './md-sys-state';
17
- @use './md-sys-typescale';
18
- @use './v0_192/md-comp-assist-chip';
11
+ @use 'internal/shape';
12
+ @use 'internal/validate';
13
+ @use 'md-sys-color';
14
+ @use 'md-sys-elevation';
15
+ @use 'md-sys-shape';
16
+ @use 'md-sys-state';
17
+ @use 'md-sys-typescale';
18
+ @use 'versions/v0_192/md-comp-assist-chip';
19
19
  // go/keep-sorted end
20
20
 
21
21
  $supported-tokens: (
@@ -7,10 +7,10 @@
7
7
  @use 'sass:map';
8
8
  // go/keep-sorted end
9
9
  // go/keep-sorted start
10
- @use './md-sys-color';
11
- @use './md-sys-shape';
12
- @use './md-sys-typescale';
13
- @use './v0_192/md-comp-badge';
10
+ @use 'md-sys-color';
11
+ @use 'md-sys-shape';
12
+ @use 'md-sys-typescale';
13
+ @use 'versions/v0_192/md-comp-badge';
14
14
  // go/keep-sorted end
15
15
 
16
16
  $_default: (
@@ -8,12 +8,12 @@
8
8
  @use 'sass:string';
9
9
  // go/keep-sorted end
10
10
  // go/keep-sorted start
11
- @use './internal/shape';
12
- @use './internal/validate';
13
- @use './md-sys-color';
14
- @use './md-sys-shape';
15
- @use './md-sys-state';
16
- @use './v0_192/md-comp-checkbox';
11
+ @use 'internal/shape';
12
+ @use 'internal/validate';
13
+ @use 'md-sys-color';
14
+ @use 'md-sys-shape';
15
+ @use 'md-sys-state';
16
+ @use 'versions/v0_192/md-comp-checkbox';
17
17
  // go/keep-sorted end
18
18
 
19
19
  $supported-tokens: (
@@ -8,10 +8,10 @@
8
8
  @use 'sass:math';
9
9
  // go/keep-sorted end
10
10
  // go/keep-sorted start
11
- @use './internal/validate';
12
- @use './md-sys-color';
13
- @use './md-sys-shape';
14
- @use './v0_192/md-comp-circular-progress-indicator';
11
+ @use 'internal/validate';
12
+ @use 'md-sys-color';
13
+ @use 'md-sys-shape';
14
+ @use 'versions/v0_192/md-comp-circular-progress-indicator';
15
15
  // go/keep-sorted end
16
16
 
17
17
  $supported-tokens: (
@@ -8,14 +8,14 @@
8
8
  @use 'sass:string';
9
9
  // go/keep-sorted end
10
10
  // go/keep-sorted start
11
- @use './internal/shape';
12
- @use './internal/validate';
13
- @use './md-sys-color';
14
- @use './md-sys-elevation';
15
- @use './md-sys-shape';
16
- @use './md-sys-state';
17
- @use './md-sys-typescale';
18
- @use './v0_192/md-comp-dialog';
11
+ @use 'internal/shape';
12
+ @use 'internal/validate';
13
+ @use 'md-sys-color';
14
+ @use 'md-sys-elevation';
15
+ @use 'md-sys-shape';
16
+ @use 'md-sys-state';
17
+ @use 'md-sys-typescale';
18
+ @use 'versions/v0_192/md-comp-dialog';
19
19
  // go/keep-sorted end
20
20
 
21
21
  $supported-tokens: (
@@ -7,9 +7,9 @@
7
7
  @use 'sass:map';
8
8
  // go/keep-sorted end
9
9
  // go/keep-sorted start
10
- @use './internal/validate';
11
- @use './md-sys-color';
12
- @use './v0_192/md-comp-divider';
10
+ @use 'internal/validate';
11
+ @use 'md-sys-color';
12
+ @use 'versions/v0_192/md-comp-divider';
13
13
  // go/keep-sorted end
14
14
 
15
15
  $supported-tokens: (
@@ -8,14 +8,14 @@
8
8
  @use 'sass:string';
9
9
  // go/keep-sorted end
10
10
  // go/keep-sorted start
11
- @use './internal/shape';
12
- @use './internal/validate';
13
- @use './md-sys-color';
14
- @use './md-sys-elevation';
15
- @use './md-sys-shape';
16
- @use './md-sys-state';
17
- @use './md-sys-typescale';
18
- @use './v0_192/md-comp-elevated-button';
11
+ @use 'internal/shape';
12
+ @use 'internal/validate';
13
+ @use 'md-sys-color';
14
+ @use 'md-sys-elevation';
15
+ @use 'md-sys-shape';
16
+ @use 'md-sys-state';
17
+ @use 'md-sys-typescale';
18
+ @use 'versions/v0_192/md-comp-elevated-button';
19
19
  // go/keep-sorted end
20
20
 
21
21
  $supported-tokens: (
@@ -7,12 +7,12 @@
7
7
  @use 'sass:map';
8
8
  // go/keep-sorted end
9
9
  // go/keep-sorted start
10
- @use './internal/validate';
11
- @use './md-sys-color';
12
- @use './md-sys-elevation';
13
- @use './md-sys-shape';
14
- @use './md-sys-state';
15
- @use './v0_192/md-comp-elevated-card';
10
+ @use 'internal/validate';
11
+ @use 'md-sys-color';
12
+ @use 'md-sys-elevation';
13
+ @use 'md-sys-shape';
14
+ @use 'md-sys-state';
15
+ @use 'versions/v0_192/md-comp-elevated-card';
16
16
  // go/keep-sorted end
17
17
 
18
18
  $supported-tokens: (
@@ -7,9 +7,9 @@
7
7
  @use 'sass:map';
8
8
  // go/keep-sorted end
9
9
  // go/keep-sorted start
10
- @use './internal/validate';
11
- @use './md-sys-color';
12
- @use './md-sys-elevation';
10
+ @use 'internal/validate';
11
+ @use 'md-sys-color';
12
+ @use 'md-sys-elevation';
13
13
  // go/keep-sorted end
14
14
 
15
15
  $supported-tokens: (