@jdcpuwiz/homelab-ui 0.1.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 ADDED
@@ -0,0 +1,56 @@
1
+ /*
2
+ * @jdcpuwiz/homelab-ui — global theme tokens (CSS variables).
3
+ *
4
+ * Consumer usage (Next.js): `import "@jdcpuwiz/homelab-ui/globals.css";`
5
+ * in `app/layout.tsx` (BEFORE your own globals.css if you have one, so
6
+ * yours can override).
7
+ *
8
+ * Defines the `--hl-*` token namespace consumed by both:
9
+ * 1. The package's compiled components (via Tailwind arbitrary-value
10
+ * classes — they keep working even if you skip the preset).
11
+ * 2. The Tailwind preset (`@jdcpuwiz/homelab-ui/tailwind-preset`) —
12
+ * maps `bg-sidebar`, `text-brand`, etc. onto these vars.
13
+ *
14
+ * Override any token at `:root` in your own CSS to re-skin a project
15
+ * without forking the package.
16
+ */
17
+
18
+ :root {
19
+ /* Surfaces (darkest → lightest) */
20
+ --hl-background: #0f0f0f;
21
+ --hl-foreground: #ededed;
22
+ --hl-sidebar: #111111;
23
+ --hl-content: #0d0d0d;
24
+ --hl-card: #1e1e1e;
25
+ --hl-card-hover: #252525;
26
+ --hl-card-warm: #2a2620;
27
+
28
+ /* Borders */
29
+ --hl-border: #1e1e1e;
30
+ --hl-input-border: #333333;
31
+ --hl-input-border-hover: #555555;
32
+
33
+ /* Brand — identity only, never status semantics */
34
+ --hl-brand: #ff9900;
35
+ --hl-brand-hover: #cc6a1a;
36
+ --hl-brand-glow: #ffb84d;
37
+ --hl-brand-fg: #0a0a0a;
38
+
39
+ /* Page-title purple (doghouse convention — h1 only) */
40
+ --hl-title: #aa89b7;
41
+ }
42
+
43
+ html {
44
+ color-scheme: dark;
45
+ }
46
+
47
+ html,
48
+ body {
49
+ background-color: var(--hl-background);
50
+ color: var(--hl-foreground);
51
+ font-family: var(--font-geist-sans), ui-sans-serif, system-ui, -apple-system,
52
+ "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
53
+ font-size: 14px;
54
+ line-height: 1.5;
55
+ -webkit-font-smoothing: antialiased;
56
+ }
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@jdcpuwiz/homelab-ui",
3
+ "version": "0.1.0",
4
+ "description": "Shared dark-theme UI primitives for the JdCpuWiz homelab — Sidebar, Button, Modal, PageHeader, TagChips, plus the canonical Tailwind preset, CSS vars, and next/font wiring.",
5
+ "license": "MIT",
6
+ "author": "Wiz <shad@deckerzoo.com>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/JdCpuWiz/homelab-ui.git"
10
+ },
11
+ "homepage": "https://github.com/JdCpuWiz/homelab-ui#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/JdCpuWiz/homelab-ui/issues"
14
+ },
15
+ "type": "module",
16
+ "main": "./dist/index.cjs",
17
+ "module": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js",
23
+ "require": "./dist/index.cjs"
24
+ },
25
+ "./tailwind-preset": {
26
+ "require": "./tailwind-preset.cjs",
27
+ "import": "./tailwind-preset.cjs",
28
+ "default": "./tailwind-preset.cjs"
29
+ },
30
+ "./globals.css": "./globals.css"
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "tailwind-preset.cjs",
35
+ "globals.css",
36
+ "README.md",
37
+ "LICENSE"
38
+ ],
39
+ "sideEffects": [
40
+ "*.css"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsup",
44
+ "dev": "tsup --watch",
45
+ "ladle": "ladle serve",
46
+ "ladle:build": "ladle build",
47
+ "typecheck": "tsc --noEmit",
48
+ "prepublishOnly": "npm run build"
49
+ },
50
+ "peerDependencies": {
51
+ "next": ">=15",
52
+ "react": ">=18",
53
+ "react-dom": ">=18",
54
+ "tailwindcss": "^3"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "next": {
58
+ "optional": true
59
+ }
60
+ },
61
+ "dependencies": {
62
+ "clsx": "^2.1.1",
63
+ "lucide-react": "^0.460.0",
64
+ "tailwind-merge": "^2.5.4"
65
+ },
66
+ "devDependencies": {
67
+ "@ladle/react": "^4.1.2",
68
+ "@types/node": "^20",
69
+ "@types/react": "^18",
70
+ "@types/react-dom": "^18",
71
+ "autoprefixer": "^10.5.0",
72
+ "next": "^15",
73
+ "react": "^19",
74
+ "react-dom": "^19",
75
+ "tailwindcss": "^3.4.15",
76
+ "tsup": "^8.3.5",
77
+ "typescript": "^5.6.3"
78
+ },
79
+ "keywords": [
80
+ "homelab",
81
+ "ui",
82
+ "tailwind",
83
+ "react",
84
+ "design-system"
85
+ ]
86
+ }
@@ -0,0 +1,135 @@
1
+ /**
2
+ * @jdcpuwiz/homelab-ui — Tailwind preset
3
+ *
4
+ * Consumer usage (tailwind.config.{js,ts}):
5
+ *
6
+ * module.exports = {
7
+ * presets: [require("@jdcpuwiz/homelab-ui/tailwind-preset")],
8
+ * content: [
9
+ * "./app/**\/*.{ts,tsx}",
10
+ * "./components/**\/*.{ts,tsx}",
11
+ * // REQUIRED: pull classes from the package's compiled JS
12
+ * "./node_modules/@jdcpuwiz/homelab-ui/dist/**\/*.{js,mjs,cjs}",
13
+ * ],
14
+ * };
15
+ *
16
+ * Provides the full token namespace shared by doghouse + asset-den:
17
+ * bg-sidebar / bg-content / bg-card / bg-card-hover / bg-card-warm
18
+ * text-brand / bg-brand / text-brand-fg
19
+ * bg-status-success / bg-status-info / bg-status-warning / bg-status-danger /
20
+ * bg-status-special / bg-status-neutral / bg-status-empty / bg-status-primary
21
+ * border-border / border-input / border-input-hover
22
+ * bg-overlay / bg-overlay-chip
23
+ * text-title / text-ink-primary / text-ink-secondary / text-ink-tertiary
24
+ * accent-upload / accent-download / accent-error-text / accent-live
25
+ * rounded-widget / rounded-row / rounded-chip / rounded-panel
26
+ * w-sidebar / w-logo / h-logo
27
+ * font-sans / font-mono / font-display
28
+ * text-2xs
29
+ * shadow-lantern
30
+ * animate-lantern-pulse
31
+ *
32
+ * The CSS variables for theme tokens live in `@jdcpuwiz/homelab-ui/globals.css`.
33
+ * The preset references them so consumers can override per-app by re-declaring
34
+ * the same vars at `:root`.
35
+ */
36
+
37
+ /** @type {import('tailwindcss').Config} */
38
+ module.exports = {
39
+ darkMode: "class",
40
+ theme: {
41
+ extend: {
42
+ colors: {
43
+ background: "var(--hl-background)",
44
+ foreground: "var(--hl-foreground)",
45
+ sidebar: "var(--hl-sidebar)",
46
+ content: "var(--hl-content)",
47
+ card: {
48
+ DEFAULT: "var(--hl-card)",
49
+ hover: "var(--hl-card-hover)",
50
+ warm: "var(--hl-card-warm)",
51
+ },
52
+ border: {
53
+ DEFAULT: "var(--hl-border)",
54
+ input: "var(--hl-input-border)",
55
+ inputHover: "var(--hl-input-border-hover)",
56
+ },
57
+ brand: {
58
+ DEFAULT: "var(--hl-brand)",
59
+ hover: "var(--hl-brand-hover)",
60
+ glow: "var(--hl-brand-glow)",
61
+ ink: "var(--hl-brand-fg)",
62
+ fg: "var(--hl-brand-fg)",
63
+ },
64
+ title: "var(--hl-title)",
65
+ status: {
66
+ success: "#15803d",
67
+ info: "#1d4ed8",
68
+ warning: "#eab308",
69
+ danger: "#b91c1c",
70
+ special: "#6d28d9",
71
+ neutral: "#6b7280",
72
+ empty: "#4b5563",
73
+ primary: "var(--hl-brand)",
74
+ },
75
+ accent: {
76
+ upload: "#a78bfa",
77
+ download: "#38bdf8",
78
+ errorText: "#f87171",
79
+ live: "#ef4444",
80
+ },
81
+ overlay: {
82
+ DEFAULT: "rgba(0,0,0,0.9)",
83
+ chip: "rgba(0,0,0,0.6)",
84
+ },
85
+ ink: {
86
+ primary: "#ffffff",
87
+ secondary: "rgba(255,255,255,0.60)",
88
+ tertiary: "rgba(255,255,255,0.40)",
89
+ disabled: "rgba(255,255,255,0.30)",
90
+ },
91
+ },
92
+ fontFamily: {
93
+ sans: ["var(--font-geist-sans)", "system-ui", "sans-serif"],
94
+ mono: ["var(--font-geist-mono)", "ui-monospace", "monospace"],
95
+ display: [
96
+ "var(--font-orbitron)",
97
+ "var(--font-geist-sans)",
98
+ "sans-serif",
99
+ ],
100
+ },
101
+ fontSize: {
102
+ "2xs": ["10px", { lineHeight: "14px" }],
103
+ },
104
+ borderRadius: {
105
+ widget: "0.75rem",
106
+ row: "0.5rem",
107
+ chip: "0.25rem",
108
+ panel: "1rem",
109
+ },
110
+ spacing: {
111
+ sidebar: "15rem",
112
+ logo: "9rem",
113
+ },
114
+ ringColor: {
115
+ DEFAULT: "var(--hl-brand-glow)",
116
+ },
117
+ ringWidth: {
118
+ DEFAULT: "2px",
119
+ },
120
+ boxShadow: {
121
+ lantern: "0 0 24px rgba(255,184,77,0.25)",
122
+ },
123
+ keyframes: {
124
+ "lantern-pulse": {
125
+ "0%, 100%": { boxShadow: "0 0 12px rgba(255,184,77,0.2)" },
126
+ "50%": { boxShadow: "0 0 28px rgba(255,184,77,0.45)" },
127
+ },
128
+ },
129
+ animation: {
130
+ "lantern-pulse": "lantern-pulse 1.8s ease-in-out infinite",
131
+ },
132
+ },
133
+ },
134
+ plugins: [],
135
+ };