material 3.7.1 → 3.7.3

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 (276) hide show
  1. package/README.md +2 -2
  2. package/dist/components/slider/features/controller.js +24 -8
  3. package/dist/elements/css/bottom-app-bar.css +1 -1
  4. package/dist/elements/css/bottom-app-bar.js +1 -1
  5. package/dist/elements/css/card.css +1 -1
  6. package/dist/elements/css/card.js +1 -1
  7. package/dist/elements/css/checkbox.css +1 -1
  8. package/dist/elements/css/checkbox.js +1 -1
  9. package/dist/elements/css/datepicker.css +1 -1
  10. package/dist/elements/css/datepicker.js +1 -1
  11. package/dist/elements/css/dialog.css +1 -1
  12. package/dist/elements/css/dialog.js +1 -1
  13. package/dist/elements/css/menu.css +1 -1
  14. package/dist/elements/css/menu.js +1 -1
  15. package/dist/elements/css/radios.css +1 -1
  16. package/dist/elements/css/radios.js +1 -1
  17. package/dist/elements/css/select.css +1 -1
  18. package/dist/elements/css/select.js +1 -1
  19. package/dist/elements/css/slider.css +1 -1
  20. package/dist/elements/css/slider.js +1 -1
  21. package/dist/elements/css/tabs.css +1 -1
  22. package/dist/elements/css/tabs.js +1 -1
  23. package/dist/elements/css/text-field.css +1 -1
  24. package/dist/elements/css/text-field.js +1 -1
  25. package/dist/elements/css/timepicker.css +1 -1
  26. package/dist/elements/css/timepicker.js +1 -1
  27. package/dist/elements/css/top-app-bar.css +1 -1
  28. package/dist/elements/css/top-app-bar.js +1 -1
  29. package/dist/elements/preupgrade/badge.css +1 -1
  30. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  31. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  32. package/dist/elements/preupgrade/button-group.css +1 -1
  33. package/dist/elements/preupgrade/button.css +1 -1
  34. package/dist/elements/preupgrade/card.css +1 -1
  35. package/dist/elements/preupgrade/carousel.css +1 -1
  36. package/dist/elements/preupgrade/checkbox.css +1 -1
  37. package/dist/elements/preupgrade/chips.css +1 -1
  38. package/dist/elements/preupgrade/datepicker.css +1 -1
  39. package/dist/elements/preupgrade/dialog.css +1 -1
  40. package/dist/elements/preupgrade/divider.css +1 -1
  41. package/dist/elements/preupgrade/drawer.css +1 -1
  42. package/dist/elements/preupgrade/extended-fab.css +1 -1
  43. package/dist/elements/preupgrade/fab-menu.css +1 -1
  44. package/dist/elements/preupgrade/fab.css +1 -1
  45. package/dist/elements/preupgrade/icon-button.css +1 -1
  46. package/dist/elements/preupgrade/list.css +1 -1
  47. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  48. package/dist/elements/preupgrade/menu.css +1 -1
  49. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  50. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  51. package/dist/elements/preupgrade/progress.css +1 -1
  52. package/dist/elements/preupgrade/radios.css +1 -1
  53. package/dist/elements/preupgrade/search.css +1 -1
  54. package/dist/elements/preupgrade/select.css +1 -1
  55. package/dist/elements/preupgrade/side-sheet.css +1 -1
  56. package/dist/elements/preupgrade/slider.css +1 -1
  57. package/dist/elements/preupgrade/snackbar.css +1 -1
  58. package/dist/elements/preupgrade/split-button.css +1 -1
  59. package/dist/elements/preupgrade/switch.css +1 -1
  60. package/dist/elements/preupgrade/tabs.css +1 -1
  61. package/dist/elements/preupgrade/text-field.css +1 -1
  62. package/dist/elements/preupgrade/timepicker.css +1 -1
  63. package/dist/elements/preupgrade/toolbar.css +1 -1
  64. package/dist/elements/preupgrade/tooltip.css +1 -1
  65. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  66. package/dist/elements/preupgrade.css +1 -1
  67. package/dist/styles/badge.css +1 -1
  68. package/dist/styles/base-lite.css +1 -1
  69. package/dist/styles/base.css +1 -1
  70. package/dist/styles/bottom-app-bar.css +2 -2
  71. package/dist/styles/bottom-sheet.css +1 -1
  72. package/dist/styles/button-group.css +1 -1
  73. package/dist/styles/button.css +1 -1
  74. package/dist/styles/card.css +2 -2
  75. package/dist/styles/carousel.css +1 -1
  76. package/dist/styles/checkbox.css +2 -2
  77. package/dist/styles/chips.css +1 -1
  78. package/dist/styles/contrast.css +1 -1
  79. package/dist/styles/datepicker.css +2 -2
  80. package/dist/styles/dialog.css +2 -2
  81. package/dist/styles/divider.css +1 -1
  82. package/dist/styles/drawer.css +1 -1
  83. package/dist/styles/extended-fab.css +1 -1
  84. package/dist/styles/fab-menu.css +1 -1
  85. package/dist/styles/fab.css +1 -1
  86. package/dist/styles/icon-button.css +1 -1
  87. package/dist/styles/list.css +1 -1
  88. package/dist/styles/loading-indicator.css +1 -1
  89. package/dist/styles/menu.css +2 -2
  90. package/dist/styles/navigation-bar.css +1 -1
  91. package/dist/styles/navigation-rail.css +1 -1
  92. package/dist/styles/progress.css +1 -1
  93. package/dist/styles/radios.css +2 -2
  94. package/dist/styles/search.css +1 -1
  95. package/dist/styles/select.css +2 -2
  96. package/dist/styles/side-sheet.css +1 -1
  97. package/dist/styles/slider.css +2 -2
  98. package/dist/styles/snackbar.css +1 -1
  99. package/dist/styles/split-button.css +1 -1
  100. package/dist/styles/switch.css +1 -1
  101. package/dist/styles/tabs.css +2 -2
  102. package/dist/styles/text-field.css +2 -2
  103. package/dist/styles/timepicker.css +2 -2
  104. package/dist/styles/toolbar.css +1 -1
  105. package/dist/styles/tooltip.css +1 -1
  106. package/dist/styles/top-app-bar.css +2 -2
  107. package/dist/styles/typography.css +1 -1
  108. package/dist/styles/utilities.css +1 -1
  109. package/dist/styles.css +2 -2
  110. package/dist/themes/autumn-contrast.css +1 -1
  111. package/dist/themes/autumn.css +1 -1
  112. package/dist/themes/baseline-contrast.css +1 -1
  113. package/dist/themes/baseline.css +1 -1
  114. package/dist/themes/brownbeige-contrast.css +1 -1
  115. package/dist/themes/brownbeige.css +1 -1
  116. package/dist/themes/content-contrast.css +1 -1
  117. package/dist/themes/content.css +1 -1
  118. package/dist/themes/desert-contrast.css +1 -1
  119. package/dist/themes/desert.css +1 -1
  120. package/dist/themes/expressive-contrast.css +1 -1
  121. package/dist/themes/expressive.css +1 -1
  122. package/dist/themes/fidelity-contrast.css +1 -1
  123. package/dist/themes/fidelity.css +1 -1
  124. package/dist/themes/forest-contrast.css +1 -1
  125. package/dist/themes/forest.css +1 -1
  126. package/dist/themes/fruit-salad-contrast.css +1 -1
  127. package/dist/themes/fruit-salad.css +1 -1
  128. package/dist/themes/highcontrast-contrast.css +1 -1
  129. package/dist/themes/highcontrast.css +1 -1
  130. package/dist/themes/monochrome-contrast.css +1 -1
  131. package/dist/themes/monochrome.css +1 -1
  132. package/dist/themes/neutral-contrast.css +1 -1
  133. package/dist/themes/neutral.css +1 -1
  134. package/dist/themes/ocean-contrast.css +1 -1
  135. package/dist/themes/ocean.css +1 -1
  136. package/dist/themes/rainbow-contrast.css +1 -1
  137. package/dist/themes/rainbow.css +1 -1
  138. package/dist/themes/sageivory-contrast.css +1 -1
  139. package/dist/themes/sageivory.css +1 -1
  140. package/dist/themes/spring-contrast.css +1 -1
  141. package/dist/themes/spring.css +1 -1
  142. package/dist/themes/summer-contrast.css +1 -1
  143. package/dist/themes/summer.css +1 -1
  144. package/dist/themes/sunset-contrast.css +1 -1
  145. package/dist/themes/sunset.css +1 -1
  146. package/dist/themes/tealcaramel-contrast.css +1 -1
  147. package/dist/themes/tealcaramel.css +1 -1
  148. package/dist/themes/vibrant-contrast.css +1 -1
  149. package/dist/themes/vibrant.css +1 -1
  150. package/package.json +2 -1
  151. package/src/styles/abstract/_base.scss +0 -1
  152. package/src/styles/abstract/_direction.scss +121 -152
  153. package/src/styles/abstract/_emit.scss +7 -16
  154. package/src/styles/abstract/_floating-placement.scss +9 -10
  155. package/src/styles/abstract/_functions.scss +64 -79
  156. package/src/styles/abstract/_mixins.scss +355 -459
  157. package/src/styles/abstract/_theme.scss +122 -136
  158. package/src/styles/abstract/_variables.scss +320 -390
  159. package/src/styles/abstract/chips/_assist.scss +2 -3
  160. package/src/styles/abstract/chips/_filter.scss +2 -3
  161. package/src/styles/abstract/chips/_input.scss +2 -3
  162. package/src/styles/abstract/chips/_suggestion.scss +2 -3
  163. package/src/styles/base/_body-theme.scss +10 -15
  164. package/src/styles/base/_document.scss +10 -33
  165. package/src/styles/base/_reset.scss +20 -40
  166. package/src/styles/base/_tokens.scss +6 -21
  167. package/src/styles/base/_typescale-tokens.scss +12 -16
  168. package/src/styles/base/_typography.scss +28 -37
  169. package/src/styles/components/_badge.scss +171 -193
  170. package/src/styles/components/_bottom-app-bar.scss +72 -88
  171. package/src/styles/components/_bottom-sheet.scss +188 -232
  172. package/src/styles/components/_button-group.scss +140 -189
  173. package/src/styles/components/_button.scss +382 -478
  174. package/src/styles/components/_card.scss +349 -473
  175. package/src/styles/components/_carousel.scss +134 -156
  176. package/src/styles/components/_checkbox.scss +208 -247
  177. package/src/styles/components/_chips.scss +239 -304
  178. package/src/styles/components/_datepicker.scss +172 -220
  179. package/src/styles/components/_dialog.scss +428 -553
  180. package/src/styles/components/_divider.scss +37 -46
  181. package/src/styles/components/_drawer.scss +571 -678
  182. package/src/styles/components/_extended-fab.scss +263 -294
  183. package/src/styles/components/_fab-menu.scss +225 -267
  184. package/src/styles/components/_fab.scss +197 -218
  185. package/src/styles/components/_icon-button.scss +483 -588
  186. package/src/styles/components/_list.scss +115 -144
  187. package/src/styles/components/_loading-indicator.scss +23 -29
  188. package/src/styles/components/_menu.scss +543 -699
  189. package/src/styles/components/_navigation-bar.scss +189 -234
  190. package/src/styles/components/_navigation-rail.scss +256 -312
  191. package/src/styles/components/_progress.scss +60 -85
  192. package/src/styles/components/_radios.scss +170 -205
  193. package/src/styles/components/_search.scss +369 -455
  194. package/src/styles/components/_select.scss +78 -185
  195. package/src/styles/components/_side-sheet.scss +234 -292
  196. package/src/styles/components/_slider.scss +289 -367
  197. package/src/styles/components/_snackbar.scss +149 -198
  198. package/src/styles/components/_split-button.scss +139 -228
  199. package/src/styles/components/_switch.scss +282 -349
  200. package/src/styles/components/_tabs.scss +350 -547
  201. package/src/styles/components/_text-field.scss +788 -978
  202. package/src/styles/components/_timepicker.scss +435 -506
  203. package/src/styles/components/_toolbar.scss +178 -242
  204. package/src/styles/components/_tooltip.scss +152 -197
  205. package/src/styles/components/_top-app-bar.scss +206 -224
  206. package/src/styles/elements/_badge.scss +42 -61
  207. package/src/styles/elements/_bottom-app-bar.scss +14 -20
  208. package/src/styles/elements/_bottom-sheet.scss +0 -3
  209. package/src/styles/elements/_button-group.scss +80 -80
  210. package/src/styles/elements/_button.scss +72 -88
  211. package/src/styles/elements/_card.scss +48 -57
  212. package/src/styles/elements/_carousel.scss +2 -5
  213. package/src/styles/elements/_checkbox.scss +32 -43
  214. package/src/styles/elements/_chips.scss +18 -22
  215. package/src/styles/elements/_config.scss +11 -26
  216. package/src/styles/elements/_datepicker.scss +17 -22
  217. package/src/styles/elements/_dialog.scss +0 -3
  218. package/src/styles/elements/_divider.scss +11 -13
  219. package/src/styles/elements/_drawer.scss +9 -14
  220. package/src/styles/elements/_extended-fab.scss +36 -40
  221. package/src/styles/elements/_fab-menu.scss +21 -25
  222. package/src/styles/elements/_fab.scss +17 -20
  223. package/src/styles/elements/_field.scss +93 -114
  224. package/src/styles/elements/_icon-button.scss +34 -38
  225. package/src/styles/elements/_index.scss +0 -4
  226. package/src/styles/elements/_list.scss +19 -26
  227. package/src/styles/elements/_loading-indicator.scss +6 -9
  228. package/src/styles/elements/_menu.scss +0 -3
  229. package/src/styles/elements/_navigation-bar.scss +5 -9
  230. package/src/styles/elements/_navigation-rail.scss +10 -15
  231. package/src/styles/elements/_progress.scss +15 -18
  232. package/src/styles/elements/_radios.scss +24 -49
  233. package/src/styles/elements/_search.scss +19 -24
  234. package/src/styles/elements/_select.scss +4 -9
  235. package/src/styles/elements/_side-sheet.scss +0 -3
  236. package/src/styles/elements/_slider.scss +15 -35
  237. package/src/styles/elements/_snackbar.scss +0 -3
  238. package/src/styles/elements/_split-button.scss +33 -39
  239. package/src/styles/elements/_switch.scss +50 -90
  240. package/src/styles/elements/_tabs.scss +9 -13
  241. package/src/styles/elements/_text-field.scss +150 -178
  242. package/src/styles/elements/_timepicker.scss +0 -3
  243. package/src/styles/elements/_toolbar.scss +30 -35
  244. package/src/styles/elements/_tooltip.scss +0 -3
  245. package/src/styles/elements/_top-app-bar.scss +38 -45
  246. package/src/styles/main.scss +0 -15
  247. package/src/styles/themes/_autumn.scss +240 -258
  248. package/src/styles/themes/_base-theme.scss +96 -128
  249. package/src/styles/themes/_baseline.scss +273 -314
  250. package/src/styles/themes/_brownbeige.scss +242 -250
  251. package/src/styles/themes/_content.scss +240 -248
  252. package/src/styles/themes/_desert.scss +242 -250
  253. package/src/styles/themes/_expressive.scss +242 -250
  254. package/src/styles/themes/_fidelity.scss +240 -248
  255. package/src/styles/themes/_forest.scss +242 -259
  256. package/src/styles/themes/_fruit-salad.scss +242 -250
  257. package/src/styles/themes/_highcontrast.scss +164 -172
  258. package/src/styles/themes/_index.scss +0 -1
  259. package/src/styles/themes/_monochrome.scss +226 -234
  260. package/src/styles/themes/_neutral.scss +242 -250
  261. package/src/styles/themes/_ocean.scss +242 -259
  262. package/src/styles/themes/_rainbow.scss +242 -250
  263. package/src/styles/themes/_sageivory.scss +242 -250
  264. package/src/styles/themes/_spring.scss +238 -255
  265. package/src/styles/themes/_summer.scss +242 -250
  266. package/src/styles/themes/_sunset.scss +242 -259
  267. package/src/styles/themes/_tealcaramel.scss +242 -250
  268. package/src/styles/themes/_vibrant.scss +242 -250
  269. package/src/styles/utilities/_colors.scss +44 -50
  270. package/src/styles/utilities/_flexbox.scss +48 -59
  271. package/src/styles/utilities/_layout.scss +516 -591
  272. package/src/styles/utilities/_ripple.scss +61 -70
  273. package/src/styles/utilities/_spacing.scss +120 -127
  274. package/src/styles/utilities/_typography.scss +45 -58
  275. package/src/styles/utilities/_visibility.scss +61 -76
  276. package/dist/package.json +0 -488
