material 3.7.2 → 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 (264) hide show
  1. package/README.md +2 -2
  2. package/dist/components/slider/features/controller.js +24 -8
  3. package/dist/elements/css/card.css +1 -1
  4. package/dist/elements/css/card.js +1 -1
  5. package/dist/elements/css/dialog.css +1 -1
  6. package/dist/elements/css/dialog.js +1 -1
  7. package/dist/elements/css/menu.css +1 -1
  8. package/dist/elements/css/menu.js +1 -1
  9. package/dist/elements/css/select.css +1 -1
  10. package/dist/elements/css/select.js +1 -1
  11. package/dist/elements/css/slider.css +1 -1
  12. package/dist/elements/css/slider.js +1 -1
  13. package/dist/elements/css/tabs.css +1 -1
  14. package/dist/elements/css/tabs.js +1 -1
  15. package/dist/elements/css/timepicker.css +1 -1
  16. package/dist/elements/css/timepicker.js +1 -1
  17. package/dist/elements/preupgrade/badge.css +1 -1
  18. package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
  19. package/dist/elements/preupgrade/bottom-sheet.css +1 -1
  20. package/dist/elements/preupgrade/button-group.css +1 -1
  21. package/dist/elements/preupgrade/button.css +1 -1
  22. package/dist/elements/preupgrade/card.css +1 -1
  23. package/dist/elements/preupgrade/carousel.css +1 -1
  24. package/dist/elements/preupgrade/checkbox.css +1 -1
  25. package/dist/elements/preupgrade/chips.css +1 -1
  26. package/dist/elements/preupgrade/datepicker.css +1 -1
  27. package/dist/elements/preupgrade/dialog.css +1 -1
  28. package/dist/elements/preupgrade/divider.css +1 -1
  29. package/dist/elements/preupgrade/drawer.css +1 -1
  30. package/dist/elements/preupgrade/extended-fab.css +1 -1
  31. package/dist/elements/preupgrade/fab-menu.css +1 -1
  32. package/dist/elements/preupgrade/fab.css +1 -1
  33. package/dist/elements/preupgrade/icon-button.css +1 -1
  34. package/dist/elements/preupgrade/list.css +1 -1
  35. package/dist/elements/preupgrade/loading-indicator.css +1 -1
  36. package/dist/elements/preupgrade/menu.css +1 -1
  37. package/dist/elements/preupgrade/navigation-bar.css +1 -1
  38. package/dist/elements/preupgrade/navigation-rail.css +1 -1
  39. package/dist/elements/preupgrade/progress.css +1 -1
  40. package/dist/elements/preupgrade/radios.css +1 -1
  41. package/dist/elements/preupgrade/search.css +1 -1
  42. package/dist/elements/preupgrade/select.css +1 -1
  43. package/dist/elements/preupgrade/side-sheet.css +1 -1
  44. package/dist/elements/preupgrade/slider.css +1 -1
  45. package/dist/elements/preupgrade/snackbar.css +1 -1
  46. package/dist/elements/preupgrade/split-button.css +1 -1
  47. package/dist/elements/preupgrade/switch.css +1 -1
  48. package/dist/elements/preupgrade/tabs.css +1 -1
  49. package/dist/elements/preupgrade/text-field.css +1 -1
  50. package/dist/elements/preupgrade/timepicker.css +1 -1
  51. package/dist/elements/preupgrade/toolbar.css +1 -1
  52. package/dist/elements/preupgrade/tooltip.css +1 -1
  53. package/dist/elements/preupgrade/top-app-bar.css +1 -1
  54. package/dist/elements/preupgrade.css +1 -1
  55. package/dist/styles/badge.css +1 -1
  56. package/dist/styles/base-lite.css +1 -1
  57. package/dist/styles/base.css +1 -1
  58. package/dist/styles/bottom-app-bar.css +1 -1
  59. package/dist/styles/bottom-sheet.css +1 -1
  60. package/dist/styles/button-group.css +1 -1
  61. package/dist/styles/button.css +1 -1
  62. package/dist/styles/card.css +2 -2
  63. package/dist/styles/carousel.css +1 -1
  64. package/dist/styles/checkbox.css +1 -1
  65. package/dist/styles/chips.css +1 -1
  66. package/dist/styles/contrast.css +1 -1
  67. package/dist/styles/datepicker.css +1 -1
  68. package/dist/styles/dialog.css +2 -2
  69. package/dist/styles/divider.css +1 -1
  70. package/dist/styles/drawer.css +1 -1
  71. package/dist/styles/extended-fab.css +1 -1
  72. package/dist/styles/fab-menu.css +1 -1
  73. package/dist/styles/fab.css +1 -1
  74. package/dist/styles/icon-button.css +1 -1
  75. package/dist/styles/list.css +1 -1
  76. package/dist/styles/loading-indicator.css +1 -1
  77. package/dist/styles/menu.css +2 -2
  78. package/dist/styles/navigation-bar.css +1 -1
  79. package/dist/styles/navigation-rail.css +1 -1
  80. package/dist/styles/progress.css +1 -1
  81. package/dist/styles/radios.css +1 -1
  82. package/dist/styles/search.css +1 -1
  83. package/dist/styles/select.css +2 -2
  84. package/dist/styles/side-sheet.css +1 -1
  85. package/dist/styles/slider.css +2 -2
  86. package/dist/styles/snackbar.css +1 -1
  87. package/dist/styles/split-button.css +1 -1
  88. package/dist/styles/switch.css +1 -1
  89. package/dist/styles/tabs.css +2 -2
  90. package/dist/styles/text-field.css +1 -1
  91. package/dist/styles/timepicker.css +2 -2
  92. package/dist/styles/toolbar.css +1 -1
  93. package/dist/styles/tooltip.css +1 -1
  94. package/dist/styles/top-app-bar.css +1 -1
  95. package/dist/styles/typography.css +1 -1
  96. package/dist/styles/utilities.css +1 -1
  97. package/dist/styles.css +2 -2
  98. package/dist/themes/autumn-contrast.css +1 -1
  99. package/dist/themes/autumn.css +1 -1
  100. package/dist/themes/baseline-contrast.css +1 -1
  101. package/dist/themes/baseline.css +1 -1
  102. package/dist/themes/brownbeige-contrast.css +1 -1
  103. package/dist/themes/brownbeige.css +1 -1
  104. package/dist/themes/content-contrast.css +1 -1
  105. package/dist/themes/content.css +1 -1
  106. package/dist/themes/desert-contrast.css +1 -1
  107. package/dist/themes/desert.css +1 -1
  108. package/dist/themes/expressive-contrast.css +1 -1
  109. package/dist/themes/expressive.css +1 -1
  110. package/dist/themes/fidelity-contrast.css +1 -1
  111. package/dist/themes/fidelity.css +1 -1
  112. package/dist/themes/forest-contrast.css +1 -1
  113. package/dist/themes/forest.css +1 -1
  114. package/dist/themes/fruit-salad-contrast.css +1 -1
  115. package/dist/themes/fruit-salad.css +1 -1
  116. package/dist/themes/highcontrast-contrast.css +1 -1
  117. package/dist/themes/highcontrast.css +1 -1
  118. package/dist/themes/monochrome-contrast.css +1 -1
  119. package/dist/themes/monochrome.css +1 -1
  120. package/dist/themes/neutral-contrast.css +1 -1
  121. package/dist/themes/neutral.css +1 -1
  122. package/dist/themes/ocean-contrast.css +1 -1
  123. package/dist/themes/ocean.css +1 -1
  124. package/dist/themes/rainbow-contrast.css +1 -1
  125. package/dist/themes/rainbow.css +1 -1
  126. package/dist/themes/sageivory-contrast.css +1 -1
  127. package/dist/themes/sageivory.css +1 -1
  128. package/dist/themes/spring-contrast.css +1 -1
  129. package/dist/themes/spring.css +1 -1
  130. package/dist/themes/summer-contrast.css +1 -1
  131. package/dist/themes/summer.css +1 -1
  132. package/dist/themes/sunset-contrast.css +1 -1
  133. package/dist/themes/sunset.css +1 -1
  134. package/dist/themes/tealcaramel-contrast.css +1 -1
  135. package/dist/themes/tealcaramel.css +1 -1
  136. package/dist/themes/vibrant-contrast.css +1 -1
  137. package/dist/themes/vibrant.css +1 -1
  138. package/package.json +2 -1
  139. package/src/styles/abstract/_base.scss +0 -1
  140. package/src/styles/abstract/_direction.scss +121 -152
  141. package/src/styles/abstract/_emit.scss +7 -16
  142. package/src/styles/abstract/_floating-placement.scss +9 -10
  143. package/src/styles/abstract/_functions.scss +64 -79
  144. package/src/styles/abstract/_mixins.scss +355 -459
  145. package/src/styles/abstract/_theme.scss +122 -136
  146. package/src/styles/abstract/_variables.scss +320 -390
  147. package/src/styles/abstract/chips/_assist.scss +2 -3
  148. package/src/styles/abstract/chips/_filter.scss +2 -3
  149. package/src/styles/abstract/chips/_input.scss +2 -3
  150. package/src/styles/abstract/chips/_suggestion.scss +2 -3
  151. package/src/styles/base/_body-theme.scss +10 -15
  152. package/src/styles/base/_document.scss +10 -33
  153. package/src/styles/base/_reset.scss +20 -40
  154. package/src/styles/base/_tokens.scss +6 -21
  155. package/src/styles/base/_typescale-tokens.scss +12 -16
  156. package/src/styles/base/_typography.scss +28 -37
  157. package/src/styles/components/_badge.scss +171 -193
  158. package/src/styles/components/_bottom-app-bar.scss +72 -90
  159. package/src/styles/components/_bottom-sheet.scss +188 -232
  160. package/src/styles/components/_button-group.scss +140 -189
  161. package/src/styles/components/_button.scss +382 -478
  162. package/src/styles/components/_card.scss +349 -473
  163. package/src/styles/components/_carousel.scss +134 -156
  164. package/src/styles/components/_checkbox.scss +208 -249
  165. package/src/styles/components/_chips.scss +239 -304
  166. package/src/styles/components/_datepicker.scss +172 -222
  167. package/src/styles/components/_dialog.scss +428 -553
  168. package/src/styles/components/_divider.scss +37 -46
  169. package/src/styles/components/_drawer.scss +571 -678
  170. package/src/styles/components/_extended-fab.scss +263 -294
  171. package/src/styles/components/_fab-menu.scss +225 -267
  172. package/src/styles/components/_fab.scss +197 -218
  173. package/src/styles/components/_icon-button.scss +483 -588
  174. package/src/styles/components/_list.scss +115 -144
  175. package/src/styles/components/_loading-indicator.scss +23 -29
  176. package/src/styles/components/_menu.scss +543 -699
  177. package/src/styles/components/_navigation-bar.scss +189 -234
  178. package/src/styles/components/_navigation-rail.scss +256 -312
  179. package/src/styles/components/_progress.scss +60 -85
  180. package/src/styles/components/_radios.scss +170 -207
  181. package/src/styles/components/_search.scss +369 -455
  182. package/src/styles/components/_select.scss +78 -185
  183. package/src/styles/components/_side-sheet.scss +234 -292
  184. package/src/styles/components/_slider.scss +289 -367
  185. package/src/styles/components/_snackbar.scss +149 -198
  186. package/src/styles/components/_split-button.scss +139 -228
  187. package/src/styles/components/_switch.scss +282 -349
  188. package/src/styles/components/_tabs.scss +350 -547
  189. package/src/styles/components/_text-field.scss +788 -980
  190. package/src/styles/components/_timepicker.scss +435 -506
  191. package/src/styles/components/_toolbar.scss +178 -242
  192. package/src/styles/components/_tooltip.scss +152 -197
  193. package/src/styles/components/_top-app-bar.scss +206 -230
  194. package/src/styles/elements/_badge.scss +42 -61
  195. package/src/styles/elements/_bottom-app-bar.scss +14 -20
  196. package/src/styles/elements/_bottom-sheet.scss +0 -3
  197. package/src/styles/elements/_button-group.scss +80 -80
  198. package/src/styles/elements/_button.scss +72 -88
  199. package/src/styles/elements/_card.scss +48 -57
  200. package/src/styles/elements/_carousel.scss +2 -5
  201. package/src/styles/elements/_checkbox.scss +32 -43
  202. package/src/styles/elements/_chips.scss +18 -22
  203. package/src/styles/elements/_config.scss +11 -26
  204. package/src/styles/elements/_datepicker.scss +17 -22
  205. package/src/styles/elements/_dialog.scss +0 -3
  206. package/src/styles/elements/_divider.scss +11 -13
  207. package/src/styles/elements/_drawer.scss +9 -14
  208. package/src/styles/elements/_extended-fab.scss +36 -40
  209. package/src/styles/elements/_fab-menu.scss +21 -25
  210. package/src/styles/elements/_fab.scss +17 -20
  211. package/src/styles/elements/_field.scss +93 -114
  212. package/src/styles/elements/_icon-button.scss +34 -38
  213. package/src/styles/elements/_index.scss +0 -4
  214. package/src/styles/elements/_list.scss +19 -26
  215. package/src/styles/elements/_loading-indicator.scss +6 -9
  216. package/src/styles/elements/_menu.scss +0 -3
  217. package/src/styles/elements/_navigation-bar.scss +5 -9
  218. package/src/styles/elements/_navigation-rail.scss +10 -15
  219. package/src/styles/elements/_progress.scss +15 -18
  220. package/src/styles/elements/_radios.scss +24 -49
  221. package/src/styles/elements/_search.scss +19 -24
  222. package/src/styles/elements/_select.scss +4 -9
  223. package/src/styles/elements/_side-sheet.scss +0 -3
  224. package/src/styles/elements/_slider.scss +15 -35
  225. package/src/styles/elements/_snackbar.scss +0 -3
  226. package/src/styles/elements/_split-button.scss +33 -39
  227. package/src/styles/elements/_switch.scss +50 -90
  228. package/src/styles/elements/_tabs.scss +9 -13
  229. package/src/styles/elements/_text-field.scss +150 -178
  230. package/src/styles/elements/_timepicker.scss +0 -3
  231. package/src/styles/elements/_toolbar.scss +30 -35
  232. package/src/styles/elements/_tooltip.scss +0 -3
  233. package/src/styles/elements/_top-app-bar.scss +38 -45
  234. package/src/styles/main.scss +0 -15
  235. package/src/styles/themes/_autumn.scss +240 -258
  236. package/src/styles/themes/_base-theme.scss +96 -128
  237. package/src/styles/themes/_baseline.scss +273 -314
  238. package/src/styles/themes/_brownbeige.scss +242 -250
  239. package/src/styles/themes/_content.scss +240 -248
  240. package/src/styles/themes/_desert.scss +242 -250
  241. package/src/styles/themes/_expressive.scss +242 -250
  242. package/src/styles/themes/_fidelity.scss +240 -248
  243. package/src/styles/themes/_forest.scss +242 -259
  244. package/src/styles/themes/_fruit-salad.scss +242 -250
  245. package/src/styles/themes/_highcontrast.scss +164 -172
  246. package/src/styles/themes/_index.scss +0 -1
  247. package/src/styles/themes/_monochrome.scss +226 -234
  248. package/src/styles/themes/_neutral.scss +242 -250
  249. package/src/styles/themes/_ocean.scss +242 -259
  250. package/src/styles/themes/_rainbow.scss +242 -250
  251. package/src/styles/themes/_sageivory.scss +242 -250
  252. package/src/styles/themes/_spring.scss +238 -255
  253. package/src/styles/themes/_summer.scss +242 -250
  254. package/src/styles/themes/_sunset.scss +242 -259
  255. package/src/styles/themes/_tealcaramel.scss +242 -250
  256. package/src/styles/themes/_vibrant.scss +242 -250
  257. package/src/styles/utilities/_colors.scss +44 -50
  258. package/src/styles/utilities/_flexbox.scss +48 -59
  259. package/src/styles/utilities/_layout.scss +516 -591
  260. package/src/styles/utilities/_ripple.scss +61 -70
  261. package/src/styles/utilities/_spacing.scss +120 -127
  262. package/src/styles/utilities/_typography.scss +45 -58
  263. package/src/styles/utilities/_visibility.scss +61 -76
  264. package/dist/package.json +0 -488
