feat(theme): integrate Midnight theme - #112
Open
yashwant-intelligaia wants to merge 8 commits into
Open
Conversation
yashwant-intelligaia
marked this pull request as ready for review
August 6, 2026 09:48
Add Midnight as a fourth built-in theme (Light/Dark/IoC/Midnight): - New Dark Navy and Electric Blue palettes in color-palette.ts - midnight-vars.ts (dark-family vars + Midnight overrides) - midnight-theme.tsx - Wire ThemeMode.Midnight into theme-provider and barrel export - Add Midnight to the Storybook theme switcher Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
…city Align 9 Midnight semantic tokens with the Agntcy Midnight design spec. The excellent Weak/Disabled and interactive disabled tokens were mapped to solid Electric Blue values instead of the intended low-opacity variants, causing the excellent Banner to render as solid bright cyan and disabled states to appear fully opaque. Add electricBlueAlpha10/40 palette variants and repoint the affected tokens to them (mirroring the Dark theme's lightBluePalette alpha usage). Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
Design token corrections for accordion, activity-timeline, checkbox, code-block, dialog, floating-button, header, message, navigation, and popover components, plus code-block syntax highlighting via refractor. Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
yashwant-intelligaia
force-pushed
the
feat/midnight-theme-integration
branch
from
August 6, 2026 10:45
af22772 to
7487b93
Compare
Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
…xceptions Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Midnight Theme — Component Status
Package: packages/open-ui-kit
Figma source: Outshift Spark Component Library
Components — Midnight done & working
All 63 components render correctly under Midnight. The kit is fully tokenized — an audit across every component directory found no hard-coded colors outside of button's two linear-gradient(#fff 0 0) mask declarations, which are a padding-box/border-box masking trick and never paint a visible color. So components pick up Midnight from the theme foundation whether or not they needed a fix of their own.
Required a Midnight-specific fix
The subset above that needed actual work — everything else inherited Midnight with no change:
Accordion · ActivityTimeline · Banner · Button · Checkbox · CodeBlock · Dialog · FloatingButton · Footer · Header · Message · Navigation · Popover · Typography
Five components carry no color tokens at all and are theme-agnostic by construction: Elevation, LoadingErrorState, OverflowTooltip, PathDisplay, SeverityBar. LoadingErrorState composes Spinner and Typography and delegates all color to them.
Structural changes
Of the components that required a fix, these changed API or internals. The rest (Banner, Checkbox, Header, Message, Navigation, Popover) were token-only corrections with no API impact.
Accordion — Added a showBorder prop so the top border can be toggled independently of size. Default behaviour unchanged.
ActivityTimeline — Turns off the nested Accordion's border and divider (the timeline draws its own). Also gained a gradient variant.
Avatar — Resting and hover fills move off the brandBackgroundPrimary ramp onto interactivePrimaryWeakDefault / interactivePrimaryWeakHover; Light and Dark are pixel-identical after the swap, so only Midnight changes.
Button — Added gradient and gradientOutlined variants, plus a new gradient token layer.
CodeBlock — Syntax colors now come from the theme instead of hard-coded Prism literals, so the block is legible in Midnight. New prism-grammar.ts adds two missing grammar tokens.
Dialog — Description text needed a && selector to outrank a MUI-injected style. Fixes Light and IoC; no visual change in Midnight.
FloatingButton — Background is now chosen per variant instead of being hard-wired, so primary and secondary differ by fill, not just outline.
Footer — AGNTCY brand mark re-exported from Figma and its color tokenized.
Header — Outshift brand mark now paints its spark in four fixed brand colors with the wordmark tokenized to brandLogoSecondary, replacing a single currentColor silhouette. Its notification badge also drops a hand-rolled Box for the real Badge.
Navigation — selected and open split into separate treatments: selected takes the primary text ramp and full rounding, open keeps the secondary ramp and is distinguished by its border alone. Its Dashboard icon was rebuilt around a shared DashboardMark with a three-tone tones prop, so selected, unselected and disabled stop rendering identically. Re-tokenizes Light and Dark as well as Midnight.
Typography — Added a gradient text variant with new exports.
Supporting (non-component) changes
Theme foundation — midnight-theme.tsx, midnight-vars.ts, palette additions, theme-provider registration, Storybook theme switcher.
excellent / interactive disabled token opacity (fdba59688) — 9 Midnight tokens were mapped to solid Electric Blue instead of low-opacity variants. This is a token-level fix with no component file change, but it is what corrected the Banner excellent variant (previously solid bright cyan) and disabled states rendering fully opaque.
Storybook Docs CSS — .storybook/css/preview.css bare-element rules were repainting inline story previews, so the Docs tab was showing Storybook's own chrome colors on top of real components (Midnight breadcrumbs rendered blue instead of #e8e9ea). Each selector now carries a :not(.sb-unstyled *) guard. This affected verification of every component in the kit, not just one.
Audited — no change required
Recorded so they are not "fixed" into a regression later.
KeyValuePairs — no component change was needed. Every color resolves through theme.palette.vars with no hard-coded values, so it picks up Midnight from the theme foundation automatically.
Breadcrumbs — link text, separator chevron, and collapsed trigger already use interactiveSecondaryDefaultDefault; verified via computed style.
interactiveSecondaryDefaultDefault family — matches the Figma Agntcy Light / Agntcy Dark / Agntcy Midnight columns across resting, hover, active, and disabled.
Open questions for design
Verification
Tests run with Node 22 (~/.nvm/versions/node/v22.23.1); the repo's default Node v20.9.0 is too old for the Vitest/Rolldown toolchain. This package's suite is Jest — npx jest --config=jest.config.js.
Detailed rationale per token change lives in DESIGN-TOKEN-CHANGES.md.
🔗 Related Issue
Closes #
🧪 Type of Change
🧪 Testing
Test Instructions:
♿ Accessibility
📱 Responsive Design
📚 Documentation
🔄 Breaking Changes
📋 Checklist
📸 Screenshots
Before
After
🔍 Additional Notes
For Maintainers: