@inchurch/matcha-theme 21.3.3 → 22.0.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.
Files changed (93) hide show
  1. package/abstracts/_colors.scss +236 -229
  2. package/abstracts/_elevation.scss +108 -108
  3. package/abstracts/_functions.scss +321 -321
  4. package/abstracts/_media-breakpoint.scss +26 -26
  5. package/abstracts/_theme-api.scss +219 -219
  6. package/abstracts/_typography.scss +128 -128
  7. package/base/_reset.scss +445 -432
  8. package/components/app-page-header.scss +260 -260
  9. package/components/matcha-accordion.scss +293 -293
  10. package/components/matcha-audio-player.scss +31 -31
  11. package/components/matcha-autocomplete.scss +145 -145
  12. package/components/matcha-avatar.scss +440 -301
  13. package/components/matcha-badge.scss +120 -120
  14. package/components/matcha-breadcrumb.scss +231 -231
  15. package/components/matcha-button-toggle.scss +384 -384
  16. package/components/matcha-buttons.scss +913 -913
  17. package/components/matcha-calendar.scss +218 -218
  18. package/components/matcha-cards.scss +230 -230
  19. package/components/matcha-chart-card.scss +53 -53
  20. package/components/matcha-checkbox.scss +255 -255
  21. package/components/matcha-chip.scss +292 -292
  22. package/components/matcha-color-pick.scss +34 -34
  23. package/components/matcha-command-palette.scss +316 -316
  24. package/components/matcha-crop.scss +406 -406
  25. package/components/matcha-date.scss +81 -81
  26. package/components/matcha-divider.scss +100 -100
  27. package/components/matcha-draggable.scss +23 -23
  28. package/components/matcha-drawer.scss +376 -376
  29. package/components/matcha-drop-image.scss +14 -14
  30. package/components/matcha-drop-list.scss +430 -430
  31. package/components/matcha-emoji.scss +69 -69
  32. package/components/matcha-empty-state.scss +230 -230
  33. package/components/matcha-file-uploader.scss +471 -471
  34. package/components/matcha-flag.scss +103 -103
  35. package/components/matcha-footer.scss +91 -91
  36. package/components/matcha-form-field.scss +606 -606
  37. package/components/matcha-form-section.scss +100 -100
  38. package/components/matcha-header.scss +135 -135
  39. package/components/matcha-highlight.scss +164 -164
  40. package/components/matcha-hint-text.scss +90 -90
  41. package/components/matcha-horizontal-tree.scss +316 -316
  42. package/components/matcha-icon.scss +98 -98
  43. package/components/matcha-image.scss +61 -61
  44. package/components/matcha-list.scss +211 -211
  45. package/components/matcha-menu.scss +99 -99
  46. package/components/matcha-modal.scss +210 -210
  47. package/components/matcha-nav.scss +581 -581
  48. package/components/matcha-notification.scss +413 -413
  49. package/components/matcha-option.scss +170 -170
  50. package/components/matcha-page-builder.scss +4196 -4196
  51. package/components/matcha-paginator.scss +689 -689
  52. package/components/matcha-panel.scss +194 -194
  53. package/components/matcha-profile-card.scss +50 -50
  54. package/components/matcha-progress-bar.scss +313 -313
  55. package/components/matcha-radio.scss +320 -320
  56. package/components/matcha-ripple.scss +7 -7
  57. package/components/matcha-scrollbar.scss +33 -33
  58. package/components/matcha-scrollbox-shadow.scss +120 -120
  59. package/components/matcha-section.scss +102 -102
  60. package/components/matcha-select-multiple.scss +56 -56
  61. package/components/matcha-select.scss +667 -667
  62. package/components/matcha-skeleton.scss +155 -155
  63. package/components/matcha-slide-toggle.scss +369 -369
  64. package/components/matcha-slider.scss +285 -285
  65. package/components/matcha-snack-bar.scss +259 -259
  66. package/components/matcha-spin.scss +164 -164
  67. package/components/matcha-spinner.scss +97 -97
  68. package/components/matcha-status-pill.scss +38 -18
  69. package/components/matcha-stepper.scss +376 -376
  70. package/components/matcha-table-cell.scss +74 -41
  71. package/components/matcha-table.scss +579 -578
  72. package/components/matcha-tabs.scss +600 -600
  73. package/components/matcha-text-editor.scss +105 -105
  74. package/components/matcha-time.scss +33 -33
  75. package/components/matcha-timepicker.scss +13 -13
  76. package/components/matcha-toolbar.scss +359 -359
  77. package/components/matcha-tooltip.scss +224 -224
  78. package/components/matcha-tree-view.scss +257 -212
  79. package/layout/matcha-page-layout.scss +778 -778
  80. package/main.scss +329 -329
  81. package/package.json +1 -1
  82. package/tokens/_animations-tokens.scss +37 -37
  83. package/tokens/_breakpoints-tokens.scss +35 -35
  84. package/tokens/_color-tokens.scss +274 -261
  85. package/tokens/_elevation-tokens.scss +33 -33
  86. package/tokens/_emit-tokens.scss +324 -324
  87. package/tokens/_material-palette.scss +1149 -1149
  88. package/tokens/_primitives.scss +98 -98
  89. package/tokens/_semantic-aliases.scss +120 -120
  90. package/tokens/_spacing-tokens.scss +94 -94
  91. package/tokens/_static-tokens.scss +137 -137
  92. package/tokens/_typography-tokens.scss +65 -65
  93. package/vendors/charts.scss +90 -90
