/* global React */ const { useState, useEffect, useRef } = React; /* ============================ Íconos (line) ============================ */ function Icon({ name, size = 22, stroke = 2 }) { const p = { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: stroke, strokeLinecap: "round", strokeLinejoin: "round", }; const paths = { home: <>, grid: <>, cart: <>, search: <>, user: <>, chat: <>, filter: <>, chevR: , chevL: , chevD: , x: <>, check: , plus: <>, minus: , truck: <>, store: <>, spark: , drop: , ruler: <>, info: <>, star: , phone: , brush: <>, shield: <>, arrowL: <>, pin: <>, card: <>, clock: <>, layers: <>, send: , }; return ; } /* ============================ Botón ============================ */ function Button({ variant = "primary", size, block, icon, iconRight, children, ...rest }) { const cls = ["btn", `btn--${variant}`, size && `btn--${size}`, block && "btn--block"].filter(Boolean).join(" "); return ( ); } /* ============================ Badge / Tag ============================ */ function Badge({ tone = "neutral", icon, children }) { return {icon && }{children}; } /* ============================ Stepper de cantidad ============================ */ function QtyStepper({ value, onChange, min = 1 }) { return (
{value}
); } const btnQty = { width: 38, height: 38, display: "grid", placeItems: "center", background: "transparent", border: "none" }; /* ============================ Swatch + Grid ============================ */ function Swatch({ color, active, onClick }) { return ( ); } function SwatchGrid({ colors, activeHex, onSelect }) { return (
{colors.map((c) => ( onSelect(c)} /> ))}
); } /* ============================ Selector de presentación ============================ */ function PresentationSelector({ options, value, onChange, product }) { return (
{options.map((p) => ( ))}
); } /* ============================ Lata "renderizada" (color real) ============================ */ function CanVisual({ hex = "#0077b6", label = "Nogopaint", sub = "" }) { // contraste de la etiqueta segun el color return (