@pollar/react 0.6.0 → 0.7.1
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 +202 -20
- package/dist/index.css +257 -59
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +58 -8
- package/dist/index.d.ts +58 -8
- package/dist/index.js +650 -164
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +648 -166
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# @pollar/react
|
|
2
2
|
|
|
3
|
-
React bindings for [Pollar](https://pollar.xyz) — drop-in authentication UI and hooks for
|
|
3
|
+
React bindings for [Pollar](https://pollar.xyz) — drop-in authentication UI, transaction modals, and hooks for
|
|
4
|
+
Stellar-based applications.
|
|
5
|
+
|
|
6
|
+
> **0.7.0 is a breaking change.** The context's session is now `PollarPersistedSession | null` and PII has moved to
|
|
7
|
+
> `client.getUserProfile()`. Read the [CHANGELOG](../../CHANGELOG.md) before upgrading.
|
|
4
8
|
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
@@ -12,7 +16,7 @@ pnpm add @pollar/react @pollar/core
|
|
|
12
16
|
yarn add @pollar/react @pollar/core
|
|
13
17
|
```
|
|
14
18
|
|
|
15
|
-
**Peer dependencies:** `react >= 18`, `react-dom >= 18
|
|
19
|
+
**Peer dependencies:** `react >= 18`, `react-dom >= 18`. Node ≥ 20 in toolchains.
|
|
16
20
|
|
|
17
21
|
## Quick Start
|
|
18
22
|
|
|
@@ -35,7 +39,7 @@ export default function App({ children }: { children: React.ReactNode }) {
|
|
|
35
39
|
import { usePollar } from '@pollar/react';
|
|
36
40
|
|
|
37
41
|
export function Profile() {
|
|
38
|
-
const { isAuthenticated,
|
|
42
|
+
const { isAuthenticated, walletAddress, login, logout, getClient } = usePollar();
|
|
39
43
|
|
|
40
44
|
if (!isAuthenticated) {
|
|
41
45
|
return (
|
|
@@ -45,9 +49,13 @@ export function Profile() {
|
|
|
45
49
|
);
|
|
46
50
|
}
|
|
47
51
|
|
|
52
|
+
// PII (email, name, avatar, providers) lives in memory only — fetch it from the client.
|
|
53
|
+
const profile = getClient().getUserProfile();
|
|
54
|
+
|
|
48
55
|
return (
|
|
49
56
|
<div>
|
|
50
|
-
<p>Wallet: {
|
|
57
|
+
<p>Wallet: {walletAddress}</p>
|
|
58
|
+
<p>Email: {profile?.mail}</p>
|
|
51
59
|
<button onClick={logout}>Sign out</button>
|
|
52
60
|
</div>
|
|
53
61
|
);
|
|
@@ -64,34 +72,94 @@ Context provider that initialises the Pollar client and makes it available to ch
|
|
|
64
72
|
<PollarProvider
|
|
65
73
|
config={{
|
|
66
74
|
apiKey: 'your-api-key',
|
|
67
|
-
baseUrl: 'https://sdk.api.pollar.xyz',
|
|
68
|
-
stellarNetwork: 'testnet',
|
|
75
|
+
baseUrl: 'https://sdk.api.pollar.xyz', // optional
|
|
76
|
+
stellarNetwork: 'testnet', // optional, default: 'testnet'
|
|
77
|
+
// 0.7.0 options threaded straight through to PollarClient:
|
|
78
|
+
storage, // optional, RN apps inject this
|
|
79
|
+
keyManager, // optional, autodetects on web
|
|
80
|
+
walletAdapter, // optional, external wallet stack
|
|
81
|
+
deviceLabel: 'iPhone — Safari', // optional, shown in SessionsModal
|
|
82
|
+
onStorageDegrade, // optional, telemetry hook
|
|
69
83
|
}}
|
|
84
|
+
styles={{ /* optional style overrides */ }}
|
|
85
|
+
adapters={{ /* optional named adapter set */ }}
|
|
70
86
|
>
|
|
71
87
|
{children}
|
|
72
88
|
</PollarProvider>
|
|
73
89
|
```
|
|
74
90
|
|
|
75
|
-
| Prop
|
|
76
|
-
|
|
|
77
|
-
| `config`
|
|
91
|
+
| Prop | Type | Required | Description |
|
|
92
|
+
| ---------- | ------------------- | -------- | -------------------------------------------------------------------------- |
|
|
93
|
+
| `config` | `PollarClientConfig`| Yes | Configuration passed verbatim to `PollarClient` |
|
|
94
|
+
| `styles` | `PollarStyles` | No | Per-app style overrides; merged on top of `appConfig.styles` from the API |
|
|
95
|
+
| `adapters` | `PollarAdapters` | No | Named set of `PollarAdapter` objects (e.g. Trustless Work). See below |
|
|
78
96
|
|
|
79
97
|
---
|
|
80
98
|
|
|
81
99
|
### `usePollar()`
|
|
82
100
|
|
|
83
|
-
Returns the
|
|
101
|
+
Returns the full Pollar context. Every modal opener returned here renders an already-wired modal — no extra mounting
|
|
102
|
+
needed.
|
|
84
103
|
|
|
85
104
|
```ts
|
|
86
105
|
const {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
// Session
|
|
107
|
+
isAuthenticated, // boolean — true when a wallet public key is present
|
|
108
|
+
walletAddress, // string — '' until authenticated
|
|
109
|
+
walletType, // WalletId | null
|
|
110
|
+
|
|
111
|
+
// Client escape hatch
|
|
112
|
+
getClient, // () => PollarClient — for getUserProfile(), listSessions(), …
|
|
113
|
+
|
|
114
|
+
// Auth
|
|
115
|
+
login, // (options: PollarLoginOptions) => void
|
|
116
|
+
logout, // () => void (fire-and-forget; await getClient().logout() if you need the promise)
|
|
117
|
+
openLoginModal, // () => void
|
|
118
|
+
|
|
119
|
+
// Sessions (new in 0.7.0)
|
|
120
|
+
openSessionsModal, // () => void
|
|
121
|
+
|
|
122
|
+
// Transactions
|
|
123
|
+
tx, // TransactionState
|
|
124
|
+
buildTx, // (operation, params, options?) => Promise<void>
|
|
125
|
+
signAndSubmitTx, // (unsignedXdr: string) => Promise<void>
|
|
126
|
+
openTxModal, // () => void
|
|
127
|
+
|
|
128
|
+
// Transaction history
|
|
129
|
+
txHistory, // TxHistoryState
|
|
130
|
+
openTxHistoryModal, // () => void
|
|
131
|
+
|
|
132
|
+
// Wallet balance
|
|
133
|
+
walletBalance, // WalletBalanceState
|
|
134
|
+
refreshWalletBalance, // () => Promise<void>
|
|
135
|
+
openWalletBalanceModal, // () => void
|
|
136
|
+
|
|
137
|
+
// Send / Receive
|
|
138
|
+
openSendModal, // () => void
|
|
139
|
+
openReceiveModal, // () => void
|
|
140
|
+
|
|
141
|
+
// Network
|
|
142
|
+
network, // StellarNetwork — 'mainnet' | 'testnet'
|
|
143
|
+
setNetwork, // (network: StellarNetwork) => void
|
|
144
|
+
|
|
145
|
+
// KYC (UI ready — backend coming soon)
|
|
146
|
+
openKycModal, // (options?: { country?, level?, onApproved? }) => void
|
|
147
|
+
|
|
148
|
+
// Ramp (UI ready — backend coming soon)
|
|
149
|
+
openRampModal, // () => void
|
|
150
|
+
|
|
151
|
+
// App config / styles served by the Pollar API
|
|
152
|
+
appConfig, // PollarConfig
|
|
153
|
+
styles, // PollarStyles
|
|
154
|
+
|
|
155
|
+
// Adapters (from PollarProvider props)
|
|
156
|
+
adapters, // PollarAdapters | undefined
|
|
92
157
|
} = usePollar();
|
|
93
158
|
```
|
|
94
159
|
|
|
160
|
+
> **0.6.0 renames** — `transaction` → `tx`, `openTransactionModal` → `openTxModal`, `config` → `appConfig`,
|
|
161
|
+
> `openRampWidget` → `openRampModal`, `refreshBalance` → `refreshWalletBalance`. Existing code on 0.5.x must update.
|
|
162
|
+
|
|
95
163
|
#### Login options
|
|
96
164
|
|
|
97
165
|
```ts
|
|
@@ -102,17 +170,33 @@ login({ provider: 'github' });
|
|
|
102
170
|
// Email OTP
|
|
103
171
|
login({ provider: 'email', email: 'user@example.com' });
|
|
104
172
|
|
|
105
|
-
// Stellar wallet
|
|
173
|
+
// Built-in Stellar wallet adapters
|
|
106
174
|
import { WalletType } from '@pollar/core';
|
|
107
175
|
login({ provider: 'wallet', type: WalletType.FREIGHTER });
|
|
108
176
|
login({ provider: 'wallet', type: WalletType.ALBEDO });
|
|
177
|
+
|
|
178
|
+
// Any external adapter (e.g. Stellar Wallets Kit) when `walletAdapter` is set on config
|
|
179
|
+
login({ provider: 'wallet', type: 'xbull' });
|
|
180
|
+
login({ provider: 'wallet', type: 'lobstr' });
|
|
109
181
|
```
|
|
110
182
|
|
|
111
183
|
---
|
|
112
184
|
|
|
113
|
-
###
|
|
185
|
+
### Components
|
|
186
|
+
|
|
187
|
+
Every modal mounts itself when its `openXModal()` action is called. You don't need to render these directly — they're
|
|
188
|
+
already wired inside `<PollarProvider>` — but they're exported in case you want to mount them yourself.
|
|
114
189
|
|
|
115
|
-
|
|
190
|
+
| Component | Purpose |
|
|
191
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
192
|
+
| `<WalletButton>` | Drop-in button. Opens login when signed out; signed in, shows the wallet address with a dropdown (Send, Receive, balance, history, sign out). Inline arc spinner during in-progress transactions |
|
|
193
|
+
| `<SendModal>` | Full send flow: asset picker, amount, destination, inline build → sign → success/error |
|
|
194
|
+
| `<ReceiveModal>` | Wallet address as QR code with copy-to-clipboard (no external QR dependency required) |
|
|
195
|
+
| `<TxHistoryModal>` | Paginated transaction history with auto-fetch on open and stellar.expert explorer links |
|
|
196
|
+
| `<WalletBalanceModal>` | Stellar account balances with refresh button |
|
|
197
|
+
| `<SessionsModal>` | **New in 0.7.0.** Lists every active refresh-token family for the current user with device metadata, marks the local session, per-row revoke, and a "Sign out everywhere" button |
|
|
198
|
+
| `<KycModal>` | Identity verification flow — provider selection + status polling *(UI preview — backend coming soon)* |
|
|
199
|
+
| `<RampWidget>` | Buy/sell crypto — direction tabs, route comparison, payment instructions *(UI preview — backend coming soon)* |
|
|
116
200
|
|
|
117
201
|
```tsx
|
|
118
202
|
import { WalletButton } from '@pollar/react';
|
|
@@ -122,7 +206,89 @@ export function Header() {
|
|
|
122
206
|
}
|
|
123
207
|
```
|
|
124
208
|
|
|
125
|
-
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### Template components
|
|
212
|
+
|
|
213
|
+
Every modal ships a pure presentational "template" companion — same name with a `Template` suffix. Use these when you
|
|
214
|
+
want to swap the chrome but keep the data wiring from `usePollar()`.
|
|
215
|
+
|
|
216
|
+
| Wrapper | Template |
|
|
217
|
+
| ---------------------- | ------------------------------ |
|
|
218
|
+
| `<WalletButton>` | `<WalletButtonTemplate>` |
|
|
219
|
+
| *(internal LoginModal)*| `<LoginModalTemplate>` |
|
|
220
|
+
| `<SendModal>` | `<SendModalTemplate>` |
|
|
221
|
+
| `<ReceiveModal>` | `<ReceiveModalTemplate>` |
|
|
222
|
+
| `<TransactionModal>` | `<TransactionModalTemplate>` |
|
|
223
|
+
| `<TxHistoryModal>` | `<TxHistoryModalTemplate>` |
|
|
224
|
+
| `<WalletBalanceModal>` | `<WalletBalanceModalTemplate>` |
|
|
225
|
+
| `<KycModal>` | `<KycModalTemplate>` |
|
|
226
|
+
| `<RampWidget>` | `<RampWidgetTemplate>` |
|
|
227
|
+
| `<SessionsModal>` | `<SessionsModalTemplate>` |
|
|
228
|
+
|
|
229
|
+
`<TxStatusView>` is the shared status component (build → sign → success/error) reused by `TransactionModal` and
|
|
230
|
+
`SendModal`; it's exported on its own for consumers that want to embed the lifecycle elsewhere.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### Custom adapters
|
|
235
|
+
|
|
236
|
+
The `adapters` prop on `<PollarProvider>` accepts any named set of `PollarAdapter` objects. Each adapter function
|
|
237
|
+
receives params, returns an unsigned XDR, and Pollar handles signing and submission automatically.
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
import type { PollarAdapter } from '@pollar/core';
|
|
241
|
+
|
|
242
|
+
const trustlessWork: PollarAdapter = {
|
|
243
|
+
initialize: async (params) => ({ unsignedTransaction: '…' }),
|
|
244
|
+
release: async (params) => ({ unsignedTransaction: '…' }),
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
<PollarProvider config={{ apiKey }} adapters={{ trustlessWork }}>
|
|
248
|
+
…
|
|
249
|
+
</PollarProvider>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
> **Renamed in 0.7.0** — `EscrowFn` → `AdapterFn` and `EscrowAdapter` → `PollarAdapter`. Runtime contract is
|
|
253
|
+
> unchanged; rename your imports.
|
|
254
|
+
|
|
255
|
+
#### `createPollarAdapterHook(key)`
|
|
256
|
+
|
|
257
|
+
Factory that generates a fully-typed hook mirroring an adapter's API with automatic XDR signing built in:
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
import { createPollarAdapterHook } from '@pollar/react';
|
|
261
|
+
|
|
262
|
+
const useTrustlessWork = createPollarAdapterHook<typeof trustlessWork>('trustlessWork');
|
|
263
|
+
|
|
264
|
+
function MyComponent() {
|
|
265
|
+
const tw = useTrustlessWork();
|
|
266
|
+
await tw.initialize({ /* … */ }); // unsigned XDR is built, signed, and submitted automatically
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### External wallet stacks (Stellar Wallets Kit, …)
|
|
273
|
+
|
|
274
|
+
Pass a `WalletAdapterResolver` to `config.walletAdapter` so Pollar can reach wallets that live outside `@pollar/core`:
|
|
275
|
+
|
|
276
|
+
```tsx
|
|
277
|
+
import { PollarProvider } from '@pollar/react';
|
|
278
|
+
import { stellarWalletsKit } from '@pollar/stellar-wallets-kit-adapter';
|
|
279
|
+
import { Networks } from '@creit.tech/stellar-wallets-kit';
|
|
280
|
+
|
|
281
|
+
<PollarProvider
|
|
282
|
+
config={{
|
|
283
|
+
apiKey: 'your-api-key',
|
|
284
|
+
walletAdapter: stellarWalletsKit({ network: Networks.PUBLIC }),
|
|
285
|
+
}}
|
|
286
|
+
>
|
|
287
|
+
{children}
|
|
288
|
+
</PollarProvider>
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Then any `login({ provider: 'wallet', type: '<kit wallet id>' })` is routed through the kit.
|
|
126
292
|
|
|
127
293
|
---
|
|
128
294
|
|
|
@@ -150,11 +316,27 @@ import type {
|
|
|
150
316
|
AuthModalProps,
|
|
151
317
|
PollarConfig,
|
|
152
318
|
PollarStyles,
|
|
319
|
+
|
|
320
|
+
// Template props
|
|
321
|
+
SendModalTemplateProps,
|
|
322
|
+
ReceiveModalTemplateProps,
|
|
323
|
+
TransactionModalTemplateProps,
|
|
324
|
+
TxStatusViewProps,
|
|
325
|
+
WalletBalanceModalTemplateProps,
|
|
326
|
+
SessionsModalTemplateProps,
|
|
327
|
+
SessionsState,
|
|
328
|
+
|
|
329
|
+
// Step unions
|
|
330
|
+
KycStep,
|
|
331
|
+
RampStep,
|
|
153
332
|
} from '@pollar/react';
|
|
154
333
|
```
|
|
155
334
|
|
|
335
|
+
The state types (`TransactionState`, `TxHistoryState`, `WalletBalanceState`, `NetworkState`, `AuthState`,
|
|
336
|
+
`PollarPersistedSession`, `PollarUserProfile`, `SessionInfo`, …) are re-exported from `@pollar/core`.
|
|
337
|
+
|
|
156
338
|
---
|
|
157
339
|
|
|
158
340
|
## License
|
|
159
341
|
|
|
160
|
-
MIT
|
|
342
|
+
MIT
|
package/dist/index.css
CHANGED
|
@@ -270,6 +270,97 @@
|
|
|
270
270
|
animation: pollar-spin 1s linear infinite;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
+
/* src/components/distribution-rules-modal/DistributionRulesModal.css */
|
|
274
|
+
.pollar-dist-modal {
|
|
275
|
+
max-width: 460px;
|
|
276
|
+
}
|
|
277
|
+
.pollar-dist-list {
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
gap: 0.625rem;
|
|
281
|
+
max-height: 420px;
|
|
282
|
+
overflow-y: auto;
|
|
283
|
+
margin-bottom: 1rem;
|
|
284
|
+
}
|
|
285
|
+
.pollar-dist-item {
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
gap: 0.375rem;
|
|
289
|
+
background: var(--pollar-input-bg);
|
|
290
|
+
border: 1px solid var(--pollar-border);
|
|
291
|
+
border-radius: var(--pollar-card-border-radius, 10px);
|
|
292
|
+
padding: 0.875rem 1rem;
|
|
293
|
+
}
|
|
294
|
+
.pollar-dist-item[data-claimable=false] {
|
|
295
|
+
opacity: 0.7;
|
|
296
|
+
}
|
|
297
|
+
.pollar-dist-item-row {
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: baseline;
|
|
300
|
+
justify-content: space-between;
|
|
301
|
+
gap: 0.75rem;
|
|
302
|
+
}
|
|
303
|
+
.pollar-dist-item-name {
|
|
304
|
+
font-size: 0.9375rem;
|
|
305
|
+
font-weight: 600;
|
|
306
|
+
color: var(--pollar-text);
|
|
307
|
+
overflow: hidden;
|
|
308
|
+
text-overflow: ellipsis;
|
|
309
|
+
white-space: nowrap;
|
|
310
|
+
}
|
|
311
|
+
.pollar-dist-item-amount {
|
|
312
|
+
font-size: 0.9375rem;
|
|
313
|
+
font-weight: 700;
|
|
314
|
+
color: var(--pollar-text);
|
|
315
|
+
font-variant-numeric: tabular-nums;
|
|
316
|
+
white-space: nowrap;
|
|
317
|
+
}
|
|
318
|
+
.pollar-dist-item-asset {
|
|
319
|
+
font-size: 0.75rem;
|
|
320
|
+
color: var(--pollar-muted);
|
|
321
|
+
font-weight: 600;
|
|
322
|
+
margin-left: 2px;
|
|
323
|
+
}
|
|
324
|
+
.pollar-dist-item-meta {
|
|
325
|
+
font-size: 0.75rem;
|
|
326
|
+
color: var(--pollar-muted);
|
|
327
|
+
display: flex;
|
|
328
|
+
gap: 0.375rem;
|
|
329
|
+
flex-wrap: wrap;
|
|
330
|
+
}
|
|
331
|
+
.pollar-dist-item-action {
|
|
332
|
+
margin-top: 0.375rem;
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
justify-content: flex-end;
|
|
336
|
+
}
|
|
337
|
+
.pollar-dist-claim-btn {
|
|
338
|
+
flex: 0 0 auto;
|
|
339
|
+
height: 32px;
|
|
340
|
+
padding: 0 0.875rem;
|
|
341
|
+
font-size: 0.8125rem;
|
|
342
|
+
}
|
|
343
|
+
.pollar-dist-item-status {
|
|
344
|
+
font-size: 0.75rem;
|
|
345
|
+
font-weight: 600;
|
|
346
|
+
padding: 4px 10px;
|
|
347
|
+
border-radius: 999px;
|
|
348
|
+
text-transform: uppercase;
|
|
349
|
+
letter-spacing: 0.04em;
|
|
350
|
+
}
|
|
351
|
+
.pollar-dist-item-status[data-kind=claimed] {
|
|
352
|
+
background: rgba(22, 163, 74, 0.12);
|
|
353
|
+
color: var(--pollar-success-text, #16a34a);
|
|
354
|
+
}
|
|
355
|
+
.pollar-dist-item-status[data-kind=unavailable] {
|
|
356
|
+
background: rgba(107, 114, 128, 0.12);
|
|
357
|
+
color: var(--pollar-muted);
|
|
358
|
+
}
|
|
359
|
+
.pollar-dist-item-error {
|
|
360
|
+
font-size: 0.75rem;
|
|
361
|
+
color: var(--pollar-error-text, #dc2626);
|
|
362
|
+
}
|
|
363
|
+
|
|
273
364
|
/* src/components/kyc-modal/KycModal.css */
|
|
274
365
|
.pollar-kyc-badge {
|
|
275
366
|
display: inline-flex;
|
|
@@ -864,65 +955,6 @@
|
|
|
864
955
|
cursor: not-allowed;
|
|
865
956
|
}
|
|
866
957
|
|
|
867
|
-
/* src/components/receive-modal/ReceiveModal.css */
|
|
868
|
-
.pollar-receive-modal {
|
|
869
|
-
max-width: 380px;
|
|
870
|
-
}
|
|
871
|
-
.pollar-receive-qr {
|
|
872
|
-
display: flex;
|
|
873
|
-
align-items: center;
|
|
874
|
-
justify-content: center;
|
|
875
|
-
padding: 1.25rem;
|
|
876
|
-
margin-bottom: 1rem;
|
|
877
|
-
background: var(--pollar-input-bg);
|
|
878
|
-
border: 1px solid var(--pollar-border);
|
|
879
|
-
border-radius: var(--pollar-card-border-radius, 10px);
|
|
880
|
-
}
|
|
881
|
-
.pollar-receive-instructions {
|
|
882
|
-
font-size: 0.8125rem;
|
|
883
|
-
color: var(--pollar-muted);
|
|
884
|
-
text-align: center;
|
|
885
|
-
margin: 0 0 1rem;
|
|
886
|
-
line-height: 1.5;
|
|
887
|
-
}
|
|
888
|
-
.pollar-receive-address-row {
|
|
889
|
-
display: flex;
|
|
890
|
-
align-items: center;
|
|
891
|
-
gap: 0.625rem;
|
|
892
|
-
background: var(--pollar-input-bg);
|
|
893
|
-
border: 1px solid var(--pollar-border);
|
|
894
|
-
border-radius: var(--pollar-card-border-radius, 10px);
|
|
895
|
-
padding: 0.625rem 0.875rem;
|
|
896
|
-
margin-bottom: 1rem;
|
|
897
|
-
}
|
|
898
|
-
.pollar-receive-address {
|
|
899
|
-
flex: 1;
|
|
900
|
-
font-size: 0.75rem;
|
|
901
|
-
font-family: monospace;
|
|
902
|
-
color: var(--pollar-text);
|
|
903
|
-
word-break: break-all;
|
|
904
|
-
line-height: 1.5;
|
|
905
|
-
}
|
|
906
|
-
.pollar-receive-copy-btn {
|
|
907
|
-
display: inline-flex;
|
|
908
|
-
align-items: center;
|
|
909
|
-
gap: 0.375rem;
|
|
910
|
-
flex-shrink: 0;
|
|
911
|
-
padding: 0.375rem 0.75rem;
|
|
912
|
-
border-radius: var(--pollar-buttons-border-radius, 6px);
|
|
913
|
-
border: 1px solid var(--pollar-border);
|
|
914
|
-
background: none;
|
|
915
|
-
font-size: 0.75rem;
|
|
916
|
-
font-weight: 500;
|
|
917
|
-
color: var(--pollar-muted);
|
|
918
|
-
cursor: pointer;
|
|
919
|
-
transition: color 150ms, background 150ms;
|
|
920
|
-
}
|
|
921
|
-
.pollar-receive-copy-btn:hover {
|
|
922
|
-
color: var(--pollar-text);
|
|
923
|
-
background: var(--pollar-border);
|
|
924
|
-
}
|
|
925
|
-
|
|
926
958
|
/* src/components/ramp-widget/RampWidget.css */
|
|
927
959
|
.pollar-ramp-modal {
|
|
928
960
|
max-width: 480px;
|
|
@@ -1154,6 +1186,65 @@
|
|
|
1154
1186
|
margin: 0;
|
|
1155
1187
|
}
|
|
1156
1188
|
|
|
1189
|
+
/* src/components/receive-modal/ReceiveModal.css */
|
|
1190
|
+
.pollar-receive-modal {
|
|
1191
|
+
max-width: 380px;
|
|
1192
|
+
}
|
|
1193
|
+
.pollar-receive-qr {
|
|
1194
|
+
display: flex;
|
|
1195
|
+
align-items: center;
|
|
1196
|
+
justify-content: center;
|
|
1197
|
+
padding: 1.25rem;
|
|
1198
|
+
margin-bottom: 1rem;
|
|
1199
|
+
background: var(--pollar-input-bg);
|
|
1200
|
+
border: 1px solid var(--pollar-border);
|
|
1201
|
+
border-radius: var(--pollar-card-border-radius, 10px);
|
|
1202
|
+
}
|
|
1203
|
+
.pollar-receive-instructions {
|
|
1204
|
+
font-size: 0.8125rem;
|
|
1205
|
+
color: var(--pollar-muted);
|
|
1206
|
+
text-align: center;
|
|
1207
|
+
margin: 0 0 1rem;
|
|
1208
|
+
line-height: 1.5;
|
|
1209
|
+
}
|
|
1210
|
+
.pollar-receive-address-row {
|
|
1211
|
+
display: flex;
|
|
1212
|
+
align-items: center;
|
|
1213
|
+
gap: 0.625rem;
|
|
1214
|
+
background: var(--pollar-input-bg);
|
|
1215
|
+
border: 1px solid var(--pollar-border);
|
|
1216
|
+
border-radius: var(--pollar-card-border-radius, 10px);
|
|
1217
|
+
padding: 0.625rem 0.875rem;
|
|
1218
|
+
margin-bottom: 1rem;
|
|
1219
|
+
}
|
|
1220
|
+
.pollar-receive-address {
|
|
1221
|
+
flex: 1;
|
|
1222
|
+
font-size: 0.75rem;
|
|
1223
|
+
font-family: monospace;
|
|
1224
|
+
color: var(--pollar-text);
|
|
1225
|
+
word-break: break-all;
|
|
1226
|
+
line-height: 1.5;
|
|
1227
|
+
}
|
|
1228
|
+
.pollar-receive-copy-btn {
|
|
1229
|
+
display: inline-flex;
|
|
1230
|
+
align-items: center;
|
|
1231
|
+
gap: 0.375rem;
|
|
1232
|
+
flex-shrink: 0;
|
|
1233
|
+
padding: 0.375rem 0.75rem;
|
|
1234
|
+
border-radius: var(--pollar-buttons-border-radius, 6px);
|
|
1235
|
+
border: 1px solid var(--pollar-border);
|
|
1236
|
+
background: none;
|
|
1237
|
+
font-size: 0.75rem;
|
|
1238
|
+
font-weight: 500;
|
|
1239
|
+
color: var(--pollar-muted);
|
|
1240
|
+
cursor: pointer;
|
|
1241
|
+
transition: color 150ms, background 150ms;
|
|
1242
|
+
}
|
|
1243
|
+
.pollar-receive-copy-btn:hover {
|
|
1244
|
+
color: var(--pollar-text);
|
|
1245
|
+
background: var(--pollar-border);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1157
1248
|
/* src/components/transaction-modal/TransactionModal.css */
|
|
1158
1249
|
.pollar-tx-modal {
|
|
1159
1250
|
max-width: 420px;
|
|
@@ -1443,6 +1534,113 @@
|
|
|
1443
1534
|
animation: pollar-pulse 1.4s ease-in-out infinite;
|
|
1444
1535
|
}
|
|
1445
1536
|
|
|
1537
|
+
/* src/components/sessions-modal/SessionsModal.css */
|
|
1538
|
+
.pollar-sessions-modal {
|
|
1539
|
+
max-width: 480px;
|
|
1540
|
+
}
|
|
1541
|
+
.pollar-sessions-list {
|
|
1542
|
+
display: flex;
|
|
1543
|
+
flex-direction: column;
|
|
1544
|
+
gap: 0.625rem;
|
|
1545
|
+
max-height: 380px;
|
|
1546
|
+
overflow-y: auto;
|
|
1547
|
+
margin-bottom: 1rem;
|
|
1548
|
+
}
|
|
1549
|
+
.pollar-sessions-item {
|
|
1550
|
+
display: grid;
|
|
1551
|
+
grid-template-columns: 1fr auto;
|
|
1552
|
+
grid-template-rows: auto auto;
|
|
1553
|
+
column-gap: 0.75rem;
|
|
1554
|
+
row-gap: 0.125rem;
|
|
1555
|
+
background: var(--pollar-input-bg);
|
|
1556
|
+
border: 1px solid var(--pollar-border);
|
|
1557
|
+
border-radius: var(--pollar-card-border-radius, 10px);
|
|
1558
|
+
padding: 0.75rem 1rem;
|
|
1559
|
+
}
|
|
1560
|
+
.pollar-sessions-item[data-current] {
|
|
1561
|
+
border-color: var(--pollar-accent);
|
|
1562
|
+
}
|
|
1563
|
+
.pollar-sessions-item-main {
|
|
1564
|
+
display: flex;
|
|
1565
|
+
align-items: center;
|
|
1566
|
+
gap: 0.5rem;
|
|
1567
|
+
min-width: 0;
|
|
1568
|
+
}
|
|
1569
|
+
.pollar-sessions-item-device {
|
|
1570
|
+
font-size: 0.875rem;
|
|
1571
|
+
font-weight: 500;
|
|
1572
|
+
color: var(--pollar-text);
|
|
1573
|
+
overflow: hidden;
|
|
1574
|
+
text-overflow: ellipsis;
|
|
1575
|
+
white-space: nowrap;
|
|
1576
|
+
}
|
|
1577
|
+
.pollar-sessions-item-badge {
|
|
1578
|
+
font-size: 0.6875rem;
|
|
1579
|
+
font-weight: 600;
|
|
1580
|
+
padding: 2px 8px;
|
|
1581
|
+
border-radius: 999px;
|
|
1582
|
+
text-transform: uppercase;
|
|
1583
|
+
letter-spacing: 0.04em;
|
|
1584
|
+
background: rgba(0, 93, 180, 0.12);
|
|
1585
|
+
color: var(--pollar-accent);
|
|
1586
|
+
white-space: nowrap;
|
|
1587
|
+
}
|
|
1588
|
+
.pollar-sessions-item-meta {
|
|
1589
|
+
font-size: 0.75rem;
|
|
1590
|
+
color: var(--pollar-muted);
|
|
1591
|
+
display: flex;
|
|
1592
|
+
gap: 0.5rem;
|
|
1593
|
+
align-items: center;
|
|
1594
|
+
grid-column: 1;
|
|
1595
|
+
}
|
|
1596
|
+
.pollar-sessions-item-revoke {
|
|
1597
|
+
grid-row: 1 / 3;
|
|
1598
|
+
grid-column: 2;
|
|
1599
|
+
align-self: center;
|
|
1600
|
+
background: none;
|
|
1601
|
+
border: 1px solid var(--pollar-border);
|
|
1602
|
+
border-radius: var(--pollar-buttons-border-radius, 6px);
|
|
1603
|
+
padding: 6px 12px;
|
|
1604
|
+
font-size: 0.75rem;
|
|
1605
|
+
font-weight: 500;
|
|
1606
|
+
color: var(--pollar-error-text, #dc2626);
|
|
1607
|
+
cursor: pointer;
|
|
1608
|
+
transition: background 150ms, border-color 150ms;
|
|
1609
|
+
}
|
|
1610
|
+
.pollar-sessions-item-revoke:hover:not(:disabled) {
|
|
1611
|
+
background: var(--pollar-error-bg, #fef2f2);
|
|
1612
|
+
border-color: var(--pollar-error-border, #fecaca);
|
|
1613
|
+
}
|
|
1614
|
+
.pollar-sessions-item-revoke:disabled {
|
|
1615
|
+
opacity: 0.5;
|
|
1616
|
+
cursor: not-allowed;
|
|
1617
|
+
}
|
|
1618
|
+
.pollar-sessions-actions {
|
|
1619
|
+
display: flex;
|
|
1620
|
+
justify-content: center;
|
|
1621
|
+
padding-top: 0.5rem;
|
|
1622
|
+
border-top: 1px solid var(--pollar-border);
|
|
1623
|
+
margin-bottom: 0.75rem;
|
|
1624
|
+
}
|
|
1625
|
+
.pollar-sessions-logout-all {
|
|
1626
|
+
background: none;
|
|
1627
|
+
border: 1px solid var(--pollar-error-border, #fecaca);
|
|
1628
|
+
border-radius: var(--pollar-buttons-border-radius, 6px);
|
|
1629
|
+
padding: 8px 16px;
|
|
1630
|
+
font-size: 0.8125rem;
|
|
1631
|
+
font-weight: 500;
|
|
1632
|
+
color: var(--pollar-error-text, #dc2626);
|
|
1633
|
+
cursor: pointer;
|
|
1634
|
+
transition: background 150ms;
|
|
1635
|
+
}
|
|
1636
|
+
.pollar-sessions-logout-all:hover:not(:disabled) {
|
|
1637
|
+
background: var(--pollar-error-bg, #fef2f2);
|
|
1638
|
+
}
|
|
1639
|
+
.pollar-sessions-logout-all:disabled {
|
|
1640
|
+
opacity: 0.4;
|
|
1641
|
+
cursor: not-allowed;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1446
1644
|
/* src/components/tx-history-modal/TxHistoryModal.css */
|
|
1447
1645
|
.pollar-hist-modal {
|
|
1448
1646
|
max-width: 480px;
|