@@ -1,6 +1,3 @@
1
- // src/styles/components/_search.scss
2
- // Material Design 3 Search Component Styles
3
- // Implements MD3 Search Bar and Search View specifications
4
1
 
5
2
  @use "../abstract/base" as base;
6
3
  @use "../abstract/variables" as v;
@@ -9,14 +6,8 @@
9
6
 
10
7
  $component: "#{base.$prefix}-search";
11
8
 
12
- // ============================================================================
13
- // MD3 Design Tokens
14
- // ============================================================================
15
9
 
16
10
  $bar-height: 56px;
17
- // SearchBarTokens.ContainerShape is CornerFull. Half the height, so the
18
- // radius animates to the view's corners; min() keeps a theme's full corner
19
- // in charge when it is smaller.
20
11
  $bar-shape: min(var(--#{base.$prefix}-sys-shape-corner-full, 9999px), calc(#{$bar-height} / 2));
21
12
  $bar-min-width: 360px;
22
13
  $bar-max-width: 720px;
@@ -34,542 +25,465 @@ $avatar-size: 30px;
34
25
  $transition-duration: 200ms;
35
26
  $transition-easing: cubic-bezier(0.2, 0, 0, 1);
36
27
 
37
- // ============================================================================
38
- // Root Element
39
- // ============================================================================
40
28
 
41
- // The surface is a <dialog>: the browser's dialog box is reset, and closed it
42
- // still shows, as the bar.
43
29
  .#{$component} .#{$component}__surface {
44
- position: static;
45
- display: flex;
46
- flex-direction: column;
47
- box-sizing: border-box;
48
- width: auto;
49
- height: auto;
50
- max-width: none;
51
- max-height: none;
52
- margin: 0;
53
- padding: 0;
54
- border: 0;
55
- color: inherit;
56
- background: transparent;
57
- overflow: visible;
58
- }
59
-
60
- // The root keeps the bar's place in the page. While the view is open, the bar
61
- // and its results show in the top layer as one surface, placed over it
62
- // A docked view no longer pushes the page down, and a full-screen
63
- // search no longer covers the page while it is a bar.
30
+ position: static;
31
+ display: flex;
32
+ flex-direction: column;
33
+ box-sizing: border-box;
34
+ width: auto;
35
+ height: auto;
36
+ max-width: none;
37
+ max-height: none;
38
+ margin: 0;
39
+ padding: 0;
40
+ border: 0;
41
+ color: inherit;
42
+ background: transparent;
43
+ overflow: visible;
44
+ }
45
+
64
46
  .#{$component} {