@@ -1,475 +1,405 @@
1
- // src/styles/abstract/_variables.scss
2
1
  @use 'sass:map';
3
2
  @use 'sass:math';
4
3
  @use 'sass:string';
5
4
  @use 'base' as *;
6
5
 
7
- // The fast spatial spring (Compose FastSpatial: damping 0.6, stiffness 800),
8
- // sampled at 25 even steps. Both of its easings below come from these points,
9
- // so they cannot drift apart.
10
6
  $spring-fast-spatial-points: (0.0, 0.102, 0.323, 0.57, 0.784, 0.942, 1.039, 1.085, 1.094, 1.082, 1.06, 1.037, 1.018, 1.004, 0.995, 0.992, 0.991, 0.992, 0.995, 0.997, 0.999, 1.0, 1.001, 1.001, 1);
11
7
 
12
- /// A linear() easing through `$points`; with `$clamp`, each point at most 1.
13
8
  @function spring-linear($points, $clamp: false) {
14
- $text: '';
15
- @each $point in $points {
16
- $value: if($clamp, math.min($point, 1), $point);
17
- $text: if($text == '', '#{$value}', '#{$text}, #{$value}');
18
- }
19
- @return string.unquote('linear(#{$text})');
9
+ $text: '';
10
+ @each $point in $points {
11
+ $value: if($clamp, math.min($point, 1), $point);
12
+ $text: if($text == '', '#{$value}', '#{$text}, #{$value}');
13
+ }
14
+ @return string.unquote('linear(#{$text})');
20
15
  }
