@inchurch/matcha-theme 22.7.0 → 22.9.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-button-toggle.scss +54 -9
- package/components/matcha-buttons.scss +4 -2
- package/components/matcha-calendar.scss +9 -2
- package/components/matcha-icon.scss +18 -5
- package/components/matcha-notification.scss +1 -1
- package/components/matcha-panel.scss +9 -2
- package/components/matcha-tabs.scss +5 -3
- package/package.json +1 -1
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"primary", "accent", "success", "warn", "danger", "info", "disabled";
|
|
218
218
|
|
|
219
219
|
matcha-button-toggle {
|
|
220
|
-
display: flex;
|
|
220
|
+
display: inline-flex;
|
|
221
221
|
@include _colorize-inactive-type-solid-button-toggle-item($theme, $color-functions);
|
|
222
222
|
@include _colorize-inactive-type-basic-button-toggle-item($theme, $color-functions);
|
|
223
223
|
@include _colorize-inactive-type-outline-button-toggle-item($theme, $color-functions);
|
|
@@ -229,7 +229,10 @@ matcha-button-toggle {
|
|
|
229
229
|
a[matcha-button] {
|
|
230
230
|
&:focus-visible:not([disabled]):not([disabled="true"]) {
|
|
231
231
|
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
232
|
-
|
|
232
|
+
// Inset (negativo): o .button-group é scroll container (overflow-x)
|
|
233
|
+
// e clipa qualquer outline desenhado FORA do botão — anel interno
|
|
234
|
+
// fica 100% visível mesmo com rolagem.
|
|
235
|
+
outline-offset: calc(-1 * (var(--matcha-state-focus-ring-width, 2px) + var(--matcha-state-focus-ring-offset, 2px)));
|
|
233
236
|
}
|
|
234
237
|
}
|
|
235
238
|
}
|
|
@@ -295,7 +298,7 @@ matcha-button-toggle {
|
|
|
295
298
|
|
|
296
299
|
&:focus-visible {
|
|
297
300
|
outline: 2px solid CanvasText !important;
|
|
298
|
-
outline-offset:
|
|
301
|
+
outline-offset: -4px; // inset — scroll container clipa outline externo
|
|
299
302
|
}
|
|
300
303
|
}
|
|
301
304
|
}
|
|
@@ -323,23 +326,65 @@ matcha-button-toggle {
|
|
|
323
326
|
// Structural rules — aligned with Figma matcha/button-toggle:
|
|
324
327
|
// Gap=Segmented: buttons share borders (1px hairline between, 2px thin outside)
|
|
325
328
|
// Gap=Separated: buttons stand apart with gap=space/200 and full radius-lg each
|
|
329
|
+
// Width: hug content by default (Figma); [stretched] opta pelo fill 100%
|
|
330
|
+
// com botões dividindo a largura igualmente.
|
|
326
331
|
// =============================================================================
|
|
327
332
|
matcha-button-toggle {
|
|
328
|
-
display:
|
|
329
|
-
width: 100%;
|
|
333
|
+
display: inline-flex;
|
|
334
|
+
max-width: 100%;
|
|
330
335
|
|
|
331
336
|
.button-group {
|
|
332
337
|
display: flex;
|
|
333
|
-
width: 100%;
|
|
334
338
|
align-items: stretch;
|
|
339
|
+
max-width: 100%;
|
|
340
|
+
|
|
341
|
+
// ── Overflow: botão NUNCA é esmagado — no pior caso, rola ─────────
|
|
342
|
+
// flex-shrink default (1) comprimia o conteúdo dos botões quando o
|
|
343
|
+
// container aperta. Botões mantêm largura natural (flex: 0 0 auto +
|
|
344
|
+
// nowrap) e o grupo cria rolagem horizontal.
|
|
345
|
+
overflow-x: auto;
|
|
346
|
+
overflow-y: hidden;
|
|
347
|
+
-webkit-overflow-scrolling: touch;
|
|
348
|
+
|
|
349
|
+
// Scrollbar fino e temado (mesmo padrão do matcha-form-field) —
|
|
350
|
+
// só aparece quando há overflow real.
|
|
351
|
+
scrollbar-width: thin; // Firefox
|
|
352
|
+
scrollbar-color: var(--matcha-color-text-placeholder) transparent;
|
|
353
|
+
&::-webkit-scrollbar { height: 6px; }
|
|
354
|
+
&::-webkit-scrollbar-track { background: transparent; }
|
|
355
|
+
&::-webkit-scrollbar-thumb {
|
|
356
|
+
background: var(--matcha-color-text-placeholder);
|
|
357
|
+
border-radius: 3px;
|
|
358
|
+
}
|
|
359
|
+
&::-webkit-scrollbar-thumb:hover { background: var(--matcha-color-text-secondary); }
|
|
335
360
|
|
|
336
|
-
// Children flex-share — each button takes equal width across the row
|
|
337
361
|
> button[matcha-button],
|
|
338
362
|
> a[matcha-button] {
|
|
339
|
-
flex:
|
|
340
|
-
|
|
363
|
+
flex: 0 0 auto;
|
|
364
|
+
white-space: nowrap;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// ── Stretched (opt-in via [stretched]) — fill 100% do container ───────
|
|
369
|
+
// Era o default até a 20.x; agora requer a propriedade.
|
|
370
|
+
&[stretched]:not([stretched="false"]) {
|
|
371
|
+
display: flex;
|
|
372
|
+
width: 100%;
|
|
373
|
+
|
|
374
|
+
.button-group {
|
|
375
|
+
width: 100%;
|
|
376
|
+
|
|
377
|
+
// Children flex-share — each button takes equal width across the row.
|
|
378
|
+
// SEM min-width: 0 — o botão nunca encolhe abaixo do conteúdo
|
|
379
|
+
// (min-content); quando nem isso cabe, o overflow-x do grupo rola.
|
|
380
|
+
> button[matcha-button],
|
|
381
|
+
> a[matcha-button] {
|
|
382
|
+
flex: 1 1 0;
|
|
383
|
+
}
|
|
341
384
|
}
|
|
385
|
+
}
|
|
342
386
|
|
|
387
|
+
.button-group {
|
|
343
388
|
// ── Separated (default: gap = space/200) ──────────────────────────
|
|
344
389
|
// Each button keeps its own full radius and border-thin (2px).
|
|
345
390
|
// gap already handled by flex gap via [gap] binding in TS.
|
|
@@ -476,12 +476,14 @@ a[matcha-link] {
|
|
|
476
476
|
|
|
477
477
|
// ── Touch targets (WCAG 2.5.5: 44x44 mínimo em coarse pointers) ──
|
|
478
478
|
// XS (28), SM (32), MD (40) ficam abaixo de 44px — expande hit area invisível.
|
|
479
|
+
// NÃO re-declarar `position` aqui: o bloco estrutural acima já garante botão
|
|
480
|
+
// positioned (relative), e o ::after ancora em qualquer positioned. Re-assertar
|
|
481
|
+
// com [size] sobe a especificidade pra (0,2,1) e quebra consumidores que
|
|
482
|
+
// reposicionam o botão com absolute (close mobile do notification/banner).
|
|
479
483
|
@media (pointer: coarse) {
|
|
480
484
|
&[size="xs"],
|
|
481
485
|
&[size="sm"], &[size="tiny"],
|
|
482
486
|
&[size="md"], &[size="small"] {
|
|
483
|
-
position: relative;
|
|
484
|
-
|
|
485
487
|
&::after {
|
|
486
488
|
content: '';
|
|
487
489
|
position: absolute;
|
|
@@ -16,8 +16,15 @@
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// ── Header ──────────────────────────────────────────────
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
// Fundo accent-alpha em repouso (não só no hover) — sinaliza de cara que o
|
|
20
|
+
// label do mês/ano é clicável (abre view ano/década), não só um título.
|
|
21
|
+
// Seletor com o pai (.matcha-calendar-header) — precisa de +especificidade
|
|
22
|
+
// que o próprio `all: unset` da célula, que carrega DEPOIS (CSS de
|
|
23
|
+
// componente ViewEncapsulation.None sempre entra depois do CSS global do
|
|
24
|
+
// tema) e tem a mesma especificidade se for só a classe sozinha.
|
|
25
|
+
.matcha-calendar-header .matcha-calendar-header-label {
|
|
26
|
+
color: var(--matcha-color-accent);
|
|
27
|
+
background-color: var(--matcha-color-accent-alpha);
|
|
21
28
|
|
|
22
29
|
&:hover {
|
|
23
30
|
background-color: var(--matcha-color-surface-hover, rgba(255, 255, 255, 0.08));
|
|
@@ -27,8 +27,13 @@ matcha-icon[library="symbols"] {
|
|
|
27
27
|
height: var(--matcha-icon-size-md);
|
|
28
28
|
line-height: var(--matcha-icon-size-md);
|
|
29
29
|
|
|
30
|
+
// Canonico e por extenso (tiny/small/medium/large/huge) — regra DS-wide, os
|
|
31
|
+
// infixes xs/sm/md/lg/xl sao reservados pra breakpoint. Abreviado aceito aqui
|
|
32
|
+
// so como alias @deprecated (mesmo valor renderizado, 1:1 com size-alias.ts).
|
|
30
33
|
&.i-size-xs,
|
|
31
|
-
|
|
34
|
+
&.i-size-tiny,
|
|
35
|
+
&[size="xs"],
|
|
36
|
+
&[size="tiny"] {
|
|
32
37
|
font-size: var(--matcha-icon-size-xs, #{$icon-size-xs});
|
|
33
38
|
width: var(--matcha-icon-size-xs, #{$icon-size-xs});
|
|
34
39
|
height: var(--matcha-icon-size-xs, #{$icon-size-xs});
|
|
@@ -36,7 +41,9 @@ matcha-icon[library="symbols"] {
|
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
&.i-size-sm,
|
|
39
|
-
|
|
44
|
+
&.i-size-small,
|
|
45
|
+
&[size="sm"],
|
|
46
|
+
&[size="small"] {
|
|
40
47
|
font-size: var(--matcha-icon-size-sm);
|
|
41
48
|
width: var(--matcha-icon-size-sm);
|
|
42
49
|
height: var(--matcha-icon-size-sm);
|
|
@@ -44,7 +51,9 @@ matcha-icon[library="symbols"] {
|
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
&.i-size-md,
|
|
47
|
-
|
|
54
|
+
&.i-size-medium,
|
|
55
|
+
&[size="md"],
|
|
56
|
+
&[size="medium"] {
|
|
48
57
|
font-size: var(--matcha-icon-size-md);
|
|
49
58
|
width: var(--matcha-icon-size-md);
|
|
50
59
|
height: var(--matcha-icon-size-md);
|
|
@@ -52,7 +61,9 @@ matcha-icon[library="symbols"] {
|
|
|
52
61
|
}
|
|
53
62
|
|
|
54
63
|
&.i-size-lg,
|
|
55
|
-
|
|
64
|
+
&.i-size-large,
|
|
65
|
+
&[size="lg"],
|
|
66
|
+
&[size="large"] {
|
|
56
67
|
font-size: var(--matcha-icon-size-lg);
|
|
57
68
|
width: var(--matcha-icon-size-lg);
|
|
58
69
|
height: var(--matcha-icon-size-lg);
|
|
@@ -60,7 +71,9 @@ matcha-icon[library="symbols"] {
|
|
|
60
71
|
}
|
|
61
72
|
|
|
62
73
|
&.i-size-xl,
|
|
63
|
-
|
|
74
|
+
&.i-size-huge,
|
|
75
|
+
&[size="xl"],
|
|
76
|
+
&[size="huge"] {
|
|
64
77
|
font-size: var(--matcha-icon-size-xl);
|
|
65
78
|
width: var(--matcha-icon-size-xl);
|
|
66
79
|
height: var(--matcha-icon-size-xl);
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
&:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
// ── Mobile (≤
|
|
302
|
+
// ── Mobile (xs, ≤479px) ─────────────────────────────────────────────────
|
|
303
303
|
// Stack vertical (mesmo padrão do matcha-banner mobile):
|
|
304
304
|
// [icon na 1ª linha (align-self start)]
|
|
305
305
|
// → [body (title + description)]
|
|
@@ -100,15 +100,22 @@
|
|
|
100
100
|
// ── Bottom-sheet em mobile (≤ 600px) ────────────────────────
|
|
101
101
|
// O panel com calendar vira um painel full-width grudado no rodapé da tela,
|
|
102
102
|
// com backdrop translúcido e slide-up. Sobrescreve o transform inline do JS.
|
|
103
|
+
//
|
|
104
|
+
// IMPORTANTE: escopar ao overlay ABERTO (`:not([hidden])`). O overlay fica sempre
|
|
105
|
+
// no DOM (o `display: block` da base anula o atributo [hidden] de propósito — o
|
|
106
|
+
// posicionamento mede o conteúdo fechado), e o <matcha-calendar> do matcha-date é
|
|
107
|
+
// renderizado mesmo com o picker fechado. Sem o escopo, qualquer página com um
|
|
108
|
+
// matcha-date pintava o scrim blurred permanente em mobile e o `pointer-events:
|
|
109
|
+
// auto` bloqueava TODOS os cliques da tela.
|
|
103
110
|
@media (max-width: 639px) {
|
|
104
|
-
.matcha-panel-overlay:has(.matcha-calendar) {
|
|
111
|
+
.matcha-panel-overlay:not([hidden]):has(.matcha-calendar) {
|
|
105
112
|
pointer-events: auto !important; // precisa capturar o backdrop
|
|
106
113
|
background: var(--matcha-scrim-drawer, rgba(0, 0, 0, 0.3));
|
|
107
114
|
backdrop-filter: blur(var(--matcha-scrim-drawer-blur, 4px));
|
|
108
115
|
animation: matcha-panel-backdrop-fade var(--matcha-duration-fast, 200ms) var(--matcha-easing-standard, cubic-bezier(0.4, 0, 0.2, 1));
|
|
109
116
|
}
|
|
110
117
|
|
|
111
|
-
.matcha-panel-pane:has(.matcha-calendar) {
|
|
118
|
+
.matcha-panel-overlay:not([hidden]) .matcha-panel-pane:has(.matcha-calendar) {
|
|
112
119
|
position: fixed !important;
|
|
113
120
|
inset: auto 0 0 0 !important;
|
|
114
121
|
top: auto !important;
|
|
@@ -296,8 +296,10 @@ matcha-tabs {
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
// ── Underline Tab (1:1 Figma DSV3 — border per item) ──────────────────
|
|
299
|
-
//
|
|
300
|
-
//
|
|
299
|
+
// Item transparente + border-bottom (surface-border default, accent
|
|
300
|
+
// selected) — sem bg próprio: o retângulo de surface-card destoava quando
|
|
301
|
+
// o tablist ficava sobre superfície de outro tom (painel, jul/2026).
|
|
302
|
+
// Container não tem border próprio (canon Figma).
|
|
301
303
|
// Sliding indicator absoluto desliza entre tabs (Material 3 style).
|
|
302
304
|
// Sempre horizontal (vertical não é canon).
|
|
303
305
|
.matcha-tab-underline {
|
|
@@ -340,7 +342,7 @@ matcha-tabs {
|
|
|
340
342
|
// Border bottom 2px — per item (track surface-border, slider sobrepõe accent)
|
|
341
343
|
border-bottom: var(--matcha-border-thin, 2px) solid
|
|
342
344
|
var(--matcha-color-surface-border);
|
|
343
|
-
background:
|
|
345
|
+
background: transparent;
|
|
344
346
|
cursor: pointer;
|
|
345
347
|
position: relative;
|
|
346
348
|
overflow: hidden;
|