65
- position: relative;
66
- display: flex;
67
- flex-direction: column;
68
- width: 100%;
69
- min-width: var(--#{$component}-min-width, #{$bar-min-width});
70
- max-width: var(--#{$component}-max-width, #{$bar-max-width});
71
- background-color: transparent;
72
-
73
- // ========================================================================
74
- // State Modifiers
75
- // ========================================================================
76
-
77
- // Bar state (collapsed) - default
78
- &--bar {
79
- .#{$component}__container {
80
- border-radius: $bar-shape;
81
- height: $bar-height;
82
- }
83
-
84
- // Hide content area in bar state
85
- .#{$component}__divider,
86
- .#{$component}__content {
87
- display: none;
88
- }
89
- }
90
-
91
- // View state (expanded): the bar's height stays in the page.
92
- &--view {
93
- height: $bar-height;
94
-
95
- .#{$component}__container {
96
- border-radius: v.shape("extra-large") v.shape("extra-large") 0 0;
97
- }
98
-
99
- .#{$component}__divider,
100
- .#{$component}__content {
101
- display: block;
102
- }
103
-
104
- // Out of the page: in the top layer where there is one, fixed above the
105
- // page where there is not.
106
- .#{$component}__surface {
107
- position: fixed;
108
- z-index: 1000;
109
- }
110
- }
111
-
112
- // ========================================================================
113
- // View Mode Modifiers
114
- // ========================================================================
115
-
116
- // Docked: under the bar, its width, over a scrim.
117
- &--docked.#{$component}--view {
118
- .#{$component}__surface {
119
- inset: var(--#{$component}-top) auto auto var(--#{$component}-left);
120
- width: var(--#{$component}-width);
121
- height: auto;
122
-
123
- &::backdrop {
124
- background: t.alpha("scrim", 0.32);
125
- }
126
- }
127
-
128
- .#{$component}__container {
129
- height: $view-docked-header-height;
130
- }
131
-
132
- .#{$component}__content {
133
- min-height: $view-docked-min-height;
134
- max-height: calc(66.67vh - #{$view-docked-header-height});
135
- border-radius: 0 0 v.shape("extra-large") v.shape("extra-large");
136
- }
137
- }
138
-
139
- // Full screen: the viewport, only while the view is open.
140
- &--fullscreen {
141
- &.#{$component}--view {
142
- .#{$component}__surface {
143
- inset: 0;
144
- width: 100%;
145
- height: 100%;
146
- max-width: none;
147
- max-height: none;
148
- display: flex;
149
- flex-direction: column;
150
- background-color: t.color("surface-container-high");
151
-
152
- &::backdrop {
153
- background: transparent;
154
- }
155
- }
156
-
157
- .#{$component}__container {
158
- height: $view-fullscreen-header-height;
159
- border-radius: 0;
160
- }
161
-
162
- .#{$component}__content {
163
- flex: 1;
164
- max-height: none;
165
- border-radius: 0;
166
- }
167
- }
168
- }
169
-
170
- // ========================================================================
171
- // Interactive State Modifiers
172
- // ========================================================================
173
-
174
- &--disabled {
175
- pointer-events: none;
176
-
177
- .#{$component}__container {
178
- opacity: 0.38;
179
- }
180
- }
181
-
182
- &--full-width {
183
- min-width: 0;
184
- max-width: none;
185
- }
186
- }
187
-
188
-
189
- // ============================================================================
190
- // Styles
191
- // ============================================================================
192
-
193
- // The rules above draw the divided style, the baseline: the bar squares off
194
- // when focused and a divider separates the results. Contained, M3 Expressive's
195
- // recommended style and the default, keeps the bar's pill and filled container,
196
- // and gives the results their own container: docked 2dp below the bar with
197
- // 12dp corners (Compose dockedDropdownShape, dockedDropdownGapSize), full
198
- // screen on surface-container-low with the bar inset 12dp.
47
+ position: relative;
48
+ display: flex;
49
+ flex-direction: column;
50
+ width: 100%;
51
+ min-width: var(--#{$component}-min-width, #{$bar-min-width});
52
+ max-width: var(--#{$component}-max-width, #{$bar-max-width});
53
+ background-color: transparent;
54
+
55
+
56
+ &--bar {
57
+ .#{$component}__container {
58
+ border-radius: $bar-shape;
59
+ height: $bar-height;
60
+ }
61
+
62
+ .#{$component}__divider,
63
+ .#{$component}__content {
64
+ display: none;
65
+ }
66
+ }
67
+
68
+ &--view {
69
+ height: $bar-height;
70
+
71
+ .#{$component}__container {
72
+ border-radius: v.shape("extra-large") v.shape("extra-large") 0 0;
73
+ }
74
+
75
+ .#{$component}__divider,
76
+ .#{$component}__content {
77
+ display: block;
78
+ }
79
+
80
+ .#{$component}__surface {
81
+ position: fixed;
82
+ z-index: 1000;
83
+ }
84
+ }
85
+
86
+
87
+ &--docked.#{$component}--view {
88
+ .#{$component}__surface {
89
+ inset: var(--#{$component}-top) auto auto var(--#{$component}-left);
90
+ width: var(--#{$component}-width);
91
+ height: auto;
92
+
93
+ &::backdrop {
94
+ background: t.alpha("scrim", 0.32);
95
+ }
96
+ }
97
+
98
+ .#{$component}__container {
99
+ height: $view-docked-header-height;
100
+ }
101
+
102
+ .#{$component}__content {
103
+ min-height: $view-docked-min-height;
104
+ max-height: calc(66.67vh - #{$view-docked-header-height});
105
+ border-radius: 0 0 v.shape("extra-large") v.shape("extra-large");
106
+ }
107
+ }
108
+
109
+ &--fullscreen {
110
+ &.#{$component}--view {
111
+ .#{$component}__surface {
112
+ inset: 0;
113
+ width: 100%;
114
+ height: 100%;
115
+ max-width: none;
116
+ max-height: none;
117
+ display: flex;
118
+ flex-direction: column;
119
+ background-color: t.color("surface-container-high");
120
+
121
+ &::backdrop {
122
+ background: transparent;
123
+ }
124
+ }
125
+
126
+ .#{$component}__container {
127
+ height: $view-fullscreen-header-height;
128
+ border-radius: 0;
129
+ }
130
+
131
+ .#{$component}__content {
132
+ flex: 1;
133
+ max-height: none;
134
+ border-radius: 0;
135
+ }
136
+ }
137
+ }
138
+
139
+
140
+ &--disabled {
141
+ pointer-events: none;
142
+
143
+ .#{$component}__container {
144
+ opacity: 0.38;
145
+ }
146
+ }
147
+
148
+ &--full-width {
149
+ min-width: 0;
150
+ max-width: none;
151
+ }
152
+ }
153
+
154
+
155
+
199
156
  @mixin contained-fullscreen {
200
- .#{$component}__surface {
201
- box-sizing: border-box;
202
- padding: 12px;
203
- background-color: t.color("surface-container-low");
204
- }
157
+ .#{$component}__surface {
158
+ box-sizing: border-box;
159
+ padding: 12px;
160
+ background-color: t.color("surface-container-low");
161
+ }
205
162
 
