@deframe-sdk/components 0.1.11 → 0.1.13

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.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { twMerge } from 'tailwind-merge';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { HiXMark, HiChevronUp, HiChevronDown, HiChevronLeft, HiArrowRight } from 'react-icons/hi2';
3
4
  import * as React6 from 'react';
4
5
  import React6__default, { useState, useEffect } from 'react';
5
6
  import { motion, AnimatePresence } from 'framer-motion';
6
7
  import { MdClose, MdOutlineSearch, MdOutlineSearchOff, MdOutlineSwapHoriz, MdHistory, MdCheckCircleOutline, MdErrorOutline, MdWarningAmber, MdInfoOutline } from 'react-icons/md';
7
- import { HiChevronUp, HiChevronDown, HiChevronLeft, HiArrowRight, HiXMark } from 'react-icons/hi2';
8
8
  import { IoAlertCircleOutline, IoTimeOutline, IoCheckmarkOutline } from 'react-icons/io5';
9
9
 
10
10
  var __defProp = Object.defineProperty;
@@ -87,6 +87,20 @@ function ActionButton(_a) {
87
87
  })
88
88
  );
89
89
  }
90
+ var CloseButton = ({ onClick, testId, ariaLabel = "Close", className }) => {
91
+ const baseClasses = "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";
92
+ return /* @__PURE__ */ jsx(
93
+ "button",
94
+ {
95
+ "data-test-id": testId != null ? testId : "close-button",
96
+ onClick,
97
+ className: twMerge(baseClasses, className),
98
+ "aria-label": ariaLabel,
99
+ children: /* @__PURE__ */ jsx(HiXMark, { className: "w-6 h-6" })
100
+ }
101
+ );
102
+ };
103
+ var CloseButton_default = CloseButton;
90
104
  function PercentageButton(_a) {
91
105
  var _b = _a, {
92
106
  children,
@@ -2157,3111 +2171,146 @@ function DeframeComponentsProvider({
2157
2171
  }
2158
2172
  );
2159
2173
  }
2160
- function StatCard(_a) {
2161
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2162
- const baseClasses = [
2163
- "w-full self-start flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
2164
- "bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
2165
- "rounded-[var(--deframe-widget-size-radius-md)]",
2166
- "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
2167
- ].join(" ");
2168
- const cardClasses = twMerge(baseClasses, className);
2169
- return /* @__PURE__ */ jsx(
2170
- "article",
2171
- __spreadValues({
2172
- "data-slot": "stat-card",
2173
- "data-test-id": "stat-card",
2174
- className: cardClasses
2175
- }, props)
2176
- );
2177
- }
2178
- function StatCardHeader(_a) {
2179
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2180
- const baseClasses = "flex items-center justify-between gap-[var(--deframe-widget-size-gap-sm)]";
2181
- const headerClasses = twMerge(baseClasses, className);
2182
- return /* @__PURE__ */ jsx(
2183
- "div",
2184
- __spreadValues({
2185
- "data-slot": "stat-card-header",
2186
- "data-test-id": "stat-card-header",
2187
- className: headerClasses
2188
- }, props)
2189
- );
2190
- }
2191
- function StatCardLabel(_a) {
2192
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2193
- const baseClasses = [
2194
- "text-[color:var(--deframe-widget-color-text-tertiary)]",
2195
- "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em]",
2196
- "[line-height:1.4]"
2197
- ].join(" ");
2198
- const labelClasses = twMerge(baseClasses, className);
2199
- return /* @__PURE__ */ jsx(
2200
- "p",
2201
- __spreadValues({
2202
- "data-slot": "stat-card-label",
2203
- "data-test-id": "stat-card-label",
2204
- className: labelClasses
2205
- }, props)
2206
- );
2207
- }
2208
- function StatCardValue(_a) {
2209
- var _b = _a, { tone = "default", size = "md", className } = _b, props = __objRest(_b, ["tone", "size", "className"]);
2210
- const sizeClasses2 = {
2211
- sm: "text-[20px]",
2212
- md: "text-[28px]",
2213
- lg: "text-[38px]"
2214
- };
2215
- const toneClasses = {
2216
- default: "text-[color:var(--deframe-widget-color-text-primary)]",
2217
- positive: "text-[color:var(--deframe-widget-color-brand-primary)]",
2218
- negative: "text-[color:var(--deframe-widget-color-state-error)]",
2219
- warning: "text-[color:var(--deframe-widget-color-state-warning)]",
2220
- brand: "text-[color:var(--deframe-widget-color-brand-secondary)]"
2221
- };
2222
- const baseClasses = "[font-weight:var(--deframe-widget-font-weight-bold)] [line-height:1.15]";
2223
- const valueClasses = twMerge(baseClasses, sizeClasses2[size], toneClasses[tone], className);
2224
- return /* @__PURE__ */ jsx(
2225
- "p",
2226
- __spreadValues({
2227
- "data-slot": "stat-card-value",
2228
- "data-test-id": "stat-card-value",
2229
- className: valueClasses
2230
- }, props)
2231
- );
2232
- }
2233
- function StatCardDescription(_a) {
2234
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2235
- const baseClasses = "text-[color:var(--deframe-widget-color-text-secondary)] text-[13px] [line-height:1.45]";
2236
- const descClasses = twMerge(baseClasses, className);
2237
- return /* @__PURE__ */ jsx(
2238
- "p",
2239
- __spreadValues({
2240
- "data-slot": "stat-card-description",
2241
- "data-test-id": "stat-card-description",
2242
- className: descClasses
2243
- }, props)
2244
- );
2245
- }
2246
- function StatCardTrend(_a) {
2247
- var _b = _a, { direction, value, className } = _b, props = __objRest(_b, ["direction", "value", "className"]);
2248
- const baseClasses = "inline-flex items-center gap-[3px] text-[12px] [font-weight:var(--deframe-widget-font-weight-medium)] [line-height:1.4]";
2249
- const directionClasses = {
2250
- up: "text-[color:var(--deframe-widget-color-brand-primary)]",
2251
- down: "text-[color:var(--deframe-widget-color-state-error)]",
2252
- neutral: "text-[color:var(--deframe-widget-color-text-tertiary)]"
2253
- };
2254
- const trendClasses = twMerge(baseClasses, directionClasses[direction], className);
2255
- const icons = {
2256
- up: /* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M5 1.5L9 7H1L5 1.5Z", fill: "currentColor" }) }),
2257
- down: /* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M5 8.5L1 3H9L5 8.5Z", fill: "currentColor" }) }),
2258
- neutral: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M2 6H10M10 6L7 3M10 6L7 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
2259
- };
2260
- return /* @__PURE__ */ jsxs(
2261
- "span",
2262
- __spreadProps(__spreadValues({
2263
- "data-slot": "stat-card-trend",
2264
- "data-test-id": "stat-card-trend",
2265
- className: trendClasses,
2266
- "aria-label": `Tend\xEAncia: ${direction === "up" ? "alta" : direction === "down" ? "baixa" : "est\xE1vel"} ${value}`
2267
- }, props), {
2268
- children: [
2269
- icons[direction],
2270
- value
2271
- ]
2272
- })
2273
- );
2274
- }
2275
- function StatCardBadge(_a) {
2276
- var _b = _a, { tone = "default", className } = _b, props = __objRest(_b, ["tone", "className"]);
2277
- const baseClasses = [
2278
- "inline-flex items-center justify-center",
2279
- "px-[6px] py-[2px]",
2280
- "rounded-[var(--deframe-widget-size-radius-xs)]",
2281
- "text-[10px] [font-weight:var(--deframe-widget-font-weight-semibold)] uppercase tracking-[0.06em]",
2282
- "[line-height:1.4]"
2283
- ].join(" ");
2284
- const toneClasses = {
2285
- default: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_84%,transparent)] border border-[color:var(--deframe-widget-color-border-secondary)] text-[color:var(--deframe-widget-color-text-secondary)]",
2286
- positive: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)] text-[color:var(--deframe-widget-color-brand-primary)]",
2287
- negative: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)] border border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] text-[color:var(--deframe-widget-color-state-error)]",
2288
- warning: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_16%,transparent)] border border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_32%,transparent)] text-[color:var(--deframe-widget-color-state-warning)]",
2289
- brand: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_18%,transparent)] border border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)] text-[color:var(--deframe-widget-color-brand-primary)]"
2290
- };
2291
- const badgeClasses = twMerge(baseClasses, toneClasses[tone], className);
2292
- return /* @__PURE__ */ jsx(
2293
- "span",
2294
- __spreadValues({
2295
- "data-slot": "stat-card-badge",
2296
- "data-test-id": "stat-card-badge",
2297
- className: badgeClasses
2298
- }, props)
2299
- );
2300
- }
2301
- function StatCardDivider(_a) {
2302
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2303
- const dividerClasses = twMerge(
2304
- "border-none h-px bg-[var(--deframe-widget-color-border-secondary)] my-[var(--deframe-widget-size-gap-xs)]",
2305
- className
2306
- );
2307
- return /* @__PURE__ */ jsx(
2308
- "hr",
2309
- __spreadValues({
2310
- "data-slot": "stat-card-divider",
2311
- "data-test-id": "stat-card-divider",
2312
- className: dividerClasses
2313
- }, props)
2314
- );
2315
- }
2316
- function StatCardRow(_a) {
2317
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2318
- const baseClasses = "flex items-center justify-between gap-[var(--deframe-widget-size-gap-sm)]";
2319
- const rowClasses = twMerge(baseClasses, className);
2320
- return /* @__PURE__ */ jsx(
2321
- "div",
2322
- __spreadValues({
2323
- "data-slot": "stat-card-row",
2324
- "data-test-id": "stat-card-row",
2325
- className: rowClasses
2326
- }, props)
2327
- );
2328
- }
2329
- function StatCardIcon(_a) {
2330
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2331
- const baseClasses = [
2332
- "flex items-center justify-center flex-shrink-0",
2333
- "w-9 h-9",
2334
- "rounded-[var(--deframe-widget-size-radius-sm)]",
2335
- "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] text-[color:var(--deframe-widget-color-brand-primary)]"
2336
- ].join(" ");
2337
- const iconClasses = twMerge(baseClasses, className);
2338
- return /* @__PURE__ */ jsx(
2339
- "div",
2340
- __spreadValues({
2341
- "data-slot": "stat-card-icon",
2342
- "data-test-id": "stat-card-icon",
2343
- className: iconClasses
2344
- }, props)
2345
- );
2346
- }
2347
- var sizeClasses = {
2348
- sm: [
2349
- "h-[var(--deframe-widget-font-leading-sm)]",
2350
- "px-[var(--deframe-widget-size-padding-x-lg)]",
2351
- "[font-size:var(--deframe-widget-font-size-md)]",
2352
- "[line-height:var(--deframe-widget-font-leading-md)]"
2353
- ].join(" "),
2354
- md: [
2355
- "h-[var(--deframe-widget-font-leading-md)]",
2356
- "px-[var(--deframe-widget-size-padding-x-xl)]",
2357
- "[font-size:var(--deframe-widget-font-size-lg)]",
2358
- "[line-height:var(--deframe-widget-font-leading-lg)]"
2359
- ].join(" ")
2174
+ var InfoRow = ({ children, borderBottom, className }) => {
2175
+ const baseClasses = "self-stretch inline-flex justify-between items-start";
2176
+ const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
2177
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row", className: twMerge(baseClasses, borderClasses, className), children });
2178
+ };
2179
+ var InfoLabel = ({ children, className }) => {
2180
+ const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
2181
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "info-label", className: twMerge(baseClasses, className), children });
2182
+ };
2183
+ var variantClasses = {
2184
+ default: "text-[color:var(--deframe-widget-color-text-primary)]",
2185
+ success: "text-[color:var(--deframe-widget-color-state-success)]",
2186
+ warning: "text-[color:var(--deframe-widget-color-state-warning)]",
2187
+ error: "text-[color:var(--deframe-widget-color-state-error)]"
2188
+ };
2189
+ var InfoValue = ({ children, variant = "default", className }) => {
2190
+ const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)]";
2191
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "info-value", className: twMerge(baseClasses, variantClasses[variant], className), children });
2192
+ };
2193
+ var InfoRowWithIcon = ({ children, borderBottom, className }) => {
2194
+ const baseClasses = "flex items-start justify-between h-[17px]";
2195
+ const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
2196
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row-with-icon", className: twMerge(baseClasses, borderClasses, className), children });
2197
+ };
2198
+ var InfoRowIconLabel = ({ children, className }) => {
2199
+ const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
2200
+ return /* @__PURE__ */ jsxs("div", { "data-test-id": "info-row-icon-label", className: twMerge(baseClasses, className), children: [
2201
+ "\u2022 ",
2202
+ children
2203
+ ] });
2204
+ };
2205
+ var InfoRowIconValue = ({ children, className }) => {
2206
+ const baseClasses = "[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)]";
2207
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row-icon-value", className: twMerge(baseClasses, className), children });
2360
2208
  };
