@deframe-sdk/components 0.1.29 → 0.1.30

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 CHANGED
@@ -11084,6 +11084,300 @@ function OnchainDepositFormView({
11084
11084
  }
11085
11085
  );
11086
11086
  }
11087
+ var OnchainDepositFormSimpleView = ({
11088
+ // Token selector
11089
+ selectedToken,
11090
+ onTokenClick,
11091
+ selectedChain,
11092
+ // Address
11093
+ depositAddress,
11094
+ onAddressCopy,
11095
+ // Navigation
11096
+ onBack,
11097
+ onClose,
11098
+ // Labels
11099
+ labels,
11100
+ // Tab switcher
11101
+ activeTab,
11102
+ cryptoHref,
11103
+ pixHref
11104
+ }) => {
11105
+ var _a;
11106
+ const hasToken = selectedToken != null;
11107
+ const showAddressSection = hasToken && !!depositAddress;
11108
+ const panelBaseClasses = [
11109
+ "relative flex flex-col overflow-hidden w-[420px]",
11110
+ "rounded-[var(--deframe-widget-size-radius-md)]",
11111
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
11112
+ "font-[var(--deframe-widget-font-family)]"
11113
+ ].join(" ");
11114
+ const headerBaseClasses = [
11115
+ "flex items-center",
11116
+ "px-[var(--deframe-widget-size-padding-x-md)]",
11117
+ "py-[var(--deframe-widget-size-padding-y-md)]"
11118
+ ].join(" ");
11119
+ const titleBaseClasses = [
11120
+ "flex-1",
11121
+ "text-[15px]",
11122
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
11123
+ "text-[color:var(--deframe-widget-color-text-primary)]"
11124
+ ].join(" ");
11125
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
11126
+ const bodyBaseClasses = [
11127
+ "flex flex-col",
11128
+ "gap-[var(--deframe-widget-size-gap-md)]",
11129
+ "px-[var(--deframe-widget-size-padding-x-md)]",
11130
+ "py-[var(--deframe-widget-size-padding-y-md)]"
11131
+ ].join(" ");
11132
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11133
+ "div",
11134
+ {
11135
+ "data-slot": "onchain-deposit-simple-panel",
11136
+ "data-test-id": "onchain-deposit-form-simple-view",
11137
+ className: panelBaseClasses,
11138
+ children: [
11139
+ /* @__PURE__ */ jsxRuntime.jsxs(
11140
+ "header",
11141
+ {
11142
+ "data-slot": "onchain-deposit-simple-header",
11143
+ "data-test-id": "onchain-deposit-form-simple-view-header",
11144
+ className: headerBaseClasses,
11145
+ children: [
11146
+ /* @__PURE__ */ jsxRuntime.jsx(
11147
+ "span",
11148
+ {
11149
+ "data-slot": "onchain-deposit-simple-title",
11150
+ "data-test-id": "onchain-deposit-form-simple-view-title",
11151
+ className: titleBaseClasses,
11152
+ children: labels.title
11153
+ }
11154
+ ),
11155
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(
11156
+ CloseButton_default,
11157
+ {
11158
+ onClick: onClose,
11159
+ ariaLabel: "Close deposit panel",
11160
+ testId: "onchain-deposit-form-simple-view-close"
11161
+ }
11162
+ )
11163
+ ]
11164
+ }
11165
+ ),
11166
+ /* @__PURE__ */ jsxRuntime.jsx(
11167
+ "div",
11168
+ {
11169
+ "data-slot": "onchain-deposit-simple-divider",
11170
+ "data-test-id": "onchain-deposit-form-simple-view-divider",
11171
+ className: dividerClasses
11172
+ }
11173
+ ),
11174
+ /* @__PURE__ */ jsxRuntime.jsx(
11175
+ "nav",
11176
+ {
11177
+ "data-slot": "onchain-deposit-simple-tabs",
11178
+ "data-test-id": "onchain-deposit-form-simple-view-tabs",
11179
+ className: "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
11180
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
11181
+ "div",
11182
+ {
11183
+ role: "tablist",
11184
+ "data-test-id": "onchain-deposit-form-simple-view-tablist",
11185
+ className: tailwindMerge.twMerge(
11186
+ "inline-flex w-full rounded-[var(--deframe-widget-size-radius-md)]",
11187
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
11188
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
11189
+ "p-[3px] gap-[2px]"
11190
+ ),
11191
+ children: [
11192
+ /* @__PURE__ */ jsxRuntime.jsx(
11193
+ "a",
11194
+ {
11195
+ href: cryptoHref != null ? cryptoHref : "/dashboard/deposit/onchain",
11196
+ role: "tab",
11197
+ "aria-selected": activeTab === "crypto",
11198
+ "aria-current": activeTab === "crypto" ? "page" : void 0,
11199
+ "aria-label": "Cripto",
11200
+ "data-test-id": "onchain-deposit-form-simple-view-tab-crypto",
11201
+ className: tailwindMerge.twMerge(
11202
+ "inline-flex flex-1 items-center justify-center",
11203
+ "gap-[var(--deframe-widget-size-gap-xs)]",
11204
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
11205
+ "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
11206
+ "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
11207
+ "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
11208
+ "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
11209
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
11210
+ activeTab === "crypto" ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]"
11211
+ ),
11212
+ children: "Cripto"
11213
+ }
11214
+ ),
11215
+ /* @__PURE__ */ jsxRuntime.jsx(
11216
+ "a",
11217
+ {
11218
+ href: pixHref != null ? pixHref : "/dashboard/deposit/onramp",
11219
+ role: "tab",
11220
+ "aria-selected": activeTab === "pix",
11221
+ "aria-current": activeTab === "pix" ? "page" : void 0,
11222
+ "aria-label": "PIX",
11223
+ "data-test-id": "onchain-deposit-form-simple-view-tab-pix",
11224
+ className: tailwindMerge.twMerge(
11225
+ "inline-flex flex-1 items-center justify-center",
11226
+ "gap-[var(--deframe-widget-size-gap-xs)]",
11227
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
11228
+ "border-[length:var(--deframe-widget-size-border-sm)] border-solid border-transparent",
11229
+ "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
11230
+ "font-[var(--deframe-widget-font-family)] [font-weight:var(--deframe-widget-font-weight-medium)]",
11231
+ "py-[5px] px-[var(--deframe-widget-size-padding-x-lg)]",
11232
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:var(--deframe-widget-font-leading-md)]",
11233
+ activeTab === "pix" ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-tertiary)]"
11234
+ ),
11235
+ children: "PIX"
11236
+ }
11237
+ )
11238
+ ]
11239
+ }
11240
+ )
11241
+ }
11242
+ ),
11243
+ /* @__PURE__ */ jsxRuntime.jsx(
11244
+ "div",
11245
+ {
11246
+ "data-slot": "onchain-deposit-simple-divider-tabs",
11247
+ "data-test-id": "onchain-deposit-form-simple-view-divider-tabs",
11248
+ className: dividerClasses
11249
+ }
11250
+ ),
11251
+ /* @__PURE__ */ jsxRuntime.jsxs(
11252
+ "div",
11253
+ {
11254
+ "data-slot": "onchain-deposit-simple-body",
11255
+ "data-test-id": "onchain-deposit-form-simple-view-body",
11256
+ className: bodyBaseClasses,
11257
+ children: [
11258
+ /* @__PURE__ */ jsxRuntime.jsxs(
11259
+ "div",
11260
+ {
11261
+ "data-slot": "onchain-deposit-simple-token-card",
11262
+ "data-test-id": "onchain-deposit-form-simple-view-token-card",
11263
+ className: tailwindMerge.twMerge(
11264
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
11265
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
11266
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
11267
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
11268
+ ),
11269
+ children: [
11270
+ /* @__PURE__ */ jsxRuntime.jsx(
11271
+ EarnTokenSelectorSimpleView,
11272
+ {
11273
+ selectedToken,
11274
+ onTokenClick,
11275
+ onNetworkAndAssetClick: onTokenClick,
11276
+ isLoading: false,
11277
+ selectTokenLabel: "SELECIONE AQUI",
11278
+ chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
11279
+ chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
11280
+ }
11281
+ ),
11282
+ !hasToken && /* @__PURE__ */ jsxRuntime.jsx(
11283
+ "p",
11284
+ {
11285
+ "data-slot": "onchain-deposit-simple-empty-hint",
11286
+ "data-test-id": "onchain-deposit-form-simple-view-empty-hint",
11287
+ className: "mt-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
11288
+ children: labels.tokenPlaceholder
11289
+ }
11290
+ )
11291
+ ]
11292
+ }
11293
+ ),
11294
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: showAddressSection && /* @__PURE__ */ jsxRuntime.jsxs(
11295
+ framerMotion.motion.div,
11296
+ {
11297
+ "data-slot": "onchain-deposit-simple-address-section",
11298
+ "data-test-id": "onchain-deposit-form-simple-view-address-section",
11299
+ initial: { opacity: 0, height: 0 },
11300
+ animate: { opacity: 1, height: "auto" },
11301
+ exit: { opacity: 0, height: 0 },
11302
+ transition: { duration: 0.2, ease: "easeOut" },
11303
+ style: { overflow: "hidden" },
11304
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
11305
+ children: [
11306
+ /* @__PURE__ */ jsxRuntime.jsxs(
11307
+ "div",
11308
+ {
11309
+ "data-slot": "onchain-deposit-simple-address-card",
11310
+ "data-test-id": "onchain-deposit-form-simple-view-address-card",
11311
+ className: tailwindMerge.twMerge(
11312
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
11313
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
11314
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
11315
+ "px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-md)]"
11316
+ ),
11317
+ children: [
11318
+ /* @__PURE__ */ jsxRuntime.jsx(
11319
+ "p",
11320
+ {
11321
+ "data-test-id": "onchain-deposit-form-simple-view-address-label",
11322
+ className: "mb-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
11323
+ children: "Endere\xE7o de dep\xF3sito"
11324
+ }
11325
+ ),
11326
+ /* @__PURE__ */ jsxRuntime.jsx(
11327
+ AddressDisplay,
11328
+ {
11329
+ address: depositAddress,
11330
+ onCopy: onAddressCopy
11331
+ }
11332
+ )
11333
+ ]
11334
+ }
11335
+ ),
11336
+ /* @__PURE__ */ jsxRuntime.jsx(
11337
+ EarnInlineNotificationSimpleView,
11338
+ {
11339
+ variant: "warning",
11340
+ message: labels.warnBannerTokenChain
11341
+ }
11342
+ )
11343
+ ]
11344
+ }
11345
+ ) })
11346
+ ]
11347
+ }
11348
+ ),
11349
+ /* @__PURE__ */ jsxRuntime.jsx(
11350
+ "footer",
11351
+ {
11352
+ "data-slot": "onchain-deposit-simple-footer",
11353
+ "data-test-id": "onchain-deposit-form-simple-view-footer",
11354
+ className: "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-md)]",
11355
+ children: /* @__PURE__ */ jsxRuntime.jsx(
11356
+ SecondaryButton,
11357
+ {
11358
+ type: "button",
11359
+ className: [
11360
+ "w-full h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
11361
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
11362
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
11363
+ "outline-none",
11364
+ "transition-[background,color,border-color] duration-150",
11365
+ "hover:opacity-100",
11366
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
11367
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
11368
+ ].join(" "),
11369
+ onClick: onBack,
11370
+ "aria-label": labels.backLabel,
11371
+ "data-test-id": "onchain-deposit-form-simple-view-cancel",
11372
+ children: labels.backLabel
11373
+ }
11374
+ )
11375
+ }
11376
+ )
11377
+ ]
11378
+ }
11379
+ );
11380
+ };
11087
11381
 