206
- .#{$component}__container {
207
- height: $bar-height;
208
- border-radius: $bar-shape;
209
- }
163
+ .#{$component}__container {
164
+ height: $bar-height;
165
+ border-radius: $bar-shape;
166
+ }
210
167
 
211
- .#{$component}__content {
212
- margin-top: 8px;
213
- background-color: transparent;
214
- border-radius: 0;
215
- }
168
+ .#{$component}__content {
169
+ margin-top: 8px;
170
+ background-color: transparent;
171
+ border-radius: 0;
172
+ }
216
173
  }
217
174
 
218
175
  .#{$component}--contained.#{$component}--view {
219
- .#{$component}__container {
220
- border-radius: $bar-shape;
221
- }
176
+ .#{$component}__container {
177
+ border-radius: $bar-shape;
178
+ }
222
179
 
223
- .#{$component}__divider {
224
- display: none;
225
- }
180
+ .#{$component}__divider {
181
+ display: none;
182
+ }
226
183
  }
227
184
 
228
185
  .#{$component}--contained.#{$component}--docked.#{$component}--view {
229
- .#{$component}__content {
230
- margin-top: 2px;
231
- // On the scale; no token names the contained docked view's content corner
232
- border-radius: v.shape('medium');
233
- }
186
+ .#{$component}__content {
187
+ margin-top: 2px;
188
+ border-radius: v.shape('medium');
189
+ }
234
190
  }
