@jdcpuwiz/homelab-ui 0.7.1 → 0.9.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/globals.css CHANGED
@@ -13,6 +13,21 @@
13
13
  *
14
14
  * Override any token at `:root` in your own CSS to re-skin a project
15
15
  * without forking the package.
16
+ *
17
+ * THE RULE FOR (1) — a component must reference a token as
18
+ * `bg-[var(--hl-card)]`, NEVER as the literal `bg-[#1e1e1e]`. Both compile
19
+ * to the same pixels for a default-palette app, which is exactly why the
20
+ * literal form went unnoticed: until 0.8.0 the components hardcoded
21
+ * #ff9900 / #111111 / #1e1e1e / #252525 / #2a2620 / #f0f1f4, so a project
22
+ * that overrode those vars STILL rendered the fleet palette and had no
23
+ * error to go on. zoo-genes (green brand, warm near-blacks) shipped a
24
+ * scoped CSS override to claw its own theme back. Prefer the arbitrary
25
+ * `var()` form over the preset's `bg-card` shorthand inside this package:
26
+ * it keeps property (1) — a consumer who skips the preset still gets the
27
+ * color, which the shorthand cannot give them.
28
+ *
29
+ * Status colors (#b91c1c danger etc.) are deliberately NOT tokens — they
30
+ * are a fixed fleet semantic, identical in every app.
16
31
  */
17
32
 
18
33
  :root {
@@ -23,8 +38,40 @@
23
38
  single shade. Hierarchy comes from size/weight, never from a dimmer
24
39
  grey. zoo-vet's render became canonical; the fleet moves brighter
25
40
  from the old #e2e4e9/#ededed. The text-white/60·/40·/30 opacity ramp
26
- is dead. */
41
+ is dead AS A HIERARCHY DEVICE — what survives it is the two dimmed
42
+ chrome steps immediately below, which are tokens, not literals. */
27
43
  --hl-foreground: #f0f1f4;
44
+ /* The two dimmed steps, and the ONLY two (C461). Until 0.9.0 the
45
+ components wrote a literal `text-white/45 · /40 · /30 · /20 · /60`
46
+ ramp with no token behind any of it, so a re-skinned app (zoo-genes:
47
+ warm near-blacks, warm off-white foreground) got COLD grey chrome —
48
+ inactive nav rows, breadcrumbs, close buttons — against a warm
49
+ palette, with nothing to override.
50
+
51
+ Two steps, not five. BP #57 killed the ramp as a hierarchy device
52
+ (hierarchy is size/weight on the one flat --hl-foreground), so these
53
+ exist for the two jobs that survive it:
54
+
55
+ MUTED text you can still read but that is deliberately secondary
56
+ and usually interactive — an inactive nav row, a breadcrumb
57
+ you can click, a back link, a close button, a tertiary
58
+ button, a "Loading…" line. Hovering one takes it to the
59
+ full --hl-foreground.
60
+ FAINT chrome you do NOT read — breadcrumb chevrons, an empty-state
61
+ icon, the dashed placeholder art, the footer version stamp.
62
+ Never put a sentence in this.
63
+
64
+ Defaults are white-alpha so a default-palette (fleet orange) app is
65
+ visually unchanged; override them with your OWN foreground at any
66
+ alpha to keep the chrome in your palette, e.g.
67
+ :root { --hl-foreground-muted: rgba(216, 208, 200, 0.55); }
68
+ Do NOT add a third step to reintroduce the ramp. */
69
+ --hl-foreground-muted: rgba(255, 255, 255, 0.45);
70
+ --hl-foreground-faint: rgba(255, 255, 255, 0.3);
71
+ /* The wash under a hovered nav row / ghost control. Same story: it was
72
+ a literal `hover:bg-white/5`, which lightens a warm surface toward
73
+ cold grey. Override with your own tint. */
74
+ --hl-hover-overlay: rgba(255, 255, 255, 0.05);
28
75
  --hl-sidebar: #111111;
29
76
  --hl-content: #0d0d0d;
30
77
  --hl-card: #1e1e1e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdcpuwiz/homelab-ui",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "description": "Shared dark-theme UI primitives for the JdCpuWiz homelab \u2014 Sidebar, Button, Modal, PageHeader, TagChips, plus the canonical Tailwind preset, CSS vars, and the sanctioned three-face typography (Poppins / Orbitron / JetBrains Mono) on one flat #f0f1f4 text color.",
5
5
  "license": "MIT",
6
6
  "author": "Wiz <shad@deckerzoo.com>",
@@ -19,7 +19,8 @@
19
19
  * bg-status-success / bg-status-info / bg-status-warning / bg-status-danger /
20
20
  * bg-status-special / bg-status-neutral / bg-status-empty / bg-status-primary
21
21
  * border-border / border-input / border-input-hover
22
- * bg-overlay / bg-overlay-chip
22
+ * bg-overlay / bg-overlay-chip / bg-overlay-hover
23
+ * text-foreground / text-foreground-muted / text-foreground-faint
23
24
  * text-title / text-ink-primary / text-ink-secondary / text-ink-tertiary
24
25
  * accent-upload / accent-download / accent-error-text / accent-live
25
26
  * rounded-widget / rounded-row / rounded-chip / rounded-panel
@@ -41,7 +42,15 @@ module.exports = {
41
42
  extend: {
42
43
  colors: {
43
44
  background: "var(--hl-background)",
44
- foreground: "var(--hl-foreground)",
45
+ // `foreground` alone is unchanged (`text-foreground` still resolves
46
+ // to the one flat reading colour). `-muted` / `-faint` are the two
47
+ // dimmed CHROME steps added in 0.9.0 — see globals.css for which is
48
+ // which and why there are only two.
49
+ foreground: {
50
+ DEFAULT: "var(--hl-foreground)",
51
+ muted: "var(--hl-foreground-muted)",
52
+ faint: "var(--hl-foreground-faint)",
53
+ },
45
54
  sidebar: "var(--hl-sidebar)",
46
55
  content: "var(--hl-content)",
47
56
  card: {
@@ -81,6 +90,10 @@ module.exports = {
81
90
  overlay: {
82
91
  DEFAULT: "rgba(0,0,0,0.9)",
83
92
  chip: "rgba(0,0,0,0.6)",
93
+ // The wash under a hovered nav row / ghost control (0.9.0).
94
+ // `hover:bg-overlay-hover` — themeable, unlike the old literal
95
+ // `hover:bg-white/5` it replaces.
96
+ hover: "var(--hl-hover-overlay)",
84
97
  },
85
98
  // Reading text is ONE flat shade (BP #57). The old /60·/40·/30
86
99
  // opacity ramp is dead — hierarchy comes from size/weight, not a
@@ -88,12 +101,15 @@ module.exports = {
88
101
  // back-compat aliases but now ALL resolve to the one flat
89
102
  // foreground, so a consumer still on `text-ink-secondary` renders
90
103
  // the standard automatically. `disabled` stays a genuine dim — it
91
- // marks a disabled affordance, not reading text.
104
+ // marks a disabled affordance, not reading text — and as of 0.9.0
105
+ // it reads the `--hl-foreground-faint` token rather than repeating
106
+ // that literal rgba, so a re-skinned app themes it with everything
107
+ // else.
92
108
  ink: {
93
109
  primary: "var(--hl-foreground)",
94
110
  secondary: "var(--hl-foreground)",
95
111
  tertiary: "var(--hl-foreground)",
96
- disabled: "rgba(255,255,255,0.30)",
112
+ disabled: "var(--hl-foreground-faint)",
97
113
  },
98
114
  },
99
115
  // Typography — three self-hosted faces by job (Wiz ruling 2026-07-24,