21
16
 
22
- // Core design tokens
23
17
  $state: (
24
- 'hover-state-layer-opacity': 0.08,
25
- 'focus-state-layer-opacity': 0.1,
26
- 'pressed-state-layer-opacity': 0.1,
27
- 'dragged-state-layer-opacity': 0.16
18
+ 'hover-state-layer-opacity': 0.08,
19
+ 'focus-state-layer-opacity': 0.1,
20
+ 'pressed-state-layer-opacity': 0.1,
21
+ 'dragged-state-layer-opacity': 0.16
28
22
  ) !default;
29
23
 
30
24
  $motion: (
31
- // Duration tokens, md.sys.motion.duration.* (material-web
32
- // tokens/versions/v0_192/_md-sys-motion.scss; MDC-Android
33
- // motion/res/values/tokens.xml holds the same integers). Every one of these
34
- // was between 1.5x and 2x its token: short3, which M3 puts at 150ms and a
35
- // dialog closes on, was 250ms.
36
- 'duration-short1': 50ms,
37
- 'duration-short2': 100ms,
38
- 'duration-short3': 150ms,
39
- 'duration-short4': 200ms,
40
- 'duration-medium1': 250ms,
41
- 'duration-medium2': 300ms,
42
- 'duration-medium3': 350ms,
43
- 'duration-medium4': 400ms,
44
- 'duration-long1': 450ms,
45
- 'duration-long2': 500ms,
46
- 'duration-long3': 550ms,
47
- 'duration-long4': 600ms,
48
- 'duration-extra-long1': 700ms,
49
- 'duration-extra-long2': 800ms,
50
- 'duration-extra-long3': 900ms,
51
- 'duration-extra-long4': 1000ms,
52
-
53
- // Standard easing tokens (Material Design 3 defaults)
54
- 'easing-standard': cubic-bezier(0.2, 0.0, 0.0, 1.0),
55
- 'easing-standard-accelerate': cubic-bezier(0.3, 0.0, 1.0, 1.0),
56
- 'easing-standard-decelerate': cubic-bezier(0.0, 0.0, 0.2, 1.0),
57
-
58
- // Emphasized easing tokens. M3 draws emphasized as a path no single cubic
59
- // curve matches; this is material-web's approximation (internal/motion/
60
- // animation.ts). It was a copy of standard, so nothing was emphasized.
61
- 'easing-emphasized': cubic-bezier(0.3, 0.0, 0.0, 1.0),
62
- 'easing-emphasized-accelerate': cubic-bezier(0.3, 0.0, 0.8, 0.15),
63
- 'easing-emphasized-decelerate': cubic-bezier(0.05, 0.7, 0.1, 1.0),
64
-
65
- // Semantic motion tokens (aliases for better developer experience)
66
- 'easing-accelerated': cubic-bezier(0.3, 0.0, 1.0, 1.0), // Same as standard-accelerate
67
- 'easing-decelerated': cubic-bezier(0.0, 0.0, 0.2, 1.0), // Same as standard-decelerate
68
- 'easing-exit': cubic-bezier(0.3, 0.0, 1.0, 1.0), // Element leaving - accelerated motion
69
- 'easing-enter': cubic-bezier(0.0, 0.0, 0.2, 1.0), // Element entering - decelerated motion
70
-
71
- // Animation tokens for specific behaviors
72
- 'easing-appear': cubic-bezier(0.0, 0.0, 0.2, 1.0), // Elements appearing (decelerated)
73
- 'easing-disappear': cubic-bezier(0.3, 0.0, 1.0, 1.0), // Elements disappearing (accelerated)
74
- 'easing-expand': cubic-bezier(0.0, 0.0, 0.2, 1.0), // Elements expanding (decelerated)
75
- 'easing-collapse': cubic-bezier(0.3, 0.0, 1.0, 1.0), // Elements collapsing (accelerated)
76
-
77
- // Material 3 expressive motion scheme: springs sampled as linear() easings
78
- // (Compose ExpressiveMotionTokens.kt, mass 1). Spatial springs move size,
79
- // shape and position and may overshoot; effects springs change colour and
80
- // opacity without overshoot. The duration is the time for the spring to
81
- // settle within 0.1%.
82
- 'spring-default-spatial-duration': 450ms,
83
- 'spring-default-spatial-easing': linear(0.0, 0.055, 0.18, 0.332, 0.483, 0.619, 0.733, 0.823, 0.891, 0.94, 0.973, 0.994, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.009, 1.006, 1.005, 1.003, 1.002, 1.001, 1),
84
- 'spring-fast-spatial-duration': 425ms,
85
- 'spring-fast-spatial-easing': spring-linear($spring-fast-spatial-points),
86
- // The same spring with its progress clamped to 1, for colours: Compose's
87
- // Color.lerp clamps the fraction, so an overshooting spring never takes a
88
- // colour past its target
89
- 'spring-fast-spatial-clamped-easing': spring-linear($spring-fast-spatial-points, $clamp: true),
90
- 'spring-slow-spatial-duration': 625ms,
91
- 'spring-slow-spatial-easing': linear(0.0, 0.056, 0.182, 0.335, 0.488, 0.624, 0.738, 0.827, 0.895, 0.943, 0.975, 0.996, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.008, 1.006, 1.004, 1.003, 1.002, 1.001, 1),
92
- 'spring-default-effects-duration': 250ms,
93
- 'spring-default-effects-easing': linear(0.0, 0.066, 0.203, 0.355, 0.496, 0.616, 0.713, 0.788, 0.845, 0.888, 0.92, 0.943, 0.96, 0.971, 0.98, 0.986, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
94
- 'spring-fast-effects-duration': 175ms,
95
- 'spring-fast-effects-easing': linear(0.0, 0.075, 0.227, 0.39, 0.537, 0.657, 0.751, 0.822, 0.874, 0.912, 0.939, 0.958, 0.971, 0.98, 0.987, 0.991, 0.994, 0.996, 0.997, 0.998, 0.999, 0.999, 0.999, 1.0, 1),
96
- 'spring-slow-effects-duration': 350ms,
97
- 'spring-slow-effects-easing': linear(0.0, 0.065, 0.2, 0.351, 0.491, 0.611, 0.708, 0.783, 0.841, 0.885, 0.917, 0.941, 0.958, 0.97, 0.979, 0.985, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
25
+ 'duration-short1': 50ms,
26
+ 'duration-short2': 100ms,
27
+ 'duration-short3': 150ms,
28
+ 'duration-short4': 200ms,
29
+ 'duration-medium1': 250ms,
30
+ 'duration-medium2': 300ms,
31
+ 'duration-medium3': 350ms,
32
+ 'duration-medium4': 400ms,
33
+ 'duration-long1': 450ms,
34
+ 'duration-long2': 500ms,
35
+ 'duration-long3': 550ms,
36
+ 'duration-long4': 600ms,
37
+ 'duration-extra-long1': 700ms,
38
+ 'duration-extra-long2': 800ms,
39
+ 'duration-extra-long3': 900ms,
40
+ 'duration-extra-long4': 1000ms,
41
+
42
+ 'easing-standard': cubic-bezier(0.2, 0.0, 0.0, 1.0),
43
+ 'easing-standard-accelerate': cubic-bezier(0.3, 0.0, 1.0, 1.0),
44
+ 'easing-standard-decelerate': cubic-bezier(0.0, 0.0, 0.2, 1.0),
45
+
46
+ 'easing-emphasized': cubic-bezier(0.3, 0.0, 0.0, 1.0),
47
+ 'easing-emphasized-accelerate': cubic-bezier(0.3, 0.0, 0.8, 0.15),
48
+ 'easing-emphasized-decelerate': cubic-bezier(0.05, 0.7, 0.1, 1.0),
49
+
50
+ 'easing-accelerated': cubic-bezier(0.3, 0.0, 1.0, 1.0),
51
+ 'easing-decelerated': cubic-bezier(0.0, 0.0, 0.2, 1.0),
52
+ 'easing-exit': cubic-bezier(0.3, 0.0, 1.0, 1.0),
53
+ 'easing-enter': cubic-bezier(0.0, 0.0, 0.2, 1.0),
54
+
55
+ 'easing-appear': cubic-bezier(0.0, 0.0, 0.2, 1.0),
56
+ 'easing-disappear': cubic-bezier(0.3, 0.0, 1.0, 1.0),
57
+ 'easing-expand': cubic-bezier(0.0, 0.0, 0.2, 1.0),
58
+ 'easing-collapse': cubic-bezier(0.3, 0.0, 1.0, 1.0),
59
+
60
+ 'spring-default-spatial-duration': 450ms,
61
+ 'spring-default-spatial-easing': linear(0.0, 0.055, 0.18, 0.332, 0.483, 0.619, 0.733, 0.823, 0.891, 0.94, 0.973, 0.994, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.009, 1.006, 1.005, 1.003, 1.002, 1.001, 1),
62
+ 'spring-fast-spatial-duration': 425ms,
63
+ 'spring-fast-spatial-easing': spring-linear($spring-fast-spatial-points),
64
+ 'spring-fast-spatial-clamped-easing': spring-linear($spring-fast-spatial-points, $clamp: true),
65
+ 'spring-slow-spatial-duration': 625ms,
66
+ 'spring-slow-spatial-easing': linear(0.0, 0.056, 0.182, 0.335, 0.488, 0.624, 0.738, 0.827, 0.895, 0.943, 0.975, 0.996, 1.007, 1.013, 1.015, 1.015, 1.013, 1.011, 1.008, 1.006, 1.004, 1.003, 1.002, 1.001, 1),
67
+ 'spring-default-effects-duration': 250ms,
68
+ 'spring-default-effects-easing': linear(0.0, 0.066, 0.203, 0.355, 0.496, 0.616, 0.713, 0.788, 0.845, 0.888, 0.92, 0.943, 0.96, 0.971, 0.98, 0.986, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
69
+ 'spring-fast-effects-duration': 175ms,
70
+ 'spring-fast-effects-easing': linear(0.0, 0.075, 0.227, 0.39, 0.537, 0.657, 0.751, 0.822, 0.874, 0.912, 0.939, 0.958, 0.971, 0.98, 0.987, 0.991, 0.994, 0.996, 0.997, 0.998, 0.999, 0.999, 0.999, 1.0, 1),
71
+ 'spring-slow-effects-duration': 350ms,
72
+ 'spring-slow-effects-easing': linear(0.0, 0.065, 0.2, 0.351, 0.491, 0.611, 0.708, 0.783, 0.841, 0.885, 0.917, 0.941, 0.958, 0.97, 0.979, 0.985, 0.99, 0.993, 0.995, 0.997, 0.998, 0.998, 0.999, 0.999, 1),
98
73
  ) !default;
99
74
 
100
75
  $elevation: (
101
- 'level-0': none,
102
- 'level-1': (0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15)),
103
- 'level-2': (0px 1px 2px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)),
104
- 'level-3': (0px 1px 3px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)),
105
- 'level-4': (0px 2px 3px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)),
106
- 'level-5': (0px 4px 4px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15))
76
+ 'level-0': none,
77
+ 'level-1': (0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15)),
78
+ 'level-2': (0px 1px 2px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)),
79
+ 'level-3': (0px 1px 3px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)),
80
+ 'level-4': (0px 2px 3px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)),
81
+ 'level-5': (0px 4px 4px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15))
107
82
  ) !default;