2361
- function SegmentedControl({
2362
- options,
2209
+ var CollapsibleInfoRow = ({
2210
+ label,
2363
2211
  value,
2364
- onChange,
2365
- variant = "outlined",
2366
- size = "md",
2367
- fullWidth = false
2368
- }) {
2369
- const containerClasses = twMerge(
2370
- "inline-flex rounded-[var(--deframe-widget-size-radius-md)]",
2371
- "bg-[var(--deframe-widget-color-bg-secondary)]",
2372
- "border border-[color:var(--deframe-widget-color-border-secondary)]",
2373
- "p-[3px] gap-[2px]",
2374
- fullWidth ? "w-full" : "w-auto"
2375
- );
2376
- return /* @__PURE__ */ jsx(
2212
+ children,
2213
+ defaultOpen = false,
2214
+ className,
2215
+ collapseLabel,
2216
+ expandLabel
2217
+ }) => {
2218
+ const [isOpen, setIsOpen] = React6__default.useState(defaultOpen);
2219
+ const baseClasses = "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] w-full";
2220
+ return /* @__PURE__ */ jsxs("div", { "data-test-id": "collapsible-info-row", className: twMerge(baseClasses, className), children: [
2221
+ /* @__PURE__ */ jsxs(
2222
+ "button",
2223
+ {
2224
+ type: "button",
2225
+ onClick: () => setIsOpen(!isOpen),
2226
+ className: "flex items-start justify-between w-full text-left h-[18px] cursor-pointer",
2227
+ "aria-expanded": isOpen,
2228
+ "aria-label": `${isOpen ? collapseLabel : expandLabel} ${label}`,
2229
+ children: [
2230
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-[2px]", children: [
2231
+ /* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: label }),
2232
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: isOpen ? /* @__PURE__ */ jsx(HiChevronUp, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-secondary)]" }) : /* @__PURE__ */ jsx(HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-secondary)]" }) })
2233
+ ] }),
2234
+ /* @__PURE__ */ jsx("span", { className: "[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-secondary)]", children: value })
2235
+ ]
2236
+ }
2237
+ ),
2238
+ isOpen && children
2239
+ ] });
2240
+ };
2241
+ var BackgroundContainer = ({ children, className }) => {
2242
+ const baseClasses = "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";
2243
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "background-container", className: twMerge(baseClasses, className), children });
2244
+ };
2245
+ var SectionCard = ({ children, className }) => {
2246
+ const baseClasses = "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)]";
2247
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "section-card", className: twMerge(baseClasses, className), children });
2248
+ };
2249
+ var Navbar = ({ children, className }) => {
2250
+ const baseClasses = "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";
2251
+ return /* @__PURE__ */ jsx("nav", { "data-test-id": "navbar", className: twMerge(baseClasses, className), children });
2252
+ };
2253
+ var gapClasses = {
2254
+ xs: "gap-[var(--deframe-widget-size-gap-xs)]",
2255
+ sm: "gap-[var(--deframe-widget-size-gap-sm)]",
2256
+ md: "gap-[var(--deframe-widget-size-gap-md)]",
2257
+ lg: "gap-[var(--deframe-widget-size-gap-lg)]"
2258
+ };
2259
+ var FlexCol = ({ children, className, gap = "xs" }) => {
2260
+ const baseClasses = "flex flex-col";
2261
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "flex-col", className: twMerge(baseClasses, gapClasses[gap], className), children });
2262
+ };
2263
+ var gapClasses2 = {
2264
+ xs: "gap-[var(--deframe-widget-size-gap-xs)]",
2265
+ sm: "gap-[var(--deframe-widget-size-gap-sm)]",
2266
+ md: "gap-[var(--deframe-widget-size-gap-md)]",
2267
+ lg: "gap-[var(--deframe-widget-size-gap-lg)]"
2268
+ };
2269
+ var FlexRow = ({ children, className, gap = "xs" }) => {
2270
+ const baseClasses = "flex items-center";
2271
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "flex-row", className: twMerge(baseClasses, gapClasses2[gap], className), children });
2272
+ };
2273
+ var ScrollableContent = ({ children, className }) => {
2274
+ const baseClasses = "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]";
2275
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "scrollable-content", className: twMerge(baseClasses, className), children });
2276
+ };
2277
+ var DetailsHeader = ({ title, onBack, className, backAriaLabel = "Back" }) => {
2278
+ const baseClasses = "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";
2279
+ return /* @__PURE__ */ jsxs("div", { "data-test-id": "details-header", className: twMerge(baseClasses, className), children: [
2280
+ /* @__PURE__ */ jsx(
2281
+ "button",
2282
+ {
2283
+ "data-test-id": "details-header-back-button",
2284
+ onClick: onBack,
2285
+ className: "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)] cursor-pointer",
2286
+ "aria-label": backAriaLabel,
2287
+ children: /* @__PURE__ */ jsx(HiChevronLeft, { className: "w-6 h-6 text-[color:var(--deframe-widget-color-text-tertiary)]" })
2288
+ }
2289
+ ),
2290
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center", children: /* @__PURE__ */ jsx(TextHeading, { variant: "h-large", children: title }) })
2291
+ ] });
2292
+ };
2293
+ var HighRiskBadge = ({ className, label }) => {
2294
+ const baseClasses = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
2295
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "high-risk-badge", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsx(
2377
2296
  "div",
2378
2297
  {
2379
- role: "tablist",
2380
- "data-test-id": "segmented-control",
2381
- "data-slot": "segmented-control",
2382
- className: containerClasses,
2383
- children: options.map((opt) => {
2384
- const isActive = opt.value === value;
2385
- const buttonClasses = twMerge(
2386
- "inline-flex items-center justify-center",
2387
- "gap-[var(--deframe-widget-size-gap-xs)]",
2388
- "rounded-[var(--deframe-widget-size-radius-sm)]",
2389
- "border-[length:var(--deframe-widget-size-border-sm)] border-solid",
2390
- "outline-none whitespace-nowrap transition-[background,color,border-color] duration-150",
2391
- "font-[var(--deframe-widget-font-family)]",
2392
- "[font-weight:var(--deframe-widget-font-weight-medium)]",
2393
- sizeClasses[size],
2394
- fullWidth && "flex-1",
2395
- isActive ? variant === "outlined" ? "border-[color:var(--deframe-widget-color-brand-primary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_84%,transparent)] text-[color:var(--deframe-widget-color-text-primary)]" : "border-transparent bg-transparent text-[color:var(--deframe-widget-color-brand-primary)]" : "border-transparent bg-transparent text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
2396
- );
2397
- return /* @__PURE__ */ jsxs(
2398
- "button",
2399
- {
2400
- role: "tab",
2401
- "aria-selected": isActive,
2402
- "data-test-id": "segmented-control-option",
2403
- "data-slot": "segmented-control-option",
2404
- onClick: () => onChange(opt.value),
2405
- className: buttonClasses,
2406
- children: [
2407
- opt.icon && /* @__PURE__ */ jsx("span", { className: "flex items-center", children: opt.icon }),
2408
- opt.label
2409
- ]
2410
- },
2411
- opt.value
2412
- );
2413
- })
2298
+ "data-size": "Small",
2299
+ "data-type": "Failed",
2300
+ className: "h-6 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-95 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_20%,transparent)] rounded-[var(--deframe-widget-size-radius-md)] outline outline-1 outline-offset-[-1px] outline-[color:var(--deframe-widget-color-state-error)] flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]",
2301
+ children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-[var(--deframe-widget-size-gap-sm)].5", children: /* @__PURE__ */ jsx("div", { className: "justify-start text-[color:var(--deframe-widget-color-state-error)] [font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-regular)] font-[var(--deframe-widget-font-family)] leading-4", children: label }) })
2414
2302
  }
2415
- );
2416
- }
2417
- function IconCircle({ item, size = 36, className }) {
2418
- const [imgError, setImgError] = React6.useState(false);
2419
- if (item.iconUrl && !imgError) {
2420
- return /* @__PURE__ */ jsx(
2421
- "img",
2422
- {
2423
- "data-test-id": "icon-circle-img",
2424
- "data-slot": "icon-circle",
2425
- src: item.iconUrl,
2426
- alt: item.name,
2427
- width: size,
2428
- height: size,
2429
- className: twMerge("rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0 object-cover", className),
2430
- onError: () => setImgError(true)
2431
- }
2432
- );
2433
- }
2434
- return /* @__PURE__ */ jsx(
2303
+ ) });
2304
+ };
2305
+ var MediumRiskBadge = ({ className, label }) => {
2306
+ const baseClasses = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
2307
+ return /* @__PURE__ */ jsx("div", { "data-test-id": "medium-risk-badge", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsx(
2435
2308
  "div",
2436
2309
  {
2437
- "data-test-id": "icon-circle-fallback",
2438
- "data-slot": "icon-circle",
2439
- className: twMerge("rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0 flex items-center justify-center [font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-text-primary-dark)]", className),
2440
- style: {
2441
- width: size,
2442
- height: size,
2443
- background: item.color,
2444
- fontSize: size * 0.33,
2445
- letterSpacing: "-0.01em"
2446
- },
2447
- children: item.name.slice(0, 2).toUpperCase()
2448
- }
2449
- );
2450
- }
2451
- function CloseButton(_a) {
2452
- var _b = _a, { onClick, className, testId } = _b, rest = __objRest(_b, ["onClick", "className", "testId"]);
2453
- const baseClasses = [
2454
- "inline-flex items-center justify-center",
2455
- "w-9 h-9",
2456
- "rounded-[var(--deframe-widget-size-radius-sm)]",
2457
- "border-none",
2458
- "cursor-pointer",
2459
- "bg-transparent",
2460
- "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
2461
- "transition-[background] duration-150",
2462
- "flex-shrink-0",
2463
- "outline-none",
2464
- "text-[color:var(--deframe-widget-color-text-secondary)]"
2465
- ].join(" ");
2466
- return /* @__PURE__ */ jsx(
2467
- "button",
2468
- __spreadProps(__spreadValues({
2469
- "data-test-id": testId != null ? testId : "close-button",
2470
- "data-slot": "close-button",
2471
- onClick,
2472
- "aria-label": "Fechar",
2473
- className: twMerge(baseClasses, className)
2474
- }, rest), {
2475
- children: /* @__PURE__ */ jsx(
2476
- "svg",
2477
- {
2478
- "data-test-id": "close-button-icon",
2479
- "data-slot": "close-button-icon",
2480
- viewBox: "0 0 24 24",
2481
- width: "20",
2482
- height: "20",
2483
- fill: "currentColor",
2484
- "aria-hidden": "true",
2485
- children: /* @__PURE__ */ jsx("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })
2486
- }
2487
- )
2488
- })
2489
- );
2490
- }
2491
- function ChainRow({ chain, selected, onClick, onKeyDown, index }) {
2492
- const baseClasses = [
2493
- "relative flex items-center gap-[10px]",
2494
- "py-[9px] px-[var(--deframe-widget-size-padding-x-sm)] pl-[14px]",
2495
- "rounded-[var(--deframe-widget-size-radius-sm)]",
2496
- "cursor-pointer",
2497
- "outline-none",
2498
- "mb-[var(--deframe-widget-size-gap-none)].5",
2499
- "transition-[background] duration-150"
2500
- ].join(" ");
2501
- const stateClasses = {
2502
- 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)]",
2503
- default: "bg-transparent hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
2504
- };
2505
- const rowClasses = twMerge(baseClasses, stateClasses[selected ? "selected" : "default"]);
2506
- const nameClasses = [
2507
- "text-[14px] [font-weight:var(--deframe-widget-font-weight-medium)]",
2508
- selected ? "text-[color:var(--deframe-widget-color-text-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
2509
- ].join(" ");
2510
- return /* @__PURE__ */ jsxs(
2511
- motion.div,
2512
- {
2513
- "data-test-id": "chain-row",
2514
- "data-slot": "chain-row",
2515
- role: "option",
2516
- "aria-selected": selected,
2517
- tabIndex: 0,
2518
- onClick,
2519
- onKeyDown,
2520
- "data-chain-index": index,
2521
- className: rowClasses,
2522
- children: [
2523
- selected && /* @__PURE__ */ jsx(
2524
- motion.div,
2525
- {
2526
- "data-test-id": "chain-row-accent",
2527
- "data-slot": "chain-row-accent",
2528
- layoutId: "chain-accent",
2529
- className: "absolute left-0 top-2 bottom-2 w-[3px] rounded-[var(--deframe-widget-size-radius-xs)] bg-[var(--deframe-widget-color-brand-primary)]",
2530
- transition: { type: "spring", stiffness: 400, damping: 30 }
2531
- }
2532
- ),
2533
- /* @__PURE__ */ jsx(
2534
- IconCircle,
2535
- {
2536
- "data-test-id": "chain-row-icon",
2537
- "data-slot": "chain-row-icon",
2538
- item: chain,
2539
- size: 34
2540
- }
2541
- ),
2542
- /* @__PURE__ */ jsxs(
2543
- "div",
2544
- {
2545
- "data-test-id": "chain-row-content",
2546
- "data-slot": "chain-row-content",
2547
- className: "flex-1 min-w-0",
2548
- children: [
2549
- /* @__PURE__ */ jsx(
2550
- "div",
2551
- {
2552
- "data-test-id": "chain-row-name",
2553
- "data-slot": "chain-row-name",
2554
- className: nameClasses,
2555
- children: chain.name
2556
- }
2557
- ),
2558
- chain.balanceUsd && /* @__PURE__ */ jsx(
2559
- "div",
2560
- {
2561
- "data-test-id": "chain-row-balance",
2562
- "data-slot": "chain-row-balance",
2563
- className: "text-[12px] text-[color:var(--deframe-widget-color-text-tertiary)] mt-px",
2564
- children: chain.balanceUsd
2565
- }
2566
- )
2567
- ]
2568
- }
2569
- )
2570
- ]
2571
- }
2572
- );
2573
- }
2574
- function ChainChip({ chain, selected, onClick }) {
2575
- const baseClasses = [
2576
- "inline-flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
2577
- "py-[var(--deframe-widget-size-padding-y-sm)] pl-[var(--deframe-widget-size-padding-x-sm)] pr-[14px]",
2578
- "rounded-[var(--deframe-widget-size-radius-full)]",
2579
- "cursor-pointer",
2580
- "whitespace-nowrap",
2581
- "transition-all duration-150",
2582
- "flex-shrink-0",
2583
- "outline-none",
2584
- "border"
2585
- ].join(" ");
2586
- const stateClasses = {
2587
- 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)]",
2588
- default: "border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
2589
- };
2590
- const buttonClasses = twMerge(baseClasses, stateClasses[selected ? "selected" : "default"]);
2591
- const nameLabelClasses = [
2592
- "text-[13px] [font-weight:var(--deframe-widget-font-weight-medium)] leading-[1.2]",
2593
- selected ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-secondary)]"
2594
- ].join(" ");
2595
- return /* @__PURE__ */ jsxs(
2596
- "button",
2597
- {
2598
- "data-test-id": "chain-chip",
2599
- "data-slot": "chain-chip",
2600
- onClick,
2601
- className: buttonClasses,
2602
- children: [
2603
- /* @__PURE__ */ jsx(
2604
- IconCircle,
2605
- {
2606
- "data-test-id": "chain-chip-icon",
2607
- "data-slot": "chain-chip-icon",
2608
- item: chain,
2609
- size: 24
2610
- }
2611
- ),
2612
- /* @__PURE__ */ jsxs(
2613
- "div",
2614
- {
2615
- "data-test-id": "chain-chip-content",
2616
- "data-slot": "chain-chip-content",
2617
- className: "text-left",
2618
- children: [
2619
- /* @__PURE__ */ jsx(
2620
- "div",
2621
- {
2622
- "data-test-id": "chain-chip-label",
2623
- "data-slot": "chain-chip-label",
2624
- className: nameLabelClasses,
2625
- children: chain.name
2626
- }
2627
- ),
2628
- chain.balanceUsd && /* @__PURE__ */ jsx(
2629
- "div",
2630
- {
2631
- "data-test-id": "chain-chip-balance",
2632
- "data-slot": "chain-chip-balance",
2633
- className: "text-[11px] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[1.4]",
2634
- children: chain.balanceUsd
2635
- }
2636
- )
2637
- ]
2638
- }
2639
- )
2640
- ]
2641
- }
2642
- );
2643
- }
2644
- function AssetRow({ asset, first, onClick, onKeyDown, index, chainName, chainColor }) {
2645
- const hasBalance = asset.balance || asset.balanceUsd;
2646
- const baseClasses = [
2647
- "group",
2648
- "relative flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
2649
- "py-[10px] px-[14px]",
2650
- "rounded-[var(--deframe-widget-size-radius-sm)]",
2651
- "cursor-pointer outline-none",
2652
- "transition-[background] duration-150"
2653
- ].join(" ");
2654
- const stateClasses = {
2655
- first: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
2656
- default: "bg-transparent hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
2657
- };
2658
- const rowClasses = twMerge(baseClasses, stateClasses[first ? "first" : "default"]);
2659
- return /* @__PURE__ */ jsxs(
2660
- "div",
2661
- {
2662
- "data-test-id": "asset-row",
2663
- "data-slot": "asset-row",
2664
- role: "option",
2665
- "aria-selected": first,
2666
- tabIndex: 0,
2667
- onClick,
2668
- onKeyDown,
2669
- "data-asset-index": index,
2670
- className: rowClasses,
2671
- children: [
2672
- first && /* @__PURE__ */ jsx(
2673
- "div",
2674
- {
2675
- "data-test-id": "asset-row-accent",
2676
- "data-slot": "asset-row-accent",
2677
- className: "absolute left-0 top-2 bottom-2 w-[3px] rounded-[var(--deframe-widget-size-radius-xs)] bg-[var(--deframe-widget-color-brand-primary)]"
2678
- }
2679
- ),
2680
- /* @__PURE__ */ jsx(
2681
- IconCircle,
2682
- {
2683
- "data-test-id": "asset-row-icon",
2684
- "data-slot": "asset-row-icon",
2685
- item: asset,
2686
- size: 38
2687
- }
2688
- ),
2689
- /* @__PURE__ */ jsxs(
2690
- "div",
2691
- {
2692
- "data-test-id": "asset-row-content",
2693
- "data-slot": "asset-row-content",
2694
- className: "flex-1 min-w-0",
2695
- children: [
2696
- /* @__PURE__ */ jsx(
2697
- "div",
2698
- {
2699
- "data-test-id": "asset-row-symbol",
2700
- "data-slot": "asset-row-symbol",
2701
- className: "text-[14px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]",
2702
- children: asset.symbol
2703
- }
2704
- ),
2705
- /* @__PURE__ */ jsx(
2706
- "div",
2707
- {
2708
- "data-test-id": "asset-row-name",
2709
- "data-slot": "asset-row-name",
2710
- className: "text-[13px] text-[color:var(--deframe-widget-color-text-secondary)] mt-px",
2711
- children: asset.name
2712
- }
2713
- ),
2714
- chainName && /* @__PURE__ */ jsxs(
2715
- "div",
2716
- {
2717
- "data-test-id": "asset-row-chain",
2718
- "data-slot": "asset-row-chain",
2719
- className: "flex items-center gap-[var(--deframe-widget-size-gap-xs)] mt-[3px]",
2720
- children: [
2721
- chainColor && /* @__PURE__ */ jsx(
2722
- "span",
2723
- {
2724
- "data-test-id": "asset-row-chain-dot",
2725
- "data-slot": "asset-row-chain-dot",
2726
- className: "inline-block w-[6px] h-[6px] rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0",
2727
- style: { background: chainColor }
2728
- }
2729
- ),
2730
- /* @__PURE__ */ jsxs(
2731
- "span",
2732
- {
2733
- "data-test-id": "asset-row-chain-label",
2734
- "data-slot": "asset-row-chain-label",
2735
- className: "text-[11px] text-[color:var(--deframe-widget-color-text-tertiary)]",
2736
- children: [
2737
- "via ",
2738
- chainName
2739
- ]
2740
- }
2741
- )
2742
- ]
2743
- }
2744
- )
2745
- ]
2746
- }
2747
- ),
2748
- hasBalance ? /* @__PURE__ */ jsxs(
2749
- "div",
2750
- {
2751
- "data-test-id": "asset-row-balance",
2752
- "data-slot": "asset-row-balance",
2753
- className: "flex-shrink-0 text-right",
2754
- children: [
2755
- asset.balance && /* @__PURE__ */ jsxs(
2756
- "div",
2757
- {
2758
- "data-test-id": "asset-row-balance-amount",
2759
- "data-slot": "asset-row-balance-amount",
2760
- className: "text-[13px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-primary)]",
2761
- children: [
2762
- asset.balance,
2763
- " ",
2764
- /* @__PURE__ */ jsx(
2765
- "span",
2766
- {
2767
- "data-test-id": "asset-row-balance-symbol",
2768
- "data-slot": "asset-row-balance-symbol",
2769
- className: "text-[12px] text-[color:var(--deframe-widget-color-text-tertiary)] [font-weight:var(--deframe-widget-font-weight-regular)]",
2770
- children: asset.symbol
2771
- }
2772
- )
2773
- ]
2774
- }
2775
- ),
2776
- asset.balanceUsd && /* @__PURE__ */ jsx(
2777
- "div",
2778
- {
2779
- "data-test-id": "asset-row-balance-usd",
2780
- "data-slot": "asset-row-balance-usd",
2781
- className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)] mt-[var(--deframe-widget-size-gap-none)].5",
2782
- children: asset.balanceUsd
2783
- }
2784
- )
2785
- ]
2786
- }
2787
- ) : /* @__PURE__ */ jsx(
2788
- "span",
2789
- {
2790
- "data-test-id": "asset-row-select-hint",
2791
- "data-slot": "asset-row-select-hint",
2792
- className: "text-[13px] text-[color:var(--deframe-widget-color-brand-primary)] [font-weight:var(--deframe-widget-font-weight-medium)] whitespace-nowrap flex-shrink-0 opacity-0 translate-x-1 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-150",
2793
- children: "Select \u2192"
2794
- }
2795
- )
2796
- ]
2797
- }
2798
- );
2799
- }
2800
- var SearchInput = React6.forwardRef(
2801
- ({ value, onChange, placeholder = "Buscar por s\xEDmbolo, nome ou endere\xE7o", onArrowDown, className }, ref) => {
2802
- const wrapperClasses = twMerge("relative", className);
2803
- const inputClasses = [
2804
- "w-full box-border h-10",
2805
- "bg-[var(--deframe-widget-color-bg-tertiary)]",
2806
- "border border-[color:var(--deframe-widget-color-border-secondary)]",
2807
- "rounded-[var(--deframe-widget-size-radius-sm)]",
2808
- "py-[var(--deframe-widget-size-padding-y-none)] pr-[var(--deframe-widget-size-padding-x-xl)] pl-[14px]",
2809
- "text-[14px] text-[color:var(--deframe-widget-color-text-primary)]",
2810
- "outline-none focus:outline-none",
2811
- "focus:border-[color:var(--deframe-widget-color-brand-primary)]",
2812
- "transition-colors duration-150",
2813
- "font-[var(--deframe-widget-font-family)]",
2814
- "placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]"
2815
- ].join(" ");
2816
- return /* @__PURE__ */ jsxs(
2817
- "div",
2818
- {
2819
- "data-test-id": "search-input-wrapper",
2820
- "data-slot": "search-input-wrapper",
2821
- className: wrapperClasses,
2822
- children: [
2823
- /* @__PURE__ */ jsx(
2824
- "input",
2825
- {
2826
- "data-test-id": "search-input",
2827
- "data-slot": "search-input",
2828
- ref,
2829
- type: "text",
2830
- value,
2831
- onChange: (e) => onChange(e.target.value),
2832
- placeholder,
2833
- "aria-label": "Buscar ativo",
2834
- onKeyDown: (e) => {
2835
- if (e.key === "ArrowDown") {
2836
- e.preventDefault();
2837
- onArrowDown == null ? void 0 : onArrowDown();
2838
- }
2839
- },
2840
- className: inputClasses
2841
- }
2842
- ),
2843
- /* @__PURE__ */ jsx(
2844
- "div",
2845
- {
2846
- "data-test-id": "search-input-icon",
2847
- "data-slot": "search-input-icon",
2848
- className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[color:var(--deframe-widget-color-text-tertiary)]",
2849
- children: /* @__PURE__ */ jsxs(
2850
- "svg",
2851
- {
2852
- width: "15",
2853
- height: "15",
2854
- viewBox: "0 0 24 24",
2855
- fill: "none",
2856
- stroke: "currentColor",
2857
- strokeWidth: "2",
2858
- strokeLinecap: "round",
2859
- "aria-hidden": "true",
2860
- children: [
2861
- /* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "8" }),
2862
- /* @__PURE__ */ jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
2863
- ]
2864
- }
2865
- )
2866
- }
2867
- )
2868
- ]
2869
- }
2870
- );
2871
- }
2872
- );
2873
- SearchInput.displayName = "SearchInput";
2874
- function FilterGroupBar({ groups, selected, onSelect }) {
2875
- return /* @__PURE__ */ jsx(
2876
- "div",
2877
- {
2878
- "data-test-id": "filter-group-bar",
2879
- "data-slot": "filter-group-bar",
2880
- role: "tablist",
2881
- "aria-label": "Filtrar ativos",
2882
- className: "flex gap-[var(--deframe-widget-size-gap-sm)] overflow-x-auto [scrollbar-width:none] px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-sm)] flex-shrink-0",
2883
- children: groups.map((group) => /* @__PURE__ */ jsx(
2884
- FilterPill,
2885
- {
2886
- group,
2887
- isSelected: group.id === selected,
2888
- onSelect
2889
- },
2890
- group.id
2891
- ))
2892
- }
2893
- );
2894
- }
2895
- function FilterPill({ group, isSelected, onSelect }) {
2896
- const baseClasses = [
2897
- "inline-flex items-center",
2898
- "py-[6px] px-[14px]",
2899
- "rounded-[var(--deframe-widget-size-radius-full)]",
2900
- "text-[12px] [font-weight:var(--deframe-widget-font-weight-medium)]",
2901
- "cursor-pointer",
2902
- "flex-shrink-0",
2903
- "whitespace-nowrap",
2904
- "outline-none",
2905
- "font-[var(--deframe-widget-font-family)]",
2906
- "transition-all duration-150",
2907
- "border"
2908
- ].join(" ");
2909
- const stateClasses = {
2910
- 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)] text-[color:var(--deframe-widget-color-brand-primary)]",
2911
- default: "border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)] text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_84%,transparent)]"
2912
- };
2913
- const pillClasses = twMerge(baseClasses, stateClasses[isSelected ? "selected" : "default"]);
2914
- return /* @__PURE__ */ jsx(
2915
- "button",
2916
- {
2917
- "data-test-id": "filter-pill",
2918
- "data-slot": "filter-pill",
2919
- role: "tab",
2920
- "aria-selected": isSelected,
2921
- onClick: () => onSelect(group.id),
2922
- className: pillClasses,
2923
- children: /* @__PURE__ */ jsx(
2924
- "span",
2925
- {
2926
- "data-test-id": "filter-pill-label",
2927
- "data-slot": "filter-pill-label",
2928
- children: group.label
2929
- }
2930
- )
2931
- }
2932
- );
2933
- }
2934
- function parseUsd(s) {
2935
- if (!s) return -1;
2936
- const n = parseFloat(s.replace(/[$,\s]/g, ""));
2937
- return isNaN(n) ? -1 : n;
2938
- }
2939
- function useIsMobile(breakpoint = 640) {
2940
- const [isMobile, setIsMobile] = React6.useState(false);
2941
- React6.useEffect(() => {
2942
- const check = () => setIsMobile(window.innerWidth < breakpoint);
2943
- check();
2944
- window.addEventListener("resize", check);
2945
- return () => window.removeEventListener("resize", check);
2946
- }, [breakpoint]);
2947
- return isMobile;
2948
- }
2949
- var DEFAULT_FILTER_GROUPS = [
2950
- { id: "all", label: "All" },
2951
- { id: "most-used", label: "Most Used" },
2952
- { id: "stablecoin", label: "Stablecoins" }
2953
- ];
2954
- function SearchAndAssets({
2955
- query,
2956
- setQuery,
2957
- searchRef,
2958
- assetListRef,
2959
- filtered,
2960
- isMobile,
2961
- onSelect,
2962
- handleAssetKeyDown,
2963
- activeTab,
2964
- onTabChange,
2965
- visibleChains,
2966
- filterGroups,
2967
- selectedFilter,
2968
- onFilterChange
2969
- }) {
2970
- const tabPadding = isMobile ? "px-[var(--deframe-widget-size-padding-x-md)] pb-[10px] pt-[var(--deframe-widget-size-padding-y-none)]" : "px-[var(--deframe-widget-size-padding-x-md)] pb-[10px] pt-[var(--deframe-widget-size-padding-y-sm)]";
2971
- return /* @__PURE__ */ jsxs(
2972
- "div",
2973
- {
2974
- "data-slot": "search-and-assets",
2975
- "data-test-id": "search-and-assets",
2976
- className: "flex flex-col flex-1 overflow-hidden",
2977
- children: [
2978
- /* @__PURE__ */ jsx(
2979
- "div",
2980
- {
2981
- "data-slot": "tab-switcher",
2982
- "data-test-id": "tab-switcher",
2983
- className: twMerge("flex-shrink-0", tabPadding),
2984
- children: /* @__PURE__ */ jsx(
2985
- SegmentedControl,
2986
- {
2987
- options: [
2988
- { value: "crypto", label: "Crypto" },
2989
- { value: "stock", label: "Stocks" }
2990
- ],
2991
- value: activeTab,
2992
- onChange: onTabChange,
2993
- variant: "outlined",
2994
- fullWidth: true
2995
- }
2996
- )
2997
- }
2998
- ),
2999
- /* @__PURE__ */ jsx(
3000
- "div",
3001
- {
3002
- "data-slot": "search-wrapper",
3003
- "data-test-id": "search-wrapper",
3004
- className: "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-sm)] flex-shrink-0",
3005
- children: /* @__PURE__ */ jsx(
3006
- SearchInput,
3007
- {
3008
- ref: searchRef,
3009
- value: query,
3010
- onChange: setQuery,
3011
- onArrowDown: () => {
3012
- var _a, _b;
3013
- (_b = (_a = assetListRef.current) == null ? void 0 : _a.querySelector("[data-asset-index='0']")) == null ? void 0 : _b.focus();
3014
- }
3015
- }
3016
- )
3017
- }
3018
- ),
3019
- /* @__PURE__ */ jsx(
3020
- FilterGroupBar,
3021
- {
3022
- groups: filterGroups,
3023
- selected: selectedFilter,
3024
- onSelect: onFilterChange
3025
- }
3026
- ),
3027
- /* @__PURE__ */ jsx(
3028
- "div",
3029
- {
3030
- "data-slot": "section-label",
3031
- "data-test-id": "section-label",
3032
- className: "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-xs)] flex-shrink-0 text-[11px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-tertiary)] tracking-[0.06em] uppercase",
3033
- children: activeTab === "stock" ? "A\xE7\xF5es" : "Ativos"
3034
- }
3035
- ),
3036
- /* @__PURE__ */ jsx(
3037
- "div",
3038
- {
3039
- ref: assetListRef,
3040
- role: "listbox",
3041
- "aria-label": "Ativos dispon\xEDveis",
3042
- "data-slot": "asset-list",
3043
- "data-test-id": "asset-list",
3044
- className: "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-sm)] pb-[var(--deframe-widget-size-padding-y-sm)] pt-[var(--deframe-widget-size-padding-y-xs)]",
3045
- children: visibleChains.length === 0 ? /* @__PURE__ */ jsxs(
3046
- "div",
3047
- {
3048
- "data-slot": "empty-state",
3049
- "data-test-id": "empty-state",
3050
- className: "py-[var(--deframe-widget-size-padding-y-xl)] px-[var(--deframe-widget-size-padding-x-md)] text-center",
3051
- children: [
3052
- /* @__PURE__ */ jsx("div", { className: "text-[14px] text-[color:var(--deframe-widget-color-text-secondary)] mb-[var(--deframe-widget-size-gap-xs)]", children: activeTab === "stock" ? "Nenhuma a\xE7\xE3o dispon\xEDvel" : "Nenhum ativo dispon\xEDvel" }),
3053
- /* @__PURE__ */ jsx("div", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-tertiary)]", children: activeTab === "stock" ? "Mude para Crypto para ver as redes dispon\xEDveis" : "Nenhuma rede suportada encontrada" })
3054
- ]
3055
- }
3056
- ) : filtered.length === 0 ? /* @__PURE__ */ jsx(
3057
- "div",
3058
- {
3059
- "data-slot": "no-results",
3060
- "data-test-id": "no-results",
3061
- className: "py-[var(--deframe-widget-size-padding-y-xl)] px-[var(--deframe-widget-size-padding-x-md)] text-center text-[14px] text-[color:var(--deframe-widget-color-text-tertiary)]",
3062
- children: "Nenhum ativo encontrado"
3063
- }
3064
- ) : filtered.map((asset, i) => /* @__PURE__ */ jsx(
3065
- AssetRow,
3066
- {
3067
- asset,
3068
- first: i === 0 && !query,
3069
- onClick: () => onSelect(asset),
3070
- onKeyDown: (e) => handleAssetKeyDown(e, asset, i),
3071
- index: i
3072
- },
3073
- asset.id
3074
- ))
3075
- }
3076
- )
3077
- ]
3078
- }
3079
- );
3080
- }
3081
- function BlockchainAssetSelector({
3082
- chains,
3083
- assets,
3084
- onSelect,
3085
- onClose,
3086
- defaultChain,
3087
- defaultTab,
3088
- filterGroups
3089
- }) {
3090
- var _a;
3091
- const [activeTab, setActiveTab] = React6.useState(defaultTab != null ? defaultTab : "crypto");
3092
- const [query, setQuery] = React6.useState("");
3093
- const [selectedFilter, setSelectedFilter] = React6.useState("all");
3094
- const searchRef = React6.useRef(null);
3095
- const chainListRef = React6.useRef(null);
3096
- const assetListRef = React6.useRef(null);
3097
- const isMobile = useIsMobile();
3098
- const resolvedGroups = filterGroups != null ? filterGroups : DEFAULT_FILTER_GROUPS;
3099
- const visibleChains = chains.filter(
3100
- (c) => {
3101
- var _a2;
3102
- return ((_a2 = assets[c.id]) != null ? _a2 : []).some((a) => a.category === activeTab);
3103
- }
3104
- );
3105
- const [selectedChain, setSelectedChain] = React6.useState(() => {
3106
- var _a2, _b;
3107
- const preferred = chains.find((c) => c.id === defaultChain);
3108
- if (preferred && ((_a2 = assets[preferred.id]) != null ? _a2 : []).some((a) => a.category === (defaultTab != null ? defaultTab : "crypto"))) {
3109
- return preferred;
3110
- }
3111
- return (_b = visibleChains[0]) != null ? _b : chains[0];
3112
- });
3113
- const chainAssets = ((_a = assets[selectedChain.id]) != null ? _a : []).filter((a) => a.category === activeTab);
3114
- const filtered = chainAssets.filter((a) => {
3115
- var _a2, _b;
3116
- return selectedFilter === "all" || ((_b = (_a2 = a.tags) == null ? void 0 : _a2.includes(selectedFilter)) != null ? _b : false);
3117
- }).filter(
3118
- (a) => a.symbol.toLowerCase().includes(query.toLowerCase()) || a.name.toLowerCase().includes(query.toLowerCase())
3119
- ).sort((a, b) => parseUsd(b.balanceUsd) - parseUsd(a.balanceUsd));
3120
- React6.useEffect(() => {
3121
- setQuery("");
3122
- setSelectedFilter("all");
3123
- if (chainListRef.current) chainListRef.current.scrollLeft = 0;
3124
- const stillValid = visibleChains.find((c) => c.id === selectedChain.id);
3125
- if (!stillValid && visibleChains.length > 0) {
3126
- setSelectedChain(visibleChains[0]);
3127
- }
3128
- }, [activeTab]);
3129
- const handleChainSelect = React6.useCallback((chain) => {
3130
- var _a2;
3131
- setSelectedChain(chain);
3132
- setQuery("");
3133
- setSelectedFilter("all");
3134
- (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
3135
- }, []);
3136
- const handleTabChange = React6.useCallback((tab) => {
3137
- setActiveTab(tab);
3138
- }, []);
3139
- React6.useEffect(() => {
3140
- const onKey = (e) => {
3141
- if (e.key === "Escape") onClose();
3142
- };
3143
- window.addEventListener("keydown", onKey);
3144
- return () => window.removeEventListener("keydown", onKey);
3145
- }, [onClose]);
3146
- React6.useEffect(() => {
3147
- var _a2;
3148
- (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
3149
- }, []);
3150
- const handleChainKeyDown = (e, chain, idx) => {
3151
- var _a2, _b, _c, _d;
3152
- if (e.key === "Enter" || e.key === " ") {
3153
- e.preventDefault();
3154
- handleChainSelect(chain);
3155
- }
3156
- if (e.key === "ArrowDown") {
3157
- e.preventDefault();
3158
- (_b = (_a2 = chainListRef.current) == null ? void 0 : _a2.querySelector(`[data-chain-index="${idx + 1}"]`)) == null ? void 0 : _b.focus();
3159
- }
3160
- if (e.key === "ArrowUp") {
3161
- e.preventDefault();
3162
- (_d = (_c = chainListRef.current) == null ? void 0 : _c.querySelector(`[data-chain-index="${idx - 1}"]`)) == null ? void 0 : _d.focus();
3163
- }
3164
- };
3165
- const handleAssetKeyDown = (e, asset, idx) => {
3166
- var _a2, _b, _c, _d, _e;
3167
- if (e.key === "Enter" || e.key === " ") {
3168
- e.preventDefault();
3169
- onSelect(selectedChain, asset);
3170
- }
3171
- if (e.key === "ArrowDown") {
3172
- e.preventDefault();
3173
- (_b = (_a2 = assetListRef.current) == null ? void 0 : _a2.querySelector(`[data-asset-index="${idx + 1}"]`)) == null ? void 0 : _b.focus();
3174
- }
3175
- if (e.key === "ArrowUp") {
3176
- e.preventDefault();
3177
- if (idx === 0) {
3178
- (_c = searchRef.current) == null ? void 0 : _c.focus();
3179
- return;
3180
- }
3181
- (_e = (_d = assetListRef.current) == null ? void 0 : _d.querySelector(`[data-asset-index="${idx - 1}"]`)) == null ? void 0 : _e.focus();
3182
- }
3183
- };
3184
- const sharedSearchAssets = /* @__PURE__ */ jsx(
3185
- SearchAndAssets,
3186
- {
3187
- query,
3188
- setQuery,
3189
- searchRef,
3190
- assetListRef,
3191
- filtered,
3192
- isMobile,
3193
- onSelect: (asset) => onSelect(selectedChain, asset),
3194
- handleAssetKeyDown,
3195
- activeTab,
3196
- onTabChange: handleTabChange,
3197
- visibleChains,
3198
- filterGroups: resolvedGroups,
3199
- selectedFilter,
3200
- onFilterChange: setSelectedFilter
3201
- }
3202
- );
3203
- if (isMobile) {
3204
- return /* @__PURE__ */ jsx(
3205
- motion.div,
3206
- {
3207
- initial: { opacity: 0 },
3208
- animate: { opacity: 1 },
3209
- exit: { opacity: 0 },
3210
- transition: { duration: 0.2 },
3211
- onClick: onClose,
3212
- "data-slot": "backdrop",
3213
- "data-test-id": "backdrop",
3214
- className: "fixed inset-0 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)] backdrop-blur-[4px] z-50 flex flex-col justify-end",
3215
- children: /* @__PURE__ */ jsxs(
3216
- motion.div,
3217
- {
3218
- role: "dialog",
3219
- "aria-modal": "true",
3220
- "aria-label": "Seletor de Blockchains e Ativos",
3221
- initial: { y: "100%" },
3222
- animate: { y: 0 },
3223
- exit: { y: "100%" },
3224
- transition: { type: "spring", stiffness: 320, damping: 32, mass: 0.8 },
3225
- onClick: (e) => e.stopPropagation(),
3226
- "data-slot": "sheet",
3227
- "data-test-id": "sheet",
3228
- className: [
3229
- "bg-[var(--deframe-widget-color-bg-secondary)] flex flex-col overflow-hidden",
3230
- "rounded-t-[var(--deframe-widget-size-radius-lg)]",
3231
- "border border-[color:var(--deframe-widget-color-border-secondary)] border-b-0",
3232
- "shadow-[0_10px_30px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_22%,transparent)]",
3233
- "max-h-[88vh]"
3234
- ].join(" "),
3235
- children: [
3236
- /* @__PURE__ */ jsx(
3237
- "div",
3238
- {
3239
- "data-slot": "drag-handle",
3240
- "data-test-id": "drag-handle",
3241
- className: "flex justify-center pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-xs)].5 flex-shrink-0",
3242
- children: /* @__PURE__ */ jsx("div", { className: "w-9 h-1 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-border-primary)]" })
3243
- }
3244
- ),
3245
- /* @__PURE__ */ jsxs(
3246
- "div",
3247
- {
3248
- "data-slot": "sheet-header",
3249
- "data-test-id": "sheet-header",
3250
- className: "flex items-center justify-between pt-[var(--deframe-widget-size-padding-y-xs)].5 pr-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-sm)].5 pl-[var(--deframe-widget-size-padding-x-md)] flex-shrink-0",
3251
- children: [
3252
- /* @__PURE__ */ jsx("span", { className: "text-[16px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] font-[var(--deframe-widget-font-family)]", children: "Seletor de Blockchains e Ativos" }),
3253
- /* @__PURE__ */ jsx(CloseButton, { onClick: onClose })
3254
- ]
3255
- }
3256
- ),
3257
- /* @__PURE__ */ jsxs(
3258
- "div",
3259
- {
3260
- "data-slot": "chain-section",
3261
- "data-test-id": "chain-section",
3262
- className: "flex-shrink-0 pb-[var(--deframe-widget-size-padding-y-sm)].5",
3263
- children: [
3264
- /* @__PURE__ */ jsx("div", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-tertiary)] tracking-[0.06em] uppercase px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-sm)]", children: "Redes" }),
3265
- /* @__PURE__ */ jsx(
3266
- "div",
3267
- {
3268
- ref: chainListRef,
3269
- role: "listbox",
3270
- "aria-label": "Redes",
3271
- "data-slot": "chain-chip-list",
3272
- "data-test-id": "chain-chip-list",
3273
- className: "flex gap-[var(--deframe-widget-size-gap-sm)] overflow-x-auto px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-xs)] [scrollbar-width:none]",
3274
- children: visibleChains.map((chain) => /* @__PURE__ */ jsx(
3275
- ChainChip,
3276
- {
3277
- chain,
3278
- selected: selectedChain.id === chain.id,
3279
- onClick: () => handleChainSelect(chain)
3280
- },
3281
- chain.id
3282
- ))
3283
- }
3284
- )
3285
- ]
3286
- }
3287
- ),
3288
- /* @__PURE__ */ jsx("div", { className: "h-px bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0" }),
3289
- /* @__PURE__ */ jsx(
3290
- "div",
3291
- {
3292
- "data-slot": "sheet-body",
3293
- "data-test-id": "sheet-body",
3294
- className: "flex-1 flex flex-col overflow-hidden pt-[var(--deframe-widget-size-padding-y-xs)]",
3295
- children: sharedSearchAssets
3296
- }
3297
- )
3298
- ]
3299
- }
3300
- )
3301
- }
3302
- );
3303
- }
3304
- return /* @__PURE__ */ jsx(
3305
- motion.div,
3306
- {
3307
- initial: { opacity: 0 },
3308
- animate: { opacity: 1 },
3309
- exit: { opacity: 0 },
3310
- transition: { duration: 0.2 },
3311
- onClick: onClose,
3312
- "data-slot": "backdrop",
3313
- "data-test-id": "backdrop",
3314
- className: "fixed inset-0 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)] backdrop-blur-[4px] z-50 flex items-center justify-center px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
3315
- children: /* @__PURE__ */ jsxs(
3316
- motion.div,
3317
- {
3318
- role: "dialog",
3319
- "aria-modal": "true",
3320
- "aria-label": "Seletor de Blockchains e Ativos",
3321
- initial: { opacity: 0, scale: 0.96 },
3322
- animate: { opacity: 1, scale: 1 },
3323
- exit: { opacity: 0, scale: 0.96 },
3324
- transition: { duration: 0.2, ease: "easeOut" },
3325
- onClick: (e) => e.stopPropagation(),
3326
- "data-slot": "modal",
3327
- "data-test-id": "modal",
3328
- className: [
3329
- "w-[min(680px,calc(100vw-32px))]",
3330
- "max-h-[min(620px,calc(100vh-64px))]",
3331
- "bg-[var(--deframe-widget-color-bg-secondary)]",
3332
- "border border-[color:var(--deframe-widget-color-border-secondary)]",
3333
- "rounded-[var(--deframe-widget-size-radius-md)]",
3334
- "shadow-[0_20px_50px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_28%,transparent)]",
3335
- "flex flex-col overflow-hidden"
3336
- ].join(" "),
3337
- children: [
3338
- /* @__PURE__ */ jsxs(
3339
- "div",
3340
- {
3341
- "data-slot": "modal-header",
3342
- "data-test-id": "modal-header",
3343
- className: "flex items-center justify-between pt-[var(--deframe-widget-size-padding-y-md)] pr-[var(--deframe-widget-size-padding-x-md)] pb-[14px] pl-[var(--deframe-widget-size-padding-x-md)] border-b border-[color:var(--deframe-widget-color-border-secondary)] flex-shrink-0",
3344
- children: [
3345
- /* @__PURE__ */ jsx("span", { className: "text-[16px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] font-[var(--deframe-widget-font-family)]", children: "Seletor de Blockchains e Ativos" }),
3346
- /* @__PURE__ */ jsx(CloseButton, { onClick: onClose })
3347
- ]
3348
- }
3349
- ),
3350
- /* @__PURE__ */ jsxs(
3351
- "div",
3352
- {
3353
- "data-slot": "modal-body",
3354
- "data-test-id": "modal-body",
3355
- className: "flex flex-1 overflow-hidden",
3356
- children: [
3357
- /* @__PURE__ */ jsxs(
3358
- "div",
3359
- {
3360
- "data-slot": "chain-sidebar",
3361
- "data-test-id": "chain-sidebar",
3362
- className: [
3363
- "w-[210px] flex-shrink-0",
3364
- "border-r border-[color:var(--deframe-widget-color-border-secondary)]",
3365
- "bg-[var(--deframe-widget-color-bg-secondary)]",
3366
- "flex flex-col overflow-hidden"
3367
- ].join(" "),
3368
- children: [
3369
- /* @__PURE__ */ jsx(
3370
- "div",
3371
- {
3372
- "data-slot": "chain-sidebar-label",
3373
- "data-test-id": "chain-sidebar-label",
3374
- className: "px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)] pb-[var(--deframe-widget-size-padding-y-xs)].5 text-[11px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-tertiary)] tracking-[0.06em] uppercase",
3375
- children: "Redes"
3376
- }
3377
- ),
3378
- /* @__PURE__ */ jsx(
3379
- "div",
3380
- {
3381
- ref: chainListRef,
3382
- role: "listbox",
3383
- "aria-label": "Redes",
3384
- "data-slot": "chain-list",
3385
- "data-test-id": "chain-list",
3386
- className: "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-sm)] pb-[var(--deframe-widget-size-padding-y-sm)] pt-[var(--deframe-widget-size-padding-y-xs)]",
3387
- children: visibleChains.map((chain, i) => /* @__PURE__ */ jsx(
3388
- ChainRow,
3389
- {
3390
- chain,
3391
- selected: selectedChain.id === chain.id,
3392
- onClick: () => handleChainSelect(chain),
3393
- onKeyDown: (e) => handleChainKeyDown(e, chain, i),
3394
- index: i
3395
- },
3396
- chain.id
3397
- ))
3398
- }
3399
- )
3400
- ]
3401
- }
3402
- ),
3403
- /* @__PURE__ */ jsx(
3404
- "div",
3405
- {
3406
- "data-slot": "asset-panel",
3407
- "data-test-id": "asset-panel",
3408
- className: "flex-1 flex flex-col overflow-hidden",
3409
- children: sharedSearchAssets
3410
- }
3411
- )
3412
- ]
3413
- }
3414
- )
3415
- ]
3416
- }
3417
- )
3418
- }
3419
- );
3420
- }
3421
- function AssetList(_a) {
3422
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3423
- return /* @__PURE__ */ jsx(
3424
- "div",
3425
- __spreadValues({
3426
- "data-slot": "asset-list",
3427
- "data-test-id": "asset-list",
3428
- className: twMerge(
3429
- "w-full self-start flex flex-col",
3430
- "bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
3431
- "rounded-[var(--deframe-widget-size-radius-md)]",
3432
- "overflow-hidden",
3433
- className
3434
- )
3435
- }, props)
3436
- );
3437
- }
3438
- function AssetListHeader(_a) {
3439
- var _b = _a, { action, children, className } = _b, props = __objRest(_b, ["action", "children", "className"]);
3440
- return /* @__PURE__ */ jsxs(
3441
- "div",
3442
- __spreadProps(__spreadValues({
3443
- "data-slot": "asset-list-header",
3444
- "data-test-id": "asset-list-header",
3445
- className: twMerge("flex items-center justify-between px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-md)] pb-[var(--deframe-widget-size-padding-y-sm)]", className)
3446
- }, props), {
3447
- children: [
3448
- /* @__PURE__ */ jsx("h3", { className: "text-[color:var(--deframe-widget-color-text-primary)] text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] leading-[1.3]", children }),
3449
- action != null && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-shrink-0", children: action })
3450
- ]
3451
- })
3452
- );
3453
- }
3454
- function AssetListFilter({ filters, selected, onSelect, className }) {
3455
- return /* @__PURE__ */ jsx(
3456
- "div",
3457
- {
3458
- "data-slot": "asset-list-filter",
3459
- "data-test-id": "asset-list-filter",
3460
- className: twMerge(
3461
- "flex items-center gap-[var(--deframe-widget-size-gap-sm)] px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-sm)]",
3462
- "overflow-x-auto",
3463
- className
3464
- ),
3465
- style: { scrollbarWidth: "none" },
3466
- children: filters.map((filter) => {
3467
- const isSelected = filter.id === selected;
3468
- return /* @__PURE__ */ jsx(
3469
- "button",
3470
- {
3471
- type: "button",
3472
- "data-slot": "asset-list-filter-pill",
3473
- "data-test-id": "asset-list-filter-pill",
3474
- onClick: () => onSelect(filter.id),
3475
- className: twMerge(
3476
- "inline-flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[5px]",
3477
- "rounded-[var(--deframe-widget-size-radius-full)] border",
3478
- "text-[12px] [font-weight:var(--deframe-widget-font-weight-medium)] leading-[1.4]",
3479
- "font-[var(--deframe-widget-font-family)]",
3480
- "cursor-pointer whitespace-nowrap flex-shrink-0",
3481
- "outline-none transition-all duration-150",
3482
- isSelected ? "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)] text-[color:var(--deframe-widget-color-brand-primary)]" : "bg-transparent border-[color:var(--deframe-widget-color-border-secondary)] text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
3483
- ),
3484
- children: filter.label
3485
- },
3486
- filter.id
3487
- );
3488
- })
3489
- }
3490
- );
3491
- }
3492
- function AssetListColumns(_a) {
3493
- var _b = _a, {
3494
- labels = ["ATIVO", "TEND\xCANCIA", "SALDO"],
3495
- className
3496
- } = _b, props = __objRest(_b, [
3497
- "labels",
3498
- "className"
3499
- ]);
3500
- return /* @__PURE__ */ jsxs(
3501
- "div",
3502
- __spreadProps(__spreadValues({
3503
- "data-slot": "asset-list-columns",
3504
- "data-test-id": "asset-list-columns",
3505
- className: twMerge(
3506
- "grid grid-cols-[1fr_auto_auto] gap-x-[var(--deframe-widget-size-gap-md)]",
3507
- "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
3508
- "border-t border-[color:var(--deframe-widget-color-border-secondary)]",
3509
- className
3510
- )
3511
- }, props), {
3512
- children: [
3513
- /* @__PURE__ */ jsx("span", { className: "text-[10px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[1.4]", children: labels[0] }),
3514
- /* @__PURE__ */ jsx("span", { className: "text-[10px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[1.4] text-center", children: labels[1] }),
3515
- /* @__PURE__ */ jsx("span", { className: "text-[10px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[1.4] text-right", children: labels[2] })
3516
- ]
3517
- })
3518
- );
3519
- }
3520
- function AssetTrendBadge(_a) {
3521
- var _b = _a, { direction, value, className } = _b, props = __objRest(_b, ["direction", "value", "className"]);
3522
- const directionClasses = {
3523
- up: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)] text-[color:var(--deframe-widget-color-brand-primary)]",
3524
- down: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] text-[color:var(--deframe-widget-color-state-error)]",
3525
- neutral: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_84%,transparent)] border-[color:var(--deframe-widget-color-border-secondary)] text-[color:var(--deframe-widget-color-text-tertiary)]"
3526
- };
3527
- const arrowIcons = {
3528
- up: /* @__PURE__ */ jsx("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M5 1.5L9 7H1L5 1.5Z", fill: "currentColor" }) }),
3529
- down: /* @__PURE__ */ jsx("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M5 8.5L1 3H9L5 8.5Z", fill: "currentColor" }) }),
3530
- neutral: /* @__PURE__ */ jsx("svg", { width: "9", height: "9", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M2 6H10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
3531
- };
3532
- return /* @__PURE__ */ jsxs(
3533
- "span",
3534
- __spreadProps(__spreadValues({
3535
- "data-slot": "asset-trend-badge",
3536
- "data-test-id": "asset-trend-badge",
3537
- className: twMerge(
3538
- "inline-flex items-center gap-[3px]",
3539
- "px-[7px] py-[3px]",
3540
- "rounded-[var(--deframe-widget-size-radius-full)] border",
3541
- "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] leading-[1.4]",
3542
- "font-[var(--deframe-widget-font-family)]",
3543
- "whitespace-nowrap",
3544
- directionClasses[direction],
3545
- className
3546
- )
3547
- }, props), {
3548
- children: [
3549
- arrowIcons[direction],
3550
- value
3551
- ]
3552
- })
3553
- );
3554
- }
3555
- function AssetListItem(_a) {
3556
- var _b = _a, {
3557
- asset,
3558
- name,
3559
- symbol,
3560
- trendDirection,
3561
- trendValue,
3562
- balance,
3563
- balanceUsd,
3564
- className
3565
- } = _b, props = __objRest(_b, [
3566
- "asset",
3567
- "name",
3568
- "symbol",
3569
- "trendDirection",
3570
- "trendValue",
3571
- "balance",
3572
- "balanceUsd",
3573
- "className"
3574
- ]);
3575
- return /* @__PURE__ */ jsxs(
3576
- "div",
3577
- __spreadProps(__spreadValues({
3578
- "data-slot": "asset-list-item",
3579
- "data-test-id": "asset-list-item",
3580
- className: twMerge(
3581
- "grid grid-cols-[1fr_auto_auto] gap-x-[var(--deframe-widget-size-gap-md)] items-center",
3582
- "px-[var(--deframe-widget-size-padding-x-md)] py-[11px]",
3583
- "border-t border-[color:var(--deframe-widget-color-border-secondary)]",
3584
- "transition-colors duration-150",
3585
- "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]",
3586
- className
3587
- )
3588
- }, props), {
3589
- children: [
3590
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] min-w-0", children: [
3591
- /* @__PURE__ */ jsx(IconCircle, { item: asset, size: 36 }),
3592
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
3593
- /* @__PURE__ */ jsx("span", { className: "text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[1.3] font-[var(--deframe-widget-font-family)] truncate", children: name }),
3594
- /* @__PURE__ */ jsx("span", { className: "text-[11px] text-[color:var(--deframe-widget-color-text-secondary)] leading-[1.4]", children: symbol })
3595
- ] })
3596
- ] }),
3597
- /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(AssetTrendBadge, { direction: trendDirection, value: trendValue }) }),
3598
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end text-right", children: [
3599
- /* @__PURE__ */ jsx("span", { className: "text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[1.3] font-[var(--deframe-widget-font-family)]", children: balanceUsd }),
3600
- /* @__PURE__ */ jsx("span", { className: "text-[11px] text-[color:var(--deframe-widget-color-text-secondary)] leading-[1.4]", children: balance })
3601
- ] })
3602
- ]
3603
- })
3604
- );
3605
- }
3606
- var riskConfig = {
3607
- low: {
3608
- label: "Baixo",
3609
- wrapperClass: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
3610
- dotClass: "bg-[var(--deframe-widget-color-brand-primary)]",
3611
- labelClass: "text-[color:var(--deframe-widget-color-brand-primary)]"
3612
- },
3613
- medium: {
3614
- label: "M\xE9dio",
3615
- wrapperClass: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_32%,transparent)]",
3616
- dotClass: "bg-[var(--deframe-widget-color-state-warning)]",
3617
- labelClass: "text-[color:var(--deframe-widget-color-state-warning)]"
3618
- },
3619
- high: {
3620
- label: "Alto",
3621
- wrapperClass: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)]",
3622
- dotClass: "bg-[var(--deframe-widget-color-state-error)]",
3623
- labelClass: "text-[color:var(--deframe-widget-color-state-error)]"
3624
- }
3625
- };
3626
- function StrategyList(_a) {
3627
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3628
- return /* @__PURE__ */ jsx(
3629
- "div",
3630
- __spreadValues({
3631
- "data-slot": "strategy-list",
3632
- "data-test-id": "strategy-list",
3633
- className: twMerge("w-full self-start flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", className)
3634
- }, props)
3635
- );
3636
- }
3637
- function StrategyListHeader(_a) {
3638
- var _b = _a, {
3639
- onBack,
3640
- subtitle,
3641
- children,
3642
- className
3643
- } = _b, props = __objRest(_b, [
3644
- "onBack",
3645
- "subtitle",
3646
- "children",
3647
- "className"
3648
- ]);
3649
- return /* @__PURE__ */ jsxs(
3650
- "div",
3651
- __spreadProps(__spreadValues({
3652
- "data-slot": "strategy-list-header",
3653
- "data-test-id": "strategy-list-header",
3654
- className: twMerge("w-full flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", className)
3655
- }, props), {
3656
- children: [
3657
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
3658
- onBack != null && /* @__PURE__ */ jsx(
3659
- "button",
3660
- {
3661
- type: "button",
3662
- onClick: onBack,
3663
- "aria-label": "Voltar",
3664
- className: twMerge(
3665
- "flex items-center justify-center",
3666
- "w-8 h-8",
3667
- "rounded-[var(--deframe-widget-size-radius-sm)]",
3668
- "border border-[color:var(--deframe-widget-color-border-secondary)]",
3669
- "text-[color:var(--deframe-widget-color-text-secondary)]",
3670
- "hover:text-[color:var(--deframe-widget-color-text-primary)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]",
3671
- "transition-all duration-150",
3672
- "cursor-pointer flex-shrink-0 outline-none"
3673
- ),
3674
- children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
3675
- }
3676
- ),
3677
- /* @__PURE__ */ jsx("h2", { className: "text-[color:var(--deframe-widget-color-text-primary)] text-[17px] [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] leading-[1.3]", children })
3678
- ] }),
3679
- subtitle != null && /* @__PURE__ */ jsx("p", { className: "text-[color:var(--deframe-widget-color-text-secondary)] text-[13px] font-[var(--deframe-widget-font-family)] leading-[1.5]", children: subtitle })
3680
- ]
3681
- })
3682
- );
3683
- }
3684
- function StrategyRiskBadge(_a) {
3685
- var _b = _a, { risk, label, className } = _b, props = __objRest(_b, ["risk", "label", "className"]);
3686
- const config = riskConfig[risk];
3687
- const displayLabel = label != null ? label : config.label;
3688
- return /* @__PURE__ */ jsxs(
3689
- "span",
3690
- __spreadProps(__spreadValues({
3691
- "data-slot": "strategy-risk-badge",
3692
- "data-test-id": "strategy-risk-badge",
3693
- className: twMerge(
3694
- "inline-flex items-center gap-[5px]",
3695
- "py-[3px] pr-[10px] pl-[7px]",
3696
- "rounded-[var(--deframe-widget-size-radius-full)] border",
3697
- config.wrapperClass,
3698
- className
3699
- )
3700
- }, props), {
3701
- children: [
3702
- /* @__PURE__ */ jsx(
3703
- "span",
3704
- {
3705
- className: twMerge("w-[6px] h-[6px] rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0 inline-block", config.dotClass)
3706
- }
3707
- ),
3708
- /* @__PURE__ */ jsx(
3709
- "span",
3710
- {
3711
- className: twMerge(
3712
- "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] font-[var(--deframe-widget-font-family)]",
3713
- config.labelClass
3714
- ),
3715
- children: displayLabel
3716
- }
3717
- )
3718
- ]
3719
- })
3720
- );
3721
- }
3722
- function StrategyListItem(_a) {
3723
- var _b = _a, {
3724
- strategy,
3725
- name,
3726
- network,
3727
- rendimento,
3728
- risk,
3729
- onInvestir,
3730
- onSacar,
3731
- showSacar = true,
3732
- className
3733
- } = _b, props = __objRest(_b, [
3734
- "strategy",
3735
- "name",
3736
- "network",
3737
- "rendimento",
3738
- "risk",
3739
- "onInvestir",
3740
- "onSacar",
3741
- "showSacar",
3742
- "className"
3743
- ]);
3744
- return /* @__PURE__ */ jsxs(
3745
- "div",
3746
- __spreadProps(__spreadValues({
3747
- "data-slot": "strategy-list-item",
3748
- "data-test-id": "strategy-list-item",
3749
- className: twMerge(
3750
- "w-full flex flex-col gap-[var(--deframe-widget-size-gap-sm)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
3751
- "bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
3752
- "rounded-[var(--deframe-widget-size-radius-md)]",
3753
- className
3754
- )
3755
- }, props), {
3756
- children: [
3757
- /* @__PURE__ */ jsxs("div", { className: "w-full flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
3758
- /* @__PURE__ */ jsx(IconCircle, { item: strategy, size: 40 }),
3759
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
3760
- /* @__PURE__ */ jsx("span", { className: "text-[14px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[1.3] font-[var(--deframe-widget-font-family)] truncate", children: name }),
3761
- network != null && /* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)] leading-[1.4]", children: network })
3762
- ] }),
3763
- risk != null && /* @__PURE__ */ jsx(StrategyRiskBadge, { risk })
3764
- ] }),
3765
- /* @__PURE__ */ jsxs("div", { className: "w-full flex items-baseline gap-[var(--deframe-widget-size-gap-sm)]", children: [
3766
- /* @__PURE__ */ jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)]", children: "Rendimento" }),
3767
- /* @__PURE__ */ jsx("span", { className: "text-[22px] [font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-brand-primary)] font-[var(--deframe-widget-font-family)] leading-[1.1]", children: rendimento })
3768
- ] }),
3769
- /* @__PURE__ */ jsxs("div", { className: "w-full flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
3770
- /* @__PURE__ */ jsx(
3771
- PrimaryButton,
3772
- {
3773
- className: "h-9 text-[13px] flex-1",
3774
- onClick: onInvestir,
3775
- children: "Investir"
3776
- }
3777
- ),
3778
- showSacar && /* @__PURE__ */ jsx(
3779
- SecondaryButton,
3780
- {
3781
- className: "h-9 text-[13px] flex-1",
3782
- onClick: onSacar,
3783
- children: "Sacar"
3784
- }
3785
- )
3786
- ] })
3787
- ]
3788
- })
3789
- );
3790
- }
3791
- function TokenIcon({ token, size = 40, badge, badgeSize = 18, className }) {
3792
- return /* @__PURE__ */ jsxs(
3793
- "div",
3794
- {
3795
- "data-test-id": "token-icon",
3796
- "data-slot": "token-icon",
3797
- className: twMerge("relative flex-shrink-0", className),
3798
- style: { width: size, height: size },
3799
- children: [
3800
- /* @__PURE__ */ jsx(
3801
- IconCircle,
3802
- {
3803
- "data-test-id": "token-icon-circle",
3804
- "data-slot": "token-icon-circle",
3805
- item: token,
3806
- size
3807
- }
3808
- ),
3809
- badge && /* @__PURE__ */ jsx(
3810
- "div",
3811
- {
3812
- "data-test-id": "token-icon-badge",
3813
- "data-slot": "token-icon-badge",
3814
- className: "absolute -bottom-0.5 -right-0.5 rounded-[var(--deframe-widget-size-radius-full)] shadow-[0_0_0_2px_var(--deframe-widget-color-bg-secondary)]",
3815
- children: /* @__PURE__ */ jsx(
3816
- IconCircle,
3817
- {
3818
- "data-test-id": "token-icon-badge-circle",
3819
- "data-slot": "token-icon-badge-circle",
3820
- item: badge,
3821
- size: badgeSize
3822
- }
3823
- )
3824
- }
3825
- )
3826
- ]
3827
- }
3828
- );
3829
- }
3830
- function PercentageChips({
3831
- options = [25, 50, 75, 100],
3832
- maxLabel = "M\xE1x.",
3833
- selected = null,
3834
- onSelect
3835
- }) {
3836
- return /* @__PURE__ */ jsx(
3837
- "div",
3838
- {
3839
- "data-test-id": "percentage-chips",
3840
- "data-slot": "percentage-chips",
3841
- className: "flex gap-[6px] items-center",
3842
- children: options.map((pct, i) => {
3843
- const isLast = i === options.length - 1;
3844
- const isActive = pct === selected;
3845
- const label = isLast ? maxLabel : `${pct}%`;
3846
- return /* @__PURE__ */ jsx(
3847
- ChipPill,
3848
- {
3849
- label,
3850
- active: isActive,
3851
- onClick: () => onSelect(pct)
3852
- },
3853
- pct
3854
- );
3855
- })
3856
- }
3857
- );
3858
- }
3859
- function ChipPill({ label, active, onClick }) {
3860
- const baseClasses = [
3861
- "inline-flex items-center justify-center",
3862
- "py-[3px] px-[10px]",
3863
- "rounded-[var(--deframe-widget-size-radius-full)]",
3864
- "cursor-pointer",
3865
- "text-[12px]",
3866
- "transition-all duration-150",
3867
- "outline-none",
3868
- "font-[var(--deframe-widget-font-family)]",
3869
- "whitespace-nowrap",
3870
- "border"
3871
- ].join(" ");
3872
- const stateClasses = {
3873
- active: [
3874
- "border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
3875
- "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
3876
- "text-[color:var(--deframe-widget-color-brand-primary)]",
3877
- "[font-weight:var(--deframe-widget-font-weight-semibold)]"
3878
- ].join(" "),
3879
- default: [
3880
- "border-[color:var(--deframe-widget-color-border-secondary)]",
3881
- "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_84%,transparent)]",
3882
- "text-[color:var(--deframe-widget-color-text-secondary)]",
3883
- "[font-weight:var(--deframe-widget-font-weight-regular)]",
3884
- "hover:border-[color:var(--deframe-widget-color-border-primary)]",
3885
- "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
3886
- "hover:text-[color:var(--deframe-widget-color-text-primary)]"
3887
- ].join(" ")
3888
- };
3889
- const chipClasses = twMerge(baseClasses, stateClasses[active ? "active" : "default"]);
3890
- return /* @__PURE__ */ jsx(
3891
- "button",
3892
- {
3893
- "data-test-id": "chip-pill",
3894
- "data-slot": "chip-pill",
3895
- onClick,
3896
- className: chipClasses,
3897
- children: /* @__PURE__ */ jsx(
3898
- "span",
3899
- {
3900
- "data-test-id": "chip-pill-label",
3901
- "data-slot": "chip-pill-label",
3902
- children: label
3903
- }
3904
- )
3905
- }
3906
- );
3907
- }
3908
- var variantClasses = {
3909
- error: {
3910
- wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)]"
3911
- },
3912
- warning: {
3913
- wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_32%,transparent)]"
3914
- },
3915
- info: {
3916
- wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-info)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-info)_32%,transparent)]"
3917
- },
3918
- success: {
3919
- wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]"
3920
- }
3921
- };
3922
- var variantData = {
3923
- error: {
3924
- accentClass: "bg-[var(--deframe-widget-color-state-error)]",
3925
- actionClass: "text-[color:var(--deframe-widget-color-state-error)]"
3926
- },
3927
- warning: {
3928
- accentClass: "bg-[var(--deframe-widget-color-state-warning)]",
3929
- actionClass: "text-[color:var(--deframe-widget-color-state-warning)]"
3930
- },
3931
- info: {
3932
- accentClass: "bg-[var(--deframe-widget-color-state-info)]",
3933
- actionClass: "text-[color:var(--deframe-widget-color-state-info)]"
3934
- },
3935
- success: {
3936
- accentClass: "bg-[var(--deframe-widget-color-brand-primary)]",
3937
- actionClass: "text-[color:var(--deframe-widget-color-brand-primary)]"
3938
- }
3939
- };
3940
- function InlineNotification({
3941
- variant,
3942
- message,
3943
- action,
3944
- onDismiss
3945
- }) {
3946
- const { wrapper } = variantClasses[variant];
3947
- const { accentClass, actionClass } = variantData[variant];
3948
- const wrapperClasses = twMerge(
3949
- "relative flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
3950
- "py-[7px] pr-[10px] pl-[14px]",
3951
- "rounded-[var(--deframe-widget-size-radius-sm)]",
3952
- "border",
3953
- "overflow-hidden",
3954
- wrapper
3955
- );
3956
- return /* @__PURE__ */ jsxs(
3957
- "div",
3958
- {
3959
- "data-test-id": "inline-notification",
3960
- "data-slot": "inline-notification",
3961
- role: "alert",
3962
- className: wrapperClasses,
3963
- children: [
3964
- /* @__PURE__ */ jsx(
3965
- "div",
3966
- {
3967
- "data-test-id": "inline-notification-accent",
3968
- "data-slot": "inline-notification-accent",
3969
- className: twMerge(
3970
- "absolute left-0 top-0 bottom-0 w-[3px] rounded-[var(--deframe-widget-size-radius-sm)_0_0_var(--deframe-widget-size-radius-sm)]",
3971
- accentClass
3972
- )
3973
- }
3974
- ),
3975
- /* @__PURE__ */ jsx(
3976
- "div",
3977
- {
3978
- "data-test-id": "inline-notification-dot",
3979
- "data-slot": "inline-notification-dot",
3980
- className: twMerge("w-[6px] h-[6px] rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0", accentClass)
3981
- }
3982
- ),
3983
- /* @__PURE__ */ jsx(
3984
- "span",
3985
- {
3986
- "data-test-id": "inline-notification-message",
3987
- "data-slot": "inline-notification-message",
3988
- className: "flex-1 text-[13px] text-[color:var(--deframe-widget-color-text-secondary)] font-[var(--deframe-widget-font-family)] leading-[1.4]",
3989
- children: message
3990
- }
3991
- ),
3992
- action && /* @__PURE__ */ jsxs(
3993
- "button",
3994
- {
3995
- "data-test-id": "inline-notification-action",
3996
- "data-slot": "inline-notification-action",
3997
- onClick: () => action.onClick(),
3998
- className: twMerge(
3999
- "flex-shrink-0 bg-none border-none cursor-pointer text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] py-[var(--deframe-widget-size-padding-y-none)] px-[var(--deframe-widget-size-padding-x-xs)] outline-none font-[var(--deframe-widget-font-family)] whitespace-nowrap",
4000
- actionClass
4001
- ),
4002
- children: [
4003
- action.label,
4004
- " \u2192"
4005
- ]
4006
- }
4007
- ),
4008
- onDismiss && /* @__PURE__ */ jsx(
4009
- "button",
4010
- {
4011
- "data-test-id": "inline-notification-dismiss",
4012
- "data-slot": "inline-notification-dismiss",
4013
- onClick: onDismiss,
4014
- "aria-label": "Dismiss notification",
4015
- className: "flex-shrink-0 bg-none border-none cursor-pointer text-[color:var(--deframe-widget-color-text-tertiary)] py-[var(--deframe-widget-size-padding-y-none)] px-[var(--deframe-widget-size-padding-x-none)].5 outline-none flex items-center",
4016
- children: /* @__PURE__ */ jsxs(
4017
- "svg",
4018
- {
4019
- width: "12",
4020
- height: "12",
4021
- viewBox: "0 0 24 24",
4022
- fill: "none",
4023
- stroke: "currentColor",
4024
- strokeWidth: "2.5",
4025
- strokeLinecap: "round",
4026
- "aria-hidden": "true",
4027
- children: [
4028
- /* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
4029
- /* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
4030
- ]
4031
- }
4032
- )
4033
- }
4034
- )
4035
- ]
4036
- }
4037
- );
4038
- }
4039
- function TokenSelector({ token, onClick, disabled = false }) {
4040
- var _a;
4041
- const badge = token.network ? {
4042
- name: token.network,
4043
- color: (_a = token.networkColor) != null ? _a : "var(--deframe-widget-color-brand-secondary)",
4044
- iconUrl: token.networkIconUrl
4045
- } : void 0;
4046
- const baseClasses = [
4047
- "inline-flex items-center gap-[10px]",
4048
- "py-[var(--deframe-widget-size-padding-y-sm)] px-[10px]",
4049
- "rounded-[var(--deframe-widget-size-radius-sm)]",
4050
- "bg-[var(--deframe-widget-color-bg-secondary)]",
4051
- "border-none",
4052
- "outline-none",
4053
- "transition-[background] duration-150",
4054
- "flex-shrink-0",
4055
- disabled ? "cursor-default" : "cursor-pointer hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-secondary)_72%,transparent)]"
4056
- ].join(" ");
4057
- return /* @__PURE__ */ jsxs(
4058
- "button",
4059
- {
4060
- "data-test-id": "token-selector",
4061
- "data-slot": "token-selector",
4062
- onClick: !disabled ? onClick : void 0,
4063
- disabled,
4064
- "aria-label": `Select token \u2014 currently ${token.symbol} on ${token.network}`,
4065
- className: twMerge(baseClasses),
4066
- children: [
4067
- /* @__PURE__ */ jsx(
4068
- TokenIcon,
4069
- {
4070
- "data-test-id": "token-selector-icon",
4071
- "data-slot": "token-selector-icon",
4072
- token,
4073
- size: 38,
4074
- badge,
4075
- badgeSize: 16
4076
- }
4077
- ),
4078
- /* @__PURE__ */ jsxs(
4079
- "div",
4080
- {
4081
- "data-test-id": "token-selector-info",
4082
- "data-slot": "token-selector-info",
4083
- className: "flex flex-col items-start min-w-0",
4084
- children: [
4085
- /* @__PURE__ */ jsx(
4086
- "span",
4087
- {
4088
- "data-test-id": "token-selector-symbol",
4089
- "data-slot": "token-selector-symbol",
4090
- className: [
4091
- "text-[16px] [font-weight:var(--deframe-widget-font-weight-semibold)] leading-[1.2]",
4092
- "font-[var(--deframe-widget-font-family)]",
4093
- disabled ? "text-[color:var(--deframe-widget-color-text-secondary)]" : "text-[color:var(--deframe-widget-color-text-primary)]"
4094
- ].join(" "),
4095
- children: token.symbol
4096
- }
4097
- ),
4098
- /* @__PURE__ */ jsx(
4099
- "span",
4100
- {
4101
- "data-test-id": "token-selector-network",
4102
- "data-slot": "token-selector-network",
4103
- className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-tertiary)] uppercase tracking-[0.04em] font-[var(--deframe-widget-font-family)] leading-[1.2]",
4104
- children: token.network
4105
- }
4106
- )
4107
- ]
4108
- }
4109
- ),
4110
- !disabled && /* @__PURE__ */ jsx(
4111
- "svg",
4112
- {
4113
- "data-test-id": "token-selector-chevron",
4114
- "data-slot": "token-selector-chevron",
4115
- width: "14",
4116
- height: "14",
4117
- viewBox: "0 0 24 24",
4118
- fill: "none",
4119
- stroke: "currentColor",
4120
- strokeWidth: "2.5",
4121
- strokeLinecap: "round",
4122
- strokeLinejoin: "round",
4123
- className: "flex-shrink-0 text-[color:var(--deframe-widget-color-text-secondary)]",
4124
- "aria-hidden": "true",
4125
- children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
4126
- }
4127
- )
4128
- ]
4129
- }
4130
- );
4131
- }
4132
- function AmountInput({
4133
- value,
4134
- onChange,
4135
- conversionUsd,
4136
- readOnly = false,
4137
- disabled = false
4138
- }) {
4139
- const isEmpty = !value || value === "0" || value === "";
4140
- const inputClasses = [
4141
- "bg-transparent border-none outline-none",
4142
- "text-right",
4143
- "text-[36px] [font-weight:var(--deframe-widget-font-weight-semibold)] [line-height:1.1]",
4144
- "w-full px-[var(--deframe-widget-size-padding-x-none)] py-[var(--deframe-widget-size-padding-y-none)]",
4145
- "font-[var(--deframe-widget-font-family)]",
4146
- isEmpty ? "text-[color:var(--deframe-widget-color-text-tertiary)]" : "text-[color:var(--deframe-widget-color-text-primary)]",
4147
- readOnly || disabled ? "cursor-default" : "cursor-text"
4148
- ].join(" ");
4149
- return /* @__PURE__ */ jsxs(
4150
- "div",
4151
- {
4152
- "data-test-id": "amount-input-wrapper",
4153
- "data-slot": "amount-input-wrapper",
4154
- className: "flex flex-col items-end flex-1 min-w-0",
4155
- children: [
4156
- /* @__PURE__ */ jsx(
4157
- "input",
4158
- {
4159
- "data-test-id": "amount-input",
4160
- "data-slot": "amount-input",
4161
- type: "text",
4162
- inputMode: "decimal",
4163
- value: value || "",
4164
- readOnly,
4165
- disabled,
4166
- placeholder: "0",
4167
- onChange: (e) => {
4168
- const v = e.target.value;
4169
- if (/^[0-9]*\.?[0-9]*$/.test(v) || v === "") {
4170
- onChange(v);
4171
- }
4172
- },
4173
- className: twMerge(inputClasses)
4174
- }
4175
- ),
4176
- conversionUsd && /* @__PURE__ */ jsx(
4177
- "span",
4178
- {
4179
- "data-test-id": "amount-input-conversion",
4180
- "data-slot": "amount-input-conversion",
4181
- className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] mt-[var(--deframe-widget-size-gap-none)].5 font-[var(--deframe-widget-font-family)]",
4182
- children: conversionUsd
4183
- }
4184
- )
4185
- ]
4186
- }
4187
- );
4188
- }
4189
- function SwapDirectionButton({ onClick, disabled = false }) {
4190
- const [hovered, setHovered] = React6.useState(false);
4191
- const baseClasses = [
4192
- "inline-flex items-center justify-center",
4193
- "w-10 h-10",
4194
- "rounded-[var(--deframe-widget-size-radius-sm)]",
4195
- "bg-[var(--deframe-widget-color-bg-secondary)]",
4196
- "border border-[color:var(--deframe-widget-color-border-secondary)]",
4197
- "outline-none",
4198
- "flex-shrink-0",
4199
- "shadow-[0_2px_8px_color-mix(in_srgb,var(--deframe-widget-color-text-primary)_18%,transparent)]",
4200
- disabled ? "cursor-default text-[color:var(--deframe-widget-color-text-tertiary)]" : "cursor-pointer text-[color:var(--deframe-widget-color-brand-primary)]"
4201
- ].join(" ");
4202
- return /* @__PURE__ */ jsx(
4203
- motion.button,
4204
- {
4205
- "data-test-id": "swap-direction-button",
4206
- "data-slot": "swap-direction-button",
4207
- onClick: !disabled ? onClick : void 0,
4208
- onMouseEnter: () => setHovered(true),
4209
- onMouseLeave: () => setHovered(false),
4210
- disabled,
4211
- animate: { rotate: hovered ? 180 : 0 },
4212
- transition: { duration: 0.25, ease: "easeInOut" },
4213
- "aria-label": "Swap direction",
4214
- className: twMerge(baseClasses),
4215
- children: /* @__PURE__ */ jsxs(
4216
- "svg",
4217
- {
4218
- "data-test-id": "swap-direction-button-icon",
4219
- "data-slot": "swap-direction-button-icon",
4220
- width: "18",
4221
- height: "18",
4222
- viewBox: "0 0 24 24",
4223
- fill: "none",
4224
- stroke: "currentColor",
4225
- strokeWidth: "2.5",
4226
- strokeLinecap: "round",
4227
- strokeLinejoin: "round",
4228
- "aria-hidden": "true",
4229
- children: [
4230
- /* @__PURE__ */ jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
4231
- /* @__PURE__ */ jsx("polyline", { points: "19 12 12 19 5 12" })
4232
- ]
4233
- }
4234
- )
4235
- }
4236
- );
4237
- }
4238
- function TokenInputCard({
4239
- token,
4240
- amount,
4241
- onAmountChange,
4242
- balance,
4243
- balanceSymbol,
4244
- conversionUsd,
4245
- onTokenSelect,
4246
- readOnly = false,
4247
- error = null,
4248
- onHoverChange,
4249
- chipsSlot
4250
- }) {
4251
- const hasError = error === "insufficient_balance";
4252
- const wrapperClasses = twMerge(
4253
- "rounded-[var(--deframe-widget-size-radius-sm)]",
4254
- "border",
4255
- "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
4256
- "transition-[border-color,background] duration-200",
4257
- hasError ? "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)]"
4258
- );
4259
- return /* @__PURE__ */ jsxs(
4260
- "div",
4261
- {
4262
- "data-test-id": "token-input-card",
4263
- "data-slot": "token-input-card",
4264
- onMouseEnter: () => onHoverChange == null ? void 0 : onHoverChange(true),
4265
- onMouseLeave: () => onHoverChange == null ? void 0 : onHoverChange(false),
4266
- className: wrapperClasses,
4267
- children: [
4268
- /* @__PURE__ */ jsxs(
4269
- "div",
4270
- {
4271
- "data-test-id": "token-input-card-top-row",
4272
- "data-slot": "token-input-card-top-row",
4273
- className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
4274
- children: [
4275
- /* @__PURE__ */ jsx(
4276
- TokenSelector,
4277
- {
4278
- "data-test-id": "token-input-card-selector",
4279
- "data-slot": "token-input-card-selector",
4280
- token,
4281
- onClick: onTokenSelect,
4282
- disabled: !onTokenSelect
4283
- }
4284
- ),
4285
- /* @__PURE__ */ jsx(
4286
- "div",
4287
- {
4288
- "data-test-id": "token-input-card-divider",
4289
- "data-slot": "token-input-card-divider",
4290
- className: "w-px h-10 bg-[var(--deframe-widget-color-border-secondary)] flex-shrink-0"
4291
- }
4292
- ),
4293
- /* @__PURE__ */ jsx(
4294
- AmountInput,
4295
- {
4296
- "data-test-id": "token-input-card-amount",
4297
- "data-slot": "token-input-card-amount",
4298
- value: amount,
4299
- onChange: onAmountChange != null ? onAmountChange : (() => {
4300
- }),
4301
- conversionUsd,
4302
- readOnly,
4303
- disabled: !onAmountChange && !readOnly
4304
- }
4305
- )
4306
- ]
4307
- }
4308
- ),
4309
- (balance !== void 0 || balanceSymbol) && /* @__PURE__ */ jsx(
4310
- "div",
4311
- {
4312
- "data-test-id": "token-input-card-balance-row",
4313
- "data-slot": "token-input-card-balance-row",
4314
- className: "flex items-center justify-between mt-[var(--deframe-widget-size-gap-sm)]",
4315
- children: /* @__PURE__ */ jsxs(
4316
- "span",
4317
- {
4318
- "data-test-id": "token-input-card-balance-label",
4319
- "data-slot": "token-input-card-balance-label",
4320
- className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
4321
- children: [
4322
- "Saldo:",
4323
- " ",
4324
- /* @__PURE__ */ jsxs(
4325
- "span",
4326
- {
4327
- "data-test-id": "token-input-card-balance-value",
4328
- "data-slot": "token-input-card-balance-value",
4329
- className: hasError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]",
4330
- children: [
4331
- balance != null ? balance : "0",
4332
- " ",
4333
- balanceSymbol != null ? balanceSymbol : token.symbol
4334
- ]
4335
- }
4336
- )
4337
- ]
4338
- }
4339
- )
4340
- }
4341
- ),
4342
- chipsSlot && /* @__PURE__ */ jsx(
4343
- "div",
4344
- {
4345
- "data-test-id": "token-input-card-chips-slot",
4346
- "data-slot": "token-input-card-chips-slot",
4347
- className: "mt-[var(--deframe-widget-size-gap-sm)]",
4348
- children: chipsSlot
4349
- }
4350
- ),
4351
- hasError && /* @__PURE__ */ jsx(
4352
- "div",
4353
- {
4354
- "data-test-id": "token-input-card-error",
4355
- "data-slot": "token-input-card-error",
4356
- className: "mt-[var(--deframe-widget-size-gap-sm)]",
4357
- children: /* @__PURE__ */ jsx(
4358
- InlineNotification,
4359
- {
4360
- variant: "error",
4361
- message: "Saldo insuficiente para realizar a troca.",
4362
- action: {
4363
- label: "Adicionar via PIX",
4364
- onClick: () => {
4365
- }
4366
- }
4367
- }
4368
- )
4369
- }
4370
- )
4371
- ]
4372
- }
4373
- );
4374
- }
4375
-
4376
- // src/stories/blockchain-asset-selector/tokens.ts
4377
- var T = {
4378
- bgLeft: "var(--deframe-widget-color-bg-secondary)",
4379
- border: "var(--deframe-widget-color-border-secondary)",
4380
- textPrimary: "var(--deframe-widget-color-text-primary)",
4381
- textSecondary: "var(--deframe-widget-color-text-secondary)",
4382
- green: "var(--deframe-widget-color-brand-primary)",
4383
- radiusModal: "var(--deframe-widget-size-radius-md)"};
4384
- var SWAP_FEEDBACK_DEFAULTS = {
4385
- loading: {
4386
- title: "PROCESSANDO TRANSA\xC7\xC3O...",
4387
- subtitle: "Aguarde enquanto sua troca \xE9 confirmada."
4388
- },
4389
- success: {
4390
- title: "Troca Aprovada!",
4391
- subtitle: "Seu saldo foi atualizado."
4392
- },
4393
- error: {
4394
- title: "Troca Falhou",
4395
- subtitle: "Tente novamente mais tarde."
4396
- }
4397
- };
4398
- function SwapFeedbackOverlay({
4399
- variant,
4400
- title,
4401
- subtitle,
4402
- standalone = false
4403
- }) {
4404
- const defaults = SWAP_FEEDBACK_DEFAULTS[variant];
4405
- const resolvedTitle = title != null ? title : defaults.title;
4406
- const resolvedSubtitle = subtitle != null ? subtitle : defaults.subtitle;
4407
- const isLoading = variant === "loading";
4408
- const overlay = /* @__PURE__ */ jsxs(
4409
- motion.div,
4410
- {
4411
- "data-test-id": "swap-feedback-overlay",
4412
- "data-slot": "swap-feedback-overlay",
4413
- initial: { opacity: 0 },
4414
- animate: { opacity: 1 },
4415
- exit: { opacity: 0 },
4416
- transition: { duration: 0.2 },
4417
- style: {
4418
- position: standalone ? "relative" : "absolute",
4419
- inset: standalone ? void 0 : 0,
4420
- borderRadius: "inherit",
4421
- backdropFilter: "blur(12px)",
4422
- WebkitBackdropFilter: "blur(12px)",
4423
- background: "color-mix(in srgb, var(--deframe-widget-color-bg-primary) 88%, transparent)",
4424
- zIndex: 10,
4425
- display: "flex",
4426
- flexDirection: "column",
4427
- alignItems: "center",
4428
- justifyContent: "center",
4429
- gap: 24,
4430
- padding: standalone ? "52px 32px" : "36px 24px",
4431
- fontFamily: "var(--deframe-widget-font-family)"
4432
- },
4433
- children: [
4434
- isLoading && /* @__PURE__ */ jsx(LoadingIcon, {}),
4435
- variant === "success" && /* @__PURE__ */ jsx(SuccessIcon, {}),
4436
- variant === "error" && /* @__PURE__ */ jsx(ErrorIcon, {}),
4437
- /* @__PURE__ */ jsxs(
4438
- "div",
4439
- {
4440
- "data-test-id": "swap-feedback-text",
4441
- "data-slot": "swap-feedback-text",
4442
- style: {
4443
- display: "flex",
4444
- flexDirection: "column",
4445
- alignItems: "center",
4446
- gap: 8,
4447
- textAlign: "center"
4448
- },
4449
- children: [
4450
- /* @__PURE__ */ jsx(
4451
- "span",
4452
- {
4453
- "data-test-id": "swap-feedback-title",
4454
- "data-slot": "swap-feedback-title",
4455
- style: {
4456
- fontSize: isLoading ? 12 : 22,
4457
- fontWeight: isLoading ? 600 : 700,
4458
- letterSpacing: isLoading ? "0.10em" : void 0,
4459
- textTransform: isLoading ? "uppercase" : void 0,
4460
- color: isLoading ? T.green : T.textPrimary,
4461
- lineHeight: 1.25
4462
- },
4463
- children: resolvedTitle
4464
- }
4465
- ),
4466
- /* @__PURE__ */ jsx(
4467
- "span",
4468
- {
4469
- "data-test-id": "swap-feedback-subtitle",
4470
- "data-slot": "swap-feedback-subtitle",
4471
- style: {
4472
- fontSize: 14,
4473
- fontWeight: 400,
4474
- color: T.textSecondary,
4475
- lineHeight: 1.6,
4476
- maxWidth: 260
4477
- },
4478
- children: resolvedSubtitle
4479
- }
4480
- )
4481
- ]
4482
- }
4483
- )
4484
- ]
4485
- },
4486
- "swap-feedback-overlay"
4487
- );
4488
- if (standalone) {
4489
- return /* @__PURE__ */ jsx(
4490
- "div",
4491
- {
4492
- style: {
4493
- width: "100%",
4494
- borderRadius: T.radiusModal,
4495
- overflow: "hidden",
4496
- border: `1px solid ${T.border}`,
4497
- background: T.bgLeft
4498
- },
4499
- children: overlay
4500
- }
4501
- );
4502
- }
4503
- return overlay;
4504
- }
4505
- function LoadingIcon() {
4506
- const green = T.green;
4507
- const trackColor = "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)";
4508
- const sw = 2.8;
4509
- const aw = 2.4;
4510
- return /* @__PURE__ */ jsxs(
4511
- motion.svg,
4512
- {
4513
- "data-test-id": "swap-feedback-loading-icon",
4514
- "data-slot": "swap-feedback-loading-icon",
4515
- width: "56",
4516
- height: "56",
4517
- viewBox: "0 0 56 56",
4518
- fill: "none",
4519
- "aria-hidden": "true",
4520
- animate: { rotate: 360 },
4521
- transition: { duration: 1.6, repeat: Infinity, ease: "linear" },
4522
- children: [
4523
- /* @__PURE__ */ jsx("circle", { cx: "28", cy: "28", r: "22", stroke: trackColor, strokeWidth: sw }),
4524
- /* @__PURE__ */ jsx(
4525
- "path",
4526
- {
4527
- d: "M 6.75 22.31 A 22 22 0 0 1 49.25 22.31",
4528
- stroke: green,
4529
- strokeWidth: sw,
4530
- strokeLinecap: "round"
4531
- }
4532
- ),
4533
- /* @__PURE__ */ jsx(
4534
- "path",
4535
- {
4536
- d: "M 45.0 18.1 L 49.25 22.31 L 51.0 16.5",
4537
- stroke: green,
4538
- strokeWidth: aw,
4539
- strokeLinecap: "round",
4540
- strokeLinejoin: "round"
4541
- }
4542
- ),
4543
- /* @__PURE__ */ jsx(
4544
- "path",
4545
- {
4546
- d: "M 49.25 33.69 A 22 22 0 0 1 6.75 33.69",
4547
- stroke: green,
4548
- strokeWidth: sw,
4549
- strokeLinecap: "round"
4550
- }
4551
- ),
4552
- /* @__PURE__ */ jsx(
4553
- "path",
4554
- {
4555
- d: "M 11.0 37.9 L 6.75 33.69 L 5.0 39.5",
4556
- stroke: green,
4557
- strokeWidth: aw,
4558
- strokeLinecap: "round",
4559
- strokeLinejoin: "round"
4560
- }
4561
- )
4562
- ]
4563
- }
4564
- );
4565
- }
4566
- function SuccessIcon() {
4567
- return /* @__PURE__ */ jsx(
4568
- motion.div,
4569
- {
4570
- "data-test-id": "swap-feedback-success-icon",
4571
- "data-slot": "swap-feedback-success-icon",
4572
- initial: { scale: 0.55, opacity: 0 },
4573
- animate: { scale: 1, opacity: 1 },
4574
- transition: { type: "spring", stiffness: 300, damping: 20, delay: 0.05 },
4575
- style: {
4576
- width: 84,
4577
- height: 84,
4578
- borderRadius: "50%",
4579
- background: "var(--deframe-widget-color-state-success)",
4580
- boxShadow: "0 0 0 10px color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent), 0 0 32px color-mix(in srgb, var(--deframe-widget-color-brand-primary) 22%, transparent)",
4581
- display: "flex",
4582
- alignItems: "center",
4583
- justifyContent: "center",
4584
- flexShrink: 0
4585
- },
4586
- children: /* @__PURE__ */ jsx("svg", { width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
4587
- motion.path,
4588
- {
4589
- d: "M10 22 L18 30 L34 14",
4590
- stroke: "white",
4591
- strokeWidth: "3.5",
4592
- strokeLinecap: "round",
4593
- strokeLinejoin: "round",
4594
- initial: { pathLength: 0 },
4595
- animate: { pathLength: 1 },
4596
- transition: { duration: 0.45, delay: 0.2, ease: "easeOut" }
4597
- }
4598
- ) })
4599
- }
4600
- );
4601
- }
4602
- var ERROR_RED = "var(--deframe-widget-color-state-error)";
4603
- function ErrorIcon() {
4604
- return /* @__PURE__ */ jsx(
4605
- motion.div,
4606
- {
4607
- "data-test-id": "swap-feedback-error-icon",
4608
- "data-slot": "swap-feedback-error-icon",
4609
- initial: { scale: 0.55, opacity: 0 },
4610
- animate: { scale: 1, opacity: 1 },
4611
- transition: { type: "spring", stiffness: 300, damping: 20, delay: 0.05 },
4612
- style: {
4613
- width: 84,
4614
- height: 84,
4615
- borderRadius: "50%",
4616
- background: ERROR_RED,
4617
- boxShadow: "0 0 0 10px color-mix(in srgb, var(--deframe-widget-color-state-error) 12%, transparent), 0 0 32px color-mix(in srgb, var(--deframe-widget-color-state-error) 22%, transparent)",
4618
- display: "flex",
4619
- alignItems: "center",
4620
- justifyContent: "center",
4621
- flexShrink: 0
4622
- },
4623
- children: /* @__PURE__ */ jsxs("svg", { width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: [
4624
- /* @__PURE__ */ jsx(
4625
- motion.line,
4626
- {
4627
- x1: "14",
4628
- y1: "14",
4629
- x2: "30",
4630
- y2: "30",
4631
- stroke: "white",
4632
- strokeWidth: "3.5",
4633
- strokeLinecap: "round",
4634
- initial: { pathLength: 0 },
4635
- animate: { pathLength: 1 },
4636
- transition: { duration: 0.25, delay: 0.2, ease: "easeOut" }
4637
- }
4638
- ),
4639
- /* @__PURE__ */ jsx(
4640
- motion.line,
4641
- {
4642
- x1: "30",
4643
- y1: "14",
4644
- x2: "14",
4645
- y2: "30",
4646
- stroke: "white",
4647
- strokeWidth: "3.5",
4648
- strokeLinecap: "round",
4649
- initial: { pathLength: 0 },
4650
- animate: { pathLength: 1 },
4651
- transition: { duration: 0.25, delay: 0.38, ease: "easeOut" }
4652
- }
4653
- )
4654
- ] })
4655
- }
4656
- );
4657
- }
4658
- function SwapPanel({
4659
- fromToken,
4660
- toToken,
4661
- fromAmount,
4662
- toAmount,
4663
- onFromAmountChange,
4664
- onFromPercentageSelect,
4665
- onFromTokenSelect,
4666
- onToTokenSelect,
4667
- onSwapTokens,
4668
- fromBalance,
4669
- fromBalanceSymbol,
4670
- toBalance,
4671
- toBalanceSymbol,
4672
- fromConversionUsd,
4673
- toConversionUsd,
4674
- onSubmit,
4675
- submitLabel = "Revisar Troca",
4676
- submitDisabled = false,
4677
- onHistory,
4678
- onAdvanced,
4679
- loading = false,
4680
- error = null,
4681
- feedback = null
4682
- }) {
4683
- const [fromCardHovered, setFromCardHovered] = React6.useState(false);
4684
- const [selectedPct, setSelectedPct] = React6.useState(null);
4685
- const hideTimerRef = React6.useRef(void 0);
4686
- function handleHoverStart() {
4687
- clearTimeout(hideTimerRef.current);
4688
- setFromCardHovered(true);
4689
- }
4690
- function handleHoverEnd() {
4691
- hideTimerRef.current = setTimeout(() => setFromCardHovered(false), 150);
4692
- }
4693
- React6.useEffect(() => () => clearTimeout(hideTimerRef.current), []);
4694
- const isSubmitDisabled = submitDisabled || loading || !fromAmount || fromAmount === "0" || fromAmount === "";
4695
- function handlePctSelect(pct) {
4696
- setSelectedPct(pct);
4697
- onFromPercentageSelect == null ? void 0 : onFromPercentageSelect(pct);
4698
- if (!fromBalance) return;
4699
- const bal = parseFloat(fromBalance.replace(/[^\d.]/g, ""));
4700
- if (isNaN(bal)) return;
4701
- const computed = (bal * pct / 100).toFixed(6).replace(/\.?0+$/, "");
4702
- onFromAmountChange(computed);
4703
- }
4704
- const submitClasses = twMerge(
4705
- "mt-[10px] w-full h-12",
4706
- "rounded-[var(--deframe-widget-size-radius-sm)]",
4707
- "border-none",
4708
- "text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)]",
4709
- "transition-[background,color] duration-200",
4710
- "flex items-center justify-center gap-[var(--deframe-widget-size-gap-sm)]",
4711
- "font-[var(--deframe-widget-font-family)]",
4712
- isSubmitDisabled ? "bg-[var(--deframe-widget-color-brand-primary-disabled)] text-[color:var(--deframe-widget-color-text-primary-disabled)] cursor-not-allowed" : "bg-[var(--deframe-widget-color-brand-primary)] text-[color:var(--deframe-widget-color-text-primary-dark)] cursor-pointer"
4713
- );
4714
- return /* @__PURE__ */ jsxs(
4715
- "div",
4716
- {
4717
- "data-test-id": "swap-panel",
4718
- "data-slot": "swap-panel",
4719
- className: "relative bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] flex flex-col w-full max-w-[480px] box-border font-[var(--deframe-widget-font-family)]",
4720
- children: [
4721
- onHistory && /* @__PURE__ */ jsx(
4722
- "div",
4723
- {
4724
- "data-test-id": "swap-panel-top-row",
4725
- "data-slot": "swap-panel-top-row",
4726
- className: "flex items-center justify-end mb-[var(--deframe-widget-size-gap-sm)]",
4727
- children: /* @__PURE__ */ jsx(HistoryButton, { onClick: onHistory })
4728
- }
4729
- ),
4730
- /* @__PURE__ */ jsx(
4731
- TokenInputCard,
4732
- {
4733
- token: {
4734
- name: fromToken.name,
4735
- symbol: fromToken.symbol,
4736
- color: fromToken.color,
4737
- iconUrl: fromToken.iconUrl,
4738
- network: fromToken.network,
4739
- networkColor: fromToken.networkColor,
4740
- networkIconUrl: fromToken.networkIconUrl
4741
- },
4742
- amount: fromAmount,
4743
- onAmountChange: (v) => {
4744
- setSelectedPct(null);
4745
- onFromAmountChange(v);
4746
- },
4747
- balance: fromBalance,
4748
- balanceSymbol: fromBalanceSymbol,
4749
- conversionUsd: fromConversionUsd,
4750
- onTokenSelect: onFromTokenSelect,
4751
- error,
4752
- onHoverChange: (h) => h ? handleHoverStart() : handleHoverEnd(),
4753
- chipsSlot: /* @__PURE__ */ jsx(AnimatePresence, { children: fromCardHovered && /* @__PURE__ */ jsx(
4754
- motion.div,
4755
- {
4756
- "data-test-id": "swap-panel-pct-chips",
4757
- "data-slot": "swap-panel-pct-chips",
4758
- initial: { opacity: 0, y: -4 },
4759
- animate: { opacity: 1, y: 0 },
4760
- exit: { opacity: 0, y: -4 },
4761
- transition: { duration: 0.15 },
4762
- children: /* @__PURE__ */ jsx(
4763
- PercentageChips,
4764
- {
4765
- selected: selectedPct,
4766
- onSelect: handlePctSelect
4767
- }
4768
- )
4769
- },
4770
- "pct-chips"
4771
- ) })
4772
- }
4773
- ),
4774
- /* @__PURE__ */ jsx(
4775
- "div",
4776
- {
4777
- "data-test-id": "swap-panel-direction-row",
4778
- "data-slot": "swap-panel-direction-row",
4779
- className: "flex justify-center relative -my-[var(--deframe-widget-size-gap-sm)] z-[1]",
4780
- children: /* @__PURE__ */ jsx(SwapDirectionButton, { onClick: onSwapTokens, disabled: !onSwapTokens })
4781
- }
4782
- ),
4783
- /* @__PURE__ */ jsx(
4784
- TokenInputCard,
4785
- {
4786
- token: {
4787
- name: toToken.name,
4788
- symbol: toToken.symbol,
4789
- color: toToken.color,
4790
- iconUrl: toToken.iconUrl,
4791
- network: toToken.network,
4792
- networkColor: toToken.networkColor,
4793
- networkIconUrl: toToken.networkIconUrl
4794
- },
4795
- amount: toAmount,
4796
- balance: toBalance,
4797
- balanceSymbol: toBalanceSymbol,
4798
- conversionUsd: toConversionUsd,
4799
- onTokenSelect: onToTokenSelect,
4800
- readOnly: true
4801
- }
4802
- ),
4803
- onAdvanced && /* @__PURE__ */ jsx(
4804
- "div",
4805
- {
4806
- "data-test-id": "swap-panel-advanced-row",
4807
- "data-slot": "swap-panel-advanced-row",
4808
- className: "flex justify-end mt-[var(--deframe-widget-size-gap-sm)]",
4809
- children: /* @__PURE__ */ jsx(AdvancedButton, { onClick: onAdvanced })
4810
- }
4811
- ),
4812
- /* @__PURE__ */ jsx(
4813
- "button",
4814
- {
4815
- "data-test-id": "swap-panel-submit",
4816
- "data-slot": "swap-panel-submit",
4817
- onClick: !isSubmitDisabled ? onSubmit : void 0,
4818
- disabled: isSubmitDisabled,
4819
- title: error === "insufficient_balance" ? "Adicione fundos para continuar" : void 0,
4820
- className: submitClasses,
4821
- children: loading ? /* @__PURE__ */ jsx(Spinner, {}) : submitLabel
4822
- }
4823
- ),
4824
- /* @__PURE__ */ jsx(AnimatePresence, { children: feedback && /* @__PURE__ */ jsx(
4825
- SwapFeedbackOverlay,
4826
- {
4827
- variant: feedback.variant,
4828
- title: feedback.title,
4829
- subtitle: feedback.subtitle
4830
- },
4831
- feedback.variant
4832
- ) })
4833
- ]
4834
- }
4835
- );
4836
- }
4837
- function HistoryButton({ onClick }) {
4838
- return /* @__PURE__ */ jsx(
4839
- "button",
4840
- {
4841
- "data-test-id": "history-button",
4842
- "data-slot": "history-button",
4843
- onClick,
4844
- "aria-label": "Hist\xF3rico de transa\xE7\xF5es",
4845
- className: twMerge(
4846
- "inline-flex items-center justify-center",
4847
- "w-9 h-9",
4848
- "rounded-[var(--deframe-widget-size-radius-sm)]",
4849
- "border-none",
4850
- "cursor-pointer",
4851
- "bg-transparent",
4852
- "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
4853
- "transition-[background] duration-150",
4854
- "flex-shrink-0",
4855
- "outline-none",
4856
- "text-[color:var(--deframe-widget-color-text-secondary)]"
4857
- ),
4858
- children: /* @__PURE__ */ jsxs(
4859
- "svg",
4860
- {
4861
- "data-test-id": "history-button-icon",
4862
- "data-slot": "history-button-icon",
4863
- viewBox: "0 0 24 24",
4864
- width: "20",
4865
- height: "20",
4866
- fill: "none",
4867
- stroke: "currentColor",
4868
- strokeWidth: "2",
4869
- strokeLinecap: "round",
4870
- strokeLinejoin: "round",
4871
- "aria-hidden": "true",
4872
- children: [
4873
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
4874
- /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
4875
- ]
4876
- }
4877
- )
4878
- }
4879
- );
4880
- }
4881
- function AdvancedButton({ onClick }) {
4882
- return /* @__PURE__ */ jsxs(
4883
- "button",
4884
- {
4885
- "data-test-id": "advanced-button",
4886
- "data-slot": "advanced-button",
4887
- onClick,
4888
- className: twMerge(
4889
- "inline-flex items-center gap-[5px]",
4890
- "py-[5px] px-[var(--deframe-widget-size-padding-x-sm)]",
4891
- "rounded-[var(--deframe-widget-size-radius-full)]",
4892
- "border border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
4893
- "bg-transparent",
4894
- "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
4895
- "cursor-pointer",
4896
- "text-[color:var(--deframe-widget-color-brand-primary)]",
4897
- "text-[13px] [font-weight:var(--deframe-widget-font-weight-medium)]",
4898
- "outline-none",
4899
- "font-[inherit]",
4900
- "transition-[background] duration-150",
4901
- "flex-shrink-0"
4902
- ),
4903
- children: [
4904
- /* @__PURE__ */ jsxs(
4905
- "svg",
4906
- {
4907
- "data-test-id": "advanced-button-icon",
4908
- "data-slot": "advanced-button-icon",
4909
- width: "13",
4910
- height: "13",
4911
- viewBox: "0 0 24 24",
4912
- fill: "none",
4913
- stroke: "currentColor",
4914
- strokeWidth: "2.5",
4915
- strokeLinecap: "round",
4916
- strokeLinejoin: "round",
4917
- "aria-hidden": "true",
4918
- children: [
4919
- /* @__PURE__ */ jsx("line", { x1: "4", y1: "6", x2: "20", y2: "6" }),
4920
- /* @__PURE__ */ jsx("line", { x1: "4", y1: "12", x2: "20", y2: "12" }),
4921
- /* @__PURE__ */ jsx("line", { x1: "4", y1: "18", x2: "20", y2: "18" }),
4922
- /* @__PURE__ */ jsx("circle", { cx: "8", cy: "6", r: "2", fill: "currentColor", stroke: "none" }),
4923
- /* @__PURE__ */ jsx("circle", { cx: "16", cy: "12", r: "2", fill: "currentColor", stroke: "none" }),
4924
- /* @__PURE__ */ jsx("circle", { cx: "10", cy: "18", r: "2", fill: "currentColor", stroke: "none" })
4925
- ]
4926
- }
4927
- ),
4928
- /* @__PURE__ */ jsx(
4929
- "span",
4930
- {
4931
- "data-test-id": "advanced-button-label",
4932
- "data-slot": "advanced-button-label",
4933
- children: "Avan\xE7ado"
4934
- }
4935
- )
4936
- ]
4937
- }
4938
- );
4939
- }
4940
- function Spinner() {
4941
- return /* @__PURE__ */ jsxs(
4942
- "svg",
4943
- {
4944
- "data-test-id": "spinner",
4945
- "data-slot": "spinner",
4946
- width: "18",
4947
- height: "18",
4948
- viewBox: "0 0 24 24",
4949
- fill: "none",
4950
- stroke: "currentColor",
4951
- strokeWidth: "2.5",
4952
- strokeLinecap: "round",
4953
- className: "animate-spin",
4954
- "aria-hidden": "true",
4955
- children: [
4956
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", opacity: "0.3" }),
4957
- /* @__PURE__ */ jsx("path", { d: "M12 2 A10 10 0 0 1 22 12" })
4958
- ]
4959
- }
4960
- );
4961
- }
4962
- function TransactionDetailRow({
4963
- label,
4964
- value,
4965
- valueColor,
4966
- divider = false
4967
- }) {
4968
- return /* @__PURE__ */ jsxs(Fragment, { children: [
4969
- /* @__PURE__ */ jsxs(
4970
- "div",
4971
- {
4972
- "data-test-id": "transaction-detail-row",
4973
- "data-slot": "transaction-detail-row",
4974
- className: "flex justify-between items-center py-[10px] gap-[var(--deframe-widget-size-gap-sm)]",
4975
- children: [
4976
- /* @__PURE__ */ jsx(
4977
- "span",
4978
- {
4979
- "data-test-id": "transaction-detail-row-label",
4980
- "data-slot": "transaction-detail-row-label",
4981
- 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",
4982
- children: label
4983
- }
4984
- ),
4985
- /* @__PURE__ */ jsx(
4986
- "span",
4987
- {
4988
- "data-test-id": "transaction-detail-row-value",
4989
- "data-slot": "transaction-detail-row-value",
4990
- className: [
4991
- "text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-right font-[var(--deframe-widget-font-family)]",
4992
- !valueColor ? "text-[color:var(--deframe-widget-color-text-primary)]" : ""
4993
- ].join(" "),
4994
- style: valueColor ? { color: valueColor } : void 0,
4995
- children: value
4996
- }
4997
- )
4998
- ]
4999
- }
5000
- ),
5001
- divider && /* @__PURE__ */ jsx(
5002
- "div",
5003
- {
5004
- "data-test-id": "transaction-detail-row-divider",
5005
- "data-slot": "transaction-detail-row-divider",
5006
- className: "h-px bg-[var(--deframe-widget-color-border-secondary)]"
5007
- }
5008
- )
5009
- ] });
5010
- }
5011
- function TransactionDetails({
5012
- title = "Detalhes da transa\xE7\xE3o",
5013
- subtitle,
5014
- items,
5015
- onClose
5016
- }) {
5017
- return /* @__PURE__ */ jsxs(
5018
- "div",
5019
- {
5020
- "data-test-id": "transaction-details",
5021
- "data-slot": "transaction-details",
5022
- className: "bg-[var(--deframe-widget-color-bg-secondary)] rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] w-full max-w-[320px] box-border font-[var(--deframe-widget-font-family)]",
5023
- children: [
5024
- /* @__PURE__ */ jsxs(
5025
- "div",
5026
- {
5027
- "data-test-id": "transaction-details-header",
5028
- "data-slot": "transaction-details-header",
5029
- className: [
5030
- "flex justify-between items-center",
5031
- subtitle ? "mb-[6px]" : "mb-[var(--deframe-widget-size-gap-none)]"
5032
- ].join(" "),
5033
- children: [
5034
- /* @__PURE__ */ jsx(
5035
- "span",
5036
- {
5037
- "data-test-id": "transaction-details-title",
5038
- "data-slot": "transaction-details-title",
5039
- className: "text-[15px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] font-[inherit]",
5040
- children: title
5041
- }
5042
- ),
5043
- onClose && /* @__PURE__ */ jsx(
5044
- CloseIconButton,
5045
- {
5046
- "data-test-id": "transaction-details-close",
5047
- "data-slot": "transaction-details-close",
5048
- onClick: onClose
5049
- }
5050
- )
5051
- ]
5052
- }
5053
- ),
5054
- subtitle && /* @__PURE__ */ jsx(
5055
- "p",
5056
- {
5057
- "data-test-id": "transaction-details-subtitle",
5058
- "data-slot": "transaction-details-subtitle",
5059
- className: "text-[13px] text-[color:var(--deframe-widget-color-text-secondary)] m-[var(--deframe-widget-size-gap-none)] mb-[var(--deframe-widget-size-gap-sm)] leading-[1.4] font-[inherit]",
5060
- children: subtitle
5061
- }
5062
- ),
5063
- /* @__PURE__ */ jsx(
5064
- "div",
5065
- {
5066
- "data-test-id": "transaction-details-divider",
5067
- "data-slot": "transaction-details-divider",
5068
- className: [
5069
- "h-px bg-[var(--deframe-widget-color-border-secondary)]",
5070
- subtitle ? "mt-[var(--deframe-widget-size-gap-none)]" : "mt-[var(--deframe-widget-size-gap-sm)]"
5071
- ].join(" ")
5072
- }
5073
- ),
5074
- items.map((item, i) => /* @__PURE__ */ jsx(
5075
- TransactionDetailRow,
5076
- {
5077
- label: item.label,
5078
- value: item.value,
5079
- valueColor: item.valueColor,
5080
- divider: i < items.length - 1
5081
- },
5082
- item.label
5083
- ))
5084
- ]
5085
- }
5086
- );
5087
- }
5088
- function CloseIconButton(_a) {
5089
- var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
5090
- return /* @__PURE__ */ jsx(
5091
- "button",
5092
- __spreadProps(__spreadValues({
5093
- onClick,
5094
- "aria-label": "Fechar detalhes",
5095
- className: twMerge(
5096
- "inline-flex items-center justify-center",
5097
- "w-7 h-7",
5098
- "rounded-[var(--deframe-widget-size-radius-sm)]",
5099
- "border-none",
5100
- "cursor-pointer",
5101
- "bg-transparent",
5102
- "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
5103
- "transition-[background] duration-150",
5104
- "flex-shrink-0",
5105
- "outline-none",
5106
- "text-[color:var(--deframe-widget-color-text-secondary)]"
5107
- )
5108
- }, rest), {
5109
- children: /* @__PURE__ */ jsx(
5110
- "svg",
5111
- {
5112
- "data-test-id": "transaction-details-close-icon",
5113
- "data-slot": "transaction-details-close-icon",
5114
- viewBox: "0 0 24 24",
5115
- width: "16",
5116
- height: "16",
5117
- fill: "currentColor",
5118
- "aria-hidden": "true",
5119
- children: /* @__PURE__ */ jsx("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })
5120
- }
5121
- )
5122
- })
5123
- );
5124
- }
5125
- var InfoRow = ({ children, borderBottom, className }) => {
5126
- const baseClasses = "self-stretch inline-flex justify-between items-start";
5127
- const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
5128
- return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row", className: twMerge(baseClasses, borderClasses, className), children });
5129
- };
5130
- var InfoLabel = ({ children, className }) => {
5131
- const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
5132
- return /* @__PURE__ */ jsx("div", { "data-test-id": "info-label", className: twMerge(baseClasses, className), children });
5133
- };
5134
- var variantClasses2 = {
5135
- default: "text-[color:var(--deframe-widget-color-text-primary)]",
5136
- success: "text-[color:var(--deframe-widget-color-state-success)]",
5137
- warning: "text-[color:var(--deframe-widget-color-state-warning)]",
5138
- error: "text-[color:var(--deframe-widget-color-state-error)]"
5139
- };
5140
- var InfoValue = ({ children, variant = "default", className }) => {
5141
- const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)]";
5142
- return /* @__PURE__ */ jsx("div", { "data-test-id": "info-value", className: twMerge(baseClasses, variantClasses2[variant], className), children });
5143
- };
5144
- var InfoRowWithIcon = ({ children, borderBottom, className }) => {
5145
- const baseClasses = "flex items-start justify-between h-[17px]";
5146
- const borderClasses = borderBottom ? "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]" : "";
5147
- return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row-with-icon", className: twMerge(baseClasses, borderClasses, className), children });
5148
- };
5149
- var InfoRowIconLabel = ({ children, className }) => {
5150
- const baseClasses = "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]";
5151
- return /* @__PURE__ */ jsxs("div", { "data-test-id": "info-row-icon-label", className: twMerge(baseClasses, className), children: [
5152
- "\u2022 ",
5153
- children
5154
- ] });
5155
- };
5156
- var InfoRowIconValue = ({ children, className }) => {
5157
- const baseClasses = "[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)]";
5158
- return /* @__PURE__ */ jsx("div", { "data-test-id": "info-row-icon-value", className: twMerge(baseClasses, className), children });
5159
- };
5160
- var CollapsibleInfoRow = ({
5161
- label,
5162
- value,
5163
- children,
5164
- defaultOpen = false,
5165
- className,
5166
- collapseLabel,
5167
- expandLabel
5168
- }) => {
5169
- const [isOpen, setIsOpen] = React6__default.useState(defaultOpen);
5170
- const baseClasses = "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] w-full";
5171
- return /* @__PURE__ */ jsxs("div", { "data-test-id": "collapsible-info-row", className: twMerge(baseClasses, className), children: [
5172
- /* @__PURE__ */ jsxs(
5173
- "button",
5174
- {
5175
- type: "button",
5176
- onClick: () => setIsOpen(!isOpen),
5177
- className: "flex items-start justify-between w-full text-left h-[18px] cursor-pointer",
5178
- "aria-expanded": isOpen,
5179
- "aria-label": `${isOpen ? collapseLabel : expandLabel} ${label}`,
5180
- children: [
5181
- /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-[2px]", children: [
5182
- /* @__PURE__ */ jsx("span", { className: "[font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)]", children: label }),
5183
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: isOpen ? /* @__PURE__ */ jsx(HiChevronUp, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-secondary)]" }) : /* @__PURE__ */ jsx(HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-secondary)]" }) })
5184
- ] }),
5185
- /* @__PURE__ */ jsx("span", { className: "[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-secondary)]", children: value })
5186
- ]
5187
- }
5188
- ),
5189
- isOpen && children
5190
- ] });
5191
- };
5192
- var BackgroundContainer = ({ children, className }) => {
5193
- const baseClasses = "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";
5194
- return /* @__PURE__ */ jsx("div", { "data-test-id": "background-container", className: twMerge(baseClasses, className), children });
5195
- };
5196
- var SectionCard = ({ children, className }) => {
5197
- const baseClasses = "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)]";
5198
- return /* @__PURE__ */ jsx("div", { "data-test-id": "section-card", className: twMerge(baseClasses, className), children });
5199
- };
5200
- var Navbar = ({ children, className }) => {
5201
- const baseClasses = "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";
5202
- return /* @__PURE__ */ jsx("nav", { "data-test-id": "navbar", className: twMerge(baseClasses, className), children });
5203
- };
5204
- var gapClasses = {
5205
- xs: "gap-[var(--deframe-widget-size-gap-xs)]",
5206
- sm: "gap-[var(--deframe-widget-size-gap-sm)]",
5207
- md: "gap-[var(--deframe-widget-size-gap-md)]",
5208
- lg: "gap-[var(--deframe-widget-size-gap-lg)]"
5209
- };
5210
- var FlexCol = ({ children, className, gap = "xs" }) => {
5211
- const baseClasses = "flex flex-col";
5212
- return /* @__PURE__ */ jsx("div", { "data-test-id": "flex-col", className: twMerge(baseClasses, gapClasses[gap], className), children });
5213
- };
5214
- var gapClasses2 = {
5215
- xs: "gap-[var(--deframe-widget-size-gap-xs)]",
5216
- sm: "gap-[var(--deframe-widget-size-gap-sm)]",
5217
- md: "gap-[var(--deframe-widget-size-gap-md)]",
5218
- lg: "gap-[var(--deframe-widget-size-gap-lg)]"
5219
- };
5220
- var FlexRow = ({ children, className, gap = "xs" }) => {
5221
- const baseClasses = "flex items-center";
5222
- return /* @__PURE__ */ jsx("div", { "data-test-id": "flex-row", className: twMerge(baseClasses, gapClasses2[gap], className), children });
5223
- };
5224
- var ScrollableContent = ({ children, className }) => {
5225
- const baseClasses = "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]";
5226
- return /* @__PURE__ */ jsx("div", { "data-test-id": "scrollable-content", className: twMerge(baseClasses, className), children });
5227
- };
5228
- var DetailsHeader = ({ title, onBack, className, backAriaLabel = "Back" }) => {
5229
- const baseClasses = "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";
5230
- return /* @__PURE__ */ jsxs("div", { "data-test-id": "details-header", className: twMerge(baseClasses, className), children: [
5231
- /* @__PURE__ */ jsx(
5232
- "button",
5233
- {
5234
- "data-test-id": "details-header-back-button",
5235
- onClick: onBack,
5236
- className: "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)] cursor-pointer",
5237
- "aria-label": backAriaLabel,
5238
- children: /* @__PURE__ */ jsx(HiChevronLeft, { className: "w-6 h-6 text-[color:var(--deframe-widget-color-text-tertiary)]" })
5239
- }
5240
- ),
5241
- /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center", children: /* @__PURE__ */ jsx(TextHeading, { variant: "h-large", children: title }) })
5242
- ] });
5243
- };
5244
- var HighRiskBadge = ({ className, label }) => {
5245
- const baseClasses = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
5246
- return /* @__PURE__ */ jsx("div", { "data-test-id": "high-risk-badge", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsx(
5247
- "div",
5248
- {
5249
- "data-size": "Small",
5250
- "data-type": "Failed",
5251
- className: "h-6 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-95 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_20%,transparent)] rounded-[var(--deframe-widget-size-radius-md)] outline outline-1 outline-offset-[-1px] outline-[color:var(--deframe-widget-color-state-error)] flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]",
5252
- children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-[var(--deframe-widget-size-gap-sm)].5", children: /* @__PURE__ */ jsx("div", { className: "justify-start text-[color:var(--deframe-widget-color-state-error)] [font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-regular)] font-[var(--deframe-widget-font-family)] leading-4", children: label }) })
5253
- }
5254
- ) });
5255
- };
5256
- var MediumRiskBadge = ({ className, label }) => {
5257
- const baseClasses = "inline-flex justify-start items-start gap-[var(--deframe-widget-size-gap-xs)]";
5258
- return /* @__PURE__ */ jsx("div", { "data-test-id": "medium-risk-badge", className: twMerge(baseClasses, className), children: /* @__PURE__ */ jsx(
5259
- "div",
5260
- {
5261
- "data-size": "Small",
5262
- "data-type": "Warning",
5263
- className: "h-6 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-95 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_20%,transparent)] rounded-[var(--deframe-widget-size-radius-md)] outline outline-1 outline-offset-[-1px] outline-[color:var(--deframe-widget-color-state-warning)] flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]",
5264
- children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-[var(--deframe-widget-size-gap-sm)].5", children: /* @__PURE__ */ jsx("div", { className: "justify-start text-[color:var(--deframe-widget-color-state-warning)] [font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-regular)] font-[var(--deframe-widget-font-family)] leading-4", children: label }) })
2310
+ "data-size": "Small",
2311
+ "data-type": "Warning",
2312
+ className: "h-6 px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] opacity-95 bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_20%,transparent)] rounded-[var(--deframe-widget-size-radius-md)] outline outline-1 outline-offset-[-1px] outline-[color:var(--deframe-widget-color-state-warning)] flex justify-center items-center gap-[var(--deframe-widget-size-gap-xs)]",
2313
+ children: /* @__PURE__ */ jsx("div", { className: "flex justify-start items-center gap-[var(--deframe-widget-size-gap-sm)].5", children: /* @__PURE__ */ jsx("div", { className: "justify-start text-[color:var(--deframe-widget-color-state-warning)] [font-size:var(--deframe-widget-font-size-xs)] [line-height:var(--deframe-widget-font-leading-xs)] [font-weight:var(--deframe-widget-font-weight-regular)] font-[var(--deframe-widget-font-family)] leading-4", children: label }) })
5265
2314
  }
5266
2315
  ) });
