@inchurch/matcha-theme 21.4.0 → 22.1.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 (94) hide show
  1. package/abstracts/_colors.scss +236 -236
  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 +446 -445
  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 +383 -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-contact.scss +35 -0
  25. package/components/matcha-crop.scss +406 -406
  26. package/components/matcha-date.scss +81 -81
  27. package/components/matcha-divider.scss +100 -100
  28. package/components/matcha-draggable.scss +23 -23
  29. package/components/matcha-drawer.scss +376 -376
  30. package/components/matcha-drop-image.scss +14 -14
  31. package/components/matcha-drop-list.scss +430 -430
  32. package/components/matcha-emoji.scss +69 -69
  33. package/components/matcha-empty-state.scss +230 -230
  34. package/components/matcha-file-uploader.scss +471 -471
  35. package/components/matcha-flag.scss +103 -103
  36. package/components/matcha-footer.scss +91 -91
  37. package/components/matcha-form-field.scss +606 -606
  38. package/components/matcha-form-section.scss +100 -100
  39. package/components/matcha-header.scss +135 -135
  40. package/components/matcha-highlight.scss +164 -164
  41. package/components/matcha-hint-text.scss +90 -90
  42. package/components/matcha-horizontal-tree.scss +316 -316
  43. package/components/matcha-icon.scss +98 -98
  44. package/components/matcha-image.scss +61 -61
  45. package/components/matcha-list.scss +211 -211
  46. package/components/matcha-menu.scss +99 -99
  47. package/components/matcha-modal.scss +210 -210
  48. package/components/matcha-nav.scss +581 -581
  49. package/components/matcha-notification.scss +413 -413
  50. package/components/matcha-option.scss +170 -170
  51. package/components/matcha-page-builder.scss +4196 -4196
  52. package/components/matcha-paginator.scss +689 -689
  53. package/components/matcha-panel.scss +194 -194
  54. package/components/matcha-profile-card.scss +50 -50
  55. package/components/matcha-progress-bar.scss +313 -313
  56. package/components/matcha-radio.scss +320 -320
  57. package/components/matcha-ripple.scss +7 -7
  58. package/components/matcha-scrollbar.scss +33 -33
  59. package/components/matcha-scrollbox-shadow.scss +120 -120
  60. package/components/matcha-section.scss +102 -102
  61. package/components/matcha-select-multiple.scss +56 -56
  62. package/components/matcha-select.scss +667 -667
  63. package/components/matcha-skeleton.scss +155 -155
  64. package/components/matcha-slide-toggle.scss +369 -369
  65. package/components/matcha-slider.scss +285 -285
  66. package/components/matcha-snack-bar.scss +259 -259
  67. package/components/matcha-spin.scss +164 -164
  68. package/components/matcha-spinner.scss +97 -97
  69. package/components/matcha-status-pill.scss +38 -18
  70. package/components/matcha-stepper.scss +376 -376
  71. package/components/matcha-table-cell.scss +49 -41
  72. package/components/matcha-table.scss +579 -579
  73. package/components/matcha-tabs.scss +600 -600
  74. package/components/matcha-text-editor.scss +105 -105
  75. package/components/matcha-time.scss +33 -33
  76. package/components/matcha-timepicker.scss +13 -13
  77. package/components/matcha-toolbar.scss +359 -359
  78. package/components/matcha-tooltip.scss +224 -224
  79. package/components/matcha-tree-view.scss +257 -257
  80. package/layout/matcha-page-layout.scss +778 -778
  81. package/main.scss +331 -329
  82. package/package.json +1 -1
  83. package/tokens/_animations-tokens.scss +37 -37
  84. package/tokens/_breakpoints-tokens.scss +35 -35
  85. package/tokens/_color-tokens.scss +274 -274
  86. package/tokens/_elevation-tokens.scss +33 -33
  87. package/tokens/_emit-tokens.scss +324 -324
  88. package/tokens/_material-palette.scss +1149 -1149
  89. package/tokens/_primitives.scss +98 -98
  90. package/tokens/_semantic-aliases.scss +120 -120
  91. package/tokens/_spacing-tokens.scss +94 -94
  92. package/tokens/_static-tokens.scss +137 -137
  93. package/tokens/_typography-tokens.scss +65 -65
  94. package/vendors/charts.scss +90 -90