108
83
 
109
84
  $typescale: (
110
- 'display-large': (
111
- 'font-family': ('Roboto', sans-serif),
112
- 'font-size': 57px,
113
- 'line-height': 64px,
114
- 'letter-spacing': -0.25px,
115
- 'font-weight': 400
116
- ),
117
- 'display-medium': (
118
- 'font-family': ('Roboto', sans-serif),
119
- 'font-size': 45px,
120
- 'line-height': 52px,
121
- 'letter-spacing': 0,
122
- 'font-weight': 400
123
- ),
124
- 'display-small': (
125
- 'font-family': ('Roboto', sans-serif),
126
- 'font-size': 36px,
127
- 'line-height': 44px,
128
- 'letter-spacing': 0,
129
- 'font-weight': 400
130
- ),
131
- 'headline-large': (
132
- 'font-family': ('Roboto', sans-serif),
133
- 'font-size': 32px,
134
- 'line-height': 40px,
135
- 'letter-spacing': 0,
136
- 'font-weight': 400
137
- ),
138
- 'headline-medium': (
139
- 'font-family': ('Roboto', sans-serif),
140
- 'font-size': 28px,
141
- 'line-height': 36px,
142
- 'letter-spacing': 0,
143
- 'font-weight': 400
144
- ),
145
- 'headline-small': (
146
- 'font-family': ('Roboto', sans-serif),
147
- 'font-size': 24px,
148
- 'line-height': 32px,
149
- 'letter-spacing': 0,
150
- 'font-weight': 400
151
- ),
152
- 'title-large': (
153
- 'font-family': ('Roboto', sans-serif),
154
- 'font-size': 22px,
155
- 'line-height': 28px,
156
- 'letter-spacing': 0,
157
- 'font-weight': 400
158
- ),
159
- 'title-medium': (
160
- 'font-family': ('Roboto', sans-serif),
161
- 'font-size': 16px,
162
- 'line-height': 24px,
163
- 'letter-spacing': 0.15px,
164
- 'font-weight': 500
165
- ),
166
- 'title-small': (
167
- 'font-family': ('Roboto', sans-serif),
168
- 'font-size': 14px,
169
- 'line-height': 20px,
170
- 'letter-spacing': 0.1px,
171
- 'font-weight': 500
172
- ),
173
- 'body-large': (
174
- 'font-family': ('Roboto', sans-serif),
175
- 'font-size': 16px,
176
- 'line-height': 24px,
177
- 'letter-spacing': 0.5px,
178
- 'font-weight': 400
179
- ),
180
- 'body-medium': (
181
- 'font-family': ('Roboto', sans-serif),
182
- 'font-size': 14px,
183
- 'line-height': 20px,
184
- 'letter-spacing': 0.25px,
185
- 'font-weight': 400
186
- ),
187
- 'body-small': (
188
- 'font-family': ('Roboto', sans-serif),
189
- 'font-size': 12px,
190
- 'line-height': 16px,
191
- 'letter-spacing': 0.4px,
192
- 'font-weight': 400
193
- ),
194
- 'label-large': (
195
- 'font-family': ('Roboto', sans-serif),
196
- 'font-size': 14px,
197
- 'line-height': 20px,
198
- 'letter-spacing': 0.1px,
199
- 'font-weight': 500
200
- ),
201
- 'label-medium': (
202
- 'font-family': ('Roboto', sans-serif),
203
- 'font-size': 12px,
204
- 'line-height': 16px,
205
- 'letter-spacing': 0.5px,
206
- 'font-weight': 500
207
- ),
208
- 'label-small': (
209
- 'font-family': ('Roboto', sans-serif),
210
- 'font-size': 11px,
211
- 'line-height': 16px,
212
- 'letter-spacing': 0.5px,
213
- 'font-weight': 500
214
- )
85
+ 'display-large': (
86
+ 'font-family': ('Roboto', sans-serif),
87
+ 'font-size': 57px,
88
+ 'line-height': 64px,
89
+ 'letter-spacing': -0.25px,
90
+ 'font-weight': 400
91
+ ),
92
+ 'display-medium': (
93
+ 'font-family': ('Roboto', sans-serif),
94
+ 'font-size': 45px,
95
+ 'line-height': 52px,
96
+ 'letter-spacing': 0,
97
+ 'font-weight': 400
98
+ ),
99
+ 'display-small': (
100
+ 'font-family': ('Roboto', sans-serif),
101
+ 'font-size': 36px,
102
+ 'line-height': 44px,
103
+ 'letter-spacing': 0,
104
+ 'font-weight': 400
105
+ ),
106
+ 'headline-large': (
107
+ 'font-family': ('Roboto', sans-serif),
108
+ 'font-size': 32px,
109
+ 'line-height': 40px,
110
+ 'letter-spacing': 0,
111
+ 'font-weight': 400
112
+ ),
113
+ 'headline-medium': (
114
+ 'font-family': ('Roboto', sans-serif),
115
+ 'font-size': 28px,
116
+ 'line-height': 36px,
117
+ 'letter-spacing': 0,
118
+ 'font-weight': 400
119
+ ),
120
+ 'headline-small': (
121
+ 'font-family': ('Roboto', sans-serif),
122
+ 'font-size': 24px,
123
+ 'line-height': 32px,
124
+ 'letter-spacing': 0,
125
+ 'font-weight': 400
126
+ ),
127
+ 'title-large': (
128
+ 'font-family': ('Roboto', sans-serif),
129
+ 'font-size': 22px,
130
+ 'line-height': 28px,
131
+ 'letter-spacing': 0,
132
+ 'font-weight': 400
133
+ ),
134
+ 'title-medium': (
135
+ 'font-family': ('Roboto', sans-serif),
136
+ 'font-size': 16px,
137
+ 'line-height': 24px,
138
+ 'letter-spacing': 0.15px,
139
+ 'font-weight': 500
140
+ ),
141
+ 'title-small': (
142
+ 'font-family': ('Roboto', sans-serif),
143
+ 'font-size': 14px,
144
+ 'line-height': 20px,
145
+ 'letter-spacing': 0.1px,
146
+ 'font-weight': 500
147
+ ),
148
+ 'body-large': (
149
+ 'font-family': ('Roboto', sans-serif),
150
+ 'font-size': 16px,
151
+ 'line-height': 24px,
152
+ 'letter-spacing': 0.5px,
153
+ 'font-weight': 400
154
+ ),
155
+ 'body-medium': (
156
+ 'font-family': ('Roboto', sans-serif),
157
+ 'font-size': 14px,
158
+ 'line-height': 20px,
159
+ 'letter-spacing': 0.25px,
160
+ 'font-weight': 400
161
+ ),
162
+ 'body-small': (
163
+ 'font-family': ('Roboto', sans-serif),
164
+ 'font-size': 12px,
165
+ 'line-height': 16px,
166
+ 'letter-spacing': 0.4px,
167
+ 'font-weight': 400
168
+ ),
169
+ 'label-large': (
170
+ 'font-family': ('Roboto', sans-serif),
171
+ 'font-size': 14px,
172
+ 'line-height': 20px,
173
+ 'letter-spacing': 0.1px,
174
+ 'font-weight': 500
175
+ ),
176
+ 'label-medium': (
177
+ 'font-family': ('Roboto', sans-serif),
178
+ 'font-size': 12px,
179
+ 'line-height': 16px,
180
+ 'letter-spacing': 0.5px,
181
+ 'font-weight': 500
182
+ ),
183
+ 'label-small': (
184
+ 'font-family': ('Roboto', sans-serif),
185
+ 'font-size': 11px,
186
+ 'line-height': 16px,
187
+ 'letter-spacing': 0.5px,
188
+ 'font-weight': 500
189
+ )
215
190
  ) !default;
