@inchurch/matcha-theme 22.39.0 → 22.40.1

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