@nexub/themes 0.0.2

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/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@nexub/themes",
3
+ "version": "0.0.2",
4
+ "description": "CSS theme files for Nexub Design System — light, dark, and brand themes (Leap, Bookub, Payub, Founderub) as importable CSS.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/Nexub-AI/nexub-ds#readme",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/Nexub-AI/nexub-ds.git",
10
+ "directory": "packages/themes"
11
+ },
12
+ "keywords": [
13
+ "themes",
14
+ "css",
15
+ "dark-mode",
16
+ "design-system",
17
+ "nexub"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "files": [
23
+ "src"
24
+ ],
25
+ "sideEffects": [
26
+ "./src/*.css"
27
+ ],
28
+ "exports": {
29
+ "./base": "./src/base.css",
30
+ "./light": "./src/light.css",
31
+ "./dark": "./src/dark.css",
32
+ "./leap": "./src/leap.css",
33
+ "./bookub": "./src/bookub.css",
34
+ "./payub": "./src/payub.css",
35
+ "./founderub": "./src/founderub.css"
36
+ },
37
+ "dependencies": {
38
+ "@nexub/tokens": "0.0.2"
39
+ }
40
+ }
package/src/base.css ADDED
@@ -0,0 +1,191 @@
1
+ /* @nexub/themes — base.css
2
+ Global resets, focus ring, body, scrollbar, reduced-motion.
3
+ Import this once at the root of your app before light.css or dark.css. */
4
+
5
+ @import '@nexub/tokens/css';
6
+
7
+ /* ─── Semantic shorthand aliases ───────────────────────────────────────────
8
+ Components reference these shorter names. They proxy the full token names
9
+ so you only need to update one place if the palette shifts. */
10
+ :root {
11
+ /* success */
12
+ --color-success-500: var(--color-semantic-success-default);
13
+ --color-success-600: var(--color-semantic-success-strong);
14
+ --color-success-bg: var(--color-semantic-success-bg);
15
+ --color-success-border: var(--color-semantic-success-border);
16
+
17
+ /* error / danger */
18
+ --color-error-500: var(--color-semantic-error-default);
19
+ --color-error-600: var(--color-semantic-error-strong);
20
+ --color-error-bg: var(--color-semantic-error-bg);
21
+ --color-error-border: var(--color-semantic-error-border);
22
+ --color-danger-500: var(--color-semantic-error-default);
23
+ --color-danger-600: var(--color-semantic-error-strong);
24
+ --color-danger-bg: var(--color-semantic-error-bg);
25
+ --color-danger-border: var(--color-semantic-error-border);
26
+
27
+ /* warning */
28
+ --color-warning-500: var(--color-semantic-warning-default);
29
+ --color-warning-600: var(--color-semantic-warning-strong);
30
+ --color-warning-bg: var(--color-semantic-warning-bg);
31
+ --color-warning-border: var(--color-semantic-warning-border);
32
+
33
+ /* info */
34
+ --color-info-500: var(--color-semantic-info-default);
35
+ --color-info-600: var(--color-semantic-info-strong);
36
+ --color-info-bg: var(--color-semantic-info-bg);
37
+ --color-info-border: var(--color-semantic-info-border);
38
+
39
+ /* placeholder text (PKG-B01) */
40
+ --color-text-placeholder: var(--color-text-subtle);
41
+
42
+ /* tone text aliases — used by Heading tone prop + HelperText (PKG-H01) */
43
+ --color-text-info: var(--color-semantic-info-default);
44
+ --color-text-success: var(--color-semantic-success-default);
45
+ --color-text-warning: var(--color-semantic-warning-default);
46
+ --color-text-danger: var(--color-semantic-error-default);
47
+
48
+ /* accent fallback — used without any brand theme applied (PKG-B03) */
49
+ --color-accent-500: var(--color-brand-primary-500);
50
+ --color-accent-600: var(--color-brand-primary-600);
51
+
52
+ /* brand tone shorthands — aliased from full token names (PKG-B02) */
53
+ --color-leap-50: var(--color-accent-leap-50);
54
+ --color-leap-100: var(--color-accent-leap-100);
55
+ --color-leap-500: var(--color-accent-leap-500);
56
+ --color-leap-600: var(--color-accent-leap-600);
57
+ --color-leap-700: var(--color-accent-leap-700);
58
+ --color-leap-bg: rgba(99, 102, 241, 0.10);
59
+ --color-leap-border: rgba(99, 102, 241, 0.25);
60
+
61
+ --color-bookub-50: var(--color-accent-bookub-50);
62
+ --color-bookub-100: var(--color-accent-bookub-100);
63
+ --color-bookub-500: var(--color-accent-bookub-500);
64
+ --color-bookub-600: var(--color-accent-bookub-600);
65
+ --color-bookub-700: var(--color-accent-bookub-700);
66
+ --color-bookub-bg: rgba(16, 185, 129, 0.10);
67
+ --color-bookub-border: rgba(16, 185, 129, 0.25);
68
+
69
+ --color-payub-50: var(--color-accent-payub-50);
70
+ --color-payub-100: var(--color-accent-payub-100);
71
+ --color-payub-500: var(--color-accent-payub-500);
72
+ --color-payub-600: var(--color-accent-payub-600);
73
+ --color-payub-700: var(--color-accent-payub-700);
74
+ --color-payub-bg: rgba(139, 92, 246, 0.10);
75
+ --color-payub-border: rgba(139, 92, 246, 0.25);
76
+
77
+ --color-founderub-50: var(--color-accent-founderub-50);
78
+ --color-founderub-100: var(--color-accent-founderub-100);
79
+ --color-founderub-500: var(--color-accent-founderub-500);
80
+ --color-founderub-600: var(--color-accent-founderub-600);
81
+ --color-founderub-700: var(--color-accent-founderub-700);
82
+ --color-founderub-bg: rgba(245, 158, 11, 0.10);
83
+ --color-founderub-border: rgba(245, 158, 11, 0.25);
84
+ }
85
+
86
+ *, *::before, *::after {
87
+ box-sizing: border-box;
88
+ border-color: var(--color-border-default);
89
+ }
90
+
91
+ html {
92
+ font-family: var(--font-family-sans);
93
+ font-size: 16px;
94
+ line-height: 1.6;
95
+ color: var(--color-text-primary);
96
+ background-color: var(--color-bg-default);
97
+ scroll-behavior: smooth;
98
+ -webkit-font-smoothing: antialiased;
99
+ -moz-osx-font-smoothing: grayscale;
100
+ text-size-adjust: 100%;
101
+ }
102
+
103
+ body {
104
+ min-height: 100vh;
105
+ margin: 0;
106
+ background: var(--gradient-hero-ambient);
107
+ }
108
+
109
+ /* Focus ring */
110
+ :focus-visible {
111
+ outline: 2px solid var(--color-ring-default);
112
+ outline-offset: 3px;
113
+ box-shadow: var(--shadow-focus);
114
+ }
115
+
116
+ /* Headings */
117
+ h1, h2, h3, h4, h5, h6 {
118
+ margin: 0;
119
+ font-weight: var(--font-weight-bold);
120
+ line-height: 1.2;
121
+ color: var(--color-text-primary);
122
+ }
123
+
124
+ /* Paragraphs / lists */
125
+ p, ul, ol {
126
+ margin: 0;
127
+ }
128
+
129
+ /* Links */
130
+ a {
131
+ color: var(--color-text-link);
132
+ text-decoration: underline;
133
+ text-underline-offset: 2px;
134
+ }
135
+
136
+ a:hover {
137
+ opacity: 0.8;
138
+ }
139
+
140
+ /* Images */
141
+ img, video, svg {
142
+ display: block;
143
+ max-width: 100%;
144
+ }
145
+
146
+ /* Code */
147
+ code, kbd, pre, samp {
148
+ font-family: var(--font-family-mono);
149
+ font-size: 0.875em;
150
+ }
151
+
152
+ /* Selection */
153
+ ::selection {
154
+ background-color: color-mix(in srgb, var(--color-brand-primary-500) 20%, transparent);
155
+ color: var(--color-text-primary);
156
+ }
157
+
158
+ /* Scrollbar (webkit) */
159
+ ::-webkit-scrollbar {
160
+ width: 8px;
161
+ height: 8px;
162
+ }
163
+
164
+ ::-webkit-scrollbar-track {
165
+ background: var(--color-bg-subtle);
166
+ }
167
+
168
+ ::-webkit-scrollbar-thumb {
169
+ background: var(--color-border-strong);
170
+ border-radius: var(--radius-full);
171
+ }
172
+
173
+ ::-webkit-scrollbar-thumb:hover {
174
+ background: var(--color-text-muted);
175
+ }
176
+
177
+ /* Reduced motion */
178
+ @media (prefers-reduced-motion: reduce) {
179
+ *, *::before, *::after {
180
+ animation-duration: 0.01ms !important;
181
+ animation-iteration-count: 1 !important;
182
+ transition-duration: 0.01ms !important;
183
+ scroll-behavior: auto !important;
184
+ }
185
+ }
186
+
187
+ /* Logo-scroll marquee keyframe (used by LogoWall) */
188
+ @keyframes logo-scroll {
189
+ from { transform: translateX(0); }
190
+ to { transform: translateX(-50%); }
191
+ }
package/src/bookub.css ADDED
@@ -0,0 +1,17 @@
1
+ /* @nexub/themes — bookub.css
2
+ Overrides --color-accent-* to Bookub's emerald scale when [data-product='bookub'] is set. */
3
+
4
+ [data-product='bookub'] {
5
+ --color-accent-50: var(--color-accent-bookub-50);
6
+ --color-accent-100: var(--color-accent-bookub-100);
7
+ --color-accent-200: var(--color-accent-bookub-200);
8
+ --color-accent-300: var(--color-accent-bookub-300);
9
+ --color-accent-400: var(--color-accent-bookub-400);
10
+ --color-accent-500: var(--color-accent-bookub-500);
11
+ --color-accent-600: var(--color-accent-bookub-600);
12
+ --color-accent-700: var(--color-accent-bookub-700);
13
+ --color-accent-800: var(--color-accent-bookub-800);
14
+ --color-accent-900: var(--color-accent-bookub-900);
15
+ --color-accent-950: var(--color-accent-bookub-950);
16
+ --color-ring-default: var(--color-accent-bookub-500);
17
+ }
package/src/dark.css ADDED
@@ -0,0 +1,121 @@
1
+ /* @nexub/themes — dark.css
2
+ Dark-mode semantic token overrides.
3
+ Apply via [data-theme='dark'] on an ancestor (typically <html>),
4
+ or automatically via prefers-color-scheme when no explicit theme is set. */
5
+
6
+ [data-theme='dark'],
7
+ :root:not([data-theme]) {
8
+ /* ── Background ─────────────────────────────────────────────────────── */
9
+ --color-bg-default: #0b1220;
10
+ --color-bg-subtle: #0f172a;
11
+ --color-bg-muted: #1e293b;
12
+ --color-bg-raised: #162032;
13
+ --color-bg-inverse: #f8fafc;
14
+
15
+ /* ── Text ────────────────────────────────────────────────────────────── */
16
+ --color-text-primary: #f8fafc;
17
+ --color-text-secondary: #cbd5e1;
18
+ --color-text-muted: #94a3b8;
19
+ --color-text-subtle: #64748b;
20
+ --color-text-inverse: #0f172a;
21
+ --color-text-link: #60a5fa;
22
+ --color-text-disabled: #475569;
23
+
24
+ /* ── Border ──────────────────────────────────────────────────────────── */
25
+ --color-border-default: #1e293b;
26
+ --color-border-subtle: #162032;
27
+ --color-border-strong: #334155;
28
+ --color-border-inverse: #cbd5e1;
29
+
30
+ /* ── Ring ────────────────────────────────────────────────────────────── */
31
+ --color-ring-default: #60a5fa;
32
+ --color-ring-offset: #0b1220;
33
+
34
+ /* ── Surface ─────────────────────────────────────────────────────────── */
35
+ --color-surface-warm: #1c1a0a;
36
+ --color-surface-muted: #0f172a;
37
+ --color-surface-raised: #162032;
38
+ --color-surface-sunken: #080d19;
39
+ --color-surface-inverse: #f8fafc;
40
+
41
+ /* ── Hero gradient ───────────────────────────────────────────────────── */
42
+ --gradient-hero-ambient: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(64,153,241,0.08) 0%, transparent 60%), #0b1220;
43
+
44
+ /* ── Semantic success (dark) ─────────────────────────────────────────── */
45
+ --color-semantic-success-default: #34d399;
46
+ --color-semantic-success-bg: rgba(52, 211, 153, 0.10);
47
+ --color-semantic-success-border: rgba(52, 211, 153, 0.25);
48
+ --color-semantic-success-strong: #6ee7b7;
49
+
50
+ /* ── Semantic error / danger (dark) ─────────────────────────────────── */
51
+ --color-semantic-error-default: #f87171;
52
+ --color-semantic-error-bg: rgba(248, 113, 113, 0.10);
53
+ --color-semantic-error-border: rgba(248, 113, 113, 0.25);
54
+ --color-semantic-error-strong: #fca5a5;
55
+
56
+ /* ── Semantic warning (dark) ─────────────────────────────────────────── */
57
+ --color-semantic-warning-default: #fbbf24;
58
+ --color-semantic-warning-bg: rgba(251, 191, 36, 0.10);
59
+ --color-semantic-warning-border: rgba(251, 191, 36, 0.25);
60
+ --color-semantic-warning-strong: #fcd34d;
61
+
62
+ /* ── Semantic info (dark) ────────────────────────────────────────────── */
63
+ --color-semantic-info-default: #60a5fa;
64
+ --color-semantic-info-bg: rgba(96, 165, 250, 0.10);
65
+ --color-semantic-info-border: rgba(96, 165, 250, 0.25);
66
+ --color-semantic-info-strong: #93c5fd;
67
+ }
68
+
69
+ @media (prefers-color-scheme: dark) {
70
+ :root:not([data-theme]) {
71
+ --color-bg-default: #0b1220;
72
+ --color-bg-subtle: #0f172a;
73
+ --color-bg-muted: #1e293b;
74
+ --color-bg-raised: #162032;
75
+ --color-bg-inverse: #f8fafc;
76
+
77
+ --color-text-primary: #f8fafc;
78
+ --color-text-secondary: #cbd5e1;
79
+ --color-text-muted: #94a3b8;
80
+ --color-text-subtle: #64748b;
81
+ --color-text-inverse: #0f172a;
82
+ --color-text-link: #60a5fa;
83
+ --color-text-disabled: #475569;
84
+
85
+ --color-border-default: #1e293b;
86
+ --color-border-subtle: #162032;
87
+ --color-border-strong: #334155;
88
+ --color-border-inverse: #cbd5e1;
89
+
90
+ --color-ring-default: #60a5fa;
91
+ --color-ring-offset: #0b1220;
92
+
93
+ --color-surface-warm: #1c1a0a;
94
+ --color-surface-muted: #0f172a;
95
+ --color-surface-raised: #162032;
96
+ --color-surface-sunken: #080d19;
97
+ --color-surface-inverse: #f8fafc;
98
+
99
+ --gradient-hero-ambient: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(64,153,241,0.08) 0%, transparent 60%), #0b1220;
100
+
101
+ --color-semantic-success-default: #34d399;
102
+ --color-semantic-success-bg: rgba(52, 211, 153, 0.10);
103
+ --color-semantic-success-border: rgba(52, 211, 153, 0.25);
104
+ --color-semantic-success-strong: #6ee7b7;
105
+
106
+ --color-semantic-error-default: #f87171;
107
+ --color-semantic-error-bg: rgba(248, 113, 113, 0.10);
108
+ --color-semantic-error-border: rgba(248, 113, 113, 0.25);
109
+ --color-semantic-error-strong: #fca5a5;
110
+
111
+ --color-semantic-warning-default: #fbbf24;
112
+ --color-semantic-warning-bg: rgba(251, 191, 36, 0.10);
113
+ --color-semantic-warning-border: rgba(251, 191, 36, 0.25);
114
+ --color-semantic-warning-strong: #fcd34d;
115
+
116
+ --color-semantic-info-default: #60a5fa;
117
+ --color-semantic-info-bg: rgba(96, 165, 250, 0.10);
118
+ --color-semantic-info-border: rgba(96, 165, 250, 0.25);
119
+ --color-semantic-info-strong: #93c5fd;
120
+ }
121
+ }
@@ -0,0 +1,17 @@
1
+ /* @nexub/themes — founderub.css
2
+ Overrides --color-accent-* to Founderub's amber scale when [data-product='founderub'] is set. */
3
+
4
+ [data-product='founderub'] {
5
+ --color-accent-50: var(--color-accent-founderub-50);
6
+ --color-accent-100: var(--color-accent-founderub-100);
7
+ --color-accent-200: var(--color-accent-founderub-200);
8
+ --color-accent-300: var(--color-accent-founderub-300);
9
+ --color-accent-400: var(--color-accent-founderub-400);
10
+ --color-accent-500: var(--color-accent-founderub-500);
11
+ --color-accent-600: var(--color-accent-founderub-600);
12
+ --color-accent-700: var(--color-accent-founderub-700);
13
+ --color-accent-800: var(--color-accent-founderub-800);
14
+ --color-accent-900: var(--color-accent-founderub-900);
15
+ --color-accent-950: var(--color-accent-founderub-950);
16
+ --color-ring-default: var(--color-accent-founderub-500);
17
+ }
package/src/leap.css ADDED
@@ -0,0 +1,17 @@
1
+ /* @nexub/themes — leap.css
2
+ Overrides --color-accent-* to Leap's indigo scale when [data-product='leap'] is set on an ancestor. */
3
+
4
+ [data-product='leap'] {
5
+ --color-accent-50: var(--color-accent-leap-50);
6
+ --color-accent-100: var(--color-accent-leap-100);
7
+ --color-accent-200: var(--color-accent-leap-200);
8
+ --color-accent-300: var(--color-accent-leap-300);
9
+ --color-accent-400: var(--color-accent-leap-400);
10
+ --color-accent-500: var(--color-accent-leap-500);
11
+ --color-accent-600: var(--color-accent-leap-600);
12
+ --color-accent-700: var(--color-accent-leap-700);
13
+ --color-accent-800: var(--color-accent-leap-800);
14
+ --color-accent-900: var(--color-accent-leap-900);
15
+ --color-accent-950: var(--color-accent-leap-950);
16
+ --color-ring-default: var(--color-accent-leap-500);
17
+ }
package/src/light.css ADDED
@@ -0,0 +1,36 @@
1
+ /* @nexub/themes — light.css
2
+ Explicit light-mode semantic token assignments.
3
+ Import after base.css. */
4
+
5
+ :root,
6
+ [data-theme='light'] {
7
+ --color-bg-default: #ffffff;
8
+ --color-bg-subtle: #f8fafc;
9
+ --color-bg-muted: #f1f5f9;
10
+ --color-bg-raised: #ffffff;
11
+ --color-bg-inverse: #0f172a;
12
+
13
+ --color-text-primary: #0f172a;
14
+ --color-text-secondary: #334155;
15
+ --color-text-muted: #64748b;
16
+ --color-text-subtle: #94a3b8;
17
+ --color-text-inverse: #f8fafc;
18
+ --color-text-link: #2563eb;
19
+ --color-text-disabled: #94a3b8;
20
+
21
+ --color-border-default: #e2e8f0;
22
+ --color-border-subtle: #f1f5f9;
23
+ --color-border-strong: #94a3b8;
24
+ --color-border-inverse: #334155;
25
+
26
+ --color-ring-default: #4099f1;
27
+ --color-ring-offset: #ffffff;
28
+
29
+ --color-surface-warm: #fefce8;
30
+ --color-surface-muted: #f8fafc;
31
+ --color-surface-raised: #ffffff;
32
+ --color-surface-sunken: #f1f5f9;
33
+ --color-surface-inverse: #0f172a;
34
+
35
+ --gradient-hero-ambient: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(64,153,241,0.12) 0%, transparent 60%), radial-gradient(ellipse 60% 40% at 80% 80%, rgba(28,206,102,0.06) 0%, transparent 50%), #ffffff;
36
+ }
package/src/payub.css ADDED
@@ -0,0 +1,17 @@
1
+ /* @nexub/themes — payub.css
2
+ Overrides --color-accent-* to Payub's violet scale when [data-product='payub'] is set. */
3
+
4
+ [data-product='payub'] {
5
+ --color-accent-50: var(--color-accent-payub-50);
6
+ --color-accent-100: var(--color-accent-payub-100);
7
+ --color-accent-200: var(--color-accent-payub-200);
8
+ --color-accent-300: var(--color-accent-payub-300);
9
+ --color-accent-400: var(--color-accent-payub-400);
10
+ --color-accent-500: var(--color-accent-payub-500);
11
+ --color-accent-600: var(--color-accent-payub-600);
12
+ --color-accent-700: var(--color-accent-payub-700);
13
+ --color-accent-800: var(--color-accent-payub-800);
14
+ --color-accent-900: var(--color-accent-payub-900);
15
+ --color-accent-950: var(--color-accent-payub-950);
16
+ --color-ring-default: var(--color-accent-payub-500);
17
+ }