material 3.7.2 → 3.8.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 (313) hide show
  1. package/NOTICE +223 -0
  2. package/README.md +5 -3
  3. package/dist/components/extended-fab/types.d.ts +3 -0
  4. package/dist/components/fab/types.d.ts +3 -0
  5. package/dist/components/slider/features/controller.js +24 -8
  6. package/dist/elements/css/card.css +1 -1
  7. package/dist/elements/css/card.js +1 -1
  8. package/dist/elements/css/dialog.css +1 -1
  9. package/dist/elements/css/dialog.js +1 -1
  10. package/dist/elements/css/menu.css +1 -1
  11. package/dist/elements/css/menu.js +1 -1
  12. package/dist/elements/css/select.css +1 -1
  13. package/dist/elements/css/select.js +1 -1
  14. package/dist/elements/css/slider.css +1 -1
  15. package/dist/elements/css/slider.js +1 -1
  16. package/dist/elements/css/tabs.css +1 -1
  17. package/dist/elements/css/tabs.js +1 -1
  18. package/dist/elements/css/timepicker.css +1 -1
  19. package/dist/elements/css/timepicker.js +1 -1
  20. package/dist/elements/extended-fab.d.ts +1 -0
  21. package/dist/elements/fab.d.ts +1 -0
  22. package/dist/elements/preupgrade/badge.css +1 -1
  23. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  24. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  25. package/dist/elements/preupgrade/button-group.css +1 -1
  26. package/dist/elements/preupgrade/button.css +1 -1
  27. package/dist/elements/preupgrade/card.css +1 -1
  28. package/dist/elements/preupgrade/carousel.css +1 -1
  29. package/dist/elements/preupgrade/checkbox.css +1 -1
  30. package/dist/elements/preupgrade/chips.css +1 -1
  31. package/dist/elements/preupgrade/datepicker.css +1 -1
  32. package/dist/elements/preupgrade/dialog.css +1 -1
  33. package/dist/elements/preupgrade/divider.css +1 -1
  34. package/dist/elements/preupgrade/drawer.css +1 -1
  35. package/dist/elements/preupgrade/extended-fab.css +1 -1
  36. package/dist/elements/preupgrade/fab-menu.css +1 -1
  37. package/dist/elements/preupgrade/fab.css +1 -1
  38. package/dist/elements/preupgrade/icon-button.css +1 -1
  39. package/dist/elements/preupgrade/list.css +1 -1
  40. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  41. package/dist/elements/preupgrade/menu.css +1 -1
  42. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  43. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  44. package/dist/elements/preupgrade/progress.css +1 -1
  45. package/dist/elements/preupgrade/radios.css +1 -1
  46. package/dist/elements/preupgrade/search.css +1 -1
  47. package/dist/elements/preupgrade/select.css +1 -1
  48. package/dist/elements/preupgrade/side-sheet.css +1 -1
  49. package/dist/elements/preupgrade/slider.css +1 -1
  50. package/dist/elements/preupgrade/snackbar.css +1 -1
  51. package/dist/elements/preupgrade/split-button.css +1 -1
  52. package/dist/elements/preupgrade/switch.css +1 -1
  53. package/dist/elements/preupgrade/tabs.css +1 -1
  54. package/dist/elements/preupgrade/text-field.css +1 -1
  55. package/dist/elements/preupgrade/timepicker.css +1 -1
  56. package/dist/elements/preupgrade/toolbar.css +1 -1
  57. package/dist/elements/preupgrade/tooltip.css +1 -1
  58. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  59. package/dist/elements/preupgrade.css +1 -1
  60. package/dist/styles/badge.css +1 -1
  61. package/dist/styles/base-lite.css +2 -2
  62. package/dist/styles/base.css +2 -2
  63. package/dist/styles/bottom-app-bar.css +1 -1
  64. package/dist/styles/bottom-sheet.css +1 -1
  65. package/dist/styles/button-group.css +1 -1
  66. package/dist/styles/button.css +1 -1
  67. package/dist/styles/card.css +2 -2
  68. package/dist/styles/carousel.css +1 -1
  69. package/dist/styles/checkbox.css +1 -1
  70. package/dist/styles/chips.css +1 -1
  71. package/dist/styles/contrast.css +2 -2
  72. package/dist/styles/datepicker.css +1 -1
  73. package/dist/styles/dialog.css +2 -2
  74. package/dist/styles/divider.css +1 -1
  75. package/dist/styles/drawer.css +1 -1
  76. package/dist/styles/extended-fab.css +1 -1
  77. package/dist/styles/fab-menu.css +1 -1
  78. package/dist/styles/fab.css +1 -1
  79. package/dist/styles/icon-button.css +1 -1
  80. package/dist/styles/list.css +1 -1
  81. package/dist/styles/loading-indicator.css +1 -1
  82. package/dist/styles/menu.css +2 -2
  83. package/dist/styles/navigation-bar.css +1 -1
  84. package/dist/styles/navigation-rail.css +1 -1
  85. package/dist/styles/progress.css +1 -1
  86. package/dist/styles/radios.css +1 -1
  87. package/dist/styles/search.css +1 -1
  88. package/dist/styles/select.css +2 -2
  89. package/dist/styles/side-sheet.css +1 -1
  90. package/dist/styles/slider.css +2 -2
  91. package/dist/styles/snackbar.css +1 -1
  92. package/dist/styles/split-button.css +1 -1
  93. package/dist/styles/switch.css +1 -1
  94. package/dist/styles/tabs.css +2 -2
  95. package/dist/styles/text-field.css +1 -1
  96. package/dist/styles/timepicker.css +2 -2
  97. package/dist/styles/toolbar.css +1 -1
  98. package/dist/styles/tooltip.css +1 -1
  99. package/dist/styles/top-app-bar.css +1 -1
  100. package/dist/styles/typography.css +1 -1
  101. package/dist/styles/utilities.css +1 -1
  102. package/dist/styles.css +2 -2
  103. package/dist/theme/image.d.ts +2 -0
  104. package/dist/theme/image.js +5 -0
  105. package/dist/theme/index.d.ts +23 -0
  106. package/dist/theme/index.js +32 -0
  107. package/dist/theme/roles.js +68 -0
  108. package/dist/theme/variants.d.ts +9 -0
  109. package/dist/theme/variants.js +17 -0
  110. package/dist/theme/vendor/contrast/contrast.js +72 -0
  111. package/dist/theme/vendor/dislike/dislike_analyzer.js +31 -0
  112. package/dist/theme/vendor/dynamiccolor/color_spec_2021.d.ts +63 -0
  113. package/dist/theme/vendor/dynamiccolor/color_spec_2021.js +663 -0
  114. package/dist/theme/vendor/dynamiccolor/contrast_curve.js +42 -0
  115. package/dist/theme/vendor/dynamiccolor/dynamic_color.d.ts +24 -0
  116. package/dist/theme/vendor/dynamiccolor/dynamic_color.js +264 -0
  117. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.d.ts +87 -0
  118. package/dist/theme/vendor/dynamiccolor/dynamic_scheme.js +418 -0
  119. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.d.ts +124 -0
  120. package/dist/theme/vendor/dynamiccolor/material_dynamic_colors.js +311 -0
  121. package/dist/theme/vendor/dynamiccolor/tone_delta_pair.js +27 -0
  122. package/dist/theme/vendor/dynamiccolor/variant.js +28 -0
  123. package/dist/theme/vendor/hct/cam16.js +249 -0
  124. package/dist/theme/vendor/hct/hct.d.ts +23 -0
  125. package/dist/theme/vendor/hct/hct.js +86 -0
  126. package/dist/theme/vendor/hct/hct_solver.js +390 -0
  127. package/dist/theme/vendor/hct/viewing_conditions.js +73 -0
  128. package/dist/theme/vendor/palettes/tonal_palette.js +114 -0
  129. package/dist/theme/vendor/quantize/lab_point_provider.js +31 -0
  130. package/dist/theme/vendor/quantize/quantizer_celebi.js +25 -0
  131. package/dist/theme/vendor/quantize/quantizer_map.js +31 -0
  132. package/dist/theme/vendor/quantize/quantizer_wsmeans.js +178 -0
  133. package/dist/theme/vendor/quantize/quantizer_wu.js +342 -0
  134. package/dist/theme/vendor/scheme/scheme_content.js +30 -0
  135. package/dist/theme/vendor/scheme/scheme_expressive.js +30 -0
  136. package/dist/theme/vendor/scheme/scheme_fidelity.js +30 -0
  137. package/dist/theme/vendor/scheme/scheme_monochrome.js +30 -0
  138. package/dist/theme/vendor/scheme/scheme_neutral.js +30 -0
  139. package/dist/theme/vendor/scheme/scheme_tonal_spot.js +30 -0
  140. package/dist/theme/vendor/scheme/scheme_vibrant.js +30 -0
  141. package/dist/theme/vendor/score/score.js +100 -0
  142. package/dist/theme/vendor/temperature/temperature_cache.js +198 -0
  143. package/dist/theme/vendor/utils/color_utils.js +173 -0
  144. package/dist/theme/vendor/utils/image_utils.js +72 -0
  145. package/dist/theme/vendor/utils/math_utils.js +75 -0
  146. package/dist/theme/vendor/utils/string_utils.js +61 -0
  147. package/dist/themes/autumn-contrast.css +2 -2
  148. package/dist/themes/autumn.css +2 -2
  149. package/dist/themes/baseline-contrast.css +2 -2
  150. package/dist/themes/baseline.css +2 -2
  151. package/dist/themes/brownbeige-contrast.css +2 -2
  152. package/dist/themes/brownbeige.css +2 -2
  153. package/dist/themes/content-contrast.css +2 -2
  154. package/dist/themes/content.css +2 -2
  155. package/dist/themes/desert-contrast.css +2 -2
  156. package/dist/themes/desert.css +2 -2
  157. package/dist/themes/expressive-contrast.css +2 -2
  158. package/dist/themes/expressive.css +2 -2
  159. package/dist/themes/fidelity-contrast.css +2 -2
  160. package/dist/themes/fidelity.css +2 -2
  161. package/dist/themes/forest-contrast.css +2 -2
  162. package/dist/themes/forest.css +2 -2
  163. package/dist/themes/fruit-salad-contrast.css +2 -2
  164. package/dist/themes/fruit-salad.css +2 -2
  165. package/dist/themes/highcontrast-contrast.css +2 -2
  166. package/dist/themes/highcontrast.css +2 -2
  167. package/dist/themes/monochrome-contrast.css +2 -2
  168. package/dist/themes/monochrome.css +2 -2
  169. package/dist/themes/neutral-contrast.css +2 -2
  170. package/dist/themes/neutral.css +2 -2
  171. package/dist/themes/ocean-contrast.css +2 -2
  172. package/dist/themes/ocean.css +2 -2
  173. package/dist/themes/rainbow-contrast.css +2 -2
  174. package/dist/themes/rainbow.css +2 -2
  175. package/dist/themes/sageivory-contrast.css +2 -2
  176. package/dist/themes/sageivory.css +2 -2
  177. package/dist/themes/spring-contrast.css +2 -2
  178. package/dist/themes/spring.css +2 -2
  179. package/dist/themes/summer-contrast.css +2 -2
  180. package/dist/themes/summer.css +2 -2
  181. package/dist/themes/sunset-contrast.css +2 -2
  182. package/dist/themes/sunset.css +2 -2
  183. package/dist/themes/tealcaramel-contrast.css +2 -2
  184. package/dist/themes/tealcaramel.css +2 -2
  185. package/dist/themes/vibrant-contrast.css +2 -2
  186. package/dist/themes/vibrant.css +2 -2
  187. package/package.json +15 -1
  188. package/src/styles/abstract/_base.scss +0 -1
  189. package/src/styles/abstract/_direction.scss +121 -152
  190. package/src/styles/abstract/_emit.scss +7 -16
  191. package/src/styles/abstract/_floating-placement.scss +9 -10
  192. package/src/styles/abstract/_functions.scss +64 -79
  193. package/src/styles/abstract/_mixins.scss +355 -459
  194. package/src/styles/abstract/_theme.scss +122 -136
  195. package/src/styles/abstract/_variables.scss +320 -390
  196. package/src/styles/abstract/chips/_assist.scss +2 -3
  197. package/src/styles/abstract/chips/_filter.scss +2 -3
  198. package/src/styles/abstract/chips/_input.scss +2 -3
  199. package/src/styles/abstract/chips/_suggestion.scss +2 -3
  200. package/src/styles/base/_body-theme.scss +10 -15
  201. package/src/styles/base/_document.scss +10 -33
  202. package/src/styles/base/_reset.scss +20 -40
  203. package/src/styles/base/_tokens.scss +6 -21
  204. package/src/styles/base/_typescale-tokens.scss +12 -16
  205. package/src/styles/base/_typography.scss +28 -37
  206. package/src/styles/components/_badge.scss +171 -193
  207. package/src/styles/components/_bottom-app-bar.scss +72 -90
  208. package/src/styles/components/_bottom-sheet.scss +188 -232
  209. package/src/styles/components/_button-group.scss +140 -189
  210. package/src/styles/components/_button.scss +382 -478
  211. package/src/styles/components/_card.scss +349 -473
  212. package/src/styles/components/_carousel.scss +134 -156
  213. package/src/styles/components/_checkbox.scss +208 -249
  214. package/src/styles/components/_chips.scss +239 -304
  215. package/src/styles/components/_datepicker.scss +172 -222
  216. package/src/styles/components/_dialog.scss +428 -553
  217. package/src/styles/components/_divider.scss +37 -46
  218. package/src/styles/components/_drawer.scss +571 -678
  219. package/src/styles/components/_extended-fab.scss +263 -294
  220. package/src/styles/components/_fab-menu.scss +225 -267
  221. package/src/styles/components/_fab.scss +197 -218
  222. package/src/styles/components/_icon-button.scss +483 -588
  223. package/src/styles/components/_list.scss +115 -144
  224. package/src/styles/components/_loading-indicator.scss +23 -29
  225. package/src/styles/components/_menu.scss +543 -699
  226. package/src/styles/components/_navigation-bar.scss +189 -234
  227. package/src/styles/components/_navigation-rail.scss +256 -312
  228. package/src/styles/components/_progress.scss +60 -85
  229. package/src/styles/components/_radios.scss +170 -207
  230. package/src/styles/components/_search.scss +369 -455
  231. package/src/styles/components/_select.scss +78 -185
  232. package/src/styles/components/_side-sheet.scss +234 -292
  233. package/src/styles/components/_slider.scss +289 -367
  234. package/src/styles/components/_snackbar.scss +149 -198
  235. package/src/styles/components/_split-button.scss +139 -228
  236. package/src/styles/components/_switch.scss +282 -349
  237. package/src/styles/components/_tabs.scss +350 -547
  238. package/src/styles/components/_text-field.scss +788 -980
  239. package/src/styles/components/_timepicker.scss +435 -506
  240. package/src/styles/components/_toolbar.scss +178 -242
  241. package/src/styles/components/_tooltip.scss +152 -197
  242. package/src/styles/components/_top-app-bar.scss +206 -230
  243. package/src/styles/elements/_badge.scss +42 -61
  244. package/src/styles/elements/_bottom-app-bar.scss +14 -20
  245. package/src/styles/elements/_bottom-sheet.scss +0 -3
  246. package/src/styles/elements/_button-group.scss +80 -80
  247. package/src/styles/elements/_button.scss +72 -88
  248. package/src/styles/elements/_card.scss +48 -57
  249. package/src/styles/elements/_carousel.scss +2 -5
  250. package/src/styles/elements/_checkbox.scss +32 -43
  251. package/src/styles/elements/_chips.scss +18 -22
  252. package/src/styles/elements/_config.scss +11 -26
  253. package/src/styles/elements/_datepicker.scss +17 -22
  254. package/src/styles/elements/_dialog.scss +0 -3
  255. package/src/styles/elements/_divider.scss +11 -13
  256. package/src/styles/elements/_drawer.scss +9 -14
  257. package/src/styles/elements/_extended-fab.scss +36 -40
  258. package/src/styles/elements/_fab-menu.scss +21 -25
  259. package/src/styles/elements/_fab.scss +17 -20
  260. package/src/styles/elements/_field.scss +93 -114
  261. package/src/styles/elements/_icon-button.scss +34 -38
  262. package/src/styles/elements/_index.scss +0 -4
  263. package/src/styles/elements/_list.scss +19 -26
  264. package/src/styles/elements/_loading-indicator.scss +6 -9
  265. package/src/styles/elements/_menu.scss +0 -3
  266. package/src/styles/elements/_navigation-bar.scss +5 -9
  267. package/src/styles/elements/_navigation-rail.scss +10 -15
  268. package/src/styles/elements/_progress.scss +15 -18
  269. package/src/styles/elements/_radios.scss +24 -49
  270. package/src/styles/elements/_search.scss +19 -24
  271. package/src/styles/elements/_select.scss +4 -9
  272. package/src/styles/elements/_side-sheet.scss +0 -3
  273. package/src/styles/elements/_slider.scss +15 -35
  274. package/src/styles/elements/_snackbar.scss +0 -3
  275. package/src/styles/elements/_split-button.scss +33 -39
  276. package/src/styles/elements/_switch.scss +50 -90
  277. package/src/styles/elements/_tabs.scss +9 -13
  278. package/src/styles/elements/_text-field.scss +150 -178
  279. package/src/styles/elements/_timepicker.scss +0 -3
  280. package/src/styles/elements/_toolbar.scss +30 -35
  281. package/src/styles/elements/_tooltip.scss +0 -3
  282. package/src/styles/elements/_top-app-bar.scss +38 -45
  283. package/src/styles/main.scss +0 -15
  284. package/src/styles/themes/_autumn.scss +258 -258
  285. package/src/styles/themes/_base-theme.scss +112 -134
  286. package/src/styles/themes/_baseline.scss +291 -314
  287. package/src/styles/themes/_brownbeige.scss +270 -250
  288. package/src/styles/themes/_content.scss +268 -248
  289. package/src/styles/themes/_desert.scss +270 -250
  290. package/src/styles/themes/_expressive.scss +270 -250
  291. package/src/styles/themes/_fidelity.scss +268 -248
  292. package/src/styles/themes/_forest.scss +260 -259
  293. package/src/styles/themes/_fruit-salad.scss +270 -250
  294. package/src/styles/themes/_highcontrast.scss +183 -172
  295. package/src/styles/themes/_index.scss +0 -1
  296. package/src/styles/themes/_monochrome.scss +254 -234
  297. package/src/styles/themes/_neutral.scss +270 -250
  298. package/src/styles/themes/_ocean.scss +260 -259
  299. package/src/styles/themes/_rainbow.scss +270 -250
  300. package/src/styles/themes/_sageivory.scss +270 -250
  301. package/src/styles/themes/_spring.scss +256 -255
  302. package/src/styles/themes/_summer.scss +270 -250
  303. package/src/styles/themes/_sunset.scss +260 -259
  304. package/src/styles/themes/_tealcaramel.scss +270 -250
  305. package/src/styles/themes/_vibrant.scss +270 -250
  306. package/src/styles/utilities/_colors.scss +44 -50
  307. package/src/styles/utilities/_flexbox.scss +48 -59
  308. package/src/styles/utilities/_layout.scss +516 -591
  309. package/src/styles/utilities/_ripple.scss +61 -70
  310. package/src/styles/utilities/_spacing.scss +120 -127
  311. package/src/styles/utilities/_typography.scss +45 -58
  312. package/src/styles/utilities/_visibility.scss +61 -76
  313. package/dist/package.json +0 -488
