@edel-finance/swap-widget 0.0.1 → 0.0.2

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/theme.js CHANGED
@@ -1,51 +1,85 @@
1
1
  /**
2
2
  * Alpine Forest II theme tokens and CSS-isolated style sheet for @edel-finance/swap-widget.
3
3
  *
4
+ * Visual tokens, radii, spacing, and typography are lifted directly from
5
+ * edel-markets-frontend's Alpine Forest II Deposit Bridge modal so the embeddable
6
+ * swap widget matches the production trading terminal 1:1.
7
+ *
4
8
  * All rules are scoped to `.edel-sw-root` with an explicit reset so the widget
5
9
  * never inherits or leaks styles when embedded in SuperNova, Loop, or partner dApps.
6
10
  */
7
11
  export const ALPINE_FOREST_THEMES = {
8
12
  dark: {
9
- bg: "#07110d",
10
- cardBg: "#0c1b15",
11
- surfaceBg: "#12261e",
12
- surfaceHover: "#183328",
13
- border: "#1d3a2e",
14
- borderStrong: "#2a5241",
15
- text: "#eef5f1",
16
- textMuted: "#8aa89b",
17
- accent: "#22c58b",
18
- accentHover: "#34d399",
19
- accentText: "#04120c",
20
- success: "#34d399",
21
- warning: "#fbbf24",
22
- danger: "#f87171",
23
- shadow: "0 20px 48px rgba(0, 0, 0, 0.45)",
13
+ bg: "#020c0a",
14
+ cardBg: "#0e1312",
15
+ panel2: "#121716",
16
+ surfaceBg: "rgba(172, 231, 204, 0.045)",
17
+ surfaceHover: "rgba(172, 231, 204, 0.08)",
18
+ surface4: "rgba(172, 231, 204, 0.115)",
19
+ border: "rgba(172, 231, 204, 0.06)",
20
+ borderStrong: "rgba(172, 231, 204, 0.12)",
21
+ textStrong: "#ffffff",
22
+ text: "#eff3f1",
23
+ text2: "#9ba8a2",
24
+ textMuted: "#818e88",
25
+ accent: "#8bfbd5",
26
+ accentRgb: "139, 251, 213",
27
+ tintRgb: "172, 231, 204",
28
+ accentHover: "#a4fde0",
29
+ accentText: "#03130e",
30
+ buttonPrimaryBg: "#8bfbd5",
31
+ buttonPrimaryHover: "#a4fde0",
32
+ buttonPrimaryText: "#03130e",
33
+ buttonDisabledBg: "rgba(139, 251, 213, 0.095)",
34
+ buttonDisabledText: "rgba(139, 251, 213, 0.62)",
35
+ success: "#62e0b2",
36
+ warning: "#f0be6d",
37
+ danger: "#f2738e",
38
+ dangerSoft: "rgba(242, 115, 142, 0.1)",
39
+ dangerLine: "rgba(242, 115, 142, 0.24)",
40
+ shadow: "0 32px 96px rgba(0, 0, 0, 0.55)",
41
+ shadowPop: "0 24px 64px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.32)",
24
42
  },
25
43
  light: {
26
- bg: "#f4f8f6",
44
+ bg: "#e7eeec",
27
45
  cardBg: "#ffffff",
28
- surfaceBg: "#ebf2ee",
29
- surfaceHover: "#dfeae4",
30
- border: "#d3e2db",
31
- borderStrong: "#a9c5b8",
32
- text: "#0b1f17",
33
- textMuted: "#4c6b5e",
34
- accent: "#0f8a5f",
35
- accentHover: "#0c734f",
36
- accentText: "#ffffff",
37
- success: "#0f8a5f",
38
- warning: "#b45309",
39
- danger: "#dc2626",
40
- shadow: "0 16px 36px rgba(11, 31, 23, 0.08)",
46
+ panel2: "#ffffff",
47
+ surfaceBg: "rgba(10, 36, 28, 0.045)",
48
+ surfaceHover: "rgba(10, 36, 28, 0.075)",
49
+ surface4: "rgba(10, 36, 28, 0.11)",
50
+ border: "rgba(10, 36, 28, 0.1)",
51
+ borderStrong: "rgba(10, 36, 28, 0.16)",
52
+ textStrong: "#04130e",
53
+ text: "#0b1e17",
54
+ text2: "#3f514a",
55
+ textMuted: "#56685f",
56
+ accent: "#006a52",
57
+ accentRgb: "0, 150, 110",
58
+ tintRgb: "10, 36, 28",
59
+ accentHover: "#2bd3a4",
60
+ accentText: "#032419",
61
+ buttonPrimaryBg: "#3ae0b1",
62
+ buttonPrimaryHover: "#2bd3a4",
63
+ buttonPrimaryText: "#032419",
64
+ buttonDisabledBg: "rgba(0, 150, 110, 0.1)",
65
+ buttonDisabledText: "rgba(0, 106, 82, 0.55)",
66
+ success: "#0a734f",
67
+ warning: "#a2650a",
68
+ danger: "#ae2844",
69
+ dangerSoft: "rgba(174, 40, 68, 0.08)",
70
+ dangerLine: "rgba(174, 40, 68, 0.24)",
71
+ shadow: "0 30px 90px rgba(10, 36, 28, 0.14)",
72
+ shadowPop: "0 24px 64px rgba(10, 36, 28, 0.15), 0 2px 8px rgba(10, 36, 28, 0.07)",
41
73
  },
42
74
  };
