feat(ui): expose app theme contract and public components
This commit is contained in:
@@ -133,6 +133,36 @@ entry and interaction motion. Override `--wire-motion-fast`,
|
||||
`--wire-ease-emphasized` to tune it. Hover lift is limited to precise pointing
|
||||
devices and `prefers-reduced-motion` is honored automatically.
|
||||
|
||||
### Using the selected theme in application UI
|
||||
|
||||
The active theme and palette are not limited to `@wrnexus/ui` components. The
|
||||
framework exposes the resolved values as semantic CSS custom properties, so
|
||||
pages and custom `.wrn` components can use the same contract:
|
||||
|
||||
```css
|
||||
.account-card {
|
||||
background: var(--wire-color-surface);
|
||||
color: var(--wire-color-text);
|
||||
border: 1px solid var(--wire-color-border);
|
||||
}
|
||||
|
||||
.account-card__action {
|
||||
background: var(--wire-color-primary);
|
||||
color: var(--wire-color-primary-contrast);
|
||||
}
|
||||
```
|
||||
|
||||
Stable no-spacing helper classes are also available: `wire-bg-page`,
|
||||
`wire-bg-surface`, `wire-bg-surface-2`, `wire-bg-primary`, `wire-bg-secondary`,
|
||||
`wire-text`, `wire-text-muted`, `wire-text-primary`, `wire-text-success`,
|
||||
`wire-text-warning`, `wire-text-danger`, and `wire-border`.
|
||||
|
||||
Tailwind-authored custom markup can continue using the palette families already
|
||||
used by packaged components. `indigo-*` and `violet-*` resolve to primary,
|
||||
`blue-*` to info, `emerald-*`/`green-*` to success, `amber-*` to warning, and
|
||||
`red-*`/`rose-*` to danger. These aliases live at `:root`, so they work outside
|
||||
a `[data-component]` boundary too.
|
||||
|
||||
## Usage
|
||||
|
||||
### Auto-discovery
|
||||
|
||||
Reference in New Issue
Block a user