matcha-theme 20.4.0 → 20.6.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.
- package/components/matcha-avatar.scss +101 -0
- package/main.scss +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Estilos estruturais do avatar
|
|
2
|
+
.matcha-avatar {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
position: relative;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
user-select: none;
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
|
|
13
|
+
// Tamanhos
|
|
14
|
+
&.matcha-avatar-tiny {
|
|
15
|
+
width: 24px;
|
|
16
|
+
height: 24px;
|
|
17
|
+
font-size: 10px;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.matcha-avatar-small {
|
|
22
|
+
width: 40px;
|
|
23
|
+
height: 40px;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
line-height: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.matcha-avatar-medium {
|
|
29
|
+
width: 56px;
|
|
30
|
+
height: 56px;
|
|
31
|
+
font-size: 20px;
|
|
32
|
+
line-height: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.matcha-avatar-large {
|
|
36
|
+
width: 80px;
|
|
37
|
+
height: 80px;
|
|
38
|
+
font-size: 28px;
|
|
39
|
+
line-height: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.matcha-avatar-huge {
|
|
43
|
+
width: 96px;
|
|
44
|
+
height: 96px;
|
|
45
|
+
font-size: 32px;
|
|
46
|
+
line-height: 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Imagem
|
|
50
|
+
.matcha-avatar-image {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
object-fit: cover;
|
|
54
|
+
border-radius: inherit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Iniciais
|
|
58
|
+
.matcha-avatar-initials {
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
text-transform: uppercase;
|
|
61
|
+
letter-spacing: 0.5px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Ícone padrão
|
|
65
|
+
.matcha-avatar-icon {
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Estado desabilitado
|
|
71
|
+
&.color-disabled {
|
|
72
|
+
opacity: 0.6;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Mixin de tema
|
|
78
|
+
@mixin matcha-avatar-theme($theme) {
|
|
79
|
+
$background: map-get($theme, background);
|
|
80
|
+
$foreground: map-get($theme, foreground);
|
|
81
|
+
$is-dark: map-get($theme, is-dark);
|
|
82
|
+
|
|
83
|
+
.matcha-avatar {
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
// Ícone padrão
|
|
87
|
+
.matcha-avatar-icon {
|
|
88
|
+
color: map-get($foreground, disabled-text);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Estado desabilitado
|
|
92
|
+
&.color-disabled {
|
|
93
|
+
background-color: map-get($foreground, disabled);
|
|
94
|
+
color: map-get($foreground, disabled-text)!important;
|
|
95
|
+
|
|
96
|
+
.matcha-avatar-icon {
|
|
97
|
+
color: map-get($foreground, disabled-text);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
package/main.scss
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
@import "./components/matcha-hint-text.scss"; // matcha-hint-theme($theme)
|
|
47
47
|
@import "./components/matcha-slide-toggle.scss"; // matcha-slide-toggle($theme)
|
|
48
48
|
@import "./components/matcha-radio.scss"; // matcha-radio($theme)
|
|
49
|
+
@import "./components/matcha-avatar.scss"; // matcha-avatar($theme)
|
|
49
50
|
|
|
50
51
|
@import "./components/matcha-tabs.scss"; // matcha-tabs($theme)
|
|
51
52
|
@import "./components/matcha-modal.scss"; // matcha-modal($theme)
|
|
@@ -156,4 +157,5 @@
|
|
|
156
157
|
@include matcha-modal-theme($theme);
|
|
157
158
|
@include matcha-skeleton-theme($theme);
|
|
158
159
|
@include matcha-radio($theme);
|
|
160
|
+
@include matcha-avatar-theme($theme);
|
|
159
161
|
}
|