@integritymarketing/ic-theme
v0.5.0
Published
The MUI theme, built from @integritymarketing/ic-tokens. Spans every product environment — Connect, Connect+, and Pro all consume this same theme and differ only by override, never by a forked token set.
Readme
@integritymarketing/ic-theme
The MUI theme, built from @integritymarketing/ic-tokens. One theme spans every
environment — Connect, Connect+ and Pro all consume this.
import { ThemeProvider, CssBaseline } from '@mui/material';
import { theme } from '@integritymarketing/ic-theme';
<ThemeProvider theme={theme}>
<CssBaseline />
{children}
</ThemeProvider>;Most applications should import from their environment package instead —
@integritymarketing/ic-ui-connect/theme or @integritymarketing/ic-ui-pro/theme —
which is this theme plus any approved environment override. Today they are
identical, which is the intended state.
What it does
- Installs all 180 CSS custom properties on
:root, sovar(--divider)works anywhere in the tree - Maps the palette onto MUI's
palette, including custom keys - Sets the type scale (Inter / Lato) and the elevation array
- Overrides component defaults for buttons, inputs, alerts and the rest
CssBaseline is required, not optional — it is what emits the :root block.
Without it every var(--token) resolves to nothing and the whole system renders
unstyled.
AG Grid
import '@integritymarketing/ic-theme/agGridTheme.css';Token-driven overrides for AG Grid's Quartz theme. Import it after AG Grid's
own base CSS or the cascade wins the wrong way round. Everything in it resolves
to a var(--…), so grid styling tracks the palette automatically.
Why MUI is a peer dependency
So there is exactly one MUI instance and one theme context in the application. If this package depended on MUI directly, a consumer on a different patch could end up with two copies, two contexts, and components that silently ignore the theme.
No per-environment token sets
The platform proposal originally called for tokens-core, tokens-plus and
tokens-pro. Those were dropped: divergent token sets and "one source of truth"
cannot both be true. An environment that needs a different colour gets a
theme override against the one token set — and if the colour does not exist in
the palette, the palette is what changes.
Publishing
On any theme change. Also bumped automatically whenever tokens bumps, since
the theme's output depends on it.