5267
2316
  };
@@ -5290,7 +2339,7 @@ var AmountInUsd = ({ children }) => /* @__PURE__ */ jsxs("p", { "data-test-id":
5290
2339
  "~ ",
5291
2340
  children
5292
2341
  ] });
5293
- var TokenIcon2 = ({ src, alt }) => /* @__PURE__ */ jsx(
2342
+ var TokenIcon = ({ src, alt }) => /* @__PURE__ */ jsx(
5294
2343
  "img",
5295
2344
  {
5296
2345
  "data-test-id": "token-icon",
@@ -5366,7 +2415,7 @@ var HistoryDepositDetailsView = ({
5366
2415
  /* @__PURE__ */ jsx(TransactionTypeLabel, { children: transactionTypeLabel }),
5367
2416
  shouldShowFlow && assetIn && assetOut ? /* @__PURE__ */ jsxs(FlexCol, { gap: "sm", children: [
5368
2417
  /* @__PURE__ */ jsxs(FlexRow, { gap: "sm", children: [
5369
- /* @__PURE__ */ jsx(TokenIcon2, { src: assetIn.iconUrl, alt: assetIn.symbol }),
2418
+ /* @__PURE__ */ jsx(TokenIcon, { src: assetIn.iconUrl, alt: assetIn.symbol }),
5370
2419
  /* @__PURE__ */ jsxs(FlexCol, { children: [
5371
2420
  /* @__PURE__ */ jsxs(Amount, { children: [
5372
2421
  assetIn.amount,
@@ -5377,7 +2426,7 @@ var HistoryDepositDetailsView = ({
5377
2426
  ] })
5378
2427
  ] }),
5379
2428
  /* @__PURE__ */ jsxs(FlexRow, { gap: "sm", children: [
5380
- /* @__PURE__ */ jsx(TokenIcon2, { src: assetOut.iconUrl, alt: assetOut.symbol }),
2429
+ /* @__PURE__ */ jsx(TokenIcon, { src: assetOut.iconUrl, alt: assetOut.symbol }),
5381
2430
  /* @__PURE__ */ jsxs(FlexCol, { children: [
5382
2431
  /* @__PURE__ */ jsxs(Amount, { children: [
5383
2432
  assetOut.amount,
@@ -5388,7 +2437,7 @@ var HistoryDepositDetailsView = ({
5388
2437
  ] })
5389
2438
  ] })
5390
2439
  ] }) : /* @__PURE__ */ jsxs(FlexRow, { gap: "sm", children: [
5391
- /* @__PURE__ */ jsx(TokenIcon2, { src: primaryAssetIconUrl, alt: symbol }),
2440
+ /* @__PURE__ */ jsx(TokenIcon, { src: primaryAssetIconUrl, alt: symbol }),
5392
2441
  /* @__PURE__ */ jsx(FlexCol, { children: /* @__PURE__ */ jsxs(FlexRow, { gap: "xs", children: [
5393
2442
  /* @__PURE__ */ jsx(Amount, { children: amountWithSymbol }),
5394
2443
  amountInUsdFormatted !== "-" ? /* @__PURE__ */ jsx(AmountInUsd, { children: amountInUsdFormatted }) : null
@@ -5456,7 +2505,7 @@ var HistoryWithdrawDetailsView = ({
5456
2505
  /* @__PURE__ */ jsx(TransactionTypeLabel, { children: transactionTypeLabel }),
5457
2506
  shouldShowFlow && assetIn && assetOut ? /* @__PURE__ */ jsxs(FlexCol, { gap: "sm", children: [
5458
2507
  /* @__PURE__ */ jsxs(FlexRow, { gap: "sm", children: [
5459
- /* @__PURE__ */ jsx(TokenIcon2, { src: assetIn.iconUrl, alt: assetIn.symbol }),
2508
+ /* @__PURE__ */ jsx(TokenIcon, { src: assetIn.iconUrl, alt: assetIn.symbol }),
5460
2509
  /* @__PURE__ */ jsxs(FlexCol, { children: [
5461
2510
  /* @__PURE__ */ jsxs(Amount, { children: [
5462
2511
  assetIn.amount,
@@ -5467,7 +2516,7 @@ var HistoryWithdrawDetailsView = ({
5467
2516
  ] })
5468
2517
  ] }),
5469
2518
  /* @__PURE__ */ jsxs(FlexRow, { gap: "sm", children: [
5470
- /* @__PURE__ */ jsx(TokenIcon2, { src: assetOut.iconUrl, alt: assetOut.symbol }),
2519
+ /* @__PURE__ */ jsx(TokenIcon, { src: assetOut.iconUrl, alt: assetOut.symbol }),
5471
2520
  /* @__PURE__ */ jsxs(FlexCol, { children: [
5472
2521
  /* @__PURE__ */ jsxs(Amount, { children: [
5473
2522
  assetOut.amount,
@@ -5478,7 +2527,7 @@ var HistoryWithdrawDetailsView = ({
5478
2527
  ] })
5479
2528
  ] })
5480
2529
  ] }) : /* @__PURE__ */ jsxs(FlexRow, { gap: "sm", children: [
5481
- /* @__PURE__ */ jsx(TokenIcon2, { src: primaryAssetIconUrl, alt: symbol }),
2530
+ /* @__PURE__ */ jsx(TokenIcon, { src: primaryAssetIconUrl, alt: symbol }),
5482
2531
  /* @__PURE__ */ jsx(FlexCol, { children: /* @__PURE__ */ jsxs(FlexRow, { gap: "xs", children: [
5483
2532
  /* @__PURE__ */ jsx(Amount, { children: amountWithSymbol }),
5484
2533
  amountInUsdFormatted !== "-" ? /* @__PURE__ */ jsx(AmountInUsd, { children: amountInUsdFormatted }) : null
@@ -5730,27 +2779,14 @@ var SwapQuoteBlockchainCostsView = ({
5730
2779
  /* @__PURE__ */ jsxs(InfoRowWithIcon, { children: [
5731
2780
  /* @__PURE__ */ jsx(InfoRowIconLabel, { children: networkGasLabel }),
5732
2781
  /* @__PURE__ */ jsx(InfoRowIconValue, { children: gasCostFormatted })
5733
- ] }),
5734
- /* @__PURE__ */ jsxs(InfoRowWithIcon, { borderBottom: true, children: [
5735
- /* @__PURE__ */ jsx(InfoRowIconLabel, { children: protocolFeeLabel }),
5736
- /* @__PURE__ */ jsx(InfoRowIconValue, { children: protocolFee })
5737
- ] })
5738
- ] })
5739
- }
5740
- ) });
5741
- };
5742
- var CloseButton2 = ({ onClick, testId, ariaLabel = "Close", className }) => {
5743
- const baseClasses = "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";
5744
- return /* @__PURE__ */ jsx(
5745
- "button",
5746
- {
5747
- "data-test-id": testId != null ? testId : "close-button",
5748
- onClick,
5749
- className: twMerge(baseClasses, className),
5750
- "aria-label": ariaLabel,
5751
- children: /* @__PURE__ */ jsx(HiXMark, { className: "w-6 h-6" })
2782
+ ] }),
2783
+ /* @__PURE__ */ jsxs(InfoRowWithIcon, { borderBottom: true, children: [
2784
+ /* @__PURE__ */ jsx(InfoRowIconLabel, { children: protocolFeeLabel }),
2785
+ /* @__PURE__ */ jsx(InfoRowIconValue, { children: protocolFee })
2786
+ ] })
2787
+ ] })
5752
2788
  }
5753
- );
2789
+ ) });
5754
2790
  };
5755
2791
  var ChooseAStrategyActionsheetView = ({
5756
2792
  isOpen,
@@ -5784,7 +2820,7 @@ var ChooseAStrategyActionsheetView = ({
5784
2820
  height: "full",
5785
2821
  contentClassName: "w-full max-w-[620px] mx-auto",
5786
2822
  children: /* @__PURE__ */ jsxs(BackgroundContainer, { className: "flex flex-col h-full", children: [
5787
- /* @__PURE__ */ jsx(Navbar, { children: /* @__PURE__ */ jsx(CloseButton2, { onClick: onClose, ariaLabel: closeAriaLabel }) }),
2823
+ /* @__PURE__ */ jsx(Navbar, { children: /* @__PURE__ */ jsx(CloseButton_default, { onClick: onClose, ariaLabel: closeAriaLabel }) }),
5788
2824
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)] overflow-hidden", children: [
5789
2825
  /* @__PURE__ */ jsxs("div", { className: "flex-shrink-0", children: [
5790
2826
  /* @__PURE__ */ jsx(TextHeading, { children: resolvedYieldLabel }),
@@ -5866,7 +2902,7 @@ var LoadingDots = ({ className = "" }) => {
5866
2902
  /* @__PURE__ */ jsx("span", { className: "animate-bounce", style: { animationDelay: "400ms", animationDuration: "1.4s" }, children: "." })
5867
2903
  ] });
5868
2904
  };
5869
- var SearchInput2 = ({
2905
+ var SearchInput = ({
5870
2906
  placeholder = "Search",
5871
2907
  value: controlledValue,
5872
2908
  disabled = false,
@@ -6014,7 +3050,7 @@ var TransactionScreen = ({
6014
3050
  }) => {
6015
3051
  return /* @__PURE__ */ jsx(BackgroundContainer, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full", children: [
6016
3052
  onBack && /* @__PURE__ */ jsx(DetailsHeader, { title: backTitle, onBack }),
6017
- onClose && /* @__PURE__ */ jsx("div", { "data-testid": testId, className: "flex justify-start px-[var(--deframe-widget-size-padding-x-md)] pt-md", children: /* @__PURE__ */ jsx(CloseButton2, { onClick: onClose }) }),
3053
+ onClose && /* @__PURE__ */ jsx("div", { "data-testid": testId, className: "flex justify-start px-[var(--deframe-widget-size-padding-x-md)] pt-md", children: /* @__PURE__ */ jsx(CloseButton_default, { onClick: onClose }) }),
6018
3054
  /* @__PURE__ */ jsx("div", { className: "w-full px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-sm)]", children: /* @__PURE__ */ jsx(ProgressIndicator, { progress }) }),
6019
3055
  /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)] flex flex-col gap-[var(--deframe-widget-size-gap-lg)]", children: [
6020
3056
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-md)] pt-lg", children: [
@@ -6252,6 +3288,144 @@ var SwapProcessingView = ({
6252
3288
  }
6253
3289
  );
6254
3290
  };
3291
+ function LoadingIcon() {
3292
+ const green = "var(--deframe-widget-color-brand-primary)";
3293
+ const trackColor = "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)";
3294
+ const sw = 2.8;
3295
+ const aw = 2.4;
3296
+ return /* @__PURE__ */ jsxs(
3297
+ motion.svg,
3298
+ {
3299
+ "data-test-id": "swap-processing-simple-loading-icon",
3300
+ width: "56",
3301
+ height: "56",
3302
+ viewBox: "0 0 56 56",
3303
+ fill: "none",
3304
+ "aria-hidden": "true",
3305
+ animate: { rotate: 360 },
3306
+ transition: { duration: 1.6, repeat: Infinity, ease: "linear" },
3307
+ children: [
3308
+ /* @__PURE__ */ jsx("circle", { cx: "28", cy: "28", r: "22", stroke: trackColor, strokeWidth: sw }),
3309
+ /* @__PURE__ */ jsx(
3310
+ "path",
3311
+ {
3312
+ d: "M 6.75 22.31 A 22 22 0 0 1 49.25 22.31",
3313
+ stroke: green,
3314
+ strokeWidth: sw,
3315
+ strokeLinecap: "round"
3316
+ }
3317
+ ),
3318
+ /* @__PURE__ */ jsx(
3319
+ "path",
3320
+ {
3321
+ d: "M 45.0 18.1 L 49.25 22.31 L 51.0 16.5",
3322
+ stroke: green,
3323
+ strokeWidth: aw,
3324
+ strokeLinecap: "round",
3325
+ strokeLinejoin: "round"
3326
+ }
3327
+ ),
3328
+ /* @__PURE__ */ jsx(
3329
+ "path",
3330
+ {
3331
+ d: "M 49.25 33.69 A 22 22 0 0 1 6.75 33.69",
3332
+ stroke: green,
3333
+ strokeWidth: sw,
3334
+ strokeLinecap: "round"
3335
+ }
3336
+ ),
3337
+ /* @__PURE__ */ jsx(
3338
+ "path",
3339
+ {
3340
+ d: "M 11.0 37.9 L 6.75 33.69 L 5.0 39.5",
3341
+ stroke: green,
3342
+ strokeWidth: aw,
3343
+ strokeLinecap: "round",
3344
+ strokeLinejoin: "round"
3345
+ }
3346
+ )
3347
+ ]
3348
+ }
3349
+ );
3350
+ }
3351
+ var SwapProcessingViewSimple = ({
3352
+ titleText,
3353
+ descriptionPrefix,
3354
+ activityHistoryText,
3355
+ onGoToHistory
3356
+ }) => {
3357
+ return /* @__PURE__ */ jsxs(
3358
+ "div",
3359
+ {
3360
+ "data-test-id": "swap-processing-simple-screen",
3361
+ className: twMerge(
3362
+ "absolute inset-0 z-10",
3363
+ "flex flex-col items-center justify-center",
3364
+ "gap-[var(--deframe-widget-size-gap-lg)]",
3365
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
3366
+ "rounded-[inherit]",
3367
+ "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
3368
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
3369
+ ),
3370
+ children: [
3371
+ /* @__PURE__ */ jsx(LoadingIcon, {}),
3372
+ /* @__PURE__ */ jsxs(
3373
+ "div",
3374
+ {
3375
+ "data-test-id": "swap-processing-simple-copy",
3376
+ className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)] text-center",
3377
+ children: [
3378
+ /* @__PURE__ */ jsx(
3379
+ "span",
3380
+ {
3381
+ "data-test-id": "swap-processing-simple-title",
3382
+ className: twMerge(
3383
+ "[font-size:12px] [line-height:1.25] [letter-spacing:0.10em] uppercase",
3384
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
3385
+ "font-[var(--deframe-widget-font-family)]",
3386
+ "text-[color:var(--deframe-widget-color-brand-primary)]"
3387
+ ),
3388
+ children: titleText
3389
+ }
3390
+ ),
3391
+ /* @__PURE__ */ jsxs(
3392
+ "span",
3393
+ {
3394
+ "data-test-id": "swap-processing-simple-subtitle",
3395
+ className: twMerge(
3396
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:1.6]",
3397
+ "[font-weight:var(--deframe-widget-font-weight-regular)]",
3398
+ "font-[var(--deframe-widget-font-family)]",
3399
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
3400
+ "max-w-[260px]"
3401
+ ),
3402
+ children: [
3403
+ descriptionPrefix,
3404
+ " ",
3405
+ /* @__PURE__ */ jsx(
3406
+ "button",
3407
+ {
3408
+ "data-test-id": "swap-processing-simple-history-link",
3409
+ onClick: onGoToHistory,
3410
+ "aria-label": activityHistoryText,
3411
+ className: twMerge(
3412
+ "bg-transparent border-0 p-0 cursor-pointer",
3413
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
3414
+ "text-[color:var(--deframe-widget-color-brand-primary)]"
3415
+ ),
3416
+ children: activityHistoryText
3417
+ }
3418
+ )
3419
+ ]
3420
+ }
3421
+ )
3422
+ ]
3423
+ }
3424
+ )
3425
+ ]
3426
+ }
3427
+ );
3428
+ };
6255
3429
  var SwapCrossChainProcessingView = ({
6256
3430
  fromTokenSymbol,
6257
3431
  fromTokenIcon,
@@ -6511,6 +3685,113 @@ var SwapSuccessView = ({
6511
3685
  }
6512
3686
  );
6513
3687
  };
3688
+ function SuccessIcon() {
3689
+ return /* @__PURE__ */ jsx(
3690
+ motion.div,
3691
+ {
3692
+ "data-test-id": "swap-success-simple-icon",
3693
+ initial: { scale: 0.55, opacity: 0 },
3694
+ animate: { scale: 1, opacity: 1 },
3695
+ transition: { type: "spring", stiffness: 300, damping: 20, delay: 0.05 },
3696
+ className: twMerge(
3697
+ "w-[84px] h-[84px] rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0",
3698
+ "flex items-center justify-center",
3699
+ "bg-[var(--deframe-widget-color-state-success)]",
3700
+ "shadow-[0_0_0_10px_color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent),0_0_32px_color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_22%,transparent)]"
3701
+ ),
3702
+ children: /* @__PURE__ */ jsx("svg", { width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
3703
+ motion.path,
3704
+ {
3705
+ d: "M10 22 L18 30 L34 14",
3706
+ stroke: "white",
3707
+ strokeWidth: "3.5",
3708
+ strokeLinecap: "round",
3709
+ strokeLinejoin: "round",
3710
+ initial: { pathLength: 0 },
3711
+ animate: { pathLength: 1 },
3712
+ transition: { duration: 0.45, delay: 0.2, ease: "easeOut" }
3713
+ }
3714
+ ) })
3715
+ }
3716
+ );
3717
+ }
3718
+ var SwapSuccessViewSimple = ({
3719
+ onGoToWallet,
3720
+ labels
3721
+ }) => {
3722
+ return /* @__PURE__ */ jsxs(
3723
+ "div",
3724
+ {
3725
+ "data-test-id": "swap-success-simple-screen",
3726
+ className: twMerge(
3727
+ "absolute inset-0 z-10",
3728
+ "flex flex-col items-center justify-center",
3729
+ "gap-[var(--deframe-widget-size-gap-lg)]",
3730
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
3731
+ "rounded-[inherit]",
3732
+ "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
3733
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
3734
+ ),
3735
+ children: [
3736
+ /* @__PURE__ */ jsx(SuccessIcon, {}),
3737
+ /* @__PURE__ */ jsxs(
3738
+ "div",
3739
+ {
3740
+ "data-test-id": "swap-success-simple-copy",
3741
+ className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)] text-center",
3742
+ children: [
3743
+ /* @__PURE__ */ jsx(
3744
+ "span",
3745
+ {
3746
+ "data-test-id": "swap-success-simple-title",
3747
+ className: twMerge(
3748
+ "[font-size:var(--deframe-widget-font-size-xl)]",
3749
+ "[line-height:var(--deframe-widget-font-leading-xl)]",
3750
+ "[font-weight:var(--deframe-widget-font-weight-bold)]",
3751
+ "font-[var(--deframe-widget-font-family)]",
3752
+ "text-[color:var(--deframe-widget-color-text-primary)]"
3753
+ ),
3754
+ children: labels == null ? void 0 : labels.title
3755
+ }
3756
+ ),
3757
+ /* @__PURE__ */ jsxs(
3758
+ "span",
3759
+ {
3760
+ "data-test-id": "swap-success-simple-subtitle",
3761
+ className: twMerge(
3762
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:1.6]",
3763
+ "[font-weight:var(--deframe-widget-font-weight-regular)]",
3764
+ "font-[var(--deframe-widget-font-family)]",
3765
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
3766
+ "max-w-[260px]"
3767
+ ),
3768
+ children: [
3769
+ labels == null ? void 0 : labels.descriptionSuffix,
3770
+ " ",
3771
+ /* @__PURE__ */ jsx(
3772
+ "button",
3773
+ {
3774
+ "data-test-id": "swap-success-simple-wallet-link",
3775
+ onClick: onGoToWallet,
3776
+ "aria-label": labels == null ? void 0 : labels.walletLinkText,
3777
+ className: twMerge(
3778
+ "bg-transparent border-0 p-0 cursor-pointer",
3779
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
3780
+ "text-[color:var(--deframe-widget-color-brand-primary)]"
3781
+ ),
3782
+ children: labels == null ? void 0 : labels.walletLinkText
3783
+ }
3784
+ )
3785
+ ]
3786
+ }
3787
+ )
3788
+ ]
3789
+ }
3790
+ )
3791
+ ]
3792
+ }
3793
+ );
3794
+ };
6514
3795
  var SwapTransactionFailedView = ({
6515
3796
  fromTokenSymbol,
6516
3797
  fromTokenIcon,
@@ -6587,6 +3868,114 @@ var SwapTransactionFailedView = ({
6587
3868
  }
6588
3869
  );
6589
3870
  };
3871
+ function ErrorIcon() {
3872
+ return /* @__PURE__ */ jsx(
3873
+ motion.div,
3874
+ {
3875
+ "data-test-id": "swap-failed-simple-icon",
3876
+ initial: { scale: 0.55, opacity: 0 },
3877
+ animate: { scale: 1, opacity: 1 },
3878
+ transition: { type: "spring", stiffness: 300, damping: 20, delay: 0.05 },
3879
+ className: twMerge(
3880
+ "w-[84px] h-[84px] rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0",
3881
+ "flex items-center justify-center",
3882
+ "bg-[var(--deframe-widget-color-state-error)]",
3883
+ "shadow-[0_0_0_10px_color-mix(in_srgb,var(--deframe-widget-color-state-error)_12%,transparent),0_0_32px_color-mix(in_srgb,var(--deframe-widget-color-state-error)_22%,transparent)]"
3884
+ ),
3885
+ children: /* @__PURE__ */ jsxs("svg", { width: "44", height: "44", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: [
3886
+ /* @__PURE__ */ jsx(
3887
+ motion.line,
3888
+ {
3889
+ x1: "14",
3890
+ y1: "14",
3891
+ x2: "30",
3892
+ y2: "30",
3893
+ stroke: "white",
3894
+ strokeWidth: "3.5",
3895
+ strokeLinecap: "round",
3896
+ initial: { pathLength: 0 },
3897
+ animate: { pathLength: 1 },
3898
+ transition: { duration: 0.25, delay: 0.2, ease: "easeOut" }
3899
+ }
3900
+ ),
3901
+ /* @__PURE__ */ jsx(
3902
+ motion.line,
3903
+ {
3904
+ x1: "30",
3905
+ y1: "14",
3906
+ x2: "14",
3907
+ y2: "30",
3908
+ stroke: "white",
3909
+ strokeWidth: "3.5",
3910
+ strokeLinecap: "round",
3911
+ initial: { pathLength: 0 },
3912
+ animate: { pathLength: 1 },
3913
+ transition: { duration: 0.25, delay: 0.38, ease: "easeOut" }
3914
+ }
3915
+ )
3916
+ ] })
3917
+ }
3918
+ );
3919
+ }
3920
+ var SwapTransactionFailedViewSimple = ({
3921
+ errorTitle,
3922
+ errorDescription
3923
+ }) => {
3924
+ return /* @__PURE__ */ jsxs(
3925
+ "div",
3926
+ {
3927
+ "data-test-id": "swap-failed-simple-screen",
3928
+ className: twMerge(
3929
+ "absolute inset-0 z-10",
3930
+ "flex flex-col items-center justify-center",
3931
+ "gap-[var(--deframe-widget-size-gap-lg)]",
3932
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-lg)]",
3933
+ "rounded-[inherit]",
3934
+ "backdrop-blur-[12px] [-webkit-backdrop-filter:blur(12px)]",
3935
+ "bg-[color-mix(in_srgb,var(--deframe-widget-color-bg-primary)_88%,transparent)]"
3936
+ ),
3937
+ children: [
3938
+ /* @__PURE__ */ jsx(ErrorIcon, {}),
3939
+ /* @__PURE__ */ jsxs(
3940
+ "div",
3941
+ {
3942
+ "data-test-id": "swap-failed-simple-copy",
3943
+ className: "flex flex-col items-center gap-[var(--deframe-widget-size-gap-sm)] text-center",
3944
+ children: [
3945
+ /* @__PURE__ */ jsx(
3946
+ "span",
3947
+ {
3948
+ "data-test-id": "swap-failed-simple-title",
3949
+ className: twMerge(
3950
+ "[font-size:22px] [line-height:1.25]",
3951
+ "[font-weight:var(--deframe-widget-font-weight-bold)]",
3952
+ "font-[var(--deframe-widget-font-family)]",
3953
+ "text-[color:var(--deframe-widget-color-text-primary)]"
3954
+ ),
3955
+ children: errorTitle
3956
+ }
3957
+ ),
3958
+ /* @__PURE__ */ jsx(
3959
+ "span",
3960
+ {
3961
+ "data-test-id": "swap-failed-simple-subtitle",
3962
+ className: twMerge(
3963
+ "[font-size:var(--deframe-widget-font-size-md)] [line-height:1.6]",
3964
+ "[font-weight:var(--deframe-widget-font-weight-regular)]",
3965
+ "font-[var(--deframe-widget-font-family)]",
3966
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
3967
+ "max-w-[260px]"
3968
+ ),
3969
+ children: errorDescription
3970
+ }
3971
+ )
3972
+ ]
3973
+ }
3974
+ )
3975
+ ]
3976
+ }
3977
+ );
3978
+ };
6590
3979
  var ChooseAnAssetSwapView = ({
6591
3980
  actionSheetId,
6592
3981
  isOpen,
@@ -6620,13 +4009,13 @@ var ChooseAnAssetSwapView = ({
6620
4009
  height: "full",
6621
4010
  contentClassName: "w-full max-w-[620px] mx-auto",
6622
4011
  children: /* @__PURE__ */ jsxs(BackgroundContainer, { className: "flex flex-col h-full", children: [
6623
- /* @__PURE__ */ jsx(Navbar, { children: /* @__PURE__ */ jsx(CloseButton2, { testId: `swap-token-actionsheet-close-${actionSheetId}`, onClick: onClose }) }),
4012
+ /* @__PURE__ */ jsx(Navbar, { children: /* @__PURE__ */ jsx(CloseButton_default, { testId: `swap-token-actionsheet-close-${actionSheetId}`, onClick: onClose }) }),
6624
4013
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 w-full px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)] overflow-hidden", children: [
6625
4014
  /* @__PURE__ */ jsxs("div", { className: "flex-shrink-0", children: [
6626
4015
  /* @__PURE__ */ jsx(TextHeading, { children: labels.title }),
6627
4016
  /* @__PURE__ */ jsx("br", {}),
6628
4017
  /* @__PURE__ */ jsx(
6629
- SearchInput2,
4018
+ SearchInput,
6630
4019
  {
6631
4020
  onSearch: handleSearch,
6632
4021
  placeholder: labels.searchPlaceholder,
@@ -7057,6 +4446,6 @@ var ConfirmSwapButtonView = ({
7057
4446
  ) });
7058
4447
  };
7059
4448
 
7060
- export { ActionButton, ActionSheet, AddressDisplay, AmountInput, AssetList, AssetListColumns, AssetListFilter, AssetListHeader, AssetListItem, AssetRow, AssetTrendBadge, BackgroundContainer, BannerNotification, BlockchainAssetSelector, ChainChip, ChainRow, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView, CloseButton, CollapsibleInfoRow, CollapsibleSection, ConfirmSwapButtonView, ConnectWalletList, Currency, DeframeComponentsProvider, DetailsHeader, Currency as Fiat, FilterGroupBar, FlexCol, FlexRow, HighRiskBadge, HistoryDepositDetailsView, HistoryWithdrawDetailsView, IconCircle, InfoLabel, InfoRow, InfoRowIconLabel, InfoRowIconValue, InfoRowWithIcon, InfoValue, InlineNotification, Input2 as Input, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, PercentageButton, PercentageChips, PrimaryButton, ProgressIndicator, ScrollableContent, SearchEmptyState, SearchInput2 as SearchInput, SecondaryButton, SectionCard, SegmentedControl, Select, SelectContent, SelectItem, SelectTrigger, Skeleton, StatCard, StatCardBadge, StatCardDescription, StatCardDivider, StatCardHeader, StatCardIcon, StatCardLabel, StatCardRow, StatCardTrend, StatCardValue, StepDisplay, StepStatusIcon, StepStatusText, StrategyDetailsView, StrategyList, StrategyListHeader, StrategyListItem, StrategyRiskBadge, SummaryDetails, SummaryDetailsCryptoControlV2, SwapAdvancedSettingsView, SwapAmountInputView, SwapCrossChainProcessingView, SwapDirectionButton, SwapFormView, SwapFromCardView, SwapNetworkSelectorView, SwapOutputAmountView, SwapPanel, SwapProcessingView, SwapQuoteBlockchainCostsView, SwapQuoteDetailsView, SwapQuoteErrorsView, SwapQuoteHeaderView, SwapSignatureWarningView, SwapSlippageToleranceButtonsView, SwapSuccessView, SwapToCardView, SwapTokenSelectorView, SwapTransactionFailedView, Tabs, TabsContent, TabsList, TabsTrigger, TertiaryButton, Text_default as Text, TextAccent, TextBody, TextHeading, Title, TokenIcon, TokenInputCard, TokenSelector, TokenWithChainBadge, TransactionDetailRow, TransactionDetails, TransactionProcessingDetails, TransactionScreen, TransactionScreenIcon, TransactionScreenInvestmentCard, WalletConnectPanel, WalletItem, ConnectWalletList as WalletList, WalletListContainer };
4449
+ export { ActionButton, ActionSheet, AddressDisplay, BackgroundContainer, BannerNotification, ChooseAStrategyActionsheetView, ChooseAnAssetSwapView, CloseButton_default as CloseButton, CollapsibleInfoRow, CollapsibleSection, ConfirmSwapButtonView, ConnectWalletList, Currency, DeframeComponentsProvider, DetailsHeader, Currency as Fiat, FlexCol, FlexRow, HighRiskBadge, HistoryDepositDetailsView, HistoryWithdrawDetailsView, InfoLabel, InfoRow, InfoRowIconLabel, InfoRowIconValue, InfoRowWithIcon, InfoValue, Input2 as Input, Link, ListItem, ListItemContent, ListItemLeftSide, ListItemRightSide, LoadingDots, LowRiskBadge, MediumRiskBadge, Navbar, PercentageButton, PrimaryButton, ProgressIndicator, ScrollableContent, SearchEmptyState, SearchInput, SecondaryButton, SectionCard, Select, SelectContent, SelectItem, SelectTrigger, Skeleton, StepDisplay, StepStatusIcon, StepStatusText, StrategyDetailsView, SummaryDetails, SummaryDetailsCryptoControlV2, SwapAdvancedSettingsView, SwapAmountInputView, SwapCrossChainProcessingView, SwapFormView, SwapFromCardView, SwapNetworkSelectorView, SwapOutputAmountView, SwapProcessingView, SwapProcessingViewSimple, SwapQuoteBlockchainCostsView, SwapQuoteDetailsView, SwapQuoteErrorsView, SwapQuoteHeaderView, SwapSignatureWarningView, SwapSlippageToleranceButtonsView, SwapSuccessView, SwapSuccessViewSimple, SwapToCardView, SwapTokenSelectorView, SwapTransactionFailedView, SwapTransactionFailedViewSimple, Tabs, TabsContent, TabsList, TabsTrigger, TertiaryButton, Text_default as Text, TextAccent, TextBody, TextHeading, Title, TokenWithChainBadge, TransactionProcessingDetails, TransactionScreen, TransactionScreenIcon, TransactionScreenInvestmentCard, WalletConnectPanel, WalletItem, ConnectWalletList as WalletList, WalletListContainer };
7061
4450
  //# sourceMappingURL=index.mjs.map
7062
4451
  //# sourceMappingURL=index.mjs.map