@unicitylabs/sphere-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.
@@ -0,0 +1,3 @@
1
+ export { a as AchSelectedItem, C as CanvasAchievement, b as CanvasQuest, c as CanvasTrack, S as SelectedItem } from '../index-DsEO4kM1.js';
2
+ import 'react';
3
+ import '@dnd-kit/core';
File without changes
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@unicitylabs/sphere-ui",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "types": "./dist/index.d.ts"
11
+ },
12
+ "./styles": "./src/styles/index.css",
13
+ "./forms": {
14
+ "import": "./dist/forms/index.js",
15
+ "types": "./dist/forms/index.d.ts"
16
+ },
17
+ "./canvas": {
18
+ "import": "./dist/canvas/index.js",
19
+ "types": "./dist/canvas/index.d.ts"
20
+ },
21
+ "./panels": {
22
+ "import": "./dist/panels/index.js",
23
+ "types": "./dist/panels/index.d.ts"
24
+ },
25
+ "./hooks": {
26
+ "import": "./dist/hooks/index.js",
27
+ "types": "./dist/hooks/index.d.ts"
28
+ }
29
+ },
30
+ "files": ["dist", "src/styles"],
31
+ "scripts": {
32
+ "build": "tsup",
33
+ "dev": "tsup --watch",
34
+ "lint": "eslint src/",
35
+ "typecheck": "tsc --noEmit"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^19.0.0",
39
+ "react-dom": "^19.0.0",
40
+ "@tanstack/react-query": "^5.0.0",
41
+ "@tanstack/react-table": "^8.0.0",
42
+ "@dnd-kit/core": "^6.0.0",
43
+ "@dnd-kit/sortable": "^8.0.0",
44
+ "lucide-react": "^0.400.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/react": "^19.0.0",
48
+ "@types/react-dom": "^19.0.0",
49
+ "react": "^19.0.0",
50
+ "react-dom": "^19.0.0",
51
+ "@tanstack/react-query": "^5.40.0",
52
+ "@tanstack/react-table": "^8.17.3",
53
+ "@dnd-kit/core": "^6.0.0",
54
+ "@dnd-kit/sortable": "^8.0.0",
55
+ "@dnd-kit/utilities": "^3.0.0",
56
+ "lucide-react": "^0.400.0",
57
+ "tsup": "^8.0.0",
58
+ "typescript": "~5.9.0"
59
+ }
60
+ }
@@ -0,0 +1,121 @@
1
+ /* ═══════════════════════════════════════════════════════════════════════════
2
+ Sphere UI — Component Classes
3
+ ═══════════════════════════════════════════════════════════════════════════ */
4
+
5
+ /* ─── Card ─────────────────────────────────────────────────────────────── */
6
+ .admin-card {
7
+ background: var(--bg-surface);
8
+ border: 1px solid var(--border);
9
+ border-radius: var(--radius-lg);
10
+ }
11
+ .admin-card-glow {
12
+ background: var(--bg-surface);
13
+ border: 1px solid var(--border-focus);
14
+ border-radius: var(--radius-lg);
15
+ box-shadow: var(--shadow-glow);
16
+ }
17
+
18
+ /* ─── Inputs ─────────────────────────────────────────────────────────── */
19
+ .admin-input {
20
+ width: 100%;
21
+ background: var(--bg-hover);
22
+ border: 1px solid var(--border);
23
+ border-radius: var(--radius-md);
24
+ padding: 0.5rem 0.75rem;
25
+ font-size: 0.8125rem;
26
+ font-family: var(--font-body);
27
+ color: var(--text-primary);
28
+ outline: none;
29
+ transition: border-color 0.2s, box-shadow 0.2s;
30
+ }
31
+ .admin-input::placeholder { color: var(--text-muted); }
32
+ .admin-input:focus {
33
+ border-color: var(--border-focus);
34
+ box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.08), inset 0 0 0 1px rgba(255, 111, 0, 0.1);
35
+ }
36
+ .admin-input-error { border-color: rgba(239, 68, 68, 0.5) !important; }
37
+ .admin-input-error:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08) !important; }
38
+ select.admin-input {
39
+ appearance: none;
40
+ color: var(--text-primary);
41
+ padding-top: 0.25rem;
42
+ padding-bottom: 0.25rem;
43
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.28)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
44
+ background-repeat: no-repeat;
45
+ background-position: right 8px center;
46
+ padding-right: 2rem;
47
+ }
48
+
49
+ /* ─── Tables ─────────────────────────────────────────────────────────── */
50
+ .admin-table { width: 100%; font-size: 0.8125rem; border-collapse: separate; border-spacing: 0; }
51
+ .admin-table thead { position: sticky; top: 0; z-index: 1; }
52
+ .admin-table th {
53
+ text-align: left; font-family: var(--font-body); font-size: 0.65rem; font-weight: 600;
54
+ color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
55
+ padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-root);
56
+ }
57
+ .admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); }
58
+ .admin-table tbody tr { transition: background-color 0.12s; }
59
+ .admin-table tbody tr:hover { background: rgba(255, 111, 0, 0.06); }
60
+ .admin-table tbody tr:last-child td { border-bottom: none; }
61
+
62
+ /* ─── Badges ─────────────────────────────────────────────────────────── */
63
+ .badge {
64
+ display: inline-flex; align-items: center; font-family: var(--font-body);
65
+ font-size: 0.65rem; font-weight: 600; letter-spacing: 0.04em;
66
+ text-transform: uppercase; padding: 0.2rem 0.55rem; border-radius: 4px;
67
+ }
68
+ .badge-green { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.15); }
69
+ .badge-yellow { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.15); }
70
+ .badge-red { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.15); }
71
+ .badge-blue { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.15); }
72
+ .badge-purple { background: rgba(168, 85, 247, 0.1); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.15); }
73
+ .badge-cyan { background: rgba(6, 182, 212, 0.1); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.15); }
74
+ .badge-gray { background: rgba(255, 255, 255, 0.04);color: #737373; border: 1px solid rgba(255, 255, 255, 0.06); }
75
+ .badge-orange { background: rgba(255, 111, 0, 0.1); color: #FF6F00; border: 1px solid rgba(255, 111, 0, 0.15); }
76
+
77
+ /* ─── Buttons ────────────────────────────────────────────────────────── */
78
+ .btn-primary {
79
+ display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
80
+ font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
81
+ padding: 0.5rem 1rem; border-radius: var(--radius-md); border: none; cursor: pointer; outline: none;
82
+ transition: all 0.15s; background: #FF6F00; color: white;
83
+ box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 0 16px rgba(255, 111, 0, 0.1);
84
+ }
85
+ .btn-primary:hover { background: #e06400; box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 24px rgba(255, 111, 0, 0.2); transform: translateY(-1px); }
86
+ .btn-primary:active { transform: translateY(0); }
87
+ .btn-primary:disabled { opacity: 0.4; pointer-events: none; }
88
+
89
+ .btn-secondary {
90
+ display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
91
+ font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
92
+ padding: 0.5rem 1rem; border-radius: var(--radius-md); cursor: pointer; outline: none;
93
+ transition: all 0.15s; background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border);
94
+ }
95
+ .btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255, 255, 255, 0.12); }
96
+
97
+ .btn-danger {
98
+ display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
99
+ font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
100
+ padding: 0.5rem 1rem; border-radius: var(--radius-md); cursor: pointer; outline: none;
101
+ transition: all 0.15s; color: #f87171; background: rgba(239, 68, 68, 0.06); border: 1px solid rgba(239, 68, 68, 0.12);
102
+ }
103
+ .btn-danger:hover { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.2); }
104
+
105
+ .btn-ghost {
106
+ display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
107
+ font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
108
+ padding: 0.5rem 1rem; border-radius: var(--radius-md); border: none; cursor: pointer; outline: none;
109
+ transition: all 0.15s; color: var(--text-secondary); background: transparent;
110
+ }
111
+ .btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }
112
+
113
+ /* ─── Page layout ────────────────────────────────────────────────────── */
114
+ .page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
115
+ .page-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-primary); }
116
+ .page-subtitle { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.125rem; }
117
+
118
+ /* ─── Animations ─────────────────────────────────────────────────────── */
119
+ @keyframes pulse-glow { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
120
+ @keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
121
+ .animate-fade-in { animation: fade-in 0.3s ease-out both; }
@@ -0,0 +1,2 @@
1
+ @import './tokens.css';
2
+ @import './components.css';
@@ -0,0 +1,81 @@
1
+ /* ═══════════════════════════════════════════════════════════════════════════
2
+ Sphere UI — Design Tokens
3
+ Brand: Unicity Brand Guidelines
4
+ Used by: sphere, sphere-backoffice, sphere-dev, sphere-quest
5
+ ═══════════════════════════════════════════════════════════════════════════ */
6
+
7
+ /* Brand fonts — Anton (headlines), Geist (body), Geist Mono (code) */
8
+ @import url('https://fonts.googleapis.com/css2?family=Anton&family=Geist:wght@300..900&family=Geist+Mono:wght@300..700&display=swap');
9
+
10
+ :root {
11
+ color-scheme: dark;
12
+
13
+ /* Brand palette — from Unicity Brand Guidelines */
14
+ --brand-black: #020202;
15
+ --brand-white: #FEFEFE;
16
+ --brand-orange: #FF6F00;
17
+ --brand-orange-dark: #932D00;
18
+
19
+ /* Surface palette */
20
+ --bg-root: #060606;
21
+ --bg-surface: #0d0d0d;
22
+ --bg-elevated: #111111;
23
+ --bg-hover: #1a1a1a;
24
+
25
+ /* Borders */
26
+ --border: rgba(255, 255, 255, 0.07);
27
+ --border-subtle: rgba(255, 255, 255, 0.04);
28
+ --border-focus: rgba(255, 111, 0, 0.25);
29
+
30
+ /* Accent (mapped from brand orange) */
31
+ --accent: var(--brand-orange);
32
+ --accent-dim: var(--brand-orange-dark);
33
+ --accent-glow: rgba(255, 111, 0, 0.08);
34
+ --accent-text: var(--brand-orange);
35
+
36
+ /* Text */
37
+ --text-primary: var(--brand-white);
38
+ --text-secondary: #ffe2cc;
39
+ --text-muted: rgba(255, 255, 255, 0.28);
40
+
41
+ /* Fonts */
42
+ --font-display: 'Anton', sans-serif;
43
+ --font-body: 'Geist', ui-sans-serif, system-ui, sans-serif;
44
+ --font-mono: 'Geist Mono', 'SF Mono', 'Fira Code', monospace;
45
+
46
+ /* Shadows */
47
+ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
48
+ --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
49
+ --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
50
+ --shadow-glow: 0 0 24px var(--accent-glow), 0 0 48px rgba(255, 111, 0, 0.05);
51
+
52
+ /* Radii */
53
+ --radius-sm: 6px;
54
+ --radius-md: 10px;
55
+ --radius-lg: 14px;
56
+ }
57
+
58
+ /* ─── Base ─────────────────────────────────────────────────────────────── */
59
+
60
+ body {
61
+ margin: 0;
62
+ font-family: var(--font-body);
63
+ background: var(--bg-root);
64
+ color: var(--text-primary);
65
+ -webkit-font-smoothing: antialiased;
66
+ -moz-osx-font-smoothing: grayscale;
67
+ }
68
+
69
+ ::selection {
70
+ background: rgba(255, 111, 0, 0.25);
71
+ color: white;
72
+ }
73
+
74
+ ::-webkit-scrollbar { width: 5px; height: 5px; }
75
+ ::-webkit-scrollbar-track { background: transparent; }
76
+ ::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 10px; }
77
+ ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }
78
+
79
+ /* Anton (--font-display) is NOT applied globally to headings.
80
+ Sphere uses Geist for all text by default.
81
+ Apply Anton explicitly where needed: style={{ fontFamily: 'var(--font-display)' }} */