43
75
  export function getIsolatedWidgetCss(theme) {
44
76
  const t = ALPINE_FOREST_THEMES[theme];
77
+ const ease = "cubic-bezier(0.2, 0.9, 0.3, 1)";
45
78
  return `
46
79
  .edel-sw-root {
47
80
  all: initial;
48
- display: block;
81
+ display: grid;
82
+ gap: 12px;
49
83
  box-sizing: border-box;
50
84
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
51
85
  color: ${t.text};
@@ -53,11 +87,12 @@ export function getIsolatedWidgetCss(theme) {
53
87
  border: 1px solid ${t.border};
54
88
  border-radius: 18px;
55
89
  padding: 20px;
56
- width: 100%;
57
- max-width: 440px;
90
+ width: min(452px, 100%);
91
+ max-width: 452px;
58
92
  box-shadow: ${t.shadow};
59
93
  line-height: 1.4;
60
94
  -webkit-font-smoothing: antialiased;
95
+ color-scheme: ${theme};
61
96
  }
62
97
  .edel-sw-root *, .edel-sw-root *::before, .edel-sw-root *::after {
63
98
  box-sizing: border-box;
@@ -67,183 +102,432 @@ export function getIsolatedWidgetCss(theme) {
67
102
  display: flex;
68
103
  align-items: center;
69
104
  justify-content: space-between;
70
- margin-bottom: 16px;
105
+ gap: 10px;
106
+ }
107
+ .edel-sw-brand {
108
+ display: inline-flex;
109
+ align-items: center;
110
+ gap: 8px;
111
+ min-width: 0;
112
+ }
113
+ .edel-sw-brand-mark {
114
+ color: ${t.accent};
115
+ flex-shrink: 0;
116
+ display: block;
71
117
  }
72
118
  .edel-sw-title {
73
- font-size: 16px;
74
- font-weight: 700;
119
+ font-size: 15px;
120
+ font-weight: 600;
75
121
  letter-spacing: -0.01em;
76
- color: ${t.text};
122
+ color: ${t.textStrong};
77
123
  }
78
124
  .edel-sw-badge {
125
+ display: inline-flex;
126
+ align-items: center;
127
+ height: 22px;
128
+ padding: 0 8px;
129
+ border-radius: 999px;
130
+ background: rgba(${t.tintRgb}, 0.06);
131
+ color: ${t.text2};
132
+ font-size: 11.5px;
133
+ font-weight: 500;
134
+ font-variant-numeric: tabular-nums;
135
+ white-space: nowrap;
136
+ }
137
+
138
+ /* 4-Step Progress Rail (verbatim from bridge-rail) */
139
+ .edel-sw-rail {
140
+ display: grid;
141
+ grid-template-columns: repeat(4, minmax(0, 1fr));
142
+ margin: 0;
143
+ padding: 0;
144
+ list-style: none;
145
+ }
146
+ .edel-sw-rail-step {
147
+ position: relative;
148
+ display: flex;
149
+ justify-content: center;
150
+ min-width: 0;
151
+ }
152
+ .edel-sw-rail-step:not(:first-child)::before {
153
+ content: "";
154
+ position: absolute;
155
+ top: 10px;
156
+ right: calc(50% + 15px);
157
+ left: calc(-50% + 15px);
158
+ height: 2px;
159
+ border-radius: 1px;
160
+ background: rgba(${t.tintRgb}, 0.1);
161
+ transition: background-color 300ms ${ease};
162
+ }
163
+ .edel-sw-rail-step[data-state="done"]::before,
164
+ .edel-sw-rail-step[data-state="current"]::before {
165
+ background: rgba(${t.accentRgb}, 0.55);
166
+ }
167
+ .edel-sw-rail-inner {
168
+ display: flex;
169
+ flex-direction: column;
170
+ align-items: center;
171
+ gap: 5px;
172
+ width: 100%;
173
+ min-width: 0;
174
+ }
175
+ .edel-sw-rail-marker {
176
+ display: grid;
177
+ place-items: center;
178
+ width: 22px;
179
+ height: 22px;
180
+ border-radius: 50%;
181
+ box-shadow: inset 0 0 0 1.5px rgba(${t.tintRgb}, 0.16);
182
+ color: ${t.textMuted};
79
183
  font-size: 11px;
184
+ font-variant-numeric: tabular-nums;
80
185
  font-weight: 600;
81
- padding: 3px 8px;
82
- border-radius: 999px;
83
- background: ${t.surfaceBg};
84
- border: 1px solid ${t.border};
186
+ transition: background-color 240ms ${ease}, box-shadow 240ms ${ease}, color 240ms ${ease};
187
+ }
188
+ .edel-sw-rail-step[data-state="current"] .edel-sw-rail-marker {
189
+ background: rgba(${t.accentRgb}, 0.12);
190
+ box-shadow: inset 0 0 0 1.5px ${t.accent};
85
191
  color: ${t.accent};
86
- text-transform: uppercase;
87
- letter-spacing: 0.04em;
192
+ }
193
+ .edel-sw-rail-step[data-state="done"] .edel-sw-rail-marker {
194
+ background: ${t.accent};
195
+ box-shadow: none;
196
+ color: ${t.buttonPrimaryText};
197
+ }
198
+ .edel-sw-rail-label {
199
+ max-width: 100%;
200
+ overflow: hidden;
201
+ color: ${t.textMuted};
202
+ font-size: 11.5px;
203
+ line-height: 15px;
204
+ text-overflow: ellipsis;
205
+ white-space: nowrap;
206
+ }
207
+ .edel-sw-rail-step[data-state="current"] .edel-sw-rail-label {
208
+ color: ${t.textStrong};
209
+ font-weight: 600;
210
+ }
211
+
212
+ /* Send / Receive Pair (verbatim from bridge-pair & bridge-box) */
213
+ .edel-sw-pair {
214
+ position: relative;
215
+ display: grid;
216
+ gap: 6px;
217
+ }
218
+ .edel-sw-box-wrap {
219
+ position: relative;
220
+ min-width: 0;
88
221
  }
89
222
  .edel-sw-box {
223
+ display: grid;
224
+ gap: 8px;
225
+ padding: 14px 16px;
226
+ border-radius: 16px;
90
227
  background: ${t.surfaceBg};
91
- border: 1px solid ${t.border};
92
- border-radius: 14px;
93
- padding: 14px;
228
+ transition: box-shadow 140ms ${ease};
94
229
  }
95
- .edel-sw-row {
230
+ .edel-sw-box[data-pay]:focus-within {
231
+ box-shadow: inset 0 0 0 1px rgba(${t.accentRgb}, 0.45);
232
+ }
233
+ .edel-sw-box[data-invalid] {
234
+ box-shadow: inset 0 0 0 1px ${t.dangerLine};
235
+ }
236
+ .edel-sw-label {
96
237
  display: flex;
97
238
  align-items: center;
98
239
  justify-content: space-between;
99
- gap: 10px;
240
+ gap: 8px;
241
+ min-height: 22px;
242
+ color: ${t.textMuted};
243
+ font-size: 12.5px;
244
+ font-weight: 400;
100
245
  }
101
- .edel-sw-label {
102
- font-size: 12px;
246
+ .edel-sw-label-meta {
103
247
  color: ${t.textMuted};
104
- margin-bottom: 8px;
248
+ font-size: 11.5px;
249
+ font-variant-numeric: tabular-nums;
250
+ }
251
+ .edel-sw-row {
252
+ display: flex;
253
+ align-items: center;
254
+ justify-content: space-between;
255
+ gap: 10px;
256
+ min-width: 0;
105
257
  }
106
258
  .edel-sw-input {
107
- width: 100%;
108
- background: transparent;
109
- border: none;
110
- outline: none;
111
- font-size: 24px;
112
- font-weight: 600;
113
- color: ${t.text};
259
+ flex: 1 1 auto;
114
260
  min-width: 0;
261
+ height: 40px;
262
+ padding: 0;
263
+ border: 0;
264
+ border-radius: 0;
265
+ background: transparent;
266
+ box-shadow: none;
267
+ color: ${t.textStrong};
268
+ font-size: 30px;
269
+ font-variant-numeric: tabular-nums;
270
+ font-weight: 400;
271
+ letter-spacing: -0.02em;
272
+ outline: 0;
273
+ }
274
+ .edel-sw-input[data-empty="true"] {
275
+ color: ${t.textMuted};
115
276
  }
116
- .edel-sw-select {
117
- background: ${t.cardBg};
118
- color: ${t.text};
119
- border: 1px solid ${t.borderStrong};
120
- border-radius: 10px;
121
- padding: 7px 10px;
122
- font-size: 14px;
123
- font-weight: 600;
124
- cursor: pointer;
277
+ .edel-sw-input::placeholder {
278
+ color: ${t.textMuted};
125
279
  }
126
- .edel-sw-flip-wrap {
280
+ .edel-sw-box-sub {
127
281
  display: flex;
128
- justify-content: center;
129
- margin: -8px 0;
130
- position: relative;
131
- z-index: 2;
282
+ align-items: center;
283
+ justify-content: space-between;
284
+ gap: 8px;
285
+ min-height: 17px;
286
+ color: ${t.textMuted};
287
+ font-size: 12px;
288
+ font-variant-numeric: tabular-nums;
132
289
  }
290
+
291
+ /* Overlapping Center Flip Button (verbatim from bridge-pair__arrow) */
133
292
  .edel-sw-flip {
134
- width: 34px;
135
- height: 34px;
136
- border-radius: 10px;
137
- border: 1px solid ${t.borderStrong};
138
- background: ${t.cardBg};
293
+ position: absolute;
294
+ top: 50%;
295
+ left: 50%;
296
+ z-index: 3;
297
+ display: grid;
298
+ place-items: center;
299
+ width: 32px;
300
+ height: 32px;
301
+ padding: 0;
302
+ border: 4px solid ${t.cardBg};
303
+ border-radius: 11px;
304
+ background:
305
+ linear-gradient(${t.surfaceHover}, ${t.surfaceHover}) padding-box,
306
+ ${t.cardBg} padding-box;
307
+ color: ${t.text};
308
+ cursor: pointer;
309
+ outline: 0;
310
+ box-sizing: content-box;
311
+ transform: translate(-50%, -50%);
312
+ transition: background-color 140ms ${ease}, color 140ms ${ease}, box-shadow 140ms ${ease};
313
+ }
314
+ .edel-sw-flip:hover {
315
+ background:
316
+ linear-gradient(${t.surface4}, ${t.surface4}) padding-box,
317
+ ${t.cardBg} padding-box;
139
318
  color: ${t.accent};
140
- font-size: 16px;
141
- font-weight: 700;
319
+ }
320
+ .edel-sw-flip:focus-visible {
321
+ box-shadow: 0 0 0 1.5px rgba(${t.accentRgb}, 0.55);
322
+ }
323
+ .edel-sw-flip-icon {
324
+ display: block;
325
+ transition: transform 220ms ${ease};
326
+ }
327
+
328
+ /* Token Pill Trigger & Canton Mini-Badge (verbatim from bridge-token-button & bridge-on-chain) */
329
+ .edel-sw-token-picker {
330
+ flex: none;
331
+ }
332
+ .edel-sw-token-trigger {
333
+ display: inline-flex;
334
+ flex: none;
335
+ align-items: center;
336
+ gap: 8px;
337
+ height: 38px;
338
+ padding: 0 10px 0 7px;
339
+ border: 0;
340
+ border-radius: 999px;
341
+ background: ${t.surfaceHover};
342
+ color: ${t.textStrong};
343
+ font: inherit;
344
+ font-size: 14px;
345
+ font-weight: 500;
142
346
  cursor: pointer;
347
+ outline: 0;
348
+ white-space: nowrap;
349
+ transition: background-color 140ms ${ease}, box-shadow 140ms ${ease};
350
+ }
351
+ .edel-sw-token-trigger:hover {
352
+ background: ${t.surface4};
353
+ }
354
+ .edel-sw-token-trigger:focus-visible,
355
+ .edel-sw-token-trigger[aria-expanded="true"] {
356
+ background: ${t.surface4};
357
+ box-shadow: inset 0 0 0 1.5px rgba(${t.accentRgb}, 0.55);
358
+ }
359
+ .edel-sw-on-chain {
360
+ position: relative;
143
361
  display: inline-flex;
144
362
  align-items: center;
145
363
  justify-content: center;
364
+ flex: none;
365
+ }
366
+ .edel-sw-on-chain-badge {
367
+ position: absolute;
368
+ right: -3px;
369
+ bottom: -3px;
370
+ display: grid;
371
+ place-items: center;
372
+ border-radius: 50%;
373
+ background: ${t.cardBg};
146
374
  }
147
- .edel-sw-fees {
148
- margin-top: 14px;
149
- padding: 12px 14px;
150
- border-radius: 12px;
151
- background: ${t.bg};
152
- border: 1px solid ${t.border};
153
- font-size: 12px;
375
+ .edel-sw-token-icon {
376
+ display: block;
377
+ flex-shrink: 0;
378
+ border-radius: 50%;
379
+ }
380
+ .edel-sw-token-symbol {
381
+ letter-spacing: -0.01em;
382
+ }
383
+ .edel-sw-token-chevron {
384
+ color: ${t.textMuted};
385
+ flex-shrink: 0;
386
+ transition: transform 160ms ${ease};
387
+ }
388
+ .edel-sw-token-trigger[aria-expanded="true"] .edel-sw-token-chevron {
389
+ transform: rotate(180deg);
390
+ }
391
+
392
+ /* Searchable Token Dropdown (verbatim from bridge-select) */
393
+ @keyframes edel-sw-select-in {
394
+ from {
395
+ opacity: 0;
396
+ transform: translateY(-6px) scale(0.98);
397
+ }
398
+ }
399
+ .edel-sw-token-menu {
400
+ position: absolute;
401
+ top: calc(100% + 6px);
402
+ right: 0;
403
+ left: 0;
404
+ z-index: 20;
154
405
  display: flex;
155
406
  flex-direction: column;
156
- gap: 6px;
407
+ gap: 4px;
408
+ max-height: 340px;
409
+ overflow: hidden;
410
+ padding: 6px;
411
+ border-radius: 14px;
412
+ background: ${t.panel2};
413
+ box-shadow: ${t.shadowPop}, inset 0 0 0 1px rgba(${t.tintRgb}, 0.08);
414
+ animation: edel-sw-select-in 160ms ${ease} both;
157
415
  }
158
- .edel-sw-fee-line {
416
+ .edel-sw-token-search {
159
417
  display: flex;
160
- justify-content: space-between;
418
+ flex: none;
419
+ align-items: center;
420
+ gap: 8px;
421
+ height: 38px;
422
+ padding: 0 10px;
423
+ border-radius: 10px;
424
+ background: ${t.surfaceBg};
161
425
  color: ${t.textMuted};
162
426
  }
163
- .edel-sw-fee-line strong {
164
- color: ${t.text};
165
- font-weight: 600;
166
- }
167
- .edel-sw-ttl-bar {
168
- height: 4px;
169
- width: 100%;
170
- border-radius: 999px;
171
- background: ${t.surfaceBg};
172
- overflow: hidden;
173
- margin-top: 4px;
427
+ .edel-sw-token-search input {
428
+ flex: 1;
429
+ min-width: 0;
430
+ border: 0;
431
+ background: transparent;
432
+ color: ${t.textStrong};
433
+ font: inherit;
434
+ font-size: 13px;
435
+ outline: 0;
174
436
  }
175
- .edel-sw-ttl-fill {
176
- height: 100%;
177
- background: ${t.accent};
178
- transition: width 0.25s linear;
437
+ .edel-sw-token-search input::placeholder {
438
+ color: ${t.textMuted};
179
439
  }
180
- .edel-sw-cta {
181
- margin-top: 14px;
440
+ .edel-sw-token-list {
441
+ display: flex;
442
+ flex: 1 1 auto;
443
+ flex-direction: column;
444
+ gap: 2px;
445
+ min-height: 0;
446
+ max-height: 264px;
447
+ overflow-x: hidden;
448
+ overflow-y: auto;
449
+ overscroll-behavior: contain;
450
+ }
451
+ .edel-sw-token-option {
452
+ display: grid;
453
+ flex: none;
454
+ grid-template-columns: 28px minmax(0, 1fr) auto 16px;
455
+ align-items: center;
456
+ gap: 10px;
182
457
  width: 100%;
183
- padding: 13px 16px;
184
- border-radius: 12px;
185
- border: none;
186
- background: ${t.accent};
187
- color: ${t.accentText};
188
- font-size: 15px;
189
- font-weight: 700;
458
+ min-height: 52px;
459
+ padding: 8px 10px;
460
+ border: 0;
461
+ border-radius: 10px;
462
+ background: transparent;
463
+ color: inherit;
464
+ font: inherit;
465
+ text-align: left;
190
466
  cursor: pointer;
467
+ outline: 0;
468
+ transition: background-color 120ms ${ease};
191
469
  }
192
- .edel-sw-cta:disabled {
193
- opacity: 0.5;
194
- cursor: not-allowed;
470
+ .edel-sw-token-option:hover,
471
+ .edel-sw-token-option:focus-visible {
472
+ background: ${t.surfaceHover};
195
473
  }
196
- .edel-sw-tracker {
197
- margin-top: 14px;
198
- padding: 12px 14px;
199
- border-radius: 12px;
474
+ .edel-sw-token-option[aria-selected="true"] {
200
475
  background: ${t.surfaceBg};
201
- border: 1px solid ${t.border};
202
476
  }
203
- .edel-sw-steps {
204
- display: flex;
205
- justify-content: space-between;
206
- gap: 4px;
207
- margin-top: 8px;
477
+ .edel-sw-token-option-text {
478
+ display: grid;
479
+ min-width: 0;
480
+ line-height: 17px;
208
481
  }
209
- .edel-sw-step {
210
- flex: 1;
211
- text-align: center;
212
- font-size: 10px;
213
- font-weight: 600;
214
- padding: 5px 4px;
215
- border-radius: 8px;
216
- border: 1px solid ${t.border};
482
+ .edel-sw-token-option-text strong {
483
+ color: ${t.textStrong};
484
+ font-size: 13.5px;
485
+ font-weight: 500;
486
+ }
487
+ .edel-sw-token-option-text span {
488
+ overflow: hidden;
217
489
  color: ${t.textMuted};
218
- background: ${t.cardBg};
490
+ font-size: 12px;
491
+ text-overflow: ellipsis;
492
+ white-space: nowrap;
219
493
  }
220
- .edel-sw-step[data-state="active"] {
221
- border-color: ${t.accent};
494
+ .edel-sw-token-option-aside {
495
+ color: ${t.text2};
496
+ font-size: 12px;
497
+ font-variant-numeric: tabular-nums;
498
+ }
499
+ .edel-sw-token-check {
500
+ display: inline-flex;
501
+ align-items: center;
502
+ justify-content: center;
222
503
  color: ${t.accent};
223
504
  }
224
- .edel-sw-step[data-state="done"] {
225
- border-color: ${t.success};
226
- background: ${t.accent};
227
- color: ${t.accentText};
505
+ .edel-sw-token-empty {
506
+ padding: 16px 10px;
507
+ color: ${t.textMuted};
508
+ font-size: 12.5px;
509
+ text-align: center;
228
510
  }
511
+
512
+ /* Max Slippage Presets (verbatim from bridge-preset) */
229
513
  .edel-sw-slippage {
230
- margin-top: 12px;
514
+ display: grid;
515
+ gap: 8px;
231
516
  padding: 10px 12px;
232
- border-radius: 12px;
233
- background: ${t.surfaceBg};
234
- border: 1px solid ${t.border};
517
+ border-radius: 14px;
518
+ box-shadow: inset 0 0 0 1px rgba(${t.tintRgb}, 0.08);
235
519
  }
236
520
  .edel-sw-slippage-header {
237
521
  display: flex;
238
522
  align-items: center;
239
523
  justify-content: space-between;
240
- font-size: 12px;
524
+ font-size: 12.5px;
241
525
  color: ${t.textMuted};
242
- margin-bottom: 8px;
243
526
  }
244
527
  .edel-sw-slippage-header strong {
245
528
  color: ${t.text};
246
- font-weight: 600;
529
+ font-weight: 500;
530
+ font-variant-numeric: tabular-nums;
247
531
  }
248
532
  .edel-sw-slippage-pills {
249
533
  display: flex;
@@ -255,68 +539,201 @@ export function getIsolatedWidgetCss(theme) {
255
539
  }
256
540
  .edel-sw-pill {
257
541
  flex: 1;
258
- padding: 6px 8px;
259
- border-radius: 8px;
260
- border: 1px solid ${t.border};
261
- background: ${t.cardBg};
262
- color: ${t.textMuted};
542
+ height: 28px;
543
+ padding: 0 9px;
544
+ border: 0;
545
+ border-radius: 999px;
546
+ background: rgba(${t.tintRgb}, 0.06);
547
+ color: ${t.text2};
548
+ font: inherit;
263
549
  font-size: 12px;
264
- font-weight: 600;
550
+ font-variant-numeric: tabular-nums;
551
+ font-weight: 500;
265
552
  cursor: pointer;
553
+ outline: 0;
266
554
  text-align: center;
555
+ transition: background-color 140ms ${ease}, color 140ms ${ease};
556
+ }
557
+ .edel-sw-pill:hover {
558
+ background: ${t.surface4};
559
+ color: ${t.textStrong};
560
+ }
561
+ .edel-sw-pill:focus-visible {
562
+ box-shadow: inset 0 0 0 1.5px rgba(${t.accentRgb}, 0.55);
267
563
  }
268
564
  .edel-sw-pill[data-active="true"] {
269
- border-color: ${t.accent};
270
- background: ${t.accent};
271
- color: ${t.accentText};
565
+ background: rgba(${t.accentRgb}, 0.14);
566
+ color: ${t.accent};
272
567
  }
273
568
  .edel-sw-custom-wrap {
274
569
  display: flex;
275
570
  align-items: center;
276
- flex: 1.2;
277
- background: ${t.cardBg};
278
- border: 1px solid ${t.border};
279
- border-radius: 8px;
280
- padding: 0 8px;
571
+ flex: 1.25;
572
+ height: 28px;
573
+ background: rgba(${t.tintRgb}, 0.06);
574
+ border-radius: 999px;
575
+ padding: 0 10px;
576
+ transition: box-shadow 140ms ${ease}, background-color 140ms ${ease};
281
577
  }
578
+ .edel-sw-custom-wrap:focus-within,
282
579
  .edel-sw-custom-wrap[data-active="true"] {
283
- border-color: ${t.accent};
580
+ background: rgba(${t.accentRgb}, 0.1);
581
+ box-shadow: inset 0 0 0 1px rgba(${t.accentRgb}, 0.45);
284
582
  }
285
583
  .edel-sw-custom-input {
286
584
  width: 100%;
287
585
  background: transparent;
288
- border: none;
289
- outline: none;
290
- color: ${t.text};
586
+ border: 0;
587
+ outline: 0;
588
+ color: ${t.textStrong};
291
589
  font-size: 12px;
292
- font-weight: 600;
293
- padding: 6px 0;
590
+ font-variant-numeric: tabular-nums;
591
+ font-weight: 500;
294
592
  min-width: 0;
295
593
  }
594
+ .edel-sw-custom-input::placeholder {
595
+ color: ${t.textMuted};
596
+ }
296
597
  .edel-sw-custom-suffix {
297
- font-size: 11px;
598
+ font-size: 11.5px;
298
599
  color: ${t.textMuted};
299
600
  margin-left: 2px;
300
601
  }
602
+
603
+ /* Quote Details Card (verbatim from bridge-quote & bridge-rows) */
604
+ .edel-sw-fees {
605
+ display: grid;
606
+ gap: 0;
607
+ padding: 10px 12px;
608
+ border-radius: 14px;
609
+ box-shadow: inset 0 0 0 1px rgba(${t.tintRgb}, 0.08);
610
+ font-size: 12.5px;
611
+ }
612
+ .edel-sw-fee-line {
613
+ display: flex;
614
+ align-items: baseline;
615
+ justify-content: space-between;
616
+ gap: 12px;
617
+ padding: 6px 0;
618
+ border-top: 1px solid rgba(${t.tintRgb}, 0.06);
619
+ color: ${t.textMuted};
620
+ line-height: 18px;
621
+ }
622
+ .edel-sw-fee-line:first-child {
623
+ border-top: 0;
624
+ padding-top: 0;
625
+ }
626
+ .edel-sw-fee-line strong {
627
+ color: ${t.text};
628
+ font-weight: 500;
629
+ font-variant-numeric: tabular-nums;
630
+ text-align: right;
631
+ white-space: nowrap;
632
+ }
633
+ .edel-sw-ttl-bar {
634
+ height: 3px;
635
+ width: 100%;
636
+ border-radius: 999px;
637
+ background: rgba(${t.tintRgb}, 0.1);
638
+ overflow: hidden;
639
+ margin-top: 6px;
640
+ }
641
+ .edel-sw-ttl-fill {
642
+ height: 100%;
643
+ background: ${t.accent};
644
+ transition: width 0.25s linear;
645
+ }
646
+
647
+ /* Active Order Tracker */
648
+ .edel-sw-tracker {
649
+ display: grid;
650
+ gap: 8px;
651
+ padding: 12px 14px;
652
+ border-radius: 14px;
653
+ background: ${t.surfaceBg};
654
+ box-shadow: inset 0 0 0 1px rgba(${t.tintRgb}, 0.08);
655
+ }
656
+ .edel-sw-steps {
657
+ display: flex;
658
+ justify-content: space-between;
659
+ gap: 4px;
660
+ }
661
+ .edel-sw-step {
662
+ flex: 1;
663
+ text-align: center;
664
+ font-size: 10.5px;
665
+ font-weight: 500;
666
+ padding: 5px 4px;
667
+ border-radius: 8px;
668
+ background: rgba(${t.tintRgb}, 0.05);
669
+ color: ${t.textMuted};
670
+ }
671
+ .edel-sw-step[data-state="active"] {
672
+ background: rgba(${t.accentRgb}, 0.14);
673
+ box-shadow: inset 0 0 0 1px rgba(${t.accentRgb}, 0.45);
674
+ color: ${t.accent};
675
+ }
676
+ .edel-sw-step[data-state="done"] {
677
+ background: ${t.buttonPrimaryBg};
678
+ color: ${t.buttonPrimaryText};
679
+ font-weight: 600;
680
+ }
301
681
  .edel-sw-submit-btn {
302
- margin-top: 10px;
303
682
  width: 100%;
304
- padding: 10px 14px;
683
+ min-height: 38px;
684
+ padding: 0 14px;
305
685
  border-radius: 10px;
306
- border: 1px solid ${t.accent};
307
- background: transparent;
686
+ border: 1px solid rgba(${t.accentRgb}, 0.45);
687
+ background: rgba(${t.accentRgb}, 0.12);
308
688
  color: ${t.accent};
309
689
  font-size: 13px;
310
- font-weight: 700;
690
+ font-weight: 600;
311
691
  cursor: pointer;
692
+ transition: background-color 140ms ${ease};
693
+ }
694
+ .edel-sw-submit-btn:hover:not(:disabled) {
695
+ background: rgba(${t.accentRgb}, 0.2);
312
696
  }
313
697
  .edel-sw-submit-btn:disabled {
314
698
  opacity: 0.5;
315
699
  cursor: not-allowed;
316
700
  }
701
+
702
+ /* Primary Mint CTA Button (verbatim from bridge-cta & alpine-forest-2) */
703
+ .edel-sw-cta {
704
+ width: 100%;
705
+ min-height: 46px;
706
+ padding: 0 16px;
707
+ border-radius: 12px;
708
+ border: 0;
709
+ background: ${t.buttonPrimaryBg};
710
+ color: ${t.buttonPrimaryText};
711
+ font-size: 14.5px;
712
+ font-weight: 600;
713
+ cursor: pointer;
714
+ outline: 0;
715
+ transition: background-color 140ms ${ease}, color 140ms ${ease}, box-shadow 140ms ${ease};
716
+ }
717
+ .edel-sw-cta:hover:not(:disabled) {
718
+ background: ${t.buttonPrimaryHover};
719
+ }
720
+ .edel-sw-cta:focus-visible {
721
+ box-shadow: 0 0 0 2px rgba(${t.accentRgb}, 0.45);
722
+ }
723
+ .edel-sw-cta:disabled {
724
+ background: ${t.buttonDisabledBg};
725
+ color: ${t.buttonDisabledText};
726
+ cursor: not-allowed;
727
+ }
728
+
729
+ /* Error Notice (verbatim from bridge-notice[data-tone="error"]) */
317
730
  .edel-sw-error {
318
- margin-top: 10px;
319
- font-size: 12px;
731
+ padding: 10px 12px;
732
+ border-radius: 12px;
733
+ background: ${t.dangerSoft};
734
+ box-shadow: inset 0 0 0 1px ${t.dangerLine};
735
+ font-size: 12.5px;
736
+ line-height: 18px;
320
737
  color: ${t.danger};
321
738
  }
322
739
  `.trim();