216
191
 
217
- // M3's shape scale, Compose ShapeTokens, and nothing else
218
192
  $shape: (
219
- 'none': 0,
220
- 'extra-small': 4px,
221
- 'small': 8px,
222
- 'medium': 12px,
223
- 'large': 16px,
224
- // Compose ShapeTokens.CornerValueLargeIncreased, used by the split
225
- // button's inner corners when hovered or pressed
226
- 'large-increased': 20px,
227
- 'extra-large': 28px,
228
- // Compose ShapeTokens.CornerValueExtraLargeIncreased and
229
- // CornerValueExtraExtraLarge
230
- 'extra-large-increased': 32px,
231
- 'extra-extra-large': 48px,
232
- 'full': 9999px
193
+ 'none': 0,
194
+ 'extra-small': 4px,
195
+ 'small': 8px,
196
+ 'medium': 12px,
197
+ 'large': 16px,
198
+ 'large-increased': 20px,
199
+ 'extra-large': 28px,
200
+ 'extra-large-increased': 32px,
201
+ 'extra-extra-large': 48px,
202
+ 'full': 9999px
233
203
  ) !default;
234
204
 
235
205
  $breakpoints: (
236
- 'xs': 0,
237
- 'sm': 600px,
238
- 'md': 960px,
239
- 'lg': 1280px,
240
- 'xl': 1920px
206
+ 'xs': 0,
207
+ 'sm': 600px,
208
+ 'md': 960px,
209
+ 'lg': 1280px,
210
+ 'xl': 1920px
241
211
  ) !default;