@@ -1,4 +1,3 @@
1
- // src/components/top-app-bar/_styles.scss
2
1
  @use 'sass:map';
3
2
  @use '../../styles/abstract/base' as base;
4
3
  @use '../../styles/abstract/variables' as v;
@@ -9,233 +8,210 @@
9
8
  $component: '#{base.$prefix}-top-app-bar';
10
9
 
11
10
  .#{$component} {
12
- // Core Properties
13
- position: absolute;
14
- top: 0;
15
- left: 0;
16
- right: 0;
17
- z-index: f.get-z-index('fixed');
18
- display: flex;
19
- align-items: center;
20
- width: 100%;
21
- // Without the base reset: the 16px side padding must stay inside the width.
22
- box-sizing: border-box;
23
- background-color: t.color('surface');
24
-
25
- // Default type (small) - 64dp height as per specs
26
- height: 64px;
27
- padding: 0 16px;
28
-
29
- // Apply transition for scroll behavior
30
- transition:
31
- box-shadow 0.3s ease-in-out,
32
- background-color 0.3s ease-in-out,
33
- height 0.3s ease-in-out;
34
-
35
- // Container for the headline
36
- &__headline {
37
- flex: 1;
38
- display: flex;
39
- align-items: center;
40
- @include m.typography('title-large');
41
- color: t.color('on-surface');
42
- margin: 0;
43
- padding: 0;
44
- white-space: nowrap;
45
- overflow: hidden;
46
- text-overflow: ellipsis;
47
- transition:
48
- font-size 0.3s ease-in-out,
49
- margin 0.3s ease-in-out,
50
- padding 0.3s ease-in-out;
51
- }
52
-
53
- // Leading section (usually navigation icon)
54
- &__leading {
55
- display: flex;
56
- align-items: center;
57
- margin-right: 24px;
58
- }
59
-
60
- // Trailing section (usually action icons)
61
- &__trailing {
62
- display: flex;
63
- align-items: center;
64
- gap: 8px;
65
- margin-left: auto;
66
- }
67
-
68
- // Center-aligned top app bar
69
- &--center {
70
- .#{$component}__headline {
71
- position: absolute;
72
- left: 50%;
73
- transform: translateX(-50%);
74
- text-align: center;
75
- flex: 0;
76
- }
77
- }
78
-
79
- // Medium top app bar - 112dp height
80
- &--medium {
81
- height: 112px;
82
- flex-direction: column;
83
- align-items: flex-start;
84
- justify-content: space-between;
85
- padding: 0;
86
-
87
- .#{$component}__row {
88
- display: flex;
89
- align-items: center;
90
- width: 100%;
91
- // Without the base reset: the row's 16px side padding must stay inside the width.
92
- box-sizing: border-box;
93
- padding: 0 16px;
94
-
95
- &:first-child {
96
- margin-top: 20px;
97
- }
98
- }
99
-
100
- .#{$component}__headline {
101
- margin-bottom: 24px;
102
- margin-left: 16px;
103
- @include m.typography('headline-small');
104
- }
105
- }
106
-
107
- // Large top app bar - 152dp height
108
- &--large {
109
- height: 152px;
110
- flex-direction: column;
111
- align-items: flex-start;
112
- justify-content: space-between;
113
- padding: 0;
114
-
115
- .#{$component}__row {
116
- display: flex;
117
- align-items: center;
118
- width: 100%;
119
- // Without the base reset: the row's 16px side padding must stay inside the width.
120
- box-sizing: border-box;
121
- padding: 0 16px;
122
-
123
- &:first-child {
124
- margin-top: 20px;
125
- }
126
- }
127
-
128
- .#{$component}__headline {
129
- margin-bottom: 28px;
130
- margin-left: 16px;
131
- @include m.typography('headline-medium');
132
- }
133
- }
134
-
135
- // States for on-scroll behavior
136
- &--scrolled {
137
- background-color: t.color('surface-container');
138
- @include m.elevation(1);
139
-
140
- // Compress medium and large variants to small on scroll if compressible
141
- &.#{$component}--medium.#{$component}--compressible,
142
- &.#{$component}--large.#{$component}--compressible {
143
- height: 64px;
144
- flex-direction: row;
145
- align-items: center;
146
- padding: 0 16px;
147
-
148
- .#{$component}__row {
149
- display: none;
150
- }
151
-
152
- .#{$component}__headline {
153
- margin: 0;
154
- @include m.typography('title-large');
155
- }
156
-
157
- // Fix for headline that is inside row in medium/large
158
- .#{$component}__row:nth-child(2) {
159
- display: flex;
160
- flex: 1;
161
- margin: 0;
162
- padding: 0;
163
- }
164
- }
165
- }
166
-
167
- // RTL Support
168
- @include m.rtl {
169
- .#{$component}__leading {
170
- margin-right: 0;
171
- margin-left: 24px;
172
- }
173
-
174
- .#{$component}__trailing {
175
- margin-left: 0;
176
- margin-right: auto;
177
- }
178
-
179
- }
180
-
181
- @include m.rtl-selector('.#{$component}--medium .#{$component}__headline') {
182
- margin-left: 0;
183
- margin-right: 16px;
184
- }
185
-
186
- @include m.rtl-selector('.#{$component}--large .#{$component}__headline') {
187
- margin-left: 0;
188
- margin-right: 16px;
189
- }
190
-
191
- @include m.rtl-selector('.#{$component}--center .#{$component}__headline') {
192
- left: auto;
193
- right: 50%;
194
- transform: translateX(50%);
195
- }
196
-
197
- // Mobile screen adjustments
198
- @media (max-width: map.get(v.$breakpoints, 'sm')) {
199
- // Reduce side padding slightly on small screens
200
- padding: 0 12px;
201
-
202
- .#{$component}__leading {
203
- margin-right: 16px;
204
- }
205
-
206
- // The narrow bar reduces the leading's end gap, not its start edges: the
207
- // direction rule has to be restated here, or this later rule wins over it.
208
- @include m.rtl {
209
- .#{$component}__leading {
210
- margin-right: 0;
211
- margin-left: 16px;
212
- }
213
- }
214
-
215
- .#{$component}__trailing {
216
- gap: 4px;
217
- }
218
-
219
- // Make icon buttons slightly smaller
220
- .#{$component}__leading,
221
- .#{$component}__trailing {
222
- button {
223
- padding: 8px;
224
- }
225
- }
226
- }
227
-
228
- // Reduced motion support
229
- @include m.reduced-motion {
230
- transition-duration: 0.01ms;
231
-
232
- .#{$component}__headline {
233
- transition-duration: 0.01ms;
234
- }
235
- }
236
-
237
- // High contrast mode support
238
- @include m.high-contrast {
239
- border-bottom: 1px solid currentColor;
240
- }
11
+ position: absolute;
12
+ top: 0;
13
+ left: 0;
14
+ right: 0;
15
+ z-index: f.get-z-index('fixed');
16
+ display: flex;
17
+ align-items: center;
18
+ width: 100%;
19
+ box-sizing: border-box;
20
+ background-color: t.color('surface');
21
+
22
+ height: 64px;
23
+ padding: 0 16px;
24
+
25
+ transition:
26
+ box-shadow 0.3s ease-in-out,
27
+ background-color 0.3s ease-in-out,
28
+ height 0.3s ease-in-out;
29
+
30
+ &__headline {
31
+ flex: 1;
32
+ display: flex;
33
+ align-items: center;
34
+ @include m.typography('title-large');
35
+ color: t.color('on-surface');
36
+ margin: 0;
37
+ padding: 0;
38
+ white-space: nowrap;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ transition:
42
+ font-size 0.3s ease-in-out,
43
+ margin 0.3s ease-in-out,
44
+ padding 0.3s ease-in-out;
45
+ }
46
+
47
+ &__leading {
48
+ display: flex;
49
+ align-items: center;
50
+ margin-right: 24px;
51
+ }
52
+
53
+ &__trailing {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 8px;
57
+ margin-left: auto;
58
+ }
59
+
60
+ &--center {
61
+ .#{$component}__headline {
62
+ position: absolute;
63
+ left: 50%;
64
+ transform: translateX(-50%);
65
+ text-align: center;
66
+ flex: 0;
67
+ }
68
+ }
69
+
70
+ &--medium {
71
+ height: 112px;
72
+ flex-direction: column;
73
+ align-items: flex-start;
74
+ justify-content: space-between;
75
+ padding: 0;
76
+
77
+ .#{$component}__row {
78
+ display: flex;
79
+ align-items: center;
80
+ width: 100%;
81
+ box-sizing: border-box;
82
+ padding: 0 16px;
83
+
84
+ &:first-child {
85
+ margin-top: 20px;
86
+ }
87
+ }
88
+
89
+ .#{$component}__headline {
90
+ margin-bottom: 24px;
91
+ margin-left: 16px;
92
+ @include m.typography('headline-small');
93
+ }
94
+ }
95
+
96
+ &--large {
97
+ height: 152px;
98
+ flex-direction: column;
99
+ align-items: flex-start;
100
+ justify-content: space-between;
101
+ padding: 0;
102
+
103
+ .#{$component}__row {
104
+ display: flex;
105
+ align-items: center;
106
+ width: 100%;
107
+ box-sizing: border-box;
108
+ padding: 0 16px;
109
+
110
+ &:first-child {
111
+ margin-top: 20px;
112
+ }
113
+ }
114
+
115
+ .#{$component}__headline {
116
+ margin-bottom: 28px;
117
+ margin-left: 16px;
118
+ @include m.typography('headline-medium');
119
+ }
120
+ }
121
+
122
+ &--scrolled {
123
+ background-color: t.color('surface-container');
124
+ @include m.elevation(1);
125
+
126
+ &.#{$component}--medium.#{$component}--compressible,
127
+ &.#{$component}--large.#{$component}--compressible {
128
+ height: 64px;
129
+ flex-direction: row;
130
+ align-items: center;
131
+ padding: 0 16px;
132
+
133
+ .#{$component}__row {
134
+ display: none;
135
+ }
136
+
137
+ .#{$component}__headline {
138
+ margin: 0;
139
+ @include m.typography('title-large');
140
+ }
141
+
142
+ .#{$component}__row:nth-child(2) {
143
+ display: flex;
144
+ flex: 1;
145
+ margin: 0;
146
+ padding: 0;
147
+ }
148
+ }
149
+ }
150
+
151
+ @include m.rtl {
152
+ .#{$component}__leading {
153
+ margin-right: 0;
154
+ margin-left: 24px;
155
+ }
156
+
157
+ .#{$component}__trailing {
158
+ margin-left: 0;
159
+ margin-right: auto;
160
+ }
161
+
162
+ }
163
+
164
+ @include m.rtl-selector('.#{$component}--medium .#{$component}__headline') {
165
+ margin-left: 0;
166
+ margin-right: 16px;
167
+ }
168
+
169
+ @include m.rtl-selector('.#{$component}--large .#{$component}__headline') {
170
+ margin-left: 0;
171
+ margin-right: 16px;
172
+ }
173
+
174
+ @include m.rtl-selector('.#{$component}--center .#{$component}__headline') {
175
+ left: auto;
176
+ right: 50%;
177
+ transform: translateX(50%);
178
+ }
179
+
180
+ @media (max-width: map.get(v.$breakpoints, 'sm')) {
181
+ padding: 0 12px;
182
+
183
+ .#{$component}__leading {
184
+ margin-right: 16px;
185
+ }
186
+
187
+ @include m.rtl {
188
+ .#{$component}__leading {
189
+ margin-right: 0;
190
+ margin-left: 16px;
191
+ }
192
+ }
193
+
194
+ .#{$component}__trailing {
195
+ gap: 4px;
196
+ }
197
+
198
+ .#{$component}__leading,
199
+ .#{$component}__trailing {
200
+ button {
201
+ padding: 8px;
202
+ }
203
+ }
204
+ }
205
+
206
+ @include m.reduced-motion {
207
+ transition-duration: 0.01ms;
208
+
209
+ .#{$component}__headline {
210
+ transition-duration: 0.01ms;
211
+ }
212
+ }
213
+
214
+ @include m.high-contrast {
215
+ border-bottom: 1px solid currentColor;
216
+ }
241
217
  }
