mtrl 0.5.2 → 0.5.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.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -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 +639 -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 +1024 -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,451 @@
|
|
|
1
|
+
// src/components/timepicker/_styles.scss
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../../styles/abstract/base' as base;
|
|
4
|
+
@use '../../styles/abstract/variables' as v;
|
|
5
|
+
@use '../../styles/abstract/functions' as f;
|
|
6
|
+
@use '../../styles/abstract/mixins' as m;
|
|
7
|
+
@use '../../styles/abstract/theme' as t;
|
|
8
|
+
|
|
9
|
+
$component: '#{base.$prefix}-time-picker';
|
|
10
|
+
|
|
11
|
+
.#{$component} {
|
|
12
|
+
// Base styles
|
|
13
|
+
position: relative;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
|
|
16
|
+
&-modal {
|
|
17
|
+
position: fixed;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
z-index: map.get(v.$z-index, 'modal');
|
|
27
|
+
opacity: 0;
|
|
28
|
+
transition: opacity 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
|
|
29
|
+
|
|
30
|
+
&.active {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-dialog {
|
|
36
|
+
position: relative;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
min-width: 280px;
|
|
40
|
+
max-width: 328px;
|
|
41
|
+
max-height: 520px;
|
|
42
|
+
background-color: t.color('surface-container-high');
|
|
43
|
+
color: t.color('on-surface');
|
|
44
|
+
border-radius: f.get-shape('extra-large');
|
|
45
|
+
@include m.elevation(3);
|
|
46
|
+
transform: translateY(20px) scale(0.9);
|
|
47
|
+
opacity: 0;
|
|
48
|
+
transition: transform 0.25s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
|
|
49
|
+
|
|
50
|
+
&.active {
|
|
51
|
+
transform: translateY(0) scale(1);
|
|
52
|
+
opacity: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// State layer for elevations
|
|
56
|
+
&::before {
|
|
57
|
+
content: '';
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
63
|
+
border-radius: inherit;
|
|
64
|
+
background-color: t.color('surface-tint');
|
|
65
|
+
opacity: 0.05;
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Orientations
|
|
70
|
+
&--vertical {
|
|
71
|
+
// min-height: 460px;
|
|
72
|
+
|
|
73
|
+
.#{$component}-input-container {
|
|
74
|
+
flex-direction: row;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.#{$component}-period {
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
width: 52px;
|
|
80
|
+
height: 80px;
|
|
81
|
+
margin-left: 12px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&--horizontal {
|
|
86
|
+
min-width: 520px;
|
|
87
|
+
min-height: 360px;
|
|
88
|
+
|
|
89
|
+
.#{$component}-content {
|
|
90
|
+
flex-direction: row;
|
|
91
|
+
align-items: center;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$component}-input-container {
|
|
95
|
+
flex-direction: row;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.#{$component}-period {
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
width: 52px;
|
|
101
|
+
height: 80px;
|
|
102
|
+
margin-left: 12px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.#{$component}-dial {
|
|
106
|
+
margin-left: 24px;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Time formats
|
|
111
|
+
&--24h {
|
|
112
|
+
.#{$component}-period {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Title
|
|
119
|
+
&-title {
|
|
120
|
+
padding: 24px 24px 16px;
|
|
121
|
+
@include m.typography('title-small');
|
|
122
|
+
color: t.color('on-surface-variant');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Content container
|
|
126
|
+
&-content {
|
|
127
|
+
flex: 1;
|
|
128
|
+
padding: 0 24px;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
align-items: center;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Input container for both modes
|
|
136
|
+
&-input-container {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
margin: 0 0 24px 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Input field containers
|
|
144
|
+
&-time-input-field {
|
|
145
|
+
position: relative;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Time input styles - shared for both modes
|
|
151
|
+
&-hours,
|
|
152
|
+
&-minutes,
|
|
153
|
+
&-seconds {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
width: 96px;
|
|
158
|
+
height: 80px;
|
|
159
|
+
font-size: 3.5rem;
|
|
160
|
+
font-weight: 400;
|
|
161
|
+
border: none;
|
|
162
|
+
background: transparent;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
|
|
165
|
+
&[data-active="true"] {
|
|
166
|
+
color: t.color('primary');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Style for HTML input elements
|
|
170
|
+
&[type="number"] {
|
|
171
|
+
font-size: 3.5rem;
|
|
172
|
+
font-weight: 400;
|
|
173
|
+
width: 96px;
|
|
174
|
+
height: 76px;
|
|
175
|
+
text-align: center;
|
|
176
|
+
border: none;
|
|
177
|
+
background-color: t.color('surface-container-highest');
|
|
178
|
+
border-radius: f.get-shape('small');
|
|
179
|
+
padding: 0;
|
|
180
|
+
margin: 0;
|
|
181
|
+
color: t.color('on-surface');
|
|
182
|
+
|
|
183
|
+
&:focus {
|
|
184
|
+
outline: none;
|
|
185
|
+
box-shadow: 0 0 0 2px t.color('primary');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Remove spinner arrows
|
|
189
|
+
-moz-appearance: textfield;
|
|
190
|
+
&::-webkit-outer-spin-button,
|
|
191
|
+
&::-webkit-inner-spin-button {
|
|
192
|
+
-webkit-appearance: none;
|
|
193
|
+
margin: 0;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// When in dial mode, add highlighting for active element
|
|
198
|
+
&:not([type="number"]) {
|
|
199
|
+
&[data-active="true"] {
|
|
200
|
+
color: t.color('primary');
|
|
201
|
+
background-color: t.alpha('primary', 0.1);
|
|
202
|
+
border-radius: f.get-shape('small');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&:hover {
|
|
206
|
+
background-color: t.alpha('on-surface', 0.04);
|
|
207
|
+
border-radius: f.get-shape('small');
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Separator between hours, minutes, seconds
|
|
213
|
+
&-separator {
|
|
214
|
+
font-size: 3.5rem;
|
|
215
|
+
font-weight: 400;
|
|
216
|
+
margin: 0 4px;
|
|
217
|
+
color: t.color('on-surface-variant');
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Period selector (AM/PM)
|
|
221
|
+
&-period {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
justify-content: space-between;
|
|
225
|
+
background-color: t.color('surface-container-highest');
|
|
226
|
+
border-radius: f.get-shape('small');
|
|
227
|
+
overflow: hidden;
|
|
228
|
+
border: 1px solid t.color('outline-variant');
|
|
229
|
+
margin-left: 16px;
|
|
230
|
+
|
|
231
|
+
&-am,
|
|
232
|
+
&-pm {
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
justify-content: center;
|
|
236
|
+
width: 100%;
|
|
237
|
+
height: 50%;
|
|
238
|
+
padding: 8px;
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
@include m.typography('title-medium');
|
|
241
|
+
|
|
242
|
+
// Improve touch target sizes on mobile
|
|
243
|
+
@media (max-width: 599px) {
|
|
244
|
+
min-height: 48px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Improve focus styles for keyboard navigation
|
|
248
|
+
&:focus-visible {
|
|
249
|
+
outline: 2px solid t.color('primary');
|
|
250
|
+
outline-offset: 2px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
&:hover {
|
|
254
|
+
background-color: t.alpha('on-surface', 0.08);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:active {
|
|
258
|
+
background-color: t.alpha('on-surface', 0.12);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&--selected {
|
|
263
|
+
background-color: t.color('primary-container');
|
|
264
|
+
color: t.color('on-primary-container');
|
|
265
|
+
|
|
266
|
+
&:hover {
|
|
267
|
+
background-color: t.color('primary-container');
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Clock dial
|
|
273
|
+
&-dial {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
justify-content: center;
|
|
277
|
+
position: relative;
|
|
278
|
+
margin: 0 auto 24px;
|
|
279
|
+
width: 256px;
|
|
280
|
+
height: 256px;
|
|
281
|
+
|
|
282
|
+
&-canvas {
|
|
283
|
+
display: block;
|
|
284
|
+
width: 100%;
|
|
285
|
+
height: 100%;
|
|
286
|
+
border-radius: 50%;
|
|
287
|
+
cursor: pointer;
|
|
288
|
+
touch-action: none; // Prevent scrolling when touching the canvas
|
|
289
|
+
-webkit-tap-highlight-color: transparent; // Remove highlight on tap (mobile)
|
|
290
|
+
|
|
291
|
+
// Add transition for smooth animations
|
|
292
|
+
transition: transform 0.2s ease;
|
|
293
|
+
|
|
294
|
+
&:focus {
|
|
295
|
+
outline: none;
|
|
296
|
+
box-shadow: 0 0 0 2px t.color('primary');
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Actions footer
|
|
302
|
+
&-actions {
|
|
303
|
+
display: flex;
|
|
304
|
+
align-items: center;
|
|
305
|
+
justify-content: space-between;
|
|
306
|
+
padding: 16px 24px 24px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
&-toggle-type {
|
|
310
|
+
background: transparent;
|
|
311
|
+
border: none;
|
|
312
|
+
padding: 8px;
|
|
313
|
+
border-radius: 50%;
|
|
314
|
+
cursor: pointer;
|
|
315
|
+
color: t.color('on-surface-variant');
|
|
316
|
+
|
|
317
|
+
// Improve touch target sizes on mobile
|
|
318
|
+
@media (max-width: 599px) {
|
|
319
|
+
min-height: 48px;
|
|
320
|
+
min-width: 48px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Improve focus styles for keyboard navigation
|
|
324
|
+
&:focus-visible {
|
|
325
|
+
outline: 2px solid t.color('primary');
|
|
326
|
+
outline-offset: 2px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&:hover {
|
|
330
|
+
background-color: t.alpha('on-surface', 0.08);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&:active {
|
|
334
|
+
background-color: t.alpha('on-surface', 0.12);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
svg {
|
|
338
|
+
width: 24px;
|
|
339
|
+
height: 24px;
|
|
340
|
+
display: block;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
&-action-buttons {
|
|
345
|
+
display: flex;
|
|
346
|
+
gap: 8px;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&-cancel,
|
|
350
|
+
&-confirm {
|
|
351
|
+
padding: 10px 12px;
|
|
352
|
+
border: none;
|
|
353
|
+
background: transparent;
|
|
354
|
+
border-radius: f.get-shape('small');
|
|
355
|
+
cursor: pointer;
|
|
356
|
+
@include m.typography('label-large');
|
|
357
|
+
color: t.color('primary');
|
|
358
|
+
|
|
359
|
+
// Improve touch target sizes on mobile
|
|
360
|
+
@media (max-width: 599px) {
|
|
361
|
+
min-height: 48px;
|
|
362
|
+
padding: 12px 16px;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Improve focus styles for keyboard navigation
|
|
366
|
+
&:focus-visible {
|
|
367
|
+
outline: 2px solid t.color('primary');
|
|
368
|
+
outline-offset: 2px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
&:hover {
|
|
372
|
+
background-color: t.alpha('primary', 0.08);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
&:active {
|
|
376
|
+
background-color: t.alpha('primary', 0.12);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// Responsive adjustments
|
|
381
|
+
@media (max-width: 599px) {
|
|
382
|
+
&-dialog {
|
|
383
|
+
width: 100%;
|
|
384
|
+
max-width: 100%;
|
|
385
|
+
min-height: 460px;
|
|
386
|
+
border-radius: 0;
|
|
387
|
+
margin: 0;
|
|
388
|
+
|
|
389
|
+
&--horizontal {
|
|
390
|
+
flex-direction: column;
|
|
391
|
+
|
|
392
|
+
.#{$component}-content {
|
|
393
|
+
flex-direction: column;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.#{$component}-dial {
|
|
397
|
+
margin-left: 0;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
&-input-container {
|
|
403
|
+
margin: 16px 0;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Smaller inputs on mobile
|
|
407
|
+
&-hours,
|
|
408
|
+
&-minutes,
|
|
409
|
+
&-seconds {
|
|
410
|
+
width: 80px;
|
|
411
|
+
height: 76px;
|
|
412
|
+
font-size: 3rem;
|
|
413
|
+
|
|
414
|
+
&[type="number"] {
|
|
415
|
+
width: 80px;
|
|
416
|
+
height: 76px;
|
|
417
|
+
font-size: 3rem;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// Dark mode adjustments
|
|
423
|
+
@media (prefers-color-scheme: dark) {
|
|
424
|
+
&-dialog {
|
|
425
|
+
&::before {
|
|
426
|
+
opacity: 0.08;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
&-hours,
|
|
431
|
+
&-minutes,
|
|
432
|
+
&-seconds {
|
|
433
|
+
&[type="number"] {
|
|
434
|
+
background-color: t.alpha('on-surface', 0.05);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// Accessibility
|
|
440
|
+
&-sr-only {
|
|
441
|
+
position: absolute;
|
|
442
|
+
width: 1px;
|
|
443
|
+
height: 1px;
|
|
444
|
+
padding: 0;
|
|
445
|
+
margin: -1px;
|
|
446
|
+
overflow: hidden;
|
|
447
|
+
clip: rect(0, 0, 0, 0);
|
|
448
|
+
white-space: nowrap;
|
|
449
|
+
border: 0;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
// src/components/tooltip/_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}-tooltip';
|
|
9
|
+
$arrow-size: 8px;
|
|
10
|
+
|
|
11
|
+
.#{$component} {
|
|
12
|
+
// Base styles
|
|
13
|
+
position: fixed;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: 1000;
|
|
17
|
+
max-width: 200px;
|
|
18
|
+
padding: 4px 8px;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
background-color: t.color('inverse-surface');
|
|
21
|
+
color: t.color('inverse-on-surface');
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
line-height: 16px;
|
|
24
|
+
text-align: center;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
opacity: 0;
|
|
27
|
+
transform: scale(0.9);
|
|
28
|
+
transform-origin: center;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
31
|
+
|
|
32
|
+
// Typography
|
|
33
|
+
@include m.typography('body-small');
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
|
|
36
|
+
// Transition
|
|
37
|
+
transition:
|
|
38
|
+
opacity 150ms cubic-bezier(0, 0, 0.2, 1),
|
|
39
|
+
transform 150ms cubic-bezier(0, 0, 0.2, 1);
|
|
40
|
+
|
|
41
|
+
// States
|
|
42
|
+
&--visible {
|
|
43
|
+
opacity: 0.9;
|
|
44
|
+
transform: scale(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Variants
|
|
48
|
+
|
|
49
|
+
// Default variant
|
|
50
|
+
&--default {
|
|
51
|
+
// Default styles already applied in base
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Rich variant (for rich content)
|
|
55
|
+
&--rich {
|
|
56
|
+
text-align: left;
|
|
57
|
+
padding: 8px 12px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Plain variant (flat, no shadow)
|
|
61
|
+
&--plain {
|
|
62
|
+
background-color: t.color('surface-container-high');
|
|
63
|
+
color: t.color('on-surface');
|
|
64
|
+
box-shadow: none;
|
|
65
|
+
border: 1px solid t.color('outline');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Arrow styles
|
|
69
|
+
&__arrow {
|
|
70
|
+
position: absolute;
|
|
71
|
+
width: 0;
|
|
72
|
+
height: 0;
|
|
73
|
+
border: $arrow-size solid transparent;
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
|
|
76
|
+
// Top position (arrow points up)
|
|
77
|
+
&--top {
|
|
78
|
+
bottom: 100%;
|
|
79
|
+
left: 50%;
|
|
80
|
+
transform: translateX(-50%);
|
|
81
|
+
border-bottom-color: t.color('inverse-surface');
|
|
82
|
+
border-top-width: 0;
|
|
83
|
+
|
|
84
|
+
.#{$component}--plain & {
|
|
85
|
+
border-bottom-color: t.color('surface-container-high');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Top-start position
|
|
90
|
+
&--top-start {
|
|
91
|
+
bottom: 100%;
|
|
92
|
+
left: $arrow-size;
|
|
93
|
+
border-bottom-color: t.color('inverse-surface');
|
|
94
|
+
border-top-width: 0;
|
|
95
|
+
|
|
96
|
+
.#{$component}--plain & {
|
|
97
|
+
border-bottom-color: t.color('surface-container-high');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Top-end position
|
|
102
|
+
&--top-end {
|
|
103
|
+
bottom: 100%;
|
|
104
|
+
right: $arrow-size;
|
|
105
|
+
border-bottom-color: t.color('inverse-surface');
|
|
106
|
+
border-top-width: 0;
|
|
107
|
+
|
|
108
|
+
.#{$component}--plain & {
|
|
109
|
+
border-bottom-color: t.color('surface-container-high');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Bottom position (arrow points down)
|
|
114
|
+
&--bottom {
|
|
115
|
+
top: 100%;
|
|
116
|
+
left: 50%;
|
|
117
|
+
transform: translateX(-50%);
|
|
118
|
+
border-top-color: t.color('inverse-surface');
|
|
119
|
+
border-bottom-width: 0;
|
|
120
|
+
|
|
121
|
+
.#{$component}--plain & {
|
|
122
|
+
border-top-color: t.color('surface-container-high');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Bottom-start position
|
|
127
|
+
&--bottom-start {
|
|
128
|
+
top: 100%;
|
|
129
|
+
left: $arrow-size;
|
|
130
|
+
border-top-color: t.color('inverse-surface');
|
|
131
|
+
border-bottom-width: 0;
|
|
132
|
+
|
|
133
|
+
.#{$component}--plain & {
|
|
134
|
+
border-top-color: t.color('surface-container-high');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Bottom-end position
|
|
139
|
+
&--bottom-end {
|
|
140
|
+
top: 100%;
|
|
141
|
+
right: $arrow-size;
|
|
142
|
+
border-top-color: t.color('inverse-surface');
|
|
143
|
+
border-bottom-width: 0;
|
|
144
|
+
|
|
145
|
+
.#{$component}--plain & {
|
|
146
|
+
border-top-color: t.color('surface-container-high');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Left position (arrow points left)
|
|
151
|
+
&--left {
|
|
152
|
+
right: 100%;
|
|
153
|
+
top: 50%;
|
|
154
|
+
transform: translateY(-50%);
|
|
155
|
+
border-right-color: t.color('inverse-surface');
|
|
156
|
+
border-left-width: 0;
|
|
157
|
+
|
|
158
|
+
.#{$component}--plain & {
|
|
159
|
+
border-right-color: t.color('surface-container-high');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Left-start position
|
|
164
|
+
&--left-start {
|
|
165
|
+
right: 100%;
|
|
166
|
+
top: $arrow-size;
|
|
167
|
+
border-right-color: t.color('inverse-surface');
|
|
168
|
+
border-left-width: 0;
|
|
169
|
+
|
|
170
|
+
.#{$component}--plain & {
|
|
171
|
+
border-right-color: t.color('surface-container-high');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Left-end position
|
|
176
|
+
&--left-end {
|
|
177
|
+
right: 100%;
|
|
178
|
+
bottom: $arrow-size;
|
|
179
|
+
border-right-color: t.color('inverse-surface');
|
|
180
|
+
border-left-width: 0;
|
|
181
|
+
|
|
182
|
+
.#{$component}--plain & {
|
|
183
|
+
border-right-color: t.color('surface-container-high');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Right position (arrow points right)
|
|
188
|
+
&--right {
|
|
189
|
+
left: 100%;
|
|
190
|
+
top: 50%;
|
|
191
|
+
transform: translateY(-50%);
|
|
192
|
+
border-left-color: t.color('inverse-surface');
|
|
193
|
+
border-right-width: 0;
|
|
194
|
+
|
|
195
|
+
.#{$component}--plain & {
|
|
196
|
+
border-left-color: t.color('surface-container-high');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Right-start position
|
|
201
|
+
&--right-start {
|
|
202
|
+
left: 100%;
|
|
203
|
+
top: $arrow-size;
|
|
204
|
+
border-left-color: t.color('inverse-surface');
|
|
205
|
+
border-right-width: 0;
|
|
206
|
+
|
|
207
|
+
.#{$component}--plain & {
|
|
208
|
+
border-left-color: t.color('surface-container-high');
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Right-end position
|
|
213
|
+
&--right-end {
|
|
214
|
+
left: 100%;
|
|
215
|
+
bottom: $arrow-size;
|
|
216
|
+
border-left-color: t.color('inverse-surface');
|
|
217
|
+
border-right-width: 0;
|
|
218
|
+
|
|
219
|
+
.#{$component}--plain & {
|
|
220
|
+
border-left-color: t.color('surface-container-high');
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Positioning classes
|
|
226
|
+
&--top {
|
|
227
|
+
margin-bottom: $arrow-size;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&--bottom {
|
|
231
|
+
margin-top: $arrow-size;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&--left {
|
|
235
|
+
margin-right: $arrow-size;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&--right {
|
|
239
|
+
margin-left: $arrow-size;
|
|
240
|
+
}
|
|
241
|
+
}
|