@inchurch/matcha-theme 20.0.11 → 20.277.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 (116) hide show
  1. package/abstracts/_colors.scss +404 -404
  2. package/abstracts/_elevation.scss +102 -102
  3. package/abstracts/_functions.scss +1186 -1212
  4. package/abstracts/_media-breakpoint.scss +23 -23
  5. package/abstracts/_theme-api.scss +230 -0
  6. package/abstracts/_typography.scss +127 -127
  7. package/base/_reset.scss +438 -438
  8. package/components/app-page-header.scss +259 -0
  9. package/components/matcha-accordion.scss +293 -157
  10. package/components/matcha-audio-player.scss +1 -2
  11. package/components/matcha-autocomplete.scss +10 -11
  12. package/components/matcha-avatar.scss +173 -33
  13. package/components/matcha-badge.scss +15 -15
  14. package/components/matcha-breadcrumb.scss +231 -126
  15. package/components/matcha-button-toggle.scss +46 -2
  16. package/components/matcha-buttons.scss +908 -784
  17. package/components/matcha-calendar.scss +99 -35
  18. package/components/matcha-cards.scss +58 -33
  19. package/components/matcha-chart-card.scss +5 -12
  20. package/components/matcha-checkbox.scss +191 -490
  21. package/components/matcha-chip.scss +297 -212
  22. package/components/matcha-color-pick.scss +1 -2
  23. package/components/matcha-command-palette.scss +290 -63
  24. package/components/matcha-crop.scss +406 -172
  25. package/components/matcha-date.scss +81 -81
  26. package/components/matcha-divider.scss +86 -31
  27. package/components/matcha-draggable.scss +4 -5
  28. package/components/matcha-drawer.scss +207 -66
  29. package/components/matcha-drop-image.scss +14 -0
  30. package/components/matcha-drop-list.scss +87 -47
  31. package/components/matcha-emoji.scss +2 -2
  32. package/components/matcha-empty-state.scss +195 -83
  33. package/components/matcha-file-uploader.scss +462 -0
  34. package/components/matcha-flag.scss +93 -52
  35. package/components/matcha-footer.scss +67 -164
  36. package/components/matcha-form-field.scss +55 -3
  37. package/components/matcha-form-section.scss +100 -101
  38. package/components/matcha-header.scss +134 -325
  39. package/components/matcha-highlight.scss +65 -197
  40. package/components/matcha-hint-text.scss +25 -4
  41. package/components/matcha-horizontal-tree.scss +316 -317
  42. package/components/matcha-icon.scss +37 -45
  43. package/components/matcha-image.scss +2 -3
  44. package/components/matcha-list.scss +14 -15
  45. package/components/matcha-menu.scss +15 -2
  46. package/components/matcha-modal.scss +59 -86
  47. package/components/matcha-nav.scss +362 -231
  48. package/components/matcha-notification.scss +412 -197
  49. package/components/matcha-option.scss +98 -23
  50. package/components/matcha-page-builder.scss +16 -16
  51. package/components/matcha-paginator.scss +688 -235
  52. package/components/matcha-panel.scss +42 -27
  53. package/components/matcha-profile-card.scss +50 -50
  54. package/components/matcha-progress-bar.scss +257 -153
  55. package/components/matcha-radio.scss +244 -452
  56. package/components/matcha-scrollbar.scss +1 -2
  57. package/components/matcha-scrollbox-shadow.scss +120 -122
  58. package/components/matcha-section.scss +5 -9
  59. package/components/matcha-select-multiple.scss +56 -0
  60. package/components/matcha-select.scss +10 -10
  61. package/components/matcha-skeleton.scss +24 -7
  62. package/components/matcha-slide-toggle.scss +80 -301
  63. package/components/matcha-slider.scss +174 -77
  64. package/components/matcha-snack-bar.scss +123 -131
  65. package/components/matcha-spin.scss +12 -103
  66. package/components/matcha-spinner.scss +76 -57
  67. package/components/matcha-status-pill.scss +82 -0
  68. package/components/matcha-stepper.scss +376 -177
  69. package/components/matcha-table.scss +568 -785
  70. package/components/matcha-tabs.scss +622 -469
  71. package/components/matcha-text-editor.scss +78 -78
  72. package/components/matcha-time.scss +2 -2
  73. package/components/matcha-toolbar.scss +359 -206
  74. package/components/matcha-tooltip.scss +158 -62
  75. package/components/matcha-tree-view.scss +189 -0
  76. package/fonts/manrope/manrope-latin-ext.woff2 +0 -0
  77. package/fonts/manrope/manrope-latin.woff2 +0 -0
  78. package/layout/matcha-page-layout.scss +4 -4
  79. package/main.scss +237 -265
  80. package/package.json +1 -1
  81. package/tokens/_animations-tokens.scss +37 -37
  82. package/tokens/_breakpoints-tokens.scss +35 -26
  83. package/tokens/_color-tokens.scss +1149 -1152
  84. package/tokens/_css-custom-properties.scss +704 -568
  85. package/tokens/_primitives.scss +82 -0
  86. package/tokens/_semantic-aliases.scss +120 -0
  87. package/tokens/_spacing-tokens.scss +94 -94
  88. package/vendors/angular-editor.scss +56 -56
  89. package/vendors/angular-material-fixes.scss +297 -297
  90. package/vendors/charts.scss +92 -92
  91. package/vendors/ng5-slider.scss +56 -56
  92. package/vendors/ngx-material-timepicker.scss +50 -50
  93. package/components/matcha-uploader.scss +0 -215
  94. package/fonts/CircularStd-Black.eot +0 -0
  95. package/fonts/CircularStd-Black.svg +0 -3426
  96. package/fonts/CircularStd-Black.ttf +0 -0
  97. package/fonts/CircularStd-Black.woff +0 -0
  98. package/fonts/CircularStd-Black.woff2 +0 -0
  99. package/fonts/CircularStd-Bold.eot +0 -0
  100. package/fonts/CircularStd-Bold.otf +0 -0
  101. package/fonts/CircularStd-Bold.svg +0 -13532
  102. package/fonts/CircularStd-Bold.ttf +0 -0
  103. package/fonts/CircularStd-Bold.woff +0 -0
  104. package/fonts/CircularStd-Bold.woff2 +0 -0
  105. package/fonts/CircularStd-Medium.eot +0 -0
  106. package/fonts/CircularStd-Medium.otf +0 -0
  107. package/fonts/CircularStd-Medium.svg +0 -13511
  108. package/fonts/CircularStd-Medium.ttf +0 -0
  109. package/fonts/CircularStd-Medium.woff +0 -0
  110. package/fonts/CircularStd-Medium.woff2 +0 -0
  111. package/fonts/CircularStd-Regular.eot +0 -0
  112. package/fonts/CircularStd-Regular.otf +0 -0
  113. package/fonts/CircularStd-Regular.svg +0 -2378
  114. package/fonts/CircularStd-Regular.ttf +0 -0
  115. package/fonts/CircularStd-Regular.woff +0 -0
  116. package/fonts/CircularStd-Regular.woff2 +0 -0
