@skaile/brand 0.6.0 → 0.7.0
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 +25 -0
- package/package.json +2 -1
- package/src/css/nuxt-ui.css +63 -0
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ properties, a Tailwind preset, and brand assets (logo, icon, identity).
|
|
|
9
9
|
marketing/website surface (gradient, persona avatars, spacing/shadow scales).
|
|
10
10
|
- `@skaile/brand/theme.css` — shadcn-semantic CSS variables, light + dark, the
|
|
11
11
|
app surface (platform, store).
|
|
12
|
+
- `@skaile/brand/nuxt-ui.css` — Nuxt UI 4 bridge: imports `theme.css` and maps its variables onto
|
|
13
|
+
the semantic `--ui-*` tokens Nuxt UI components read (palette, radius, light/dark).
|
|
12
14
|
- `@skaile/brand/tailwind-preset` — Tailwind preset bound to `theme.css` vars.
|
|
13
15
|
- `@skaile/brand/tokens` — canonical `tokens.json`.
|
|
14
16
|
- `@skaile/brand/assets/*` — `skaile-logo.svg`, `skaile-icon.svg`, `favicon.svg`, `identity.md`.
|
|
@@ -23,3 +25,26 @@ properties, a Tailwind preset, and brand assets (logo, icon, identity).
|
|
|
23
25
|
// Marketing (Astro) — plain CSS asset import
|
|
24
26
|
import '@skaile/brand/brand.css'
|
|
25
27
|
```
|
|
28
|
+
```css
|
|
29
|
+
/* Nuxt UI 4 app (Tailwind v4): import AFTER "@nuxt/ui" — same specificity, source order decides */
|
|
30
|
+
@import "tailwindcss";
|
|
31
|
+
@import "@nuxt/ui";
|
|
32
|
+
@import "@skaile/brand/nuxt-ui.css"; /* includes theme.css */
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Nuxt UI bridge (`nuxt-ui.css`)
|
|
36
|
+
|
|
37
|
+
Takes the brand palette, radius and light/dark switch into every Nuxt UI component with no
|
|
38
|
+
per-app overrides. Dark mode follows the `.dark` class Nuxt UI's color mode puts on `<html>`.
|
|
39
|
+
It replaces `@ecsplico/brand/nuxt-ui.css` with identical output; migrate by swapping the import
|
|
40
|
+
specifier and the dependency.
|
|
41
|
+
|
|
42
|
+
| Selector | Effect |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `:root, .light, .dark` | `--ui-primary/secondary/success/warning/error/info`, `--ui-bg-*`, `--ui-text-*`, `--ui-border-*`, `--ui-radius` from the brand variables |
|
|
45
|
+
| `.dark .bg-inverted` | label on solid-neutral surfaces takes the dark page colour |
|
|
46
|
+
| `.dark` | `--ui-primary` switches to `--color-primary-bright`; #7300ff is ~2.3:1 on the dark page |
|
|
47
|
+
|
|
48
|
+
An app with its own dark selector (forge-common's `.forge-project-dark`) has to repeat the
|
|
49
|
+
`--ui-*` mapping under that selector, because a custom property referencing another is resolved
|
|
50
|
+
where it is declared.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skaile/brand",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Skaile brand: design tokens, CSS custom properties, Tailwind preset, and brand assets",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"./tokens": "./src/tokens.json",
|
|
13
13
|
"./brand.css": "./src/css/brand.css",
|
|
14
14
|
"./theme.css": "./src/css/theme.css",
|
|
15
|
+
"./nuxt-ui.css": "./src/css/nuxt-ui.css",
|
|
15
16
|
"./tailwind-preset": "./src/tailwind-preset.ts",
|
|
16
17
|
"./assets/*": "./assets/*"
|
|
17
18
|
},
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @skaile/brand/nuxt-ui.css: Skaile brand → Nuxt UI 4 bridge.
|
|
3
|
+
*
|
|
4
|
+
* Maps the semantic tokens Nuxt UI components read (--ui-*) onto the Skaile
|
|
5
|
+
* brand variables from ./theme.css, so every Nuxt UI component
|
|
6
|
+
* takes the brand palette, radius and light/dark switch with no per-app
|
|
7
|
+
* overrides. Nuxt UI 4 components use semantic tokens only, so overriding the
|
|
8
|
+
* semantic set is enough.
|
|
9
|
+
*
|
|
10
|
+
* Import AFTER "@nuxt/ui" (equal specificity, source order decides):
|
|
11
|
+
* @import "tailwindcss";
|
|
12
|
+
* @import "@nuxt/ui";
|
|
13
|
+
* @import "@skaile/brand/nuxt-ui.css";
|
|
14
|
+
*/
|
|
15
|
+
@import "./theme.css";
|
|
16
|
+
|
|
17
|
+
:root,
|
|
18
|
+
.light,
|
|
19
|
+
.dark {
|
|
20
|
+
--ui-primary: var(--primary);
|
|
21
|
+
--ui-secondary: var(--secondary);
|
|
22
|
+
--ui-success: var(--color-success);
|
|
23
|
+
--ui-warning: var(--color-warning);
|
|
24
|
+
--ui-error: var(--destructive);
|
|
25
|
+
--ui-info: var(--color-ai-accent); /* brand has no info colour */
|
|
26
|
+
--ui-bg: var(--background);
|
|
27
|
+
--ui-bg-muted: var(--muted);
|
|
28
|
+
--ui-bg-elevated: var(--card);
|
|
29
|
+
--ui-bg-accented: var(--accent);
|
|
30
|
+
--ui-bg-inverted: var(--foreground);
|
|
31
|
+
--ui-text: var(--foreground);
|
|
32
|
+
--ui-text-highlighted: var(--foreground);
|
|
33
|
+
--ui-text-toned: var(--foreground);
|
|
34
|
+
--ui-text-muted: var(--muted-foreground);
|
|
35
|
+
--ui-text-dimmed: var(--muted-foreground);
|
|
36
|
+
--ui-text-inverted: var(--primary-foreground);
|
|
37
|
+
--ui-border: var(--border);
|
|
38
|
+
--ui-border-muted: var(--border);
|
|
39
|
+
--ui-border-accented: var(--input);
|
|
40
|
+
--ui-border-inverted: var(--foreground);
|
|
41
|
+
--ui-radius: var(--radius);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* `--ui-text-inverted` is the label on every solid colour (`bg-primary`, ...)
|
|
46
|
+
* AND on solid neutral (`bg-inverted`). Brand keeps the saturated #7300ff
|
|
47
|
+
* primary with a white label in dark, so the label stays white; only surfaces
|
|
48
|
+
* on `--ui-bg-inverted` (the light --foreground in dark) take the dark page
|
|
49
|
+
* colour. Descendants (alert titles, icons) inherit it.
|
|
50
|
+
*/
|
|
51
|
+
.dark .bg-inverted {
|
|
52
|
+
--ui-text-inverted: var(--background);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* #7300ff on the dark page is ~2.3:1, too faint for the text and outlines
|
|
57
|
+
* Nuxt UI draws in `--ui-primary` (soft/outline badges, active tabs, links).
|
|
58
|
+
* Brand's dark highlight `--color-primary-bright` (#9b40ff) takes over; a
|
|
59
|
+
* white label on it stays above 4.5:1.
|
|
60
|
+
*/
|
|
61
|
+
.dark {
|
|
62
|
+
--ui-primary: var(--color-primary-bright);
|
|
63
|
+
}
|