@inchurch/matcha-theme 22.36.1 → 22.36.2
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.
|
@@ -461,3 +461,24 @@ matcha-button-toggle {
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
+
|
|
465
|
+
// =============================================================================
|
|
466
|
+
// Readonly — seleção legível, clique inerte
|
|
467
|
+
// =============================================================================
|
|
468
|
+
// NENHUMA troca de cor aqui, e é isso que separa `readonly` de `disabled`: o bloco
|
|
469
|
+
// `&[disabled]` acima aplica os mixins `disabled-*-button` nos botões inativos, apagando
|
|
470
|
+
// justamente o contraste que diz qual opção está selecionada. Numa tela cujo propósito é LER
|
|
471
|
+
// esse estado, apagá-lo é o oposto do que se quer.
|
|
472
|
+
//
|
|
473
|
+
// O que muda é só a promessa de interação: o ponteiro deixa de sugerir clique. A inércia em si
|
|
474
|
+
// mora no `onSelect` do componente, não aqui — CSS não deve ser a trava.
|
|
475
|
+
matcha-button-toggle[readonly] {
|
|
476
|
+
|
|
477
|
+
.button-group {
|
|
478
|
+
|
|
479
|
+
button[matcha-button],
|
|
480
|
+
a[matcha-button] {
|
|
481
|
+
cursor: default;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
@@ -13,16 +13,19 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// ── Hover (off) — bg sutil surface alpha (Figma matcha/state-layer) ─
|
|
16
|
-
|
|
16
|
+
// `[readonly]` entra nas guardas de hover/active junto de `[disabled]`: nao vai
|
|
17
|
+
// acontecer nada no clique, entao prometer interacao e mentir. Mas NAO entra nas regras
|
|
18
|
+
// de COR abaixo — e justamente por isso que readonly existe: o estado continua legivel.
|
|
19
|
+
&:not([disabled]):not([readonly]):hover .matcha-checkbox-container {
|
|
17
20
|
background: var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.04));
|
|
18
21
|
box-shadow: var(--matcha-shadow-1);
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
// ── Hover/Focus quando checked/indeterminate — accent-alpha bg ─────
|
|
22
|
-
&:not([disabled]):hover :is([checked], [indeterminate]) ~ .matcha-checkbox-container,
|
|
25
|
+
&:not([disabled]):not([readonly]):hover :is([checked], [indeterminate]) ~ .matcha-checkbox-container,
|
|
23
26
|
// fallback global (estado checked/indeterminate sem condicional)
|
|
24
|
-
&:not([disabled]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--checked),
|
|
25
|
-
&:not([disabled]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--indeterminate) {
|
|
27
|
+
&:not([disabled]):not([readonly]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--checked),
|
|
28
|
+
&:not([disabled]):not([readonly]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--indeterminate) {
|
|
26
29
|
background: var(--matcha-color-accent-alpha, rgba(0, 148, 0, 0.1));
|
|
27
30
|
}
|
|
28
31
|
|
|
@@ -67,6 +70,14 @@
|
|
|
67
70
|
&[disabled] .matcha-checkbox-label {
|
|
68
71
|
color: var(--matcha-color-disabled-fg);
|
|
69
72
|
}
|
|
73
|
+
|
|
74
|
+
// ── Readonly — cursor de leitura, e NENHUMA troca de cor ───────────
|
|
75
|
+
// O ponteiro deixa de ser `pointer` porque nao ha o que acionar; o glyph e o label
|
|
76
|
+
// ficam com a cor normal, que e o ponto de usar readonly em vez de disabled.
|
|
77
|
+
&[readonly] .matcha-checkbox,
|
|
78
|
+
&[readonly] .matcha-checkbox-container {
|
|
79
|
+
cursor: default;
|
|
80
|
+
}
|
|
70
81
|
}
|
|
71
82
|
}
|
|
72
83
|
|
|
@@ -107,7 +118,7 @@ $matcha-checkbox-touch: 36px;
|
|
|
107
118
|
}
|
|
108
119
|
|
|
109
120
|
// Active overlay — só quando não disabled
|
|
110
|
-
matcha-checkbox:not([disabled]) .matcha-checkbox-container:active::before {
|
|
121
|
+
matcha-checkbox:not([disabled]):not([readonly]) .matcha-checkbox-container:active::before {
|
|
111
122
|
opacity: var(--matcha-state-active);
|
|
112
123
|
}
|
|
113
124
|
|
|
@@ -46,6 +46,17 @@
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
// Texto do tooltip — `pre-line` respeita as quebras (`\n`) que o directive insere
|
|
50
|
+
// entre os itens quando `matchaTooltip` recebe um array (1 informação por linha);
|
|
51
|
+
// linhas longas ainda quebram normalmente. O alinhamento vem da custom property
|
|
52
|
+
// `--matcha-tooltip-text-align` que o directive seta a partir de `matchaTooltipAlign`
|
|
53
|
+
// (default center) — só é perceptível com múltiplas linhas.
|
|
54
|
+
.matcha-tooltip-text {
|
|
55
|
+
white-space: pre-line;
|
|
56
|
+
overflow-wrap: anywhere;
|
|
57
|
+
text-align: var(--matcha-tooltip-text-align, center);
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
// ── Arrow (mesma cor do bg) — 13.856×6 — ::after triangular ────────────────
|
|
50
61
|
// Tamanho via border-style: solid trick. base 13.856 ≈ 2×7px borders → border-width
|
|
51
62
|
// horizontal ~7, vertical 6. Mantemos arredondado pelo Figma (13.856 × 6).
|