@recoilpay/intent-react 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.
- package/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/index.cjs +381 -0
- package/dist/index.d.cts +77 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +354 -0
- package/dist/styles.css +628 -0
- package/dist/wagmi.cjs +36 -0
- package/dist/wagmi.d.cts +15 -0
- package/dist/wagmi.d.ts +15 -0
- package/dist/wagmi.js +11 -0
- package/package.json +100 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @recoilpay/intent-react
|
|
3
|
+
*
|
|
4
|
+
* Every rule is scoped under .rp-root, so nothing here reaches the host page.
|
|
5
|
+
* Colours are custom properties: the `theme` prop sets them inline, which
|
|
6
|
+
* wins over the mode palettes below, and hosts can also override any
|
|
7
|
+
* --rp-* variable from their own CSS.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.rp-root {
|
|
11
|
+
/* Dark: RecoilPay's own palette. */
|
|
12
|
+
--rp-surface: #1c1e2e;
|
|
13
|
+
--rp-raised: #232536;
|
|
14
|
+
--rp-sunken: #161826;
|
|
15
|
+
--rp-ink: #e9e9ed;
|
|
16
|
+
--rp-ink-2: #b4b5c4;
|
|
17
|
+
--rp-muted: #8b8c9c;
|
|
18
|
+
--rp-line: #2a2c3d;
|
|
19
|
+
--rp-accent: #9184d9;
|
|
20
|
+
--rp-accent-text: #161826;
|
|
21
|
+
--rp-success: #3fb98f;
|
|
22
|
+
--rp-danger: #e06b6b;
|
|
23
|
+
--rp-radius: 12px;
|
|
24
|
+
--rp-font: inherit;
|
|
25
|
+
--rp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
26
|
+
|
|
27
|
+
color-scheme: dark;
|
|
28
|
+
width: 100%;
|
|
29
|
+
max-width: 640px;
|
|
30
|
+
color: var(--rp-ink);
|
|
31
|
+
font-family: var(--rp-font);
|
|
32
|
+
font-size: 14px;
|
|
33
|
+
line-height: 1.45;
|
|
34
|
+
text-align: left;
|
|
35
|
+
-webkit-font-smoothing: antialiased;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.rp-root[data-mode='light'] {
|
|
39
|
+
--rp-surface: #ffffff;
|
|
40
|
+
--rp-raised: #f6f6f9;
|
|
41
|
+
--rp-sunken: #f0f0f4;
|
|
42
|
+
--rp-ink: #1c1e2e;
|
|
43
|
+
--rp-ink-2: #474a5c;
|
|
44
|
+
--rp-muted: #6b6d7e;
|
|
45
|
+
--rp-line: #e2e2ea;
|
|
46
|
+
--rp-accent: #6d5fd0;
|
|
47
|
+
--rp-accent-text: #ffffff;
|
|
48
|
+
--rp-success: #1f8a64;
|
|
49
|
+
--rp-danger: #c24545;
|
|
50
|
+
color-scheme: light;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.rp-root *,
|
|
54
|
+
.rp-root *::before,
|
|
55
|
+
.rp-root *::after {
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.rp-root button,
|
|
60
|
+
.rp-root input {
|
|
61
|
+
font: inherit;
|
|
62
|
+
color: inherit;
|
|
63
|
+
letter-spacing: inherit;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.rp-root :focus-visible {
|
|
67
|
+
outline: 2px solid var(--rp-accent);
|
|
68
|
+
outline-offset: 2px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.rp-mono {
|
|
72
|
+
font-family: var(--rp-mono);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ── Composer ─────────────────────────────────────────────────────────── */
|
|
76
|
+
|
|
77
|
+
.rp-composer {
|
|
78
|
+
border: 1px solid var(--rp-line);
|
|
79
|
+
border-radius: var(--rp-radius);
|
|
80
|
+
background: var(--rp-surface);
|
|
81
|
+
transition: border-color 150ms ease;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.rp-composer:focus-within {
|
|
85
|
+
border-color: var(--rp-accent);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.rp-composer-head {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
padding: 8px 14px;
|
|
93
|
+
border-bottom: 1px solid var(--rp-line);
|
|
94
|
+
font-size: 11px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.rp-eyebrow {
|
|
98
|
+
font-family: var(--rp-mono);
|
|
99
|
+
color: var(--rp-muted);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.rp-eyebrow span {
|
|
103
|
+
opacity: 0.5;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.rp-powered {
|
|
107
|
+
color: var(--rp-muted);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.rp-composer-row {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 8px;
|
|
114
|
+
margin: 0;
|
|
115
|
+
padding: 8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.rp-input {
|
|
119
|
+
flex: 1;
|
|
120
|
+
min-width: 0;
|
|
121
|
+
min-height: 48px;
|
|
122
|
+
padding: 0 8px;
|
|
123
|
+
border: 0;
|
|
124
|
+
outline: none;
|
|
125
|
+
background: transparent;
|
|
126
|
+
font-size: 15px !important;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.rp-input::placeholder {
|
|
130
|
+
color: var(--rp-muted);
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.rp-run {
|
|
135
|
+
display: grid;
|
|
136
|
+
place-items: center;
|
|
137
|
+
flex-shrink: 0;
|
|
138
|
+
width: 40px;
|
|
139
|
+
height: 40px;
|
|
140
|
+
border: 0;
|
|
141
|
+
border-radius: calc(var(--rp-radius) * 0.66);
|
|
142
|
+
background: var(--rp-accent);
|
|
143
|
+
color: var(--rp-accent-text) !important;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
transition: opacity 150ms ease;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.rp-run:disabled {
|
|
149
|
+
opacity: 0.35;
|
|
150
|
+
cursor: default;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.rp-examples {
|
|
154
|
+
display: grid;
|
|
155
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
156
|
+
align-items: baseline;
|
|
157
|
+
gap: 12px;
|
|
158
|
+
padding: 10px 14px;
|
|
159
|
+
border-top: 1px solid var(--rp-line);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.rp-example-list {
|
|
163
|
+
display: flex;
|
|
164
|
+
flex-wrap: wrap;
|
|
165
|
+
gap: 4px 16px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.rp-examples-label {
|
|
169
|
+
font-family: var(--rp-mono);
|
|
170
|
+
font-size: 11px;
|
|
171
|
+
color: var(--rp-muted);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.rp-example {
|
|
175
|
+
padding: 0;
|
|
176
|
+
border: 0;
|
|
177
|
+
background: none;
|
|
178
|
+
color: var(--rp-ink-2) !important;
|
|
179
|
+
font-size: 13px;
|
|
180
|
+
text-align: left;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
text-underline-offset: 4px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.rp-example:hover:not(:disabled) {
|
|
186
|
+
color: var(--rp-ink) !important;
|
|
187
|
+
text-decoration: underline;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.rp-example:disabled {
|
|
191
|
+
opacity: 0.5;
|
|
192
|
+
cursor: default;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* ── Results ──────────────────────────────────────────────────────────── */
|
|
196
|
+
|
|
197
|
+
.rp-results {
|
|
198
|
+
display: flex;
|
|
199
|
+
flex-direction: column;
|
|
200
|
+
gap: 12px;
|
|
201
|
+
margin-top: 12px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.rp-results:empty {
|
|
205
|
+
display: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.rp-note {
|
|
209
|
+
display: inline-flex;
|
|
210
|
+
align-items: flex-start;
|
|
211
|
+
gap: 8px;
|
|
212
|
+
align-self: flex-start;
|
|
213
|
+
margin: 0;
|
|
214
|
+
padding: 8px 14px;
|
|
215
|
+
border: 1px solid var(--rp-line);
|
|
216
|
+
border-radius: 999px;
|
|
217
|
+
background: var(--rp-surface);
|
|
218
|
+
color: var(--rp-muted);
|
|
219
|
+
font-size: 13px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.rp-note[data-tone='accent'] {
|
|
223
|
+
color: var(--rp-accent);
|
|
224
|
+
border-color: color-mix(in srgb, var(--rp-accent) 40%, var(--rp-line));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.rp-note-icon {
|
|
228
|
+
display: inline-flex;
|
|
229
|
+
flex-shrink: 0;
|
|
230
|
+
margin-top: 1px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.rp-issues {
|
|
234
|
+
display: flex;
|
|
235
|
+
flex-direction: column;
|
|
236
|
+
gap: 6px;
|
|
237
|
+
margin: 0;
|
|
238
|
+
padding: 14px 16px;
|
|
239
|
+
list-style: none;
|
|
240
|
+
border: 1px solid var(--rp-line);
|
|
241
|
+
border-radius: var(--rp-radius);
|
|
242
|
+
background: var(--rp-surface);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.rp-issues li {
|
|
246
|
+
display: flex;
|
|
247
|
+
align-items: flex-start;
|
|
248
|
+
gap: 8px;
|
|
249
|
+
color: var(--rp-ink-2);
|
|
250
|
+
font-size: 13px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.rp-issues svg {
|
|
254
|
+
flex-shrink: 0;
|
|
255
|
+
margin-top: 2px;
|
|
256
|
+
color: var(--rp-danger);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.rp-connect {
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-wrap: wrap;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: space-between;
|
|
264
|
+
gap: 12px;
|
|
265
|
+
padding: 14px 16px;
|
|
266
|
+
border: 1px solid var(--rp-line);
|
|
267
|
+
border-radius: var(--rp-radius);
|
|
268
|
+
background: var(--rp-surface);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.rp-connect p {
|
|
272
|
+
margin: 0;
|
|
273
|
+
color: var(--rp-ink-2);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.rp-connect .rp-button {
|
|
277
|
+
width: auto;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.rp-queue {
|
|
281
|
+
display: flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
gap: 12px;
|
|
284
|
+
font-size: 11px;
|
|
285
|
+
font-weight: 600;
|
|
286
|
+
text-transform: uppercase;
|
|
287
|
+
letter-spacing: 0.08em;
|
|
288
|
+
color: var(--rp-accent);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.rp-queue-track {
|
|
292
|
+
flex: 1;
|
|
293
|
+
height: 4px;
|
|
294
|
+
overflow: hidden;
|
|
295
|
+
border-radius: 999px;
|
|
296
|
+
background: var(--rp-line);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.rp-queue-track div {
|
|
300
|
+
height: 100%;
|
|
301
|
+
border-radius: inherit;
|
|
302
|
+
background: var(--rp-accent);
|
|
303
|
+
transition: width 300ms ease;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.rp-error {
|
|
307
|
+
display: flex;
|
|
308
|
+
flex-direction: column;
|
|
309
|
+
align-items: flex-start;
|
|
310
|
+
gap: 10px;
|
|
311
|
+
padding: 14px 16px;
|
|
312
|
+
border: 1px solid color-mix(in srgb, var(--rp-danger) 45%, var(--rp-line));
|
|
313
|
+
border-radius: var(--rp-radius);
|
|
314
|
+
background: color-mix(in srgb, var(--rp-danger) 8%, var(--rp-surface));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.rp-error p {
|
|
318
|
+
margin: 0;
|
|
319
|
+
color: var(--rp-danger);
|
|
320
|
+
font-size: 13px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* ── Cards ────────────────────────────────────────────────────────────── */
|
|
324
|
+
|
|
325
|
+
.rp-card {
|
|
326
|
+
overflow: hidden;
|
|
327
|
+
border: 1px solid var(--rp-line);
|
|
328
|
+
border-radius: var(--rp-radius);
|
|
329
|
+
background: var(--rp-surface);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.rp-card-head {
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
justify-content: space-between;
|
|
336
|
+
gap: 12px;
|
|
337
|
+
padding: 14px 18px;
|
|
338
|
+
border-bottom: 1px solid var(--rp-line);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.rp-overline {
|
|
342
|
+
font-size: 11px;
|
|
343
|
+
font-weight: 600;
|
|
344
|
+
text-transform: uppercase;
|
|
345
|
+
letter-spacing: 0.08em;
|
|
346
|
+
color: var(--rp-muted);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.rp-card-title {
|
|
350
|
+
margin-top: 2px;
|
|
351
|
+
font-size: 16px;
|
|
352
|
+
font-weight: 600;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.rp-card[data-state='good'] .rp-card-title {
|
|
356
|
+
color: var(--rp-success);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.rp-card[data-state='bad'] .rp-card-title {
|
|
360
|
+
color: var(--rp-danger);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.rp-badge {
|
|
364
|
+
display: inline-flex;
|
|
365
|
+
align-items: center;
|
|
366
|
+
gap: 6px;
|
|
367
|
+
padding: 4px 10px;
|
|
368
|
+
border: 1px solid color-mix(in srgb, var(--rp-accent) 40%, var(--rp-line));
|
|
369
|
+
border-radius: 999px;
|
|
370
|
+
color: var(--rp-accent);
|
|
371
|
+
font-family: var(--rp-mono);
|
|
372
|
+
font-size: 11px;
|
|
373
|
+
text-transform: uppercase;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.rp-badge svg {
|
|
377
|
+
width: 12px;
|
|
378
|
+
height: 12px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.rp-route {
|
|
382
|
+
display: grid;
|
|
383
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
384
|
+
align-items: center;
|
|
385
|
+
gap: 12px;
|
|
386
|
+
padding: 18px;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.rp-route-arrow {
|
|
390
|
+
display: grid;
|
|
391
|
+
place-items: center;
|
|
392
|
+
width: 36px;
|
|
393
|
+
height: 36px;
|
|
394
|
+
border: 1px solid var(--rp-line);
|
|
395
|
+
border-radius: 999px;
|
|
396
|
+
color: var(--rp-accent);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.rp-amount {
|
|
400
|
+
min-width: 0;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.rp-amount[data-align='end'] {
|
|
404
|
+
text-align: right;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.rp-amount-value {
|
|
408
|
+
margin-top: 4px;
|
|
409
|
+
overflow: hidden;
|
|
410
|
+
font-size: 20px;
|
|
411
|
+
font-weight: 600;
|
|
412
|
+
line-height: 1.2;
|
|
413
|
+
text-overflow: ellipsis;
|
|
414
|
+
white-space: nowrap;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.rp-amount-chain {
|
|
418
|
+
margin-top: 2px;
|
|
419
|
+
overflow: hidden;
|
|
420
|
+
color: var(--rp-ink-2);
|
|
421
|
+
font-size: 12.5px;
|
|
422
|
+
text-overflow: ellipsis;
|
|
423
|
+
white-space: nowrap;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.rp-meta {
|
|
427
|
+
display: grid;
|
|
428
|
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
429
|
+
gap: 10px;
|
|
430
|
+
margin: 0 18px 18px;
|
|
431
|
+
padding: 12px 14px;
|
|
432
|
+
border-radius: calc(var(--rp-radius) * 0.75);
|
|
433
|
+
background: var(--rp-sunken);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.rp-meta dt {
|
|
437
|
+
font-size: 10.5px;
|
|
438
|
+
font-weight: 600;
|
|
439
|
+
text-transform: uppercase;
|
|
440
|
+
letter-spacing: 0.08em;
|
|
441
|
+
color: var(--rp-muted);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.rp-meta dd {
|
|
445
|
+
margin: 2px 0 0;
|
|
446
|
+
font-size: 13px;
|
|
447
|
+
font-weight: 600;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.rp-meta dd[data-accent] {
|
|
451
|
+
color: var(--rp-accent);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.rp-fineprint {
|
|
455
|
+
margin: -6px 18px 14px;
|
|
456
|
+
color: var(--rp-muted);
|
|
457
|
+
font-size: 12.5px;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.rp-card-error {
|
|
461
|
+
margin: 0 18px 14px;
|
|
462
|
+
padding: 10px 12px;
|
|
463
|
+
border-radius: calc(var(--rp-radius) * 0.66);
|
|
464
|
+
background: color-mix(in srgb, var(--rp-danger) 10%, transparent);
|
|
465
|
+
color: var(--rp-danger);
|
|
466
|
+
font-size: 12.5px;
|
|
467
|
+
overflow-wrap: anywhere;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.rp-card-actions {
|
|
471
|
+
display: flex;
|
|
472
|
+
flex-direction: column;
|
|
473
|
+
align-items: center;
|
|
474
|
+
gap: 10px;
|
|
475
|
+
padding: 16px 18px;
|
|
476
|
+
border-top: 1px solid var(--rp-line);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/* ── Buttons and links ────────────────────────────────────────────────── */
|
|
480
|
+
|
|
481
|
+
.rp-button {
|
|
482
|
+
display: inline-flex;
|
|
483
|
+
align-items: center;
|
|
484
|
+
justify-content: center;
|
|
485
|
+
gap: 8px;
|
|
486
|
+
width: 100%;
|
|
487
|
+
padding: 12px 18px;
|
|
488
|
+
border: 1px solid var(--rp-accent);
|
|
489
|
+
border-radius: calc(var(--rp-radius) * 0.75);
|
|
490
|
+
background: var(--rp-accent);
|
|
491
|
+
color: var(--rp-accent-text) !important;
|
|
492
|
+
font-size: 15px;
|
|
493
|
+
font-weight: 600;
|
|
494
|
+
cursor: pointer;
|
|
495
|
+
transition: opacity 150ms ease;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.rp-button:disabled {
|
|
499
|
+
opacity: 0.6;
|
|
500
|
+
cursor: default;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.rp-button-quiet {
|
|
504
|
+
width: auto;
|
|
505
|
+
padding: 8px 14px;
|
|
506
|
+
border-color: var(--rp-line);
|
|
507
|
+
background: transparent;
|
|
508
|
+
color: var(--rp-ink) !important;
|
|
509
|
+
font-size: 13px;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.rp-link {
|
|
513
|
+
display: inline-flex;
|
|
514
|
+
align-items: center;
|
|
515
|
+
gap: 4px;
|
|
516
|
+
padding: 0;
|
|
517
|
+
border: 0;
|
|
518
|
+
background: none;
|
|
519
|
+
color: var(--rp-muted) !important;
|
|
520
|
+
font-size: 12.5px;
|
|
521
|
+
font-weight: 600;
|
|
522
|
+
text-decoration: none;
|
|
523
|
+
cursor: pointer;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.rp-link:hover {
|
|
527
|
+
color: var(--rp-accent) !important;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/* ── Order progress ───────────────────────────────────────────────────── */
|
|
531
|
+
|
|
532
|
+
.rp-steps {
|
|
533
|
+
display: grid;
|
|
534
|
+
grid-template-columns: repeat(5, 1fr);
|
|
535
|
+
margin: 0;
|
|
536
|
+
padding: 18px 12px;
|
|
537
|
+
list-style: none;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.rp-steps li {
|
|
541
|
+
position: relative;
|
|
542
|
+
display: flex;
|
|
543
|
+
flex-direction: column;
|
|
544
|
+
align-items: center;
|
|
545
|
+
gap: 8px;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/* The connector from the previous step. */
|
|
549
|
+
.rp-steps li + li::before {
|
|
550
|
+
content: '';
|
|
551
|
+
position: absolute;
|
|
552
|
+
top: 13px;
|
|
553
|
+
right: 50%;
|
|
554
|
+
width: 100%;
|
|
555
|
+
height: 2px;
|
|
556
|
+
background: var(--rp-line);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.rp-steps li[data-state='done']::before,
|
|
560
|
+
.rp-steps li[data-state='current']::before {
|
|
561
|
+
background: var(--rp-accent);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.rp-step-dot {
|
|
565
|
+
position: relative;
|
|
566
|
+
z-index: 1;
|
|
567
|
+
display: grid;
|
|
568
|
+
place-items: center;
|
|
569
|
+
width: 28px;
|
|
570
|
+
height: 28px;
|
|
571
|
+
border: 1px solid var(--rp-line);
|
|
572
|
+
border-radius: 999px;
|
|
573
|
+
background: var(--rp-sunken);
|
|
574
|
+
color: var(--rp-muted);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.rp-step-dot svg {
|
|
578
|
+
width: 13px;
|
|
579
|
+
height: 13px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.rp-steps li[data-state='done'] .rp-step-dot {
|
|
583
|
+
border-color: var(--rp-accent);
|
|
584
|
+
background: var(--rp-accent);
|
|
585
|
+
color: var(--rp-accent-text);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.rp-steps li[data-state='current'] .rp-step-dot {
|
|
589
|
+
border-color: var(--rp-accent);
|
|
590
|
+
color: var(--rp-accent);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.rp-steps li[data-state='bad'] .rp-step-dot {
|
|
594
|
+
border-color: var(--rp-danger);
|
|
595
|
+
color: var(--rp-danger);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.rp-step-label {
|
|
599
|
+
color: var(--rp-muted);
|
|
600
|
+
font-size: 11px;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.rp-steps li[data-state='current'] .rp-step-label {
|
|
604
|
+
color: var(--rp-ink);
|
|
605
|
+
font-weight: 600;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/* ── Motion ───────────────────────────────────────────────────────────── */
|
|
609
|
+
|
|
610
|
+
.rp-spin {
|
|
611
|
+
animation: rp-spin 0.9s linear infinite;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
@keyframes rp-spin {
|
|
615
|
+
to {
|
|
616
|
+
transform: rotate(360deg);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
@media (prefers-reduced-motion: reduce) {
|
|
621
|
+
.rp-spin {
|
|
622
|
+
animation-duration: 2.5s;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.rp-root * {
|
|
626
|
+
transition: none !important;
|
|
627
|
+
}
|
|
628
|
+
}
|
package/dist/wagmi.cjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/wagmi.ts
|
|
21
|
+
var wagmi_exports = {};
|
|
22
|
+
__export(wagmi_exports, {
|
|
23
|
+
useWagmiIntentWallet: () => useWagmiIntentWallet
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(wagmi_exports);
|
|
26
|
+
var import_intent_core = require("@recoilpay/intent-core");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_wagmi = require("wagmi");
|
|
29
|
+
function useWagmiIntentWallet() {
|
|
30
|
+
const { data: walletClient } = (0, import_wagmi.useWalletClient)();
|
|
31
|
+
return (0, import_react.useMemo)(() => walletClient?.account ? (0, import_intent_core.viemWallet)(walletClient) : null, [walletClient]);
|
|
32
|
+
}
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
useWagmiIntentWallet
|
|
36
|
+
});
|
package/dist/wagmi.d.cts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IntentWallet } from '@recoilpay/intent-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The connected wagmi wallet as an `IntentWallet`, or null when disconnected.
|
|
5
|
+
* Import from `@recoilpay/intent-react/wagmi` so apps without wagmi never
|
|
6
|
+
* load it.
|
|
7
|
+
*
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const wallet = useWagmiIntentWallet();
|
|
10
|
+
* <RecoilIntent wallet={wallet} onConnectWallet={openConnectModal} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
declare function useWagmiIntentWallet(): IntentWallet | null;
|
|
14
|
+
|
|
15
|
+
export { useWagmiIntentWallet };
|
package/dist/wagmi.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IntentWallet } from '@recoilpay/intent-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The connected wagmi wallet as an `IntentWallet`, or null when disconnected.
|
|
5
|
+
* Import from `@recoilpay/intent-react/wagmi` so apps without wagmi never
|
|
6
|
+
* load it.
|
|
7
|
+
*
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const wallet = useWagmiIntentWallet();
|
|
10
|
+
* <RecoilIntent wallet={wallet} onConnectWallet={openConnectModal} />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
declare function useWagmiIntentWallet(): IntentWallet | null;
|
|
14
|
+
|
|
15
|
+
export { useWagmiIntentWallet };
|
package/dist/wagmi.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/wagmi.ts
|
|
2
|
+
import { viemWallet } from "@recoilpay/intent-core";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { useWalletClient } from "wagmi";
|
|
5
|
+
function useWagmiIntentWallet() {
|
|
6
|
+
const { data: walletClient } = useWalletClient();
|
|
7
|
+
return useMemo(() => walletClient?.account ? viemWallet(walletClient) : null, [walletClient]);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
useWagmiIntentWallet
|
|
11
|
+
};
|