@@ -1,73 +1,54 @@
1
- // src/styles/elements/_badge.scss
2
- // <m-badge> before upgrade: the badge itself. A standalone badge takes its
3
- // place in the flow (src/styles/components/_badge.scss), so the undefined host
4
- // is the large badge's 16dp box around its label -- drawn from the label
5
- // attribute, as the text field's pre-upgrade host draws its value -- or the
6
- // 6dp dot. An empty or zero large label hides on upgrade, so it reserves no
7
- // box before it either.
8
1
  @use '../abstract/variables' as v;
9
2
  @use '../abstract/theme' as t;
10
3
  @use 'config' as c;
11
4
 
12
- // As components/_badge.scss: the badge's colours, the default error above.
13
5
  $colors: ('primary', 'secondary', 'tertiary', 'success', 'warning', 'info');
14
6
 
15
7
  @include c.host('badge') {
16
- display: inline-flex;
17
- align-items: center;
18
- justify-content: center;
19
- box-sizing: border-box;
20
- vertical-align: middle;
21
- overflow: hidden;
22
- height: 16px;
23
- min-width: 16px;
24
- max-width: 34px; // the overflow badge's 16x34dp
25
- padding: 0 4px;
26
- border-radius: v.shape('full');
27
- font-weight: 500;
28
- font-size: 11px;
29
- line-height: 16px;
30
- background-color: t.color('error');
31
- color: t.color('on-error');
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ box-sizing: border-box;
12
+ vertical-align: middle;
13
+ overflow: hidden;
14
+ height: 16px;
15
+ min-width: 16px;
16
+ max-width: 34px;
17
+ padding: 0 4px;
18
+ border-radius: v.shape('full');
19
+ font-weight: 500;
20
+ font-size: 11px;
21
+ line-height: 16px;
22
+ background-color: t.color('error');
23
+ color: t.color('on-error');
32
24
 
33
- @each $color in $colors {
34
- &[color='#{$color}'] {
35
- background-color: t.color($color);
36
- color: t.color('on-#{$color}');
37
- }
38
- }
25
+ @each $color in $colors {
26
+ &[color='#{$color}'] {
27
+ background-color: t.color($color);
28
+ color: t.color('on-#{$color}');
29
+ }
30
+ }
39
31
 
40
- // The label the markup carries sets the box's width as it will set the
41
- // badge's on upgrade. With text inside the tag too, the text draws it: the
42
- // element reads the attribute and ignores the text, but CSS cannot hide the
43
- // text alone, so it must not be drawn twice. A label past the max
44
- // re-formats on upgrade ("1000" becomes "999+"), which CSS cannot repeat.
45
- &:empty[label]:not([label=''])::before {
46
- content: attr(label);
47
- }
32
+ &:empty[label]:not([label=''])::before {
33
+ content: attr(label);
34
+ }
48
35
 
49
- // Nothing to show: an empty or zero label hides the large badge on upgrade,
50
- // so it reserves no box. A whitespace-only text node is not matched here --
51
- // CSS cannot see it -- so `<m-badge> </m-badge>` (or the tag with a line
52
- // break inside) keeps the box before upgrade although the element then hides
53
- // the badge. Write the tag with nothing between its tags.
54
- &:not([variant='small']):is(:empty:not([label]), [label=''], [label='0']) {
55
- width: 0;
56
- height: 0;
57
- min-width: 0;
58
- max-width: none;
59
- padding: 0;
60
- font-size: 0;
61
- background-color: transparent;
62
- }
36
+ &:not([variant='small']):is(:empty:not([label]), [label=''], [label='0']) {
37
+ width: 0;
38
+ height: 0;
39
+ min-width: 0;
40
+ max-width: none;
41
+ padding: 0;
42
+ font-size: 0;
43
+ background-color: transparent;
44
+ }
63
45
 
64
- // The dot is its own box whether or not it carries a label, and shows it.
65
- &[variant='small'] {
66
- width: 6px;
67
- height: 6px;
68
- min-width: 6px;
69
- max-width: none;
70
- padding: 0;
71
- font-size: 0;
72
- }
46
+ &[variant='small'] {
47
+ width: 6px;
48
+ height: 6px;
49
+ min-width: 6px;
50
+ max-width: none;
51
+ padding: 0;
52
+ font-size: 0;
53
+ }
73
54
  }
