@ekoru/ui 0.1.7 → 0.1.8
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/CHANGELOG.md +6 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var I=require('react'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),react=require('motion/react'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),reactDom=require('react-dom');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var I__namespace=/*#__PURE__*/_interopNamespace(I);function e(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var Dt=classVarianceAuthority.cva("w-full border-t border-b overflow-hidden rounded-none",{variants:{variant:{primary:"bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white",secondary:"bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white",outlined:"bg-background border border-primary text-foreground",ghost:"bg-white/50 text-foreground"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),_e=I__namespace.forwardRef(({icon:t,title:r,description:s,cta:n,variant:a,animated:o,className:l,...c},p)=>{let b=react.motion.div,f=t;return jsxRuntime.jsx(b,{ref:p,initial:{opacity:0,y:-8},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.45},className:e(Dt({variant:a,animated:o}),"p-4 md:p-5",l),...c,children:jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col sm:flex-row","items-center","gap-4 py-2 px-2","justify-between"),children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col","items-center sm:items-start","justify-center"),children:[f&&jsxRuntime.jsx(react.motion.div,{className:e("w-20 h-20","flex items-center justify-center","rounded-lg","mb-2",{"bg-white/10":a==="primary"||a==="secondary","bg-primary/10":a==="outlined"||a==="ghost"}),children:jsxRuntime.jsx(f,{className:e("w-10 h-10",{"text-white":a==="primary"||a==="secondary","text-primary":a==="outlined"||a==="ghost"})})}),r&&jsxRuntime.jsx(react.motion.h3,{className:e("text-lg font-bold","text-center sm:text-left","mb-1"),children:r}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm text-center sm:text-left","text-muted","mb-0"),children:s})]}),jsxRuntime.jsx(react.motion.div,{className:e("flex items-center justify-center"),children:n})]})})});_e.displayName="AdBanner";var Kt=_e;var Ze=classVarianceAuthority.cva("p-4 md:p-5 rounded-xl w-[95%] mx-auto overflow-hidden relative",{variants:{variant:{primary:"border-2 border-transparent bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white shadow-lg",secondary:"border-2 border-transparent bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white shadow-lg",outlined:"border-2 border-primary shadow-lg bg-background backdrop-blur",ghost:"border-2 border-transparent bg-white/50 backdrop-blur"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),Qe=classVarianceAuthority.cva("w-3 h-3 rounded-full inline-block",{variants:{variant:{primary:"bg-white shadow-lg shadow-white/50",secondary:"bg-white",outlined:"bg-primary",ghost:"bg-gray-600"}},defaultVariants:{variant:"primary"}}),et=I__namespace.forwardRef(({className:t,variant:r,animated:s,title:n,description:a,showDots:o=true,...l},c)=>{let p=react.motion.div;return jsxRuntime.jsxs(p,{ref:c,initial:{opacity:0,y:-20},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.6},className:e(Ze({variant:r,animated:s,className:t})),...l,children:[s&&r==="primary"&&jsxRuntime.jsx(react.motion.div,{animate:{x:["-100%","100%"]},transition:{duration:15,repeat:1/0,ease:"linear"},className:e("absolute inset-0","bg-gradient-to-r from-transparent via-white/10 to-transparent")}),jsxRuntime.jsxs(react.motion.div,{className:"relative z-10",children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-1 justify-center items-center","gap-2 md:gap-3","mb-3"),children:[o&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.2,type:"spring"},className:e(Qe({variant:r}))}),jsxRuntime.jsx(react.motion.h2,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:true},transition:{delay:.3},className:e("text-base sm:text-lg md:text-2xl","font-bold","text-center","tracking-tight"),children:n}),o&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.4,type:"spring"},className:e(Qe({variant:r}))})]}),jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{delay:.5},className:e("text-sm sm:text-base md:text-lg","text-center","leading-snug md:leading-normal","font-light"),children:a})]})]})});et.displayName="Banner";var at=classVarianceAuthority.cva("min-w-[140px] rounded-lg font-medium shadow-md transition-all duration-200 flex items-center justify-center space-x-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"border-2 border-primary bg-primary text-white hover:bg-primary/90 active:bg-primary/80 shadow-md",secondary:"border-2 border-secondary bg-secondary text-white hover:bg-secondary/90 active:bg-secondary/80",secondary_outline:"border-2 border-secondary bg-white text-secondary hover:bg-white/90 active:bg-white/80",outline:"border-2 border-primary text-primary hover:bg-primary/5 hover:text-accent-foreground active:bg-primary/10",ghost:"hover:bg-muted active:bg-muted/80 text-foreground",success:"border-2 border-success bg-success text-white hover:bg-success/90 active:bg-success/80 shadow-md",warning:"border-2 border-warning bg-warning text-white hover:bg-warning/90 active:bg-warning/80 shadow-md",error:"border-2 border-error bg-error text-white hover:bg-error/90 active:bg-error/80 shadow-md"},size:{sm:"min-h-[36px] px-2 py-2 text-sm",md:"min-h-[44px] px-6 py-2.5 text-base",lg:"min-h-[56px] px-8 py-3 text-lg"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md"}}),se=I__namespace.forwardRef(({className:t,variant:r,size:s,fullWidth:n,isLoading:a,leftIcon:o,rightIcon:l,children:c,disabled:p,loadingText:b="Loading...",...f},i)=>{let m=react.motion.button;return jsxRuntime.jsxs(m,{className:e(at({variant:r,size:s,fullWidth:n,className:t})),ref:i,disabled:p||a,whileHover:{scale:1.02,y:-2},whileTap:{scale:.96,y:0},transition:{type:"spring",stiffness:400,damping:17},...f,children:[jsxRuntime.jsxs(react.AnimatePresence,{mode:"wait",children:[a&&jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center space-x-2",children:jsxRuntime.jsx(lucideReact.Loader2,{className:"w-5 h-5 animate-spin mr-2"})},"loading"),!a&&o&&jsxRuntime.jsx(react.motion.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},className:"mr-2 inline-flex items-center justify-center flex-shrink-0",children:I__namespace.isValidElement(o)?o:I__namespace.createElement(o,{size:18,className:"flex-shrink-0"})},"leftIcon")]}),a?b:c,!a&&l&&jsxRuntime.jsx("span",{className:"ml-2 inline-flex items-center justify-center flex-shrink-0",children:I__namespace.isValidElement(l)?l:I__namespace.createElement(l,{size:18,className:"flex-shrink-0"})})]})});se.displayName="Button";function ot({image:t,title:r,description:s,cta:n,hasBadge:a,badgeText:o,badgeColor:l="bg-primary",textColor:c="text-white"}){return jsxRuntime.jsxs(react.motion.article,{className:e("w-64","bg-white","rounded-lg","overflow-hidden","shadow-md","relative"),children:[jsxRuntime.jsx(react.motion.div,{className:"h-40 w-full overflow-hidden",children:t||jsxRuntime.jsx(react.motion.div,{className:e("h-40 w-full","bg-gray-200","flex items-center justify-center"),children:jsxRuntime.jsx(react.motion.span,{className:"text-gray-500",children:jsxRuntime.jsx(lucideReact.Image,{})})})}),a&&o&&jsxRuntime.jsx(react.motion.div,{className:e("absolute top-2 left-2","text-xs","font-semibold","px-4 py-1","rounded-lg","shadow-md",l,c),children:o}),jsxRuntime.jsxs(react.motion.div,{className:"p-4",children:[jsxRuntime.jsx(react.motion.h3,{className:e("text-lg","font-semibold","text-gray-900","dark:text-stone-100"),children:r}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm","text-gray-600","dark:text-stone-400","mt-2"),children:s}),n&&jsxRuntime.jsx(react.motion.div,{className:"mt-2",children:n})]})]})}var Zt=classVarianceAuthority.cva("py-8",{variants:{variant:{default:"",compact:"py-4",centered:""}},defaultVariants:{variant:"default"}});function it({header:t,description:r,link:s,items:n,children:a,variant:o,className:l,...c}){let p=I.useRef(null),[b,f]=I.useState(false),[i,m]=I.useState(false),y=I.useCallback(()=>{let h=p.current;h&&(f(h.scrollLeft>0),m(h.scrollLeft<h.scrollWidth-h.clientWidth-1));},[]);I.useEffect(()=>{y();let h=p.current;if(h)return h.addEventListener("scroll",y),window.addEventListener("resize",y),()=>{h.removeEventListener("scroll",y),window.removeEventListener("resize",y);}},[y,n,a]);let v=h=>{let w=p.current;w&&w.scrollTo({left:w.scrollLeft+h,behavior:"smooth"});},d=()=>v(-(p.current?.clientWidth??300)*.8),g=()=>v((p.current?.clientWidth??300)*.8),k=Array.isArray(n)&&n.length>0;return jsxRuntime.jsx("section",{className:e(Zt({variant:o}),l),...c,children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between mb-4 items-start gap-2",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-start gap-1",children:[t&&jsxRuntime.jsx("h2",{className:"font-bold",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-text-muted",children:r})]}),s&&jsxRuntime.jsx("div",{children:s})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx("button",{"aria-label":"Scroll left",onClick:d,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"w-5 h-5"})}),i&&jsxRuntime.jsx("button",{"aria-label":"Scroll right",onClick:g,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowRight,{className:"w-5 h-5"})}),jsxRuntime.jsx("div",{ref:p,className:"flex gap-4 overflow-x-auto pb-4 scrollbar-hide scroll-smooth",role:"list",children:k?n.map((h,w)=>jsxRuntime.jsx("div",{className:"flex-shrink-0",children:h},I__namespace.default.isValidElement(h)?h.key??w:w)):a})]})]})})}var aa=classVarianceAuthority.cva("relative rounded-md border-2 flex items-center justify-center transition-all duration-200 cursor-pointer",{variants:{variant:{default:"border-input-border hover:border-primary/50",filled:"border-transparent bg-background-secondary",outline:"border-primary bg-transparent"},size:{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},checked:{true:"bg-primary border-primary",false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{variant:"default",size:"md",checked:false,disabled:false}}),ra=I__namespace.forwardRef(({className:t,variant:r,size:s="md",label:n,description:a,errorMessage:o,checked:l=false,disabled:c=false,onCheckedChange:p,onChange:b,id:f,name:i,...m},y)=>{let v={sm:12,md:16,lg:20},d=h=>{let w=h.target.checked;p?.(w),b?.(h);},g=I__namespace.useId(),k=f||i||`checkbox-${g}`;return jsxRuntime.jsxs(react.motion.div,{className:"space-y-1",children:[jsxRuntime.jsxs(react.motion.div,{className:"flex items-start space-x-3",children:[jsxRuntime.jsxs(react.motion.div,{className:"relative",children:[jsxRuntime.jsx(react.motion.button,{type:"button",onClick:()=>!c&&p?.(!l),disabled:c,className:e(aa({variant:r,size:s,checked:l,disabled:c,className:t})),whileTap:c?{}:{scale:.95},children:jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:l?1:0,scale:l?1:.5},transition:{duration:.2},children:jsxRuntime.jsx(lucideReact.Check,{size:v[s||"md"],className:"text-white"})})}),jsxRuntime.jsx("input",{ref:y,id:k,name:i,type:"checkbox",checked:l,onChange:d,disabled:c,className:"sr-only",...m})]}),n&&jsxRuntime.jsxs(react.motion.div,{className:"flex-1",children:[jsxRuntime.jsx(react.motion.label,{htmlFor:k,className:e("text-sm font-medium cursor-pointer",c?"text-foreground-tertiary cursor-not-allowed":"text-foreground",o&&"text-error"),children:n}),a&&jsxRuntime.jsx(react.motion.p,{className:"text-sm text-foreground-tertiary mt-1",children:a})]})]}),o&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error ml-8",children:o})]})});ra.displayName="Checkbox";var da=classVarianceAuthority.cva("relative w-full max-h-[90vh] rounded-lg shadow-2xl overflow-hidden z-10",{variants:{size:{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-7xl"}},defaultVariants:{size:"md"}});function he({isOpen:t,onClose:r,children:s,title:n,size:a="md",showCloseButton:o=true,closeOnOverlayClick:l=true,closeOnEscape:c=true,className:p}){return I.useEffect(()=>{let b=f=>{f.key==="Escape"&&c&&r?.();};if(t){document.addEventListener("keydown",b);let f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=f||"unset";}}return ()=>{document.removeEventListener("keydown",b);}},[t,r,c]),t?reactDom.createPortal(jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",initial:false,children:t&&jsxRuntime.jsxs(react.motion.div,{transition:{duration:.2},className:e("fixed inset-0 z-[9999]","flex items-center justify-center","p-4"),role:"dialog","aria-modal":"true","aria-labelledby":n?"modal-title":void 0,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:e("absolute inset-0","bg-black/60","backdrop-blur-sm"),onClick:l?r:void 0,"aria-label":"Close modal"}),jsxRuntime.jsxs(react.motion.div,{initial:{scale:.9,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:30},transition:{type:"spring",damping:25,stiffness:300},onClick:b=>b.stopPropagation(),className:e(da({size:a}),"bg-surface border border-border",p),children:[(n||o)&&jsxRuntime.jsxs("div",{className:e("flex items-center justify-between","p-6","border-b border-border"),children:[n&&jsxRuntime.jsx("h3",{id:"modal-title",className:"font-semibold text-lg text-foreground",children:n}),o&&jsxRuntime.jsx("button",{onClick:r,className:e("p-1 rounded-lg text-foreground-secondary","hover:text-foreground hover:bg-background-secondary","transition-colors"),"aria-label":"Close modal",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:e("p-6","overflow-y-auto","max-h-[calc(90vh-8rem)]","scrollbar-hide","text-foreground"),children:s})]})]},"modal")}),document.body):null}function we({isOpen:t,onClose:r,environmentalImpact:s,co2SavingsTitle:n="CO\u2082 Savings",waterSavingsTitle:a="Water Savings",weightLabel:o="Weight",co2SavingsLabel:l="CO\u2082 Saved",waterSavingsLabel:c="Water Saved",materialBreakdownLabel:p="Material Breakdown",carDistanceLabel:b=" by car",showerCountLabel:f=" showers",co2EquivalenceLabel:i="Equivalent to",waterEquivalenceLabel:m="Equivalent to",infoText:y="These values are estimates based on the savings generated by reusing products instead of manufacturing new ones. The calculations consider the average impact of producing each material."}){let v=d=>new Intl.NumberFormat("es-CL",{minimumFractionDigits:1,maximumFractionDigits:1}).format(d);return jsxRuntime.jsx(he,{isOpen:t,onClose:r,title:"Impacto Ambiental Detallado",size:"md",children:jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{className:e("flex flex-col md:flex-row","gap-4 md:gap-6"),children:[jsxRuntime.jsxs("div",{className:e("bg-success/10 dark:bg-success/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-5 h-5 text-success"}),jsxRuntime.jsx("span",{className:e("text-sm font-medium text-text-muted","dark:text-stone-400"),children:n})]}),jsxRuntime.jsxs("p",{className:e("text-2xl font-bold text-success"),children:[v(s.totalCo2SavingsKG)," kg"]}),jsxRuntime.jsxs("p",{className:e("text-xs text-text-muted","dark:text-stone-400","mt-1"),children:[i," ",v(s.totalCo2SavingsKG*4.5)," km",b]})]}),jsxRuntime.jsxs("div",{className:e("bg-info/10","dark:bg-info/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-5 h-5 text-info"}),jsxRuntime.jsx("span",{className:e("text-sm","font-medium","text-text-muted","dark:text-stone-400"),children:a})]}),jsxRuntime.jsxs("p",{className:e("text-2xl","font-bold","text-info"),children:[v(s.totalWaterSavingsLT)," L"]}),jsxRuntime.jsxs("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mt-1"),children:[m," ",v(s.totalWaterSavingsLT/8)," ",f]})]})]}),s.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("h3",{className:e("text-lg","font-bold","text-text-primary","dark:text-stone-100","mb-4","flex","items-center","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:"w-5 h-5"}),p]}),jsxRuntime.jsx("div",{className:e("space-y-3"),children:s.materialBreakdown.map((d,g)=>jsxRuntime.jsxs("div",{className:e("border","border-neutral/20","dark:border-stone-700","rounded-lg","p-4","hover:bg-neutral/5","dark:hover:bg-stone-800/50","transition-colors"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","justify-between","mb-3"),children:[jsxRuntime.jsx("h4",{className:e("font-semibold","text-text-primary","dark:text-stone-100"),children:d.materialType}),jsxRuntime.jsxs("span",{className:e("text-lg","font-bold","text-primary"),children:[d.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsxs("div",{className:e("grid","grid-cols-3","gap-3","text-sm"),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:o}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-text-secondary","dark:text-stone-300"),children:[v(d.weightKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:l}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-success"),children:[v(d.co2SavingsKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:c}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-info"),children:[v(d.waterSavingsLT)," L"]})]})]}),jsxRuntime.jsx("div",{className:e("mt-3","h-2","bg-neutral/10","dark:bg-stone-700","rounded-full","overflow-hidden"),children:jsxRuntime.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-500",style:{width:`${d.percentage}%`}})})]},g))})]}),jsxRuntime.jsx("div",{className:e("bg-primary/5","dark:bg-primary/10","rounded-lg","p-4","text-sm","text-text-secondary","dark:text-stone-300"),children:jsxRuntime.jsxs("p",{className:e("flex","items-start","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:e("w-4","h-4","mt-0.5","text-primary","flex-shrink-0")}),jsxRuntime.jsx("span",{children:y})]})})]})})}function lt({brand:t,socialLinks:r,description:s,exploreItems:n,exploreLabel:a="Explore",communityItems:o,communityLabel:l="Community",legalItems:c,legalLabel:p="Legal",copyRightText:b="All rights reserved."}){return jsxRuntime.jsx(react.motion.footer,{className:e("bg-gradient-to-r from-primary-dark via-primary to-primary-dark"),children:jsxRuntime.jsxs(react.motion.div,{className:"max-w-7xl mx-auto px-6 py-12",children:[jsxRuntime.jsxs(react.motion.div,{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[jsxRuntime.jsxs(react.motion.div,{className:"space-y-4 flex flex-col",children:[t,jsxRuntime.jsx(react.motion.p,{className:"text-sm text-white leading-relaxed",children:s}),r&&jsxRuntime.jsx(react.motion.div,{className:e("flex items-center gap-3"),children:r})]}),n&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:a}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:n&&n.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),o&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:l}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:o&&o.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),c&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:p}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:c&&c.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]})]}),jsxRuntime.jsx(react.motion.div,{className:"mt-12 pt-8 border-t border-gray-200 dark:border-stone-800",children:jsxRuntime.jsxs(react.motion.p,{className:"text-sm text-center text-white",children:["\xA9 ",new Date().getFullYear()," EKORU. ",b]})})]})})}function ct({banners:t,ImageComponent:r,autoScrollInterval:s=5e3}){let[n,a]=I.useState(0),[o,l]=I.useState(false);I.useEffect(()=>{if(o)return;let i=setInterval(()=>{a(m=>(m+1)%t.length);},s);return ()=>clearInterval(i)},[t.length,s,o]);let c=()=>{a(i=>(i+1)%t.length);},p=()=>{a(i=>(i-1+t.length)%t.length);},b=i=>{a(i);},f=r||"img";return jsxRuntime.jsxs("section",{className:"relative overflow-hidden",onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),children:[jsxRuntime.jsx("div",{className:"relative h-[300px] sm:h-[350px] md:h-[400px] lg:h-[500px] xl:h-[600px]",children:t.map((i,m)=>{let y=m===n,v=m<n;return jsxRuntime.jsx("div",{className:`absolute inset-0 transition-transform duration-700 ease-in-out ${y?"translate-x-0 opacity-100":v?"-translate-x-full opacity-0":"translate-x-full opacity-0"}`,"aria-hidden":!y,children:jsxRuntime.jsx("div",{className:`${i.bgColor} h-full flex items-center`,children:jsxRuntime.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-20 py-4 sm:py-6 md:py-6 lg:py-12 w-full",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 md:gap-6 lg:gap-8 items-center h-full",children:[jsxRuntime.jsxs("div",{className:"text-white text-center lg:text-left space-y-2 sm:space-y-3 lg:space-y-4",children:[jsxRuntime.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl lg:text-5xl xl:text-6xl font-bold leading-tight animate-fade-in",children:i.title}),jsxRuntime.jsx("h2",{className:"text-base sm:text-lg md:text-xl lg:text-2xl text-white/90 animate-fade-in-delay-100",children:i.subtitle}),jsxRuntime.jsx("p",{className:"text-xs sm:text-sm md:text-base lg:text-lg text-white/80 max-w-lg mx-auto lg:mx-0 line-clamp-3 animate-fade-in-delay-200",children:i.description}),jsxRuntime.jsx("div",{className:"text-xs sm:text-sm text-white/60 italic pt-2 animate-fade-in-delay-300",children:"Pronto..."})]}),jsxRuntime.jsx("div",{className:"flex justify-center lg:justify-end mt-2 lg:mt-0",children:jsxRuntime.jsx("div",{className:"relative w-24 h-24 sm:w-32 sm:h-32 md:w-48 md:h-48 lg:w-72 lg:h-72 xl:w-80 xl:h-80 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center overflow-hidden transition-transform duration-300 hover:scale-105",children:jsxRuntime.jsx(f,{src:i.image,alt:i.title,width:320,height:320,className:"w-12 h-12 sm:w-16 sm:h-16 md:w-24 md:h-24 lg:w-36 lg:h-36 xl:w-40 xl:h-40 object-contain",...r&&m===0?{priority:true}:{}})})})]})})})},i.id)})}),t.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:p,className:"absolute left-2 sm:left-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Previous banner",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-4 h-4 sm:w-6 sm:h-6"})}),jsxRuntime.jsx("button",{onClick:c,className:"absolute right-2 sm:right-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Next banner",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-4 h-4 sm:w-6 sm:h-6"})})]}),t.length>1&&jsxRuntime.jsx("div",{className:"absolute bottom-3 sm:bottom-6 left-1/2 transform -translate-x-1/2 flex space-x-2",children:t.map((i,m)=>jsxRuntime.jsx("button",{onClick:()=>b(m),className:`w-2 h-2 sm:w-3 sm:h-3 rounded-full transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-white/50 ${m===n?"bg-white w-6 sm:w-8":"bg-white/50 hover:bg-white/70"}`,"aria-label":`Go to banner ${m+1}`,"aria-current":m===n?"true":"false"},m))})]})}var xa=classVarianceAuthority.cva("font-bold tracking-tight transition-colors",{variants:{level:{h1:"text-5xl md:text-6xl lg:text-7xl",h2:"text-4xl md:text-5xl lg:text-6xl",h3:"text-3xl md:text-4xl lg:text-5xl",h4:"text-2xl md:text-3xl lg:text-4xl",h5:"text-xl md:text-2xl lg:text-3xl",h6:"text-lg md:text-xl lg:text-2xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{level:"h1",weight:"bold",color:"default",align:"left"}}),De=I__namespace.forwardRef(({className:t,level:r="h1",weight:s,color:n,align:a,as:o,children:l,...c},p)=>jsxRuntime.jsx(o||r,{ref:p,className:e(xa({level:r,weight:s,color:n,align:a,className:t})),...c,children:l}));De.displayName="Title";var ha=classVarianceAuthority.cva("transition-colors",{variants:{variant:{p:"block",span:"inline",label:"block font-medium cursor-pointer",blockquote:"block border-l-4 border-primary pl-4 italic",small:"block text-sm",code:"inline-block font-mono bg-background-secondary px-1.5 py-0.5 rounded text-sm"},size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning",muted:"text-muted"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",size:"base",weight:"normal",color:"default",align:"left"}}),ke=I__namespace.forwardRef(({className:t,variant:r="p",size:s,weight:n,color:a,align:o,as:l,htmlFor:c,children:p,...b},f)=>jsxRuntime.jsx(l||r,{ref:f,htmlFor:r==="label"||l==="label"?c:void 0,className:e(ha({variant:r,size:s,weight:n,color:a,align:o,className:t})),...b,children:p}));ke.displayName="Text";function ft({brand:t,navigationLinks:r,mobileMenuNavigationLinks:s,appNavigationItems:n,mobileMenuAppNavigationItems:a,searchPlaceholder:o="Search...",onSearch:l,className:c="",searchEnabled:p=true,sideMenuTitle:b="Menu",navbarAriaLabel:f="Main navigation",userActionsAriaLabel:i="User actions",toggleMobileMenuAriaLabel:m="Toggle mobile menu",closeMobileMenuAriaLabel:y="Close mobile menu",mobileMenuTitleAriaLabel:v="Mobile menu"}){let[d,g]=I.useState(false),[k,h]=I.useState(""),[w,N]=I.useState("");I.useEffect(()=>{let x=new IntersectionObserver(R=>{R.forEach(H=>{H.isIntersecting&&N(H.target.id);});},{threshold:.3});return r?.forEach(({id:R})=>{let H=document.getElementById(R);H&&x.observe(H);}),()=>x.disconnect()},[]);let V=()=>g(false),L=x=>{h(x.target.value);},S=x=>{x.preventDefault(),l?.(k);},D=x=>{x.key==="Escape"&&d&&g(false);},z=x=>{g(false),setTimeout(()=>{let R=document.getElementById(x);R&&R.scrollIntoView({behavior:"smooth"});},200);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("header",{className:e("bg-gradient-to-r from-navbar-dark via-navbar-main to-navbar-dark","sticky top-0 z-50",c),onKeyDown:D,children:jsxRuntime.jsxs("nav",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",role:"navigation","aria-label":f,children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center h-16",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:t||jsxRuntime.jsx("span",{className:"text-xl font-bold text-white",children:"EKORU"})}),p&&jsxRuntime.jsx("div",{className:"hidden md:flex flex-1 max-w-2xl mx-8",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:S,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-desktop",name:"search-desktop",type:"search",value:k,onChange:L,placeholder:o,className:e("w-full px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",role:"toolbar","aria-label":i,children:[n,jsxRuntime.jsx("div",{className:"hidden lg:flex items-center space-x-2",children:r&&r.map((x,R)=>jsxRuntime.jsxs(react.motion.a,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,delay:.3+R*.1},href:`#${x.id}`,className:e("relative","text-white","transition-all duration-200 ease-in-out","font-medium text-sm","group",{"text-secondary":w===x.id}),children:[x.label,jsxRuntime.jsx(react.motion.span,{initial:{scaleX:0},animate:{scaleX:w===x.id?1:0},transition:{duration:.3},className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary-light origin-left"}),jsxRuntime.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-white scale-x-0 group-hover:scale-x-100 transition-transform origin-left"})]},x.id))}),jsxRuntime.jsx("button",{onClick:()=>g(!d),className:e("p-2","rounded-lg","text-white","hover:bg-primary/30","transition-colors","lg:hidden"),"aria-label":m,"aria-expanded":d,children:jsxRuntime.jsx(lucideReact.Menu,{className:"h-6 w-6"})})]})]}),p&&jsxRuntime.jsx("div",{className:"md:hidden pb-4",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:S,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-mobile",name:"search-mobile",type:"search",value:k,onChange:L,placeholder:o,className:e("w-full","px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})})]})}),jsxRuntime.jsx(react.AnimatePresence,{children:d&&jsxRuntime.jsxs("div",{className:"lg:hidden fixed inset-0 z-50 flex justify-end",role:"dialog","aria-modal":"true","aria-labelledby":v,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>g(false),"aria-label":y}),jsxRuntime.jsx(react.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.3},className:e("relative","w-full","max-w-sm","bg-background","shadow-xl","h-full","overflow-y-auto"),children:jsxRuntime.jsxs("div",{className:"pt-6 px-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2 mx-4",children:[jsxRuntime.jsx(react.motion.h2,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},id:"mobile-menu-title",className:"text-xl font-semibold text-foreground",children:b}),jsxRuntime.jsx("button",{onClick:V,className:e("p-2","rounded-lg","text-foreground","hover:bg-primary/10","transition-colors","ease-in-out duration-200"),"aria-label":"Close mobile menu",children:jsxRuntime.jsx(lucideReact.X,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("nav",{className:"space-y-2",children:a}),s&&jsxRuntime.jsx("div",{className:"mt-2 pt-6",children:s.map((x,R)=>jsxRuntime.jsx("div",{className:"h-full overflow-y-auto pb-6",children:jsxRuntime.jsxs("div",{className:"p-4 space-y-1",children:[jsxRuntime.jsx(De,{level:"h6",className:"text-gray-600 mb-2",children:x.title}),x.links.map(({id:H,isAnchor:Le,href:Me,label:ge})=>Le?jsxRuntime.jsx(react.motion.a,{href:Me||"#",className:e("w-full flex items-center justify-between","p-3","text-left"),children:jsxRuntime.jsx(ke,{variant:"small",className:"text-foreground hover:text-primary transition-colors ease-in-out duration-200",children:ge})},H):jsxRuntime.jsx(react.motion.button,{onClick:()=>z(H),className:e("w-full flex items-center justify-between","p-3","text-left"),children:jsxRuntime.jsx(ke,{variant:"small",className:"text-foreground hover:text-primary transition-colors ease-in-out duration-200",children:ge})},H))]})},R))})]})})]})})]})}var gt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder text-left",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),Pe=I__namespace.forwardRef(({className:t,variant:r,size:s,label:n,leftIcon:a,errorMessage:o,value:l,onChange:c,options:p=[],width:b="full",disabled:f=false,readOnly:i=false,showColorIcon:m=false,renderOption:y,searchEnabled:v=true,dropdownDirection:d="down",placeholder:g="Select...",name:k,noResultsText:h="No results found"},w)=>{let[N,V]=I__namespace.useState(false),[L,S]=I__namespace.useState(false),[D,z]=I__namespace.useState(""),[x,R]=I__namespace.useState(-1),[H,Le]=I__namespace.useState({top:0,left:0,width:0}),[Me,ge]=I__namespace.useState(false),Ie=I__namespace.useRef(null),Ve=I__namespace.useRef(null),Ae=I__namespace.useRef(null),je=`${k}-listbox`,Mt=p.find(u=>u.value===l),Z=p.filter(u=>u.label.toLowerCase().includes(D.toLowerCase())),It={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[b],Be=!!o;I__namespace.useEffect(()=>{ge(true);},[]);let ne=I__namespace.useCallback(()=>{if(Ve.current){let u=Ve.current.getBoundingClientRect();Le({top:d==="down"?u.bottom+4:u.top-4,left:u.left,width:u.width});}},[d]);I__namespace.useEffect(()=>(L&&(ne(),window.addEventListener("scroll",ne,true),window.addEventListener("resize",ne)),()=>{window.removeEventListener("scroll",ne,true),window.removeEventListener("resize",ne);}),[L,ne]),I__namespace.useEffect(()=>{let u=j=>{Ie.current&&!Ie.current.contains(j.target)&&Ae.current&&!Ae.current.contains(j.target)&&(S(false),z(""));};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),I__namespace.useEffect(()=>{L&&R(0);},[L,D]);let Vt=()=>{V(true);},At=()=>{V(false);},qe=u=>jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[m&&u?.iconColor&&jsxRuntime.jsx(lucideReact.Circle,{size:18,style:{color:u.iconColor,fill:u.iconColor},className:e("rounded-full",{"border border-gray-400":u.iconColor==="#FFFFFF"})}),u?.label||g]}),Bt=u=>{if(!L){(u.key==="ArrowDown"||u.key==="Enter"||u.key===" ")&&(S(true),u.preventDefault());return}u.key==="ArrowDown"?(R(j=>Math.min(j+1,Z.length-1)),u.preventDefault()):u.key==="ArrowUp"?(R(j=>Math.max(j-1,0)),u.preventDefault()):u.key==="Enter"?(Z[x]&&(c?.(Z[x].value),S(false),z("")),u.preventDefault()):u.key==="Escape"&&(S(false),z(""),u.preventDefault());},Ft=jsxRuntime.jsx(react.AnimatePresence,{children:L&&jsxRuntime.jsxs(react.motion.div,{ref:Ae,initial:{opacity:0,y:d==="down"?-10:10},animate:{opacity:1,y:0},exit:{opacity:0,y:d==="down"?-10:10},transition:{duration:.15,ease:"easeOut"},id:je,role:"listbox","aria-activedescendant":x>=0&&Z[x]?`${k}-option-${Z[x].value}`:void 0,tabIndex:-1,style:{position:"fixed",top:d==="down"?`${H.top}px`:"auto",bottom:d==="up"?`${window.innerHeight-H.top}px`:"auto",left:`${H.left}px`,width:`${H.width}px`,zIndex:9999},className:e("bg-surface-elevated","border-2 border-primary rounded-lg shadow-2xl overflow-hidden"),children:[v&&jsxRuntime.jsx("input",{type:"text",placeholder:"Search...",className:"w-full px-4 py-2 border-b border-input-border outline-none bg-surface-elevated text-foreground",value:D,onChange:u=>z(u.target.value),"aria-label":"Search options",onClick:u=>u.stopPropagation()}),jsxRuntime.jsx("ul",{className:"max-h-60 overflow-y-auto w-full bg-surface-elevated",children:Z.length>0?Z.map((u,j)=>jsxRuntime.jsx("li",{id:`${k}-option-${u.value}`,role:"option","aria-selected":u.value===l,tabIndex:0,onClick:()=>{c?.(u.value),S(false),z("");},onMouseEnter:()=>R(j),className:e("px-4 py-2 w-full cursor-pointer hover:bg-primary/10 flex items-center gap-2 transition-colors",u.value===l&&"bg-primary/10 font-semibold",x===j&&"bg-primary/20"),children:y?y(u,u.value===l):qe(u)},u.value)):jsxRuntime.jsx("li",{className:"px-4 py-2 text-sm text-foreground-tertiary italic",children:h})})]},"dropdown")});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:e("space-y-2",It),ref:Ie,children:[n&&jsxRuntime.jsx("label",{htmlFor:k,className:"block text-sm font-medium text-foreground",children:n}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:N?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[a&&jsxRuntime.jsx(a,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200 pointer-events-none",N?"text-primary":"text-foreground-tertiary",Be&&"text-error")}),jsxRuntime.jsxs("button",{type:"button",ref:u=>{Ve.current=u,typeof w=="function"?w(u):w&&(w.current=u);},id:k,name:k,disabled:f||i,"aria-haspopup":"listbox","aria-expanded":L,"aria-controls":je,onClick:()=>!i&&S(!L),onFocus:Vt,onBlur:At,onKeyDown:Bt,className:e(gt({variant:r,size:s,hasError:Be,className:t}),{"pl-3":!a,"pl-10":a,"pr-10":true}),children:[qe(Mt),jsxRuntime.jsx(lucideReact.ChevronDown,{size:18,className:e("absolute right-3 top-1/2 transform -translate-y-1/2 transition-all duration-200 pointer-events-none",L&&"rotate-180",N?"text-primary":"text-foreground-tertiary",Be&&"text-error")})]})]}),o&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:o})]})]}),Me&&reactDom.createPortal(Ft,document.body)]})});Pe.displayName="Select";var bt=classVarianceAuthority.cva("flex items-center justify-center min-w-[120px] rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-background-secondary text-foreground hover:bg-background border-2 border-transparent focus:border-primary focus:ring-primary/20",primary:"bg-primary text-white hover:bg-primary-hover focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:ring-primary/20"},size:{sm:"h-8 px-2 text-sm gap-1",md:"h-10 px-2.5 text-base gap-2",lg:"h-12 px-3 text-lg gap-2"}},defaultVariants:{variant:"default",size:"md"}}),Fa=I__namespace.forwardRef(({currentPage:t,totalPages:r,onPageChange:s,itemsPerPage:n=10,onItemsPerPageChange:a,previousLabel:o="Previous",nextLabel:l="Next",rowsLabel:c="Rows:",previousAriaLabel:p="Go to previous page",nextAriaLabel:b="Go to next page",showItemsPerPage:f=true,itemsPerPageOptions:i=[10,25,50,100],showPageInfo:m=true,pageInfoTemplate:y="Page {current} of {total}",showIcons:v=true,variant:d,size:g,className:k},h)=>{let w=i.map(S=>({label:S.toString(),value:S})),N=y.replace("{current}",t.toString()).replace("{total}",r.toString()),V=()=>{t>1&&s(t-1);},L=()=>{t<r&&s(t+1);};return jsxRuntime.jsxs("div",{ref:h,className:e("flex flex-col items-center justify-between gap-4 md:flex-row",k),children:[m&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:N}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[f&&a&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),jsxRuntime.jsx(Pe,{value:n,onChange:S=>a(S),options:w,size:g,variant:d==="primary"||d===null?"default":d,dropdownDirection:"up",searchEnabled:false,width:"lg"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("button",{onClick:V,disabled:t===1,className:e(bt({variant:d,size:g})),"aria-label":p,children:[v&&jsxRuntime.jsx(lucideReact.ChevronLeft,{size:16}),o]}),jsxRuntime.jsxs("button",{onClick:L,disabled:t===r,className:e(bt({variant:d,size:g})),"aria-label":b,children:[l,v&&jsxRuntime.jsx(lucideReact.ChevronRight,{size:16})]})]})]})]})});Fa.displayName="Pagination";function Ce({isFlipped:t,setIsFlipped:r,onCardClick:s,productImage:n,fallbackImage:a,productCondition:o,brand:l,name:c,description:p,price:b,color:f,isExchangeable:i,isStoreProduct:m,hasOffer:y,offerPrice:v,onAddToCart:d,onExchange:g,addToCartAriaLabel:k="Add to cart",exchangeAriaLabel:h="Exchange product",offerLabel:w="Price Drop",localeString:N="es-CL",addToCartLabel:V="Agregar al carrito",exchangeLabel:L="Intercambiar",interests:S=["exchange interest1","exchange interest2","exchange interest3"]}){let D={NEW:"bg-green-500 text-white",OPEN_BOX:"bg-blue-400 text-white",LIKE_NEW:"bg-emerald-400 text-white",FAIR:"bg-yellow-400 text-gray-900",POOR:"bg-red-500 text-white",FOR_PARTS:"bg-gray-500 text-white",REFURBISHED:"bg-purple-500 text-white"},z=x=>x&&D[x]||"bg-gray-300 text-gray-700";return jsxRuntime.jsxs("div",{className:e("card-flip-front","bg-white dark:bg-stone-800","rounded-xl shadow-md","border border-gray-200/60 dark:border-stone-700/60","overflow-hidden","hover:shadow-xl","hover:border-primary/40","dark:hover:border-primary/50","transition-all duration-300","group"),children:[jsxRuntime.jsxs("figure",{className:e("relative","aspect-[4/3]","bg-gradient-to-br from-gray-100 to-gray-50","dark:from-stone-700 dark:to-stone-800","overflow-hidden"),children:[jsxRuntime.jsx("div",{className:e("absolute inset-0","opacity-0","group-hover:opacity-100","bg-gradient-to-t from-black/20 to-transparent","transition-opacity","duration-300","pointer-events-none","z-[1]")}),jsxRuntime.jsx("div",{className:e("relative","w-full","h-full","group-hover:scale-105","transition-transform","duration-500"),children:n||a}),m?y?jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2","bg-red-500","text-white","backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:w}):null:jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2",z(o),"backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","capitalize","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:o}),jsxRuntime.jsx("button",{onClick:x=>{x.stopPropagation(),r(!t);},className:e("absolute","top-2","right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","backdrop-blur-sm","border","border-gray-200/50","dark:border-stone-600/50","z-[2]"),"aria-label":"Ver impacto ambiental",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})})]}),jsxRuntime.jsxs("div",{className:"p-3.5",onClick:s,children:[jsxRuntime.jsxs("header",{className:e("flex","items-center","justify-between","gap-2","mb-2"),children:[jsxRuntime.jsx("span",{className:e("text-gray-500","dark:text-stone-400","text-[10px]","font-medium","uppercase","tracking-wide","truncate"),children:l}),f&&jsxRuntime.jsx("span",{className:e("text-gray-400","dark:text-stone-500","text-[10px]","font-medium","truncate","max-w-[60px]"),children:f})]}),jsxRuntime.jsx("h3",{className:e("font-semibold","text-sm","text-gray-900","dark:text-stone-50","line-clamp-1","mb-1.5","group-hover:text-primary","dark:group-hover:text-primary-hover","transition-colors","duration-200"),children:c}),jsxRuntime.jsx("p",{className:e("text-gray-600","dark:text-stone-400","text-xs","line-clamp-1","mb-3","leading-relaxed"),children:p}),jsxRuntime.jsxs("footer",{className:e("flex","flex-col","items-start","justify-between","gap-2"),children:[m&&y&&!i&&jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-1",children:[jsxRuntime.jsxs("span",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",v?.toLocaleString(N)]}),jsxRuntime.jsxs("span",{className:"text-sm text-gray-500 line-through",children:["$",b?.toLocaleString(N)]})]})," ",(!m||!y)&&!i&&jsxRuntime.jsxs("p",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",b?.toLocaleString(N)]}),i&&S&&jsxRuntime.jsx("div",{className:e("flex","items-center","gap-2","mb-2","overflow-x-auto","scroll-smooth","snap-x","snap-mandatory","px-3","flex-nowrap","w-full","scrollbar-hide"),style:{WebkitOverflowScrolling:"touch"},tabIndex:0,role:"list","aria-label":"Interests",children:S.map((x,R)=>jsxRuntime.jsx("span",{role:"listitem",className:e("inline-flex","items-center","flex-shrink-0","snap-start","text-[10px]","whitespace-nowrap","px-2","py-1","rounded-full","bg-gray-100","dark:bg-stone-700","text-gray-800","dark:text-stone-100","font-medium"),children:x},R))}),m&&!i&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":k,rightIcon:lucideReact.ShoppingCart,onClick:x=>{x.stopPropagation(),d?.();},children:V}),i&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":h,rightIcon:lucideReact.IterationCw,onClick:x=>{x.stopPropagation(),g?.();},children:L})," ",!i&&!m&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":k,rightIcon:lucideReact.ShoppingCart,onClick:x=>{x.stopPropagation(),d?.();},children:V})]})]})]})}function Re({isFlipped:t,setIsFlipped:r,setShowImpactModal:s,environmentalImpact:n,sellerName:a,sellerPhone:o,sellerAddress:l,impactLabel:c="Environmental Impact",materialsLabel:p="Materials:",viewMoreLabel:b="View Full Impact",sellerLabel:f="Seller Information",co2Label:i="CO\u2082 Saved",waterLabel:m="Water Saved"}){let y=g=>g>50?{level:"High",color:"success",width:"100%"}:g>20?{level:"Medium",color:"warning",width:"66%"}:{level:"Low",color:"info",width:"33%"},v=(()=>{if(n){if(Array.isArray(n)){let g=n.map(w=>{let N=w,V=N.material?.materialType??N.materialType??"Material",L=N.material?.percentage??N.percentage??0,S=N.quantity??N.weightKG??0,D=N.material?.estimatedCo2SavingsKG??N.co2SavingsKG??0,z=N.material?.estimatedWaterSavingsLT??N.waterSavingsLT??0;return {materialType:V,percentage:L,weightKG:S,co2SavingsKG:D,waterSavingsLT:z}}),k=g.reduce((w,N)=>w+(N.co2SavingsKG||0),0),h=g.reduce((w,N)=>w+(N.waterSavingsLT||0),0);return {totalCo2SavingsKG:k,totalWaterSavingsLT:h,materialBreakdown:g}}return n}})(),d=v?y(v.totalCo2SavingsKG):null;return jsxRuntime.jsx("div",{className:e("card-flip-back","bg-gradient-to-br from-white via-emerald-50/20 to-white","dark:from-stone-800 dark:via-stone-850 dark:to-stone-900","border-2 border-gray-200/60","dark:border-stone-700/50"),children:jsxRuntime.jsxs("div",{className:e("py-4","px-4","w-full","h-full","flex","flex-col","overflow-y-auto","scrollbar-hide","relative"),children:[jsxRuntime.jsx("button",{onClick:g=>{g.stopPropagation(),r(!t);},className:e("absolute top-2 right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","backdrop-blur-md","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","z-10","border","border-gray-200/50","dark:border-stone-600/50"),"aria-label":"Ver producto",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})}),n&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-between mb-0.5",children:jsxRuntime.jsxs("h4",{className:e("font-bold","text-gray-900","dark:text-stone-100","text-xs","flex","items-center","gap-1.5"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3.5 h-3.5 text-success"}),c]})}),jsxRuntime.jsx("div",{className:"mb-3",children:d&&jsxRuntime.jsx("span",{className:e("text-[9px]","font-semibold","px-2","py-0.5","rounded-full",`bg-${d.color}/15`,`text-${d.color}`,"border",`border-${d.color}/30`),children:d.level})}),jsxRuntime.jsx("div",{className:e("mb-2.5","bg-gray-200/60","dark:bg-stone-700/50","rounded-full","h-1","overflow-hidden"),children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-success to-success/70","rounded-full","transition-all","duration-1000"),style:{width:d?.width||"0%"}})}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2.5",children:[jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-success/8 to-transparent","dark:from-success/15 dark:to-transparent","rounded-lg","p-1.5","border","border-success/20","dark:border-success/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3 h-3 text-success"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:i})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-success",children:[v?.totalCo2SavingsKG," kg"]})]}),jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-info/8 to-transparent","dark:from-info/15 dark:to-transparent","rounded-lg","p-1.5","border","border-info/20","dark:border-info/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-3 h-3 text-info"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:m})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-info",children:[v?.totalWaterSavingsLT," L"]})]})]}),v&&v.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{className:e("bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[jsxRuntime.jsx("p",{className:"text-[9px] font-semibold text-gray-700 dark:text-stone-300 mb-2",children:p}),jsxRuntime.jsx("div",{className:"space-y-2",children:v.materialBreakdown.slice(0,2).map((g,k)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[9px]",children:[jsxRuntime.jsx("span",{className:"text-gray-700 dark:text-stone-300 font-medium truncate",children:g.materialType}),jsxRuntime.jsxs("span",{className:"font-bold text-primary dark:text-primary ml-1",children:[g.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsx("div",{className:"bg-gray-200 dark:bg-stone-700 rounded-full h-1 overflow-hidden",children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-primary to-primary-hover","rounded-full","transition-all","duration-500"),style:{width:`${g.percentage}%`}})})]},k))}),jsxRuntime.jsxs("button",{onClick:g=>{g.stopPropagation(),s(true);},className:e("w-full","mt-2.5","py-1.5","px-3","bg-primary/5","hover:bg-primary/10","dark:bg-primary/10","dark:hover:bg-primary/15","text-primary","dark:text-primary-hover","rounded-lg","text-[9px]","font-semibold","transition-all","duration-200","flex","items-center","justify-center","gap-1","border","border-primary/20","hover:border-primary/30","group/viewmore"),children:[b,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-3 h-3 group-hover/viewmore:translate-x-0.5 transition-transform duration-200"})]})]})]}),jsxRuntime.jsxs("div",{className:"mt-auto pt-3 border-t border-gray-200/60 dark:border-stone-700/50",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3.5 h-3.5 text-primary"}),jsxRuntime.jsx("h4",{className:"font-bold text-gray-900 dark:text-stone-100 text-xs",children:f})]}),jsxRuntime.jsxs("div",{className:e("space-y-1.5","bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[a&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:a})]}),o&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.Phone,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:o})]}),l&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:l})]})]})]})]})})}function kt({product:t}){let[r,s]=I.useState(false),[n,a]=I.useState(false),{images:o,price:l,name:c,brand:p,color:b,description:f,seller:i}=t,m="hasOffer"in t,y=!!t.hasOffer,v=t.offerPrice,d=t.environmentalImpact,g=t.productCategory?.materials;return jsxRuntime.jsxs("article",{className:e("flex-shrink-0","w-[220px]","h-[350px]","card-flip-perspective"),children:[jsxRuntime.jsxs("div",{className:e("card-flip-inner",r?"card-flip-flipped":""),children:[jsxRuntime.jsx(Ce,{isFlipped:r,setIsFlipped:s,productImage:o&&o.length>0?jsxRuntime.jsx("img",{src:o[0],alt:c}):null,price:l,name:c,brand:p,productCondition:t.condition,color:b,description:f,isExchangeable:!m&&t.isExchangeable,isStoreProduct:m,hasOffer:y,offerPrice:v,fallbackImage:"https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?w=800&q=60&auto=format&fit=crop",onCardClick:()=>{},onAddToCart:()=>{},onExchange:()=>{}}),jsxRuntime.jsx(Re,{isFlipped:r,setIsFlipped:s,setShowImpactModal:a,environmentalImpact:d??g,sellerName:i?.profile?.firstName,sellerPhone:i?.phone,sellerAddress:i?.address})]}),d&&jsxRuntime.jsx(we,{isOpen:n,onClose:()=>a(false),environmentalImpact:d})]})}function Pt({icon:t,mainText:r,description:s}){return jsxRuntime.jsx("article",{className:"inline-flex p-4 shadow-md flex-col items-center justify-center min-w-40 rounded-lg bg-white dark:bg-stone-900",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10 text-primary mb-4",children:jsxRuntime.jsx(t,{className:"w-5 h-5"})}),jsxRuntime.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-stone-100 mb-1",children:r}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-stone-400 text-center",children:s})]})})}var Rt=classVarianceAuthority.cva("w-full table-auto border-collapse",{variants:{variant:{default:"",outlined:"border border-border rounded-lg overflow-hidden"},size:{sm:"text-sm",md:"text-base",lg:"text-lg"},striped:{true:""},hover:{true:""}},defaultVariants:{variant:"default",size:"md"}}),Et=I__namespace.forwardRef(({columns:t,data:r,rowKey:s,className:n,variant:a,size:o,striped:l,hover:c,emptyMessage:p="No data",...b},f)=>{let i=react.motion.div;return jsxRuntime.jsx(i,{ref:f,className:e("w-full overflow-auto",n),initial:{opacity:0,y:-6},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.35},...b,children:jsxRuntime.jsxs("table",{className:e(Rt({variant:a,size:o})),role:"table",children:[jsxRuntime.jsx("thead",{className:"bg-primary text-white",children:jsxRuntime.jsx("tr",{children:t.map(m=>jsxRuntime.jsx("th",{className:e("text-left px-4 py-2 font-medium text-white",m.className),children:m.header},m.key))})}),jsxRuntime.jsx("tbody",{children:r.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{className:"px-4 py-6 text-center text-text-muted",colSpan:t.length,children:p})}):r.map((m,y)=>{let v=s?s(m):m.id??y;return jsxRuntime.jsx("tr",{className:e(l&&y%2===1?"bg-neutral/5 dark:bg-stone-800/40":"",c?"hover:bg-neutral/5 dark:hover:bg-stone-800/50":""),children:t.map(d=>{let g=m[d.key];return jsxRuntime.jsx("td",{className:"px-4 py-3 align-top",children:d.render?d.render(g,m):String(g??"")},d.key)})},String(v))})})]})})});Et.displayName="Table";var Ua=Et;var Qa=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder resize-none",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},textSize:{sm:"text-sm py-2 px-3 min-h-[80px]",md:"text-base py-3 px-3 min-h-[120px]",lg:"text-lg py-4 px-4 min-h-[160px]"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",textSize:"md",hasError:false}}),Ya=I__namespace.forwardRef(({className:t,variant:r,textSize:s,label:n,errorMessage:a,showCharCount:o=false,width:l="full",disabled:c=false,readOnly:p=false,maxLength:b,value:f="",name:i,id:m,...y},v)=>{let[d,g]=I__namespace.useState(false),k=!!a,h=String(f).length,w={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[l],N=I__namespace.useId(),V=m||i||`textarea-${N}`;return jsxRuntime.jsxs("div",{className:e("space-y-2",w),children:[n&&jsxRuntime.jsx("label",{htmlFor:V,className:"block text-sm font-medium text-foreground",children:n}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(react.motion.div,{initial:false,animate:{scale:d?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:jsxRuntime.jsx("textarea",{ref:v,id:V,name:i,value:f,disabled:c,readOnly:p,maxLength:b,onFocus:()=>g(true),onBlur:()=>g(false),className:e(Qa({variant:r,textSize:s,hasError:k,className:t})),...y})}),o&&b&&jsxRuntime.jsxs("div",{className:"mt-1 text-xs text-foreground-tertiary text-right",children:[h," / ",b]})]}),a&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error",children:a})]})});Ya.displayName="Textarea";var Tt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background-tertiary focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),Lt=I__namespace.forwardRef(({className:t,variant:r,size:s,hasError:n,label:a,leftIcon:o,errorMessage:l,type:c="text",width:p="full",id:b,name:f,disabled:i,onFocus:m,onBlur:y,...v},d)=>{let[g,k]=I__namespace.useState(false),[h,w]=I__namespace.useState(false),N={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[p],V=c==="password",L=V&&h?"text":c,S=n||!!l,D=R=>{k(true),m?.(R);},z=R=>{k(false),y?.(R);},x=()=>{w(R=>!R);};return jsxRuntime.jsxs("div",{className:e("space-y-2",N),children:[a&&jsxRuntime.jsx("label",{htmlFor:b||f,className:"block text-sm font-medium text-foreground",children:a}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:g?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[o&&jsxRuntime.jsx(o,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200",g?"text-primary":"text-foreground-tertiary",S&&"text-error")}),jsxRuntime.jsx("input",{ref:d,id:b||f,name:f,type:L,disabled:i,onFocus:D,onBlur:z,className:e(Tt({variant:r,size:s,hasError:S,className:t}),{"pl-3":!o,"pl-10":o,"pr-10":V,"pr-3":!V}),...v}),V&&jsxRuntime.jsx("button",{type:"button",onClick:x,disabled:i,className:e("absolute right-3 top-1/2","transform","-translate-y-1/2","text-foreground-tertiary","hover:text-foreground-secondary","transition-colors","duration-200","disabled:opacity-50","disabled:cursor-not-allowed"),tabIndex:-1,children:jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:h?jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.EyeOff,{className:"w-5 h-5"})},"eye-off"):jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.Eye,{className:"w-5 h-5"})},"eye")})})]}),l&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:l})]})]})});Lt.displayName="TextInput";
|
|
1
|
+
'use strict';var I=require('react'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),react=require('motion/react'),jsxRuntime=require('react/jsx-runtime'),lucideReact=require('lucide-react'),reactDom=require('react-dom');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var I__namespace=/*#__PURE__*/_interopNamespace(I);function e(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var Dt=classVarianceAuthority.cva("w-full border-t border-b overflow-hidden rounded-none",{variants:{variant:{primary:"bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white",secondary:"bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white",outlined:"bg-background border border-primary text-foreground",ghost:"bg-white/50 text-foreground"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),_e=I__namespace.forwardRef(({icon:t,title:r,description:s,cta:n,variant:a,animated:o,className:l,...c},p)=>{let b=react.motion.div,f=t;return jsxRuntime.jsx(b,{ref:p,initial:{opacity:0,y:-8},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.45},className:e(Dt({variant:a,animated:o}),"p-4 md:p-5",l),...c,children:jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col sm:flex-row","items-center","gap-4 py-2 px-2","justify-between"),children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-col","items-center sm:items-start","justify-center"),children:[f&&jsxRuntime.jsx(react.motion.div,{className:e("w-20 h-20","flex items-center justify-center","rounded-lg","mb-2",{"bg-white/10":a==="primary"||a==="secondary","bg-primary/10":a==="outlined"||a==="ghost"}),children:jsxRuntime.jsx(f,{className:e("w-10 h-10",{"text-white":a==="primary"||a==="secondary","text-primary":a==="outlined"||a==="ghost"})})}),r&&jsxRuntime.jsx(react.motion.h3,{className:e("text-lg font-bold","text-center sm:text-left","mb-1"),children:r}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm text-center sm:text-left","text-muted","mb-0"),children:s})]}),jsxRuntime.jsx(react.motion.div,{className:e("flex items-center justify-center"),children:n})]})})});_e.displayName="AdBanner";var Kt=_e;var Ze=classVarianceAuthority.cva("p-4 md:p-5 rounded-xl w-[95%] mx-auto overflow-hidden relative",{variants:{variant:{primary:"border-2 border-transparent bg-gradient-to-r from-primary-dark via-primary to-primary-dark text-white shadow-lg",secondary:"border-2 border-transparent bg-gradient-to-r from-secondary-dark via-secondary to-secondary-dark text-white shadow-lg",outlined:"border-2 border-primary shadow-lg bg-background backdrop-blur",ghost:"border-2 border-transparent bg-white/50 backdrop-blur"},animated:{true:"",false:""}},defaultVariants:{variant:"primary",animated:true}}),Qe=classVarianceAuthority.cva("w-3 h-3 rounded-full inline-block",{variants:{variant:{primary:"bg-white shadow-lg shadow-white/50",secondary:"bg-white",outlined:"bg-primary",ghost:"bg-gray-600"}},defaultVariants:{variant:"primary"}}),et=I__namespace.forwardRef(({className:t,variant:r,animated:s,title:n,description:a,showDots:o=true,...l},c)=>{let p=react.motion.div;return jsxRuntime.jsxs(p,{ref:c,initial:{opacity:0,y:-20},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.6},className:e(Ze({variant:r,animated:s,className:t})),...l,children:[s&&r==="primary"&&jsxRuntime.jsx(react.motion.div,{animate:{x:["-100%","100%"]},transition:{duration:15,repeat:1/0,ease:"linear"},className:e("absolute inset-0","bg-gradient-to-r from-transparent via-white/10 to-transparent")}),jsxRuntime.jsxs(react.motion.div,{className:"relative z-10",children:[jsxRuntime.jsxs(react.motion.div,{className:e("flex flex-1 justify-center items-center","gap-2 md:gap-3","mb-3"),children:[o&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.2,type:"spring"},className:e(Qe({variant:r}))}),jsxRuntime.jsx(react.motion.h2,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:true},transition:{delay:.3},className:e("text-base sm:text-lg md:text-2xl","font-bold","text-center","tracking-tight"),children:n}),o&&jsxRuntime.jsx(react.motion.span,{initial:{scale:0},whileInView:{scale:1},viewport:{once:true},transition:{delay:.4,type:"spring"},className:e(Qe({variant:r}))})]}),jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{delay:.5},className:e("text-sm sm:text-base md:text-lg","text-center","leading-snug md:leading-normal","font-light"),children:a})]})]})});et.displayName="Banner";var at=classVarianceAuthority.cva("min-w-[140px] rounded-lg font-medium shadow-md transition-all duration-200 flex items-center justify-center space-x-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"border-2 border-primary bg-primary text-white hover:bg-primary/90 active:bg-primary/80 shadow-md",secondary:"border-2 border-secondary bg-secondary text-white hover:bg-secondary/90 active:bg-secondary/80",secondary_outline:"border-2 border-secondary bg-white text-secondary hover:bg-white/90 active:bg-white/80",outline:"border-2 border-primary text-primary hover:bg-primary/5 hover:text-accent-foreground active:bg-primary/10",ghost:"hover:bg-muted active:bg-muted/80 text-foreground",success:"border-2 border-success bg-success text-white hover:bg-success/90 active:bg-success/80 shadow-md",warning:"border-2 border-warning bg-warning text-white hover:bg-warning/90 active:bg-warning/80 shadow-md",error:"border-2 border-error bg-error text-white hover:bg-error/90 active:bg-error/80 shadow-md"},size:{sm:"min-h-[36px] px-2 py-2 text-sm",md:"min-h-[44px] px-6 py-2.5 text-base",lg:"min-h-[56px] px-8 py-3 text-lg"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md"}}),se=I__namespace.forwardRef(({className:t,variant:r,size:s,fullWidth:n,isLoading:a,leftIcon:o,rightIcon:l,children:c,disabled:p,loadingText:b="Loading...",...f},i)=>{let m=react.motion.button;return jsxRuntime.jsxs(m,{className:e(at({variant:r,size:s,fullWidth:n,className:t})),ref:i,disabled:p||a,whileHover:{scale:1.02,y:-2},whileTap:{scale:.96,y:0},transition:{type:"spring",stiffness:400,damping:17},...f,children:[jsxRuntime.jsxs(react.AnimatePresence,{mode:"wait",children:[a&&jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center space-x-2",children:jsxRuntime.jsx(lucideReact.Loader2,{className:"w-5 h-5 animate-spin mr-2"})},"loading"),!a&&o&&jsxRuntime.jsx(react.motion.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},className:"mr-2 inline-flex items-center justify-center flex-shrink-0",children:I__namespace.isValidElement(o)?o:I__namespace.createElement(o,{size:18,className:"flex-shrink-0"})},"leftIcon")]}),a?b:c,!a&&l&&jsxRuntime.jsx("span",{className:"ml-2 inline-flex items-center justify-center flex-shrink-0",children:I__namespace.isValidElement(l)?l:I__namespace.createElement(l,{size:18,className:"flex-shrink-0"})})]})});se.displayName="Button";function ot({image:t,title:r,description:s,cta:n,hasBadge:a,badgeText:o,badgeColor:l="bg-primary",textColor:c="text-white"}){return jsxRuntime.jsxs(react.motion.article,{className:e("w-64","bg-white","rounded-lg","overflow-hidden","shadow-md","relative"),children:[jsxRuntime.jsx(react.motion.div,{className:"h-40 w-full overflow-hidden",children:t||jsxRuntime.jsx(react.motion.div,{className:e("h-40 w-full","bg-gray-200","flex items-center justify-center"),children:jsxRuntime.jsx(react.motion.span,{className:"text-gray-500",children:jsxRuntime.jsx(lucideReact.Image,{})})})}),a&&o&&jsxRuntime.jsx(react.motion.div,{className:e("absolute top-2 left-2","text-xs","font-semibold","px-4 py-1","rounded-lg","shadow-md",l,c),children:o}),jsxRuntime.jsxs(react.motion.div,{className:"p-4",children:[jsxRuntime.jsx(react.motion.h3,{className:e("text-lg","font-semibold","text-gray-900","dark:text-stone-100"),children:r}),s&&jsxRuntime.jsx(react.motion.p,{className:e("text-sm","text-gray-600","dark:text-stone-400","mt-2"),children:s}),n&&jsxRuntime.jsx(react.motion.div,{className:"mt-2",children:n})]})]})}var Zt=classVarianceAuthority.cva("py-8",{variants:{variant:{default:"",compact:"py-4",centered:""}},defaultVariants:{variant:"default"}});function it({header:t,description:r,link:s,items:n,children:a,variant:o,className:l,...c}){let p=I.useRef(null),[b,f]=I.useState(false),[i,m]=I.useState(false),y=I.useCallback(()=>{let h=p.current;h&&(f(h.scrollLeft>0),m(h.scrollLeft<h.scrollWidth-h.clientWidth-1));},[]);I.useEffect(()=>{y();let h=p.current;if(h)return h.addEventListener("scroll",y),window.addEventListener("resize",y),()=>{h.removeEventListener("scroll",y),window.removeEventListener("resize",y);}},[y,n,a]);let v=h=>{let w=p.current;w&&w.scrollTo({left:w.scrollLeft+h,behavior:"smooth"});},d=()=>v(-(p.current?.clientWidth??300)*.8),g=()=>v((p.current?.clientWidth??300)*.8),k=Array.isArray(n)&&n.length>0;return jsxRuntime.jsx("section",{className:e(Zt({variant:o}),l),...c,children:jsxRuntime.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[jsxRuntime.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between mb-4 items-start gap-2",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-start gap-1",children:[t&&jsxRuntime.jsx("h2",{className:"font-bold",children:t}),r&&jsxRuntime.jsx("p",{className:"text-sm text-text-muted",children:r})]}),s&&jsxRuntime.jsx("div",{children:s})]}),jsxRuntime.jsxs("div",{className:"relative",children:[b&&jsxRuntime.jsx("button",{"aria-label":"Scroll left",onClick:d,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowLeft,{className:"w-5 h-5"})}),i&&jsxRuntime.jsx("button",{"aria-label":"Scroll right",onClick:g,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 p-2 rounded-full bg-background/70 backdrop-blur hover:scale-105 transition-transform",children:jsxRuntime.jsx(lucideReact.ArrowRight,{className:"w-5 h-5"})}),jsxRuntime.jsx("div",{ref:p,className:"flex gap-4 overflow-x-auto pb-4 scrollbar-hide scroll-smooth",role:"list",children:k?n.map((h,w)=>jsxRuntime.jsx("div",{className:"flex-shrink-0",children:h},I__namespace.default.isValidElement(h)?h.key??w:w)):a})]})]})})}var aa=classVarianceAuthority.cva("relative rounded-md border-2 flex items-center justify-center transition-all duration-200 cursor-pointer",{variants:{variant:{default:"border-input-border hover:border-primary/50",filled:"border-transparent bg-background-secondary",outline:"border-primary bg-transparent"},size:{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},checked:{true:"bg-primary border-primary",false:""},disabled:{true:"opacity-50 cursor-not-allowed",false:""}},defaultVariants:{variant:"default",size:"md",checked:false,disabled:false}}),ra=I__namespace.forwardRef(({className:t,variant:r,size:s="md",label:n,description:a,errorMessage:o,checked:l=false,disabled:c=false,onCheckedChange:p,onChange:b,id:f,name:i,...m},y)=>{let v={sm:12,md:16,lg:20},d=h=>{let w=h.target.checked;p?.(w),b?.(h);},g=I__namespace.useId(),k=f||i||`checkbox-${g}`;return jsxRuntime.jsxs(react.motion.div,{className:"space-y-1",children:[jsxRuntime.jsxs(react.motion.div,{className:"flex items-start space-x-3",children:[jsxRuntime.jsxs(react.motion.div,{className:"relative",children:[jsxRuntime.jsx(react.motion.button,{type:"button",onClick:()=>!c&&p?.(!l),disabled:c,className:e(aa({variant:r,size:s,checked:l,disabled:c,className:t})),whileTap:c?{}:{scale:.95},children:jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:l?1:0,scale:l?1:.5},transition:{duration:.2},children:jsxRuntime.jsx(lucideReact.Check,{size:v[s||"md"],className:"text-white"})})}),jsxRuntime.jsx("input",{ref:y,id:k,name:i,type:"checkbox",checked:l,onChange:d,disabled:c,className:"sr-only",...m})]}),n&&jsxRuntime.jsxs(react.motion.div,{className:"flex-1",children:[jsxRuntime.jsx(react.motion.label,{htmlFor:k,className:e("text-sm font-medium cursor-pointer",c?"text-foreground-tertiary cursor-not-allowed":"text-foreground",o&&"text-error"),children:n}),a&&jsxRuntime.jsx(react.motion.p,{className:"text-sm text-foreground-tertiary mt-1",children:a})]})]}),o&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error ml-8",children:o})]})});ra.displayName="Checkbox";var da=classVarianceAuthority.cva("relative w-full max-h-[90vh] rounded-lg shadow-2xl overflow-hidden z-10",{variants:{size:{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-7xl"}},defaultVariants:{size:"md"}});function he({isOpen:t,onClose:r,children:s,title:n,size:a="md",showCloseButton:o=true,closeOnOverlayClick:l=true,closeOnEscape:c=true,className:p}){return I.useEffect(()=>{let b=f=>{f.key==="Escape"&&c&&r?.();};if(t){document.addEventListener("keydown",b);let f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=f||"unset";}}return ()=>{document.removeEventListener("keydown",b);}},[t,r,c]),t?reactDom.createPortal(jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",initial:false,children:t&&jsxRuntime.jsxs(react.motion.div,{transition:{duration:.2},className:e("fixed inset-0 z-[9999]","flex items-center justify-center","p-4"),role:"dialog","aria-modal":"true","aria-labelledby":n?"modal-title":void 0,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:e("absolute inset-0","bg-black/60","backdrop-blur-sm"),onClick:l?r:void 0,"aria-label":"Close modal"}),jsxRuntime.jsxs(react.motion.div,{initial:{scale:.9,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:30},transition:{type:"spring",damping:25,stiffness:300},onClick:b=>b.stopPropagation(),className:e(da({size:a}),"bg-surface border border-border",p),children:[(n||o)&&jsxRuntime.jsxs("div",{className:e("flex items-center justify-between","p-6","border-b border-border"),children:[n&&jsxRuntime.jsx("h3",{id:"modal-title",className:"font-semibold text-lg text-foreground",children:n}),o&&jsxRuntime.jsx("button",{onClick:r,className:e("p-1 rounded-lg text-foreground-secondary","hover:text-foreground hover:bg-background-secondary","transition-colors"),"aria-label":"Close modal",children:jsxRuntime.jsx(lucideReact.X,{className:"h-5 w-5"})})]}),jsxRuntime.jsx("div",{className:e("p-6","overflow-y-auto","max-h-[calc(90vh-8rem)]","scrollbar-hide","text-foreground"),children:s})]})]},"modal")}),document.body):null}function we({isOpen:t,onClose:r,environmentalImpact:s,co2SavingsTitle:n="CO\u2082 Savings",waterSavingsTitle:a="Water Savings",weightLabel:o="Weight",co2SavingsLabel:l="CO\u2082 Saved",waterSavingsLabel:c="Water Saved",materialBreakdownLabel:p="Material Breakdown",carDistanceLabel:b=" by car",showerCountLabel:f=" showers",co2EquivalenceLabel:i="Equivalent to",waterEquivalenceLabel:m="Equivalent to",infoText:y="These values are estimates based on the savings generated by reusing products instead of manufacturing new ones. The calculations consider the average impact of producing each material."}){let v=d=>new Intl.NumberFormat("es-CL",{minimumFractionDigits:1,maximumFractionDigits:1}).format(d);return jsxRuntime.jsx(he,{isOpen:t,onClose:r,title:"Impacto Ambiental Detallado",size:"md",children:jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("div",{className:e("flex flex-col md:flex-row","gap-4 md:gap-6"),children:[jsxRuntime.jsxs("div",{className:e("bg-success/10 dark:bg-success/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-5 h-5 text-success"}),jsxRuntime.jsx("span",{className:e("text-sm font-medium text-text-muted","dark:text-stone-400"),children:n})]}),jsxRuntime.jsxs("p",{className:e("text-2xl font-bold text-success"),children:[v(s.totalCo2SavingsKG)," kg"]}),jsxRuntime.jsxs("p",{className:e("text-xs text-text-muted","dark:text-stone-400","mt-1"),children:[i," ",v(s.totalCo2SavingsKG*4.5)," km",b]})]}),jsxRuntime.jsxs("div",{className:e("bg-info/10","dark:bg-info/20","rounded-lg","p-4","flex-1"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","gap-2","mb-2"),children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-5 h-5 text-info"}),jsxRuntime.jsx("span",{className:e("text-sm","font-medium","text-text-muted","dark:text-stone-400"),children:a})]}),jsxRuntime.jsxs("p",{className:e("text-2xl","font-bold","text-info"),children:[v(s.totalWaterSavingsLT)," L"]}),jsxRuntime.jsxs("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mt-1"),children:[m," ",v(s.totalWaterSavingsLT/8)," ",f]})]})]}),s.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("h3",{className:e("text-lg","font-bold","text-text-primary","dark:text-stone-100","mb-4","flex","items-center","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:"w-5 h-5"}),p]}),jsxRuntime.jsx("div",{className:e("space-y-3"),children:s.materialBreakdown.map((d,g)=>jsxRuntime.jsxs("div",{className:e("border","border-neutral/20","dark:border-stone-700","rounded-lg","p-4","hover:bg-neutral/5","dark:hover:bg-stone-800/50","transition-colors"),children:[jsxRuntime.jsxs("div",{className:e("flex","items-center","justify-between","mb-3"),children:[jsxRuntime.jsx("h4",{className:e("font-semibold","text-text-primary","dark:text-stone-100"),children:d.materialType}),jsxRuntime.jsxs("span",{className:e("text-lg","font-bold","text-primary"),children:[d.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsxs("div",{className:e("grid","grid-cols-3","gap-3","text-sm"),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:o}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-text-secondary","dark:text-stone-300"),children:[v(d.weightKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:l}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-success"),children:[v(d.co2SavingsKG)," kg"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:e("text-xs","text-text-muted","dark:text-stone-400","mb-1"),children:c}),jsxRuntime.jsxs("p",{className:e("font-semibold","text-info"),children:[v(d.waterSavingsLT)," L"]})]})]}),jsxRuntime.jsx("div",{className:e("mt-3","h-2","bg-neutral/10","dark:bg-stone-700","rounded-full","overflow-hidden"),children:jsxRuntime.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-500",style:{width:`${d.percentage}%`}})})]},g))})]}),jsxRuntime.jsx("div",{className:e("bg-primary/5","dark:bg-primary/10","rounded-lg","p-4","text-sm","text-text-secondary","dark:text-stone-300"),children:jsxRuntime.jsxs("p",{className:e("flex","items-start","gap-2"),children:[jsxRuntime.jsx(lucideReact.Info,{className:e("w-4","h-4","mt-0.5","text-primary","flex-shrink-0")}),jsxRuntime.jsx("span",{children:y})]})})]})})}function lt({brand:t,socialLinks:r,description:s,exploreItems:n,exploreLabel:a="Explore",communityItems:o,communityLabel:l="Community",legalItems:c,legalLabel:p="Legal",copyRightText:b="All rights reserved."}){return jsxRuntime.jsx(react.motion.footer,{className:e("bg-gradient-to-r from-primary-dark via-primary to-primary-dark"),children:jsxRuntime.jsxs(react.motion.div,{className:"max-w-7xl mx-auto px-6 py-12",children:[jsxRuntime.jsxs(react.motion.div,{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[jsxRuntime.jsxs(react.motion.div,{className:"space-y-4 flex flex-col",children:[t,jsxRuntime.jsx(react.motion.p,{className:"text-sm text-white leading-relaxed",children:s}),r&&jsxRuntime.jsx(react.motion.div,{className:e("flex items-center gap-3"),children:r})]}),n&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:a}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:n&&n.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),o&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:l}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:o&&o.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]}),c&&jsxRuntime.jsxs(react.motion.div,{children:[jsxRuntime.jsx(react.motion.h3,{className:"font-semibold text-white mb-4",children:p}),jsxRuntime.jsx(react.motion.ul,{className:"space-y-3",children:c&&c.map((f,i)=>jsxRuntime.jsx(react.motion.li,{children:f},i))})]})]}),jsxRuntime.jsx(react.motion.div,{className:"mt-12 pt-8 border-t border-gray-200 dark:border-stone-800",children:jsxRuntime.jsxs(react.motion.p,{className:"text-sm text-center text-white",children:["\xA9 ",new Date().getFullYear()," EKORU. ",b]})})]})})}function ct({banners:t,ImageComponent:r,autoScrollInterval:s=5e3}){let[n,a]=I.useState(0),[o,l]=I.useState(false);I.useEffect(()=>{if(o)return;let i=setInterval(()=>{a(m=>(m+1)%t.length);},s);return ()=>clearInterval(i)},[t.length,s,o]);let c=()=>{a(i=>(i+1)%t.length);},p=()=>{a(i=>(i-1+t.length)%t.length);},b=i=>{a(i);},f=r||"img";return jsxRuntime.jsxs("section",{className:"relative overflow-hidden",onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),children:[jsxRuntime.jsx("div",{className:"relative h-[300px] sm:h-[350px] md:h-[400px] lg:h-[500px] xl:h-[600px]",children:t.map((i,m)=>{let y=m===n,v=m<n;return jsxRuntime.jsx("div",{className:`absolute inset-0 transition-transform duration-700 ease-in-out ${y?"translate-x-0 opacity-100":v?"-translate-x-full opacity-0":"translate-x-full opacity-0"}`,"aria-hidden":!y,children:jsxRuntime.jsx("div",{className:`${i.bgColor} h-full flex items-center`,children:jsxRuntime.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-20 py-4 sm:py-6 md:py-6 lg:py-12 w-full",children:jsxRuntime.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6 md:gap-6 lg:gap-8 items-center h-full",children:[jsxRuntime.jsxs("div",{className:"text-white text-center lg:text-left space-y-2 sm:space-y-3 lg:space-y-4",children:[jsxRuntime.jsx("h1",{className:"text-xl sm:text-2xl md:text-3xl lg:text-5xl xl:text-6xl font-bold leading-tight animate-fade-in",children:i.title}),jsxRuntime.jsx("h2",{className:"text-base sm:text-lg md:text-xl lg:text-2xl text-white/90 animate-fade-in-delay-100",children:i.subtitle}),jsxRuntime.jsx("p",{className:"text-xs sm:text-sm md:text-base lg:text-lg text-white/80 max-w-lg mx-auto lg:mx-0 line-clamp-3 animate-fade-in-delay-200",children:i.description}),jsxRuntime.jsx("div",{className:"text-xs sm:text-sm text-white/60 italic pt-2 animate-fade-in-delay-300",children:"Pronto..."})]}),jsxRuntime.jsx("div",{className:"flex justify-center lg:justify-end mt-2 lg:mt-0",children:jsxRuntime.jsx("div",{className:"relative w-24 h-24 sm:w-32 sm:h-32 md:w-48 md:h-48 lg:w-72 lg:h-72 xl:w-80 xl:h-80 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center overflow-hidden transition-transform duration-300 hover:scale-105",children:jsxRuntime.jsx(f,{src:i.image,alt:i.title,width:320,height:320,className:"w-12 h-12 sm:w-16 sm:h-16 md:w-24 md:h-24 lg:w-36 lg:h-36 xl:w-40 xl:h-40 object-contain",...r&&m===0?{priority:true}:{}})})})]})})})},i.id)})}),t.length>1&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:p,className:"absolute left-2 sm:left-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Previous banner",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-4 h-4 sm:w-6 sm:h-6"})}),jsxRuntime.jsx("button",{onClick:c,className:"absolute right-2 sm:right-4 top-1/2 transform -translate-y-1/2 bg-black/30 hover:bg-black/50 text-white p-2 sm:p-3 rounded-full backdrop-blur-sm transition-all duration-200 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-white/50","aria-label":"Next banner",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-4 h-4 sm:w-6 sm:h-6"})})]}),t.length>1&&jsxRuntime.jsx("div",{className:"absolute bottom-3 sm:bottom-6 left-1/2 transform -translate-x-1/2 flex space-x-2",children:t.map((i,m)=>jsxRuntime.jsx("button",{onClick:()=>b(m),className:`w-2 h-2 sm:w-3 sm:h-3 rounded-full transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-white/50 ${m===n?"bg-white w-6 sm:w-8":"bg-white/50 hover:bg-white/70"}`,"aria-label":`Go to banner ${m+1}`,"aria-current":m===n?"true":"false"},m))})]})}var xa=classVarianceAuthority.cva("font-bold tracking-tight transition-colors",{variants:{level:{h1:"text-5xl md:text-6xl lg:text-7xl",h2:"text-4xl md:text-5xl lg:text-6xl",h3:"text-3xl md:text-4xl lg:text-5xl",h4:"text-2xl md:text-3xl lg:text-4xl",h5:"text-xl md:text-2xl lg:text-3xl",h6:"text-lg md:text-xl lg:text-2xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{level:"h1",weight:"bold",color:"default",align:"left"}}),De=I__namespace.forwardRef(({className:t,level:r="h1",weight:s,color:n,align:a,as:o,children:l,...c},p)=>jsxRuntime.jsx(o||r,{ref:p,className:e(xa({level:r,weight:s,color:n,align:a,className:t})),...c,children:l}));De.displayName="Title";var ha=classVarianceAuthority.cva("transition-colors",{variants:{variant:{p:"block",span:"inline",label:"block font-medium cursor-pointer",blockquote:"block border-l-4 border-primary pl-4 italic",small:"block text-sm",code:"inline-block font-mono bg-background-secondary px-1.5 py-0.5 rounded text-sm"},size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},color:{default:"text-foreground",primary:"text-primary",secondary:"text-foreground-secondary",tertiary:"text-foreground-tertiary",error:"text-error",success:"text-success",warning:"text-warning",muted:"text-muted"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",size:"base",weight:"normal",color:"default",align:"left"}}),ke=I__namespace.forwardRef(({className:t,variant:r="p",size:s,weight:n,color:a,align:o,as:l,htmlFor:c,children:p,...b},f)=>jsxRuntime.jsx(l||r,{ref:f,htmlFor:r==="label"||l==="label"?c:void 0,className:e(ha({variant:r,size:s,weight:n,color:a,align:o,className:t})),...b,children:p}));ke.displayName="Text";function ft({brand:t,navigationLinks:r,mobileMenuNavigationLinks:s,appNavigationItems:n,mobileMenuAppNavigationItems:a,searchPlaceholder:o="Search...",onSearch:l,className:c="",searchEnabled:p=true,sideMenuTitle:b="Menu",navbarAriaLabel:f="Main navigation",userActionsAriaLabel:i="User actions",toggleMobileMenuAriaLabel:m="Toggle mobile menu",closeMobileMenuAriaLabel:y="Close mobile menu",mobileMenuTitleAriaLabel:v="Mobile menu"}){let[d,g]=I.useState(false),[k,h]=I.useState(""),[w,N]=I.useState("");I.useEffect(()=>{let x=new IntersectionObserver(R=>{R.forEach(H=>{H.isIntersecting&&N(H.target.id);});},{threshold:.3});return r?.forEach(({id:R})=>{let H=document.getElementById(R);H&&x.observe(H);}),()=>x.disconnect()},[]);let V=()=>g(false),L=x=>{h(x.target.value);},S=x=>{x.preventDefault(),l?.(k);},D=x=>{x.key==="Escape"&&d&&g(false);},z=x=>{g(false),setTimeout(()=>{let R=document.getElementById(x);R&&R.scrollIntoView({behavior:"smooth"});},200);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("header",{className:e("bg-gradient-to-r from-navbar-dark via-navbar-main to-navbar-dark","sticky top-0 z-50",c),onKeyDown:D,children:jsxRuntime.jsxs("nav",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",role:"navigation","aria-label":f,children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center h-16",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0",children:t||jsxRuntime.jsx("span",{className:"text-xl font-bold text-white",children:"EKORU"})}),p&&jsxRuntime.jsx("div",{className:"hidden md:flex flex-1 max-w-2xl mx-8",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:S,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-desktop",name:"search-desktop",type:"search",value:k,onChange:L,placeholder:o,className:e("w-full px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",role:"toolbar","aria-label":i,children:[n,jsxRuntime.jsx("div",{className:"hidden lg:flex items-center space-x-8",children:r&&r.map((x,R)=>jsxRuntime.jsxs(react.motion.a,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.4,delay:.3+R*.1},href:`#${x.id}`,className:e("relative","text-white","transition-all duration-200 ease-in-out","font-medium text-sm","group",{"text-secondary":w===x.id}),children:[x.label,jsxRuntime.jsx(react.motion.span,{initial:{scaleX:0},animate:{scaleX:w===x.id?1:0},transition:{duration:.3},className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary-light origin-left"}),jsxRuntime.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-white scale-x-0 group-hover:scale-x-100 transition-transform origin-left"})]},x.id))}),jsxRuntime.jsx("button",{onClick:()=>g(!d),className:e("p-2","rounded-lg","text-white","hover:bg-primary/30","transition-colors","lg:hidden"),"aria-label":m,"aria-expanded":d,children:jsxRuntime.jsx(lucideReact.Menu,{className:"h-6 w-6"})})]})]}),p&&jsxRuntime.jsx("div",{className:"md:hidden pb-4",role:"search",children:jsxRuntime.jsxs("form",{onSubmit:S,className:"w-full flex items-center relative",children:[jsxRuntime.jsx("input",{id:"search-mobile",name:"search-mobile",type:"search",value:k,onChange:L,placeholder:o,className:e("w-full","px-4 py-2","rounded-lg","border border-input-border","bg-input-bg","text-foreground","placeholder:text-foreground-tertiary","focus:outline-none","focus:ring-2","focus:ring-primary","focus:border-transparent")}),jsxRuntime.jsx(lucideReact.Search,{className:"h-5 w-5 text-primary absolute right-4"})]})})]})}),jsxRuntime.jsx(react.AnimatePresence,{children:d&&jsxRuntime.jsxs("div",{className:"lg:hidden fixed inset-0 z-50 flex justify-end",role:"dialog","aria-modal":"true","aria-labelledby":v,children:[jsxRuntime.jsx(react.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>g(false),"aria-label":y}),jsxRuntime.jsx(react.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.3},className:e("relative","w-full","max-w-sm","bg-background","shadow-xl","h-full","overflow-y-auto"),children:jsxRuntime.jsxs("div",{className:"pt-6 px-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2 mx-4",children:[jsxRuntime.jsx(react.motion.h2,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},id:"mobile-menu-title",className:"text-xl font-semibold text-foreground",children:b}),jsxRuntime.jsx("button",{onClick:V,className:e("p-2","rounded-lg","text-foreground","hover:bg-primary/10","transition-colors","ease-in-out duration-200"),"aria-label":"Close mobile menu",children:jsxRuntime.jsx(lucideReact.X,{className:"h-6 w-6"})})]}),jsxRuntime.jsx("nav",{className:"space-y-2",children:a}),s&&jsxRuntime.jsx("div",{className:"mt-2 pt-6",children:s.map((x,R)=>jsxRuntime.jsx("div",{className:"h-full overflow-y-auto pb-6",children:jsxRuntime.jsxs("div",{className:"p-4 space-y-1",children:[jsxRuntime.jsx(De,{level:"h6",className:"text-gray-600 mb-2",children:x.title}),x.links.map(({id:H,isAnchor:Le,href:Me,label:ge})=>Le?jsxRuntime.jsx(react.motion.a,{href:Me||"#",className:e("w-full flex items-center justify-between","p-3","text-left"),children:jsxRuntime.jsx(ke,{variant:"small",className:"text-foreground hover:text-primary transition-colors ease-in-out duration-200",children:ge})},H):jsxRuntime.jsx(react.motion.button,{onClick:()=>z(H),className:e("w-full flex items-center justify-between","p-3","text-left"),children:jsxRuntime.jsx(ke,{variant:"small",className:"text-foreground hover:text-primary transition-colors ease-in-out duration-200",children:ge})},H))]})},R))})]})})]})})]})}var gt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder text-left",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),Pe=I__namespace.forwardRef(({className:t,variant:r,size:s,label:n,leftIcon:a,errorMessage:o,value:l,onChange:c,options:p=[],width:b="full",disabled:f=false,readOnly:i=false,showColorIcon:m=false,renderOption:y,searchEnabled:v=true,dropdownDirection:d="down",placeholder:g="Select...",name:k,noResultsText:h="No results found"},w)=>{let[N,V]=I__namespace.useState(false),[L,S]=I__namespace.useState(false),[D,z]=I__namespace.useState(""),[x,R]=I__namespace.useState(-1),[H,Le]=I__namespace.useState({top:0,left:0,width:0}),[Me,ge]=I__namespace.useState(false),Ie=I__namespace.useRef(null),Ve=I__namespace.useRef(null),Ae=I__namespace.useRef(null),je=`${k}-listbox`,Mt=p.find(u=>u.value===l),Z=p.filter(u=>u.label.toLowerCase().includes(D.toLowerCase())),It={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[b],Be=!!o;I__namespace.useEffect(()=>{ge(true);},[]);let ne=I__namespace.useCallback(()=>{if(Ve.current){let u=Ve.current.getBoundingClientRect();Le({top:d==="down"?u.bottom+4:u.top-4,left:u.left,width:u.width});}},[d]);I__namespace.useEffect(()=>(L&&(ne(),window.addEventListener("scroll",ne,true),window.addEventListener("resize",ne)),()=>{window.removeEventListener("scroll",ne,true),window.removeEventListener("resize",ne);}),[L,ne]),I__namespace.useEffect(()=>{let u=j=>{Ie.current&&!Ie.current.contains(j.target)&&Ae.current&&!Ae.current.contains(j.target)&&(S(false),z(""));};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]),I__namespace.useEffect(()=>{L&&R(0);},[L,D]);let Vt=()=>{V(true);},At=()=>{V(false);},qe=u=>jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[m&&u?.iconColor&&jsxRuntime.jsx(lucideReact.Circle,{size:18,style:{color:u.iconColor,fill:u.iconColor},className:e("rounded-full",{"border border-gray-400":u.iconColor==="#FFFFFF"})}),u?.label||g]}),Bt=u=>{if(!L){(u.key==="ArrowDown"||u.key==="Enter"||u.key===" ")&&(S(true),u.preventDefault());return}u.key==="ArrowDown"?(R(j=>Math.min(j+1,Z.length-1)),u.preventDefault()):u.key==="ArrowUp"?(R(j=>Math.max(j-1,0)),u.preventDefault()):u.key==="Enter"?(Z[x]&&(c?.(Z[x].value),S(false),z("")),u.preventDefault()):u.key==="Escape"&&(S(false),z(""),u.preventDefault());},Ft=jsxRuntime.jsx(react.AnimatePresence,{children:L&&jsxRuntime.jsxs(react.motion.div,{ref:Ae,initial:{opacity:0,y:d==="down"?-10:10},animate:{opacity:1,y:0},exit:{opacity:0,y:d==="down"?-10:10},transition:{duration:.15,ease:"easeOut"},id:je,role:"listbox","aria-activedescendant":x>=0&&Z[x]?`${k}-option-${Z[x].value}`:void 0,tabIndex:-1,style:{position:"fixed",top:d==="down"?`${H.top}px`:"auto",bottom:d==="up"?`${window.innerHeight-H.top}px`:"auto",left:`${H.left}px`,width:`${H.width}px`,zIndex:9999},className:e("bg-surface-elevated","border-2 border-primary rounded-lg shadow-2xl overflow-hidden"),children:[v&&jsxRuntime.jsx("input",{type:"text",placeholder:"Search...",className:"w-full px-4 py-2 border-b border-input-border outline-none bg-surface-elevated text-foreground",value:D,onChange:u=>z(u.target.value),"aria-label":"Search options",onClick:u=>u.stopPropagation()}),jsxRuntime.jsx("ul",{className:"max-h-60 overflow-y-auto w-full bg-surface-elevated",children:Z.length>0?Z.map((u,j)=>jsxRuntime.jsx("li",{id:`${k}-option-${u.value}`,role:"option","aria-selected":u.value===l,tabIndex:0,onClick:()=>{c?.(u.value),S(false),z("");},onMouseEnter:()=>R(j),className:e("px-4 py-2 w-full cursor-pointer hover:bg-primary/10 flex items-center gap-2 transition-colors",u.value===l&&"bg-primary/10 font-semibold",x===j&&"bg-primary/20"),children:y?y(u,u.value===l):qe(u)},u.value)):jsxRuntime.jsx("li",{className:"px-4 py-2 text-sm text-foreground-tertiary italic",children:h})})]},"dropdown")});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:e("space-y-2",It),ref:Ie,children:[n&&jsxRuntime.jsx("label",{htmlFor:k,className:"block text-sm font-medium text-foreground",children:n}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:N?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[a&&jsxRuntime.jsx(a,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200 pointer-events-none",N?"text-primary":"text-foreground-tertiary",Be&&"text-error")}),jsxRuntime.jsxs("button",{type:"button",ref:u=>{Ve.current=u,typeof w=="function"?w(u):w&&(w.current=u);},id:k,name:k,disabled:f||i,"aria-haspopup":"listbox","aria-expanded":L,"aria-controls":je,onClick:()=>!i&&S(!L),onFocus:Vt,onBlur:At,onKeyDown:Bt,className:e(gt({variant:r,size:s,hasError:Be,className:t}),{"pl-3":!a,"pl-10":a,"pr-10":true}),children:[qe(Mt),jsxRuntime.jsx(lucideReact.ChevronDown,{size:18,className:e("absolute right-3 top-1/2 transform -translate-y-1/2 transition-all duration-200 pointer-events-none",L&&"rotate-180",N?"text-primary":"text-foreground-tertiary",Be&&"text-error")})]})]}),o&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:o})]})]}),Me&&reactDom.createPortal(Ft,document.body)]})});Pe.displayName="Select";var bt=classVarianceAuthority.cva("flex items-center justify-center min-w-[120px] rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-background-secondary text-foreground hover:bg-background border-2 border-transparent focus:border-primary focus:ring-primary/20",primary:"bg-primary text-white hover:bg-primary-hover focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:ring-primary/20"},size:{sm:"h-8 px-2 text-sm gap-1",md:"h-10 px-2.5 text-base gap-2",lg:"h-12 px-3 text-lg gap-2"}},defaultVariants:{variant:"default",size:"md"}}),Fa=I__namespace.forwardRef(({currentPage:t,totalPages:r,onPageChange:s,itemsPerPage:n=10,onItemsPerPageChange:a,previousLabel:o="Previous",nextLabel:l="Next",rowsLabel:c="Rows:",previousAriaLabel:p="Go to previous page",nextAriaLabel:b="Go to next page",showItemsPerPage:f=true,itemsPerPageOptions:i=[10,25,50,100],showPageInfo:m=true,pageInfoTemplate:y="Page {current} of {total}",showIcons:v=true,variant:d,size:g,className:k},h)=>{let w=i.map(S=>({label:S.toString(),value:S})),N=y.replace("{current}",t.toString()).replace("{total}",r.toString()),V=()=>{t>1&&s(t-1);},L=()=>{t<r&&s(t+1);};return jsxRuntime.jsxs("div",{ref:h,className:e("flex flex-col items-center justify-between gap-4 md:flex-row",k),children:[m&&jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:N}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[f&&a&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-foreground",children:c}),jsxRuntime.jsx(Pe,{value:n,onChange:S=>a(S),options:w,size:g,variant:d==="primary"||d===null?"default":d,dropdownDirection:"up",searchEnabled:false,width:"lg"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("button",{onClick:V,disabled:t===1,className:e(bt({variant:d,size:g})),"aria-label":p,children:[v&&jsxRuntime.jsx(lucideReact.ChevronLeft,{size:16}),o]}),jsxRuntime.jsxs("button",{onClick:L,disabled:t===r,className:e(bt({variant:d,size:g})),"aria-label":b,children:[l,v&&jsxRuntime.jsx(lucideReact.ChevronRight,{size:16})]})]})]})]})});Fa.displayName="Pagination";function Ce({isFlipped:t,setIsFlipped:r,onCardClick:s,productImage:n,fallbackImage:a,productCondition:o,brand:l,name:c,description:p,price:b,color:f,isExchangeable:i,isStoreProduct:m,hasOffer:y,offerPrice:v,onAddToCart:d,onExchange:g,addToCartAriaLabel:k="Add to cart",exchangeAriaLabel:h="Exchange product",offerLabel:w="Price Drop",localeString:N="es-CL",addToCartLabel:V="Agregar al carrito",exchangeLabel:L="Intercambiar",interests:S=["exchange interest1","exchange interest2","exchange interest3"]}){let D={NEW:"bg-green-500 text-white",OPEN_BOX:"bg-blue-400 text-white",LIKE_NEW:"bg-emerald-400 text-white",FAIR:"bg-yellow-400 text-gray-900",POOR:"bg-red-500 text-white",FOR_PARTS:"bg-gray-500 text-white",REFURBISHED:"bg-purple-500 text-white"},z=x=>x&&D[x]||"bg-gray-300 text-gray-700";return jsxRuntime.jsxs("div",{className:e("card-flip-front","bg-white dark:bg-stone-800","rounded-xl shadow-md","border border-gray-200/60 dark:border-stone-700/60","overflow-hidden","hover:shadow-xl","hover:border-primary/40","dark:hover:border-primary/50","transition-all duration-300","group"),children:[jsxRuntime.jsxs("figure",{className:e("relative","aspect-[4/3]","bg-gradient-to-br from-gray-100 to-gray-50","dark:from-stone-700 dark:to-stone-800","overflow-hidden"),children:[jsxRuntime.jsx("div",{className:e("absolute inset-0","opacity-0","group-hover:opacity-100","bg-gradient-to-t from-black/20 to-transparent","transition-opacity","duration-300","pointer-events-none","z-[1]")}),jsxRuntime.jsx("div",{className:e("relative","w-full","h-full","group-hover:scale-105","transition-transform","duration-500"),children:n||a}),m?y?jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2","bg-red-500","text-white","backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:w}):null:jsxRuntime.jsx("span",{className:e("absolute","bottom-2","left-2",z(o),"backdrop-blur-md","text-[10px]","font-semibold","px-2.5","py-1","rounded-lg","capitalize","shadow-md","border","border-white/50","dark:border-stone-700/50"),children:o}),jsxRuntime.jsx("button",{onClick:x=>{x.stopPropagation(),r(!t);},className:e("absolute","top-2","right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","backdrop-blur-sm","border","border-gray-200/50","dark:border-stone-600/50","z-[2]"),"aria-label":"Ver impacto ambiental",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})})]}),jsxRuntime.jsxs("div",{className:"p-3.5",onClick:s,children:[jsxRuntime.jsxs("header",{className:e("flex","items-center","justify-between","gap-2","mb-2"),children:[jsxRuntime.jsx("span",{className:e("text-gray-500","dark:text-stone-400","text-[10px]","font-medium","uppercase","tracking-wide","truncate"),children:l}),f&&jsxRuntime.jsx("span",{className:e("text-gray-400","dark:text-stone-500","text-[10px]","font-medium","truncate","max-w-[60px]"),children:f})]}),jsxRuntime.jsx("h3",{className:e("font-semibold","text-sm","text-gray-900","dark:text-stone-50","line-clamp-1","mb-1.5","group-hover:text-primary","dark:group-hover:text-primary-hover","transition-colors","duration-200"),children:c}),jsxRuntime.jsx("p",{className:e("text-gray-600","dark:text-stone-400","text-xs","line-clamp-1","mb-3","leading-relaxed"),children:p}),jsxRuntime.jsxs("footer",{className:e("flex","flex-col","items-start","justify-between","gap-2"),children:[m&&y&&!i&&jsxRuntime.jsxs("div",{className:"flex items-center justify-center gap-1",children:[jsxRuntime.jsxs("span",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",v?.toLocaleString(N)]}),jsxRuntime.jsxs("span",{className:"text-sm text-gray-500 line-through",children:["$",b?.toLocaleString(N)]})]})," ",(!m||!y)&&!i&&jsxRuntime.jsxs("p",{className:"text-primary dark:text-primary-hover font-bold text-xl",children:["$",b?.toLocaleString(N)]}),i&&S&&jsxRuntime.jsx("div",{className:e("flex","items-center","gap-2","mb-2","overflow-x-auto","scroll-smooth","snap-x","snap-mandatory","px-3","flex-nowrap","w-full","scrollbar-hide"),style:{WebkitOverflowScrolling:"touch"},tabIndex:0,role:"list","aria-label":"Interests",children:S.map((x,R)=>jsxRuntime.jsx("span",{role:"listitem",className:e("inline-flex","items-center","flex-shrink-0","snap-start","text-[10px]","whitespace-nowrap","px-2","py-1","rounded-full","bg-gray-100","dark:bg-stone-700","text-gray-800","dark:text-stone-100","font-medium"),children:x},R))}),m&&!i&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":k,rightIcon:lucideReact.ShoppingCart,onClick:x=>{x.stopPropagation(),d?.();},children:V}),i&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":h,rightIcon:lucideReact.IterationCw,onClick:x=>{x.stopPropagation(),g?.();},children:L})," ",!i&&!m&&jsxRuntime.jsx(se,{variant:"primary",size:"sm",fullWidth:true,"aria-label":k,rightIcon:lucideReact.ShoppingCart,onClick:x=>{x.stopPropagation(),d?.();},children:V})]})]})]})}function Re({isFlipped:t,setIsFlipped:r,setShowImpactModal:s,environmentalImpact:n,sellerName:a,sellerPhone:o,sellerAddress:l,impactLabel:c="Environmental Impact",materialsLabel:p="Materials:",viewMoreLabel:b="View Full Impact",sellerLabel:f="Seller Information",co2Label:i="CO\u2082 Saved",waterLabel:m="Water Saved"}){let y=g=>g>50?{level:"High",color:"success",width:"100%"}:g>20?{level:"Medium",color:"warning",width:"66%"}:{level:"Low",color:"info",width:"33%"},v=(()=>{if(n){if(Array.isArray(n)){let g=n.map(w=>{let N=w,V=N.material?.materialType??N.materialType??"Material",L=N.material?.percentage??N.percentage??0,S=N.quantity??N.weightKG??0,D=N.material?.estimatedCo2SavingsKG??N.co2SavingsKG??0,z=N.material?.estimatedWaterSavingsLT??N.waterSavingsLT??0;return {materialType:V,percentage:L,weightKG:S,co2SavingsKG:D,waterSavingsLT:z}}),k=g.reduce((w,N)=>w+(N.co2SavingsKG||0),0),h=g.reduce((w,N)=>w+(N.waterSavingsLT||0),0);return {totalCo2SavingsKG:k,totalWaterSavingsLT:h,materialBreakdown:g}}return n}})(),d=v?y(v.totalCo2SavingsKG):null;return jsxRuntime.jsx("div",{className:e("card-flip-back","bg-gradient-to-br from-white via-emerald-50/20 to-white","dark:from-stone-800 dark:via-stone-850 dark:to-stone-900","border-2 border-gray-200/60","dark:border-stone-700/50"),children:jsxRuntime.jsxs("div",{className:e("py-4","px-4","w-full","h-full","flex","flex-col","overflow-y-auto","scrollbar-hide","relative"),children:[jsxRuntime.jsx("button",{onClick:g=>{g.stopPropagation(),r(!t);},className:e("absolute top-2 right-2","bg-white/90","dark:bg-stone-800/90","hover:bg-primary","dark:hover:bg-primary","backdrop-blur-md","text-gray-700","dark:text-stone-200","hover:text-white","p-1.5","rounded-lg","shadow-lg","transition-all","duration-200","hover:scale-110","z-10","border","border-gray-200/50","dark:border-stone-600/50"),"aria-label":"Ver producto",children:jsxRuntime.jsx(lucideReact.RotateCcw,{className:"w-3.5 h-3.5"})}),n&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-between mb-0.5",children:jsxRuntime.jsxs("h4",{className:e("font-bold","text-gray-900","dark:text-stone-100","text-xs","flex","items-center","gap-1.5"),children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3.5 h-3.5 text-success"}),c]})}),jsxRuntime.jsx("div",{className:"mb-3",children:d&&jsxRuntime.jsx("span",{className:e("text-[9px]","font-semibold","px-2","py-0.5","rounded-full",`bg-${d.color}/15`,`text-${d.color}`,"border",`border-${d.color}/30`),children:d.level})}),jsxRuntime.jsx("div",{className:e("mb-2.5","bg-gray-200/60","dark:bg-stone-700/50","rounded-full","h-1","overflow-hidden"),children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-success to-success/70","rounded-full","transition-all","duration-1000"),style:{width:d?.width||"0%"}})}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2.5",children:[jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-success/8 to-transparent","dark:from-success/15 dark:to-transparent","rounded-lg","p-1.5","border","border-success/20","dark:border-success/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Leaf,{className:"w-3 h-3 text-success"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:i})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-success",children:[v?.totalCo2SavingsKG," kg"]})]}),jsxRuntime.jsxs("div",{className:e("bg-gradient-to-br from-info/8 to-transparent","dark:from-info/15 dark:to-transparent","rounded-lg","p-1.5","border","border-info/20","dark:border-info/30"),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[jsxRuntime.jsx(lucideReact.Droplets,{className:"w-3 h-3 text-info"}),jsxRuntime.jsx("span",{className:"text-[9px] text-gray-600 dark:text-stone-400 font-medium",children:m})]}),jsxRuntime.jsxs("p",{className:"text-sm font-bold text-info",children:[v?.totalWaterSavingsLT," L"]})]})]}),v&&v.materialBreakdown.length>0&&jsxRuntime.jsxs("div",{className:e("bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[jsxRuntime.jsx("p",{className:"text-[9px] font-semibold text-gray-700 dark:text-stone-300 mb-2",children:p}),jsxRuntime.jsx("div",{className:"space-y-2",children:v.materialBreakdown.slice(0,2).map((g,k)=>jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between text-[9px]",children:[jsxRuntime.jsx("span",{className:"text-gray-700 dark:text-stone-300 font-medium truncate",children:g.materialType}),jsxRuntime.jsxs("span",{className:"font-bold text-primary dark:text-primary ml-1",children:[g.percentage.toFixed(1),"%"]})]}),jsxRuntime.jsx("div",{className:"bg-gray-200 dark:bg-stone-700 rounded-full h-1 overflow-hidden",children:jsxRuntime.jsx("div",{className:e("h-full","bg-gradient-to-r from-primary to-primary-hover","rounded-full","transition-all","duration-500"),style:{width:`${g.percentage}%`}})})]},k))}),jsxRuntime.jsxs("button",{onClick:g=>{g.stopPropagation(),s(true);},className:e("w-full","mt-2.5","py-1.5","px-3","bg-primary/5","hover:bg-primary/10","dark:bg-primary/10","dark:hover:bg-primary/15","text-primary","dark:text-primary-hover","rounded-lg","text-[9px]","font-semibold","transition-all","duration-200","flex","items-center","justify-center","gap-1","border","border-primary/20","hover:border-primary/30","group/viewmore"),children:[b,jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-3 h-3 group-hover/viewmore:translate-x-0.5 transition-transform duration-200"})]})]})]}),jsxRuntime.jsxs("div",{className:"mt-auto pt-3 border-t border-gray-200/60 dark:border-stone-700/50",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3.5 h-3.5 text-primary"}),jsxRuntime.jsx("h4",{className:"font-bold text-gray-900 dark:text-stone-100 text-xs",children:f})]}),jsxRuntime.jsxs("div",{className:e("space-y-1.5","bg-gray-50/80","dark:bg-stone-800/50","rounded-lg","p-2.5","border","border-gray-200/50","dark:border-stone-700/50"),children:[a&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.UserRound,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:a})]}),o&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.Phone,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:o})]}),l&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-gray-700 dark:text-stone-300 text-[9px] font-medium",children:[jsxRuntime.jsx(lucideReact.MapPin,{className:"w-3 h-3 flex-shrink-0 text-gray-400 dark:text-stone-500"}),jsxRuntime.jsx("span",{className:"truncate",children:l})]})]})]})]})})}function kt({product:t}){let[r,s]=I.useState(false),[n,a]=I.useState(false),{images:o,price:l,name:c,brand:p,color:b,description:f,seller:i}=t,m="hasOffer"in t,y=!!t.hasOffer,v=t.offerPrice,d=t.environmentalImpact,g=t.productCategory?.materials;return jsxRuntime.jsxs("article",{className:e("flex-shrink-0","w-[220px]","h-[350px]","card-flip-perspective"),children:[jsxRuntime.jsxs("div",{className:e("card-flip-inner",r?"card-flip-flipped":""),children:[jsxRuntime.jsx(Ce,{isFlipped:r,setIsFlipped:s,productImage:o&&o.length>0?jsxRuntime.jsx("img",{src:o[0],alt:c}):null,price:l,name:c,brand:p,productCondition:t.condition,color:b,description:f,isExchangeable:!m&&t.isExchangeable,isStoreProduct:m,hasOffer:y,offerPrice:v,fallbackImage:"https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?w=800&q=60&auto=format&fit=crop",onCardClick:()=>{},onAddToCart:()=>{},onExchange:()=>{}}),jsxRuntime.jsx(Re,{isFlipped:r,setIsFlipped:s,setShowImpactModal:a,environmentalImpact:d??g,sellerName:i?.profile?.firstName,sellerPhone:i?.phone,sellerAddress:i?.address})]}),d&&jsxRuntime.jsx(we,{isOpen:n,onClose:()=>a(false),environmentalImpact:d})]})}function Pt({icon:t,mainText:r,description:s}){return jsxRuntime.jsx("article",{className:"inline-flex p-4 shadow-md flex-col items-center justify-center min-w-40 rounded-lg bg-white dark:bg-stone-900",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-primary/10 text-primary mb-4",children:jsxRuntime.jsx(t,{className:"w-5 h-5"})}),jsxRuntime.jsx("h3",{className:"text-2xl font-bold text-gray-900 dark:text-stone-100 mb-1",children:r}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-stone-400 text-center",children:s})]})})}var Rt=classVarianceAuthority.cva("w-full table-auto border-collapse",{variants:{variant:{default:"",outlined:"border border-border rounded-lg overflow-hidden"},size:{sm:"text-sm",md:"text-base",lg:"text-lg"},striped:{true:""},hover:{true:""}},defaultVariants:{variant:"default",size:"md"}}),Et=I__namespace.forwardRef(({columns:t,data:r,rowKey:s,className:n,variant:a,size:o,striped:l,hover:c,emptyMessage:p="No data",...b},f)=>{let i=react.motion.div;return jsxRuntime.jsx(i,{ref:f,className:e("w-full overflow-auto",n),initial:{opacity:0,y:-6},whileInView:{opacity:1,y:0},viewport:{once:true},transition:{duration:.35},...b,children:jsxRuntime.jsxs("table",{className:e(Rt({variant:a,size:o})),role:"table",children:[jsxRuntime.jsx("thead",{className:"bg-primary text-white",children:jsxRuntime.jsx("tr",{children:t.map(m=>jsxRuntime.jsx("th",{className:e("text-left px-4 py-2 font-medium text-white",m.className),children:m.header},m.key))})}),jsxRuntime.jsx("tbody",{children:r.length===0?jsxRuntime.jsx("tr",{children:jsxRuntime.jsx("td",{className:"px-4 py-6 text-center text-text-muted",colSpan:t.length,children:p})}):r.map((m,y)=>{let v=s?s(m):m.id??y;return jsxRuntime.jsx("tr",{className:e(l&&y%2===1?"bg-neutral/5 dark:bg-stone-800/40":"",c?"hover:bg-neutral/5 dark:hover:bg-stone-800/50":""),children:t.map(d=>{let g=m[d.key];return jsxRuntime.jsx("td",{className:"px-4 py-3 align-top",children:d.render?d.render(g,m):String(g??"")},d.key)})},String(v))})})]})})});Et.displayName="Table";var Ua=Et;var Qa=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder resize-none",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},textSize:{sm:"text-sm py-2 px-3 min-h-[80px]",md:"text-base py-3 px-3 min-h-[120px]",lg:"text-lg py-4 px-4 min-h-[160px]"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",textSize:"md",hasError:false}}),Ya=I__namespace.forwardRef(({className:t,variant:r,textSize:s,label:n,errorMessage:a,showCharCount:o=false,width:l="full",disabled:c=false,readOnly:p=false,maxLength:b,value:f="",name:i,id:m,...y},v)=>{let[d,g]=I__namespace.useState(false),k=!!a,h=String(f).length,w={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[l],N=I__namespace.useId(),V=m||i||`textarea-${N}`;return jsxRuntime.jsxs("div",{className:e("space-y-2",w),children:[n&&jsxRuntime.jsx("label",{htmlFor:V,className:"block text-sm font-medium text-foreground",children:n}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(react.motion.div,{initial:false,animate:{scale:d?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:jsxRuntime.jsx("textarea",{ref:v,id:V,name:i,value:f,disabled:c,readOnly:p,maxLength:b,onFocus:()=>g(true),onBlur:()=>g(false),className:e(Qa({variant:r,textSize:s,hasError:k,className:t})),...y})}),o&&b&&jsxRuntime.jsxs("div",{className:"mt-1 text-xs text-foreground-tertiary text-right",children:[h," / ",b]})]}),a&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-xs text-error",children:a})]})});Ya.displayName="Textarea";var Tt=classVarianceAuthority.cva("w-full rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 placeholder:text-input-placeholder",{variants:{variant:{default:"bg-input-bg border-2 border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:ring-primary/20",filled:"bg-background-secondary border-2 border-transparent hover:bg-background-tertiary focus:bg-input-bg focus:border-input-border-focus focus:ring-primary/20",outline:"bg-transparent border-2 border-primary text-foreground hover:bg-primary/5 focus:bg-primary/5 focus:border-primary-active focus:ring-primary/20"},size:{sm:"h-9 text-sm",md:"h-11 text-base",lg:"h-14 text-lg"},hasError:{true:"border-error focus:border-error focus:ring-error/20"}},defaultVariants:{variant:"default",size:"md",hasError:false}}),Lt=I__namespace.forwardRef(({className:t,variant:r,size:s,hasError:n,label:a,leftIcon:o,errorMessage:l,type:c="text",width:p="full",id:b,name:f,disabled:i,onFocus:m,onBlur:y,...v},d)=>{let[g,k]=I__namespace.useState(false),[h,w]=I__namespace.useState(false),N={sm:"w-1/3",md:"w-1/2",lg:"w-2/3",full:"w-full"}[p],V=c==="password",L=V&&h?"text":c,S=n||!!l,D=R=>{k(true),m?.(R);},z=R=>{k(false),y?.(R);},x=()=>{w(R=>!R);};return jsxRuntime.jsxs("div",{className:e("space-y-2",N),children:[a&&jsxRuntime.jsx("label",{htmlFor:b||f,className:"block text-sm font-medium text-foreground",children:a}),jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsxs(react.motion.div,{initial:false,animate:{scale:g?1.002:1},transition:{type:"spring",stiffness:400,damping:17},className:"relative",children:[o&&jsxRuntime.jsx(o,{className:e("absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 transition-colors duration-200",g?"text-primary":"text-foreground-tertiary",S&&"text-error")}),jsxRuntime.jsx("input",{ref:d,id:b||f,name:f,type:L,disabled:i,onFocus:D,onBlur:z,className:e(Tt({variant:r,size:s,hasError:S,className:t}),{"pl-3":!o,"pl-10":o,"pr-10":V,"pr-3":!V}),...v}),V&&jsxRuntime.jsx("button",{type:"button",onClick:x,disabled:i,className:e("absolute right-3 top-1/2","transform","-translate-y-1/2","text-foreground-tertiary","hover:text-foreground-secondary","transition-colors","duration-200","disabled:opacity-50","disabled:cursor-not-allowed"),tabIndex:-1,children:jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:h?jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.EyeOff,{className:"w-5 h-5"})},"eye-off"):jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.15},children:jsxRuntime.jsx(lucideReact.Eye,{className:"w-5 h-5"})},"eye")})})]}),l&&jsxRuntime.jsx(react.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{duration:.2},className:"mt-1 text-xs text-error",children:l})]})]})});Lt.displayName="TextInput";
|
|
2
2
|
exports.AdBanner=Kt;exports.Banner=et;exports.Button=se;exports.Card=ot;exports.CardBackSide=Re;exports.CardFrontSide=Ce;exports.Carousel=it;exports.Checkbox=ra;exports.EnvironmentalImpactModal=we;exports.Footer=lt;exports.HeroCarousel=ct;exports.Modal=he;exports.Navbar=ft;exports.Pagination=Fa;exports.ProductCard=kt;exports.Select=Pe;exports.StatsCard=Pt;exports.Table=Ua;exports.Text=ke;exports.TextInput=Lt;exports.Textarea=Ya;exports.Title=De;exports.bannerVariants=Ze;exports.buttonVariants=at;exports.checkboxVariants=aa;exports.cn=e;exports.inputVariants=Tt;exports.paginationButtonVariants=bt;exports.selectVariants=gt;exports.tableVariants=Rt;exports.textVariants=ha;exports.textareaVariants=Qa;exports.titleVariants=xa;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|