@@ -1,235 +1,688 @@
1
- @use "sass:map";
2
-
3
- // =============================================================================
4
- // matcha-paginator.scss — Pagination for tables and lists
5
- // Aligned with Figma matcha/paginator:
6
- // Tipo(3: Completo, Simples, Mobile)
7
- // Active page = accent pill, nav = icon-button Ghost MD (44×44 touch target)
8
- // HTML: <nav aria-label="Paginação" class="matcha-paginator">
9
- // Active page: aria-current="page"
10
- // =============================================================================
11
-
12
- @mixin matcha-paginator-theme($theme) {
13
- $is-dark: map.get($theme, is-dark);
14
-
15
- .matcha-paginator {
16
- // ── Active page — accent only (consistência, não over-engineering) ──
17
- .page-button.active {
18
- background-color: var(--matcha-color-accent, #{getAccent($theme)});
19
- color: var(--matcha-color-accent-contrast, #{getAccentContrast($theme)});
20
- }
21
-
22
- // ── Total info ──
23
- .paginator-total-info {
24
- .total-range {
25
- color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
26
- }
27
- .total-filtered {
28
- color: var(--matcha-color-text-secondary, #{getForegroundAlpha($theme)});
29
- }
30
- }
31
-
32
- // ── Page buttons (inactive) ──
33
- .page-button:not(.active) {
34
- color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
35
-
36
- &:hover {
37
- background-color: var(--matcha-color-surface-hover, #{getBackgroundAlpha($theme)});
38
- }
39
- }
40
-
41
- // ── Nav buttons ──
42
- .nav-button {
43
- color: var(--matcha-color-icon-default, #{getBlueGrey($theme)});
44
- }
45
- }
46
- }
47
-
48
- // ── Layout ──────────────────────────────────────────────────────────────────
49
-
50
- .matcha-paginator {
51
- // Figma matcha/paginator: pad 8/16, gap 8 (Mobile/Tipo=Simple)
52
- display: flex;
53
- align-items: center;
54
- justify-content: space-between;
55
- padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
56
- font-family: var(--matcha-font-family);
57
- gap: var(--matcha-space-100, 8px);
58
-
59
- // ── Total info ──
60
- .paginator-total-info {
61
- display: flex;
62
- flex-direction: column;
63
- gap: var(--matcha-space-050, 4px);
64
-
65
- .total-range {
66
- font-size: var(--matcha-text-body-md, 14px);
67
- font-weight: var(--matcha-weight-medium, 500);
68
- line-height: 1.4;
69
- }
70
-
71
- .total-filtered {
72
- font-size: var(--matcha-text-body-sm, 12px);
73
- line-height: 1.3;
74
- }
75
- }
76
-
77
- // ── Controls wrapper ──
78
- .paginator-controls {
79
- display: flex;
80
- align-items: center;
81
- gap: var(--matcha-space-200, 16px);
82
- }
83
-
84
- // ── Page size selector ──
85
- .page-size-selector {
86
- display: flex;
87
- align-items: center;
88
- gap: var(--matcha-space-100, 8px);
89
-
90
- label {
91
- font-size: var(--matcha-text-body-sm, 12px);
92
- white-space: nowrap;
93
- }
94
- }
95
-
96
- // ── Page numbers row ──
97
- .paginator-pages {
98
- display: flex;
99
- align-items: center;
100
- gap: var(--matcha-space-050, 4px);
101
- }
102
-
103
- // ── Nav buttons (prev/next) — 40×40 matching icon-button Ghost MD ──
104
- .nav-button {
105
- display: flex;
106
- align-items: center;
107
- justify-content: center;
108
- width: var(--matcha-space-500, 40px);
109
- height: var(--matcha-space-500, 40px);
110
- border: none;
111
- background: none;
112
- cursor: pointer;
113
- border-radius: var(--matcha-radius-pill, 9999px);
114
- position: relative;
115
- overflow: hidden;
116
- transition: opacity var(--matcha-duration-instant, 80ms) linear;
117
-
118
- // State layer
119
- &::before {
120
- content: '';
121
- position: absolute;
122
- inset: 0;
123
- background: currentColor;
124
- opacity: 0;
125
- border-radius: inherit;
126
- pointer-events: none;
127
- transition: opacity var(--matcha-duration-instant, 80ms) linear;
128
- }
129
- &:hover:not(:disabled)::before { opacity: var(--matcha-state-hover, 0.08); }
130
- &:active:not(:disabled)::before { opacity: var(--matcha-state-active, 0.12); }
131
-
132
- &:disabled {
133
- opacity: var(--matcha-opacity-secondary, 0.54);
134
- pointer-events: none; cursor: default;
135
- }
136
-
137
- &:focus-visible {
138
- outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #6200ee);
139
- outline-offset: var(--matcha-state-focus-ring-offset, 2px);
140
- }
141
- }
142
-
143
- // ── Page buttons 44×44 pill touch target (WCAG 2.5.8) ──
144
- .page-button {
145
- display: flex;
146
- align-items: center;
147
- justify-content: center;
148
- min-width: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)); // 44
149
- height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px));
150
- padding: 0;
151
- border: none;
152
- background: none;
153
- cursor: pointer;
154
- border-radius: var(--matcha-radius-pill, 9999px);
155
- font-size: var(--matcha-text-label-md, 14px);
156
- font-weight: var(--matcha-weight-medium, 500);
157
- position: relative;
158
- overflow: hidden;
159
-
160
- // State layer for non-active
161
- &:not(.active)::before {
162
- content: '';
163
- position: absolute;
164
- inset: 0;
165
- background: currentColor;
166
- opacity: 0;
167
- border-radius: inherit;
168
- pointer-events: none;
169
- transition: opacity var(--matcha-duration-instant, 80ms) linear;
170
- }
171
- &:not(.active):not([disabled]):hover::before { opacity: var(--matcha-state-hover, 0.08); }
172
- &:not(.active):not([disabled]):active::before { opacity: var(--matcha-state-active, 0.12); }
173
-
174
- &:focus-visible {
175
- outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #6200ee);
176
- outline-offset: var(--matcha-state-focus-ring-offset, 2px);
177
- }
178
- }
179
-
180
- // ── Ellipsis ──
181
- .ellipsis {
182
- display: flex;
183
- align-items: center;
184
- justify-content: center;
185
- min-width: 32px;
186
- height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)); // 44
187
- font-size: var(--matcha-text-label-sm, 12px);
188
- user-select: none;
189
- }
190
- }
191
-
192
- // ── Mobile layout (≤599px)hides page numbers, shows "Página X de Y" ──
193
- @include media-breakpoint('xs') {
194
- .matcha-paginator {
195
- flex-wrap: wrap;
196
- justify-content: center;
197
- padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
198
- gap: var(--matcha-space-100, 8px);
199
-
200
- // Hide page numbers on mobile
201
- .paginator-pages .page-button,
202
- .paginator-pages .ellipsis {
203
- display: none;
204
- }
205
-
206
- // Show "Página X de Y" label (hidden on desktop via .mobile-only)
207
- .paginator-page-label {
208
- display: block;
209
- }
210
-
211
- // Total info centered below
212
- .paginator-total-info {
213
- width: 100%;
214
- text-align: center;
215
- align-items: center;
216
- }
217
- }
218
- }
219
-
220
- // Hide mobile-only elements on desktop
221
- @include media-breakpoint('gt-xs') {
222
- .matcha-paginator .paginator-page-label {
223
- display: none;
224
- }
225
- }
226
-
227
- // ── Reduced motion ──
228
- @media (prefers-reduced-motion: reduce) {
229
- .matcha-paginator {
230
- .nav-button::before,
231
- .page-button::before {
232
- transition: none;
233
- }
234
- }
235
- }
1
+ @use "sass:map";
2
+
3
+ // =============================================================================
4
+ // matcha-paginator.scss — 1:1 com Figma DSV3 (matcha/pagination)
5
+ // 4 variants Figma: Tipo=Mobile · Tipo=Standard · Tipo=Extended · Tipo=Progress
6
+ //
7
+ // CANON LAYOUT (DOM order = [Pages, PageSize, Total]; CSS `order` rearranja):
8
+ //
9
+ // Standard (sem showTotal, sem pageSize):
10
+ // [Prev 1 2 3 ... 50 Next] <- centered, pad 16/0, gap 0
11
+ //
12
+ // Extended (showTotal e/ou pageSize):
13
+ // [Total Info] ←gap→ [Itens/pág Select] [Prev 1 2 3 ... 50 Next]
14
+ // pad 16/24, gap 16; Total grud na esquerda via `margin-right:auto`.
15
+ //
16
+ // Mobile (xs media-query OU forceMobile):
17
+ // Row 1: [Prev] Página X / Y [Next]
18
+ // Row 2: [Itens/pág Select] ←gap→ [Exibindo X-Y de N]
19
+ //
20
+ // Progress (carrossel):
21
+ // [Prev] [segmented bar fill 1/1] [counter X / Y] [Next]
22
+ //
23
+ // Loading: bar accent 2px absolute no bottom, opacity 1 quando is-loading.
24
+ // Buttons Prev/Next agora são <button matcha-icon-button variant="ghost">
25
+ // (canon DSV3) — não estilizamos size/state aqui; só ajustamos hooks específicos.
26
+ // =============================================================================
27
+
28
+ @mixin matcha-paginator-theme($theme) {
29
+
30
+ .matcha-paginator {
31
+ // ── Active page — accent only (consistência, não over-engineering) ──
32
+ .page-button.active {
33
+ background-color: var(--matcha-color-accent);
34
+ color: var(--matcha-color-accent-contrast);
35
+ }
36
+
37
+ // ── Total info ──
38
+ .paginator-total-info {
39
+ .total-range {
40
+ color: var(--matcha-color-text-label);
41
+ }
42
+ .total-filtered {
43
+ color: var(--matcha-color-text-secondary);
44
+ }
45
+ }
46
+
47
+ // ── Page buttons (inactive) ──
48
+ .page-button:not(.active) {
49
+ color: var(--matcha-color-text-label);
50
+
51
+ &:hover {
52
+ background-color: var(--matcha-color-surface-hover);
53
+ }
54
+ }
55
+ }
56
+ }
57
+
58
+ // ── Layout ──────────────────────────────────────────────────────────────────
59
+
60
+ // sr-only — região live dedicada pra anunciar mudança de página (WAI-ARIA APG).
61
+ // Fora do .matcha-paginator pra também funcionar quando paginator estiver hidden
62
+ // (logo após hide-on-single-page transition).
63
+ .matcha-paginator__sr-only {
64
+ position: absolute;
65
+ width: 1px;
66
+ height: 1px;
67
+ padding: 0;
68
+ margin: -1px;
69
+ overflow: hidden;
70
+ clip: rect(0, 0, 0, 0);
71
+ white-space: nowrap;
72
+ border: 0;
73
+ }
74
+
75
+ .matcha-paginator {
76
+ // Default = Tipo=Standard (Figma): pad 16/0, justify center, gap 0.
77
+ // Gap 0 entre page slots é canônico Figma — cada slot já tem 44px hit area
78
+ // dentro do qual o text "1"/"2"/etc. fica centralizado, dando breathing room
79
+ // visual sem precisar de gap externo.
80
+ position: relative; // anchor pra .paginator-loading-bar absolute
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ flex-wrap: nowrap;
85
+ padding: var(--matcha-space-200, 16px) 0;
86
+ font-family: var(--matcha-font-family);
87
+ gap: 0;
88
+ // Figma DSV3: todas as variants têm bg surface-card. Delimita o paginator
89
+ // como bloco coeso abaixo da tabela.
90
+ background: var(--matcha-color-surface-card);
91
+ box-sizing: border-box;
92
+ width: 100%;
93
+
94
+ // ── Loading state ─────────────────────────────────────────────────────────
95
+ // Visual feedback duplo: (1) opacity dim nos controles, (2) accent bar 2px
96
+ // absolute no bottom (canon Figma "Loading Indicator" rectangle 800x2).
97
+ &.is-loading {
98
+ cursor: wait;
99
+
100
+ .paginator-nav-button,
101
+ .page-button,
102
+ .paginator-progress__segment,
103
+ .paginator-jump__input,
104
+ .page-size-selector {
105
+ pointer-events: none;
106
+ opacity: var(--matcha-opacity-secondary, 0.54);
107
+ }
108
+ }
109
+
110
+ .paginator-loading-bar {
111
+ position: absolute;
112
+ bottom: 0;
113
+ left: 0;
114
+ right: 0;
115
+ height: 2px;
116
+ background: var(--matcha-color-accent, #6200ee);
117
+ opacity: 0;
118
+ pointer-events: none;
119
+ transition: opacity var(--matcha-duration-fast, 200ms) ease;
120
+ border-radius: 0 0 var(--matcha-radius-md, 4px) var(--matcha-radius-md, 4px);
121
+ }
122
+
123
+ &.is-loading .paginator-loading-bar {
124
+ opacity: 1;
125
+ // Pulse animation pra indicar atividade em curso (canon material UI).
126
+ animation: matcha-paginator-loading-pulse 1.4s ease-in-out infinite;
127
+ }
128
+
129
+ // ── Numeric Extended (auto-detect via :has) ──
130
+ // Quando consumer passa showTotal=true OU pageSizeOptions com itens, o
131
+ // paginator vira Tipo=Extended (Figma): pad 16/24 gap 16, Total LEFT, demais
132
+ // RIGHT — usa `margin-right: auto` no total pra empurrar restante pra direita.
133
+ &.matcha-paginator--numeric:has(.paginator-total-info),
134
+ &.matcha-paginator--numeric:has(.page-size-selector) {
135
+ padding: var(--matcha-space-200, 16px) var(--matcha-space-300, 24px);
136
+ gap: var(--matcha-space-200, 16px);
137
+ justify-content: flex-start;
138
+
139
+ // CSS order (DOM = pages, page-size, total):
140
+ // Total = ordem 1 (LEFT, com margin-right auto pushando demais à direita)
141
+ // PageSize = ordem 2
142
+ // Pages = ordem 3 (RIGHT)
143
+ .paginator-total-info { order: 1; margin-right: auto; }
144
+ .page-size-selector { order: 2; }
145
+ .paginator-pages { order: 3; }
146
+ }
147
+
148
+ // ── Total info ──
149
+ .paginator-total-info {
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: var(--matcha-space-050, 4px);
153
+
154
+ .total-range {
155
+ font-size: var(--matcha-text-body-md, 14px);
156
+ font-weight: var(--matcha-weight-medium, 500);
157
+ line-height: 1.4;
158
+ }
159
+
160
+ .total-filtered {
161
+ font-size: var(--matcha-text-body-sm, 12px);
162
+ line-height: 1.3;
163
+ }
164
+ }
165
+
166
+ // ── Page size selector ──
167
+ .page-size-selector {
168
+ display: flex;
169
+ align-items: center;
170
+ gap: var(--matcha-space-100, 8px);
171
+
172
+ label {
173
+ font-size: var(--matcha-text-body-sm, 12px);
174
+ white-space: nowrap;
175
+ }
176
+ }
177
+
178
+ // ── Page numbers row ──
179
+ // Gap 0 = canon Figma. Cada slot tem 44px (touch target WCAG 2.5.8),
180
+ // breathing room vem do conteúdo (texto 6-17px) centralizado no slot.
181
+ .paginator-pages {
182
+ display: flex;
183
+ align-items: center;
184
+ gap: 0;
185
+ flex-wrap: nowrap;
186
+ justify-content: center;
187
+ }
188
+
189
+ // Mobile indicator "Página X / Y" — escondido em desktop (só renderiza em mobile).
190
+ // Em mobile substitui a lista de page-buttons (que fica apertada/quebrada).
191
+ .paginator-pages__indicator {
192
+ display: none; // desktop defaultescondido
193
+ align-items: center;
194
+ justify-content: center;
195
+ flex: 1;
196
+ min-width: 0;
197
+ padding: 0 var(--matcha-space-150, 12px);
198
+ font-family: var(--matcha-font-family);
199
+ font-size: var(--matcha-text-body-md, 14px);
200
+ font-weight: var(--matcha-weight-semibold, 600);
201
+ line-height: var(--matcha-leading-body-md, 20px);
202
+ color: var(--matcha-color-text-primary);
203
+ text-align: center;
204
+ user-select: none;
205
+ white-space: nowrap;
206
+ }
207
+
208
+ // ── Nav buttons (matcha-icon-button) ────────────────────────────────────
209
+ // Buttons agora são <button matcha-icon-button variant="ghost">; tamanho
210
+ // (40 standard, 32 progress, 44 mobile) e states (hover/active/disabled/focus)
211
+ // vêm da SCSS canônica do matcha-icon-button. Só adicionamos `.paginator-nav-button`
212
+ // como marker pra contextos específicos (--edge chevron, progress override).
213
+
214
+ // First/Last edge buttons — Unicode « » glyphs (DS sem icon double-chevron ainda).
215
+ // Só typography pro glyph; dimensões/states ficam c/ matcha-icon-button.
216
+ .paginator-nav-button--edge .paginator-nav-button__chevron {
217
+ display: inline-flex;
218
+ align-items: center;
219
+ justify-content: center;
220
+ font-family: var(--matcha-font-family);
221
+ font-size: var(--matcha-text-title-md, 18px);
222
+ line-height: 1;
223
+ font-weight: var(--matcha-weight-medium, 500);
224
+ color: currentColor;
225
+ pointer-events: none;
226
+ }
227
+
228
+ // ── Page buttons — Figma 1:1:
229
+ // Inactive: 44×44 pill slot (touch target WCAG 2.5.8)
230
+ // Active: 32×32 pill (menor pra destaque + visual "selecionado")
231
+ .page-button {
232
+ display: flex;
233
+ align-items: center;
234
+ justify-content: center;
235
+ min-width: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)); // 44
236
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px));
237
+ padding: 0;
238
+ border: none;
239
+ background: none;
240
+ cursor: pointer;
241
+ border-radius: var(--matcha-radius-pill, 9999px);
242
+ font-size: var(--matcha-text-label-md, 14px);
243
+ font-weight: var(--matcha-weight-medium, 500);
244
+ line-height: var(--matcha-leading-body-md, 20px);
245
+ position: relative;
246
+ overflow: hidden;
247
+ transition:
248
+ background-color var(--matcha-duration-instant, 80ms) linear,
249
+ color var(--matcha-duration-instant, 80ms) linear,
250
+ min-width var(--matcha-duration-fast, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)),
251
+ width var(--matcha-duration-fast, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)),
252
+ height var(--matcha-duration-fast, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
253
+
254
+ // Active = 32×32 per Figma; hit area mantém 44×44 via ::after (WCAG 2.5.5).
255
+ &.active {
256
+ min-width: var(--matcha-space-400, 32px);
257
+ width: var(--matcha-space-400, 32px);
258
+ height: var(--matcha-space-400, 32px);
259
+ cursor: default;
260
+
261
+ &::after {
262
+ content: '';
263
+ position: absolute;
264
+ inset: calc(-1 * var(--matcha-space-075, 6px));
265
+ }
266
+ }
267
+
268
+ // State layer non-active
269
+ &:not(.active)::before {
270
+ content: '';
271
+ position: absolute;
272
+ inset: 0;
273
+ background: currentColor;
274
+ opacity: 0;
275
+ border-radius: inherit;
276
+ pointer-events: none;
277
+ transition: opacity var(--matcha-duration-instant, 80ms) linear;
278
+ }
279
+ &:not(.active):not([disabled]):hover::before { opacity: var(--matcha-state-hover, 0.08); }
280
+ &:not(.active):not([disabled]):active::before { opacity: var(--matcha-state-active, 0.12); }
281
+
282
+ &:focus-visible {
283
+ outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #6200ee);
284
+ outline-offset: var(--matcha-state-focus-ring-offset, 2px);
285
+ }
286
+ }
287
+
288
+ // ── Page-jump input (numeric, totalPages > threshold) ───────────────────
289
+ .paginator-jump {
290
+ display: inline-flex;
291
+ align-items: center;
292
+ gap: var(--matcha-space-100, 8px);
293
+ margin-inline-start: var(--matcha-space-100, 8px);
294
+ font-size: var(--matcha-text-body-sm, 12px);
295
+ color: var(--matcha-color-text-label);
296
+ white-space: nowrap;
297
+ }
298
+
299
+ .paginator-jump__input {
300
+ width: 56px;
301
+ height: var(--matcha-space-500, 40px);
302
+ padding: 0 var(--matcha-space-100, 8px);
303
+ background: var(--matcha-color-surface-inner);
304
+ border: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
305
+ border-radius: var(--matcha-radius-md, 4px);
306
+ color: var(--matcha-color-text-primary);
307
+ font-family: var(--matcha-font-family);
308
+ font-size: var(--matcha-text-body-md, 14px);
309
+ text-align: center;
310
+ outline: none;
311
+
312
+ &::-webkit-outer-spin-button,
313
+ &::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
314
+ -moz-appearance: textfield;
315
+
316
+ &:focus-visible {
317
+ border-color: var(--matcha-color-accent);
318
+ outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
319
+ outline-offset: 0;
320
+ }
321
+ }
322
+
323
+ // ── Ellipsis (Figma 32×44, body-md 14/20 Manrope Regular) ──
324
+ .ellipsis {
325
+ display: flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+ min-width: 32px;
329
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)); // 44
330
+ font-size: var(--matcha-text-body-md, 14px);
331
+ font-weight: var(--matcha-weight-regular, 400);
332
+ line-height: var(--matcha-leading-body-md, 20px);
333
+ user-select: none;
334
+ }
335
+
336
+ // ── Tipo=Progress (Figma 560×48 segmented bar) ─────────────────────────
337
+ // Container: bg surface + radius 4 + height 48, padding 8 gap 12.
338
+ // Prev/Next em size=sm (32×32) via matcha-icon-button attribute size.
339
+ &.matcha-paginator--progress {
340
+ padding: var(--matcha-space-100, 8px);
341
+ gap: var(--matcha-space-150, 12px);
342
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-100, 8px)); // 48
343
+ background: var(--matcha-color-surface, #1C1F26);
344
+ border-radius: var(--matcha-radius-md, 4px);
345
+ justify-content: center;
346
+
347
+ .paginator-pages {
348
+ flex: 1 1 auto;
349
+ gap: var(--matcha-space-150, 12px); // Figma Progress: gap 12 entre Prev | bar | counter | Next
350
+ }
351
+ }
352
+
353
+ .paginator-progress {
354
+ display: flex;
355
+ flex: 1 1 auto;
356
+ align-items: center;
357
+ gap: var(--matcha-space-050, 4px);
358
+ min-width: 80px;
359
+ }
360
+
361
+ // Segments — <button> clicável (jump-to-slide Stories/Instagram pattern).
362
+ // Visualmente alinha com matcha-progress-bar[type="segmented"][size="sm"] do Figma.
363
+ .paginator-progress__segment {
364
+ flex: 1 1 0;
365
+ min-width: 0;
366
+ height: 8px;
367
+ padding: 0;
368
+ border: none;
369
+ cursor: pointer;
370
+ position: relative;
371
+ background: var(--matcha-color-surface-strong, var(--matcha-color-surface-border, #282C34));
372
+ border-radius: var(--matcha-radius-pill, 9999px);
373
+ transition:
374
+ background-color var(--matcha-duration-medium, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)),
375
+ transform var(--matcha-duration-instant, 80ms) ease-out;
376
+
377
+ // Hit area expandida pra ~24h vertical (touch-friendly em mobile).
378
+ &::before {
379
+ content: '';
380
+ position: absolute;
381
+ inset: -8px 0;
382
+ }
383
+
384
+ &.is-filled { background: var(--matcha-color-accent, #6200ee); }
385
+ &.is-current {
386
+ transform: scaleY(1.5);
387
+ background: var(--matcha-color-accent, #6200ee);
388
+ }
389
+
390
+ &:hover:not(.is-current):not(:disabled) {
391
+ background: var(--matcha-color-accent-alpha, rgba(168, 217, 78, 0.4));
392
+ transform: scaleY(1.25);
393
+ }
394
+
395
+ &:focus-visible {
396
+ outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
397
+ outline-offset: 4px;
398
+ border-radius: var(--matcha-radius-pill, 9999px);
399
+ }
400
+
401
+ &:disabled { cursor: default; }
402
+ }
403
+
404
+ // Counter "X / Y" — discreto ao lado dos segments.
405
+ .paginator-progress__counter {
406
+ flex-shrink: 0;
407
+ font-family: var(--matcha-font-family);
408
+ font-size: var(--matcha-text-body-sm, 12px);
409
+ font-weight: var(--matcha-weight-medium, 500);
410
+ line-height: var(--matcha-leading-body-sm, 16px);
411
+ color: var(--matcha-color-text-secondary);
412
+ white-space: nowrap;
413
+ padding-inline-start: var(--matcha-space-050, 4px);
414
+ user-select: none;
415
+ }
416
+ }
417
+
418
+ // ── Loading bar animation ─────────────────────────────────────────────────
419
+ // Pulse subtle pra indicar atividade em curso (não-distrativo).
420
+ @keyframes matcha-paginator-loading-pulse {
421
+ 0%, 100% { opacity: 1; }
422
+ 50% { opacity: 0.55; }
423
+ }
424
+
425
+ // ── Tipo=Mobile (refined 2026-05-19) ──────────────────────────────────
426
+ // 2 rows canon refinado:
427
+ // Row 1 (44px touch target): [Prev 44] Página X de Y [Next 44]
428
+ // Row 2 (36px info bar): [Total formatado · X por pág ⌄ ]
429
+ //
430
+ // Mudanças vs versão anterior:
431
+ // • `paginator-jump` (input "Ir para N°") ESCONDIDO em mobile — UX duvidosa
432
+ // (teclado on-screen pra digitar nº de página, low value, high friction).
433
+ // Power-user feature; desktop mantém.
434
+ // • Indicator vira label completo "Página X de Y" — typography premium vs
435
+ // "X / Y" técnico/denso.
436
+ // • Total + page-size na MESMA linha (não 2 rows separadas) com separador
437
+ // visual. Economiza vertical e cria info-bar coesa.
438
+ // • Total com font-variant-numeric tabular-nums + semibold no primeiro
439
+ // número ("1–24") pra destaque.
440
+ //
441
+ // `.is-mobile-preview` aplica os mesmos rules em qualquer viewport — útil pra
442
+ // demonstrar layout mobile em pages de doc sem redimensionar a janela.
443
+ @mixin matcha-paginator-mobile {
444
+ flex-direction: row;
445
+ flex-wrap: wrap;
446
+ align-items: center;
447
+ justify-content: center;
448
+ padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
449
+ row-gap: var(--matcha-space-150, 12px);
450
+ column-gap: var(--matcha-space-100, 8px);
451
+
452
+ // Pages: row 1, full width, Prev | indicator | Next via space-between.
453
+ .paginator-pages {
454
+ order: 1;
455
+ flex: 0 0 100%;
456
+ width: 100%;
457
+ flex-wrap: nowrap;
458
+ justify-content: space-between;
459
+ gap: var(--matcha-space-100, 8px);
460
+
461
+ // ESCONDE page numbers + ellipsis em mobile (substituídos pelo indicator).
462
+ .page-button,
463
+ .ellipsis {
464
+ display: none;
465
+ }
466
+
467
+ // MOSTRA o indicator centralizado com typography premium.
468
+ .paginator-pages__indicator {
469
+ display: flex;
470
+ flex: 1 1 auto;
471
+ font-size: var(--matcha-text-body-md, 14px);
472
+ font-weight: var(--matcha-weight-semibold, 600);
473
+ color: var(--matcha-color-text-primary);
474
+ letter-spacing: -0.1px;
475
+ }
476
+
477
+ // Nav buttons: 44×44 mobile (WCAG 2.5.5 touch target).
478
+ .paginator-nav-button {
479
+ width: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)) !important;
480
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)) !important;
481
+ flex-shrink: 0;
482
+ }
483
+
484
+ // Page-jump ESCONDIDO em mobile — feature power-user (digitação de nº via
485
+ // teclado on-screen tem high friction, low value).
486
+ .paginator-jump {
487
+ display: none;
488
+ }
489
+ }
490
+
491
+ // Row 2 inteira: Total (esq) + page-size (dir) numa info-bar única.
492
+ // `paginator-total-info` ocupa `flex: 1 1 auto` empurrando page-size pra
493
+ // direita via `margin-left: auto`. Visual de bar coesa.
494
+ .page-size-selector {
495
+ order: 3; // depois do total
496
+ flex: 0 0 auto;
497
+ margin-right: 0;
498
+ gap: var(--matcha-space-075, 6px);
499
+
500
+ &__label {
501
+ font-size: var(--matcha-text-body-sm, 12px);
502
+ color: var(--matcha-color-text-secondary);
503
+ }
504
+ }
505
+
506
+ .paginator-total-info {
507
+ order: 2; // antes do page-size
508
+ flex: 1 1 auto;
509
+ margin-left: 0;
510
+ margin-right: 0;
511
+ font-variant-numeric: tabular-nums;
512
+
513
+ .total-range {
514
+ font-size: var(--matcha-text-body-md, 14px);
515
+ font-weight: var(--matcha-weight-regular, 400);
516
+ color: var(--matcha-color-text-primary);
517
+ }
518
+
519
+ .total-filtered {
520
+ font-size: var(--matcha-text-body-sm, 12px);
521
+ color: var(--matcha-color-text-secondary);
522
+ }
523
+ }
524
+
525
+ // ── Override Extended desktop rules (specificity match) ─────────────────
526
+ // Mobile: Pages (row 1) · Total (row 2 esq) · Page-size (row 2 dir).
527
+ &.matcha-paginator--numeric:has(.paginator-total-info),
528
+ &.matcha-paginator--numeric:has(.page-size-selector) {
529
+ flex-direction: row;
530
+ flex-wrap: wrap;
531
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
532
+ gap: 0;
533
+ row-gap: var(--matcha-space-100, 8px);
534
+ column-gap: var(--matcha-space-100, 8px);
535
+ justify-content: center;
536
+
537
+ .paginator-pages { order: 1; }
538
+ .paginator-total-info { order: 2; flex: 1 1 auto; margin-left: 0; margin-right: 0; }
539
+ .page-size-selector { order: 3; margin-left: auto; margin-right: 0; }
540
+ }
541
+
542
+ // Page-jump input mobile: bigger pra targets touch.
543
+ .paginator-jump__input {
544
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)); // 44
545
+ width: var(--matcha-space-1000, 80px);
546
+ font-size: var(--matcha-text-body-md, 14px);
547
+ }
548
+
549
+ // First/Last edge buttons escondidos em mobile (page-jump cobre "ir pra extremo").
550
+ .paginator-nav-button--edge {
551
+ display: none;
552
+ }
553
+
554
+ // Progress mobile: nav 44×44, segments mantém height.
555
+ &.matcha-paginator--progress {
556
+ height: auto;
557
+ min-height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-200, 16px)); // 56
558
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
559
+ flex-wrap: nowrap;
560
+
561
+ .paginator-nav-button {
562
+ width: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)) !important;
563
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)) !important;
564
+ }
565
+
566
+ // Indicator não se aplica ao progress mode (counter já cobre).
567
+ .paginator-pages__indicator {
568
+ display: none;
569
+ }
570
+ }
571
+ }
572
+
573
+ // ── Tipo=Tablet (600-1023px) — layout 2-row intencional ──────────────────
574
+ // Row 1: [Total info] [Page-size]
575
+ // Row 2: [ ← Pages centralizado → ]
576
+ // Esconde "Ir para N°" (touch-unfriendly). Pages SEMPRE row 2 (flex-basis 100%)
577
+ // pra evitar wrap acidental e garantir centralização consistente.
578
+ @mixin matcha-paginator-tablet {
579
+ flex-wrap: wrap;
580
+ padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
581
+ column-gap: var(--matcha-space-200, 16px);
582
+ row-gap: var(--matcha-space-150, 12px);
583
+ align-items: center;
584
+
585
+ .paginator-jump {
586
+ display: none;
587
+ }
588
+
589
+ // Total info — esquerda, font compacto.
590
+ .paginator-total-info {
591
+ order: 1;
592
+ flex: 0 0 auto;
593
+ margin-right: auto; // empurra page-size pra direita
594
+ font-size: var(--matcha-text-body-sm, 12px);
595
+
596
+ .total-range {
597
+ font-size: var(--matcha-text-body-sm, 12px);
598
+ font-variant-numeric: tabular-nums;
599
+ }
600
+ }
601
+
602
+ // Page-size — direita da row 1.
603
+ .page-size-selector {
604
+ order: 2;
605
+ flex: 0 0 auto;
606
+ margin-right: 0;
607
+ margin-left: 0;
608
+ }
609
+
610
+ // Pages — SEMPRE row 2 (flex-basis 100%) centralizado.
611
+ .paginator-pages {
612
+ order: 3;
613
+ flex: 0 0 100%;
614
+ justify-content: center;
615
+ }
616
+ }
617
+
618
+ @include media-breakpoint('xs') {
619
+ .matcha-paginator { @include matcha-paginator-mobile; }
620
+ }
621
+
622
+ @include media-breakpoint('sm') {
623
+ .matcha-paginator { @include matcha-paginator-tablet; }
624
+ }
625
+
626
+ .matcha-paginator.is-mobile-preview {
627
+ @include matcha-paginator-mobile;
628
+ }
629
+
630
+ // ── Reduced motion ──
631
+ @media (prefers-reduced-motion: reduce) {
632
+ .matcha-paginator {
633
+ .page-button,
634
+ .page-button::before,
635
+ .paginator-progress__segment,
636
+ .paginator-loading-bar {
637
+ transition: none !important;
638
+ animation: none !important;
639
+ }
640
+
641
+ // Sem scale animado nos segments — só cor.
642
+ .paginator-progress__segment.is-current,
643
+ .paginator-progress__segment:hover {
644
+ transform: none;
645
+ }
646
+ }
647
+ }
648
+
649
+ // ── Forced colors (Windows High Contrast) ──
650
+ @media (forced-colors: active) {
651
+ .matcha-paginator {
652
+ .page-button {
653
+ color: CanvasText !important;
654
+ border: 1px solid transparent !important;
655
+
656
+ &:hover:not(.active):not(:disabled) {
657
+ border-color: CanvasText !important;
658
+ }
659
+
660
+ &.active {
661
+ background: Highlight !important;
662
+ color: HighlightText !important;
663
+ border-color: Highlight !important;
664
+ }
665
+
666
+ &:focus-visible {
667
+ outline: 2px solid CanvasText !important;
668
+ }
669
+ }
670
+
671
+ .ellipsis,
672
+ .paginator-total-info {
673
+ color: CanvasText !important;
674
+ }
675
+
676
+ .paginator-loading-bar {
677
+ background: Highlight !important;
678
+ }
679
+ }
680
+ }
681
+
682
+ // ── Print ──
683
+ // Pagination é UI interativa — some em impressão.
684
+ @media print {
685
+ .matcha-paginator {
686
+ display: none !important;
687
+ }
688
+ }