235
191
 
236
192
  .#{$component}--contained.#{$component}--fullscreen.#{$component}--view {
237
- @include contained-fullscreen;
193
+ @include contained-fullscreen;
238
194
  }
239
195
 
240
- // The results reveal on the emphasized decelerate curve (the
241
- // --expanding and --collapsing classes were never driven, and are gone).
242
196
  .#{$component}--view .#{$component}__content {
243
- animation: #{$component}-reveal v.motion("duration-medium2") v.motion("easing-emphasized-decelerate");
197
+ animation: #{$component}-reveal v.motion("duration-medium2") v.motion("easing-emphasized-decelerate");
244
198
  }
245
199
 
246
200
  @keyframes #{$component}-reveal {
247
- from {
248
- opacity: 0;
249
- transform: translateY(-8px);
250
- }
201
+ from {
202
+ opacity: 0;
203
+ transform: translateY(-8px);
204
+ }
251
205
  }
252
206
 
253
207
  @media (prefers-reduced-motion: reduce) {
254
- .#{$component}--view .#{$component}__content {
255
- animation: none;
256
- }
208
+ .#{$component}--view .#{$component}__content {
209
+ animation: none;
210
+ }
257
211
  }
258
212
 
259
- // ============================================================================
260
- // Container (Header/Bar area)
261
- // ============================================================================
262
213
 
