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