@@ -1,100 +1,100 @@
1
- @use "sass:map";
2
-
3
- // =============================================================================
4
- // matcha-form-section.scss — Form section divider for CRUD pages
5
- // Aligned with Figma matcha/form-section:
6
- // Tipo(3: Section, Sub-section, Section + Descrição)
7
- // Usage: Inline divider inside form flows to group related fields
8
- // NOT a card — just a heading row with accent indicator
9
- // =============================================================================
10
-
11
- @mixin matcha-form-section-theme($theme) {
12
-
13
- // ── Section (accent bar + title) ──
14
- .matcha-form-section {
15
- .matcha-form-section__bar {
16
- background: var(--matcha-color-accent);
17
- }
18
-
19
- .matcha-form-section__title {
20
- color: var(--matcha-color-fg);
21
- }
22
-
23
- .matcha-form-section__description {
24
- color: var(--matcha-color-text-secondary);
25
- }
26
- }
27
-
28
- // ── Sub-section (bullet + title) ──
29
- .matcha-form-subsection {
30
- .matcha-form-subsection__bullet {
31
- background: var(--matcha-color-fg);
32
- }
33
-
34
- .matcha-form-subsection__title {
35
- color: var(--matcha-color-fg);
36
- }
37
- }
38
- }
39
-
40
- // ── Section Layout ─────────────────────────────────────────────────────────
41
-
42
- .matcha-form-section {
43
- display: flex;
44
- align-items: flex-start;
45
- gap: var(--matcha-space-150, 12px);
46
- width: 100%;
47
- }
48
-
49
- .matcha-form-section__bar {
50
- width: var(--matcha-border-medium, 4px);
51
- align-self: stretch;
52
- border-radius: var(--matcha-radius-sm, 2px);
53
- flex-shrink: 0;
54
- min-height: var(--matcha-space-250, 20px);
55
- }
56
-
57
- .matcha-form-section__content {
58
- display: flex;
59
- flex-direction: column;
60
- gap: var(--matcha-space-050, 4px);
61
- flex: 1;
62
- min-width: 0;
63
- }
64
-
65
- .matcha-form-section__title {
66
- font-family: var(--matcha-font-family);
67
- font-size: var(--matcha-text-title-sm, 16px);
68
- font-weight: var(--matcha-weight-semibold, 600);
69
- line-height: var(--matcha-leading-title-sm, 22px);
70
- }
71
-
72
- .matcha-form-section__description {
73
- font-family: var(--matcha-font-family);
74
- font-size: var(--matcha-text-body-sm, 12px);
75
- font-weight: var(--matcha-weight-regular, 400);
76
- line-height: var(--matcha-leading-body-sm, 16px);
77
- }
78
-
79
- // ── Sub-section Layout ─────────────────────────────────────────────────────
80
-
81
- .matcha-form-subsection {
82
- display: flex;
83
- align-items: center;
84
- gap: var(--matcha-space-100, 8px);
85
- width: 100%;
86
- }
87
-
88
- .matcha-form-subsection__bullet {
89
- width: 6px;
90
- height: 6px;
91
- border-radius: var(--matcha-radius-pill, 9999px);
92
- flex-shrink: 0;
93
- }
94
-
95
- .matcha-form-subsection__title {
96
- font-family: var(--matcha-font-family);
97
- font-size: var(--matcha-text-body-md, 14px);
98
- font-weight: var(--matcha-weight-medium, 500);
99
- line-height: var(--matcha-leading-body-md, 20px);
100
- }
1
+ @use "sass:map";
2
+
3
+ // =============================================================================
4
+ // matcha-form-section.scss — Form section divider for CRUD pages
5
+ // Aligned with Figma matcha/form-section:
6
+ // Tipo(3: Section, Sub-section, Section + Descrição)
7
+ // Usage: Inline divider inside form flows to group related fields
8
+ // NOT a card — just a heading row with accent indicator
9
+ // =============================================================================
10
+
11
+ @mixin matcha-form-section-theme($theme) {
12
+
13
+ // ── Section (accent bar + title) ──
14
+ .matcha-form-section {
15
+ .matcha-form-section__bar {
16
+ background: var(--matcha-color-accent);
17
+ }
18
+
19
+ .matcha-form-section__title {
20
+ color: var(--matcha-color-fg);
21
+ }
22
+
23
+ .matcha-form-section__description {
24
+ color: var(--matcha-color-text-secondary);
25
+ }
26
+ }
27
+
28
+ // ── Sub-section (bullet + title) ──
29
+ .matcha-form-subsection {
30
+ .matcha-form-subsection__bullet {
31
+ background: var(--matcha-color-fg);
32
+ }
33
+
34
+ .matcha-form-subsection__title {
35
+ color: var(--matcha-color-fg);
36
+ }
37
+ }
38
+ }
39
+
40
+ // ── Section Layout ─────────────────────────────────────────────────────────
41
+
42
+ .matcha-form-section {
43
+ display: flex;
44
+ align-items: flex-start;
45
+ gap: var(--matcha-space-150, 12px);
46
+ width: 100%;
47
+ }
48
+
49
+ .matcha-form-section__bar {
50
+ width: var(--matcha-border-medium, 4px);
51
+ align-self: stretch;
52
+ border-radius: var(--matcha-radius-sm, 2px);
53
+ flex-shrink: 0;
54
+ min-height: var(--matcha-space-250, 20px);
55
+ }
56
+
57
+ .matcha-form-section__content {
58
+ display: flex;
59
+ flex-direction: column;
60
+ gap: var(--matcha-space-050, 4px);
61
+ flex: 1;
62
+ min-width: 0;
63
+ }
64
+
65
+ .matcha-form-section__title {
66
+ font-family: var(--matcha-font-family);
67
+ font-size: var(--matcha-text-title-sm, 16px);
68
+ font-weight: var(--matcha-weight-semibold, 600);
69
+ line-height: var(--matcha-leading-title-sm, 22px);
70
+ }
71
+
72
+ .matcha-form-section__description {
73
+ font-family: var(--matcha-font-family);
74
+ font-size: var(--matcha-text-body-sm, 12px);
75
+ font-weight: var(--matcha-weight-regular, 400);
76
+ line-height: var(--matcha-leading-body-sm, 16px);
77
+ }
78
+
79
+ // ── Sub-section Layout ─────────────────────────────────────────────────────
80
+
81
+ .matcha-form-subsection {
82
+ display: flex;
83
+ align-items: center;
84
+ gap: var(--matcha-space-100, 8px);
85
+ width: 100%;
86
+ }
87
+
88
+ .matcha-form-subsection__bullet {
89
+ width: 6px;
90
+ height: 6px;
91
+ border-radius: var(--matcha-radius-pill, 9999px);
92
+ flex-shrink: 0;
93
+ }
94
+
95
+ .matcha-form-subsection__title {
96
+ font-family: var(--matcha-font-family);
97
+ font-size: var(--matcha-text-body-md, 14px);
98
+ font-weight: var(--matcha-weight-medium, 500);
99
+ line-height: var(--matcha-leading-body-md, 20px);
100
+ }
@@ -1,135 +1,135 @@
1
- @use "../abstracts/media-breakpoint" as *;
2
- @use "sass:map";
3
-
4
- // =============================================================================
5
- // matcha-header.scss
6
- //
7
- // Lib component canônico — 1:1 Figma DSV3 `matcha/header` (nodeId 15892:157).
8
- // Element selector `matcha-header { ... }`, 2 slots (left/right).
9
- //
10
- // Para o page-header legacy (`.matcha-header__*` usado pela app design-system),
11
- // ver `app-page-header.scss`.
12
- // =============================================================================
13
-
14
- @mixin matcha-header-theme($theme) {
15
-
16
- matcha-header {
17
- background: var(--matcha-color-surface-card);
18
- // Border uses interaction/disabled-border (1:1 Figma matcha/header 15892:157):
19
- // dark = rgba(232,234,237,0.38); light = #c8d2ca. Semanticamente atípico —
20
- // o token canônico de "divisor de chrome" seria surface/border, mas Figma
21
- // bind explicitamente este. Trocar de volta se for revertido lá.
22
- border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-interaction-disabled-border);
23
- color: var(--matcha-color-text-primary);
24
- }
25
- }
26
-
27
- // ── Layout — matcha-header lib component ────────────────────────────────────
28
-
29
- matcha-header {
30
- display: flex;
31
- align-items: center;
32
- justify-content: space-between;
33
- width: 100%;
34
- box-sizing: border-box;
35
- position: relative;
36
- z-index: 1;
37
- // Figma DSV3: h 56, padding 8/24/8/16 (asimétrico: l 16 / r 24).
38
- // Logical props pra RTL: inline-start = left (16), inline-end = right (24).
39
- block-size: var(--matcha-header-height, 56px);
40
- padding-block: var(--matcha-space-100, 8px);
41
- padding-inline-start: var(--matcha-space-200, 16px);
42
- padding-inline-end: var(--matcha-space-300, 24px);
43
- gap: var(--matcha-space-200, 16px);
44
- // Bottom corners arredondados (header sentado no topo, oposto do footer).
45
- border-end-start-radius: var(--matcha-radius-lg, 8px);
46
- border-end-end-radius: var(--matcha-radius-lg, 8px);
47
- // Figma DSV3 description: "Elevation: level-1" — eleva o header sobre o body.
48
- box-shadow: var(--matcha-shadow-1);
49
- font-family: var(--matcha-font-family);
50
- font-size: var(--matcha-text-label-sm, 13px);
51
- line-height: var(--matcha-leading-label-sm, 19px);
52
-
53
- // ── Slots ──
54
- .matcha-header__slot {
55
- display: flex;
56
- align-items: center;
57
- gap: var(--matcha-space-200, 16px);
58
- // min-width:0 permite que filhos com overflow:hidden+ellipsis encolham.
59
- // Não usamos overflow:hidden no slot pra não clipar tooltips/menus
60
- // posicionados inline a partir de filhos.
61
- min-width: 0;
62
-
63
- // Hide vazio — slot só renderiza com conteúdo.
64
- &:not(:has(*)) {
65
- display: none;
66
- }
67
- }
68
-
69
- .matcha-header__slot--left {
70
- flex: 1 1 auto;
71
- justify-content: flex-start;
72
- }
73
-
74
- .matcha-header__slot--right {
75
- flex: 0 0 auto;
76
- justify-content: flex-end;
77
- }
78
-
79
- // Hamburguer — não encolhe, participa do gap do slot--left (space-200).
80
- .matcha-header__menu-trigger {
81
- flex-shrink: 0;
82
- }
83
- }
84
-
85
- // ── Forced colors (Windows High Contrast) ──────────────────────────────────
86
- // Border hairline (12% opacidade) pode sumir em high-contrast.
87
- // CanvasText é o token system semantic — sempre visível.
88
- @media (forced-colors: active) {
89
- matcha-header {
90
- border-bottom: 1px solid CanvasText;
91
- }
92
- }
93
-
94
- // ── Reduced motion (defensivo) ──────────────────────────────────────────────
95
- // Hoje header não tem transitions, mas cobre futuro (sticky shadow, hide-on-scroll).
96
- @media (prefers-reduced-motion: reduce) {
97
- matcha-header {
98
- transition: none !important;
99
- animation: none !important;
100
- }
101
- }
102
-
103
- // ── Print ──────────────────────────────────────────────────────────────────
104
- // Convenção DS: chrome (header/footer) some em impressão.
105
- @media print {
106
- matcha-header {
107
- display: none;
108
- }
109
- }
110
-
111
- // ── Menu trigger — visível apenas em tablet/mobile (< 1024px) ───────────────
112
- // Em desktop o nav-rail/panel fica sempre visível; hamburguer não é necessário.
113
- // Consumer pode sobreescrever com [showMenuTrigger]="false" se quiser esconder
114
- // em breakpoints diferentes.
115
- @media (min-width: 1024px) {
116
- matcha-header .matcha-header__menu-trigger {
117
- display: none !important;
118
- }
119
- }
120
-
121
- // ── Responsive — matcha-header (Mobile, xs) ──
122
- @include media-breakpoint('xs') {
123
- matcha-header {
124
- // Figma DSV3 Mobile (node 15892:124 — matcha/header Estilo=Mobile):
125
- // h 48 (token --matcha-grid-header-height-mobile, NÃO 56 — versão
126
- // compactada pra reduzir chrome em viewport pequeno),
127
- // padding 8/16/8/16 (simétrico), gap 16.
128
- block-size: var(--matcha-grid-header-height-mobile, 48px);
129
- padding-inline-start: var(--matcha-space-200, 16px);
130
- padding-inline-end: var(--matcha-space-200, 16px);
131
- // Mobile remove radius — header full-width edge-to-edge.
132
- border-end-start-radius: 0;
133
- border-end-end-radius: 0;
134
- }
135
- }
1
+ @use "../abstracts/media-breakpoint" as *;
2
+ @use "sass:map";
3
+
4
+ // =============================================================================
5
+ // matcha-header.scss
6
+ //
7
+ // Lib component canônico — 1:1 Figma DSV3 `matcha/header` (nodeId 15892:157).
8
+ // Element selector `matcha-header { ... }`, 2 slots (left/right).
9
+ //
10
+ // Para o page-header legacy (`.matcha-header__*` usado pela app design-system),
11
+ // ver `app-page-header.scss`.
12
+ // =============================================================================
13
+
14
+ @mixin matcha-header-theme($theme) {
15
+
16
+ matcha-header {
17
+ background: var(--matcha-color-surface-card);
18
+ // Border uses interaction/disabled-border (1:1 Figma matcha/header 15892:157):
19
+ // dark = rgba(232,234,237,0.38); light = #c8d2ca. Semanticamente atípico —
20
+ // o token canônico de "divisor de chrome" seria surface/border, mas Figma
21
+ // bind explicitamente este. Trocar de volta se for revertido lá.
22
+ border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-interaction-disabled-border);
23
+ color: var(--matcha-color-text-primary);
24
+ }
25
+ }
26
+
27
+ // ── Layout — matcha-header lib component ────────────────────────────────────
28
+
29
+ matcha-header {
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+ width: 100%;
34
+ box-sizing: border-box;
35
+ position: relative;
36
+ z-index: 1;
37
+ // Figma DSV3: h 56, padding 8/24/8/16 (asimétrico: l 16 / r 24).
38
+ // Logical props pra RTL: inline-start = left (16), inline-end = right (24).
39
+ block-size: var(--matcha-header-height, 56px);
40
+ padding-block: var(--matcha-space-100, 8px);
41
+ padding-inline-start: var(--matcha-space-200, 16px);
42
+ padding-inline-end: var(--matcha-space-300, 24px);
43
+ gap: var(--matcha-space-200, 16px);
44
+ // Bottom corners arredondados (header sentado no topo, oposto do footer).
45
+ border-end-start-radius: var(--matcha-radius-lg, 8px);
46
+ border-end-end-radius: var(--matcha-radius-lg, 8px);
47
+ // Figma DSV3 description: "Elevation: level-1" — eleva o header sobre o body.
48
+ box-shadow: var(--matcha-shadow-1);
49
+ font-family: var(--matcha-font-family);
50
+ font-size: var(--matcha-text-label-sm, 13px);
51
+ line-height: var(--matcha-leading-label-sm, 19px);
52
+
53
+ // ── Slots ──
54
+ .matcha-header__slot {
55
+ display: flex;
56
+ align-items: center;
57
+ gap: var(--matcha-space-200, 16px);
58
+ // min-width:0 permite que filhos com overflow:hidden+ellipsis encolham.
59
+ // Não usamos overflow:hidden no slot pra não clipar tooltips/menus
60
+ // posicionados inline a partir de filhos.
61
+ min-width: 0;
62
+
63
+ // Hide vazio — slot só renderiza com conteúdo.
64
+ &:not(:has(*)) {
65
+ display: none;
66
+ }
67
+ }
68
+
69
+ .matcha-header__slot--left {
70
+ flex: 1 1 auto;
71
+ justify-content: flex-start;
72
+ }
73
+
74
+ .matcha-header__slot--right {
75
+ flex: 0 0 auto;
76
+ justify-content: flex-end;
77
+ }
78
+
79
+ // Hamburguer — não encolhe, participa do gap do slot--left (space-200).
80
+ .matcha-header__menu-trigger {
81
+ flex-shrink: 0;
82
+ }
83
+ }
84
+
85
+ // ── Forced colors (Windows High Contrast) ──────────────────────────────────
86
+ // Border hairline (12% opacidade) pode sumir em high-contrast.
87
+ // CanvasText é o token system semantic — sempre visível.
88
+ @media (forced-colors: active) {
89
+ matcha-header {
90
+ border-bottom: 1px solid CanvasText;
91
+ }
92
+ }
93
+
94
+ // ── Reduced motion (defensivo) ──────────────────────────────────────────────
95
+ // Hoje header não tem transitions, mas cobre futuro (sticky shadow, hide-on-scroll).
96
+ @media (prefers-reduced-motion: reduce) {
97
+ matcha-header {
98
+ transition: none !important;
99
+ animation: none !important;
100
+ }
101
+ }
102
+
103
+ // ── Print ──────────────────────────────────────────────────────────────────
104
+ // Convenção DS: chrome (header/footer) some em impressão.
105
+ @media print {
106
+ matcha-header {
107
+ display: none;
108
+ }
109
+ }
110
+
111
+ // ── Menu trigger — visível apenas em tablet/mobile (< 1024px) ───────────────
112
+ // Em desktop o nav-rail/panel fica sempre visível; hamburguer não é necessário.
113
+ // Consumer pode sobreescrever com [showMenuTrigger]="false" se quiser esconder
114
+ // em breakpoints diferentes.
115
+ @media (min-width: 1024px) {
116
+ matcha-header .matcha-header__menu-trigger {
117
+ display: none !important;
118
+ }
119
+ }
120
+
121
+ // ── Responsive — matcha-header (Mobile, xs) ──
122
+ @include media-breakpoint('xs') {
123
+ matcha-header {
124
+ // Figma DSV3 Mobile (node 15892:124 — matcha/header Estilo=Mobile):
125
+ // h 48 (token --matcha-grid-header-height-mobile, NÃO 56 — versão
126
+ // compactada pra reduzir chrome em viewport pequeno),
127
+ // padding 8/16/8/16 (simétrico), gap 16.
128
+ block-size: var(--matcha-grid-header-height-mobile, 48px);
129
+ padding-inline-start: var(--matcha-space-200, 16px);
130
+ padding-inline-end: var(--matcha-space-200, 16px);
131
+ // Mobile remove radius — header full-width edge-to-edge.
132
+ border-end-start-radius: 0;
133
+ border-end-end-radius: 0;
134
+ }
135
+ }