242
212
 
243
213
  $z-index: (
244
- 'modal': 1000,
245
- 'snackbar': 950,
246
- 'popover': 900,
247
- 'drawer': 800,
248
- 'dialog': 700,
249
- 'dropdown': 600,
250
- 'tooltip': 500,
251
- 'menu': 700,
252
- 'sticky': 100,
253
- 'fixed': 50,
254
- 'default': 1,
255
- 'below': -1
214
+ 'modal': 1000,
215
+ 'snackbar': 950,
216
+ 'popover': 900,
217
+ 'drawer': 800,
218
+ 'dialog': 700,
219
+ 'dropdown': 600,
220
+ 'tooltip': 500,
221
+ 'menu': 700,
222
+ 'sticky': 100,
223
+ 'fixed': 50,
224
+ 'default': 1,
225
+ 'below': -1
256
226
  ) !default;
257
227
 
258
- // Component-specific tokens
259
228
  $card: (
260
- 'width': 344px,
261
- 'width-small': 344px,
262
- 'width-medium': 480px,
263
- 'width-large': 624px,
264
- 'border-radius': 12px,
265
- 'padding': 16px
229
+ 'width': 344px,
230
+ 'width-small': 344px,
231
+ 'width-medium': 480px,
232
+ 'width-large': 624px,
233
+ 'border-radius': 12px,
234
+ 'padding': 16px
266
235
  ) !default;
267
236
 
268
- // Chip configuration - updated with MD3 values
269
237
  $chip-config: (
270
- 'height': 32px,
271
- 'border-radius': 8px,
272
- 'padding-horizontal': 12px,
273
- 'outlined-border-opacity': 0.12,
274
- 'outlined-border-hover-opacity': 0.29,
275
- 'outlined-border-focus-opacity': 0.38,
276
- 'outlined-selected-border-opacity': 0,
277
- 'icon-size': 18px
238
+ 'height': 32px,
239
+ 'border-radius': 8px,
240
+ 'padding-horizontal': 12px,
241
+ 'outlined-border-opacity': 0.12,
242
+ 'outlined-border-hover-opacity': 0.29,
243
+ 'outlined-border-focus-opacity': 0.38,
244
+ 'outlined-selected-border-opacity': 0,
245
+ 'icon-size': 18px
278
246
  ) !default;
279
247
 
