@rash2x/bridge-widget 0.1.19 → 0.2.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/README.md +10 -46
- package/dist/evaa-bridge.cjs +6158 -438
- package/dist/evaa-bridge.cjs.map +1 -1
- package/dist/evaa-bridge.mjs +5886 -182
- package/dist/evaa-bridge.mjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,24 +47,6 @@ npm install @tonconnect/ui-react @ton/core @ton/crypto @ton/ton
|
|
|
47
47
|
npm install @tronweb3/tronwallet-adapter-react-hooks @tronweb3/tronwallet-adapters tronweb
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
### Required shadcn/ui Components
|
|
51
|
-
|
|
52
|
-
This library requires certain shadcn/ui components to be installed in your project. The library does **not bundle** these components to avoid duplication and allow you to use your own styled versions.
|
|
53
|
-
|
|
54
|
-
**Required components:** `accordion`, `button`, `card`, `dialog`, `input`, `skeleton`, `switch`, `tooltip`
|
|
55
|
-
|
|
56
|
-
Install them using shadcn CLI:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
npx shadcn@latest add accordion button card dialog input skeleton switch tooltip
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Important:** Your project must have the following path aliases configured:
|
|
63
|
-
- `@/components/ui` - for UI components
|
|
64
|
-
- `@/lib/utils` - for the `cn` utility function
|
|
65
|
-
|
|
66
|
-
For detailed setup instructions, see [SHADCN_COMPONENTS.md](./SHADCN_COMPONENTS.md).
|
|
67
|
-
|
|
68
50
|
## Quick Start
|
|
69
51
|
|
|
70
52
|
### 1. Basic Setup
|
|
@@ -204,13 +186,11 @@ Simply import the styles and you're good to go:
|
|
|
204
186
|
import '@evaa/bridge-widget/styles.css';
|
|
205
187
|
```
|
|
206
188
|
|
|
207
|
-
All Tailwind utility classes used by the widget are already included in the compiled CSS.
|
|
189
|
+
All Tailwind utility classes used by the widget are already included in the compiled CSS. The widget has its own Tailwind configuration that ensures all necessary classes are bundled during the library build process.
|
|
208
190
|
|
|
209
191
|
### Theme Customization
|
|
210
192
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
Customize colors by overriding CSS variables in your own stylesheet:
|
|
193
|
+
Customize the widget's appearance by overriding CSS variables in your own stylesheet:
|
|
214
194
|
|
|
215
195
|
```css
|
|
216
196
|
:root {
|
|
@@ -219,7 +199,8 @@ Customize colors by overriding CSS variables in your own stylesheet:
|
|
|
219
199
|
--foreground: #171717; /* Text color */
|
|
220
200
|
--card: #f2f2f2; /* Card background */
|
|
221
201
|
--border: #00000029; /* Border color */
|
|
222
|
-
|
|
202
|
+
--radius: 0.625rem; /* Border radius */
|
|
203
|
+
/* ... see dist/styles.css for all available variables */
|
|
223
204
|
}
|
|
224
205
|
|
|
225
206
|
[data-theme="dark"] {
|
|
@@ -230,30 +211,13 @@ Customize colors by overriding CSS variables in your own stylesheet:
|
|
|
230
211
|
}
|
|
231
212
|
```
|
|
232
213
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
```js
|
|
240
|
-
// tailwind.config.js
|
|
241
|
-
module.exports = {
|
|
242
|
-
content: [
|
|
243
|
-
'./src/**/*.{js,ts,jsx,tsx}',
|
|
244
|
-
'./node_modules/@evaa/bridge-widget/**/*.{js,mjs}', // Add this line
|
|
245
|
-
],
|
|
246
|
-
theme: {
|
|
247
|
-
extend: {
|
|
248
|
-
// Your custom theme extensions will apply to the widget
|
|
249
|
-
},
|
|
250
|
-
},
|
|
251
|
-
};
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
2. The widget will use your project's Tailwind configuration in addition to its pre-compiled styles.
|
|
214
|
+
**Complete list of customizable CSS variables:**
|
|
215
|
+
- Color tokens: `--background`, `--foreground`, `--primary`, `--secondary`, `--muted`, `--accent`, `--destructive`, `--border`, `--input`, `--ring`
|
|
216
|
+
- Semantic colors: `--link`, `--filter`, `--swap`, `--settings-button`, `--modal-x`, `--input-icon`, `--balance-icon`, and many more
|
|
217
|
+
- Border radius: `--radius` (affects all rounded corners)
|
|
218
|
+
- See the `dist/styles.css` file for the complete list
|
|
255
219
|
|
|
256
|
-
**Note:** The widget will work perfectly fine without Tailwind in your project.
|
|
220
|
+
**Note:** The widget will work perfectly fine without Tailwind in your consuming project. All necessary styles are pre-compiled and included in `styles.css`.
|
|
257
221
|
|
|
258
222
|
## Advanced Usage
|
|
259
223
|
|