@deframe-sdk/components 0.1.56 → 0.1.57
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +283 -141
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +283 -141
- 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,66 @@ var SwapToCardView = ({
|
|
|
6071
6071
|
] })
|
|
6072
6072
|
] }) });
|
|
6073
6073
|
};
|
|
6074
|
+
var baseClasses = [
|
|
6075
|
+
"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 = null,
|
|
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 gap-[6px] items-center", 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
|
+
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,
|
|
6078
6134
|
percentageOptions,
|
|
6079
6135
|
onPercentageClick,
|
|
6080
6136
|
slippageFormatted,
|
|
@@ -6091,19 +6147,30 @@ var SwapAdvancedSettingsView = ({
|
|
|
6091
6147
|
onOpenChange,
|
|
6092
6148
|
collapseText,
|
|
6093
6149
|
expandText,
|
|
6094
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6098
|
-
PercentageButton,
|
|
6150
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-sm", children: [
|
|
6151
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6152
|
+
SlippageChip,
|
|
6099
6153
|
{
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
)
|
|
6106
|
-
|
|
6154
|
+
options: slippageOptions,
|
|
6155
|
+
selected: slippageBps,
|
|
6156
|
+
onSelect: onSlippageSelect,
|
|
6157
|
+
formatLabel: formatPercentage
|
|
6158
|
+
}
|
|
6159
|
+
),
|
|
6160
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full gap-sm", children: percentageOptions.map((pct, index) => {
|
|
6161
|
+
const isMax = index === percentageOptions.length - 1;
|
|
6162
|
+
const label = isMax ? maxLabel : `${pct / 100}%`;
|
|
6163
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6164
|
+
PercentageButton,
|
|
6165
|
+
{
|
|
6166
|
+
type: "button",
|
|
6167
|
+
onClick: () => onPercentageClick(pct),
|
|
6168
|
+
children: label
|
|
6169
|
+
},
|
|
6170
|
+
pct
|
|
6171
|
+
);
|
|
6172
|
+
}) })
|
|
6173
|
+
] })
|
|
6107
6174
|
}
|
|
6108
6175
|
) }) });
|
|
6109
6176
|
};
|
|
@@ -6112,8 +6179,8 @@ var SwapQuoteHeaderView = ({
|
|
|
6112
6179
|
timerElement,
|
|
6113
6180
|
className
|
|
6114
6181
|
}) => {
|
|
6115
|
-
const
|
|
6116
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-header", className: tailwindMerge.twMerge(
|
|
6182
|
+
const baseClasses2 = "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]";
|
|
6183
|
+
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
6184
|
/* @__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
6185
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-md)]", children: timerElement })
|
|
6119
6186
|
] }) });
|
|
@@ -6821,7 +6888,7 @@ function ChevronDown() {
|
|
|
6821
6888
|
);
|
|
6822
6889
|
}
|
|
6823
6890
|
function ChipPill({ label, active, onClick }) {
|
|
6824
|
-
const
|
|
6891
|
+
const baseClasses2 = tailwindMerge.twMerge(
|
|
6825
6892
|
"inline-flex items-center justify-center",
|
|
6826
6893
|
"py-[3px] px-[10px]",
|
|
6827
6894
|
"rounded-[var(--deframe-widget-size-radius-full)]",
|
|
@@ -6833,7 +6900,7 @@ function ChipPill({ label, active, onClick }) {
|
|
|
6833
6900
|
"whitespace-nowrap",
|
|
6834
6901
|
"border"
|
|
6835
6902
|
);
|
|
6836
|
-
const
|
|
6903
|
+
const stateClasses2 = active ? tailwindMerge.twMerge(
|
|
6837
6904
|
"border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
|
|
6838
6905
|
"bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
|
|
6839
6906
|
"text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
@@ -6854,7 +6921,7 @@ function ChipPill({ label, active, onClick }) {
|
|
|
6854
6921
|
type: "button",
|
|
6855
6922
|
onClick,
|
|
6856
6923
|
"aria-label": label,
|
|
6857
|
-
className: tailwindMerge.twMerge(
|
|
6924
|
+
className: tailwindMerge.twMerge(baseClasses2, stateClasses2),
|
|
6858
6925
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-test-id": "swap-from-card-simple-chip-label", children: label })
|
|
6859
6926
|
}
|
|
6860
6927
|
);
|
|
@@ -7289,9 +7356,13 @@ var SwapFormViewSimple = ({
|
|
|
7289
7356
|
if (!advancedSettings.isOpen) setShowPanel(false);
|
|
7290
7357
|
}, [advancedSettings.isOpen]);
|
|
7291
7358
|
const updatePanelPos = React6.useCallback(() => {
|
|
7292
|
-
if (containerRef.current
|
|
7293
|
-
|
|
7294
|
-
|
|
7359
|
+
if (!containerRef.current || !showPanel) return;
|
|
7360
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
7361
|
+
const GAP = 16;
|
|
7362
|
+
if (window.innerWidth < 640) {
|
|
7363
|
+
setPanelPos({ top: rect.bottom + GAP, left: rect.left, width: rect.width });
|
|
7364
|
+
} else {
|
|
7365
|
+
setPanelPos({ top: rect.top, left: rect.right + GAP });
|
|
7295
7366
|
}
|
|
7296
7367
|
}, [showPanel]);
|
|
7297
7368
|
React6.useEffect(() => {
|
|
@@ -7405,15 +7476,21 @@ var SwapFormViewSimple = ({
|
|
|
7405
7476
|
{
|
|
7406
7477
|
"data-test-id": "swap-form-simple-advanced-panel",
|
|
7407
7478
|
className: tailwindMerge.twMerge(
|
|
7408
|
-
"fixed",
|
|
7409
|
-
"w-[320px]
|
|
7479
|
+
"fixed z-[9999]",
|
|
7480
|
+
!panelPos.width && "w-[320px]",
|
|
7410
7481
|
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
7411
7482
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
7412
7483
|
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
7413
7484
|
"shadow-[0px_4px_24px_0px_#0000003D]",
|
|
7414
|
-
"font-[var(--deframe-widget-font-family)]"
|
|
7485
|
+
"font-[var(--deframe-widget-font-family)]",
|
|
7486
|
+
"overflow-y-auto"
|
|
7415
7487
|
),
|
|
7416
|
-
style: {
|
|
7488
|
+
style: __spreadProps(__spreadValues({
|
|
7489
|
+
top: panelPos.top,
|
|
7490
|
+
left: panelPos.left
|
|
7491
|
+
}, panelPos.width && { width: panelPos.width }), {
|
|
7492
|
+
maxHeight: `calc(100vh - ${panelPos.top}px - 16px)`
|
|
7493
|
+
}),
|
|
7417
7494
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7418
7495
|
AdvancedPanelContent,
|
|
7419
7496
|
{
|
|
@@ -7572,6 +7649,7 @@ function AdvancedPill({ label, isOpen, onClick }) {
|
|
|
7572
7649
|
);
|
|
7573
7650
|
}
|
|
7574
7651
|
function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
7652
|
+
const handleSlippageSelect = advancedSettings.onSlippageSelect;
|
|
7575
7653
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7576
7654
|
"div",
|
|
7577
7655
|
{
|
|
@@ -7645,9 +7723,18 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
7645
7723
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.blockchainCostsLabel, value: transactionDetails.totalCostFormatted }),
|
|
7646
7724
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.networkGasLabel, value: transactionDetails.gasCostFormatted }),
|
|
7647
7725
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.protocolFeeLabel, value: transactionDetails.protocolFee }),
|
|
7648
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7726
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7727
|
+
SlippageDetailRow,
|
|
7728
|
+
{
|
|
7729
|
+
label: transactionDetails.labels.slippageLabel,
|
|
7730
|
+
options: advancedSettings.slippageOptions,
|
|
7731
|
+
selected: advancedSettings.slippageBps,
|
|
7732
|
+
onSelect: handleSlippageSelect,
|
|
7733
|
+
formatLabel: advancedSettings.formatPercentage
|
|
7734
|
+
}
|
|
7735
|
+
),
|
|
7649
7736
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.etaLabel, value: transactionDetails.etaFormatted }),
|
|
7650
|
-
transactionDetails.quoteId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7737
|
+
transactionDetails.quoteId && /* @__PURE__ */ jsxRuntime.jsx(QuoteIdRow, { label: transactionDetails.labels.quoteIdLabel, quoteId: transactionDetails.quoteId })
|
|
7651
7738
|
]
|
|
7652
7739
|
}
|
|
7653
7740
|
);
|
|
@@ -7680,6 +7767,61 @@ function DetailRow({ label, value }) {
|
|
|
7680
7767
|
}
|
|
7681
7768
|
);
|
|
7682
7769
|
}
|
|
7770
|
+
function SlippageDetailRow({ label, options, selected, onSelect: handleSelect, formatLabel }) {
|
|
7771
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7772
|
+
"div",
|
|
7773
|
+
{
|
|
7774
|
+
"data-test-id": "swap-form-simple-slippage-row",
|
|
7775
|
+
className: "flex justify-between items-center py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
|
|
7776
|
+
children: [
|
|
7777
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7778
|
+
"span",
|
|
7779
|
+
{
|
|
7780
|
+
"data-test-id": "swap-form-simple-detail-row-label",
|
|
7781
|
+
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",
|
|
7782
|
+
children: label
|
|
7783
|
+
}
|
|
7784
|
+
),
|
|
7785
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7786
|
+
SlippageChip,
|
|
7787
|
+
{
|
|
7788
|
+
options,
|
|
7789
|
+
selected,
|
|
7790
|
+
onSelect: handleSelect,
|
|
7791
|
+
formatLabel,
|
|
7792
|
+
className: "gap-[4px] [&_button]:py-[2px] [&_button]:px-[7px] [&_button]:text-[11px]"
|
|
7793
|
+
}
|
|
7794
|
+
)
|
|
7795
|
+
]
|
|
7796
|
+
}
|
|
7797
|
+
);
|
|
7798
|
+
}
|
|
7799
|
+
function QuoteIdRow({ label, quoteId }) {
|
|
7800
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7801
|
+
"div",
|
|
7802
|
+
{
|
|
7803
|
+
"data-test-id": "swap-form-simple-quote-id-row",
|
|
7804
|
+
className: "flex justify-between items-center py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
|
|
7805
|
+
children: [
|
|
7806
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7807
|
+
"span",
|
|
7808
|
+
{
|
|
7809
|
+
"data-test-id": "swap-form-simple-detail-row-label",
|
|
7810
|
+
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",
|
|
7811
|
+
children: label
|
|
7812
|
+
}
|
|
7813
|
+
),
|
|
7814
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7815
|
+
AddressDisplay,
|
|
7816
|
+
{
|
|
7817
|
+
address: quoteId,
|
|
7818
|
+
className: "py-[3px] px-[8px] max-w-[150px] min-w-0"
|
|
7819
|
+
}
|
|
7820
|
+
)
|
|
7821
|
+
]
|
|
7822
|
+
}
|
|
7823
|
+
);
|
|
7824
|
+
}
|
|
7683
7825
|
var ChooseANetworkView = ({
|
|
7684
7826
|
labels,
|
|
7685
7827
|
autoFocus = true,
|
|
@@ -7781,7 +7923,7 @@ function useIsMobile(breakpoint = 640) {
|
|
|
7781
7923
|
return isMobile;
|
|
7782
7924
|
}
|
|
7783
7925
|
function CloseButtonInline({ onClick, ariaLabel }) {
|
|
7784
|
-
const
|
|
7926
|
+
const baseClasses2 = [
|
|
7785
7927
|
"inline-flex items-center justify-center",
|
|
7786
7928
|
"w-9 h-9",
|
|
7787
7929
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
@@ -7800,7 +7942,7 @@ function CloseButtonInline({ onClick, ariaLabel }) {
|
|
|
7800
7942
|
"data-test-id": "close-button",
|
|
7801
7943
|
onClick,
|
|
7802
7944
|
"aria-label": ariaLabel,
|
|
7803
|
-
className:
|
|
7945
|
+
className: baseClasses2,
|
|
7804
7946
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7805
7947
|
"svg",
|
|
7806
7948
|
{
|
|
@@ -7860,7 +8002,7 @@ function hasSignificantBalance(balanceUsd) {
|
|
|
7860
8002
|
return !isNaN(num) && num >= 0.01;
|
|
7861
8003
|
}
|
|
7862
8004
|
function NetworkRow({ network, selected, onClick, onKeyDown, index }) {
|
|
7863
|
-
const
|
|
8005
|
+
const baseClasses2 = [
|
|
7864
8006
|
"relative flex items-center gap-[10px]",
|
|
7865
8007
|
"py-[9px] px-[var(--deframe-widget-size-padding-x-sm)] pl-[14px]",
|
|
7866
8008
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
@@ -7869,11 +8011,11 @@ function NetworkRow({ network, selected, onClick, onKeyDown, index }) {
|
|
|
7869
8011
|
"mb-[var(--deframe-widget-size-gap-none)].5",
|
|
7870
8012
|
"transition-[background] duration-150"
|
|
7871
8013
|
].join(" ");
|
|
7872
|
-
const
|
|
8014
|
+
const stateClasses2 = {
|
|
7873
8015
|
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
8016
|
default: "bg-transparent hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
|
|
7875
8017
|
};
|
|
7876
|
-
const rowClasses = tailwindMerge.twMerge(
|
|
8018
|
+
const rowClasses = tailwindMerge.twMerge(baseClasses2, stateClasses2[selected ? "selected" : "default"]);
|
|
7877
8019
|
const nameClasses = [
|
|
7878
8020
|
"text-[14px] [font-weight:var(--deframe-widget-font-weight-medium)]",
|
|
7879
8021
|
selected ? "text-[color:var(--deframe-widget-color-text-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
|
|
@@ -7938,7 +8080,7 @@ function NetworkRow({ network, selected, onClick, onKeyDown, index }) {
|
|
|
7938
8080
|
);
|
|
7939
8081
|
}
|
|
7940
8082
|
function NetworkChip({ network, selected, onClick }) {
|
|
7941
|
-
const
|
|
8083
|
+
const baseClasses2 = [
|
|
7942
8084
|
"inline-flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
|
|
7943
8085
|
"py-[var(--deframe-widget-size-padding-y-sm)] pl-[var(--deframe-widget-size-padding-x-sm)] pr-[14px]",
|
|
7944
8086
|
"rounded-[var(--deframe-widget-size-radius-full)]",
|
|
@@ -7949,11 +8091,11 @@ function NetworkChip({ network, selected, onClick }) {
|
|
|
7949
8091
|
"outline-none",
|
|
7950
8092
|
"border"
|
|
7951
8093
|
].join(" ");
|
|
7952
|
-
const
|
|
8094
|
+
const stateClasses2 = {
|
|
7953
8095
|
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
8096
|
default: "border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
|
|
7955
8097
|
};
|
|
7956
|
-
const buttonClasses = tailwindMerge.twMerge(
|
|
8098
|
+
const buttonClasses = tailwindMerge.twMerge(baseClasses2, stateClasses2[selected ? "selected" : "default"]);
|
|
7957
8099
|
const nameLabelClasses = [
|
|
7958
8100
|
"text-[13px] [font-weight:var(--deframe-widget-font-weight-medium)] leading-[1.2]",
|
|
7959
8101
|
selected ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
|
|
@@ -8087,7 +8229,7 @@ function AssetRowInline({
|
|
|
8087
8229
|
const priceUSD = Number(balance == null ? void 0 : balance.priceUSD) || token.priceInUSD || 0;
|
|
8088
8230
|
const formattedAmount = balance ? formatTokenAmount(balance.amountUI, priceUSD) : void 0;
|
|
8089
8231
|
const formattedUsd = balance ? formatCurrencyValue(parseFloat(balance.amountInUSD)) : void 0;
|
|
8090
|
-
const
|
|
8232
|
+
const baseClasses2 = [
|
|
8091
8233
|
"group",
|
|
8092
8234
|
"relative flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
|
|
8093
8235
|
"py-[10px] px-[14px]",
|
|
@@ -8095,7 +8237,7 @@ function AssetRowInline({
|
|
|
8095
8237
|
"cursor-pointer outline-none",
|
|
8096
8238
|
"transition-[background] duration-150"
|
|
8097
8239
|
].join(" ");
|
|
8098
|
-
const rowClasses = tailwindMerge.twMerge(
|
|
8240
|
+
const rowClasses = tailwindMerge.twMerge(baseClasses2, "bg-transparent hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]");
|
|
8099
8241
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8100
8242
|
"div",
|
|
8101
8243
|
{
|
|
@@ -9603,13 +9745,13 @@ var StrategyGridCardSimple = ({
|
|
|
9603
9745
|
);
|
|
9604
9746
|
};
|
|
9605
9747
|
var BackButton = ({ onClick, ariaLabel = "Back", className }) => {
|
|
9606
|
-
const
|
|
9748
|
+
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
9749
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9608
9750
|
"button",
|
|
9609
9751
|
{
|
|
9610
9752
|
"data-test-id": "back-button",
|
|
9611
9753
|
onClick,
|
|
9612
|
-
className: tailwindMerge.twMerge(
|
|
9754
|
+
className: tailwindMerge.twMerge(baseClasses2, className),
|
|
9613
9755
|
"aria-label": ariaLabel,
|
|
9614
9756
|
children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiArrowLeft, { className: "w-6 h-6" })
|
|
9615
9757
|
}
|
|
@@ -11408,7 +11550,7 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
11408
11550
|
}) => {
|
|
11409
11551
|
const hasToken = selectedToken != null;
|
|
11410
11552
|
const isInteractive = !!onNetworkAndAssetClick;
|
|
11411
|
-
const
|
|
11553
|
+
const baseClasses2 = [
|
|
11412
11554
|
"inline-flex items-center gap-[10px]",
|
|
11413
11555
|
"h-[54px] px-[10px]",
|
|
11414
11556
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
@@ -11417,13 +11559,13 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
11417
11559
|
"transition-[background] duration-150",
|
|
11418
11560
|
"flex-shrink-0"
|
|
11419
11561
|
].join(" ");
|
|
11420
|
-
const
|
|
11562
|
+
const stateClasses2 = {
|
|
11421
11563
|
interactive: "cursor-pointer hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
|
|
11422
11564
|
static: "cursor-default"
|
|
11423
11565
|
};
|
|
11424
11566
|
const selectorClasses = tailwindMerge.twMerge(
|
|
11425
|
-
|
|
11426
|
-
|
|
11567
|
+
baseClasses2,
|
|
11568
|
+
stateClasses2[isInteractive ? "interactive" : "static"],
|
|
11427
11569
|
className
|
|
11428
11570
|
);
|
|
11429
11571
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11754,14 +11896,14 @@ var EarnInlineNotificationSimpleView = ({
|
|
|
11754
11896
|
variant,
|
|
11755
11897
|
message
|
|
11756
11898
|
}) => {
|
|
11757
|
-
const
|
|
11899
|
+
const baseClasses2 = [
|
|
11758
11900
|
"relative flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
|
|
11759
11901
|
"py-[7px] pr-[10px] pl-[14px]",
|
|
11760
11902
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
11761
11903
|
"border",
|
|
11762
11904
|
"overflow-hidden"
|
|
11763
11905
|
].join(" ");
|
|
11764
|
-
const wrapperClasses = tailwindMerge.twMerge(
|
|
11906
|
+
const wrapperClasses = tailwindMerge.twMerge(baseClasses2, variantWrapperClasses[variant]);
|
|
11765
11907
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11766
11908
|
"div",
|
|
11767
11909
|
{
|