@@ -1,27 +1,21 @@
1
- // src/styles/elements/_bottom-app-bar.scss
2
- // <m-bottom-app-bar> before upgrade: the bar, placed as the upgraded one is
3
- // (along the bottom of its positioned container), with its actions in a row
4
- // and the FAB at the end.
5
1
  @use '../abstract/functions' as f;
6
2
  @use '../abstract/theme' as t;
7
3
  @use 'config' as c;
8
4
 
9
- // As components/_bottom-app-bar.scss: 80px, padded 12px 16px 12px 4px,
10
- // actions 4px apart.
11
5
  @include c.host('bottom-app-bar') {
12
- position: absolute;
13
- bottom: 0;
14
- left: 0;
15
- right: 0;
16
- display: flex;
17
- align-items: center;
18
- gap: 4px;
19
- box-sizing: border-box;
20
- height: 80px;
21
- padding: 12px 16px 12px 4px;
22
- background-color: t.color('surface-container');
6
+ position: absolute;
7
+ bottom: 0;
8
+ left: 0;
9
+ right: 0;
10
+ display: flex;
11
+ align-items: center;
12
+ gap: 4px;
13
+ box-sizing: border-box;
14
+ height: 80px;
15
+ padding: 12px 16px 12px 4px;
16
+ background-color: t.color('surface-container');
23
17
 
24
- > [slot='fab'] {
25
- margin-left: auto;
26
- }
18
+ > [slot='fab'] {
19
+ margin-left: auto;
20
+ }
27
21
  }
@@ -1,6 +1,3 @@
1
- // src/styles/elements/_bottom-sheet.scss
2
- // <m-bottom-sheet> before upgrade: nothing. It opens in the top layer once upgraded,
3
- // and reserves no space in the page.
4
1
  @use 'config' as c;
5
2
 
6
3
  @include c.overlay('bottom-sheet');