Skip to content

fix: [Inputs] normalize z-index across all inputs (ENG-46735) - #783

Merged
robsongajunior merged 5 commits into
mainfrom
fix/inputs-z-index-audit-eng-46735
Jul 23, 2026
Merged

fix: [Inputs] normalize z-index across all inputs (ENG-46735)#783
robsongajunior merged 5 commits into
mainfrom
fix/inputs-z-index-audit-eng-46735

Conversation

@isaquebock

@isaquebock isaquebock commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix para ENG-46735 — auditoria transversal de z-index em todos os inputs.

Novos tokens em packages/theme/src/tokens/semantic/z-indices.data.js:

Token Valor Uso
--z-input-field 1 Foreground de campos (ícones/adornos internos)
--z-input-popup 10 Overlay inline não-teleportado (reservado)
--z-input-overlay 1100 Overlay teleportado que precisa vencer Dialog (1000) e Dialog-content/Drawer (1001)

Componentes migrados (raw z-[1] / z-50 → tokens semânticos): input-text, input-password, input-number (×5), chip, theme-switcher, select-content, multi-select-content.

How to test (mapeado 1:1 com ENG-46735)

Problema Jira: "Revisar o z-index de todos os inputs. Está gerando problemas de sobreposição/empilhamento (relacionado, mas mais amplo que o caso específico de Select em Drawer/Dialog)."

Verificar os tokens

  • grep 'z-input' packages/theme/dist/v4/globals.css → 3 tokens presentes.
  • Todos os componentes da lista acima não têm mais z-[1] / z-50 raw.

Regressão de empilhamento — cada input isoladamente

  • Storybook — cada input alone (InputText, InputPassword, InputNumber, Chip, ThemeSwitcher, Select, MultiSelect): ícones/prefixos/sufixos empilham corretamente, sem regressão visual.

O caso que motivou o ticket

  • Compor um <Select> dentro de um <Dialog> ou <Drawer> → abrir o Select → opções renderizam acima do overlay.
  • Idem com <MultiSelect>.

Tests

168/168 pass nos 7 componentes modificados. Assertion de stacking real vive no Storybook (browser mode do Vitest não carrega @aziontech/theme/globals.css por design).

Downstream

Desbloqueia ENG-46731 no PR #782 (Select refinements).

Audit every explicit z-index across the inputs family and replace magic
numbers with three semantic tokens declared in @aziontech/theme:

  --z-input-field   (1)    field/interactive foreground above the input's
                           own icons, adornments and background surface
  --z-input-popup   (10)   inline (non-teleported) input-anchored overlay
  --z-input-overlay (1100) teleported overlay that must clear application
                           chrome (dialog=1000, dialog-content/drawer=1001)

Fixes the transversal stacking bug where the teleported `select` and
`multi-select` listboxes (`z-50`) rendered behind an open Dialog or
Drawer overlay (`z-[1001]`). All input-family components now share one
stack ordering: field < inline popup < teleported overlay > modal chrome.

Components touched:
  - input-text, input-password, input-number, chip, theme-switcher
    (field foreground: z-[1] -> z-[var(--z-input-field)])
  - select-content, multi-select-content
    (teleported panel: z-50 -> z-[var(--z-input-overlay)])

Tokens are declared in packages/theme/src/tokens/semantic/z-indices.data.js
and emitted as CSS custom properties by build-tokens.mjs alongside the
existing spacing/container/text semantic tokens.

Refs: ENG-46735
@isaquebock
isaquebock marked this pull request as ready for review July 23, 2026 17:33
@isaquebock
isaquebock requested a review from a team as a code owner July 23, 2026 17:33
@isaquebock
isaquebock marked this pull request as draft July 23, 2026 17:34
@isaquebock
isaquebock marked this pull request as ready for review July 23, 2026 17:49
@robsongajunior
robsongajunior merged commit 25d201d into main Jul 23, 2026
23 checks passed
@robsongajunior

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@robsongajunior

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 4.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@robsongajunior
robsongajunior deleted the fix/inputs-z-index-audit-eng-46735 branch July 26, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants