@tuwaio/nova-core 0.2.5 → 0.2.6
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/README.md +21 -30
- package/dist/index.css +5 -4
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
The foundational package for the Nova UI Kit design system. Provides core styling primitives, theme variables, utility functions, and common React hooks for building consistent Web3 applications.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
---
|
|
10
10
|
|
|
11
11
|
## What is `@tuwaio/nova-core`?
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ Nova Core solves this by:
|
|
|
24
24
|
2. **Supplying Common Hooks:** A collection of reusable React hooks for common Web3 UI patterns.
|
|
25
25
|
3. **Ensuring Tailwind CSS v4 Integration:** Seamless compatibility with modern Tailwind CSS workflows.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
---
|
|
28
28
|
|
|
29
29
|
## ✨ Key Features
|
|
30
30
|
|
|
@@ -36,7 +36,7 @@ Nova Core solves this by:
|
|
|
36
36
|
- **♿ Accessibility First:** ARIA-compliant design tokens and utilities for building accessible interfaces
|
|
37
37
|
- **📱 Responsive Design:** Mobile-first breakpoints and responsive utility functions
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
---
|
|
40
40
|
|
|
41
41
|
## 💾 Installation
|
|
42
42
|
|
|
@@ -70,7 +70,7 @@ yarn add @tuwaio/nova-core
|
|
|
70
70
|
@import '@tuwaio/nova-core/dist/index.css';
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
---
|
|
74
74
|
|
|
75
75
|
## 🚀 Usage
|
|
76
76
|
|
|
@@ -106,14 +106,14 @@ import { cn } from '@tuwaio/nova-core';
|
|
|
106
106
|
const buttonClass = cn(
|
|
107
107
|
'px-4 py-2 font-medium rounded-lg', // base styles
|
|
108
108
|
'bg-blue-500 text-white', // default variant
|
|
109
|
-
{'opacity-50 cursor-not-allowed': isLoading}, // conditional styles
|
|
110
|
-
className // additional classes from props
|
|
109
|
+
{ 'opacity-50 cursor-not-allowed': isLoading }, // conditional styles
|
|
110
|
+
className, // additional classes from props
|
|
111
111
|
);
|
|
112
112
|
|
|
113
113
|
// Tailwind class conflict resolution
|
|
114
114
|
const mergedClasses = cn(
|
|
115
115
|
'p-4 text-sm', // base classes
|
|
116
|
-
'p-6 text-lg'
|
|
116
|
+
'p-6 text-lg', // these override the base classes intelligently
|
|
117
117
|
);
|
|
118
118
|
// Result: 'p-6 text-lg' (conflicts resolved)
|
|
119
119
|
```
|
|
@@ -130,10 +130,7 @@ function WalletAddress({ address }: { address: string }) {
|
|
|
130
130
|
|
|
131
131
|
return (
|
|
132
132
|
<div className={cn('transition-all', isCollapsed && 'w-12')}>
|
|
133
|
-
<button
|
|
134
|
-
onClick={() => copy(address)}
|
|
135
|
-
className="font-mono text-sm hover:bg-[var(--tuwa-bg-hover)]"
|
|
136
|
-
>
|
|
133
|
+
<button onClick={() => copy(address)} className="font-mono text-sm hover:bg-[var(--tuwa-bg-hover)]">
|
|
137
134
|
{address.slice(0, 6)}
|
|
138
135
|
{copied && ' ✓'}
|
|
139
136
|
</button>
|
|
@@ -142,7 +139,7 @@ function WalletAddress({ address }: { address: string }) {
|
|
|
142
139
|
}
|
|
143
140
|
```
|
|
144
141
|
|
|
145
|
-
|
|
142
|
+
---
|
|
146
143
|
|
|
147
144
|
## 🛠️ Theme Customization
|
|
148
145
|
|
|
@@ -205,18 +202,12 @@ import { NovaTransactionsProvider } from '@tuwaio/nova-transactions';
|
|
|
205
202
|
|
|
206
203
|
function App() {
|
|
207
204
|
return (
|
|
208
|
-
<div className={cn(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
<header className="border-b border-[var(--tuwa-border-primary)]">
|
|
215
|
-
<ConnectButton />
|
|
216
|
-
</header>
|
|
217
|
-
<main>
|
|
218
|
-
{/* Your app content */}
|
|
219
|
-
</main>
|
|
205
|
+
<div className={cn('min-h-screen', 'bg-[var(--tuwa-bg-primary)]', 'text-[var(--tuwa-text-primary)]')}>
|
|
206
|
+
<NovaTransactionsProvider {...params} />
|
|
207
|
+
<header className="border-b border-[var(--tuwa-border-primary)]">
|
|
208
|
+
<ConnectButton />
|
|
209
|
+
</header>
|
|
210
|
+
<main>{/* Your app content */}</main>
|
|
220
211
|
</div>
|
|
221
212
|
);
|
|
222
213
|
}
|
|
@@ -226,16 +217,16 @@ function App() {
|
|
|
226
217
|
|
|
227
218
|
#### Utilities
|
|
228
219
|
|
|
229
|
-
| Function
|
|
230
|
-
|
|
|
220
|
+
| Function | Description | Usage |
|
|
221
|
+
| :------------------- | :------------------------------------------------------------- | :--------------------------------------------------- |
|
|
231
222
|
| **`cn(...classes)`** | Merges class names intelligently, resolving Tailwind conflicts | `cn('p-4 text-sm', 'p-6', {'hidden': conditional})` |
|
|
232
223
|
|
|
233
224
|
#### Hooks
|
|
234
225
|
|
|
235
|
-
| Hook
|
|
236
|
-
|
|
|
226
|
+
| Hook | Description | Return Type |
|
|
227
|
+
| :------------------------- | :----------------------------------- | :---------------------------------- |
|
|
237
228
|
| **`useCopyToClipboard()`** | Copy text to clipboard with feedback | `[boolean, (text: string) => void]` |
|
|
238
|
-
| **`useMediaQuery(query)`** | Responsive media query hook
|
|
229
|
+
| **`useMediaQuery(query)`** | Responsive media query hook | `boolean` |
|
|
239
230
|
|
|
240
231
|
## 🤝 Contributing & Support
|
|
241
232
|
|
|
@@ -247,4 +238,4 @@ If you find this library useful, please consider supporting its development. Eve
|
|
|
247
238
|
|
|
248
239
|
## 📄 License
|
|
249
240
|
|
|
250
|
-
This project is licensed under the **Apache-2.0 License** - see the [LICENSE](./LICENSE) file for details.
|
|
241
|
+
This project is licensed under the **Apache-2.0 License** - see the [LICENSE](./LICENSE) file for details.
|
package/dist/index.css
CHANGED
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
--tuwa-button-gradient-to-hover: oklch(49.6% 0.265 301.924);
|
|
350
350
|
--tuwa-standart-button-bg: oklch(96.7% 0.003 264.542);
|
|
351
351
|
--tuwa-standart-button-hover: oklch(92.8% 0.006 264.531);
|
|
352
|
-
--tuwa-testnet-icons: #
|
|
352
|
+
--tuwa-testnet-icons: #c4bfb8;
|
|
353
353
|
}
|
|
354
354
|
.dark {
|
|
355
355
|
--tuwa-success-bg: oklch(39.3% 0.095 152.535);
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
--tuwa-button-gradient-to-hover: oklch(55.8% 0.288 302.321);
|
|
381
381
|
--tuwa-standart-button-bg: oklch(37.3% 0.034 259.733);
|
|
382
382
|
--tuwa-standart-button-hover: oklch(27.8% 0.033 256.848);
|
|
383
|
-
--tuwa-testnet-icons: #
|
|
383
|
+
--tuwa-testnet-icons: #c4bfb8;
|
|
384
384
|
}
|
|
385
385
|
.Toastify {
|
|
386
386
|
pointer-events: auto;
|
|
@@ -410,7 +410,8 @@
|
|
|
410
410
|
background-color: var(--tuwa-text-primary);
|
|
411
411
|
}
|
|
412
412
|
@keyframes scrolling {
|
|
413
|
-
0%,
|
|
413
|
+
0%,
|
|
414
|
+
to {
|
|
414
415
|
padding-right: 2px;
|
|
415
416
|
}
|
|
416
417
|
}
|
|
@@ -609,4 +610,4 @@
|
|
|
609
610
|
--tw-space-x-reverse: 0;
|
|
610
611
|
}
|
|
611
612
|
}
|
|
612
|
-
}
|
|
613
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/nova-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@radix-ui/react-dialog": "1.x.x",
|
|
52
52
|
"@web3icons/react": ">=4",
|
|
53
|
+
"@web3icons/common": ">=0.11",
|
|
53
54
|
"clsx": "2.x.x",
|
|
54
55
|
"framer-motion": "12.x.x",
|
|
55
56
|
"react": ">=19.2.3",
|
|
@@ -58,13 +59,13 @@
|
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@tailwindcss/postcss": "^4.1.18",
|
|
60
61
|
"@tailwindcss/vite": "^4.1.18",
|
|
61
|
-
"@types/react": "^19.2.
|
|
62
|
+
"@types/react": "^19.2.9",
|
|
62
63
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
63
|
-
"@web3icons/react": "^4.1.
|
|
64
|
-
"@web3icons/common": "^0.11.
|
|
64
|
+
"@web3icons/react": "^4.1.14",
|
|
65
|
+
"@web3icons/common": "^0.11.43",
|
|
65
66
|
"autoprefixer": "^10.4.23",
|
|
66
67
|
"clsx": "^2.1.1",
|
|
67
|
-
"framer-motion": "^12.
|
|
68
|
+
"framer-motion": "^12.29.0",
|
|
68
69
|
"postcss": "^8.5.6",
|
|
69
70
|
"postcss-cli": "^11.0.1",
|
|
70
71
|
"react": "^19.2.3",
|