@deframe-sdk/components 0.1.56 → 0.1.58
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/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +288 -142
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +288 -142
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +15 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ function ActionButton(_a) {
|
|
|
76
76
|
"className",
|
|
77
77
|
"type"
|
|
78
78
|
]);
|
|
79
|
-
const
|
|
79
|
+
const baseClasses2 = [
|
|
80
80
|
"flex-1 inline-flex items-center justify-center overflow-hidden",
|
|
81
81
|
"h-[var(--deframe-widget-font-leading-lg)]",
|
|
82
82
|
"px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
|
|
@@ -86,7 +86,7 @@ function ActionButton(_a) {
|
|
|
86
86
|
"transition-[background,border-color,box-shadow,opacity] duration-200",
|
|
87
87
|
"focus:outline-none focus:ring-2 focus:ring-[color:var(--deframe-widget-color-brand-primary)]"
|
|
88
88
|
].join(" ");
|
|
89
|
-
const
|
|
89
|
+
const stateClasses2 = disabled ? [
|
|
90
90
|
"cursor-not-allowed",
|
|
91
91
|
"bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
92
92
|
"text-[color:var(--deframe-widget-color-text-primary-disabled)]"
|
|
@@ -98,8 +98,8 @@ function ActionButton(_a) {
|
|
|
98
98
|
"hover:shadow-[0_2px_8px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_18%,transparent)]"
|
|
99
99
|
].join(" ");
|
|
100
100
|
const containerClasses = tailwindMerge.twMerge(
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
baseClasses2,
|
|
102
|
+
stateClasses2,
|
|
103
103
|
className
|
|
104
104
|
);
|
|
105
105
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -114,13 +114,13 @@ function ActionButton(_a) {
|
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
var CloseButton = ({ onClick, testId, ariaLabel = "Close", className }) => {
|
|
117
|
-
const
|
|
117
|
+
const baseClasses2 = "w-12 h-12 rounded-[var(--deframe-widget-size-radius-sm)] flex items-center justify-center text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)] transition-[background] duration-150 cursor-pointer";
|
|
118
118
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
119
|
"button",
|
|
120
120
|
{
|
|
121
121
|
"data-test-id": testId != null ? testId : "close-button",
|
|
122
122
|
onClick,
|
|
123
|
-
className: tailwindMerge.twMerge(
|
|
123
|
+
className: tailwindMerge.twMerge(baseClasses2, className),
|
|
124
124
|
"aria-label": ariaLabel,
|
|
125
125
|
children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiXMark, { className: "w-6 h-6" })
|
|
126
126
|
}
|
|
@@ -173,7 +173,7 @@ function PrimaryButton(_a) {
|
|
|
173
173
|
"className",
|
|
174
174
|
"type"
|
|
175
175
|
]);
|
|
176
|
-
const
|
|
176
|
+
const baseClasses2 = [
|
|
177
177
|
/** layout */
|
|
178
178
|
"overflow-hidden w-full flex items-center justify-center transition-all duration-200",
|
|
179
179
|
/** typography */
|
|
@@ -189,7 +189,7 @@ function PrimaryButton(_a) {
|
|
|
189
189
|
"border-solid border-[length:var(--deframe-widget-size-border-xs)]",
|
|
190
190
|
"gap-[var(--deframe-widget-size-gap-sm)]"
|
|
191
191
|
].join(" ");
|
|
192
|
-
const
|
|
192
|
+
const stateClasses2 = {
|
|
193
193
|
/** enabled state */
|
|
194
194
|
enabled: [
|
|
195
195
|
"hover:opacity-90",
|
|
@@ -207,8 +207,8 @@ function PrimaryButton(_a) {
|
|
|
207
207
|
].join(" ")
|
|
208
208
|
};
|
|
209
209
|
const buttonClasses = tailwindMerge.twMerge(
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
baseClasses2,
|
|
211
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
212
212
|
className
|
|
213
213
|
);
|
|
214
214
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -237,7 +237,7 @@ function SecondaryButton(_a) {
|
|
|
237
237
|
"className",
|
|
238
238
|
"type"
|
|
239
239
|
]);
|
|
240
|
-
const
|
|
240
|
+
const baseClasses2 = [
|
|
241
241
|
/** layout */
|
|
242
242
|
"overflow-hidden w-full flex items-center justify-center transition-all duration-200",
|
|
243
243
|
/** typography */
|
|
@@ -254,7 +254,7 @@ function SecondaryButton(_a) {
|
|
|
254
254
|
"border-solid border-[length:var(--deframe-widget-size-border-xs)]",
|
|
255
255
|
"gap-[var(--deframe-widget-size-gap-sm)]"
|
|
256
256
|
].join(" ");
|
|
257
|
-
const
|
|
257
|
+
const stateClasses2 = {
|
|
258
258
|
enabled: [
|
|
259
259
|
"text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
260
260
|
"border-[color:var(--deframe-widget-color-brand-primary)]",
|
|
@@ -268,8 +268,8 @@ function SecondaryButton(_a) {
|
|
|
268
268
|
].join(" ")
|
|
269
269
|
};
|
|
270
270
|
const buttonClasses = tailwindMerge.twMerge(
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
baseClasses2,
|
|
272
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
273
273
|
className
|
|
274
274
|
);
|
|
275
275
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -298,7 +298,7 @@ function TertiaryButton(_a) {
|
|
|
298
298
|
"className",
|
|
299
299
|
"type"
|
|
300
300
|
]);
|
|
301
|
-
const
|
|
301
|
+
const baseClasses2 = [
|
|
302
302
|
/** layout */
|
|
303
303
|
"overflow-hidden w-full flex items-center justify-center transition-all duration-200",
|
|
304
304
|
/** typography */
|
|
@@ -314,7 +314,7 @@ function TertiaryButton(_a) {
|
|
|
314
314
|
"rounded-[var(--deframe-widget-size-radius-xs)]",
|
|
315
315
|
"gap-[var(--deframe-widget-size-gap-sm)]"
|
|
316
316
|
].join(" ");
|
|
317
|
-
const
|
|
317
|
+
const stateClasses2 = {
|
|
318
318
|
enabled: [
|
|
319
319
|
"text-[color:var(--deframe-widget-color-text-tertiary)]",
|
|
320
320
|
"hover:opacity-90",
|
|
@@ -326,8 +326,8 @@ function TertiaryButton(_a) {
|
|
|
326
326
|
].join(" ")
|
|
327
327
|
};
|
|
328
328
|
const buttonClasses = tailwindMerge.twMerge(
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
baseClasses2,
|
|
330
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
331
331
|
className
|
|
332
332
|
);
|
|
333
333
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -346,7 +346,7 @@ function TertiaryButton(_a) {
|
|
|
346
346
|
}
|
|
347
347
|
function Input(_a) {
|
|
348
348
|
var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
|
|
349
|
-
const
|
|
349
|
+
const baseClasses2 = [
|
|
350
350
|
"flex flex-col",
|
|
351
351
|
"[gap:var(--deframe-widget-size-gap-xs)]"
|
|
352
352
|
].join(" ");
|
|
@@ -355,13 +355,13 @@ function Input(_a) {
|
|
|
355
355
|
__spreadValues({
|
|
356
356
|
"data-slot": "input",
|
|
357
357
|
"data-test-id": "input",
|
|
358
|
-
className: tailwindMerge.twMerge(
|
|
358
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
359
359
|
}, props)
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
362
|
function InputLabel(_a) {
|
|
363
363
|
var _b = _a, { className = "" } = _b, props = __objRest(_b, ["className"]);
|
|
364
|
-
const
|
|
364
|
+
const baseClasses2 = [
|
|
365
365
|
"[font-family:var(--deframe-widget-font-family)]",
|
|
366
366
|
"[font-size:var(--deframe-widget-font-size-xs)]",
|
|
367
367
|
"[font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
@@ -372,13 +372,13 @@ function InputLabel(_a) {
|
|
|
372
372
|
__spreadValues({
|
|
373
373
|
"data-slot": "input-label",
|
|
374
374
|
"data-test-id": "input-label",
|
|
375
|
-
className: tailwindMerge.twMerge(
|
|
375
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
376
376
|
}, props)
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
379
|
function InputField(_a) {
|
|
380
380
|
var _b = _a, { hasError = false, disabled, className = "" } = _b, props = __objRest(_b, ["hasError", "disabled", "className"]);
|
|
381
|
-
const
|
|
381
|
+
const baseClasses2 = [
|
|
382
382
|
"w-full",
|
|
383
383
|
"[font-family:var(--deframe-widget-font-family)]",
|
|
384
384
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
@@ -392,7 +392,7 @@ function InputField(_a) {
|
|
|
392
392
|
"outline-none",
|
|
393
393
|
"transition-colors"
|
|
394
394
|
].join(" ");
|
|
395
|
-
const
|
|
395
|
+
const stateClasses2 = {
|
|
396
396
|
default: [
|
|
397
397
|
"border border-[var(--deframe-widget-color-border-primary)]",
|
|
398
398
|
"bg-[var(--deframe-widget-color-bg-raised)]"
|
|
@@ -410,7 +410,7 @@ function InputField(_a) {
|
|
|
410
410
|
].join(" ")
|
|
411
411
|
};
|
|
412
412
|
const stateKey = hasError ? "error" : disabled ? "disabled" : "default";
|
|
413
|
-
const fieldClasses = tailwindMerge.twMerge(
|
|
413
|
+
const fieldClasses = tailwindMerge.twMerge(baseClasses2, stateClasses2[stateKey], className);
|
|
414
414
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
415
415
|
"input",
|
|
416
416
|
__spreadValues({
|
|
@@ -442,13 +442,13 @@ function Link(_a) {
|
|
|
442
442
|
"replace",
|
|
443
443
|
"scroll"
|
|
444
444
|
]);
|
|
445
|
-
const
|
|
445
|
+
const baseClasses2 = [
|
|
446
446
|
"[font-family:var(--deframe-widget-font-family)]",
|
|
447
447
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
448
448
|
"[font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
449
449
|
"[line-height:var(--deframe-widget-font-leading-lg)]"
|
|
450
450
|
].join(" ");
|
|
451
|
-
const
|
|
451
|
+
const stateClasses2 = {
|
|
452
452
|
enabled: [
|
|
453
453
|
"text-[color:var(--deframe-widget-color-text-primary)]",
|
|
454
454
|
"hover:underline",
|
|
@@ -461,8 +461,8 @@ function Link(_a) {
|
|
|
461
461
|
].join(" ")
|
|
462
462
|
};
|
|
463
463
|
const linkClasses = tailwindMerge.twMerge(
|
|
464
|
-
|
|
465
|
-
|
|
464
|
+
baseClasses2,
|
|
465
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
466
466
|
className
|
|
467
467
|
);
|
|
468
468
|
if (disabled) {
|
|
@@ -572,7 +572,7 @@ function ListItem(_a) {
|
|
|
572
572
|
}
|
|
573
573
|
function ListItemLeftSide(_a) {
|
|
574
574
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
575
|
-
const
|
|
575
|
+
const baseClasses2 = [
|
|
576
576
|
"flex justify-center items-center",
|
|
577
577
|
"text-[var(--deframe-widget-color-text-primary)]"
|
|
578
578
|
].join(" ");
|
|
@@ -581,7 +581,7 @@ function ListItemLeftSide(_a) {
|
|
|
581
581
|
__spreadProps(__spreadValues({
|
|
582
582
|
"data-slot": "list-item-left-side",
|
|
583
583
|
"data-test-id": "list-item-left-side",
|
|
584
|
-
className: tailwindMerge.twMerge(
|
|
584
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
585
585
|
}, props), {
|
|
586
586
|
children
|
|
587
587
|
})
|
|
@@ -589,7 +589,7 @@ function ListItemLeftSide(_a) {
|
|
|
589
589
|
}
|
|
590
590
|
function ListItemContent(_a) {
|
|
591
591
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
592
|
-
const
|
|
592
|
+
const baseClasses2 = [
|
|
593
593
|
"flex-1 self-stretch inline-flex flex-col justify-center items-start overflow-hidden",
|
|
594
594
|
"text-[var(--deframe-widget-color-text-primary)]"
|
|
595
595
|
].join(" ");
|
|
@@ -598,7 +598,7 @@ function ListItemContent(_a) {
|
|
|
598
598
|
__spreadProps(__spreadValues({
|
|
599
599
|
"data-slot": "list-item-content",
|
|
600
600
|
"data-test-id": "list-item-content",
|
|
601
|
-
className: tailwindMerge.twMerge(
|
|
601
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
602
602
|
}, props), {
|
|
603
603
|
children
|
|
604
604
|
})
|
|
@@ -606,7 +606,7 @@ function ListItemContent(_a) {
|
|
|
606
606
|
}
|
|
607
607
|
function ListItemRightSide(_a) {
|
|
608
608
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
609
|
-
const
|
|
609
|
+
const baseClasses2 = [
|
|
610
610
|
"flex flex-col justify-start items-end",
|
|
611
611
|
"text-[var(--deframe-widget-color-text-primary)]"
|
|
612
612
|
].join(" ");
|
|
@@ -615,7 +615,7 @@ function ListItemRightSide(_a) {
|
|
|
615
615
|
__spreadProps(__spreadValues({
|
|
616
616
|
"data-slot": "list-item-right-side",
|
|
617
617
|
"data-test-id": "list-item-right-side",
|
|
618
|
-
className: tailwindMerge.twMerge(
|
|
618
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
619
619
|
}, props), {
|
|
620
620
|
children
|
|
621
621
|
})
|
|
@@ -925,19 +925,19 @@ var Text = React6__namespace.forwardRef(
|
|
|
925
925
|
"disabled",
|
|
926
926
|
"className"
|
|
927
927
|
]);
|
|
928
|
-
const
|
|
928
|
+
const baseClasses2 = [
|
|
929
929
|
"[font-family:var(--deframe-widget-font-family)]",
|
|
930
930
|
"[font-size:var(--deframe-widget-font-size-md)]",
|
|
931
931
|
"[line-height:var(--deframe-widget-font-leading-md)]",
|
|
932
932
|
"[font-weight:var(--deframe-widget-font-weight-regular)]"
|
|
933
933
|
].join(" ");
|
|
934
|
-
const
|
|
934
|
+
const stateClasses2 = {
|
|
935
935
|
enabled: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
936
936
|
disabled: "text-[color:var(--deframe-widget-color-text-primary-disabled)]"
|
|
937
937
|
};
|
|
938
938
|
const textClasses = tailwindMerge.twMerge(
|
|
939
|
-
|
|
940
|
-
|
|
939
|
+
baseClasses2,
|
|
940
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
941
941
|
className
|
|
942
942
|
);
|
|
943
943
|
return React6__namespace.createElement(
|
|
@@ -983,14 +983,14 @@ var TextAccent = React6__namespace.forwardRef(
|
|
|
983
983
|
"[font-weight:var(--deframe-widget-font-weight-semibold)]"
|
|
984
984
|
].join(" ")
|
|
985
985
|
};
|
|
986
|
-
const
|
|
986
|
+
const stateClasses2 = {
|
|
987
987
|
enabled: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
988
988
|
disabled: "text-[color:var(--deframe-widget-color-text-primary-disabled)]"
|
|
989
989
|
};
|
|
990
990
|
const variantClass = accentVariants[variant];
|
|
991
991
|
const accentClasses = tailwindMerge.twMerge(
|
|
992
992
|
variantClass,
|
|
993
|
-
|
|
993
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
994
994
|
className
|
|
995
995
|
);
|
|
996
996
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1037,14 +1037,14 @@ var TextBody = React6__namespace.forwardRef(
|
|
|
1037
1037
|
"[font-weight:var(--deframe-widget-font-weight-regular)]"
|
|
1038
1038
|
].join(" ")
|
|
1039
1039
|
};
|
|
1040
|
-
const
|
|
1040
|
+
const stateClasses2 = {
|
|
1041
1041
|
enabled: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
1042
1042
|
disabled: "text-[color:var(--deframe-widget-color-text-primary-disabled)]"
|
|
1043
1043
|
};
|
|
1044
1044
|
const variantClass = bodyVariants[variant];
|
|
1045
1045
|
const bodyClasses = tailwindMerge.twMerge(
|
|
1046
1046
|
variantClass,
|
|
1047
|
-
|
|
1047
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
1048
1048
|
className
|
|
1049
1049
|
);
|
|
1050
1050
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1106,14 +1106,14 @@ var TextHeading = React6__namespace.forwardRef(
|
|
|
1106
1106
|
"[font-weight:var(--deframe-widget-font-weight-bold)]"
|
|
1107
1107
|
].join(" ")
|
|
1108
1108
|
};
|
|
1109
|
-
const
|
|
1109
|
+
const stateClasses2 = {
|
|
1110
1110
|
enabled: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
1111
1111
|
disabled: "text-[color:var(--deframe-widget-color-text-primary-disabled)]"
|
|
1112
1112
|
};
|
|
1113
1113
|
const variantClass = headingVariants[variant];
|
|
1114
1114
|
const headingClasses = tailwindMerge.twMerge(
|
|
1115
1115
|
variantClass,
|
|
1116
|
-
|
|
1116
|
+
stateClasses2[disabled ? "disabled" : "enabled"],
|
|
1117
1117
|
className
|
|
1118
1118
|
);
|
|
1119
1119
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1599,7 +1599,7 @@ var Skeleton = (_a) => {
|
|
|
1599
1599
|
Skeleton.displayName = "Skeleton";
|
|
1600
1600
|
function BannerNotificationIcon(_a) {
|
|
1601
1601
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1602
|
-
const
|
|
1602
|
+
const baseClasses2 = [
|
|
1603
1603
|
"flex items-center justify-center",
|
|
1604
1604
|
"flex-shrink-0",
|
|
1605
1605
|
"[font-size:var(--deframe-widget-font-size-xxl)]"
|
|
@@ -1609,19 +1609,19 @@ function BannerNotificationIcon(_a) {
|
|
|
1609
1609
|
__spreadValues({
|
|
1610
1610
|
"data-slot": "banner-notification-icon",
|
|
1611
1611
|
"data-test-id": "banner-notification-icon",
|
|
1612
|
-
className: tailwindMerge.twMerge(
|
|
1612
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
1613
1613
|
}, props)
|
|
1614
1614
|
);
|
|
1615
1615
|
}
|
|
1616
1616
|
function BannerNotificationContent(_a) {
|
|
1617
1617
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1618
|
-
const
|
|
1618
|
+
const baseClasses2 = "flex-1 min-w-0 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)]";
|
|
1619
1619
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1620
1620
|
"div",
|
|
1621
1621
|
__spreadValues({
|
|
1622
1622
|
"data-slot": "banner-notification-content",
|
|
1623
1623
|
"data-test-id": "banner-notification-content",
|
|
1624
|
-
className: tailwindMerge.twMerge(
|
|
1624
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
1625
1625
|
}, props)
|
|
1626
1626
|
);
|
|
1627
1627
|
}
|
|
@@ -1652,7 +1652,7 @@ function BannerNotificationMessage(_a) {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
function BannerNotificationClose(_a) {
|
|
1654
1654
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1655
|
-
const
|
|
1655
|
+
const baseClasses2 = [
|
|
1656
1656
|
"flex-shrink-0",
|
|
1657
1657
|
"self-start",
|
|
1658
1658
|
"[font-size:var(--deframe-widget-font-size-xl)]",
|
|
@@ -1664,7 +1664,7 @@ function BannerNotificationClose(_a) {
|
|
|
1664
1664
|
"data-slot": "banner-notification-close",
|
|
1665
1665
|
"data-test-id": "banner-notification-close",
|
|
1666
1666
|
"aria-label": "Close notification",
|
|
1667
|
-
className: tailwindMerge.twMerge(
|
|
1667
|
+
className: tailwindMerge.twMerge(baseClasses2, className)
|
|
1668
1668
|
}, props)
|
|
1669
1669
|
);
|
|
1670
1670
|
}
|
|
@@ -1763,7 +1763,7 @@ var BannerNotification = (_a) => {
|
|
|
1763
1763
|
const v = variant;
|
|
1764
1764
|
const t = type;
|
|
1765
1765
|
const p = position;
|
|
1766
|
-
const
|
|
1766
|
+
const baseClasses2 = [
|
|
1767
1767
|
"flex items-center",
|
|
1768
1768
|
"[gap:var(--deframe-widget-size-gap-md)]",
|
|
1769
1769
|
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
@@ -1781,7 +1781,7 @@ var BannerNotification = (_a) => {
|
|
|
1781
1781
|
].join(" ")
|
|
1782
1782
|
};
|
|
1783
1783
|
const bannerClasses = tailwindMerge.twMerge(
|
|
1784
|
-
|
|
1784
|
+
baseClasses2,
|
|
1785
1785
|
typeClasses[t],
|
|
1786
1786
|
t === "toast" ? "text-white" : variantTextClasses[v],
|
|
1787
1787
|
isExiting && "opacity-0 -translate-y-2",
|
|
@@ -2243,13 +2243,13 @@ function DeframeComponentsProvider({
|
|
|
2243
2243
|
);
|
|
2244
2244
|
}
|
|
2245
2245
|
var InfoRow = ({ children, borderBottom, className }) => {
|
|
2246
|
-
const
|
|
2246
|
+
const baseClasses2 = "self-stretch inline-flex justify-between items-start";
|
|
2247
2247
|
const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
|
|
2248
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row", className: tailwindMerge.twMerge(
|
|
2248
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row", className: tailwindMerge.twMerge(baseClasses2, borderClasses, className), children });
|
|
2249
2249
|
};
|
|
2250
2250
|
var InfoLabel = ({ children, className }) => {
|
|
2251
|
-
const
|
|
2252
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-label", className: tailwindMerge.twMerge(
|
|
2251
|
+
const baseClasses2 = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
|
|
2252
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-label", className: tailwindMerge.twMerge(baseClasses2, className), children });
|
|
2253
2253
|
};
|
|
2254
2254
|
var variantClasses = {
|
|
2255
2255
|
default: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
@@ -2258,24 +2258,24 @@ var variantClasses = {
|
|
|
2258
2258
|
error: "text-[color:var(--deframe-widget-color-state-error)]"
|
|
2259
2259
|
};
|
|
2260
2260
|
var InfoValue = ({ children, variant = "default", className }) => {
|
|
2261
|
-
const
|
|
2262
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-value", className: tailwindMerge.twMerge(
|
|
2261
|
+
const baseClasses2 = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)]";
|
|
2262
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-value", className: tailwindMerge.twMerge(baseClasses2, variantClasses[variant], className), children });
|
|
2263
2263
|
};
|
|
2264
2264
|
var InfoRowWithIcon = ({ children, borderBottom, className }) => {
|
|
2265
|
-
const
|
|
2265
|
+
const baseClasses2 = "flex items-start justify-between h-[17px]";
|
|
2266
2266
|
const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
|
|
2267
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row-with-icon", className: tailwindMerge.twMerge(
|
|
2267
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row-with-icon", className: tailwindMerge.twMerge(baseClasses2, borderClasses, className), children });
|
|
2268
2268
|
};
|
|
2269
2269
|
var InfoRowIconLabel = ({ children, className }) => {
|
|
2270
|
-
const
|
|
2271
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "info-row-icon-label", className: tailwindMerge.twMerge(
|
|
2270
|
+
const baseClasses2 = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
|
|
2271
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "info-row-icon-label", className: tailwindMerge.twMerge(baseClasses2, className), children: [
|
|
2272
2272
|
"\u2022 ",
|
|
2273
2273
|
children
|
|
2274
2274
|
] });
|
|
2275
2275
|
};
|
|
2276
2276
|
var InfoRowIconValue = ({ children, className }) => {
|
|
2277
|
-
const
|
|
2278
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row-icon-value", className: tailwindMerge.twMerge(
|
|
2277
|
+
const baseClasses2 = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]";
|
|
2278
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "info-row-icon-value", className: tailwindMerge.twMerge(baseClasses2, className), children });
|
|
2279
2279
|
};
|
|
2280
2280
|
var CollapsibleInfoRow = ({
|
|
2281
2281
|
label,
|
|
@@ -2287,8 +2287,8 @@ var CollapsibleInfoRow = ({
|
|
|
2287
2287
|
expandLabel
|
|
2288
2288
|
}) => {
|
|
2289
2289
|
const [isOpen, setIsOpen] = React6__namespace.default.useState(defaultOpen);
|
|
2290
|
-
const
|
|
2291
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "collapsible-info-row", className: tailwindMerge.twMerge(
|
|
2290
|
+
const baseClasses2 = "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] w-full";
|
|
2291
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "collapsible-info-row", className: tailwindMerge.twMerge(baseClasses2, className), children: [
|
|
2292
2292
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2293
2293
|
"button",
|
|
2294
2294
|
{
|
|
@@ -2310,16 +2310,16 @@ var CollapsibleInfoRow = ({
|
|
|
2310
2310
|
] });
|
|
2311
2311
|
};
|
|
2312
2312
|
var BackgroundContainer = ({ children, className }) => {
|
|
2313
|
-
const
|
|
2314
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "background-container", className: tailwindMerge.twMerge(
|
|
2313
|
+
const baseClasses2 = "w-full flex-1 min-h-0 px-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] text-[color:var(--deframe-widget-color-text-primary)] flex flex-col relative overflow-y-auto";
|
|
2314
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "background-container", className: tailwindMerge.twMerge(baseClasses2, className), children });
|
|
2315
2315
|
};
|
|
2316
2316
|
var SectionCard = ({ children, className }) => {
|
|
2317
|
-
const
|
|
2318
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "section-card", className: tailwindMerge.twMerge(
|
|
2317
|
+
const baseClasses2 = "bg-[var(--deframe-widget-color-bg-secondary)] lg:!bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] shadow-[0_2px_8px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_18%,transparent)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] flex flex-col gap-[var(--deframe-widget-size-gap-sm)]";
|
|
2318
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "section-card", className: tailwindMerge.twMerge(baseClasses2, className), children });
|
|
2319
2319
|
};
|
|
2320
2320
|
var Navbar = ({ children, className }) => {
|
|
2321
|
-
const
|
|
2322
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "data-test-id": "navbar", className: tailwindMerge.twMerge(
|
|
2321
|
+
const baseClasses2 = "w-full px-[var(--deframe-widget-size-padding-x-sm)] pr-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)] border-b items-center border-[color:var(--deframe-widget-color-border-tertiary)] flex";
|
|
2322
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "data-test-id": "navbar", className: tailwindMerge.twMerge(baseClasses2, className), children });
|
|
2323
2323
|
};
|
|
2324
2324
|
var gapClasses = {
|
|
2325
2325
|
xs: "gap-[var(--deframe-widget-size-gap-xs)]",
|
|
@@ -2328,8 +2328,8 @@ var gapClasses = {
|
|
|
2328
2328
|
lg: "gap-[var(--deframe-widget-size-gap-lg)]"
|
|
2329
2329
|
};
|
|
2330
2330
|
var FlexCol = ({ children, className, gap = "xs" }) => {
|
|
2331
|
-
const
|
|
2332
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "flex-col", className: tailwindMerge.twMerge(
|
|
2331
|
+
const baseClasses2 = "flex flex-col";
|
|
2332
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "flex-col", className: tailwindMerge.twMerge(baseClasses2, gapClasses[gap], className), children });
|
|
2333
2333
|
};
|
|
2334
2334
|
var gapClasses2 = {
|
|
2335
2335
|
xs: "gap-[var(--deframe-widget-size-gap-xs)]",
|
|
@@ -2338,16 +2338,16 @@ var gapClasses2 = {
|
|
|
2338
2338
|
lg: "gap-[var(--deframe-widget-size-gap-lg)]"
|
|
2339
2339
|
};
|
|
2340
2340
|
var FlexRow = ({ children, className, gap = "xs" }) => {
|
|
2341
|
-
const
|
|
2342
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "flex-row", className: tailwindMerge.twMerge(
|
|
2341
|
+
const baseClasses2 = "flex items-center";
|
|
2342
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "flex-row", className: tailwindMerge.twMerge(baseClasses2, gapClasses2[gap], className), children });
|
|
2343
2343
|
};
|
|
2344
2344
|
var ScrollableContent = ({ children, className }) => {
|
|
2345
|
-
const
|
|
2346
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "scrollable-content", className: tailwindMerge.twMerge(
|
|
2345
|
+
const baseClasses2 = "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]";
|
|
2346
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "scrollable-content", className: tailwindMerge.twMerge(baseClasses2, className), children });
|
|
2347
2347
|
};
|
|
2348
2348
|
var DetailsHeader = ({ title, onBack, className, backAriaLabel = "Back" }) => {
|
|
2349
|
-
const
|
|
2350
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "details-header", className: tailwindMerge.twMerge(
|
|
2349
|
+
const baseClasses2 = "w-full px-[var(--deframe-widget-size-padding-x-sm)] pr-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)] border-b border-[color:var(--deframe-widget-color-border-tertiary)] flex items-center";
|
|
2350
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "details-header", className: tailwindMerge.twMerge(baseClasses2, className), children: [
|
|
2351
2351
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2352
2352
|
"button",
|
|
2353
2353
|
{
|
|
@@ -2362,8 +2362,8 @@ var DetailsHeader = ({ title, onBack, className, backAriaLabel = "Back" }) => {
|
|
|
2362
2362
|
] });
|
|
2363
2363
|
};
|
|
2364
2364
|
var HighRiskBadge = ({ className, label }) => {
|
|
2365
|
-
const
|
|
2366
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "high-risk-badge", className: tailwindMerge.twMerge(
|
|
2365
|
+
const baseClasses2 = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2366
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "high-risk-badge", className: tailwindMerge.twMerge(baseClasses2, className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2367
2367
|
"div",
|
|
2368
2368
|
{
|
|
2369
2369
|
"data-size": "Small",
|
|
@@ -2374,8 +2374,8 @@ var HighRiskBadge = ({ className, label }) => {
|
|
|
2374
2374
|
) });
|
|
2375
2375
|
};
|
|
2376
2376
|
var MediumRiskBadge = ({ className, label }) => {
|
|
2377
|
-
const
|
|
2378
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "medium-risk-badge", className: tailwindMerge.twMerge(
|
|
2377
|
+
const baseClasses2 = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2378
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "medium-risk-badge", className: tailwindMerge.twMerge(baseClasses2, className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2379
2379
|
"div",
|
|
2380
2380
|
{
|
|
2381
2381
|
"data-size": "Small",
|
|
@@ -2386,8 +2386,8 @@ var MediumRiskBadge = ({ className, label }) => {
|
|
|
2386
2386
|
) });
|
|
2387
2387
|
};
|
|
2388
2388
|
var LowRiskBadge = ({ className, label }) => {
|
|
2389
|
-
const
|
|
2390
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "low-risk-badge", className: tailwindMerge.twMerge(
|
|
2389
|
+
const baseClasses2 = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
|
|
2390
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "low-risk-badge", className: tailwindMerge.twMerge(baseClasses2, className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2391
2391
|
"div",
|
|
2392
2392
|
{
|
|
2393
2393
|
"data-size": "Small",
|
|
@@ -2411,7 +2411,7 @@ var ProcessingBadge = ({
|
|
|
2411
2411
|
size = "default"
|
|
2412
2412
|
}) => {
|
|
2413
2413
|
const isCompact = size === "compact";
|
|
2414
|
-
const
|
|
2414
|
+
const baseClasses2 = [
|
|
2415
2415
|
"inline-flex max-w-fit items-center gap-[var(--deframe-widget-size-gap-xs)] rounded-[var(--deframe-widget-size-radius-full)] border",
|
|
2416
2416
|
"text-[color:var(--deframe-widget-color-state-info)]",
|
|
2417
2417
|
"bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-info)_18%,transparent)]",
|
|
@@ -2422,7 +2422,7 @@ var ProcessingBadge = ({
|
|
|
2422
2422
|
compact: "px-[calc(var(--deframe-widget-size-padding-x-xs)+2px)] py-[2px]"
|
|
2423
2423
|
};
|
|
2424
2424
|
const processingBadgeClasses = tailwindMerge.twMerge(
|
|
2425
|
-
|
|
2425
|
+
baseClasses2,
|
|
2426
2426
|
sizeClasses[isCompact ? "compact" : "default"],
|
|
2427
2427
|
className
|
|
2428
2428
|
);
|
|
@@ -4276,7 +4276,7 @@ var SwapAmountInputView = ({
|
|
|
4276
4276
|
}
|
|
4277
4277
|
return val;
|
|
4278
4278
|
};
|
|
4279
|
-
const
|
|
4279
|
+
const baseClasses2 = "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] bg-transparent outline-none text-right w-full min-w-[120px] placeholder:text-[color:var(--deframe-widget-color-text-primary-disabled)]";
|
|
4280
4280
|
const colorClasses = hasError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-primary)]";
|
|
4281
4281
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4282
4282
|
"input",
|
|
@@ -4290,7 +4290,7 @@ var SwapAmountInputView = ({
|
|
|
4290
4290
|
min: "0",
|
|
4291
4291
|
step: "any",
|
|
4292
4292
|
value,
|
|
4293
|
-
className: tailwindMerge.twMerge(
|
|
4293
|
+
className: tailwindMerge.twMerge(baseClasses2, colorClasses, className)
|
|
4294
4294
|
}, field), {
|
|
4295
4295
|
onChange: (event) => {
|
|
4296
4296
|
let normalized = normalizeAmountInput(event.target.value);
|
|
@@ -5842,14 +5842,14 @@ var SwapTokenSelectorView = ({
|
|
|
5842
5842
|
selectTokenLabel = "Select token",
|
|
5843
5843
|
className
|
|
5844
5844
|
}) => {
|
|
5845
|
-
const
|
|
5845
|
+
const baseClasses2 = "h-[56px] border border-[color:var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] overflow-hidden hover:border-[color:var(--deframe-widget-color-border-primary)] transition-colors flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[6px] w-full cursor-pointer";
|
|
5846
5846
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5847
5847
|
"button",
|
|
5848
5848
|
{
|
|
5849
5849
|
"data-test-id": testId,
|
|
5850
5850
|
type: "button",
|
|
5851
5851
|
onClick,
|
|
5852
|
-
className: tailwindMerge.twMerge(
|
|
5852
|
+
className: tailwindMerge.twMerge(baseClasses2, className),
|
|
5853
5853
|
"aria-label": token ? token.symbol : selectTokenLabel,
|
|
5854
5854
|
children: [
|
|
5855
5855
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: token ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -5869,8 +5869,8 @@ var SwapNetworkSelectorView = ({
|
|
|
5869
5869
|
testId = "swap-network-selector",
|
|
5870
5870
|
className
|
|
5871
5871
|
}) => {
|
|
5872
|
-
const
|
|
5873
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": testId, className: tailwindMerge.twMerge(
|
|
5872
|
+
const baseClasses2 = "flex flex-row items-center gap-[var(--deframe-widget-size-gap-xs)]";
|
|
5873
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": testId, className: tailwindMerge.twMerge(baseClasses2, className), children: [
|
|
5874
5874
|
/* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "tracking-wide text-[color:var(--deframe-widget-color-text-tertiary)]", children: directionLabel }),
|
|
5875
5875
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5876
5876
|
"button",
|
|
@@ -5991,8 +5991,8 @@ var SwapOutputAmountView = ({
|
|
|
5991
5991
|
searchingQuoteLabel = "Searching quote...",
|
|
5992
5992
|
className
|
|
5993
5993
|
}) => {
|
|
5994
|
-
const
|
|
5995
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-flow-output-amount", className: tailwindMerge.twMerge(
|
|
5994
|
+
const baseClasses2 = "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] text-right w-full min-w-[120px] text-[color:var(--deframe-widget-color-text-primary)]";
|
|
5995
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-flow-output-amount", className: tailwindMerge.twMerge(baseClasses2, className), children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-primary-disabled)] inline-flex items-center", children: loadingElement != null ? loadingElement : searchingQuoteLabel }) : displayOutput });
|
|
5996
5996
|
};
|
|
5997
5997
|
var SwapToCardView = ({
|
|
5998
5998
|
labels,
|
|
@@ -6071,10 +6071,67 @@ var SwapToCardView = ({
|
|
|
6071
6071
|
] })
|
|
6072
6072
|
] }) });
|
|
6073
6073
|
};
|
|
6074
|
+
var baseClasses = [
|
|
6075
|
+
"flex-1 inline-flex items-center justify-center",
|
|
6076
|
+
"py-[3px] px-[10px]",
|
|
6077
|
+
"rounded-[var(--deframe-widget-size-radius-full)]",
|
|
6078
|
+
"cursor-pointer text-[12px] transition-all duration-150 outline-none",
|
|
6079
|
+
"font-[var(--deframe-widget-font-family)] whitespace-nowrap border"
|
|
6080
|
+
].join(" ");
|
|
6081
|
+
var stateClasses = {
|
|
6082
|
+
active: [
|
|
6083
|
+
"border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
|
|
6084
|
+
"bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
|
|
6085
|
+
"text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
6086
|
+
"[font-weight:var(--deframe-widget-font-weight-semibold)]"
|
|
6087
|
+
].join(" "),
|
|
6088
|
+
default: [
|
|
6089
|
+
"border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
6090
|
+
"bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_84%,transparent)]",
|
|
6091
|
+
"text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
6092
|
+
"[font-weight:var(--deframe-widget-font-weight-regular)]",
|
|
6093
|
+
"hover:border-[color:var(--deframe-widget-color-border-primary)]",
|
|
6094
|
+
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
|
|
6095
|
+
"hover:text-[color:var(--deframe-widget-color-text-primary)]"
|
|
6096
|
+
].join(" ")
|
|
6097
|
+
};
|
|
6098
|
+
function SlippageChip({
|
|
6099
|
+
options = [],
|
|
6100
|
+
selected = void 0,
|
|
6101
|
+
onSelect,
|
|
6102
|
+
formatLabel,
|
|
6103
|
+
className
|
|
6104
|
+
}) {
|
|
6105
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6106
|
+
"div",
|
|
6107
|
+
{
|
|
6108
|
+
"data-test-id": "slippage-chips",
|
|
6109
|
+
"data-slot": "slippage-chips",
|
|
6110
|
+
className: tailwindMerge.twMerge("flex w-full gap-sm", className),
|
|
6111
|
+
children: options.map((bps) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6112
|
+
"button",
|
|
6113
|
+
{
|
|
6114
|
+
"data-test-id": "slippage-chip",
|
|
6115
|
+
"data-slot": "slippage-chip",
|
|
6116
|
+
type: "button",
|
|
6117
|
+
onClick: () => onSelect(bps),
|
|
6118
|
+
className: tailwindMerge.twMerge(baseClasses, stateClasses[bps === selected ? "active" : "default"]),
|
|
6119
|
+
children: formatLabel(bps)
|
|
6120
|
+
},
|
|
6121
|
+
String(bps)
|
|
6122
|
+
))
|
|
6123
|
+
}
|
|
6124
|
+
);
|
|
6125
|
+
}
|
|
6074
6126
|
var SwapAdvancedSettingsView = ({
|
|
6075
6127
|
title,
|
|
6076
6128
|
isOpen,
|
|
6077
6129
|
onOpenChange,
|
|
6130
|
+
slippageBps,
|
|
6131
|
+
onSlippageSelect,
|
|
6132
|
+
formatPercentage,
|
|
6133
|
+
slippageOptions,
|
|
6134
|
+
slippageLabel,
|
|
6078
6135
|
percentageOptions,
|
|
6079
6136
|
onPercentageClick,
|
|
6080
6137
|
slippageFormatted,
|
|
@@ -6091,19 +6148,33 @@ var SwapAdvancedSettingsView = ({
|
|
|
6091
6148
|
onOpenChange,
|
|
6092
6149
|
collapseText,
|
|
6093
6150
|
expandText,
|
|
6094
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6151
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-sm", children: [
|
|
6152
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full gap-sm", children: percentageOptions.map((pct, index) => {
|
|
6153
|
+
const isMax = index === percentageOptions.length - 1;
|
|
6154
|
+
const label = isMax ? maxLabel : `${pct / 100}%`;
|
|
6155
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6156
|
+
PercentageButton,
|
|
6157
|
+
{
|
|
6158
|
+
type: "button",
|
|
6159
|
+
onClick: () => onPercentageClick(pct),
|
|
6160
|
+
children: label
|
|
6161
|
+
},
|
|
6162
|
+
pct
|
|
6163
|
+
);
|
|
6164
|
+
}) }),
|
|
6165
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-xs w-full", children: [
|
|
6166
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-secondary)] font-[var(--deframe-widget-font-family)]", children: slippageLabel }),
|
|
6167
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6168
|
+
SlippageChip,
|
|
6169
|
+
{
|
|
6170
|
+
options: slippageOptions,
|
|
6171
|
+
selected: slippageBps,
|
|
6172
|
+
onSelect: onSlippageSelect,
|
|
6173
|
+
formatLabel: formatPercentage
|
|
6174
|
+
}
|
|
6175
|
+
)
|
|
6176
|
+
] })
|
|
6177
|
+
] })
|
|
6107
6178
|
}
|
|
6108
6179
|
) }) });
|
|
6109
6180
|
};
|
|
@@ -6112,8 +6183,8 @@ var SwapQuoteHeaderView = ({
|
|
|
6112
6183
|
timerElement,
|
|
6113
6184
|
className
|
|
6114
6185
|
}) => {
|
|
6115
|
-
const
|
|
6116
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-header", className: tailwindMerge.twMerge(
|
|
6186
|
+
const baseClasses2 = "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]";
|
|
6187
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-header", className: tailwindMerge.twMerge(baseClasses2, className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
6117
6188
|
/* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "[font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-secondary)] inline-flex items-center", children: label }),
|
|
6118
6189
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-md)]", children: timerElement })
|
|
6119
6190
|
] }) });
|
|
@@ -6821,7 +6892,7 @@ function ChevronDown() {
|
|
|
6821
6892
|
);
|
|
6822
6893
|
}
|
|
6823
6894
|
function ChipPill({ label, active, onClick }) {
|
|
6824
|
-
const
|
|
6895
|
+
const baseClasses2 = tailwindMerge.twMerge(
|
|
6825
6896
|
"inline-flex items-center justify-center",
|
|
6826
6897
|
"py-[3px] px-[10px]",
|
|
6827
6898
|
"rounded-[var(--deframe-widget-size-radius-full)]",
|
|
@@ -6833,7 +6904,7 @@ function ChipPill({ label, active, onClick }) {
|
|
|
6833
6904
|
"whitespace-nowrap",
|
|
6834
6905
|
"border"
|
|
6835
6906
|
);
|
|
6836
|
-
const
|
|
6907
|
+
const stateClasses2 = active ? tailwindMerge.twMerge(
|
|
6837
6908
|
"border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
|
|
6838
6909
|
"bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
|
|
6839
6910
|
"text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
@@ -6854,7 +6925,7 @@ function ChipPill({ label, active, onClick }) {
|
|
|
6854
6925
|
type: "button",
|
|
6855
6926
|
onClick,
|
|
6856
6927
|
"aria-label": label,
|
|
6857
|
-
className: tailwindMerge.twMerge(
|
|
6928
|
+
className: tailwindMerge.twMerge(baseClasses2, stateClasses2),
|
|
6858
6929
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-test-id": "swap-from-card-simple-chip-label", children: label })
|
|
6859
6930
|
}
|
|
6860
6931
|
);
|
|
@@ -7289,9 +7360,13 @@ var SwapFormViewSimple = ({
|
|
|
7289
7360
|
if (!advancedSettings.isOpen) setShowPanel(false);
|
|
7290
7361
|
}, [advancedSettings.isOpen]);
|
|
7291
7362
|
const updatePanelPos = React6.useCallback(() => {
|
|
7292
|
-
if (containerRef.current
|
|
7293
|
-
|
|
7294
|
-
|
|
7363
|
+
if (!containerRef.current || !showPanel) return;
|
|
7364
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
7365
|
+
const GAP = 16;
|
|
7366
|
+
if (window.innerWidth < 640) {
|
|
7367
|
+
setPanelPos({ top: rect.bottom + GAP, left: rect.left, width: rect.width });
|
|
7368
|
+
} else {
|
|
7369
|
+
setPanelPos({ top: rect.top, left: rect.right + GAP });
|
|
7295
7370
|
}
|
|
7296
7371
|
}, [showPanel]);
|
|
7297
7372
|
React6.useEffect(() => {
|
|
@@ -7405,15 +7480,21 @@ var SwapFormViewSimple = ({
|
|
|
7405
7480
|
{
|
|
7406
7481
|
"data-test-id": "swap-form-simple-advanced-panel",
|
|
7407
7482
|
className: tailwindMerge.twMerge(
|
|
7408
|
-
"fixed",
|
|
7409
|
-
"w-[320px]
|
|
7483
|
+
"fixed z-[9999]",
|
|
7484
|
+
!panelPos.width && "w-[320px]",
|
|
7410
7485
|
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
7411
7486
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
7412
7487
|
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
7413
7488
|
"shadow-[0px_4px_24px_0px_#0000003D]",
|
|
7414
|
-
"font-[var(--deframe-widget-font-family)]"
|
|
7489
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
7490
|
+
"overflow-y-auto"
|
|
7415
7491
|
),
|
|
7416
|
-
style: {
|
|
7492
|
+
style: __spreadProps(__spreadValues({
|
|
7493
|
+
top: panelPos.top,
|
|
7494
|
+
left: panelPos.left
|
|
7495
|
+
}, panelPos.width && { width: panelPos.width }), {
|
|
7496
|
+
maxHeight: `calc(100vh - ${panelPos.top}px - 16px)`
|
|
7497
|
+
}),
|
|
7417
7498
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7418
7499
|
AdvancedPanelContent,
|
|
7419
7500
|
{
|
|
@@ -7572,6 +7653,7 @@ function AdvancedPill({ label, isOpen, onClick }) {
|
|
|
7572
7653
|
);
|
|
7573
7654
|
}
|
|
7574
7655
|
function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
7656
|
+
const handleSlippageSelect = advancedSettings.onSlippageSelect;
|
|
7575
7657
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7576
7658
|
"div",
|
|
7577
7659
|
{
|
|
@@ -7645,9 +7727,18 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
7645
7727
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.blockchainCostsLabel, value: transactionDetails.totalCostFormatted }),
|
|
7646
7728
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.networkGasLabel, value: transactionDetails.gasCostFormatted }),
|
|
7647
7729
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.protocolFeeLabel, value: transactionDetails.protocolFee }),
|
|
7648
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7730
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7731
|
+
SlippageDetailRow,
|
|
7732
|
+
{
|
|
7733
|
+
label: transactionDetails.labels.slippageLabel,
|
|
7734
|
+
options: advancedSettings.slippageOptions,
|
|
7735
|
+
selected: advancedSettings.slippageBps,
|
|
7736
|
+
onSelect: handleSlippageSelect,
|
|
7737
|
+
formatLabel: advancedSettings.formatPercentage
|
|
7738
|
+
}
|
|
7739
|
+
),
|
|
7649
7740
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.etaLabel, value: transactionDetails.etaFormatted }),
|
|
7650
|
-
transactionDetails.quoteId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7741
|
+
transactionDetails.quoteId && /* @__PURE__ */ jsxRuntime.jsx(QuoteIdRow, { label: transactionDetails.labels.quoteIdLabel, quoteId: transactionDetails.quoteId })
|
|
7651
7742
|
]
|
|
7652
7743
|
}
|
|
7653
7744
|
);
|
|
@@ -7680,6 +7771,61 @@ function DetailRow({ label, value }) {
|
|
|
7680
7771
|
}
|
|
7681
7772
|
);
|
|
7682
7773
|
}
|
|
7774
|
+
function SlippageDetailRow({ label, options, selected, onSelect: handleSelect, formatLabel }) {
|
|
7775
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7776
|
+
"div",
|
|
7777
|
+
{
|
|
7778
|
+
"data-test-id": "swap-form-simple-slippage-row",
|
|
7779
|
+
className: "flex flex-col py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
|
|
7780
|
+
children: [
|
|
7781
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7782
|
+
"span",
|
|
7783
|
+
{
|
|
7784
|
+
"data-test-id": "swap-form-simple-detail-row-label",
|
|
7785
|
+
className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.07em] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
|
|
7786
|
+
children: label
|
|
7787
|
+
}
|
|
7788
|
+
),
|
|
7789
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7790
|
+
SlippageChip,
|
|
7791
|
+
{
|
|
7792
|
+
options,
|
|
7793
|
+
selected,
|
|
7794
|
+
onSelect: handleSelect,
|
|
7795
|
+
formatLabel,
|
|
7796
|
+
className: "w-full gap-[4px] [&_button]:py-[2px] [&_button]:px-[7px] [&_button]:text-[11px]"
|
|
7797
|
+
}
|
|
7798
|
+
)
|
|
7799
|
+
]
|
|
7800
|
+
}
|
|
7801
|
+
);
|
|
7802
|
+
}
|
|
7803
|
+
function QuoteIdRow({ label, quoteId }) {
|
|
7804
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7805
|
+
"div",
|
|
7806
|
+
{
|
|
7807
|
+
"data-test-id": "swap-form-simple-quote-id-row",
|
|
7808
|
+
className: "flex justify-between items-center py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
|
|
7809
|
+
children: [
|
|
7810
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7811
|
+
"span",
|
|
7812
|
+
{
|
|
7813
|
+
"data-test-id": "swap-form-simple-detail-row-label",
|
|
7814
|
+
className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.07em] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)] flex-shrink-0",
|
|
7815
|
+
children: label
|
|
7816
|
+
}
|
|
7817
|
+
),
|
|
7818
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7819
|
+
AddressDisplay,
|
|
7820
|
+
{
|
|
7821
|
+
address: quoteId,
|
|
7822
|
+
className: "py-[3px] px-[8px] max-w-[150px] min-w-0"
|
|
7823
|
+
}
|
|
7824
|
+
)
|
|
7825
|
+
]
|
|
7826
|
+
}
|
|
7827
|
+
);
|
|
7828
|
+
}
|
|
7683
7829
|
var ChooseANetworkView = ({
|
|
7684
7830
|
labels,
|
|
7685
7831
|
autoFocus = true,
|
|
@@ -7781,7 +7927,7 @@ function useIsMobile(breakpoint = 640) {
|
|
|
7781
7927
|
return isMobile;
|
|
7782
7928
|
}
|
|
7783
7929
|
function CloseButtonInline({ onClick, ariaLabel }) {
|
|
7784
|
-
const
|
|
7930
|
+
const baseClasses2 = [
|
|
7785
7931
|
"inline-flex items-center justify-center",
|
|
7786
7932
|
"w-9 h-9",
|
|
7787
7933
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
@@ -7800,7 +7946,7 @@ function CloseButtonInline({ onClick, ariaLabel }) {
|
|
|
7800
7946
|
"data-test-id": "close-button",
|
|
7801
7947
|
onClick,
|
|
7802
7948
|
"aria-label": ariaLabel,
|
|
7803
|
-
className:
|
|
7949
|
+
className: baseClasses2,
|
|
7804
7950
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7805
7951
|
"svg",
|
|
7806
7952
|
{
|
|
@@ -7860,7 +8006,7 @@ function hasSignificantBalance(balanceUsd) {
|
|
|
7860
8006
|
return !isNaN(num) && num >= 0.01;
|
|
7861
8007
|
}
|
|
7862
8008
|
function NetworkRow({ network, selected, onClick, onKeyDown, index }) {
|
|
7863
|
-
const
|
|
8009
|
+
const baseClasses2 = [
|
|
7864
8010
|
"relative flex items-center gap-[10px]",
|
|
7865
8011
|
"py-[9px] px-[var(--deframe-widget-size-padding-x-sm)] pl-[14px]",
|
|
7866
8012
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
@@ -7869,11 +8015,11 @@ function NetworkRow({ network, selected, onClick, onKeyDown, index }) {
|
|
|
7869
8015
|
"mb-[var(--deframe-widget-size-gap-none)].5",
|
|
7870
8016
|
"transition-[background] duration-150"
|
|
7871
8017
|
].join(" ");
|
|
7872
|
-
const
|
|
8018
|
+
const stateClasses2 = {
|
|
7873
8019
|
selected: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
|
|
7874
8020
|
default: "bg-transparent hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
|
|
7875
8021
|
};
|
|
7876
|
-
const rowClasses = tailwindMerge.twMerge(
|
|
8022
|
+
const rowClasses = tailwindMerge.twMerge(baseClasses2, stateClasses2[selected ? "selected" : "default"]);
|
|
7877
8023
|
const nameClasses = [
|
|
7878
8024
|
"text-[14px] [font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
7879
8025
|
selected ? "text-[color:var(--deframe-widget-color-text-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
|
|
@@ -7938,7 +8084,7 @@ function NetworkRow({ network, selected, onClick, onKeyDown, index }) {
|
|
|
7938
8084
|
);
|
|
7939
8085
|
}
|
|
7940
8086
|
function NetworkChip({ network, selected, onClick }) {
|
|
7941
|
-
const
|
|
8087
|
+
const baseClasses2 = [
|
|
7942
8088
|
"inline-flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
|
|
7943
8089
|
"py-[var(--deframe-widget-size-padding-y-sm)] pl-[var(--deframe-widget-size-padding-x-sm)] pr-[14px]",
|
|
7944
8090
|
"rounded-[var(--deframe-widget-size-radius-full)]",
|
|
@@ -7949,11 +8095,11 @@ function NetworkChip({ network, selected, onClick }) {
|
|
|
7949
8095
|
"outline-none",
|
|
7950
8096
|
"border"
|
|
7951
8097
|
].join(" ");
|
|
7952
|
-
const
|
|
8098
|
+
const stateClasses2 = {
|
|
7953
8099
|
selected: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
|
|
7954
8100
|
default: "border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
|
|
7955
8101
|
};
|
|
7956
|
-
const buttonClasses = tailwindMerge.twMerge(
|
|
8102
|
+
const buttonClasses = tailwindMerge.twMerge(baseClasses2, stateClasses2[selected ? "selected" : "default"]);
|
|
7957
8103
|
const nameLabelClasses = [
|
|
7958
8104
|
"text-[13px] [font-weight:var(--deframe-widget-font-weight-medium)] leading-[1.2]",
|
|
7959
8105
|
selected ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
|
|
@@ -8087,7 +8233,7 @@ function AssetRowInline({
|
|
|
8087
8233
|
const priceUSD = Number(balance == null ? void 0 : balance.priceUSD) || token.priceInUSD || 0;
|
|
8088
8234
|
const formattedAmount = balance ? formatTokenAmount(balance.amountUI, priceUSD) : void 0;
|
|
8089
8235
|
const formattedUsd = balance ? formatCurrencyValue(parseFloat(balance.amountInUSD)) : void 0;
|
|
8090
|
-
const
|
|
8236
|
+
const baseClasses2 = [
|
|
8091
8237
|
"group",
|
|
8092
8238
|
"relative flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
|
|
8093
8239
|
"py-[10px] px-[14px]",
|
|
@@ -8095,7 +8241,7 @@ function AssetRowInline({
|
|
|
8095
8241
|
"cursor-pointer outline-none",
|
|
8096
8242
|
"transition-[background] duration-150"
|
|
8097
8243
|
].join(" ");
|
|
8098
|
-
const rowClasses = tailwindMerge.twMerge(
|
|
8244
|
+
const rowClasses = tailwindMerge.twMerge(baseClasses2, "bg-transparent hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]");
|
|
8099
8245
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8100
8246
|
"div",
|
|
8101
8247
|
{
|
|
@@ -9603,13 +9749,13 @@ var StrategyGridCardSimple = ({
|
|
|
9603
9749
|
);
|
|
9604
9750
|
};
|
|
9605
9751
|
var BackButton = ({ onClick, ariaLabel = "Back", className }) => {
|
|
9606
|
-
const
|
|
9752
|
+
const baseClasses2 = "w-12 h-12 rounded-[var(--deframe-widget-size-radius-full)] flex items-center justify-center text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-brand-primary)] transition-colors cursor-pointer";
|
|
9607
9753
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9608
9754
|
"button",
|
|
9609
9755
|
{
|
|
9610
9756
|
"data-test-id": "back-button",
|
|
9611
9757
|
onClick,
|
|
9612
|
-
className: tailwindMerge.twMerge(
|
|
9758
|
+
className: tailwindMerge.twMerge(baseClasses2, className),
|
|
9613
9759
|
"aria-label": ariaLabel,
|
|
9614
9760
|
children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiArrowLeft, { className: "w-6 h-6" })
|
|
9615
9761
|
}
|
|
@@ -11408,7 +11554,7 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
11408
11554
|
}) => {
|
|
11409
11555
|
const hasToken = selectedToken != null;
|
|
11410
11556
|
const isInteractive = !!onNetworkAndAssetClick;
|
|
11411
|
-
const
|
|
11557
|
+
const baseClasses2 = [
|
|
11412
11558
|
"inline-flex items-center gap-[10px]",
|
|
11413
11559
|
"h-[54px] px-[10px]",
|
|
11414
11560
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
@@ -11417,13 +11563,13 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
11417
11563
|
"transition-[background] duration-150",
|
|
11418
11564
|
"flex-shrink-0"
|
|
11419
11565
|
].join(" ");
|
|
11420
|
-
const
|
|
11566
|
+
const stateClasses2 = {
|
|
11421
11567
|
interactive: "cursor-pointer hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
|
|
11422
11568
|
static: "cursor-default"
|
|
11423
11569
|
};
|
|
11424
11570
|
const selectorClasses = tailwindMerge.twMerge(
|
|
11425
|
-
|
|
11426
|
-
|
|
11571
|
+
baseClasses2,
|
|
11572
|
+
stateClasses2[isInteractive ? "interactive" : "static"],
|
|
11427
11573
|
className
|
|
11428
11574
|
);
|
|
11429
11575
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11754,14 +11900,14 @@ var EarnInlineNotificationSimpleView = ({
|
|
|
11754
11900
|
variant,
|
|
11755
11901
|
message
|
|
11756
11902
|
}) => {
|
|
11757
|
-
const
|
|
11903
|
+
const baseClasses2 = [
|
|
11758
11904
|
"relative flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
|
|
11759
11905
|
"py-[7px] pr-[10px] pl-[14px]",
|
|
11760
11906
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11761
11907
|
"border",
|
|
11762
11908
|
"overflow-hidden"
|
|
11763
11909
|
].join(" ");
|
|
11764
|
-
const wrapperClasses = tailwindMerge.twMerge(
|
|
11910
|
+
const wrapperClasses = tailwindMerge.twMerge(baseClasses2, variantWrapperClasses[variant]);
|
|
11765
11911
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11766
11912
|
"div",
|
|
11767
11913
|
{
|