@silentswap/ui-kit 0.0.41
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/dist/components/AssetTile.d.ts +10 -0
- package/dist/components/AssetTile.js +18 -0
- package/dist/components/Button.d.ts +15 -0
- package/dist/components/Button.js +26 -0
- package/dist/components/Card.d.ts +14 -0
- package/dist/components/Card.js +19 -0
- package/dist/components/Input.d.ts +19 -0
- package/dist/components/Input.js +23 -0
- package/dist/components/PopularTokensArea.d.ts +8 -0
- package/dist/components/PopularTokensArea.js +34 -0
- package/dist/components/ProgressBar.d.ts +17 -0
- package/dist/components/ProgressBar.js +30 -0
- package/dist/components/Select.d.ts +12 -0
- package/dist/components/Select.js +7 -0
- package/dist/components/Warning.d.ts +15 -0
- package/dist/components/Warning.js +23 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +4 -0
- package/dist/data.d.ts +7 -0
- package/dist/data.js +14 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +13 -0
- package/dist/styles.css +399 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.js +1 -0
- package/package.json +52 -0
- package/src/components/AssetTile.tsx +69 -0
- package/src/components/Button.tsx +51 -0
- package/src/components/Card.tsx +49 -0
- package/src/components/Input.tsx +72 -0
- package/src/components/PopularTokensArea.tsx +78 -0
- package/src/components/ProgressBar.tsx +67 -0
- package/src/components/Select.tsx +48 -0
- package/src/components/Warning.tsx +54 -0
- package/src/constants.ts +5 -0
- package/src/data.ts +19 -0
- package/src/index.ts +26 -0
- package/src/styles.css +399 -0
- package/src/types.ts +20 -0
package/src/styles.css
ADDED
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
/* Note: @theme and @utility are Tailwind CSS 4 directives.
|
|
4
|
+
CSS linter warnings for these are expected and can be safely ignored. */
|
|
5
|
+
|
|
6
|
+
@theme {
|
|
7
|
+
/* Colors */
|
|
8
|
+
--color-dim-dark: #0F0F0F;
|
|
9
|
+
--color-dim-med: #242424;
|
|
10
|
+
--color-dim-light: #4D4D4D;
|
|
11
|
+
--color-dim-bright: #4D4D4D;
|
|
12
|
+
|
|
13
|
+
--color-orange: #FC6226;
|
|
14
|
+
--color-yellow: #F0B90B;
|
|
15
|
+
--color-yellow-alt: #FFD600;
|
|
16
|
+
--color-green: #5FED9B;
|
|
17
|
+
--color-purple: #9E72FF;
|
|
18
|
+
--color-purple-vibrant: #6A27FF;
|
|
19
|
+
|
|
20
|
+
--color-border-bright: #BABCBD;
|
|
21
|
+
--color-border-dark: #000000;
|
|
22
|
+
--color-text-bright: #FFFFFF;
|
|
23
|
+
--color-text-subtle: rgba(0, 0, 0, 0.4);
|
|
24
|
+
--color-text-dim: #999999;
|
|
25
|
+
--color-gray-dark: #545454;
|
|
26
|
+
|
|
27
|
+
/* Font Families */
|
|
28
|
+
--font-family-orbitron: Orbitron, sans-serif;
|
|
29
|
+
--font-family-chakra: Chakra Petch, sans-serif;
|
|
30
|
+
--font-family-poppins: Poppins, sans-serif;
|
|
31
|
+
--font-family-roboto: Roboto, sans-serif;
|
|
32
|
+
--font-family-fira-sans: Fira Sans, serif;
|
|
33
|
+
--font-family-fira-mono: Fira Mono, serif;
|
|
34
|
+
--font-family-fira-code: Fira Code, serif;
|
|
35
|
+
--font-family-tomorrow: Tomorrow, sans-serif;
|
|
36
|
+
--font-family-thasadith: Thasadith, sans-serif;
|
|
37
|
+
--font-family-poiret-one: Poiret One, sans-serif;
|
|
38
|
+
--font-family-epilogue: Epilogue, sans-serif;
|
|
39
|
+
--font-family-pavanam: Pavanam, sans-serif;
|
|
40
|
+
--font-family-titillium-web: Titillium Web, sans-serif;
|
|
41
|
+
--font-family-sofia-sans-extra-condensed: Sofia Sans Extra Condensed, sans-serif;
|
|
42
|
+
--font-family-red-rose: Red Rose, serif;
|
|
43
|
+
--font-family-finlandica: Finlandica, sans-serif;
|
|
44
|
+
--font-family-ramabhadra: Ramabhadra, sans-serif;
|
|
45
|
+
--font-family-lunasima: Lunasima, sans-serif;
|
|
46
|
+
--font-family-oswald: Oswald, sans-serif;
|
|
47
|
+
--font-family-merriweather-sans: Merriweather Sans, sans-serif;
|
|
48
|
+
--font-family-commissioner: Commissioner, sans-serif;
|
|
49
|
+
--font-family-nunito-sans: Nunito Sans, sans-serif;
|
|
50
|
+
--font-family-noto-sans: Noto Sans, sans-serif;
|
|
51
|
+
--font-family-roboto-flex: Roboto Flex, sans-serif;
|
|
52
|
+
--font-family-kantumruy-pro: Kantumruy Pro, sans-serif;
|
|
53
|
+
--font-family-dhurjati: Dhurjati, sans-serif;
|
|
54
|
+
--font-family-nineteen-ninety-seven: Nineteen Ninety Seven, sans-serif;
|
|
55
|
+
--font-family-a-goblin-appears: A Goblin Appears!, sans-serif;
|
|
56
|
+
|
|
57
|
+
/* Easing Functions */
|
|
58
|
+
--ease-ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
|
|
59
|
+
--ease-ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
60
|
+
--ease-ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
|
|
61
|
+
--ease-ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
|
|
62
|
+
--ease-ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
|
|
63
|
+
--ease-ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335);
|
|
64
|
+
|
|
65
|
+
--ease-ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
66
|
+
--ease-ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
67
|
+
--ease-ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
68
|
+
--ease-ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
|
|
69
|
+
--ease-ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
|
|
70
|
+
--ease-ease-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
71
|
+
--ease-ease-out-quick: cubic-bezier(0.00, 1.00, 0.0, 1.0);
|
|
72
|
+
|
|
73
|
+
--ease-ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
74
|
+
--ease-ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
75
|
+
--ease-ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
|
|
76
|
+
--ease-ease-in-out-quint: cubic-bezier(0.86, 0, 0.07, 1);
|
|
77
|
+
--ease-ease-in-out-expo: cubic-bezier(1, 0, 0, 1);
|
|
78
|
+
--ease-ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
79
|
+
|
|
80
|
+
/* Box Shadows */
|
|
81
|
+
--shadow-shadowed-box: 4px 8px 16px black;
|
|
82
|
+
|
|
83
|
+
/* Animations */
|
|
84
|
+
--animate-subtle-throb: subtle-throb 30s infinite;
|
|
85
|
+
--animate-spin: spin 3s linear infinite;
|
|
86
|
+
--animate-spin-quicker: spin 2s linear infinite;
|
|
87
|
+
--animate-flash: flash 0.18s step-start 3;
|
|
88
|
+
--animate-pulse: pulse 2s linear infinite;
|
|
89
|
+
--animate-trill: trill 0.1s linear infinite;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* SilentSwap UI Kit Custom Styles */
|
|
93
|
+
|
|
94
|
+
/* CSS Variables for component use */
|
|
95
|
+
:root {
|
|
96
|
+
--color-dim-dark: #0F0F0F;
|
|
97
|
+
--color-dim-med: #242424;
|
|
98
|
+
--color-dim-light: #4D4D4D;
|
|
99
|
+
--color-orange: #FC6226;
|
|
100
|
+
--color-yellow: #F0B90B;
|
|
101
|
+
--color-green: #5FED9B;
|
|
102
|
+
--color-purple: #9E72FF;
|
|
103
|
+
--color-purple-vibrant: #6A27FF;
|
|
104
|
+
--color-white: #FFFFFF;
|
|
105
|
+
--color-black: #000000;
|
|
106
|
+
--color-border-bright: #BABCBD;
|
|
107
|
+
--color-border-dark: #000000;
|
|
108
|
+
--color-text-bright: #FFFFFF;
|
|
109
|
+
--color-text-subtle: rgba(0, 0, 0, 0.4);
|
|
110
|
+
--color-text-dim: #999999;
|
|
111
|
+
--color-gray-dark: #545454;
|
|
112
|
+
--color-yellow-bright: #FFD600;
|
|
113
|
+
|
|
114
|
+
/* Easing functions */
|
|
115
|
+
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
|
|
116
|
+
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
|
117
|
+
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
118
|
+
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
119
|
+
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
120
|
+
--ease-out-quick: cubic-bezier(0.00, 1.00, 0.0, 1.0);
|
|
121
|
+
--ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Keyframe Animations */
|
|
125
|
+
@keyframes subtle-throb {
|
|
126
|
+
0% { opacity: 0.2; }
|
|
127
|
+
50% { opacity: 0.35; }
|
|
128
|
+
100% { opacity: 0.2; }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@keyframes spin {
|
|
132
|
+
0% { transform: rotate(0deg); }
|
|
133
|
+
100% { transform: rotate(360deg); }
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes flash {
|
|
137
|
+
0% { background-color: rgba(255, 255, 255, 0.9); }
|
|
138
|
+
50% { background-color: rgba(0, 0, 0, 0.9); }
|
|
139
|
+
100% { background-color: rgba(255, 255, 255, 0.9); }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@keyframes pulse {
|
|
143
|
+
0% { opacity: 1; }
|
|
144
|
+
50% { opacity: 0.4; }
|
|
145
|
+
100% { opacity: 1; }
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@keyframes trill {
|
|
149
|
+
0%, 100% {
|
|
150
|
+
opacity: 0.6;
|
|
151
|
+
}
|
|
152
|
+
50% {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Component-specific styles that extend Tailwind */
|
|
158
|
+
@layer components {
|
|
159
|
+
/* Button variants */
|
|
160
|
+
.call-to-action {
|
|
161
|
+
width: 100%;
|
|
162
|
+
padding: 1.25rem 1rem;
|
|
163
|
+
background-color: var(--color-yellow);
|
|
164
|
+
font-family: var(--font-family-orbitron);
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
font-size: 1.125rem;
|
|
167
|
+
color: var(--color-black);
|
|
168
|
+
border-radius: 0.5rem;
|
|
169
|
+
transition: background-color 150ms;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.call-to-action:hover {
|
|
173
|
+
background-color: var(--color-yellow-bright);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.call-to-action:focus {
|
|
177
|
+
outline: none;
|
|
178
|
+
box-shadow: 0 0 0 2px var(--color-yellow), 0 0 0 4px transparent;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.call-to-action:disabled {
|
|
182
|
+
opacity: 0.5;
|
|
183
|
+
cursor: not-allowed;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.button-link {
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
text-decoration: none;
|
|
189
|
+
transition: opacity 200ms linear;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.button-link:hover {
|
|
193
|
+
opacity: 0.8;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Input variants */
|
|
197
|
+
.digital-input {
|
|
198
|
+
background-color: var(--color-black);
|
|
199
|
+
border: 0;
|
|
200
|
+
border-radius: 0.5rem;
|
|
201
|
+
font-size: 1.5rem;
|
|
202
|
+
font-weight: 700;
|
|
203
|
+
font-family: var(--font-family-chakra);
|
|
204
|
+
color: var(--color-white);
|
|
205
|
+
padding: 0.25rem 0.75rem;
|
|
206
|
+
width: 100%;
|
|
207
|
+
box-sizing: border-box;
|
|
208
|
+
transition: all 150ms;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.digital-input:focus {
|
|
212
|
+
outline: none;
|
|
213
|
+
box-shadow: 0 0 0 2px var(--color-yellow), 0 0 0 4px transparent;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.digital-input:disabled {
|
|
217
|
+
opacity: 0.5;
|
|
218
|
+
cursor: not-allowed;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.amount-input {
|
|
222
|
+
background: var(--color-black);
|
|
223
|
+
border-radius: 8px;
|
|
224
|
+
width: 100%;
|
|
225
|
+
padding: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.amount-input input {
|
|
229
|
+
font-size: 28px;
|
|
230
|
+
font-weight: 700;
|
|
231
|
+
color: var(--color-text-bright);
|
|
232
|
+
padding: 4px 12px 0px 12px;
|
|
233
|
+
width: 100%;
|
|
234
|
+
box-sizing: border-box;
|
|
235
|
+
border: none;
|
|
236
|
+
outline: none;
|
|
237
|
+
background: transparent;
|
|
238
|
+
border-radius: 8px 8px 0 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.amount-input input:disabled {
|
|
242
|
+
opacity: 0.6;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.amount-input .info {
|
|
246
|
+
font-size: 11px;
|
|
247
|
+
padding: 0px 12px 9px 14px;
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: row;
|
|
250
|
+
justify-content: space-between;
|
|
251
|
+
width: 100%;
|
|
252
|
+
font-weight: 400;
|
|
253
|
+
align-items: center;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* Card/Section variants */
|
|
257
|
+
.card-section {
|
|
258
|
+
display: flex;
|
|
259
|
+
flex-direction: column;
|
|
260
|
+
gap: 0px;
|
|
261
|
+
background: var(--color-dim-med);
|
|
262
|
+
padding: 12px;
|
|
263
|
+
width: 90vw;
|
|
264
|
+
box-sizing: border-box;
|
|
265
|
+
margin-left: auto;
|
|
266
|
+
margin-right: auto;
|
|
267
|
+
max-width: 600px;
|
|
268
|
+
z-index: 6;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.plate-row {
|
|
272
|
+
display: flex;
|
|
273
|
+
flex-direction: row;
|
|
274
|
+
justify-content: space-between;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: 12px;
|
|
277
|
+
height: 68px;
|
|
278
|
+
transition: height 500ms linear;
|
|
279
|
+
padding: 13px 12px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Warning/Notice */
|
|
283
|
+
.input-notice {
|
|
284
|
+
position: absolute;
|
|
285
|
+
top: 0;
|
|
286
|
+
right: 0;
|
|
287
|
+
font-size: 10px;
|
|
288
|
+
background: rgba(0,0,0,0.8);
|
|
289
|
+
border-radius: 4px;
|
|
290
|
+
display: flex;
|
|
291
|
+
align-items: center;
|
|
292
|
+
gap: 4px;
|
|
293
|
+
padding: 0 6px;
|
|
294
|
+
margin-top: 8px;
|
|
295
|
+
margin-right: 8px;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.input-notice.warning {
|
|
299
|
+
color: rgba(254, 215, 3);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.input-notice .dot {
|
|
303
|
+
display: inline-block;
|
|
304
|
+
width: 5px;
|
|
305
|
+
height: 6px;
|
|
306
|
+
background-color: rgba(254, 215, 3);
|
|
307
|
+
border-radius: 6px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* Progress bar */
|
|
311
|
+
.progress-bar {
|
|
312
|
+
height: 6px;
|
|
313
|
+
width: 100%;
|
|
314
|
+
background-color: var(--color-gray-dark);
|
|
315
|
+
transition: height 500ms linear;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.progress-bar .fill {
|
|
319
|
+
transition: width 490ms linear;
|
|
320
|
+
background-color: var(--color-green);
|
|
321
|
+
height: 100%;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* Token items */
|
|
325
|
+
.token-item {
|
|
326
|
+
display: flex;
|
|
327
|
+
flex-direction: column;
|
|
328
|
+
align-items: center;
|
|
329
|
+
gap: 0.5rem;
|
|
330
|
+
background-color: var(--color-dim-med);
|
|
331
|
+
border-radius: 0.5rem;
|
|
332
|
+
padding: 0.5rem;
|
|
333
|
+
font-size: 0.75rem;
|
|
334
|
+
cursor: pointer;
|
|
335
|
+
transition: background-color 150ms;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.token-item:hover {
|
|
339
|
+
background-color: var(--color-dim-light);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.token-label {
|
|
343
|
+
color: var(--color-text-dim);
|
|
344
|
+
text-align: center;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.popular-tokens-title {
|
|
348
|
+
font-family: var(--font-family-orbitron);
|
|
349
|
+
font-weight: 700;
|
|
350
|
+
font-size: 1.125rem;
|
|
351
|
+
color: var(--color-text-bright);
|
|
352
|
+
margin-bottom: 0.75rem;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* Utility classes */
|
|
357
|
+
/* stylelint-disable-next-line at-rule-no-unknown */
|
|
358
|
+
@utility text-shadow {
|
|
359
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* stylelint-disable-next-line at-rule-no-unknown */
|
|
363
|
+
@utility shadowed-box {
|
|
364
|
+
box-shadow: 4px 8px 16px black;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/* stylelint-disable-next-line at-rule-no-unknown */
|
|
368
|
+
@utility pixel-corners {
|
|
369
|
+
clip-path: polygon(
|
|
370
|
+
0px calc(100% - 12px),
|
|
371
|
+
3px calc(100% - 12px),
|
|
372
|
+
3px calc(100% - 6px),
|
|
373
|
+
6px calc(100% - 6px),
|
|
374
|
+
6px calc(100% - 3px),
|
|
375
|
+
12px calc(100% - 3px),
|
|
376
|
+
12px 100%,
|
|
377
|
+
calc(100% - 12px) 100%,
|
|
378
|
+
calc(100% - 12px) calc(100% - 3px),
|
|
379
|
+
calc(100% - 6px) calc(100% - 3px),
|
|
380
|
+
calc(100% - 6px) calc(100% - 6px),
|
|
381
|
+
calc(100% - 3px) calc(100% - 6px),
|
|
382
|
+
calc(100% - 3px) calc(100% - 12px),
|
|
383
|
+
100% calc(100% - 12px),
|
|
384
|
+
100% 12px,
|
|
385
|
+
calc(100% - 3px) 12px,
|
|
386
|
+
calc(100% - 3px) 6px,
|
|
387
|
+
calc(100% - 6px) 6px,
|
|
388
|
+
calc(100% - 6px) 3px,
|
|
389
|
+
calc(100% - 12px) 3px,
|
|
390
|
+
calc(100% - 12px) 0px,
|
|
391
|
+
12px 0px,
|
|
392
|
+
12px 3px,
|
|
393
|
+
6px 3px,
|
|
394
|
+
6px 6px,
|
|
395
|
+
3px 6px,
|
|
396
|
+
3px 12px,
|
|
397
|
+
0px 12px
|
|
398
|
+
);
|
|
399
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// UI-specific types
|
|
2
|
+
export type Asset = {
|
|
3
|
+
caip19: string;
|
|
4
|
+
caip2?: string;
|
|
5
|
+
symbol?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
coingeckoId?: string;
|
|
8
|
+
ext?: string;
|
|
9
|
+
gradient?: string[];
|
|
10
|
+
style?: string;
|
|
11
|
+
precision?: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type ContactId = string;
|
|
15
|
+
|
|
16
|
+
export type WeakCaip19 = string;
|
|
17
|
+
export type WeakCaip2 = string;
|
|
18
|
+
|
|
19
|
+
// UI-specific types
|
|
20
|
+
export type Decimal = string | number;
|