UNPKG

@camtom/nyx-design-system

Version:

Nyx Design System - Sistema de diseño profesional para React con TypeScript, componentes accesibles y documentación completa

711 lines (674 loc) 81.7 kB
import 'bootstrap-icons/font/bootstrap-icons.css'; import { jsxs, jsx, Fragment } from 'react/jsx-runtime'; import * as b from 'react'; import b__default, { forwardRef, useState, useRef, useCallback, useEffect } from 'react'; import ReactDOM from 'react-dom'; var styles$h = {"button":"Button-module_button__2ZuB7","primary":"Button-module_primary__s1sM6","secondary":"Button-module_secondary__R0waJ","subtle":"Button-module_subtle__4khvE","icon-ghost":"Button-module_icon-ghost__hlOA-","dark":"Button-module_dark__-G-rE","danger":"Button-module_danger__V4fX8","outline":"Button-module_outline__F5jq-","small":"Button-module_small__l39oh","medium":"Button-module_medium__KTxdk","large":"Button-module_large__6bsb7","default":"Button-module_default__RgsIK","pill":"Button-module_pill__lx8lt","fullWidth":"Button-module_fullWidth__36oJT","loading":"Button-module_loading__EQAt2","contentHidden":"Button-module_contentHidden__4lBQL","spinnerWrapper":"Button-module_spinnerWrapper__BS2QN","spinner":"Button-module_spinner__ZExvW","spin":"Button-module_spin__JvkZu","leftIcon":"Button-module_leftIcon__aT0iS","rightIcon":"Button-module_rightIcon__7Nqrl","icon":"Button-module_icon__-43u5","slideContainer":"Button-module_slideContainer__-kI0K","slider":"Button-module_slider__qCrwI","slideLeft":"Button-module_slideLeft__2rH9d","slideRight":"Button-module_slideRight__AaNKU","labelsContainer":"Button-module_labelsContainer__BDwfg","activeLabel":"Button-module_activeLabel__pGVs-","inactiveLabel":"Button-module_inactiveLabel__79ZvK","compactToggleContainer":"Button-module_compactToggleContainer__luJgd","compactToggleText":"Button-module_compactToggleText__8Z7Hm","compactToggleTextActive":"Button-module_compactToggleTextActive__WEXL2","compactToggleTextInactive":"Button-module_compactToggleTextInactive__-uJjh","compactToggleSwitch":"Button-module_compactToggleSwitch__dVhT-","compactToggleSwitchActive":"Button-module_compactToggleSwitchActive__b3pk1","compactToggleSwitchInactive":"Button-module_compactToggleSwitchInactive__dE2JH","compactToggleThumb":"Button-module_compactToggleThumb__TjeQX","compactToggleThumbActive":"Button-module_compactToggleThumbActive__sm65Q","compactToggleThumbInactive":"Button-module_compactToggleThumbInactive__5v4RE","compactToggleCircleActive":"Button-module_compactToggleCircleActive__EXPJW","compactToggleCircleInactive":"Button-module_compactToggleCircleInactive__khvuM","slideContainerOutline":"Button-module_slideContainerOutline__rNW-g","slideContainerDark":"Button-module_slideContainerDark__TM7c3","slideContainerGradient":"Button-module_slideContainerGradient__lNQsq","slideContainerDarkInverse":"Button-module_slideContainerDarkInverse__6cNKh","compactToggleText--compactDark":"Button-module_compactToggleText--compactDark__xFUhp","compactToggleTextActive--compactDark":"Button-module_compactToggleTextActive--compactDark__DxQOi","compactToggleTextInactive--compactDark":"Button-module_compactToggleTextInactive--compactDark__I-SMW","compactToggleSwitch--compactDark":"Button-module_compactToggleSwitch--compactDark__SdwT2","compactToggleSwitchActive--compactDark":"Button-module_compactToggleSwitchActive--compactDark__3EMyg","compactToggleSwitchInactive--compactDark":"Button-module_compactToggleSwitchInactive--compactDark__nFImD","compactToggleThumb--compactDark":"Button-module_compactToggleThumb--compactDark__qDwFt","compactToggleThumbActive--compactDark":"Button-module_compactToggleThumbActive--compactDark__3CgAK","compactToggleThumbInactive--compactDark":"Button-module_compactToggleThumbInactive--compactDark__77bOY","compactToggleText--darkInverse":"Button-module_compactToggleText--darkInverse__iZagH","compactToggleTextActive--darkInverse":"Button-module_compactToggleTextActive--darkInverse__UOFSs","compactToggleTextInactive--darkInverse":"Button-module_compactToggleTextInactive--darkInverse__3U8RD","compactToggleSwitch--darkInverse":"Button-module_compactToggleSwitch--darkInverse__0V8CA","compactToggleSwitchActive--darkInverse":"Button-module_compactToggleSwitchActive--darkInverse__tg6uM","compactToggleSwitchInactive--darkInverse":"Button-module_compactToggleSwitchInactive--darkInverse__s09xn","compactToggleThumb--darkInverse":"Button-module_compactToggleThumb--darkInverse__gPqih","compactToggleThumbActive--darkInverse":"Button-module_compactToggleThumbActive--darkInverse__yPMaB","compactToggleThumbInactive--darkInverse":"Button-module_compactToggleThumbInactive--darkInverse__eESNU","compactToggleSwitchCustom":"Button-module_compactToggleSwitchCustom__xadBU","compactToggleSwitchCustomActive":"Button-module_compactToggleSwitchCustomActive__NVE-Z","compactToggleSwitchCustomInactive":"Button-module_compactToggleSwitchCustomInactive__QIWwW","compactToggleTextCustomActive":"Button-module_compactToggleTextCustomActive__85PHP","compactToggleTextCustomInactive":"Button-module_compactToggleTextCustomInactive__-TdLf"}; const Button = forwardRef(({ as: Component = 'button', variant = 'primary', size = 'medium', radius = 'default', colorScheme, isLoading = false, fullWidth = false, leftIcon, rightIcon, children, className: externalClassName = '', disabled, ...props }, ref) => { const classNames = [ styles$h.button, styles$h[variant], styles$h[size], styles$h[radius], variant === 'icon' && colorScheme ? styles$h[colorScheme] : '', fullWidth ? styles$h.fullWidth : '', isLoading ? styles$h.loading : '', externalClassName, ].filter(Boolean).join(' '); return (jsxs(Component, { ref: ref, className: classNames, disabled: isLoading || disabled, ...props, children: [leftIcon && jsx("span", { className: styles$h.leftIcon, children: leftIcon }), jsx("span", { className: isLoading ? styles$h.contentHidden : '', children: children }), rightIcon && jsx("span", { className: styles$h.rightIcon, children: rightIcon }), isLoading && (jsx("span", { className: styles$h.spinnerWrapper, children: jsx("span", { className: styles$h.spinner }) }))] })); }); Button.displayName = 'Button'; const SlideButton = ({ activeState, onToggle, leftLabel = 'Active', rightLabel = 'Inactive', leftIcon, rightIcon, className = '', variant = 'default', showCircle = false, showText = true, customColor, }) => { if (variant === 'compactCustom') { return (jsxs("div", { className: styles$h.compactToggleContainer, children: [showCircle && (jsx("i", { className: "bi bi-circle-fill", style: { color: activeState ? (customColor || '#333333') : '#6B7280', fontSize: '1rem' } })), showText && (jsx("span", { className: styles$h.compactToggleText, style: { color: activeState ? (customColor || '#333333') : '#6B7280', fontWeight: activeState ? 600 : 500, fontSize: '0.875rem' }, children: activeState ? leftLabel : rightLabel })), jsx("div", { className: styles$h.compactToggleSwitchCustom, onClick: onToggle, "data-testid": "slide-button-toggle", style: { backgroundColor: activeState ? (customColor || '#333333') : '#E5E7EB' }, children: jsx("div", { className: `${styles$h.compactToggleThumb} ${activeState ? styles$h.compactToggleThumbActive : styles$h.compactToggleThumbInactive}` }) })] })); } // Para las otras variantes compact: if (variant === 'compact') { return (jsxs("div", { className: styles$h.compactToggleContainer, children: [showCircle && (jsx("i", { className: `bi bi-circle-fill ${activeState ? styles$h.compactToggleCircleActive : styles$h.compactToggleCircleInactive}` })), jsx("span", { className: `${styles$h.compactToggleText} ${activeState ? styles$h.compactToggleTextActive : styles$h.compactToggleTextInactive}`, children: activeState ? leftLabel : rightLabel }), jsx("div", { className: `${styles$h.compactToggleSwitch} ${activeState ? styles$h.compactToggleSwitchActive : styles$h.compactToggleSwitchInactive}`, onClick: onToggle, "data-testid": "slide-button-toggle", style: variant === 'compact' && customColor ? { backgroundColor: activeState ? customColor : '#E5E7EB' } : undefined, children: jsx("div", { className: `${styles$h.compactToggleThumb} ${activeState ? styles$h.compactToggleThumbActive : styles$h.compactToggleThumbInactive}` }) })] })); } const variantClass = variant === 'gradient' ? styles$h.slideContainerGradient : variant === 'dark' ? styles$h.slideContainerDark : variant === 'outline' ? styles$h.slideContainerOutline : ''; console.log('Variant:', variant, 'Generated class:', `slideContainer${variant.charAt(0).toUpperCase() + variant.slice(1)}`, 'Class exists:', !!styles$h[`slideContainer${variant.charAt(0).toUpperCase() + variant.slice(1)}`]); return (jsxs("button", { type: "button", className: `${styles$h.slideContainer} ${variantClass} ${className}`, onClick: onToggle, "data-testid": "slide-button", children: [jsx("div", { className: `${styles$h.slider} ${variantClass} ${activeState ? styles$h.slideLeft : styles$h.slideRight}` }), jsxs("div", { className: styles$h.labelsContainer, children: [jsxs("span", { className: activeState ? styles$h.activeLabel : styles$h.inactiveLabel, children: [leftLabel, leftIcon] }), jsxs("span", { className: !activeState ? styles$h.activeLabel : styles$h.inactiveLabel, children: [rightLabel, rightIcon] })] })] })); }; var styles$g = {"flagsAlert":"FlagsAlert-module_flagsAlert__dsqtH","alertContainer":"FlagsAlert-module_alertContainer__sGOzS","alertHeader":"FlagsAlert-module_alertHeader__AIQox","alertTitle":"FlagsAlert-module_alertTitle__Q9JcQ","alertIcon":"FlagsAlert-module_alertIcon__rx1pI","titleText":"FlagsAlert-module_titleText__sLaSs","badge":"FlagsAlert-module_badge__-R1Sw","expandButton":"FlagsAlert-module_expandButton__jlLdW","chevronIcon":"FlagsAlert-module_chevronIcon__-hwkM","buttonText":"FlagsAlert-module_buttonText__rpZ-N","flagsDetails":"FlagsAlert-module_flagsDetails__z6Byg","expanded":"FlagsAlert-module_expanded__AvQR1","flagsList":"FlagsAlert-module_flagsList__Oer1q","flagItem":"FlagsAlert-module_flagItem__qQmp4","flagHeader":"FlagsAlert-module_flagHeader__nMfL4","flagBadge":"FlagsAlert-module_flagBadge__Aq58O","severityBadge":"FlagsAlert-module_severityBadge__gvXf7","severity-high":"FlagsAlert-module_severity-high__8wdmC","severity-medium":"FlagsAlert-module_severity-medium__X7MmZ","severity-low":"FlagsAlert-module_severity-low__kw7Ic","flagContent":"FlagsAlert-module_flagContent__lMoAF","flagName":"FlagsAlert-module_flagName__dvH-R","flagDescription":"FlagsAlert-module_flagDescription__xL9z-","slideDown":"FlagsAlert-module_slideDown__4wDS1","slideUp":"FlagsAlert-module_slideUp__RUhEn"}; const flagTypePriority = { ERROR: 3, INCONSISTENCY: 2, WARNING: 1 }; const flagTypeToBadgeClass = (t) => { if (t === 'ERROR') return 'bg-danger'; if (t === 'INCONSISTENCY') return 'bg-warning text-dark'; return 'bg-info'; }; const getHighestType = (flags) => { if (!flags || flags.length === 0) return undefined; return flags.slice().sort((a, b) => flagTypePriority[b.tipo_flag] - flagTypePriority[a.tipo_flag])[0].tipo_flag; }; const FlagsAlert = ({ flags, title = "Advertencias e Inconsistencias Detectadas", className = "" }) => { const [isExpanded, setIsExpanded] = useState(false); if (!flags || flags.length === 0) { return null; } const highestType = getHighestType(flags); const alertClass = highestType === 'ERROR' ? 'alert-danger' : highestType === 'INCONSISTENCY' ? 'alert-warning' : 'alert-info'; return (jsx("div", { className: `${styles$g.flagsAlert} ${className}`, children: jsxs("div", { className: `alert ${alertClass} ${styles$g.alertContainer}`, role: "alert", children: [jsxs("div", { className: styles$g.alertHeader, children: [jsxs("div", { className: styles$g.alertTitle, children: [jsx("i", { className: `fas fa-exclamation-triangle ${styles$g.alertIcon}` }), jsx("span", { className: styles$g.titleText, children: title }), jsx("span", { className: `badge ${flagTypeToBadgeClass(highestType || 'WARNING')} ${styles$g.badge}`, children: flags.length })] }), jsxs("button", { type: "button", className: `btn btn-sm ${styles$g.expandButton}`, onClick: () => setIsExpanded(!isExpanded), "aria-expanded": isExpanded, "aria-controls": "flags-details", children: [jsx("i", { className: `fas fa-chevron-${isExpanded ? 'up' : 'down'} ${styles$g.chevronIcon}` }), jsx("span", { className: styles$g.buttonText, children: isExpanded ? 'Ocultar' : 'Ver detalles' })] })] }), isExpanded && (jsx("div", { id: "flags-details", className: `${styles$g.flagsDetails} ${isExpanded ? styles$g.expanded : ''}`, children: jsx("div", { className: styles$g.flagsList, children: flags.map((flag, index) => (jsxs("div", { className: styles$g.flagItem, children: [jsxs("div", { className: styles$g.flagHeader, children: [jsx("span", { className: `badge ${flagTypeToBadgeClass(flag.tipo_flag)} ${styles$g.flagBadge}`, children: flag.tipo_flag }), jsx("span", { className: `badge ${styles$g.severityBadge} ${styles$g[`severity-${flag.severidad.toLowerCase()}`]}`, children: flag.severidad })] }), jsxs("div", { className: styles$g.flagContent, children: [jsx("strong", { className: styles$g.flagName, children: flag.nombre }), jsx("p", { className: styles$g.flagDescription, children: flag.descripcion })] })] }, index))) }) }))] }) })); }; const ImageLightbox = ({ isOpen, images, currentIndex, onClose, onPrevious, onNext, onImageSelect, onUploadImages, isUploading = false, showUploadButton = false }) => { if (!isOpen) return null; const handleFileUpload = () => { if (!onUploadImages) return; const input = document.createElement('input'); input.type = 'file'; input.multiple = true; input.accept = 'image/*'; input.onchange = async (event) => { const files = event.target.files; if (files && files.length > 0) { await onUploadImages(Array.from(files)); } }; input.click(); }; return (jsxs(Fragment, { children: [jsx("style", { children: ` .lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1050; } .lightbox-content { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 12px; max-width: 95vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; position: relative; } .btn-close-lightbox { position: absolute; top: 8px; right: 10px; background: transparent; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: #6c757d; } .lightbox-main { display: flex; align-items: center; justify-content: center; width: 100%; } .lightbox-thumbs { margin-top: 8px; width: 100%; display: flex; overflow-x: auto; padding-top: 4px; } .lightbox-upload-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e9ecef; display: flex; justify-content: center; align-items: center; gap: 8px; } ` }), jsx("div", { className: "lightbox-overlay", onClick: onClose, children: jsxs("div", { className: "lightbox-content", onClick: (e) => e.stopPropagation(), children: [jsx("button", { className: "btn-close-lightbox", onClick: onClose, "aria-label": "Cerrar", children: "\u00D7" }), jsxs("div", { className: "lightbox-main", children: [images.length > 0 ? (jsx("img", { src: images[currentIndex], alt: "Vista", style: { maxWidth: '90vw', maxHeight: '70vh', objectFit: 'contain', borderRadius: 8 } })) : (jsxs("div", { className: "d-flex flex-column align-items-center justify-content-center", style: { minHeight: '300px', color: '#6c757d' }, children: [jsx("i", { className: "bi bi-image", style: { fontSize: '4rem', marginBottom: '1rem' } }), jsx("h5", { children: "No hay im\u00E1genes" }), jsx("p", { className: "text-muted", children: "Sube im\u00E1genes para esta partida" })] })), images.length > 1 && (jsxs(Fragment, { children: [jsx("button", { className: "btn btn-sm btn-outline-secondary", style: { position: 'absolute', left: 10, top: '50%', transform: 'translateY(-50%)' }, onClick: onPrevious, "aria-label": "Anterior", children: jsx("i", { className: "bi bi-chevron-left" }) }), jsx("button", { className: "btn btn-sm btn-outline-secondary", style: { position: 'absolute', right: 10, top: '50%', transform: 'translateY(-50%)' }, onClick: onNext, "aria-label": "Siguiente", children: jsx("i", { className: "bi bi-chevron-right" }) })] }))] }), images.length > 0 && (jsx("div", { className: "lightbox-thumbs", children: images.map((url, i) => (jsx("img", { src: url, alt: `thumb-${i}`, onClick: () => onImageSelect(i), style: { width: 56, height: 56, objectFit: 'cover', borderRadius: 6, border: i === currentIndex ? '2px solid #0d6efd' : '1px solid #e9ecef', cursor: 'pointer', marginRight: 6 } }, `thumb-${i}`))) })), showUploadButton && onUploadImages && (jsxs("div", { className: "lightbox-upload-section", children: [jsx("button", { className: "btn btn-primary btn-sm", onClick: handleFileUpload, disabled: isUploading, style: { fontSize: '0.9rem' }, children: isUploading ? (jsxs(Fragment, { children: [jsx("i", { className: "bi bi-hourglass-split me-1" }), "Subiendo..."] })) : (jsxs(Fragment, { children: [jsx("i", { className: "bi bi-cloud-upload me-1" }), "Subir m\u00E1s im\u00E1genes"] })) }), jsx("small", { className: "text-muted", children: "JPG, PNG, GIF, WebP (m\u00E1x. 10MB)" })] }))] }) })] })); }; let e={data:""},t=t=>{if("object"==typeof window){let e=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return e.nonce=window.__nonce__,e.parentNode||(t||document.head).appendChild(e),e.firstChild}return t||e},l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n$1=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n$1," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n$1," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):false===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f$1,g;u.bind({g:1});let h$1=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f$1=r,g=l;}function w(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f$1&&f$1()},c),r.o=/ *go\d+/.test(s),c.className=u.apply(r,l)+(s?" "+s:"");let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return a}} var Z=e=>typeof e=="function",h=(e,t)=>Z(e)?e(t):e;var W=(()=>{let e=0;return ()=>(++e).toString()})(),E=(()=>{let e;return ()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches;}return e}})();var re=20,k="default";var H=(e,t)=>{let{toastLimit:o}=e.settings;switch(t.type){case 0:return {...e,toasts:[t.toast,...e.toasts].slice(0,o)};case 1:return {...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case 2:let{toast:s}=t;return H(e,{type:e.toasts.find(r=>r.id===s.id)?1:0,toast:s});case 3:let{toastId:a}=t;return {...e,toasts:e.toasts.map(r=>r.id===a||a===void 0?{...r,dismissed:true,visible:false}:r)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};case 5:return {...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return {...e,pausedAt:void 0,toasts:e.toasts.map(r=>({...r,pauseDuration:r.pauseDuration+i}))}}},v=[],j={toasts:[],pausedAt:void 0,settings:{toastLimit:re}},f={},Y=(e,t=k)=>{f[t]=H(f[t]||j,e),v.forEach(([o,s])=>{o===t&&s(f[t]);});},_=e=>Object.keys(f).forEach(t=>Y(e,t)),Q=e=>Object.keys(f).find(t=>f[t].toasts.some(o=>o.id===e)),S=(e=k)=>t=>{Y(t,e);};var ie=(e,t="blank",o)=>({createdAt:Date.now(),visible:true,dismissed:false,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...o,id:(o==null?void 0:o.id)||W()}),P=e=>(t,o)=>{let s=ie(t,e,o);return S(s.toasterId||Q(s.id))({type:2,toast:s}),s.id},n=(e,t)=>P("blank")(e,t);n.error=P("error");n.success=P("success");n.loading=P("loading");n.custom=P("custom");n.dismiss=(e,t)=>{let o={type:3,toastId:e};t?S(t)(o):_(o);};n.dismissAll=e=>n.dismiss(void 0,e);n.remove=(e,t)=>{let o={type:4,toastId:e};t?S(t)(o):_(o);};n.removeAll=e=>n.remove(void 0,e);n.promise=(e,t,o)=>{let s=n.loading(t.loading,{...o,...o==null?void 0:o.loading});return typeof e=="function"&&(e=e()),e.then(a=>{let i=t.success?h(t.success,a):void 0;return i?n.success(i,{id:s,...o,...o==null?void 0:o.success}):n.dismiss(s),a}).catch(a=>{let i=t.error?h(t.error,a):void 0;i?n.error(i,{id:s,...o,...o==null?void 0:o.error}):n.dismiss(s);}),e};var de=h$1` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,me=h$1` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,le=h$1` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,C=w("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#ff4b4b"}; position: relative; transform: rotate(45deg); animation: ${de} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${me} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${e=>e.secondary||"#fff"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${le} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `;var Te=h$1` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,F=w("div")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${e=>e.secondary||"#e0e0e0"}; border-right-color: ${e=>e.primary||"#616161"}; animation: ${Te} 1s linear infinite; `;var ge=h$1` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,he=h$1` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,L=w("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#61d345"}; position: relative; transform: rotate(45deg); animation: ${ge} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${he} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${e=>e.secondary||"#fff"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `;var be=w("div")` position: absolute; `,Se=w("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,Ae=h$1` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,Pe=w("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${Ae} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,$=({toast:e})=>{let{icon:t,type:o,iconTheme:s}=e;return t!==void 0?typeof t=="string"?b.createElement(Pe,null,t):t:o==="blank"?null:b.createElement(Se,null,b.createElement(F,{...s}),o!=="loading"&&b.createElement(be,null,o==="error"?b.createElement(C,{...s}):b.createElement(L,{...s})))};var Re=e=>` 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 100% {transform: translate3d(0,0,0) scale(1); opacity:1;} `,Ee=e=>` 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} `,ve="0%{opacity:0;} 100%{opacity:1;}",De="0%{opacity:1;} 100%{opacity:0;}",Oe=w("div")` display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; `,Ie=w("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,ke=(e,t)=>{let s=e.includes("top")?1:-1,[a,i]=E()?[ve,De]:[Re(s),Ee(s)];return {animation:t?`${h$1(a)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${h$1(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}};b.memo(({toast:e,position:t,style:o,children:s})=>{let a=e.height?ke(e.position||t||"top-center",e.visible):{opacity:0},i=b.createElement($,{toast:e}),r=b.createElement(Ie,{...e.ariaProps},h(e.message,e));return b.createElement(Oe,{className:e.className,style:{...a,...o,...e.style}},typeof s=="function"?s({icon:i,message:r}):b.createElement(b.Fragment,null,i,r))});m(b.createElement);u` z-index: 9999; > * { pointer-events: auto; } `;var zt=n; const ImageUpload = ({ onUpload, maxFiles = 10, maxSize = 10, acceptedTypes = ['image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/webp'], disabled = false, className = '' }) => { const [isDragging, setIsDragging] = useState(false); const [isUploading, setIsUploading] = useState(false); const fileInputRef = useRef(null); const validateFiles = useCallback((files) => { const fileArray = Array.from(files); const validFiles = []; if (fileArray.length > maxFiles) { zt.error(`Máximo ${maxFiles} archivos permitidos`); return []; } for (const file of fileArray) { // Check file type if (!acceptedTypes.includes(file.type)) { zt.error(`Tipo de archivo no válido: ${file.name}`); continue; } // Check file size if (file.size > maxSize * 1024 * 1024) { zt.error(`Archivo muy grande: ${file.name} (máximo ${maxSize}MB)`); continue; } validFiles.push(file); } return validFiles; }, [maxFiles, maxSize, acceptedTypes]); const handleFiles = useCallback(async (files) => { if (files.length === 0) return; setIsUploading(true); try { await onUpload(files); zt.success(`${files.length} imagen${files.length > 1 ? 'es' : ''} subida${files.length > 1 ? 's' : ''} correctamente`); } catch (error) { console.error('Error uploading files:', error); zt.error('Error al subir las imágenes'); } finally { setIsUploading(false); } }, [onUpload]); const handleFileInputChange = useCallback((e) => { const files = e.target.files; if (files) { const validFiles = validateFiles(files); if (validFiles.length > 0) { handleFiles(validFiles); } } // Reset input if (fileInputRef.current) { fileInputRef.current.value = ''; } }, [validateFiles, handleFiles]); const handleDrop = useCallback((e) => { e.preventDefault(); setIsDragging(false); if (disabled) return; const files = e.dataTransfer.files; if (files.length > 0) { const validFiles = validateFiles(files); if (validFiles.length > 0) { handleFiles(validFiles); } } }, [disabled, validateFiles, handleFiles]); const handleDragOver = useCallback((e) => { e.preventDefault(); if (!disabled) { setIsDragging(true); } }, [disabled]); const handleDragLeave = useCallback((e) => { e.preventDefault(); setIsDragging(false); }, []); const handleClick = useCallback(() => { if (!disabled && fileInputRef.current) { fileInputRef.current.click(); } }, [disabled]); return (jsxs("div", { className: `image-upload-container ${className}`, children: [jsx("style", { children: ` .image-upload-container { position: relative; } .image-upload-dropzone { border: 2px dashed #dee2e6; border-radius: 8px; padding: 20px; text-align: center; cursor: pointer; transition: all 0.3s ease; background-color: #f8f9fa; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; } .image-upload-dropzone:hover { border-color: #007bff; background-color: #e3f2fd; } .image-upload-dropzone.dragging { border-color: #007bff; background-color: #e3f2fd; transform: scale(1.02); } .image-upload-dropzone.disabled { opacity: 0.6; cursor: not-allowed; } .image-upload-dropzone.disabled:hover { border-color: #dee2e6; background-color: #f8f9fa; transform: none; } .image-upload-icon { font-size: 2rem; color: #6c757d; margin-bottom: 8px; } .image-upload-text { color: #6c757d; font-size: 0.9rem; margin-bottom: 4px; } .image-upload-hint { color: #adb5bd; font-size: 0.8rem; } .image-upload-input { display: none; } ` }), jsxs("div", { className: `image-upload-dropzone ${isDragging ? 'dragging' : ''} ${disabled ? 'disabled' : ''}`, onDrop: handleDrop, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onClick: handleClick, children: [jsx("div", { className: "image-upload-icon", children: jsx("i", { className: "bi bi-cloud-upload" }) }), jsx("div", { className: "image-upload-text", children: isUploading ? 'Subiendo imágenes...' : 'Arrastra imágenes aquí o haz clic para seleccionar' }), jsxs("div", { className: "image-upload-hint", children: ["M\u00E1ximo ", maxFiles, " archivos, ", maxSize, "MB cada uno"] }), jsx("div", { className: "image-upload-hint", children: "Formatos: JPG, PNG, GIF, WebP" })] }), jsx("input", { ref: fileInputRef, type: "file", multiple: true, accept: acceptedTypes.join(','), onChange: handleFileInputChange, className: "image-upload-input", disabled: disabled })] })); }; var styles$f = {"inputWrapper":"Input-module_inputWrapper__FIVsA","input":"Input-module_input__WjT81","default":"Input-module_default__a43-B","pill":"Input-module_pill__CT6xH","small":"Input-module_small__64a4F","medium":"Input-module_medium__2Ngfz","large":"Input-module_large__g7SQh","error":"Input-module_error__VLISa","inputWithIcon-right":"Input-module_inputWithIcon-right__dYz-g","inputWithIcon-left":"Input-module_inputWithIcon-left__-SCBF","icon-right":"Input-module_icon-right__ahy45","icon-left":"Input-module_icon-left__EpiP3","passwordToggle":"Input-module_passwordToggle__PpAOa","helperText":"Input-module_helperText__9eFmv","errorText":"Input-module_errorText__xz4xS"}; const Input = forwardRef(({ className: externalClassName, icon, iconPosition = 'right', variant = 'default', size = 'medium', error = false, helperText, showPasswordToggle = false, onPasswordToggle, type = 'text', ...props }, ref) => { const [showPassword, setShowPassword] = useState(false); const isPasswordField = type === 'password' || showPasswordToggle; const handleTogglePassword = () => { const newShowPassword = !showPassword; setShowPassword(newShowPassword); onPasswordToggle?.(newShowPassword); }; const inputType = isPasswordField && showPassword ? 'text' : type; const passwordIcon = isPasswordField ? (jsx("button", { type: "button", onClick: handleTogglePassword, className: styles$f.passwordToggle, "aria-label": showPassword ? "Ocultar contraseña" : "Mostrar contraseña", tabIndex: -1, children: jsx("i", { className: `bi ${showPassword ? "bi-eye-slash" : "bi-eye"}` }) })) : icon; const hasIcon = passwordIcon || icon; const inputClassNames = [ styles$f.input, styles$f[variant], styles$f[size], error ? styles$f.error : '', hasIcon ? styles$f[`inputWithIcon-${iconPosition}`] : '', ].filter(Boolean).join(' '); const wrapperClassNames = [ styles$f.inputWrapper, externalClassName ].filter(Boolean).join(' '); return (jsxs("div", { className: wrapperClassNames, children: [jsx("input", { className: inputClassNames, ref: ref, type: inputType, ...props }), hasIcon && (jsx("span", { className: styles$f[`icon-${iconPosition}`], children: passwordIcon || icon })), helperText && (jsx("span", { className: `${styles$f.helperText} ${error ? styles$f.errorText : ''}`, children: helperText }))] })); }); Input.displayName = 'Input'; var styles$e = {"textareaWrapper":"Textarea-module_textareaWrapper__wDjfs","textarea":"Textarea-module_textarea__gPyid","small":"Textarea-module_small__cNH5Y","medium":"Textarea-module_medium__ZAHPh","large":"Textarea-module_large__uVXgf","error":"Textarea-module_error__Kx1jB","helperText":"Textarea-module_helperText__RE9As","errorText":"Textarea-module_errorText__sRqad"}; const Textarea = forwardRef(({ className: externalClassName, size = 'medium', error = false, helperText, ...props }, ref) => { const textareaClassNames = [ styles$e.textarea, styles$e[size], error ? styles$e.error : '', externalClassName ].filter(Boolean).join(' '); return (jsxs("div", { className: styles$e.textareaWrapper, children: [jsx("textarea", { ref: ref, className: textareaClassNames, ...props }), helperText && (jsx("span", { className: `${styles$e.helperText} ${error ? styles$e.errorText : ''}`, children: helperText }))] })); }); Textarea.displayName = 'Textarea'; var styles$d = {"overlay":"Modal-module_overlay__dd9h1","modal":"Modal-module_modal__aD7aP","small":"Modal-module_small__Xlbt5","medium":"Modal-module_medium__OnN1W","large":"Modal-module_large__p-8Oq","full":"Modal-module_full__z-yai","header":"Modal-module_header__ILG9i","title":"Modal-module_title__A5OeE","closeButton":"Modal-module_closeButton__3LpSf","body":"Modal-module_body__lVhql","footer":"Modal-module_footer__rro2w"}; function Modal({ isOpen, onClose, title, children, footer, size = 'medium', closeOnOverlayClick = true, closeOnEscape = true, showCloseButton = true, className, }) { const handleOverlayClick = useCallback((e) => { if (closeOnOverlayClick && e.target === e.currentTarget) { onClose(); } }, [closeOnOverlayClick, onClose]); const handleKeyDown = useCallback((event) => { if (closeOnEscape && event.key === 'Escape') { onClose(); } }, [closeOnEscape, onClose]); useEffect(() => { if (!isOpen) return; document.addEventListener('keydown', handleKeyDown); document.body.style.overflow = 'hidden'; return () => { document.removeEventListener('keydown', handleKeyDown); document.body.style.overflow = 'unset'; }; }, [isOpen, handleKeyDown]); if (!isOpen) { return null; } let modalRoot = document.getElementById('modal-root'); if (!modalRoot) { modalRoot = document.createElement('div'); modalRoot.id = 'modal-root'; document.body.appendChild(modalRoot); } const modalContent = (jsx("div", { className: styles$d.overlay, onClick: handleOverlayClick, children: jsxs("div", { className: `${styles$d.modal} ${styles$d[size]} ${className || ''}`, children: [(title || showCloseButton) && (jsxs("div", { className: styles$d.header, children: [title && jsx("h2", { className: styles$d.title, children: title }), showCloseButton && (jsx("button", { className: styles$d.closeButton, onClick: onClose, "aria-label": "Cerrar modal", children: jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: jsx("path", { d: "M18 6L6 18M6 6L18 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] })), jsx("div", { className: styles$d.body, children: children }), footer && jsx("div", { className: styles$d.footer, children: footer })] }) })); return ReactDOM.createPortal(modalContent, modalRoot); } Modal.displayName = 'Modal'; var styles$c = {"avatar":"Avatar-module_avatar__3xMuZ","small":"Avatar-module_small__7vy-3","medium":"Avatar-module_medium__C-r6w","large":"Avatar-module_large__o6L9B","xlarge":"Avatar-module_xlarge__0fqzZ","circle":"Avatar-module_circle__O2tJa","square":"Avatar-module_square__KXudv","rounded":"Avatar-module_rounded__ZjpM3","active":"Avatar-module_active__m-igQ","clickable":"Avatar-module_clickable__ZWt3Y","image":"Avatar-module_image__ieqGp"}; const Avatar = forwardRef(({ text, image, size = 'medium', variant = 'circle', isActive = false, onClick, className, backgroundColor, color, alt, }, ref) => { const classNames = [ styles$c.avatar, styles$c[size], styles$c[variant], onClick ? styles$c.clickable : '', isActive ? styles$c.active : '', className, ] .filter(Boolean) .join(' '); const style = { backgroundColor, color, }; const handleClick = () => { if (onClick) { onClick(); } }; const handleKeyDown = (event) => { if (onClick && (event.key === 'Enter' || event.key === ' ')) { event.preventDefault(); onClick(); } }; return (jsx("span", { ref: ref, className: classNames, onClick: handleClick, onKeyDown: handleKeyDown, style: style, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined, "aria-label": alt || (text ? `Avatar de ${text}` : 'Avatar'), children: image ? (jsx("img", { src: image, alt: alt || text || 'Avatar', className: styles$c.image, onError: (e) => { const target = e.target; target.style.display = 'none'; const parent = target.parentElement; if (parent && text) { parent.textContent = text.toUpperCase(); } } })) : (text?.toUpperCase()) })); }); Avatar.displayName = 'Avatar'; var styles$b = {"container":"Banner-module_container__nC09e","layoutSimple":"Banner-module_layoutSimple__7pKJG","layoutComplex":"Banner-module_layoutComplex__kqUVj","header":"Banner-module_header__2xS1F","titleContainer":"Banner-module_titleContainer__Ex9aj","title":"Banner-module_title__AeTHT","icon":"Banner-module_icon__vzKmx","actionsContainer":"Banner-module_actionsContainer__TQTuw","message":"Banner-module_message__uepT5","closeButton":"Banner-module_closeButton__Nvc2D","dark":"Banner-module_dark__r3kLA","light":"Banner-module_light__BHjzE","info":"Banner-module_info__s2q0P","recommendation":"Banner-module_recommendation__HiMEZ","subtle":"Banner-module_subtle__rCrB3"}; const Banner = forwardRef(({ children, variant = 'dark', className = '', title, icon, actions, onClose, dismissible = true, fullWidth = true, withBorder = true, borderColor, }, ref) => { const isComplex = Boolean(title || icon || actions); const containerClassName = [ styles$b.container, isComplex ? styles$b.layoutComplex : styles$b.layoutSimple, styles$b[variant], fullWidth ? styles$b.fullWidth : '', !withBorder ? styles$b.noBorder : '', className, ] .filter(Boolean) .join(' '); const handleClose = () => { if (onClose) { onClose(); } }; const handleKeyDown = (event) => { if (event.key === 'Escape' && onClose) { event.preventDefault(); onClose(); } }; return (jsx("div", { ref: ref, className: containerClassName, style: borderColor ? { borderColor } : undefined, onKeyDown: handleKeyDown, role: "alert", "aria-live": "polite", children: isComplex ? (jsxs(Fragment, { children: [jsxs("div", { className: styles$b.header, children: [jsxs("div", { className: styles$b.titleContainer, children: [icon && jsx("span", { className: styles$b.icon, children: icon }), title && jsx("h4", { className: styles$b.title, children: title })] }), jsxs("div", { className: styles$b.actionsContainer, children: [actions, dismissible && onClose && (jsx("button", { onClick: handleClose, className: styles$b.closeButton, "aria-label": "Cerrar banner", type: "button", children: jsx("i", { className: "bi bi-x" }) }))] })] }), jsx("div", { className: styles$b.message, children: children })] })) : (jsxs(Fragment, { children: [jsxs("div", { className: styles$b.message, children: [icon && jsx("span", { className: styles$b.icon, children: icon }), children] }), dismissible && onClose && (jsx("button", { onClick: handleClose, className: styles$b.closeButton, "aria-label": "Cerrar banner", type: "button", children: jsx("i", { className: "bi bi-x" }) }))] })) })); }); Banner.displayName = 'Banner'; var styles$a = {"inline":"Loader-module_inline__PXojO","fullscreen":"Loader-module_fullscreen__9RRiK","spinner":"Loader-module_spinner__TNcl-","blobMorph":"Loader-module_blobMorph__00UAk","float":"Loader-module_float__d36Rx","dotsContainer":"Loader-module_dotsContainer__pq8gM","dot":"Loader-module_dot__Bi3gT","bounce":"Loader-module_bounce__icyz1","pulse":"Loader-module_pulse__7gLVL","orbitContainer":"Loader-module_orbitContainer__2rYQf","slice":"Loader-module_slice__DVpkx","orbit":"Loader-module_orbit__2IAhs","small":"Loader-module_small__TY4e0","medium":"Loader-module_medium__yEp7I","large":"Loader-module_large__xzqCD","message":"Loader-module_message__NbFGC","progress":"Loader-module_progress__9Ib4z","progressContainer":"Loader-module_progressContainer__N0fat","progressBar":"Loader-module_progressBar__EmpOq","progressFill":"Loader-module_progressFill__3cfjj","progressText":"Loader-module_progressText__oqzKv"}; const Loader = forwardRef(({ variant = 'spinner', size = 'medium', message, progress, className = '', color, fullScreen = false, }, ref) => { const containerClassName = [ fullScreen ? styles$a.fullscreen : styles$a.inline, styles$a[variant], styles$a[size], className, ] .filter(Boolean) .join(' '); const spinnerStyle = color ? { backgroundColor: color } : undefined; const renderSpinner = () => { switch (variant) { case 'dots': return (jsx("div", { className: styles$a.dotsContainer, children: Array.from({ length: 3 }).map((_, i) => (jsx("div", { className: styles$a.dot, style: spinnerStyle }, i))) })); case 'pulse': return jsx("div", { className: styles$a.pulse, style: spinnerStyle }); case 'fullscreen': return (jsx("div", { className: styles$a.orbitContainer, children: Array.from({ length: 6 }).map((_, i) => (jsx("div", { className: styles$a.slice }, i))) })); default: // spinner return jsx("div", { className: styles$a.spinner, style: spinnerStyle }); } }; if (fullScreen) { return (jsxs("div", { ref: ref, className: containerClassName, children: [renderSpinner(), message && jsx("p", { className: styles$a.message, children: message }), progress !== undefined && (jsxs("div", { className: styles$a.progressContainer, children: [jsx("div", { className: styles$a.progressBar, children: jsx("div", { className: styles$a.progressFill, style: { width: `${Math.min(100, Math.max(0, progress))}%` } }) }), jsxs("span", { className: styles$a.progressText, children: [progress, "%"] })] }))] })); } return (jsxs("div", { ref: ref, className: containerClassName, children: [renderSpinner(), message && jsx("span", { className: styles$a.message, children: message }), progress !== undefined && (jsxs("span", { className: styles$a.progress, children: [progress, "%"] }))] })); }); Loader.displayName = 'Loader'; var styles$9 = {"wrapper":"Select-module_wrapper__KS2K3","fullWidth":"Select-module_fullWidth__l-JJV","label":"Select-module_label__Lmgos","selectContainer":"Select-module_selectContainer__uzCk5","select":"Select-module_select__cjdcr","icon":"Select-module_icon__H40zZ","small":"Select-module_small__N3oFV","medium":"Select-module_medium__tbHRf","large":"Select-module_large__KFXKW","pill":"Select-module_pill__Nob4X","subtle":"Select-module_subtle__bZvpZ","compact":"Select-module_compact__OxPiP","error":"Select-module_error__sw9MU","helperText":"Select-module_helperText__RJnFj","errorText":"Select-module_errorText__-zd6i","disabled":"Select-module_disabled__8YgjS"}; const Select = forwardRef(({ options, label, variant = 'default', size = 'medium', error = false, helperText, placeholder, icon, className, fullWidth = true, disabled, ...props }, ref) => { const wrapperClassName = [ styles$9.wrapper, fullWidth ? styles$9.fullWidth : '', className, ] .filter(Boolean) .join(' '); const selectContainerClassName = [ styles$9.selectContainer, styles$9[variant], styles$9[size], error ? styles$9.error : '', disabled ? styles$9.disabled : '', ] .filter(Boolean) .join(' '); const selectClassName = [ styles$9.select, error ? styles$9.error : '', ] .filter(Boolean) .join(' '); return (jsxs("div", { className: wrapperClassName, children: [label && (jsx("label", { className: styles$9.label, htmlFor: props.id, children: label })), jsxs("div", { className: selectContainerClassName, children: [jsxs("select", { ref: ref, className: selectClassName, disabled: disabled, ...props, children: [placeholder && (jsx("option", { value: "", disabled: true, children: placeholder })), options.map((option) => (jsx("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value)))] }), jsx("div", { className: styles$9.icon, children: icon || (jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", children: jsx("path", { d: "M6 9L12 15L18 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })) })] }), helperText && (jsx("span", { className: error ? styles$9.errorText : styles$9.helperText, children: helperText }))] })); }); Select.displayName = 'Select'; var styles$8 = {"container":"Tooltip-module_container__r7-LI","trigger":"Tooltip-module_trigger__Dmc5E","popup":"Tooltip-module_popup__pBTa7","fadeIn":"Tooltip-module_fadeIn__Hyd9M","bottom":"Tooltip-module_bottom__9Twz4","top":"Tooltip-module_top__m2tnn","left":"Tooltip-module_left__UPdrG","right":"Tooltip-module_right__CV--T","left-top":"Tooltip-module_left-top__scSXY","left-bottom":"Tooltip-module_left-bottom__Fi3kZ","right-t