280
248
  $button: (
281
- // M3 button tokens (Compose Material 3 ButtonXSmall/Small/Medium/Large/XLargeTokens.kt)
282
- 'height': 40px,
283
- 'min-width': 58px, // ButtonDefaults.MinWidth
284
- 'padding-horizontal': 16px,
285
- 'padding-horizontal-small': 12px, // text button (ButtonDefaults.TextButtonContentPadding)
286
- 'padding-icon': 12px, // small button leading space next to an icon (pointer devices)
287
- 'transition-duration': map.get($motion, 'duration-short2'),
288
- 'transition-easing': map.get($motion, 'easing-standard'),
289
- // Container height per size
290
- 'height-xs': 32px,
291
- 'height-s': 40px,
292
- 'height-m': 56px,
293
- 'height-l': 96px,
294
- 'height-xl': 136px,
295
- // Leading and trailing space per size
296
- 'padding-xs': 12px,
297
- 'padding-s': 16px,
298
- 'padding-m': 24px,
299
- 'padding-l': 48px,
300
- 'padding-xl': 64px,
301
- // Icon size per size
302
- 'icon-size-xs': 20px,
303
- 'icon-size-s': 20px,
304
- 'icon-size-m': 24px,
305
- 'icon-size-l': 32px,
306
- 'icon-size-xl': 40px,
307
- // Icon to label space per size
308
- 'icon-gap-xs': 4px, // md.comp.button.xsmall.icon-label-space; ButtonDefaults.ExtraSmallIconSpacing
309
- 'icon-gap-s': 8px,
310
- 'icon-gap-m': 8px,
311
- 'icon-gap-l': 12px,
312
- 'icon-gap-xl': 16px,
313
- // Outlined outline width per size
314
- 'outline-width-xs': 1px,
315
- 'outline-width-s': 1px,
316
- 'outline-width-m': 1px,
317
- 'outline-width-l': 2px,
318
- 'outline-width-xl': 3px,
319
- // Square container shape per size
320
- 'shape-square-xs': map.get($shape, 'medium'),
321
- 'shape-square-s': map.get($shape, 'medium'),
322
- 'shape-square-m': map.get($shape, 'large'),
323
- 'shape-square-l': map.get($shape, 'extra-large'),
324
- 'shape-square-xl': map.get($shape, 'extra-large'),
325
- // Round container shape per size: exactly half the container height.
326
- //
327
- // A pill needs the real radius, not merely a large one. border-radius
328
- // animates on the number in the stylesheet, not on the corner you see, so a
329
- // 9999px pill morphing to a 12px pressed shape spends almost the whole
330
- // transition above half the height, paints as a pill throughout, and then
331
- // snaps square at the very end. Half the height interpolates linearly and
332
- // the morph reads as a morph.
333
- 'shape-round-xs': 16px,
334
- 'shape-round-s': 20px,
335
- 'shape-round-m': 28px,
336
- 'shape-round-l': 48px,
337
- 'shape-round-xl': 68px,
338
- // Pressed container shape per size (round and square)
339
- 'shape-pressed-xs': map.get($shape, 'small'),
340
- 'shape-pressed-s': map.get($shape, 'small'),
341
- 'shape-pressed-m': map.get($shape, 'medium'),
342
- 'shape-pressed-l': map.get($shape, 'large'),
343
- 'shape-pressed-xl': map.get($shape, 'large'),
344
- // Minimum touch target for the xs and s sizes
345
- 'touch-target': 48px
249
+ 'height': 40px,
250
+ 'min-width': 58px,
251
+ 'padding-horizontal': 16px,
252
+ 'padding-horizontal-small': 12px,
253
+ 'padding-icon': 12px,
254
+ 'transition-duration': map.get($motion, 'duration-short2'),
255
+ 'transition-easing': map.get($motion, 'easing-standard'),
256
+ 'height-xs': 32px,
257
+ 'height-s': 40px,
258
+ 'height-m': 56px,
259
+ 'height-l': 96px,
260
+ 'height-xl': 136px,
261
+ 'padding-xs': 12px,
262
+ 'padding-s': 16px,
263
+ 'padding-m': 24px,
264
+ 'padding-l': 48px,
265
+ 'padding-xl': 64px,
266
+ 'icon-size-xs': 20px,
267
+ 'icon-size-s': 20px,
268
+ 'icon-size-m': 24px,
269
+ 'icon-size-l': 32px,
270
+ 'icon-size-xl': 40px,
271
+ 'icon-gap-xs': 4px,
272
+ 'icon-gap-s': 8px,
273
+ 'icon-gap-m': 8px,
274
+ 'icon-gap-l': 12px,
275
+ 'icon-gap-xl': 16px,
276
+ 'outline-width-xs': 1px,
277
+ 'outline-width-s': 1px,
278
+ 'outline-width-m': 1px,
279
+ 'outline-width-l': 2px,
280
+ 'outline-width-xl': 3px,
281
+ 'shape-square-xs': map.get($shape, 'medium'),
282
+ 'shape-square-s': map.get($shape, 'medium'),
283
+ 'shape-square-m': map.get($shape, 'large'),
284
+ 'shape-square-l': map.get($shape, 'extra-large'),
285
+ 'shape-square-xl': map.get($shape, 'extra-large'),
286
+ 'shape-round-xs': 16px,
287
+ 'shape-round-s': 20px,
288
+ 'shape-round-m': 28px,
289
+ 'shape-round-l': 48px,
290
+ 'shape-round-xl': 68px,
291
+ 'shape-pressed-xs': map.get($shape, 'small'),
292
+ 'shape-pressed-s': map.get($shape, 'small'),
293
+ 'shape-pressed-m': map.get($shape, 'medium'),
294
+ 'shape-pressed-l': map.get($shape, 'large'),
295
+ 'shape-pressed-xl': map.get($shape, 'large'),
296
+ 'touch-target': 48px
346
297
  ) !default;
347
298
 
348
299
 
349
- // Define spacing scale (this might already exist, if not, add it)
350
300
  $spacing-scale: (
351
- '0': 0,
352
- '1': 4px,
353
- '2': 8px,
354
- '3': 12px,
355
- '4': 16px,
356
- '5': 20px,
357
- '6': 24px,
358
- '8': 32px,
359
- '10': 40px,
360
- '12': 48px,
361
- '14': 56px,
362
- '16': 64px,
363
- '20': 80px,
364
- '24': 96px,
365
- '32': 128px
301
+ '0': 0,
302
+ '1': 4px,
303
+ '2': 8px,
304
+ '3': 12px,
305
+ '4': 16px,
306
+ '5': 20px,
307
+ '6': 24px,
308
+ '8': 32px,
309
+ '10': 40px,
310
+ '12': 48px,
311
+ '14': 56px,
312
+ '16': 64px,
313
+ '20': 80px,
314
+ '24': 96px,
315
+ '32': 128px
366
316
  );
367
317
 
368
- // Add spacing function
369
318
  @function spacing($key) {
370
- @if not map.has-key($spacing-scale, $key) {
371
- @error 'Spacing key "#{$key}" not found in spacing scale.';
372
- }
373
- @return map.get($spacing-scale, $key);
319
+ @if not map.has-key($spacing-scale, $key) {
320
+ @error 'Spacing key "#{$key}" not found in spacing scale.';
321
+ }
322
+ @return map.get($spacing-scale, $key);
374
323
  }
