@rdna/radiants 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.
Files changed (44) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +125 -0
  3. package/animations.css +68 -0
  4. package/assets/scrollbar-background.svg +9 -0
  5. package/base.css +144 -0
  6. package/dark.css +117 -0
  7. package/dist/chunk-SR2T7OEJ.mjs +46 -0
  8. package/dist/chunk-SR2T7OEJ.mjs.map +1 -0
  9. package/dist/components/core/index.d.mts +911 -0
  10. package/dist/components/core/index.mjs +2475 -0
  11. package/dist/components/core/index.mjs.map +1 -0
  12. package/dist/hooks/index.d.mts +22 -0
  13. package/dist/hooks/index.mjs +3 -0
  14. package/dist/hooks/index.mjs.map +1 -0
  15. package/dist/remotion/index.d.mts +252 -0
  16. package/dist/remotion/index.mjs +170 -0
  17. package/dist/remotion/index.mjs.map +1 -0
  18. package/dna.config.json +8 -0
  19. package/fonts/Joystix.woff2 +0 -0
  20. package/fonts/PixelCode-Black-Italic.woff2 +0 -0
  21. package/fonts/PixelCode-Black.woff2 +0 -0
  22. package/fonts/PixelCode-Bold-Italic.woff2 +0 -0
  23. package/fonts/PixelCode-Bold.woff2 +0 -0
  24. package/fonts/PixelCode-DemiBold-Italic.woff2 +0 -0
  25. package/fonts/PixelCode-DemiBold.woff2 +0 -0
  26. package/fonts/PixelCode-ExtraBlack-Italic.woff2 +0 -0
  27. package/fonts/PixelCode-ExtraBlack.woff2 +0 -0
  28. package/fonts/PixelCode-ExtraBold-Italic.woff2 +0 -0
  29. package/fonts/PixelCode-ExtraBold.woff2 +0 -0
  30. package/fonts/PixelCode-ExtraLight-Italic.woff2 +0 -0
  31. package/fonts/PixelCode-ExtraLight.woff2 +0 -0
  32. package/fonts/PixelCode-Italic.woff2 +0 -0
  33. package/fonts/PixelCode-Light-Italic.woff2 +0 -0
  34. package/fonts/PixelCode-Light.woff2 +0 -0
  35. package/fonts/PixelCode-Medium-Italic.woff2 +0 -0
  36. package/fonts/PixelCode-Medium.woff2 +0 -0
  37. package/fonts/PixelCode-Thin-Italic.woff2 +0 -0
  38. package/fonts/PixelCode-Thin.woff2 +0 -0
  39. package/fonts/PixelCode.woff2 +0 -0
  40. package/fonts.css +115 -0
  41. package/index.css +25 -0
  42. package/package.json +88 -0
  43. package/tokens.css +202 -0
  44. package/typography.css +175 -0
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@rdna/radiants",
3
+ "version": "0.1.0",
4
+ "description": "Radiants theme package for DNA - retro pixel aesthetic",
5
+ "main": "./index.css",
6
+ "scripts": {
7
+ "build": "tsup",
8
+ "dev": "tsup --watch"
9
+ },
10
+ "exports": {
11
+ ".": "./index.css",
12
+ "./tokens": "./tokens.css",
13
+ "./dark": "./dark.css",
14
+ "./animations": "./animations.css",
15
+ "./base": "./base.css",
16
+ "./typography": "./typography.css",
17
+ "./fonts": "./fonts.css",
18
+ "./components/core": {
19
+ "types": "./dist/components/core/index.d.mts",
20
+ "import": "./dist/components/core/index.mjs",
21
+ "default": "./dist/components/core/index.mjs"
22
+ },
23
+ "./hooks": {
24
+ "types": "./dist/hooks/index.d.mts",
25
+ "import": "./dist/hooks/index.mjs",
26
+ "default": "./dist/hooks/index.mjs"
27
+ },
28
+ "./remotion": {
29
+ "types": "./dist/remotion/index.d.mts",
30
+ "import": "./dist/remotion/index.mjs",
31
+ "default": "./dist/remotion/index.mjs"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "*.css",
37
+ "fonts/Joystix.woff2",
38
+ "fonts/PixelCode*.woff2",
39
+ "assets/",
40
+ "dna.config.json",
41
+ "LICENSE",
42
+ "README.md"
43
+ ],
44
+ "sideEffects": [
45
+ "*.css"
46
+ ],
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/Radiants-DAO/DNA.git",
50
+ "directory": "packages/radiants"
51
+ },
52
+ "homepage": "https://github.com/Radiants-DAO/DNA/tree/master/packages/radiants",
53
+ "bugs": {
54
+ "url": "https://github.com/Radiants-DAO/DNA/issues"
55
+ },
56
+ "peerDependencies": {
57
+ "next": "^14.0.0 || ^15.0.0 || ^16.0.0",
58
+ "react": "^18.0.0 || ^19.0.0",
59
+ "remotion": "^4.0.0",
60
+ "tailwindcss": "^4.0.0"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "remotion": {
64
+ "optional": true
65
+ },
66
+ "next": {
67
+ "optional": true
68
+ }
69
+ },
70
+ "keywords": [
71
+ "dna",
72
+ "theme",
73
+ "design-system",
74
+ "retro",
75
+ "pixel",
76
+ "tailwind",
77
+ "react",
78
+ "components"
79
+ ],
80
+ "license": "GPL-3.0",
81
+ "devDependencies": {
82
+ "@types/react": "^19.2.9",
83
+ "@types/react-dom": "^19.2.3",
84
+ "next": "16.0.10",
85
+ "remotion": "^4.0.409",
86
+ "tsup": "^8.5.1"
87
+ }
88
+ }
package/tokens.css ADDED
@@ -0,0 +1,202 @@
1
+ /* =============================================================================
2
+ @dna/radiants - Design Tokens
3
+ Semantic token layer mapping rad_os brand colors to DNA-compliant tokens
4
+ ============================================================================= */
5
+
6
+ @theme inline {
7
+ /* ============================================
8
+ BRAND COLORS (internal reference only)
9
+ These are private tokens - use semantic tokens in components
10
+ ============================================ */
11
+
12
+ --color-cream: #FEF8E2;
13
+ --color-black: #0F0E0C;
14
+ --color-sun-yellow: #FCE184;
15
+ --color-sky-blue: #95BAD2;
16
+ --color-warm-cloud: #FEF8E2;
17
+ --color-sunset-fuzz: #FCC383;
18
+ --color-sun-red: #FF6B63;
19
+ --color-green: #CEF5CA;
20
+ --color-white: #FFFFFF;
21
+
22
+ /* System Colors (internal) */
23
+ --color-success-green: #22C55E;
24
+ --color-success-green-dark: #87BB82;
25
+ --color-warning-yellow: var(--color-sun-yellow);
26
+ --color-warning-yellow-dark: #BE9D2B;
27
+ --color-error-red: var(--color-sun-red);
28
+ --color-error-red-dark: #9E433E;
29
+ --color-focus-state: var(--color-sky-blue);
30
+ }
31
+
32
+ @theme {
33
+ /* ============================================
34
+ SEMANTIC TOKENS - Surface
35
+ Background colors for containers and sections
36
+ ============================================ */
37
+
38
+ --color-surface-primary: var(--color-warm-cloud);
39
+ --color-surface-secondary: var(--color-black);
40
+ --color-surface-tertiary: var(--color-sunset-fuzz);
41
+ --color-surface-elevated: var(--color-white);
42
+ --color-surface-muted: var(--color-cream);
43
+
44
+ /* ============================================
45
+ SEMANTIC TOKENS - Content
46
+ Text and foreground colors
47
+ ============================================ */
48
+
49
+ --color-content-primary: var(--color-black);
50
+ --color-content-secondary: var(--color-black); /* Use with opacity modifier: text-content-secondary/70 */
51
+ --color-content-inverted: var(--color-warm-cloud);
52
+ --color-content-muted: rgba(15, 14, 12, 0.6);
53
+ --color-content-link: var(--color-sky-blue);
54
+
55
+ /* ============================================
56
+ SEMANTIC TOKENS - Edge
57
+ Borders, outlines, and focus indicators
58
+ ============================================ */
59
+
60
+ --color-edge-primary: var(--color-black);
61
+ --color-edge-muted: rgba(15, 14, 12, 0.2);
62
+ --color-edge-focus: var(--color-sun-yellow);
63
+
64
+ /* ============================================
65
+ SEMANTIC TOKENS - Action
66
+ Interactive element colors (buttons, links)
67
+ ============================================ */
68
+
69
+ --color-action-primary: var(--color-sun-yellow);
70
+ --color-action-secondary: var(--color-black);
71
+ --color-action-destructive: var(--color-sun-red);
72
+ --color-action-accent: var(--color-sunset-fuzz);
73
+
74
+ /* ============================================
75
+ SEMANTIC TOKENS - Status
76
+ Feedback and state indicators
77
+ ============================================ */
78
+
79
+ --color-status-success: var(--color-green);
80
+ --color-status-warning: var(--color-sun-yellow);
81
+ --color-status-error: var(--color-sun-red);
82
+ --color-status-info: var(--color-sky-blue);
83
+
84
+ /* ============================================
85
+ BORDER RADIUS
86
+ Rounded corner scale for the pixel aesthetic
87
+ ============================================ */
88
+
89
+ --radius-none: 0;
90
+ --radius-xs: 0.125rem; /* 2px */
91
+ --radius-sm: 0.25rem; /* 4px */
92
+ --radius-md: 0.5rem; /* 8px */
93
+ --radius-lg: 1rem; /* 16px */
94
+ --radius-full: 9999px;
95
+
96
+ /* ============================================
97
+ BOX SHADOWS
98
+ Retro lift effect - sharp pixel-art style shadows
99
+ ============================================ */
100
+
101
+ --shadow-btn: 0 1px 0 0 var(--color-black);
102
+ --shadow-btn-hover: 0 3px 0 0 var(--color-black);
103
+ --shadow-card: 2px 2px 0 0 var(--color-black);
104
+ --shadow-card-lg: 4px 4px 0 0 var(--color-black);
105
+ --shadow-inner: inset 0 0 0 1px var(--color-black);
106
+
107
+ /* ============================================
108
+ TYPOGRAPHY SCALE
109
+ Font sizes for the pixel-art aesthetic
110
+ ============================================ */
111
+
112
+ --font-size-2xs: 0.5rem; /* 8px - tiny labels */
113
+ --font-size-xs: 0.75rem; /* 12px - buttons, small UI */
114
+ --font-size-sm: 0.875rem; /* 14px - body text */
115
+ --font-size-base: 0.875rem; /* 14px - body text */
116
+ --font-size-lg: 1rem; /* 16px - large body */
117
+ --font-size-xl: 1.25rem; /* 20px - headings */
118
+ --font-size-2xl: 1.5rem; /* 24px - headings */
119
+ --font-size-3xl: 2rem; /* 32px - display */
120
+
121
+ /* ============================================
122
+ SPACING SCALE
123
+ Consistent spacing for layout and components
124
+ ============================================ */
125
+
126
+ --spacing-xs: 0.25rem; /* 4px */
127
+ --spacing-sm: 0.5rem; /* 8px */
128
+ --spacing-md: 1rem; /* 16px */
129
+ --spacing-lg: 1.5rem; /* 24px */
130
+ --spacing-xl: 2rem; /* 32px */
131
+ --spacing-2xl: 3rem; /* 48px */
132
+
133
+ /* ============================================
134
+ MOTION - Duration
135
+ Animation timing scale (max 300ms per DNA spec)
136
+ ============================================ */
137
+
138
+ --duration-instant: 0ms; /* Reduced motion fallback */
139
+ --duration-fast: 100ms; /* Hover states */
140
+ --duration-base: 150ms; /* Standard transitions */
141
+ --duration-moderate: 200ms; /* Medium complexity */
142
+ --duration-slow: 300ms; /* Complex animations */
143
+
144
+ /* ============================================
145
+ MOTION - Easing
146
+ Ease-out only per DNA spec (simple, predictable)
147
+ ============================================ */
148
+
149
+ --easing-default: cubic-bezier(0, 0, 0.2, 1); /* All standard transitions */
150
+ --easing-out: cubic-bezier(0, 0, 0.2, 1); /* Entering elements */
151
+ --easing-in: cubic-bezier(0.4, 0, 1, 1); /* Exiting elements */
152
+
153
+ /* ============================================
154
+ BREAKPOINTS
155
+ Responsive design breakpoints
156
+ ============================================ */
157
+
158
+ --breakpoint-xs: 360px; /* Small phones */
159
+ --breakpoint-sm: 640px; /* Large phones */
160
+ --breakpoint-md: 768px; /* Tablets */
161
+ --breakpoint-lg: 1024px; /* Laptops */
162
+ --breakpoint-xl: 1280px; /* Desktops */
163
+ --breakpoint-2xl: 1536px; /* Large screens */
164
+
165
+ /* ============================================
166
+ ACCESSIBILITY - Focus
167
+ Focus ring styling for keyboard navigation
168
+ ============================================ */
169
+
170
+ --focus-ring-width: 2px;
171
+ --focus-ring-offset: 2px;
172
+ --focus-ring-color: var(--color-edge-focus);
173
+
174
+ /* ============================================
175
+ ACCESSIBILITY - Touch Targets
176
+ Minimum sizes for touch interactions (WCAG 2.2)
177
+ ============================================ */
178
+
179
+ --touch-target-min: 44px; /* WCAG AA minimum */
180
+ --touch-target-comfortable: 48px;
181
+ }
182
+
183
+ /* =============================================================================
184
+ REDUCED MOTION SUPPORT
185
+ Respects user preference for reduced motion
186
+ ============================================================================= */
187
+
188
+ :root {
189
+ --duration-scalar: 1;
190
+ }
191
+
192
+ @media (prefers-reduced-motion: reduce) {
193
+ :root {
194
+ --duration-scalar: 0;
195
+
196
+ /* Override all durations to instant */
197
+ --duration-fast: 0ms;
198
+ --duration-base: 0ms;
199
+ --duration-moderate: 0ms;
200
+ --duration-slow: 0ms;
201
+ }
202
+ }
package/typography.css ADDED
@@ -0,0 +1,175 @@
1
+ /* =============================================================================
2
+ @dna/radiants - Typography
3
+ Base element styles using semantic tokens
4
+ Source: rad_os/app/globals.css @layer base
5
+ ============================================================================= */
6
+
7
+ @layer base {
8
+ /* ============================================
9
+ HEADINGS
10
+ All headings use font-heading (Joystix)
11
+ ============================================ */
12
+
13
+ h1 {
14
+ @apply text-4xl font-heading font-bold leading-tight text-content-primary;
15
+ }
16
+
17
+ h2 {
18
+ @apply text-3xl font-heading font-normal leading-tight text-content-primary;
19
+ }
20
+
21
+ h3 {
22
+ @apply text-2xl font-heading font-semibold leading-snug text-content-primary;
23
+ }
24
+
25
+ h4 {
26
+ @apply text-xl font-heading font-medium leading-snug text-content-primary;
27
+ }
28
+
29
+ h5 {
30
+ @apply text-lg font-heading font-medium leading-normal text-content-primary;
31
+ }
32
+
33
+ h6 {
34
+ @apply text-base font-heading font-medium leading-normal text-content-primary;
35
+ }
36
+
37
+ /* ============================================
38
+ BODY TEXT
39
+ Uses font-sans (Mondwest) for readability
40
+ ============================================ */
41
+
42
+ p {
43
+ @apply text-base font-sans font-normal leading-relaxed text-content-primary;
44
+ }
45
+
46
+ /* ============================================
47
+ LINKS
48
+ Uses font-sans with link color
49
+ ============================================ */
50
+
51
+ a {
52
+ @apply text-base font-sans font-normal leading-normal text-content-link underline hover:opacity-80;
53
+ }
54
+
55
+ /* ============================================
56
+ LISTS
57
+ ============================================ */
58
+
59
+ ul {
60
+ @apply text-base font-heading font-normal leading-relaxed text-content-primary pl-6;
61
+ }
62
+
63
+ ol {
64
+ @apply text-base font-heading font-normal leading-relaxed text-content-primary pl-6;
65
+ }
66
+
67
+ li {
68
+ @apply text-base font-sans font-normal leading-relaxed text-content-primary mb-2;
69
+ }
70
+
71
+ /* ============================================
72
+ INLINE TEXT ELEMENTS
73
+ ============================================ */
74
+
75
+ small {
76
+ @apply text-sm font-heading font-normal leading-normal text-content-primary;
77
+ }
78
+
79
+ strong {
80
+ @apply text-base font-heading font-bold leading-normal text-content-primary;
81
+ }
82
+
83
+ em {
84
+ @apply text-base font-heading font-normal leading-normal text-content-primary italic;
85
+ }
86
+
87
+ /* ============================================
88
+ CODE ELEMENTS
89
+ Uses font-mono (PixelCode)
90
+ ============================================ */
91
+
92
+ code {
93
+ @apply text-sm font-mono font-normal leading-normal text-content-primary bg-surface-secondary/10 px-1 py-0.5 rounded-sm;
94
+ }
95
+
96
+ pre {
97
+ @apply text-sm font-mono font-normal leading-relaxed text-content-primary bg-surface-secondary/10 p-4 rounded-sm overflow-x-auto;
98
+ }
99
+
100
+ kbd {
101
+ @apply text-xs font-mono font-normal leading-normal text-content-inverted bg-surface-secondary px-1 py-0.5 rounded-sm;
102
+ }
103
+
104
+ /* ============================================
105
+ HIGHLIGHTS AND QUOTES
106
+ ============================================ */
107
+
108
+ mark {
109
+ @apply text-base font-heading font-normal leading-normal text-content-primary bg-action-primary;
110
+ }
111
+
112
+ blockquote {
113
+ @apply text-base font-heading font-normal leading-relaxed text-content-primary border-l-4 border-edge-primary pl-4 italic;
114
+ }
115
+
116
+ cite {
117
+ @apply text-sm font-heading font-normal leading-normal text-content-primary italic;
118
+ }
119
+
120
+ q {
121
+ @apply text-base font-heading font-normal leading-normal text-content-primary italic;
122
+ }
123
+
124
+ /* ============================================
125
+ DEFINITIONS AND ABBREVIATIONS
126
+ ============================================ */
127
+
128
+ abbr {
129
+ @apply text-base font-heading font-normal leading-normal text-content-primary underline decoration-dotted;
130
+ }
131
+
132
+ dfn {
133
+ @apply text-base font-heading font-normal leading-normal text-content-primary italic;
134
+ }
135
+
136
+ /* ============================================
137
+ SUBSCRIPT AND SUPERSCRIPT
138
+ ============================================ */
139
+
140
+ sub {
141
+ @apply text-xs font-heading font-normal leading-none text-content-primary;
142
+ }
143
+
144
+ sup {
145
+ @apply text-xs font-heading font-normal leading-none text-content-primary;
146
+ }
147
+
148
+ /* ============================================
149
+ EDITS
150
+ ============================================ */
151
+
152
+ del {
153
+ @apply text-base font-heading font-normal leading-normal text-content-primary line-through;
154
+ }
155
+
156
+ ins {
157
+ @apply text-base font-heading font-normal leading-normal text-content-primary underline;
158
+ }
159
+
160
+ /* ============================================
161
+ LABELS AND CAPTIONS
162
+ ============================================ */
163
+
164
+ caption {
165
+ @apply text-xs font-heading font-normal leading-normal text-content-primary;
166
+ }
167
+
168
+ label {
169
+ @apply text-xs font-heading font-medium leading-normal text-content-primary;
170
+ }
171
+
172
+ figcaption {
173
+ @apply text-xs font-heading font-normal leading-normal text-content-primary;
174
+ }
175
+ }