@zooui/theme-forest 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/app.config.ts +7 -0
- package/assets/css/theme.css +26 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -163,6 +163,7 @@ otherwise, and the layer does not depend on nu-grid (`apps/forest` installs it):
|
|
|
163
163
|
| Header | Forest's kicker, in the mono face — through `ui.table`, which nu-grid inherits — and group labels the same |
|
|
164
164
|
| Group band | neutral (`bg-elevated/50`), **3px** accent leading edge on both modes |
|
|
165
165
|
| Cells | tabular figures |
|
|
166
|
+
| Stacking | `isolate` on the grid's root: its own stacking context, so its sticky header cells and group labels stay under a product's sticky page header |
|
|
166
167
|
|
|
167
168
|
The band overrides spell out `dark:` too: tailwind-merge only replaces a class with the same variant, and
|
|
168
169
|
`compact` tints its band `dark:bg-primary/12`. Tests check the band and edge in light and dark on both modes.
|
package/app.config.ts
CHANGED
|
@@ -62,6 +62,13 @@ export default defineAppConfig({
|
|
|
62
62
|
nuGrid: {
|
|
63
63
|
ui: {
|
|
64
64
|
slots: {
|
|
65
|
+
// `isolate` makes the grid its own stacking context. Its root is `relative` with no z-index, so without it
|
|
66
|
+
// the grid's z-10 header cells and z-50 group labels compete with the page's own chrome, and paint over a
|
|
67
|
+
// sticky page header (`z-10`) as the page scrolls the grid under it. Inside, nothing changes: the grid is
|
|
68
|
+
// still its own scroll container, and its sticky rows keep their order among themselves.
|
|
69
|
+
// nu-grid 0.4.5+ puts `isolate` on the root itself; this line is for products on older nu-grid, and is a
|
|
70
|
+
// no-op on newer ones.
|
|
71
|
+
root: 'isolate',
|
|
65
72
|
groupHeader: 'bg-elevated/50 hover:bg-elevated dark:bg-elevated/50 dark:hover:bg-elevated',
|
|
66
73
|
groupHeaderLeft: 'border-l-3',
|
|
67
74
|
// headers come from `ui.table` (nu-grid inherits it); the group band's labels are its own slots
|
package/assets/css/theme.css
CHANGED
|
@@ -162,6 +162,32 @@
|
|
|
162
162
|
--color-pine-info-950: var(--info-950);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/* Status INK apart from status FILL. Nuxt UI paints both from one token (`text-warning` and `bg-warning` both read
|
|
166
|
+
--ui-warning, its 500 in light), and Forest's fills stay that 500. As ink on white or on its own 10% tint, though,
|
|
167
|
+
the 500 of warning, success and info is under 3:1 (an icon in a confirm badge, an alert's icon, an outline
|
|
168
|
+
button's label), so in light their TEXT reads the 700, as the design source's --warn-text does. Dark mode keeps
|
|
169
|
+
Nuxt UI's 400, which already clears it. Error and primary clear 3:1 at their 500 and stay as shipped.
|
|
170
|
+
Plain rules, not @utility: Tailwind emits its own `text-warning` after a same-named @utility, so that one would
|
|
171
|
+
lose. These come after Tailwind's utilities (forest.css imports base.css first) and so replace them; `bg-*`,
|
|
172
|
+
`border-*` and the `/75`-style alpha inks are untouched. */
|
|
173
|
+
@layer base {
|
|
174
|
+
:root, :host, .light {
|
|
175
|
+
--zoo-ink-warning: var(--ui-color-warning-700);
|
|
176
|
+
--zoo-ink-success: var(--ui-color-success-700);
|
|
177
|
+
--zoo-ink-info: var(--ui-color-info-700);
|
|
178
|
+
}
|
|
179
|
+
.dark {
|
|
180
|
+
--zoo-ink-warning: var(--ui-warning);
|
|
181
|
+
--zoo-ink-success: var(--ui-success);
|
|
182
|
+
--zoo-ink-info: var(--ui-info);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
@layer utilities {
|
|
186
|
+
.text-warning { color: var(--zoo-ink-warning); }
|
|
187
|
+
.text-success { color: var(--zoo-ink-success); }
|
|
188
|
+
.text-info { color: var(--zoo-ink-info); }
|
|
189
|
+
}
|
|
190
|
+
|
|
165
191
|
/* The page ground. Nuxt UI paints the light page with --ui-bg (white), the same token its cards, inputs, menus
|
|
166
192
|
and overlays use. Forest separates the two: the ground is its paper (--pine-50) and raised surfaces are white.
|
|
167
193
|
So the GROUND changes and --ui-bg does not — every component Nuxt UI draws on bg-default stays white and now
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zooui/theme-forest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Forest, a Zoo UI theme: a Nuxt layer that extends @zooui/nuxt with Forest's colors, page ground, typefaces (Inter and JetBrains Mono, self-hosted), accent schemes and component styling. A product extends this one layer for Zoo UI and the theme together.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@fontsource-variable/inter": "^5.3.0",
|
|
34
34
|
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
|
35
|
-
"@zooui/nuxt": "0.
|
|
35
|
+
"@zooui/nuxt": "0.3.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"nuxt": "^4.1.0",
|