263
- // Icons sit in 48dp tap targets 4dp from the ends, so an icon's centre is 28dp
264
- // in and the text starts 4dp after the leading target: 56dp, as M3 measures.
265
214
  .#{$component}__container {
266
- position: relative;
267
- display: flex;
268
- align-items: center;
269
- height: $bar-height;
270
- padding: 0 4px;
271
- background-color: t.color("surface-container-high");
272
- transition:
273
- background-color $transition-duration $transition-easing,
274
- border-radius $transition-duration $transition-easing,
275
- height $transition-duration $transition-easing;
276
- }
277
-
278
- // The bar's hover state layer: on-surface at 8%.
215
+ position: relative;
216
+ display: flex;
217
+ align-items: center;
218
+ height: $bar-height;
219
+ padding: 0 4px;
220
+ background-color: t.color("surface-container-high");
221
+ transition:
222
+ background-color $transition-duration $transition-easing,
223
+ border-radius $transition-duration $transition-easing,
224
+ height $transition-duration $transition-easing;
225
+ }
226
+
279
227
  .#{$component}--bar:not(.#{$component}--disabled) .#{$component}__container:hover {
280
- background-color: color-mix(in srgb, #{t.color("on-surface")} 8%, #{t.color("surface-container-high")});
228
+ background-color: color-mix(in srgb, #{t.color("on-surface")} 8%, #{t.color("surface-container-high")});
281
229
  }
282
230
 
283
- // ============================================================================
284
- // Icon buttons: leading, clear, trailing
285
- // ============================================================================
286
231
 
287
- // 48dp tap targets around 24dp icons (they were 24dp buttons), with
288
- // state layers in their icon colour and md.comp.focus-ring.
289
232
  .#{$component}__leading-icon,
290
233
  .#{$component}__clear-button,
291
234
  .#{$component}__trailing-icon {
292
- --#{$component}-layer: 0%;
293
- display: flex;
294
- align-items: center;
295
- justify-content: center;
296
- flex-shrink: 0;
297
- width: 48px;
298
- height: 48px;
299
- margin: 0;
300
- padding: 0;
301
- border: none;
302
- border-radius: 50%;
303
- // A shadow root does not get the page's font reset.
304
- font: inherit;
305
- background-color: color-mix(in srgb, currentColor var(--#{$component}-layer), transparent);
306
- cursor: pointer;
307
- transition: background-color $transition-duration $transition-easing;
308
-
309
- svg {
310
- width: $icon-size;
311
- height: $icon-size;
312
- fill: currentColor;
313
- }
314
-
315
- &:hover { --#{$component}-layer: 8%; }
316
- &:focus-visible, &:active { --#{$component}-layer: 10%; }
317
- &:focus { outline: none; }
318
- &:focus-visible { outline: 3px solid t.color("secondary"); outline-offset: 2px; }
319
-
320
- &[aria-disabled="true"] {
321
- cursor: not-allowed;
322
- opacity: 0.38;
323
- --#{$component}-layer: 0%;
324
- }
235
+ --#{$component}-layer: 0%;
236
+ display: flex;
237
+ align-items: center;
238
+ justify-content: center;
239
+ flex-shrink: 0;
240
+ width: 48px;
241
+ height: 48px;
242
+ margin: 0;
243
+ padding: 0;
244
+ border: none;
245
+ border-radius: 50%;
246
+ font: inherit;
247
+ background-color: color-mix(in srgb, currentColor var(--#{$component}-layer), transparent);
248
+ cursor: pointer;
249
+ transition: background-color $transition-duration $transition-easing;
250
+
251
+ svg {
252
+ width: $icon-size;
253
+ height: $icon-size;
254
+ fill: currentColor;
255
+ }
256
+
257
+ &:hover { --#{$component}-layer: 8%; }
258
+ &:focus-visible, &:active { --#{$component}-layer: 10%; }
259
+ &:focus { outline: none; }
260
+ &:focus-visible { outline: 3px solid t.color("secondary"); outline-offset: 2px; }
261
+
262
+ &[aria-disabled="true"] {
263
+ cursor: not-allowed;
264
+ opacity: 0.38;
265
+ --#{$component}-layer: 0%;
266
+ }
325
267
  }
326
268
 
327
269
  .#{$component}__leading-icon {
328
- color: t.color("on-surface");
270
+ color: t.color("on-surface");
329
271
  }
330
272
 
331
273
  .#{$component}__clear-button,
332
274
  .#{$component}__trailing-icon {
333
- color: t.color("on-surface-variant");
275
+ color: t.color("on-surface-variant");
334
276
  }
335
277
 
336
278
  .#{$component}__clear-button {
337
- opacity: 1;
338
- visibility: visible;
339
- transition:
340
- opacity $transition-duration $transition-easing,
341
- visibility 0s,
342
- background-color $transition-duration $transition-easing;
343
-
344
- &--hidden {
345
- opacity: 0;
346
- visibility: hidden;
347
- pointer-events: none;
348
- transition:
349
- opacity $transition-duration $transition-easing,
350
- visibility 0s $transition-duration;
351
- }
352
- }
353
-
354
- // The avatar is 30dp, centred in a 48dp box like the icons.
279
+ opacity: 1;
280
+ visibility: visible;
281
+ transition:
282
+ opacity $transition-duration $transition-easing,
283
+ visibility 0s,
284
+ background-color $transition-duration $transition-easing;
285
+
286
+ &--hidden {
287
+ opacity: 0;
288
+ visibility: hidden;
289
+ pointer-events: none;
290
+ transition:
291
+ opacity $transition-duration $transition-easing,
292
+ visibility 0s $transition-duration;
293
+ }
294
+ }
295
+
355
296
  .#{$component}__avatar {
356
- display: flex;
357
- align-items: center;
358
- justify-content: center;
359
- flex-shrink: 0;
360
- width: 48px;
361
- height: 48px;
362
-
363
- > * {
364
- width: $avatar-size;
365
- height: $avatar-size;
366
- border-radius: 50%;
367
- object-fit: cover;
368
- }
369
- }
370
-
371
- // Trailing items container
297
+ display: flex;
298
+ align-items: center;
299
+ justify-content: center;
300
+ flex-shrink: 0;
301
+ width: 48px;
302
+ height: 48px;
303
+
304
+ > * {
305
+ width: $avatar-size;
306
+ height: $avatar-size;
307
+ border-radius: 50%;
308
+ object-fit: cover;
309
+ }
310
+ }
311
+
372
312
  .#{$component}__trailing {
373
- display: flex;
374
- align-items: center;
313
+ display: flex;
314
+ align-items: center;
375
315
  }
376
316
 
377
- // ============================================================================
378
- // Input Wrapper & Input
379
- // ============================================================================
380
317
 
381
- // 4dp from the tap targets on either side.
382
318
  .#{$component}__input-wrapper {
383
- flex: 1;
384
- min-width: 0;
385
- height: 100%;
386
- margin: 0 4px;
387
- display: flex;
388
- align-items: center;
319
+ flex: 1;
320
+ min-width: 0;
321
+ height: 100%;
322
+ margin: 0 4px;
323
+ display: flex;
324
+ align-items: center;
389
325
  }
