mtrl 0.5.2 → 0.5.4
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.
- package/dist/components/checkbox/api.d.ts +1 -1
- package/dist/components/checkbox/types.d.ts +17 -6
- package/dist/components/chips/api.d.ts +5 -2
- package/dist/components/chips/chip/api.d.ts +1 -1
- package/dist/components/chips/config.d.ts +5 -1
- package/dist/components/chips/types.d.ts +14 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/select/types.d.ts +21 -3
- package/dist/components/switch/types.d.ts +8 -4
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +13 -13
- package/dist/index.js +14 -14
- package/dist/index.js.map +13 -13
- package/dist/package.json +1 -1
- package/dist/styles.css +2 -2
- package/package.json +4 -2
- package/src/styles/abstract/_base.scss +2 -0
- package/src/styles/abstract/_config.scss +28 -0
- package/src/styles/abstract/_functions.scss +124 -0
- package/src/styles/abstract/_mixins.scss +401 -0
- package/src/styles/abstract/_theme.scss +269 -0
- package/src/styles/abstract/_variables.scss +338 -0
- package/src/styles/base/_reset.scss +86 -0
- package/src/styles/base/_typography.scss +155 -0
- package/src/styles/components/_badge.scss +183 -0
- package/src/styles/components/_bottom-app-bar.scss +103 -0
- package/src/styles/components/_button.scss +756 -0
- package/src/styles/components/_card.scss +401 -0
- package/src/styles/components/_carousel.scss +645 -0
- package/src/styles/components/_checkbox.scss +231 -0
- package/src/styles/components/_chips.scss +643 -0
- package/src/styles/components/_datepicker.scss +358 -0
- package/src/styles/components/_dialog.scss +259 -0
- package/src/styles/components/_divider.scss +57 -0
- package/src/styles/components/_extended-fab.scss +309 -0
- package/src/styles/components/_fab.scss +244 -0
- package/src/styles/components/_list.scss +774 -0
- package/src/styles/components/_menu.scss +245 -0
- package/src/styles/components/_navigation-mobile.scss +244 -0
- package/src/styles/components/_navigation-system.scss +151 -0
- package/src/styles/components/_navigation.scss +407 -0
- package/src/styles/components/_progress.scss +101 -0
- package/src/styles/components/_radios.scss +187 -0
- package/src/styles/components/_search.scss +306 -0
- package/src/styles/components/_segmented-button.scss +227 -0
- package/src/styles/components/_select.scss +274 -0
- package/src/styles/components/_sheet.scss +236 -0
- package/src/styles/components/_slider.scss +264 -0
- package/src/styles/components/_snackbar.scss +211 -0
- package/src/styles/components/_switch.scss +305 -0
- package/src/styles/components/_tabs.scss +421 -0
- package/src/styles/components/_textfield.scss +1035 -0
- package/src/styles/components/_timepicker.scss +451 -0
- package/src/styles/components/_tooltip.scss +241 -0
- package/src/styles/components/_top-app-bar.scss +225 -0
- package/src/styles/main.scss +129 -0
- package/src/styles/themes/_autumn.scss +105 -0
- package/src/styles/themes/_base-theme.scss +85 -0
- package/src/styles/themes/_baseline.scss +173 -0
- package/src/styles/themes/_bluekhaki.scss +125 -0
- package/src/styles/themes/_brownbeige.scss +125 -0
- package/src/styles/themes/_browngreen.scss +125 -0
- package/src/styles/themes/_forest.scss +77 -0
- package/src/styles/themes/_greenbeige.scss +125 -0
- package/src/styles/themes/_index.scss +19 -0
- package/src/styles/themes/_material.scss +125 -0
- package/src/styles/themes/_ocean.scss +77 -0
- package/src/styles/themes/_sageivory.scss +125 -0
- package/src/styles/themes/_spring.scss +77 -0
- package/src/styles/themes/_summer.scss +87 -0
- package/src/styles/themes/_sunset.scss +60 -0
- package/src/styles/themes/_tealcaramel.scss +125 -0
- package/src/styles/themes/_winter.scss +77 -0
- package/src/styles/utilities/_colors.scss +154 -0
- package/src/styles/utilities/_flexbox.scss +194 -0
- package/src/styles/utilities/_layout.scss +665 -0
- package/src/styles/utilities/_ripple.scss +79 -0
- package/src/styles/utilities/_spacing.scss +139 -0
- package/src/styles/utilities/_typography.scss +178 -0
- package/src/styles/utilities/_visibility.scss +142 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
// src/components/extended-fab/_styles.scss
|
|
2
|
+
@use '../../styles/abstract/base' as base;
|
|
3
|
+
@use '../../styles/abstract/variables' as v;
|
|
4
|
+
@use '../../styles/abstract/functions' as f;
|
|
5
|
+
@use '../../styles/abstract/mixins' as m;
|
|
6
|
+
@use '../../styles/abstract/theme' as t;
|
|
7
|
+
|
|
8
|
+
$component: '#{base.$prefix}-extended-fab';
|
|
9
|
+
|
|
10
|
+
.#{$component} {
|
|
11
|
+
// Base styles
|
|
12
|
+
position: relative;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
border: none;
|
|
16
|
+
background-color: t.color('primary-container');
|
|
17
|
+
color: t.color('on-primary-container');
|
|
18
|
+
font: inherit;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
user-select: none;
|
|
23
|
+
vertical-align: middle;
|
|
24
|
+
appearance: none;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
// Extended FAB uses elevation in all variants
|
|
28
|
+
@include m.elevation(2);
|
|
29
|
+
|
|
30
|
+
// Transitions for property changes (separated for performance)
|
|
31
|
+
@include m.motion-transition(
|
|
32
|
+
transform,
|
|
33
|
+
box-shadow,
|
|
34
|
+
background-color,
|
|
35
|
+
color
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Extended FAB dimensions (56dp height, min-width 80dp)
|
|
39
|
+
height: 56px;
|
|
40
|
+
min-width: 80px;
|
|
41
|
+
padding: 0 16px 0 16px; // Left and right padding
|
|
42
|
+
border-radius: f.get-shape('large'); // 16px corners
|
|
43
|
+
|
|
44
|
+
// Transition for dimension changes
|
|
45
|
+
transition:
|
|
46
|
+
width 0.3s v.motion('easing-standard'),
|
|
47
|
+
min-width 0.3s v.motion('easing-standard'),
|
|
48
|
+
padding 0.3s v.motion('easing-standard');
|
|
49
|
+
|
|
50
|
+
// Focus styles
|
|
51
|
+
&:focus {
|
|
52
|
+
outline: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:focus-visible {
|
|
56
|
+
outline: 2px solid t.color('outline');
|
|
57
|
+
outline-offset: 2px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Icon styles
|
|
61
|
+
&-icon {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
width: 24px;
|
|
66
|
+
height: 24px;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
padding: 2px;
|
|
69
|
+
transition:
|
|
70
|
+
transform 0.3s v.motion('easing-standard'),
|
|
71
|
+
margin 0.3s v.motion('easing-standard');
|
|
72
|
+
|
|
73
|
+
svg {
|
|
74
|
+
width: 24px;
|
|
75
|
+
height: 24px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Text styles
|
|
80
|
+
&-text {
|
|
81
|
+
@include m.typography('label-large');
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
max-width: 280px;
|
|
86
|
+
margin: 0 6px 0 12px;
|
|
87
|
+
transition:
|
|
88
|
+
max-width 0.3s v.motion('easing-standard'),
|
|
89
|
+
opacity 0.2s v.motion('easing-standard'),
|
|
90
|
+
width 0.3s v.motion('easing-standard'),
|
|
91
|
+
margin 0.3s v.motion('easing-standard');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Width variants
|
|
95
|
+
&--fixed {
|
|
96
|
+
// Default behavior (width based on content)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&--fluid {
|
|
100
|
+
width: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// RTL support
|
|
104
|
+
html[dir="rtl"] & {
|
|
105
|
+
.#{$component}-icon {
|
|
106
|
+
margin-right: 0;
|
|
107
|
+
margin-left: 12px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Color variants
|
|
112
|
+
&--primary {
|
|
113
|
+
background-color: t.color('primary-container');
|
|
114
|
+
color: t.color('on-primary-container');
|
|
115
|
+
|
|
116
|
+
&:hover {
|
|
117
|
+
@include m.state-layer(t.color('on-primary-container'), 'hover');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:active {
|
|
121
|
+
@include m.state-layer(t.color('on-primary-container'), 'pressed');
|
|
122
|
+
@include m.elevation(1);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--secondary {
|
|
127
|
+
background-color: t.color('secondary-container');
|
|
128
|
+
color: t.color('on-secondary-container');
|
|
129
|
+
|
|
130
|
+
&:hover {
|
|
131
|
+
@include m.state-layer(t.color('on-secondary-container'), 'hover');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:active {
|
|
135
|
+
@include m.state-layer(t.color('on-secondary-container'), 'pressed');
|
|
136
|
+
@include m.elevation(1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&--tertiary {
|
|
141
|
+
background-color: t.color('tertiary-container');
|
|
142
|
+
color: t.color('on-tertiary-container');
|
|
143
|
+
|
|
144
|
+
&:hover {
|
|
145
|
+
@include m.state-layer(t.color('on-tertiary-container'), 'hover');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:active {
|
|
149
|
+
@include m.state-layer(t.color('on-tertiary-container'), 'pressed');
|
|
150
|
+
@include m.elevation(1);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&--surface {
|
|
155
|
+
background-color: t.color('surface');
|
|
156
|
+
color: t.color('primary');
|
|
157
|
+
|
|
158
|
+
&:hover {
|
|
159
|
+
@include m.state-layer(t.color('primary'), 'hover');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&:active {
|
|
163
|
+
@include m.state-layer(t.color('primary'), 'pressed');
|
|
164
|
+
@include m.elevation(1);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Collapsed state
|
|
169
|
+
&--collapsed {
|
|
170
|
+
width: 56px;
|
|
171
|
+
min-width: 56px;
|
|
172
|
+
|
|
173
|
+
.#{$component}-icon {
|
|
174
|
+
margin: 0;
|
|
175
|
+
transform: scale(1.05);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.#{$component}-text {
|
|
179
|
+
opacity: 0;
|
|
180
|
+
max-width: 0;
|
|
181
|
+
width: 0;
|
|
182
|
+
margin: 0;
|
|
183
|
+
transition:
|
|
184
|
+
opacity 0.1s v.motion('easing-disappear'),
|
|
185
|
+
max-width 0.3s v.motion('easing-collapse') 0.05s,
|
|
186
|
+
width 0.3s v.motion('easing-collapse') 0.05s,
|
|
187
|
+
margin 0.3s v.motion('easing-collapse') 0.05s;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:not(.#{$component}--collapsed) {
|
|
192
|
+
// Ensure the icon scales smoothly
|
|
193
|
+
.#{$component}-icon {
|
|
194
|
+
transform: scale(1);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.#{$component}-text {
|
|
198
|
+
transition:
|
|
199
|
+
width 0.25s v.motion('easing-expand'),
|
|
200
|
+
max-width 0.25s v.motion('easing-expand'),
|
|
201
|
+
opacity 0.2s v.motion('easing-appear') 0.05s,
|
|
202
|
+
margin 0.25s v.motion('easing-expand');
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Long-press state
|
|
207
|
+
&--long-press {
|
|
208
|
+
@include m.state-layer(t.color('on-primary-container'), 'dragged');
|
|
209
|
+
@include m.elevation(1);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Lowered state
|
|
213
|
+
&--lowered {
|
|
214
|
+
@include m.elevation(1);
|
|
215
|
+
transform: translateY(1px);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Disabled state
|
|
219
|
+
&--disabled,
|
|
220
|
+
&:disabled {
|
|
221
|
+
pointer-events: none;
|
|
222
|
+
@include m.elevation(0);
|
|
223
|
+
color: t.alpha('surface', 0.38);
|
|
224
|
+
background-color: t.alpha('surface', 0.12);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Positioning utilities
|
|
228
|
+
&--top-right {
|
|
229
|
+
position: fixed;
|
|
230
|
+
top: 16px;
|
|
231
|
+
right: 16px;
|
|
232
|
+
z-index: v.z-index('dropdown');
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&--top-left {
|
|
236
|
+
position: fixed;
|
|
237
|
+
top: 16px;
|
|
238
|
+
left: 16px;
|
|
239
|
+
z-index: v.z-index('dropdown');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&--bottom-right {
|
|
243
|
+
position: fixed;
|
|
244
|
+
bottom: 16px;
|
|
245
|
+
right: 16px;
|
|
246
|
+
z-index: v.z-index('dropdown');
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&--bottom-left {
|
|
250
|
+
position: fixed;
|
|
251
|
+
bottom: 16px;
|
|
252
|
+
left: 16px;
|
|
253
|
+
z-index: v.z-index('dropdown');
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// Animation effects
|
|
257
|
+
@keyframes extended-fab-enter {
|
|
258
|
+
from {
|
|
259
|
+
transform: scale(0.8);
|
|
260
|
+
opacity: 0;
|
|
261
|
+
}
|
|
262
|
+
to {
|
|
263
|
+
transform: scale(1);
|
|
264
|
+
opacity: 1;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
&--animate-enter {
|
|
269
|
+
animation: extended-fab-enter 0.3s v.motion('emphasized-decelerate') forwards;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Mobile behaviors
|
|
273
|
+
@media (max-width: v.breakpoint('sm')) {
|
|
274
|
+
&--center-mobile {
|
|
275
|
+
left: 50%;
|
|
276
|
+
transform: translateX(-50%);
|
|
277
|
+
|
|
278
|
+
&.#{$component}--lowered {
|
|
279
|
+
transform: translateX(-50%) translateY(1px);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Collapsible behavior
|
|
285
|
+
&--collapsible {
|
|
286
|
+
transition-duration: 0.3s;
|
|
287
|
+
transition-timing-function: v.motion('easing-standard');
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
// FIX: Disabled on dark theme (recommandations do not work as expected)
|
|
293
|
+
body[data-theme-mode=dark] {
|
|
294
|
+
// Interactive states
|
|
295
|
+
.#{$component} {
|
|
296
|
+
&:disabled {
|
|
297
|
+
color: t.alpha('on-surface-dim', 0.38);
|
|
298
|
+
background-color: t.alpha('surface-dim', 0.12);
|
|
299
|
+
|
|
300
|
+
.#{$component}-text {
|
|
301
|
+
opacity: 0.38;
|
|
302
|
+
}
|
|
303
|
+
.#{$component}-icon {
|
|
304
|
+
opacity: 0.38;
|
|
305
|
+
color: t.alpha('on-surface-dim', 0.12);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
// src/components/fab/_styles.scss
|
|
2
|
+
@use '../../styles/abstract/base' as base;
|
|
3
|
+
@use '../../styles/abstract/variables' as v;
|
|
4
|
+
@use '../../styles/abstract/functions' as f;
|
|
5
|
+
@use '../../styles/abstract/mixins' as m;
|
|
6
|
+
@use '../../styles/abstract/theme' as t;
|
|
7
|
+
|
|
8
|
+
$component: '#{base.$prefix}-fab';
|
|
9
|
+
|
|
10
|
+
.#{$component} {
|
|
11
|
+
// Base styles
|
|
12
|
+
position: relative;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
border: none;
|
|
17
|
+
background-color: t.color('primary-container');
|
|
18
|
+
color: t.color('on-primary-container');
|
|
19
|
+
font: inherit;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
user-select: none;
|
|
23
|
+
vertical-align: middle;
|
|
24
|
+
appearance: none;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
// FAB uses elevation in all variants
|
|
28
|
+
@include m.elevation(2);
|
|
29
|
+
|
|
30
|
+
// Transitions
|
|
31
|
+
@include m.motion-transition(
|
|
32
|
+
transform,
|
|
33
|
+
box-shadow,
|
|
34
|
+
background-color,
|
|
35
|
+
color
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Focus styles
|
|
39
|
+
&:focus {
|
|
40
|
+
outline: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:focus-visible {
|
|
44
|
+
outline: 2px solid t.color('outline');
|
|
45
|
+
outline-offset: 2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Default FAB size (56dp)
|
|
49
|
+
width: 56px;
|
|
50
|
+
height: 56px;
|
|
51
|
+
border-radius: f.get-shape('large');
|
|
52
|
+
|
|
53
|
+
// Icon sizing
|
|
54
|
+
&-icon {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
width: 24px;
|
|
59
|
+
height: 24px;
|
|
60
|
+
|
|
61
|
+
svg {
|
|
62
|
+
width: 24px;
|
|
63
|
+
height: 24px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Size variants
|
|
68
|
+
&--small {
|
|
69
|
+
width: 40px;
|
|
70
|
+
height: 40px;
|
|
71
|
+
border-radius: f.get-shape('medium');
|
|
72
|
+
|
|
73
|
+
.#{$component}-icon {
|
|
74
|
+
width: 24px;
|
|
75
|
+
height: 24px;
|
|
76
|
+
|
|
77
|
+
svg {
|
|
78
|
+
width: 24px;
|
|
79
|
+
height: 24px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&--default {
|
|
85
|
+
// Default is already defined in base styles
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&--large {
|
|
89
|
+
width: 96px;
|
|
90
|
+
height: 96px;
|
|
91
|
+
border-radius: f.get-shape('extra-large');
|
|
92
|
+
|
|
93
|
+
.#{$component}-icon {
|
|
94
|
+
width: 36px;
|
|
95
|
+
height: 36px;
|
|
96
|
+
|
|
97
|
+
svg {
|
|
98
|
+
width: 36px;
|
|
99
|
+
height: 36px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Color variants - primary is the default
|
|
105
|
+
|
|
106
|
+
// Primary variant (default)
|
|
107
|
+
&--primary {
|
|
108
|
+
background-color: t.color('primary-container');
|
|
109
|
+
color: t.color('on-primary-container');
|
|
110
|
+
|
|
111
|
+
&:hover {
|
|
112
|
+
@include m.state-layer(t.color('on-primary-container'), 'hover');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&:active {
|
|
116
|
+
@include m.state-layer(t.color('on-primary-container'), 'pressed');
|
|
117
|
+
@include m.elevation(1);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Secondary variant
|
|
122
|
+
&--secondary {
|
|
123
|
+
background-color: t.color('secondary-container');
|
|
124
|
+
color: t.color('on-secondary-container');
|
|
125
|
+
|
|
126
|
+
&:hover {
|
|
127
|
+
@include m.state-layer(t.color('on-secondary-container'), 'hover');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&:active {
|
|
131
|
+
@include m.state-layer(t.color('on-secondary-container'), 'pressed');
|
|
132
|
+
@include m.elevation(1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Tertiary variant
|
|
137
|
+
&--tertiary {
|
|
138
|
+
background-color: t.color('tertiary-container');
|
|
139
|
+
color: t.color('on-tertiary-container');
|
|
140
|
+
|
|
141
|
+
&:hover {
|
|
142
|
+
@include m.state-layer(t.color('on-tertiary-container'), 'hover');
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:active {
|
|
146
|
+
@include m.state-layer(t.color('on-tertiary-container'), 'pressed');
|
|
147
|
+
@include m.elevation(1);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Surface variant
|
|
152
|
+
&--surface {
|
|
153
|
+
background-color: t.color('surface');
|
|
154
|
+
color: t.color('primary');
|
|
155
|
+
|
|
156
|
+
&:hover {
|
|
157
|
+
@include m.state-layer(t.color('primary'), 'hover');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:active {
|
|
161
|
+
@include m.state-layer(t.color('primary'), 'pressed');
|
|
162
|
+
@include m.elevation(1);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Lowered state (when pressed)
|
|
167
|
+
&--lowered {
|
|
168
|
+
@include m.elevation(1);
|
|
169
|
+
transform: translateY(1px);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Disabled state
|
|
173
|
+
&--disabled,
|
|
174
|
+
&:disabled {
|
|
175
|
+
pointer-events: none;
|
|
176
|
+
@include m.elevation(0);
|
|
177
|
+
color: t.alpha('surface', 0.38);
|
|
178
|
+
background-color: t.alpha('surface', 0.12);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Positioning utilities
|
|
182
|
+
&--top-right {
|
|
183
|
+
position: fixed;
|
|
184
|
+
top: 16px;
|
|
185
|
+
right: 16px;
|
|
186
|
+
z-index: v.z-index('dropdown');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&--top-left {
|
|
190
|
+
position: fixed;
|
|
191
|
+
top: 16px;
|
|
192
|
+
left: 16px;
|
|
193
|
+
z-index: v.z-index('dropdown');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&--bottom-right {
|
|
197
|
+
position: fixed;
|
|
198
|
+
bottom: 16px;
|
|
199
|
+
right: 16px;
|
|
200
|
+
z-index: v.z-index('dropdown');
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&--bottom-left {
|
|
204
|
+
position: fixed;
|
|
205
|
+
bottom: 16px;
|
|
206
|
+
left: 16px;
|
|
207
|
+
z-index: v.z-index('dropdown');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Optional animations
|
|
211
|
+
@keyframes fab-enter {
|
|
212
|
+
from {
|
|
213
|
+
transform: scale(0);
|
|
214
|
+
opacity: 0;
|
|
215
|
+
}
|
|
216
|
+
to {
|
|
217
|
+
transform: scale(1);
|
|
218
|
+
opacity: 1;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&--animate-enter {
|
|
223
|
+
animation: fab-enter 0.3s f.get-motion-easing('emphasized-decelerate') forwards;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// FIX: Disabled on dark theme (recommandations do not work as expected)
|
|
228
|
+
body[data-theme-mode=dark] {
|
|
229
|
+
// Interactive states
|
|
230
|
+
.#{$component} {
|
|
231
|
+
&:disabled {
|
|
232
|
+
color: t.alpha('on-surface-dim', 0.38);
|
|
233
|
+
background-color: t.alpha('surface-dim', 0.12);
|
|
234
|
+
|
|
235
|
+
.#{$component}-text {
|
|
236
|
+
opacity: 0.38;
|
|
237
|
+
}
|
|
238
|
+
.#{$component}-icon {
|
|
239
|
+
opacity: 0.38;
|
|
240
|
+
color: t.alpha('on-surface-dim', 0.12);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|