375
324
 
376
- // Helper functions for easier token access
377
325
  @function state($key) {
378
- @return map.get($state, $key);
326
+ @return map.get($state, $key);
379
327
  }
380
328
 
381
329
  @function motion($key) {
382
- @return map.get($motion, $key);
330
+ @return map.get($motion, $key);
383
331
  }
384
332
 
385
333
  @function elevation($level) {
386
- @return map.get($elevation, $level);
334
+ @return map.get($elevation, $level);
387
335
  }
388
336
 
389
337
  @function typography($scale) {
390
- @return map.get($typescale, $scale);
338
+ @return map.get($typescale, $scale);
391
339
  }
392
340
 
393
- // A corner as its token, the compiled value as the fallback: an app or
394
- // theme sets --{prefix}-sys-shape-corner-<size> (base/_tokens.scss declares them)
395
341
  @function shape($size) {
396
- @if not map.has-key($shape, $size) {
397
- @error "No shape step '#{$size}'. M3's scale: #{map.keys($shape)}. "
398
- + "extra-tiny, tiny and pill were removed in material 3.0.0: write a literal radius, or use full.";
399
- }
400
- @return var(--#{$prefix}-sys-shape-corner-#{$size}, #{map.get($shape, $size)});
342
+ @if not map.has-key($shape, $size) {
343
+ @error "No shape step '#{$size}'. M3's scale: #{map.keys($shape)}. "
344
+ + "extra-tiny, tiny and pill were removed in material 3.0.0: write a literal radius, or use full.";
345
+ }
346
+ @return var(--#{$prefix}-sys-shape-corner-#{$size}, #{map.get($shape, $size)});
401
347
  }
402
348
 
403
349
  @function z-index($layer) {
404
- @return map.get($z-index, $layer);
350
+ @return map.get($z-index, $layer);
405
351
  }
406
352
 
407
353
  @function breakpoint($size) {
408
- @return map.get($breakpoints, $size);
354
+ @return map.get($breakpoints, $size);
409
355
  }
410
356
 
411
- // The button shapes that are corner tokens: square and pressed. Round is half
412
- // the container height, not a token (see shape-round-* in $button).
413
357
  $button-shape-tokens: (
414
- 'shape-square-xs': 'medium', 'shape-square-s': 'medium', 'shape-square-m': 'large',
415
- 'shape-square-l': 'extra-large', 'shape-square-xl': 'extra-large',
416
- 'shape-pressed-xs': 'small', 'shape-pressed-s': 'small', 'shape-pressed-m': 'medium',
417
- 'shape-pressed-l': 'large', 'shape-pressed-xl': 'large'
358
+ 'shape-square-xs': 'medium', 'shape-square-s': 'medium', 'shape-square-m': 'large',
359
+ 'shape-square-l': 'extra-large', 'shape-square-xl': 'extra-large',
360
+ 'shape-pressed-xs': 'small', 'shape-pressed-s': 'small', 'shape-pressed-m': 'medium',
361
+ 'shape-pressed-l': 'large', 'shape-pressed-xl': 'large'
418
362
  );
419
363
 
420
364
  @function button($prop) {
421
- @if map.has-key($button-shape-tokens, $prop) {
422
- @return shape(map.get($button-shape-tokens, $prop));
423
- }
424
- @return map.get($button, $prop);
365
+ @if map.has-key($button-shape-tokens, $prop) {
366
+ @return shape(map.get($button-shape-tokens, $prop));
367
+ }
368
+ @return map.get($button, $prop);
425
369
  }
426
370
 
427
371
  @function card($key) {
428
- @if $key == 'border-radius' { @return shape('medium'); }
429
- @return map.get($card, $key);
372
+ @if $key == 'border-radius' { @return shape('medium'); }
373
+ @return map.get($card, $key);
430
374
  }
431
375
 
432
376
  @function chip($key, $fallback: null) {
433
- @if $key == 'border-radius' { @return shape('small'); }
434
- @if map.has-key($chip-config, $key) {
435
- @return map.get($chip-config, $key);
436
- }
437
- @return $fallback;
377
+ @if $key == 'border-radius' { @return shape('small'); }
378
+ @if map.has-key($chip-config, $key) {
379
+ @return map.get($chip-config, $key);
380
+ }
381
+ @return $fallback;
438
382
  }
439
383
 
440
- // TextField configuration
441
384
  $text-field: (
442
- // The width of a field the page does not size (TextFieldDefaults.MinWidth)
443
- 'width': 280px,
444
- 'height': 56px,
445
- 'height-small': 48px,
446
- 'height-large': 64px,
447
- // The textarea's box (components/_text-field.scss, &--multiline). The height
448
- // is not an M3 measure: TextFieldDefaults.MinHeight is the 56px line above,
449
- // and m3.material.io gives a text area no number ("Text areas are taller
450
- // than text fields", text fields guidelines, "Input text").
451
- 'height-multiline': 100px,
452
- // Where the first line starts, which a sibling on the field's line aligns
453
- // to: the single-line field's text. 16px, the content padding
454
- // (TextFieldPadding), outlined or without a label; under a filled field's
455
- // floated label, 8px and the label's 16px line.
456
- 'padding-top-multiline': 16px,
457
- 'padding-top-multiline-label': 24px,
458
- // Compact multiline keeps the compact field's 40px, and its first line is
459
- // the compact single-line field's (10.5px, and 13.5px under a filled label).
460
- 'padding-top-multiline-compact': 10px,
461
- 'padding-top-multiline-compact-label': 14px,
462
- 'padding-horizontal': 16px,
463
- 'padding-vertical': 16px,
464
- 'border-radius': map.get($shape, 'extra-small'),
465
- 'border-width': 1px,
466
- 'label-offset': 16px,
467
- 'icon-size': 24px
385
+ 'width': 280px,
386
+ 'height': 56px,
387
+ 'height-small': 48px,
388
+ 'height-large': 64px,
389
+ 'height-multiline': 100px,
390
+ 'padding-top-multiline': 16px,
391
+ 'padding-top-multiline-label': 24px,
392
+ 'padding-top-multiline-compact': 10px,
393
+ 'padding-top-multiline-compact-label': 14px,
394
+ 'padding-horizontal': 16px,
395
+ 'padding-vertical': 16px,
396
+ 'border-radius': map.get($shape, 'extra-small'),
397
+ 'border-width': 1px,
398
+ 'label-offset': 16px,
399
+ 'icon-size': 24px
468
400
  ) !default;
469
401
 
470
- /// A text field measurement: `v.text-field('height')`. 0.10's `$textfield` and
471
- /// `textfield()` are removed in material 3.0.0.
472
402
  @function text-field($key) {
473
- @if $key == 'border-radius' { @return shape('extra-small'); }
474
- @return map.get($text-field, $key);
403
+ @if $key == 'border-radius' { @return shape('extra-small'); }
404
+ @return map.get($text-field, $key);
475
405
  }