390
326
 
391
327
  .#{$component}__input {
392
- width: 100%;
393
- height: 100%;
394
- min-height: 36px;
395
- padding: 8px 0;
396
- border: none;
397
- background: transparent;
398
- @include m.typography("body-large");
399
- color: t.color("on-surface");
400
- caret-color: t.color("primary");
401
- outline: none;
402
- box-sizing: border-box;
403
-
404
- &::placeholder {
405
- color: t.color("on-surface-variant");
406
- }
407
-
408
- &:disabled {
409
- cursor: not-allowed;
410
- color: t.color("on-surface");
411
- }
412
- }
413
-
414
- // ============================================================================
415
- // Divider
416
- // ============================================================================
417
-
418
- // SearchViewTokens.DividerColor is outline (it was outline-variant).
328
+ width: 100%;
329
+ height: 100%;
330
+ min-height: 36px;
331
+ padding: 8px 0;
332
+ border: none;
333
+ background: transparent;
334
+ @include m.typography("body-large");
335
+ color: t.color("on-surface");
336
+ caret-color: t.color("primary");
337
+ outline: none;
338
+ box-sizing: border-box;
339
+
340
+ &::placeholder {
341
+ color: t.color("on-surface-variant");
342
+ }
343
+
344
+ &:disabled {
345
+ cursor: not-allowed;
346
+ color: t.color("on-surface");
347
+ }
348
+ }
349
+
350
+
419
351
  .#{$component}__divider {
420
- width: 100%;
421
- height: 1px;
422
- background-color: t.color("outline");
423
- flex-shrink: 0;
352
+ width: 100%;
353
+ height: 1px;
354
+ background-color: t.color("outline");
355
+ flex-shrink: 0;
424
356
  }
425
357
 
426
- // ============================================================================
427
- // Content Area (View mode only)
428
- // ============================================================================
429
358
 
430
359
  .#{$component}__content {
431
- display: flex;
432
- flex-direction: column;
433
- background-color: t.color("surface-container-high");
434
- overflow: hidden;
360
+ display: flex;
361
+ flex-direction: column;
362
+ background-color: t.color("surface-container-high");
363
+ overflow: hidden;
435
364
  }
436
365
 
437
- // ============================================================================
438
- // Suggestions: M3 one-line list items
439
- // ============================================================================
440
366
 
441
367
  .#{$component}__suggestions {
442
- flex: 1;
443
- overflow-y: auto;
444
- overflow-x: hidden;
445
- // The arrows name no behaviour, so that reduced motion can stop it
446
- scroll-behavior: smooth;
368
+ flex: 1;
369
+ overflow-y: auto;
370
+ overflow-x: hidden;
371
+ scroll-behavior: smooth;
447
372
  }
448
373
 
449
374
  .#{$component}__suggestion-list {
450
- list-style: none;
451
- padding: 8px 0;
452
- margin: 0;
375
+ list-style: none;
376
+ padding: 8px 0;
377
+ margin: 0;
453
378
  }
454
379
 
455
- // 56dp one-line items (they were 48), Body Large, 16dp padding; hover at 8%;
456
- // the option the arrows reach looks focused: 10% and the focus ring.
457
380
  .#{$component}__suggestion-item {
