@turtleclub/ui 0.2.0-beta.3 → 0.2.0
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +376 -355
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/src/components/molecules/opportunity-details.tsx +1 -1
- package/src/components/molecules/opportunity-item.tsx +20 -2
- package/src/components/ui/opportunity-details-v1.tsx +11 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,21 +4,21 @@ $ vite build
|
|
|
4
4
|
transforming...
|
|
5
5
|
src/components/molecules/token-selector.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
|
|
6
6
|
src/components/molecules/token-selector.tsx (1:0): Module level directives cause errors when bundled, "use client" in "src/components/molecules/token-selector.tsx" was ignored.
|
|
7
|
-
src/components/ui/toggle.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
|
|
8
|
-
src/components/ui/toggle.tsx (1:0): Module level directives cause errors when bundled, "use client" in "src/components/ui/toggle.tsx" was ignored.
|
|
9
7
|
src/components/ui/table.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
|
|
10
8
|
src/components/ui/table.tsx (1:0): Module level directives cause errors when bundled, "use client" in "src/components/ui/table.tsx" was ignored.
|
|
9
|
+
src/components/ui/toggle.tsx (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
|
|
10
|
+
src/components/ui/toggle.tsx (1:0): Module level directives cause errors when bundled, "use client" in "src/components/ui/toggle.tsx" was ignored.
|
|
11
11
|
[32m✓[39m 32 modules transformed.
|
|
12
12
|
rendering chunks...
|
|
13
13
|
computing gzip size...
|
|
14
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
15
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[2m43.
|
|
16
|
-
[32m✓ built in 2.
|
|
14
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m63.51 kB[22m[1m[22m[2m │ gzip: 13.29 kB[22m[2m │ map: 128.94 kB[22m
|
|
15
|
+
[2mdist/[22m[36mindex.cjs [39m[1m[2m43.83 kB[22m[1m[22m[2m │ gzip: 11.20 kB[22m[2m │ map: 121.30 kB[22m
|
|
16
|
+
[32m✓ built in 2.44s[39m
|
|
17
17
|
$ BUILD_CSS=true vite build
|
|
18
18
|
[36mvite v5.4.19 [32mbuilding for production...[36m[39m
|
|
19
19
|
transforming...
|
|
20
20
|
[32m✓[39m 1 modules transformed.
|
|
21
21
|
rendering chunks...
|
|
22
22
|
computing gzip size...
|
|
23
|
-
[2mdist/[22m[35mstyles.css [39m[1m[2m50.
|
|
24
|
-
[32m✓ built in 1.
|
|
23
|
+
[2mdist/[22m[35mstyles.css [39m[1m[2m50.83 kB[22m[1m[22m[2m │ gzip: 9.22 kB[22m
|
|
24
|
+
[32m✓ built in 1.21s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0](https://github.com/turtledev/packages/compare/@turtleclub/ui@0.2.0-beta.4...@turtleclub/ui@0.2.0) (2025-08-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @turtleclub/ui
|
|
9
|
+
|
|
10
|
+
# [0.2.0-beta.4](https://github.com/turtledev/packages/compare/@turtleclub/ui@0.2.0-beta.3...@turtleclub/ui@0.2.0-beta.4) (2025-08-12)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- solve data issues ([#32](https://github.com/turtledev/packages/issues/32)) ([c34adc3](https://github.com/turtledev/packages/commit/c34adc3cfa96ab7198eaa09ca8493aa2ab7792b5))
|
|
15
|
+
|
|
6
16
|
# [0.2.0-beta.3](https://github.com/turtledev/packages/compare/@turtleclub/ui@0.2.0-beta.2...@turtleclub/ui@0.2.0-beta.3) (2025-08-08)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @turtleclub/ui
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const be=require("clsx"),ve=require("tailwind-merge"),e=require("react/jsx-runtime"),C=require("react"),y=require("class-variance-authority"),je=require("@radix-ui/react-label"),ye=require("@radix-ui/react-scroll-area"),Ne=require("@radix-ui/react-select"),N=require("lucide-react"),we=require("@radix-ui/react-separator"),ke=require("next-themes"),Se=require("sonner"),_e=require("@radix-ui/react-switch"),Le=require("@radix-ui/react-toggle-group"),Ce=require("@radix-ui/react-toggle"),ze=require("@radix-ui/react-tooltip"),Te=require("@radix-ui/react-slot");function w(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const g=w(C),Ie=w(je),I=w(ye),b=w(Ne),Ve=w(we),M=w(_e),H=w(Le),Be=w(Ce),L=w(ze);function n(...t){return ve.twMerge(be.clsx(t))}const D=y.cva("flex w-full bg-transparent text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-none focus:ring-0 focus:border-none caret-primary",bordered:"border border-border rounded-md focus:border-primary focus:ring-2 focus:ring-primary/20 caret-primary",nofocus:"border-none focus:ring-0 focus:border-none focus:outline-none caret-primary"},size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs",lg:"h-12 px-4 py-3 text-base"},cursor:{primary:"caret-primary",foreground:"caret-foreground",white:"caret-white",green:"caret-green-500"}},defaultVariants:{variant:"default",size:"default",cursor:"primary"}}),A=g.forwardRef(({className:t,variant:r,size:a,cursor:s,type:l,prompt:d,...i},o)=>d?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-primary text-sm font-medium shrink-0",children:d}),e.jsx("input",{type:l,"data-slot":"input",className:n(D({variant:r,size:a,cursor:s,className:t})),ref:o,...i})]}):e.jsx("input",{type:l,"data-slot":"input",className:n(D({variant:r,size:a,cursor:s,className:t})),ref:o,...i}));A.displayName="Input";function Re({className:t,...r}){return e.jsx(Ie.Root,{"data-slot":"label",className:n("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}function W({className:t,children:r,...a}){return e.jsxs(I.Root,{"data-slot":"scroll-area",className:n("relative overflow-hidden",t),...a,children:[e.jsx(I.Viewport,{"data-slot":"scroll-area-viewport",className:"h-full w-full rounded-[inherit] focus-visible:ring-ring/50 transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:r}),e.jsx(Y,{}),e.jsx(I.Corner,{})]})}function Y({className:t,orientation:r="vertical",...a}){return e.jsx(I.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:r,className:n("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t),...a,children:e.jsx(I.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function Z({...t}){return e.jsx(b.Root,{"data-slot":"select",...t})}function De({...t}){return e.jsx(b.Group,{"data-slot":"select-group",...t})}function Pe({...t}){return e.jsx(b.Value,{"data-slot":"select-value",...t})}function K({className:t,size:r="default",variant:a="bordered",children:s,...l}){return e.jsxs(b.Trigger,{"data-slot":"select-trigger","data-size":r,"data-variant":a,className:n("flex w-fit items-center justify-between gap-2 bg-transparent px-3 py-2 text-sm text-foreground whitespace-nowrap transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=xs]:h-8 data-[size=xs]:px-4 data-[size=xs]:py-2 data-[size=xs]:text-xs focus:ring-0",a==="default"&&"border-none",a==="bordered"&&"border border-1 border-foreground/30","data-[placeholder]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",t),...l,children:[s,e.jsx(b.Icon,{asChild:!0,children:e.jsx(N.ChevronDownIcon,{className:"size-4 opacity-50"})})]})}function X({className:t,children:r,position:a="popper",...s}){return e.jsx(b.Portal,{children:e.jsxs(b.Content,{"data-slot":"select-content",className:n("bg-background text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border shadow-md",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...s,children:[e.jsx(Q,{}),e.jsx(b.Viewport,{className:n("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),e.jsx(U,{})]})})}function Ae({className:t,...r}){return e.jsx(b.Label,{"data-slot":"select-label",className:n("text-muted-foreground px-2 py-1.5 text-xs",t),...r})}function J({className:t,children:r,...a}){return e.jsxs(b.Item,{"data-slot":"select-item",className:n("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm text-foreground outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50","bg-muted hover:bg-muted/80 focus:bg-muted/80","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[e.jsxs("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-muted-foreground/30 transition-colors"}),e.jsx(b.ItemIndicator,{className:"absolute",children:e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"})})]}),e.jsx(b.ItemText,{children:r})]})}function Oe({className:t,...r}){return e.jsx(b.Separator,{"data-slot":"select-separator",className:n("bg-border pointer-events-none -mx-1 my-1 h-px",t),...r})}function Q({className:t,...r}){return e.jsx(b.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:n("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(N.ChevronUpIcon,{className:"size-4"})})}function U({className:t,...r}){return e.jsx(b.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:n("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(N.ChevronDownIcon,{className:"size-4"})})}function Fe({className:t,orientation:r="horizontal",decorative:a=!0,...s}){return e.jsx(Ve.Root,{"data-slot":"separator",decorative:a,orientation:r,className:n("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...s})}const qe=({...t})=>{const{theme:r="system"}=ke.useTheme();return e.jsx(Se.Toaster,{theme:r,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})};function $e({className:t,...r}){return e.jsx(M.Root,{"data-slot":"switch",className:n("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:e.jsx(M.Thumb,{"data-slot":"switch-thumb",className:n("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const O=y.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Ge({className:t,variant:r,size:a,...s}){return e.jsx(Be.Root,{"data-slot":"toggle",className:n(O({variant:r,size:a,className:t})),...s})}const ee=g.createContext({size:"default",variant:"default"});function Me({className:t,variant:r,size:a,children:s,...l}){return e.jsx(H.Root,{"data-slot":"toggle-group","data-variant":r,"data-size":a,className:n("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",t),...l,children:e.jsx(ee.Provider,{value:{variant:r,size:a},children:s})})}function Ee({className:t,children:r,variant:a,size:s,...l}){const d=g.useContext(ee);return e.jsx(H.Item,{"data-slot":"toggle-group-item","data-variant":d.variant||a,"data-size":d.size||s,className:n(O({variant:d.variant||a,size:d.size||s}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",t),...l,children:r})}function te({delayDuration:t=0,...r}){return e.jsx(L.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...r})}function He({...t}){return e.jsx(te,{children:e.jsx(L.Root,{"data-slot":"tooltip",...t})})}function We({...t}){return e.jsx(L.Trigger,{"data-slot":"tooltip-trigger",...t})}function Ye({className:t,sideOffset:r=0,children:a,...s}){return e.jsx(L.Portal,{children:e.jsxs(L.Content,{"data-slot":"tooltip-content",sideOffset:r,className:n("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...s,children:[a,e.jsx(L.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const re=y.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none border",{variants:{variant:{default:"bg-background text-primary border-primary shadow-[0_0_4px_0_hsl(var(--primary))] hover:bg-background/90 hover:shadow-[0_0_6px_0_hsl(var(--primary))]",green:"bg-primary text-primary-foreground border-primary shadow-[0_0_4px_0_hsl(var(--primary))] hover:bg-primary/90 hover:shadow-[0_0_6px_0_hsl(var(--primary))]",transparentWhite:"bg-secondary text-secondary-foreground border-secondary hover:bg-secondary/80",transparentGreen:"bg-secondary text-primary border-secondary hover:bg-secondary/80"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"},rounded:{default:"rounded-full",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",rounded:"default"}});function P({className:t,variant:r,size:a,rounded:s,asChild:l=!1,...d}){const i=l?Te.Slot:"button";return e.jsx(i,{"data-slot":"button",className:n(re({variant:r,size:a,rounded:s,className:t})),...d})}const V=y.cva("transition-all",{variants:{variant:{container:"relative bg-background shadow-[0_0_20px_0_rgba(0,0,0,0.25)]",simple:"bg-muted",item:"bg-muted shadow-[0_4px_4px_0_rgba(0,0,0,0.25)]"},gradientBorder:{none:"",white:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",green:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-[#73F36C]/60 before:via-transparent before:to-[#73F36C]/20 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",auto:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude] dark:before:from-white/40 dark:before:to-white/10 light:before:from-black/20 light:before:to-black/5"},padding:{none:"p-0",sm:"p-3",default:"p-4",md:"p-6",lg:"p-8"},rounded:{default:"rounded-lg",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{variant:"container",padding:"default",rounded:"default",gradientBorder:"none"}});function j({className:t,variant:r,padding:a,rounded:s,gradientBorder:l,...d}){const i=l??(r==="container"?"white":"none"),o=i!=="none",x=V({gradientBorder:i}),m=n(V({variant:r,padding:a,rounded:s,gradientBorder:"none",className:t}));if(o){const u=V({rounded:s});return e.jsx("div",{className:n(x,u,"p-[1px] h-full"),"data-slot":"card-wrapper",children:e.jsx("div",{"data-slot":"card",className:n(m,"h-full"),...d})})}return e.jsx("div",{"data-slot":"card",className:m,...d})}function Ze({className:t,...r}){return e.jsx("div",{"data-slot":"card-header",className:n("flex flex-col space-y-1.5 p-6",t),...r})}function Ke({className:t,children:r,...a}){return e.jsx("h3",{"data-slot":"card-title",className:n("text-2xl font-semibold leading-none tracking-tight",t),...a,children:r})}function Xe({className:t,...r}){return e.jsx("p",{"data-slot":"card-description",className:n("text-sm text-muted-foreground",t),...r})}function Je({className:t,...r}){return e.jsx("div",{"data-slot":"card-content",className:n("p-6 pt-0",t),...r})}function Qe({className:t,...r}){return e.jsx("div",{"data-slot":"card-footer",className:n("flex items-center p-6 pt-0",t),...r})}const ae=y.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer border-none rounded-full",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground"},size:{xs:"h-6 px-2 py-1 text-xs",default:"h-8 px-4 py-1",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-6 py-2"}},defaultVariants:{variant:"default",size:"default"}}),F=g.forwardRef(({className:t,variant:r,size:a,asChild:s=!1,...l},d)=>e.jsx("div",{"data-slot":"chip",className:n(ae({variant:r,size:a,className:t})),ref:d,...l}));F.displayName="Chip";const se=y.cva("relative inline-flex items-center justify-center rounded-full",{variants:{size:{default:"w-12 h-12",sm:"w-8 h-8",lg:"w-16 h-16",xl:"w-20 h-20"},variant:{default:"bg-background",transparent:"bg-transparent"}},defaultVariants:{size:"default",variant:"default"}}),q=g.forwardRef(({className:t,size:r,variant:a,children:s,spinning:l=!0,...d},i)=>e.jsxs("div",{ref:i,className:n(se({size:r,variant:a}),t),...d,children:[e.jsx("div",{className:n("absolute inset-0 rounded-full","bg-gradient-to-r from-transparent via-primary to-transparent","animate-spin",{"animate-spin":l,"animate-none":!l}),style:{background:l?"conic-gradient(from 0deg, transparent 0deg, var(--primary) 180deg, transparent 360deg)":"conic-gradient(from 0deg, var(--primary) 0deg, var(--primary) 360deg)",padding:"1px",borderRadius:"9999px"},children:e.jsx("div",{className:n("w-full h-full rounded-full",a==="transparent"?"bg-transparent":"bg-background")})}),e.jsx("div",{className:"relative z-10 flex items-center justify-center",children:s})]}));q.displayName="IconAnimation";const ne=y.cva("inline-flex items-center gap-2 font-medium",{variants:{variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",secondary:"text-secondary-foreground"},textSize:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl"}},defaultVariants:{variant:"default",textSize:"sm"}}),E={xs:"w-3 h-3",sm:"w-4 h-4",base:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},z=g.forwardRef(({className:t,variant:r,textSize:a,icon:s,children:l,iconPosition:d="left",iconSize:i="sm",iconClassName:o,...x},m)=>{const u=()=>{var c;return typeof s=="string"?e.jsx("img",{src:s,alt:"",className:n(E[i],"object-contain",o)}):e.jsx("span",{className:n("shrink-0",o),children:g.isValidElement(s)?g.cloneElement(s,{className:n(E[i],(c=s.props)==null?void 0:c.className)}):s})};return e.jsxs("div",{ref:m,className:n(ne({variant:r,textSize:a}),d==="right"&&"flex-row-reverse",t),...x,children:[u(),e.jsx("span",{children:l})]})});z.displayName="LabelWithIcon";const oe=y.cva("flex w-full",{variants:{variant:{default:"justify-between border border-border shadow-sm bg-background",transparent:"justify-between border border-border shadow-sm bg-transparent",menuBar:"relative h-9 gap-2 rounded-full border border-border bg-background font-medium shadow-sm"}},defaultVariants:{variant:"default"}}),ie=y.cva("flex items-center justify-center whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"text-sm text-muted-foreground hover:text-foreground",active:"text-sm text-primary bg-muted",menuBarDefault:"relative z-[1] w-full text-sm text-foreground rounded-full px-3 py-1.5 hover:text-primary",menuBarActive:"relative z-[1] w-full text-sm text-primary rounded-full px-3 py-1.5"}},defaultVariants:{variant:"default"}}),le=g.forwardRef(({className:t,variant:r,activeValue:a,children:s,...l},d)=>{const i=g.useRef(null),o=g.useRef(null),x=g.useCallback(()=>{if(r!=="menuBar"||!i.current||!o.current)return;const m=i.current.querySelector('[data-active="true"]');m&&(o.current.style.width=`${m.offsetWidth}px`,o.current.style.left=`${m.offsetLeft}px`)},[r]);return g.useEffect(()=>{if(r!=="menuBar")return;x();const m=new ResizeObserver(x);return i.current&&m.observe(i.current),()=>{m.disconnect()}},[a,x,r]),e.jsxs("nav",{ref:d||i,className:n(oe({variant:r,className:t})),...l,children:[r==="menuBar"&&e.jsx("div",{ref:o,className:"absolute bottom-0 h-full origin-left rounded-full bg-secondary transition-all duration-300"}),s]})});le.displayName="NavigationBar";const de=g.forwardRef(({className:t,variant:r,active:a,value:s,...l},d)=>{const o=r==="menuBarDefault"||r==="menuBarActive"?a?"menuBarActive":"menuBarDefault":a?"active":r||"default",x=o==="menuBarDefault"||o==="menuBarActive";return e.jsx("button",{ref:d,"data-active":a,"data-value":s,className:n(ie({variant:o,className:t}),!x&&"px-4 py-2 rounded-md"),...l})});de.displayName="NavigationItem";const Ue=y.cva("space-y-1",{variants:{size:{sm:"p-2",default:"p-3",lg:"p-4"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"default",align:"center"}}),et=y.cva("font-bold",{variants:{color:{primary:"text-foreground",secondary:"text-muted-foreground",accent:"text-primary",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600"},size:{sm:"text-sm",default:"text-lg",lg:"text-xl",xl:"text-2xl"}},defaultVariants:{color:"primary",size:"default"}}),tt=y.cva("font-medium text-muted-foreground",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}}),B=g.forwardRef(({title:t,value:r,color:a="primary",valueSize:s="default",titleSize:l="default",size:d="default",align:i="center",icon:o,subtitle:x,className:m,...u},c)=>e.jsxs(j,{ref:c,variant:"item",className:n(Ue({size:d,align:i}),m),...u,children:[o&&e.jsx("div",{className:n("flex mb-2",i==="left"&&"justify-start",i==="center"&&"justify-center",i==="right"&&"justify-end"),children:o}),e.jsx("p",{className:tt({size:l}),children:t}),e.jsx("p",{className:et({color:a,size:s}),children:r}),x&&e.jsx("p",{className:"text-xs text-muted-foreground/70",children:x})]}));B.displayName="InfoCard";function rt({className:t,title:r,titleIcon:a,topCards:s,bottomCards:l}){const d=e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})});return e.jsx(j,{variant:"container",className:n("space-y-4",t),children:e.jsx("div",{className:"h-full overflow-y-auto",children:e.jsxs("div",{className:"space-y-4",children:[(r||a)&&e.jsx("div",{className:"flex items-center",children:e.jsx(z,{icon:a||d,textSize:"lg",iconSize:"lg",children:r})}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:s.map((i,o)=>e.jsx(B,{title:i.title,value:i.value,color:i.color||"primary",icon:i.icon,size:"sm",valueSize:"sm",titleSize:"sm",align:"left"},o))}),e.jsx("div",{className:"space-y-2",children:l.map((i,o)=>e.jsx(B,{title:i.title,value:i.value,color:i.color||"primary",size:"sm",valueSize:"sm",titleSize:"sm",align:"left",className:"w-full"},o))})]})})})}function at({items:t,itemKey:r,columns:a,defaultComparator:s,hasScrollableContainer:l,render:d,className:i}){const[o,x]=C.useState(s||null),[m,u]=C.useState("desc"),c=h=>{o===h?u(m==="asc"?"desc":"asc"):(x(h),u("desc"))},f=[...t].sort((h,k)=>{if(!o)return 0;const v=a.find(R=>R.name===o);if(!(v!=null&&v.comparator))return 0;const T=v.comparator.value(h),S=v.comparator.value(k),_=v.comparator.cmp(T,S);return m==="asc"?_:-_});return e.jsx("div",{className:n("w-full overflow-auto",l&&"max-h-[600px] overflow-y-auto",i),children:e.jsxs("table",{className:"managed-table w-full",children:[e.jsx("thead",{children:e.jsx("tr",{children:a.map(h=>e.jsx("th",{className:n("px-3 py-1 text-left text-xs font-normal text-muted-foreground h-6",h.comparator&&"cursor-pointer select-none"),onClick:()=>h.comparator&&c(h.name),children:e.jsxs("span",{className:"flex items-center gap-1",children:[h.name,h.comparator&&o===h.name&&e.jsx("span",{className:"text-xs",children:m==="asc"?"↑":"↓"})]})},h.name))})}),e.jsx("tbody",{children:f.map(h=>e.jsx("tr",{className:"text-base font-medium",children:d(h)},r(h)))})]})})}function st({children:t,className:r,...a}){return e.jsx("td",{className:n("p-2 align-middle text-foreground",r),...a,children:t})}const ce=g.forwardRef(({className:t,icon:r,name:a,tvl:s,yield:l,onSelect:d,selected:i=!1,...o},x)=>{const m=e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})});return e.jsx(j,{ref:x,variant:"container",padding:"sm",className:n("cursor-pointer transition-all duration-200 hover:shadow-md w-full",i&&"ring-2 ring-primary ring-offset-2",t),onClick:d,...o,children:e.jsxs("div",{className:"flex gap-4 items-start justify-between",children:[e.jsxs("div",{className:"flex flex-col min-w-0 flex-1 items-start justify-start gap-1",children:[e.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.jsx(z,{icon:r||m,textSize:"sm",iconSize:"sm",children:a})}),s&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["TVL: ",s]})]}),e.jsx("div",{className:"flex-shrink-0",children:!!l&&e.jsx("span",{className:"text-sm font-semibold text-foreground",children:l})})]})})});ce.displayName="OpportunityItem";const ue=g.forwardRef(({className:t,title:r,titleIcon:a,yield:s,details:l=[],badges:d=[],externalLink:i,...o},x)=>{const m=e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})}),u=()=>e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})});return e.jsxs(j,{ref:x,className:n("p-4 space-y-4",t),...o,children:[(r||a)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsx(z,{icon:a||m,textSize:"lg",iconSize:"lg",children:r})}),s&&e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-2xl font-bold text-primary",children:s}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"APY"})]})]}),l.length>0&&e.jsx("div",{className:"space-y-3",children:l.map((c,f)=>e.jsx("div",{className:"space-y-2",children:e.jsx(j,{className:"p-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c.icon,e.jsx("span",{className:"text-sm text-muted-foreground",children:c.label})]}),e.jsx("span",{className:n("text-sm font-medium",c.highlight&&"text-primary"),children:c.value})]})})},f))}),d.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:d.map((c,f)=>e.jsxs("div",{className:n("inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-medium",c.variant==="secondary"&&"bg-secondary text-secondary-foreground",c.variant==="outline"&&"border border-border bg-background",(!c.variant||c.variant==="default")&&"bg-primary/10 text-primary"),children:[c.icon,c.text]},f))}),i&&e.jsx("div",{className:"pt-2 border-t border-border",children:e.jsxs("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-primary hover:text-primary/80 transition-colors",children:[i.icon,i.text,e.jsx(u,{})]})})]})});ue.displayName="OpportunityDetails";const me=g.forwardRef(({className:t,title:r,description:a,txHash:s,explorerUrl:l,estimatedTime:d,amount:i,token:o,protocol:x,steps:m=[],variant:u="default",completed:c=!1,cancelled:f=!1,onViewDetails:h,onClose:k,showActions:v=!0,...T},S)=>{const _=f?"Transaction Cancelled":c?"Transaction Completed":"Processing Transaction",R=f?"Transaction was cancelled by user":c?"Your transaction has been successfully processed!":"Please wait while your transaction is being processed...",$=({size:p="w-4 h-4"})=>e.jsx("svg",{className:p,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),he=()=>e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),G=p=>p.length<=12?p:`${p.slice(0,6)}...${p.slice(-6)}`;return e.jsxs(j,{ref:S,className:n("p-4 text-center space-y-3",u==="compact"&&"p-3 space-y-2",t),...T,children:[e.jsx("div",{className:"flex justify-center",children:e.jsx(q,{spinning:!c&&!f,size:u==="compact"?"sm":"default",children:f?e.jsx(N.XIcon,{className:n(u==="compact"?"w-5 h-5":"w-6 h-6","text-destructive")}):c?e.jsx(N.CheckIcon,{className:n(u==="compact"?"w-5 h-5":"w-6 h-6","text-primary")}):e.jsx(N.TurtleIcon,{className:n(u==="compact"?"w-5 h-5":"w-6 h-6","text-primary")})})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:n("font-medium text-foreground",u==="compact"?"text-xs":"text-sm"),children:r||_}),e.jsx("p",{className:n("text-muted-foreground","text-xs"),children:a||R})]}),c&&!f&&(i||o||x)&&e.jsxs("div",{className:"p-2 bg-muted/50 rounded-lg space-y-1",children:[i&&o&&e.jsxs("div",{className:"text-xs font-medium",children:[i," ",o]}),x&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["via ",x]})]}),s&&!f&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Transaction Hash"}),l?e.jsxs("a",{href:`${l}/tx/${s}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-xs text-primary hover:text-primary/80 transition-colors",children:[G(s),e.jsx($,{})]}):e.jsx("div",{className:"text-xs font-mono text-foreground",children:G(s)})]}),!c&&!f&&d&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Estimated time: ",d]}),!c&&!f&&m.length>0&&e.jsxs("div",{className:"space-y-2 pt-2 border-t border-border",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground text-left",children:"Progress"}),e.jsx("div",{className:"space-y-2",children:m.map((p,ge)=>e.jsxs("div",{className:"flex items-center gap-3 text-left",children:[e.jsx("div",{className:n("flex items-center justify-center w-5 h-5 rounded-full border-2 flex-shrink-0",p.completed&&"bg-primary border-primary text-primary-foreground",p.current&&!p.completed&&"border-primary text-primary animate-pulse",!p.completed&&!p.current&&"border-muted-foreground/30 text-muted-foreground"),children:p.completed?e.jsx(he,{}):p.current?e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}):e.jsx("div",{className:"w-2 h-2 rounded-full bg-muted-foreground/30"})}),e.jsxs("div",{className:"flex-1 flex items-center justify-between",children:[e.jsx("span",{className:n("text-xs",p.completed&&"text-foreground",p.current&&!p.completed&&"text-foreground font-medium",!p.completed&&!p.current&&"text-muted-foreground"),children:p.label}),p.txHash&&l&&e.jsxs("a",{href:`${l}/tx/${p.txHash}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors ml-2",title:`View transaction: ${p.txHash}`,children:[e.jsxs("span",{className:"font-mono",children:[p.txHash.slice(0,6),"...",p.txHash.slice(-4)]}),e.jsx($,{size:"w-3 h-3"})]})]})]},ge))})]}),(c||f)&&v&&(h||k)&&e.jsxs("div",{className:n("flex gap-2 pt-2",u==="compact"?"flex-col":"flex-row justify-center"),children:[!f&&h&&e.jsx(P,{variant:"transparentWhite",size:u==="compact"?"sm":"default",onClick:h,children:"View Details"}),k&&e.jsx(P,{variant:"default",size:u==="compact"?"sm":"default",onClick:k,children:f?"Try Again":"Done"})]})]})});me.displayName="TxStatus";const xe=({tokens:t,value:r,onValueChange:a,placeholder:s="Select token",disabled:l,className:d,variant:i="bordered",size:o="default"})=>{const x=r||(t.length>0?t[0].address:void 0),m=t.find(u=>u.address===x);return C.useEffect(()=>{!r&&t.length>0&&a&&a(t[0].address)},[r,t,a]),e.jsxs(Z,{value:x,onValueChange:a,disabled:l,children:[e.jsx(K,{variant:i,size:o,className:n("w-auto min-w-[80px] bg-muted hover:bg-muted/80 rounded-md font-medium","focus:ring-2 focus:ring-primary/20 focus:outline-none",o==="xs"&&"min-w-[80px] gap-2",o==="sm"&&"min-w-[75px] gap-1.5",o==="default"&&"min-w-[80px] gap-1.5",d),children:m?e.jsxs("div",{className:n("flex items-center",o==="xs"&&"gap-2",o==="sm"&&"gap-1.5",o==="default"&&"gap-1.5"),children:[e.jsx("span",{className:n("flex items-center justify-center",o==="xs"&&"w-3.5 h-3",o==="sm"&&"w-4 h-3.5",o==="default"&&"w-5 h-4"),children:m.icon}),e.jsx("span",{className:n("font-medium",o==="xs"&&"text-xs",o==="sm"&&"text-sm",o==="default"&&"text-sm"),children:m.symbol})]}):e.jsx("span",{className:n("text-muted-foreground",o==="xs"&&"text-xs",o==="sm"&&"text-sm",o==="default"&&"text-sm"),children:s})}),e.jsx(X,{className:"border border-muted",children:t.map(u=>e.jsx(J,{value:u.address,className:"cursor-pointer py-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:n("flex items-center justify-center",o==="xs"&&"w-3.5 h-3.5",o==="sm"&&"w-4 h-4",o==="default"&&"w-5 h-4"),children:u.icon}),e.jsx("span",{className:n("font-medium",o==="xs"&&"text-xs",o==="sm"&&"text-sm",o==="default"&&"text-sm"),children:u.symbol})]})},u.address))})]})},fe=g.forwardRef(({className:t,value:r="",onChange:a,tokens:s,selectedToken:l,onTokenChange:d,usdValue:i,balance:o,onMaxClick:x,placeholder:m="0",disabled:u=!1,hideTokenSelector:c=!1,isWalletConnected:f=!0,...h},k)=>{const v=s.find(S=>S.address===l),T=S=>{const _=S.target.value;/^\d*\.?\d*$/.test(_)&&(a==null||a(_))};return f?e.jsxs(j,{ref:k,className:n("space-y-3",u&&"opacity-50",t),...h,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1",children:e.jsx(A,{variant:"nofocus",value:r,onChange:T,placeholder:m,disabled:u,className:"text-2xl font-medium border-none bg-transparent p-0 h-auto focus:ring-0"})}),!c&&e.jsx(xe,{tokens:s,value:l,onValueChange:d,disabled:u,placeholder:"Select token",size:"xs",variant:"default",className:"rounded-full"})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("div",{children:i&&e.jsxs("span",{children:["≈ $",i]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[o&&e.jsxs("span",{className:"text-xs",children:["Balance: ",o," ",(v==null?void 0:v.symbol)||""]}),x&&e.jsx(F,{variant:"default",size:"xs",onClick:x,className:n("cursor-pointer hover:bg-primary hover:text-primary-foreground transition-colors text-xs px-2 py-0.5 h-5",u&&"cursor-not-allowed opacity-50"),children:"MAX"})]})]})]}):e.jsx(j,{ref:k,className:n("flex items-center justify-center py-8",t),...h,children:e.jsx("div",{className:"text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your wallet to continue"})})})});fe.displayName="SwapInput";const pe=g.forwardRef(({className:t,swapFee:r,slippageInUsd:a,deposit:s,receive:l,equivalentInUsd:d,networkFee:i,networkFeeInUsd:o,defaultOpen:x=!1,slippageSelector:m,...u},c)=>{const[f,h]=g.useState(x);return e.jsxs(j,{ref:c,className:n("overflow-hidden",t),...u,children:[e.jsxs("button",{onClick:()=>h(!f),className:"w-full flex items-center justify-between p-1 hover:bg-muted/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm font-medium",children:[s," = ",l]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(≈ $",d,")"]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:["≈ $",a]}),e.jsx(N.ChevronDownIcon,{className:"w-4 h-4"})]})]}),f&&e.jsxs("div",{className:"transition-all animate-in fade-in-0 duration-300 px-2 py-4 space-y-2",children:[m&&e.jsx("div",{className:"text-sm",children:m}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"Swap Fee"}),r?e.jsxs("span",{className:"font-medium",children:[r,"%"]}):e.jsx("span",{className:"text-xs px-2 py-1 bg-primary/10 text-primary rounded-full font-medium",children:"FREE"})]}),!!i&&e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"Network Fee"}),e.jsxs("span",{className:"font-medium",children:[e.jsx("span",{className:"text-xs text-foreground",children:i}),o&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(≈ $",o,")"]})]})]})]})]})});pe.displayName="SwapDetails";const nt=({className:t,tokens:r=[],defaultOpen:a=!1})=>{const[s,l]=g.useState(a),d=i=>e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("span",{className:"text-xs font-bold text-primary",children:i.charAt(0)})});return r.length===0?null:e.jsxs(j,{className:n("overflow-hidden",t),children:[e.jsxs("button",{onClick:()=>l(!s),className:"w-full flex items-center justify-between p-1 hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"text-xs font-medium",children:"Swap Route"}),e.jsx(N.ChevronDown,{className:"w-3 h-3 text-primary"})]}),s&&e.jsx("div",{className:"px-3 pb-3",children:e.jsx(W,{className:"rounded-md whitespace-nowrap",children:e.jsx("div",{className:"flex flex-row items-center justify-center gap-2 overflow-x-auto py-2 w-full",children:r.map((i,o)=>e.jsxs(g.Fragment,{children:[e.jsx(j,{variant:"item",className:"rounded-full flex-shrink-0 p-2",children:e.jsx(z,{icon:i.icon||d(i.symbol),textSize:"xs",iconSize:"xs",children:e.jsx("span",{className:"gap-2",children:i.symbol})})}),o<r.length-1&&e.jsx(N.ChevronsRight,{className:"w-3 h-3 text-primary flex-shrink-0"})]},`${i.symbol}-${o}`))})})})]})};function ot({value:t,onChange:r}){const[a,s]=C.useState(!1),[l,d]=C.useState(t.toString()),i=()=>{s(!0),d(t.toString())},o=c=>{const f=c.target.value;/^\d*\.?\d*$/.test(f)&&d(f)},x=()=>{const c=parseFloat(l);!isNaN(c)&&c>=.1&&c<=100?(r(c),s(!1)):(d(t.toString()),s(!1))},m=c=>{c.key==="Enter"?x():c.key==="Escape"&&(d(t.toString()),s(!1))},u=()=>{x()};return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Max Slippage"}),e.jsxs("div",{className:"flex items-center gap-1",children:[a?e.jsx("input",{type:"text",value:l,onChange:o,onKeyDown:m,onBlur:u,className:"w-10 h-5 text-xs text-right bg-transparent border-none outline-none text-foreground focus:ring-0",autoFocus:!0}):e.jsxs("span",{className:"text-xs font-medium text-foreground",children:[t,"%"]}),e.jsx("button",{onClick:i,className:"p-1 hover:bg-muted rounded text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(N.Edit3,{size:10})})]})]})}const it={colors:{neonGreen:"oklch(0.86 0.16 142.5)",darkGreen:"oklch(0.24 0.16 142.5)",ninjaBlack:"oklch(0.1 0.005 120)",wiseWhite:"oklch(0.98 0 0)",wiseGray:"oklch(0.17 0.003 120)",mintCream:"oklch(0.95 0.046 109)",turtleYellow:"oklch(0.97 0.21 98.2)",turtleRed:"oklch(0.6 0.28 29)",whiteTransparent:"oklch(0.98 0 0 / 0.02)",light:{background:"oklch(1 0 0)",foreground:"oklch(0.141 0.005 285.823)",card:"oklch(1 0 0)",cardForeground:"oklch(0.141 0.005 285.823)",popover:"oklch(1 0 0)",popoverForeground:"oklch(0.141 0.005 285.823)",primary:"oklch(0.21 0.006 285.885)",primaryForeground:"oklch(0.985 0 0)",secondary:"oklch(0.967 0.001 286.375)",secondaryForeground:"oklch(0.21 0.006 285.885)",muted:"oklch(0.967 0.001 286.375)",mutedForeground:"oklch(0.552 0.016 285.938)",accent:"oklch(0.967 0.001 286.375)",accentForeground:"oklch(0.21 0.006 285.885)",destructive:"oklch(0.577 0.245 27.325)",border:"oklch(0.92 0.004 286.32)",input:"oklch(0.92 0.004 286.32)",ring:"oklch(0.705 0.015 286.067)"},dark:{background:"oklch(0.141 0.005 285.823)",foreground:"oklch(0.985 0 0)",card:"oklch(0.21 0.006 285.885)",cardForeground:"oklch(0.985 0 0)",popover:"oklch(0.21 0.006 285.885)",popoverForeground:"oklch(0.985 0 0)",primary:"oklch(0.92 0.004 286.32)",primaryForeground:"oklch(0.21 0.006 285.885)",secondary:"oklch(0.274 0.006 286.033)",secondaryForeground:"oklch(0.985 0 0)",muted:"oklch(0.274 0.006 286.033)",mutedForeground:"oklch(0.705 0.015 286.067)",accent:"oklch(0.274 0.006 286.033)",accentForeground:"oklch(0.985 0 0)",destructive:"oklch(0.704 0.191 22.216)",border:"oklch(1 0 0 / 10%)",input:"oklch(1 0 0 / 15%)",ring:"oklch(0.552 0.016 285.938)"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem","2xl":"2rem","3xl":"3rem","4xl":"4rem"},radius:{none:"0",sm:"calc(0.625rem - 4px)",md:"calc(0.625rem - 2px)",lg:"0.625rem",xl:"calc(0.625rem + 4px)",full:"9999px"},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}]},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},shadow:{xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"}};exports.Button=P;exports.Card=j;exports.CardContent=Je;exports.CardDescription=Xe;exports.CardFooter=Qe;exports.CardHeader=Ze;exports.CardTitle=Ke;exports.Chip=F;exports.IconAnimation=q;exports.InfoCard=B;exports.Input=A;exports.Label=Re;exports.LabelWithIcon=z;exports.ManagedTable=at;exports.NavigationBar=le;exports.NavigationItem=de;exports.OpportunityDetails=ue;exports.OpportunityDetailsV1=rt;exports.OpportunityItem=ce;exports.RouteDetails=nt;exports.ScrollArea=W;exports.ScrollBar=Y;exports.Select=Z;exports.SelectContent=X;exports.SelectGroup=De;exports.SelectItem=J;exports.SelectLabel=Ae;exports.SelectScrollDownButton=U;exports.SelectScrollUpButton=Q;exports.SelectSeparator=Oe;exports.SelectTrigger=K;exports.SelectValue=Pe;exports.Separator=Fe;exports.SlippageSelector=ot;exports.SwapDetails=pe;exports.SwapInput=fe;exports.Switch=$e;exports.TableCell=st;exports.Toaster=qe;exports.Toggle=Ge;exports.ToggleGroup=Me;exports.ToggleGroupItem=Ee;exports.TokenSelector=xe;exports.Tooltip=He;exports.TooltipContent=Ye;exports.TooltipProvider=te;exports.TooltipTrigger=We;exports.TxStatus=me;exports.buttonVariants=re;exports.cardVariants=V;exports.chipVariants=ae;exports.cn=n;exports.iconAnimationVariants=se;exports.inputVariants=D;exports.labelWithIconVariants=ne;exports.navigationBarVariants=oe;exports.navigationItemVariants=ie;exports.toggleVariants=O;exports.tokens=it;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const be=require("clsx"),ve=require("tailwind-merge"),e=require("react/jsx-runtime"),z=require("react"),y=require("class-variance-authority"),je=require("@radix-ui/react-label"),ye=require("@radix-ui/react-scroll-area"),Ne=require("@radix-ui/react-select"),N=require("lucide-react"),we=require("@radix-ui/react-separator"),ke=require("next-themes"),Se=require("sonner"),_e=require("@radix-ui/react-switch"),Le=require("@radix-ui/react-toggle-group"),ze=require("@radix-ui/react-toggle"),Ce=require("@radix-ui/react-tooltip"),Te=require("@radix-ui/react-slot");function w(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const g=w(z),Ie=w(je),I=w(ye),b=w(Ne),Ve=w(we),G=w(_e),H=w(Le),Be=w(ze),L=w(Ce);function o(...t){return ve.twMerge(be.clsx(t))}const P=y.cva("flex w-full bg-transparent text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground transition-colors outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-none focus:ring-0 focus:border-none caret-primary",bordered:"border border-border rounded-md focus:border-primary focus:ring-2 focus:ring-primary/20 caret-primary",nofocus:"border-none focus:ring-0 focus:border-none focus:outline-none caret-primary"},size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs",lg:"h-12 px-4 py-3 text-base"},cursor:{primary:"caret-primary",foreground:"caret-foreground",white:"caret-white",green:"caret-green-500"}},defaultVariants:{variant:"default",size:"default",cursor:"primary"}}),A=g.forwardRef(({className:t,variant:r,size:a,cursor:n,type:l,prompt:d,...i},s)=>d?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-primary text-sm font-medium shrink-0",children:d}),e.jsx("input",{type:l,"data-slot":"input",className:o(P({variant:r,size:a,cursor:n,className:t})),ref:s,...i})]}):e.jsx("input",{type:l,"data-slot":"input",className:o(P({variant:r,size:a,cursor:n,className:t})),ref:s,...i}));A.displayName="Input";function Re({className:t,...r}){return e.jsx(Ie.Root,{"data-slot":"label",className:o("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}function W({className:t,children:r,...a}){return e.jsxs(I.Root,{"data-slot":"scroll-area",className:o("relative overflow-hidden",t),...a,children:[e.jsx(I.Viewport,{"data-slot":"scroll-area-viewport",className:"h-full w-full rounded-[inherit] focus-visible:ring-ring/50 transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:r}),e.jsx(Y,{}),e.jsx(I.Corner,{})]})}function Y({className:t,orientation:r="vertical",...a}){return e.jsx(I.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:r,className:o("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t),...a,children:e.jsx(I.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function Z({...t}){return e.jsx(b.Root,{"data-slot":"select",...t})}function De({...t}){return e.jsx(b.Group,{"data-slot":"select-group",...t})}function Pe({...t}){return e.jsx(b.Value,{"data-slot":"select-value",...t})}function K({className:t,size:r="default",variant:a="bordered",children:n,...l}){return e.jsxs(b.Trigger,{"data-slot":"select-trigger","data-size":r,"data-variant":a,className:o("flex w-fit items-center justify-between gap-2 bg-transparent px-3 py-2 text-sm text-foreground whitespace-nowrap transition-colors outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 data-[size=xs]:h-8 data-[size=xs]:px-4 data-[size=xs]:py-2 data-[size=xs]:text-xs focus:ring-0",a==="default"&&"border-none",a==="bordered"&&"border border-1 border-foreground/30","data-[placeholder]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",t),...l,children:[n,e.jsx(b.Icon,{asChild:!0,children:e.jsx(N.ChevronDownIcon,{className:"size-4 opacity-50"})})]})}function X({className:t,children:r,position:a="popper",...n}){return e.jsx(b.Portal,{children:e.jsxs(b.Content,{"data-slot":"select-content",className:o("bg-background text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border shadow-md",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,...n,children:[e.jsx(Q,{}),e.jsx(b.Viewport,{className:o("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),e.jsx(U,{})]})})}function Ae({className:t,...r}){return e.jsx(b.Label,{"data-slot":"select-label",className:o("text-muted-foreground px-2 py-1.5 text-xs",t),...r})}function J({className:t,children:r,...a}){return e.jsxs(b.Item,{"data-slot":"select-item",className:o("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm text-foreground outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50","bg-muted hover:bg-muted/80 focus:bg-muted/80","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[e.jsxs("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-muted-foreground/30 transition-colors"}),e.jsx(b.ItemIndicator,{className:"absolute",children:e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary"})})]}),e.jsx(b.ItemText,{children:r})]})}function Oe({className:t,...r}){return e.jsx(b.Separator,{"data-slot":"select-separator",className:o("bg-border pointer-events-none -mx-1 my-1 h-px",t),...r})}function Q({className:t,...r}){return e.jsx(b.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:o("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(N.ChevronUpIcon,{className:"size-4"})})}function U({className:t,...r}){return e.jsx(b.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:o("flex cursor-default items-center justify-center py-1",t),...r,children:e.jsx(N.ChevronDownIcon,{className:"size-4"})})}function Fe({className:t,orientation:r="horizontal",decorative:a=!0,...n}){return e.jsx(Ve.Root,{"data-slot":"separator",decorative:a,orientation:r,className:o("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...n})}const qe=({...t})=>{const{theme:r="system"}=ke.useTheme();return e.jsx(Se.Toaster,{theme:r,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})};function $e({className:t,...r}){return e.jsx(G.Root,{"data-slot":"switch",className:o("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...r,children:e.jsx(G.Thumb,{"data-slot":"switch-thumb",className:o("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const O=y.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function Ee({className:t,variant:r,size:a,...n}){return e.jsx(Be.Root,{"data-slot":"toggle",className:o(O({variant:r,size:a,className:t})),...n})}const ee=g.createContext({size:"default",variant:"default"});function Ge({className:t,variant:r,size:a,children:n,...l}){return e.jsx(H.Root,{"data-slot":"toggle-group","data-variant":r,"data-size":a,className:o("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",t),...l,children:e.jsx(ee.Provider,{value:{variant:r,size:a},children:n})})}function Me({className:t,children:r,variant:a,size:n,...l}){const d=g.useContext(ee);return e.jsx(H.Item,{"data-slot":"toggle-group-item","data-variant":d.variant||a,"data-size":d.size||n,className:o(O({variant:d.variant||a,size:d.size||n}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",t),...l,children:r})}function te({delayDuration:t=0,...r}){return e.jsx(L.Provider,{"data-slot":"tooltip-provider",delayDuration:t,...r})}function He({...t}){return e.jsx(te,{children:e.jsx(L.Root,{"data-slot":"tooltip",...t})})}function We({...t}){return e.jsx(L.Trigger,{"data-slot":"tooltip-trigger",...t})}function Ye({className:t,sideOffset:r=0,children:a,...n}){return e.jsx(L.Portal,{children:e.jsxs(L.Content,{"data-slot":"tooltip-content",sideOffset:r,className:o("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...n,children:[a,e.jsx(L.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const re=y.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none border",{variants:{variant:{default:"bg-background text-primary border-primary shadow-[0_0_4px_0_hsl(var(--primary))] hover:bg-background/90 hover:shadow-[0_0_6px_0_hsl(var(--primary))]",green:"bg-primary text-primary-foreground border-primary shadow-[0_0_4px_0_hsl(var(--primary))] hover:bg-primary/90 hover:shadow-[0_0_6px_0_hsl(var(--primary))]",transparentWhite:"bg-secondary text-secondary-foreground border-secondary hover:bg-secondary/80",transparentGreen:"bg-secondary text-primary border-secondary hover:bg-secondary/80"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"},rounded:{default:"rounded-full",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",rounded:"default"}});function B({className:t,variant:r,size:a,rounded:n,asChild:l=!1,...d}){const i=l?Te.Slot:"button";return e.jsx(i,{"data-slot":"button",className:o(re({variant:r,size:a,rounded:n,className:t})),...d})}const V=y.cva("transition-all",{variants:{variant:{container:"relative bg-background shadow-[0_0_20px_0_rgba(0,0,0,0.25)]",simple:"bg-muted",item:"bg-muted shadow-[0_4px_4px_0_rgba(0,0,0,0.25)]"},gradientBorder:{none:"",white:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",green:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-[#73F36C]/60 before:via-transparent before:to-[#73F36C]/20 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude]",auto:"relative before:content-[''] before:absolute before:inset-0 before:p-px before:rounded-[inherit] before:bg-gradient-to-br before:from-white/40 before:via-transparent before:to-white/10 before:pointer-events-none before:[mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)] before:[mask-composite:exclude] dark:before:from-white/40 dark:before:to-white/10 light:before:from-black/20 light:before:to-black/5"},padding:{none:"p-0",sm:"p-3",default:"p-4",md:"p-6",lg:"p-8"},rounded:{default:"rounded-lg",none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{variant:"container",padding:"default",rounded:"default",gradientBorder:"none"}});function j({className:t,variant:r,padding:a,rounded:n,gradientBorder:l,...d}){const i=l??(r==="container"?"white":"none"),s=i!=="none",m=V({gradientBorder:i}),x=o(V({variant:r,padding:a,rounded:n,gradientBorder:"none",className:t}));if(s){const u=V({rounded:n});return e.jsx("div",{className:o(m,u,"p-[1px] h-full"),"data-slot":"card-wrapper",children:e.jsx("div",{"data-slot":"card",className:o(x,"h-full"),...d})})}return e.jsx("div",{"data-slot":"card",className:x,...d})}function Ze({className:t,...r}){return e.jsx("div",{"data-slot":"card-header",className:o("flex flex-col space-y-1.5 p-6",t),...r})}function Ke({className:t,children:r,...a}){return e.jsx("h3",{"data-slot":"card-title",className:o("text-2xl font-semibold leading-none tracking-tight",t),...a,children:r})}function Xe({className:t,...r}){return e.jsx("p",{"data-slot":"card-description",className:o("text-sm text-muted-foreground",t),...r})}function Je({className:t,...r}){return e.jsx("div",{"data-slot":"card-content",className:o("p-6 pt-0",t),...r})}function Qe({className:t,...r}){return e.jsx("div",{"data-slot":"card-footer",className:o("flex items-center p-6 pt-0",t),...r})}const ae=y.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer border-none rounded-full",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground"},size:{xs:"h-6 px-2 py-1 text-xs",default:"h-8 px-4 py-1",sm:"h-7 px-3 py-1 text-xs",lg:"h-9 px-6 py-2"}},defaultVariants:{variant:"default",size:"default"}}),F=g.forwardRef(({className:t,variant:r,size:a,asChild:n=!1,...l},d)=>e.jsx("div",{"data-slot":"chip",className:o(ae({variant:r,size:a,className:t})),ref:d,...l}));F.displayName="Chip";const se=y.cva("relative inline-flex items-center justify-center rounded-full",{variants:{size:{default:"w-12 h-12",sm:"w-8 h-8",lg:"w-16 h-16",xl:"w-20 h-20"},variant:{default:"bg-background",transparent:"bg-transparent"}},defaultVariants:{size:"default",variant:"default"}}),q=g.forwardRef(({className:t,size:r,variant:a,children:n,spinning:l=!0,...d},i)=>e.jsxs("div",{ref:i,className:o(se({size:r,variant:a}),t),...d,children:[e.jsx("div",{className:o("absolute inset-0 rounded-full","bg-gradient-to-r from-transparent via-primary to-transparent","animate-spin",{"animate-spin":l,"animate-none":!l}),style:{background:l?"conic-gradient(from 0deg, transparent 0deg, var(--primary) 180deg, transparent 360deg)":"conic-gradient(from 0deg, var(--primary) 0deg, var(--primary) 360deg)",padding:"1px",borderRadius:"9999px"},children:e.jsx("div",{className:o("w-full h-full rounded-full",a==="transparent"?"bg-transparent":"bg-background")})}),e.jsx("div",{className:"relative z-10 flex items-center justify-center",children:n})]}));q.displayName="IconAnimation";const ne=y.cva("inline-flex items-center gap-2 font-medium",{variants:{variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",secondary:"text-secondary-foreground"},textSize:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl"}},defaultVariants:{variant:"default",textSize:"sm"}}),M={xs:"w-3 h-3",sm:"w-4 h-4",base:"w-5 h-5",lg:"w-6 h-6",xl:"w-8 h-8"},C=g.forwardRef(({className:t,variant:r,textSize:a,icon:n,children:l,iconPosition:d="left",iconSize:i="sm",iconClassName:s,...m},x)=>{const u=()=>{var c;return typeof n=="string"?e.jsx("img",{src:n,alt:"",className:o(M[i],"object-contain",s)}):e.jsx("span",{className:o("shrink-0",s),children:g.isValidElement(n)?g.cloneElement(n,{className:o(M[i],(c=n.props)==null?void 0:c.className)}):n})};return e.jsxs("div",{ref:x,className:o(ne({variant:r,textSize:a}),d==="right"&&"flex-row-reverse",t),...m,children:[u(),e.jsx("span",{children:l})]})});C.displayName="LabelWithIcon";const oe=y.cva("flex w-full",{variants:{variant:{default:"justify-between border border-border shadow-sm bg-background",transparent:"justify-between border border-border shadow-sm bg-transparent",menuBar:"relative h-9 gap-2 rounded-full border border-border bg-background font-medium shadow-sm"}},defaultVariants:{variant:"default"}}),ie=y.cva("flex items-center justify-center whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 cursor-pointer",{variants:{variant:{default:"text-sm text-muted-foreground hover:text-foreground",active:"text-sm text-primary bg-muted",menuBarDefault:"relative z-[1] w-full text-sm text-foreground rounded-full px-3 py-1.5 hover:text-primary",menuBarActive:"relative z-[1] w-full text-sm text-primary rounded-full px-3 py-1.5"}},defaultVariants:{variant:"default"}}),le=g.forwardRef(({className:t,variant:r,activeValue:a,children:n,...l},d)=>{const i=g.useRef(null),s=g.useRef(null),m=g.useCallback(()=>{if(r!=="menuBar"||!i.current||!s.current)return;const x=i.current.querySelector('[data-active="true"]');x&&(s.current.style.width=`${x.offsetWidth}px`,s.current.style.left=`${x.offsetLeft}px`)},[r]);return g.useEffect(()=>{if(r!=="menuBar")return;m();const x=new ResizeObserver(m);return i.current&&x.observe(i.current),()=>{x.disconnect()}},[a,m,r]),e.jsxs("nav",{ref:d||i,className:o(oe({variant:r,className:t})),...l,children:[r==="menuBar"&&e.jsx("div",{ref:s,className:"absolute bottom-0 h-full origin-left rounded-full bg-secondary transition-all duration-300"}),n]})});le.displayName="NavigationBar";const de=g.forwardRef(({className:t,variant:r,active:a,value:n,...l},d)=>{const s=r==="menuBarDefault"||r==="menuBarActive"?a?"menuBarActive":"menuBarDefault":a?"active":r||"default",m=s==="menuBarDefault"||s==="menuBarActive";return e.jsx("button",{ref:d,"data-active":a,"data-value":n,className:o(ie({variant:s,className:t}),!m&&"px-4 py-2 rounded-md"),...l})});de.displayName="NavigationItem";const Ue=y.cva("space-y-1",{variants:{size:{sm:"p-2",default:"p-3",lg:"p-4"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"default",align:"center"}}),et=y.cva("font-bold",{variants:{color:{primary:"text-foreground",secondary:"text-muted-foreground",accent:"text-primary",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600"},size:{sm:"text-sm",default:"text-lg",lg:"text-xl",xl:"text-2xl"}},defaultVariants:{color:"primary",size:"default"}}),tt=y.cva("font-medium text-muted-foreground",{variants:{size:{sm:"text-xs",default:"text-xs",lg:"text-sm"}},defaultVariants:{size:"default"}}),R=g.forwardRef(({title:t,value:r,color:a="primary",valueSize:n="default",titleSize:l="default",size:d="default",align:i="center",icon:s,subtitle:m,className:x,...u},c)=>e.jsxs(j,{ref:c,variant:"item",className:o(Ue({size:d,align:i}),x),...u,children:[s&&e.jsx("div",{className:o("flex mb-2",i==="left"&&"justify-start",i==="center"&&"justify-center",i==="right"&&"justify-end"),children:s}),e.jsx("p",{className:tt({size:l}),children:t}),e.jsx("p",{className:et({color:a,size:n}),children:r}),m&&e.jsx("p",{className:"text-xs text-muted-foreground/70",children:m})]}));R.displayName="InfoCard";function rt({className:t,title:r,titleIcon:a,url:n,topCards:l,bottomCards:d}){const i=e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})});return e.jsx(j,{variant:"container",className:o("space-y-4",t),children:e.jsx("div",{className:"h-full overflow-y-auto",children:e.jsxs("div",{className:"space-y-4",children:[(r||a)&&e.jsxs("div",{className:"flex items-center",children:[e.jsx(C,{icon:a||i,textSize:"lg",iconSize:"lg",children:r}),n&&e.jsx(B,{variant:"transparentWhite",size:"icon",className:"ml-auto",children:e.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:e.jsx(N.ExternalLinkIcon,{})})})]}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:l.map((s,m)=>e.jsx(R,{title:s.title,value:s.value,color:s.color||"primary",icon:s.icon,size:"sm",valueSize:"sm",titleSize:"sm",align:"left"},m))}),e.jsx("div",{className:"space-y-2",children:d.map((s,m)=>e.jsx(R,{title:s.title,value:s.value,color:s.color||"primary",size:"sm",valueSize:"sm",titleSize:"sm",align:"left",className:"w-full"},m))})]})})})}function at({items:t,itemKey:r,columns:a,defaultComparator:n,hasScrollableContainer:l,render:d,className:i}){const[s,m]=z.useState(n||null),[x,u]=z.useState("desc"),c=h=>{s===h?u(x==="asc"?"desc":"asc"):(m(h),u("desc"))},f=[...t].sort((h,k)=>{if(!s)return 0;const v=a.find(D=>D.name===s);if(!(v!=null&&v.comparator))return 0;const T=v.comparator.value(h),S=v.comparator.value(k),_=v.comparator.cmp(T,S);return x==="asc"?_:-_});return e.jsx("div",{className:o("w-full overflow-auto",l&&"max-h-[600px] overflow-y-auto",i),children:e.jsxs("table",{className:"managed-table w-full",children:[e.jsx("thead",{children:e.jsx("tr",{children:a.map(h=>e.jsx("th",{className:o("px-3 py-1 text-left text-xs font-normal text-muted-foreground h-6",h.comparator&&"cursor-pointer select-none"),onClick:()=>h.comparator&&c(h.name),children:e.jsxs("span",{className:"flex items-center gap-1",children:[h.name,h.comparator&&s===h.name&&e.jsx("span",{className:"text-xs",children:x==="asc"?"↑":"↓"})]})},h.name))})}),e.jsx("tbody",{children:f.map(h=>e.jsx("tr",{className:"text-base font-medium",children:d(h)},r(h)))})]})})}function st({children:t,className:r,...a}){return e.jsx("td",{className:o("p-2 align-middle text-foreground",r),...a,children:t})}const ce=g.forwardRef(({className:t,icon:r,name:a,tvl:n,turtleBoost:l,yield:d,onSelect:i,selected:s=!1,...m},x)=>{const u=e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})});return e.jsx(j,{ref:x,variant:"container",padding:"sm",className:o("cursor-pointer transition-all duration-200 hover:shadow-md w-full",s&&"ring-2 ring-primary ring-offset-2",t),onClick:i,...m,children:e.jsxs("div",{className:"flex gap-4 items-start justify-between",children:[e.jsxs("div",{className:"flex flex-col min-w-0 flex-1 items-start justify-start gap-1",children:[e.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.jsx(C,{icon:r||u,textSize:"sm",iconSize:"sm",children:a})}),e.jsxs("div",{className:"flex gap-2",children:[n&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["TVL: ",n]}),l&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[n?" | ":""," Turtle Boost: ",l]})]})]}),e.jsx("div",{className:"flex-shrink-0",children:!!d&&e.jsx("span",{className:"text-sm font-semibold text-foreground",children:d})})]})})});ce.displayName="OpportunityItem";const ue=g.forwardRef(({className:t,title:r,titleIcon:a,yield:n,details:l=[],badges:d=[],externalLink:i,...s},m)=>{const x=e.jsx("div",{className:"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2L13.09 8.26L20 7L18.74 13.09L22 14L16.74 19.26L17 21L10.91 19.74L10 22L8.09 15.74L2 17L3.26 10.91L0 10L5.26 4.74L5 3L11.09 4.26L12 2Z"})})}),u=()=>e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})});return e.jsxs(j,{ref:m,className:o("p-4 space-y-4",t),...s,children:[(r||a)&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center justify-between gap-3",children:e.jsx(C,{icon:a||x,textSize:"lg",iconSize:"lg",children:r})}),n&&e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-2xl font-bold text-primary",children:n}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"APY"})]})]}),l.length>0&&e.jsx("div",{className:"space-y-3",children:l.map((c,f)=>e.jsx("div",{className:"space-y-2",children:e.jsx(j,{className:"p-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c.icon,e.jsx("span",{className:"text-sm text-muted-foreground",children:c.label})]}),e.jsx("span",{className:o("text-sm font-medium",c.highlight&&"text-primary"),children:c.value})]})})},f))}),d.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:d.map((c,f)=>e.jsxs("div",{className:o("inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-medium",c.variant==="secondary"&&"bg-secondary text-secondary-foreground",c.variant==="outline"&&"border border-border bg-background",(!c.variant||c.variant==="default")&&"bg-primary/10 text-primary"),children:[c.icon,c.text]},f))}),i&&e.jsx("div",{className:"pt-2 border-t border-border",children:e.jsxs("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-sm text-primary hover:text-primary/80 transition-colors",children:[i.icon,i.text,e.jsx(u,{})]})})]})});ue.displayName="OpportunityDetails";const me=g.forwardRef(({className:t,title:r,description:a,txHash:n,explorerUrl:l,estimatedTime:d,amount:i,token:s,protocol:m,steps:x=[],variant:u="default",completed:c=!1,cancelled:f=!1,onViewDetails:h,onClose:k,showActions:v=!0,...T},S)=>{const _=f?"Transaction Cancelled":c?"Transaction Completed":"Processing Transaction",D=f?"Transaction was cancelled by user":c?"Your transaction has been successfully processed!":"Please wait while your transaction is being processed...",$=({size:p="w-4 h-4"})=>e.jsx("svg",{className:p,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),he=()=>e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),E=p=>p.length<=12?p:`${p.slice(0,6)}...${p.slice(-6)}`;return e.jsxs(j,{ref:S,className:o("p-4 text-center space-y-3",u==="compact"&&"p-3 space-y-2",t),...T,children:[e.jsx("div",{className:"flex justify-center",children:e.jsx(q,{spinning:!c&&!f,size:u==="compact"?"sm":"default",children:f?e.jsx(N.XIcon,{className:o(u==="compact"?"w-5 h-5":"w-6 h-6","text-destructive")}):c?e.jsx(N.CheckIcon,{className:o(u==="compact"?"w-5 h-5":"w-6 h-6","text-primary")}):e.jsx(N.TurtleIcon,{className:o(u==="compact"?"w-5 h-5":"w-6 h-6","text-primary")})})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:o("font-medium text-foreground",u==="compact"?"text-xs":"text-sm"),children:r||_}),e.jsx("p",{className:o("text-muted-foreground","text-xs"),children:a||D})]}),c&&!f&&(i||s||m)&&e.jsxs("div",{className:"p-2 bg-muted/50 rounded-lg space-y-1",children:[i&&s&&e.jsxs("div",{className:"text-xs font-medium",children:[i," ",s]}),m&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["via ",m]})]}),n&&!f&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:"Transaction Hash"}),l?e.jsxs("a",{href:`${l}/tx/${n}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-xs text-primary hover:text-primary/80 transition-colors",children:[E(n),e.jsx($,{})]}):e.jsx("div",{className:"text-xs font-mono text-foreground",children:E(n)})]}),!c&&!f&&d&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Estimated time: ",d]}),!c&&!f&&x.length>0&&e.jsxs("div",{className:"space-y-2 pt-2 border-t border-border",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground text-left",children:"Progress"}),e.jsx("div",{className:"space-y-2",children:x.map((p,ge)=>e.jsxs("div",{className:"flex items-center gap-3 text-left",children:[e.jsx("div",{className:o("flex items-center justify-center w-5 h-5 rounded-full border-2 flex-shrink-0",p.completed&&"bg-primary border-primary text-primary-foreground",p.current&&!p.completed&&"border-primary text-primary animate-pulse",!p.completed&&!p.current&&"border-muted-foreground/30 text-muted-foreground"),children:p.completed?e.jsx(he,{}):p.current?e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}):e.jsx("div",{className:"w-2 h-2 rounded-full bg-muted-foreground/30"})}),e.jsxs("div",{className:"flex-1 flex items-center justify-between",children:[e.jsx("span",{className:o("text-xs",p.completed&&"text-foreground",p.current&&!p.completed&&"text-foreground font-medium",!p.completed&&!p.current&&"text-muted-foreground"),children:p.label}),p.txHash&&l&&e.jsxs("a",{href:`${l}/tx/${p.txHash}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors ml-2",title:`View transaction: ${p.txHash}`,children:[e.jsxs("span",{className:"font-mono",children:[p.txHash.slice(0,6),"...",p.txHash.slice(-4)]}),e.jsx($,{size:"w-3 h-3"})]})]})]},ge))})]}),(c||f)&&v&&(h||k)&&e.jsxs("div",{className:o("flex gap-2 pt-2",u==="compact"?"flex-col":"flex-row justify-center"),children:[!f&&h&&e.jsx(B,{variant:"transparentWhite",size:u==="compact"?"sm":"default",onClick:h,children:"View Details"}),k&&e.jsx(B,{variant:"default",size:u==="compact"?"sm":"default",onClick:k,children:f?"Try Again":"Done"})]})]})});me.displayName="TxStatus";const xe=({tokens:t,value:r,onValueChange:a,placeholder:n="Select token",disabled:l,className:d,variant:i="bordered",size:s="default"})=>{const m=r||(t.length>0?t[0].address:void 0),x=t.find(u=>u.address===m);return z.useEffect(()=>{!r&&t.length>0&&a&&a(t[0].address)},[r,t,a]),e.jsxs(Z,{value:m,onValueChange:a,disabled:l,children:[e.jsx(K,{variant:i,size:s,className:o("w-auto min-w-[80px] bg-muted hover:bg-muted/80 rounded-md font-medium","focus:ring-2 focus:ring-primary/20 focus:outline-none",s==="xs"&&"min-w-[80px] gap-2",s==="sm"&&"min-w-[75px] gap-1.5",s==="default"&&"min-w-[80px] gap-1.5",d),children:x?e.jsxs("div",{className:o("flex items-center",s==="xs"&&"gap-2",s==="sm"&&"gap-1.5",s==="default"&&"gap-1.5"),children:[e.jsx("span",{className:o("flex items-center justify-center",s==="xs"&&"w-3.5 h-3",s==="sm"&&"w-4 h-3.5",s==="default"&&"w-5 h-4"),children:x.icon}),e.jsx("span",{className:o("font-medium",s==="xs"&&"text-xs",s==="sm"&&"text-sm",s==="default"&&"text-sm"),children:x.symbol})]}):e.jsx("span",{className:o("text-muted-foreground",s==="xs"&&"text-xs",s==="sm"&&"text-sm",s==="default"&&"text-sm"),children:n})}),e.jsx(X,{className:"border border-muted",children:t.map(u=>e.jsx(J,{value:u.address,className:"cursor-pointer py-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:o("flex items-center justify-center",s==="xs"&&"w-3.5 h-3.5",s==="sm"&&"w-4 h-4",s==="default"&&"w-5 h-4"),children:u.icon}),e.jsx("span",{className:o("font-medium",s==="xs"&&"text-xs",s==="sm"&&"text-sm",s==="default"&&"text-sm"),children:u.symbol})]})},u.address))})]})},fe=g.forwardRef(({className:t,value:r="",onChange:a,tokens:n,selectedToken:l,onTokenChange:d,usdValue:i,balance:s,onMaxClick:m,placeholder:x="0",disabled:u=!1,hideTokenSelector:c=!1,isWalletConnected:f=!0,...h},k)=>{const v=n.find(S=>S.address===l),T=S=>{const _=S.target.value;/^\d*\.?\d*$/.test(_)&&(a==null||a(_))};return f?e.jsxs(j,{ref:k,className:o("space-y-3",u&&"opacity-50",t),...h,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex-1",children:e.jsx(A,{variant:"nofocus",value:r,onChange:T,placeholder:x,disabled:u,className:"text-2xl font-medium border-none bg-transparent p-0 h-auto focus:ring-0"})}),!c&&e.jsx(xe,{tokens:n,value:l,onValueChange:d,disabled:u,placeholder:"Select token",size:"xs",variant:"default",className:"rounded-full"})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("div",{children:i&&e.jsxs("span",{children:["≈ $",i]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsxs("span",{className:"text-xs",children:["Balance: ",s," ",(v==null?void 0:v.symbol)||""]}),m&&e.jsx(F,{variant:"default",size:"xs",onClick:m,className:o("cursor-pointer hover:bg-primary hover:text-primary-foreground transition-colors text-xs px-2 py-0.5 h-5",u&&"cursor-not-allowed opacity-50"),children:"MAX"})]})]})]}):e.jsx(j,{ref:k,className:o("flex items-center justify-center py-8",t),...h,children:e.jsx("div",{className:"text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your wallet to continue"})})})});fe.displayName="SwapInput";const pe=g.forwardRef(({className:t,swapFee:r,slippageInUsd:a,deposit:n,receive:l,equivalentInUsd:d,networkFee:i,networkFeeInUsd:s,defaultOpen:m=!1,slippageSelector:x,...u},c)=>{const[f,h]=g.useState(m);return e.jsxs(j,{ref:c,className:o("overflow-hidden",t),...u,children:[e.jsxs("button",{onClick:()=>h(!f),className:"w-full flex items-center justify-between p-1 hover:bg-muted/50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm font-medium",children:[n," = ",l]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(≈ $",d,")"]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:"text-xs text-muted-foreground",children:["≈ $",a]}),e.jsx(N.ChevronDownIcon,{className:"w-4 h-4"})]})]}),f&&e.jsxs("div",{className:"transition-all animate-in fade-in-0 duration-300 px-2 py-4 space-y-2",children:[x&&e.jsx("div",{className:"text-sm",children:x}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"Swap Fee"}),r?e.jsxs("span",{className:"font-medium",children:[r,"%"]}):e.jsx("span",{className:"text-xs px-2 py-1 bg-primary/10 text-primary rounded-full font-medium",children:"FREE"})]}),!!i&&e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground text-xs",children:"Network Fee"}),e.jsxs("span",{className:"font-medium",children:[e.jsx("span",{className:"text-xs text-foreground",children:i}),s&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(≈ $",s,")"]})]})]})]})]})});pe.displayName="SwapDetails";const nt=({className:t,tokens:r=[],defaultOpen:a=!1})=>{const[n,l]=g.useState(a),d=i=>e.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("span",{className:"text-xs font-bold text-primary",children:i.charAt(0)})});return r.length===0?null:e.jsxs(j,{className:o("overflow-hidden",t),children:[e.jsxs("button",{onClick:()=>l(!n),className:"w-full flex items-center justify-between p-1 hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"text-xs font-medium",children:"Swap Route"}),e.jsx(N.ChevronDown,{className:"w-3 h-3 text-primary"})]}),n&&e.jsx("div",{className:"px-3 pb-3",children:e.jsx(W,{className:"rounded-md whitespace-nowrap",children:e.jsx("div",{className:"flex flex-row items-center justify-center gap-2 overflow-x-auto py-2 w-full",children:r.map((i,s)=>e.jsxs(g.Fragment,{children:[e.jsx(j,{variant:"item",className:"rounded-full flex-shrink-0 p-2",children:e.jsx(C,{icon:i.icon||d(i.symbol),textSize:"xs",iconSize:"xs",children:e.jsx("span",{className:"gap-2",children:i.symbol})})}),s<r.length-1&&e.jsx(N.ChevronsRight,{className:"w-3 h-3 text-primary flex-shrink-0"})]},`${i.symbol}-${s}`))})})})]})};function ot({value:t,onChange:r}){const[a,n]=z.useState(!1),[l,d]=z.useState(t.toString()),i=()=>{n(!0),d(t.toString())},s=c=>{const f=c.target.value;/^\d*\.?\d*$/.test(f)&&d(f)},m=()=>{const c=parseFloat(l);!isNaN(c)&&c>=.1&&c<=100?(r(c),n(!1)):(d(t.toString()),n(!1))},x=c=>{c.key==="Enter"?m():c.key==="Escape"&&(d(t.toString()),n(!1))},u=()=>{m()};return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Max Slippage"}),e.jsxs("div",{className:"flex items-center gap-1",children:[a?e.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:x,onBlur:u,className:"w-10 h-5 text-xs text-right bg-transparent border-none outline-none text-foreground focus:ring-0",autoFocus:!0}):e.jsxs("span",{className:"text-xs font-medium text-foreground",children:[t,"%"]}),e.jsx("button",{onClick:i,className:"p-1 hover:bg-muted rounded text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(N.Edit3,{size:10})})]})]})}const it={colors:{neonGreen:"oklch(0.86 0.16 142.5)",darkGreen:"oklch(0.24 0.16 142.5)",ninjaBlack:"oklch(0.1 0.005 120)",wiseWhite:"oklch(0.98 0 0)",wiseGray:"oklch(0.17 0.003 120)",mintCream:"oklch(0.95 0.046 109)",turtleYellow:"oklch(0.97 0.21 98.2)",turtleRed:"oklch(0.6 0.28 29)",whiteTransparent:"oklch(0.98 0 0 / 0.02)",light:{background:"oklch(1 0 0)",foreground:"oklch(0.141 0.005 285.823)",card:"oklch(1 0 0)",cardForeground:"oklch(0.141 0.005 285.823)",popover:"oklch(1 0 0)",popoverForeground:"oklch(0.141 0.005 285.823)",primary:"oklch(0.21 0.006 285.885)",primaryForeground:"oklch(0.985 0 0)",secondary:"oklch(0.967 0.001 286.375)",secondaryForeground:"oklch(0.21 0.006 285.885)",muted:"oklch(0.967 0.001 286.375)",mutedForeground:"oklch(0.552 0.016 285.938)",accent:"oklch(0.967 0.001 286.375)",accentForeground:"oklch(0.21 0.006 285.885)",destructive:"oklch(0.577 0.245 27.325)",border:"oklch(0.92 0.004 286.32)",input:"oklch(0.92 0.004 286.32)",ring:"oklch(0.705 0.015 286.067)"},dark:{background:"oklch(0.141 0.005 285.823)",foreground:"oklch(0.985 0 0)",card:"oklch(0.21 0.006 285.885)",cardForeground:"oklch(0.985 0 0)",popover:"oklch(0.21 0.006 285.885)",popoverForeground:"oklch(0.985 0 0)",primary:"oklch(0.92 0.004 286.32)",primaryForeground:"oklch(0.21 0.006 285.885)",secondary:"oklch(0.274 0.006 286.033)",secondaryForeground:"oklch(0.985 0 0)",muted:"oklch(0.274 0.006 286.033)",mutedForeground:"oklch(0.705 0.015 286.067)",accent:"oklch(0.274 0.006 286.033)",accentForeground:"oklch(0.985 0 0)",destructive:"oklch(0.704 0.191 22.216)",border:"oklch(1 0 0 / 10%)",input:"oklch(1 0 0 / 15%)",ring:"oklch(0.552 0.016 285.938)"}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem","2xl":"2rem","3xl":"3rem","4xl":"4rem"},radius:{none:"0",sm:"calc(0.625rem - 4px)",md:"calc(0.625rem - 2px)",lg:"0.625rem",xl:"calc(0.625rem + 4px)",full:"9999px"},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}]},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},shadow:{xs:"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"}};exports.Button=B;exports.Card=j;exports.CardContent=Je;exports.CardDescription=Xe;exports.CardFooter=Qe;exports.CardHeader=Ze;exports.CardTitle=Ke;exports.Chip=F;exports.IconAnimation=q;exports.InfoCard=R;exports.Input=A;exports.Label=Re;exports.LabelWithIcon=C;exports.ManagedTable=at;exports.NavigationBar=le;exports.NavigationItem=de;exports.OpportunityDetails=ue;exports.OpportunityDetailsV1=rt;exports.OpportunityItem=ce;exports.RouteDetails=nt;exports.ScrollArea=W;exports.ScrollBar=Y;exports.Select=Z;exports.SelectContent=X;exports.SelectGroup=De;exports.SelectItem=J;exports.SelectLabel=Ae;exports.SelectScrollDownButton=U;exports.SelectScrollUpButton=Q;exports.SelectSeparator=Oe;exports.SelectTrigger=K;exports.SelectValue=Pe;exports.Separator=Fe;exports.SlippageSelector=ot;exports.SwapDetails=pe;exports.SwapInput=fe;exports.Switch=$e;exports.TableCell=st;exports.Toaster=qe;exports.Toggle=Ee;exports.ToggleGroup=Ge;exports.ToggleGroupItem=Me;exports.TokenSelector=xe;exports.Tooltip=He;exports.TooltipContent=Ye;exports.TooltipProvider=te;exports.TooltipTrigger=We;exports.TxStatus=me;exports.buttonVariants=re;exports.cardVariants=V;exports.chipVariants=ae;exports.cn=o;exports.iconAnimationVariants=se;exports.inputVariants=P;exports.labelWithIconVariants=ne;exports.navigationBarVariants=oe;exports.navigationItemVariants=ie;exports.toggleVariants=O;exports.tokens=it;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|