@rash2x/bridge-widget 0.1.17 → 0.1.19

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 CHANGED
@@ -194,38 +194,67 @@ function App() {
194
194
 
195
195
  ## Styling
196
196
 
197
- The widget uses Tailwind CSS. Make sure your project has Tailwind configured, or the styles will not work correctly.
197
+ The widget comes with pre-compiled Tailwind CSS styles. **You don't need to have Tailwind installed** in your project for the widget to work.
198
198
 
199
- ### Tailwind Configuration
199
+ ### Basic Usage
200
200
 
201
- ```js
202
- // tailwind.config.js
203
- module.exports = {
204
- content: [
205
- './src/**/*.{js,ts,jsx,tsx}',
206
- './node_modules/@evaa/bridge-widget/**/*.{js,mjs}',
207
- ],
208
- // ... rest of your config
209
- };
201
+ Simply import the styles and you're good to go:
202
+
203
+ ```tsx
204
+ import '@evaa/bridge-widget/styles.css';
210
205
  ```
211
206
 
212
- ### Custom Theme
207
+ All Tailwind utility classes used by the widget are already included in the compiled CSS.
213
208
 
214
- You can customize the theme by overriding CSS variables:
209
+ ### Theme Customization
210
+
211
+ #### Option 1: CSS Variables (Simple)
212
+
213
+ Customize colors by overriding CSS variables in your own stylesheet:
215
214
 
216
215
  ```css
217
216
  :root {
218
- --primary: #your-color;
219
- --background: #your-color;
220
- /* ... other variables */
217
+ --primary: #0095f9; /* Primary brand color */
218
+ --background: #ffffff; /* Background color */
219
+ --foreground: #171717; /* Text color */
220
+ --card: #f2f2f2; /* Card background */
221
+ --border: #00000029; /* Border color */
222
+ /* ... see styles.css for all available variables */
221
223
  }
222
224
 
223
225
  [data-theme="dark"] {
224
- --primary: #your-dark-color;
225
- /* ... other variables */
226
+ --primary: #5200ff;
227
+ --background: #000000;
228
+ --foreground: #ffffff;
229
+ /* ... dark theme overrides */
226
230
  }
227
231
  ```
228
232
 
233
+ #### Option 2: Tailwind Integration (Advanced)
234
+
235
+ If your project already uses Tailwind CSS and you want full control:
236
+
237
+ 1. Add the widget to your Tailwind `content` configuration:
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.
255
+
256
+ **Note:** The widget will work perfectly fine without Tailwind in your project.
257
+
229
258
  ## Advanced Usage
230
259
 
231
260
  ### Using Stores Directly
@@ -0,0 +1,81 @@
1
+ /* fonts.css */
2
+ @font-face {
3
+ font-family: 'Gilroy';
4
+ src: url('/assets/fonts/Gilroy-Thin.ttf') format('truetype');
5
+ font-style: normal;
6
+ font-weight: 100;
7
+ font-display: swap;
8
+ }
9
+ @font-face {
10
+ font-family: 'Gilroy';
11
+ src: url('/assets/fonts/Gilroy-UltraLight.ttf') format('truetype');
12
+ font-style: normal;
13
+ font-weight: 200;
14
+ font-display: swap;
15
+ }
16
+ @font-face {
17
+ font-family: 'Gilroy';
18
+ src: url('/assets/fonts/Gilroy-Light.ttf') format('truetype');
19
+ font-style: normal;
20
+ font-weight: 300;
21
+ font-display: swap;
22
+ }
23
+ @font-face {
24
+ font-family: 'Gilroy';
25
+ src: url('/assets/fonts/Gilroy-Regular.ttf') format('truetype');
26
+ font-style: normal;
27
+ font-weight: 400;
28
+ font-display: swap;
29
+ }
30
+ @font-face {
31
+ font-family: 'Gilroy';
32
+ src: url('/assets/fonts/Gilroy-Medium.ttf') format('truetype');
33
+ font-style: normal;
34
+ font-weight: 500;
35
+ font-display: swap;
36
+ }
37
+ @font-face {
38
+ font-family: 'Gilroy';
39
+ src: url('/assets/fonts/Gilroy-SemiBold.ttf') format('truetype');
40
+ font-style: normal;
41
+ font-weight: 600;
42
+ font-display: swap;
43
+ }
44
+ @font-face {
45
+ font-family: 'Gilroy';
46
+ src: url('/assets/fonts/Gilroy-Bold.ttf') format('truetype');
47
+ font-style: normal;
48
+ font-weight: 700;
49
+ font-display: swap;
50
+ }
51
+ @font-face {
52
+ font-family: 'Gilroy';
53
+ src: url('/assets/fonts/Gilroy-ExtraBold.ttf') format('truetype');
54
+ font-style: normal;
55
+ font-weight: 800;
56
+ font-display: swap;
57
+ }
58
+ @font-face {
59
+ font-family: 'Gilroy';
60
+ src: url('/assets/fonts/Gilroy-Black.ttf') format('truetype');
61
+ font-style: normal;
62
+ font-weight: 900;
63
+ font-display: swap;
64
+ }
65
+ @font-face {
66
+ font-family: 'Gilroy';
67
+ src: url('/assets/fonts/Gilroy-Heavy.ttf') format('truetype');
68
+ font-style: normal;
69
+ font-weight: 900;
70
+ font-display: swap;
71
+ }
72
+
73
+
74
+ @font-face {
75
+ font-family: 'Hanson';
76
+ src:
77
+ url(/assets/fonts/hanson-bold.woff2) format('woff2'),
78
+ url(/assets/fonts/hanson-bold.woff) format('woff');
79
+ font-style: normal;
80
+ font-weight: 700;
81
+ }
@@ -1376,7 +1376,7 @@ const TokenSelectModal = ({
1376
1376
  [groupedTokens.willChangeSrcChain]
1377
1377
  );
1378
1378
  const hasNoResults = tokensToRender.length === 0 && willChangeSrcTokens.length === 0;
1379
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { className: "!h-[90dvh] overflow-hidden flex flex-col", children: [
1379
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { className: "h-[90dvh] max-h-dvh overflow-hidden flex flex-col", children: [
1380
1380
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t("bridge.selectToken") }) }),
1381
1381
  /* @__PURE__ */ jsxRuntime.jsx(
1382
1382
  SearchInput,