458
- display: flex;
459
- align-items: center;
460
- gap: 16px;
461
- padding: 8px 16px;
462
- min-height: 56px;
463
- @include m.typography("body-large");
464
- color: t.color("on-surface");
465
- cursor: pointer;
466
- transition: background-color $transition-duration $transition-easing;
467
- box-sizing: border-box;
468
-
469
- &:hover {
470
- background-color: t.alpha("on-surface", 0.08);
471
- }
472
-
473
- &--selected,
474
- &--selected:hover {
475
- background-color: t.alpha("on-surface", 0.1);
476
- outline: 3px solid t.color("secondary");
477
- outline-offset: -3px;
478
- }
479
-
480
- // Highlighted text in suggestions
481
- strong {
482
- font-weight: 600;
483
- color: t.color("on-surface");
484
- }
381
+ display: flex;
382
+ align-items: center;
383
+ gap: 16px;
384
+ padding: 8px 16px;
385
+ min-height: 56px;
386
+ @include m.typography("body-large");
387
+ color: t.color("on-surface");
388
+ cursor: pointer;
389
+ transition: background-color $transition-duration $transition-easing;
390
+ box-sizing: border-box;
391
+
392
+ &:hover {
393
+ background-color: t.alpha("on-surface", 0.08);
485
394
  }
486
395
 
487
- .#{$component}__suggestion-icon {
488
- display: flex;
489
- align-items: center;
490
- justify-content: center;
491
- flex-shrink: 0;
492
- width: $icon-size;
493
- height: $icon-size;
494
- color: t.color("on-surface-variant");
396
+ &--selected,
397
+ &--selected:hover {
398
+ background-color: t.alpha("on-surface", 0.1);
399
+ outline: 3px solid t.color("secondary");
400
+ outline-offset: -3px;
401
+ }
402
+
403
+ strong {
404
+ font-weight: 600;
405
+ color: t.color("on-surface");
406
+ }
407
+ }
495
408
 
496
- svg {
497
- width: $icon-size;
498
- height: $icon-size;
499
- fill: currentColor;
500
- }
409
+ .#{$component}__suggestion-icon {
410
+ display: flex;
411
+ align-items: center;
412
+ justify-content: center;
413
+ flex-shrink: 0;
414
+ width: $icon-size;
415
+ height: $icon-size;
416
+ color: t.color("on-surface-variant");
417
+
418
+ svg {
419
+ width: $icon-size;
420
+ height: $icon-size;
421
+ fill: currentColor;
422
+ }
501
423
  }
502
424
 
503
425
  .#{$component}__suggestion-text {
504
- flex: 1;
505
- min-width: 0;
506
- overflow: hidden;
507
- text-overflow: ellipsis;
508
- white-space: nowrap;
426
+ flex: 1;
427
+ min-width: 0;
428
+ overflow: hidden;
429
+ text-overflow: ellipsis;
430
+ white-space: nowrap;
509
431
  }
510
432
 
511
- // Two-line items: 72dp, the second line Body Medium on-surface-variant.
512
433
  .#{$component}__suggestion-item--two-line {
513
- min-height: 72px;
434
+ min-height: 72px;
514
435
  }
515
436
 
516
437
  .#{$component}__suggestion-supporting {
517
- // Keep the headline's text and highlighted matches in one inline flow.
518
- display: block;
519
- overflow: hidden;
520
- text-overflow: ellipsis;
521
- @include m.typography("body-medium");
522
- color: t.color("on-surface-variant");
438
+ display: block;
439
+ overflow: hidden;
440
+ text-overflow: ellipsis;
441
+ @include m.typography("body-medium");
442
+ color: t.color("on-surface-variant");
523
443
  }
524
444
 
525
445
  .#{$component}__suggestion-divider {
526
- height: 1px;
527
- margin: 8px 0;
528
- background-color: t.color("outline-variant");
446
+ height: 1px;
447
+ margin: 8px 0;
448
+ background-color: t.color("outline-variant");
529
449
  }
530
450
 
531
- // The live region: read, not seen.
532
451
  .#{$component}__status {
533
- position: absolute;
534
- width: 1px;
535
- height: 1px;
536
- overflow: hidden;
537
- clip-path: inset(50%);
538
- white-space: nowrap;
452
+ position: absolute;
453
+ width: 1px;
454
+ height: 1px;
455
+ overflow: hidden;
456
+ clip-path: inset(50%);
457
+ white-space: nowrap;
539
458
  }
540
459
 
541
- // ============================================================================
542
- // Responsive Adjustments
543
- // ============================================================================
544
460
 
545
461
  @include m.breakpoint-down("sm") {
546
- .#{$component} {
547
- min-width: 0;
548
- max-width: 100%;
549
-
550
- // Compact windows: docked opens full screen, M3's default there.
551
- &--docked.#{$component}--view {
552
- .#{$component}__surface {
553
- inset: 0;
554
- width: 100%;
555
- height: 100%;
556
- background-color: t.color("surface-container-high");
557
- }
558
-
559
- .#{$component}__container {
560
- border-radius: 0;
561
- }
562
-
563
- .#{$component}__content {
564
- flex: 1;
565
- max-height: none;
566
- border-radius: 0;
567
- }
568
- }
569
- }
570
-
571
- // Contained on a compact window, as full screen.
572
- .#{$component}--contained.#{$component}--docked.#{$component}--view {
573
- @include contained-fullscreen;
574
- }
462
+ .#{$component} {
463
+ min-width: 0;
464
+ max-width: 100%;
465
+
466
+ &--docked.#{$component}--view {
467
+ .#{$component}__surface {
468
+ inset: 0;
469
+ width: 100%;
470
+ height: 100%;
471
+ background-color: t.color("surface-container-high");
472
+ }
473
+
474
+ .#{$component}__container {
475
+ border-radius: 0;
476
+ }
477
+
478
+ .#{$component}__content {
479
+ flex: 1;
480
+ max-height: none;
481
+ border-radius: 0;
482
+ }
483
+ }
484
+ }
485
+
486
+ .#{$component}--contained.#{$component}--docked.#{$component}--view {
487
+ @include contained-fullscreen;
488
+ }
575
489
  }