11088
11382
  // src/utils/truncate-address.ts
11089
11383
  function truncateAddress(address, startChars = 6, endChars = 4) {
@@ -11278,6 +11572,23 @@ function OnchainDepositSuccessView({
11278
11572
  }
11279
11573
  );
11280
11574
  }
11575
+ var OnchainDepositSuccessSimpleView = ({
11576
+ onClose
11577
+ }) => {
11578
+ React6__namespace.useEffect(() => {
11579
+ if (!onClose) return;
11580
+ const timer = setTimeout(onClose, 5e3);
11581
+ return () => clearTimeout(timer);
11582
+ }, [onClose]);
11583
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "onchain-deposit-success-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
11584
+ EarnFeedbackOverlaySimpleView,
11585
+ {
11586
+ variant: "success",
11587
+ title: "Dep\xF3sito Confirmado!",
11588
+ subtitle: "Seu saldo foi atualizado."
11589
+ }
11590
+ ) });
11591
+ };
11281
11592
  function OnchainWithdrawFormView({
11282
11593
  selectedToken,
11283
11594
  onTokenClick,
@@ -11544,64 +11855,417 @@ function OnchainWithdrawFormView({
11544
11855
  }
11545
11856
  );
11546
11857
  }
11547
- function OnchainWithdrawChainSelectorView({
11548
- actionSheetId,
11549
- isOpen,
11550
- currentActionSheetId,
11858
+ var OnchainWithdrawFormSimpleView = ({
11859
+ // Token selector
11860
+ selectedToken,
11861
+ onTokenClick,
11862
+ selectedChain,
11863
+ // Amount
11864
+ amount,
11865
+ onAmountChange,
11866
+ formattedAmountUsd,
11867
+ formattedBalance,
11868
+ // Percentage (new optional props)
11869
+ onPercentageClick,
11870
+ maxLabel,
11871
+ // Destination address
11872
+ destinationAddress,
11873
+ onDestinationAddressChange,
11874
+ // Errors
11875
+ isBelowMinAmount,
11876
+ walletError,
11877
+ transferError,
11878
+ // Submit
11879
+ isSubmitDisabled,
11880
+ isProcessing,
11881
+ onSubmit,
11882
+ submitLabel,
11883
+ // Navigation
11884
+ onBack,
11551
11885
  onClose,
11552
- chains,
11553
- onChainClick,
11554
- title,
11555
- closeAriaLabel = "Close"
11556
- }) {
11557
- return /* @__PURE__ */ jsxRuntime.jsx(
11558
- ActionSheet,
11559
- {
11560
- id: actionSheetId,
11561
- isOpen,
11562
- currentActionSheetId,
11563
- onClose,
11564
- height: "auto",
11565
- position: "bottom",
11566
- closeOnBackdropClick: true,
11567
- children: /* @__PURE__ */ jsxRuntime.jsx(
11568
- "div",
11569
- {
11570
- className: "relative w-full max-w-2xl mx-auto h-full bg-[var(--deframe-widget-color-bg-primary)] shadow-lg overflow-y-auto h-screen",
11571
- "data-test-id": "onchain-withdraw-chain-selector",
11572
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full h-full px-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-primary)] text-[var(--deframe-widget-color-text-primary)] flex flex-col relative min-h-0", children: [
11573
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "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-[var(--deframe-widget-color-border-tertiary)] flex", children: /* @__PURE__ */ jsxRuntime.jsx(
11574
- "button",
11575
- {
11576
- onClick: onClose,
11577
- className: "w-12 h-12 rounded-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",
11578
- "aria-label": closeAriaLabel,
11579
- "data-test-id": "onchain-withdraw-chain-selector-close",
11580
- children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineClose, { className: "w-6 h-6" })
11581
- }
11582
- ) }),
11583
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col flex-1 min-h-0", children: [
11584
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-none p-6 pb-0", children: [
11585
- /* @__PURE__ */ jsxRuntime.jsx(
11586
- "div",
11587
- {
11588
- className: "text-h5 text-[color:var(--deframe-widget-color-text-secondary)] font-bold",
11589
- "data-test-id": "onchain-withdraw-chain-selector-title",
11590
- children: title
11591
- }
11592
- ),
11593
- /* @__PURE__ */ jsxRuntime.jsx("br", {})
11594
- ] }),
11595
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 w-full px-6 pb-6 flex-1 min-h-0 overflow-y-auto", children: chains.map((chain) => /* @__PURE__ */ jsxRuntime.jsxs(
11596
- ListItem,
11597
- {
11598
- onClick: () => onChainClick(chain.chainId),
11599
- containerClassName: `border ${chain.isSelected ? "border-[var(--deframe-widget-color-brand-primary)] bg-[var(--deframe-widget-color-bg-secondary)]" : "border-[var(--deframe-widget-color-border-secondary)]"} hover:border-[var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)] transition-colors cursor-pointer`,
11600
- "data-test-id": `onchain-withdraw-chain-${chain.chainId}`,
11601
- children: [
11602
- /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
11603
- "img",
11604
- {
11886
+ // Labels
11887
+ labels
11888
+ }) => {
11889
+ var _a;
11890
+ const hasToken = selectedToken != null;
11891
+ const hasAmountError = !!walletError || isBelowMinAmount;
11892
+ const hasAddressError = !!transferError;
11893
+ const isSubmitDisabledInternal = !hasToken || isSubmitDisabled || isProcessing || !amount || amount === "0" || amount === "" || !destinationAddress.trim();
11894
+ const [cardHovered, setCardHovered] = React6__namespace.default.useState(false);
11895
+ const hideTimerRef = React6__namespace.default.useRef(void 0);
11896
+ function handleHoverStart() {
11897
+ clearTimeout(hideTimerRef.current);
11898
+ setCardHovered(true);
11899
+ }
11900
+ function handleHoverEnd() {
11901
+ hideTimerRef.current = setTimeout(() => setCardHovered(false), 150);
11902
+ }
11903
+ React6__namespace.default.useEffect(() => () => clearTimeout(hideTimerRef.current), []);
11904
+ const panelBaseClasses = [
11905
+ "relative flex flex-col overflow-hidden w-[420px]",
11906
+ "rounded-[var(--deframe-widget-size-radius-md)]",
11907
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
11908
+ "font-[var(--deframe-widget-font-family)]"
11909
+ ].join(" ");
11910
+ const headerBaseClasses = [
11911
+ "flex items-center",
11912
+ "px-[var(--deframe-widget-size-padding-x-md)]",
11913
+ "py-[var(--deframe-widget-size-padding-y-md)]"
11914
+ ].join(" ");
11915
+ const titleBaseClasses = [
11916
+ "flex-1",
11917
+ "text-[15px]",
11918
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
11919
+ "text-[color:var(--deframe-widget-color-text-primary)]"
11920
+ ].join(" ");
11921
+ const dividerClasses = "h-px bg-[var(--deframe-widget-color-border-secondary)]";
11922
+ const bodyBaseClasses = [
11923
+ "flex flex-col",
11924
+ "gap-[var(--deframe-widget-size-gap-md)]",
11925
+ "px-[var(--deframe-widget-size-padding-x-md)]",
11926
+ "py-[var(--deframe-widget-size-padding-y-md)]"
11927
+ ].join(" ");
11928
+ const inputCardClasses = tailwindMerge.twMerge(
11929
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
11930
+ "border",
11931
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
11932
+ "transition-[border-color,background] duration-200",
11933
+ hasAmountError ? "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)]" : "border-[color:var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)]"
11934
+ );
11935
+ const addressCardClasses = tailwindMerge.twMerge(
11936
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
11937
+ "border",
11938
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
11939
+ "transition-[border-color,background] duration-200",
11940
+ hasAddressError ? "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)]" : "border-[color:var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)]"
11941
+ );
11942
+ const footerBaseClasses = [
11943
+ "flex gap-[var(--deframe-widget-size-gap-sm)]",
11944
+ "px-[var(--deframe-widget-size-padding-x-md)]",
11945
+ "pb-[var(--deframe-widget-size-padding-y-md)]"
11946
+ ].join(" ");
11947
+ const cancelButtonClasses = [
11948
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
11949
+ "text-[15px] text-[color:var(--deframe-widget-color-text-secondary)]",
11950
+ "border-[color:var(--deframe-widget-color-border-secondary)]",
11951
+ "outline-none",
11952
+ "transition-[background,color,border-color] duration-150",
11953
+ "hover:opacity-100",
11954
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
11955
+ "hover:text-[color:var(--deframe-widget-color-text-primary)]"
11956
+ ].join(" ");
11957
+ const submitButtonClasses = [
11958
+ "flex-1 h-12 rounded-[var(--deframe-widget-size-radius-sm)]",
11959
+ "border-none",
11960
+ "text-[15px]",
11961
+ isSubmitDisabledInternal ? "text-[color:var(--deframe-widget-color-text-primary-disabled)]" : "text-[color:var(--deframe-widget-color-text-primary-dark)]",
11962
+ "outline-none",
11963
+ "transition-[background,color] duration-200"
11964
+ ].join(" ");
11965
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11966
+ "div",
11967
+ {
11968
+ "data-slot": "onchain-withdraw-simple-panel",
11969
+ "data-test-id": "onchain-withdraw-form-simple-view",
11970
+ className: panelBaseClasses,
11971
+ children: [
11972
+ /* @__PURE__ */ jsxRuntime.jsxs(
11973
+ "header",
11974
+ {
11975
+ "data-slot": "onchain-withdraw-simple-header",
11976
+ "data-test-id": "onchain-withdraw-form-simple-view-header",
11977
+ className: headerBaseClasses,
11978
+ children: [
11979
+ /* @__PURE__ */ jsxRuntime.jsx(
11980
+ "span",
11981
+ {
11982
+ "data-slot": "onchain-withdraw-simple-title",
11983
+ "data-test-id": "onchain-withdraw-form-simple-view-title",
11984
+ className: titleBaseClasses,
11985
+ children: labels.title
11986
+ }
11987
+ ),
11988
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(
11989
+ CloseButton_default,
11990
+ {
11991
+ onClick: onClose,
11992
+ ariaLabel: "Close withdrawal panel",
11993
+ testId: "onchain-withdraw-form-simple-view-close"
11994
+ }
11995
+ )
11996
+ ]
11997
+ }
11998
+ ),
11999
+ /* @__PURE__ */ jsxRuntime.jsx(
12000
+ "div",
12001
+ {
12002
+ "data-slot": "onchain-withdraw-simple-divider",
12003
+ "data-test-id": "onchain-withdraw-form-simple-view-divider",
12004
+ className: dividerClasses
12005
+ }
12006
+ ),
12007
+ /* @__PURE__ */ jsxRuntime.jsxs(
12008
+ "div",
12009
+ {
12010
+ "data-slot": "onchain-withdraw-simple-body",
12011
+ "data-test-id": "onchain-withdraw-form-simple-view-body",
12012
+ className: bodyBaseClasses,
12013
+ children: [
12014
+ /* @__PURE__ */ jsxRuntime.jsxs(
12015
+ "div",
12016
+ {
12017
+ "data-slot": "onchain-withdraw-simple-input-card",
12018
+ "data-test-id": "onchain-withdraw-form-simple-view-input-card",
12019
+ onMouseEnter: hasToken ? handleHoverStart : void 0,
12020
+ onMouseLeave: hasToken ? handleHoverEnd : void 0,
12021
+ className: inputCardClasses,
12022
+ children: [
12023
+ /* @__PURE__ */ jsxRuntime.jsxs(
12024
+ "div",
12025
+ {
12026
+ "data-slot": "onchain-withdraw-simple-input-top-row",
12027
+ "data-test-id": "onchain-withdraw-form-simple-view-top-row",
12028
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
12029
+ children: [
12030
+ /* @__PURE__ */ jsxRuntime.jsx(
12031
+ EarnTokenSelectorSimpleView,
12032
+ {
12033
+ selectedToken,
12034
+ onTokenClick,
12035
+ onNetworkAndAssetClick: onTokenClick,
12036
+ isLoading: false,
12037
+ selectTokenLabel: "SELECIONE AQUI",
12038
+ chainLabel: (_a = selectedChain == null ? void 0 : selectedChain.name) != null ? _a : "",
12039
+ chainImage: selectedChain == null ? void 0 : selectedChain.iconUrl
12040
+ }
12041
+ ),
12042
+ /* @__PURE__ */ jsxRuntime.jsx(
12043
+ "div",
12044
+ {
12045
+ "data-test-id": "onchain-withdraw-form-simple-view-input-divider",
12046
+ className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
12047
+ }
12048
+ ),
12049
+ /* @__PURE__ */ jsxRuntime.jsx(
12050
+ EarnAmountInputSimpleView,
12051
+ {
12052
+ value: amount,
12053
+ onChange: (e) => onAmountChange(e.target.value),
12054
+ ariaLabel: "Amount to withdraw",
12055
+ dollarAmountFormatted: formattedAmountUsd
12056
+ }
12057
+ )
12058
+ ]
12059
+ }
12060
+ ),
12061
+ hasToken && formattedBalance && /* @__PURE__ */ jsxRuntime.jsx(
12062
+ "div",
12063
+ {
12064
+ "data-slot": "onchain-withdraw-simple-balance-row",
12065
+ "data-test-id": "onchain-withdraw-form-simple-view-balance-row",
12066
+ className: "mt-[var(--deframe-widget-size-gap-sm)]",
12067
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]", children: /* @__PURE__ */ jsxRuntime.jsxs(
12068
+ "span",
12069
+ {
12070
+ className: hasAmountError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]",
12071
+ children: [
12072
+ labels.balancePrefix,
12073
+ ": ",
12074
+ formattedBalance
12075
+ ]
12076
+ }
12077
+ ) })
12078
+ }
12079
+ ),
12080
+ !hasToken && /* @__PURE__ */ jsxRuntime.jsx(
12081
+ "p",
12082
+ {
12083
+ "data-slot": "onchain-withdraw-simple-empty-hint",
12084
+ "data-test-id": "onchain-withdraw-form-simple-view-empty-hint",
12085
+ className: "mt-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
12086
+ children: labels.tokenPlaceholder
12087
+ }
12088
+ ),
12089
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: hasToken && onPercentageClick && cardHovered && /* @__PURE__ */ jsxRuntime.jsx(
12090
+ framerMotion.motion.div,
12091
+ {
12092
+ "data-slot": "onchain-withdraw-simple-chips-row",
12093
+ "data-test-id": "onchain-withdraw-form-simple-view-chips-row",
12094
+ initial: { opacity: 0, height: 0, marginTop: 0 },
12095
+ animate: { opacity: 1, height: "auto", marginTop: "var(--deframe-widget-size-gap-sm)" },
12096
+ exit: { opacity: 0, height: 0, marginTop: 0 },
12097
+ transition: { duration: 0.15, ease: "easeOut" },
12098
+ style: { overflow: "hidden" },
12099
+ onMouseEnter: handleHoverStart,
12100
+ onMouseLeave: handleHoverEnd,
12101
+ children: /* @__PURE__ */ jsxRuntime.jsx(
12102
+ EarnPercentageButtonsSimpleView,
12103
+ {
12104
+ onPercentageClick,
12105
+ maxLabel: maxLabel != null ? maxLabel : "M\xE1x."
12106
+ }
12107
+ )
12108
+ }
12109
+ ) }),
12110
+ (walletError || isBelowMinAmount) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx(
12111
+ EarnInlineNotificationSimpleView,
12112
+ {
12113
+ variant: "error",
12114
+ message: walletError != null ? walletError : labels.minAmountWarning
12115
+ }
12116
+ ) })
12117
+ ]
12118
+ }
12119
+ ),
12120
+ /* @__PURE__ */ jsxRuntime.jsxs(
12121
+ "div",
12122
+ {
12123
+ "data-slot": "onchain-withdraw-simple-address-card",
12124
+ "data-test-id": "onchain-withdraw-form-simple-view-address-card",
12125
+ className: addressCardClasses,
12126
+ children: [
12127
+ /* @__PURE__ */ jsxRuntime.jsx(
12128
+ "p",
12129
+ {
12130
+ "data-slot": "onchain-withdraw-simple-address-label",
12131
+ "data-test-id": "onchain-withdraw-form-simple-view-address-label",
12132
+ className: "mb-[var(--deframe-widget-size-gap-sm)] text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
12133
+ children: labels.destinationAddressLabel
12134
+ }
12135
+ ),
12136
+ /* @__PURE__ */ jsxRuntime.jsx(
12137
+ "input",
12138
+ {
12139
+ "data-slot": "onchain-withdraw-simple-address-input",
12140
+ "data-test-id": "onchain-withdraw-form-simple-view-address-input",
12141
+ type: "text",
12142
+ value: destinationAddress,
12143
+ onChange: (e) => onDestinationAddressChange(e.target.value),
12144
+ placeholder: labels.destinationAddressPlaceholder,
12145
+ disabled: isProcessing,
12146
+ "aria-label": labels.destinationAddressLabel,
12147
+ className: tailwindMerge.twMerge(
12148
+ "w-full bg-transparent outline-none",
12149
+ "text-[13px] [font-weight:var(--deframe-widget-font-weight-regular)]",
12150
+ "font-[var(--deframe-widget-font-family)]",
12151
+ "placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]",
12152
+ "text-[color:var(--deframe-widget-color-text-primary)]",
12153
+ '[font-feature-settings:"tnum"]',
12154
+ "disabled:opacity-50 disabled:cursor-not-allowed"
12155
+ ),
12156
+ spellCheck: false,
12157
+ autoComplete: "off"
12158
+ }
12159
+ ),
12160
+ transferError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[var(--deframe-widget-size-gap-sm)]", children: /* @__PURE__ */ jsxRuntime.jsx(EarnInlineNotificationSimpleView, { variant: "error", message: transferError }) })
12161
+ ]
12162
+ }
12163
+ ),
12164
+ /* @__PURE__ */ jsxRuntime.jsx(
12165
+ EarnInlineNotificationSimpleView,
12166
+ {
12167
+ variant: "warning",
12168
+ message: labels.infoBanner
12169
+ }
12170
+ )
12171
+ ]
12172
+ }
12173
+ ),
12174
+ /* @__PURE__ */ jsxRuntime.jsxs(
12175
+ "footer",
12176
+ {
12177
+ "data-slot": "onchain-withdraw-simple-footer",
12178
+ "data-test-id": "onchain-withdraw-form-simple-view-footer",
12179
+ className: footerBaseClasses,
12180
+ children: [
12181
+ onBack && /* @__PURE__ */ jsxRuntime.jsx(
12182
+ SecondaryButton,
12183
+ {
12184
+ type: "button",
12185
+ className: cancelButtonClasses,
12186
+ onClick: onBack,
12187
+ "aria-label": "Cancel withdrawal",
12188
+ "data-test-id": "onchain-withdraw-form-simple-view-cancel",
12189
+ children: labels.backLabel
12190
+ }
12191
+ ),
12192
+ /* @__PURE__ */ jsxRuntime.jsx(
12193
+ PrimaryButton,
12194
+ {
12195
+ type: "button",
12196
+ className: submitButtonClasses,
12197
+ disabled: isSubmitDisabledInternal,
12198
+ onClick: onSubmit,
12199
+ "aria-label": submitLabel,
12200
+ "data-test-id": "onchain-withdraw-form-simple-view-submit",
12201
+ children: submitLabel
12202
+ }
12203
+ )
12204
+ ]
12205
+ }
12206
+ )
12207
+ ]
12208
+ }
12209
+ );
12210
+ };
12211
+ function OnchainWithdrawChainSelectorView({
12212
+ actionSheetId,
12213
+ isOpen,
12214
+ currentActionSheetId,
12215
+ onClose,
12216
+ chains,
12217
+ onChainClick,
12218
+ title,
12219
+ closeAriaLabel = "Close"
12220
+ }) {
12221
+ return /* @__PURE__ */ jsxRuntime.jsx(
12222
+ ActionSheet,
12223
+ {
12224
+ id: actionSheetId,
12225
+ isOpen,
12226
+ currentActionSheetId,
12227
+ onClose,
12228
+ height: "auto",
12229
+ position: "bottom",
12230
+ closeOnBackdropClick: true,
12231
+ children: /* @__PURE__ */ jsxRuntime.jsx(
12232
+ "div",
12233
+ {
12234
+ className: "relative w-full max-w-2xl mx-auto h-full bg-[var(--deframe-widget-color-bg-primary)] shadow-lg overflow-y-auto h-screen",
12235
+ "data-test-id": "onchain-withdraw-chain-selector",
12236
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full h-full px-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-primary)] text-[var(--deframe-widget-color-text-primary)] flex flex-col relative min-h-0", children: [
12237
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "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-[var(--deframe-widget-color-border-tertiary)] flex", children: /* @__PURE__ */ jsxRuntime.jsx(
12238
+ "button",
12239
+ {
12240
+ onClick: onClose,
12241
+ className: "w-12 h-12 rounded-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",
12242
+ "aria-label": closeAriaLabel,
12243
+ "data-test-id": "onchain-withdraw-chain-selector-close",
12244
+ children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineClose, { className: "w-6 h-6" })
12245
+ }
12246
+ ) }),
12247
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col flex-1 min-h-0", children: [
12248
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-none p-6 pb-0", children: [
12249
+ /* @__PURE__ */ jsxRuntime.jsx(
12250
+ "div",
12251
+ {
12252
+ className: "text-h5 text-[color:var(--deframe-widget-color-text-secondary)] font-bold",
12253
+ "data-test-id": "onchain-withdraw-chain-selector-title",
12254
+ children: title
12255
+ }
12256
+ ),
12257
+ /* @__PURE__ */ jsxRuntime.jsx("br", {})
12258
+ ] }),
12259
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 w-full px-6 pb-6 flex-1 min-h-0 overflow-y-auto", children: chains.map((chain) => /* @__PURE__ */ jsxRuntime.jsxs(
12260
+ ListItem,
12261
+ {
12262
+ onClick: () => onChainClick(chain.chainId),
12263
+ containerClassName: `border ${chain.isSelected ? "border-[var(--deframe-widget-color-brand-primary)] bg-[var(--deframe-widget-color-bg-secondary)]" : "border-[var(--deframe-widget-color-border-secondary)]"} hover:border-[var(--deframe-widget-color-border-secondary)] bg-[var(--deframe-widget-color-bg-secondary)] transition-colors cursor-pointer`,
12264
+ "data-test-id": `onchain-withdraw-chain-${chain.chainId}`,
12265
+ children: [
12266
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
12267
+ "img",
12268
+ {
11605
12269
  src: chain.iconUrl,
11606
12270
  alt: chain.name,
11607
12271
  className: "w-8 h-8 rounded-full object-cover"
@@ -11928,6 +12592,297 @@ function OnchainWithdrawFailedView({
11928
12592
  }
11929
12593
  );
11930
12594
  }
12595
+ var OnchainWithdrawProcessingSimpleView = ({
12596
+ onClose: _onClose
12597
+ }) => {
12598
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "onchain-withdraw-processing-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
12599
+ EarnFeedbackOverlaySimpleView,
12600
+ {
12601
+ variant: "loading",
12602
+ title: "PROCESSANDO SAQUE...",
12603
+ subtitle: "Aguarde enquanto sua transa\xE7\xE3o \xE9 confirmada."
12604
+ }
12605
+ ) });
12606
+ };
12607
+ function WithdrawSignatureWarningIcon() {
12608
+ return /* @__PURE__ */ jsxRuntime.jsx(
12609
+ "div",
12610
+ {
12611
+ className: "w-20 h-20 rounded-full flex items-center justify-center",
12612
+ style: { background: "linear-gradient(180deg, #F6A700 0%, #F59E0B 100%)" },
12613
+ "data-test-id": "withdraw-signature-warning-icon",
12614
+ "data-slot": "withdraw-signature-warning-icon",
12615
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-8 h-8", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
12616
+ "path",
12617
+ {
12618
+ d: "M12 9V13M12 17H12.01M10.29 3.86L1.82 18A2 2 0 003.54 21H20.46A2 2 0 0022.18 18L13.71 3.86A2 2 0 0010.29 3.86Z",
12619
+ stroke: "#121212",
12620
+ strokeWidth: "2",
12621
+ strokeLinecap: "round",
12622
+ strokeLinejoin: "round"
12623
+ }
12624
+ ) })
12625
+ }
12626
+ );
12627
+ }
12628
+ function OnchainWithdrawSignatureWarningView({
12629
+ tokenSymbol,
12630
+ tokenLogoURI,
12631
+ formattedAmount,
12632
+ chainName,
12633
+ chainIconUrl,
12634
+ destinationAddress,
12635
+ blockchainCost,
12636
+ onCancel,
12637
+ onTryAgain,
12638
+ className
12639
+ }) {
12640
+ const [showDetails, setShowDetails] = React6.useState(true);
12641
+ return /* @__PURE__ */ jsxRuntime.jsxs(
12642
+ "div",
12643
+ {
12644
+ className: tailwindMerge.twMerge(
12645
+ "w-full max-w-[620px] relative bg-[var(--deframe-widget-color-bg-primary)] lg:bg-[var(--deframe-widget-color-bg-secondary)] overflow-hidden mx-auto lg:my-[75px] rounded",
12646
+ className
12647
+ ),
12648
+ "data-test-id": "onchain-withdraw-signature-warning-view",
12649
+ children: [
12650
+ /* @__PURE__ */ jsxRuntime.jsx(
12651
+ "button",
12652
+ {
12653
+ onClick: onCancel,
12654
+ className: "absolute top-4 right-4 flex items-center justify-center w-8 h-8 text-[color:var(--deframe-widget-color-text-secondary)] hover:text-[color:var(--deframe-widget-color-text-primary)] transition cursor-pointer",
12655
+ "aria-label": "Fechar",
12656
+ "data-test-id": "onchain-withdraw-signature-warning-close",
12657
+ children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineClose, { className: "w-6 h-6" })
12658
+ }
12659
+ ),
12660
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6 lg:p-12", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col w-full items-center", children: [
12661
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
12662
+ /* @__PURE__ */ jsxRuntime.jsx(WithdrawSignatureWarningIcon, {}),
12663
+ /* @__PURE__ */ jsxRuntime.jsx(
12664
+ "h2",
12665
+ {
12666
+ className: "text-[28px] [font-weight:var(--deframe-widget-font-weight-extrabold)] text-[color:var(--deframe-widget-color-text-primary)] leading-tight",
12667
+ "data-test-id": "onchain-withdraw-signature-warning-title",
12668
+ children: "Saque n\xE3o assinado"
12669
+ }
12670
+ ),
12671
+ /* @__PURE__ */ jsxRuntime.jsx(
12672
+ "p",
12673
+ {
12674
+ className: "text-[length:var(--deframe-widget-font-size-sm)] text-[color:var(--deframe-widget-color-text-secondary)] text-center",
12675
+ "data-test-id": "onchain-withdraw-signature-warning-subtitle",
12676
+ children: "A assinatura da transa\xE7\xE3o foi cancelada. Nenhum valor foi enviado."
12677
+ }
12678
+ )
12679
+ ] }),
12680
+ /* @__PURE__ */ jsxRuntime.jsx(
12681
+ "div",
12682
+ {
12683
+ className: "w-full mt-8 p-5 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
12684
+ "data-test-id": "onchain-withdraw-signature-warning-summary",
12685
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4", children: [
12686
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative shrink-0", "data-test-id": "onchain-withdraw-signature-warning-token-icon", children: [
12687
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[32px] h-[32px] rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden", children: tokenLogoURI ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: tokenLogoURI, alt: tokenSymbol, className: "w-[32px] h-[32px] object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-bold)]", children: tokenSymbol.slice(0, 2).toUpperCase() }) }),
12688
+ chainIconUrl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-1 -right-1", children: /* @__PURE__ */ jsxRuntime.jsx(
12689
+ "img",
12690
+ {
12691
+ src: chainIconUrl,
12692
+ alt: chainName,
12693
+ className: "w-[16px] h-[16px] rounded-full object-cover",
12694
+ "data-test-id": "onchain-withdraw-signature-warning-chain-icon"
12695
+ }
12696
+ ) })
12697
+ ] }),
12698
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
12699
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[4px]", children: [
12700
+ /* @__PURE__ */ jsxRuntime.jsx(
12701
+ "span",
12702
+ {
12703
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
12704
+ "data-test-id": "onchain-withdraw-signature-warning-sending-label",
12705
+ children: "Voc\xEA est\xE1 enviando"
12706
+ }
12707
+ ),
12708
+ /* @__PURE__ */ jsxRuntime.jsxs(
12709
+ "span",
12710
+ {
12711
+ className: "text-[20px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-tight",
12712
+ "data-test-id": "onchain-withdraw-signature-warning-amount",
12713
+ children: [
12714
+ formattedAmount,
12715
+ " ",
12716
+ tokenSymbol
12717
+ ]
12718
+ }
12719
+ )
12720
+ ] }),
12721
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[4px] mt-4", children: [
12722
+ /* @__PURE__ */ jsxRuntime.jsx(
12723
+ "span",
12724
+ {
12725
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
12726
+ "data-test-id": "onchain-withdraw-signature-warning-destination-label",
12727
+ children: "Para o endere\xE7o"
12728
+ }
12729
+ ),
12730
+ /* @__PURE__ */ jsxRuntime.jsx(
12731
+ "span",
12732
+ {
12733
+ className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] break-all leading-snug",
12734
+ "data-test-id": "onchain-withdraw-signature-warning-destination-address",
12735
+ children: destinationAddress
12736
+ }
12737
+ )
12738
+ ] })
12739
+ ] })
12740
+ ] })
12741
+ }
12742
+ ),
12743
+ /* @__PURE__ */ jsxRuntime.jsxs(
12744
+ "div",
12745
+ {
12746
+ className: "w-full mt-4 bg-[var(--deframe-widget-color-bg-tertiary)] rounded",
12747
+ "data-test-id": "onchain-withdraw-signature-warning-details",
12748
+ children: [
12749
+ /* @__PURE__ */ jsxRuntime.jsxs(
12750
+ "button",
12751
+ {
12752
+ onClick: () => setShowDetails(!showDetails),
12753
+ className: "flex justify-between items-center w-full text-left cursor-pointer p-4",
12754
+ "aria-label": "Detalhes da transa\xE7\xE3o",
12755
+ "data-test-id": "onchain-withdraw-signature-warning-details-toggle",
12756
+ children: [
12757
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)]", children: "Detalhes da transa\xE7\xE3o" }),
12758
+ /* @__PURE__ */ jsxRuntime.jsx(
12759
+ md.MdOutlineExpandMore,
12760
+ {
12761
+ className: tailwindMerge.twMerge(
12762
+ "transition-transform text-[color:var(--deframe-widget-color-text-secondary)]",
12763
+ showDetails && "rotate-180"
12764
+ )
12765
+ }
12766
+ )
12767
+ ]
12768
+ }
12769
+ ),
12770
+ showDetails && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 pb-4", "data-test-id": "onchain-withdraw-signature-warning-details-content", children: [
12771
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[color:var(--deframe-widget-color-border-secondary)]", children: [
12772
+ /* @__PURE__ */ jsxRuntime.jsx(
12773
+ "span",
12774
+ {
12775
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
12776
+ "data-test-id": "onchain-withdraw-signature-warning-withdraw-amount-label",
12777
+ children: "Valor de retirada"
12778
+ }
12779
+ ),
12780
+ /* @__PURE__ */ jsxRuntime.jsxs(
12781
+ "span",
12782
+ {
12783
+ className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
12784
+ "data-test-id": "onchain-withdraw-signature-warning-withdraw-amount-value",
12785
+ children: [
12786
+ formattedAmount,
12787
+ " ",
12788
+ tokenSymbol
12789
+ ]
12790
+ }
12791
+ )
12792
+ ] }),
12793
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-2 border-b border-[color:var(--deframe-widget-color-border-secondary)]", children: [
12794
+ /* @__PURE__ */ jsxRuntime.jsx(
12795
+ "span",
12796
+ {
12797
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
12798
+ "data-test-id": "onchain-withdraw-signature-warning-blockchain-cost-label",
12799
+ children: "Custo da blockchain"
12800
+ }
12801
+ ),
12802
+ /* @__PURE__ */ jsxRuntime.jsx(
12803
+ "span",
12804
+ {
12805
+ className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
12806
+ "data-test-id": "onchain-withdraw-signature-warning-blockchain-cost-value",
12807
+ children: blockchainCost
12808
+ }
12809
+ )
12810
+ ] }),
12811
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-2", children: [
12812
+ /* @__PURE__ */ jsxRuntime.jsx(
12813
+ "span",
12814
+ {
12815
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)]",
12816
+ "data-test-id": "onchain-withdraw-signature-warning-receive-label",
12817
+ children: "Voc\xEA receber\xE1"
12818
+ }
12819
+ ),
12820
+ /* @__PURE__ */ jsxRuntime.jsxs(
12821
+ "span",
12822
+ {
12823
+ className: "text-[12px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
12824
+ "data-test-id": "onchain-withdraw-signature-warning-receive-value",
12825
+ children: [
12826
+ formattedAmount,
12827
+ " ",
12828
+ tokenSymbol
12829
+ ]
12830
+ }
12831
+ )
12832
+ ] })
12833
+ ] })
12834
+ ]
12835
+ }
12836
+ ),
12837
+ /* @__PURE__ */ jsxRuntime.jsxs(
12838
+ "div",
12839
+ {
12840
+ className: "w-full mt-8 flex gap-3",
12841
+ "data-test-id": "onchain-withdraw-signature-warning-actions",
12842
+ children: [
12843
+ /* @__PURE__ */ jsxRuntime.jsx(
12844
+ SecondaryButton,
12845
+ {
12846
+ className: "flex-1",
12847
+ onClick: onCancel,
12848
+ "data-test-id": "onchain-withdraw-signature-warning-cancel",
12849
+ children: "Cancelar"
12850
+ }
12851
+ ),
12852
+ /* @__PURE__ */ jsxRuntime.jsx(
12853
+ PrimaryButton,
12854
+ {
12855
+ className: "flex-1",
12856
+ onClick: onTryAgain,
12857
+ "data-test-id": "onchain-withdraw-signature-warning-retry",
12858
+ children: "Tente novamente"
12859
+ }
12860
+ )
12861
+ ]
12862
+ }
12863
+ )
12864
+ ] }) })
12865
+ ]
12866
+ }
12867
+ );
12868
+ }
12869
+ var OnchainWithdrawSignatureWarningSimpleView = ({
12870
+ onCancel
12871
+ }) => {
12872
+ React6__namespace.useEffect(() => {
12873
+ if (!onCancel) return;
12874
+ const timer = setTimeout(onCancel, 5e3);
12875
+ return () => clearTimeout(timer);
12876
+ }, [onCancel]);
12877
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "onchain-withdraw-signature-warning-simple-view", children: /* @__PURE__ */ jsxRuntime.jsx(
12878
+ EarnFeedbackOverlaySimpleView,
12879
+ {
12880
+ variant: "warning",
12881
+ title: "Saque n\xE3o assinado",
12882
+ subtitle: "A assinatura da transa\xE7\xE3o foi cancelada."
12883
+ }
12884
+ ) });
12885
+ };
11931
12886
  var DashboardCard = ({ children, className }) => {
11932
12887
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "dashboard-card", className: tailwindMerge.twMerge("bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children });
11933
12888
  };
@@ -13316,11 +14271,17 @@ exports.LoadingDots = LoadingDots;
13316
14271
  exports.LowRiskBadge = LowRiskBadge;
13317
14272
  exports.MediumRiskBadge = MediumRiskBadge;
13318
14273
  exports.Navbar = Navbar;
14274
+ exports.OnchainDepositFormSimpleView = OnchainDepositFormSimpleView;
13319
14275
  exports.OnchainDepositFormView = OnchainDepositFormView;
14276
+ exports.OnchainDepositSuccessSimpleView = OnchainDepositSuccessSimpleView;
13320
14277
  exports.OnchainDepositSuccessView = OnchainDepositSuccessView;
13321
14278
  exports.OnchainWithdrawChainSelectorView = OnchainWithdrawChainSelectorView;
13322
14279
  exports.OnchainWithdrawFailedView = OnchainWithdrawFailedView;
14280
+ exports.OnchainWithdrawFormSimpleView = OnchainWithdrawFormSimpleView;
13323
14281
  exports.OnchainWithdrawFormView = OnchainWithdrawFormView;
14282
+ exports.OnchainWithdrawProcessingSimpleView = OnchainWithdrawProcessingSimpleView;
14283
+ exports.OnchainWithdrawSignatureWarningSimpleView = OnchainWithdrawSignatureWarningSimpleView;
14284
+ exports.OnchainWithdrawSignatureWarningView = OnchainWithdrawSignatureWarningView;
13324
14285
  exports.OnchainWithdrawSuccessView = OnchainWithdrawSuccessView;
13325
14286
  exports.PercentageButton = PercentageButton;
13326
14287
  exports.PrimaryButton = PrimaryButton;