@deframe-sdk/components 0.1.55 → 0.1.56
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.js +54 -49
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +54 -49
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -114,7 +114,7 @@ function ActionButton(_a) {
|
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
var CloseButton = ({ onClick, testId, ariaLabel = "Close", className }) => {
|
|
117
|
-
const baseClasses = "w-12 h-12 rounded-[var(--deframe-widget-size-radius-
|
|
117
|
+
const baseClasses = "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
|
{
|
|
@@ -6462,8 +6462,8 @@ var SwapFromCardViewSimple = ({
|
|
|
6462
6462
|
{
|
|
6463
6463
|
"data-test-id": "swap-from-card-simple",
|
|
6464
6464
|
className: wrapperClasses,
|
|
6465
|
-
onMouseEnter: handleMouseEnter,
|
|
6466
|
-
onMouseLeave: handleMouseLeave,
|
|
6465
|
+
onMouseEnter: selectedToken ? handleMouseEnter : void 0,
|
|
6466
|
+
onMouseLeave: selectedToken ? handleMouseLeave : void 0,
|
|
6467
6467
|
children: [
|
|
6468
6468
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6469
6469
|
"div",
|
|
@@ -11418,7 +11418,7 @@ var EarnTokenSelectorSimpleView = ({
|
|
|
11418
11418
|
"flex-shrink-0"
|
|
11419
11419
|
].join(" ");
|
|
11420
11420
|
const stateClasses = {
|
|
11421
|
-
interactive: "cursor-pointer hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)
|
|
11421
|
+
interactive: "cursor-pointer hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
|
|
11422
11422
|
static: "cursor-default"
|
|
11423
11423
|
};
|
|
11424
11424
|
const selectorClasses = tailwindMerge.twMerge(
|
|
@@ -11857,15 +11857,20 @@ var EarnDepositFormViewSimple = ({
|
|
|
11857
11857
|
const hasError = !!insufficientBalanceMessage || !!bytecodeErrorMessage;
|
|
11858
11858
|
const isSubmitDisabled = !hasToken || submitDisabled || !amountValue || amountValue === "0" || amountValue === "";
|
|
11859
11859
|
const [cardHovered, setCardHovered] = React6__namespace.default.useState(false);
|
|
11860
|
-
const hideTimerRef = React6__namespace.default.useRef(
|
|
11861
|
-
|
|
11862
|
-
|
|
11860
|
+
const hideTimerRef = React6__namespace.default.useRef(null);
|
|
11861
|
+
const handleHoverStart = React6__namespace.default.useCallback(() => {
|
|
11862
|
+
if (hideTimerRef.current) {
|
|
11863
|
+
clearTimeout(hideTimerRef.current);
|
|
11864
|
+
hideTimerRef.current = null;
|
|
11865
|
+
}
|
|
11863
11866
|
setCardHovered(true);
|
|
11864
|
-
}
|
|
11865
|
-
|
|
11867
|
+
}, []);
|
|
11868
|
+
const handleHoverEnd = React6__namespace.default.useCallback(() => {
|
|
11866
11869
|
hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
|
|
11867
|
-
}
|
|
11868
|
-
React6__namespace.default.useEffect(() => () =>
|
|
11870
|
+
}, []);
|
|
11871
|
+
React6__namespace.default.useEffect(() => () => {
|
|
11872
|
+
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
11873
|
+
}, []);
|
|
11869
11874
|
const panelBaseClasses = [
|
|
11870
11875
|
"relative flex flex-col overflow-hidden w-[420px]",
|
|
11871
11876
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
@@ -12037,13 +12042,11 @@ var EarnDepositFormViewSimple = ({
|
|
|
12037
12042
|
{
|
|
12038
12043
|
"data-slot": "deposit-simple-chips-row",
|
|
12039
12044
|
"data-test-id": "earn-deposit-form-view-simple-chips-row",
|
|
12040
|
-
initial: { opacity: 0, height: 0
|
|
12041
|
-
animate: { opacity: 1, height: "auto"
|
|
12042
|
-
exit: { opacity: 0, height: 0
|
|
12045
|
+
initial: { opacity: 0, height: 0 },
|
|
12046
|
+
animate: { opacity: 1, height: "auto" },
|
|
12047
|
+
exit: { opacity: 0, height: 0 },
|
|
12043
12048
|
transition: { duration: 0.15, ease: "easeOut" },
|
|
12044
|
-
|
|
12045
|
-
onMouseEnter: handleHoverStart,
|
|
12046
|
-
onMouseLeave: handleHoverEnd,
|
|
12049
|
+
className: "overflow-hidden mt-[var(--deframe-widget-size-gap-sm)]",
|
|
12047
12050
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12048
12051
|
EarnPercentageButtonsSimpleView,
|
|
12049
12052
|
{
|
|
@@ -12074,10 +12077,8 @@ var EarnDepositFormViewSimple = ({
|
|
|
12074
12077
|
"text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
12075
12078
|
"border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
12076
12079
|
"outline-none",
|
|
12077
|
-
"transition-[background
|
|
12078
|
-
"hover:
|
|
12079
|
-
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
|
|
12080
|
-
"hover:text-[color:var(--deframe-widget-color-text-primary)]"
|
|
12080
|
+
"transition-[background] duration-150",
|
|
12081
|
+
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]"
|
|
12081
12082
|
].join(" "),
|
|
12082
12083
|
onClick: onBack,
|
|
12083
12084
|
"aria-label": cancelLabel,
|
|
@@ -14324,10 +14325,8 @@ var OnchainDepositFormSimpleView = ({
|
|
|
14324
14325
|
"text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
14325
14326
|
"border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
14326
14327
|
"outline-none",
|
|
14327
|
-
"transition-[background
|
|
14328
|
-
"hover:
|
|
14329
|
-
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
|
|
14330
|
-
"hover:text-[color:var(--deframe-widget-color-text-primary)]"
|
|
14328
|
+
"transition-[background] duration-150",
|
|
14329
|
+
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]"
|
|
14331
14330
|
].join(" "),
|
|
14332
14331
|
onClick: onBack,
|
|
14333
14332
|
"aria-label": labels.backLabel,
|
|
@@ -14872,15 +14871,20 @@ var OnchainWithdrawFormSimpleView = ({
|
|
|
14872
14871
|
const hasAddressError = !!transferError;
|
|
14873
14872
|
const isSubmitDisabledInternal = !hasToken || isSubmitDisabled || isProcessing || !amount || amount === "0" || amount === "" || !destinationAddress.trim();
|
|
14874
14873
|
const [cardHovered, setCardHovered] = React6__namespace.default.useState(false);
|
|
14875
|
-
const hideTimerRef = React6__namespace.default.useRef(
|
|
14876
|
-
|
|
14877
|
-
|
|
14874
|
+
const hideTimerRef = React6__namespace.default.useRef(null);
|
|
14875
|
+
const handleHoverStart = React6__namespace.default.useCallback(() => {
|
|
14876
|
+
if (hideTimerRef.current) {
|
|
14877
|
+
clearTimeout(hideTimerRef.current);
|
|
14878
|
+
hideTimerRef.current = null;
|
|
14879
|
+
}
|
|
14878
14880
|
setCardHovered(true);
|
|
14879
|
-
}
|
|
14880
|
-
|
|
14881
|
+
}, []);
|
|
14882
|
+
const handleHoverEnd = React6__namespace.default.useCallback(() => {
|
|
14881
14883
|
hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
|
|
14882
|
-
}
|
|
14883
|
-
React6__namespace.default.useEffect(() => () =>
|
|
14884
|
+
}, []);
|
|
14885
|
+
React6__namespace.default.useEffect(() => () => {
|
|
14886
|
+
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
14887
|
+
}, []);
|
|
14884
14888
|
const panelBaseClasses = [
|
|
14885
14889
|
"relative flex flex-col overflow-hidden w-[420px]",
|
|
14886
14890
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
@@ -17174,15 +17178,20 @@ var OfframpInputFormSimpleView = ({
|
|
|
17174
17178
|
localStorage.setItem(STORAGE_KEY, type);
|
|
17175
17179
|
}
|
|
17176
17180
|
const [cardHovered, setCardHovered] = React6__namespace.default.useState(false);
|
|
17177
|
-
const hideTimerRef = React6__namespace.default.useRef(
|
|
17178
|
-
|
|
17179
|
-
|
|
17181
|
+
const hideTimerRef = React6__namespace.default.useRef(null);
|
|
17182
|
+
const handleHoverStart = React6__namespace.default.useCallback(() => {
|
|
17183
|
+
if (hideTimerRef.current) {
|
|
17184
|
+
clearTimeout(hideTimerRef.current);
|
|
17185
|
+
hideTimerRef.current = null;
|
|
17186
|
+
}
|
|
17180
17187
|
setCardHovered(true);
|
|
17181
|
-
}
|
|
17182
|
-
|
|
17188
|
+
}, []);
|
|
17189
|
+
const handleHoverEnd = React6__namespace.default.useCallback(() => {
|
|
17183
17190
|
hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
|
|
17184
|
-
}
|
|
17185
|
-
React6__namespace.default.useEffect(() => () =>
|
|
17191
|
+
}, []);
|
|
17192
|
+
React6__namespace.default.useEffect(() => () => {
|
|
17193
|
+
if (hideTimerRef.current) clearTimeout(hideTimerRef.current);
|
|
17194
|
+
}, []);
|
|
17186
17195
|
const hasAmountError = !!amountWarningMessage;
|
|
17187
17196
|
const hasPixKeyError = !!error || !!offrampError;
|
|
17188
17197
|
const isSubmitDisabledInternal = submitDisabled || !amount || amount === "0" || !pixKey.trim();
|
|
@@ -17234,10 +17243,8 @@ var OfframpInputFormSimpleView = ({
|
|
|
17234
17243
|
"text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
17235
17244
|
"border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
17236
17245
|
"outline-none",
|
|
17237
|
-
"transition-[background
|
|
17238
|
-
"hover:
|
|
17239
|
-
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
|
|
17240
|
-
"hover:text-[color:var(--deframe-widget-color-text-primary)]"
|
|
17246
|
+
"transition-[background] duration-150",
|
|
17247
|
+
"hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]"
|
|
17241
17248
|
].join(" ");
|
|
17242
17249
|
const submitButtonClasses = [
|
|
17243
17250
|
"flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
@@ -17382,13 +17389,11 @@ var OfframpInputFormSimpleView = ({
|
|
|
17382
17389
|
{
|
|
17383
17390
|
"data-slot": "offramp-input-form-simple-chips-row",
|
|
17384
17391
|
"data-test-id": "offramp-input-form-simple-view-chips-row",
|
|
17385
|
-
initial: { opacity: 0, height: 0
|
|
17386
|
-
animate: { opacity: 1, height: "auto"
|
|
17387
|
-
exit: { opacity: 0, height: 0
|
|
17392
|
+
initial: { opacity: 0, height: 0 },
|
|
17393
|
+
animate: { opacity: 1, height: "auto" },
|
|
17394
|
+
exit: { opacity: 0, height: 0 },
|
|
17388
17395
|
transition: { duration: 0.15, ease: "easeOut" },
|
|
17389
|
-
|
|
17390
|
-
onMouseEnter: handleHoverStart,
|
|
17391
|
-
onMouseLeave: handleHoverEnd,
|
|
17396
|
+
className: "overflow-hidden mt-[var(--deframe-widget-size-gap-sm)]",
|
|
17392
17397
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17393
17398
|
EarnPercentageButtonsSimpleView,
|
|
17394
17399
|
{
|