@@ -1,164 +1,164 @@
1
- // =============================================================================
2
- // matcha-highlight — syntax highlighting via Prism.js, 1:1 com tokens DSV3.
3
- //
4
- // Antes: 5 temas (matcha/vs-code-dark/vs-code-light/dracula/none) com cores
5
- // hex hardcoded. Default monocromático (todos tokens em getBlue($theme) — bug).
6
- // Zero consumidores usavam temas alternativos — todos usam theme="matcha".
7
- //
8
- // Agora: 1 tema canônico (default), 100% tokens semânticos DSV3, auto-adapta
9
- // dark/light via CSS vars. A prop `[theme]` continua sendo aceita pra compat
10
- // dos 30+ consumidores existentes — é ignorada e renderiza o tema canon.
11
- // =============================================================================
12
-
13
- @mixin matcha-highlight-theme($theme) {
14
- matcha-highlight {
15
- padding: 16px;
16
- border-radius: var(--matcha-radius-lg, 8px);
17
- display: flex;
18
- overflow: auto;
19
- position: relative;
20
- min-height: 56px;
21
-
22
- // ── Variáveis Prism — tokens semânticos DSV3 ─────────────────────
23
- // Auto-adapta dark/light via CSS vars subjacentes.
24
- --prism-bg: var(--matcha-color-surface-inner);
25
- --prism-text: var(--matcha-color-text-primary);
26
- --prism-comment: var(--matcha-color-text-label);
27
- --prism-punctuation: var(--matcha-color-text-secondary);
28
- --prism-operator: var(--matcha-color-text-secondary);
29
-
30
- --prism-keyword: var(--matcha-color-accent);
31
- --prism-class: var(--matcha-color-accent);
32
-
33
- --prism-string: var(--matcha-color-success);
34
- --prism-regex: var(--matcha-color-success);
35
-
36
- --prism-number: var(--matcha-color-primary);
37
- --prism-function: var(--matcha-color-primary);
38
- --prism-property: var(--matcha-color-primary);
39
- --prism-variable: var(--matcha-color-text-primary);
40
- --prism-constant: var(--matcha-color-primary);
41
-
42
- --prism-type: var(--matcha-color-warn);
43
- --prism-attribute: var(--matcha-color-warn);
44
-
45
- --prism-tag: var(--matcha-color-danger);
46
- --prism-important: var(--matcha-color-danger);
47
-
48
- --code-font-family:
49
- 'Fira Code', Consolas, Menlo, Monaco, 'Andale Mono', 'Liberation Mono',
50
- 'Courier New', Courier, monospace;
51
- --code-font-size: 13px;
52
- --code-line-height: 1.6;
53
-
54
- // ── Estilos base ─────────────────────────────────────────────────
55
- background: var(--prism-bg);
56
-
57
- pre, code { margin: 0; padding: 0; }
58
-
59
- code[class*="language-"],
60
- pre[class*="language-"] {
61
- color: var(--prism-text);
62
- background: var(--prism-bg);
63
- text-shadow: none;
64
- font-family: var(--code-font-family);
65
- font-size: var(--code-font-size);
66
- text-align: left;
67
- white-space: pre;
68
- word-spacing: normal;
69
- word-break: normal;
70
- word-wrap: normal;
71
- line-height: var(--code-line-height);
72
- tab-size: 4;
73
- hyphens: none;
74
- margin: 0;
75
- padding: 0;
76
- }
77
-
78
- pre[class*="language-"] {
79
- overflow: auto;
80
- border-radius: var(--matcha-radius-lg, 8px);
81
- }
82
-
83
- code[class*="language-"] {
84
- background: transparent;
85
- }
86
-
87
- // ── Token cores (mapeamento Prism → CSS vars semânticas) ─────────
88
- .token.comment,
89
- .token.prolog,
90
- .token.doctype,
91
- .token.cdata {
92
- color: var(--prism-comment);
93
- font-style: italic;
94
- }
95
-
96
- .token.punctuation { color: var(--prism-punctuation); }
97
-
98
- .token.property,
99
- .token.tag,
100
- .token.symbol,
101
- .token.deleted {
102
- color: var(--prism-tag);
103
- }
104
-
105
- .token.boolean,
106
- .token.number,
107
- .token.constant {
108
- color: var(--prism-number);
109
- }
110
-
111
- .token.selector,
112
- .token.attr-name,
113
- .token.string,
114
- .token.char,
115
- .token.builtin,
116
- .token.inserted {
117
- color: var(--prism-string);
118
- }
119
-
120
- .token.operator,
121
- .token.entity,
122
- .token.url,
123
- .language-css .token.string,
124
- .style .token.string,
125
- .token.variable {
126
- color: var(--prism-operator);
127
- }
128
-
129
- .token.atrule,
130
- .token.attr-value,
131
- .token.function,
132
- .token.class-name {
133
- color: var(--prism-function);
134
- }
135
-
136
- .token.keyword { color: var(--prism-keyword); }
137
-
138
- .token.regex { color: var(--prism-regex); }
139
-
140
- .token.important {
141
- color: var(--prism-important);
142
- font-weight: bold;
143
- }
144
-
145
- .token.bold { font-weight: bold; }
146
- .token.italic { font-style: italic; }
147
- .token.entity { cursor: help; }
148
-
149
- // ── Container + copy button ──────────────────────────────────────
150
- .matcha-highlight-container {
151
- position: relative;
152
- border-radius: var(--matcha-radius-lg, 8px);
153
- }
154
-
155
- .copy-button {
156
- opacity: 0;
157
- transition: opacity 0.2s ease;
158
- }
159
-
160
- &:hover .copy-button { opacity: 1; }
161
-
162
- .highlight-content { position: relative; }
163
- }
164
- }
1
+ // =============================================================================
2
+ // matcha-highlight — syntax highlighting via Prism.js, 1:1 com tokens DSV3.
3
+ //
4
+ // Antes: 5 temas (matcha/vs-code-dark/vs-code-light/dracula/none) com cores
5
+ // hex hardcoded. Default monocromático (todos tokens em getBlue($theme) — bug).
6
+ // Zero consumidores usavam temas alternativos — todos usam theme="matcha".
7
+ //
8
+ // Agora: 1 tema canônico (default), 100% tokens semânticos DSV3, auto-adapta
9
+ // dark/light via CSS vars. A prop `[theme]` continua sendo aceita pra compat
10
+ // dos 30+ consumidores existentes — é ignorada e renderiza o tema canon.
11
+ // =============================================================================
12
+
13
+ @mixin matcha-highlight-theme($theme) {
14
+ matcha-highlight {
15
+ padding: 16px;
16
+ border-radius: var(--matcha-radius-lg, 8px);
17
+ display: flex;
18
+ overflow: auto;
19
+ position: relative;
20
+ min-height: 56px;
21
+
22
+ // ── Variáveis Prism — tokens semânticos DSV3 ─────────────────────
23
+ // Auto-adapta dark/light via CSS vars subjacentes.
24
+ --prism-bg: var(--matcha-color-surface-inner);
25
+ --prism-text: var(--matcha-color-text-primary);
26
+ --prism-comment: var(--matcha-color-text-label);
27
+ --prism-punctuation: var(--matcha-color-text-secondary);
28
+ --prism-operator: var(--matcha-color-text-secondary);
29
+
30
+ --prism-keyword: var(--matcha-color-accent);
31
+ --prism-class: var(--matcha-color-accent);
32
+
33
+ --prism-string: var(--matcha-color-success);
34
+ --prism-regex: var(--matcha-color-success);
35
+
36
+ --prism-number: var(--matcha-color-primary);
37
+ --prism-function: var(--matcha-color-primary);
38
+ --prism-property: var(--matcha-color-primary);
39
+ --prism-variable: var(--matcha-color-text-primary);
40
+ --prism-constant: var(--matcha-color-primary);
41
+
42
+ --prism-type: var(--matcha-color-warn);
43
+ --prism-attribute: var(--matcha-color-warn);
44
+
45
+ --prism-tag: var(--matcha-color-danger);
46
+ --prism-important: var(--matcha-color-danger);
47
+
48
+ --code-font-family:
49
+ 'Fira Code', Consolas, Menlo, Monaco, 'Andale Mono', 'Liberation Mono',
50
+ 'Courier New', Courier, monospace;
51
+ --code-font-size: 13px;
52
+ --code-line-height: 1.6;
53
+
54
+ // ── Estilos base ─────────────────────────────────────────────────
55
+ background: var(--prism-bg);
56
+
57
+ pre, code { margin: 0; padding: 0; }
58
+
59
+ code[class*="language-"],
60
+ pre[class*="language-"] {
61
+ color: var(--prism-text);
62
+ background: var(--prism-bg);
63
+ text-shadow: none;
64
+ font-family: var(--code-font-family);
65
+ font-size: var(--code-font-size);
66
+ text-align: left;
67
+ white-space: pre;
68
+ word-spacing: normal;
69
+ word-break: normal;
70
+ word-wrap: normal;
71
+ line-height: var(--code-line-height);
72
+ tab-size: 4;
73
+ hyphens: none;
74
+ margin: 0;
75
+ padding: 0;
76
+ }
77
+
78
+ pre[class*="language-"] {
79
+ overflow: auto;
80
+ border-radius: var(--matcha-radius-lg, 8px);
81
+ }
82
+
83
+ code[class*="language-"] {
84
+ background: transparent;
85
+ }
86
+
87
+ // ── Token cores (mapeamento Prism → CSS vars semânticas) ─────────
88
+ .token.comment,
89
+ .token.prolog,
90
+ .token.doctype,
91
+ .token.cdata {
92
+ color: var(--prism-comment);
93
+ font-style: italic;
94
+ }
95
+
96
+ .token.punctuation { color: var(--prism-punctuation); }
97
+
98
+ .token.property,
99
+ .token.tag,
100
+ .token.symbol,
101
+ .token.deleted {
102
+ color: var(--prism-tag);
103
+ }
104
+
105
+ .token.boolean,
106
+ .token.number,
107
+ .token.constant {
108
+ color: var(--prism-number);
109
+ }
110
+
111
+ .token.selector,
112
+ .token.attr-name,
113
+ .token.string,
114
+ .token.char,
115
+ .token.builtin,
116
+ .token.inserted {
117
+ color: var(--prism-string);
118
+ }
119
+
120
+ .token.operator,
121
+ .token.entity,
122
+ .token.url,
123
+ .language-css .token.string,
124
+ .style .token.string,
125
+ .token.variable {
126
+ color: var(--prism-operator);
127
+ }
128
+
129
+ .token.atrule,
130
+ .token.attr-value,
131
+ .token.function,
132
+ .token.class-name {
133
+ color: var(--prism-function);
134
+ }
135
+
136
+ .token.keyword { color: var(--prism-keyword); }
137
+
138
+ .token.regex { color: var(--prism-regex); }
139
+
140
+ .token.important {
141
+ color: var(--prism-important);
142
+ font-weight: bold;
143
+ }
144
+
145
+ .token.bold { font-weight: bold; }
146
+ .token.italic { font-style: italic; }
147
+ .token.entity { cursor: help; }
148
+
149
+ // ── Container + copy button ──────────────────────────────────────
150
+ .matcha-highlight-container {
151
+ position: relative;
152
+ border-radius: var(--matcha-radius-lg, 8px);
153
+ }
154
+
155
+ .copy-button {
156
+ opacity: 0;
157
+ transition: opacity 0.2s ease;
158
+ }
159
+
160
+ &:hover .copy-button { opacity: 1; }
161
+
162
+ .highlight-content { position: relative; }
163
+ }
164
+ }
@@ -1,90 +1,90 @@
1
- @use "../abstracts/media-breakpoint" as *;
2
- @use "../abstracts/functions" as *;
3
- @use "../tokens/breakpoints-tokens" as *;
4
- // =============================================================================
5
- // matcha-hint-text.scss — Hint/error/warning/info/success text
6
- // Aligned with Figma matcha/hint-text: Tipo(4) × Tamanho(SM/MD) = 8 variants
7
- // =============================================================================
8
-
9
- @mixin generate-matcha-hint-size-classes($helper-breakpoints) {
10
- @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
11
- @include media-breakpoint($materialBreakpoint) {
12
- $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
13
-
14
- &[size#{$infix}="sm"],
15
- &[size#{$infix}="tiny"] {
16
- font-size: px-to-rem(12px);
17
- line-height: px-to-rem(16px);
18
-
19
- matcha-icon span {
20
- width: px-to-rem(16px);
21
- height: px-to-rem(16px);
22
- font-size: px-to-rem(16px);
23
- line-height: px-to-rem(16px);
24
- }
25
- }
26
-
27
- &[size#{$infix}="md"],
28
- &[size#{$infix}="medium"] {
29
- font-size: px-to-rem(14px);
30
- line-height: px-to-rem(24px);
31
-
32
- matcha-icon,
33
- matcha-icon span {
34
- width: px-to-rem(24px);
35
- height: px-to-rem(24px);
36
- font-size: px-to-rem(24px);
37
- line-height: px-to-rem(24px);
38
- }
39
- }
40
- }
41
- }
42
- }
43
-
44
- @mixin matcha-hint-text($theme) {
45
- matcha-hint-text {
46
- width: 100%;
47
- display: flex;
48
- align-items: center;
49
- gap: var(--matcha-space-050, 4px);
50
-
51
- @include generate-matcha-hint-size-classes($helper-breakpoints);
52
-
53
- &[type="error"] {
54
- color: var(--matcha-color-danger);
55
- }
56
-
57
- &[type="warning"] {
58
- color: var(--matcha-color-warn);
59
- }
60
-
61
- &[type="info"] {
62
- color: var(--matcha-color-info);
63
- }
64
-
65
- &[type="success"] {
66
- color: var(--matcha-color-success);
67
- }
68
- }
69
- }
70
-
71
- // ── Forced colors ──
72
- // Em high-contrast, type colors viram CanvasText (perdem distinção semântica).
73
- // Texto fica legível; signal visual fica via prefix do consumer (ícone, etc).
74
- @media (forced-colors: active) {
75
- matcha-hint-text {
76
- color: CanvasText !important;
77
- }
78
- }
79
-
80
- // ── Reduced motion ──
81
- @media (prefers-reduced-motion: reduce) {
82
- matcha-hint-text {
83
- transition: none !important;
84
- animation: none !important;
85
- }
86
- }
87
-
88
- // ── Print ──
89
- // Hint text é informacional (validation/error) — mantém visível.
90
- // Sem mudança necessária — fonte herdada do contexto já é apropriada pra papel.
1
+ @use "../abstracts/media-breakpoint" as *;
2
+ @use "../abstracts/functions" as *;
3
+ @use "../tokens/breakpoints-tokens" as *;
4
+ // =============================================================================
5
+ // matcha-hint-text.scss — Hint/error/warning/info/success text
6
+ // Aligned with Figma matcha/hint-text: Tipo(4) × Tamanho(SM/MD) = 8 variants
7
+ // =============================================================================
8
+
9
+ @mixin generate-matcha-hint-size-classes($helper-breakpoints) {
10
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
11
+ @include media-breakpoint($materialBreakpoint) {
12
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
13
+
14
+ &[size#{$infix}="sm"],
15
+ &[size#{$infix}="tiny"] {
16
+ font-size: px-to-rem(12px);
17
+ line-height: px-to-rem(16px);
18
+
19
+ matcha-icon span {
20
+ width: px-to-rem(16px);
21
+ height: px-to-rem(16px);
22
+ font-size: px-to-rem(16px);
23
+ line-height: px-to-rem(16px);
24
+ }
25
+ }
26
+
27
+ &[size#{$infix}="md"],
28
+ &[size#{$infix}="medium"] {
29
+ font-size: px-to-rem(14px);
30
+ line-height: px-to-rem(24px);
31
+
32
+ matcha-icon,
33
+ matcha-icon span {
34
+ width: px-to-rem(24px);
35
+ height: px-to-rem(24px);
36
+ font-size: px-to-rem(24px);
37
+ line-height: px-to-rem(24px);
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ @mixin matcha-hint-text($theme) {
45
+ matcha-hint-text {
46
+ width: 100%;
47
+ display: flex;
48
+ align-items: center;
49
+ gap: var(--matcha-space-050, 4px);
50
+
51
+ @include generate-matcha-hint-size-classes($helper-breakpoints);
52
+
53
+ &[type="error"] {
54
+ color: var(--matcha-color-danger);
55
+ }
56
+
57
+ &[type="warning"] {
58
+ color: var(--matcha-color-warn);
59
+ }
60
+
61
+ &[type="info"] {
62
+ color: var(--matcha-color-info);
63
+ }
64
+
65
+ &[type="success"] {
66
+ color: var(--matcha-color-success);
67
+ }
68
+ }
69
+ }
70
+
71
+ // ── Forced colors ──
72
+ // Em high-contrast, type colors viram CanvasText (perdem distinção semântica).
73
+ // Texto fica legível; signal visual fica via prefix do consumer (ícone, etc).
74
+ @media (forced-colors: active) {
75
+ matcha-hint-text {
76
+ color: CanvasText !important;
77
+ }
78
+ }
79
+
80
+ // ── Reduced motion ──
81
+ @media (prefers-reduced-motion: reduce) {
82
+ matcha-hint-text {
83
+ transition: none !important;
84
+ animation: none !important;
85
+ }
86
+ }
87
+
88
+ // ── Print ──
89
+ // Hint text é informacional (validation/error) — mantém visível.
90
+ // Sem mudança necessária — fonte herdada do contexto já é apropriada pra papel.