Skip to content

PR4: feat: add v9 elevation system — shadow tokens, CSS vars, mixins, useE…#1698

Open
anirudha wants to merge 2 commits intoopensearch-project:mainfrom
anirudha:v9-upstream/pr-4-elevation-system
Open

PR4: feat: add v9 elevation system — shadow tokens, CSS vars, mixins, useE…#1698
anirudha wants to merge 2 commits intoopensearch-project:mainfrom
anirudha:v9-upstream/pr-4-elevation-system

Conversation

@anirudha
Copy link
Copy Markdown

@anirudha anirudha commented Feb 8, 2026

…levation hook, and docs

PR Plan : #1695

Add the complete v9 elevation system:

  • Shadow level SASS variables ($ouiShadow1-6) with theme-aware opacity
  • ouiElevation, ouiLocalElevation, ouiElevatedSurface SASS mixins
  • CSS custom properties for elevated surfaces (--oui-background-elevated, --oui-border-elevated)
  • Dark theme shadow overrides with glow ring and elevated surface colors
  • Panel elevation variables
  • useElevation React hook with OuiElevationProvider for dynamic z-index management
  • Unit tests for useElevation hook (6 tests)
  • Elevation documentation pages with shadow, dark theme, local elevation, and hook examples
  • Route registration for elevation docs

Scope: The complete elevation feature — shadow tokens, mixins, CSS custom properties, useElevation hook, and elevation docs page.

Files included:

  • src/themes/v9/global_styling/variables/_shadows.scss (shadow level tokens)
  • src/themes/v9/global_styling/variables/_panel.scss (panel elevation vars)
  • src/themes/v9/global_styling/mixins/_shadow.scss (ouiElevation, ouiLocalElevation, ouiElevatedSurface mixins)
  • src/themes/v9/global_styling/css_variables/_elevation.scss (CSS custom properties)
  • src/themes/v9/global_styling/css_variables/_index.scss (import)
  • src/themes/v9/v9_colors_dark.scss (shadow opacity + elevated surface overrides — partial changes)
  • src/services/elevation/ (all 5 files: context, provider, hook, tests, index)
  • src/services/index.ts (export additions)
  • src-docs/src/views/elevation/ (all 5 demo files + example definition)

Testing: yarn test-unit elevation for hook tests, yarn lint for SASS, visual verification of elevation docs page

…levation hook, and docs

Add the complete v9 elevation system:
- Shadow level SASS variables ($ouiShadow1-6) with theme-aware opacity
- ouiElevation, ouiLocalElevation, ouiElevatedSurface SASS mixins
- CSS custom properties for elevated surfaces (--oui-background-elevated, --oui-border-elevated)
- Dark theme shadow overrides with glow ring and elevated surface colors
- Panel elevation variables
- useElevation React hook with OuiElevationProvider for dynamic z-index management
- Unit tests for useElevation hook (6 tests)
- Elevation documentation pages with shadow, dark theme, local elevation, and hook examples
- Route registration for elevation docs

Signed-off-by: Anirudha Jadhav <anirudha.jadhav@gmail.com>
Signed-off-by: Anirudha (Ani) Jadhav <anirudha@nyu.edu>
Signed-off-by: Anirudha (Ani) Jadhav <anirudha@nyu.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant