@inchurch/matcha-theme 20.0.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/README.md +303 -0
- package/abstracts/_colors.scss +405 -0
- package/abstracts/_elevation.scss +102 -0
- package/abstracts/_functions.scss +1213 -0
- package/abstracts/_media-breakpoint.scss +23 -0
- package/abstracts/_typography.scss +127 -0
- package/base/_reset.scss +438 -0
- package/components/matcha-accordion.scss +157 -0
- package/components/matcha-audio-player.scss +32 -0
- package/components/matcha-autocomplete.scss +134 -0
- package/components/matcha-avatar.scss +161 -0
- package/components/matcha-badge.scss +120 -0
- package/components/matcha-breadcrumb.scss +126 -0
- package/components/matcha-button-toggle.scss +363 -0
- package/components/matcha-buttons.scss +784 -0
- package/components/matcha-calendar.scss +154 -0
- package/components/matcha-cards.scss +205 -0
- package/components/matcha-chart-card.scss +60 -0
- package/components/matcha-checkbox.scss +554 -0
- package/components/matcha-chip.scss +212 -0
- package/components/matcha-color-pick.scss +35 -0
- package/components/matcha-command-palette.scss +89 -0
- package/components/matcha-crop.scss +172 -0
- package/components/matcha-date.scss +81 -0
- package/components/matcha-divider.scss +45 -0
- package/components/matcha-draggable.scss +24 -0
- package/components/matcha-drawer.scss +235 -0
- package/components/matcha-drop-list.scss +390 -0
- package/components/matcha-emoji.scss +69 -0
- package/components/matcha-empty-state.scss +118 -0
- package/components/matcha-flag.scss +62 -0
- package/components/matcha-footer.scss +187 -0
- package/components/matcha-form-field.scss +552 -0
- package/components/matcha-form-section.scss +101 -0
- package/components/matcha-header.scss +325 -0
- package/components/matcha-highlight.scss +296 -0
- package/components/matcha-hint-text.scss +66 -0
- package/components/matcha-horizontal-tree.scss +317 -0
- package/components/matcha-icon.scss +106 -0
- package/components/matcha-image.scss +62 -0
- package/components/matcha-list.scss +212 -0
- package/components/matcha-menu.scss +86 -0
- package/components/matcha-modal.scss +234 -0
- package/components/matcha-nav.scss +450 -0
- package/components/matcha-notification.scss +197 -0
- package/components/matcha-option.scss +95 -0
- package/components/matcha-page-builder.scss +4186 -0
- package/components/matcha-paginator.scss +235 -0
- package/components/matcha-panel.scss +167 -0
- package/components/matcha-profile-card.scss +50 -0
- package/components/matcha-progress-bar.scss +209 -0
- package/components/matcha-radio.scss +528 -0
- package/components/matcha-ripple.scss +7 -0
- package/components/matcha-scrollbar.scss +35 -0
- package/components/matcha-scrollbox-shadow.scss +123 -0
- package/components/matcha-section.scss +105 -0
- package/components/matcha-select.scss +661 -0
- package/components/matcha-skeleton.scss +138 -0
- package/components/matcha-slide-toggle.scss +590 -0
- package/components/matcha-slider.scss +188 -0
- package/components/matcha-snack-bar.scss +266 -0
- package/components/matcha-spin.scss +252 -0
- package/components/matcha-spinner.scss +78 -0
- package/components/matcha-stepper.scss +177 -0
- package/components/matcha-table-cell.scss +41 -0
- package/components/matcha-table.scss +785 -0
- package/components/matcha-tabs.scss +469 -0
- package/components/matcha-text-editor.scss +151 -0
- package/components/matcha-time.scss +33 -0
- package/components/matcha-timepicker.scss +13 -0
- package/components/matcha-toolbar.scss +206 -0
- package/components/matcha-tooltip.scss +128 -0
- package/components/matcha-uploader.scss +215 -0
- package/css/matcha-style.css +76772 -0
- package/fonts/CircularStd-Black.eot +0 -0
- package/fonts/CircularStd-Black.svg +3426 -0
- package/fonts/CircularStd-Black.ttf +0 -0
- package/fonts/CircularStd-Black.woff +0 -0
- package/fonts/CircularStd-Black.woff2 +0 -0
- package/fonts/CircularStd-Bold.eot +0 -0
- package/fonts/CircularStd-Bold.otf +0 -0
- package/fonts/CircularStd-Bold.svg +13532 -0
- package/fonts/CircularStd-Bold.ttf +0 -0
- package/fonts/CircularStd-Bold.woff +0 -0
- package/fonts/CircularStd-Bold.woff2 +0 -0
- package/fonts/CircularStd-Medium.eot +0 -0
- package/fonts/CircularStd-Medium.otf +0 -0
- package/fonts/CircularStd-Medium.svg +13511 -0
- package/fonts/CircularStd-Medium.ttf +0 -0
- package/fonts/CircularStd-Medium.woff +0 -0
- package/fonts/CircularStd-Medium.woff2 +0 -0
- package/fonts/CircularStd-Regular.eot +0 -0
- package/fonts/CircularStd-Regular.otf +0 -0
- package/fonts/CircularStd-Regular.svg +2378 -0
- package/fonts/CircularStd-Regular.ttf +0 -0
- package/fonts/CircularStd-Regular.woff +0 -0
- package/fonts/CircularStd-Regular.woff2 +0 -0
- package/main.scss +262 -0
- package/package.json +11 -0
- package/tokens/_animations-tokens.scss +37 -0
- package/tokens/_breakpoints-tokens.scss +26 -0
- package/tokens/_color-tokens.scss +1153 -0
- package/tokens/_css-custom-properties.scss +568 -0
- package/tokens/_elevation-tokens.scss +33 -0
- package/tokens/_spacing-tokens.scss +94 -0
- package/tokens/_typography-tokens.scss +65 -0
- package/vendors/angular-editor.scss +56 -0
- package/vendors/angular-material-fixes.scss +297 -0
- package/vendors/calendar.scss +2880 -0
- package/vendors/charts.scss +92 -0
- package/vendors/ng5-slider.scss +56 -0
- package/vendors/ngx-material-timepicker.scss +50 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-accordion.scss — Collapsible card sections
|
|
5
|
+
// Aligned with Figma matcha/accordion/item:
|
|
6
|
+
// Estado(3: Fechado, Aberto, Disabled)
|
|
7
|
+
// Card surface + chevron rotate + divider + content slot
|
|
8
|
+
// =============================================================================
|
|
9
|
+
|
|
10
|
+
@mixin matcha-accordion-theme($theme) {
|
|
11
|
+
$is-dark: map.get($theme, is-dark);
|
|
12
|
+
|
|
13
|
+
matcha-accordion-item {
|
|
14
|
+
.accordion-item {
|
|
15
|
+
background: var(--matcha-color-surface, #{getSurface($theme)});
|
|
16
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ── Header ──
|
|
20
|
+
.accordion-header-wrapper {
|
|
21
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
22
|
+
|
|
23
|
+
&:hover:not([disabled]) {
|
|
24
|
+
.accordion-header-state {
|
|
25
|
+
opacity: var(--matcha-state-hover, 0.08);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:active:not([disabled]) {
|
|
30
|
+
.accordion-header-state {
|
|
31
|
+
opacity: var(--matcha-state-active, 0.12);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:focus-visible {
|
|
36
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #{getAccent($theme)});
|
|
37
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
38
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ── Content text ──
|
|
43
|
+
.accordion-content {
|
|
44
|
+
color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ── Chevron ──
|
|
48
|
+
.accordion-chevron {
|
|
49
|
+
color: var(--matcha-color-icon-default, #{getBlueGrey($theme)});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ── Disabled ──
|
|
53
|
+
&.disabled {
|
|
54
|
+
opacity: 0.5;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
61
|
+
|
|
62
|
+
matcha-accordion {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: var(--matcha-space-200, 16px);
|
|
66
|
+
width: 100%;
|
|
67
|
+
|
|
68
|
+
// Legacy stretch support
|
|
69
|
+
&[stretch]:not([stretch="false"]) {
|
|
70
|
+
.accordion-header-wrapper {
|
|
71
|
+
width: 100%;
|
|
72
|
+
|
|
73
|
+
matcha-accordion-header {
|
|
74
|
+
width: 100%;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
matcha-accordion-item {
|
|
81
|
+
display: block;
|
|
82
|
+
|
|
83
|
+
.accordion-item {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
padding: var(--matcha-space-300, 24px);
|
|
87
|
+
gap: var(--matcha-space-300, 24px);
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ── Header ──
|
|
92
|
+
.accordion-header-wrapper {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
gap: var(--matcha-space-200, 16px);
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
position: relative;
|
|
99
|
+
border: none;
|
|
100
|
+
background: none;
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding: 0;
|
|
103
|
+
text-align: left;
|
|
104
|
+
|
|
105
|
+
// Figma matcha/accordion/item header: 20/800/28 (title-xl ExtraBold)
|
|
106
|
+
matcha-accordion-header {
|
|
107
|
+
flex: 1;
|
|
108
|
+
min-width: 0;
|
|
109
|
+
font-size: var(--matcha-text-title-xl, 20px);
|
|
110
|
+
font-weight: var(--matcha-weight-extrabold, 800);
|
|
111
|
+
line-height: var(--matcha-leading-title-xl, 28px);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ── State layer on header ──
|
|
116
|
+
.accordion-header-state {
|
|
117
|
+
position: absolute;
|
|
118
|
+
inset: calc(var(--matcha-space-300, 24px) * -1);
|
|
119
|
+
background: currentColor;
|
|
120
|
+
opacity: 0;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
123
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ── Chevron ──
|
|
127
|
+
.accordion-chevron {
|
|
128
|
+
flex-shrink: 0;
|
|
129
|
+
width: var(--matcha-icon-size-md, 24px);
|
|
130
|
+
height: var(--matcha-icon-size-md, 24px);
|
|
131
|
+
transition: transform var(--matcha-duration-moderate, 300ms) ease;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&.is-open .accordion-chevron {
|
|
135
|
+
transform: rotate(180deg);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// ── Content ──
|
|
139
|
+
.accordion-content {
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
font-family: var(--matcha-font-family);
|
|
142
|
+
font-size: var(--matcha-text-body-lg, 16px);
|
|
143
|
+
line-height: var(--matcha-leading-body-lg, 24px);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
148
|
+
@media (prefers-reduced-motion: reduce) {
|
|
149
|
+
matcha-accordion-item {
|
|
150
|
+
.accordion-chevron {
|
|
151
|
+
transition: none;
|
|
152
|
+
}
|
|
153
|
+
.accordion-header-state {
|
|
154
|
+
transition: none;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-audio-player.scss — Audio player component
|
|
5
|
+
// Aligned with Figma matcha/audio-player
|
|
6
|
+
// Angular: matcha-audio-player
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
@mixin matcha-audio-player-theme($theme) {
|
|
10
|
+
$is-dark: map.get($theme, is-dark);
|
|
11
|
+
|
|
12
|
+
.matcha-audio-player {
|
|
13
|
+
.is-selected {
|
|
14
|
+
box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-accent, #{getAccent($theme)});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
.matcha-audio-player {
|
|
22
|
+
.audio-player {
|
|
23
|
+
audio {
|
|
24
|
+
// display: none
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.audio & {
|
|
28
|
+
a { display: none; }
|
|
29
|
+
audio { display: inline-block; }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-autocomplete.scss — Autocomplete (search field + dropdown options)
|
|
5
|
+
// Aligned with Figma matcha/autocomplete:
|
|
6
|
+
// Estado(2: Fechado, Aberto) — Uses matcha-field/text + matcha-panel
|
|
7
|
+
// Angular: matcha-autocomplete + [matchaAutocomplete] directive
|
|
8
|
+
// Deps: matcha-panel, matcha-option, matcha-form-field
|
|
9
|
+
// =============================================================================
|
|
10
|
+
|
|
11
|
+
@mixin matcha-autocomplete-theme($theme) {
|
|
12
|
+
$is-dark: map.get($theme, is-dark);
|
|
13
|
+
|
|
14
|
+
matcha-autocomplete {
|
|
15
|
+
.matcha-autocomplete-container {
|
|
16
|
+
padding: 0 var(--matcha-space-150, 12px);
|
|
17
|
+
margin-top: calc(var(--matcha-space-150, 12px) * -1);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// ── Panel override for autocomplete context ──
|
|
22
|
+
.matcha-autocomplete-panel {
|
|
23
|
+
background: var(--matcha-color-surface, #{getSurface($theme)});
|
|
24
|
+
border: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
|
|
25
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
26
|
+
box-shadow: var(--matcha-shadow-2, #{if($is-dark, $shadow-2-dark, $shadow-2-light)});
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ── Option within autocomplete ──
|
|
31
|
+
.matcha-autocomplete-option {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: var(--matcha-space-100, 8px);
|
|
35
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
38
|
+
font-family: var(--matcha-font-family);
|
|
39
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
40
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
41
|
+
position: relative;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
|
|
44
|
+
// State layer
|
|
45
|
+
&::before {
|
|
46
|
+
content: '';
|
|
47
|
+
position: absolute;
|
|
48
|
+
inset: 0;
|
|
49
|
+
background: currentColor;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover:not([aria-disabled="true"]):not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
|
|
56
|
+
&:active:not([aria-disabled="true"]):not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
|
|
57
|
+
|
|
58
|
+
&:focus-visible {
|
|
59
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #{getAccent($theme)});
|
|
60
|
+
outline-offset: var(--matcha-state-focus-ring-offset, -2px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Selected state
|
|
64
|
+
&[aria-selected="true"],
|
|
65
|
+
&.matcha-option-selected {
|
|
66
|
+
background: var(--matcha-color-accent-alpha, #{getAccentAlpha($theme)});
|
|
67
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Disabled state
|
|
71
|
+
&[aria-disabled="true"],
|
|
72
|
+
&.matcha-option-disabled {
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
cursor: default;
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// ── Empty state (sem resultado pro filtro atual) ──
|
|
80
|
+
.matcha-autocomplete-empty {
|
|
81
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
82
|
+
text-align: center;
|
|
83
|
+
color: var(--matcha-color-text-placeholder, #{getGrey($theme)});
|
|
84
|
+
font-family: var(--matcha-font-family);
|
|
85
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
86
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
87
|
+
font-style: italic;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ── Clear button ──
|
|
91
|
+
.matcha-autocomplete-clear-button {
|
|
92
|
+
color: var(--matcha-color-text-hint, #{getBlueGrey($theme)});
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
|
|
95
|
+
&:hover {
|
|
96
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:focus-visible {
|
|
100
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #{getAccent($theme)});
|
|
101
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
102
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
108
|
+
|
|
109
|
+
matcha-autocomplete {
|
|
110
|
+
display: block;
|
|
111
|
+
width: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.matcha-autocomplete-container {
|
|
115
|
+
position: relative;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// ── Disabled state ──
|
|
119
|
+
.matcha-autocomplete-disabled {
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
opacity: 0.5;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
125
|
+
|
|
126
|
+
@media (prefers-reduced-motion: reduce) {
|
|
127
|
+
.matcha-autocomplete-panel {
|
|
128
|
+
transition: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.matcha-autocomplete-option::before {
|
|
132
|
+
transition: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// matcha-avatar.scss — Avatar component (photo, initials, placeholder + status)
|
|
3
|
+
// Aligned with Figma Avatar/Matcha: XS(24) SM(32) MD(40) LG(56) XL(80) 2XL(96)
|
|
4
|
+
// =============================================================================
|
|
5
|
+
|
|
6
|
+
// ── Structural (outside mixin) ──────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
.matcha-avatar {
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
position: relative;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
15
|
+
|
|
16
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
17
|
+
user-select: none;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
|
|
20
|
+
// ── Sizes (aligned with Figma) ──
|
|
21
|
+
&.matcha-avatar-xs,
|
|
22
|
+
&.matcha-avatar-tiny {
|
|
23
|
+
width: var(--matcha-avatar-xs, 24px);
|
|
24
|
+
height: var(--matcha-avatar-xs, 24px);
|
|
25
|
+
font-size: var(--matcha-text-2xs, 10px);
|
|
26
|
+
line-height: 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.matcha-avatar-sm,
|
|
30
|
+
&.matcha-avatar-small {
|
|
31
|
+
width: var(--matcha-avatar-sm, 32px);
|
|
32
|
+
height: var(--matcha-avatar-sm, 32px);
|
|
33
|
+
font-size: var(--matcha-text-sm, 12px);
|
|
34
|
+
line-height: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.matcha-avatar-md,
|
|
38
|
+
&.matcha-avatar-medium {
|
|
39
|
+
width: var(--matcha-avatar-md, 40px);
|
|
40
|
+
height: var(--matcha-avatar-md, 40px);
|
|
41
|
+
font-size: var(--matcha-text-md, 14px);
|
|
42
|
+
line-height: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.matcha-avatar-lg,
|
|
46
|
+
&.matcha-avatar-large {
|
|
47
|
+
width: var(--matcha-avatar-lg, 56px);
|
|
48
|
+
height: var(--matcha-avatar-lg, 56px);
|
|
49
|
+
font-size: var(--matcha-text-2xl, 20px);
|
|
50
|
+
line-height: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.matcha-avatar-xl {
|
|
54
|
+
width: var(--matcha-avatar-xl, 80px);
|
|
55
|
+
height: var(--matcha-avatar-xl, 80px);
|
|
56
|
+
font-size: var(--matcha-text-3xl, 24px);
|
|
57
|
+
line-height: 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.matcha-avatar-2xl,
|
|
61
|
+
&.matcha-avatar-huge {
|
|
62
|
+
width: var(--matcha-avatar-2xl, 96px);
|
|
63
|
+
height: var(--matcha-avatar-2xl, 96px);
|
|
64
|
+
font-size: var(--matcha-text-4xl, 32px);
|
|
65
|
+
line-height: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ── Image ──
|
|
69
|
+
.matcha-avatar-image {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
object-fit: cover;
|
|
73
|
+
border-radius: inherit;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ── Initials ──
|
|
77
|
+
.matcha-avatar-initials {
|
|
78
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
79
|
+
text-transform: uppercase;
|
|
80
|
+
letter-spacing: var(--matcha-letter-spacing-wide, 0.5px);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ── Placeholder icon ──
|
|
84
|
+
.matcha-avatar-icon {
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ── Disabled ──
|
|
90
|
+
&.matcha-avatar--disabled,
|
|
91
|
+
&.color-disabled {
|
|
92
|
+
opacity: var(--matcha-opacity-disabled, 0.38);
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ── Status indicator ────────────────────────────────────────────────────────
|
|
98
|
+
|
|
99
|
+
.matcha-avatar-status {
|
|
100
|
+
position: absolute;
|
|
101
|
+
bottom: 0;
|
|
102
|
+
right: 0;
|
|
103
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
104
|
+
border: var(--matcha-border-thin, 2px) solid var(--matcha-color-surface, white);
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
|
|
107
|
+
// Size scales with avatar
|
|
108
|
+
.matcha-avatar-xs &,
|
|
109
|
+
.matcha-avatar-tiny & { width: var(--matcha-avatar-status-xs, 8px); height: var(--matcha-avatar-status-xs, 8px); }
|
|
110
|
+
|
|
111
|
+
.matcha-avatar-sm &,
|
|
112
|
+
.matcha-avatar-small & { width: var(--matcha-avatar-status-sm, 10px); height: var(--matcha-avatar-status-sm, 10px); }
|
|
113
|
+
|
|
114
|
+
.matcha-avatar-md &,
|
|
115
|
+
.matcha-avatar-medium & { width: var(--matcha-avatar-status-md, 12px); height: var(--matcha-avatar-status-md, 12px); }
|
|
116
|
+
|
|
117
|
+
.matcha-avatar-lg &,
|
|
118
|
+
.matcha-avatar-large & { width: var(--matcha-avatar-status-lg, 14px); height: var(--matcha-avatar-status-lg, 14px); }
|
|
119
|
+
|
|
120
|
+
.matcha-avatar-xl & { width: var(--matcha-avatar-status-xl, 16px); height: var(--matcha-avatar-status-xl, 16px); }
|
|
121
|
+
|
|
122
|
+
.matcha-avatar-2xl &,
|
|
123
|
+
.matcha-avatar-huge & { width: var(--matcha-avatar-status-2xl, 18px); height: var(--matcha-avatar-status-2xl, 18px); }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ── Theme mixin ─────────────────────────────────────────────────────────────
|
|
127
|
+
|
|
128
|
+
@mixin matcha-avatar-theme($theme) {
|
|
129
|
+
.matcha-avatar {
|
|
130
|
+
.matcha-avatar-icon {
|
|
131
|
+
color: var(--matcha-color-text-placeholder, #{getGrey($theme)});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&.matcha-avatar--disabled,
|
|
135
|
+
&.color-disabled {
|
|
136
|
+
background-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
|
|
137
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
138
|
+
|
|
139
|
+
.matcha-avatar-icon {
|
|
140
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ── Status colors ──
|
|
146
|
+
.matcha-avatar-status {
|
|
147
|
+
border-color: var(--matcha-color-surface, #{getSurface($theme)});
|
|
148
|
+
|
|
149
|
+
&.matcha-avatar-status--online {
|
|
150
|
+
background-color: var(--matcha-color-success, #{getSuccess($theme)});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.matcha-avatar-status--offline {
|
|
154
|
+
background-color: var(--matcha-color-text-placeholder, #{getGrey($theme)});
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.matcha-avatar-status--busy {
|
|
158
|
+
background-color: var(--matcha-color-danger, #{getDanger($theme)});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// matcha-badge.scss — Badge component (Dot, Count, Label)
|
|
3
|
+
// Aligned with Figma matcha/badge: Tipo(3) × Cor(5) = 13 variants
|
|
4
|
+
// =============================================================================
|
|
5
|
+
|
|
6
|
+
// ── Structural ──────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
.matcha-badge-container {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.matcha-badge {
|
|
14
|
+
position: absolute;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
font-weight: var(--matcha-weight-bold, 700);
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
23
|
+
animation: matcha-badge-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
24
|
+
|
|
25
|
+
// Default position: top-right (offset negativo = -space-050 / -4px)
|
|
26
|
+
top: calc(-1 * var(--matcha-space-050, 4px));
|
|
27
|
+
right: calc(-1 * var(--matcha-space-050, 4px));
|
|
28
|
+
|
|
29
|
+
&.matcha-badge--top-left { top: calc(-1 * var(--matcha-space-050, 4px)); right: auto; left: calc(-1 * var(--matcha-space-050, 4px)); }
|
|
30
|
+
&.matcha-badge--bottom-right { top: auto; bottom: calc(-1 * var(--matcha-space-050, 4px)); right: calc(-1 * var(--matcha-space-050, 4px)); }
|
|
31
|
+
&.matcha-badge--bottom-left { top: auto; bottom: calc(-1 * var(--matcha-space-050, 4px)); right: auto; left: calc(-1 * var(--matcha-space-050, 4px)); }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ── Dot ──
|
|
35
|
+
.matcha-badge--dot {
|
|
36
|
+
width: var(--matcha-badge-dot-size, 10px);
|
|
37
|
+
height: var(--matcha-badge-dot-size, 10px);
|
|
38
|
+
border-width: var(--matcha-border-thin, 2px);
|
|
39
|
+
border-style: solid;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ── Count — Figma Tipo=Count: 20×20 pad 1/4, text 11/400/14 (caption)
|
|
43
|
+
.matcha-badge--count {
|
|
44
|
+
min-width: var(--matcha-space-250, 20px);
|
|
45
|
+
height: var(--matcha-space-250, 20px);
|
|
46
|
+
padding: 1px var(--matcha-space-050, 4px);
|
|
47
|
+
font-size: var(--matcha-text-caption, 11px);
|
|
48
|
+
line-height: var(--matcha-leading-caption, 14px);
|
|
49
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
50
|
+
letter-spacing: 0;
|
|
51
|
+
border-width: var(--matcha-border-thin, 2px);
|
|
52
|
+
border-style: solid;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// ── Label — Figma Tipo=Label: pad 2/8, text 11/400/14 (caption)
|
|
56
|
+
.matcha-badge--label {
|
|
57
|
+
position: static;
|
|
58
|
+
padding: var(--matcha-space-025, 2px) var(--matcha-space-100, 8px);
|
|
59
|
+
font-size: var(--matcha-text-caption, 11px);
|
|
60
|
+
line-height: var(--matcha-leading-caption, 14px);
|
|
61
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
62
|
+
gap: var(--matcha-space-050, 4px);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ── Inline ──
|
|
66
|
+
.matcha-badge--inline {
|
|
67
|
+
position: static;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ── Hidden ──
|
|
71
|
+
.matcha-badge--hidden {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// ── Animation ──
|
|
76
|
+
@keyframes matcha-badge-in {
|
|
77
|
+
0% { transform: scale(0); }
|
|
78
|
+
60% { transform: scale(1.2); }
|
|
79
|
+
100% { transform: scale(1); }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (prefers-reduced-motion: reduce) {
|
|
83
|
+
.matcha-badge { animation: none; }
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// =============================================================================
|
|
87
|
+
// Theme mixin
|
|
88
|
+
// =============================================================================
|
|
89
|
+
|
|
90
|
+
@mixin matcha-badge-theme($theme) {
|
|
91
|
+
.matcha-badge--accent {
|
|
92
|
+
background-color: var(--matcha-color-badge-bg, #{getAccent($theme)});
|
|
93
|
+
color: var(--matcha-color-badge-fg, #{getAccentContrast($theme)});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.matcha-badge--danger {
|
|
97
|
+
background-color: var(--matcha-color-badge-danger-bg, #{getDanger($theme)});
|
|
98
|
+
color: var(--matcha-color-badge-danger-fg, #{getDangerContrast($theme)});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.matcha-badge--warn {
|
|
102
|
+
background-color: var(--matcha-color-badge-warn-bg, #{getWarn($theme)});
|
|
103
|
+
color: var(--matcha-color-badge-warn-fg, #{getWarnContrast($theme)});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.matcha-badge--success {
|
|
107
|
+
background-color: var(--matcha-color-badge-success-bg, #{getSuccess($theme)});
|
|
108
|
+
color: var(--matcha-color-badge-success-fg, #{getSuccessContrast($theme)});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.matcha-badge--info {
|
|
112
|
+
background-color: var(--matcha-color-badge-info-bg, #{getInfo($theme)});
|
|
113
|
+
color: var(--matcha-color-badge-info-fg, #{getInfoContrast($theme)});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.matcha-badge--dot,
|
|
117
|
+
.matcha-badge--count {
|
|
118
|
+
border-color: var(--matcha-color-badge-border, #{getSurface($theme)});
|
|
119
|
+
}
|
|
120
|
+
}
|