Feat/midnight theme gradients integration - #113
Open
jatinverma-prog wants to merge 22 commits into
Open
Conversation
Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
…xceptions Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
…xceptions Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
…intelligaia/open-ui-kit into feat/midnight-theme-gradients-integration
Add a boolean gradient prop to Typography that fills text with a gradient via background-clip:text. Composes with any variant. New shared token gradientTextWhiteBlue (#FFFFFF -> #3F7DEF). Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Add a gradient variant that renders glowing status dots, a per-step time, and a fade-out down older steps. New shared tokens gradientGlowGreen and gradientGlowRed; gradientGlowOrange geometry realigned to match. Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Yashwant Rautela <yashwant.rautela@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
jatinverma-prog
force-pushed
the
feat/midnight-theme-gradients-integration
branch
from
August 19, 2026 10:14
2ee332d to
4b6abde
Compare
jatinverma-prog
marked this pull request as ready for review
August 19, 2026 10:16
jatinverma-prog
force-pushed
the
feat/midnight-theme-gradients-integration
branch
from
August 19, 2026 10:30
7fbdeb0 to
b51ed38
Compare
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
Signed-off-by: Jatin Verma <jatin.verma@intelligaia.com>
jatinverma-prog
force-pushed
the
feat/midnight-theme-gradients-integration
branch
from
August 19, 2026 12:21
11c208d to
e2921b9
Compare
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 — Gradient Variants
Figma source: Outshift Spark Component Library
The gradient token layer
GradientVarsType(src/types/gradient-vars.ts) declares 46 tokens in three groups — fills, strokes, and radial glows — named from thegradient-tokenlabels in Figma, camelCased from the Figma path (Gradient/Data-Viz-Cyan-Blue→gradientDataVizCyanBlue). It mirrorsVarsType: one flat contract every theme implements, mounted on the MUI palette aspalette.gradients, so components readtheme.palette.gradients.*with no theme branching.src/types/gradient-vars.tssrc/theme/style/gradient-vars-base.tssrc/theme/midnight/midnight-gradient-vars.tssrc/theme/style/color-palette.tsmidnightGradientStops— the raw stop colors the ramps are built fromsrc/theme/style/__tests__/gradient-vars.test.tsThree gradients are shared by every theme, not diverged per theme, because design defined them once and the variants must look identical everywhere:
gradientGlobalButtonPrimaryFill,gradientGlobalButtonPrimaryBorderGlow, andgradientTextWhiteBlue. Everything else in the base map is explicitly provisional, not design-approved — flagged in-file so it is not mistaken for a design deliverable. When design delivers Light / Dark / IoC ramps, each gets a*-gradient-vars.tsthat spreads the base and overrides, exactly as Midnight does.Where Figma's own labels were wrong or reused, the token carries the corrected name plus a comment recording the original (
Data-Viz-Pink-Magentawhose stops are orange →gradientDataVizOrangeAmber;Card-Highlight-Radialwhich is actually linear;Panel-Exec-Borderlabelled radial but measured as a 135° diagonal ramp).Components — gradient variants added
variant="gradient",variant="gradientOutlined"glow,glass,alert,connector,image+CardAlertHeadervariant="gradient"background-clip: texton the white→blue rampglowGlobal-Border/Fadeborder + blue cast; stronger whentitleis setglowInput-Border-Blueramp, for prompt-style inputsvariant="gradient", per-steptimegradient: "amber" | "teal" | "blue"gradient,stroke,dotStructural changes
Button — Adds
gradientandgradientOutlinedvariants readinggradientGlobalButtonPrimaryFill/gradientGlobalButtonPrimaryBorderGlow. The border-glow geometry was fitted to the rendered Figma node rather than copied from the swatch: the swatch is a horizontal rectangle but the button carries the ramp up its box, so the token is7.5degwith stops at 10/90/170% — max channel error 3/255 against the render, versus 46 for a naive90deg, 0/50/100.Card — The largest surface change. Five independent treatments, each a boolean or scalar prop rather than a variant enum, so they compose:
glass—Card-Glass-BGfill over a backdrop blur, white hairline, soft drop shadow. The fill is translucent, so the card picks up what is behind it.glow— gradient border plus blue glow. Mutually exclusive withimage.alert="warning" | "critical"— translucent surface at the larger alert radius/padding;criticaladds the rainbow gradient border,warninghas none.CardAlertSeverityis deliberately not theSeverityenum from@/common— that enum has noWARNINGmember and its other levels have no design inAlerts Card(274421:47415).connector—Graph-Connectorfill and glow over a backdrop blur with a matching 1px gradient stroke, at a tighter 6px radius.image— photo layered overWelcome-Card-BG-Darkunder anOverlay-Black-Fade-Inscrim.New
CardAlertHeader(card-alert-header.tsx) picks up the parent card's accent color and takes an optional right-alignedtimestamp.Typography — Promoted from a bare MUI re-export to a local wrapper (
src/components/typography/) so it can own thegradientvariant.export { Typography }moves out of the MUI passthrough block incomponents/index.tsintoexport * from "./typography". Drop-in — the wrapper forwards all MUI Typography props — but it is a real change in what consumers import.GaugeChart — The gradient treatment keeps both rings as recharts
Pies so it shares a rendering path with the default gauge, but paints each sector through a customrenderGaugeArc: a filled sector cannot carry the frame's round cap (recharts approximates one fromcornerRadiusby trimming outer and inner edges by two different angles, joined by a straight edge). Stroke width is normalized to the frame's 171.7px gauge so it stays exact at any size, and the radius is derived from the box rather than lifted from Figma — the frame's own 84.18px radius plus half its stroke overflows its 171.7px bounds and would be clipped flat at 0°, 90° and 180°.SpiderChart — New
custom-gradient-radar.tsxshape. A series'gradientkey setsbackground,strokeanddottogether (ramp fills the area, its paired accent draws the outline, each vertex gets a ring in the same accent) unless those are passed explicitly.SpiderChartGradientis exported and documents its Figma-token ↔ theme-token mapping inline.ActivityTimeline —
variant="gradient"renders the "Key Events" style: glowing status dots on a single line that fades down the list, each step'stimebeside it. Steps run newest first, with the oldest two dimming to 50% and 30%.Navigation — Not a gradient change. Drawer-item hover and selected were previously the same treatment; hover now adds the
brandBackgroundPrimaryMediumfill but keeps the label onbrandTextSecondary, and onlyselectedpaintsbrandTextPrimary— and holds that ramp while hovered.Supporting (non-component) changes
Theme registration —
light-theme.tsx,dark-theme.tsx,ioc-theme.tsxandmidnight-theme.tsxeach mountpalette.gradients;src/types/theme.tsextends the palette type.baseGradientVars,midnightGradientVarsandGradientVarsTypeare exported from the package root.Storybook — New
Foundations/Theme Gradientsstory renders every token as a labelled swatch, so the whole set is inspectable per theme in one place.welcome-card.jpgadded for the Cardimagestory.Docs —
card.md,button.md,toast.md,typography.md,gauge-chart.md,spider-chart.md,activity-timeline.mdupdated; new demo files forAlertCard,GlassCard,ConnectorCard,CardWithImage,ButtonIconOnlyGradient.colors.mdxandtypography.mdxdocument the gradient layer.Detailed rationale per token change lives in DESIGN-TOKEN-CHANGES.md.
Verification
Tests were not re-run in this session — the numbers below are the suite totals on this branch, not a fresh run. CI is the source of truth.
CardAlertHeadertimeglow, glow-with-titleglowTests 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.🔗 Related Issue
Closes #
🧪 Type of Change
🧪 Testing
Test Instructions:
nvm use 22 && yarn installyarn storybookand switch the theme to Midnight.gradient,gradientOutlined), Card (Glow,Glass,CriticalAlert,WarningAlert,WithImage, connector), Toast (glow), InputField (glow), Typography (gradient), ActivityTimeline (gradient), GaugeChart (amber/teal/blue), SpiderChart (per-series ramps).npx jest --config=jest.config.jsinpackages/open-ui-kit.♿ Accessibility
📱 Responsive Design
📚 Documentation
🔄 Breaking Changes
Typographyis no longer the MUI re-export — it is now a local wrapper that forwards all MUI Typography props and adds thegradientvariant. Expected to be drop-in, but it is a change in what@open-ui-kitexports under that name and is worth a reviewer's eye.📋 Checklist
📸 Screenshots
Before
After
For Maintainers: